Files
mermaid-live-editor/beta/_app/chunks/vendor-4cf3bda8.js
T

41 lines
1011 KiB
JavaScript

function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function r(t){return t()}function i(){return Object.create(null)}function a(t){t.forEach(r)}function o(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function l(t){let e;return c(t,(t=>e=t))(),e}function u(t,e,n){t.$$.on_destroy.push(c(e,n))}function h(t,e,n,r){if(t){const i=d(t,e,n,r);return t[0](i)}}function d(t,e,r,i){return t[1]&&i?n(r.ctx.slice(),t[1](i(e))):r.ctx}function f(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}function p(t,e,n,r,i,a){if(i){const o=d(e,n,r,a);t.p(o,i)}}function g(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function y(t){return null==t?"":t}function m(t,e,n){return t.set(n),e}const v="undefined"!=typeof window;let b=v?()=>window.performance.now():()=>Date.now(),_=v?t=>requestAnimationFrame(t):t;const w=new Set;function x(t){w.forEach((e=>{e.c(t)||(w.delete(e),e.f())})),0!==w.size&&_(x)}let k=!1;function C(t,e,n,r){for(;t<e;){const i=t+(e-t>>1);n(i)<=r?t=i+1:e=i}return t}function T(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e.host?e:document}function E(t){const e=D("style");return function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(T(t),e),e}function S(t,e){if(k){for(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if("HEAD"===t.nodeName){const t=[];for(let n=0;n<e.length;n++){const r=e[n];void 0!==r.claim_order&&t.push(r)}e=t}const n=new Int32Array(e.length+1),r=new Int32Array(e.length);n[0]=-1;let i=0;for(let c=0;c<e.length;c++){const t=e[c].claim_order,a=(i>0&&e[n[i]].claim_order<=t?i+1:C(1,i,(t=>e[n[t]].claim_order),t))-1;r[c]=n[a]+1;const o=a+1;n[o]=c,i=Math.max(o,i)}const a=[],o=[];let s=e.length-1;for(let c=n[i]+1;0!=c;c=r[c-1]){for(a.push(e[c-1]);s>=c;s--)o.push(e[s]);s--}for(;s>=0;s--)o.push(e[s]);a.reverse(),o.sort(((t,e)=>t.claim_order-e.claim_order));for(let c=0,l=0;c<o.length;c++){for(;l<a.length&&o[c].claim_order>=a[l].claim_order;)l++;const e=l<a.length?a[l]:null;t.insertBefore(o[c],e)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild);null!==t.actual_end_child&&void 0===t.actual_end_child.claim_order;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?void 0===e.claim_order&&e.parentNode===t||t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else e.parentNode===t&&null===e.nextSibling||t.appendChild(e)}function O(t,e,n){k&&!n?S(t,e):e.parentNode===t&&e.nextSibling==n||t.insertBefore(e,n||null)}function A(t){t.parentNode.removeChild(t)}function M(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function D(t){return document.createElement(t)}function j(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function N(t){return document.createTextNode(t)}function B(){return N(" ")}function L(){return N("")}function R(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function I(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function F(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function P(t){return""===t?null:+t}function Y(t){return Array.from(t.childNodes)}function z(t,e,n,r,i=!1){!function(t){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0})}(t);const a=(()=>{for(let r=t.claim_info.last_index;r<t.length;r++){const a=t[r];if(e(a)){const e=n(a);return void 0===e?t.splice(r,1):t[r]=e,i||(t.claim_info.last_index=r),a}}for(let r=t.claim_info.last_index-1;r>=0;r--){const a=t[r];if(e(a)){const e=n(a);return void 0===e?t.splice(r,1):t[r]=e,i?void 0===e&&t.claim_info.last_index--:t.claim_info.last_index=r,a}}return r()})();return a.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,a}function U(t,e,n,r){return z(t,(t=>t.nodeName===e),(t=>{const e=[];for(let r=0;r<t.attributes.length;r++){const i=t.attributes[r];n[i.name]||e.push(i.name)}e.forEach((e=>t.removeAttribute(e)))}),(()=>r?j(e):D(e)))}function $(t,e){return z(t,(t=>3===t.nodeType),(t=>{const n=""+e;if(t.data.startsWith(n)){if(t.data.length!==n.length)return t.splitText(n.length)}else t.data=n}),(()=>N(e)),!0)}function W(t){return $(t," ")}function q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function H(t,e){t.value=null==e?"":e}function V(t,e,n,r){t.style.setProperty(e,n,r?"important":"")}function G(t,e){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===e)return void(r.selected=!0)}}function X(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function Z(t,e,n){t.classList[n?"add":"remove"](e)}function Q(t,e,n=!1){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,!1,e),r}const K=new Set;let J,tt=0;function et(t,e,n,r,i,a,o,s=0){const c=16.666/r;let l="{\n";for(let y=0;y<=1;y+=c){const t=e+(n-e)*a(y);l+=100*y+`%{${o(t,1-t)}}\n`}const u=l+`100% {${o(n,1-n)}}\n}`,h=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${s}`,d=T(t);K.add(d);const f=d.__svelte_stylesheet||(d.__svelte_stylesheet=E(t).sheet),p=d.__svelte_rules||(d.__svelte_rules={});p[h]||(p[h]=!0,f.insertRule(`@keyframes ${h} ${u}`,f.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${h} ${r}ms linear ${i}ms 1 both`,tt+=1,h}function nt(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),tt-=i,tt||_((()=>{tt||(K.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),K.clear())})))}function rt(t){J=t}function it(){if(!J)throw new Error("Function called outside component initialization");return J}function at(t){it().$$.on_mount.push(t)}function ot(t){it().$$.after_update.push(t)}function st(){const t=it();return(e,n)=>{const r=t.$$.callbacks[e];if(r){const i=Q(e,n);r.slice().forEach((e=>{e.call(t,i)}))}}}function ct(t,e){it().$$.context.set(t,e)}function lt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const ut=[],ht=[],dt=[],ft=[],pt=Promise.resolve();let gt=!1;function yt(t){dt.push(t)}function mt(t){ft.push(t)}let vt=!1;const bt=new Set;function _t(){if(!vt){vt=!0;do{for(let t=0;t<ut.length;t+=1){const e=ut[t];rt(e),wt(e.$$)}for(rt(null),ut.length=0;ht.length;)ht.pop()();for(let t=0;t<dt.length;t+=1){const e=dt[t];bt.has(e)||(bt.add(e),e())}dt.length=0}while(ut.length);for(;ft.length;)ft.pop()();gt=!1,vt=!1,bt.clear()}}function wt(t){if(null!==t.fragment){t.update(),a(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(yt)}}let xt;function kt(t,e,n){t.dispatchEvent(Q(`${e?"intro":"outro"}${n}`))}const Ct=new Set;let Tt;function Et(){Tt={r:0,c:[],p:Tt}}function St(){Tt.r||a(Tt.c),Tt=Tt.p}function Ot(t,e){t&&t.i&&(Ct.delete(t),t.i(e))}function At(t,e,n,r){if(t&&t.o){if(Ct.has(t))return;Ct.add(t),Tt.c.push((()=>{Ct.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}const Mt={duration:0};function Dt(n,r,i,s){let c=r(n,i),l=s?0:1,u=null,h=null,d=null;function f(){d&&nt(n,d)}function p(t,e){const n=t.b-l;return e*=Math.abs(n),{a:l,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function g(r){const{delay:i=0,duration:o=300,easing:s=e,tick:g=t,css:y}=c||Mt,m={start:b()+i,b:r};r||(m.group=Tt,Tt.r+=1),u||h?h=m:(y&&(f(),d=et(n,l,r,o,i,s,y)),r&&g(0,1),u=p(m,o),yt((()=>kt(n,r,"start"))),function(t){let e;0===w.size&&_(x),new Promise((n=>{w.add(e={c:t,f:n})}))}((t=>{if(h&&t>h.start&&(u=p(h,o),h=null,kt(n,u.b,"start"),y&&(f(),d=et(n,l,u.b,u.duration,0,s,c.css))),u)if(t>=u.end)g(l=u.b,1-l),kt(n,u.b,"end"),h||(u.b?f():--u.group.r||a(u.group.c)),u=null;else if(t>=u.start){const e=t-u.start;l=u.a+u.d*s(e/u.duration),g(l,1-l)}return!(!u&&!h)})))}return{run(t){o(c)?(xt||(xt=Promise.resolve(),xt.then((()=>{xt=null}))),xt).then((()=>{c=c(),g(t)})):g(t)},end(){f(),u=h=null}}}function jt(t,e){const n={},r={},i={$$scope:1};let a=t.length;for(;a--;){const o=t[a],s=e[a];if(s){for(const t in o)t in s||(r[t]=1);for(const t in s)i[t]||(n[t]=s[t],i[t]=1);t[a]=s}else for(const t in o)i[t]=1}for(const o in r)o in n||(n[o]=void 0);return n}function Nt(t){return"object"==typeof t&&null!==t?t:{}}function Bt(t,e,n){const r=t.$$.props[e];void 0!==r&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function Lt(t){t&&t.c()}function Rt(t,e){t&&t.l(e)}function It(t,e,n,i){const{fragment:s,on_mount:c,on_destroy:l,after_update:u}=t.$$;s&&s.m(e,n),i||yt((()=>{const e=c.map(r).filter(o);l?l.push(...e):a(e),t.$$.on_mount=[]})),u.forEach(yt)}function Ft(t,e){const n=t.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Pt(t,e){-1===t.$$.dirty[0]&&(ut.push(t),gt||(gt=!0,pt.then(_t)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Yt(e,n,r,o,s,c,l,u=[-1]){const h=J;rt(e);const d=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:s,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(h?h.$$.context:n.context||[]),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||h.$$.root};l&&l(d.root);let f=!1;if(d.ctx=r?r(e,n.props||{},((t,n,...r)=>{const i=r.length?r[0]:n;return d.ctx&&s(d.ctx[t],d.ctx[t]=i)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](i),f&&Pt(e,t)),n})):[],d.update(),f=!0,a(d.before_update),d.fragment=!!o&&o(d.ctx),n.target){if(n.hydrate){k=!0;const t=Y(n.target);d.fragment&&d.fragment.l(t),t.forEach(A)}else d.fragment&&d.fragment.c();n.intro&&Ot(e.$$.fragment),It(e,n.target,n.anchor,n.customElement),k=!1,_t()}rt(h)}class zt{$destroy(){Ft(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ut=[];function $t(e,n=t){let r;const i=new Set;function a(t){if(s(e,t)&&(e=t,r)){const t=!Ut.length;for(const n of i)n[1](),Ut.push(n,e);if(t){for(let t=0;t<Ut.length;t+=2)Ut[t][0](Ut[t+1]);Ut.length=0}}}return{set:a,update:function(t){a(t(e))},subscribe:function(o,s=t){const c=[o,s];return i.add(c),1===i.size&&(r=n(a)||t),o(e),()=>{i.delete(c),0===i.size&&(r(),r=null)}}}}function Wt(e,n,r){const i=!Array.isArray(e),s=i?[e]:e,l=n.length<2;return{subscribe:$t(r,(e=>{let r=!1;const u=[];let h=0,d=t;const f=()=>{if(h)return;d();const r=n(i?u[0]:u,e);l?e(r):d=o(r)?r:t},p=s.map(((t,e)=>c(t,(t=>{u[e]=t,h&=~(1<<e),r&&f()}),(()=>{h|=1<<e}))));return r=!0,f(),function(){a(p),d()}})).subscribe}}function qt(t,e,n){const r=e.getValue(n);return null!==r&&t.set(r),e.addListener&&e.addListener(n,(e=>{t.set(e)})),t.subscribe((t=>{e.setValue(n,t)})),Object.assign(Object.assign({},t),{delete(){e.deleteValue(n)}})}function Ht(t,e=!1){const n=[],r=e=>{const r=e.key;e.storageArea===t&&n.filter((({key:t})=>t===r)).forEach((({listener:t})=>{let n=e.newValue;try{n=JSON.parse(e.newValue)}catch(r){}t(n)}))};return{addListener(t,i){n.push({key:t,listener:i}),1===n.length&&e&&"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.addEventListener)&&window.addEventListener("storage",r)},removeListener(t,i){const a=n.indexOf({key:t,listener:i});-1!==a&&n.splice(a,1),0===n.length&&e&&"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.removeEventListener)&&window.removeEventListener("storage",r)},getValue(e){let n=t.getItem(e);if(null!=n)try{n=JSON.parse(n)}catch(r){}return n},deleteValue(e){t.removeItem(e)},setValue(e,n){t.setItem(e,JSON.stringify(n))}}}function Vt(t=!1){return"undefined"!=typeof window&&(null===window||void 0===window?void 0:window.localStorage)?Ht(window.localStorage,t):(console.warn("Unable to find the localStorage. No data will be persisted."),{getValue:()=>null,deleteValue(){},setValue(){}})}const Gt="function"==typeof atob,Xt="function"==typeof btoa,Zt="function"==typeof Buffer,Qt="function"==typeof TextDecoder?new TextDecoder:void 0,Kt="function"==typeof TextEncoder?new TextEncoder:void 0,Jt=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],te=(t=>{let e={};return Jt.forEach(((t,n)=>e[t]=n)),e})(),ee=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ne=String.fromCharCode.bind(String),re="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(t,e=(t=>t))=>new Uint8Array(Array.prototype.slice.call(t,0).map(e)),ie=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),ae=Xt?t=>btoa(t):Zt?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,n,r,i,a="";const o=t.length%3;for(let s=0;s<t.length;){if((n=t.charCodeAt(s++))>255||(r=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,a+=Jt[e>>18&63]+Jt[e>>12&63]+Jt[e>>6&63]+Jt[63&e]}return o?a.slice(0,o-3)+"===".substring(o):a},oe=Zt?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let n=0,r=t.length;n<r;n+=4096)e.push(ne.apply(null,t.subarray(n,n+4096)));return ae(e.join(""))},se=t=>{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?ne(192|e>>>6)+ne(128|63&e):ne(224|e>>>12&15)+ne(128|e>>>6&63)+ne(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return ne(240|e>>>18&7)+ne(128|e>>>12&63)+ne(128|e>>>6&63)+ne(128|63&e)},ce=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,le=Zt?t=>Buffer.from(t,"utf8").toString("base64"):Kt?t=>oe(Kt.encode(t)):t=>ae(t.replace(ce,se)),ue=(t,e=!1)=>e?(t=>t.replace(/[+\/]/g,(t=>"+"==t?"-":"_")).replace(/=+$/m,""))(le(t)):le(t),he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,de=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return ne(55296+(e>>>10))+ne(56320+(1023&e));case 3:return ne((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return ne((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},fe=Gt?t=>atob(ie(t)):Zt?t=>Buffer.from(t,"base64").toString("binary"):t=>{if(t=t.replace(/\s+/g,""),!ee.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let e,n,r,i="";for(let a=0;a<t.length;)e=te[t.charAt(a++)]<<18|te[t.charAt(a++)]<<12|(n=te[t.charAt(a++)])<<6|(r=te[t.charAt(a++)]),i+=64===n?ne(e>>16&255):64===r?ne(e>>16&255,e>>8&255):ne(e>>16&255,e>>8&255,255&e);return i},pe=Zt?t=>re(Buffer.from(t,"base64")):t=>re(fe(t),(t=>t.charCodeAt(0))),ge=Zt?t=>Buffer.from(t,"base64").toString("utf8"):Qt?t=>Qt.decode(pe(t)):t=>fe(t).replace(he,de),ye=t=>ge(ie(t.replace(/[-_]/g,(t=>"-"==t?"+":"/")))),me="8.11.4";function ve(t){const e=t-1;return e*e*e+1}function be(t,{delay:n=0,duration:r=400,easing:i=e}={}){const a=+getComputedStyle(t).opacity;return{delay:n,duration:r,easing:i,css:t=>"opacity: "+t*a}}function _e(t,{delay:e=0,duration:n=400,easing:r=ve}={}){const i=getComputedStyle(t),a=+i.opacity,o=parseFloat(i.height),s=parseFloat(i.paddingTop),c=parseFloat(i.paddingBottom),l=parseFloat(i.marginTop),u=parseFloat(i.marginBottom),h=parseFloat(i.borderTopWidth),d=parseFloat(i.borderBottomWidth);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*a};height: ${t*o}px;padding-top: ${t*s}px;padding-bottom: ${t*c}px;margin-top: ${t*l}px;margin-bottom: ${t*u}px;border-top-width: ${t*h}px;border-bottom-width: ${t*d}px;`}}
//! moment.js
//! version : 2.29.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var we,xe;function ke(){return we.apply(null,arguments)}function Ce(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function Te(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function Ee(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Se(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(Ee(t,e))return!1;return!0}function Oe(t){return void 0===t}function Ae(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function Me(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function De(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function je(t,e){for(var n in e)Ee(e,n)&&(t[n]=e[n]);return Ee(e,"toString")&&(t.toString=e.toString),Ee(e,"valueOf")&&(t.valueOf=e.valueOf),t}function Ne(t,e,n,r){return qr(t,e,n,r,!0).utc()}function Be(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function Le(t){if(null==t._isValid){var e=Be(t),n=xe.call(e.parsedDateParts,(function(t){return null!=t})),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(r=r&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function Re(t){var e=Ne(NaN);return null!=t?je(Be(e),t):Be(e).userInvalidated=!0,e}xe=Array.prototype.some?Array.prototype.some:function(t){var e,n=Object(this),r=n.length>>>0;for(e=0;e<r;e++)if(e in n&&t.call(this,n[e],e,n))return!0;return!1};var Ie=ke.momentProperties=[],Fe=!1;function Pe(t,e){var n,r,i;if(Oe(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),Oe(e._i)||(t._i=e._i),Oe(e._f)||(t._f=e._f),Oe(e._l)||(t._l=e._l),Oe(e._strict)||(t._strict=e._strict),Oe(e._tzm)||(t._tzm=e._tzm),Oe(e._isUTC)||(t._isUTC=e._isUTC),Oe(e._offset)||(t._offset=e._offset),Oe(e._pf)||(t._pf=Be(e)),Oe(e._locale)||(t._locale=e._locale),Ie.length>0)for(n=0;n<Ie.length;n++)Oe(i=e[r=Ie[n]])||(t[r]=i);return t}function Ye(t){Pe(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===Fe&&(Fe=!0,ke.updateOffset(this),Fe=!1)}function ze(t){return t instanceof Ye||null!=t&&null!=t._isAMomentObject}function Ue(t){!1===ke.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function $e(t,e){var n=!0;return je((function(){if(null!=ke.deprecationHandler&&ke.deprecationHandler(null,t),n){var r,i,a,o=[];for(i=0;i<arguments.length;i++){if(r="","object"==typeof arguments[i]){for(a in r+="\n["+i+"] ",arguments[0])Ee(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[i];o.push(r)}Ue(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var We,qe={};function He(t,e){null!=ke.deprecationHandler&&ke.deprecationHandler(t,e),qe[t]||(Ue(e),qe[t]=!0)}function Ve(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function Ge(t,e){var n,r=je({},t);for(n in e)Ee(e,n)&&(Te(t[n])&&Te(e[n])?(r[n]={},je(r[n],t[n]),je(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)Ee(t,n)&&!Ee(e,n)&&Te(t[n])&&(r[n]=je({},r[n]));return r}function Xe(t){null!=t&&this.set(t)}ke.suppressDeprecationWarnings=!1,ke.deprecationHandler=null,We=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)Ee(t,e)&&n.push(e);return n};function Ze(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Qe=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ke=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Je={},tn={};function en(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(tn[t]=i),e&&(tn[e[0]]=function(){return Ze(i.apply(this,arguments),e[1],e[2])}),n&&(tn[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function nn(t,e){return t.isValid()?(e=rn(e,t.localeData()),Je[e]=Je[e]||function(t){var e,n,r,i=t.match(Qe);for(e=0,n=i.length;e<n;e++)tn[i[e]]?i[e]=tn[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+=Ve(i[r])?i[r].call(e,t):i[r];return a}}(e),Je[e](t)):t.localeData().invalidDate()}function rn(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(Ke.lastIndex=0;n>=0&&Ke.test(t);)t=t.replace(Ke,r),Ke.lastIndex=0,n-=1;return t}var an={};function on(t,e){var n=t.toLowerCase();an[n]=an[n+"s"]=an[e]=t}function sn(t){return"string"==typeof t?an[t]||an[t.toLowerCase()]:void 0}function cn(t){var e,n,r={};for(n in t)Ee(t,n)&&(e=sn(n))&&(r[e]=t[n]);return r}var ln={};function un(t,e){ln[t]=e}function hn(t){return t%4==0&&t%100!=0||t%400==0}function dn(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function fn(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=dn(e)),n}function pn(t,e){return function(n){return null!=n?(yn(this,t,n),ke.updateOffset(this,e),this):gn(this,t)}}function gn(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function yn(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&hn(t.year())&&1===t.month()&&29===t.date()?(n=fn(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Un(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}var mn,vn=/\d/,bn=/\d\d/,_n=/\d{3}/,wn=/\d{4}/,xn=/[+-]?\d{6}/,kn=/\d\d?/,Cn=/\d\d\d\d?/,Tn=/\d\d\d\d\d\d?/,En=/\d{1,3}/,Sn=/\d{1,4}/,On=/[+-]?\d{1,6}/,An=/\d+/,Mn=/[+-]?\d+/,Dn=/Z|[+-]\d\d:?\d\d/gi,jn=/Z|[+-]\d\d(?::?\d\d)?/gi,Nn=/[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;function Bn(t,e,n){mn[t]=Ve(e)?e:function(t,r){return t&&n?n:e}}function Ln(t,e){return Ee(mn,t)?mn[t](e._strict,e._locale):new RegExp(Rn(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function Rn(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}mn={};var In={};function Fn(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),Ae(e)&&(r=function(t,n){n[e]=fn(t)}),n=0;n<t.length;n++)In[t[n]]=r}function Pn(t,e){Fn(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function Yn(t,e,n){null!=e&&Ee(In,t)&&In[t](e,n._a,n,t)}var zn;function Un(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,r=(e%(n=12)+n)%n;return t+=(e-r)/12,1===r?hn(t)?29:28:31-r%7%2}zn=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},en("M",["MM",2],"Mo",(function(){return this.month()+1})),en("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),en("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),on("month","M"),un("month",8),Bn("M",kn),Bn("MM",kn,bn),Bn("MMM",(function(t,e){return e.monthsShortRegex(t)})),Bn("MMMM",(function(t,e){return e.monthsRegex(t)})),Fn(["M","MM"],(function(t,e){e[1]=fn(t)-1})),Fn(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:Be(n).invalidMonth=t}));var $n="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Wn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),qn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Hn=Nn,Vn=Nn;function Gn(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=Ne([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=zn.call(this._shortMonthsParse,o))?i:null:-1!==(i=zn.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=zn.call(this._shortMonthsParse,o))||-1!==(i=zn.call(this._longMonthsParse,o))?i:null:-1!==(i=zn.call(this._longMonthsParse,o))||-1!==(i=zn.call(this._shortMonthsParse,o))?i:null}function Xn(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=fn(e);else if(!Ae(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Un(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Zn(t){return null!=t?(Xn(this,t),ke.updateOffset(this,!0),this):gn(this,"Month")}function Qn(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=Ne([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]=Rn(r[e]),i[e]=Rn(i[e]);for(e=0;e<24;e++)a[e]=Rn(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 Kn(t){return hn(t)?366:365}en("Y",0,0,(function(){var t=this.year();return t<=9999?Ze(t,4):"+"+t})),en(0,["YY",2],0,(function(){return this.year()%100})),en(0,["YYYY",4],0,"year"),en(0,["YYYYY",5],0,"year"),en(0,["YYYYYY",6,!0],0,"year"),on("year","y"),un("year",1),Bn("Y",Mn),Bn("YY",kn,bn),Bn("YYYY",Sn,wn),Bn("YYYYY",On,xn),Bn("YYYYYY",On,xn),Fn(["YYYYY","YYYYYY"],0),Fn("YYYY",(function(t,e){e[0]=2===t.length?ke.parseTwoDigitYear(t):fn(t)})),Fn("YY",(function(t,e){e[0]=ke.parseTwoDigitYear(t)})),Fn("Y",(function(t,e){e[0]=parseInt(t,10)})),ke.parseTwoDigitYear=function(t){return fn(t)+(fn(t)>68?1900:2e3)};var Jn=pn("FullYear",!0);function tr(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(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}function er(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function nr(t,e,n){var r=7+e-n;return-((7+er(t,0,r).getUTCDay()-e)%7)+r-1}function rr(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+nr(t,r,i);return s<=0?o=Kn(a=t-1)+s:s>Kn(t)?(a=t+1,o=s-Kn(t)):(a=t,o=s),{year:a,dayOfYear:o}}function ir(t,e,n){var r,i,a=nr(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+ar(i=t.year()-1,e,n):o>ar(t.year(),e,n)?(r=o-ar(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function ar(t,e,n){var r=nr(t,e,n),i=nr(t+1,e,n);return(Kn(t)-r+i)/7}en("w",["ww",2],"wo","week"),en("W",["WW",2],"Wo","isoWeek"),on("week","w"),on("isoWeek","W"),un("week",5),un("isoWeek",5),Bn("w",kn),Bn("ww",kn,bn),Bn("W",kn),Bn("WW",kn,bn),Pn(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=fn(t)}));function or(t,e){return t.slice(e,7).concat(t.slice(0,e))}en("d",0,"do","day"),en("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),en("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),en("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),en("e",0,0,"weekday"),en("E",0,0,"isoWeekday"),on("day","d"),on("weekday","e"),on("isoWeekday","E"),un("day",11),un("weekday",11),un("isoWeekday",11),Bn("d",kn),Bn("e",kn),Bn("E",kn),Bn("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Bn("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Bn("dddd",(function(t,e){return e.weekdaysRegex(t)})),Pn(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:Be(n).invalidWeekday=t})),Pn(["d","e","E"],(function(t,e,n,r){e[r]=fn(t)}));var sr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),cr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),lr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ur=Nn,hr=Nn,dr=Nn;function fr(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=Ne([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=zn.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=zn.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=zn.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=zn.call(this._weekdaysParse,o))||-1!==(i=zn.call(this._shortWeekdaysParse,o))||-1!==(i=zn.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=zn.call(this._shortWeekdaysParse,o))||-1!==(i=zn.call(this._weekdaysParse,o))||-1!==(i=zn.call(this._minWeekdaysParse,o))?i:null:-1!==(i=zn.call(this._minWeekdaysParse,o))||-1!==(i=zn.call(this._weekdaysParse,o))||-1!==(i=zn.call(this._shortWeekdaysParse,o))?i:null}function pr(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],l=[];for(e=0;e<7;e++)n=Ne([2e3,1]).day(e),r=Rn(this.weekdaysMin(n,"")),i=Rn(this.weekdaysShort(n,"")),a=Rn(this.weekdays(n,"")),o.push(r),s.push(i),c.push(a),l.push(r),l.push(i),l.push(a);o.sort(t),s.sort(t),c.sort(t),l.sort(t),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function gr(){return this.hours()%12||12}function yr(t,e){en(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function mr(t,e){return e._meridiemParse}en("H",["HH",2],0,"hour"),en("h",["hh",2],0,gr),en("k",["kk",2],0,(function(){return this.hours()||24})),en("hmm",0,0,(function(){return""+gr.apply(this)+Ze(this.minutes(),2)})),en("hmmss",0,0,(function(){return""+gr.apply(this)+Ze(this.minutes(),2)+Ze(this.seconds(),2)})),en("Hmm",0,0,(function(){return""+this.hours()+Ze(this.minutes(),2)})),en("Hmmss",0,0,(function(){return""+this.hours()+Ze(this.minutes(),2)+Ze(this.seconds(),2)})),yr("a",!0),yr("A",!1),on("hour","h"),un("hour",13),Bn("a",mr),Bn("A",mr),Bn("H",kn),Bn("h",kn),Bn("k",kn),Bn("HH",kn,bn),Bn("hh",kn,bn),Bn("kk",kn,bn),Bn("hmm",Cn),Bn("hmmss",Tn),Bn("Hmm",Cn),Bn("Hmmss",Tn),Fn(["H","HH"],3),Fn(["k","kk"],(function(t,e,n){var r=fn(t);e[3]=24===r?0:r})),Fn(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),Fn(["h","hh"],(function(t,e,n){e[3]=fn(t),Be(n).bigHour=!0})),Fn("hmm",(function(t,e,n){var r=t.length-2;e[3]=fn(t.substr(0,r)),e[4]=fn(t.substr(r)),Be(n).bigHour=!0})),Fn("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=fn(t.substr(0,r)),e[4]=fn(t.substr(r,2)),e[5]=fn(t.substr(i)),Be(n).bigHour=!0})),Fn("Hmm",(function(t,e,n){var r=t.length-2;e[3]=fn(t.substr(0,r)),e[4]=fn(t.substr(r))})),Fn("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=fn(t.substr(0,r)),e[4]=fn(t.substr(r,2)),e[5]=fn(t.substr(i))}));var vr=pn("Hours",!0);var br,_r={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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:$n,monthsShort:Wn,week:{dow:0,doy:6},weekdays:sr,weekdaysMin:lr,weekdaysShort:cr,meridiemParse:/[ap]\.?m?\.?/i},wr={},xr={};function kr(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function Cr(t){return t?t.toLowerCase().replace("_","-"):t}function Tr(t){var e=null;if(void 0===wr[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=br._abbr,require("./locale/"+t),Er(e)}catch(n){wr[t]=null}return wr[t]}function Er(t,e){var n;return t&&((n=Oe(e)?Or(t):Sr(t,e))?br=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),br._abbr}function Sr(t,e){if(null!==e){var n,r=_r;if(e.abbr=t,null!=wr[t])He("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=wr[t]._config;else if(null!=e.parentLocale)if(null!=wr[e.parentLocale])r=wr[e.parentLocale]._config;else{if(null==(n=Tr(e.parentLocale)))return xr[e.parentLocale]||(xr[e.parentLocale]=[]),xr[e.parentLocale].push({name:t,config:e}),null;r=n._config}return wr[t]=new Xe(Ge(r,e)),xr[t]&&xr[t].forEach((function(t){Sr(t.name,t.config)})),Er(t),wr[t]}return delete wr[t],null}function Or(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return br;if(!Ce(t)){if(e=Tr(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Cr(t[a]).split("-")).length,n=(n=Cr(t[a+1]))?n.split("-"):null;e>0;){if(r=Tr(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&kr(i,n)>=e-1)break;e--}a++}return br}(t)}function Ar(t){var e,n=t._a;return n&&-2===Be(t).overflow&&(e=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Un(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,Be(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),Be(t)._overflowWeeks&&-1===e&&(e=7),Be(t)._overflowWeekday&&-1===e&&(e=8),Be(t).overflow=e),t}var Mr=/^\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)?)?$/,Dr=/^\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)?)?$/,jr=/Z|[+-]\d\d(?::?\d\d)?/,Nr=[["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}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Br=[["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/]],Lr=/^\/?Date\((-?\d+)/i,Rr=/^(?:(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}))$/,Ir={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Fr(t){var e,n,r,i,a,o,s=t._i,c=Mr.exec(s)||Dr.exec(s);if(c){for(Be(t).iso=!0,e=0,n=Nr.length;e<n;e++)if(Nr[e][1].exec(c[1])){i=Nr[e][0],r=!1!==Nr[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=Br.length;e<n;e++)if(Br[e][1].exec(c[3])){a=(c[2]||" ")+Br[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!jr.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),$r(t)}else t._isValid=!1}function Pr(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Yr(t){var e,n,r,i,a,o,s,c,l=Rr.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){if(n=l[4],r=l[3],i=l[2],a=l[5],o=l[6],s=l[7],c=[Pr(n),Wn.indexOf(r),parseInt(i,10),parseInt(a,10),parseInt(o,10)],s&&c.push(parseInt(s,10)),e=c,!function(t,e,n){return!t||cr.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(Be(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],e,t))return;t._a=e,t._tzm=function(t,e,n){if(t)return Ir[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(l[8],l[9],l[10]),t._d=er.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),Be(t).rfc2822=!0}else t._isValid=!1}function zr(t,e,n){return null!=t?t:null!=e?e:n}function Ur(t){var e,n,r,i,a,o=[];if(!t._d){for(r=function(t){var e=new Date(ke.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c,l;null!=(e=t._w).GG||null!=e.W||null!=e.E?(a=1,o=4,n=zr(e.GG,t._a[0],ir(Hr(),1,4).year),r=zr(e.W,1),((i=zr(e.E,1))<1||i>7)&&(c=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,l=ir(Hr(),a,o),n=zr(e.gg,t._a[0],l.year),r=zr(e.w,l.week),null!=e.d?((i=e.d)<0||i>6)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||e.e>6)&&(c=!0)):i=a);r<1||r>ar(n,a,o)?Be(t)._overflowWeeks=!0:null!=c?Be(t)._overflowWeekday=!0:(s=rr(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(a=zr(t._a[0],r[0]),(t._dayOfYear>Kn(a)||0===t._dayOfYear)&&(Be(t)._overflowDayOfYear=!0),n=er(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]=o[e]=r[e];for(;e<7;e++)t._a[e]=o[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?er:tr).apply(null,o),i=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!==i&&(Be(t).weekdayMismatch=!0)}}function $r(t){if(t._f!==ke.ISO_8601)if(t._f!==ke.RFC_2822){t._a=[],Be(t).empty=!0;var e,n,r,i,a,o,s=""+t._i,c=s.length,l=0;for(r=rn(t._f,t._locale).match(Qe)||[],e=0;e<r.length;e++)i=r[e],(n=(s.match(Ln(i,t))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&Be(t).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),l+=n.length),tn[i]?(n?Be(t).empty=!1:Be(t).unusedTokens.push(i),Yn(i,n,t)):t._strict&&!n&&Be(t).unusedTokens.push(i);Be(t).charsLeftOver=c-l,s.length>0&&Be(t).unusedInput.push(s),t._a[3]<=12&&!0===Be(t).bigHour&&t._a[3]>0&&(Be(t).bigHour=void 0),Be(t).parsedDateParts=t._a.slice(0),Be(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),null!==(o=Be(t).era)&&(t._a[0]=t._locale.erasConvertYear(o,t._a[0])),Ur(t),Ar(t)}else Yr(t);else Fr(t)}function Wr(t){var e=t._i,n=t._f;return t._locale=t._locale||Or(t._l),null===e||void 0===n&&""===e?Re({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),ze(e)?new Ye(Ar(e)):(Me(e)?t._d=e:Ce(n)?function(t){var e,n,r,i,a,o,s=!1;if(0===t._f.length)return Be(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<t._f.length;i++)a=0,o=!1,e=Pe({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],$r(e),Le(e)&&(o=!0),a+=Be(e).charsLeftOver,a+=10*Be(e).unusedTokens.length,Be(e).score=a,s?a<r&&(r=a,n=e):(null==r||a<r||o)&&(r=a,n=e,o&&(s=!0));je(t,n||e)}(t):n?$r(t):function(t){var e=t._i;Oe(e)?t._d=new Date(ke.now()):Me(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=Lr.exec(t._i);null===e?(Fr(t),!1===t._isValid&&(delete t._isValid,Yr(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:ke.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):Ce(e)?(t._a=De(e.slice(0),(function(t){return parseInt(t,10)})),Ur(t)):Te(e)?function(t){if(!t._d){var e=cn(t._i),n=void 0===e.day?e.date:e.day;t._a=De([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),Ur(t)}}(t):Ae(e)?t._d=new Date(e):ke.createFromInputFallback(t)}(t),Le(t)||(t._d=null),t))}function qr(t,e,n,r,i){var a,o={};return!0!==e&&!1!==e||(r=e,e=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(Te(t)&&Se(t)||Ce(t)&&0===t.length)&&(t=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=t,o._f=e,o._strict=r,(a=new Ye(Ar(Wr(o))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Hr(t,e,n,r){return qr(t,e,n,r,!1)}ke.createFromInputFallback=$e("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. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),ke.ISO_8601=function(){},ke.RFC_2822=function(){};var Vr=$e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Hr.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:Re()})),Gr=$e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Hr.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:Re()}));function Xr(t,e){var n,r;if(1===e.length&&Ce(e[0])&&(e=e[0]),!e.length)return Hr();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Zr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Qr(t){var e=cn(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,c=e.minute||0,l=e.second||0,u=e.millisecond||0;this._isValid=function(t){var e,n,r=!1;for(e in t)if(Ee(t,e)&&(-1===zn.call(Zr,e)||null!=t[e]&&isNaN(t[e])))return!1;for(n=0;n<Zr.length;++n)if(t[Zr[n]]){if(r)return!1;parseFloat(t[Zr[n]])!==fn(t[Zr[n]])&&(r=!0)}return!0}(e),this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=Or(),this._bubble()}function Kr(t){return t instanceof Qr}function Jr(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function ti(t,e){en(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+Ze(~~(t/60),2)+e+Ze(~~t%60,2)}))}ti("Z",":"),ti("ZZ",""),Bn("Z",jn),Bn("ZZ",jn),Fn(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=ni(jn,t)}));var ei=/([\+\-]|\d\d)/gi;function ni(t,e){var n,r,i=(e||"").match(t);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(ei)||["-",0,0])[1]+fn(n[2]))?0:"+"===n[0]?r:-r}function ri(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(ze(t)||Me(t)?t.valueOf():Hr(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),ke.updateOffset(n,!1),n):Hr(t).local()}function ii(t){return-Math.round(t._d.getTimezoneOffset())}function ai(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}ke.updateOffset=function(){};var oi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,si=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ci(t,e){var n,r,i,a=t,o=null;return Kr(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:Ae(t)||!isNaN(+t)?(a={},e?a[e]=+t:a.milliseconds=+t):(o=oi.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:fn(o[2])*n,h:fn(o[3])*n,m:fn(o[4])*n,s:fn(o[5])*n,ms:fn(Jr(1e3*o[6]))*n}):(o=si.exec(t))?(n="-"===o[1]?-1:1,a={y:li(o[2],n),M:li(o[3],n),w:li(o[4],n),d:li(o[5],n),h:li(o[6],n),m:li(o[7],n),s:li(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=ri(e,t),t.isBefore(e)?n=ui(t,e):((n=ui(e,t)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Hr(a.from),Hr(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Qr(a),Kr(t)&&Ee(t,"_locale")&&(r._locale=t._locale),Kr(t)&&Ee(t,"_isValid")&&(r._isValid=t._isValid),r}function li(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function ui(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 hi(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(He(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),di(this,ci(n,r),t),this}}function di(t,e,n,r){var i=e._milliseconds,a=Jr(e._days),o=Jr(e._months);t.isValid()&&(r=null==r||r,o&&Xn(t,gn(t,"Month")+o*n),a&&yn(t,"Date",gn(t,"Date")+a*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&ke.updateOffset(t,a||o))}ci.fn=Qr.prototype,ci.invalid=function(){return ci(NaN)};var fi=hi(1,"add"),pi=hi(-1,"subtract");function gi(t){return"string"==typeof t||t instanceof String}function yi(t){return ze(t)||Me(t)||gi(t)||Ae(t)||function(t){var e=Ce(t),n=!1;e&&(n=0===t.filter((function(e){return!Ae(e)&&gi(t)})).length);return e&&n}(t)||function(t){var e,n,r=Te(t)&&!Se(t),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(e=0;e<a.length;e+=1)n=a[e],i=i||Ee(t,n);return r&&i}(t)||null==t}function mi(t){var e,n=Te(t)&&!Se(t),r=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<i.length;e+=1)r=r||Ee(t,i[e]);return n&&r}function vi(t,e){if(t.date()<e.date())return-vi(e,t);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 bi(t){var e;return void 0===t?this._locale._abbr:(null!=(e=Or(t))&&(this._locale=e),this)}ke.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ke.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var _i=$e("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 wi(){return this._locale}function xi(t,e){return(t%e+e)%e}function ki(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-126227808e5:new Date(t,e,n).valueOf()}function Ci(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-126227808e5:Date.UTC(t,e,n)}function Ti(t,e){return e.erasAbbrRegex(t)}function Ei(){var t,e,n=[],r=[],i=[],a=[],o=this.eras();for(t=0,e=o.length;t<e;++t)r.push(Rn(o[t].name)),n.push(Rn(o[t].abbr)),i.push(Rn(o[t].narrow)),a.push(Rn(o[t].name)),a.push(Rn(o[t].abbr)),a.push(Rn(o[t].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function Si(t,e){en(0,[t,t.length],0,e)}function Oi(t,e,n,r,i){var a;return null==t?ir(this,r,i).year:(e>(a=ar(t,r,i))&&(e=a),Ai.call(this,t,e,n,r,i))}function Ai(t,e,n,r,i){var a=rr(t,e,n,r,i),o=er(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}en("N",0,0,"eraAbbr"),en("NN",0,0,"eraAbbr"),en("NNN",0,0,"eraAbbr"),en("NNNN",0,0,"eraName"),en("NNNNN",0,0,"eraNarrow"),en("y",["y",1],"yo","eraYear"),en("y",["yy",2],0,"eraYear"),en("y",["yyy",3],0,"eraYear"),en("y",["yyyy",4],0,"eraYear"),Bn("N",Ti),Bn("NN",Ti),Bn("NNN",Ti),Bn("NNNN",(function(t,e){return e.erasNameRegex(t)})),Bn("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),Fn(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?Be(n).era=i:Be(n).invalidEra=t})),Bn("y",An),Bn("yy",An),Bn("yyy",An),Bn("yyyy",An),Bn("yo",(function(t,e){return e._eraYearOrdinalRegex||An})),Fn(["y","yy","yyy","yyyy"],0),Fn(["yo"],(function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[0]=n._locale.eraYearOrdinalParse(t,i):e[0]=parseInt(t,10)})),en(0,["gg",2],0,(function(){return this.weekYear()%100})),en(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Si("gggg","weekYear"),Si("ggggg","weekYear"),Si("GGGG","isoWeekYear"),Si("GGGGG","isoWeekYear"),on("weekYear","gg"),on("isoWeekYear","GG"),un("weekYear",1),un("isoWeekYear",1),Bn("G",Mn),Bn("g",Mn),Bn("GG",kn,bn),Bn("gg",kn,bn),Bn("GGGG",Sn,wn),Bn("gggg",Sn,wn),Bn("GGGGG",On,xn),Bn("ggggg",On,xn),Pn(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=fn(t)})),Pn(["gg","GG"],(function(t,e,n,r){e[r]=ke.parseTwoDigitYear(t)})),en("Q",0,"Qo","quarter"),on("quarter","Q"),un("quarter",7),Bn("Q",vn),Fn("Q",(function(t,e){e[1]=3*(fn(t)-1)})),en("D",["DD",2],"Do","date"),on("date","D"),un("date",9),Bn("D",kn),Bn("DD",kn,bn),Bn("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Fn(["D","DD"],2),Fn("Do",(function(t,e){e[2]=fn(t.match(kn)[0])}));var Mi=pn("Date",!0);en("DDD",["DDDD",3],"DDDo","dayOfYear"),on("dayOfYear","DDD"),un("dayOfYear",4),Bn("DDD",En),Bn("DDDD",_n),Fn(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=fn(t)})),en("m",["mm",2],0,"minute"),on("minute","m"),un("minute",14),Bn("m",kn),Bn("mm",kn,bn),Fn(["m","mm"],4);var Di=pn("Minutes",!1);en("s",["ss",2],0,"second"),on("second","s"),un("second",15),Bn("s",kn),Bn("ss",kn,bn),Fn(["s","ss"],5);var ji,Ni,Bi=pn("Seconds",!1);for(en("S",0,0,(function(){return~~(this.millisecond()/100)})),en(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),en(0,["SSS",3],0,"millisecond"),en(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),en(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),en(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),en(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),en(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),en(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),on("millisecond","ms"),un("millisecond",16),Bn("S",En,vn),Bn("SS",En,bn),Bn("SSS",En,_n),ji="SSSS";ji.length<=9;ji+="S")Bn(ji,An);function Li(t,e){e[6]=fn(1e3*("0."+t))}for(ji="S";ji.length<=9;ji+="S")Fn(ji,Li);Ni=pn("Milliseconds",!1),en("z",0,0,"zoneAbbr"),en("zz",0,0,"zoneName");var Ri=Ye.prototype;function Ii(t){return t}Ri.add=fi,Ri.calendar=function(t,e){1===arguments.length&&(arguments[0]?yi(arguments[0])?(t=arguments[0],e=void 0):mi(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Hr(),r=ri(n,this).startOf("day"),i=ke.calendarFormat(this,r)||"sameElse",a=e&&(Ve(e[i])?e[i].call(this,n):e[i]);return this.format(a||this.localeData().calendar(i,this,Hr(n)))},Ri.clone=function(){return new Ye(this)},Ri.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=ri(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=sn(e)){case"year":a=vi(this,r)/12;break;case"month":a=vi(this,r);break;case"quarter":a=vi(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:dn(a)},Ri.endOf=function(t){var e,n;if(void 0===(t=sn(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?Ci:ki,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-xi(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-xi(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-xi(e,1e3)-1}return this._d.setTime(e),ke.updateOffset(this,!0),this},Ri.format=function(t){t||(t=this.isUtc()?ke.defaultFormatUtc:ke.defaultFormat);var e=nn(this,t);return this.localeData().postformat(e)},Ri.from=function(t,e){return this.isValid()&&(ze(t)&&t.isValid()||Hr(t).isValid())?ci({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Ri.fromNow=function(t){return this.from(Hr(),t)},Ri.to=function(t,e){return this.isValid()&&(ze(t)&&t.isValid()||Hr(t).isValid())?ci({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Ri.toNow=function(t){return this.to(Hr(),t)},Ri.get=function(t){return Ve(this[t=sn(t)])?this[t]():this},Ri.invalidAt=function(){return Be(this).overflow},Ri.isAfter=function(t,e){var n=ze(t)?t:Hr(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=sn(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},Ri.isBefore=function(t,e){var n=ze(t)?t:Hr(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=sn(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},Ri.isBetween=function(t,e,n,r){var i=ze(t)?t:Hr(t),a=ze(e)?e:Hr(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)))},Ri.isSame=function(t,e){var n,r=ze(t)?t:Hr(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=sn(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},Ri.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},Ri.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},Ri.isValid=function(){return Le(this)},Ri.lang=_i,Ri.locale=bi,Ri.localeData=wi,Ri.max=Gr,Ri.min=Vr,Ri.parsingFlags=function(){return je({},Be(this))},Ri.set=function(t,e){if("object"==typeof t){var n,r=function(t){var e,n=[];for(e in t)Ee(t,e)&&n.push({unit:e,priority:ln[e]});return n.sort((function(t,e){return t.priority-e.priority})),n}(t=cn(t));for(n=0;n<r.length;n++)this[r[n].unit](t[r[n].unit])}else if(Ve(this[t=sn(t)]))return this[t](e);return this},Ri.startOf=function(t){var e,n;if(void 0===(t=sn(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?Ci:ki,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-=xi(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=xi(e,6e4);break;case"second":e=this._d.valueOf(),e-=xi(e,1e3)}return this._d.setTime(e),ke.updateOffset(this,!0),this},Ri.subtract=pi,Ri.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},Ri.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()}},Ri.toDate=function(){return new Date(this.valueOf())},Ri.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?nn(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ve(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",nn(n,"Z")):nn(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Ri.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),t="["+r+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",n=i+'[")]',this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Ri[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ri.toJSON=function(){return this.isValid()?this.toISOString():null},Ri.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Ri.unix=function(){return Math.floor(this.valueOf()/1e3)},Ri.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Ri.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Ri.eraName=function(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].name;if(r[t].until<=n&&n<=r[t].since)return r[t].name}return""},Ri.eraNarrow=function(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].narrow;if(r[t].until<=n&&n<=r[t].since)return r[t].narrow}return""},Ri.eraAbbr=function(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].abbr;if(r[t].until<=n&&n<=r[t].since)return r[t].abbr}return""},Ri.eraYear=function(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-ke(i[t].since).year())*n+i[t].offset;return this.year()},Ri.year=Jn,Ri.isLeapYear=function(){return hn(this.year())},Ri.weekYear=function(t){return Oi.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Ri.isoWeekYear=function(t){return Oi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},Ri.quarter=Ri.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},Ri.month=Zn,Ri.daysInMonth=function(){return Un(this.year(),this.month())},Ri.week=Ri.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},Ri.isoWeek=Ri.isoWeeks=function(t){var e=ir(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},Ri.weeksInYear=function(){var t=this.localeData()._week;return ar(this.year(),t.dow,t.doy)},Ri.weeksInWeekYear=function(){var t=this.localeData()._week;return ar(this.weekYear(),t.dow,t.doy)},Ri.isoWeeksInYear=function(){return ar(this.year(),1,4)},Ri.isoWeeksInISOWeekYear=function(){return ar(this.isoWeekYear(),1,4)},Ri.date=Mi,Ri.day=Ri.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},Ri.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")},Ri.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},Ri.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")},Ri.hour=Ri.hours=vr,Ri.minute=Ri.minutes=Di,Ri.second=Ri.seconds=Bi,Ri.millisecond=Ri.milliseconds=Ni,Ri.utcOffset=function(t,e,n){var r,i=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=ni(jn,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=ii(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?di(this,ci(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ke.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:ii(this)},Ri.utc=function(t){return this.utcOffset(0,t)},Ri.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(ii(this),"m")),this},Ri.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=ni(Dn,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},Ri.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Hr(t).utcOffset():0,(this.utcOffset()-t)%60==0)},Ri.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Ri.isLocal=function(){return!!this.isValid()&&!this._isUTC},Ri.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Ri.isUtc=ai,Ri.isUTC=ai,Ri.zoneAbbr=function(){return this._isUTC?"UTC":""},Ri.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Ri.dates=$e("dates accessor is deprecated. Use date instead.",Mi),Ri.months=$e("months accessor is deprecated. Use month instead",Zn),Ri.years=$e("years accessor is deprecated. Use year instead",Jn),Ri.zone=$e("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()})),Ri.isDSTShifted=$e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!Oe(this._isDSTShifted))return this._isDSTShifted;var t,e={};return Pe(e,this),(e=Wr(e))._a?(t=e._isUTC?Ne(e._a):Hr(e._a),this._isDSTShifted=this.isValid()&&function(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&&fn(t[r])!==fn(e[r]))&&o++;return o+a}(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Fi=Xe.prototype;function Pi(t,e,n,r){var i=Or(),a=Ne().set(r,e);return i[n](a,t)}function Yi(t,e,n){if(Ae(t)&&(e=t,t=void 0),t=t||"",null!=e)return Pi(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Pi(t,r,n,"month");return i}function zi(t,e,n,r){"boolean"==typeof t?(Ae(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,Ae(e)&&(n=e,e=void 0),e=e||"");var i,a=Or(),o=t?a._week.dow:0,s=[];if(null!=n)return Pi(e,(n+o)%7,r,"day");for(i=0;i<7;i++)s[i]=Pi(e,(i+o)%7,r,"day");return s}Fi.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return Ve(r)?r.call(e,n):r},Fi.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(Qe).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},Fi.invalidDate=function(){return this._invalidDate},Fi.ordinal=function(t){return this._ordinal.replace("%d",t)},Fi.preparse=Ii,Fi.postformat=Ii,Fi.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return Ve(i)?i(t,e,n,r):i.replace(/%d/i,t)},Fi.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return Ve(n)?n(e):n.replace(/%s/i,e)},Fi.set=function(t){var e,n;for(n in t)Ee(t,n)&&(Ve(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)},Fi.eras=function(t,e){var n,r,i,a=this._eras||Or("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=ke(a[n].since).startOf("day"),a[n].since=i.valueOf()}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=ke(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf()}}return a},Fi.erasParse=function(t,e,n){var r,i,a,o,s,c=this.eras();for(t=t.toUpperCase(),r=0,i=c.length;r<i;++r)if(a=c[r].name.toUpperCase(),o=c[r].abbr.toUpperCase(),s=c[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(o===t)return c[r];break;case"NNNN":if(a===t)return c[r];break;case"NNNNN":if(s===t)return c[r]}else if([a,o,s].indexOf(t)>=0)return c[r]},Fi.erasConvertYear=function(t,e){var n=t.since<=t.until?1:-1;return void 0===e?ke(t.since).year():ke(t.since).year()+(e-t.offset)*n},Fi.erasAbbrRegex=function(t){return Ee(this,"_erasAbbrRegex")||Ei.call(this),t?this._erasAbbrRegex:this._erasRegex},Fi.erasNameRegex=function(t){return Ee(this,"_erasNameRegex")||Ei.call(this),t?this._erasNameRegex:this._erasRegex},Fi.erasNarrowRegex=function(t){return Ee(this,"_erasNarrowRegex")||Ei.call(this),t?this._erasNarrowRegex:this._erasRegex},Fi.months=function(t,e){return t?Ce(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||qn).test(e)?"format":"standalone"][t.month()]:Ce(this._months)?this._months:this._months.standalone},Fi.monthsShort=function(t,e){return t?Ce(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[qn.test(e)?"format":"standalone"][t.month()]:Ce(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Fi.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return Gn.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ne([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}},Fi.monthsRegex=function(t){return this._monthsParseExact?(Ee(this,"_monthsRegex")||Qn.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Ee(this,"_monthsRegex")||(this._monthsRegex=Vn),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},Fi.monthsShortRegex=function(t){return this._monthsParseExact?(Ee(this,"_monthsRegex")||Qn.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Ee(this,"_monthsShortRegex")||(this._monthsShortRegex=Hn),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},Fi.week=function(t){return ir(t,this._week.dow,this._week.doy).week},Fi.firstDayOfYear=function(){return this._week.doy},Fi.firstDayOfWeek=function(){return this._week.dow},Fi.weekdays=function(t,e){var n=Ce(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?or(n,this._week.dow):t?n[t.day()]:n},Fi.weekdaysMin=function(t){return!0===t?or(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},Fi.weekdaysShort=function(t){return!0===t?or(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},Fi.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return fr.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ne([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}},Fi.weekdaysRegex=function(t){return this._weekdaysParseExact?(Ee(this,"_weekdaysRegex")||pr.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Ee(this,"_weekdaysRegex")||(this._weekdaysRegex=ur),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},Fi.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(Ee(this,"_weekdaysRegex")||pr.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ee(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hr),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Fi.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(Ee(this,"_weekdaysRegex")||pr.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ee(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=dr),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Fi.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},Fi.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},Er("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===fn(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),ke.lang=$e("moment.lang is deprecated. Use moment.locale instead.",Er),ke.langData=$e("moment.langData is deprecated. Use moment.localeData instead.",Or);var Ui=Math.abs;function $i(t,e,n,r){var i=ci(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function Wi(t){return t<0?Math.floor(t):Math.ceil(t)}function qi(t){return 4800*t/146097}function Hi(t){return 146097*t/4800}function Vi(t){return function(){return this.as(t)}}var Gi=Vi("ms"),Xi=Vi("s"),Zi=Vi("m"),Qi=Vi("h"),Ki=Vi("d"),Ji=Vi("w"),ta=Vi("M"),ea=Vi("Q"),na=Vi("y");function ra(t){return function(){return this.isValid()?this._data[t]:NaN}}var ia=ra("milliseconds"),aa=ra("seconds"),oa=ra("minutes"),sa=ra("hours"),ca=ra("days"),la=ra("months"),ua=ra("years");var ha=Math.round,da={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function fa(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}var pa=Math.abs;function ga(t){return(t>0)-(t<0)||+t}function ya(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,r,i,a,o,s,c=pa(this._milliseconds)/1e3,l=pa(this._days),u=pa(this._months),h=this.asSeconds();return h?(t=dn(c/60),e=dn(t/60),c%=60,t%=60,n=dn(u/12),u%=12,r=c?c.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",a=ga(this._months)!==ga(h)?"-":"",o=ga(this._days)!==ga(h)?"-":"",s=ga(this._milliseconds)!==ga(h)?"-":"",i+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(l?o+l+"D":"")+(e||t||c?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(c?s+r+"S":"")):"P0D"}var ma=Qr.prototype;ma.isValid=function(){return this._isValid},ma.abs=function(){var t=this._data;return this._milliseconds=Ui(this._milliseconds),this._days=Ui(this._days),this._months=Ui(this._months),t.milliseconds=Ui(t.milliseconds),t.seconds=Ui(t.seconds),t.minutes=Ui(t.minutes),t.hours=Ui(t.hours),t.months=Ui(t.months),t.years=Ui(t.years),this},ma.add=function(t,e){return $i(this,t,e,1)},ma.subtract=function(t,e){return $i(this,t,e,-1)},ma.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=sn(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+qi(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Hi(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)}},ma.asMilliseconds=Gi,ma.asSeconds=Xi,ma.asMinutes=Zi,ma.asHours=Qi,ma.asDays=Ki,ma.asWeeks=Ji,ma.asMonths=ta,ma.asQuarters=ea,ma.asYears=na,ma.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*fn(this._months/12):NaN},ma._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*Wi(Hi(s)+o),o=0,s=0),c.milliseconds=a%1e3,t=dn(a/1e3),c.seconds=t%60,e=dn(t/60),c.minutes=e%60,n=dn(e/60),c.hours=n%24,o+=dn(n/24),s+=i=dn(qi(o)),o-=Wi(Hi(i)),r=dn(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},ma.clone=function(){return ci(this)},ma.get=function(t){return t=sn(t),this.isValid()?this[t+"s"]():NaN},ma.milliseconds=ia,ma.seconds=aa,ma.minutes=oa,ma.hours=sa,ma.days=ca,ma.weeks=function(){return dn(this.days()/7)},ma.months=la,ma.years=ua,ma.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,a=da;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(i=t),"object"==typeof e&&(a=Object.assign({},da,e),null!=e.s&&null==e.ss&&(a.ss=e.s-1)),r=function(t,e,n,r){var i=ci(t).abs(),a=ha(i.as("s")),o=ha(i.as("m")),s=ha(i.as("h")),c=ha(i.as("d")),l=ha(i.as("M")),u=ha(i.as("w")),h=ha(i.as("y")),d=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||c<=1&&["d"]||c<n.d&&["dd",c];return null!=n.w&&(d=d||u<=1&&["w"]||u<n.w&&["ww",u]),(d=d||l<=1&&["M"]||l<n.M&&["MM",l]||h<=1&&["y"]||["yy",h])[2]=e,d[3]=+t>0,d[4]=r,fa.apply(null,d)}(this,!i,a,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},ma.toISOString=ya,ma.toString=ya,ma.toJSON=ya,ma.locale=bi,ma.localeData=wi,ma.toIsoString=$e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ya),ma.lang=_i,en("X",0,0,"unix"),en("x",0,0,"valueOf"),Bn("x",Mn),Bn("X",/[+-]?\d+(\.\d{1,3})?/),Fn("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t))})),Fn("x",(function(t,e,n){n._d=new Date(fn(t))})),
//! moment.js
ke.version="2.29.1",we=Hr,ke.fn=Ri,ke.min=function(){var t=[].slice.call(arguments,0);return Xr("isBefore",t)},ke.max=function(){var t=[].slice.call(arguments,0);return Xr("isAfter",t)},ke.now=function(){return Date.now?Date.now():+new Date},ke.utc=Ne,ke.unix=function(t){return Hr(1e3*t)},ke.months=function(t,e){return Yi(t,e,"months")},ke.isDate=Me,ke.locale=Er,ke.invalid=Re,ke.duration=ci,ke.isMoment=ze,ke.weekdays=function(t,e,n){return zi(t,e,n,"weekdays")},ke.parseZone=function(){return Hr.apply(null,arguments).parseZone()},ke.localeData=Or,ke.isDuration=Kr,ke.monthsShort=function(t,e){return Yi(t,e,"monthsShort")},ke.weekdaysMin=function(t,e,n){return zi(t,e,n,"weekdaysMin")},ke.defineLocale=Sr,ke.updateLocale=function(t,e){if(null!=e){var n,r,i=_r;null!=wr[t]&&null!=wr[t].parentLocale?wr[t].set(Ge(wr[t]._config,e)):(null!=(r=Tr(t))&&(i=r._config),e=Ge(i,e),null==r&&(e.abbr=t),(n=new Xe(e)).parentLocale=wr[t],wr[t]=n),Er(t)}else null!=wr[t]&&(null!=wr[t].parentLocale?(wr[t]=wr[t].parentLocale,t===Er()&&Er(t)):null!=wr[t]&&delete wr[t]);return wr[t]},ke.locales=function(){return We(wr)},ke.weekdaysShort=function(t,e,n){return zi(t,e,n,"weekdaysShort")},ke.normalizeUnits=sn,ke.relativeTimeRounding=function(t){return void 0===t?ha:"function"==typeof t&&(ha=t,!0)},ke.relativeTimeThreshold=function(t,e){return void 0!==da[t]&&(void 0===e?da[t]:(da[t]=e,"s"===t&&(da.ss=e-1),!0))},ke.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"},ke.prototype=Ri,ke.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"};var va="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ba(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})})),e}function _a(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wa={exports:{}},xa=/^(%20|\s)*(javascript|data)/im,ka=/[^\x20-\x7E]/gim,Ca=/^([^:]+):/gm,Ta=[".","/"];var Ea={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,r=t.replace(ka,"").trim();return function(t){return Ta.indexOf(t[0])>-1}(r)?r:(n=r.match(Ca))?(e=n[0],xa.test(e)?"about:blank":r):"about:blank"}};function Sa(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Oa(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Sa(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 Aa=Oa(Sa),Ma=Aa.right,Da=Aa.left;function ja(t,e){return[t,e]}function Na(t){return null===t?NaN:+t}function Ba(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=Na(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=Na(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)}function La(t,e){var n=Ba(t,e);return n?Math.sqrt(n):n}function Ra(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]}var Ia=Array.prototype,Fa=Ia.slice,Pa=Ia.map;function Ya(t){return function(){return t}}function za(t){return t}function Ua(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}var $a=Math.sqrt(50),Wa=Math.sqrt(10),qa=Math.sqrt(2);function Ha(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=Va(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 Va(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>=$a?10:a>=Wa?5:a>=qa?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=$a?10:a>=Wa?5:a>=qa?2:1)}function Ga(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>=$a?i*=10:a>=Wa?i*=5:a>=qa&&(i*=2),e<t?-i:i}function Xa(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function Za(t,e,n){if(null==n&&(n=Na),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)}}function Qa(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}function Ka(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}function Ja(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}function to(t){if(!(i=t.length))return[];for(var e=-1,n=Ja(t,eo),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 eo(t){return t.length}var no=Array.prototype.slice;function ro(t){return t}function io(t){return"translate("+(t+.5)+",0)"}function ao(t){return"translate(0,"+(t+.5)+")"}function oo(t){return function(e){return+t(e)}}function so(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function co(){return!this.__axis}function lo(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",u=1===t||3===t?io:ao;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,f=null==i?e.tickFormat?e.tickFormat.apply(e,n):ro:i,p=Math.max(a,0)+s,g=e.range(),y=+g[0]+.5,m=+g[g.length-1]+.5,v=(e.bandwidth?so:oo)(e.copy()),b=h.selection?h.selection():h,_=b.selectAll(".domain").data([null]),w=b.selectAll(".tick").data(d,e).order(),x=w.exit(),k=w.enter().append("g").attr("class","tick"),C=w.select("line"),T=w.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),C=C.merge(k.append("line").attr("stroke","currentColor").attr(l+"2",c*a)),T=T.merge(k.append("text").attr("fill","currentColor").attr(l,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(_=_.transition(h),w=w.transition(h),C=C.transition(h),T=T.transition(h),x=x.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=v(t))?u(t):this.getAttribute("transform")})),k.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return u(e&&isFinite(e=e(t))?e:v(t))}))),x.remove(),_.attr("d",4===t||2==t?o?"M"+c*o+","+y+"H0.5V"+m+"H"+c*o:"M0.5,"+y+"V"+m:o?"M"+y+","+c*o+"V0.5H"+m+"V"+c*o:"M"+y+",0.5H"+m),w.attr("opacity",1).attr("transform",(function(t){return u(v(t))})),C.attr(l+"2",c*a),T.attr(l,c*p).text(f),b.filter(co).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 h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=no.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:no.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:no.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}var uo={value:function(){}};function ho(){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 fo(r)}function fo(t){this._=t}function po(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 go(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function yo(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=uo,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}fo.prototype=ho.prototype={constructor:fo,on:function(t,e){var n,r=this._,i=po(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]=yo(r[n],t.name,e);else if(null==e)for(n in r)r[n]=yo(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=go(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new fo(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 mo="http://www.w3.org/1999/xhtml",vo={svg:"http://www.w3.org/2000/svg",xhtml:mo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bo(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),vo.hasOwnProperty(e)?{space:vo[e],local:t}:t}function _o(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===mo&&e.documentElement.namespaceURI===mo?e.createElement(t):e.createElementNS(n,t)}}function wo(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function xo(t){var e=bo(t);return(e.local?wo:_o)(e)}function ko(){}function Co(t){return null==t?ko:function(){return this.querySelector(t)}}function To(){return[]}function Eo(t){return null==t?To:function(){return this.querySelectorAll(t)}}function So(t){return function(){return this.matches(t)}}function Oo(t){return new Array(t.length)}function Ao(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ao.prototype={constructor:Ao,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 Mo(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new Ao(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function Do(t,e,n,r,i,a,o){var s,c,l,u={},h=e.length,d=a.length,f=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(f[s]=l="$"+o.call(c,c.__data__,s,e),l in u?i[s]=c:u[l]=c);for(s=0;s<d;++s)(c=u[l="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],u[l]=null):n[s]=new Ao(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&u[f[s]]===c&&(i[s]=c)}function jo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function No(t){return function(){this.removeAttribute(t)}}function Bo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Lo(t,e){return function(){this.setAttribute(t,e)}}function Ro(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Io(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Fo(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)}}function Po(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Yo(t){return function(){this.style.removeProperty(t)}}function zo(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Uo(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function $o(t,e){return t.style.getPropertyValue(e)||Po(t).getComputedStyle(t,null).getPropertyValue(e)}function Wo(t){return function(){delete this[t]}}function qo(t,e){return function(){this[t]=e}}function Ho(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Vo(t){return t.trim().split(/^|\s+/)}function Go(t){return t.classList||new Xo(t)}function Xo(t){this._node=t,this._names=Vo(t.getAttribute("class")||"")}function Zo(t,e){for(var n=Go(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Qo(t,e){for(var n=Go(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ko(t){return function(){Zo(this,t)}}function Jo(t){return function(){Qo(this,t)}}function ts(t,e){return function(){(e.apply(this,arguments)?Zo:Qo)(this,t)}}function es(){this.textContent=""}function ns(t){return function(){this.textContent=t}}function rs(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function is(){this.innerHTML=""}function as(t){return function(){this.innerHTML=t}}function os(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ss(){this.nextSibling&&this.parentNode.appendChild(this)}function cs(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ls(){return null}function us(){var t=this.parentNode;t&&t.removeChild(this)}function hs(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ds(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Xo.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}};var fs={},ps=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(fs={mouseenter:"mouseover",mouseleave:"mouseout"}));function gs(t,e,n){return t=ys(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ys(t,e,n){return function(r){var i=ps;ps=r;try{t.call(this,this.__data__,e,n)}finally{ps=i}}}function ms(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 vs(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 bs(t,e,n){var r=fs.hasOwnProperty(t.type)?gs:ys;return function(i,a,o){var s,c=this.__on,l=r(e,a,o);if(c)for(var u=0,h=c.length;u<h;++u)if((s=c[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},c?c.push(s):this.__on=[s]}}function _s(t,e,n,r){var i=ps;t.sourceEvent=ps,ps=t;try{return e.apply(n,r)}finally{ps=i}}function ws(t,e,n){var r=Po(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 xs(t,e){return function(){return ws(this,t,e)}}function ks(t,e){return function(){return ws(this,t,e.apply(this,arguments))}}var Cs=[null];function Ts(t,e){this._groups=t,this._parents=e}function Es(){return new Ts([[document.documentElement]],Cs)}function Ss(t){return"string"==typeof t?new Ts([[document.querySelector(t)]],[document.documentElement]):new Ts([[t]],Cs)}Ts.prototype=Es.prototype={constructor:Ts,select:function(t){"function"!=typeof t&&(t=Co(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],c=s.length,l=r[i]=new Array(c),u=0;u<c;++u)(a=s[u])&&(o=t.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),l[u]=o);return new Ts(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Eo(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,l=0;l<c;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new Ts(r,i)},filter:function(t){"function"!=typeof t&&(t=So(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,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new Ts(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),u=-1,this.each((function(t){p[++u]=t})),p;var n,r=e?Do:Mo,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),l=new Array(o),u=0;u<o;++u){var h=i[u],d=a[u],f=d.length,p=t.call(h,h&&h.__data__,u,i),g=p.length,y=c[u]=new Array(g),m=s[u]=new Array(g);r(h,d,y,m,l[u]=new Array(f),p,e);for(var v,b,_=0,w=0;_<g;++_)if(v=y[_]){for(_>=w&&(w=_+1);!(b=m[w])&&++w<g;);v._next=b||null}}return(s=new Ts(s,i))._enter=c,s._exit=l,s},enter:function(){return new Ts(this._enter||this._groups.map(Oo),this._parents)},exit:function(){return new Ts(this._exit||this._groups.map(Oo),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 c,l=e[s],u=n[s],h=l.length,d=o[s]=new Array(h),f=0;f<h;++f)(c=l[f]||u[f])&&(d[f]=c);for(;s<r;++s)o[s]=e[s];return new Ts(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=jo);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,l=i[a]=new Array(c),u=0;u<c;++u)(o=s[u])&&(l[u]=o);l.sort(e)}return new Ts(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=bo(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?Bo:No:"function"==typeof e?n.local?Fo:Io:n.local?Ro:Lo)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Yo:"function"==typeof e?Uo:zo)(t,e,null==n?"":n)):$o(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Wo:"function"==typeof e?Ho:qo)(t,e)):this.node()[t]},classed:function(t,e){var n=Vo(t+"");if(arguments.length<2){for(var r=Go(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ts:e?Ko:Jo)(n,e))},text:function(t){return arguments.length?this.each(null==t?es:("function"==typeof t?rs:ns)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?is:("function"==typeof t?os:as)(t)):this.node().innerHTML},raise:function(){return this.each(ss)},lower:function(){return this.each(cs)},append:function(t){var e="function"==typeof t?t:xo(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:xo(t),r=null==e?ls:"function"==typeof e?e:Co(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(us)},clone:function(t){return this.select(t?ds:hs)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=ms(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?bs:vs,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 c,l=0,u=s.length;l<u;++l)for(r=0,c=s[l];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?ks:xs)(t,e))}};var Os=0;function As(){return new Ms}function Ms(){this._="@"+(++Os).toString(36)}function Ds(){for(var t,e=ps;t=e.sourceEvent;)e=t;return e}function js(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 Ns(t){var e=Ds();return e.changedTouches&&(e=e.changedTouches[0]),js(t,e)}function Bs(t,e,n){arguments.length<3&&(n=e,e=Ds().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return js(t,r);return null}function Ls(){ps.stopImmediatePropagation()}function Rs(){ps.preventDefault(),ps.stopImmediatePropagation()}function Is(t){var e=t.document.documentElement,n=Ss(t).on("dragstart.drag",Rs,!0);"onselectstart"in e?n.on("selectstart.drag",Rs,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Fs(t,e){var n=t.document.documentElement,r=Ss(t).on("dragstart.drag",null);e&&(r.on("click.drag",Rs,!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)}function Ps(t){return function(){return t}}function Ys(t,e,n,r,i,a,o,s,c,l){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=c,this._=l}function zs(){return!ps.ctrlKey&&!ps.button}function Us(){return this.parentNode}function $s(t){return null==t?{x:ps.x,y:ps.y}:t}function Ws(){return navigator.maxTouchPoints||"ontouchstart"in this}function qs(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Hs(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Vs(){}Ms.prototype=As.prototype={constructor:Ms,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._}},Ys.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Gs=1/.7,Xs="\\s*([+-]?\\d+)\\s*",Zs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ks=/^#([0-9a-f]{3,8})$/,Js=new RegExp("^rgb\\("+[Xs,Xs,Xs]+"\\)$"),tc=new RegExp("^rgb\\("+[Qs,Qs,Qs]+"\\)$"),ec=new RegExp("^rgba\\("+[Xs,Xs,Xs,Zs]+"\\)$"),nc=new RegExp("^rgba\\("+[Qs,Qs,Qs,Zs]+"\\)$"),rc=new RegExp("^hsl\\("+[Zs,Qs,Qs]+"\\)$"),ic=new RegExp("^hsla\\("+[Zs,Qs,Qs,Zs]+"\\)$"),ac={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 oc(){return this.rgb().formatHex()}function sc(){return this.rgb().formatRgb()}function cc(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ks.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?lc(e):3===n?new fc(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?uc(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?uc(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=Js.exec(t))?new fc(e[1],e[2],e[3],1):(e=tc.exec(t))?new fc(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ec.exec(t))?uc(e[1],e[2],e[3],e[4]):(e=nc.exec(t))?uc(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=rc.exec(t))?mc(e[1],e[2]/100,e[3]/100,1):(e=ic.exec(t))?mc(e[1],e[2]/100,e[3]/100,e[4]):ac.hasOwnProperty(t)?lc(ac[t]):"transparent"===t?new fc(NaN,NaN,NaN,0):null}function lc(t){return new fc(t>>16&255,t>>8&255,255&t,1)}function uc(t,e,n,r){return r<=0&&(t=e=n=NaN),new fc(t,e,n,r)}function hc(t){return t instanceof Vs||(t=cc(t)),t?new fc((t=t.rgb()).r,t.g,t.b,t.opacity):new fc}function dc(t,e,n,r){return 1===arguments.length?hc(t):new fc(t,e,n,null==r?1:r)}function fc(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function pc(){return"#"+yc(this.r)+yc(this.g)+yc(this.b)}function gc(){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 yc(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function mc(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _c(t,e,n,r)}function vc(t){if(t instanceof _c)return new _c(t.h,t.s,t.l,t.opacity);if(t instanceof Vs||(t=cc(t)),!t)return new _c;if(t instanceof _c)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,c=(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/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new _c(o,s,c,t.opacity)}function bc(t,e,n,r){return 1===arguments.length?vc(t):new _c(t,e,n,null==r?1:r)}function _c(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function wc(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}qs(Vs,cc,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:oc,formatHex:oc,formatHsl:function(){return vc(this).formatHsl()},formatRgb:sc,toString:sc}),qs(fc,dc,Hs(Vs,{brighter:function(t){return t=null==t?Gs:Math.pow(Gs,t),new fc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fc(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:pc,formatHex:pc,formatRgb:gc,toString:gc})),qs(_c,bc,Hs(Vs,{brighter:function(t){return t=null==t?Gs:Math.pow(Gs,t),new _c(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _c(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 fc(wc(t>=240?t-240:t+120,i,r),wc(t,i,r),wc(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 xc=Math.PI/180,kc=180/Math.PI,Cc=4/29,Tc=6/29,Ec=3*Tc*Tc;function Sc(t){if(t instanceof Ac)return new Ac(t.l,t.a,t.b,t.opacity);if(t instanceof Rc)return Ic(t);t instanceof fc||(t=hc(t));var e,n,r=Nc(t.r),i=Nc(t.g),a=Nc(t.b),o=Mc((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Mc((.4360747*r+.3850649*i+.1430804*a)/.96422),n=Mc((.0139322*r+.0971045*i+.7141733*a)/.82521)),new Ac(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Oc(t,e,n,r){return 1===arguments.length?Sc(t):new Ac(t,e,n,null==r?1:r)}function Ac(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Mc(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ec+Cc}function Dc(t){return t>Tc?t*t*t:Ec*(t-Cc)}function jc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Nc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Bc(t){if(t instanceof Rc)return new Rc(t.h,t.c,t.l,t.opacity);if(t instanceof Ac||(t=Sc(t)),0===t.a&&0===t.b)return new Rc(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*kc;return new Rc(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Lc(t,e,n,r){return 1===arguments.length?Bc(t):new Rc(t,e,n,null==r?1:r)}function Rc(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Ic(t){if(isNaN(t.h))return new Ac(t.l,0,0,t.opacity);var e=t.h*xc;return new Ac(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}qs(Ac,Oc,Hs(Vs,{brighter:function(t){return new Ac(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ac(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 fc(jc(3.1338561*(e=.96422*Dc(e))-1.6168667*(t=1*Dc(t))-.4906146*(n=.82521*Dc(n))),jc(-.9787684*e+1.9161415*t+.033454*n),jc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),qs(Rc,Lc,Hs(Vs,{brighter:function(t){return new Rc(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Rc(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ic(this).rgb()}}));var Fc=-.14861,Pc=1.78277,Yc=-.29227,zc=-.90649,Uc=1.97294,$c=Uc*zc,Wc=Uc*Pc,qc=Pc*Yc-zc*Fc;function Hc(t){if(t instanceof Gc)return new Gc(t.h,t.s,t.l,t.opacity);t instanceof fc||(t=hc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(qc*r+$c*e-Wc*n)/(qc+$c-Wc),a=r-i,o=(Uc*(n-i)-Yc*a)/zc,s=Math.sqrt(o*o+a*a)/(Uc*i*(1-i)),c=s?Math.atan2(o,a)*kc-120:NaN;return new Gc(c<0?c+360:c,s,i,t.opacity)}function Vc(t,e,n,r){return 1===arguments.length?Hc(t):new Gc(t,e,n,null==r?1:r)}function Gc(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Xc(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}function Zc(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 Xc((n-r/e)*e,o,i,a,s)}}function Qc(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 Xc((n-r/e)*e,i,a,o,s)}}function Kc(t){return function(){return t}}function Jc(t,e){return function(n){return t+n*e}}function tl(t,e){var n=e-t;return n?Jc(t,n>180||n<-180?n-360*Math.round(n/360):n):Kc(isNaN(t)?e:t)}function el(t){return 1==(t=+t)?nl: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):Kc(isNaN(e)?n:e)}}function nl(t,e){var n=e-t;return n?Jc(t,n):Kc(isNaN(t)?e:t)}qs(Gc,Vc,Hs(Vs,{brighter:function(t){return t=null==t?Gs:Math.pow(Gs,t),new Gc(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Gc(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*xc,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new fc(255*(e+n*(Fc*r+Pc*i)),255*(e+n*(Yc*r+zc*i)),255*(e+n*(Uc*r)),this.opacity)}}));var rl=function t(e){var n=el(e);function r(t,e){var r=n((t=dc(t)).r,(e=dc(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=nl(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 il(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=dc(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 al=il(Zc),ol=il(Qc);function sl(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 cl(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ll(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]=yl(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}}function ul(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function hl(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function dl(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]=yl(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var fl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pl=new RegExp(fl.source,"g");function gl(t,e){var n,r,i,a=fl.lastIndex=pl.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=fl.exec(t))&&(r=pl.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,c.push({i:o,x:hl(n,r)})),a=pl.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function yl(t,e){var n,r=typeof e;return null==e||"boolean"===r?Kc(e):("number"===r?hl:"string"===r?(n=cc(e))?(e=n,rl):gl:e instanceof cc?rl:e instanceof Date?ul:cl(e)?sl:Array.isArray(e)?ll:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?dl:hl)(t,e)}function ml(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var vl,bl,_l,wl,xl=180/Math.PI,kl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Cl(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*xl,skewX:Math.atan(c)*xl,scaleX:o,scaleY:s}}function Tl(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:hl(t,i)},{i:c-2,x:hl(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),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:hl(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:hl(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),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:hl(t,n)},{i:s-2,x:hl(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var El=Tl((function(t){return"none"===t?kl:(vl||(vl=document.createElement("DIV"),bl=document.documentElement,_l=document.defaultView),vl.style.transform=t,t=_l.getComputedStyle(bl.appendChild(vl),null).getPropertyValue("transform"),bl.removeChild(vl),Cl(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Sl=Tl((function(t){return null==t?kl:(wl||(wl=document.createElementNS("http://www.w3.org/2000/svg","g")),wl.setAttribute("transform",t),(t=wl.transform.baseVal.consolidate())?Cl((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):kl)}),", ",")",")"),Ol=Math.SQRT2;function Al(t){return((t=Math.exp(t))+1/t)/2}function Ml(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],l=e[2],u=s-i,h=c-a,d=u*u+h*h;if(d<1e-12)r=Math.log(l/o)/Ol,n=function(t){return[i+t*u,a+t*h,o*Math.exp(Ol*t*r)]};else{var f=Math.sqrt(d),p=(l*l-o*o+4*d)/(2*o*2*f),g=(l*l-o*o-4*d)/(2*l*2*f),y=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-y)/Ol,n=function(t){var e,n=t*r,s=Al(y),c=o/(2*f)*(s*(e=Ol*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*u,a+c*h,o*s/Al(Ol*n+y)]}}return n.duration=1e3*r,n}function Dl(t){return function(e,n){var r=t((e=bc(e)).h,(n=bc(n)).h),i=nl(e.s,n.s),a=nl(e.l,n.l),o=nl(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 jl=Dl(tl),Nl=Dl(nl);function Bl(t){return function(e,n){var r=t((e=Lc(e)).h,(n=Lc(n)).h),i=nl(e.c,n.c),a=nl(e.l,n.l),o=nl(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 Ll=Bl(tl),Rl=Bl(nl);function Il(t){return function e(n){function r(e,r){var i=t((e=Vc(e)).h,(r=Vc(r)).h),a=nl(e.s,r.s),o=nl(e.l,r.l),s=nl(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 Fl=Il(tl),Pl=Il(nl);var Yl,zl,Ul=0,$l=0,Wl=0,ql=0,Hl=0,Vl=0,Gl="object"==typeof performance&&performance.now?performance:Date,Xl="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zl(){return Hl||(Xl(Ql),Hl=Gl.now()+Vl)}function Ql(){Hl=0}function Kl(){this._call=this._time=this._next=null}function Jl(t,e,n){var r=new Kl;return r.restart(t,e,n),r}function tu(){Zl(),++Ul;for(var t,e=Yl;e;)(t=Hl-e._time)>=0&&e._call.call(null,t),e=e._next;--Ul}function eu(){Hl=(ql=Gl.now())+Vl,Ul=$l=0;try{tu()}finally{Ul=0,function(){var t,e,n=Yl,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:Yl=e);zl=t,ru(r)}(),Hl=0}}function nu(){var t=Gl.now(),e=t-ql;e>1e3&&(Vl-=e,ql=t)}function ru(t){Ul||($l&&($l=clearTimeout($l)),t-Hl>24?(t<1/0&&($l=setTimeout(eu,t-Gl.now()-Vl)),Wl&&(Wl=clearInterval(Wl))):(Wl||(ql=Gl.now(),Wl=setInterval(nu,1e3)),Ul=1,Xl(eu)))}function iu(t,e,n){var r=new Kl;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Kl.prototype=Jl.prototype={constructor:Kl,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zl():+n)+(null==e?0:+e),this._next||zl===this||(zl?zl._next=this:Yl=this,zl=this),this._call=t,this._time=n,ru()},stop:function(){this._call&&(this._call=null,this._time=1/0,ru())}};var au=ho("start","end","cancel","interrupt"),ou=[];function su(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(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var l,u,h,d;if(1!==n.state)return c();for(l in i)if((d=i[l]).name===n.name){if(3===d.state)return iu(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[l]):+l<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[l])}if(iu((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))})),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),l=0,u=-1;l<h;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+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),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),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=Jl(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:au,tween:ou,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function cu(t,e){var n=uu(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function lu(t,e){var n=uu(t,e);if(n.state>3)throw new Error("too late; already running");return n}function uu(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function hu(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}}function du(t,e){var n,r;return function(){var i=lu(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 fu(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=lu(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function pu(t,e,n){var r=t._id;return t.each((function(){var t=lu(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return uu(t,r).value[e]}}function gu(t,e){var n;return("number"==typeof e?hl:e instanceof cc?rl:(n=cc(e))?(e=n,rl):gl)(t,e)}function yu(t){return function(){this.removeAttribute(t)}}function mu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vu(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 bu(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 _u(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function wu(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function xu(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function ku(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Cu(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ku(t,i)),n}return i._value=e,i}function Tu(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&xu(t,i)),n}return i._value=e,i}function Eu(t,e){return function(){cu(this,t).delay=+e.apply(this,arguments)}}function Su(t,e){return e=+e,function(){cu(this,t).delay=e}}function Ou(t,e){return function(){lu(this,t).duration=+e.apply(this,arguments)}}function Au(t,e){return e=+e,function(){lu(this,t).duration=e}}function Mu(t,e){if("function"!=typeof e)throw new Error;return function(){lu(this,t).ease=e}}function Du(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)?cu:lu;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var ju=Es.prototype.constructor;function Nu(t){return function(){this.style.removeProperty(t)}}function Bu(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Lu(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Bu(t,a,n)),r}return a._value=e,a}function Ru(t){return function(e){this.textContent=t.call(this,e)}}function Iu(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ru(r)),e}return r._value=t,r}var Fu=0;function Pu(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Yu(t){return Es().transition(t)}function zu(){return++Fu}var Uu=Es.prototype;function $u(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Wu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Pu.prototype=Yu.prototype={constructor:Pu,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Co(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,l=r[o],u=l.length,h=a[o]=new Array(u),d=0;d<u;++d)(s=l[d])&&(c=t.call(s,s.__data__,d,l))&&("__data__"in s&&(c.__data__=s.__data__),h[d]=c,su(h[d],e,n,d,h,uu(s,n)));return new Pu(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Eo(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,l=r[s],u=l.length,h=0;h<u;++h)if(c=l[h]){for(var d,f=t.call(c,c.__data__,h,l),p=uu(c,n),g=0,y=f.length;g<y;++g)(d=f[g])&&su(d,e,n,g,f,p);a.push(f),o.push(c)}return new Pu(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=So(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,c=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&c.push(a);return new Pu(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 c,l=e[s],u=n[s],h=l.length,d=o[s]=new Array(h),f=0;f<h;++f)(c=l[f]||u[f])&&(d[f]=c);for(;s<r;++s)o[s]=e[s];return new Pu(o,this._parents,this._name,this._id)},selection:function(){return new ju(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=zu(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)if(o=s[l]){var u=uu(o,e);su(o,t,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Pu(r,this._parents,t,n)},call:Uu.call,nodes:Uu.nodes,node:Uu.node,size:Uu.size,empty:Uu.empty,each:Uu.each,on:function(t,e){var n=this._id;return arguments.length<2?uu(this.node(),n).on.on(t):this.each(Du(n,t,e))},attr:function(t,e){var n=bo(t),r="transform"===n?Sl:gu;return this.attrTween(t,"function"==typeof e?(n.local?wu:_u)(n,r,pu(this,"attr."+t,e)):null==e?(n.local?mu:yu)(n):(n.local?bu:vu)(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=bo(t);return this.tween(n,(r.local?Cu:Tu)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?El:gu;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=$o(this,t),o=(this.style.removeProperty(t),$o(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Nu(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=$o(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=$o(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,pu(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=lu(this,t),l=c.on,u=null==c.value[o]?a||(a=Nu(e)):void 0;l===n&&i===u||(r=(n=l).copy()).on(s,i=u),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=$o(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,Lu(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}}(pu(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,Iu(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=uu(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?du:fu)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Eu:Su)(e,t)):uu(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ou:Au)(e,t)):uu(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Mu(e,t)):uu(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},c={value:function(){0==--i&&a()}};n.each((function(){var n=lu(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var qu=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Hu=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Vu=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),Gu=Math.PI,Xu=Gu/2;function Zu(t){return(1-Math.cos(Gu*t))/2}function Qu(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Ku(t){return((t*=2)<=1?Qu(1-t):2-Qu(t-1))/2}function Ju(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var th=4/11,eh=7.5625;function nh(t){return(t=+t)<th?eh*t*t:t<.7272727272727273?eh*(t-=.5454545454545454)*t+.75:t<.9090909090909091?eh*(t-=.8181818181818182)*t+.9375:eh*(t-=.9545454545454546)*t+.984375}var rh=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(1.70158),ih=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(1.70158),ah=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),oh=2*Math.PI,sh=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oh);function i(t){return e*Qu(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*oh)},i.period=function(n){return t(e,n)},i}(1,.3),ch=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oh);function i(t){return 1-e*Qu(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*oh)},i.period=function(n){return t(e,n)},i}(1,.3),lh=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oh);function i(t){return((t=2*t-1)<0?e*Qu(-t)*Math.sin((r-t)/n):2-e*Qu(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*oh)},i.period=function(n){return t(e,n)},i}(1,.3),uh={time:null,delay:0,duration:250,ease:Wu};function hh(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return uh.time=Zl(),uh;return n}Es.prototype.interrupt=function(t){return this.each((function(){hu(this,t)}))},Es.prototype.transition=function(t){var e,n;t instanceof Pu?(e=t._id,t=t._name):(e=zu(),(n=uh).time=Zl(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,l=0;l<c;++l)(o=s[l])&&su(o,t,e,l,s,n||hh(o,e));return new Pu(r,this._parents,t,e)};var dh=[null];function fh(t){return function(){return t}}function ph(t,e,n){this.target=t,this.type=e,this.selection=n}function gh(){ps.stopImmediatePropagation()}function yh(){ps.preventDefault(),ps.stopImmediatePropagation()}var mh={name:"drag"},vh={name:"space"},bh={name:"handle"},_h={name:"center"};function wh(t){return[+t[0],+t[1]]}function xh(t){return[wh(t[0]),wh(t[1])]}function kh(t){return function(e){return Bs(e,ps.touches,t)}}var Ch={name:"x",handles:["w","e"].map(jh),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]]}},Th={name:"y",handles:["n","s"].map(jh),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]]}},Eh={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(jh),input:function(t){return null==t?null:xh(t)},output:function(t){return t}},Sh={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"},Oh={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ah={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Mh={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Dh={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function jh(t){return{type:t}}function Nh(){return!ps.ctrlKey&&!ps.button}function Bh(){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 Lh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Rh(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ih(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Fh(t){var e,n=Bh,r=Nh,i=Lh,a=!0,o=ho("start","brush","end"),s=6;function c(e){var n=e.property("__brush",g).selectAll(".overlay").data([jh("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Sh.overlay).merge(n).each((function(){var t=Rh(this).extent;Ss(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([jh("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Sh.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 Sh[t.type]})),e.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(){var t=Ss(this),e=Rh(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 u(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(){if((!e||ps.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,d,f,p,g,y,m=this,v=ps.target.__data__.type,b="selection"===(a&&ps.metaKey?v="overlay":v)?mh:a&&ps.altKey?_h:bh,_=t===Th?null:Mh[v],w=t===Ch?null:Dh[v],x=Rh(m),k=x.extent,C=x.selection,T=k[0][0],E=k[0][1],S=k[1][0],O=k[1][1],A=0,M=0,D=_&&w&&a&&ps.shiftKey,j=ps.touches?kh(ps.changedTouches[0].identifier):Ns,N=j(m),B=N,L=u(m,arguments,!0).beforestart();"overlay"===v?(C&&(p=!0),x.selection=C=[[n=t===Th?T:N[0],o=t===Ch?E:N[1]],[c=t===Th?S:n,d=t===Ch?O:o]]):(n=C[0][0],o=C[0][1],c=C[1][0],d=C[1][1]),i=n,s=o,h=c,f=d;var R=Ss(m).attr("pointer-events","none"),I=R.selectAll(".overlay").attr("cursor",Sh[v]);if(ps.touches)L.moved=P,L.ended=z;else{var F=Ss(ps.view).on("mousemove.brush",P,!0).on("mouseup.brush",z,!0);a&&F.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Is(ps.view)}gh(),hu(m),l.call(m),L.start()}function P(){var t=j(m);!D||g||y||(Math.abs(t[0]-B[0])>Math.abs(t[1]-B[1])?y=!0:g=!0),B=t,p=!0,yh(),Y()}function Y(){var t;switch(A=B[0]-N[0],M=B[1]-N[1],b){case vh:case mh:_&&(A=Math.max(T-n,Math.min(S-c,A)),i=n+A,h=c+A),w&&(M=Math.max(E-o,Math.min(O-d,M)),s=o+M,f=d+M);break;case bh:_<0?(A=Math.max(T-n,Math.min(S-n,A)),i=n+A,h=c):_>0&&(A=Math.max(T-c,Math.min(S-c,A)),i=n,h=c+A),w<0?(M=Math.max(E-o,Math.min(O-o,M)),s=o+M,f=d):w>0&&(M=Math.max(E-d,Math.min(O-d,M)),s=o,f=d+M);break;case _h:_&&(i=Math.max(T,Math.min(S,n-A*_)),h=Math.max(T,Math.min(S,c+A*_))),w&&(s=Math.max(E,Math.min(O,o-M*w)),f=Math.max(E,Math.min(O,d+M*w)))}h<i&&(_*=-1,t=n,n=c,c=t,t=i,i=h,h=t,v in Oh&&I.attr("cursor",Sh[v=Oh[v]])),f<s&&(w*=-1,t=o,o=d,d=t,t=s,s=f,f=t,v in Ah&&I.attr("cursor",Sh[v=Ah[v]])),x.selection&&(C=x.selection),g&&(i=C[0][0],h=C[1][0]),y&&(s=C[0][1],f=C[1][1]),C[0][0]===i&&C[0][1]===s&&C[1][0]===h&&C[1][1]===f||(x.selection=[[i,s],[h,f]],l.call(m),L.brush())}function z(){if(gh(),ps.touches){if(ps.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Fs(ps.view,p),F.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),I.attr("cursor",Sh.overlay),x.selection&&(C=x.selection),Ih(C)&&(x.selection=null,l.call(m)),L.end()}function U(){switch(ps.keyCode){case 16:D=_&&w;break;case 18:b===bh&&(_&&(c=h-A*_,n=i+A*_),w&&(d=f-M*w,o=s+M*w),b=_h,Y());break;case 32:b!==bh&&b!==_h||(_<0?c=h-A:_>0&&(n=i-A),w<0?d=f-M:w>0&&(o=s-M),b=vh,I.attr("cursor",Sh.selection),Y());break;default:return}yh()}function $(){switch(ps.keyCode){case 16:D&&(g=y=D=!1,Y());break;case 18:b===_h&&(_<0?c=h:_>0&&(n=i),w<0?d=f:w>0&&(o=s),b=bh,Y());break;case 32:b===vh&&(ps.altKey?(_&&(c=h-A*_,n=i+A*_),w&&(d=f-M*w,o=s+M*w),b=_h):(_<0?c=h:_>0&&(n=i),w<0?d=f:w>0&&(o=s),b=bh),I.attr("cursor",Sh[v]),Y());break;default:return}yh()}}function f(){u(this,arguments).moved()}function p(){u(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=xh(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){u(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){u(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=u(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=yl(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),l.call(e),i.brush()}return null!==a&&null!==o?c:c(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=u(e,r).beforestart();hu(e),i.selection=null===a?null:a,l.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.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){_s(new ph(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:fh(xh(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:fh(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:fh(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Ph=Math.cos,Yh=Math.sin,zh=Math.PI,Uh=zh/2,$h=2*zh,Wh=Math.max;function qh(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Hh=Array.prototype.slice;function Vh(t){return function(){return t}}var Gh=Math.PI,Xh=2*Gh,Zh=Xh-1e-6;function Qh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Kh(){return new Qh}function Jh(t){return t.source}function td(t){return t.target}function ed(t){return t.radius}function nd(t){return t.startAngle}function rd(t){return t.endAngle}Qh.prototype=Kh.prototype={constructor:Qh,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,c=r-e,l=a-t,u=o-e,h=l*l+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(u*s-c*l)>1e-6&&i){var d=n-a,f=r-o,p=s*s+c*c,g=d*d+f*f,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((Gh-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*l)+","+(e+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*d>l*f)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}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),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%Xh+Xh),h>Zh?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Gh)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function id(){}function ad(t,e){var n=new id;if(t instanceof id)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}function od(){return{}}function sd(t,e,n){t[e]=n}function cd(){return ad()}function ld(t,e,n){t.set(e,n)}function ud(){}id.prototype=ad.prototype={constructor:id,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 hd=ad.prototype;function dd(t,e){var n=new ud;if(t instanceof ud)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}ud.prototype=dd.prototype={constructor:ud,has:hd.has,add:function(t){return this["$"+(t+="")]=t,this},remove:hd.remove,clear:hd.clear,values:hd.keys,size:hd.size,empty:hd.empty,each:hd.each};var fd=Array.prototype.slice;function pd(t,e){return t-e}function gd(t){return function(){return t}}function yd(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=md(t,e[r]))return n;return 0}function md(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 c=t[a],l=c[0],u=c[1],h=t[s],d=h[0],f=h[1];if(vd(c,h,e))return 0;u>r!=f>r&&n<(d-l)*(r-u)/(f-u)+l&&(i=-i)}return i}function vd(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)}function bd(){}var _d=[[],[[[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]]],[]];function wd(){var t=1,e=1,n=Xa,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(pd);else{var r=Ra(t),i=r[0],o=r[1];e=Ga(i,o,e),e=Ua(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,c,l,u,h,d=new Array,f=new Array;a=s=-1,l=n[0]>=r,_d[l<<1].forEach(p);for(;++a<t-1;)c=l,l=n[a+1]>=r,_d[c|l<<1].forEach(p);_d[l<<0].forEach(p);for(;++s<e-1;){for(a=-1,l=n[s*t+t]>=r,u=n[s*t]>=r,_d[l<<1|u<<2].forEach(p);++a<t-1;)c=l,l=n[s*t+t+a+1]>=r,h=u,u=n[s*t+a+1]>=r,_d[c|l<<1|u<<2|h<<3].forEach(p);_d[l|u<<3].forEach(p)}a=-1,u=n[s*t]>=r,_d[u<<2].forEach(p);for(;++a<t-1;)h=u,u=n[s*t+a+1]>=r,_d[u<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],l=o(r),u=o(c);(e=f[l])?(n=d[u])?(delete f[e.end],delete d[n.start],e===n?(e.ring.push(c),i(e.ring)):d[e.start]=f[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete f[e.end],e.ring.push(c),f[e.end=u]=e):(e=d[u])?(n=f[l])?(delete d[e.start],delete f[n.end],e===n?(e.ring.push(c),i(e.ring)):d[n.start]=f[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=l]=e):d[l]=f[u]={start:l,end:u,ring:[r,c]}}_d[u<<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!==yd((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],c=0|o,l=0|s,u=r[l*t+c];o>0&&o<t&&c===o&&(a=r[l*t+c-1],n[0]=o+(i-a)/(u-a)-.5),s>0&&s<e&&l===s&&(a=r[(l-1)*t+c],n[1]=s+(i-a)/(u-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)?gd(fd.call(t)):gd(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:bd,i):r===s},i}function xd(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function kd(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function Cd(t){return t[0]}function Td(t){return t[1]}function Ed(){return 1}var Sd={},Od={};function Ad(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Md(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 Dd(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function jd(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Dd(-e,6):e>9999?"+"+Dd(e,6):Dd(e,4))+"-"+Dd(t.getUTCMonth()+1,2)+"-"+Dd(t.getUTCDate(),2)+(a?"T"+Dd(n,2)+":"+Dd(r,2)+":"+Dd(i,2)+"."+Dd(a,3)+"Z":i?"T"+Dd(n,2)+":"+Dd(r,2)+":"+Dd(i,2)+"Z":r||n?"T"+Dd(n,2)+":"+Dd(r,2)+"Z":"")}function Nd(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,c=a<=0,l=!1;function u(){if(c)return Od;if(l)return l=!1,Sd;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?c=!0:10===(r=t.charCodeAt(o++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=u())!==Od;){for(var h=[];r!==Sd&&r!==Od;)h.push(r),r=u();e&&null==(h=e(h,s++))||i.push(h)}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?jd(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=Ad(t);return function(r,i){return e(n(r),i,t)}}(t,e):Ad(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Md(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Md(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var Bd=Nd(","),Ld=Bd.parse,Rd=Bd.parseRows,Id=Bd.format,Fd=Bd.formatBody,Pd=Bd.formatRows,Yd=Bd.formatRow,zd=Bd.formatValue,Ud=Nd("\t"),$d=Ud.parse,Wd=Ud.parseRows,qd=Ud.format,Hd=Ud.formatBody,Vd=Ud.formatRows,Gd=Ud.formatRow,Xd=Ud.formatValue;var Zd=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Qd(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function Kd(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function Jd(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function tf(t,e){return fetch(t,e).then(Jd)}function ef(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),tf(e,n).then((function(e){return t(e,r)}))}}var nf=ef(Ld),rf=ef($d);function af(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function of(t){return function(e,n){return tf(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var sf=of("application/xml"),cf=of("text/html"),lf=of("image/svg+xml");function uf(t){return function(){return t}}function hf(){return 1e-6*(Math.random()-.5)}function df(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,l,u,h,d,f=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(!f)return t._root=p,t;for(;f.length;)if((l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,i=f,!(f=f[h=u<<1|l]))return i[h]=p,t;if(s=+t._x.call(null,f.data),c=+t._y.call(null,f.data),e===s&&n===c)return p.next=f,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o}while((h=u<<1|l)==(d=(c>=o)<<1|s>=a));return i[d]=f,i[h]=p,t}function ff(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function pf(t){return t[0]}function gf(t){return t[1]}function yf(t,e,n){var r=new mf(null==e?pf:e,null==n?gf:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function mf(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 vf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var bf=yf.prototype=mf.prototype;function _f(t){return t.x+t.vx}function wf(t){return t.y+t.vy}function xf(t){return t.index}function kf(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Cf(t){return t.x}function Tf(t){return t.y}bf.copy=function(){var t,e,n=new mf(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=vf(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]=vf(e));return n},bf.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return df(this.cover(e,n),e,n,t)},bf.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,l=1/0,u=-1/0,h=-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<c&&(c=r),r>u&&(u=r),i<l&&(l=i),i>h&&(h=i));if(c>u||l>h)return this;for(this.cover(c,l).cover(u,h),n=0;n<a;++n)df(this,o[n],s[n],t[n]);return this},bf.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,c=i-n,l=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=l,l=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},bf.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},bf.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]]},bf.find=function(t,e,n){var r,i,a,o,s,c,l,u=this._x0,h=this._y0,d=this._x1,f=this._y1,p=[],g=this._root;for(g&&p.push(new ff(g,u,h,d,f)),null==n?n=1/0:(u=t-n,h=e-n,d=t+n,f=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>d||(a=c.y0)>f||(o=c.x1)<u||(s=c.y1)<h))if(g.length){var y=(i+o)/2,m=(a+s)/2;p.push(new ff(g[3],y,m,o,s),new ff(g[2],i,m,y,s),new ff(g[1],y,a,o,m),new ff(g[0],i,a,y,m)),(l=(e>=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var v=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=v*v+b*b;if(_<n){var w=Math.sqrt(n=_);u=t-w,h=e-w,d=t+w,f=e+w,r=g.data}}return r},bf.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,c,l,u,h,d,f=this._root,p=this._x0,g=this._y0,y=this._x1,m=this._y1;if(!f)return this;if(f.length)for(;;){if((l=a>=(s=(p+y)/2))?p=s:y=s,(u=o>=(c=(g+m)/2))?g=c:m=c,e=f,!(f=f[h=u<<1|l]))return this;if(!f.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,d=h)}for(;f.data!==t;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},bf.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},bf.root=function(){return this._root},bf.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},bf.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new ff(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var l=(r+a)/2,u=(i+o)/2;(n=c[3])&&s.push(new ff(n,l,u,a,o)),(n=c[2])&&s.push(new ff(n,r,u,l,o)),(n=c[1])&&s.push(new ff(n,l,i,a,u)),(n=c[0])&&s.push(new ff(n,r,i,l,u))}return this},bf.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ff(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,c=e.x1,l=e.y1,u=(o+c)/2,h=(s+l)/2;(a=i[0])&&n.push(new ff(a,o,s,u,h)),(a=i[1])&&n.push(new ff(a,u,s,c,h)),(a=i[2])&&n.push(new ff(a,o,h,u,l)),(a=i[3])&&n.push(new ff(a,u,h,c,l))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},bf.x=function(t){return arguments.length?(this._x=t,this):this._x},bf.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ef=Math.PI*(3-Math.sqrt(5));function Sf(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 Of(t){return(t=Sf(Math.abs(t)))?t[1]:NaN}var Af,Mf=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Df(t){if(!(e=Mf.exec(t)))throw new Error("invalid format: "+t);var e;return new jf({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 jf(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Nf(t,e){var n=Sf(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")}Df.prototype=jf.prototype,jf.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 Bf={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Nf(100*t,e)},r:Nf,s:function(t,e){var n=Sf(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Af=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")+Sf(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)}};function Lf(t){return t}var Rf,If,Ff,Pf=Array.prototype.map,Yf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zf(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Lf:(e=Pf.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=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?Lf:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Pf.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Df(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):Bf[v]||(void 0===y&&(y=12),m=!0,v="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===d?a:/[%p]/.test(v)?c:"",w=Bf[v],x=/[defgprs%]/.test(v);function k(t){var i,a,c,d=b,k=_;if("c"===v)k=w(t)+k,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:w(Math.abs(t),y),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)),C&&0==+t&&"+"!==h&&(C=!1),d=(C?"("===h?h:l:"-"===h||"("===h?"":h)+d,k=("s"===v?Yf[8+Af/3]:"")+k+(C&&"("===h?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var T=d.length+t.length+k.length,E=T<p?new Array(p-T+1).join(e):"";switch(g&&f&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=d+t+k+E;break;case"=":t=d+E+t+k;break;case"^":t=E.slice(0,T=E.length>>1)+d+t+k+E.slice(T);break;default:t=E+d+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=Df(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Of(e)/3))),i=Math.pow(10,-r),a=Yf[8+r/3];return function(t){return n(i*t)+a}}}}function Uf(t){return Rf=zf(t),If=Rf.format,Ff=Rf.formatPrefix,Rf}function $f(t){return Math.max(0,-Of(Math.abs(t)))}function Wf(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Of(e)/3)))-Of(Math.abs(t)))}function qf(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Of(e)-Of(t))+1}function Hf(){return new Vf}function Vf(){this.reset()}Uf({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Vf.prototype={constructor:Vf,reset:function(){this.s=this.t=0},add:function(t){Xf(Gf,t,this.t),Xf(this,Gf.s,this.s),this.s?this.t+=Gf.t:this.s=Gf.t},valueOf:function(){return this.s}};var Gf=new Vf;function Xf(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Zf=Math.PI,Qf=Zf/2,Kf=Zf/4,Jf=2*Zf,tp=180/Zf,ep=Zf/180,np=Math.abs,rp=Math.atan,ip=Math.atan2,ap=Math.cos,op=Math.ceil,sp=Math.exp,cp=Math.log,lp=Math.pow,up=Math.sin,hp=Math.sign||function(t){return t>0?1:t<0?-1:0},dp=Math.sqrt,fp=Math.tan;function pp(t){return t>1?0:t<-1?Zf:Math.acos(t)}function gp(t){return t>1?Qf:t<-1?-Qf:Math.asin(t)}function yp(t){return(t=up(t/2))*t}function mp(){}function vp(t,e){t&&_p.hasOwnProperty(t.type)&&_p[t.type](t,e)}var bp={Feature:function(t,e){vp(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)vp(n[r].geometry,e)}},_p={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){wp(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)wp(n[r],e,0)},Polygon:function(t,e){xp(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)xp(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)vp(n[r],e)}};function wp(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 xp(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)wp(t[n],e,1);e.polygonEnd()}function kp(t,e){t&&bp.hasOwnProperty(t.type)?bp[t.type](t,e):vp(t,e)}var Cp,Tp,Ep,Sp,Op,Ap=Hf(),Mp=Hf(),Dp={point:mp,lineStart:mp,lineEnd:mp,polygonStart:function(){Ap.reset(),Dp.lineStart=jp,Dp.lineEnd=Np},polygonEnd:function(){var t=+Ap;Mp.add(t<0?Jf+t:t),this.lineStart=this.lineEnd=this.point=mp},sphere:function(){Mp.add(Jf)}};function jp(){Dp.point=Bp}function Np(){Lp(Cp,Tp)}function Bp(t,e){Dp.point=Lp,Cp=t,Tp=e,Ep=t*=ep,Sp=ap(e=(e*=ep)/2+Kf),Op=up(e)}function Lp(t,e){var n=(t*=ep)-Ep,r=n>=0?1:-1,i=r*n,a=ap(e=(e*=ep)/2+Kf),o=up(e),s=Op*o,c=Sp*a+s*ap(i),l=s*r*up(i);Ap.add(ip(l,c)),Ep=t,Sp=a,Op=o}function Rp(t){return[ip(t[1],t[0]),gp(t[2])]}function Ip(t){var e=t[0],n=t[1],r=ap(n);return[r*ap(e),r*up(e),up(n)]}function Fp(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Pp(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 Yp(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function zp(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Up(t){var e=dp(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $p,Wp,qp,Hp,Vp,Gp,Xp,Zp,Qp,Kp,Jp,tg,eg,ng,rg,ig,ag,og,sg,cg,lg,ug,hg,dg,fg,pg,gg=Hf(),yg={point:mg,lineStart:bg,lineEnd:_g,polygonStart:function(){yg.point=wg,yg.lineStart=xg,yg.lineEnd=kg,gg.reset(),Dp.polygonStart()},polygonEnd:function(){Dp.polygonEnd(),yg.point=mg,yg.lineStart=bg,yg.lineEnd=_g,Ap<0?($p=-(qp=180),Wp=-(Hp=90)):gg>1e-6?Hp=90:gg<-1e-6&&(Wp=-90),Kp[0]=$p,Kp[1]=qp},sphere:function(){$p=-(qp=180),Wp=-(Hp=90)}};function mg(t,e){Qp.push(Kp=[$p=t,qp=t]),e<Wp&&(Wp=e),e>Hp&&(Hp=e)}function vg(t,e){var n=Ip([t*ep,e*ep]);if(Zp){var r=Pp(Zp,n),i=Pp([r[1],-r[0],0],r);Up(i),i=Rp(i);var a,o=t-Vp,s=o>0?1:-1,c=i[0]*tp*s,l=np(o)>180;l^(s*Vp<c&&c<s*t)?(a=i[1]*tp)>Hp&&(Hp=a):l^(s*Vp<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*tp)<Wp&&(Wp=a):(e<Wp&&(Wp=e),e>Hp&&(Hp=e)),l?t<Vp?Cg($p,t)>Cg($p,qp)&&(qp=t):Cg(t,qp)>Cg($p,qp)&&($p=t):qp>=$p?(t<$p&&($p=t),t>qp&&(qp=t)):t>Vp?Cg($p,t)>Cg($p,qp)&&(qp=t):Cg(t,qp)>Cg($p,qp)&&($p=t)}else Qp.push(Kp=[$p=t,qp=t]);e<Wp&&(Wp=e),e>Hp&&(Hp=e),Zp=n,Vp=t}function bg(){yg.point=vg}function _g(){Kp[0]=$p,Kp[1]=qp,yg.point=mg,Zp=null}function wg(t,e){if(Zp){var n=t-Vp;gg.add(np(n)>180?n+(n>0?360:-360):n)}else Gp=t,Xp=e;Dp.point(t,e),vg(t,e)}function xg(){Dp.lineStart()}function kg(){wg(Gp,Xp),Dp.lineEnd(),np(gg)>1e-6&&($p=-(qp=180)),Kp[0]=$p,Kp[1]=qp,Zp=null}function Cg(t,e){return(e-=t)<0?e+360:e}function Tg(t,e){return t[0]-e[0]}function Eg(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var Sg={sphere:mp,point:Og,lineStart:Mg,lineEnd:Ng,polygonStart:function(){Sg.lineStart=Bg,Sg.lineEnd=Lg},polygonEnd:function(){Sg.lineStart=Mg,Sg.lineEnd=Ng}};function Og(t,e){t*=ep;var n=ap(e*=ep);Ag(n*ap(t),n*up(t),up(e))}function Ag(t,e,n){++Jp,eg+=(t-eg)/Jp,ng+=(e-ng)/Jp,rg+=(n-rg)/Jp}function Mg(){Sg.point=Dg}function Dg(t,e){t*=ep;var n=ap(e*=ep);dg=n*ap(t),fg=n*up(t),pg=up(e),Sg.point=jg,Ag(dg,fg,pg)}function jg(t,e){t*=ep;var n=ap(e*=ep),r=n*ap(t),i=n*up(t),a=up(e),o=ip(dp((o=fg*a-pg*i)*o+(o=pg*r-dg*a)*o+(o=dg*i-fg*r)*o),dg*r+fg*i+pg*a);tg+=o,ig+=o*(dg+(dg=r)),ag+=o*(fg+(fg=i)),og+=o*(pg+(pg=a)),Ag(dg,fg,pg)}function Ng(){Sg.point=Og}function Bg(){Sg.point=Rg}function Lg(){Ig(ug,hg),Sg.point=Og}function Rg(t,e){ug=t,hg=e,t*=ep,e*=ep,Sg.point=Ig;var n=ap(e);dg=n*ap(t),fg=n*up(t),pg=up(e),Ag(dg,fg,pg)}function Ig(t,e){t*=ep;var n=ap(e*=ep),r=n*ap(t),i=n*up(t),a=up(e),o=fg*a-pg*i,s=pg*r-dg*a,c=dg*i-fg*r,l=dp(o*o+s*s+c*c),u=gp(l),h=l&&-u/l;sg+=h*o,cg+=h*s,lg+=h*c,tg+=u,ig+=u*(dg+(dg=r)),ag+=u*(fg+(fg=i)),og+=u*(pg+(pg=a)),Ag(dg,fg,pg)}function Fg(t){return function(){return t}}function Pg(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 Yg(t,e){return[np(t)>Zf?t+Math.round(-t/Jf)*Jf:t,e]}function zg(t,e,n){return(t%=Jf)?e||n?Pg($g(t),Wg(e,n)):$g(t):e||n?Wg(e,n):Yg}function Ug(t){return function(e,n){return[(e+=t)>Zf?e-Jf:e<-Zf?e+Jf:e,n]}}function $g(t){var e=Ug(t);return e.invert=Ug(-t),e}function Wg(t,e){var n=ap(t),r=up(t),i=ap(e),a=up(e);function o(t,e){var o=ap(e),s=ap(t)*o,c=up(t)*o,l=up(e),u=l*n+s*r;return[ip(c*i-u*a,s*n-l*r),gp(u*i+c*a)]}return o.invert=function(t,e){var o=ap(e),s=ap(t)*o,c=up(t)*o,l=up(e),u=l*i-c*a;return[ip(c*i+l*a,s*n+u*r),gp(u*n-s*r)]},o}function qg(t){function e(e){return(e=t(e[0]*ep,e[1]*ep))[0]*=tp,e[1]*=tp,e}return t=zg(t[0]*ep,t[1]*ep,t.length>2?t[2]*ep:0),e.invert=function(e){return(e=t.invert(e[0]*ep,e[1]*ep))[0]*=tp,e[1]*=tp,e},e}function Hg(t,e,n,r,i,a){if(n){var o=ap(e),s=up(e),c=r*n;null==i?(i=e+r*Jf,a=e-c/2):(i=Vg(o,i),a=Vg(o,a),(r>0?i<a:i>a)&&(i+=r*Jf));for(var l,u=i;r>0?u>a:u<a;u-=c)l=Rp([o,-s*ap(u),-s*up(u)]),t.point(l[0],l[1])}}function Vg(t,e){(e=Ip(e))[0]-=t,Up(e);var n=pp(-e[1]);return((-e[2]<0?-n:n)+Jf-1e-6)%Jf}function Gg(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:mp,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Xg(t,e){return np(t[0]-e[0])<1e-6&&np(t[1]-e[1])<1e-6}function Zg(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Qg(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Xg(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new Zg(r,t,null,!0)),c.push(n.o=new Zg(r,null,n,!1)),s.push(n=new Zg(o,t,null,!1)),c.push(n.o=new Zg(o,null,n,!0))}})),s.length){for(c.sort(e),Kg(s),Kg(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var l,u,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;l=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(a=0,o=l.length;a<o;++a)i.point((u=l[a])[0],u[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(f)for(l=d.p.z,a=l.length-1;a>=0;--a)i.point((u=l[a])[0],u[1]);else r(d.x,d.p.x,-1,i);d=d.p}l=(d=d.o).z,f=!f}while(!d.v);i.lineEnd()}}}function Kg(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}}Yg.invert=Yg;var Jg=Hf();function ty(t){return np(t[0])<=Zf?t[0]:hp(t[0])*((np(t[0])+Zf)%Jf-Zf)}function ey(t,e){var n=ty(e),r=e[1],i=up(r),a=[up(n),-ap(n),0],o=0,s=0;Jg.reset(),1===i?r=Qf+1e-6:-1===i&&(r=-Qf-1e-6);for(var c=0,l=t.length;c<l;++c)if(h=(u=t[c]).length)for(var u,h,d=u[h-1],f=ty(d),p=d[1]/2+Kf,g=up(p),y=ap(p),m=0;m<h;++m,f=b,g=w,y=x,d=v){var v=u[m],b=ty(v),_=v[1]/2+Kf,w=up(_),x=ap(_),k=b-f,C=k>=0?1:-1,T=C*k,E=T>Zf,S=g*w;if(Jg.add(ip(S*C*up(T),y*x+S*ap(T))),o+=E?k+C*Jf:k,E^f>=n^b>=n){var O=Pp(Ip(d),Ip(v));Up(O);var A=Pp(a,O);Up(A);var M=(E^k>=0?-1:1)*gp(A[2]);(r>M||r===M&&(O[0]||O[1]))&&(s+=E^k>=0?1:-1)}}return(o<-1e-6||o<1e-6&&Jg<-1e-6)^1&s}function ny(t,e,n,r){return function(i){var a,o,s,c=e(i),l=Gg(),u=e(l),h=!1,d={point:f,lineStart:g,lineEnd:y,polygonStart:function(){d.point=m,d.lineStart=v,d.lineEnd=b,o=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=g,d.lineEnd=y,o=Ka(o);var t=ey(a,r);o.length?(h||(i.polygonStart(),h=!0),Qg(o,iy,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){d.point=p,c.lineStart()}function y(){d.point=f,c.lineEnd()}function m(t,e){s.push([t,e]),u.point(t,e)}function v(){u.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),u.lineEnd();var t,e,n,r,c=u.clean(),d=l.result(),f=d.length;if(s.pop(),a.push(s),s=null,f)if(1&c){if((e=(n=d[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else f>1&&2&c&&d.push(d.pop().concat(d.shift())),o.push(d.filter(ry))}return d}}function ry(t){return t.length>1}function iy(t,e){return((t=t.x)[0]<0?t[1]-Qf-1e-6:Qf-t[1])-((e=e.x)[0]<0?e[1]-Qf-1e-6:Qf-e[1])}var ay=ny((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?Zf:-Zf,c=np(a-n);np(c-Zf)<1e-6?(t.point(n,r=(r+o)/2>0?Qf:-Qf),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=Zf&&(np(n-i)<1e-6&&(n-=1e-6*i),np(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=up(t-n);return np(o)>1e-6?rp((up(e)*(a=ap(r))*up(n)-up(r)*(i=ap(e))*up(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*Qf,r.point(-Zf,i),r.point(0,i),r.point(Zf,i),r.point(Zf,0),r.point(Zf,-i),r.point(0,-i),r.point(-Zf,-i),r.point(-Zf,0),r.point(-Zf,i);else if(np(t[0]-e[0])>1e-6){var a=t[0]<e[0]?Zf:-Zf;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-Zf,-Qf]);function oy(t){var e=ap(t),n=6*ep,r=e>0,i=np(e)>1e-6;function a(t,n){return ap(t)*ap(n)>e}function o(t,n,r){var i=[1,0,0],a=Pp(Ip(t),Ip(n)),o=Fp(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var l=e*o/c,u=-e*s/c,h=Pp(i,a),d=zp(i,l);Yp(d,zp(a,u));var f=h,p=Fp(d,f),g=Fp(f,f),y=p*p-g*(Fp(d,d)-1);if(!(y<0)){var m=dp(y),v=zp(f,(-p-m)/g);if(Yp(v,d),v=Rp(v),!r)return v;var b,_=t[0],w=n[0],x=t[1],k=n[1];w<_&&(b=_,_=w,w=b);var C=w-_,T=np(C-Zf)<1e-6;if(!T&&k<x&&(b=x,x=k,k=b),T||C<1e-6?T?x+k>0^v[1]<(np(v[0]-_)<1e-6?x:k):x<=v[1]&&v[1]<=k:C>Zf^(_<=v[0]&&v[0]<=w)){var E=zp(f,(-p+m)/g);return Yp(E,d),[v,Rp(E)]}}}function s(e,n){var i=r?t:Zf-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return ny(a,(function(t){var e,n,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(h,d){var f,p=[h,d],g=a(h,d),y=r?g?0:s(h,d):g?s(h+(h<0?Zf:-Zf),d):0;if(!e&&(l=c=g)&&t.lineStart(),g!==c&&(!(f=o(e,p))||Xg(e,f)||Xg(p,f))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),f=o(p,e),t.point(f[0],f[1])):(f=o(e,p),t.point(f[0],f[1],2),t.lineEnd()),e=f;else if(i&&e&&r^g){var m;y&n||!(m=o(p,e,!0))||(u=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],3)))}!g||e&&Xg(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return u|(l&&c)<<1}}}),(function(e,r,i,a){Hg(a,t,n,i,e,r)}),r?[0,-t]:[-Zf,t-Zf])}function sy(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,l){var u=0,h=0;if(null==i||(u=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h);else l.point(a[0],a[1])}function o(r,i){return np(r[0]-t)<1e-6?i>0?0:3:np(r[0]-n)<1e-6?i>0?2:1:np(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(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 c,l,u,h,d,f,p,g,y,m,v,b=o,_=Gg(),w={point:x,lineStart:function(){w.point=k,l&&l.push(u=[]);m=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(k(h,d),f&&y&&_.rejoin(),c.push(_.result()));w.point=x,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],l=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;n<i;++n)for(var a,o,s=l[n],c=1,u=s.length,h=s[0],d=h[0],f=h[1];c<u;++c)a=d,o=f,d=(h=s[c])[0],f=h[1],o<=r?f>r&&(d-a)*(r-o)>(f-o)*(t-a)&&++e:f<=r&&(d-a)*(r-o)<(f-o)*(t-a)&&--e;return e}(),n=v&&e,i=(c=Ka(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Qg(c,s,e,a,o),o.polygonEnd());b=o,c=l=u=null}};function x(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(l&&u.push([a,o]),m)h=a,d=o,f=s,m=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&y)b.point(a,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),g=Math.max(-1e9,Math.min(1e9,g))],_=[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],c=t[1],l=0,u=1,h=e[0]-s,d=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>l&&(l=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>l&&(l=o)}else if(h>0){if(o<l)return;o<u&&(u=o)}if(o=r-c,d||!(o>0)){if(o/=d,d<0){if(o<l)return;o<u&&(u=o)}else if(d>0){if(o>u)return;o>l&&(l=o)}if(o=a-c,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>l&&(l=o)}else if(d>0){if(o<l)return;o<u&&(u=o)}return l>0&&(t[0]=s+l*h,t[1]=c+l*d),u<1&&(e[0]=s+u*h,e[1]=c+u*d),!0}}}}}(c,_,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),v=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}p=a,g=o,y=s}return w}}var cy,ly,uy,hy=Hf(),dy={sphere:mp,point:mp,lineStart:function(){dy.point=py,dy.lineEnd=fy},lineEnd:mp,polygonStart:mp,polygonEnd:mp};function fy(){dy.point=dy.lineEnd=mp}function py(t,e){cy=t*=ep,ly=up(e*=ep),uy=ap(e),dy.point=gy}function gy(t,e){t*=ep;var n=up(e*=ep),r=ap(e),i=np(t-cy),a=ap(i),o=r*up(i),s=uy*n-ly*r*a,c=ly*n+uy*r*a;hy.add(ip(dp(o*o+s*s),c)),cy=t,ly=n,uy=r}function yy(t){return hy.reset(),kp(t,dy),+hy}var my=[null,null],vy={type:"LineString",coordinates:my};function by(t,e){return my[0]=t,my[1]=e,yy(vy)}var _y={Feature:function(t,e){return xy(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(xy(n[r].geometry,e))return!0;return!1}},wy={Sphere:function(){return!0},Point:function(t,e){return ky(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(ky(n[r],e))return!0;return!1},LineString:function(t,e){return Cy(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Cy(n[r],e))return!0;return!1},Polygon:function(t,e){return Ty(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ty(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(xy(n[r],e))return!0;return!1}};function xy(t,e){return!(!t||!wy.hasOwnProperty(t.type))&&wy[t.type](t,e)}function ky(t,e){return 0===by(t,e)}function Cy(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=by(t[a],e)))return!0;if(a>0&&(i=by(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 Ty(t,e){return!!ey(t.map(Ey),Sy(e))}function Ey(t){return(t=t.map(Sy)).pop(),t}function Sy(t){return[t[0]*ep,t[1]*ep]}function Oy(t,e,n){var r=Ua(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Ay(t,e,n){var r=Ua(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function My(){var t,e,n,r,i,a,o,s,c,l,u,h,d=10,f=d,p=90,g=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return Ua(op(r/p)*p,n,p).map(u).concat(Ua(op(s/g)*g,o,g).map(h)).concat(Ua(op(e/d)*d,t,d).filter((function(t){return np(t%p)>1e-6})).map(c)).concat(Ua(op(a/f)*f,i,f).filter((function(t){return np(t%g)>1e-6})).map(l))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(h(o).slice(1),u(n).reverse().slice(1),h(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(y)):[[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(y)):[[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],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],m):[d,f]},m.precision=function(d){return arguments.length?(y=+d,c=Oy(a,i,90),l=Ay(e,t,y),u=Oy(s,o,90),h=Ay(r,n,y),m):y},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Dy(t){return t}var jy,Ny,By,Ly,Ry=Hf(),Iy=Hf(),Fy={point:mp,lineStart:mp,lineEnd:mp,polygonStart:function(){Fy.lineStart=Py,Fy.lineEnd=Uy},polygonEnd:function(){Fy.lineStart=Fy.lineEnd=Fy.point=mp,Ry.add(np(Iy)),Iy.reset()},result:function(){var t=Ry/2;return Ry.reset(),t}};function Py(){Fy.point=Yy}function Yy(t,e){Fy.point=zy,jy=By=t,Ny=Ly=e}function zy(t,e){Iy.add(Ly*t-By*e),By=t,Ly=e}function Uy(){zy(jy,Ny)}var $y=Fy,Wy=1/0,qy=Wy,Hy=-Wy,Vy=Hy;var Gy,Xy,Zy,Qy,Ky={point:function(t,e){t<Wy&&(Wy=t);t>Hy&&(Hy=t);e<qy&&(qy=e);e>Vy&&(Vy=e)},lineStart:mp,lineEnd:mp,polygonStart:mp,polygonEnd:mp,result:function(){var t=[[Wy,qy],[Hy,Vy]];return Hy=Vy=-(qy=Wy=1/0),t}},Jy=0,tm=0,em=0,nm=0,rm=0,im=0,am=0,om=0,sm=0,cm={point:lm,lineStart:um,lineEnd:fm,polygonStart:function(){cm.lineStart=pm,cm.lineEnd=gm},polygonEnd:function(){cm.point=lm,cm.lineStart=um,cm.lineEnd=fm},result:function(){var t=sm?[am/sm,om/sm]:im?[nm/im,rm/im]:em?[Jy/em,tm/em]:[NaN,NaN];return Jy=tm=em=nm=rm=im=am=om=sm=0,t}};function lm(t,e){Jy+=t,tm+=e,++em}function um(){cm.point=hm}function hm(t,e){cm.point=dm,lm(Zy=t,Qy=e)}function dm(t,e){var n=t-Zy,r=e-Qy,i=dp(n*n+r*r);nm+=i*(Zy+t)/2,rm+=i*(Qy+e)/2,im+=i,lm(Zy=t,Qy=e)}function fm(){cm.point=lm}function pm(){cm.point=ym}function gm(){mm(Gy,Xy)}function ym(t,e){cm.point=mm,lm(Gy=Zy=t,Xy=Qy=e)}function mm(t,e){var n=t-Zy,r=e-Qy,i=dp(n*n+r*r);nm+=i*(Zy+t)/2,rm+=i*(Qy+e)/2,im+=i,am+=(i=Qy*t-Zy*e)*(Zy+t),om+=i*(Qy+e),sm+=3*i,lm(Zy=t,Qy=e)}var vm=cm;function bm(t){this._context=t}bm.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,Jf)}},result:mp};var _m,wm,xm,km,Cm,Tm=Hf(),Em={point:mp,lineStart:function(){Em.point=Sm},lineEnd:function(){_m&&Om(wm,xm),Em.point=mp},polygonStart:function(){_m=!0},polygonEnd:function(){_m=null},result:function(){var t=+Tm;return Tm.reset(),t}};function Sm(t,e){Em.point=Om,wm=km=t,xm=Cm=e}function Om(t,e){km-=t,Cm-=e,Tm.add(dp(km*km+Cm*Cm)),km=t,Cm=e}var Am=Em;function Mm(){this._string=[]}function Dm(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function jm(t){return function(e){var n=new Nm;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Nm(){}function Bm(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),kp(n,t.stream(Ky)),e(Ky.result()),null!=r&&t.clipExtent(r),t}function Lm(t,e,n){return Bm(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 Rm(t,e,n){return Lm(t,[[0,0],e],n)}function Im(t,e,n){return Bm(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 Fm(t,e,n){return Bm(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)}Mm.prototype={_radius:4.5,_circle:Dm(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=Dm(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}},Nm.prototype={constructor:Nm,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 Pm=ap(30*ep);function Ym(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,l,u,h,d,f,p,g,y){var m=l-r,v=u-i,b=m*m+v*v;if(b>4*e&&g--){var _=o+d,w=s+f,x=c+p,k=dp(_*_+w*w+x*x),C=gp(x/=k),T=np(np(x)-1)<1e-6||np(a-h)<1e-6?(a+h)/2:ip(w,_),E=t(T,C),S=E[0],O=E[1],A=S-r,M=O-i,D=v*A-m*M;(D*D/b>e||np((m*A+v*M)/b-.5)>.3||o*d+s*f+c*p<Pm)&&(n(r,i,a,o,s,c,S,O,T,_/=k,w/=k,x,g,y),y.point(S,O),n(S,O,T,_,w,x,l,u,h,d,f,p,g,y))}}return function(e){var r,i,a,o,s,c,l,u,h,d,f,p,g={point:y,lineStart:m,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=_},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){u=NaN,g.point=v,e.lineStart()}function v(r,i){var a=Ip([r,i]),o=t(r,i);n(u,h,l,d,f,p,u=o[0],h=o[1],l=r,d=a[0],f=a[1],p=a[2],16,e),e.point(u,h)}function b(){g.point=y,e.lineEnd()}function _(){m(),g.point=w,g.lineEnd=x}function w(t,e){v(r=t,e),i=u,a=h,o=d,s=f,c=p,g.point=v}function x(){n(u,h,l,d,f,p,i,a,r,o,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return jm({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var zm=jm({point:function(t,e){this.stream.point(t*ep,e*ep)}});function Um(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}function $m(t,e,n,r,i,a){var o=ap(a),s=up(a),c=o*t,l=s*t,u=o/t,h=s/t,d=(s*n-o*e)/t,f=(s*e+o*n)/t;function p(t,a){return[c*(t*=r)-l*(a*=i)+e,n-l*t-c*a]}return p.invert=function(t,e){return[r*(u*t-h*e+d),i*(f-h*t-u*e)]},p}function Wm(t){return qm((function(){return t}))()}function qm(t){var e,n,r,i,a,o,s,c,l,u,h=150,d=480,f=250,p=0,g=0,y=0,m=0,v=0,b=0,_=1,w=1,x=null,k=ay,C=null,T=Dy,E=.5;function S(t){return c(t[0]*ep,t[1]*ep)}function O(t){return(t=c.invert(t[0],t[1]))&&[t[0]*tp,t[1]*tp]}function A(){var t=$m(h,0,0,_,w,b).apply(null,e(p,g)),r=(b?$m:Um)(h,d-t[0],f-t[1],_,w,b);return n=zg(y,m,v),s=Pg(e,r),c=Pg(n,s),o=Ym(s,E),M()}function M(){return l=u=null,S}return S.stream=function(t){return l&&u===t?l:l=zm(function(t){return jm({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(o(T(u=t)))))},S.preclip=function(t){return arguments.length?(k=t,x=void 0,M()):k},S.postclip=function(t){return arguments.length?(T=t,C=r=i=a=null,M()):T},S.clipAngle=function(t){return arguments.length?(k=+t?oy(x=t*ep):(x=null,ay),M()):x*tp},S.clipExtent=function(t){return arguments.length?(T=null==t?(C=r=i=a=null,Dy):sy(C=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),M()):null==C?null:[[C,r],[i,a]]},S.scale=function(t){return arguments.length?(h=+t,A()):h},S.translate=function(t){return arguments.length?(d=+t[0],f=+t[1],A()):[d,f]},S.center=function(t){return arguments.length?(p=t[0]%360*ep,g=t[1]%360*ep,A()):[p*tp,g*tp]},S.rotate=function(t){return arguments.length?(y=t[0]%360*ep,m=t[1]%360*ep,v=t.length>2?t[2]%360*ep:0,A()):[y*tp,m*tp,v*tp]},S.angle=function(t){return arguments.length?(b=t%360*ep,A()):b*tp},S.reflectX=function(t){return arguments.length?(_=t?-1:1,A()):_<0},S.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},S.precision=function(t){return arguments.length?(o=Ym(s,E=t*t),M()):dp(E)},S.fitExtent=function(t,e){return Lm(S,t,e)},S.fitSize=function(t,e){return Rm(S,t,e)},S.fitWidth=function(t,e){return Im(S,t,e)},S.fitHeight=function(t,e){return Fm(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&O,A()}}function Hm(t){var e=0,n=Zf/3,r=qm(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*ep,n=t[1]*ep):[e*tp,n*tp]},i}function Vm(t,e){var n=up(t),r=(n+up(e))/2;if(np(r)<1e-6)return function(t){var e=ap(t);function n(t,n){return[t*e,up(n)/e]}return n.invert=function(t,n){return[t/e,gp(n*e)]},n}(t);var i=1+n*(2*r-n),a=dp(i)/r;function o(t,e){var n=dp(i-2*r*up(e))/r;return[n*up(t*=r),a-n*ap(t)]}return o.invert=function(t,e){var n=a-e,o=ip(t,np(n))*hp(n);return n*r<0&&(o-=Zf*hp(t)*hp(n)),[o/r,gp((i-(t*t+n*n)*r*r)/(2*r))]},o}function Gm(){return Hm(Vm).scale(155.424).center([0,33.6442])}function Xm(){return Gm().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Zm(t){return function(e,n){var r=ap(e),i=ap(n),a=t(r*i);return[a*i*up(e),a*up(n)]}}function Qm(t){return function(e,n){var r=dp(e*e+n*n),i=t(r),a=up(i),o=ap(i);return[ip(e*a,r*o),gp(r&&n*a/r)]}}var Km=Zm((function(t){return dp(2/(1+t))}));Km.invert=Qm((function(t){return 2*gp(t/2)}));var Jm=Zm((function(t){return(t=pp(t))&&t/up(t)}));function tv(t,e){return[t,cp(fp((Qf+e)/2))]}function ev(t){var e,n,r,i=Wm(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,l=null;function u(){var a=Zf*o(),s=i(qg(i.rotate()).invert([0,0]));return c(null==l?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===tv?[[Math.max(s[0]-a,l),e],[Math.min(s[0]+a,n),r]]:[[l,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),u()):o()},i.translate=function(t){return arguments.length?(s(t),u()):s()},i.center=function(t){return arguments.length?(a(t),u()):a()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),u()):null==l?null:[[l,e],[n,r]]},u()}function nv(t){return fp((Qf+t)/2)}function rv(t,e){var n=ap(t),r=t===e?up(t):cp(n/ap(e))/cp(nv(e)/nv(t)),i=n*lp(nv(t),r)/r;if(!r)return tv;function a(t,e){i>0?e<1e-6-Qf&&(e=1e-6-Qf):e>Qf-1e-6&&(e=Qf-1e-6);var n=i/lp(nv(e),r);return[n*up(r*t),i-n*ap(r*t)]}return a.invert=function(t,e){var n=i-e,a=hp(r)*dp(t*t+n*n),o=ip(t,np(n))*hp(n);return n*r<0&&(o-=Zf*hp(t)*hp(n)),[o/r,2*rp(lp(i/a,1/r))-Qf]},a}function iv(t,e){return[t,e]}function av(t,e){var n=ap(t),r=t===e?up(t):(n-ap(e))/(e-t),i=n/r+t;if(np(r)<1e-6)return iv;function a(t,e){var n=i-e,a=r*t;return[n*up(a),i-n*ap(a)]}return a.invert=function(t,e){var n=i-e,a=ip(t,np(n))*hp(n);return n*r<0&&(a-=Zf*hp(t)*hp(n)),[a/r,i-hp(r)*dp(t*t+n*n)]},a}Jm.invert=Qm((function(t){return t})),tv.invert=function(t,e){return[t,2*rp(sp(e))-Qf]},iv.invert=iv;var ov=1.340264,sv=-.081106,cv=893e-6,lv=.003796,uv=dp(3)/2;function hv(t,e){var n=gp(uv*up(e)),r=n*n,i=r*r*r;return[t*ap(n)/(uv*(ov+3*sv*r+i*(7*cv+9*lv*r))),n*(ov+sv*r+i*(cv+lv*r))]}function dv(t,e){var n=ap(e),r=ap(t)*n;return[n*up(t)/r,up(e)/r]}function fv(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)))]}function pv(t,e){return[ap(e)*up(t),up(e)]}function gv(t,e){var n=ap(e),r=1+ap(t)*n;return[n*up(t)/r,up(e)/r]}function yv(t,e){return[cp(fp((Qf+e)/2)),-t]}function mv(t,e){return t.parent===e.parent?1:2}function vv(t,e){return t+e.x}function bv(t,e){return Math.max(t,e.y)}function _v(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 wv(t,e){var n,r,i,a,o,s=new Tv(t),c=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=xv);n=l.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)l.push(r=n.children[a]=new Tv(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Cv)}function xv(t){return t.children}function kv(t){t.data=t.data.data}function Cv(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Tv(t){this.data=t,this.depth=this.height=0,this.parent=null}hv.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*(ov+sv*i+a*(cv+lv*i))-e)/(ov+3*sv*i+a*(7*cv+9*lv*i)))*r)*i*i,!(np(n)<1e-12));++o);return[uv*t*(ov+3*sv*i+a*(7*cv+9*lv*i))/ap(r),gp(up(r)/uv)]},dv.invert=Qm(rp),fv.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(np(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},pv.invert=Qm(gp),gv.invert=Qm((function(t){return 2*rp(t)})),yv.invert=function(t,e){return[-e,2*rp(sp(t))-Qf]},Tv.prototype=wv.prototype={constructor:Tv,count:function(){return this.eachAfter(_v)},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 wv(this).eachBefore(kv)}};var Ev=Array.prototype.slice;function Sv(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}(Ev.call(t))).length,a=[];r<i;)e=t[r],n&&Mv(n,e)?++r:(n=jv(a=Ov(a,e)),r=0);return n}function Ov(t,e){var n,r;if(Dv(e,t))return[e];for(n=0;n<t.length;++n)if(Av(e,t[n])&&Dv(Nv(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(Av(Nv(t[n],t[r]),e)&&Av(Nv(t[n],e),t[r])&&Av(Nv(t[r],e),t[n])&&Dv(Bv(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Av(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 Mv(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 Dv(t,e){for(var n=0;n<e.length;++n)if(!Mv(t,e[n]))return!1;return!0}function jv(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Nv(t[0],t[1]);case 3:return Bv(t[0],t[1],t[2])}var e}function Nv(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,l=o-r,u=s-i,h=Math.sqrt(c*c+l*l);return{x:(n+a+c/h*u)/2,y:(r+o+l/h*u)/2,r:(h+i+s)/2}}function Bv(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,l=n.x,u=n.y,h=n.r,d=r-o,f=r-l,p=i-s,g=i-u,y=c-a,m=h-a,v=r*r+i*i-a*a,b=v-o*o-s*s+c*c,_=v-l*l-u*u+h*h,w=f*p-d*g,x=(p*_-g*b)/(2*w)-r,k=(g*y-p*m)/w,C=(f*b-d*_)/(2*w)-i,T=(d*m-f*y)/w,E=k*k+T*T-1,S=2*(a+x*k+C*T),O=x*x+C*C-a*a,A=-(E?(S+Math.sqrt(S*S-4*E*O))/(2*E):O/S);return{x:r+x+k*A,y:i+C+T*A,r:A}}function Lv(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Rv(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 Iv(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 Fv(t){this._=t,this.next=null,this.previous=null}function Pv(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,l,u,h;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;Lv(n,e,r=t[2]),e=new Fv(e),n=new Fv(n),r=new Fv(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Lv(e._,n._,r=t[s]),r=new Fv(r),c=n.next,l=e.previous,u=n._.r,h=e._.r;do{if(u<=h){if(Rv(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}u+=c._.r,c=c.next}else{if(Rv(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(c!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Iv(e);(r=r.next)!==n;)(o=Iv(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Sv(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function Yv(t){return null==t?null:zv(t)}function zv(t){if("function"!=typeof t)throw new Error;return t}function Uv(){return 0}function $v(t){return function(){return t}}function Wv(t){return Math.sqrt(t.value)}function qv(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Hv(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=Pv(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function Vv(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)}}function Gv(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)}function Xv(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}var Zv={depth:-1},Qv={};function Kv(t){return t.id}function Jv(t){return t.parentId}function tb(t,e){return t.parent===e.parent?1:2}function eb(t){var e=t.children;return e?e[0]:t.t}function nb(t){var e=t.children;return e?e[e.length-1]:t.t}function rb(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 ib(t,e,n){return t.a.parent===e.parent?t.a:n}function ab(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}function ob(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}ab.prototype=Object.create(Tv.prototype);var sb=(1+Math.sqrt(5))/2;function cb(t,e,n,r,i,a){for(var o,s,c,l,u,h,d,f,p,g,y,m=[],v=e.children,b=0,_=0,w=v.length,x=e.value;b<w;){c=i-n,l=a-r;do{u=v[_++].value}while(!u&&_<w);for(h=d=u,y=u*u*(g=Math.max(l/c,c/l)/(x*t)),p=Math.max(d/y,y/h);_<w;++_){if(u+=s=v[_].value,s<h&&(h=s),s>d&&(d=s),y=u*u*g,(f=Math.max(d/y,y/h))>p){u-=s;break}p=f}m.push(o={value:u,dice:c<l,children:v.slice(b,_)}),o.dice?Xv(o,n,r,i,x?r+=l*u/x:a):ob(o,n,r,x?n+=c*u/x:i,a),x-=u,b=_}return m}var lb=function t(e){function n(t,n,r,i,a){cb(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(sb);var ub=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,l,u,h=-1,d=o.length,f=t.value;++h<d;){for(c=(s=o[h]).children,l=s.value=0,u=c.length;l<u;++l)s.value+=c[l].value;s.dice?Xv(s,n,r,i,r+=(a-r)*s.value/f):ob(s,n,r,n+=(i-n)*s.value/f,a),f-=s.value}else t._squarify=o=cb(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(sb);function hb(t,e){return t[0]-e[0]||t[1]-e[1]}function db(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)}function fb(){return Math.random()}var pb=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}(fb),gb=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}(fb),yb=function t(e){function n(){var t=gb.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(fb),mb=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}(fb),vb=function t(e){function n(t){var n=mb.source(e)(t);return function(){return n()/t}}return n.source=t,n}(fb),bb=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(fb);function _b(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function wb(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var xb=Array.prototype,kb=xb.map,Cb=xb.slice,Tb={name:"implicit"};function Eb(){var t=ad(),e=[],n=[],r=Tb;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Tb)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=ad();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=Cb.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Eb(e,n).unknown(r)},_b.apply(i,arguments),i}function Sb(){var t,e,n=Eb().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,l=.5;function u(){var n=r().length,u=a[1]<a[0],h=a[u-0],d=a[1-u];t=(d-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(d-h-t*(n-s))*l,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var f=Ua(n).map((function(e){return h+t*e}));return i(u?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),u()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],u()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,u()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,u()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),u()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),u()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),u()):l},n.copy=function(){return Sb(r(),a).round(o).paddingInner(s).paddingOuter(c).align(l)},_b.apply(u(),arguments)}function Ob(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ob(e())},t}function Ab(t){return+t}var Mb=[0,1];function Db(t){return t}function jb(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Nb(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 Bb(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=jb(i,r),a=n(o,a)):(r=jb(r,i),a=n(a,o)),function(t){return a(r(t))}}function Lb(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]=jb(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Ma(t,e,1,r)-1;return a[n](i[n](e))}}function Rb(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ib(){var t,e,n,r,i,a,o=Mb,s=Mb,c=yl,l=Db;function u(){return r=Math.min(o.length,s.length)>2?Lb:Bb,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),hl)))(n)))},h.domain=function(t){return arguments.length?(o=kb.call(t,Ab),l===Db||(l=Nb(o)),u()):o.slice()},h.range=function(t){return arguments.length?(s=Cb.call(t),u()):s.slice()},h.rangeRound=function(t){return s=Cb.call(t),c=ml,u()},h.clamp=function(t){return arguments.length?(l=t?Nb(o):Db,h):l!==Db},h.interpolate=function(t){return arguments.length?(c=t,u()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function Fb(t,e){return Ib()(t,e)}function Pb(t,e,n,r){var i,a=Ga(t,e,n);switch((r=Df(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=Wf(a,o))||(r.precision=i),Ff(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=qf(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=$f(a))||(r.precision=i-2*("%"===r.type))}return If(r)}function Yb(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ha(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Pb(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],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=Va(s,c,n))>0?r=Va(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=Va(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function zb(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 Ub(t){return Math.log(t)}function $b(t){return Math.exp(t)}function Wb(t){return-Math.log(-t)}function qb(t){return-Math.exp(-t)}function Hb(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Vb(t){return function(e){return-t(-e)}}function Gb(t){var e,n,r=t(Ub,$b),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?Hb:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Vb(e),n=Vb(n),t(Wb,qb)):t(Ub,$b),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],c=o[o.length-1];(r=c<s)&&(d=s,s=c,c=d);var l,u,h,d=e(s),f=e(c),p=null==t?10:+t,g=[];if(!(a%1)&&f-d<p){if(d=Math.round(d)-1,f=Math.round(f)+1,s>0){for(;d<f;++d)for(u=1,l=n(d);u<a;++u)if(!((h=l*u)<s)){if(h>c)break;g.push(h)}}else for(;d<f;++d)for(u=a-1,l=n(d);u>=1;--u)if(!((h=l*u)<s)){if(h>c)break;g.push(h)}}else g=Ha(d,f,Math.min(f-d,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=If(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(zb(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Xb(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Zb(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Qb(t){var e=1,n=t(Xb(e),Zb(e));return n.constant=function(n){return arguments.length?t(Xb(e=+n),Zb(e)):e},Yb(n)}function Kb(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Jb(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function t_(t){return t<0?-t*t:t*t}function e_(t){var e=t(Db,Db),n=1;function r(){return 1===n?t(Db,Db):.5===n?t(Jb,t_):t(Kb(n),Kb(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},Yb(e)}function n_(){var t=e_(Ib());return t.copy=function(){return Rb(t,n_()).exponent(t.exponent())},_b.apply(t,arguments),t}var r_=new Date,i_=new Date;function a_(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 a_((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 r_.setTime(+e),i_.setTime(+r),t(r_),t(i_),Math.floor(n(r_,i_))},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 o_=a_((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));o_.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?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})):o_:null};var s_=o_,c_=o_.range,l_=a_((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()})),u_=l_,h_=l_.range,d_=a_((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()})),f_=d_,p_=d_.range,g_=a_((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()})),y_=g_,m_=g_.range,v_=a_((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})),b_=v_,__=v_.range;function w_(t){return 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-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var x_=w_(0),k_=w_(1),C_=w_(2),T_=w_(3),E_=w_(4),S_=w_(5),O_=w_(6),A_=x_.range,M_=k_.range,D_=C_.range,j_=T_.range,N_=E_.range,B_=S_.range,L_=O_.range,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()})),I_=R_,F_=R_.range,P_=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()}));P_.every=function(t){return isFinite(t=Math.floor(t))&&t>0?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};var Y_=P_,z_=P_.range,U_=a_((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()})),$_=U_,W_=U_.range,q_=a_((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()})),H_=q_,V_=q_.range,G_=a_((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})),X_=G_,Z_=G_.range;function Q_(t){return 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)/6048e5}))}var K_=Q_(0),J_=Q_(1),tw=Q_(2),ew=Q_(3),nw=Q_(4),rw=Q_(5),iw=Q_(6),aw=K_.range,ow=J_.range,sw=tw.range,cw=ew.range,lw=nw.range,uw=rw.range,hw=iw.range,dw=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()})),fw=dw,pw=dw.range,gw=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()}));gw.every=function(t){return isFinite(t=Math.floor(t))&&t>0?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};var yw=gw,mw=gw.range;function vw(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 bw(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 _w(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function ww(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,l=Nw(i),u=Bw(i),h=Nw(a),d=Bw(a),f=Nw(o),p=Bw(o),g=Nw(s),y=Bw(s),m=Nw(c),v=Bw(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:ex,e:ex,f:ox,g:mx,G:bx,H:nx,I:rx,j:ix,L:ax,m:sx,M:cx,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ux,s:$x,S:lx,u:ux,U:hx,V:fx,w:px,W:gx,x:null,X:null,y:yx,Y:vx,Z:_x,"%":zx},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:wx,e:wx,f:Ex,g:Ix,G:Px,H:xx,I:kx,j:Cx,L:Tx,m:Sx,M:Ox,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ux,s:$x,S:Ax,u:Mx,U:Dx,V:Nx,w:Bx,W:Lx,x:null,X:null,y:Rx,Y:Fx,Z:Yx,"%":zx},w={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:qw,e:qw,f:Qw,g:zw,G:Yw,H:Vw,I:Vw,j:Hw,L:Zw,m:Ww,M:Gw,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:$w,Q:Jw,s:tx,S:Xw,u:Rw,U:Iw,V:Fw,w:Lw,W:Pw,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:zw,Y:Yw,Z:Uw,"%":Kw};function x(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=Sw[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=_w(1900,void 0,1);if(C(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=bw(_w(a.y,0,1))).getUTCDay(),r=i>4||0===i?J_.ceil(r):J_(r),r=X_.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=vw(_w(a.y,0,1))).getDay(),r=i>4||0===i?k_.ceil(r):k_(r),r=b_.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?bw(_w(a.y,0,1)).getUTCDay():vw(_w(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,bw(a)):vw(a)}}function C(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in Sw?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=x(n,b),b.X=x(r,b),b.c=x(e,b),_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),{format:function(t){var e=x(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=x(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var xw,kw,Cw,Tw,Ew,Sw={"-":"",_:" ",0:"0"},Ow=/^\s*\d+/,Aw=/^%/,Mw=/[\\^$*+?|[\]().{}]/g;function Dw(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 jw(t){return t.replace(Mw,"\\$&")}function Nw(t){return new RegExp("^(?:"+t.map(jw).join("|")+")","i")}function Bw(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Lw(t,e,n){var r=Ow.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Rw(t,e,n){var r=Ow.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Iw(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Fw(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Pw(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Yw(t,e,n){var r=Ow.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function zw(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Uw(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 $w(t,e,n){var r=Ow.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Ww(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function qw(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Hw(t,e,n){var r=Ow.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Vw(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Gw(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Xw(t,e,n){var r=Ow.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Zw(t,e,n){var r=Ow.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Qw(t,e,n){var r=Ow.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Kw(t,e,n){var r=Aw.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Jw(t,e,n){var r=Ow.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function tx(t,e,n){var r=Ow.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ex(t,e){return Dw(t.getDate(),e,2)}function nx(t,e){return Dw(t.getHours(),e,2)}function rx(t,e){return Dw(t.getHours()%12||12,e,2)}function ix(t,e){return Dw(1+b_.count(Y_(t),t),e,3)}function ax(t,e){return Dw(t.getMilliseconds(),e,3)}function ox(t,e){return ax(t,e)+"000"}function sx(t,e){return Dw(t.getMonth()+1,e,2)}function cx(t,e){return Dw(t.getMinutes(),e,2)}function lx(t,e){return Dw(t.getSeconds(),e,2)}function ux(t){var e=t.getDay();return 0===e?7:e}function hx(t,e){return Dw(x_.count(Y_(t)-1,t),e,2)}function dx(t){var e=t.getDay();return e>=4||0===e?E_(t):E_.ceil(t)}function fx(t,e){return t=dx(t),Dw(E_.count(Y_(t),t)+(4===Y_(t).getDay()),e,2)}function px(t){return t.getDay()}function gx(t,e){return Dw(k_.count(Y_(t)-1,t),e,2)}function yx(t,e){return Dw(t.getFullYear()%100,e,2)}function mx(t,e){return Dw((t=dx(t)).getFullYear()%100,e,2)}function vx(t,e){return Dw(t.getFullYear()%1e4,e,4)}function bx(t,e){var n=t.getDay();return Dw((t=n>=4||0===n?E_(t):E_.ceil(t)).getFullYear()%1e4,e,4)}function _x(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Dw(e/60|0,"0",2)+Dw(e%60,"0",2)}function wx(t,e){return Dw(t.getUTCDate(),e,2)}function xx(t,e){return Dw(t.getUTCHours(),e,2)}function kx(t,e){return Dw(t.getUTCHours()%12||12,e,2)}function Cx(t,e){return Dw(1+X_.count(yw(t),t),e,3)}function Tx(t,e){return Dw(t.getUTCMilliseconds(),e,3)}function Ex(t,e){return Tx(t,e)+"000"}function Sx(t,e){return Dw(t.getUTCMonth()+1,e,2)}function Ox(t,e){return Dw(t.getUTCMinutes(),e,2)}function Ax(t,e){return Dw(t.getUTCSeconds(),e,2)}function Mx(t){var e=t.getUTCDay();return 0===e?7:e}function Dx(t,e){return Dw(K_.count(yw(t)-1,t),e,2)}function jx(t){var e=t.getUTCDay();return e>=4||0===e?nw(t):nw.ceil(t)}function Nx(t,e){return t=jx(t),Dw(nw.count(yw(t),t)+(4===yw(t).getUTCDay()),e,2)}function Bx(t){return t.getUTCDay()}function Lx(t,e){return Dw(J_.count(yw(t)-1,t),e,2)}function Rx(t,e){return Dw(t.getUTCFullYear()%100,e,2)}function Ix(t,e){return Dw((t=jx(t)).getUTCFullYear()%100,e,2)}function Fx(t,e){return Dw(t.getUTCFullYear()%1e4,e,4)}function Px(t,e){var n=t.getUTCDay();return Dw((t=n>=4||0===n?nw(t):nw.ceil(t)).getUTCFullYear()%1e4,e,4)}function Yx(){return"+0000"}function zx(){return"%"}function Ux(t){return+t}function $x(t){return Math.floor(+t/1e3)}function Wx(t){return xw=ww(t),kw=xw.format,Cw=xw.parse,Tw=xw.utcFormat,Ew=xw.utcParse,xw}Wx({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"]});var qx=Date.prototype.toISOString?function(t){return t.toISOString()}:Tw("%Y-%m-%dT%H:%M:%S.%LZ");var Hx=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Ew("%Y-%m-%dT%H:%M:%S.%LZ");function Vx(t){return new Date(t)}function Gx(t){return t instanceof Date?+t:+new Date(+t)}function Xx(t,e,n,r,i,a,o,s,c){var l=Fb(Db,Db),u=l.invert,h=l.domain,d=c(".%L"),f=c(":%S"),p=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),m=c("%b %d"),v=c("%B"),b=c("%Y"),_=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function w(s){return(o(s)<s?d:a(s)<s?f:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?y:m:t(s)<s?v:b)(s)}function x(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(r-n)/e,o=Oa((function(t){return t[2]})).right(_,a);o===_.length?(i=Ga(n/31536e6,r/31536e6,e),e=t):o?(i=(o=_[a/_[o-1][2]<_[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(Ga(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(u(t))},l.domain=function(t){return arguments.length?h(kb.call(t,Gx)):h().map(Vx)},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=x(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=x(t,n[0],n[n.length-1],e))?h(zb(n,t)):l},l.copy=function(){return Rb(l,Xx(t,e,n,r,i,a,o,s,c))},l}function Zx(){var t,e,n,r,i,a=0,o=1,s=Db,c=!1;function l(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return l.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),l):[a,o]},l.clamp=function(t){return arguments.length?(c=!!t,l):c},l.interpolator=function(t){return arguments.length?(s=t,l):s},l.unknown=function(t){return arguments.length?(i=t,l):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),l}}function Qx(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Kx(){var t=e_(Zx());return t.copy=function(){return Qx(t,Kx()).exponent(t.exponent())},wb.apply(t,arguments)}function Jx(){var t,e,n,r,i,a,o,s=0,c=.5,l=1,u=Db,h=!1;function d(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),u(h?Math.max(0,Math.min(1,t)):t))}return d.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(l=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),d):[s,c,l]},d.clamp=function(t){return arguments.length?(h=!!t,d):h},d.interpolator=function(t){return arguments.length?(u=t,d):u},d.unknown=function(t){return arguments.length?(o=t,d):o},function(o){return a=o,t=o(s),e=o(c),n=o(l),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),d}}function tk(){var t=e_(Jx());return t.copy=function(){return Qx(t,tk()).exponent(t.exponent())},wb.apply(t,arguments)}function ek(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}var nk=ek("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),rk=ek("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),ik=ek("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),ak=ek("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),ok=ek("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),sk=ek("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),ck=ek("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),lk=ek("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),uk=ek("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),hk=ek("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function dk(t){return al(t[t.length-1])}var fk=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ek),pk=dk(fk),gk=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ek),yk=dk(gk),mk=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ek),vk=dk(mk),bk=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ek),_k=dk(bk),wk=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ek),xk=dk(wk),kk=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ek),Ck=dk(kk),Tk=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ek),Ek=dk(Tk),Sk=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ek),Ok=dk(Sk),Ak=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ek),Mk=dk(Ak),Dk=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ek),jk=dk(Dk),Nk=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ek),Bk=dk(Nk),Lk=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ek),Rk=dk(Lk),Ik=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ek),Fk=dk(Ik),Pk=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ek),Yk=dk(Pk),zk=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ek),Uk=dk(zk),$k=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ek),Wk=dk($k),qk=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ek),Hk=dk(qk),Vk=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ek),Gk=dk(Vk),Xk=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ek),Zk=dk(Xk),Qk=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ek),Kk=dk(Qk),Jk=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ek),tC=dk(Jk),eC=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ek),nC=dk(eC),rC=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ek),iC=dk(rC),aC=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ek),oC=dk(aC),sC=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ek),cC=dk(sC),lC=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ek),uC=dk(lC),hC=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ek),dC=dk(hC);var fC=Pl(Vc(300,.5,0),Vc(-240,.5,1)),pC=Pl(Vc(-100,.75,.35),Vc(80,1.5,.8)),gC=Pl(Vc(260,.75,.35),Vc(80,1.5,.8)),yC=Vc();var mC=dc(),vC=Math.PI/3,bC=2*Math.PI/3;function _C(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var wC=_C(ek("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),xC=_C(ek("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),kC=_C(ek("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),CC=_C(ek("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function TC(t){return function(){return t}}var EC=Math.abs,SC=Math.atan2,OC=Math.cos,AC=Math.max,MC=Math.min,DC=Math.sin,jC=Math.sqrt,NC=Math.PI,BC=NC/2,LC=2*NC;function RC(t){return t>1?0:t<-1?NC:Math.acos(t)}function IC(t){return t>=1?BC:t<=-1?-BC:Math.asin(t)}function FC(t){return t.innerRadius}function PC(t){return t.outerRadius}function YC(t){return t.startAngle}function zC(t){return t.endAngle}function UC(t){return t&&t.padAngle}function $C(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,h=s-a,d=h*c-u*l;if(!(d*d<1e-12))return[t+(d=(u*(e-a)-h*(t-i))/d)*c,e+d*l]}function WC(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/jC(s*s+c*c),u=l*c,h=-l*s,d=t+u,f=e+h,p=n+u,g=r+h,y=(d+p)/2,m=(f+g)/2,v=p-d,b=g-f,_=v*v+b*b,w=i-a,x=d*g-p*f,k=(b<0?-1:1)*jC(AC(0,w*w*_-x*x)),C=(x*b-v*k)/_,T=(-x*v-b*k)/_,E=(x*b+v*k)/_,S=(-x*v+b*k)/_,O=C-y,A=T-m,M=E-y,D=S-m;return O*O+A*A>M*M+D*D&&(C=E,T=S),{cx:C,cy:T,x01:-u,y01:-h,x11:C*(i/w-1),y11:T*(i/w-1)}}function qC(t){this._context=t}function HC(t){return new qC(t)}function VC(t){return t[0]}function GC(t){return t[1]}function XC(){var t=VC,e=GC,n=TC(!0),r=null,i=HC,a=null;function o(o){var s,c,l,u=o.length,h=!1;for(null==r&&(a=i(l=Kh())),s=0;s<=u;++s)!(s<u&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(l)return a=null,l+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:TC(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:TC(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:TC(!!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}function ZC(){var t=VC,e=null,n=TC(0),r=GC,i=TC(!0),a=null,o=HC,s=null;function c(c){var l,u,h,d,f,p=c.length,g=!1,y=new Array(p),m=new Array(p);for(null==a&&(s=o(f=Kh())),l=0;l<=p;++l){if(!(l<p&&i(d=c[l],l,c))===g)if(g=!g)u=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=u;--h)s.point(y[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(y[l]=+t(d,l,c),m[l]=+n(d,l,c),s.point(e?+e(d,l,c):y[l],r?+r(d,l,c):m[l]))}if(f)return s=null,f+""||null}function l(){return XC().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:TC(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:TC(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:TC(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:TC(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:TC(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:TC(+t),c):r},c.lineX0=c.lineY0=function(){return l().x(t).y(n)},c.lineY1=function(){return l().x(t).y(r)},c.lineX1=function(){return l().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:TC(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function QC(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function KC(t){return t}qC.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 JC=eT(HC);function tT(t){this._curve=t}function eT(t){function e(e){return new tT(t(e))}return e._curve=t,e}function nT(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(eT(t)):e()._curve},t}function rT(){return nT(XC().curve(JC))}function iT(){var t=ZC().curve(JC),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 nT(n())},delete t.lineX0,t.lineEndAngle=function(){return nT(r())},delete t.lineX1,t.lineInnerRadius=function(){return nT(i())},delete t.lineY0,t.lineOuterRadius=function(){return nT(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(eT(t)):e()._curve},t}function aT(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}tT.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 oT=Array.prototype.slice;function sT(t){return t.source}function cT(t){return t.target}function lT(t){var e=sT,n=cT,r=VC,i=GC,a=null;function o(){var o,s=oT.call(arguments),c=e.apply(this,s),l=n.apply(this,s);if(a||(a=o=Kh()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,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:TC(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:TC(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function uT(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function hT(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function dT(t,e,n,r,i){var a=aT(e,n),o=aT(e,n=(n+i)/2),s=aT(r,n),c=aT(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}var fT={draw:function(t,e){var n=Math.sqrt(e/NC);t.moveTo(n,0),t.arc(0,0,n,0,LC)}},pT={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()}},gT=Math.sqrt(1/3),yT=2*gT,mT={draw:function(t,e){var n=Math.sqrt(e/yT),r=n*gT;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},vT=Math.sin(NC/10)/Math.sin(7*NC/10),bT=Math.sin(LC/10)*vT,_T=-Math.cos(LC/10)*vT,wT={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=bT*n,i=_T*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=LC*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},xT={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},kT=Math.sqrt(3),CT={draw:function(t,e){var n=-Math.sqrt(e/(3*kT));t.moveTo(0,2*n),t.lineTo(-kT*n,-n),t.lineTo(kT*n,-n),t.closePath()}},TT=-.5,ET=Math.sqrt(3)/2,ST=1/Math.sqrt(12),OT=3*(ST/2+1),AT={draw:function(t,e){var n=Math.sqrt(e/OT),r=n/2,i=n*ST,a=r,o=n*ST+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(TT*r-ET*i,ET*r+TT*i),t.lineTo(TT*a-ET*o,ET*a+TT*o),t.lineTo(TT*s-ET*c,ET*s+TT*c),t.lineTo(TT*r+ET*i,TT*i-ET*r),t.lineTo(TT*a+ET*o,TT*o-ET*a),t.lineTo(TT*s+ET*c,TT*c-ET*s),t.closePath()}},MT=[fT,pT,mT,xT,wT,CT,AT];function DT(){}function jT(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 NT(t){this._context=t}function BT(t){this._context=t}function LT(t){this._context=t}function RT(t,e){this._basis=new NT(t),this._beta=e}NT.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:jT(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:jT(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},BT.prototype={areaStart:DT,areaEnd:DT,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:jT(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},LT.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:jT(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},RT.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,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(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 IT=function t(e){function n(t){return 1===e?new NT(t):new RT(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function FT(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 PT(t,e){this._context=t,this._k=(1-e)/6}PT.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:FT(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:FT(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 YT=function t(e){function n(t){return new PT(t,e)}return n.tension=function(e){return t(+e)},n}(0);function zT(t,e){this._context=t,this._k=(1-e)/6}zT.prototype={areaStart:DT,areaEnd:DT,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:FT(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 UT=function t(e){function n(t){return new zT(t,e)}return n.tension=function(e){return t(+e)},n}(0);function $T(t,e){this._context=t,this._k=(1-e)/6}$T.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:FT(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 WT=function t(e){function n(t){return new $T(t,e)}return n.tension=function(e){return t(+e)},n}(0);function qT(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,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function HT(t,e){this._context=t,this._alpha=e}HT.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:qT(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 VT=function t(e){function n(t){return e?new HT(t,e):new PT(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function GT(t,e){this._context=t,this._alpha=e}GT.prototype={areaStart:DT,areaEnd:DT,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:qT(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 XT=function t(e){function n(t){return e?new GT(t,e):new zT(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ZT(t,e){this._context=t,this._alpha=e}ZT.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:qT(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 QT=function t(e){function n(t){return e?new ZT(t,e):new $T(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function KT(t){this._context=t}function JT(t){return t<0?-1:1}function tE(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(JT(a)+JT(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function eE(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nE(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 rE(t){this._context=t}function iE(t){this._context=new aE(t)}function aE(t){this._context=t}function oE(t){this._context=t}function sE(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]}function cE(t,e){this._context=t,this._t=e}function lE(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]}function uE(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function hE(t,e){return t[e]}function dE(t){var e=t.map(fE);return uE(t).sort((function(t,n){return e[t]-e[n]}))}function fE(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}function pE(t){var e=t.map(gE);return uE(t).sort((function(t,n){return e[t]-e[n]}))}function gE(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function yE(t){return function(){return t}}function mE(t){return t[0]}function vE(t){return t[1]}function bE(){this._=null}function _E(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function wE(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 xE(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 kE(t){for(;t.L;)t=t.L;return t}function CE(t,e,n,r){var i=[null,null],a=GE.push(i)-1;return i.left=t,i.right=e,n&&EE(i,t,e,n),r&&EE(i,e,t,r),HE[t.index].halfedges.push(a),HE[e.index].halfedges.push(a),i}function TE(t,e,n){var r=[e,n];return r.left=t,r}function EE(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 SE(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],l=o[1],u=0,h=1,d=s[0]-c,f=s[1]-l;if(a=e-c,d||!(a>0)){if(a/=d,d<0){if(a<u)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>u&&(u=a)}if(a=r-c,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>u&&(u=a)}else if(d>0){if(a<u)return;a<h&&(h=a)}if(a=n-l,f||!(a>0)){if(a/=f,f<0){if(a<u)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>u&&(u=a)}if(a=i-l,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a<u)return;a<h&&(h=a)}return!(u>0||h<1)||(u>0&&(t[0]=[c+u*d,l+u*f]),h<1&&(t[1]=[c+h*d,l+h*f]),!0)}}}}}function OE(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],l=t.left,u=t.right,h=l[0],d=l[1],f=u[0],p=u[1],g=(h+f)/2,y=(d+p)/2;if(p===d){if(g<e||g>=r)return;if(h>f){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]<n)return}else c=[g,i];a=[g,n]}}else if(s=y-(o=(h-f)/(p-d))*g,o<-1||o>1)if(h>f){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(d<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function AE(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 ME(t,e){return e[+(e.left!==t.site)]}function DE(t,e){return e[+(e.left===t.site)]}KT.prototype={areaStart:DT,areaEnd:DT,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))}},rE.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:nE(this,this._t0,eE(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,nE(this,eE(this,n=tE(this,t,e)),n);break;default:nE(this,this._t0,n=tE(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(iE.prototype=Object.create(rE.prototype)).point=function(t,e){rE.prototype.point.call(this,e,t)},aE.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)}},oE.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=sE(t),i=sE(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)}},cE.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}},bE.prototype={constructor:bE,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=kE(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&&(wE(this,n),n=(t=n).U),n.C=!1,r.C=!0,xE(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(xE(this,n),n=(t=n).U),n.C=!1,r.C=!0,wE(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?kE(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,wE(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,xE(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,wE(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,xE(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,wE(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,xE(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var jE,NE=[];function BE(){_E(this),this.x=this.y=this.arc=this.site=this.cy=null}function LE(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],c=r[0]-o,l=r[1]-s,u=a[0]-o,h=a[1]-s,d=2*(c*h-l*u);if(!(d>=-ZE)){var f=c*c+l*l,p=u*u+h*h,g=(h*f-l*p)/d,y=(c*p-u*f)/d,m=NE.pop()||new BE;m.arc=t,m.site=i,m.x=g+o,m.y=(m.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=m;for(var v=null,b=VE._;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}VE.insert(v,m),v||(jE=m)}}}}function RE(t){var e=t.circle;e&&(e.P||(jE=e.N),VE.remove(e),NE.push(e),_E(e),t.circle=null)}var IE=[];function FE(){_E(this),this.edge=this.site=this.circle=null}function PE(t){var e=IE.pop()||new FE;return e.site=t,e}function YE(t){RE(t),qE.remove(t),IE.push(t),_E(t)}function zE(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];YE(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<XE&&Math.abs(r-c.circle.cy)<XE;)a=c.P,s.unshift(c),YE(c),c=a;s.unshift(c),RE(c);for(var l=o;l.circle&&Math.abs(n-l.circle.x)<XE&&Math.abs(r-l.circle.cy)<XE;)o=l.N,s.push(l),YE(l),l=o;s.push(l),RE(l);var u,h=s.length;for(u=1;u<h;++u)l=s[u],c=s[u-1],EE(l.edge,c.site,l.site,i);c=s[0],(l=s[h-1]).edge=CE(c.site,l.site,null,i),LE(c),LE(l)}function UE(t){for(var e,n,r,i,a=t[0],o=t[1],s=qE._;s;)if((r=$E(s,o)-a)>XE)s=s.L;else{if(!((i=a-WE(s,o))>XE)){r>-XE?(e=s.P,n=s):i>-XE?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){HE[t.index]={site:t,halfedges:[]}}(t);var c=PE(t);if(qE.insert(e,c),e||n){if(e===n)return RE(e),n=PE(e.site),qE.insert(c,n),c.edge=n.edge=CE(e.site,c.site),LE(e),void LE(n);if(n){RE(e),RE(n);var l=e.site,u=l[0],h=l[1],d=t[0]-u,f=t[1]-h,p=n.site,g=p[0]-u,y=p[1]-h,m=2*(d*y-f*g),v=d*d+f*f,b=g*g+y*y,_=[(y*v-f*b)/m+u,(d*b-g*v)/m+h];EE(n.edge,l,p,_),c.edge=CE(l,t,null,_),n.edge=CE(t,p,null,_),LE(e),LE(n)}else c.edge=CE(e.site,c.site)}}function $E(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],c=n[1],l=c-e;if(!l)return s;var u=s-r,h=1/a-1/l,d=u/l;return h?(-d+Math.sqrt(d*d-2*h*(u*u/(-2*l)-c+l/2+i-a/2)))/h+r:(r+s)/2}function WE(t,e){var n=t.N;if(n)return $E(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var qE,HE,VE,GE,XE=1e-6,ZE=1e-12;function QE(t,e){return e[1]-t[1]||e[0]-t[0]}function KE(t,e){var n,r,i,a=t.sort(QE).pop();for(GE=[],HE=new Array(t.length),qE=new bE,VE=new bE;;)if(i=jE,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(UE(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;zE(i.arc)}if(function(){for(var t,e,n,r,i=0,a=HE.length;i<a;++i)if((t=HE[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]=AE(t,GE[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],c=+e[1][0],l=+e[1][1];!function(t,e,n,r){for(var i,a=GE.length;a--;)OE(i=GE[a],t,e,n,r)&&SE(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>XE||Math.abs(i[0][1]-i[1][1])>XE)||delete GE[a]}(o,s,c,l),function(t,e,n,r){var i,a,o,s,c,l,u,h,d,f,p,g,y=HE.length,m=!0;for(i=0;i<y;++i)if(a=HE[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)GE[c[s]]||c.splice(s,1);for(s=0,l=c.length;s<l;)p=(f=DE(a,GE[c[s]]))[0],g=f[1],h=(u=ME(a,GE[c[++s%l]]))[0],d=u[1],(Math.abs(p-h)>XE||Math.abs(g-d)>XE)&&(c.splice(s,0,GE.push(TE(o,f,Math.abs(p-t)<XE&&r-g>XE?[t,Math.abs(h-t)<XE?d:r]:Math.abs(g-r)<XE&&n-p>XE?[Math.abs(d-r)<XE?h:n,r]:Math.abs(p-n)<XE&&g-e>XE?[n,Math.abs(h-n)<XE?d:e]:Math.abs(g-e)<XE&&p-t>XE?[Math.abs(d-e)<XE?h:t,e]:null))-1),++l);l&&(m=!1)}if(m){var v,b,_,w=1/0;for(i=0,m=null;i<y;++i)(a=HE[i])&&(_=(v=(o=a.site)[0]-t)*v+(b=o[1]-e)*b)<w&&(w=_,m=a);if(m){var x=[t,e],k=[t,r],C=[n,r],T=[n,e];m.halfedges.push(GE.push(TE(o=m.site,x,k))-1,GE.push(TE(o,k,C))-1,GE.push(TE(o,C,T))-1,GE.push(TE(o,T,x))-1)}}for(i=0;i<y;++i)(a=HE[i])&&(a.halfedges.length||delete HE[i])}(o,s,c,l)}this.edges=GE,this.cells=HE,qE=VE=GE=HE=null}function JE(t){return function(){return t}}function tS(t,e,n){this.target=t,this.type=e,this.transform=n}function eS(t,e,n){this.k=t,this.x=e,this.y=n}KE.prototype={constructor:KE,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return ME(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,c,l,u=n.site,h=-1,d=e[i[a-1]],f=d.left===u?d.right:d.left;++h<a;)o=f,f=(d=e[i[h]]).left===u?d.right:d.left,o&&f&&r<o.index&&r<f.index&&(c=o,l=f,((s=u)[0]-l[0])*(c[1]-s[1])-(s[0]-c[0])*(l[1]-s[1])<0)&&t.push([u.data,o.data,f.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 c=t-i.site[0],l=e-i.site[1],u=c*c+l*l;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 c=t-s[0],l=e-s[1],h=c*c+l*l;h<u&&(u=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||u<=n*n?i.site:null}},eS.prototype={constructor:eS,scale:function(t){return 1===t?this:new eS(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eS(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 nS=new eS(1,0,0);function rS(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nS;return t.__zoom}function iS(){ps.stopImmediatePropagation()}function aS(){ps.preventDefault(),ps.stopImmediatePropagation()}function oS(){return!ps.ctrlKey&&!ps.button}function sS(){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 cS(){return this.__zoom||nS}function lS(){return-ps.deltaY*(1===ps.deltaMode?.05:ps.deltaMode?1:.002)}function uS(){return navigator.maxTouchPoints||"ontouchstart"in this}function hS(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))}rS.prototype=eS.prototype;var dS=ba(Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:"5.16.0",bisect:Ma,bisectRight:Ma,bisectLeft:Da,ascending:Sa,bisector:Oa,cross:function(t,e,n){var r,i,a,o,s=t.length,c=e.length,l=new Array(s*c);for(null==n&&(n=ja),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)l[a]=n(o,e[i]);return l},descending:function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},deviation:La,extent:Ra,histogram:function(){var t=za,e=Ra,n=Xa;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],u=c[1],h=n(s,l,u);Array.isArray(h)||(h=Ga(l,u,h),h=Ua(Math.ceil(l/h)*h,u,h));for(var d=h.length;h[0]<=l;)h.shift(),--d;for(;h[d-1]>u;)h.pop(),--d;var f,p=new Array(d+1);for(i=0;i<=d;++i)(f=p[i]=[]).x0=i>0?h[i-1]:l,f.x1=i<d?h[i]:u;for(i=0;i<o;++i)l<=(a=s[i])&&a<=u&&p[Ma(h,a,0,d)].push(r[i]);return p}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:Ya(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:Ya([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ya(Fa.call(t)):Ya(t),r):n},r},thresholdFreedmanDiaconis:function(t,e,n){return t=Pa.call(t,Na).sort(Sa),Math.ceil((n-e)/(2*(Za(t,.75)-Za(t,.25))*Math.pow(t.length,-1/3)))},thresholdScott:function(t,e,n){return Math.ceil((n-e)/(3.5*La(t)*Math.pow(t.length,-1/3)))},thresholdSturges:Xa,max:Qa,mean:function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=Na(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=Na(e(t[a],a,t)))?--i:o+=n;if(i)return o/i},median:function(t,e){var n,r=t.length,i=-1,a=[];if(null==e)for(;++i<r;)isNaN(n=Na(t[i]))||a.push(n);else for(;++i<r;)isNaN(n=Na(e(t[i],i,t)))||a.push(n);return Za(a.sort(Sa),.5)},merge:Ka,min:Ja,pairs:function(t,e){null==e&&(e=ja);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},permute:function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},quantile:Za,range:Ua,scan:function(t,e){if(n=t.length){var n,r,i=0,a=0,o=t[a];for(null==e&&(e=Sa);++i<n;)(e(r=t[i],o)<0||0!==e(o,o))&&(o=r,a=i);return 0===e(o,o)?a:void 0}},shuffle: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},sum: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},ticks:Ha,tickIncrement:Va,tickStep:Ga,transpose:to,variance:Ba,zip:function(){return to(arguments)},axisTop:function(t){return lo(1,t)},axisRight:function(t){return lo(2,t)},axisBottom:function(t){return lo(3,t)},axisLeft:function(t){return lo(4,t)},brush:function(){return Fh(Eh)},brushX:function(){return Fh(Ch)},brushY:function(){return Fh(Th)},brushSelection:function(t){var e=t.__brush;return e?e.dim.output(e.selection):null},chord:function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,l,u,h=i.length,d=[],f=Ua(h),p=[],g=[],y=g.groups=new Array(h),m=new Array(h*h);for(a=0,l=-1;++l<h;){for(o=0,u=-1;++u<h;)o+=i[l][u];d.push(o),p.push(Ua(h)),a+=o}for(e&&f.sort((function(t,n){return e(d[t],d[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Wh(0,$h-t*h)/a)?t:$h/h,o=0,l=-1;++l<h;){for(s=o,u=-1;++u<h;){var v=f[l],b=p[v][u],_=i[v][b],w=o,x=o+=_*a;m[b*h+v]={index:v,subindex:b,startAngle:w,endAngle:x,value:_}}y[v]={index:v,startAngle:s,endAngle:o,value:d[v]},o+=c}for(l=-1;++l<h;)for(u=l-1;++u<h;){var k=m[u*h+l],C=m[l*h+u];(k.value||C.value)&&g.push(k.value<C.value?{source:C,target:k}:{source:k,target:C})}return r?g.sort(r):g}return i.padAngle=function(e){return arguments.length?(t=Wh(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=qh(t))._=t,i):r&&r._},i},ribbon:function(){var t=Jh,e=td,n=ed,r=nd,i=rd,a=null;function o(){var o,s=Hh.call(arguments),c=t.apply(this,s),l=e.apply(this,s),u=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Uh,d=i.apply(this,s)-Uh,f=u*Ph(h),p=u*Yh(h),g=+n.apply(this,(s[0]=l,s)),y=r.apply(this,s)-Uh,m=i.apply(this,s)-Uh;if(a||(a=o=Kh()),a.moveTo(f,p),a.arc(0,0,u,h,d),h===y&&d===m||(a.quadraticCurveTo(0,0,g*Ph(y),g*Yh(y)),a.arc(0,0,g,y,m)),a.quadraticCurveTo(0,0,f,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Vh(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Vh(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Vh(+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},nest: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 c,l,u,h=-1,d=n.length,f=r[i++],p=ad(),g=o();++h<d;)(u=p.get(c=f(l=n[h])+""))?u.push(l):p.set(c,[l]);return p.each((function(t,e){s(g,e,a(t,i,o,s))})),g}function o(t,n){if(++n>r.length)return t;var a,s=i[n-1];return null!=e&&n>=r.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:o(t,n)})}))),null!=s?a.sort((function(t,e){return s(t.key,e.key)})):a}return n={object:function(t){return a(t,0,od,sd)},map:function(t){return a(t,0,cd,ld)},entries:function(t){return o(a(t,0,cd,ld),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}}},set:dd,map:ad,keys:function(t){var e=[];for(var n in t)e.push(n);return e},values:function(t){var e=[];for(var n in t)e.push(t[n]);return e},entries:function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},color:cc,rgb:dc,hsl:bc,lab:Oc,hcl:Lc,lch:function(t,e,n,r){return 1===arguments.length?Bc(t):new Rc(n,e,t,null==r?1:r)},gray:function(t,e){return new Ac(t,0,0,null==e?1:e)},cubehelix:Vc,contours:wd,contourDensity:function(){var t=Cd,e=Td,n=Ed,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,l=i+2*s>>o,u=gd(20);function h(r){var i=new Float32Array(c*l),h=new Float32Array(c*l);r.forEach((function(r,a,u){var h=+t(r,a,u)+s>>o,d=+e(r,a,u)+s>>o,f=+n(r,a,u);h>=0&&h<c&&d>=0&&d<l&&(i[h+d*c]+=f)})),xd({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),kd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),xd({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),kd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o),xd({width:c,height:l,data:i},{width:c,height:l,data:h},a>>o),kd({width:c,height:l,data:h},{width:c,height:l,data:i},a>>o);var f=u(i);if(!Array.isArray(f)){var p=Qa(i);f=Ga(0,p,f),(f=Ua(0,Math.floor(p/f)*f,f)).shift()}return wd().thresholds(f).size([c,l])(i).map(d)}function d(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(f),t}function f(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,l=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:gd(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:gd(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:gd(+t),h):n},h.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,y()},h.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),y()},h.thresholds=function(t){return arguments.length?(u="function"==typeof t?t:Array.isArray(t)?gd(fd.call(t)):gd(t),h):u},h.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),y()},h},dispatch:ho,drag:function(){var t,e,n,r,i=zs,a=Us,o=$s,s=Ws,c={},l=ho("start","drag","end"),u=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",y).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 f(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Ns,this,arguments);o&&(Ss(ps.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Is(ps.view),Ls(),n=!1,t=ps.clientX,e=ps.clientY,o("start"))}}function p(){if(Rs(),!n){var r=ps.clientX-t,i=ps.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function g(){Ss(ps.view).on("mousemove.drag mouseup.drag",null),Fs(ps.view,n),Rs(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=ps.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Bs,this,arguments))&&(Ls(),e("start"))}}function m(){var t,e,n=ps.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Rs(),e("drag"))}function v(){var t,e,n=ps.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(Ls(),e("end"))}function b(t,e,n,r,i){var a,s,h,f=n(e,t),p=l.copy();if(_s(new Ys(d,"beforestart",a,t,u,f[0],f[1],0,0,p),(function(){return null!=(ps.subject=a=o.apply(r,i))&&(s=a.x-f[0]||0,h=a.y-f[1]||0,!0)})))return function o(l){var g,y=f;switch(l){case"start":c[t]=o,g=u++;break;case"end":delete c[t],--u;case"drag":f=n(e,t),g=u}_s(new Ys(d,l,a,t,g,f[0]+s,f[1]+h,f[0]-y[0],f[1]-y[1],p),p.apply,p,[l,r,i])}}return d.filter=function(t){return arguments.length?(i="function"==typeof t?t:Ps(!!t),d):i},d.container=function(t){return arguments.length?(a="function"==typeof t?t:Ps(t),d):a},d.subject=function(t){return arguments.length?(o="function"==typeof t?t:Ps(t),d):o},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ps(!!t),d):s},d.on=function(){var t=l.on.apply(l,arguments);return t===l?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d},dragDisable:Is,dragEnable:Fs,dsvFormat:Nd,csvParse:Ld,csvParseRows:Rd,csvFormat:Id,csvFormatBody:Fd,csvFormatRows:Pd,csvFormatRow:Yd,csvFormatValue:zd,tsvParse:$d,tsvParseRows:Wd,tsvFormat:qd,tsvFormatBody:Hd,tsvFormatRows:Vd,tsvFormatRow:Gd,tsvFormatValue:Xd,autoType:function(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;Zd&&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},easeLinear:function(t){return+t},easeQuad:$u,easeQuadIn:function(t){return t*t},easeQuadOut:function(t){return t*(2-t)},easeQuadInOut:$u,easeCubic:Wu,easeCubicIn:function(t){return t*t*t},easeCubicOut:function(t){return--t*t*t+1},easeCubicInOut:Wu,easePoly:Vu,easePolyIn:qu,easePolyOut:Hu,easePolyInOut:Vu,easeSin:Zu,easeSinIn:function(t){return 1==+t?1:1-Math.cos(t*Xu)},easeSinOut:function(t){return Math.sin(t*Xu)},easeSinInOut:Zu,easeExp:Ku,easeExpIn:function(t){return Qu(1-+t)},easeExpOut:function(t){return 1-Qu(t)},easeExpInOut:Ku,easeCircle:Ju,easeCircleIn:function(t){return 1-Math.sqrt(1-t*t)},easeCircleOut:function(t){return Math.sqrt(1- --t*t)},easeCircleInOut:Ju,easeBounce:nh,easeBounceIn:function(t){return 1-nh(1-t)},easeBounceOut:nh,easeBounceInOut:function(t){return((t*=2)<=1?1-nh(1-t):nh(t-1)+1)/2},easeBack:ah,easeBackIn:rh,easeBackOut:ih,easeBackInOut:ah,easeElastic:ch,easeElasticIn:sh,easeElasticOut:ch,easeElasticInOut:lh,blob:function(t,e){return fetch(t,e).then(Qd)},buffer:function(t,e){return fetch(t,e).then(Kd)},dsv:function(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=Nd(t);return tf(e,n).then((function(t){return i.parse(t,r)}))},csv:nf,tsv:rf,image: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}))},json:function(t,e){return fetch(t,e).then(af)},text:tf,xml:sf,html:cf,svg:lf,forceCenter: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},forceCollide:function(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,l,u,h,d=e.length,f=0;f<i;++f)for(a=yf(e,_f,wf).visitAfter(o),t=0;t<d;++t)s=e[t],u=n[s.index],h=u*u,c=s.x+s.vx,l=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,d=t.r,f=u+d;if(!o)return e>c+f||i<c-f||n>l+f||a<l-f;if(o.index>s.index){var p=c-o.x-o.vx,g=l-o.y-o.vy,y=p*p+g*g;y<f*f&&(0===p&&(y+=(p=hf())*p),0===g&&(y+=(g=hf())*g),y=(f-(y=Math.sqrt(y)))/y*r,s.vx+=(p*=y)*(f=(d*=d)/(h+d)),s.vy+=(g*=y)*f,o.vx-=p*(f=1-f),o.vy-=g*f)}}}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=uf(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:uf(+e),s(),a):t},a},forceLink:function(t){var e,n,r,i,a,o=xf,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=uf(30),l=1;function u(r){for(var i=0,o=t.length;i<l;++i)for(var s,c,u,h,d,f,p,g=0;g<o;++g)c=(s=t[g]).source,h=(u=s.target).x+u.vx-c.x-c.vx||hf(),d=u.y+u.vy-c.y-c.vy||hf(),h*=f=((f=Math.sqrt(h*h+d*d))-n[g])/f*r*e[g],d*=f,u.vx-=h*(p=a[g]),u.vy-=d*p,c.vx+=h*(p=1-p),c.vy+=d*p}function h(){if(r){var s,c,l=r.length,u=t.length,h=ad(r,o);for(s=0,i=new Array(l);s<u;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=kf(h,c.source)),"object"!=typeof c.target&&(c.target=kf(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(u);s<u;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(u),d(),n=new Array(u),f()}}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function f(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),u.initialize=function(t){r=t,h()},u.links=function(e){return arguments.length?(t=e,h(),u):t},u.id=function(t){return arguments.length?(o=t,u):o},u.iterations=function(t){return arguments.length?(l=+t,u):l},u.strength=function(t){return arguments.length?(s="function"==typeof t?t:uf(+t),d(),u):s},u.distance=function(t){return arguments.length?(c="function"==typeof t?t:uf(+t),f(),u):c},u},forceManyBody:function(){var t,e,n,r,i=uf(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=yf(t,Cf,Tf).visitAfter(u);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function l(){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 u(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}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 h(t,i,c,l){if(!t.value)return!0;var u=t.x-e.x,h=t.y-e.y,d=l-i,f=u*u+h*h;if(d*d/s<f)return f<o&&(0===u&&(f+=(u=hf())*u),0===h&&(f+=(h=hf())*h),f<a&&(f=Math.sqrt(a*f)),e.vx+=u*t.value*n/f,e.vy+=h*t.value*n/f),!0;if(!(t.length||f>=o)){(t.data!==e||t.next)&&(0===u&&(f+=(u=hf())*u),0===h&&(f+=(h=hf())*h),f<a&&(f=Math.sqrt(a*f)));do{t.data!==e&&(d=r[t.data.index]*n/f,e.vx+=u*d,e.vy+=h*d)}while(t=t.next)}}return c.initialize=function(e){t=e,l()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:uf(+t),l(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c},forceRadial:function(t,e,n){var r,i,a,o=uf(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],l=c.x-e||1e-6,u=c.y-n||1e-6,h=Math.sqrt(l*l+u*u),d=(a[o]-h)*i[o]*t/h;c.vx+=l*d,c.vy+=u*d}}function c(){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=uf(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:uf(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:uf(+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},forceSimulation:function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=ad(),c=Jl(u),l=ho("tick","end");function u(){h(),l.call("tick",e),n<r&&(c.stop(),l.call("end",e))}function h(r){var c,l,u=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<u;++c)null==(l=t[c]).fx?l.x+=l.vx*=o:(l.x=l.fx,l.vx=0),null==l.fy?l.y+=l.vy*=o:(l.y=l.fy,l.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),a=n*Ef;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function f(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),d(),e={tick:h,restart:function(){return c.restart(u),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),s.each(f),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,f(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,l=0,u=t.length;for(null==r?r=1/0:r*=r,l=0;l<u;++l)(o=(i=e-(s=t[l]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(l.on(t,n),e):l.on(t)}}},forceX:function(t){var e,n,r,i=uf(.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=uf(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:uf(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:uf(+e),o(),a):t},a},forceY:function(t){var e,n,r,i=uf(.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=uf(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:uf(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:uf(+e),o(),a):t},a},formatDefaultLocale:Uf,get format(){return If},get formatPrefix(){return Ff},formatLocale:zf,formatSpecifier:Df,FormatSpecifier:jf,precisionFixed:$f,precisionPrefix:Wf,precisionRound:qf,geoArea:function(t){return Mp.reset(),kp(t,Dp),2*Mp},geoBounds:function(t){var e,n,r,i,a,o,s;if(Hp=qp=-($p=Wp=1/0),Qp=[],kp(t,yg),n=Qp.length){for(Qp.sort(Tg),e=1,a=[r=Qp[0]];e<n;++e)Eg(r,(i=Qp[e])[0])||Eg(r,i[1])?(Cg(r[0],i[1])>Cg(r[0],r[1])&&(r[1]=i[1]),Cg(i[0],r[1])>Cg(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=Cg(r[1],i[0]))>o&&(o=s,$p=i[0],qp=r[1])}return Qp=Kp=null,$p===1/0||Wp===1/0?[[NaN,NaN],[NaN,NaN]]:[[$p,Wp],[qp,Hp]]},geoCentroid:function(t){Jp=tg=eg=ng=rg=ig=ag=og=sg=cg=lg=0,kp(t,Sg);var e=sg,n=cg,r=lg,i=e*e+n*n+r*r;return i<1e-12&&(e=ig,n=ag,r=og,tg<1e-6&&(e=eg,n=ng,r=rg),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[ip(n,e)*tp,gp(r/dp(i))*tp]},geoCircle:function(){var t,e,n=Fg([0,0]),r=Fg(90),i=Fg(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=tp,n[1]*=tp}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*ep,c=i.apply(this,arguments)*ep;return t=[],e=zg(-o[0]*ep,-o[1]*ep,0).invert,Hg(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:Fg([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:Fg(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:Fg(+t),o):i},o},geoClipAntimeridian:ay,geoClipCircle:oy,geoClipExtent:function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=sy(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]]}}},geoClipRectangle:sy,geoContains:function(t,e){return(t&&_y.hasOwnProperty(t.type)?_y[t.type]:xy)(t,e)},geoDistance:by,geoGraticule:My,geoGraticule10:function(){return My()()},geoInterpolate:function(t,e){var n=t[0]*ep,r=t[1]*ep,i=e[0]*ep,a=e[1]*ep,o=ap(r),s=up(r),c=ap(a),l=up(a),u=o*ap(n),h=o*up(n),d=c*ap(i),f=c*up(i),p=2*gp(dp(yp(a-r)+o*c*yp(i-n))),g=up(p),y=p?function(t){var e=up(t*=p)/g,n=up(p-t)/g,r=n*u+e*d,i=n*h+e*f,a=n*s+e*l;return[ip(i,r)*tp,ip(a,dp(r*r+i*i))*tp]}:function(){return[n*tp,r*tp]};return y.distance=p,y},geoLength:yy,geoPath:function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),kp(t,n(r))),r.result()}return a.area=function(t){return kp(t,n($y)),$y.result()},a.measure=function(t){return kp(t,n(Am)),Am.result()},a.bounds=function(t){return kp(t,n(Ky)),Ky.result()},a.centroid=function(t){return kp(t,n(vm)),vm.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Dy):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new Mm):new bm(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)},geoAlbers:Xm,geoAlbersUsa:function(){var t,e,n,r,i,a,o=Xm(),s=Gm().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Gm().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){a=[t,e]}};function u(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 h(){return t=e=null,u}return u.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?c:o).invert(t)},u.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.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},u.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),u.translate(o.translate())):o.scale()},u.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],u=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,u-.238*e],[a+.455*e,u+.238*e]]).stream(l),r=s.translate([a-.307*e,u+.201*e]).clipExtent([[a-.425*e+1e-6,u+.12*e+1e-6],[a-.214*e-1e-6,u+.234*e-1e-6]]).stream(l),i=c.translate([a-.205*e,u+.212*e]).clipExtent([[a-.214*e+1e-6,u+.166*e+1e-6],[a-.115*e-1e-6,u+.234*e-1e-6]]).stream(l),h()},u.fitExtent=function(t,e){return Lm(u,t,e)},u.fitSize=function(t,e){return Rm(u,t,e)},u.fitWidth=function(t,e){return Im(u,t,e)},u.fitHeight=function(t,e){return Fm(u,t,e)},u.scale(1070)},geoAzimuthalEqualArea:function(){return Wm(Km).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Km,geoAzimuthalEquidistant:function(){return Wm(Jm).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Jm,geoConicConformal:function(){return Hm(rv).scale(109.5).parallels([30,30])},geoConicConformalRaw:rv,geoConicEqualArea:Gm,geoConicEqualAreaRaw:Vm,geoConicEquidistant:function(){return Hm(av).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:av,geoEqualEarth:function(){return Wm(hv).scale(177.158)},geoEqualEarthRaw:hv,geoEquirectangular:function(){return Wm(iv).scale(152.63)},geoEquirectangularRaw:iv,geoGnomonic:function(){return Wm(dv).scale(144.049).clipAngle(60)},geoGnomonicRaw:dv,geoIdentity:function(){var t,e,n,r,i,a,o,s=1,c=0,l=0,u=1,h=1,d=0,f=null,p=1,g=1,y=jm({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),m=Dy;function v(){return p=s*u,g=s*h,a=o=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(d){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+c,i+l]}return b.invert=function(n){var r=n[0]-c,i=n[1]-l;if(d){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/g]},b.stream=function(t){return a&&o===t?a:a=y(m(o=t))},b.postclip=function(t){return arguments.length?(m=t,f=n=r=i=null,v()):m},b.clipExtent=function(t){return arguments.length?(m=null==t?(f=n=r=i=null,Dy):sy(f=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==f?null:[[f,n],[r,i]]},b.scale=function(t){return arguments.length?(s=+t,v()):s},b.translate=function(t){return arguments.length?(c=+t[0],l=+t[1],v()):[c,l]},b.angle=function(n){return arguments.length?(e=up(d=n%360*ep),t=ap(d),v()):d*tp},b.reflectX=function(t){return arguments.length?(u=t?-1:1,v()):u<0},b.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},b.fitExtent=function(t,e){return Lm(b,t,e)},b.fitSize=function(t,e){return Rm(b,t,e)},b.fitWidth=function(t,e){return Im(b,t,e)},b.fitHeight=function(t,e){return Fm(b,t,e)},b},geoProjection:Wm,geoProjectionMutator:qm,geoMercator:function(){return ev(tv).scale(961/Jf)},geoMercatorRaw:tv,geoNaturalEarth1:function(){return Wm(fv).scale(175.295)},geoNaturalEarth1Raw:fv,geoOrthographic:function(){return Wm(pv).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:pv,geoStereographic:function(){return Wm(gv).scale(250).clipAngle(142)},geoStereographicRaw:gv,geoTransverseMercator:function(){var t=ev(yv),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)},geoTransverseMercatorRaw:yv,geoRotation:qg,geoStream:kp,geoTransform:function(t){return{stream:jm(t)}},cluster:function(){var t=mv,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(vv,0)/t.length}(n),e.y=function(t){return 1+t.reduce(bv,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),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,c)/2,u=c.x+t(c,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-l)/(u-l)*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},hierarchy:wv,pack:function(){var t=null,e=1,n=1,r=Uv;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(qv(t)).eachAfter(Hv(r,.5)).eachBefore(Vv(1)):i.eachBefore(qv(Wv)).eachAfter(Hv(Uv,1)).eachAfter(Hv(r,i.r/Math.min(e,n))).eachBefore(Vv(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Yv(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:$v(+t),i):r},i},packSiblings:function(t){return Pv(t),t},packEnclose:Sv,partition: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&&Xv(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(Gv),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},stratify:function(){var t=Kv,e=Jv;function n(n){var r,i,a,o,s,c,l,u=n.length,h=new Array(u),d={};for(i=0;i<u;++i)r=n[i],s=h[i]=new Tv(r),null!=(c=t(r,i,n))&&(c+="")&&(d[l="$"+(s.id=c)]=l in d?Qv:s);for(i=0;i<u;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=d["$"+c]))throw new Error("missing: "+c);if(o===Qv)throw new Error("ambiguous: "+c);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=Zv,a.eachBefore((function(t){t.depth=t.parent.depth+1,--u})).eachBefore(Cv),a.parent=null,u>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=zv(e),n):t},n.parentId=function(t){return arguments.length?(e=zv(t),n):e},n},tree:function(){var t=tb,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new ab(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 ab(r[i],i)),n.parent=e;return(o.parent=new ab(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var l=i,u=i,h=i;i.eachBefore((function(t){t.x<l.x&&(l=t),t.x>u.x&&(u=t),t.depth>h.depth&&(h=t)}));var d=l===u?1:t(l,u)/2,f=d-l.x,p=e/(u.x+d+f),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*g}))}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,c=a.parent.children[0],l=a.m,u=o.m,h=s.m,d=c.m;s=nb(s),a=eb(a),s&&a;)c=eb(c),(o=nb(o)).a=e,(i=s.z+h-a.z-l+t(s._,a._))>0&&(rb(ib(s,e,r),e,i),l+=i,u+=i),h+=s.m,l+=a.m,d+=c.m,u+=o.m;s&&!nb(o)&&(o.t=s,o.m+=h-u),a&&!eb(c)&&(c.t=a,c.m+=l-d,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},treemap:function(){var t=lb,e=!1,n=1,r=1,i=[0],a=Uv,o=Uv,s=Uv,c=Uv,l=Uv;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Gv),t}function h(e){var n=i[e.depth],r=e.x0+n,u=e.y0+n,h=e.x1-n,d=e.y1-n;h<r&&(r=h=(r+h)/2),d<u&&(u=d=(u+d)/2),e.x0=r,e.y0=u,e.x1=h,e.y1=d,e.children&&(n=i[e.depth+1]=a(e)/2,r+=l(e)-n,u+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(d-=c(e)-n)<u&&(u=d=(u+d)/2),t(e,r,u,h,d))}return u.round=function(t){return arguments.length?(e=!!t,u):e},u.size=function(t){return arguments.length?(n=+t[0],r=+t[1],u):[n,r]},u.tile=function(e){return arguments.length?(t=zv(e),u):t},u.padding=function(t){return arguments.length?u.paddingInner(t).paddingOuter(t):u.paddingInner()},u.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:$v(+t),u):a},u.paddingOuter=function(t){return arguments.length?u.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):u.paddingTop()},u.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:$v(+t),u):o},u.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:$v(+t),u):s},u.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:$v(+t),u):c},u.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:$v(+t),u):l},u},treemapBinary:function(t,e,n,r,i){var a,o,s=t.children,c=s.length,l=new Array(c+1);for(l[0]=o=a=0;a<c;++a)l[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=c)}var h=l[e],d=r/2+h,f=e+1,p=n-1;for(;f<p;){var g=f+p>>>1;l[g]<d?f=g+1:p=g}d-l[f-1]<l[f]-d&&e+1<f&&--f;var y=l[f]-h,m=r-y;if(o-i>c-a){var v=(i*m+o*y)/r;t(e,f,y,i,a,v,c),t(f,n,m,v,a,o,c)}else{var b=(a*m+c*y)/r;t(e,f,y,i,a,o,b),t(f,n,m,i,b,o,c)}}(0,c,t.value,e,n,r,i)},treemapDice:Xv,treemapSlice:ob,treemapSliceDice:function(t,e,n,r,i){(1&t.depth?ob:Xv)(t,e,n,r,i)},treemapSquarify:lb,treemapResquarify:ub,interpolate:yl,interpolateArray:function(t,e){return(cl(e)?sl:ll)(t,e)},interpolateBasis:Zc,interpolateBasisClosed:Qc,interpolateDate:ul,interpolateDiscrete:function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},interpolateHue:function(t,e){var n=tl(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},interpolateNumber:hl,interpolateNumberArray:sl,interpolateObject:dl,interpolateRound:ml,interpolateString:gl,interpolateTransformCss:El,interpolateTransformSvg:Sl,interpolateZoom:Ml,interpolateRgb:rl,interpolateRgbBasis:al,interpolateRgbBasisClosed:ol,interpolateHsl:jl,interpolateHslLong:Nl,interpolateLab:function(t,e){var n=nl((t=Oc(t)).l,(e=Oc(e)).l),r=nl(t.a,e.a),i=nl(t.b,e.b),a=nl(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+""}},interpolateHcl:Ll,interpolateHclLong:Rl,interpolateCubehelix:Fl,interpolateCubehelixLong:Pl,piecewise:function(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)}},quantize:function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},path:Kh,polygonArea: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},polygonCentroid:function(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]},polygonHull: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(hb),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=db(r),o=db(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],l=[];for(e=a.length-1;e>=0;--e)l.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)l.push(t[r[o[e]][2]]);return l},polygonContains:function(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],l=a[1],u=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=l>s&&o<(c-n)*(s-r)/(l-r)+n&&(u=!u),c=n,l=r;return u},polygonLength:function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c},quadtree:yf,randomUniform:pb,randomNormal:gb,randomLogNormal:yb,randomBates:vb,randomIrwinHall:mb,randomExponential:bb,scaleBand:Sb,scalePoint:function(){return Ob(Sb.apply(null,arguments).paddingInner(1))},scaleIdentity:function t(e){var n;function r(t){return isNaN(t=+t)?n:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(e=kb.call(t,Ab),r):e.slice()},r.unknown=function(t){return arguments.length?(n=t,r):n},r.copy=function(){return t(e).unknown(n)},e=arguments.length?kb.call(e,Ab):[0,1],Yb(r)},scaleLinear:function t(){var e=Fb(Db,Db);return e.copy=function(){return Rb(e,t())},_b.apply(e,arguments),Yb(e)},scaleLog:function t(){var e=Gb(Ib()).domain([1,10]);return e.copy=function(){return Rb(e,t()).base(e.base())},_b.apply(e,arguments),e},scaleSymlog:function t(){var e=Qb(Ib());return e.copy=function(){return Rb(e,t()).constant(e.constant())},_b.apply(e,arguments)},scaleOrdinal:Eb,scaleImplicit:Tb,scalePow:n_,scaleSqrt:function(){return n_.apply(null,arguments).exponent(.5)},scaleQuantile:function t(){var e,n=[],r=[],i=[];function a(){var t=0,e=Math.max(1,r.length);for(i=new Array(e-1);++t<e;)i[t-1]=Za(n,t/e);return o}function o(t){return isNaN(t=+t)?e:r[Ma(i,t)]}return o.invertExtent=function(t){var e=r.indexOf(t);return e<0?[NaN,NaN]:[e>0?i[e-1]:n[0],e<i.length?i[e]:n[n.length-1]]},o.domain=function(t){if(!arguments.length)return n.slice();n=[];for(var e,r=0,i=t.length;r<i;++r)null==(e=t[r])||isNaN(e=+e)||n.push(e);return n.sort(Sa),a()},o.range=function(t){return arguments.length?(r=Cb.call(t),a()):r.slice()},o.unknown=function(t){return arguments.length?(e=t,o):e},o.quantiles=function(){return i.slice()},o.copy=function(){return t().domain(n).range(r).unknown(e)},_b.apply(o,arguments)},scaleQuantize:function t(){var e,n=0,r=1,i=1,a=[.5],o=[0,1];function s(t){return t<=t?o[Ma(a,t,0,i)]:e}function c(){var t=-1;for(a=new Array(i);++t<i;)a[t]=((t+1)*r-(t-i)*n)/(i+1);return s}return s.domain=function(t){return arguments.length?(n=+t[0],r=+t[1],c()):[n,r]},s.range=function(t){return arguments.length?(i=(o=Cb.call(t)).length-1,c()):o.slice()},s.invertExtent=function(t){var e=o.indexOf(t);return e<0?[NaN,NaN]:e<1?[n,a[0]]:e>=i?[a[i-1],r]:[a[e-1],a[e]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return t().domain([n,r]).range(o).unknown(e)},_b.apply(Yb(s),arguments)},scaleThreshold:function t(){var e,n=[.5],r=[0,1],i=1;function a(t){return t<=t?r[Ma(n,t,0,i)]:e}return a.domain=function(t){return arguments.length?(n=Cb.call(t),i=Math.min(n.length,r.length-1),a):n.slice()},a.range=function(t){return arguments.length?(r=Cb.call(t),i=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},a.unknown=function(t){return arguments.length?(e=t,a):e},a.copy=function(){return t().domain(n).range(r).unknown(e)},_b.apply(a,arguments)},scaleTime:function(){return _b.apply(Xx(Y_,I_,x_,b_,y_,f_,u_,s_,kw).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return _b.apply(Xx(yw,fw,K_,X_,H_,$_,u_,s_,Tw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},scaleSequential:function t(){var e=Yb(Zx()(Db));return e.copy=function(){return Qx(e,t())},wb.apply(e,arguments)},scaleSequentialLog:function t(){var e=Gb(Zx()).domain([1,10]);return e.copy=function(){return Qx(e,t()).base(e.base())},wb.apply(e,arguments)},scaleSequentialPow:Kx,scaleSequentialSqrt:function(){return Kx.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function t(){var e=Qb(Zx());return e.copy=function(){return Qx(e,t()).constant(e.constant())},wb.apply(e,arguments)},scaleSequentialQuantile:function t(){var e=[],n=Db;function r(t){if(!isNaN(t=+t))return n((Ma(e,t)-1)/(e.length-1))}return r.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,a=t.length;i<a;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(Sa),r},r.interpolator=function(t){return arguments.length?(n=t,r):n},r.copy=function(){return t(n).domain(e)},wb.apply(r,arguments)},scaleDiverging:function t(){var e=Yb(Jx()(Db));return e.copy=function(){return Qx(e,t())},wb.apply(e,arguments)},scaleDivergingLog:function t(){var e=Gb(Jx()).domain([.1,1,10]);return e.copy=function(){return Qx(e,t()).base(e.base())},wb.apply(e,arguments)},scaleDivergingPow:tk,scaleDivergingSqrt:function(){return tk.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function t(){var e=Qb(Jx());return e.copy=function(){return Qx(e,t()).constant(e.constant())},wb.apply(e,arguments)},tickFormat:Pb,schemeCategory10:nk,schemeAccent:rk,schemeDark2:ik,schemePaired:ak,schemePastel1:ok,schemePastel2:sk,schemeSet1:ck,schemeSet2:lk,schemeSet3:uk,schemeTableau10:hk,interpolateBrBG:pk,schemeBrBG:fk,interpolatePRGn:yk,schemePRGn:gk,interpolatePiYG:vk,schemePiYG:mk,interpolatePuOr:_k,schemePuOr:bk,interpolateRdBu:xk,schemeRdBu:wk,interpolateRdGy:Ck,schemeRdGy:kk,interpolateRdYlBu:Ek,schemeRdYlBu:Tk,interpolateRdYlGn:Ok,schemeRdYlGn:Sk,interpolateSpectral:Mk,schemeSpectral:Ak,interpolateBuGn:jk,schemeBuGn:Dk,interpolateBuPu:Bk,schemeBuPu:Nk,interpolateGnBu:Rk,schemeGnBu:Lk,interpolateOrRd:Fk,schemeOrRd:Ik,interpolatePuBuGn:Yk,schemePuBuGn:Pk,interpolatePuBu:Uk,schemePuBu:zk,interpolatePuRd:Wk,schemePuRd:$k,interpolateRdPu:Hk,schemeRdPu:qk,interpolateYlGnBu:Gk,schemeYlGnBu:Vk,interpolateYlGn:Zk,schemeYlGn:Xk,interpolateYlOrBr:Kk,schemeYlOrBr:Qk,interpolateYlOrRd:tC,schemeYlOrRd:Jk,interpolateBlues:nC,schemeBlues:eC,interpolateGreens:iC,schemeGreens:rC,interpolateGreys:oC,schemeGreys:aC,interpolatePurples:cC,schemePurples:sC,interpolateReds:uC,schemeReds:lC,interpolateOranges:dC,schemeOranges:hC,interpolateCividis: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)))))))+")"},interpolateCubehelixDefault:fC,interpolateRainbow:function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return yC.h=360*t-100,yC.s=1.5-1.5*e,yC.l=.8-.9*e,yC+""},interpolateWarm:pC,interpolateCool:gC,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,mC.r=255*(e=Math.sin(t))*e,mC.g=255*(e=Math.sin(t+vC))*e,mC.b=255*(e=Math.sin(t+bC))*e,mC+""},interpolateTurbo: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)))))))+")"},interpolateViridis:wC,interpolateMagma:xC,interpolateInferno:kC,interpolatePlasma:CC,create:function(t){return Ss(xo(t).call(document.documentElement))},creator:xo,local:As,matcher:So,mouse:Ns,namespace:bo,namespaces:vo,clientPoint:js,select:Ss,selectAll:function(t){return"string"==typeof t?new Ts([document.querySelectorAll(t)],[document.documentElement]):new Ts([null==t?[]:t],Cs)},selection:Es,selector:Co,selectorAll:Eo,style:$o,touch:Bs,touches:function(t,e){null==e&&(e=Ds().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=js(t,e[n]);return i},window:Po,get event(){return ps},customEvent:_s,arc:function(){var t=FC,e=PC,n=TC(0),r=null,i=YC,a=zC,o=UC,s=null;function c(){var c,l,u=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-BC,f=a.apply(this,arguments)-BC,p=EC(f-d),g=f>d;if(s||(s=c=Kh()),h<u&&(l=h,h=u,u=l),h>1e-12)if(p>LC-1e-12)s.moveTo(h*OC(d),h*DC(d)),s.arc(0,0,h,d,f,!g),u>1e-12&&(s.moveTo(u*OC(f),u*DC(f)),s.arc(0,0,u,f,d,g));else{var y,m,v=d,b=f,_=d,w=f,x=p,k=p,C=o.apply(this,arguments)/2,T=C>1e-12&&(r?+r.apply(this,arguments):jC(u*u+h*h)),E=MC(EC(h-u)/2,+n.apply(this,arguments)),S=E,O=E;if(T>1e-12){var A=IC(T/u*DC(C)),M=IC(T/h*DC(C));(x-=2*A)>1e-12?(_+=A*=g?1:-1,w-=A):(x=0,_=w=(d+f)/2),(k-=2*M)>1e-12?(v+=M*=g?1:-1,b-=M):(k=0,v=b=(d+f)/2)}var D=h*OC(v),j=h*DC(v),N=u*OC(w),B=u*DC(w);if(E>1e-12){var L,R=h*OC(b),I=h*DC(b),F=u*OC(_),P=u*DC(_);if(p<NC&&(L=$C(D,j,F,P,R,I,N,B))){var Y=D-L[0],z=j-L[1],U=R-L[0],$=I-L[1],W=1/DC(RC((Y*U+z*$)/(jC(Y*Y+z*z)*jC(U*U+$*$)))/2),q=jC(L[0]*L[0]+L[1]*L[1]);S=MC(E,(u-q)/(W-1)),O=MC(E,(h-q)/(W+1))}}k>1e-12?O>1e-12?(y=WC(F,P,D,j,h,O,g),m=WC(R,I,N,B,h,O,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),O<E?s.arc(y.cx,y.cy,O,SC(y.y01,y.x01),SC(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,O,SC(y.y01,y.x01),SC(y.y11,y.x11),!g),s.arc(0,0,h,SC(y.cy+y.y11,y.cx+y.x11),SC(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,O,SC(m.y11,m.x11),SC(m.y01,m.x01),!g))):(s.moveTo(D,j),s.arc(0,0,h,v,b,!g)):s.moveTo(D,j),u>1e-12&&x>1e-12?S>1e-12?(y=WC(N,B,R,I,u,-S,g),m=WC(D,j,F,P,u,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<E?s.arc(y.cx,y.cy,S,SC(y.y01,y.x01),SC(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,SC(y.y01,y.x01),SC(y.y11,y.x11),!g),s.arc(0,0,u,SC(y.cy+y.y11,y.cx+y.x11),SC(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,SC(m.y11,m.x11),SC(m.y01,m.x01),!g))):s.arc(0,0,u,w,_,g):s.lineTo(N,B)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-NC/2;return[OC(r)*n,DC(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:TC(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:TC(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:TC(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:TC(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:TC(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:TC(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:TC(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c},area:ZC,line:XC,pie:function(){var t=KC,e=QC,n=null,r=TC(0),i=TC(LC),a=TC(0);function o(o){var s,c,l,u,h,d=o.length,f=0,p=new Array(d),g=new Array(d),y=+r.apply(this,arguments),m=Math.min(LC,Math.max(-LC,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/d,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<d;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(f+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,l=f?(m-d*b)/f:0;s<d;++s,y=u)c=p[s],u=y+((h=g[c])>0?h*l:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:u,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:TC(+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:TC(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:TC(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:TC(+t),o):a},o},areaRadial:iT,radialArea:iT,lineRadial:rT,radialLine:rT,pointRadial:aT,linkHorizontal:function(){return lT(uT)},linkVertical:function(){return lT(hT)},linkRadial:function(){var t=lT(dT);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},symbol:function(){var t=TC(fT),e=TC(64),n=null;function r(){var r;if(n||(n=r=Kh()),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:TC(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:TC(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},symbols:MT,symbolCircle:fT,symbolCross:pT,symbolDiamond:mT,symbolSquare:xT,symbolStar:wT,symbolTriangle:CT,symbolWye:AT,curveBasisClosed:function(t){return new BT(t)},curveBasisOpen:function(t){return new LT(t)},curveBasis:function(t){return new NT(t)},curveBundle:IT,curveCardinalClosed:UT,curveCardinalOpen:WT,curveCardinal:YT,curveCatmullRomClosed:XT,curveCatmullRomOpen:QT,curveCatmullRom:VT,curveLinearClosed:function(t){return new KT(t)},curveLinear:HC,curveMonotoneX:function(t){return new rE(t)},curveMonotoneY:function(t){return new iE(t)},curveNatural:function(t){return new oE(t)},curveStep:function(t){return new cE(t,.5)},curveStepAfter:function(t){return new cE(t,1)},curveStepBefore:function(t){return new cE(t,0)},stack:function(){var t=TC([]),e=uE,n=lE,r=hE;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,l=s.length,u=new Array(l);for(a=0;a<l;++a){for(var h,d=s[a],f=u[a]=new Array(c),p=0;p<c;++p)f[p]=h=[0,+r(i[p],d,p,i)],h.data=i[p];f.key=d}for(a=0,o=e(u);a<l;++a)u[o[a]].index=a;return n(u,o),u}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:TC(oT.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:TC(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?uE:"function"==typeof t?t:TC(oT.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?lE:t,i):n},i},stackOffsetExpand: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}lE(t,e)}},stackOffsetDiverging:function(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,l=t[e[0]].length;c<l;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[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)},stackOffsetNone:lE,stackOffsetSilhouette: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}lE(t,e)}},stackOffsetWiggle: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,c=0,l=0;s<i;++s){for(var u=t[e[s]],h=u[o][1]||0,d=(h-(u[o-1][1]||0))/2,f=0;f<s;++f){var p=t[e[f]];d+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,l+=d*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=l/c)}n[o-1][1]+=n[o-1][0]=a,lE(t,e)}},stackOrderAppearance:dE,stackOrderAscending:pE,stackOrderDescending:function(t){return pE(t).reverse()},stackOrderInsideOut:function(t){var e,n,r=t.length,i=t.map(gE),a=dE(t),o=0,s=0,c=[],l=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],l.push(n));return l.reverse().concat(c)},stackOrderNone:uE,stackOrderReverse:function(t){return uE(t).reverse()},timeInterval:a_,timeMillisecond:s_,timeMilliseconds:c_,utcMillisecond:s_,utcMilliseconds:c_,timeSecond:u_,timeSeconds:h_,utcSecond:u_,utcSeconds:h_,timeMinute:f_,timeMinutes:p_,timeHour:y_,timeHours:m_,timeDay:b_,timeDays:__,timeWeek:x_,timeWeeks:A_,timeSunday:x_,timeSundays:A_,timeMonday:k_,timeMondays:M_,timeTuesday:C_,timeTuesdays:D_,timeWednesday:T_,timeWednesdays:j_,timeThursday:E_,timeThursdays:N_,timeFriday:S_,timeFridays:B_,timeSaturday:O_,timeSaturdays:L_,timeMonth:I_,timeMonths:F_,timeYear:Y_,timeYears:z_,utcMinute:$_,utcMinutes:W_,utcHour:H_,utcHours:V_,utcDay:X_,utcDays:Z_,utcWeek:K_,utcWeeks:aw,utcSunday:K_,utcSundays:aw,utcMonday:J_,utcMondays:ow,utcTuesday:tw,utcTuesdays:sw,utcWednesday:ew,utcWednesdays:cw,utcThursday:nw,utcThursdays:lw,utcFriday:rw,utcFridays:uw,utcSaturday:iw,utcSaturdays:hw,utcMonth:fw,utcMonths:pw,utcYear:yw,utcYears:mw,timeFormatDefaultLocale:Wx,get timeFormat(){return kw},get timeParse(){return Cw},get utcFormat(){return Tw},get utcParse(){return Ew},timeFormatLocale:ww,isoFormat:qx,isoParse:Hx,now:Zl,timer:Jl,timerFlush:tu,timeout:iu,interval:function(t,e,n){var r=new Kl,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?Zl():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)},transition:Yu,active: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 Pu([[t]],dh,e,+r);return null},interrupt:hu,voronoi:function(){var t=mE,e=vE,n=null;function r(r){return new KE(r.map((function(n,i){var a=[Math.round(t(n,i,r)/XE)*XE,Math.round(e(n,i,r)/XE)*XE];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:yE(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:yE(+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},zoom:function(){var t,e,n=oS,r=sS,i=hS,a=lS,o=uS,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],l=250,u=Ml,h=ho("start","zoom","end"),d=500,f=0;function p(t){t.property("__zoom",cS).on("wheel.zoom",w).on("mousedown.zoom",x).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",C).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new eS(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 eS(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i),o=r.apply(t,i),s=null==n?m(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),l=t.__zoom,h="function"==typeof e?e.apply(t,i):e,d=u(l.invert(s).concat(c/l.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=d(t),n=c/e[2];t=new eS(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function w(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Ns(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)],hu(this),t.start()}aS(),t.wheel=setTimeout(l,150),t.zoom("mouse",i(y(g(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function l(){t.wheel=null,t.end()}}function x(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=Ss(ps.view).on("mousemove.zoom",l,!0).on("mouseup.zoom",u,!0),a=Ns(this),o=ps.clientX,s=ps.clientY;Is(ps.view),iS(),t.mouse=[a,this.__zoom.invert(a)],hu(this),t.start()}function l(){if(aS(),!t.moved){var e=ps.clientX-o,n=ps.clientY-s;t.moved=e*e+n*n>f}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Ns(t.that),t.mouse[1]),t.extent,c))}function u(){r.on("mousemove.zoom mouseup.zoom",null),Fs(ps.view,t.moved),aS(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Ns(this),a=t.invert(e),o=t.k*(ps.shiftKey?.5:2),s=i(y(g(t,o),e,a),r.apply(this,arguments),c);aS(),l>0?Ss(this).transition().duration(l).call(v,s,e):Ss(this).call(p.transform,s)}}function C(){if(n.apply(this,arguments)){var e,r,i,a,o=ps.touches,s=o.length,c=b(this,arguments,ps.changedTouches.length===s);for(iS(),r=0;r<s;++r)a=[a=Bs(this,o,(i=o[r]).identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),d)),hu(this),c.start())}}function T(){if(this.__zooming){var e,n,r,a,o=b(this,arguments),s=ps.changedTouches,l=s.length;for(aS(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<l;++e)r=Bs(this,s,(n=s[e]).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 u=o.touch0[0],h=o.touch0[1],d=o.touch1[0],f=o.touch1[1],p=(p=d[0]-u[0])*p+(p=d[1]-u[1])*p,m=(m=f[0]-h[0])*m+(m=f[1]-h[1])*m;n=g(n,Math.sqrt(p/m)),r=[(u[0]+d[0])/2,(u[1]+d[1])/2],a=[(h[0]+f[0])/2,(h[1]+f[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,c))}}function E(){if(this.__zooming){var t,n,r=b(this,arguments),i=ps.changedTouches,a=i.length;for(iS(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),d),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=Ss(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",cS),t!==r?v(t,e,n):r.interrupt().each((function(){b(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?m(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),l="function"==typeof e?e.apply(this,arguments):e;return i(y(g(a,l),o,s),t,c)}),n)},p.translateBy=function(t,e,n){p.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),c)}))},p.translateTo=function(t,e,n,a){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?m(t):"function"==typeof a?a.apply(this,arguments):a;return i(nS.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,c)}),a)},_.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){_s(new tS(p,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:JE(+t),p):a},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:JE(!!t),p):n},p.touchable=function(t){return arguments.length?(o="function"==typeof t?t:JE(!!t),p):o},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:JE([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],p):[s[0],s[1]]},p.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],p):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(l=+t,p):l},p.interpolate=function(t){return arguments.length?(u=t,p):u},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,p):Math.sqrt(f)},p},zoomTransform:rS,zoomIdentity:nS}));var fS=function(){this.__data__=[],this.size=0};var pS=function(t,e){return t===e||t!=t&&e!=e},gS=pS;var yS=function(t,e){for(var n=t.length;n--;)if(gS(t[n][0],e))return n;return-1},mS=yS,vS=Array.prototype.splice;var bS=yS;var _S=yS;var wS=yS;var xS=fS,kS=function(t){var e=this.__data__,n=mS(e,t);return!(n<0)&&(n==e.length-1?e.pop():vS.call(e,n,1),--this.size,!0)},CS=function(t){var e=this.__data__,n=bS(e,t);return n<0?void 0:e[n][1]},TS=function(t){return _S(this.__data__,t)>-1},ES=function(t,e){var n=this.__data__,r=wS(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function SS(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])}}SS.prototype.clear=xS,SS.prototype.delete=kS,SS.prototype.get=CS,SS.prototype.has=TS,SS.prototype.set=ES;var OS=SS,AS=OS;var MS=function(){this.__data__=new AS,this.size=0};var DS=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var jS=function(t){return this.__data__.get(t)};var NS=function(t){return this.__data__.has(t)},BS="object"==typeof va&&va&&va.Object===Object&&va,LS=BS,RS="object"==typeof self&&self&&self.Object===Object&&self,IS=LS||RS||Function("return this")(),FS=IS.Symbol,PS=FS,YS=Object.prototype,zS=YS.hasOwnProperty,US=YS.toString,$S=PS?PS.toStringTag:void 0;var WS=function(t){var e=zS.call(t,$S),n=t[$S];try{t[$S]=void 0;var r=!0}catch(a){}var i=US.call(t);return r&&(e?t[$S]=n:delete t[$S]),i},qS=Object.prototype.toString;var HS=WS,VS=function(t){return qS.call(t)},GS=FS?FS.toStringTag:void 0;var XS=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":GS&&GS in Object(t)?HS(t):VS(t)};var ZS=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},QS=XS,KS=ZS;var JS,tO=function(t){if(!KS(t))return!1;var e=QS(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},eO=IS["__core-js_shared__"],nO=(JS=/[^.]+$/.exec(eO&&eO.keys&&eO.keys.IE_PROTO||""))?"Symbol(src)_1."+JS:"";var rO=function(t){return!!nO&&nO in t},iO=Function.prototype.toString;var aO=function(t){if(null!=t){try{return iO.call(t)}catch(e){}try{return t+""}catch(e){}}return""},oO=tO,sO=rO,cO=ZS,lO=aO,uO=/^\[object .+?Constructor\]$/,hO=Function.prototype,dO=Object.prototype,fO=hO.toString,pO=dO.hasOwnProperty,gO=RegExp("^"+fO.call(pO).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var yO=function(t){return!(!cO(t)||sO(t))&&(oO(t)?gO:uO).test(lO(t))},mO=function(t,e){return null==t?void 0:t[e]};var vO=function(t,e){var n=mO(t,e);return yO(n)?n:void 0},bO=vO(IS,"Map"),_O=vO(Object,"create"),wO=_O;var xO=function(){this.__data__=wO?wO(null):{},this.size=0};var kO=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},CO=_O,TO=Object.prototype.hasOwnProperty;var EO=function(t){var e=this.__data__;if(CO){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return TO.call(e,t)?e[t]:void 0},SO=_O,OO=Object.prototype.hasOwnProperty;var AO=_O;var MO=xO,DO=kO,jO=EO,NO=function(t){var e=this.__data__;return SO?void 0!==e[t]:OO.call(e,t)},BO=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=AO&&void 0===e?"__lodash_hash_undefined__":e,this};function LO(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])}}LO.prototype.clear=MO,LO.prototype.delete=DO,LO.prototype.get=jO,LO.prototype.has=NO,LO.prototype.set=BO;var RO=LO,IO=OS,FO=bO;var PO=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var YO=function(t,e){var n=t.__data__;return PO(e)?n["string"==typeof e?"string":"hash"]:n.map},zO=YO;var UO=YO;var $O=YO;var WO=YO;var qO=function(){this.size=0,this.__data__={hash:new RO,map:new(FO||IO),string:new RO}},HO=function(t){var e=zO(this,t).delete(t);return this.size-=e?1:0,e},VO=function(t){return UO(this,t).get(t)},GO=function(t){return $O(this,t).has(t)},XO=function(t,e){var n=WO(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function ZO(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])}}ZO.prototype.clear=qO,ZO.prototype.delete=HO,ZO.prototype.get=VO,ZO.prototype.has=GO,ZO.prototype.set=XO;var QO=ZO,KO=OS,JO=bO,tA=QO;var eA=OS,nA=MS,rA=DS,iA=jS,aA=NS,oA=function(t,e){var n=this.__data__;if(n instanceof KO){var r=n.__data__;if(!JO||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new tA(r)}return n.set(t,e),this.size=n.size,this};function sA(t){var e=this.__data__=new eA(t);this.size=e.size}sA.prototype.clear=nA,sA.prototype.delete=rA,sA.prototype.get=iA,sA.prototype.has=aA,sA.prototype.set=oA;var cA=sA;var lA=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},uA=vO,hA=function(){try{var t=uA(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),dA=hA;var fA=function(t,e,n){"__proto__"==e&&dA?dA(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},pA=fA,gA=pS,yA=Object.prototype.hasOwnProperty;var mA=function(t,e,n){var r=t[e];yA.call(t,e)&&gA(r,n)&&(void 0!==n||e in t)||pA(t,e,n)},vA=mA,bA=fA;var _A=function(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],c=r?r(n[s],t[s],s,n,t):void 0;void 0===c&&(c=t[s]),i?bA(n,s,c):vA(n,s,c)}return n};var wA=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r};var xA=function(t){return null!=t&&"object"==typeof t},kA=XS,CA=xA;var TA,EA,SA,OA,AA,MA,DA,jA,NA=function(t){return CA(t)&&"[object Arguments]"==kA(t)},BA=xA,LA=Object.prototype,RA=LA.hasOwnProperty,IA=LA.propertyIsEnumerable,FA=NA(function(){return arguments}())?NA:function(t){return BA(t)&&RA.call(t,"callee")&&!IA.call(t,"callee")},PA=Array.isArray,YA={exports:{}};TA=YA,SA=IS,OA=function(){return!1},AA=(EA=YA.exports)&&!EA.nodeType&&EA,MA=AA&&TA&&!TA.nodeType&&TA,DA=MA&&MA.exports===AA?SA.Buffer:void 0,jA=(DA?DA.isBuffer:void 0)||OA,TA.exports=jA;var zA=/^(?:0|[1-9]\d*)$/;var UA=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&zA.test(t))&&t>-1&&t%1==0&&t<e};var $A=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},WA=XS,qA=$A,HA=xA,VA={};VA["[object Float32Array]"]=VA["[object Float64Array]"]=VA["[object Int8Array]"]=VA["[object Int16Array]"]=VA["[object Int32Array]"]=VA["[object Uint8Array]"]=VA["[object Uint8ClampedArray]"]=VA["[object Uint16Array]"]=VA["[object Uint32Array]"]=!0,VA["[object Arguments]"]=VA["[object Array]"]=VA["[object ArrayBuffer]"]=VA["[object Boolean]"]=VA["[object DataView]"]=VA["[object Date]"]=VA["[object Error]"]=VA["[object Function]"]=VA["[object Map]"]=VA["[object Number]"]=VA["[object Object]"]=VA["[object RegExp]"]=VA["[object Set]"]=VA["[object String]"]=VA["[object WeakMap]"]=!1;var GA=function(t){return HA(t)&&qA(t.length)&&!!VA[WA(t)]};var XA=function(t){return function(e){return t(e)}},ZA={exports:{}};!function(t,e){var n=BS,r=e&&!e.nodeType&&e,i=r&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process,o=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=o}(ZA,ZA.exports);var QA=GA,KA=XA,JA=ZA.exports,tM=JA&&JA.isTypedArray,eM=tM?KA(tM):QA,nM=wA,rM=FA,iM=PA,aM=YA.exports,oM=UA,sM=eM,cM=Object.prototype.hasOwnProperty;var lM=function(t,e){var n=iM(t),r=!n&&rM(t),i=!n&&!r&&aM(t),a=!n&&!r&&!i&&sM(t),o=n||r||i||a,s=o?nM(t.length,String):[],c=s.length;for(var l in t)!e&&!cM.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||oM(l,c))||s.push(l);return s},uM=Object.prototype;var hM=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||uM)};var dM=function(t,e){return function(n){return t(e(n))}},fM=dM(Object.keys,Object),pM=hM,gM=fM,yM=Object.prototype.hasOwnProperty;var mM=function(t){if(!pM(t))return gM(t);var e=[];for(var n in Object(t))yM.call(t,n)&&"constructor"!=n&&e.push(n);return e},vM=tO,bM=$A;var _M=function(t){return null!=t&&bM(t.length)&&!vM(t)},wM=lM,xM=mM,kM=_M;var CM=function(t){return kM(t)?wM(t):xM(t)},TM=_A,EM=CM;var SM=function(t,e){return t&&TM(e,EM(e),t)};var OM=ZS,AM=hM,MM=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},DM=Object.prototype.hasOwnProperty;var jM=lM,NM=function(t){if(!OM(t))return MM(t);var e=AM(t),n=[];for(var r in t)("constructor"!=r||!e&&DM.call(t,r))&&n.push(r);return n},BM=_M;var LM=function(t){return BM(t)?jM(t,!0):NM(t)},RM=_A,IM=LM;var FM=function(t,e){return t&&RM(e,IM(e),t)},PM={exports:{}};!function(t,e){var n=IS,r=e&&!e.nodeType&&e,i=r&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=o?o(n):new t.constructor(n);return t.copy(r),r}}(PM,PM.exports);var YM=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e};var zM=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};var UM=function(){return[]},$M=zM,WM=UM,qM=Object.prototype.propertyIsEnumerable,HM=Object.getOwnPropertySymbols,VM=HM?function(t){return null==t?[]:(t=Object(t),$M(HM(t),(function(e){return qM.call(t,e)})))}:WM,GM=_A,XM=VM;var ZM=function(t,e){return GM(t,XM(t),e)};var QM=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t},KM=dM(Object.getPrototypeOf,Object),JM=QM,tD=KM,eD=VM,nD=UM,rD=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)JM(e,eD(t)),t=tD(t);return e}:nD,iD=_A,aD=rD;var oD=function(t,e){return iD(t,aD(t),e)},sD=QM,cD=PA;var lD=function(t,e,n){var r=e(t);return cD(t)?r:sD(r,n(t))},uD=lD,hD=VM,dD=CM;var fD=function(t){return uD(t,dD,hD)},pD=lD,gD=rD,yD=LM;var mD=function(t){return pD(t,yD,gD)},vD=vO(IS,"DataView"),bD=vO(IS,"Promise"),_D=vO(IS,"Set"),wD=vD,xD=bO,kD=bD,CD=_D,TD=vO(IS,"WeakMap"),ED=XS,SD=aO,OD=SD(wD),AD=SD(xD),MD=SD(kD),DD=SD(CD),jD=SD(TD),ND=ED;(wD&&"[object DataView]"!=ND(new wD(new ArrayBuffer(1)))||xD&&"[object Map]"!=ND(new xD)||kD&&"[object Promise]"!=ND(kD.resolve())||CD&&"[object Set]"!=ND(new CD)||TD&&"[object WeakMap]"!=ND(new TD))&&(ND=function(t){var e=ED(t),n="[object Object]"==e?t.constructor:void 0,r=n?SD(n):"";if(r)switch(r){case OD:return"[object DataView]";case AD:return"[object Map]";case MD:return"[object Promise]";case DD:return"[object Set]";case jD:return"[object WeakMap]"}return e});var BD=ND,LD=Object.prototype.hasOwnProperty;var RD=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&LD.call(t,"index")&&(n.index=t.index,n.input=t.input),n},ID=IS.Uint8Array,FD=ID;var PD=function(t){var e=new t.constructor(t.byteLength);return new FD(e).set(new FD(t)),e},YD=PD;var zD=function(t,e){var n=e?YD(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},UD=/\w*$/;var $D=function(t){var e=new t.constructor(t.source,UD.exec(t));return e.lastIndex=t.lastIndex,e},WD=FS?FS.prototype:void 0,qD=WD?WD.valueOf:void 0;var HD=PD;var VD=function(t,e){var n=e?HD(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},GD=PD,XD=zD,ZD=$D,QD=function(t){return qD?Object(qD.call(t)):{}},KD=VD;var JD=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return GD(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return XD(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 KD(t,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return ZD(t);case"[object Set]":return new r;case"[object Symbol]":return QD(t)}},tj=ZS,ej=Object.create,nj=function(){function t(){}return function(e){if(!tj(e))return{};if(ej)return ej(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),rj=nj,ij=KM,aj=hM;var oj=function(t){return"function"!=typeof t.constructor||aj(t)?{}:rj(ij(t))},sj=BD,cj=xA;var lj=function(t){return cj(t)&&"[object Map]"==sj(t)},uj=XA,hj=ZA.exports,dj=hj&&hj.isMap,fj=dj?uj(dj):lj,pj=BD,gj=xA;var yj=function(t){return gj(t)&&"[object Set]"==pj(t)},mj=XA,vj=ZA.exports,bj=vj&&vj.isSet,_j=bj?mj(bj):yj,wj=cA,xj=lA,kj=mA,Cj=SM,Tj=FM,Ej=PM.exports,Sj=YM,Oj=ZM,Aj=oD,Mj=fD,Dj=mD,jj=BD,Nj=RD,Bj=JD,Lj=oj,Rj=PA,Ij=YA.exports,Fj=fj,Pj=ZS,Yj=_j,zj=CM,Uj=LM,$j={};$j["[object Arguments]"]=$j["[object Array]"]=$j["[object ArrayBuffer]"]=$j["[object DataView]"]=$j["[object Boolean]"]=$j["[object Date]"]=$j["[object Float32Array]"]=$j["[object Float64Array]"]=$j["[object Int8Array]"]=$j["[object Int16Array]"]=$j["[object Int32Array]"]=$j["[object Map]"]=$j["[object Number]"]=$j["[object Object]"]=$j["[object RegExp]"]=$j["[object Set]"]=$j["[object String]"]=$j["[object Symbol]"]=$j["[object Uint8Array]"]=$j["[object Uint8ClampedArray]"]=$j["[object Uint16Array]"]=$j["[object Uint32Array]"]=!0,$j["[object Error]"]=$j["[object Function]"]=$j["[object WeakMap]"]=!1;var Wj=function t(e,n,r,i,a,o){var s,c=1&n,l=2&n,u=4&n;if(r&&(s=a?r(e,i,a,o):r(e)),void 0!==s)return s;if(!Pj(e))return e;var h=Rj(e);if(h){if(s=Nj(e),!c)return Sj(e,s)}else{var d=jj(e),f="[object Function]"==d||"[object GeneratorFunction]"==d;if(Ij(e))return Ej(e,c);if("[object Object]"==d||"[object Arguments]"==d||f&&!a){if(s=l||f?{}:Lj(e),!c)return l?Aj(e,Tj(s,e)):Oj(e,Cj(s,e))}else{if(!$j[d])return a?e:{};s=Bj(e,d,c)}}o||(o=new wj);var p=o.get(e);if(p)return p;o.set(e,s),Yj(e)?e.forEach((function(i){s.add(t(i,n,r,i,e,o))})):Fj(e)&&e.forEach((function(i,a){s.set(a,t(i,n,r,a,e,o))}));var g=h?void 0:(u?l?Dj:Mj:l?Uj:zj)(e);return xj(g||e,(function(i,a){g&&(i=e[a=i]),kj(s,a,t(i,n,r,a,e,o))})),s},qj=Wj;var Hj=function(t){return qj(t,4)};var Vj=function(t){return function(){return t}};var Gj=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}(),Xj=Gj,Zj=CM;var Qj=function(t,e){return t&&Xj(t,e,Zj)},Kj=_M;var Jj=function(t,e){return function(n,r){if(null==n)return n;if(!Kj(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}(Qj);var tN=function(t){return t},eN=tN;var nN=function(t){return"function"==typeof t?t:eN},rN=lA,iN=Jj,aN=nN,oN=PA;var sN=function(t,e){return(oN(t)?rN:iN)(t,aN(e))},cN=sN,lN=Jj;var uN=function(t,e){var n=[];return lN(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n};var hN=QO,dN=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},fN=function(t){return this.__data__.has(t)};function pN(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new hN;++e<n;)this.add(t[e])}pN.prototype.add=pN.prototype.push=dN,pN.prototype.has=fN;var gN=pN;var yN=function(t,e){return t.has(e)},mN=gN,vN=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},bN=yN;var _N=function(t,e,n,r,i,a){var o=1&n,s=t.length,c=e.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(t),u=a.get(e);if(l&&u)return l==e&&u==t;var h=-1,d=!0,f=2&n?new mN:void 0;for(a.set(t,e),a.set(e,t);++h<s;){var p=t[h],g=e[h];if(r)var y=o?r(g,p,h,e,t,a):r(p,g,h,t,e,a);if(void 0!==y){if(y)continue;d=!1;break}if(f){if(!vN(e,(function(t,e){if(!bN(f,e)&&(p===t||i(p,t,n,r,a)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!i(p,g,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d};var wN=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},xN=ID,kN=pS,CN=_N,TN=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},EN=wN,SN=FS?FS.prototype:void 0,ON=SN?SN.valueOf:void 0;var AN=function(t,e,n,r,i,a,o){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||!a(new xN(t),new xN(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return kN(+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 s=TN;case"[object Set]":var c=1&r;if(s||(s=EN),t.size!=e.size&&!c)return!1;var l=o.get(t);if(l)return l==e;r|=2,o.set(t,e);var u=CN(s(t),s(e),r,i,a,o);return o.delete(t),u;case"[object Symbol]":if(ON)return ON.call(t)==ON.call(e)}return!1},MN=fD,DN=Object.prototype.hasOwnProperty;var jN=cA,NN=_N,BN=AN,LN=function(t,e,n,r,i,a){var o=1&n,s=MN(t),c=s.length;if(c!=MN(e).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in e:DN.call(e,u)))return!1}var h=a.get(t),d=a.get(e);if(h&&d)return h==e&&d==t;var f=!0;a.set(t,e),a.set(e,t);for(var p=o;++l<c;){var g=t[u=s[l]],y=e[u];if(r)var m=o?r(y,g,u,e,t,a):r(g,y,u,t,e,a);if(!(void 0===m?g===y||i(g,y,n,r,a):m)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var v=t.constructor,b=e.constructor;v==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(f=!1)}return a.delete(t),a.delete(e),f},RN=BD,IN=PA,FN=YA.exports,PN=eM,YN=Object.prototype.hasOwnProperty;var zN=function(t,e,n,r,i,a){var o=IN(t),s=IN(e),c=o?"[object Array]":RN(t),l=s?"[object Array]":RN(e),u="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),h="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),d=c==l;if(d&&FN(t)){if(!FN(e))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new jN),o||PN(t)?NN(t,e,n,r,i,a):BN(t,e,c,n,r,i,a);if(!(1&n)){var f=u&&YN.call(t,"__wrapped__"),p=h&&YN.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,y=p?e.value():e;return a||(a=new jN),i(g,y,n,r,a)}}return!!d&&(a||(a=new jN),LN(t,e,n,r,i,a))},UN=xA;var $N=function t(e,n,r,i,a){return e===n||(null==e||null==n||!UN(e)&&!UN(n)?e!=e&&n!=n:zN(e,n,r,i,t,a))},WN=cA,qN=$N;var HN=ZS;var VN=function(t){return t==t&&!HN(t)},GN=VN,XN=CM;var ZN=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}},QN=function(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var c=(s=n[i])[0],l=t[c],u=s[1];if(o&&s[2]){if(void 0===l&&!(c in t))return!1}else{var h=new WN;if(r)var d=r(l,u,c,t,e,h);if(!(void 0===d?qN(u,l,3,r,h):d))return!1}}return!0},KN=function(t){for(var e=XN(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,GN(i)]}return e},JN=ZN;var tB=function(t){var e=KN(t);return 1==e.length&&e[0][2]?JN(e[0][0],e[0][1]):function(n){return n===t||QN(n,t,e)}},eB=XS,nB=xA;var rB=function(t){return"symbol"==typeof t||nB(t)&&"[object Symbol]"==eB(t)},iB=PA,aB=rB,oB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sB=/^\w*$/;var cB=function(t,e){if(iB(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aB(t))||(sB.test(t)||!oB.test(t)||null!=e&&t in Object(e))},lB=QO;function uB(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(uB.Cache||lB),n}uB.Cache=lB;var hB=uB;var dB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fB=/\\(\\)?/g,pB=function(t){var e=hB(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(dB,(function(t,n,r,i){e.push(r?i.replace(fB,"$1"):n||t)})),e}));var gB=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},yB=gB,mB=PA,vB=rB,bB=FS?FS.prototype:void 0,_B=bB?bB.toString:void 0;var wB=function t(e){if("string"==typeof e)return e;if(mB(e))return yB(e,t)+"";if(vB(e))return _B?_B.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n};var xB=function(t){return null==t?"":wB(t)},kB=PA,CB=cB,TB=pB,EB=xB;var SB=function(t,e){return kB(t)?t:CB(t,e)?[t]:TB(EB(t))},OB=rB;var AB=function(t){if("string"==typeof t||OB(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e},MB=SB,DB=AB;var jB=function(t,e){for(var n=0,r=(e=MB(e,t)).length;null!=t&&n<r;)t=t[DB(e[n++])];return n&&n==r?t:void 0},NB=jB;var BB=SB,LB=FA,RB=PA,IB=UA,FB=$A,PB=AB;var YB=function(t,e,n){for(var r=-1,i=(e=BB(e,t)).length,a=!1;++r<i;){var o=PB(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&FB(i)&&IB(o,i)&&(RB(t)||LB(t))},zB=function(t,e){return null!=t&&e in Object(t)},UB=YB;var $B=function(t,e){return null!=t&&UB(t,e,zB)},WB=$N,qB=function(t,e,n){var r=null==t?void 0:NB(t,e);return void 0===r?n:r},HB=$B,VB=cB,GB=VN,XB=ZN,ZB=AB;var QB=function(t){return function(e){return null==e?void 0:e[t]}},KB=jB;var JB=QB,tL=function(t){return function(e){return KB(e,t)}},eL=cB,nL=AB;var rL=tB,iL=function(t,e){return VB(t)&&GB(e)?XB(ZB(t),e):function(n){var r=qB(n,t);return void 0===r&&r===e?HB(n,t):WB(e,r,3)}},aL=tN,oL=PA,sL=function(t){return eL(t)?JB(nL(t)):tL(t)};var cL=function(t){return"function"==typeof t?t:null==t?aL:"object"==typeof t?oL(t)?iL(t[0],t[1]):rL(t):sL(t)},lL=zM,uL=uN,hL=cL,dL=PA;var fL=function(t,e){return(dL(t)?lL:uL)(t,hL(e))},pL=Object.prototype.hasOwnProperty;var gL=function(t,e){return null!=t&&pL.call(t,e)},yL=YB;var mL=function(t,e){return null!=t&&yL(t,e,gL)},vL=mM,bL=BD,_L=FA,wL=PA,xL=_M,kL=YA.exports,CL=hM,TL=eM,EL=Object.prototype.hasOwnProperty;var SL=function(t){if(null==t)return!0;if(xL(t)&&(wL(t)||"string"==typeof t||"function"==typeof t.splice||kL(t)||TL(t)||_L(t)))return!t.length;var e=bL(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(CL(t))return!vL(t).length;for(var n in t)if(EL.call(t,n))return!1;return!0};var OL=function(t){return void 0===t},AL=Jj,ML=_M;var DL=function(t,e){var n=-1,r=ML(t)?Array(t.length):[];return AL(t,(function(t,i,a){r[++n]=e(t,i,a)})),r},jL=gB,NL=cL,BL=DL,LL=PA;var RL=function(t,e){return(LL(t)?jL:BL)(t,NL(e))};var IL=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},FL=Jj,PL=cL,YL=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n},zL=PA;var UL=function(t,e,n){var r=zL(t)?IL:YL,i=arguments.length<3;return r(t,PL(e),n,i,FL)},$L=XS,WL=PA,qL=xA;var HL=function(t){return"string"==typeof t||!WL(t)&&qL(t)&&"[object String]"==$L(t)},VL=QB("length"),GL=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var XL=function(t){return GL.test(t)},ZL="[\\ud800-\\udfff]",QL="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",KL="\\ud83c[\\udffb-\\udfff]",JL="[^\\ud800-\\udfff]",tR="(?:\\ud83c[\\udde6-\\uddff]){2}",eR="[\\ud800-\\udbff][\\udc00-\\udfff]",nR="(?:"+QL+"|"+KL+")"+"?",rR="[\\ufe0e\\ufe0f]?"+nR+("(?:\\u200d(?:"+[JL,tR,eR].join("|")+")[\\ufe0e\\ufe0f]?"+nR+")*"),iR="(?:"+[JL+QL+"?",QL,tR,eR,ZL].join("|")+")",aR=RegExp(KL+"(?="+KL+")|"+iR+rR,"g");var oR=VL,sR=XL,cR=function(t){for(var e=aR.lastIndex=0;aR.test(t);)++e;return e};var lR=mM,uR=BD,hR=_M,dR=HL,fR=function(t){return sR(t)?cR(t):oR(t)};var pR=function(t){if(null==t)return 0;if(hR(t))return dR(t)?fR(t):t.length;var e=uR(t);return"[object Map]"==e||"[object Set]"==e?t.size:lR(t).length},gR=lA,yR=nj,mR=Qj,vR=cL,bR=KM,_R=PA,wR=YA.exports,xR=tO,kR=ZS,CR=eM;var TR=function(t,e,n){var r=_R(t),i=r||wR(t)||CR(t);if(e=vR(e),null==n){var a=t&&t.constructor;n=i?r?new a:[]:kR(t)&&xR(a)?yR(bR(t)):{}}return(i?gR:mR)(t,(function(t,r,i){return e(n,t,r,i)})),n},ER=FA,SR=PA,OR=FS?FS.isConcatSpreadable:void 0;var AR=QM,MR=function(t){return SR(t)||ER(t)||!!(OR&&t&&t[OR])};var DR=function t(e,n,r,i,a){var o=-1,s=e.length;for(r||(r=MR),a||(a=[]);++o<s;){var c=e[o];n>0&&r(c)?n>1?t(c,n-1,r,i,a):AR(a,c):i||(a[a.length]=c)}return a};var jR=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)},NR=Math.max;var BR=function(t,e,n){return e=NR(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=NR(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),jR(t,this,s)}},LR=Vj,RR=hA,IR=RR?function(t,e){return RR(t,"toString",{configurable:!0,enumerable:!1,value:LR(e),writable:!0})}:tN,FR=Date.now;var PR=function(t){var e=0,n=0;return function(){var r=FR(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(IR),YR=tN,zR=BR,UR=PR;var $R=function(t,e){return UR(zR(t,e,YR),t+"")};var WR=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};var qR=WR,HR=function(t){return t!=t},VR=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1};var GR=function(t,e,n){return e==e?VR(t,e,n):qR(t,HR,n)};var XR=function(t,e){return!!(null==t?0:t.length)&&GR(t,e,0)>-1};var ZR=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};var QR=_D,KR=function(){},JR=QR&&1/wN(new QR([,-0]))[1]==1/0?function(t){return new QR(t)}:KR,tI=gN,eI=XR,nI=ZR,rI=yN,iI=JR,aI=wN;var oI=_M,sI=xA;var cI=function(t){return sI(t)&&oI(t)},lI=DR,uI=function(t,e,n){var r=-1,i=eI,a=t.length,o=!0,s=[],c=s;if(n)o=!1,i=nI;else if(a>=200){var l=e?null:iI(t);if(l)return aI(l);o=!1,i=rI,c=new tI}else c=e?[]:s;t:for(;++r<a;){var u=t[r],h=e?e(u):u;if(u=n||0!==u?u:0,o&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue t;e&&c.push(h),s.push(u)}else i(c,h,n)||(c!==s&&c.push(h),s.push(u))}return s},hI=cI,dI=$R((function(t){return uI(lI(t,1,hI,!0))})),fI=gB;var pI=function(t,e){return fI(e,(function(e){return t[e]}))},gI=CM;var yI,mI=function(t){return null==t?[]:pI(t,gI(t))};try{yI={clone:Hj,constant:Vj,each:cN,filter:fL,has:mL,isArray:PA,isEmpty:SL,isFunction:tO,isUndefined:OL,keys:CM,map:RL,reduce:UL,size:pR,transform:TR,union:dI,values:mI}}catch(lX){}yI||(yI=window._);var vI=yI,bI=vI,_I=wI;function wI(t){this._isDirected=!bI.has(t,"directed")||t.directed,this._isMultigraph=!!bI.has(t,"multigraph")&&t.multigraph,this._isCompound=!!bI.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=bI.constant(void 0),this._defaultEdgeLabelFn=bI.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 xI(t,e){t[e]?t[e]++:t[e]=1}function kI(t,e){--t[e]||delete t[e]}function CI(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}return i+""+a+""+(bI.isUndefined(r)?"\0":r)}function TI(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 EI(t,e){return CI(t,e.v,e.w,e.name)}wI.prototype._nodeCount=0,wI.prototype._edgeCount=0,wI.prototype.isDirected=function(){return this._isDirected},wI.prototype.isMultigraph=function(){return this._isMultigraph},wI.prototype.isCompound=function(){return this._isCompound},wI.prototype.setGraph=function(t){return this._label=t,this},wI.prototype.graph=function(){return this._label},wI.prototype.setDefaultNodeLabel=function(t){return bI.isFunction(t)||(t=bI.constant(t)),this._defaultNodeLabelFn=t,this},wI.prototype.nodeCount=function(){return this._nodeCount},wI.prototype.nodes=function(){return bI.keys(this._nodes)},wI.prototype.sources=function(){var t=this;return bI.filter(this.nodes(),(function(e){return bI.isEmpty(t._in[e])}))},wI.prototype.sinks=function(){var t=this;return bI.filter(this.nodes(),(function(e){return bI.isEmpty(t._out[e])}))},wI.prototype.setNodes=function(t,e){var n=arguments,r=this;return bI.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},wI.prototype.setNode=function(t,e){return bI.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)},wI.prototype.node=function(t){return this._nodes[t]},wI.prototype.hasNode=function(t){return bI.has(this._nodes,t)},wI.prototype.removeNode=function(t){var e=this;if(bI.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],bI.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),bI.each(bI.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],bI.each(bI.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},wI.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(bI.isUndefined(e))e="\0";else{for(var n=e+="";!bI.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},wI.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},wI.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},wI.prototype.children=function(t){if(bI.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return bI.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},wI.prototype.predecessors=function(t){var e=this._preds[t];if(e)return bI.keys(e)},wI.prototype.successors=function(t){var e=this._sucs[t];if(e)return bI.keys(e)},wI.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return bI.union(e,this.successors(t))},wI.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},wI.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;bI.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),bI.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function i(t){var a=n.parent(t);return void 0===a||e.hasNode(a)?(r[t]=a,a):a in r?r[a]:i(a)}return this._isCompound&&bI.each(e.nodes(),(function(t){e.setParent(t,i(t))})),e},wI.prototype.setDefaultEdgeLabel=function(t){return bI.isFunction(t)||(t=bI.constant(t)),this._defaultEdgeLabelFn=t,this},wI.prototype.edgeCount=function(){return this._edgeCount},wI.prototype.edges=function(){return bI.values(this._edgeObjs)},wI.prototype.setPath=function(t,e){var n=this,r=arguments;return bI.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},wI.prototype.setEdge=function(){var t,e,n,r,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,e=""+e,bI.isUndefined(n)||(n=""+n);var o=CI(this._isDirected,t,e,n);if(bI.has(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!bI.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(t,e,n);var s=TI(this._isDirected,t,e,n);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[o]=s,xI(this._preds[e],t),xI(this._sucs[t],e),this._in[e][o]=s,this._out[t][o]=s,this._edgeCount++,this},wI.prototype.edge=function(t,e,n){var r=1===arguments.length?EI(this._isDirected,arguments[0]):CI(this._isDirected,t,e,n);return this._edgeLabels[r]},wI.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?EI(this._isDirected,arguments[0]):CI(this._isDirected,t,e,n);return bI.has(this._edgeLabels,r)},wI.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?EI(this._isDirected,arguments[0]):CI(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],kI(this._preds[e],t),kI(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},wI.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=bI.values(n);return e?bI.filter(r,(function(t){return t.v===e})):r}},wI.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=bI.values(n);return e?bI.filter(r,(function(t){return t.w===e})):r}},wI.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))};var SI={Graph:_I,version:"2.1.8"},OI=vI,AI=_I,MI={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:DI(t),edges:jI(t)};OI.isUndefined(t.graph())||(e.value=OI.clone(t.graph()));return e},read:function(t){var e=new AI(t.options).setGraph(t.value);return OI.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),OI.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}};function DI(t){return OI.map(t.nodes(),(function(e){var n=t.node(e),r=t.parent(e),i={v:e};return OI.isUndefined(n)||(i.value=n),OI.isUndefined(r)||(i.parent=r),i}))}function jI(t){return OI.map(t.edges(),(function(e){var n=t.edge(e),r={v:e.v,w:e.w};return OI.isUndefined(e.name)||(r.name=e.name),OI.isUndefined(n)||(r.value=n),r}))}var NI=vI,BI=function(t){var e,n={},r=[];function i(r){NI.has(n,r)||(n[r]=!0,e.push(r),NI.each(t.successors(r),i),NI.each(t.predecessors(r),i))}return NI.each(t.nodes(),(function(t){e=[],i(t),e.length&&r.push(e)})),r};var LI=vI,RI=II;function II(){this._arr=[],this._keyIndices={}}II.prototype.size=function(){return this._arr.length},II.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},II.prototype.has=function(t){return LI.has(this._keyIndices,t)},II.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},II.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},II.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!LI.has(n,t)){var r=this._arr,i=r.length;return n[t]=i,r.push({key:t,priority:e}),this._decrease(i),!0}return!1},II.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},II.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)},II.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)))},II.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},II.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};var FI=RI,PI=function(t,e,n,r){return function(t,e,n,r){var i,a,o={},s=new FI,c=function(t){var e=t.v!==i?t.v:t.w,r=o[e],c=n(t),l=a.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+c);l<r.distance&&(r.distance=l,r.predecessor=i,s.decrease(e,l))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;o[t]={distance:n},s.add(t,n)}));for(;s.size()>0&&(i=s.removeMin(),(a=o[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return o}(t,String(e),n||YI,r||function(e){return t.outEdges(e)})},YI=vI.constant(1);var zI=PI,UI=vI,$I=function(t,e,n){return UI.transform(t.nodes(),(function(r,i){r[i]=zI(t,i,e,n)}),{})};var WI=vI,qI=function(t){var e=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:e,index:e++};if(n.push(o),t.successors(o).forEach((function(t){WI.has(r,t)?r[t].onStack&&(s.lowlink=Math.min(s.lowlink,r[t].index)):(a(t),s.lowlink=Math.min(s.lowlink,r[t].lowlink))})),s.lowlink===s.index){var c,l=[];do{c=n.pop(),r[c].onStack=!1,l.push(c)}while(o!==c);i.push(l)}}return t.nodes().forEach((function(t){WI.has(r,t)||a(t)})),i};var HI=vI,VI=qI,GI=function(t){return HI.filter(VI(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))};var XI=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||ZI,n||function(e){return t.outEdges(e)})},ZI=vI.constant(1);var QI=vI,KI=JI;function JI(t){var e={},n={},r=[];if(QI.each(t.sinks(),(function i(a){if(QI.has(n,a))throw new tF;QI.has(e,a)||(n[a]=!0,e[a]=!0,QI.each(t.predecessors(a),i),delete n[a],r.push(a))})),QI.size(e)!==t.nodeCount())throw new tF;return r}function tF(){}JI.CycleException=tF,tF.prototype=new Error;var eF=KI;var nF=vI,rF=function(t,e,n){nF.isArray(e)||(e=[e]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return nF.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);iF(t,e,"post"===n,a,r,i)})),i};function iF(t,e,n,r,i,a){nF.has(r,e)||(r[e]=!0,n||a.push(e),nF.each(i(e),(function(e){iF(t,e,n,r,i,a)})),n&&a.push(e))}var aF=rF;var oF=rF;var sF=vI,cF=_I,lF=RI;var uF,hF={Graph:SI.Graph,json:MI,alg:{components:BI,dijkstra:PI,dijkstraAll:$I,findCycles:GI,floydWarshall:XI,isAcyclic:function(t){try{eF(t)}catch(lX){if(lX instanceof eF.CycleException)return!1;throw lX}return!0},postorder:function(t,e){return aF(t,e,"post")},preorder:function(t,e){return oF(t,e,"pre")},prim:function(t,e){var n,r=new cF,i={},a=new lF;function o(t){var r=t.v===n?t.w:t.v,o=a.priority(r);if(void 0!==o){var s=e(t);s<o&&(i[r]=n,a.decrease(r,s))}}if(0===t.nodeCount())return r;sF.each(t.nodes(),(function(t){a.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),a.decrease(t.nodes()[0],0);var s=!1;for(;a.size()>0;){if(n=a.removeMin(),sF.has(i,n))r.setEdge(n,i[n]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(n).forEach(o)}return r},tarjan:qI,topsort:KI},version:SI.version};try{uF=hF}catch(lX){}uF||(uF=window.graphlib);var dF=uF,fF=Wj;var pF=function(t){return fF(t,5)},gF=pS,yF=_M,mF=UA,vF=ZS;var bF=function(t,e,n){if(!vF(n))return!1;var r=typeof e;return!!("number"==r?yF(n)&&mF(e,n.length):"string"==r&&e in n)&&gF(n[e],t)},_F=$R,wF=pS,xF=bF,kF=LM,CF=Object.prototype,TF=CF.hasOwnProperty,EF=_F((function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&xF(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],o=kF(a),s=-1,c=o.length;++s<c;){var l=o[s],u=t[l];(void 0===u||wF(u,CF[l])&&!TF.call(t,l))&&(t[l]=a[l])}return t})),SF=cL,OF=_M,AF=CM;var MF=function(t){return function(e,n,r){var i=Object(e);if(!OF(e)){var a=SF(n);e=AF(e),n=function(t){return a(i[t],t,i)}}var o=t(e,n,r);return o>-1?i[a?e[o]:o]:void 0}},DF=/\s/;var jF=function(t){for(var e=t.length;e--&&DF.test(t.charAt(e)););return e},NF=/^\s+/;var BF=function(t){return t?t.slice(0,jF(t)+1).replace(NF,""):t},LF=ZS,RF=rB,IF=/^[-+]0x[0-9a-f]+$/i,FF=/^0b[01]+$/i,PF=/^0o[0-7]+$/i,YF=parseInt;var zF=function(t){if("number"==typeof t)return t;if(RF(t))return NaN;if(LF(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=LF(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=BF(t);var n=FF.test(t);return n||PF.test(t)?YF(t.slice(2),n?2:8):IF.test(t)?NaN:+t};var UF=function(t){return t?Infinity===(t=zF(t))||-Infinity===t?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},$F=UF;var WF=WR,qF=cL,HF=function(t){var e=$F(t),n=e%1;return e==e?n?e-n:e:0},VF=Math.max;var GF=MF((function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:HF(n);return i<0&&(i=VF(r+i,0)),WF(t,qF(e),i)})),XF=DR;var ZF=function(t){return(null==t?0:t.length)?XF(t,1):[]},QF=Gj,KF=nN,JF=LM;var tP=function(t,e){return null==t?t:QF(t,KF(e),JF)};var eP=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},nP=fA,rP=Qj,iP=cL;var aP=function(t,e){var n={};return e=iP(e),rP(t,(function(t,r,i){nP(n,r,e(t,r,i))})),n},oP=rB;var sP=function(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],o=e(a);if(null!=o&&(void 0===s?o==o&&!oP(o):n(o,s)))var s=o,c=a}return c};var cP=sP,lP=function(t,e){return t>e},uP=tN;var hP=function(t){return t&&t.length?cP(t,uP,lP):void 0},dP=fA,fP=pS;var pP=function(t,e,n){(void 0!==n&&!fP(t[e],n)||void 0===n&&!(e in t))&&dP(t,e,n)},gP=XS,yP=KM,mP=xA,vP=Function.prototype,bP=Object.prototype,_P=vP.toString,wP=bP.hasOwnProperty,xP=_P.call(Object);var kP=function(t){if(!mP(t)||"[object Object]"!=gP(t))return!1;var e=yP(t);if(null===e)return!0;var n=wP.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&_P.call(n)==xP};var CP=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},TP=_A,EP=LM;var SP=pP,OP=PM.exports,AP=VD,MP=YM,DP=oj,jP=FA,NP=PA,BP=cI,LP=YA.exports,RP=tO,IP=ZS,FP=kP,PP=eM,YP=CP,zP=function(t){return TP(t,EP(t))};var UP=cA,$P=pP,WP=Gj,qP=function(t,e,n,r,i,a,o){var s=YP(t,n),c=YP(e,n),l=o.get(c);if(l)SP(t,n,l);else{var u=a?a(s,c,n+"",t,e,o):void 0,h=void 0===u;if(h){var d=NP(c),f=!d&&LP(c),p=!d&&!f&&PP(c);u=c,d||f||p?NP(s)?u=s:BP(s)?u=MP(s):f?(h=!1,u=OP(c,!0)):p?(h=!1,u=AP(c,!0)):u=[]:FP(c)||jP(c)?(u=s,jP(s)?u=zP(s):IP(s)&&!RP(s)||(u=DP(c))):h=!1}h&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),SP(t,n,u)}},HP=ZS,VP=LM,GP=CP;var XP=$R,ZP=bF;var QP=function t(e,n,r,i,a){e!==n&&WP(n,(function(o,s){if(a||(a=new UP),HP(o))qP(e,n,s,r,t,i,a);else{var c=i?i(GP(e,s),o,s+"",e,n,a):void 0;void 0===c&&(c=o),$P(e,s,c)}}),VP)},KP=function(t){return XP((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&ZP(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e}))}((function(t,e,n){QP(t,e,n)}));var JP=function(t,e){return t<e},tY=sP,eY=JP,nY=tN;var rY=function(t){return t&&t.length?tY(t,nY,eY):void 0},iY=sP,aY=cL,oY=JP;var sY=function(t,e){return t&&t.length?iY(t,aY(e),oY):void 0},cY=IS,lY=function(){return cY.Date.now()},uY=mA,hY=SB,dY=UA,fY=ZS,pY=AB;var gY=jB,yY=function(t,e,n,r){if(!fY(t))return t;for(var i=-1,a=(e=hY(e,t)).length,o=a-1,s=t;null!=s&&++i<a;){var c=pY(e[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=o){var u=s[c];void 0===(l=r?r(u,c,s):void 0)&&(l=fY(u)?u:dY(e[i+1])?[]:{})}uY(s,c,l),s=s[c]}return t},mY=SB;var vY=function(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=gY(t,o);n(s,o)&&yY(a,mY(o,t),s)}return a},bY=$B;var _Y=ZF,wY=BR,xY=PR;var kY=function(t,e){return vY(t,e,(function(e,n){return bY(t,n)}))},CY=function(t){return xY(wY(t,void 0,_Y),t+"")}((function(t,e){return null==t?{}:kY(t,e)})),TY=Math.ceil,EY=Math.max;var SY=function(t,e,n,r){for(var i=-1,a=EY(TY((e-t)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=t,t+=n;return o},OY=bF,AY=UF;var MY=function(t){return function(e,n,r){return r&&"number"!=typeof r&&OY(e,n,r)&&(n=r=void 0),e=AY(e),void 0===n?(n=e,e=0):n=AY(n),r=void 0===r?e<n?1:-1:AY(r),SY(e,n,r,t)}}();var DY=rB;var jY=function(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,a=DY(t),o=void 0!==e,s=null===e,c=e==e,l=DY(e);if(!s&&!l&&!a&&t>e||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0};var NY=gB,BY=jB,LY=cL,RY=DL,IY=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t},FY=XA,PY=function(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,o=i.length,s=n.length;++r<o;){var c=jY(i[r],a[r]);if(c)return r>=s?c:c*("desc"==n[r]?-1:1)}return t.index-e.index},YY=tN,zY=PA;var UY=DR,$Y=function(t,e,n){e=e.length?NY(e,(function(t){return zY(t)?function(e){return BY(e,1===t.length?t[0]:t)}:t})):[YY];var r=-1;e=NY(e,FY(LY));var i=RY(t,(function(t,n,i){return{criteria:NY(e,(function(e){return e(t)})),index:++r,value:t}}));return IY(i,(function(t,e){return PY(t,e,n)}))},WY=bF,qY=$R((function(t,e){if(null==t)return[];var n=e.length;return n>1&&WY(t,e[0],e[1])?e=[]:n>2&&WY(e[0],e[1],e[2])&&(e=[e[0]]),$Y(t,UY(e,1),[])})),HY=xB,VY=0;var GY=function(t){var e=++VY;return HY(t)+e};var XY=mA,ZY=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};var QY,KY=function(t,e){return ZY(t||[],e||[],XY)};try{QY={cloneDeep:pF,constant:Vj,defaults:EF,each:cN,filter:fL,find:GF,flatten:ZF,forEach:sN,forIn:tP,has:mL,isUndefined:OL,last:eP,map:RL,mapValues:aP,max:hP,merge:KP,min:rY,minBy:sY,now:lY,pick:CY,range:MY,reduce:UL,sortBy:qY,uniqueId:GY,values:mI,zipObject:KY}}catch(lX){}QY||(QY=window._);var JY=QY,tz=ez;function ez(){var t={};t._next=t._prev=t,this._sentinel=t}function nz(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function rz(t,e){if("_next"!==t&&"_prev"!==t)return e}ez.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return nz(e),e},ez.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&nz(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},ez.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,rz)),n=n._prev;return"["+t.join(", ")+"]"};var iz=JY,az=dF.Graph,oz=tz,sz=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new az,r=0,i=0;iz.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),iz.forEach(t.edges(),(function(t){var a=n.edge(t.v,t.w)||0,o=e(t),s=a+o;n.setEdge(t.v,t.w,s),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w).in+=o)}));var a=iz.range(i+r+3).map((function(){return new oz})),o=r+1;return iz.forEach(n.nodes(),(function(t){uz(a,o,n.node(t))})),{graph:n,buckets:a,zeroIdx:o}}(t,e||cz),r=function(t,e,n){var r,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)lz(t,e,n,r);for(;r=a.dequeue();)lz(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){i=i.concat(lz(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return iz.flatten(iz.map(r,(function(e){return t.outEdges(e.v,e.w)})),!0)},cz=iz.constant(1);function lz(t,e,n,r,i){var a=i?[]:void 0;return iz.forEach(t.inEdges(r.v),(function(r){var o=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,uz(e,n,s)})),iz.forEach(t.outEdges(r.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,uz(e,n,o)})),t.removeNode(r.v),a}function uz(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)}var hz=JY,dz=sz,fz={run:function(t){var e="greedy"===t.graph().acyclicer?dz(t,(n=t,function(t){return n.edge(t).weight})):function(t){var e=[],n={},r={};function i(a){hz.has(r,a)||(r[a]=!0,n[a]=!0,hz.forEach(t.outEdges(a),(function(t){hz.has(n,t.w)?e.push(t):i(t.w)})),delete n[a])}return hz.forEach(t.nodes(),i),e}(t);var n;hz.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,hz.uniqueId("rev"))}))},undo:function(t){hz.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)}}))}};var pz=JY,gz=dF.Graph,yz={addDummyNode:mz,simplify:function(t){var e=(new gz).setGraph(t.graph());return pz.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),pz.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 gz({multigraph:t.isMultigraph()}).setGraph(t.graph());return pz.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),pz.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=pz.map(t.nodes(),(function(e){var n={};return pz.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return pz.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=pz.map(t.nodes(),(function(e){var n={};return pz.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return pz.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,c=t.width/2,l=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=l*o/s,r=l):(o<0&&(c=-c),n=c,r=c*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=pz.map(pz.range(vz(t)+1),(function(){return[]}));return pz.forEach(t.nodes(),(function(n){var r=t.node(n),i=r.rank;pz.isUndefined(i)||(e[i][r.order]=n)})),e},normalizeRanks:function(t){var e=pz.min(pz.map(t.nodes(),(function(e){return t.node(e).rank})));pz.forEach(t.nodes(),(function(n){var r=t.node(n);pz.has(r,"rank")&&(r.rank-=e)}))},removeEmptyRanks:function(t){var e=pz.min(pz.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];pz.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var r=0,i=t.graph().nodeRankFactor;pz.forEach(n,(function(e,n){pz.isUndefined(e)&&n%i!=0?--r:r&&pz.forEach(e,(function(e){t.node(e).rank+=r}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return mz(t,"border",i,e)},maxRank:vz,partition:function(t,e){var n={lhs:[],rhs:[]};return pz.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=pz.now();try{return e()}finally{console.log(t+" time: "+(pz.now()-n)+"ms")}},notime:function(t,e){return e()}};function mz(t,e,n,r){var i;do{i=pz.uniqueId(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function vz(t){return pz.max(pz.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!pz.isUndefined(n))return n})))}var bz=JY,_z=yz,wz={run:function(t){t.graph().dummyChains=[],bz.forEach(t.edges(),(function(e){!function(t,e){var n,r,i,a=e.v,o=t.node(a).rank,s=e.w,c=t.node(s).rank,l=e.name,u=t.edge(e),h=u.labelRank;if(c===o+1)return;for(t.removeEdge(e),i=0,++o;o<c;++i,++o)u.points=[],r={width:0,height:0,edgeLabel:u,edgeObj:e,rank:o},n=_z.addDummyNode(t,"edge",r,"_d"),o===h&&(r.width=u.width,r.height=u.height,r.dummy="edge-label",r.labelpos=u.labelpos),t.setEdge(a,n,{weight:u.weight},l),0===i&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,s,{weight:u.weight},l)}(t,e)}))},undo:function(t){bz.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)}))}};var xz=JY,kz={longestPath:function(t){var e={};xz.forEach(t.sources(),(function n(r){var i=t.node(r);if(xz.has(e,r))return i.rank;e[r]=!0;var a=xz.min(xz.map(t.outEdges(r),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}};var Cz=JY,Tz=dF.Graph,Ez=kz.slack,Sz=function(t){var e,n,r=new Tz({directed:!1}),i=t.nodes()[0],a=t.nodeCount();r.setNode(i,{});for(;Oz(r,t)<a;)e=Az(r,t),n=r.hasNode(e.v)?Ez(t,e):-Ez(t,e),Mz(r,t,n);return r};function Oz(t,e){return Cz.forEach(t.nodes(),(function n(r){Cz.forEach(e.nodeEdges(r),(function(i){var a=i.v,o=r===a?i.w:a;t.hasNode(o)||Ez(e,i)||(t.setNode(o,{}),t.setEdge(r,o,{}),n(o))}))})),t.nodeCount()}function Az(t,e){return Cz.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return Ez(e,n)}))}function Mz(t,e,n){Cz.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}var Dz=JY,jz=Sz,Nz=kz.slack,Bz=kz.longestPath,Lz=dF.alg.preorder,Rz=dF.alg.postorder,Iz=yz.simplify,Fz=Pz;function Pz(t){t=Iz(t),Bz(t);var e,n=jz(t);for(Uz(n),Yz(n,t);e=Wz(n);)Hz(n,t,e,qz(n,t,e))}function Yz(t,e){var n=Rz(t,t.nodes());n=n.slice(0,n.length-1),Dz.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=zz(t,e,n)}(t,e,n)}))}function zz(t,e,n){var r=t.node(n).parent,i=!0,a=e.edge(n,r),o=0;return a||(i=!1,a=e.edge(r,n)),o=a.weight,Dz.forEach(e.nodeEdges(n),(function(a){var s,c,l=a.v===n,u=l?a.w:a.v;if(u!==r){var h=l===i,d=e.edge(a).weight;if(o+=h?d:-d,s=n,c=u,t.hasEdge(s,c)){var f=t.edge(n,u).cutvalue;o+=h?-f:f}}})),o}function Uz(t,e){arguments.length<2&&(e=t.nodes()[0]),$z(t,{},1,e)}function $z(t,e,n,r,i){var a=n,o=t.node(r);return e[r]=!0,Dz.forEach(t.neighbors(r),(function(i){Dz.has(e,i)||(n=$z(t,e,n,i,r))})),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function Wz(t){return Dz.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function qz(t,e,n){var r=n.v,i=n.w;e.hasEdge(r,i)||(r=n.w,i=n.v);var a=t.node(r),o=t.node(i),s=a,c=!1;a.lim>o.lim&&(s=o,c=!0);var l=Dz.filter(e.edges(),(function(e){return c===Vz(t,t.node(e.v),s)&&c!==Vz(t,t.node(e.w),s)}));return Dz.minBy(l,(function(t){return Nz(e,t)}))}function Hz(t,e,n,r){var i=n.v,a=n.w;t.removeEdge(i,a),t.setEdge(r.v,r.w,{}),Uz(t),Yz(t,e),function(t,e){var n=Dz.find(t.nodes(),(function(t){return!e.node(t).parent})),r=Lz(t,n);r=r.slice(1),Dz.forEach(r,(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 Vz(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}Pz.initLowLimValues=Uz,Pz.initCutValues=Yz,Pz.calcCutValue=zz,Pz.leaveEdge=Wz,Pz.enterEdge=qz,Pz.exchangeEdges=Hz;var Gz=kz.longestPath,Xz=Sz,Zz=Fz,Qz=function(t){switch(t.graph().ranker){case"network-simplex":Jz(t);break;case"tight-tree":!function(t){Gz(t),Xz(t)}(t);break;case"longest-path":Kz(t);break;default:Jz(t)}};var Kz=Gz;function Jz(t){Zz(t)}var tU=JY,eU=function(t){var e=function(t){var e={},n=0;function r(i){var a=n;tU.forEach(t.children(i),r),e[i]={low:a,lim:n++}}return tU.forEach(t.children(),r),e}(t);tU.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=[],c=Math.min(e[n].low,e[r].low),l=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||l>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,c=0,l=o[c],u=!0;n!==i.w;){if(r=t.node(n),u){for(;(l=o[c])!==s&&t.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}t.setParent(n,l),n=t.successors(n)[0]}}))};var nU=JY,rU=yz,iU={run:function(t){var e=rU.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(r,i){var a=t.children(r);a&&a.length&&nU.forEach(a,(function(t){n(t,i+1)})),e[r]=i}return nU.forEach(t.children(),(function(t){n(t,1)})),e}(t),r=nU.max(nU.values(n))-1,i=2*r+1;t.graph().nestingRoot=e,nU.forEach(t.edges(),(function(e){t.edge(e).minlen*=i}));var a=function(t){return nU.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;nU.forEach(t.children(),(function(o){aU(t,e,i,a,r,n,o)})),t.graph().nodeRankFactor=i},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,nU.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}};function aU(t,e,n,r,i,a,o){var s=t.children(o);if(s.length){var c=rU.addBorderNode(t,"_bt"),l=rU.addBorderNode(t,"_bb"),u=t.node(o);t.setParent(c,o),u.borderTop=c,t.setParent(l,o),u.borderBottom=l,nU.forEach(s,(function(s){aU(t,e,n,r,i,a,s);var u=t.node(s),h=u.borderTop?u.borderTop:s,d=u.borderBottom?u.borderBottom:s,f=u.borderTop?r:2*r,p=h!==d?1:i-a[o]+1;t.setEdge(c,h,{weight:f,minlen:p,nestingEdge:!0}),t.setEdge(d,l,{weight:f,minlen:p,nestingEdge:!0})})),t.parent(o)||t.setEdge(e,c,{weight:0,minlen:i+a[o]})}else o!==e&&t.setEdge(e,o,{weight:0,minlen:n})}var oU=JY,sU=yz,cU=function(t){oU.forEach(t.children(),(function e(n){var r=t.children(n),i=t.node(n);if(r.length&&oU.forEach(r,e),oU.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)lU(t,"borderLeft","_bl",n,i,a),lU(t,"borderRight","_br",n,i,a)}}))};function lU(t,e,n,r,i,a){var o={width:0,height:0,rank:a,borderType:e},s=i[e][a-1],c=sU.addDummyNode(t,"border",o,n);i[e][a]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var uU=JY,hU={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||dU(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){uU.forEach(t.nodes(),(function(e){pU(t.node(e))})),uU.forEach(t.edges(),(function(e){var n=t.edge(e);uU.forEach(n.points,pU),uU.has(n,"y")&&pU(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){uU.forEach(t.nodes(),(function(e){gU(t.node(e))})),uU.forEach(t.edges(),(function(e){var n=t.edge(e);uU.forEach(n.points,gU),uU.has(n,"x")&&gU(n)}))}(t),dU(t))}};function dU(t){uU.forEach(t.nodes(),(function(e){fU(t.node(e))})),uU.forEach(t.edges(),(function(e){fU(t.edge(e))}))}function fU(t){var e=t.width;t.width=t.height,t.height=e}function pU(t){t.y=-t.y}function gU(t){var e=t.x;t.x=t.y,t.y=e}var yU=JY,mU=function(t){var e={},n=yU.filter(t.nodes(),(function(e){return!t.children(e).length})),r=yU.max(yU.map(n,(function(e){return t.node(e).rank}))),i=yU.map(yU.range(r+1),(function(){return[]}));var a=yU.sortBy(n,(function(e){return t.node(e).rank}));return yU.forEach(a,(function n(r){if(yU.has(e,r))return;e[r]=!0;var a=t.node(r);i[a.rank].push(r),yU.forEach(t.successors(r),n)})),i};var vU=JY,bU=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=_U(t,e[r-1],e[r]);return n};function _U(t,e,n){for(var r=vU.zipObject(n,vU.map(n,(function(t,e){return e}))),i=vU.flatten(vU.map(e,(function(e){return vU.sortBy(vU.map(t.outEdges(e),(function(e){return{pos:r[e.w],weight:t.edge(e).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var o=2*a-1;a-=1;var s=vU.map(new Array(o),(function(){return 0})),c=0;return vU.forEach(i.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}var wU=JY;var xU=JY;var kU=JY,CU=yz;function TU(t,e,n){for(var r;e.length&&(r=kU.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}var EU=JY,SU=function(t,e){return wU.map(e,(function(e){var n=t.inEdges(e);if(n.length){var r=wU.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:r.sum/r.weight,weight:r.weight}}return{v:e}}))},OU=function(t,e){var n={};return xU.forEach(t,(function(t,e){var r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};xU.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)})),xU.forEach(e.edges(),(function(t){var e=n[t.v],r=n[t.w];xU.isUndefined(e)||xU.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(xU.isUndefined(e.barycenter)||xU.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 r(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var i=t.pop();e.push(i),xU.forEach(i.in.reverse(),n(i)),xU.forEach(i.out,r(i))}return xU.map(xU.filter(e,(function(t){return!t.merged})),(function(t){return xU.pick(t,["vs","i","barycenter","weight"])}))}(xU.filter(n,(function(t){return!t.indegree})))},AU=function(t,e){var n=CU.partition(t,(function(t){return kU.has(t,"barycenter")})),r=n.lhs,i=kU.sortBy(n.rhs,(function(t){return-t.i})),a=[],o=0,s=0,c=0;r.sort((l=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:l?e.i-t.i:t.i-e.i})),c=TU(a,i,c),kU.forEach(r,(function(t){c+=t.vs.length,a.push(t.vs),o+=t.barycenter*t.weight,s+=t.weight,c=TU(a,i,c)}));var l;var u={vs:kU.flatten(a,!0)};s&&(u.barycenter=o/s,u.weight=s);return u},MU=function t(e,n,r,i){var a=e.children(n),o=e.node(n),s=o?o.borderLeft:void 0,c=o?o.borderRight:void 0,l={};s&&(a=EU.filter(a,(function(t){return t!==s&&t!==c})));var u=SU(e,a);EU.forEach(u,(function(n){if(e.children(n.v).length){var a=t(e,n.v,r,i);l[n.v]=a,EU.has(a,"barycenter")&&(o=n,s=a,EU.isUndefined(o.barycenter)?(o.barycenter=s.barycenter,o.weight=s.weight):(o.barycenter=(o.barycenter*o.weight+s.barycenter*s.weight)/(o.weight+s.weight),o.weight+=s.weight))}var o,s}));var h=OU(u,r);!function(t,e){EU.forEach(t,(function(t){t.vs=EU.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(h,l);var d=AU(h,i);if(s&&(d.vs=EU.flatten([s,d.vs,c],!0),e.predecessors(s).length)){var f=e.node(e.predecessors(s)[0]),p=e.node(e.predecessors(c)[0]);EU.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d};var DU=JY,jU=dF.Graph;var NU=JY;var BU=JY,LU=mU,RU=bU,IU=MU,FU=function(t,e,n){var r=function(t){var e;for(;t.hasNode(e=DU.uniqueId("_root")););return e}(t),i=new jU({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((function(e){return t.node(e)}));return DU.forEach(t.nodes(),(function(a){var o=t.node(a),s=t.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),DU.forEach(t[n](a),(function(e){var n=e.v===a?e.w:e.v,r=i.edge(n,a),o=DU.isUndefined(r)?0:r.weight;i.setEdge(n,a,{weight:t.edge(e).weight+o})})),DU.has(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))})),i},PU=function(t,e,n){var r,i={};NU.forEach(n,(function(n){for(var a,o,s=t.parent(n);s;){if((a=t.parent(s))?(o=i[a],i[a]=s):(o=r,r=s),o&&o!==s)return void e.setEdge(o,s);s=a}}))},YU=dF.Graph,zU=yz,UU=function(t){var e=zU.maxRank(t),n=$U(t,BU.range(1,e+1),"inEdges"),r=$U(t,BU.range(e-1,-1,-1),"outEdges"),i=LU(t);qU(t,i);for(var a,o=Number.POSITIVE_INFINITY,s=0,c=0;c<4;++s,++c){WU(s%2?n:r,s%4>=2),i=zU.buildLayerMatrix(t);var l=RU(t,i);l<o&&(c=0,a=BU.cloneDeep(i),o=l)}qU(t,a)};function $U(t,e,n){return BU.map(e,(function(e){return FU(t,e,n)}))}function WU(t,e){var n=new YU;BU.forEach(t,(function(t){var r=t.graph().root,i=IU(t,r,n,e);BU.forEach(i.vs,(function(e,n){t.node(e).order=n})),PU(t,n,i.vs)}))}function qU(t,e){BU.forEach(e,(function(e){BU.forEach(e,(function(e,n){t.node(e).order=n}))}))}var HU=JY,VU=dF.Graph,GU=yz,XU=function(t){var e,n=GU.buildLayerMatrix(t),r=HU.merge(ZU(t,n),QU(t,n)),i={};HU.forEach(["u","d"],(function(a){e="u"===a?n:HU.values(n).reverse(),HU.forEach(["l","r"],(function(n){"r"===n&&(e=HU.map(e,(function(t){return HU.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=t$(t,e,r,o),c=e$(t,e,s.root,s.align,"r"===n);"r"===n&&(c=HU.mapValues(c,(function(t){return-t}))),i[a+n]=c}))}));var a=n$(t,i);return r$(i,a),i$(i,t.graph().align)};function ZU(t,e){var n={};return HU.reduce(e,(function(e,r){var i=0,a=0,o=e.length,s=HU.last(r);return HU.forEach(r,(function(e,c){var l=function(t,e){if(t.node(e).dummy)return HU.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),u=l?t.node(l).order:o;(l||e===s)&&(HU.forEach(r.slice(a,c+1),(function(e){HU.forEach(t.predecessors(e),(function(r){var a=t.node(r),o=a.order;!(o<i||u<o)||a.dummy&&t.node(e).dummy||KU(n,r,e)}))})),a=c+1,i=u)})),r})),n}function QU(t,e){var n={};function r(e,r,i,a,o){var s;HU.forEach(HU.range(r,i),(function(r){s=e[r],t.node(s).dummy&&HU.forEach(t.predecessors(s),(function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>o)&&KU(n,e,s)}))}))}return HU.reduce(e,(function(e,n){var i,a=-1,o=0;return HU.forEach(n,(function(s,c){if("border"===t.node(s).dummy){var l=t.predecessors(s);l.length&&(i=t.node(l[0]).order,r(n,o,c,a,i),o=c,a=i)}r(n,o,n.length,i,e.length)})),n})),n}function KU(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 JU(t,e,n){if(e>n){var r=e;e=n,n=r}return HU.has(t[e],n)}function t$(t,e,n,r){var i={},a={},o={};return HU.forEach(e,(function(t){HU.forEach(t,(function(t,e){i[t]=t,a[t]=t,o[t]=e}))})),HU.forEach(e,(function(t){var e=-1;HU.forEach(t,(function(t){var s=r(t);if(s.length)for(var c=((s=HU.sortBy(s,(function(t){return o[t]}))).length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var h=s[l];a[t]===t&&e<o[h]&&!JU(n,t,h)&&(a[h]=t,a[t]=i[t]=i[h],e=o[h])}}))})),{root:i,align:a}}function e$(t,e,n,r,i){var a={},o=function(t,e,n,r){var i=new VU,a=t.graph(),o=function(t,e,n){return function(r,i,a){var o,s=r.node(i),c=r.node(a),l=0;if(l+=s.width/2,HU.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":o=-s.width/2;break;case"r":o=s.width/2}if(o&&(l+=n?o:-o),o=0,l+=(s.dummy?e:t)/2,l+=(c.dummy?e:t)/2,l+=c.width/2,HU.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":o=c.width/2;break;case"r":o=-c.width/2}return o&&(l+=n?o:-o),o=0,l}}(a.nodesep,a.edgesep,r);return HU.forEach(e,(function(e){var r;HU.forEach(e,(function(e){var a=n[e];if(i.setNode(a),r){var s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(t,e,r),c||0))}r=e}))})),i}(t,e,n,i),s=i?"borderLeft":"borderRight";function c(t,e){for(var n=o.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 c((function(t){a[t]=o.inEdges(t).reduce((function(t,e){return Math.max(t,a[e.v]+o.edge(e))}),0)}),o.predecessors.bind(o)),c((function(e){var n=o.outEdges(e).reduce((function(t,e){return Math.min(t,a[e.w]-o.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(a[e]=Math.max(a[e],n))}),o.successors.bind(o)),HU.forEach(r,(function(t){a[t]=a[n[t]]})),a}function n$(t,e){return HU.minBy(HU.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return HU.forIn(e,(function(e,i){var a=function(t,e){return t.node(e).width}(t,i)/2;n=Math.max(e+a,n),r=Math.min(e-a,r)})),n-r}))}function r$(t,e){var n=HU.values(e),r=HU.min(n),i=HU.max(n);HU.forEach(["u","d"],(function(n){HU.forEach(["l","r"],(function(a){var o,s=n+a,c=t[s];if(c!==e){var l=HU.values(c);(o="l"===a?r-HU.min(l):i-HU.max(l))&&(t[s]=HU.mapValues(c,(function(t){return t+o})))}}))}))}function i$(t,e){return HU.mapValues(t.ul,(function(n,r){if(e)return t[e.toLowerCase()][r];var i=HU.sortBy(HU.map(t,r));return(i[1]+i[2])/2}))}var a$=JY,o$=yz,s$=XU;var c$=JY,l$=fz,u$=wz,h$=Qz,d$=yz.normalizeRanks,f$=eU,p$=yz.removeEmptyRanks,g$=iU,y$=cU,m$=hU,v$=UU,b$=function(t){(function(t){var e=o$.buildLayerMatrix(t),n=t.graph().ranksep,r=0;a$.forEach(e,(function(e){var i=a$.max(a$.map(e,(function(e){return t.node(e).height})));a$.forEach(e,(function(e){t.node(e).y=r+i/2})),r+=i+n}))})(t=o$.asNonCompoundGraph(t)),a$.forEach(s$(t),(function(e,n){t.node(n).x=e}))},_$=yz,w$=dF.Graph,x$=function(t,e){var n=e&&e.debugTiming?_$.time:_$.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new w$({multigraph:!0,compound:!0}),n=j$(t.graph());return e.setGraph(c$.merge({},C$,D$(n,k$),c$.pick(n,T$))),c$.forEach(t.nodes(),(function(n){var r=j$(t.node(n));e.setNode(n,c$.defaults(D$(r,E$),S$)),e.setParent(n,t.parent(n))})),c$.forEach(t.edges(),(function(n){var r=j$(t.edge(n));e.setEdge(n,c$.merge({},A$,D$(r,O$),c$.pick(r,M$)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,c$.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){c$.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(){l$.run(t)})),e(" nestingGraph.run",(function(){g$.run(t)})),e(" rank",(function(){h$(_$.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){c$.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};_$.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){p$(t)})),e(" nestingGraph.cleanup",(function(){g$.cleanup(t)})),e(" normalizeRanks",(function(){d$(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;c$.forEach(t.nodes(),(function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=c$.max(e,r.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){c$.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(){u$.run(t)})),e(" parentDummyChains",(function(){f$(t)})),e(" addBorderSegments",(function(){y$(t)})),e(" order",(function(){v$(t)})),e(" insertSelfEdges",(function(){!function(t){var e=_$.buildLayerMatrix(t);c$.forEach(e,(function(e){var n=0;c$.forEach(e,(function(e,r){var i=t.node(e);i.order=r+n,c$.forEach(i.selfEdges,(function(e){_$.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")})),delete i.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){m$.adjust(t)})),e(" position",(function(){b$(t)})),e(" positionSelfEdges",(function(){!function(t){c$.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){c$.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(c$.last(n.borderLeft)),o=t.node(c$.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}})),c$.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){u$.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){c$.forEach(t.edges(),(function(e){var n=t.edge(e);if(c$.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(){m$.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,a=t.graph(),o=a.marginx||0,s=a.marginy||0;function c(t){var a=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}c$.forEach(t.nodes(),(function(e){c(t.node(e))})),c$.forEach(t.edges(),(function(e){var n=t.edge(e);c$.has(n,"x")&&c(n)})),e-=o,r-=s,c$.forEach(t.nodes(),(function(n){var i=t.node(n);i.x-=e,i.y-=r})),c$.forEach(t.edges(),(function(n){var i=t.edge(n);c$.forEach(i.points,(function(t){t.x-=e,t.y-=r})),c$.has(i,"x")&&(i.x-=e),c$.has(i,"y")&&(i.y-=r)})),a.width=n-e+o,a.height=i-r+s}(t)})),e(" assignNodeIntersects",(function(){!function(t){c$.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(_$.intersectRect(a,n)),i.points.push(_$.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){c$.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){l$.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){c$.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))})),c$.forEach(t.edges(),(function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,c$.has(i,"x")&&(r.x=i.x,r.y=i.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var k$=["nodesep","edgesep","ranksep","marginx","marginy"],C$={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},T$=["acyclicer","ranker","rankdir","align"],E$=["width","height"],S$={width:0,height:0},O$=["minlen","weight","width","height","labeloffset"],A$={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M$=["labelpos"];function D$(t,e){return c$.mapValues(c$.pick(t,e),Number)}function j$(t){var e={};return c$.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}var N$=JY,B$=yz,L$=dF.Graph;var R$,I$={graphlib:dF,layout:x$,debug:{debugOrdering:function(t){var e=B$.buildLayerMatrix(t),n=new L$({compound:!0,multigraph:!0}).setGraph({});return N$.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),N$.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),N$.forEach(e,(function(t,e){var r="layer"+e;n.setNode(r,{rank:"same"}),N$.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}},util:{time:yz.time,notime:yz.notime},version:"0.8.5"};try{R$=hF}catch(lX){}R$||(R$=window.graphlib);var F$,P$=R$;try{F$=I$}catch(lX){}F$||(F$=window.dagre);var Y$=F$,z$=function(t,e){return t.intersect(e)};var U$=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x<i&&(l=-l);var u=Math.abs(e*n*s/c);r.y<a&&(u=-u);return{x:i+l,y:a+u}};var $$=U$,W$=function(t,e,n){return $$(t,e,e,n)};function q$(t,e){return t*e>0}var H$=function(t,e,n,r){var i,a,o,s,c,l,u,h,d,f,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,d=i*n.x+o*n.y+c,f=i*r.x+o*r.y+c,0!==d&&0!==f&&q$(d,f))return;if(a=r.y-n.y,s=n.x-r.x,l=r.x*n.y-n.x*r.y,u=a*t.x+s*t.y+l,h=a*e.x+s*e.y+l,0!==u&&0!==h&&q$(u,h))return;if(0===(p=i*s-a*o))return;return g=Math.abs(p/2),{x:(y=o*l-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*l)<0?(y-g)/p:(y+g)/p}},V$=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 c=r-t.width/2-o,l=i-t.height/2-s,u=0;u<e.length;u++){var h=e[u],d=e[u<e.length-1?u+1:0],f=H$(t,n,{x:c+h.x,y:l+h.y},{x:c+d.x,y:l+d.y});f&&a.push(f)}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,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return a[0]};var G$=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o);return{x:i+n,y:a+r}};var X$,Z$={node:z$,circle:W$,ellipse:U$,polygon:V$,rect:G$};try{X$={defaults:EF,each:cN,isFunction:tO,isPlainObject:kP,pick:CY,has:mL,range:MY,uniqueId:GY}}catch(lX){}X$||(X$=window._);var Q$,K$=X$;if(!Q$)try{Q$=dS}catch(lX){}Q$||(Q$=window.d3);var J$=K$,tW={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return nW(t.v)+":"+nW(t.w)+":"+nW(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(J$.isPlainObject(n)){var r=n.transition;if(J$.isFunction(r))return r(t)}return t}};var eW=/:/g;function nW(t){return t?String(t).replace(eW,"\\:"):""}var rW=tW;var iW=tW,aW=function(t,e){var n=t.append("foreignObject").attr("width","100000"),r=n.append("xhtml:div");r.attr("xmlns","http://www.w3.org/1999/xhtml");var i=e.label;switch(typeof i){case"function":r.insert(i);break;case"object":r.insert((function(){return i}));break;default:r.html(i)}iW.applyStyle(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap");var a=r.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n};var oW=tW;var sW=function(t,e){for(var n=t.append("text"),r=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"),i=0;i<r.length;i++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(r[i]);return rW.applyStyle(n,e.labelStyle),n},cW=aW,lW=function(t,e){var n=t;return n.node().appendChild(e.label),oW.applyStyle(n,e.labelStyle),n},uW=function(t,e,n){var r=e.label,i=t.append("g");"svg"===e.labelType?lW(i,e):"string"!=typeof r||"html"===e.labelType?cW(i,e):sW(i,e);var a,o=i.node().getBBox();switch(n){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-o.height;break;default:a=-o.height/2}return i.attr("transform","translate("+-o.width/2+","+a+")"),i};var hW=K$,dW=uW,fW=tW,pW=Q$,gW=function(t,e,n){var r,i=e.nodes().filter((function(t){return!fW.isSubgraph(e,t)})),a=t.selectAll("g.node").data(i,(function(t){return t})).classed("update",!0);a.exit().remove(),a.enter().append("g").attr("class","node").style("opacity",0),(a=t.selectAll("g.node")).each((function(t){var r=e.node(t),i=pW.select(this);fW.applyClass(i,r.class,(i.classed("update")?"update ":"")+"node"),i.select("g.label").remove();var a=i.append("g").attr("class","label"),o=dW(a,r),s=n[r.shape],c=hW.pick(o.node().getBBox(),"width","height");r.elem=this,r.id&&i.attr("id",r.id),r.labelId&&a.attr("id",r.labelId),hW.has(r,"width")&&(c.width=r.width),hW.has(r,"height")&&(c.height=r.height),c.width+=r.paddingLeft+r.paddingRight,c.height+=r.paddingTop+r.paddingBottom,a.attr("transform","translate("+(r.paddingLeft-r.paddingRight)/2+","+(r.paddingTop-r.paddingBottom)/2+")");var l=pW.select(this);l.select(".label-container").remove();var u=s(l,c,r).classed("label-container",!0);fW.applyStyle(u,r.style);var h=u.node().getBBox();r.width=h.width,r.height=h.height})),r=a.exit?a.exit():a.selectAll(null);return fW.applyTransition(r,e).style("opacity",0).remove(),a};var yW=tW,mW=Q$,vW=uW,bW=function(t,e){var n,r=e.nodes().filter((function(t){return yW.isSubgraph(e,t)})),i=t.selectAll("g.cluster").data(r,(function(t){return t}));i.selectAll("*").remove(),i.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),i=t.selectAll("g.cluster"),yW.applyTransition(i,e).style("opacity",1),i.each((function(t){var n=e.node(t),r=mW.select(this);mW.select(this).append("rect");var i=r.append("g").attr("class","label");vW(i,n,n.clusterLabelPos)})),i.selectAll("rect").each((function(t){var n=e.node(t),r=mW.select(this);yW.applyStyle(r,n.style)})),n=i.exit?i.exit():i.selectAll(null);return yW.applyTransition(n,e).style("opacity",0).remove(),i};var _W=K$,wW=uW,xW=tW,kW=Q$,CW=function(t,e){var n,r=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return xW.edgeToId(t)})).classed("update",!0);r.exit().remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(r=t.selectAll("g.edgeLabel")).each((function(t){var n=kW.select(this);n.select(".label").remove();var r=e.edge(t),i=wW(n,e.edge(t),0).classed("label",!0),a=i.node().getBBox();r.labelId&&i.attr("id",r.labelId),_W.has(r,"width")||(r.width=a.width),_W.has(r,"height")||(r.height=a.height)})),n=r.exit?r.exit():r.selectAll(null);return xW.applyTransition(n,e).style("opacity",0).remove(),r};var TW=K$,EW=z$,SW=tW,OW=Q$,AW=function(t,e,n){var r=t.selectAll("g.edgePath").data(e.edges(),(function(t){return SW.edgeToId(t)})).classed("update",!0),i=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),r=e.node(t.v).elem;return MW(n,TW.range(n.points.length).map((function(){return e=(t=r).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}(r,e);!function(t,e){var n=t.exit();SW.applyTransition(n,e).style("opacity",0).remove()}(r,e);var a=void 0!==r.merge?r.merge(i):r;return SW.applyTransition(a,e).style("opacity",1),a.each((function(t){var n=OW.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),SW.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),a.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=TW.uniqueId("arrowhead");var r=OW.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e})).style("fill","none");SW.applyTransition(r,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),i=t.node(e.w),a=n.points.slice(1,n.points.length-1);return a.unshift(EW(r,a[0])),a.push(EW(i,a[a.length-1])),MW(n,a)}(e,t)})),SW.applyStyle(r,n.style)})),a.selectAll("defs *").remove(),a.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(OW.select(this),r.arrowheadId,r,"arrowhead")})),a};function MW(t,e){var n=(OW.line||OW.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}var DW=tW,jW=Q$,NW=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!jW.select(this).classed("update")})).attr("transform",n),DW.applyTransition(t,e).style("opacity",1).attr("transform",n)};var BW=tW,LW=Q$,RW=K$,IW=function(t,e){function n(t){var n=e.edge(t);return RW.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!LW.select(this).classed("update")})).attr("transform",n),BW.applyTransition(t,e).style("opacity",1).attr("transform",n)};var FW=tW,PW=Q$,YW=function(t,e){var n=t.filter((function(){return!PW.select(this).classed("update")}));function r(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",r),FW.applyTransition(t,e).style("opacity",1).attr("transform",r),FW.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}))};var zW=G$,UW=U$,$W=W$,WW=V$,qW={rect:function(t,e,n){var r=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 zW(n,t)},r},ellipse:function(t,e,n){var r=e.width/2,i=e.height/2,a=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",i);return n.intersect=function(t){return UW(n,r,i,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 $W(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}],o=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return WW(n,a,t)},o}};var HW=tW,VW={default:GW,normal:GW,vee: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 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");HW.applyStyle(i,n[r+"Style"]),n[r+"Class"]&&i.attr("class",n[r+"Class"])},undirected: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 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");HW.applyStyle(i,n[r+"Style"]),n[r+"Class"]&&i.attr("class",n[r+"Class"])}};function GW(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 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");HW.applyStyle(i,n[r+"Style"]),n[r+"Class"]&&i.attr("class",n[r+"Class"])}var XW=K$,ZW=Q$,QW=Y$.layout,KW=function(){var t=gW,e=bW,n=CW,r=AW,i=NW,a=IW,o=YW,s=qW,c=VW,l=function(l,u){!function(t){t.nodes().forEach((function(e){var n=t.node(e);XW.has(n,"label")||t.children(e).length||(n.label=e),XW.has(n,"paddingX")&&XW.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),XW.has(n,"paddingY")&&XW.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),XW.has(n,"padding")&&XW.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),XW.defaults(n,JW),XW.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),XW.has(n,"width")&&(n._prevWidth=n.width),XW.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);XW.has(n,"label")||(n.label=""),XW.defaults(n,tq)}))}(u);var h=eq(l,"output"),d=eq(h,"clusters"),f=eq(h,"edgePaths"),p=n(eq(h,"edgeLabels"),u),g=t(eq(h,"nodes"),u,s);QW(u),i(g,u),a(p,u),r(f,u,c);var y=e(d,u);o(y,u),function(t){XW.each(t.nodes(),(function(e){var n=t.node(e);XW.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,XW.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(u)};return l.createNodes=function(e){return arguments.length?(t=e,l):t},l.createClusters=function(t){return arguments.length?(e=t,l):e},l.createEdgeLabels=function(t){return arguments.length?(n=t,l):n},l.createEdgePaths=function(t){return arguments.length?(r=t,l):r},l.shapes=function(t){return arguments.length?(s=t,l):s},l.arrows=function(t){return arguments.length?(c=t,l):c},l};var JW={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},tq={arrowhead:"normal",curve:ZW.curveLinear};function eq(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}var nq={graphlib:P$,dagre:Y$,intersect:Z$,render:KW,util:tW,version:"0.6.4"};
/**
* @license
* Copyright (c) 2012-2013 Chris Pettitt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var rq=Object.hasOwnProperty,iq=Object.setPrototypeOf,aq=Object.isFrozen,oq=Object.getPrototypeOf,sq=Object.getOwnPropertyDescriptor,cq=Object.freeze,lq=Object.seal,uq=Object.create,hq="undefined"!=typeof Reflect&&Reflect,dq=hq.apply,fq=hq.construct;dq||(dq=function(t,e,n){return t.apply(e,n)}),cq||(cq=function(t){return t}),lq||(lq=function(t){return t}),fq||(fq=function(t,e){return new(Function.prototype.bind.apply(t,[null].concat(
/*! @license DOMPurify 2.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.0/LICENSE */
function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(e))))});var pq,gq=Tq(Array.prototype.forEach),yq=Tq(Array.prototype.pop),mq=Tq(Array.prototype.push),vq=Tq(String.prototype.toLowerCase),bq=Tq(String.prototype.match),_q=Tq(String.prototype.replace),wq=Tq(String.prototype.indexOf),xq=Tq(String.prototype.trim),kq=Tq(RegExp.prototype.test),Cq=(pq=TypeError,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return fq(pq,e)});function Tq(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return dq(t,e,r)}}function Eq(t,e){iq&&iq(t,null);for(var n=e.length;n--;){var r=e[n];if("string"==typeof r){var i=vq(r);i!==r&&(aq(e)||(e[n]=i),r=i)}t[r]=!0}return t}function Sq(t){var e=uq(null),n=void 0;for(n in t)dq(rq,t,[n])&&(e[n]=t[n]);return e}function Oq(t,e){for(;null!==t;){var n=sq(t,e);if(n){if(n.get)return Tq(n.get);if("function"==typeof n.value)return Tq(n.value)}t=oq(t)}return function(t){return console.warn("fallback value for",t),null}}var Aq=cq(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mq=cq(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dq=cq(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),jq=cq(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Nq=cq(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Bq=cq(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Lq=cq(["#text"]),Rq=cq(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Iq=cq(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Fq=cq(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pq=cq(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Yq=lq(/\{\{[\s\S]*|[\s\S]*\}\}/gm),zq=lq(/<%[\s\S]*|[\s\S]*%>/gm),Uq=lq(/^data-[\-\w.\u00B7-\uFFFF]/),$q=lq(/^aria-[\-\w]+$/),Wq=lq(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qq=lq(/^(?:\w+script|data):/i),Hq=lq(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vq="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};function Gq(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var Xq=function(){return"undefined"==typeof window?null:window},Zq=function(t,e){if("object"!==(void 0===t?"undefined":Vq(t))||"function"!=typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function(t){return t}})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var Qq=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xq(),n=function(e){return t(e)};if(n.version="2.3.0",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,a=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,c=e.Element,l=e.NodeFilter,u=e.NamedNodeMap,h=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,d=e.Text,f=e.Comment,p=e.DOMParser,g=e.trustedTypes,y=c.prototype,m=Oq(y,"cloneNode"),v=Oq(y,"nextSibling"),b=Oq(y,"childNodes"),_=Oq(y,"parentNode");if("function"==typeof o){var w=i.createElement("template");w.content&&w.content.ownerDocument&&(i=w.content.ownerDocument)}var x=Zq(g,r),k=x&&et?x.createHTML(""):"",C=i,T=C.implementation,E=C.createNodeIterator,S=C.createDocumentFragment,O=C.getElementsByTagName,A=r.importNode,M={};try{M=Sq(i).documentMode?i.documentMode:{}}catch(Lt){}var D={};n.isSupported="function"==typeof _&&T&&void 0!==T.createHTMLDocument&&9!==M;var j=Yq,N=zq,B=Uq,L=$q,R=qq,I=Hq,F=Wq,P=null,Y=Eq({},[].concat(Gq(Aq),Gq(Mq),Gq(Dq),Gq(Nq),Gq(Lq))),z=null,U=Eq({},[].concat(Gq(Rq),Gq(Iq),Gq(Fq),Gq(Pq))),$=null,W=null,q=!0,H=!0,V=!1,G=!1,X=!1,Z=!1,Q=!1,K=!1,J=!1,tt=!0,et=!1,nt=!0,rt=!0,it=!1,at={},ot=Eq({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),st=null,ct=Eq({},["audio","video","img","source","image","track"]),lt=null,ut=Eq({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ht="http://www.w3.org/1998/Math/MathML",dt="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml",pt=ft,gt=!1,yt=null,mt=i.createElement("form"),vt=function(t){yt&&yt===t||(t&&"object"===(void 0===t?"undefined":Vq(t))||(t={}),t=Sq(t),P="ALLOWED_TAGS"in t?Eq({},t.ALLOWED_TAGS):Y,z="ALLOWED_ATTR"in t?Eq({},t.ALLOWED_ATTR):U,lt="ADD_URI_SAFE_ATTR"in t?Eq(Sq(ut),t.ADD_URI_SAFE_ATTR):ut,st="ADD_DATA_URI_TAGS"in t?Eq(Sq(ct),t.ADD_DATA_URI_TAGS):ct,$="FORBID_TAGS"in t?Eq({},t.FORBID_TAGS):{},W="FORBID_ATTR"in t?Eq({},t.FORBID_ATTR):{},at="USE_PROFILES"in t&&t.USE_PROFILES,q=!1!==t.ALLOW_ARIA_ATTR,H=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,G=t.SAFE_FOR_TEMPLATES||!1,X=t.WHOLE_DOCUMENT||!1,K=t.RETURN_DOM||!1,J=t.RETURN_DOM_FRAGMENT||!1,tt=!1!==t.RETURN_DOM_IMPORT,et=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,rt=!1!==t.KEEP_CONTENT,it=t.IN_PLACE||!1,F=t.ALLOWED_URI_REGEXP||F,pt=t.NAMESPACE||ft,G&&(H=!1),J&&(K=!0),at&&(P=Eq({},[].concat(Gq(Lq))),z=[],!0===at.html&&(Eq(P,Aq),Eq(z,Rq)),!0===at.svg&&(Eq(P,Mq),Eq(z,Iq),Eq(z,Pq)),!0===at.svgFilters&&(Eq(P,Dq),Eq(z,Iq),Eq(z,Pq)),!0===at.mathMl&&(Eq(P,Nq),Eq(z,Fq),Eq(z,Pq))),t.ADD_TAGS&&(P===Y&&(P=Sq(P)),Eq(P,t.ADD_TAGS)),t.ADD_ATTR&&(z===U&&(z=Sq(z)),Eq(z,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&Eq(lt,t.ADD_URI_SAFE_ATTR),rt&&(P["#text"]=!0),X&&Eq(P,["html","head","body"]),P.table&&(Eq(P,["tbody"]),delete $.tbody),cq&&cq(t),yt=t)},bt=Eq({},["mi","mo","mn","ms","mtext"]),_t=Eq({},["foreignobject","desc","title","annotation-xml"]),wt=Eq({},Mq);Eq(wt,Dq),Eq(wt,jq);var xt=Eq({},Nq);Eq(xt,Bq);var kt=function(t){var e=_(t);e&&e.tagName||(e={namespaceURI:ft,tagName:"template"});var n=vq(t.tagName),r=vq(e.tagName);if(t.namespaceURI===dt)return e.namespaceURI===ft?"svg"===n:e.namespaceURI===ht?"svg"===n&&("annotation-xml"===r||bt[r]):Boolean(wt[n]);if(t.namespaceURI===ht)return e.namespaceURI===ft?"math"===n:e.namespaceURI===dt?"math"===n&&_t[r]:Boolean(xt[n]);if(t.namespaceURI===ft){if(e.namespaceURI===dt&&!_t[r])return!1;if(e.namespaceURI===ht&&!bt[r])return!1;var i=Eq({},["title","style","font","a","script"]);return!xt[n]&&(i[n]||!wt[n])}return!1},Ct=function(t){mq(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(Lt){try{t.outerHTML=k}catch(e){t.remove()}}},Tt=function(t,e){try{mq(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(Lt){mq(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!z[t])if(K||J)try{Ct(e)}catch(Lt){}else try{e.setAttribute(t,"")}catch(Lt){}},Et=function(t){var e=void 0,n=void 0;if(Q)t="<remove></remove>"+t;else{var r=bq(t,/^[\r\n\t ]+/);n=r&&r[0]}var a=x?x.createHTML(t):t;if(pt===ft)try{e=(new p).parseFromString(a,"text/html")}catch(Lt){}if(!e||!e.documentElement){e=T.createDocument(pt,"template",null);try{e.documentElement.innerHTML=gt?"":a}catch(Lt){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),pt===ft?O.call(e,X?"html":"body")[0]:X?e.documentElement:o},St=function(t){return E.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Ot=function(t){return!(t instanceof d||t instanceof f)&&!("string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof h&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore)},At=function(t){return"object"===(void 0===s?"undefined":Vq(s))?t instanceof s:t&&"object"===(void 0===t?"undefined":Vq(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Mt=function(t,e,r){D[t]&&gq(D[t],(function(t){t.call(n,e,r,yt)}))},Dt=function(t){var e=void 0;if(Mt("beforeSanitizeElements",t,null),Ot(t))return Ct(t),!0;if(bq(t.nodeName,/[\u0080-\uFFFF]/))return Ct(t),!0;var r=vq(t.nodeName);if(Mt("uponSanitizeElement",t,{tagName:r,allowedTags:P}),!At(t.firstElementChild)&&(!At(t.content)||!At(t.content.firstElementChild))&&kq(/<[/\w]/g,t.innerHTML)&&kq(/<[/\w]/g,t.textContent))return Ct(t),!0;if(!P[r]||$[r]){if(rt&&!ot[r]){var i=_(t)||t.parentNode,a=b(t)||t.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(m(a[o],!0),v(t))}return Ct(t),!0}return t instanceof c&&!kt(t)?(Ct(t),!0):"noscript"!==r&&"noembed"!==r||!kq(/<\/no(script|embed)/i,t.innerHTML)?(G&&3===t.nodeType&&(e=t.textContent,e=_q(e,j," "),e=_q(e,N," "),t.textContent!==e&&(mq(n.removed,{element:t.cloneNode()}),t.textContent=e)),Mt("afterSanitizeElements",t,null),!1):(Ct(t),!0)},jt=function(t,e,n){if(nt&&("id"===e||"name"===e)&&(n in i||n in mt))return!1;if(H&&!W[e]&&kq(B,e));else if(q&&kq(L,e));else{if(!z[e]||W[e])return!1;if(lt[e]);else if(kq(F,_q(n,I,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==wq(n,"data:")||!st[t]){if(V&&!kq(R,_q(n,I,"")));else if(n)return!1}else;}return!0},Nt=function(t){var e=void 0,r=void 0,i=void 0,a=void 0;Mt("beforeSanitizeAttributes",t,null);var o=t.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};for(a=o.length;a--;){var c=e=o[a],l=c.name,u=c.namespaceURI;if(r=xq(e.value),i=vq(l),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,Mt("uponSanitizeAttribute",t,s),r=s.attrValue,!s.forceKeepAttr&&(Tt(l,t),s.keepAttr))if(kq(/\/>/i,r))Tt(l,t);else{G&&(r=_q(r,j," "),r=_q(r,N," "));var h=t.nodeName.toLowerCase();if(jt(h,i,r))try{u?t.setAttributeNS(u,l,r):t.setAttribute(l,r),yq(n.removed)}catch(Lt){}}}Mt("afterSanitizeAttributes",t,null)}},Bt=function t(e){var n=void 0,r=St(e);for(Mt("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)Mt("uponSanitizeShadowNode",n,null),Dt(n)||(n.content instanceof a&&t(n.content),Nt(n));Mt("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t,i){var o=void 0,c=void 0,l=void 0,u=void 0,h=void 0;if((gt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!At(t)){if("function"!=typeof t.toString)throw Cq("toString is not a function");if("string"!=typeof(t=t.toString()))throw Cq("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Vq(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof t)return e.toStaticHTML(t);if(At(t))return e.toStaticHTML(t.outerHTML)}return t}if(Z||vt(i),n.removed=[],"string"==typeof t&&(it=!1),it);else if(t instanceof s)1===(c=(o=Et("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?o=c:o.appendChild(c);else{if(!K&&!G&&!X&&-1===t.indexOf("<"))return x&&et?x.createHTML(t):t;if(!(o=Et(t)))return K?null:k}o&&Q&&Ct(o.firstChild);for(var d=St(it?t:o);l=d.nextNode();)3===l.nodeType&&l===u||Dt(l)||(l.content instanceof a&&Bt(l.content),Nt(l),u=l);if(u=null,it)return t;if(K){if(J)for(h=S.call(o.ownerDocument);o.firstChild;)h.appendChild(o.firstChild);else h=o;return tt&&(h=A.call(r,h,!0)),h}var f=X?o.outerHTML:o.innerHTML;return G&&(f=_q(f,j," "),f=_q(f,N," ")),x&&et?x.createHTML(f):f},n.setConfig=function(t){vt(t),Z=!0},n.clearConfig=function(){yt=null,Z=!1},n.isValidAttribute=function(t,e,n){yt||vt({});var r=vq(t),i=vq(e);return jt(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(D[t]=D[t]||[],mq(D[t],e))},n.removeHook=function(t){D[t]&&yq(D[t])},n.removeHooks=function(t){D[t]&&(D[t]=[])},n.removeAllHooks=function(){D={}},n}(),Kq=ba(Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Qq})),Jq={},tH={},eH={},nH={},rH={};Object.defineProperty(rH,"__esModule",{value:!0});var iH={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:function(t){return t>=255?255:t<0?0:t},g:function(t){return t>=255?255:t<0?0:t},b:function(t){return t>=255?255:t<0?0:t},h:function(t){return t%360},s:function(t){return t>=100?100:t<0?0:t},l:function(t){return t>=100?100:t<0?0:t},a:function(t){return t>=1?1:t<0?0:t}},toLinear:function(t){var e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},hsl2rgb:function(t,e){var n=t.h,r=t.s,i=t.l;if(!r)return 2.55*i;n/=360,r/=100;var a=(i/=100)<.5?i*(1+r):i+r-i*r,o=2*i-a;switch(e){case"r":return 255*iH.hue2rgb(o,a,n+1/3);case"g":return 255*iH.hue2rgb(o,a,n);case"b":return 255*iH.hue2rgb(o,a,n-1/3)}},rgb2hsl:function(t,e){var n=t.r,r=t.g,i=t.b;n/=255,r/=255,i/=255;var a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if("l"===e)return 100*s;if(a===o)return 0;var c=a-o;if("s"===e)return 100*(s>.5?c/(2-a-o):c/(a+o));switch(a){case n:return 60*((r-i)/c+(r<i?6:0));case r:return 60*((i-n)/c+2);case i:return 60*((n-r)/c+4);default:return-1}}};rH.default=iH;var aH={};Object.defineProperty(aH,"__esModule",{value:!0});var oH={clamp:function(t,e,n){return e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t))},round:function(t){return Math.round(1e10*t)/1e10}};aH.default=oH;var sH={};Object.defineProperty(sH,"__esModule",{value:!0});var cH={dec2hex:function(t){var e=Math.round(t).toString(16);return e.length>1?e:"0"+e}};sH.default=cH,Object.defineProperty(nH,"__esModule",{value:!0});var lH=aH,uH=sH,hH={channel:rH.default,lang:lH.default,unit:uH.default};nH.default=hH;var dH={},fH={},pH={};Object.defineProperty(pH,"__esModule",{value:!0});var gH=function(){function t(){this.type=0}return t.prototype.get=function(){return this.type},t.prototype.set=function(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t},t.prototype.reset=function(){this.type=0},t.prototype.is=function(t){return this.type===t},t}();pH.default=gH,Object.defineProperty(fH,"__esModule",{value:!0});var yH=nH,mH=pH,vH=function(){function t(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new mH.default}return t.prototype.set=function(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this},t.prototype._ensureHSL=function(){var t=this.data,e=t.h,n=t.s,r=t.l;void 0===e&&(t.h=yH.default.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=yH.default.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=yH.default.channel.rgb2hsl(t,"l"))},t.prototype._ensureRGB=function(){var t=this.data,e=t.r,n=t.g,r=t.b;void 0===e&&(t.r=yH.default.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=yH.default.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=yH.default.channel.hsl2rgb(t,"b"))},Object.defineProperty(t.prototype,"r",{get:function(){var t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),yH.default.channel.hsl2rgb(t,"r")):e},set:function(t){this.type.set(1),this.changed=!0,this.data.r=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){var t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),yH.default.channel.hsl2rgb(t,"g")):e},set:function(t){this.type.set(1),this.changed=!0,this.data.g=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){var t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),yH.default.channel.hsl2rgb(t,"b")):e},set:function(t){this.type.set(1),this.changed=!0,this.data.b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){var t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),yH.default.channel.rgb2hsl(t,"h")):e},set:function(t){this.type.set(2),this.changed=!0,this.data.h=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){var t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),yH.default.channel.rgb2hsl(t,"s")):e},set:function(t){this.type.set(2),this.changed=!0,this.data.s=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){var t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),yH.default.channel.rgb2hsl(t,"l")):e},set:function(t){this.type.set(2),this.changed=!0,this.data.l=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.data.a},set:function(t){this.changed=!0,this.data.a=t},enumerable:!0,configurable:!0}),t}();fH.default=vH,Object.defineProperty(dH,"__esModule",{value:!0});var bH=new fH.default({r:0,g:0,b:0,a:0},"transparent");dH.default=bH;var _H={},wH={},xH={};Object.defineProperty(xH,"__esModule",{value:!0});var kH=nH,CH={};xH.DEC2HEX=CH;for(var TH=0;TH<=255;TH++)CH[TH]=kH.default.unit.dec2hex(TH);Object.defineProperty(wH,"__esModule",{value:!0});var EH=dH,SH=xH,OH={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(t){if(35===t.charCodeAt(0)){var e=t.match(OH.re);if(e){var n=e[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return EH.default.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},t)}}},stringify:function(t){var e=t.r,n=t.g,r=t.b,i=t.a;return i<1?"#"+SH.DEC2HEX[Math.round(e)]+SH.DEC2HEX[Math.round(n)]+SH.DEC2HEX[Math.round(r)]+SH.DEC2HEX[Math.round(255*i)]:"#"+SH.DEC2HEX[Math.round(e)]+SH.DEC2HEX[Math.round(n)]+SH.DEC2HEX[Math.round(r)]}};wH.default=OH;var AH={};Object.defineProperty(AH,"__esModule",{value:!0});var MH=wH,DH={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:function(t){t=t.toLowerCase();var e=DH.colors[t];if(e)return MH.default.parse(e)},stringify:function(t){var e=MH.default.stringify(t);for(var n in DH.colors)if(DH.colors[n]===e)return n}};AH.default=DH;var jH={};Object.defineProperty(jH,"__esModule",{value:!0});var NH=nH,BH=dH,LH={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:function(t){var e=t.charCodeAt(0);if(114===e||82===e){var n=t.match(LH.re);if(n){var r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8];return BH.default.set({r:NH.default.channel.clamp.r(i?2.55*parseFloat(r):parseFloat(r)),g:NH.default.channel.clamp.g(o?2.55*parseFloat(a):parseFloat(a)),b:NH.default.channel.clamp.b(c?2.55*parseFloat(s):parseFloat(s)),a:l?NH.default.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},t)}}},stringify:function(t){var e=t.r,n=t.g,r=t.b,i=t.a;return i<1?"rgba("+NH.default.lang.round(e)+", "+NH.default.lang.round(n)+", "+NH.default.lang.round(r)+", "+NH.default.lang.round(i)+")":"rgb("+NH.default.lang.round(e)+", "+NH.default.lang.round(n)+", "+NH.default.lang.round(r)+")"}};jH.default=LH;var RH={};Object.defineProperty(RH,"__esModule",{value:!0});var IH=nH,FH=dH,PH={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:function(t){var e=t.match(PH.hueRe);if(e){var n=e[1];switch(e[2]){case"grad":return IH.default.channel.clamp.h(.9*parseFloat(n));case"rad":return IH.default.channel.clamp.h(180*parseFloat(n)/Math.PI);case"turn":return IH.default.channel.clamp.h(360*parseFloat(n))}}return IH.default.channel.clamp.h(parseFloat(t))},parse:function(t){var e=t.charCodeAt(0);if(104===e||72===e){var n=t.match(PH.re);if(n){var r=n[1],i=n[2],a=n[3],o=n[4],s=n[5];return FH.default.set({h:PH._hue2deg(r),s:IH.default.channel.clamp.s(parseFloat(i)),l:IH.default.channel.clamp.l(parseFloat(a)),a:o?IH.default.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)}}},stringify:function(t){var e=t.h,n=t.s,r=t.l,i=t.a;return i<1?"hsla("+IH.default.lang.round(e)+", "+IH.default.lang.round(n)+"%, "+IH.default.lang.round(r)+"%, "+i+")":"hsl("+IH.default.lang.round(e)+", "+IH.default.lang.round(n)+"%, "+IH.default.lang.round(r)+"%)"}};RH.default=PH,Object.defineProperty(_H,"__esModule",{value:!0});var YH=wH,zH=AH,UH=jH,$H=RH,WH={format:{keyword:zH.default,hex:YH.default,rgb:UH.default,rgba:UH.default,hsl:$H.default,hsla:$H.default},parse:function(t){if("string"!=typeof t)return t;var e=YH.default.parse(t)||UH.default.parse(t)||$H.default.parse(t)||zH.default.parse(t);if(e)return e;throw new Error('Unsupported color format: "'+t+'"')},stringify:function(t){return!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?$H.default.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?UH.default.stringify(t):YH.default.stringify(t)}};_H.default=WH;var qH={};Object.defineProperty(qH,"__esModule",{value:!0});var HH=nH,VH=_H;qH.default=function(t,e){var n=VH.default.parse(t);for(var r in e)n[r]=HH.default.channel.clamp[r](e[r]);return VH.default.stringify(n)},Object.defineProperty(eH,"__esModule",{value:!0});var GH=nH,XH=dH,ZH=_H,QH=qH;eH.default=function(t,e,n,r){if(void 0===n&&(n=0),void 0===r&&(r=1),"number"!=typeof t)return QH.default(t,{a:e});var i=XH.default.set({r:GH.default.channel.clamp.r(t),g:GH.default.channel.clamp.g(e),b:GH.default.channel.clamp.b(n),a:GH.default.channel.clamp.a(r)});return ZH.default.stringify(i)};var KH={};Object.defineProperty(KH,"__esModule",{value:!0});var JH=nH,tV=dH,eV=_H;KH.default=function(t,e,n,r){void 0===r&&(r=1);var i=tV.default.set({h:JH.default.channel.clamp.h(t),s:JH.default.channel.clamp.s(e),l:JH.default.channel.clamp.l(n),a:JH.default.channel.clamp.a(r)});return eV.default.stringify(i)};var nV={};Object.defineProperty(nV,"__esModule",{value:!0});var rV=_H;nV.default=function(t){return rV.default.format.keyword.stringify(rV.default.parse(t))};var iV={};Object.defineProperty(iV,"__esModule",{value:!0});var aV=_H;iV.default=function(t){return aV.default.format.hex.stringify(aV.default.parse(t))};var oV={};Object.defineProperty(oV,"__esModule",{value:!0});var sV=_H;oV.default=function(t){return sV.default.format.rgba.stringify(sV.default.parse(t))};var cV={};Object.defineProperty(cV,"__esModule",{value:!0});var lV=_H;cV.default=function(t){return lV.default.format.hsla.stringify(lV.default.parse(t))};var uV={};Object.defineProperty(uV,"__esModule",{value:!0});var hV=nH,dV=_H;uV.default=function(t,e){return hV.default.lang.round(dV.default.parse(t)[e])};var fV={};Object.defineProperty(fV,"__esModule",{value:!0});var pV=uV;fV.default=function(t){return pV.default(t,"r")};var gV={};Object.defineProperty(gV,"__esModule",{value:!0});var yV=uV;gV.default=function(t){return yV.default(t,"g")};var mV={};Object.defineProperty(mV,"__esModule",{value:!0});var vV=uV;mV.default=function(t){return vV.default(t,"b")};var bV={};Object.defineProperty(bV,"__esModule",{value:!0});var _V=uV;bV.default=function(t){return _V.default(t,"h")};var wV={};Object.defineProperty(wV,"__esModule",{value:!0});var xV=uV;wV.default=function(t){return xV.default(t,"s")};var kV={};Object.defineProperty(kV,"__esModule",{value:!0});var CV=uV;kV.default=function(t){return CV.default(t,"l")};var TV={};Object.defineProperty(TV,"__esModule",{value:!0});var EV=uV;TV.default=function(t){return EV.default(t,"a")};var SV={},OV={};Object.defineProperty(OV,"__esModule",{value:!0});var AV=nH,MV=_H;OV.default=function(t){var e=MV.default.parse(t),n=e.r,r=e.g,i=e.b,a=.2126*AV.default.channel.toLinear(n)+.7152*AV.default.channel.toLinear(r)+.0722*AV.default.channel.toLinear(i);return AV.default.lang.round(a)},Object.defineProperty(SV,"__esModule",{value:!0});var DV=nH,jV=OV;SV.default=function(t,e){var n=jV.default(t),r=jV.default(e),i=Math.max(n,r),a=Math.min(n,r),o=(i+Number.EPSILON)/(a+Number.EPSILON);return DV.default.lang.round(DV.default.lang.clamp(o,1,10))};var NV={},BV={};Object.defineProperty(BV,"__esModule",{value:!0});var LV=OV;BV.default=function(t){return LV.default(t)>=.5},Object.defineProperty(NV,"__esModule",{value:!0});var RV=BV;NV.default=function(t){return!RV.default(t)};var IV={};Object.defineProperty(IV,"__esModule",{value:!0});var FV=_H;IV.default=function(t){try{return FV.default.parse(t),!0}catch(e){return!1}};var PV={},YV={};Object.defineProperty(YV,"__esModule",{value:!0});var zV=nH,UV=_H;YV.default=function(t,e,n){var r=UV.default.parse(t),i=r[e],a=zV.default.channel.clamp[e](i+n);return i!==a&&(r[e]=a),UV.default.stringify(r)},Object.defineProperty(PV,"__esModule",{value:!0});var $V=YV;PV.default=function(t,e){return $V.default(t,"s",e)};var WV={};Object.defineProperty(WV,"__esModule",{value:!0});var qV=YV;WV.default=function(t,e){return qV.default(t,"s",-e)};var HV={};Object.defineProperty(HV,"__esModule",{value:!0});var VV=YV;HV.default=function(t,e){return VV.default(t,"l",e)};var GV={};Object.defineProperty(GV,"__esModule",{value:!0});var XV=YV;GV.default=function(t,e){return XV.default(t,"l",-e)};var ZV={};Object.defineProperty(ZV,"__esModule",{value:!0});var QV=YV;ZV.default=function(t,e){return QV.default(t,"a",e)};var KV={};Object.defineProperty(KV,"__esModule",{value:!0});var JV=YV;KV.default=function(t,e){return JV.default(t,"a",-e)};var tG={};Object.defineProperty(tG,"__esModule",{value:!0});var eG=YV;tG.default=function(t){return eG.default(t,"h",180)};var nG={};Object.defineProperty(nG,"__esModule",{value:!0});var rG=qH;nG.default=function(t){return rG.default(t,{s:0})};var iG={};Object.defineProperty(iG,"__esModule",{value:!0});var aG=_H,oG=qH;iG.default=function(t,e){var n=aG.default.parse(t),r={};for(var i in e)e[i]&&(r[i]=n[i]+e[i]);return oG.default(t,r)};var sG={},cG={};Object.defineProperty(cG,"__esModule",{value:!0});var lG=_H,uG=eH;cG.default=function(t,e,n){void 0===n&&(n=50);var r=lG.default.parse(t),i=r.r,a=r.g,o=r.b,s=r.a,c=lG.default.parse(e),l=c.r,u=c.g,h=c.b,d=c.a,f=n/100,p=2*f-1,g=s-d,y=((p*g==-1?p:(p+g)/(1+p*g))+1)/2,m=1-y,v=i*y+l*m,b=a*y+u*m,_=o*y+h*m,w=s*f+d*(1-f);return uG.default(v,b,_,w)},Object.defineProperty(sG,"__esModule",{value:!0});var hG=_H,dG=cG;sG.default=function(t,e){void 0===e&&(e=100);var n=hG.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,dG.default(n,t,e)};var fG={};Object.defineProperty(fG,"__esModule",{value:!0});var pG=nH,gG=_H,yG=iG;fG.default=function(t,e){var n,r,i,a=gG.default.parse(t),o={};for(var s in e)o[s]=(n=a[s],r=e[s],i=pG.default.channel.max[s],r>0?(i-n)*r/100:n*r/100);return yG.default(t,o)},Object.defineProperty(tH,"__esModule",{value:!0});var mG=eH;tH.hex=mG.default;var vG=eH;tH.rgb=vG.default;var bG=eH;tH.rgba=bG.default;var _G=KH;tH.hsl=_G.default;var wG=KH;tH.hsla=wG.default;var xG=nV;tH.toKeyword=xG.default;var kG=iV;tH.toHex=kG.default;var CG=oV;tH.toRgba=CG.default;var TG=cV;tH.toHsla=TG.default;var EG=uV;tH.channel=EG.default;var SG=fV;tH.red=SG.default;var OG=gV;tH.green=OG.default;var AG=mV;tH.blue=AG.default;var MG=bV;tH.hue=MG.default;var DG=wV;tH.saturation=DG.default;var jG=kV;tH.lightness=jG.default;var NG=TV;tH.alpha=NG.default;var BG=TV;tH.opacity=BG.default;var LG=SV;tH.contrast=LG.default;var RG=OV;tH.luminance=RG.default;var IG=NV;tH.isDark=IG.default;var FG=BV;tH.isLight=FG.default;var PG=IV;tH.isValid=PG.default;var YG=PV;tH.saturate=YG.default;var zG=WV;tH.desaturate=zG.default;var UG=HV;tH.lighten=UG.default;var $G=GV;tH.darken=$G.default;var WG=ZV;tH.opacify=WG.default;var qG=ZV;tH.fadeIn=qG.default;var HG=KV;tH.transparentize=HG.default;var VG=KV;tH.fadeOut=VG.default;var GG=tG;tH.complement=GG.default;var XG=nG;tH.grayscale=XG.default;var ZG=iG;tH.adjust=ZG.default;var QG=qH;tH.change=QG.default;var KG=sG;tH.invert=KG.default;var JG=cG;tH.mix=JG.default;var tX=fG;tH.scale=tX.default,function(t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(tH)}(Jq);var eX={exports:{}};!function(t,e){t.exports=function(){var e,n;function r(){return e.apply(null,arguments)}function i(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 o(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 l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function u(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)u(e,n)&&(t[n]=e[n]);return u(e,"toString")&&(t.toString=e.toString),u(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return Oe(t,e,n,r,!0).utc()}function f(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 p(t){if(null==t._isValid){var e=f(t),r=n.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&&r);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(f(e),t):f(e).userInvalidated=!0,e}n=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 y=r.momentProperties=[];function m(t,e){var n,r,i;if(o(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),o(e._i)||(t._i=e._i),o(e._f)||(t._f=e._f),o(e._l)||(t._l=e._l),o(e._strict)||(t._strict=e._strict),o(e._tzm)||(t._tzm=e._tzm),o(e._isUTC)||(t._isUTC=e._isUTC),o(e._offset)||(t._offset=e._offset),o(e._pf)||(t._pf=f(e)),o(e._locale)||(t._locale=e._locale),0<y.length)for(n=0;n<y.length;n++)o(i=e[r=y[n]])||(t[r]=i);return t}var v=!1;function b(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,r.updateOffset(this),v=!1)}function _(t){return t instanceof b||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function x(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function k(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&&x(t[r])!==x(e[r]))&&o++;return o+a}function C(t){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function T(t,e){var n=!0;return h((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,t),n){for(var i,a=[],o=0;o<arguments.length;o++){if(i="","object"==typeof arguments[o]){for(var s in i+="\n["+o+"] ",arguments[0])i+=s+": "+arguments[0][s]+", ";i=i.slice(0,-2)}else i=arguments[o];a.push(i)}C(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var E,S={};function O(t,e){null!=r.deprecationHandler&&r.deprecationHandler(t,e),S[t]||(C(e),S[t]=!0)}function A(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function M(t,e){var n,r=h({},t);for(n in e)u(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)u(t,n)&&!u(e,n)&&a(t[n])&&(r[n]=h({},r[n]));return r}function D(t){null!=t&&this.set(t)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,E=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)u(t,e)&&n.push(e);return n};var j={};function N(t,e){var n=t.toLowerCase();j[n]=j[n+"s"]=j[e]=t}function B(t){return"string"==typeof t?j[t]||j[t.toLowerCase()]:void 0}function L(t){var e,n,r={};for(n in t)u(t,n)&&(e=B(n))&&(r[e]=t[n]);return r}var R={};function I(t,e){R[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 P=/(\[[^\[]*\])|(\\)?([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,Y=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},U={};function $(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(U[t]=i),e&&(U[e[0]]=function(){return F(i.apply(this,arguments),e[1],e[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=q(e,t.localeData()),z[e]=z[e]||function(t){var e,n,r,i=t.match(P);for(e=0,n=i.length;e<n;e++)U[i[e]]?i[e]=U[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+=A(i[r])?i[r].call(e,t):i[r];return a}}(e),z[e](t)):t.localeData().invalidDate()}function q(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(Y.lastIndex=0;0<=n&&Y.test(t);)t=t.replace(Y,r),Y.lastIndex=0,n-=1;return t}var H=/\d/,V=/\d\d/,G=/\d{3}/,X=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,K=/\d\d\d\d?/,J=/\d\d\d\d\d\d?/,tt=/\d{1,3}/,et=/\d{1,4}/,nt=/[+-]?\d{1,6}/,rt=/\d+/,it=/[+-]?\d+/,at=/Z|[+-]\d\d:?\d\d/gi,ot=/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 lt(t,e,n){ct[t]=A(e)?e:function(t,r){return t&&n?n:e}}function ut(t,e){return u(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 ft(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),s(e)&&(r=function(t,n){n[e]=x(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function pt(t,e){ft(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}var gt=0,yt=1,mt=2,vt=3,bt=4,_t=5,wt=6,xt=7,kt=8;function Ct(t){return Tt(t)?366:365}function Tt(t){return t%4==0&&t%100!=0||t%400==0}$("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),$(0,["YY",2],0,(function(){return this.year()%100})),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),N("year","y"),I("year",1),lt("Y",it),lt("YY",Q,V),lt("YYYY",et,X),lt("YYYYY",nt,Z),lt("YYYYYY",nt,Z),ft(["YYYYY","YYYYYY"],gt),ft("YYYY",(function(t,e){e[gt]=2===t.length?r.parseTwoDigitYear(t):x(t)})),ft("YY",(function(t,e){e[gt]=r.parseTwoDigitYear(t)})),ft("Y",(function(t,e){e[gt]=parseInt(t,10)})),r.parseTwoDigitYear=function(t){return x(t)+(68<x(t)?1900:2e3)};var Et,St=Ot("FullYear",!0);function Ot(t,e){return function(n){return null!=n?(Mt(this,t,n),r.updateOffset(this,e),this):At(this,t)}}function At(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Mt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&Tt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Dt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Dt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,r=(e%(n=12)+n)%n;return t+=(e-r)/12,1===r?Tt(t)?29:28:31-r%7%2}Et=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},$("M",["MM",2],"Mo",(function(){return this.month()+1})),$("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),$("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),N("month","M"),I("month",8),lt("M",Q),lt("MM",Q,V),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),ft(["M","MM"],(function(t,e){e[yt]=x(t)-1})),ft(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[yt]=i:f(n).invalidMonth=t}));var jt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Bt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Lt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=x(e);else if(!s(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Dt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Rt(t){return null!=t?(Lt(this,t),r.updateOffset(this,!0),this):At(this,"Month")}var It=st,Ft=st;function Pt(){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 Yt(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 zt(t,e,n){var r=7+e-n;return-(7+Yt(t,0,r).getUTCDay()-e)%7+r-1}function Ut(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+zt(t,r,i);return o=s<=0?Ct(a=t-1)+s:s>Ct(t)?(a=t+1,s-Ct(t)):(a=t,s),{year:a,dayOfYear:o}}function $t(t,e,n){var r,i,a=zt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Wt(i=t.year()-1,e,n):o>Wt(t.year(),e,n)?(r=o-Wt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Wt(t,e,n){var r=zt(t,e,n),i=zt(t+1,e,n);return(Ct(t)-r+i)/7}function qt(t,e){return t.slice(e,7).concat(t.slice(0,e))}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),I("week",5),I("isoWeek",5),lt("w",Q),lt("ww",Q,V),lt("W",Q),lt("WW",Q,V),pt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=x(t)})),$("d",0,"do","day"),$("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),$("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),$("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),I("day",11),I("weekday",11),I("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)})),pt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:f(n).invalidWeekday=t})),pt(["d","e","E"],(function(t,e,n,r){e[r]=x(t)}));var Ht="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Vt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Gt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xt=st,Zt=st,Qt=st;function Kt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],l=[];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),c.push(a),l.push(r),l.push(i),l.push(a);for(o.sort(t),s.sort(t),c.sort(t),l.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),c[e]=ht(c[e]),l[e]=ht(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Jt(){return this.hours()%12||12}function te(t,e){$(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function ee(t,e){return e._meridiemParse}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Jt),$("k",["kk",2],0,(function(){return this.hours()||24})),$("hmm",0,0,(function(){return""+Jt.apply(this)+F(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+Jt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),te("a",!0),te("A",!1),N("hour","h"),I("hour",13),lt("a",ee),lt("A",ee),lt("H",Q),lt("h",Q),lt("k",Q),lt("HH",Q,V),lt("hh",Q,V),lt("kk",Q,V),lt("hmm",K),lt("hmmss",J),lt("Hmm",K),lt("Hmmss",J),ft(["H","HH"],vt),ft(["k","kk"],(function(t,e,n){var r=x(t);e[vt]=24===r?0:r})),ft(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),ft(["h","hh"],(function(t,e,n){e[vt]=x(t),f(n).bigHour=!0})),ft("hmm",(function(t,e,n){var r=t.length-2;e[vt]=x(t.substr(0,r)),e[bt]=x(t.substr(r)),f(n).bigHour=!0})),ft("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[vt]=x(t.substr(0,r)),e[bt]=x(t.substr(r,2)),e[_t]=x(t.substr(i)),f(n).bigHour=!0})),ft("Hmm",(function(t,e,n){var r=t.length-2;e[vt]=x(t.substr(0,r)),e[bt]=x(t.substr(r))})),ft("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[vt]=x(t.substr(0,r)),e[bt]=x(t.substr(r,2)),e[_t]=x(t.substr(i))}));var ne,re=Ot("Hours",!0),ie={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:Nt,monthsShort:Bt,week:{dow:0,doy:6},weekdays:Ht,weekdaysMin:Gt,weekdaysShort:Vt,meridiemParse:/[ap]\.?m?\.?/i},ae={},oe={};function se(t){return t?t.toLowerCase().replace("_","-"):t}function ce(e){var n=null;if(!ae[e]&&t&&t.exports)try{n=ne._abbr,_a("./locale/"+e),le(n)}catch(r){}return ae[e]}function le(t,e){var n;return t&&((n=o(e)?he(t):ue(t,e))?ne=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ne._abbr}function ue(t,e){if(null===e)return delete ae[t],null;var n,r=ie;if(e.abbr=t,null!=ae[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=ae[t]._config;else if(null!=e.parentLocale)if(null!=ae[e.parentLocale])r=ae[e.parentLocale]._config;else{if(null==(n=ce(e.parentLocale)))return oe[e.parentLocale]||(oe[e.parentLocale]=[]),oe[e.parentLocale].push({name:t,config:e}),null;r=n._config}return ae[t]=new D(M(r,e)),oe[t]&&oe[t].forEach((function(t){ue(t.name,t.config)})),le(t),ae[t]}function he(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ne;if(!i(t)){if(e=ce(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=se(t[a]).split("-")).length,n=(n=se(t[a+1]))?n.split("-"):null;0<e;){if(r=ce(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&k(i,n,!0)>=e-1)break;e--}a++}return ne}(t)}function de(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[yt]<0||11<n[yt]?yt:n[mt]<1||n[mt]>Dt(n[gt],n[yt])?mt:n[vt]<0||24<n[vt]||24===n[vt]&&(0!==n[bt]||0!==n[_t]||0!==n[wt])?vt:n[bt]<0||59<n[bt]?bt:n[_t]<0||59<n[_t]?_t:n[wt]<0||999<n[wt]?wt:-1,f(t)._overflowDayOfYear&&(e<gt||mt<e)&&(e=mt),f(t)._overflowWeeks&&-1===e&&(e=xt),f(t)._overflowWeekday&&-1===e&&(e=kt),f(t).overflow=e),t}function fe(t,e,n){return null!=t?t:null!=e?e:n}function pe(t){var e,n,i,a,o,s=[];if(!t._d){var c,l;for(c=t,l=new Date(r.now()),i=c._useUTC?[l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()]:[l.getFullYear(),l.getMonth(),l.getDate()],t._w&&null==t._a[mt]&&null==t._a[yt]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=fe(e.GG,t._a[gt],$t(Ae(),1,4).year),r=fe(e.W,1),((i=fe(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var l=$t(Ae(),a,o);n=fe(e.gg,t._a[gt],l.year),r=fe(e.w,l.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Wt(n,a,o)?f(t)._overflowWeeks=!0:null!=c?f(t)._overflowWeekday=!0:(s=Ut(n,r,i,a,o),t._a[gt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=fe(t._a[gt],i[gt]),(t._dayOfYear>Ct(o)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=Yt(o,0,t._dayOfYear),t._a[yt]=n.getUTCMonth(),t._a[mt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[bt]&&0===t._a[_t]&&0===t._a[wt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?Yt: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[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(f(t).weekdayMismatch=!0)}}var ge=/^\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)?)?$/,ye=/^\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)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,ve=[["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}/]],be=[["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/]],_e=/^\/?Date\((\-?\d+)/i;function we(t){var e,n,r,i,a,o,s=t._i,c=ge.exec(s)||ye.exec(s);if(c){for(f(t).iso=!0,e=0,n=ve.length;e<n;e++)if(ve[e][1].exec(c[1])){i=ve[e][0],r=!1!==ve[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=be.length;e<n;e++)if(be[e][1].exec(c[3])){a=(c[2]||" ")+be[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!me.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),Ee(t)}else t._isValid=!1}var xe=/^(?:(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}))$/;function ke(t,e,n,r,i,a){var o,s,c=[(o=t,s=parseInt(o,10),s<=49?2e3+s:s<=999?1900+s:s),Bt.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&c.push(parseInt(a,10)),c}var Ce={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Te(t){var e,n,r,i=xe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=ke(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&Vt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(f(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return Ce[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=Yt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function Ee(t){if(t._f!==r.ISO_8601)if(t._f!==r.RFC_2822){t._a=[],f(t).empty=!0;var e,n,i,a,o,s,c,l,h=""+t._i,d=h.length,p=0;for(i=q(t._f,t._locale).match(P)||[],e=0;e<i.length;e++)a=i[e],(n=(h.match(ut(a,t))||[])[0])&&(0<(o=h.substr(0,h.indexOf(n))).length&&f(t).unusedInput.push(o),h=h.slice(h.indexOf(n)+n.length),p+=n.length),U[a]?(n?f(t).empty=!1:f(t).unusedTokens.push(a),s=a,l=t,null!=(c=n)&&u(dt,s)&&dt[s](c,l._a,l,s)):t._strict&&!n&&f(t).unusedTokens.push(a);f(t).charsLeftOver=d-p,0<h.length&&f(t).unusedInput.push(h),t._a[vt]<=12&&!0===f(t).bigHour&&0<t._a[vt]&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[vt]=(g=t._locale,y=t._a[vt],null==(m=t._meridiem)?y:null!=g.meridiemHour?g.meridiemHour(y,m):(null!=g.isPM&&((v=g.isPM(m))&&y<12&&(y+=12),v||12!==y||(y=0)),y)),pe(t),de(t)}else Te(t);else we(t);var g,y,m,v}function Se(t){var e,n,u,d,y=t._i,v=t._f;return t._locale=t._locale||he(t._l),null===y||void 0===v&&""===y?g({nullInput:!0}):("string"==typeof y&&(t._i=y=t._locale.preparse(y)),_(y)?new b(de(y)):(c(y)?t._d=y:i(v)?function(t){var e,n,r,i,a;if(0===t._f.length)return f(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=m({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Ee(e),p(e)&&(a+=f(e).charsLeftOver,a+=10*f(e).unusedTokens.length,f(e).score=a,(null==r||a<r)&&(r=a,n=e));h(t,n||e)}(t):v?Ee(t):o(n=(e=t)._i)?e._d=new Date(r.now()):c(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(u=e,null===(d=_e.exec(u._i))?(we(u),!1===u._isValid&&(delete u._isValid,Te(u),!1===u._isValid&&(delete u._isValid,r.createFromInputFallback(u)))):u._d=new Date(+d[1])):i(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),pe(e)):a(n)?function(t){if(!t._d){var e=L(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)})),pe(t)}}(e):s(n)?e._d=new Date(n):r.createFromInputFallback(e),p(t)||(t._d=null),t))}function Oe(t,e,n,r,o){var s,c={};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)||i(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new b(de(Se(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ae(t,e,n,r){return Oe(t,e,n,r,!1)}r.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":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Me=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Ae.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()})),De=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Ae.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:g()}));function je(t,e){var n,r;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return Ae();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ne=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Be(t){var e=L(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,c=e.minute||0,l=e.second||0,u=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===Et.call(Ne,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ne.length;++r)if(t[Ne[r]]){if(n)return!1;parseFloat(t[Ne[r]])!==x(t[Ne[r]])&&(n=!0)}return!0}(e),this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=he(),this._bubble()}function Le(t){return t instanceof Be}function Re(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ie(t,e){$(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)}))}Ie("Z",":"),Ie("ZZ",""),lt("Z",ot),lt("ZZ",ot),ft(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Pe(ot,t)}));var Fe=/([\+\-]|\d\d)/gi;function Pe(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Fe)||["-",0,0],i=60*r[1]+x(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Ye(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(_(t)||c(t)?t.valueOf():Ae(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Ae(t).local()}function ze(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ue(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var $e=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,We=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qe(t,e){var n,r,i,a,o,c,l=t,h=null;return Le(t)?l={ms:t._milliseconds,d:t._days,M:t._months}:s(t)?(l={},e?l[e]=t:l.milliseconds=t):(h=$e.exec(t))?(n="-"===h[1]?-1:1,l={y:0,d:x(h[mt])*n,h:x(h[vt])*n,m:x(h[bt])*n,s:x(h[_t])*n,ms:x(Re(1e3*h[wt]))*n}):(h=We.exec(t))?(n="-"===h[1]?-1:1,l={y:He(h[2],n),M:He(h[3],n),w:He(h[4],n),d:He(h[5],n),h:He(h[6],n),m:He(h[7],n),s:He(h[8],n)}):null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(a=Ae(l.from),o=Ae(l.to),i=a.isValid()&&o.isValid()?(o=Ye(o,a),a.isBefore(o)?c=Ve(a,o):((c=Ve(o,a)).milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0},(l={}).ms=i.milliseconds,l.M=i.months),r=new Be(l),Le(t)&&u(t,"_locale")&&(r._locale=t._locale),r}function He(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ve(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 Ge(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),Xe(this,qe(n="string"==typeof n?+n:n,r),t),this}}function Xe(t,e,n,i){var a=e._milliseconds,o=Re(e._days),s=Re(e._months);t.isValid()&&(i=null==i||i,s&&Lt(t,At(t,"Month")+s*n),o&&Mt(t,"Date",At(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),i&&r.updateOffset(t,o||s))}qe.fn=Be.prototype,qe.invalid=function(){return qe(NaN)};var Ze=Ge(1,"add"),Qe=Ge(-1,"subtract");function Ke(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 Je(t){var e;return void 0===t?this._locale._abbr:(null!=(e=he(t))&&(this._locale=e),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tn=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 en(){return this._locale}var nn=126227808e5;function rn(t,e){return(t%e+e)%e}function an(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-nn:new Date(t,e,n).valueOf()}function on(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-nn:Date.UTC(t,e,n)}function sn(t,e){$(0,[t,t.length],0,e)}function cn(t,e,n,r,i){var a;return null==t?$t(this,r,i).year:((a=Wt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Ut(t,e,n,r,i),o=Yt(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))}$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),lt("G",it),lt("g",it),lt("GG",Q,V),lt("gg",Q,V),lt("GGGG",et,X),lt("gggg",et,X),lt("GGGGG",nt,Z),lt("ggggg",nt,Z),pt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=x(t)})),pt(["gg","GG"],(function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)})),$("Q",0,"Qo","quarter"),N("quarter","Q"),I("quarter",7),lt("Q",H),ft("Q",(function(t,e){e[yt]=3*(x(t)-1)})),$("D",["DD",2],"Do","date"),N("date","D"),I("date",9),lt("D",Q),lt("DD",Q,V),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),ft(["D","DD"],mt),ft("Do",(function(t,e){e[mt]=x(t.match(Q)[0])}));var ln=Ot("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),I("dayOfYear",4),lt("DDD",tt),lt("DDDD",G),ft(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=x(t)})),$("m",["mm",2],0,"minute"),N("minute","m"),I("minute",14),lt("m",Q),lt("mm",Q,V),ft(["m","mm"],bt);var un=Ot("Minutes",!1);$("s",["ss",2],0,"second"),N("second","s"),I("second",15),lt("s",Q),lt("ss",Q,V),ft(["s","ss"],_t);var hn,dn=Ot("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),N("millisecond","ms"),I("millisecond",16),lt("S",tt,H),lt("SS",tt,V),lt("SSS",tt,G),hn="SSSS";hn.length<=9;hn+="S")lt(hn,rt);function fn(t,e){e[wt]=x(1e3*("0."+t))}for(hn="S";hn.length<=9;hn+="S")ft(hn,fn);var pn=Ot("Milliseconds",!1);$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var gn=b.prototype;function yn(t){return t}gn.add=Ze,gn.calendar=function(t,e){var n=t||Ae(),i=Ye(n,this).startOf("day"),a=r.calendarFormat(this,i)||"sameElse",o=e&&(A(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,Ae(n)))},gn.clone=function(){return new b(this)},gn.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Ye(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=B(e)){case"year":a=Ke(this,r)/12;break;case"month":a=Ke(this,r);break;case"quarter":a=Ke(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)},gn.endOf=function(t){var e;if(void 0===(t=B(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?on:an;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-rn(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-rn(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-rn(e,1e3)-1}return this._d.setTime(e),r.updateOffset(this,!0),this},gn.format=function(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},gn.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||Ae(t).isValid())?qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gn.fromNow=function(t){return this.from(Ae(),t)},gn.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||Ae(t).isValid())?qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gn.toNow=function(t){return this.to(Ae(),t)},gn.get=function(t){return A(this[t=B(t)])?this[t]():this},gn.invalidAt=function(){return f(this).overflow},gn.isAfter=function(t,e){var n=_(t)?t:Ae(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=B(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},gn.isBefore=function(t,e){var n=_(t)?t:Ae(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=B(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},gn.isBetween=function(t,e,n,r){var i=_(t)?t:Ae(t),a=_(e)?e:Ae(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))},gn.isSame=function(t,e){var n,r=_(t)?t:Ae(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=B(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},gn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},gn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},gn.isValid=function(){return p(this)},gn.lang=tn,gn.locale=Je,gn.localeData=en,gn.max=De,gn.min=Me,gn.parsingFlags=function(){return h({},f(this))},gn.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=L(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(A(this[t=B(t)]))return this[t](e);return this},gn.startOf=function(t){var e;if(void 0===(t=B(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?on:an;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-=rn(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=rn(e,6e4);break;case"second":e=this._d.valueOf(),e-=rn(e,1e3)}return this._d.setTime(e),r.updateOffset(this,!0),this},gn.subtract=Qe,gn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},gn.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()}},gn.toDate=function(){return new Date(this.valueOf())},gn.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()?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gn.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)},gn.toJSON=function(){return this.isValid()?this.toISOString():null},gn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gn.unix=function(){return Math.floor(this.valueOf()/1e3)},gn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gn.year=St,gn.isLeapYear=function(){return Tt(this.year())},gn.weekYear=function(t){return cn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},gn.isoWeekYear=function(t){return cn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},gn.quarter=gn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},gn.month=Rt,gn.daysInMonth=function(){return Dt(this.year(),this.month())},gn.week=gn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},gn.isoWeek=gn.isoWeeks=function(t){var e=$t(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},gn.weeksInYear=function(){var t=this.localeData()._week;return Wt(this.year(),t.dow,t.doy)},gn.isoWeeksInYear=function(){return Wt(this.year(),1,4)},gn.date=ln,gn.day=gn.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},gn.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")},gn.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)},gn.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")},gn.hour=gn.hours=re,gn.minute=gn.minutes=un,gn.second=gn.seconds=dn,gn.millisecond=gn.milliseconds=pn,gn.utcOffset=function(t,e,n){var i,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:ze(this);if("string"==typeof t){if(null===(t=Pe(ot,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=ze(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==t&&(!e||this._changeInProgress?Xe(this,qe(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this},gn.utc=function(t){return this.utcOffset(0,t)},gn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(ze(this),"m")),this},gn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Pe(at,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},gn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Ae(t).utcOffset():0,(this.utcOffset()-t)%60==0)},gn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gn.isLocal=function(){return!!this.isValid()&&!this._isUTC},gn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gn.isUtc=Ue,gn.isUTC=Ue,gn.zoneAbbr=function(){return this._isUTC?"UTC":""},gn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gn.dates=T("dates accessor is deprecated. Use date instead.",ln),gn.months=T("months accessor is deprecated. Use month instead",Rt),gn.years=T("years accessor is deprecated. Use year instead",St),gn.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()})),gn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=Se(t))._a){var e=t._isUTC?d(t._a):Ae(t._a);this._isDSTShifted=this.isValid()&&0<k(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var mn=D.prototype;function vn(t,e,n,r){var i=he(),a=d().set(r,e);return i[n](a,t)}function bn(t,e,n){if(s(t)&&(e=t,t=void 0),t=t||"",null!=e)return vn(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=vn(t,r,n,"month");return i}function _n(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,a=he(),o=t?a._week.dow:0;if(null!=n)return vn(e,(n+o)%7,r,"day");var c=[];for(i=0;i<7;i++)c[i]=vn(e,(i+o)%7,r,"day");return c}mn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return A(r)?r.call(e,n):r},mn.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])},mn.invalidDate=function(){return this._invalidDate},mn.ordinal=function(t){return this._ordinal.replace("%d",t)},mn.preparse=yn,mn.postformat=yn,mn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return A(i)?i(t,e,n,r):i.replace(/%d/i,t)},mn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return A(n)?n(e):n.replace(/%s/i,e)},mn.set=function(t){var e,n;for(n in t)A(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)},mn.months=function(t,e){return t?i(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||jt).test(e)?"format":"standalone"][t.month()]:i(this._months)?this._months:this._months.standalone},mn.monthsShort=function(t,e){return t?i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[jt.test(e)?"format":"standalone"][t.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},mn.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=Et.call(this._shortMonthsParse,o))?i:null:-1!==(i=Et.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=Et.call(this._shortMonthsParse,o))||-1!==(i=Et.call(this._longMonthsParse,o))?i:null:-1!==(i=Et.call(this._longMonthsParse,o))||-1!==(i=Et.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}},mn.monthsRegex=function(t){return this._monthsParseExact?(u(this,"_monthsRegex")||Pt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=Ft),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},mn.monthsShortRegex=function(t){return this._monthsParseExact?(u(this,"_monthsRegex")||Pt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=It),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},mn.week=function(t){return $t(t,this._week.dow,this._week.doy).week},mn.firstDayOfYear=function(){return this._week.doy},mn.firstDayOfWeek=function(){return this._week.dow},mn.weekdays=function(t,e){var n=i(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?qt(n,this._week.dow):t?n[t.day()]:n},mn.weekdaysMin=function(t){return!0===t?qt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},mn.weekdaysShort=function(t){return!0===t?qt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},mn.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=Et.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Et.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Et.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=Et.call(this._weekdaysParse,o))||-1!==(i=Et.call(this._shortWeekdaysParse,o))||-1!==(i=Et.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Et.call(this._shortWeekdaysParse,o))||-1!==(i=Et.call(this._weekdaysParse,o))||-1!==(i=Et.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Et.call(this._minWeekdaysParse,o))||-1!==(i=Et.call(this._weekdaysParse,o))||-1!==(i=Et.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}},mn.weekdaysRegex=function(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Xt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},mn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},mn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Kt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},mn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},mn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},le("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===x(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),r.lang=T("moment.lang is deprecated. Use moment.locale instead.",le),r.langData=T("moment.langData is deprecated. Use moment.localeData instead.",he);var wn=Math.abs;function xn(t,e,n,r){var i=qe(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function kn(t){return t<0?Math.floor(t):Math.ceil(t)}function Cn(t){return 4800*t/146097}function Tn(t){return 146097*t/4800}function En(t){return function(){return this.as(t)}}var Sn=En("ms"),On=En("s"),An=En("m"),Mn=En("h"),Dn=En("d"),jn=En("w"),Nn=En("M"),Bn=En("Q"),Ln=En("y");function Rn(t){return function(){return this.isValid()?this._data[t]:NaN}}var In=Rn("milliseconds"),Fn=Rn("seconds"),Pn=Rn("minutes"),Yn=Rn("hours"),zn=Rn("days"),Un=Rn("months"),$n=Rn("years"),Wn=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,M:11},Hn=Math.abs;function Vn(t){return(0<t)-(t<0)||+t}function Gn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Hn(this._milliseconds)/1e3,r=Hn(this._days),i=Hn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var a=w(i/12),o=i%=12,s=r,c=e,l=t,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var d=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",p=Vn(this._days)!==Vn(h)?"-":"",g=Vn(this._milliseconds)!==Vn(h)?"-":"";return d+"P"+(a?f+a+"Y":"")+(o?f+o+"M":"")+(s?p+s+"D":"")+(c||l||u?"T":"")+(c?g+c+"H":"")+(l?g+l+"M":"")+(u?g+u+"S":"")}var Xn=Be.prototype;return Xn.isValid=function(){return this._isValid},Xn.abs=function(){var t=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),t.milliseconds=wn(t.milliseconds),t.seconds=wn(t.seconds),t.minutes=wn(t.minutes),t.hours=wn(t.hours),t.months=wn(t.months),t.years=wn(t.years),this},Xn.add=function(t,e){return xn(this,t,e,1)},Xn.subtract=function(t,e){return xn(this,t,e,-1)},Xn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=B(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+Cn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Tn(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)}},Xn.asMilliseconds=Sn,Xn.asSeconds=On,Xn.asMinutes=An,Xn.asHours=Mn,Xn.asDays=Dn,Xn.asWeeks=jn,Xn.asMonths=Nn,Xn.asQuarters=Bn,Xn.asYears=Ln,Xn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},Xn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*kn(Tn(s)+o),s=o=0),c.milliseconds=a%1e3,t=w(a/1e3),c.seconds=t%60,e=w(t/60),c.minutes=e%60,n=w(e/60),c.hours=n%24,s+=i=w(Cn(o+=w(n/24))),o-=kn(Tn(i)),r=w(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Xn.clone=function(){return qe(this)},Xn.get=function(t){return t=B(t),this.isValid()?this[t+"s"]():NaN},Xn.milliseconds=In,Xn.seconds=Fn,Xn.minutes=Pn,Xn.hours=Yn,Xn.days=zn,Xn.weeks=function(){return w(this.days()/7)},Xn.months=Un,Xn.years=$n,Xn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,l,u,h,d=this.localeData(),f=(n=!t,r=d,i=qe(e=this).abs(),a=Wn(i.as("s")),o=Wn(i.as("m")),s=Wn(i.as("h")),c=Wn(i.as("d")),l=Wn(i.as("M")),u=Wn(i.as("y")),(h=a<=qn.ss&&["s",a]||a<qn.s&&["ss",a]||o<=1&&["m"]||o<qn.m&&["mm",o]||s<=1&&["h"]||s<qn.h&&["hh",s]||c<=1&&["d"]||c<qn.d&&["dd",c]||l<=1&&["M"]||l<qn.M&&["MM",l]||u<=1&&["y"]||["yy",u])[2]=n,h[3]=0<+e,h[4]=r,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,h));return t&&(f=d.pastFuture(+this,f)),d.postformat(f)},Xn.toISOString=Gn,Xn.toString=Gn,Xn.toJSON=Gn,Xn.locale=Je,Xn.localeData=en,Xn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gn),Xn.lang=tn,$("X",0,0,"unix"),$("x",0,0,"valueOf"),lt("x",it),lt("X",/[+-]?\d+(\.\d{1,3})?/),ft("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),ft("x",(function(t,e,n){n._d=new Date(x(t))})),r.version="2.24.0",e=Ae,r.fn=gn,r.min=function(){return je("isBefore",[].slice.call(arguments,0))},r.max=function(){return je("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=d,r.unix=function(t){return Ae(1e3*t)},r.months=function(t,e){return bn(t,e,"months")},r.isDate=c,r.locale=le,r.invalid=g,r.duration=qe,r.isMoment=_,r.weekdays=function(t,e,n){return _n(t,e,n,"weekdays")},r.parseZone=function(){return Ae.apply(null,arguments).parseZone()},r.localeData=he,r.isDuration=Le,r.monthsShort=function(t,e){return bn(t,e,"monthsShort")},r.weekdaysMin=function(t,e,n){return _n(t,e,n,"weekdaysMin")},r.defineLocale=ue,r.updateLocale=function(t,e){if(null!=e){var n,r,i=ie;null!=(r=ce(t))&&(i=r._config),(n=new D(e=M(i,e))).parentLocale=ae[t],ae[t]=n,le(t)}else null!=ae[t]&&(null!=ae[t].parentLocale?ae[t]=ae[t].parentLocale:null!=ae[t]&&delete ae[t]);return ae[t]},r.locales=function(){return E(ae)},r.weekdaysShort=function(t,e,n){return _n(t,e,n,"weekdaysShort")},r.normalizeUnits=B,r.relativeTimeRounding=function(t){return void 0===t?Wn:"function"==typeof t&&(Wn=t,!0)},r.relativeTimeThreshold=function(t,e){return void 0!==qn[t]&&(void 0===e?qn[t]:(qn[t]=e,"s"===t&&(qn.ss=e-1),!0))},r.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"},r.prototype=gn,r.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"},r}()}(eX);var nX={exports:{}};!function(t){var e="-ms-",n="-moz-",r="-webkit-",i="comm",a="rule",o="decl",s="@page",c="@media",l="@import",u="@charset",h="@viewport",d="@supports",f="@document",p="@namespace",g="@keyframes",y="@font-face",m="@counter-style",v="@font-feature-values",b=Math.abs,_=String.fromCharCode;function w(t,e){return(((e<<2^E(t,0))<<2^E(t,1))<<2^E(t,2))<<2^E(t,3)}function x(t){return t.trim()}function k(t,e){return(t=e.exec(t))?t[0]:t}function C(t,e,n){return t.replace(e,n)}function T(t,e){return t.indexOf(e)}function E(t,e){return 0|t.charCodeAt(e)}function S(t,e,n){return t.slice(e,n)}function O(t){return t.length}function A(t){return t.length}function M(t,e){return e.push(t),t}function D(t,e){return t.map(e).join("")}function j(e,n,r,i,a,o,s){return{value:e,root:n,parent:r,type:i,props:a,children:o,line:t.line,column:t.column,length:s,return:""}}function N(t,e,n){return j(t,e.root,e.parent,n,e.props,e.children,0)}function B(){return t.character}function L(){return t.character=t.position>0?E(t.characters,--t.position):0,t.column--,10===t.character&&(t.column=1,t.line--),t.character}function R(){return t.character=t.position<t.length?E(t.characters,t.position++):0,t.column++,10===t.character&&(t.column=1,t.line++),t.character}function I(){return E(t.characters,t.position)}function F(){return t.position}function P(e,n){return S(t.characters,e,n)}function Y(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function z(e){return t.line=t.column=1,t.length=O(t.characters=e),t.position=0,[]}function U(e){return t.characters="",e}function $(e){return x(P(t.position-1,G(91===e?e+2:40===e?e+1:e)))}function W(t){return U(H(z(t)))}function q(e){for(;(t.character=I())&&t.character<33;)R();return Y(e)>2||Y(t.character)>3?"":" "}function H(e){for(;R();)switch(Y(t.character)){case 0:M(Z(t.position-1),e);break;case 2:M($(t.character),e);break;default:M(_(t.character),e)}return e}function V(e,n){for(;--n&&R()&&!(t.character<48||t.character>102||t.character>57&&t.character<65||t.character>70&&t.character<97););return P(e,F()+(n<6&&32==I()&&32==R()))}function G(e){for(;R();)switch(t.character){case e:return t.position;case 34:case 39:return G(34===e||39===e?e:t.character);case 40:41===e&&G(e);break;case 92:R()}return t.position}function X(e,n){for(;R()&&e+t.character!==57&&(e+t.character!==84||47!==I()););return"/*"+P(n,t.position-1)+"*"+_(47===e?e:R())}function Z(e){for(;!Y(I());)R();return P(e,t.position)}function Q(t){return U(K("",null,null,null,[""],t=z(t),0,[0],t))}function K(t,e,n,r,i,a,o,s,c){for(var l=0,u=0,h=o,d=0,f=0,p=0,g=1,y=1,m=1,v=0,b="",w=i,x=a,k=r,T=b;y;)switch(p=v,v=R()){case 34:case 39:case 91:case 40:T+=$(v);break;case 9:case 10:case 13:case 32:T+=q(p);break;case 92:T+=V(F()-1,7);continue;case 47:switch(I()){case 42:case 47:M(tt(X(R(),F()),e,n),c);break;default:T+="/"}break;case 123*g:s[l++]=O(T)*m;case 125*g:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+u:f>0&&O(T)-h&&M(f>32?et(T+";",r,n,h-1):et(C(T," ","")+";",r,n,h-2),c);break;case 59:T+=";";default:if(M(k=J(T,e,n,l,u,i,s,b,w=[],x=[],h),a),123===v)if(0===u)K(T,e,k,k,w,a,h,s,x);else switch(d){case 100:case 109:case 115:K(t,k,k,r&&M(J(t,k,k,0,0,i,s,b,i,w=[],h),x),i,x,h,s,r?w:x);break;default:K(T,k,k,k,[""],x,h,s,x)}}l=u=f=0,g=m=1,b=T="",h=o;break;case 58:h=1+O(T),f=p;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==L())continue;switch(T+=_(v),v*g){case 38:m=u>0?1:(T+="\f",-1);break;case 44:s[l++]=(O(T)-1)*m,m=1;break;case 64:45===I()&&(T+=$(R())),d=I(),u=O(b=T+=Z(F())),v++;break;case 45:45===p&&2==O(T)&&(g=0)}}return a}function J(t,e,n,r,i,o,s,c,l,u,h){for(var d=i-1,f=0===i?o:[""],p=A(f),g=0,y=0,m=0;g<r;++g)for(var v=0,_=S(t,d+1,d=b(y=s[g])),w=t;v<p;++v)(w=x(y>0?f[v]+" "+_:C(_,/&\f/g,f[v])))&&(l[m++]=w);return j(t,e,n,0===i?a:c,l,u,h)}function tt(t,e,n){return j(t,e,n,i,_(B()),S(t,2,-2),0)}function et(t,e,n,r){return j(t,e,n,o,S(t,0,r),S(t,r+1,-1),r)}function nt(t,i){switch(w(t,i)){case 5103:return r+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return r+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return r+t+n+t+e+t+t;case 6828:case 4268:return r+t+e+t+t;case 6165:return r+t+e+"flex-"+t+t;case 5187:return r+t+C(t,/(\w+).+(:[^]+)/,r+"box-$1$2"+e+"flex-$1$2")+t;case 5443:return r+t+e+"flex-item-"+C(t,/flex-|-self/,"")+t;case 4675:return r+t+e+"flex-line-pack"+C(t,/align-content|flex-|-self/,"")+t;case 5548:return r+t+e+C(t,"shrink","negative")+t;case 5292:return r+t+e+C(t,"basis","preferred-size")+t;case 6060:return r+"box-"+C(t,"-grow","")+r+t+e+C(t,"grow","positive")+t;case 4554:return r+C(t,/([^-])(transform)/g,"$1"+r+"$2")+t;case 6187:return C(C(C(t,/(zoom-|grab)/,r+"$1"),/(image-set)/,r+"$1"),t,"")+t;case 5495:case 3959:return C(t,/(image-set\([^]*)/,r+"$1$`$1");case 4968:return C(C(t,/(.+:)(flex-)?(.*)/,r+"box-pack:$3"+e+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+r+t+t;case 4095:case 3583:case 4068:case 2532:return C(t,/(.+)-inline(.+)/,r+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(O(t)-1-i>6)switch(E(t,i+1)){case 109:if(45!==E(t,i+4))break;case 102:return C(t,/(.+:)(.+)-([^]+)/,"$1"+r+"$2-$3$1"+n+(108==E(t,i+3)?"$3":"$2-$3"))+t;case 115:return~T(t,"stretch")?nt(C(t,"stretch","fill-available"),i)+t:t}break;case 4949:if(115!==E(t,i+1))break;case 6444:switch(E(t,O(t)-3-(~T(t,"!important")&&10))){case 107:return C(t,":",":"+r)+t;case 101:return C(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+r+(45===E(t,14)?"inline-":"")+"box$3$1"+r+"$2$3$1"+e+"$2box$3")+t}break;case 5936:switch(E(t,i+11)){case 114:return r+t+e+C(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return r+t+e+C(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return r+t+e+C(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return r+t+e+t+t}return t}function rt(t,e){for(var n="",r=A(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function it(t,e,n,r){switch(t.type){case l:case o:return t.return=t.return||t.value;case i:return"";case a:t.value=t.props.join(",")}return O(n=rt(t.children,r))?t.return=t.value+"{"+n+"}":""}function at(t){var e=A(t);return function(n,r,i,a){for(var o="",s=0;s<e;s++)o+=t[s](n,r,i,a)||"";return o}}function ot(t){return function(e){e.root||(e=e.return)&&t(e)}}function st(t,i,s,c){if(!t.return)switch(t.type){case o:t.return=nt(t.value,t.length);break;case g:return rt([N(C(t.value,"@","@"+r),t,"")],c);case a:if(t.length)return D(t.props,(function(i){switch(k(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return rt([N(C(i,/:(read-\w+)/,":"+n+"$1"),t,"")],c);case"::placeholder":return rt([N(C(i,/:(plac\w+)/,":"+r+"input-$1"),t,""),N(C(i,/:(plac\w+)/,":"+n+"$1"),t,""),N(C(i,/:(plac\w+)/,e+"input-$1"),t,"")],c)}return""}))}}function ct(t){switch(t.type){case a:t.props=t.props.map((function(e){return D(W(e),(function(e,n,r){switch(E(e,0)){case 12:return S(e,1,O(e));case 0:case 40:case 43:case 62:case 126:return e;case 58:"global"===r[++n]&&(r[n]="",r[++n]="\f"+S(r[n],n=1,-1));case 32:return 1===n?"":e;default:switch(n){case 0:return t=e,A(r)>1?"":e;case n=A(r)-1:case 2:return 2===n?e+t+t:e+t;default:return e}}}))}))}}t.line=1,t.column=1,t.length=0,t.position=0,t.character=0,t.characters="",t.CHARSET=u,t.COMMENT=i,t.COUNTER_STYLE=m,t.DECLARATION=o,t.DOCUMENT=f,t.FONT_FACE=y,t.FONT_FEATURE_VALUES=v,t.IMPORT=l,t.KEYFRAMES=g,t.MEDIA=c,t.MOZ=n,t.MS=e,t.NAMESPACE=p,t.PAGE=s,t.RULESET=a,t.SUPPORTS=d,t.VIEWPORT=h,t.WEBKIT=r,t.abs=b,t.alloc=z,t.append=M,t.caret=F,t.char=B,t.charat=E,t.combine=D,t.comment=tt,t.commenter=X,t.compile=Q,t.copy=N,t.dealloc=U,t.declaration=et,t.delimit=$,t.delimiter=G,t.escaping=V,t.from=_,t.hash=w,t.identifier=Z,t.indexof=T,t.match=k,t.middleware=at,t.namespace=ct,t.next=R,t.node=j,t.parse=K,t.peek=I,t.prefix=nt,t.prefixer=st,t.prev=L,t.replace=C,t.ruleset=J,t.rulesheet=ot,t.serialize=rt,t.sizeof=A,t.slice=P,t.stringify=it,t.strlen=O,t.substr=S,t.token=Y,t.tokenize=W,t.tokenizer=H,t.trim=x,t.whitespace=q,Object.defineProperty(t,"__esModule",{value:!0})}(nX.exports),"undefined"!=typeof self&&self,wa.exports=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="./src/mermaid.js")}({"./node_modules/node-libs-browser/mock/empty.js":function(t,e){},"./node_modules/path-browserify/index.js":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,c=0;c<o;c++)if(i[c]!==a[c]){s=c;break}var l=[];for(c=s;c<i.length;c++)l.push("..");return(l=l.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("./node_modules/process/browser.js"))},"./node_modules/process/browser.js":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(lX){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(lX){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(lX){r=o}}();var c,l=[],u=!1,h=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&f())}function f(){if(!u){var t=s(d);u=!0;for(var e=l.length;e;){for(c=l,l=[];++h<e;)c&&c[h].run();h=-1,e=l.length}c=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(lX){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];l.push(new p(t,e)),1!==l.length||u||s(f)},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}},"./node_modules/webpack/buildin/module.js":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}},"./package.json":function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.11.4","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:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md","build:watch":"yarn build --watch","release":"yarn build","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 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","@percy/migrate":"^0.10.0","d3":"^5.7.0","dagre":"^0.8.5","dagre-d3":"^0.6.4","dompurify":"2.3.0","graphlib":"^2.1.8","khroma":"^1.4.1","moment-mini":"^2.24.0","stylis":"^4.0.10"},"devDependencies":{"@babel/core":"^7.14.6","@babel/preset-env":"^7.14.7","@babel/register":"^7.14.5","@percy/cli":"^1.0.0-beta.58","@percy/cypress":"^3.1.0","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.1.0","babel-jest":"^27.0.6","babel-loader":"^8.2.2","coveralls":"^3.0.2","css-to-string-loader":"^0.1.3","cypress":"7.6.0","documentation":"13.2.0","eslint":"^7.30.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","husky":"^7.0.1","identity-obj-proxy":"^3.0.0","jest":"^27.0.6","jison":"^0.4.18","js-base64":"3.6.1","moment":"^2.23.0","prettier":"^2.3.2","start-server-and-test":"^1.12.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^4.4.2","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},"./src/config.js":function(t,e,n){n.r(e),n.d(e,"defaultConfig",(function(){return l})),n.d(e,"updateCurrentConfig",(function(){return f})),n.d(e,"setSiteConfig",(function(){return p})),n.d(e,"saveConfigFromInitilize",(function(){return g})),n.d(e,"updateSiteConfig",(function(){return y})),n.d(e,"getSiteConfig",(function(){return m})),n.d(e,"setConfig",(function(){return v})),n.d(e,"getConfig",(function(){return b})),n.d(e,"sanitize",(function(){return _})),n.d(e,"addDirective",(function(){return w})),n.d(e,"reset",(function(){return x}));var r=n("./src/utils.js"),i=n("./src/logger.js"),a=n("./src/themes/index.js"),o=n("./src/defaultConfig.js");function s(t){return(s="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 c,l=Object.freeze(o.default),u=Object(r.assignWithDepth)({},l),h=[],d=Object(r.assignWithDepth)({},l),f=function(t,e){for(var n=Object(r.assignWithDepth)({},t),i={},o=0;o<e.length;o++){var s=e[o];_(s),i=Object(r.assignWithDepth)(i,s)}if(n=Object(r.assignWithDepth)(n,i),i.theme){var l=Object(r.assignWithDepth)({},c),u=Object(r.assignWithDepth)(l.themeVariables||{},i.themeVariables);n.themeVariables=a.default[n.theme].getThemeVariables(u)}return d=n,n},p=function(t){return u=Object(r.assignWithDepth)({},l),u=Object(r.assignWithDepth)(u,t),t.theme&&(u.themeVariables=a.default[t.theme].getThemeVariables(t.themeVariables)),d=f(u,h),u},g=function(t){c=Object(r.assignWithDepth)({},t)},y=function(t){return u=Object(r.assignWithDepth)(u,t),f(u,h),u},m=function(){return Object(r.assignWithDepth)({},u)},v=function(t){return Object(r.assignWithDepth)(d,t),b()},b=function(){return Object(r.assignWithDepth)({},d)},_=function t(e){Object.keys(u.secure).forEach((function(t){void 0!==e[u.secure[t]]&&(i.log.debug("Denied attempt to modify a secure key ".concat(u.secure[t]),e[u.secure[t]]),delete e[u.secure[t]])})),Object.keys(e).forEach((function(t){0===t.indexOf("__")&&delete e[t]})),Object.keys(e).forEach((function(n){"string"==typeof e[n]&&(e[n].indexOf("<")>-1||e[n].indexOf(">")>-1||e[n].indexOf("url(data:")>-1)&&delete e[n],"object"===s(e[n])&&t(e[n])}))},w=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),h.push(t),f(u,h)},x=function(){f(u,h=[])}},"./src/dagre-wrapper/clusters.js":function(t,e,n){n.r(e),n.d(e,"insertCluster",(function(){return h})),n.d(e,"getClusterTitleWidth",(function(){return d})),n.d(e,"clear",(function(){return f})),n.d(e,"positionCluster",(function(){return p}));var r=n("./src/dagre-wrapper/intersect/intersect-rect.js"),i=n("./src/logger.js"),a=n("./src/dagre-wrapper/createLabel.js"),o=n("d3"),s=n("./src/config.js"),c=n("./src/diagrams/common/common.js"),l={rect:function(t,e){i.log.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),l=n.insert("rect",":first-child"),u=n.insert("g").attr("class","cluster-label"),h=u.node().appendChild(Object(a.default)(e.labelText,e.labelStyle,void 0,!0)),d=h.getBBox();if(Object(c.evaluate)(Object(s.getConfig)().flowchart.htmlLabels)){var f=h.children[0],p=Object(o.select)(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}var g=0*e.padding,y=g/2,m=e.width<=d.width+g?d.width+g:e.width;e.width<=d.width+g?e.diff=(d.width-e.width)/2:e.diff=-e.padding/2,i.log.trace("Data ",e,JSON.stringify(e)),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-m/2).attr("y",e.y-e.height/2-y).attr("width",m).attr("height",e.height+g),u.attr("transform","translate("+(e.x-d.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");var v=l.node().getBBox();return e.width=v.width,e.height=v.height,e.intersect=function(t){return Object(r.default)(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),l=n.insert("g").attr("class","cluster-label"),u=n.append("rect"),h=l.node().appendChild(Object(a.default)(e.labelText,e.labelStyle,void 0,!0)),d=h.getBBox();if(Object(c.evaluate)(Object(s.getConfig)().flowchart.htmlLabels)){var f=h.children[0],p=Object(o.select)(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}d=h.getBBox();var g=0*e.padding,y=g/2,m=e.width<=d.width+e.padding?d.width+e.padding:e.width;e.width<=d.width+e.padding?e.diff=(d.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-m/2-y).attr("y",e.y-e.height/2-y).attr("width",m+g).attr("height",e.height+g),u.attr("class","inner").attr("x",e.x-m/2-y).attr("y",e.y-e.height/2-y+d.height-1).attr("width",m+g).attr("height",e.height+g-d.height-3),l.attr("transform","translate("+(e.x-d.width/2)+", "+(e.y-e.height/2-e.padding/3+(Object(c.evaluate)(Object(s.getConfig)().flowchart.htmlLabels)?5:3))+")");var v=i.node().getBBox();return e.height=v.height,e.intersect=function(t){return Object(r.default)(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=n.insert("rect",":first-child"),a=0*e.padding,o=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");var s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return Object(r.default)(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),a=0*e.padding,o=a/2;i.attr("class","divider").attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2).attr("width",e.width+a).attr("height",e.height+a);var s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.diff=-e.padding/2,e.intersect=function(t){return Object(r.default)(e,t)},n}},u={},h=function(t,e){i.log.trace("Inserting cluster");var n=e.shape||"rect";u[e.id]=l[n](t,e)},d=function(t,e){var n=Object(a.default)(e.labelText,e.labelStyle,void 0,!0);t.node().appendChild(n);var r=n.getBBox().width;return t.node().removeChild(n),r},f=function(){u={}},p=function(t){i.log.info("Position cluster ("+t.id+", "+t.x+", "+t.y+")"),u[t.id].attr("transform","translate("+t.x+", "+t.y+")")}},"./src/dagre-wrapper/createLabel.js":function(t,e,n){n.r(e);var r=n("d3"),i=n("./src/logger.js"),a=n("./src/diagrams/common/common.js"),o=n("./src/config.js");function s(t){return(s="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)}e.default=function(t,e,n,c){var l=t||"";if("object"===s(l)&&(l=l[0]),Object(a.evaluate)(Object(o.getConfig)().flowchart.htmlLabels))return l=l.replace(/\\n|\n/g,"<br />"),i.log.info("vertexText"+l),function(t){var e,n,i=Object(r.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=i.append("xhtml:div"),o=t.label,s=t.isNode?"nodeLabel":"edgeLabel";return a.html('<span class="'+s+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+o+"</span>"),e=a,(n=t.labelStyle)&&e.attr("style",n),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),i.node()}({isNode:c,label:l.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),labelStyle:e.replace("fill:","color:")});var u=document.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("style",e.replace("color:","fill:"));var h=[];h="string"==typeof l?l.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(l)?l:[];for(var d=0;d<h.length;d++){var f=document.createElementNS("http://www.w3.org/2000/svg","tspan");f.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),f.setAttribute("dy","1em"),f.setAttribute("x","0"),n?f.setAttribute("class","title-row"):f.setAttribute("class","row"),f.textContent=h[d].trim(),u.appendChild(f)}return u}},"./src/dagre-wrapper/edges.js":function(t,e,n){n.r(e),n.d(e,"clear",(function(){return h})),n.d(e,"insertEdgeLabel",(function(){return d})),n.d(e,"positionEdgeLabel",(function(){return f})),n.d(e,"intersection",(function(){return p})),n.d(e,"insertEdge",(function(){return y}));var r=n("./src/logger.js"),i=n("./src/dagre-wrapper/createLabel.js"),a=n("d3"),o=n("./src/config.js"),s=n("./src/utils.js"),c=n("./src/diagrams/common/common.js"),l={},u={},h=function(){l={},u={}},d=function(t,e){var n=Object(i.default)(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),s=r.insert("g").attr("class","label");s.node().appendChild(n);var h=n.getBBox();if(Object(c.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var d=n.children[0],f=Object(a.select)(n);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}if(s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),l[e.id]=r,e.width=h.width,e.height=h.height,e.startLabelLeft){var p=Object(i.default)(e.startLabelLeft,e.labelStyle),g=t.insert("g").attr("class","edgeTerminals"),y=g.insert("g").attr("class","inner");y.node().appendChild(p);var m=p.getBBox();y.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),u[e.id]||(u[e.id]={}),u[e.id].startLeft=g}if(e.startLabelRight){var v=Object(i.default)(e.startLabelRight,e.labelStyle),b=t.insert("g").attr("class","edgeTerminals"),_=b.insert("g").attr("class","inner");b.node().appendChild(v),_.node().appendChild(v);var w=v.getBBox();_.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),u[e.id]||(u[e.id]={}),u[e.id].startRight=b}if(e.endLabelLeft){var x=Object(i.default)(e.endLabelLeft,e.labelStyle),k=t.insert("g").attr("class","edgeTerminals"),C=k.insert("g").attr("class","inner");C.node().appendChild(x);var T=x.getBBox();C.attr("transform","translate("+-T.width/2+", "+-T.height/2+")"),k.node().appendChild(x),u[e.id]||(u[e.id]={}),u[e.id].endLeft=k}if(e.endLabelRight){var E=Object(i.default)(e.endLabelRight,e.labelStyle),S=t.insert("g").attr("class","edgeTerminals"),O=S.insert("g").attr("class","inner");O.node().appendChild(E);var A=E.getBBox();O.attr("transform","translate("+-A.width/2+", "+-A.height/2+")"),S.node().appendChild(E),u[e.id]||(u[e.id]={}),u[e.id].endRight=S}},f=function(t,e){r.log.info("Moving label abc78 ",t.id,t.label,l[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var i=l[t.id],a=t.x,o=t.y;if(n){var c=s.default.calcLabelPosition(n);r.log.info("Moving label from (",a,",",o,") to (",c.x,",",c.y,") abc78")}i.attr("transform","translate("+a+", "+o+")")}if(t.startLabelLeft){var h=u[t.id].startLeft,d=t.x,f=t.y;if(n){var p=s.default.calcTerminalLabelPosition(0,"start_left",n);d=p.x,f=p.y}h.attr("transform","translate("+d+", "+f+")")}if(t.startLabelRight){var g=u[t.id].startRight,y=t.x,m=t.y;if(n){var v=s.default.calcTerminalLabelPosition(0,"start_right",n);y=v.x,m=v.y}g.attr("transform","translate("+y+", "+m+")")}if(t.endLabelLeft){var b=u[t.id].endLeft,_=t.x,w=t.y;if(n){var x=s.default.calcTerminalLabelPosition(0,"end_left",n);_=x.x,w=x.y}b.attr("transform","translate("+_+", "+w+")")}if(t.endLabelRight){var k=u[t.id].endRight,C=t.x,T=t.y;if(n){var E=s.default.calcTerminalLabelPosition(0,"end_right",n);C=E.x,T=E.y}k.attr("transform","translate("+C+", "+T+")")}},p=function(t,e,n){r.log.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(n),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));var i=t.x,a=t.y,o=Math.abs(i-n.x),s=t.width/2,c=n.x<e.x?s-o:s+o,l=t.height/2,u=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(a-e.y)*s>Math.abs(i-e.x)*l){var d=n.y<e.y?e.y-l-a:a-l-e.y;c=h*d/u;var f={x:n.x<e.x?n.x+c:n.x-h+c,y:n.y<e.y?n.y+u-d:n.y-u+d};return 0===c&&(f.x=e.x,f.y=e.y),0===h&&(f.x=e.x),0===u&&(f.y=e.y),r.log.warn("abc89 topp/bott calc, Q ".concat(u,", q ").concat(d,", R ").concat(h,", r ").concat(c),f),f}var p=u*(c=n.x<e.x?e.x-s-i:i-s-e.x)/h,g=n.x<e.x?n.x+h-c:n.x-h+c,y=n.y<e.y?n.y+p:n.y-p;return r.log.warn("sides calc abc89, Q ".concat(u,", q ").concat(p,", R ").concat(h,", r ").concat(c),{_x:g,_y:y}),0===c&&(g=e.x,y=e.y),0===h&&(g=e.x),0===u&&(y=e.y),{x:g,y:y}},g=function(t,e){r.log.warn("abc88 cutPathAtIntersect",t,e);var n=[],i=t[0],a=!1;return t.forEach((function(t){if(r.log.info("abc88 checking point",t,e),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}(e,t)||a)r.log.warn("abc88 outside",t,i),i=t,a||n.push(t);else{var o=p(e,i,t);r.log.warn("abc88 inside",t,i,o),r.log.warn("abc88 intersection",o);var s=!1;n.forEach((function(t){s=s||t.x===o.x&&t.y===o.y})),n.find((function(t){return t.x===o.x&&t.y===o.y}))?r.log.warn("abc88 no intersect",o,n):n.push(o),a=!0}})),r.log.warn("abc88 returning points",n),n},y=function(t,e,n,i,s,c){var l=n.points,u=!1,h=c.node(e.v),d=c.node(e.w);r.log.info("abc88 InsertEdge: ",n),d.intersect&&h.intersect&&((l=l.slice(1,n.points.length-1)).unshift(h.intersect(l[0])),r.log.info("Last point",l[l.length-1],d,d.intersect(l[l.length-1])),l.push(d.intersect(l[l.length-1]))),n.toCluster&&(r.log.info("to cluster abc88",i[n.toCluster]),l=g(n.points,i[n.toCluster].node),u=!0),n.fromCluster&&(r.log.info("from cluster abc88",i[n.fromCluster]),l=g(l.reverse(),i[n.fromCluster].node).reverse(),u=!0);var f,p=l.filter((function(t){return!Number.isNaN(t.y)}));f=("graph"===s||"flowchart"===s)&&n.curve||a.curveBasis;var y,m=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(f);switch(n.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;default:y=""}switch(n.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed"}var v=t.append("path").attr("d",m(p)).attr("id",n.id).attr("class"," "+y+(n.classes?" "+n.classes:"")).attr("style",n.style),b="";switch(Object(o.getConfig)().state.arrowMarkerAbsolute&&(b=(b=(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),r.log.info("arrowTypeStart",n.arrowTypeStart),r.log.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":v.attr("marker-start","url("+b+"#"+s+"-crossStart)");break;case"arrow_point":v.attr("marker-start","url("+b+"#"+s+"-pointStart)");break;case"arrow_barb":v.attr("marker-start","url("+b+"#"+s+"-barbStart)");break;case"arrow_circle":v.attr("marker-start","url("+b+"#"+s+"-circleStart)");break;case"aggregation":v.attr("marker-start","url("+b+"#"+s+"-aggregationStart)");break;case"extension":v.attr("marker-start","url("+b+"#"+s+"-extensionStart)");break;case"composition":v.attr("marker-start","url("+b+"#"+s+"-compositionStart)");break;case"dependency":v.attr("marker-start","url("+b+"#"+s+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":v.attr("marker-end","url("+b+"#"+s+"-crossEnd)");break;case"arrow_point":v.attr("marker-end","url("+b+"#"+s+"-pointEnd)");break;case"arrow_barb":v.attr("marker-end","url("+b+"#"+s+"-barbEnd)");break;case"arrow_circle":v.attr("marker-end","url("+b+"#"+s+"-circleEnd)");break;case"aggregation":v.attr("marker-end","url("+b+"#"+s+"-aggregationEnd)");break;case"extension":v.attr("marker-end","url("+b+"#"+s+"-extensionEnd)");break;case"composition":v.attr("marker-end","url("+b+"#"+s+"-compositionEnd)");break;case"dependency":v.attr("marker-end","url("+b+"#"+s+"-dependencyEnd)")}var _={};return u&&(_.updatedPath=l),_.originalPath=n.points,_}},"./src/dagre-wrapper/index.js":function(t,e,n){n.r(e),n.d(e,"render",(function(){return g}));var r=n("dagre"),i=n.n(r),a=n("graphlib"),o=n.n(a),s=n("./src/dagre-wrapper/markers.js"),c=n("./src/dagre-wrapper/shapes/util.js"),l=n("./src/dagre-wrapper/mermaid-graphlib.js"),u=n("./src/dagre-wrapper/nodes.js"),h=n("./src/dagre-wrapper/clusters.js"),d=n("./src/dagre-wrapper/edges.js"),f=n("./src/logger.js"),p=function t(e,n,r,a){f.log.info("Graph in recursive render: XXX",o.a.json.write(n),a);var s=n.graph().rankdir;f.log.trace("Dir in recursive render - dir:",s);var p=e.insert("g").attr("class","root");n.nodes()?f.log.info("Recursive render XXX",n.nodes()):f.log.info("No nodes found for",n),n.edges().length>0&&f.log.trace("Recursive edges",n.edge(n.edges()[0]));var g=p.insert("g").attr("class","clusters"),y=p.insert("g").attr("class","edgePaths"),m=p.insert("g").attr("class","edgeLabels"),v=p.insert("g").attr("class","nodes");n.nodes().forEach((function(e){var i=n.node(e);if(void 0!==a){var o=JSON.parse(JSON.stringify(a.clusterData));f.log.info("Setting data for cluster XXX (",e,") ",o,a),n.setNode(a.id,o),n.parent(e)||(f.log.trace("Setting parent",e,a.id),n.setParent(e,a.id,o))}if(f.log.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),i&&i.clusterNode){f.log.info("Cluster identified",e,i.width,n.node(e));var h=t(v,i.graph,r,n.node(e)),d=h.elem;Object(c.updateNodeBounds)(i,d),i.diff=h.diff||0,f.log.info("Node bounds (abc123)",e,i,i.width,i.x,i.y),Object(u.setNodeElem)(d,i),f.log.warn("Recursive render complete ",d,i)}else n.children(e).length>0?(f.log.info("Cluster - the non recursive path XXX",e,i.id,i,n),f.log.info(Object(l.findNonClusterChild)(i.id,n)),l.clusterDb[i.id]={id:Object(l.findNonClusterChild)(i.id,n),node:i}):(f.log.info("Node - the non recursive path",e,i.id,i),Object(u.insertNode)(v,n.node(e),s))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);f.log.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),f.log.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),f.log.info("Fix",l.clusterDb,"ids:",t.v,t.w,"Translateing: ",l.clusterDb[t.v],l.clusterDb[t.w]),Object(d.insertEdgeLabel)(m,e)})),n.edges().forEach((function(t){f.log.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),f.log.info("#############################################"),f.log.info("### Layout ###"),f.log.info("#############################################"),f.log.info(n),i.a.layout(n),f.log.info("Graph after layout:",o.a.json.write(n));var b=0;return Object(l.sortNodesByHierarchy)(n).forEach((function(t){var e=n.node(t);f.log.info("Position "+t+": "+JSON.stringify(n.node(t))),f.log.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?Object(u.positionNode)(e):n.children(t).length>0?(Object(h.insertCluster)(g,e),l.clusterDb[e.id].node=e):Object(u.positionNode)(e)})),n.edges().forEach((function(t){var e=n.edge(t);f.log.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e);var i=Object(d.insertEdge)(y,t,e,l.clusterDb,r,n);Object(d.positionEdgeLabel)(e,i)})),n.nodes().forEach((function(t){var e=n.node(t);f.log.info(t,e.type,e.diff),"group"===e.type&&(b=e.diff)})),{elem:p,diff:b}},g=function(t,e,n,r,i){Object(s.default)(t,n,r,i),Object(u.clear)(),Object(d.clear)(),Object(h.clear)(),Object(l.clear)(),f.log.warn("Graph at first:",o.a.json.write(e)),Object(l.adjustClustersAndEdges)(e),f.log.warn("Graph after:",o.a.json.write(e)),p(t,e,r)}},"./src/dagre-wrapper/intersect/index.js":function(t,e,n){n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-node.js"),i=n.n(r),a=n("./src/dagre-wrapper/intersect/intersect-circle.js"),o=n("./src/dagre-wrapper/intersect/intersect-ellipse.js"),s=n("./src/dagre-wrapper/intersect/intersect-polygon.js"),c=n("./src/dagre-wrapper/intersect/intersect-rect.js");e.default={node:i.a,circle:a.default,ellipse:o.default,polygon:s.default,rect:c.default}},"./src/dagre-wrapper/intersect/intersect-circle.js":function(t,e,n){n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-ellipse.js");e.default=function(t,e,n){return Object(r.default)(t,e,e,n)}},"./src/dagre-wrapper/intersect/intersect-ellipse.js":function(t,e,n){n.r(e),e.default=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x<i&&(l=-l);var u=Math.abs(e*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}},"./src/dagre-wrapper/intersect/intersect-line.js":function(t,e,n){function r(t,e){return t*e>0}n.r(e),e.default=function(t,e,n,i){var a,o,s,c,l,u,h,d,f,p,g,y,m;if(a=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,f=a*n.x+s*n.y+l,p=a*i.x+s*i.y+l,!(0!==f&&0!==p&&r(f,p)||(o=i.y-n.y,c=n.x-i.x,u=i.x*n.y-n.x*i.y,h=o*t.x+c*t.y+u,d=o*e.x+c*e.y+u,0!==h&&0!==d&&r(h,d)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(m=s*u-c*l)<0?(m-y)/g:(m+y)/g,y:(m=o*l-a*u)<0?(m-y)/g:(m+y)/g}}},"./src/dagre-wrapper/intersect/intersect-node.js":function(t,e){t.exports=function(t,e){return t.intersect(e)}},"./src/dagre-wrapper/intersect/intersect-polygon.js":function(t,e,n){n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-line.js");e.default=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)})):(s=Math.min(s,e.x),c=Math.min(c,e.y));for(var l=i-t.width/2-s,u=a-t.height/2-c,h=0;h<e.length;h++){var d=e[h],f=e[h<e.length-1?h+1:0],p=Object(r.default)(t,n,{x:l+d.x,y:u+d.y},{x:l+f.x,y:u+f.y});p&&o.push(p)}return o.length?(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,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),o[0]):t}},"./src/dagre-wrapper/intersect/intersect-rect.js":function(t,e,n){n.r(e),e.default=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}}},"./src/dagre-wrapper/markers.js":function(t,e,n){n.r(e);var r=n("./src/logger.js"),i={extension:function(t,e,n){r.log.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker 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").attr("class","marker 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","marker composition "+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","marker composition "+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","marker aggregation "+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","marker aggregation "+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","marker dependency "+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","marker dependency "+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","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).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","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).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","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").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","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").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","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}};e.default=function(t,e,n,r){e.forEach((function(e){i[e](t,n,r)}))}},"./src/dagre-wrapper/mermaid-graphlib.js":function(t,e,n){n.r(e),n.d(e,"clusterDb",(function(){return o})),n.d(e,"clear",(function(){return l})),n.d(e,"extractDecendants",(function(){return d})),n.d(e,"validate",(function(){return f})),n.d(e,"findNonClusterChild",(function(){return p})),n.d(e,"adjustClustersAndEdges",(function(){return y})),n.d(e,"extractor",(function(){return m})),n.d(e,"sortNodesByHierarchy",(function(){return b}));var r=n("./src/logger.js"),i=n("graphlib"),a=n.n(i),o={},s={},c={},l=function(){s={},c={},o={}},u=function(t,e){return r.log.trace("In isDecendant",e," ",t," = ",s[e].indexOf(t)>=0),s[e].indexOf(t)>=0},h=function t(e,n,i,a){r.log.warn("Copying children of ",e,"root",a,"data",n.node(e),a);var o=n.children(e)||[];e!==a&&o.push(e),r.log.warn("Copying (nodes) clusterId",e,"nodes",o),o.forEach((function(o){if(n.children(o).length>0)t(o,n,i,a);else{var c=n.node(o);r.log.info("cp ",o," to ",a," with parent ",e),i.setNode(o,c),a!==n.parent(o)&&(r.log.warn("Setting parent",o,n.parent(o)),i.setParent(o,n.parent(o))),e!==a&&o!==e?(r.log.debug("Setting parent",o,e),i.setParent(o,e)):(r.log.info("In copy ",e,"root",a,"data",n.node(e),a),r.log.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));var l=n.edges(o);r.log.debug("Copying Edges",l),l.forEach((function(t){r.log.info("Edge",t);var o=n.edge(t.v,t.w,t.name);r.log.info("Edge data",o,a);try{!function(t,e){return r.log.info("Decendants of ",e," is ",s[e]),r.log.info("Edge is ",t),t.v!==e&&t.w!==e&&(s[e]?(r.log.info("Here "),s[e].indexOf(t.v)>=0||!!u(t.v,e)||!!u(t.w,e)||s[e].indexOf(t.w)>=0):(r.log.debug("Tilt, ",e,",not in decendants"),!1))}(t,a)?r.log.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",e):(r.log.info("Copying as ",t.v,t.w,o,t.name),i.setEdge(t.v,t.w,o,t.name),r.log.info("newGraph edges ",i.edges(),i.edge(i.edges()[0])))}catch(lX){r.log.error(lX)}}))}r.log.debug("Removing node",o),n.removeNode(o)}))},d=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)c[r[a]]=e,i=i.concat(t(r[a],n));return i},f=function(t){var e=t.edges();r.log.trace("Edges: ",e);for(var n=0;n<e.length;n++){if(t.children(e[n].v).length>0)return r.log.trace("The node ",e[n].v," is part of and edge even though it has children"),!1;if(t.children(e[n].w).length>0)return r.log.trace("The node ",e[n].w," is part of and edge even though it has children"),!1}return!0},p=function t(e,n){r.log.trace("Searching",e);var i=n.children(e);if(r.log.trace("Searching children of id ",e,i),i.length<1)return r.log.trace("This is a valid node",e),e;for(var a=0;a<i.length;a++){var o=t(i[a],n);if(o)return r.log.trace("Found replacement for",e," => ",o),o}},g=function(t){return o[t]&&o[t].externalConnections&&o[t]?o[t].id:t},y=function(t,e){!t||e>10?r.log.debug("Opting out, no graph "):(r.log.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(r.log.warn("Cluster identified",e," Replacement id in edges: ",p(e,t)),s[e]=d(e,t),o[e]={id:p(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),i=t.edges();n.length>0?(r.log.debug("Cluster identified",e,s),i.forEach((function(t){t.v!==e&&t.w!==e&&u(t.v,e)^u(t.w,e)&&(r.log.warn("Edge: ",t," leaves cluster ",e),r.log.warn("Decendants of XXX ",e,": ",s[e]),o[e].externalConnections=!0)}))):r.log.debug("Not a cluster ",e,s)})),t.edges().forEach((function(e){var n=t.edge(e);r.log.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),r.log.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var i=e.v,a=e.w;r.log.warn("Fix XXX",o,"ids:",e.v,e.w,"Translateing: ",o[e.v]," --- ",o[e.w]),(o[e.v]||o[e.w])&&(r.log.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),i=g(e.v),a=g(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v&&(n.fromCluster=e.v),a!==e.w&&(n.toCluster=e.w),r.log.warn("Fix Replacing with XXX",i,a,e.name),t.setEdge(i,a,n,e.name))})),r.log.warn("Adjusted Graph",a.a.json.write(t)),m(t,0),r.log.trace(o))},m=function t(e,n){if(r.log.warn("extractor - ",n,a.a.json.write(e),e.children("D")),n>10)r.log.error("Bailing out");else{for(var i=e.nodes(),s=!1,c=0;c<i.length;c++){var l=i[c],u=e.children(l);s=s||u.length>0}if(s){r.log.debug("Nodes = ",i,n);for(var d=0;d<i.length;d++){var f=i[d];if(r.log.debug("Extracting node",f,o,o[f]&&!o[f].externalConnections,!e.parent(f),e.node(f),e.children("D")," Depth ",n),o[f])if(!o[f].externalConnections&&e.children(f)&&e.children(f).length>0){r.log.warn("Cluster without external connections, without a parent and with children",f,n);var p="TB"===e.graph().rankdir?"LR":"TB";o[f]&&o[f].clusterData&&o[f].clusterData.dir&&(p=o[f].clusterData.dir,r.log.warn("Fixing dir",o[f].clusterData.dir,p));var g=new a.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:p,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));r.log.warn("Old graph before copy",a.a.json.write(e)),h(f,e,g,f),e.setNode(f,{clusterNode:!0,id:f,clusterData:o[f].clusterData,labelText:o[f].labelText,graph:g}),r.log.warn("New graph after copy node: (",f,")",a.a.json.write(g)),r.log.debug("Old graph after copy",a.a.json.write(e))}else r.log.warn("Cluster ** ",f," **not meeting the criteria !externalConnections:",!o[f].externalConnections," no parent: ",!e.parent(f)," children ",e.children(f)&&e.children(f).length>0,e.children("D"),n),r.log.debug(o);else r.log.debug("Not a cluster",f,n)}i=e.nodes(),r.log.warn("New list of nodes",i);for(var y=0;y<i.length;y++){var m=i[y],v=e.node(m);r.log.warn(" Now next level",m,v),v.clusterNode&&t(v.graph,n+1)}}else r.log.debug("Done, no node has children",e.nodes())}},v=function t(e,n){if(0===n.length)return[];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a)})),r},b=function(t){return v(t,t.children())}},"./src/dagre-wrapper/nodes.js":function(t,e,n){n.r(e),n.d(e,"insertNode",(function(){return y})),n.d(e,"setNodeElem",(function(){return m})),n.d(e,"clear",(function(){return v})),n.d(e,"positionNode",(function(){return b}));var r=n("d3"),i=n("./src/logger.js"),a=n("./src/dagre-wrapper/shapes/util.js"),o=n("./src/config.js"),s=n("./src/dagre-wrapper/intersect/index.js"),c=n("./src/dagre-wrapper/createLabel.js"),l=n("./src/dagre-wrapper/shapes/note.js"),u=n("./src/diagrams/class/svgDraw.js"),h=n("./src/diagrams/common/common.js");function d(t){return(d="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 f=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,o=10;"LR"===n&&(i=10,o=70);var c=r.append("rect").attr("x",-1*i/2).attr("y",-1*o/2).attr("width",i).attr("height",o).attr("class","fork-join");return Object(a.updateNodeBounds)(e,c),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return s.default.rect(e,t)},r},p={question:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,o=n.bbox,c=o.width+e.padding+(o.height+e.padding),l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];i.log.info("Question main (Circle)");var u=Object(a.insertPolygonShape)(r,c,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return i.log.warn("Intersect called"),s.default.polygon(e,l,t)},r},rect:function(t,e){var n=Object(a.labelHelper)(t,e,"node "+e.classes,!0),r=n.shapeSvg,o=n.bbox,c=n.halfPadding;i.log.trace("Classes = ",e.classes);var l=r.insert("rect",":first-child");return l.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-o.width/2-c).attr("y",-o.height/2-c).attr("width",o.width+e.padding).attr("height",o.height+e.padding),Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return s.default.rect(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var l=t.insert("g").attr("class",n).attr("id",e.domId||e.id),u=l.insert("rect",":first-child"),f=l.insert("line"),p=l.insert("g").attr("class","label"),g=e.labelText.flat?e.labelText.flat():e.labelText,y="";y="object"===d(g)?g[0]:g,i.log.info("Label text abc79",y,g,"object"===d(g));var m,v=p.node().appendChild(Object(c.default)(y,e.labelStyle,!0,!0));if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var b=v.children[0],_=Object(r.select)(v);m=b.getBoundingClientRect(),_.attr("width",m.width),_.attr("height",m.height)}i.log.info("Text 2",g);var w=g.slice(1,g.length),x=v.getBBox(),k=p.node().appendChild(Object(c.default)(w.join?w.join("<br/>"):w,e.labelStyle,!0,!0));if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var C=k.children[0],T=Object(r.select)(k);m=C.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height)}var E=e.padding/2;return Object(r.select)(k).attr("transform","translate( "+(m.width>x.width?0:(x.width-m.width)/2)+", "+(x.height+E+5)+")"),Object(r.select)(v).attr("transform","translate( "+(m.width<x.width?0:-(x.width-m.width)/2)+", 0)"),m=p.node().getBBox(),p.attr("transform","translate("+-m.width/2+", "+(-m.height/2-E+3)+")"),u.attr("class","outer title-state").attr("x",-m.width/2-E).attr("y",-m.height/2-E).attr("width",m.width+e.padding).attr("height",m.height+e.padding),f.attr("class","divider").attr("x1",-m.width/2-E).attr("x2",m.width/2+E).attr("y1",-m.height/2-E+x.height+E).attr("y2",-m.height/2-E+x.height+E),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.rect(e,t)},l},choice:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return n.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return s.default.circle(e,14,t)},n},circle:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,o=n.bbox,c=n.halfPadding,l=r.insert("circle",":first-child");return l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",o.width/2+c).attr("width",o.width+e.padding).attr("height",o.height+e.padding),i.log.info("Circle main"),Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return i.log.info("Circle intersect",e,o.width/2+c,t),s.default.circle(e,o.width/2+c,t)},r},stadium:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.height+e.padding,c=i.width+o/4+e.padding,l=r.insert("rect",":first-child").attr("style",e.style).attr("rx",o/2).attr("ry",o/2).attr("x",-c/2).attr("y",-o/2).attr("width",c).attr("height",o);return Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return s.default.rect(e,t)},r},hexagon:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.height+e.padding,c=o/4,l=i.width+2*c+e.padding,u=[{x:c,y:0},{x:l-c,y:0},{x:l,y:-o/2},{x:l-c,y:-o},{x:c,y:-o},{x:0,y:-o/2}],h=Object(a.insertPolygonShape)(r,l,o,u);return h.attr("style",e.style),Object(a.updateNodeBounds)(e,h),e.intersect=function(t){return s.default.polygon(e,u,t)},r},rect_left_inv_arrow:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-c/2,y:0},{x:o,y:0},{x:o,y:-c},{x:-c/2,y:-c},{x:0,y:-c/2}];return Object(a.insertPolygonShape)(r,o,c,l).attr("style",e.style),e.width=o+c,e.height=c,e.intersect=function(t){return s.default.polygon(e,l,t)},r},lean_right:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-2*c/6,y:0},{x:o-c/6,y:0},{x:o+2*c/6,y:-c},{x:c/6,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},lean_left:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:2*c/6,y:0},{x:o+c/6,y:0},{x:o-2*c/6,y:-c},{x:-c/6,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},trapezoid:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:-2*c/6,y:0},{x:o+2*c/6,y:0},{x:o-c/6,y:-c},{x:c/6,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},inv_trapezoid:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:c/6,y:0},{x:o-c/6,y:0},{x:o+2*c/6,y:-c},{x:-2*c/6,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},rect_right_inv_arrow:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:0,y:0},{x:o+c/2,y:0},{x:o,y:-c/2},{x:o+c/2,y:-c},{x:0,y:-c}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},cylinder:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=o/2,l=c/(2.5+o/50),u=i.height+l+e.padding,h="M 0,"+l+" a "+c+","+l+" 0,0,0 "+o+" 0 a "+c+","+l+" 0,0,0 "+-o+" 0 l 0,"+u+" a "+c+","+l+" 0,0,0 "+o+" 0 l 0,"+-u,d=r.attr("label-offset-y",l).insert("path",":first-child").attr("style",e.style).attr("d",h).attr("transform","translate("+-o/2+","+-(u/2+l)+")");return Object(a.updateNodeBounds)(e,d),e.intersect=function(t){var n=s.default.rect(e,t),r=n.x-e.x;if(0!=c&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-l)){var i=l*l*(1-r*r/(c*c));0!=i&&(i=Math.sqrt(i)),i=l-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.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Object(a.updateNodeBounds)(e,r),e.intersect=function(t){return s.default.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||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),Object(a.updateNodeBounds)(e,i),e.intersect=function(t){return s.default.circle(e,7,t)},n},note:l.default,subroutine:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,l=[{x:0,y:0},{x:o,y:0},{x:o,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-c},{x:-8,y:-c},{x:-8,y:0}],u=Object(a.insertPolygonShape)(r,o,c,l);return u.attr("style",e.style),Object(a.updateNodeBounds)(e,u),e.intersect=function(t){return s.default.polygon(e,l,t)},r},fork:f,join:f,class_box:function(t,e){var n,i=e.padding/2;n=e.classes?"node "+e.classes:"node default";var l=t.insert("g").attr("class",n).attr("id",e.domId||e.id),d=l.insert("rect",":first-child"),f=l.insert("line"),p=l.insert("line"),g=0,y=4,m=l.insert("g").attr("class","label"),v=0,b=e.classData.annotations&&e.classData.annotations[0],_=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",w=m.node().appendChild(Object(c.default)(_,e.labelStyle,!0,!0)),x=w.getBBox();if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var k=w.children[0],C=Object(r.select)(w);x=k.getBoundingClientRect(),C.attr("width",x.width),C.attr("height",x.height)}e.classData.annotations[0]&&(y+=x.height+4,g+=x.width);var T=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(T+="<"+e.classData.type+">");var E=m.node().appendChild(Object(c.default)(T,e.labelStyle,!0,!0));Object(r.select)(E).attr("class","classTitle");var S=E.getBBox();if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var O=E.children[0],A=Object(r.select)(E);S=O.getBoundingClientRect(),A.attr("width",S.width),A.attr("height",S.height)}y+=S.height+4,S.width>g&&(g=S.width);var M=[];e.classData.members.forEach((function(t){var n=Object(u.parseMember)(t).displayText,i=m.node().appendChild(Object(c.default)(n,e.labelStyle,!0,!0)),a=i.getBBox();if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var s=i.children[0],l=Object(r.select)(i);a=s.getBoundingClientRect(),l.attr("width",a.width),l.attr("height",a.height)}a.width>g&&(g=a.width),y+=a.height+4,M.push(i)})),y+=8;var D=[];if(e.classData.methods.forEach((function(t){var n=Object(u.parseMember)(t).displayText,i=m.node().appendChild(Object(c.default)(n,e.labelStyle,!0,!0)),a=i.getBBox();if(Object(h.evaluate)(Object(o.getConfig)().flowchart.htmlLabels)){var s=i.children[0],l=Object(r.select)(i);a=s.getBoundingClientRect(),l.attr("width",a.width),l.attr("height",a.height)}a.width>g&&(g=a.width),y+=a.height+4,D.push(i)})),y+=8,b){var j=(g-x.width)/2;Object(r.select)(w).attr("transform","translate( "+(-1*g/2+j)+", "+-1*y/2+")"),v=x.height+4}var N=(g-S.width)/2;return Object(r.select)(E).attr("transform","translate( "+(-1*g/2+N)+", "+(-1*y/2+v)+")"),v+=S.height+4,f.attr("class","divider").attr("x1",-g/2-i).attr("x2",g/2+i).attr("y1",-y/2-i+8+v).attr("y2",-y/2-i+8+v),v+=8,M.forEach((function(t){Object(r.select)(t).attr("transform","translate( "+-g/2+", "+(-1*y/2+v+4)+")"),v+=S.height+4})),v+=8,p.attr("class","divider").attr("x1",-g/2-i).attr("x2",g/2+i).attr("y1",-y/2-i+8+v).attr("y2",-y/2-i+8+v),v+=8,D.forEach((function(t){Object(r.select)(t).attr("transform","translate( "+-g/2+", "+(-1*y/2+v)+")"),v+=S.height+4})),d.attr("class","outer title-state").attr("x",-g/2-i).attr("y",-y/2-i).attr("width",g+e.padding).attr("height",y+e.padding),Object(a.updateNodeBounds)(e,d),e.intersect=function(t){return s.default.rect(e,t)},l}},g={},y=function(t,e,n){var r,i;e.link?(r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget||"_blank"),i=p[e.shape](r,e,n)):r=i=p[e.shape](t,e,n),e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),g[e.id]=r,e.haveCallback&&g[e.id].attr("class",g[e.id].attr("class")+" clickable")},m=function(t,e){g[e.id]=t},v=function(){g={}},b=function(t){var e=g[t.id];i.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");var n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n}},"./src/dagre-wrapper/shapes/note.js":function(t,e,n){n.r(e);var r=n("./src/dagre-wrapper/shapes/util.js"),i=n("./src/logger.js"),a=n("./src/dagre-wrapper/intersect/index.js");e.default=function(t,e){var n=Object(r.labelHelper)(t,e,"node "+e.classes,!0),o=n.shapeSvg,s=n.bbox,c=n.halfPadding;i.log.info("Classes = ",e.classes);var l=o.insert("rect",":first-child");return l.attr("rx",e.rx).attr("ry",e.ry).attr("x",-s.width/2-c).attr("y",-s.height/2-c).attr("width",s.width+e.padding).attr("height",s.height+e.padding),Object(r.updateNodeBounds)(e,l),e.intersect=function(t){return a.default.rect(e,t)},o}},"./src/dagre-wrapper/shapes/util.js":function(t,e,n){n.r(e),n.d(e,"labelHelper",(function(){return s})),n.d(e,"updateNodeBounds",(function(){return c})),n.d(e,"insertPolygonShape",(function(){return l}));var r=n("./src/dagre-wrapper/createLabel.js"),i=n("./src/config.js"),a=n("d3"),o=n("./src/diagrams/common/common.js"),s=function(t,e,n,s){var c;c=n||"node default";var l=t.insert("g").attr("class",c).attr("id",e.domId||e.id),u=l.insert("g").attr("class","label").attr("style",e.labelStyle),h=u.node().appendChild(Object(r.default)(e.labelText,e.labelStyle,!1,s)),d=h.getBBox();if(Object(o.evaluate)(Object(i.getConfig)().flowchart.htmlLabels)){var f=h.children[0],p=Object(a.select)(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}var g=e.padding/2;return u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),{shapeSvg:l,bbox:d,halfPadding:g,label:u}},c=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function l(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+")")}},"./src/defaultConfig.js":function(t,e,n){function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t){return(a="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)}n.r(e),n.d(e,"configKeys",(function(){return s}));var o={theme:"default",themeVariables:n("./src/themes/index.js").default.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-d3"},sequence:{activationWidth:10,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"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0,defaultRenderer:"dagre-d3"},git:{arrowMarkerAbsolute:!1,useWidth:void 0,useMaxWidth:!0},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,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20}};o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,o.git.arrowMarkerAbsolute=o.arrowMarkerAbsolute;var s=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(e).reduce((function(i,o){return Array.isArray(e[o])?i:"object"===a(e[o])&&null!==e[o]?[].concat(r(i),[n+o],r(t(e[o],""))):[].concat(r(i),[n+o])}),[])}(o,"");e.default=o},"./src/diagrams/class/classDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return y})),n.d(e,"addClass",(function(){return v})),n.d(e,"lookUpDomId",(function(){return b})),n.d(e,"clear",(function(){return _})),n.d(e,"getClass",(function(){return w})),n.d(e,"getClasses",(function(){return x})),n.d(e,"getRelations",(function(){return k})),n.d(e,"addRelation",(function(){return C})),n.d(e,"addAnnotation",(function(){return T})),n.d(e,"addMember",(function(){return E})),n.d(e,"addMembers",(function(){return S})),n.d(e,"cleanupLabel",(function(){return O})),n.d(e,"setCssClass",(function(){return A})),n.d(e,"setLink",(function(){return M})),n.d(e,"setClickEvent",(function(){return D})),n.d(e,"bindFunctions",(function(){return N})),n.d(e,"lineType",(function(){return B})),n.d(e,"relationType",(function(){return L}));var r=n("d3"),i=n("./src/logger.js"),a=n("./src/config.js"),o=n("./src/diagrams/common/common.js"),s=n("./src/utils.js"),c=n("./src/mermaidAPI.js");function l(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var h="classid-",d=[],f={},p=0,g=[],y=function(t,e,n){c.default.parseDirective(this,t,e,n)},m=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}},v=function(t){var e=m(t);void 0===f[e.className]&&(f[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:h+e.className+"-"+p},p++)},b=function(t){for(var e=Object.keys(f),n=0;n<e.length;n++)if(f[e[n]].id===t)return f[e[n]].domId},_=function(){d=[],f={},(g=[]).push(R)},w=function(t){return f[t]},x=function(){return f},k=function(){return d},C=function(t){i.log.debug("Adding relation: "+JSON.stringify(t)),v(t.id1),v(t.id2),t.id1=m(t.id1).className,t.id2=m(t.id2).className,d.push(t)},T=function(t,e){var n=m(t).className;f[n].annotations.push(e)},E=function(t,e){var n=m(t).className,r=f[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)}},S=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return E(t,e)})))},O=function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},A=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=h+n),void 0!==f[n]&&f[n].cssClasses.push(e)}))},M=function(t,e,n){var r=a.getConfig();t.split(",").forEach((function(t){var i=t;t[0].match(/\d/)&&(i=h+i),void 0!==f[i]&&(f[i].link=s.default.formatUrl(e,r),f[i].linkTarget="string"==typeof n?n:"_blank")})),A(t,"clickable")},D=function(t,e,n){t.split(",").forEach((function(t){j(t,e,n),f[t].haveCallback=!0})),A(t,"clickable")},j=function(t,e,n){var r=a.getConfig(),i=t,o=b(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==f[i]){var c=[];if("string"==typeof n){c=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var u=0;u<c.length;u++){var h=c[u].trim();'"'===h.charAt(0)&&'"'===h.charAt(h.length-1)&&(h=h.substr(1,h.length-2)),c[u]=h}}0===c.length&&c.push(o),g.push((function(){var t=document.querySelector('[id="'.concat(o,'"]'));null!==t&&t.addEventListener("click",(function(){s.default.runFunc.apply(s.default,[e].concat(l(c)))}),!1)}))}},N=function(t){g.forEach((function(e){e(t)}))},B={LINE:0,DOTTED_LINE:1},L={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},R=function(t){var e=Object(r.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(r.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(r.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(r.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",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(r.select)(this).classed("hover",!1)}))};g.push(R),e.default={parseDirective:y,getConfig:function(){return a.getConfig().class},addClass:v,bindFunctions:N,clear:_,getClass:w,getClasses:x,addAnnotation:T,getRelations:k,addRelation:C,addMember:E,addMembers:S,cleanupLabel:O,lineType:B,relationType:L,setClickEvent:D,setCssClass:A,setLink:M,setTooltip:function(t,e){var n=a.getConfig();t.split(",").forEach((function(t){void 0!==e&&(f[t].tooltip=o.default.sanitizeText(e,n))}))},lookUpDomId:b}},"./src/diagrams/class/classRenderer-v2.js":function(t,e,n){n.r(e),n.d(e,"addClasses",(function(){return v})),n.d(e,"addRelations",(function(){return b})),n.d(e,"setConf",(function(){return w})),n.d(e,"drawOld",(function(){return x})),n.d(e,"draw",(function(){return k}));var r=n("d3"),i=n("dagre"),a=n.n(i),o=n("graphlib"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/diagrams/class/classDb.js"),u=n("./src/diagrams/class/parser/classDiagram.jison"),h=n("./src/diagrams/class/svgDraw.js"),d=n("./src/config.js"),f=n("./src/dagre-wrapper/index.js"),p=n("./src/utils.js"),g=n("./src/diagrams/common/common.js");u.parser.yy=l.default;var y={},m={dividerMargin:10,padding:5,textHeight:10},v=function(t,e){var n=Object.keys(t);c.log.info("keys:",n),c.log.info(t),n.forEach((function(n){var r=t[n],i="";r.cssClasses.length>0&&(i=i+" "+r.cssClasses.join(" "));var a={labelStyle:""},o=void 0!==r.text?r.text:r.id,s="";switch(r.type){case"class":s="class_box";break;default:s="class_box"}e.setNode(r.id,{labelStyle:a.labelStyle,shape:s,labelText:o,classData:r,rx:0,ry:0,class:i,style:a.style,id:r.id,domId:r.domId,haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:Object(d.getConfig)().flowchart.padding}),c.log.info("setNode",{labelStyle:a.labelStyle,shape:s,labelText:o,rx:0,ry:0,class:i,style:a.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:Object(d.getConfig)().flowchart.padding})}))},b=function(t,e){var n=0;t.forEach((function(i){n++;var a={classes:"relation"};a.pattern=1==i.relation.lineType?"dashed":"solid",a.id="id"+n,"arrow_open"===i.type?a.arrowhead="none":a.arrowhead="normal",c.log.info(a,i),a.startLabelRight="none"===i.relationTitle1?"":i.relationTitle1,a.endLabelLeft="none"===i.relationTitle2?"":i.relationTitle2,a.arrowTypeStart=C(i.relation.type1),a.arrowTypeEnd=C(i.relation.type2);var o="",s="";if(void 0!==i.style){var l=Object(p.getStylesFromArray)(i.style);o=l.style,s=l.labelStyle}else o="fill:none";a.style=o,a.labelStyle=s,void 0!==i.interpolate?a.curve=Object(p.interpolateToCurve)(i.interpolate,r.curveLinear):void 0!==t.defaultInterpolate?a.curve=Object(p.interpolateToCurve)(t.defaultInterpolate,r.curveLinear):a.curve=Object(p.interpolateToCurve)(m.curve,r.curveLinear),i.text=i.title,void 0===i.text?void 0!==i.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",Object(d.getConfig)().flowchart.htmlLabels,a.labelType="text",a.label=i.text.replace(g.default.lineBreakRegex,"\n"),void 0===i.style&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:")),e.setEdge(i.id1,i.id2,a,n)}))},_=function(t){for(var e=Object.keys(y),n=0;n<e.length;n++)if(y[e[n]].label===t)return e[n]},w=function(t){Object.keys(t).forEach((function(e){m[e]=t[e]}))},x=function(t,e){y={},u.parser.yy.clear(),u.parser.parse(t),c.log.info("Rendering diagram "+t);var n=Object(r.select)("[id='".concat(e,"']")),i=new s.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));var o=l.default.getClasses();c.log.info("classes:"),c.log.info(o);for(var d=Object.keys(o),f=0;f<d.length;f++){var g=o[d[f]],v=h.default.drawClass(n,g,m);y[v.id]=v,i.setNode(v.id,v),c.log.info("Org height: "+v.height)}var b=l.default.getRelations();c.log.info("relations:",b),b.forEach((function(t){c.log.info("tjoho"+_(t.id1)+_(t.id2)+JSON.stringify(t)),i.setEdge(_(t.id1),_(t.id2),{relation:t},t.title||"DEFAULT")})),a.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(c.log.debug("Node "+t+": "+JSON.stringify(i.node(t))),Object(r.select)("#"+Object(l.lookUpDomId)(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)&&(c.log.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),h.default.drawEdge(n,i.edge(t),i.edge(t).relation,m))}));var w=n.node().getBBox(),x=w.width+40,k=w.height+40;Object(p.configureSvgSize)(n,k,x,m.useMaxWidth);var C="".concat(w.x-20," ").concat(w.y-20," ").concat(x," ").concat(k);c.log.debug("viewBox ".concat(C)),n.attr("viewBox",C)},k=function(t,e){c.log.info("Drawing class"),l.default.clear(),u.parser.parse(t);var n=Object(d.getConfig)().flowchart;c.log.info("config:",n);var i=n.nodeSpacing||50,a=n.rankSpacing||50,o=new s.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TD",nodesep:i,ranksep:a,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),h=l.default.getClasses(),g=l.default.getRelations();c.log.info(g),v(h,o),b(g,o);var y=Object(r.select)('[id="'.concat(e,'"]'));y.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var m=Object(r.select)("#"+e+" g");Object(f.render)(m,o,["aggregation","extension","composition","dependency"],"classDiagram",e);var _=y.node().getBBox(),w=_.width+16,x=_.height+16;if(c.log.debug("new ViewBox 0 0 ".concat(w," ").concat(x),"translate(".concat(8-o._label.marginx,", ").concat(8-o._label.marginy,")")),Object(p.configureSvgSize)(y,x,w,n.useMaxWidth),y.attr("viewBox","0 0 ".concat(w," ").concat(x)),y.select("g").attr("transform","translate(".concat(8-o._label.marginx,", ").concat(8-_.y,")")),!n.htmlLabels)for(var k=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),C=0;C<k.length;C++){var T=k[C],E=T.getBBox(),S=document.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("rx",0),S.setAttribute("ry",0),S.setAttribute("width",E.width),S.setAttribute("height",E.height),S.setAttribute("style","fill:#e8e8e8;"),T.insertBefore(S,T.firstChild)}};function C(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}e.default={setConf:w,draw:k}},"./src/diagrams/class/classRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return y})),n.d(e,"draw",(function(){return m}));var r=n("d3"),i=n("dagre"),a=n.n(i),o=n("graphlib"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/diagrams/class/classDb.js"),u=n("./src/diagrams/class/parser/classDiagram.jison"),h=n("./src/diagrams/class/svgDraw.js"),d=n("./src/utils.js");u.parser.yy=l.default;var f={},p={dividerMargin:10,padding:5,textHeight:10},g=function(t){for(var e=Object.keys(f),n=0;n<e.length;n++)if(f[e[n]].label===t)return e[n]},y=function(t){Object.keys(t).forEach((function(e){p[e]=t[e]}))},m=function(t,e){f={},u.parser.yy.clear(),u.parser.parse(t),c.log.info("Rendering diagram "+t);var n,i=Object(r.select)("[id='".concat(e,"']"));i.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(n=i).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 o=new s.a.Graph({multigraph:!0});o.setGraph({isMultiGraph:!0}),o.setDefaultEdgeLabel((function(){return{}}));for(var y=l.default.getClasses(),m=Object.keys(y),v=0;v<m.length;v++){var b=y[m[v]],_=h.default.drawClass(i,b,p);f[_.id]=_,o.setNode(_.id,_),c.log.info("Org height: "+_.height)}l.default.getRelations().forEach((function(t){c.log.info("tjoho"+g(t.id1)+g(t.id2)+JSON.stringify(t)),o.setEdge(g(t.id1),g(t.id2),{relation:t},t.title||"DEFAULT")})),a.a.layout(o),o.nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)&&(c.log.debug("Node "+t+": "+JSON.stringify(o.node(t))),Object(r.select)("#"+Object(l.lookUpDomId)(t)).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )"))})),o.edges().forEach((function(t){void 0!==t&&void 0!==o.edge(t)&&(c.log.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),h.default.drawEdge(i,o.edge(t),o.edge(t).relation,p))}));var w=i.node().getBBox(),x=w.width+40,k=w.height+40;Object(d.configureSvgSize)(i,k,x,p.useMaxWidth);var C="".concat(w.x-20," ").concat(w.y-20," ").concat(x," ").concat(k);c.log.debug("viewBox ".concat(C)),i.attr("viewBox",C)};e.default={setConf:y,draw:m}},"./src/diagrams/class/parser/classDiagram.jison":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,7],n=[1,6],r=[1,14],i=[1,25],a=[1,28],o=[1,26],s=[1,27],c=[1,29],l=[1,30],u=[1,31],h=[1,32],d=[1,35],f=[1,36],p=[1,37],g=[1,38],y=[10,19],m=[1,50],v=[1,51],b=[1,52],_=[1,53],w=[1,54],x=[1,55],k=[10,19,26,33,34,42,45,46,47,48,49,50,55,57],C=[10,19,24,26,33,34,38,42,45,46,47,48,49,50,55,57,72,73,74,75],T=[10,13,17,19],E=[42,72,73,74,75],S=[42,49,50,72,73,74,75],O=[42,45,46,47,48,72,73,74,75],A=[10,19,26],M=[1,87],D={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,classLiteralName:23,GENERICTYPE:24,relationStatement:25,LABEL:26,classStatement:27,methodStatement:28,annotationStatement:29,clickStatement:30,cssClassStatement:31,CLASS:32,STYLE_SEPARATOR:33,STRUCT_START:34,members:35,STRUCT_STOP:36,ANNOTATION_START:37,ANNOTATION_END:38,MEMBER:39,SEPARATOR:40,relation:41,STR:42,relationType:43,lineType:44,AGGREGATION:45,EXTENSION:46,COMPOSITION:47,DEPENDENCY:48,LINE:49,DOTTED_LINE:50,CALLBACK:51,LINK:52,LINK_TARGET:53,CLICK:54,CALLBACK_NAME:55,CALLBACK_ARGS:56,HREF:57,CSSCLASS:58,commentToken:59,textToken:60,graphCodeTokens:61,textNoTagsToken:62,TAGSTART:63,TAGEND:64,"==":65,"--":66,PCT:67,DEFAULT:68,SPACE:69,MINUS:70,keywords:71,UNICODE_TEXT:72,NUM:73,ALPHA:74,BQUOTE_STR:75,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",24:"GENERICTYPE",26:"LABEL",32:"CLASS",33:"STYLE_SEPARATOR",34:"STRUCT_START",36:"STRUCT_STOP",37:"ANNOTATION_START",38:"ANNOTATION_END",39:"MEMBER",40:"SEPARATOR",42:"STR",45:"AGGREGATION",46:"EXTENSION",47:"COMPOSITION",48:"DEPENDENCY",49:"LINE",50:"DOTTED_LINE",51:"CALLBACK",52:"LINK",53:"LINK_TARGET",54:"CLICK",55:"CALLBACK_NAME",56:"CALLBACK_ARGS",57:"HREF",58:"CSSCLASS",61:"graphCodeTokens",63:"TAGSTART",64:"TAGEND",65:"==",66:"--",67:"PCT",68:"DEFAULT",69:"SPACE",70:"MINUS",71:"keywords",72:"UNICODE_TEXT",73:"NUM",74:"ALPHA",75:"BQUOTE_STR"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,1],[21,2],[21,2],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[27,2],[27,4],[27,5],[27,7],[29,4],[35,1],[35,2],[28,1],[28,2],[28,1],[28,1],[25,3],[25,4],[25,4],[25,5],[41,3],[41,2],[41,2],[41,1],[43,1],[43,1],[43,1],[43,1],[44,1],[44,1],[30,3],[30,4],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[31,3],[59,1],[59,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[62,1],[62,1],[62,1],[62,1],[22,1],[22,1],[22,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","class");break;case 14:case 15:this.$=a[s];break;case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+"~"+a[s];break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 27:r.addClass(a[s]);break;case 28:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 29:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 30:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 31:r.addAnnotation(a[s],a[s-2]);break;case 32:this.$=[a[s]];break;case 33:a[s].push(a[s-1]),this.$=a[s];break;case 34:break;case 35:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 36:case 37:break;case 38:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 39:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 40:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 41:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 42:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 43:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 44:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 45:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 46:this.$=r.relationType.AGGREGATION;break;case 47:this.$=r.relationType.EXTENSION;break;case 48:this.$=r.relationType.COMPOSITION;break;case 49:this.$=r.relationType.DEPENDENCY;break;case 50:this.$=r.lineType.LINE;break;case 51:this.$=r.lineType.DOTTED_LINE;break;case 52:case 58:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 53:case 59:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 54:case 62:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 55:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 56:case 64:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 57:case 65:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 60:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 61:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 63:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 66:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:3,6:4,7:5,13:e,17:n},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:e,17:n},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:r},t([11,16],[2,7]),{5:23,7:5,13:e,18:15,20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:l,54:u,58:h,72:d,73:f,74:p,75:g},{10:[1,39]},{12:40,15:[1,41]},{10:[2,9]},{19:[1,42]},{10:[1,43],19:[2,11]},t(y,[2,19],{26:[1,44]}),t(y,[2,21]),t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,34],{41:45,43:48,44:49,26:[1,47],42:[1,46],45:m,46:v,47:b,48:_,49:w,50:x}),{21:56,22:33,23:34,72:d,73:f,74:p,75:g},t(y,[2,36]),t(y,[2,37]),{22:57,72:d,73:f,74:p},{21:58,22:33,23:34,72:d,73:f,74:p,75:g},{21:59,22:33,23:34,72:d,73:f,74:p,75:g},{21:60,22:33,23:34,72:d,73:f,74:p,75:g},{42:[1,61]},t(k,[2,14],{22:33,23:34,21:62,24:[1,63],72:d,73:f,74:p,75:g}),t(k,[2,15],{24:[1,64]}),t(C,[2,80]),t(C,[2,81]),t(C,[2,82]),t([10,19,24,26,33,34,42,45,46,47,48,49,50,55,57],[2,83]),t(T,[2,4]),{9:65,16:r},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:e,18:66,19:[2,12],20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:l,54:u,58:h,72:d,73:f,74:p,75:g},t(y,[2,20]),{21:67,22:33,23:34,42:[1,68],72:d,73:f,74:p,75:g},{41:69,43:48,44:49,45:m,46:v,47:b,48:_,49:w,50:x},t(y,[2,35]),{44:70,49:w,50:x},t(E,[2,45],{43:71,45:m,46:v,47:b,48:_}),t(S,[2,46]),t(S,[2,47]),t(S,[2,48]),t(S,[2,49]),t(O,[2,50]),t(O,[2,51]),t(y,[2,27],{33:[1,72],34:[1,73]}),{38:[1,74]},{42:[1,75]},{42:[1,76]},{55:[1,77],57:[1,78]},{22:79,72:d,73:f,74:p},t(k,[2,16]),t(k,[2,17]),t(k,[2,18]),{10:[1,80]},{19:[2,13]},t(A,[2,38]),{21:81,22:33,23:34,72:d,73:f,74:p,75:g},{21:82,22:33,23:34,42:[1,83],72:d,73:f,74:p,75:g},t(E,[2,44],{43:84,45:m,46:v,47:b,48:_}),t(E,[2,43]),{22:85,72:d,73:f,74:p},{35:86,39:M},{21:88,22:33,23:34,72:d,73:f,74:p,75:g},t(y,[2,52],{42:[1,89]}),t(y,[2,54],{42:[1,91],53:[1,90]}),t(y,[2,58],{42:[1,92],56:[1,93]}),t(y,[2,62],{42:[1,95],53:[1,94]}),t(y,[2,66]),t(T,[2,5]),t(A,[2,40]),t(A,[2,39]),{21:96,22:33,23:34,72:d,73:f,74:p,75:g},t(E,[2,42]),t(y,[2,28],{34:[1,97]}),{36:[1,98]},{35:99,36:[2,32],39:M},t(y,[2,31]),t(y,[2,53]),t(y,[2,55]),t(y,[2,56],{53:[1,100]}),t(y,[2,59]),t(y,[2,60],{42:[1,101]}),t(y,[2,63]),t(y,[2,64],{53:[1,102]}),t(A,[2,41]),{35:103,39:M},t(y,[2,29]),{36:[2,33]},t(y,[2,57]),t(y,[2,61]),t(y,[2,65]),{36:[1,104]},t(y,[2,30])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],41:[2,8],42:[2,10],66:[2,13],99:[2,33]},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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},j={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:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),34;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),36;case 15:break;case 16:return"MEMBER";case 17:return 32;case 18:return 58;case 19:return 51;case 20:return 52;case 21:return 54;case 22:return 37;case 23:return 38;case 24:this.begin("generic");break;case 25:this.popState();break;case 26:return"GENERICTYPE";case 27:this.begin("string");break;case 28:this.popState();break;case 29:return"STR";case 30:this.begin("bqstring");break;case 31:this.popState();break;case 32:return"BQUOTE_STR";case 33:this.begin("href");break;case 34:this.popState();break;case 35:return 57;case 36:this.begin("callback_name");break;case 37:this.popState();break;case 38:this.popState(),this.begin("callback_args");break;case 39:return 55;case 40:this.popState();break;case 41:return 56;case 42:case 43:case 44:case 45:return 53;case 46:case 47:return 46;case 48:case 49:return 48;case 50:return 47;case 51:return 45;case 52:return 49;case 53:return 50;case 54:return 26;case 55:return 33;case 56:return 70;case 57:return"DOT";case 58:return"PLUS";case 59:return 67;case 60:case 61:return"EQUALS";case 62:return 74;case 63:return"PUNCTUATION";case 64:return 73;case 65:return 72;case 66:return 69;case 67:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\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:{arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callback_args:{rules:[40,41],inclusive:!1},callback_name:{rules:[37,38,39],inclusive:!1},href:{rules:[34,35],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},generic:{rules:[25,26],inclusive:!1},bqstring:{rules:[31,32],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,36,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],inclusive:!0}}};function N(){this.yy={}}return D.lexer=j,N.prototype=D,D.Parser=N,new N}();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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/class/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n")}},"./src/diagrams/class/svgDraw.js":function(t,e,n){n.r(e),n.d(e,"drawEdge",(function(){return c})),n.d(e,"drawClass",(function(){return l})),n.d(e,"parseMember",(function(){return u}));var r=n("d3"),i=n("./src/diagrams/class/classDb.js"),a=n("./src/utils.js"),o=n("./src/logger.js"),s=0,c=function(t,e,n,c){var l=function(t){switch(t){case i.relationType.AGGREGATION:return"aggregation";case i.relationType.EXTENSION:return"extension";case i.relationType.COMPOSITION:return"composition";case i.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var u,h,d=e.points,f=Object(r.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(r.curveBasis),p=t.append("path").attr("d",f(d)).attr("id","edge"+s).attr("class","relation"),g="";c.arrowMarkerAbsolute&&(g=(g=(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&p.attr("class","relation dashed-line"),"none"!==n.relation.type1&&p.attr("marker-start","url("+g+"#"+l(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&p.attr("marker-end","url("+g+"#"+l(n.relation.type2)+"End)");var y,m,v,b,_=e.points.length,w=a.default.calcLabelPosition(e.points);if(u=w.x,h=w.y,_%2!=0&&_>1){var x=a.default.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),k=a.default.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[_-1]);o.log.debug("cardinality_1_point "+JSON.stringify(x)),o.log.debug("cardinality_2_point "+JSON.stringify(k)),y=x.x,m=x.y,v=k.x,b=k.y}if(void 0!==n.title){var C=t.append("g").attr("class","classLabel"),T=C.append("text").attr("class","label").attr("x",u).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=T;var E=T.node().getBBox();C.insert("rect",":first-child").attr("class","box").attr("x",E.x-c.padding/2).attr("y",E.y-c.padding/2).attr("width",E.width+c.padding).attr("height",E.height+c.padding)}o.log.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",y).attr("y",m).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",v).attr("y",b).attr("fill","black").attr("font-size","6").text(n.relationTitle2),s++},l=function(t,e,n){o.log.info("Rendering class "+e);var r,a=e.id,s={id:a,label:e.id,width:0,height:0},c=t.append("g").attr("id",Object(i.lookUpDomId)(a)).attr("class","classGroup");r=e.link?c.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):c.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var l=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");l||e.attr("dy",n.textHeight),l=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var h=r.append("tspan").text(u).attr("class","title");l||h.attr("dy",n.textHeight);var d=r.node().getBBox().height,f=c.append("line").attr("x1",0).attr("y1",n.padding+d+n.dividerMargin/2).attr("y2",n.padding+d+n.dividerMargin/2),g=c.append("text").attr("x",n.padding).attr("y",d+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach((function(t){p(g,t,l,n),l=!1}));var y=g.node().getBBox(),m=c.append("line").attr("x1",0).attr("y1",n.padding+d+n.dividerMargin+y.height).attr("y2",n.padding+d+n.dividerMargin+y.height),v=c.append("text").attr("x",n.padding).attr("y",d+2*n.dividerMargin+y.height+n.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach((function(t){p(v,t,l,n),l=!1}));var b=c.node().getBBox(),_=" ";e.cssClasses.length>0&&(_+=e.cssClasses.join(" "));var w=c.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).attr("class",_).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(w-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),f.attr("x2",w),m.attr("x2",w),s.width=w,s.height=b.height+n.padding+.5*n.dividerMargin,s},u=function(t){var e=t.match(/(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?h(e):n?d(n):f(t)},h=function(t){var e="";try{e=(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?g(t[3].trim()):"")+" "+(t[4]?t[4].trim():"")}catch(n){e=t}return{displayText:e,cssStyle:""}},d=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?g(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+g(t[5]).trim():""),e=y(o)}catch(s){n=t}return{displayText:n,cssStyle:e}},f=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var l=t.substring(i+1,a),u=t.substring(a+1,1);n=y(u),e=o+s+"("+g(l.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+g(r))}else e=g(t);return{displayText:e,cssStyle:n}},p=function(t,e,n,r){var i=u(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)},g=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},y=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}};e.default={drawClass:l,drawEdge:c,parseMember:u}},"./src/diagrams/common/common.js":function(t,e,n){n.r(e),n.d(e,"getRows",(function(){return a})),n.d(e,"removeScript",(function(){return o})),n.d(e,"sanitizeText",(function(){return s})),n.d(e,"lineBreakRegex",(function(){return c})),n.d(e,"hasBreaks",(function(){return l})),n.d(e,"splitBreaks",(function(){return u})),n.d(e,"evaluate",(function(){return f}));var r=n("dompurify"),i=n.n(r),a=function(t){if(!t)return 1;var e=d(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},o=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}return e=(e=(e=e.replace(/javascript:/g,"#")).replace(/onerror=/g,"onerror:")).replace(/<iframe/g,"")},s=function(t,e){return function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;"antiscript"===i?n=o(n):"loose"!==i&&(n=(n=(n=d(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=h(n))}return n}(i.a.sanitize(t),e)},c=/<br\s*\/?>/gi,l=function(t){return/<br\s*[/]?>/gi.test(t)},u=function(t){return t.split(/<br\s*[/]?>/gi)},h=function(t){return t.replace(/#br#/g,"<br/>")},d=function(t){return t.replace(c,"#br#")},f=function(t){return"false"!==t&&!1!==t};e.default={getRows:a,sanitizeText:s,hasBreaks:l,splitBreaks:u,lineBreakRegex:c,removeScript:o,getUrl:function(t){var e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e},evaluate:f}},"./src/diagrams/er/erDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return l}));var r=n("./src/logger.js"),i=n("./src/mermaidAPI.js"),a=n("./src/config.js"),o={},s=[],c="",l=function(t,e,n){i.default.parseDirective(this,t,e,n)},u=function(t){return void 0===o[t]&&(o[t]={attributes:[]},r.log.info("Added new entity :",t)),o[t]};e.default={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"},parseDirective:l,getConfig:function(){return a.getConfig().er},addEntity:u,addAttributes:function(t,e){var n,i=u(t);for(n=e.length-1;n>=0;n--)i.attributes.push(e[n]),r.log.debug("Added attribute ",e[n].attributeName)},getEntities:function(){return o},addRelationship:function(t,e,n,i){var a={entityA:t,roleA:e,entityB:n,relSpec:i};s.push(a),r.log.debug("Added new relationship :",a)},getRelationships:function(){return s},clear:function(){o={},s=[],c=""},setTitle:function(t){c=t},getTitle:function(){return c}}},"./src/diagrams/er/erMarkers.js":function(t,e,n){n.r(e);var r={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"};e.default={ERMarkers:r,insertMarkers:function(t,e){var n;t.append("defs").append("marker").attr("id",r.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",r.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",r.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",r.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",r.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",r.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",r.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",r.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")}}},"./src/diagrams/er/erRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return y})),n.d(e,"draw",(function(){return _}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/er/erDb.js"),s=n("./src/diagrams/er/parser/erDiagram.jison"),c=n.n(s),l=n("dagre"),u=n.n(l),h=n("./src/config.js"),d=n("./src/logger.js"),f=n("./src/diagrams/er/erMarkers.js"),p=n("./src/utils.js"),g={},y=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)g[e[n]]=t[e[n]]},m=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append("g").attr("id",i);r=void 0===r?i:r;var o="entity-"+i,s=a.append("text").attr("class","er entityLabel").attr("id",o).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+Object(h.getConfig)().fontFamily+"; font-size: "+g.fontSize+"px").text(i),c=function(t,e,n){var r=g.entityPadding/3,i=g.entityPadding/3,a=.85*g.fontSize,o=e.node().getBBox(),s=[],c=0,l=0,u=o.height+2*r,d=1;n.forEach((function(n){var i="".concat(e.node().id,"-attr-").concat(d),o=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-type")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+Object(h.getConfig)().fontFamily+"; font-size: "+a+"px").text(n.attributeType),f=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-name")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+Object(h.getConfig)().fontFamily+"; font-size: "+a+"px").text(n.attributeName);s.push({tn:o,nn:f});var p=o.node().getBBox(),g=f.node().getBBox();c=Math.max(c,p.width),l=Math.max(l,g.width),u+=Math.max(p.height,g.height)+2*r,d+=1}));var f={width:Math.max(g.minEntityWidth,Math.max(o.width+2*g.entityPadding,c+l+4*i)),height:n.length>0?u:Math.max(g.minEntityHeight,o.height+2*g.entityPadding)},p=Math.max(0,f.width-(c+l)-4*i);if(n.length>0){e.attr("transform","translate("+f.width/2+","+(r+o.height/2)+")");var y=o.height+2*r,m="attributeBoxOdd";s.forEach((function(e){var n=y+r+Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)/2;e.tn.attr("transform","translate("+i+","+n+")");var a=t.insert("rect","#"+e.tn.node().id).attr("class","er ".concat(m)).attr("fill",g.fill).attr("fill-opacity","100%").attr("stroke",g.stroke).attr("x",0).attr("y",y).attr("width",c+2*i+p/2).attr("height",e.tn.node().getBBox().height+2*r);e.nn.attr("transform","translate("+(parseFloat(a.attr("width"))+i)+","+n+")"),t.insert("rect","#"+e.nn.node().id).attr("class","er ".concat(m)).attr("fill",g.fill).attr("fill-opacity","100%").attr("stroke",g.stroke).attr("x","".concat(a.attr("x")+a.attr("width"))).attr("y",y).attr("width",l+2*i+p/2).attr("height",e.nn.node().getBBox().height+2*r),y+=Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)+2*r,m="attributeBoxOdd"==m?"attributeBoxEven":"attributeBoxOdd"}))}else f.height=Math.max(g.minEntityHeight,u),e.attr("transform","translate("+f.width/2+","+f.height/2+")");return f}(a,s,e[i].attributes),l=c.width,u=c.height,d=a.insert("rect","#"+o).attr("class","er entityBox").attr("fill",g.fill).attr("fill-opacity","100%").attr("stroke",g.stroke).attr("x",0).attr("y",0).attr("width",l).attr("height",u).node().getBBox();n.setNode(i,{width:d.width,height:d.height,shape:"rect",id:i})})),r},v=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},b=0,_=function(t,e){d.log.info("Drawing ER diagram"),o.default.clear();var n=c.a.parser;n.yy=o.default;try{n.parse(t)}catch(E){d.log.debug("Parsing failed")}var r,s=Object(a.select)("[id='".concat(e,"']"));f.default.insertMarkers(s,g),r=new i.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:g.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var l,y,_=m(s,o.default.getEntities(),r),w=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},v(t))})),t}(o.default.getRelationships(),r);u.a.layout(r),l=s,(y=r).nodes().forEach((function(t){void 0!==t&&void 0!==y.node(t)&&l.select("#"+t).attr("transform","translate("+(y.node(t).x-y.node(t).width/2)+","+(y.node(t).y-y.node(t).height/2)+" )")})),w.forEach((function(t){!function(t,e,n,r){b++;var i=n.edge(e.entityA,e.entityB,v(e)),s=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),c=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",s(i.points)).attr("stroke",g.stroke).attr("fill","none");e.relSpec.relType===o.default.Identification.NON_IDENTIFYING&&c.attr("stroke-dasharray","8,8");var l="";switch(g.arrowMarkerAbsolute&&(l=(l=(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case o.default.Cardinality.ZERO_OR_ONE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ZERO_OR_ONE_END+")");break;case o.default.Cardinality.ZERO_OR_MORE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ZERO_OR_MORE_END+")");break;case o.default.Cardinality.ONE_OR_MORE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ONE_OR_MORE_END+")");break;case o.default.Cardinality.ONLY_ONE:c.attr("marker-end","url("+l+"#"+f.default.ERMarkers.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case o.default.Cardinality.ZERO_OR_ONE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ZERO_OR_ONE_START+")");break;case o.default.Cardinality.ZERO_OR_MORE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ZERO_OR_MORE_START+")");break;case o.default.Cardinality.ONE_OR_MORE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ONE_OR_MORE_START+")");break;case o.default.Cardinality.ONLY_ONE:c.attr("marker-start","url("+l+"#"+f.default.ERMarkers.ONLY_ONE_START+")")}var u=c.node().getTotalLength(),d=c.node().getPointAtLength(.5*u),p="rel"+b,y=t.append("text").attr("class","er relationshipLabel").attr("id",p).attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+Object(h.getConfig)().fontFamily+"; font-size: "+g.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+p).attr("class","er relationshipLabelBox").attr("x",d.x-y.width/2).attr("y",d.y-y.height/2).attr("width",y.width).attr("height",y.height).attr("fill","white").attr("fill-opacity","85%")}(s,t,r,_)}));var x=g.diagramPadding,k=s.node().getBBox(),C=k.width+2*x,T=k.height+2*x;Object(p.configureSvgSize)(s,T,C,g.useMaxWidth),s.attr("viewBox","".concat(k.x-x," ").concat(k.y-x," ").concat(C," ").concat(T))};e.default={setConf:y,draw:_}},"./src/diagrams/er/parser/erDiagram.jison":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,5],r=[6,9,11,23,37],i=[1,17],a=[1,20],o=[1,25],s=[1,26],c=[1,27],l=[1,28],u=[1,37],h=[23,34,35],d=[4,6,9,11,23,37],f=[30,31,32,33],p=[22,27],g={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,ALPHANUM:23,attribute:24,attributeType:25,attributeName:26,ATTRIBUTE_WORD:27,cardinality:28,relType:29,ZERO_OR_ONE:30,ZERO_OR_MORE:31,ONE_OR_MORE:32,ONLY_ONE:33,NON_IDENTIFYING:34,IDENTIFYING:35,WORD:36,open_directive:37,type_directive:38,arg_directive:39,close_directive:40,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"ALPHANUM",27:"ATTRIBUTE_WORD",30:"ZERO_OR_ONE",31:"ZERO_OR_MORE",32:"ONE_OR_MORE",33:"ONLY_ONE",34:"NON_IDENTIFYING",35:"IDENTIFYING",36:"WORD",37:"open_directive",38:"type_directive",39:"arg_directive",40:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[25,1],[26,1],[18,3],[28,1],[28,1],[28,1],[28,1],[29,1],[29,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 12: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 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:this.$=a[s];break;case 17:this.$=[a[s]];break;case 18:a[s].push(a[s-1]),this.$=a[s];break;case 19:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 20:case 21:this.$=a[s];break;case 22:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 23:this.$=r.Cardinality.ZERO_OR_ONE;break;case 24:this.$=r.Cardinality.ZERO_OR_MORE;break;case 25:this.$=r.Cardinality.ONE_OR_MORE;break;case 26:this.$=r.Cardinality.ONLY_ONE;break;case 27:this.$=r.Identification.NON_IDENTIFYING;break;case 28:this.$=r.Identification.IDENTIFYING;break;case 29:this.$=a[s].replace(/"/g,"");break;case 30:this.$=a[s];break;case 31:r.parseDirective("%%{","open_directive");break;case 32:r.parseDirective(a[s],"type_directive");break;case 33:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 34:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,37:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,37:n},{13:8,38:[1,9]},{38:[2,31]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,37:n},{1:[2,2]},{14:18,15:[1,19],40:a},t([15,40],[2,32]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:21,12:4,17:16,23:i,37:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:22,28:24,20:[1,23],30:o,31:s,32:c,33:l}),t([6,9,11,15,20,23,30,31,32,33,37],[2,16]),{11:[1,29]},{16:30,39:[1,31]},{11:[2,34]},t(r,[2,5]),{17:32,23:i},{21:33,22:[1,34],24:35,25:36,27:u},{29:38,34:[1,39],35:[1,40]},t(h,[2,23]),t(h,[2,24]),t(h,[2,25]),t(h,[2,26]),t(d,[2,9]),{14:41,40:a},{40:[2,33]},{15:[1,42]},{22:[1,43]},t(r,[2,14]),{21:44,22:[2,17],24:35,25:36,27:u},{26:45,27:[1,46]},{27:[2,20]},{28:47,30:o,31:s,32:c,33:l},t(f,[2,27]),t(f,[2,28]),{11:[1,48]},{19:49,23:[1,51],36:[1,50]},t(r,[2,13]),{22:[2,18]},t(p,[2,19]),t(p,[2,21]),{23:[2,22]},t(d,[2,10]),t(r,[2,12]),t(r,[2,29]),t(r,[2,30])],defaultActions:{5:[2,31],7:[2,2],20:[2,34],31:[2,33],37:[2,20],44:[2,18],47:[2,22]},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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},y={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 this.begin("open_directive"),37;case 1:return this.begin("type_directive"),38;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),40;case 4:return 39;case 5:case 6:break;case 7:return 11;case 8:break;case 9:return 9;case 10:return 36;case 11:return 4;case 12:return this.begin("block"),20;case 13:break;case 14:return 27;case 15:break;case 16:return this.popState(),22;case 17:return e.yytext[0];case 18:return 30;case 19:return 31;case 20:return 32;case 21:return 33;case 22:return 30;case 23:return 31;case 24:return 32;case 25:return 34;case 26:return 35;case 27:case 28:return 34;case 29:return 23;case 30:return e.yytext[0];case 31:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/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:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},block:{rules:[13,14,15,16,17],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31],inclusive:!0}}};function m(){this.yy={}}return g.lexer=y,m.prototype=g,g.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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/er/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")}},"./src/diagrams/flowchart/flowChartShapes.js":function(t,e,n){n.r(e),n.d(e,"addToRender",(function(){return y})),n.d(e,"addToRenderV2",(function(){return m}));var r=n("dagre-d3"),i=n.n(r);function a(t,e,n){var r=.9*(e.width+e.height),a=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=v(t,r,r,a);return n.intersect=function(t){return i.a.intersect.polygon(n,a,t)},o}function o(t,e,n){var r=e.height,a=r/4,o=e.width+2*a,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-r/2},{x:o-a,y:-r},{x:a,y:-r},{x:0,y:-r/2}],c=v(t,o,r,s);return n.intersect=function(t){return i.a.intersect.polygon(n,s,t)},c}function s(t,e,n){var r=e.width,a=e.height,o=[{x:-a/2,y:0},{x:r,y:0},{x:r,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function c(t,e,n){var r=e.width,a=e.height,o=[{x:-2*a/6,y:0},{x:r-a/6,y:0},{x:r+2*a/6,y:-a},{x:a/6,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function l(t,e,n){var r=e.width,a=e.height,o=[{x:2*a/6,y:0},{x:r+a/6,y:0},{x:r-2*a/6,y:-a},{x:-a/6,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function u(t,e,n){var r=e.width,a=e.height,o=[{x:-2*a/6,y:0},{x:r+2*a/6,y:0},{x:r-a/6,y:-a},{x:a/6,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function h(t,e,n){var r=e.width,a=e.height,o=[{x:a/6,y:0},{x:r-a/6,y:0},{x:r+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function d(t,e,n){var r=e.width,a=e.height,o=[{x:0,y:0},{x:r+a/2,y:0},{x:r,y:-a/2},{x:r+a/2,y:-a},{x:0,y:-a}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function f(t,e,n){var r=e.height,a=e.width+r/4,o=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-a/2).attr("y",-r/2).attr("width",a).attr("height",r);return n.intersect=function(t){return i.a.intersect.rect(n,t)},o}function p(t,e,n){var r=e.width,a=e.height,o=[{x:0,y:0},{x:r,y:0},{x:r,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=v(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function g(t,e,n){var r=e.width,a=r/2,o=a/(2.5+r/50),s=e.height+o,c="M 0,"+o+" a "+a+","+o+" 0,0,0 "+r+" 0 a "+a+","+o+" 0,0,0 "+-r+" 0 l 0,"+s+" a "+a+","+o+" 0,0,0 "+r+" 0 l 0,"+-s,l=t.attr("label-offset-y",o).insert("path",":first-child").attr("d",c).attr("transform","translate("+-r/2+","+-(s/2+o)+")");return n.intersect=function(t){var e=i.a.intersect.rect(n,t),r=e.x-n.x;if(0!=a&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-o)){var s=o*o*(1-r*r/(a*a));0!=s&&(s=Math.sqrt(s)),s=o-s,t.y-n.y>0&&(s=-s),e.y+=s}return e},l}function y(t){t.shapes().question=a,t.shapes().hexagon=o,t.shapes().stadium=f,t.shapes().subroutine=p,t.shapes().cylinder=g,t.shapes().rect_left_inv_arrow=s,t.shapes().lean_right=c,t.shapes().lean_left=l,t.shapes().trapezoid=u,t.shapes().inv_trapezoid=h,t.shapes().rect_right_inv_arrow=d}function m(t){t({question:a}),t({hexagon:o}),t({stadium:f}),t({subroutine:p}),t({cylinder:g}),t({rect_left_inv_arrow:s}),t({lean_right:c}),t({lean_left:l}),t({trapezoid:u}),t({inv_trapezoid:h}),t({rect_right_inv_arrow:d})}function v(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+")")}e.default={addToRender:y,addToRenderV2:m}},"./src/diagrams/flowchart/flowDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return T})),n.d(e,"lookUpDomId",(function(){return E})),n.d(e,"addVertex",(function(){return S})),n.d(e,"addSingleLink",(function(){return O})),n.d(e,"addLink",(function(){return A})),n.d(e,"updateLinkInterpolate",(function(){return M})),n.d(e,"updateLink",(function(){return D})),n.d(e,"addClass",(function(){return j})),n.d(e,"setDirection",(function(){return N})),n.d(e,"setClass",(function(){return B})),n.d(e,"setLink",(function(){return L})),n.d(e,"getTooltip",(function(){return R})),n.d(e,"setClickEvent",(function(){return I})),n.d(e,"bindFunctions",(function(){return F})),n.d(e,"getDirection",(function(){return P})),n.d(e,"getVertices",(function(){return Y})),n.d(e,"getEdges",(function(){return z})),n.d(e,"getClasses",(function(){return U})),n.d(e,"clear",(function(){return W})),n.d(e,"setGen",(function(){return q})),n.d(e,"defaultStyle",(function(){return H})),n.d(e,"addSubGraph",(function(){return V})),n.d(e,"getDepthFirstPos",(function(){return K})),n.d(e,"indexNodes",(function(){return J})),n.d(e,"getSubGraphs",(function(){return tt})),n.d(e,"firstGraph",(function(){return et}));var r=n("d3"),i=n("./src/utils.js"),a=n("./src/config.js"),o=n("./src/diagrams/common/common.js"),s=n("./src/mermaidAPI.js"),c=n("./src/logger.js");function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d,f,p=0,g=a.getConfig(),y={},m=[],v=[],b=[],_={},w={},x=0,k=!0,C=[],T=function(t,e,n){s.default.parseDirective(this,t,e,n)},E=function(t){for(var e=Object.keys(y),n=0;n<e.length;n++)if(y[e[n]].id===t)return y[e[n]].domId;return t},S=function(t,e,n,r,i,s){var c,l=t;void 0!==l&&0!==l.trim().length&&(void 0===y[l]&&(y[l]={id:l,domId:"flowchart-"+l+"-"+p,styles:[],classes:[]}),p++,void 0!==e?(g=a.getConfig(),'"'===(c=o.default.sanitizeText(e.trim(),g))[0]&&'"'===c[c.length-1]&&(c=c.substring(1,c.length-1)),y[l].text=c):void 0===y[l].text&&(y[l].text=t),void 0!==n&&(y[l].type=n),null!=r&&r.forEach((function(t){y[l].styles.push(t)})),null!=i&&i.forEach((function(t){y[l].classes.push(t)})),void 0!==s&&(y[l].dir=s))},O=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=o.default.sanitizeText(r.trim(),g),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),m.push(i)},A=function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)O(t[i],e[a],n,r)},M=function(t,e){t.forEach((function(t){"default"===t?m.defaultInterpolate=e:m[t].interpolate=e}))},D=function(t,e){t.forEach((function(t){"default"===t?m.defaultStyle=e:(-1===i.default.isSubstringInArray("fill",e)&&e.push("fill:none"),m[t].style=e)}))},j=function(t,e){void 0===v[t]&&(v[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");v[t].textStyles.push(n)}v[t].styles.push(e)}))},N=function(t){(d=t).match(/.*</)&&(d="RL"),d.match(/.*\^/)&&(d="BT"),d.match(/.*>/)&&(d="LR"),d.match(/.*v/)&&(d="TB")},B=function(t,e){t.split(",").forEach((function(t){var n=t;void 0!==y[n]&&y[n].classes.push(e),void 0!==_[n]&&_[n].classes.push(e)}))},L=function(t,e,n){t.split(",").forEach((function(t){void 0!==y[t]&&(y[t].link=i.default.formatUrl(e,g),y[t].linkTarget=n)})),B(t,"clickable")},R=function(t){return w[t]},I=function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=E(t);if("loose"===a.getConfig().securityLevel&&void 0!==e){var o=[];if("string"==typeof n){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c}}0===o.length&&o.push(t),void 0!==y[t]&&(y[t].haveCallback=!0,C.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){i.default.runFunc.apply(i.default,[e].concat(u(o)))}),!1)})))}}(t,e,n)})),B(t,"clickable")},F=function(t){C.forEach((function(e){e(t)}))},P=function(){return d.trim()},Y=function(){return y},z=function(){return m},U=function(){return v},$=function(t){var e=Object(r.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(r.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(r.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(r.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",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(r.select)(this).classed("hover",!1)}))};C.push($);var W=function(t){y={},v={},m=[],(C=[]).push($),b=[],_={},x=0,w=[],k=!0,f=t||"gen-1"},q=function(t){f=t||"gen-1"},H=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},V=function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,s,u,h,d=[],p=(a=d.concat.apply(d,e),u={boolean:{},number:{},string:{}},h=[],{nodeList:a.filter((function(t){var e=l(t);return t.stmt&&"dir"===t.stmt?(s=t.value,!1):""!==t.trim()&&(e in u?!u[e].hasOwnProperty(t)&&(u[e][t]=!0):!(h.indexOf(t)>=0)&&h.push(t))})),dir:s}),y=p.dir;if(d=p.nodeList,"gen-1"===f){c.log.warn("LOOKING UP");for(var m=0;m<d.length;m++)d[m]=E(d[m])}r=r||"subGraph"+x,i=i||"",i=o.default.sanitizeText(i,g),x+=1;var v={id:r,nodes:d,title:i.trim(),classes:[],dir:y};return c.log.info("Adding",v.id,v.nodes,v.dir),v.nodes=rt(v,b).nodes,b.push(v),_[r]=v,r},G=function(t){for(var e=0;e<b.length;e++)if(b[e].id===t)return e;return-1},X=-1,Z=[],Q=function t(e,n){var r=b[n].nodes;if(!((X+=1)>2e3)){if(Z[X]=n,b[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=G(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}}},K=function(t){return Z[t]},J=function(){X=-1,b.length>0&&Q("none",b.length-1)},tt=function(){return b},et=function(){return!!k&&(k=!1,!0)},nt=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0)})),n},rt=function(t,e){var n=[];return t.nodes.forEach((function(r,i){nt(e,r)||n.push(t.nodes[i])})),{nodes:n}};e.default={parseDirective:T,defaultConfig:function(){return a.defaultConfig.flowchart},addVertex:S,lookUpDomId:E,addLink:A,updateLinkInterpolate:M,updateLink:D,addClass:j,setDirection:N,setClass:B,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(w["gen-1"===f?E(t):t]=o.default.sanitizeText(e,g))}))},getTooltip:R,setClickEvent:I,setLink:L,bindFunctions:F,getDirection:P,getVertices:Y,getEdges:z,getClasses:U,clear:W,setGen:q,defaultStyle:H,addSubGraph:V,getDepthFirstPos:K,indexNodes:J,getSubGraphs:tt,destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)e[i]===t&&++r;return r}(".",n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if((n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(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.length=r.length,n}return r},lex:{firstGraph:et},exists:nt,makeUniq:rt}},"./src/diagrams/flowchart/flowRenderer-v2.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return m})),n.d(e,"addVertices",(function(){return v})),n.d(e,"addEdges",(function(){return b})),n.d(e,"getClasses",(function(){return _})),n.d(e,"draw",(function(){return w}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/flowchart/flowDb.js"),s=n("./src/diagrams/flowchart/parser/flow.jison"),c=n.n(s),l=n("./src/config.js"),u=n("./src/dagre-wrapper/index.js"),h=n("dagre-d3/lib/label/add-html-label.js"),d=n.n(h),f=n("./src/logger.js"),p=n("./src/diagrams/common/common.js"),g=n("./src/utils.js"),y={},m=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)y[e[n]]=t[e[n]]},v=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 s,c=Object(g.getStylesFromArray)(i.styles),u=void 0!==i.text?i.text:i.id;if(Object(p.evaluate)(Object(l.getConfig)().flowchart.htmlLabels)){var h={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(s=d()(r,h).node()).parentNode.removeChild(s)}else{var y=document.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("style",c.labelStyle.replace("color:","fill:"));for(var m=u.split(p.default.lineBreakRegex),v=0;v<m.length;v++){var b=document.createElementNS("http://www.w3.org/2000/svg","tspan");b.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),b.setAttribute("dy","1em"),b.setAttribute("x","1"),b.textContent=m[v],y.appendChild(b)}s=y}var _=0,w="";switch(i.type){case"round":_=5,w="rect";break;case"square":w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"odd_right":w="rect_left_inv_arrow";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"group":w="rect";break;default:w="rect"}e.setNode(i.id,{labelStyle:c.labelStyle,shape:w,labelText:u,rx:_,ry:_,class:a,style:c.style,id:i.id,link:i.link,linkTarget:i.linkTarget,tooltip:o.default.getTooltip(i.id)||"",domId:o.default.lookUpDomId(i.id),haveCallback:i.haveCallback,width:"group"===i.type?500:void 0,dir:i.dir,type:i.type,padding:Object(l.getConfig)().flowchart.padding}),f.log.info("setNode",{labelStyle:c.labelStyle,shape:w,labelText:u,rx:_,ry:_,class:a,style:c.style,id:i.id,domId:o.default.lookUpDomId(i.id),width:"group"===i.type?500:void 0,type:i.type,dir:i.dir,padding:Object(l.getConfig)().flowchart.padding})}))},b=function(t,e){f.log.info("abc78 edges = ",t);var n,r,i=0,o={};if(void 0!==t.defaultStyle){var s=Object(g.getStylesFromArray)(t.defaultStyle);n=s.style,r=s.labelStyle}t.forEach((function(s){i++;var c="L-"+s.start+"-"+s.end;void 0===o[c]?(o[c]=0,f.log.info("abc78 new entry",c,o[c])):(o[c]++,f.log.info("abc78 new entry",c,o[c]));var l=c+"-"+o[c];f.log.info("abc78 new link id to be used is",c,l,o[c]);var u="LS-"+s.start,h="LE-"+s.end,d={style:"",labelStyle:""};switch(d.minlen=s.length||1,"arrow_open"===s.type?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",s.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle"}var m="",v="";switch(s.stroke){case"normal":m="fill:none;",void 0!==n&&(m=n),void 0!==r&&(v=r),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;"}if(void 0!==s.style){var b=Object(g.getStylesFromArray)(s.style);m=b.style,v=b.labelStyle}d.style=d.style+=m,d.labelStyle=d.labelStyle+=v,void 0!==s.interpolate?d.curve=Object(g.interpolateToCurve)(s.interpolate,a.curveLinear):void 0!==t.defaultInterpolate?d.curve=Object(g.interpolateToCurve)(t.defaultInterpolate,a.curveLinear):d.curve=Object(g.interpolateToCurve)(y.curve,a.curveLinear),void 0===s.text?void 0!==s.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=s.text.replace(p.default.lineBreakRegex,"\n"),void 0===s.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=l,d.classes="flowchart-link "+u+" "+h,e.setEdge(s.start,s.end,d,i)}))},_=function(t){f.log.info("Extracting classes"),o.default.clear();var e=c.a.parser;e.yy=o.default;try{e.parse(t)}catch(lX){return}return o.default.getClasses()},w=function(t,e){f.log.info("Drawing flowchart"),o.default.clear(),o.default.setGen("gen-2");var n=c.a.parser;n.yy=o.default,n.parse(t);var r=o.default.getDirection();void 0===r&&(r="TD");var s,h=Object(l.getConfig)().flowchart,d=h.nodeSpacing||50,p=h.rankSpacing||50,y=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:d,ranksep:p,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),m=o.default.getSubGraphs();f.log.info("Subgraphs - ",m);for(var _=m.length-1;_>=0;_--)s=m[_],f.log.info("Subgraph - ",s),o.default.addVertex(s.id,s.title,"group",void 0,s.classes,s.dir);var w=o.default.getVertices(),x=o.default.getEdges();f.log.info(x);var k=0;for(k=m.length-1;k>=0;k--){s=m[k],Object(a.selectAll)("cluster").append("text");for(var C=0;C<s.nodes.length;C++)f.log.info("Setting up subgraphs",s.nodes[C],s.id),y.setParent(s.nodes[C],s.id)}v(w,y,e),b(x,y);var T=Object(a.select)('[id="'.concat(e,'"]'));T.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var E=Object(a.select)("#"+e+" g");Object(u.render)(E,y,["point","circle","cross"],"flowchart",e);var S=h.diagramPadding,O=T.node().getBBox(),A=O.width+2*S,M=O.height+2*S;if(f.log.debug("new ViewBox 0 0 ".concat(A," ").concat(M),"translate(".concat(S-y._label.marginx,", ").concat(S-y._label.marginy,")")),Object(g.configureSvgSize)(T,M,A,h.useMaxWidth),T.attr("viewBox","0 0 ".concat(A," ").concat(M)),T.select("g").attr("transform","translate(".concat(S-y._label.marginx,", ").concat(S-O.y,")")),o.default.indexNodes("subGraph"+k),!h.htmlLabels)for(var D=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),j=0;j<D.length;j++){var N=D[j],B=N.getBBox(),L=document.createElementNS("http://www.w3.org/2000/svg","rect");L.setAttribute("rx",0),L.setAttribute("ry",0),L.setAttribute("width",B.width),L.setAttribute("height",B.height),N.insertBefore(L,N.firstChild)}Object.keys(w).forEach((function(t){var n=w[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"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var o=r.insert((function(){return i}),":first-child"),s=r.select(".label-container");s&&o.append((function(){return s.node()}));var c=r.select(".label");c&&o.append((function(){return c.node()}))}}}))};e.default={setConf:m,addVertices:v,addEdges:b,getClasses:_,draw:w}},"./src/diagrams/flowchart/flowRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return b})),n.d(e,"addVertices",(function(){return _})),n.d(e,"addEdges",(function(){return w})),n.d(e,"getClasses",(function(){return x})),n.d(e,"draw",(function(){return k}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/flowchart/flowDb.js"),s=n("./src/diagrams/flowchart/parser/flow.jison"),c=n.n(s),l=n("./src/config.js"),u=n("dagre-d3"),h=n.n(u),d=n("dagre-d3/lib/label/add-html-label.js"),f=n.n(d),p=n("./src/logger.js"),g=n("./src/diagrams/common/common.js"),y=n("./src/utils.js"),m=n("./src/diagrams/flowchart/flowChartShapes.js"),v={},b=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)v[e[n]]=t[e[n]]},_=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 s,c=Object(y.getStylesFromArray)(i.styles),u=void 0!==i.text?i.text:i.id;if(Object(g.evaluate)(Object(l.getConfig)().flowchart.htmlLabels)){var h={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(s=f()(r,h).node()).parentNode.removeChild(s)}else{var d=document.createElementNS("http://www.w3.org/2000/svg","text");d.setAttribute("style",c.labelStyle.replace("color:","fill:"));for(var m=u.split(g.default.lineBreakRegex),v=0;v<m.length;v++){var b=document.createElementNS("http://www.w3.org/2000/svg","tspan");b.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),b.setAttribute("dy","1em"),b.setAttribute("x","1"),b.textContent=m[v],d.appendChild(b)}s=d}var _=0,w="";switch(i.type){case"round":_=5,w="rect";break;case"square":w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"odd_right":w="rect_left_inv_arrow";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"group":w="rect";break;default:w="rect"}p.log.warn("Adding node",i.id,i.domId),e.setNode(o.default.lookUpDomId(i.id),{labelType:"svg",labelStyle:c.labelStyle,shape:w,label:s,rx:_,ry:_,class:a,style:c.style,id:o.default.lookUpDomId(i.id)})}))},w=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var s=Object(y.getStylesFromArray)(t.defaultStyle);n=s.style,r=s.labelStyle}t.forEach((function(s){i++;var c="L-"+s.start+"-"+s.end,u="LS-"+s.start,h="LE-"+s.end,d={};"arrow_open"===s.type?d.arrowhead="none":d.arrowhead="normal";var f="",p="";if(void 0!==s.style){var m=Object(y.getStylesFromArray)(s.style);f=m.style,p=m.labelStyle}else switch(s.stroke){case"normal":f="fill:none",void 0!==n&&(f=n),void 0!==r&&(p=r);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none"}d.style=f,d.labelStyle=p,void 0!==s.interpolate?d.curve=Object(y.interpolateToCurve)(s.interpolate,a.curveLinear):void 0!==t.defaultInterpolate?d.curve=Object(y.interpolateToCurve)(t.defaultInterpolate,a.curveLinear):d.curve=Object(y.interpolateToCurve)(v.curve,a.curveLinear),void 0===s.text?void 0!==s.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",Object(g.evaluate)(Object(l.getConfig)().flowchart.htmlLabels)?(d.labelType="html",d.label='<span id="L-'.concat(c,'" class="edgeLabel L-').concat(u,"' L-").concat(h,'">').concat(s.text.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),"</span>")):(d.labelType="text",d.label=s.text.replace(g.default.lineBreakRegex,"\n"),void 0===s.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:"))),d.id=c,d.class=u+" "+h,d.minlen=s.length||1,e.setEdge(o.default.lookUpDomId(s.start),o.default.lookUpDomId(s.end),d,i)}))},x=function(t){p.log.info("Extracting classes"),o.default.clear();try{var e=c.a.parser;return e.yy=o.default,e.parse(t),o.default.getClasses()}catch(lX){return}},k=function(t,e){p.log.info("Drawing flowchart"),o.default.clear(),o.default.setGen("gen-1");var n=c.a.parser;n.yy=o.default,n.parse(t);var r=o.default.getDirection();void 0===r&&(r="TD");for(var s,u=Object(l.getConfig)().flowchart,d=u.nodeSpacing||50,f=u.rankSpacing||50,v=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:d,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),b=o.default.getSubGraphs(),x=b.length-1;x>=0;x--)s=b[x],o.default.addVertex(s.id,s.title,"group",void 0,s.classes);var k=o.default.getVertices();p.log.warn("Get vertices",k);var C=o.default.getEdges(),T=0;for(T=b.length-1;T>=0;T--){s=b[T],Object(a.selectAll)("cluster").append("text");for(var E=0;E<s.nodes.length;E++)p.log.warn("Setting subgraph",s.nodes[E],o.default.lookUpDomId(s.nodes[E]),o.default.lookUpDomId(s.id)),v.setParent(o.default.lookUpDomId(s.nodes[E]),o.default.lookUpDomId(s.id))}_(k,v,e),w(C,v);var S=new(0,h.a.render);m.default.addToRender(S),S.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");h.a.util.applyStyle(i,n[r+"Style"])},S.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 O=Object(a.select)('[id="'.concat(e,'"]'));O.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),p.log.warn(v);var A=Object(a.select)("#"+e+" g");S(A,v),A.selectAll("g.node").attr("title",(function(){return o.default.getTooltip(this.id)}));var M=u.diagramPadding,D=O.node().getBBox(),j=D.width+2*M,N=D.height+2*M;Object(y.configureSvgSize)(O,N,j,u.useMaxWidth);var B="".concat(D.x-M," ").concat(D.y-M," ").concat(j," ").concat(N);for(p.log.debug("viewBox ".concat(B)),O.attr("viewBox",B),o.default.indexNodes("subGraph"+T),T=0;T<b.length;T++)if("undefined"!==(s=b[T]).title){var L=document.querySelectorAll("#"+e+' [id="'+o.default.lookUpDomId(s.id)+'"] rect'),R=document.querySelectorAll("#"+e+' [id="'+o.default.lookUpDomId(s.id)+'"]'),I=L[0].x.baseVal.value,F=L[0].y.baseVal.value,P=L[0].width.baseVal.value,Y=Object(a.select)(R[0]).select(".label");Y.attr("transform","translate(".concat(I+P/2,", ").concat(F+14,")")),Y.attr("id",e+"Text");for(var z=0;z<s.classes.length;z++)R[0].classList.add(s.classes[z])}Object(g.evaluate)(u.htmlLabels);for(var U=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),$=0;$<U.length;$++){var W=U[$],q=W.getBBox(),H=document.createElementNS("http://www.w3.org/2000/svg","rect");H.setAttribute("rx",0),H.setAttribute("ry",0),H.setAttribute("width",q.width),H.setAttribute("height",q.height),W.insertBefore(H,W.firstChild)}Object.keys(k).forEach((function(t){var n=k[t];if(n.link){var r=Object(a.select)("#"+e+' [id="'+o.default.lookUpDomId(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"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var s=r.insert((function(){return i}),":first-child"),c=r.select(".label-container");c&&s.append((function(){return c.node()}));var l=r.select(".label");l&&s.append((function(){return l.node()}))}}}))};e.default={setConf:b,addVertices:_,addEdges:w,getClasses:x,draw:k}},"./src/diagrams/flowchart/parser/flow.jison":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,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],o=[2,10],s=[1,20],c=[1,21],l=[1,22],u=[1,23],h=[1,30],d=[1,59],f=[1,33],p=[1,34],g=[1,35],y=[1,36],m=[1,37],v=[1,53],b=[1,48],_=[1,50],w=[1,45],x=[1,49],k=[1,52],C=[1,56],T=[1,57],E=[1,38],S=[1,39],O=[1,40],A=[1,41],M=[1,58],D=[1,47],j=[1,51],N=[1,54],B=[1,55],L=[1,46],R=[1,62],I=[1,67],F=[1,20,21,22,23,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],P=[1,71],Y=[1,70],z=[1,72],U=[20,21,23,70,71],$=[1,93],W=[1,98],q=[1,95],H=[1,100],V=[1,103],G=[1,101],X=[1,102],Z=[1,96],Q=[1,108],K=[1,107],J=[1,97],tt=[1,99],et=[1,104],nt=[1,105],rt=[1,106],it=[1,109],at=[20,21,22,23,70,71],ot=[20,21,22,23,48,70,71],st=[20,21,22,23,40,47,48,50,52,54,56,58,60,62,63,65,70,71,81,95,96,99,100,101,103,104,114,115,116,117,118,119],ct=[20,21,23],lt=[20,21,23,47,70,71,81,95,96,99,100,101,103,104,114,115,116,117,118,119],ut=[1,12,20,21,22,23,24,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],ht=[47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],dt=[1,141],ft=[1,149],pt=[1,150],gt=[1,151],yt=[1,152],mt=[1,136],vt=[1,137],bt=[1,133],_t=[1,144],wt=[1,145],xt=[1,146],kt=[1,147],Ct=[1,148],Tt=[1,153],Et=[1,154],St=[1,139],Ot=[1,142],At=[1,138],Mt=[1,135],Dt=[20,21,22,23,38,42,47,76,77,78,79,80,81,95,96,99,100,101,103,104,110,111,112,113,114,115,116,117,118,119],jt=[1,157],Nt=[20,21,22,23,26,47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],Bt=[20,21,22,23,24,26,38,40,41,42,47,51,53,55,57,59,61,62,64,66,70,71,72,76,77,78,79,80,81,82,85,95,96,99,100,101,103,104,105,106,114,115,116,117,118,119],Lt=[12,21,22,24],Rt=[22,96],It=[1,238],Ft=[1,242],Pt=[1,239],Yt=[1,236],zt=[1,233],Ut=[1,234],$t=[1,235],Wt=[1,237],qt=[1,240],Ht=[1,241],Vt=[1,243],Gt=[1,260],Xt=[20,21,23,96],Zt=[20,21,22,23,76,92,95,96,99,100,101,102,103,104,105],Qt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,link:44,node:45,vertex:46,AMP:47,STYLE_SEPARATOR:48,idString:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,CYLINDERSTART:58,CYLINDEREND:59,DIAMOND_START:60,DIAMOND_STOP:61,TAGEND:62,TRAPSTART:63,TRAPEND:64,INVTRAPSTART:65,INVTRAPEND:66,linkStatement:67,arrowText:68,TESTSTR:69,START_LINK:70,LINK:71,PIPE:72,textToken:73,STR:74,keywords:75,STYLE:76,LINKSTYLE:77,CLASSDEF:78,CLASS:79,CLICK:80,DOWN:81,UP:82,textNoTags:83,textNoTagsToken:84,DEFAULT:85,stylesOpt:86,alphaNum:87,CALLBACKNAME:88,CALLBACKARGS:89,HREF:90,LINK_TARGET:91,HEX:92,numList:93,INTERPOLATE:94,NUM:95,COMMA:96,style:97,styleComponent:98,ALPHA:99,COLON:100,MINUS:101,UNIT:102,BRKT:103,DOT:104,PCT:105,TAGSTART:106,alphaNumToken:107,idStringToken:108,alphaNumStatement:109,direction_tb:110,direction_bt:111,direction_rl:112,direction_lr:113,PUNCTUATION:114,UNICODE_TEXT:115,PLUS:116,EQUALS:117,MULT:118,UNDERSCORE:119,graphCodeTokens:120,ARROW_CROSS:121,ARROW_POINT:122,ARROW_CIRCLE:123,ARROW_OPEN:124,QUOTE:125,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",47:"AMP",48:"STYLE_SEPARATOR",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"CYLINDERSTART",59:"CYLINDEREND",60:"DIAMOND_START",61:"DIAMOND_STOP",62:"TAGEND",63:"TRAPSTART",64:"TRAPEND",65:"INVTRAPSTART",66:"INVTRAPEND",69:"TESTSTR",70:"START_LINK",71:"LINK",72:"PIPE",74:"STR",76:"STYLE",77:"LINKSTYLE",78:"CLASSDEF",79:"CLASS",80:"CLICK",81:"DOWN",82:"UP",85:"DEFAULT",88:"CALLBACKNAME",89:"CALLBACKARGS",90:"HREF",91:"LINK_TARGET",92:"HEX",94:"INTERPOLATE",95:"NUM",96:"COMMA",99:"ALPHA",100:"COLON",101:"MINUS",102:"UNIT",103:"BRKT",104:"DOT",105:"PCT",106:"TAGSTART",110:"direction_tb",111:"direction_bt",112:"direction_rl",113:"direction_lr",114:"PUNCTUATION",115:"UNICODE_TEXT",116:"PLUS",117:"EQUALS",118:"MULT",119:"UNDERSCORE",121:"ARROW_CROSS",122:"ARROW_POINT",123:"ARROW_CIRCLE",124:"ARROW_OPEN",125:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[45,1],[45,5],[45,3],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,4],[46,6],[46,4],[46,4],[46,4],[46,4],[46,4],[46,1],[44,2],[44,3],[44,3],[44,1],[44,3],[67,1],[68,3],[39,1],[39,2],[39,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[75,1],[83,1],[83,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[93,1],[93,3],[86,1],[86,3],[97,1],[97,2],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[84,1],[84,1],[84,1],[84,1],[49,1],[49,2],[87,1],[87,2],[109,1],[109,1],[109,1],[109,1],[43,1],[43,1],[43,1],[43,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 77:case 79:case 91:case 147:case 149:case 150:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 48: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 49: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 50:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 51:this.$={stmt:a[s],nodes:a[s]};break;case 52:this.$=[a[s]];break;case 53:this.$=a[s-4].concat(a[s]);break;case 54:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 55:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 56:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 62:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 63:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 68:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 69:this.$=a[s],r.addVertex(a[s]);break;case 70:a[s-1].text=a[s],this.$=a[s-1];break;case 71:case 72:a[s-2].text=a[s-1],this.$=a[s-2];break;case 73:this.$=a[s];break;case 74:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 75:c=r.destructLink(a[s]),this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 76:this.$=a[s-1];break;case 78:case 92:case 148:this.$=a[s-1]+""+a[s];break;case 93:case 94:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 95:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 96:case 104:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 97:case 105:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 98:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 99:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 100:case 106:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 101:case 107:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 102:case 108:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 103:case 109:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 110:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 111:case 113:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 112:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 114:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 115:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 116:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 117:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 118:case 120:this.$=[a[s]];break;case 119:case 121:a[s-2].push(a[s]),this.$=a[s-2];break;case 123:this.$=a[s-1]+a[s];break;case 145:this.$=a[s];break;case 146:this.$=a[s-1]+""+a[s];break;case 151:this.$="v";break;case 152:this.$="-";break;case 153:this.$={stmt:"dir",value:"TB"};break;case 154:this.$={stmt:"dir",value:"BT"};break;case 155:this.$={stmt:"dir",value:"RL"};break;case 156:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,43:31,45:32,46:42,47:d,49:43,76:f,77:p,78:g,79:y,80:m,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,110:E,111:S,112:O,113:A,114:M,115:D,116:j,117:N,118:B,119:L},{8:60,10:[1,61],15:R},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,64],21:[1,65],22:I,27:63,30:66},t(F,[2,11]),t(F,[2,12]),t(F,[2,13]),t(F,[2,14]),t(F,[2,15]),t(F,[2,16]),{9:68,20:P,21:Y,23:z,44:69,67:73,70:[1,74],71:[1,75]},{9:76,20:P,21:Y,23:z},{9:77,20:P,21:Y,23:z},{9:78,20:P,21:Y,23:z},{9:79,20:P,21:Y,23:z},{9:80,20:P,21:Y,23:z},{9:82,20:P,21:Y,22:[1,81],23:z},t(F,[2,44]),t(U,[2,51],{30:83,22:I}),{22:[1,84]},{22:[1,85]},{22:[1,86]},{22:[1,87]},{26:$,47:W,74:[1,91],81:q,87:90,88:[1,88],90:[1,89],95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(F,[2,153]),t(F,[2,154]),t(F,[2,155]),t(F,[2,156]),t(at,[2,52],{48:[1,110]}),t(ot,[2,69],{108:121,40:[1,111],47:d,50:[1,112],52:[1,113],54:[1,114],56:[1,115],58:[1,116],60:[1,117],62:[1,118],63:[1,119],65:[1,120],81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,114:M,115:D,116:j,117:N,118:B,119:L}),t(st,[2,145]),t(st,[2,170]),t(st,[2,171]),t(st,[2,172]),t(st,[2,173]),t(st,[2,174]),t(st,[2,175]),t(st,[2,176]),t(st,[2,177]),t(st,[2,178]),t(st,[2,179]),t(st,[2,180]),t(st,[2,181]),t(st,[2,182]),t(st,[2,183]),t(st,[2,184]),{9:122,20:P,21:Y,23:z},{11:123,14:[1,124]},t(ct,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,125]},t(lt,[2,34],{30:126,22:I}),t(F,[2,35]),{45:127,46:42,47:d,49:43,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,114:M,115:D,116:j,117:N,118:B,119:L},t(ut,[2,45]),t(ut,[2,46]),t(ut,[2,47]),t(ht,[2,73],{68:128,69:[1,129],72:[1,130]}),{22:dt,24:ft,26:pt,38:gt,39:131,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t([47,69,72,81,95,96,99,100,101,103,104,114,115,116,117,118,119],[2,75]),t(F,[2,36]),t(F,[2,37]),t(F,[2,38]),t(F,[2,39]),t(F,[2,40]),{22:dt,24:ft,26:pt,38:gt,39:155,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(Dt,o,{17:156}),t(U,[2,50],{47:jt}),{26:$,47:W,81:q,87:158,92:[1,159],95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},{85:[1,160],93:161,95:[1,162]},{26:$,47:W,81:q,85:[1,163],87:164,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},{26:$,47:W,81:q,87:165,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ct,[2,96],{22:[1,166],89:[1,167]}),t(ct,[2,100],{22:[1,168]}),t(ct,[2,104],{107:94,109:170,22:[1,169],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,114:J,115:tt,116:et,117:nt,118:rt,119:it}),t(ct,[2,106],{22:[1,171]}),t(Nt,[2,147]),t(Nt,[2,149]),t(Nt,[2,150]),t(Nt,[2,151]),t(Nt,[2,152]),t(Bt,[2,157]),t(Bt,[2,158]),t(Bt,[2,159]),t(Bt,[2,160]),t(Bt,[2,161]),t(Bt,[2,162]),t(Bt,[2,163]),t(Bt,[2,164]),t(Bt,[2,165]),t(Bt,[2,166]),t(Bt,[2,167]),t(Bt,[2,168]),t(Bt,[2,169]),{47:d,49:172,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,114:M,115:D,116:j,117:N,118:B,119:L},{22:dt,24:ft,26:pt,38:gt,39:173,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:175,42:yt,47:W,50:[1,174],62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:176,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:177,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:178,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:179,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:180,42:yt,47:W,60:[1,181],62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:182,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:183,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:184,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(st,[2,146]),t(Lt,[2,3]),{8:185,15:R},{15:[2,7]},t(a,[2,28]),t(lt,[2,33]),t(U,[2,48],{30:186,22:I}),t(ht,[2,70],{22:[1,187]}),{22:[1,188]},{22:dt,24:ft,26:pt,38:gt,39:189,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,62:mt,70:vt,71:[1,190],73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(Bt,[2,77]),t(Bt,[2,79]),t(Bt,[2,135]),t(Bt,[2,136]),t(Bt,[2,137]),t(Bt,[2,138]),t(Bt,[2,139]),t(Bt,[2,140]),t(Bt,[2,141]),t(Bt,[2,142]),t(Bt,[2,143]),t(Bt,[2,144]),t(Bt,[2,80]),t(Bt,[2,81]),t(Bt,[2,82]),t(Bt,[2,83]),t(Bt,[2,84]),t(Bt,[2,85]),t(Bt,[2,86]),t(Bt,[2,87]),t(Bt,[2,88]),t(Bt,[2,89]),t(Bt,[2,90]),{9:193,20:P,21:Y,22:dt,23:z,24:ft,26:pt,38:gt,40:[1,192],42:yt,47:W,62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,194],43:31,45:32,46:42,47:d,49:43,76:f,77:p,78:g,79:y,80:m,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,110:E,111:S,112:O,113:A,114:M,115:D,116:j,117:N,118:B,119:L},{22:I,30:195},{22:[1,196],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:170,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:[1,197]},{22:[1,198]},{22:[1,199],96:[1,200]},t(Rt,[2,118]),{22:[1,201]},{22:[1,202],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:170,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:[1,203],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:170,114:J,115:tt,116:et,117:nt,118:rt,119:it},{74:[1,204]},t(ct,[2,98],{22:[1,205]}),{74:[1,206],91:[1,207]},{74:[1,208]},t(Nt,[2,148]),{74:[1,209],91:[1,210]},t(at,[2,54],{108:121,47:d,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,114:M,115:D,116:j,117:N,118:B,119:L}),{22:dt,24:ft,26:pt,38:gt,41:[1,211],42:yt,47:W,62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:212,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,51:[1,213],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,53:[1,214],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,55:[1,215],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,57:[1,216],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,59:[1,217],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,61:[1,218],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,39:219,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,41:[1,220],42:yt,47:W,62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,62:mt,64:[1,221],66:[1,222],70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,62:mt,64:[1,224],66:[1,223],70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{9:225,20:P,21:Y,23:z},t(U,[2,49],{47:jt}),t(ht,[2,72]),t(ht,[2,71]),{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,62:mt,70:vt,72:[1,226],73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ht,[2,74]),t(Bt,[2,78]),{22:dt,24:ft,26:pt,38:gt,39:227,42:yt,47:W,62:mt,70:vt,73:132,74:bt,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(Dt,o,{17:228}),t(F,[2,43]),{46:229,47:d,49:43,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,114:M,115:D,116:j,117:N,118:B,119:L},{22:It,76:Ft,86:230,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:244,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:245,92:Pt,94:[1,246],95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:247,92:Pt,94:[1,248],95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{95:[1,249]},{22:It,76:Ft,86:250,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:251,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{26:$,47:W,81:q,87:252,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ct,[2,97]),{74:[1,253]},t(ct,[2,101],{22:[1,254]}),t(ct,[2,102]),t(ct,[2,105]),t(ct,[2,107],{22:[1,255]}),t(ct,[2,108]),t(ot,[2,55]),{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,51:[1,256],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ot,[2,61]),t(ot,[2,57]),t(ot,[2,58]),t(ot,[2,59]),t(ot,[2,60]),t(ot,[2,62]),{22:dt,24:ft,26:pt,38:gt,42:yt,47:W,61:[1,257],62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ot,[2,64]),t(ot,[2,65]),t(ot,[2,67]),t(ot,[2,66]),t(ot,[2,68]),t(Lt,[2,4]),t([22,47,81,95,96,99,100,101,103,104,114,115,116,117,118,119],[2,76]),{22:dt,24:ft,26:pt,38:gt,41:[1,258],42:yt,47:W,62:mt,70:vt,73:191,75:143,76:_t,77:wt,78:xt,79:kt,80:Ct,81:Tt,82:Et,84:134,85:St,95:H,96:V,99:G,100:X,101:Ot,103:Q,104:K,105:At,106:Mt,107:140,114:J,115:tt,116:et,117:nt,118:rt,119:it},{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,259],43:31,45:32,46:42,47:d,49:43,76:f,77:p,78:g,79:y,80:m,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,110:E,111:S,112:O,113:A,114:M,115:D,116:j,117:N,118:B,119:L},t(at,[2,53]),t(ct,[2,110],{96:Gt}),t(Xt,[2,120],{98:261,22:It,76:Ft,92:Pt,95:Yt,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt}),t(Zt,[2,122]),t(Zt,[2,124]),t(Zt,[2,125]),t(Zt,[2,126]),t(Zt,[2,127]),t(Zt,[2,128]),t(Zt,[2,129]),t(Zt,[2,130]),t(Zt,[2,131]),t(Zt,[2,132]),t(Zt,[2,133]),t(Zt,[2,134]),t(ct,[2,111],{96:Gt}),t(ct,[2,112],{96:Gt}),{22:[1,262]},t(ct,[2,113],{96:Gt}),{22:[1,263]},t(Rt,[2,119]),t(ct,[2,93],{96:Gt}),t(ct,[2,94],{96:Gt}),t(ct,[2,95],{107:94,109:170,26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,114:J,115:tt,116:et,117:nt,118:rt,119:it}),t(ct,[2,99]),{91:[1,264]},{91:[1,265]},{51:[1,266]},{61:[1,267]},{9:268,20:P,21:Y,23:z},t(F,[2,42]),{22:It,76:Ft,92:Pt,95:Yt,97:269,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},t(Zt,[2,123]),{26:$,47:W,81:q,87:270,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},{26:$,47:W,81:q,87:271,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,107:94,109:92,114:J,115:tt,116:et,117:nt,118:rt,119:it},t(ct,[2,103]),t(ct,[2,109]),t(ot,[2,56]),t(ot,[2,63]),t(Dt,o,{17:272}),t(Xt,[2,121],{98:261,22:It,76:Ft,92:Pt,95:Yt,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt}),t(ct,[2,116],{107:94,109:170,22:[1,273],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,114:J,115:tt,116:et,117:nt,118:rt,119:it}),t(ct,[2,117],{107:94,109:170,22:[1,274],26:$,47:W,81:q,95:H,96:V,99:G,100:X,101:Z,103:Q,104:K,114:J,115:tt,116:et,117:nt,118:rt,119:it}),{18:18,19:19,20:s,21:c,22:l,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,275],43:31,45:32,46:42,47:d,49:43,76:f,77:p,78:g,79:y,80:m,81:v,95:b,96:_,99:w,100:x,101:k,103:C,104:T,108:44,110:E,111:S,112:O,113:A,114:M,115:D,116:j,117:N,118:B,119:L},{22:It,76:Ft,86:276,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},{22:It,76:Ft,86:277,92:Pt,95:Yt,97:231,98:232,99:zt,100:Ut,101:$t,102:Wt,103:qt,104:Ht,105:Vt},t(F,[2,41]),t(ct,[2,114],{96:Gt}),t(ct,[2,115],{96:Gt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],124:[2,7]},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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},Kt={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:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 76;case 11:return 85;case 12:return 77;case 13:return 94;case 14:return 78;case 15:return 79;case 16:this.begin("href");break;case 17:this.popState();break;case 18:return 90;case 19:this.begin("callbackname");break;case 20:this.popState();break;case 21:this.popState(),this.begin("callbackargs");break;case 22:return 88;case 23:this.popState();break;case 24:return 89;case 25:this.begin("click");break;case 26:this.popState();break;case 27:return 80;case 28:case 29:return t.lex.firstGraph()&&this.begin("dir"),24;case 30:return 38;case 31:return 42;case 32:case 33:case 34:case 35:return 91;case 36:return this.popState(),25;case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:return this.popState(),26;case 47:return 110;case 48:return 111;case 49:return 112;case 50:return 113;case 51:return 95;case 52:return 103;case 53:return 48;case 54:return 100;case 55:return 47;case 56:return 20;case 57:return 96;case 58:return 118;case 59:case 60:case 61:return 71;case 62:case 63:case 64:return 70;case 65:return 52;case 66:return 53;case 67:return 54;case 68:return 55;case 69:return 56;case 70:return 57;case 71:return 58;case 72:return 59;case 73:return 101;case 74:return 104;case 75:return 119;case 76:return 116;case 77:return 105;case 78:case 79:return 117;case 80:return 106;case 81:return 62;case 82:return 82;case 83:return"SEP";case 84:return 81;case 85:return 99;case 86:return 64;case 87:return 63;case 88:return 66;case 89:return 65;case 90:return 114;case 91:return 115;case 92:return 72;case 93:return 50;case 94:return 51;case 95:return 40;case 96:return 41;case 97:return 60;case 98:return 61;case 99:return 125;case 100:return 21;case 101:return 22;case 102:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\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)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[23,24],inclusive:!1},callbackname:{rules:[20,21,22],inclusive:!1},href:{rules:[17,18],inclusive:!1},click:{rules:[26,27],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[36,37,38,39,40,41,42,43,44,45,46],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,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],inclusive:!0}}};function Jt(){this.yy={}}return Qt.lexer=Kt,Jt.prototype=Qt,Qt.Parser=Jt,new Jt}();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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/flowchart/styles.js":function(t,e,n){n.r(e),e.default=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span {\n color: ").concat(t.titleColor,";\n }\n // .cluster div {\n // color: ").concat(t.titleColor,";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")}},"./src/diagrams/gantt/ganttDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return S})),n.d(e,"clear",(function(){return O})),n.d(e,"setAxisFormat",(function(){return A})),n.d(e,"getAxisFormat",(function(){return M})),n.d(e,"setTodayMarker",(function(){return D})),n.d(e,"getTodayMarker",(function(){return j})),n.d(e,"setDateFormat",(function(){return N})),n.d(e,"enableInclusiveEndDates",(function(){return B})),n.d(e,"endDatesAreInclusive",(function(){return L})),n.d(e,"enableTopAxis",(function(){return R})),n.d(e,"topAxisEnabled",(function(){return I})),n.d(e,"getDateFormat",(function(){return F})),n.d(e,"setExcludes",(function(){return P})),n.d(e,"getExcludes",(function(){return Y})),n.d(e,"setTitle",(function(){return z})),n.d(e,"getTitle",(function(){return U})),n.d(e,"addSection",(function(){return $})),n.d(e,"getSections",(function(){return W})),n.d(e,"getTasks",(function(){return q})),n.d(e,"addTask",(function(){return nt})),n.d(e,"findTaskById",(function(){return rt})),n.d(e,"addTaskOrg",(function(){return it})),n.d(e,"setLink",(function(){return ot})),n.d(e,"setClass",(function(){return st})),n.d(e,"setClickEvent",(function(){return lt})),n.d(e,"bindFunctions",(function(){return ut}));var r=n("moment-mini"),i=n.n(r),a=n("@braintree/sanitize-url"),o=n("./src/logger.js"),s=n("./src/config.js"),c=n("./src/utils.js"),l=n("./src/mermaidAPI.js");function u(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d,f,p="",g="",y="",m=[],v="",b=[],_=[],w="",x=["active","done","crit","milestone"],k=[],C=!1,T=!1,E=0,S=function(t,e,n){l.default.parseDirective(this,t,e,n)},O=function(){b=[],_=[],w="",k=[],v="",K=0,d=void 0,f=void 0,tt=[],p="",g="",y="",m=[],C=!1,T=!1,E=0},A=function(t){g=t},M=function(){return g},D=function(t){y=t},j=function(){return y},N=function(t){p=t},B=function(){C=!0},L=function(){return C},R=function(){T=!0},I=function(){return T},F=function(){return p},P=function(t){m=t.toLowerCase().split(/[\s,]+/)},Y=function(){return m},z=function(t){v=t},U=function(){return v},$=function(t){w=t,b.push(t)},W=function(){return b},q=function(){for(var t=at(),e=0;!t&&e<10;)t=at(),e++;return _=tt},H=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},V=function(t,e,n){if(n.length&&!t.manualEndTime){var r=i()(t.startTime,e,!0);r.add(1,"d");var a=i()(t.endTime,e,!0),o=G(r,a,e,n);t.endTime=a.toDate(),t.renderEndTime=o}},G=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=H(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},X=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var a=null;if(r[1].split(" ").forEach((function(t){var e=rt(t);void 0!==e&&(a?e.endTime>a.endTime&&(a=e):a=e)})),a)return a.endTime;var s=new Date;return s.setHours(0,0,0,0),s}var c=i()(n,e.trim(),!0);return c.isValid()?c.toDate():(o.log.debug("Invalid date:"+n),o.log.debug("With date format:"+e.trim()),new Date)},Z=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()},Q=function(t,e,n,r){r=r||!1,n=n.trim();var a=i()(n,e.trim(),!0);return a.isValid()?(r&&a.add(1,"d"),a.toDate()):Z(/^([\d]+)([wdhms])/.exec(n.trim()),i()(t))},K=0,J=function(t){return void 0===t?"task"+(K+=1):t},tt=[],et={},nt=function(t,e){var n={section:w,type:w,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={};ht(n,r,x);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=J(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=J(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=J(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(f,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=f,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=E,E++;var i=tt.push(n);f=n.id,et[n.id]=i-1},rt=function(t){var e=et[t];return tt[e]},it=function(t,e){var n={section:w,type:w,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};ht(n,r,x);for(var a=0;a<n.length;a++)n[a]=n[a].trim();var o="";switch(n.length){case 1:r.id=J(),r.startTime=t.endTime,o=n[0];break;case 2:r.id=J(),r.startTime=X(0,p,n[0]),o=n[1];break;case 3:r.id=J(n[0]),r.startTime=X(0,p,n[1]),o=n[2]}return o&&(r.endTime=Q(r.startTime,p,o,C),r.manualEndTime=i()(o,"YYYY-MM-DD",!0).isValid(),V(r,p,m)),r}(d,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,d=n,_.push(n)},at=function(){for(var t=function(t){var e=tt[t],n="";switch(tt[t].raw.startTime.type){case"prevTaskEnd":var r=rt(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=X(0,p,tt[t].raw.startTime.startData))&&(tt[t].startTime=n)}return tt[t].startTime&&(tt[t].endTime=Q(tt[t].startTime,p,tt[t].raw.endTime.data,C),tt[t].endTime&&(tt[t].processed=!0,tt[t].manualEndTime=i()(tt[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),V(tt[t],p,m))),tt[t].processed},e=!0,n=0;n<tt.length;n++)t(n),e=e&&tt[n].processed;return e},ot=function(t,e){var n=e;"loose"!==s.getConfig().securityLevel&&(n=Object(a.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==rt(t)&&ct(t,(function(){window.open(n,"_self")}))})),st(t,"clickable")},st=function(t,e){t.split(",").forEach((function(t){var n=rt(t);void 0!==n&&n.classes.push(e)}))},ct=function(t,e){k.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),k.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))},lt=function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===s.getConfig().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!==rt(t)&&ct(t,(function(){c.default.runFunc.apply(c.default,[e].concat(u(r)))}))}}(t,e,n)})),st(t,"clickable")},ut=function(t){k.forEach((function(e){e(t)}))};function ht(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)}))}e.default={parseDirective:S,getConfig:function(){return s.getConfig().gantt},clear:O,setDateFormat:N,getDateFormat:F,enableInclusiveEndDates:B,endDatesAreInclusive:L,enableTopAxis:R,topAxisEnabled:I,setAxisFormat:A,getAxisFormat:M,setTodayMarker:D,getTodayMarker:j,setTitle:z,getTitle:U,addSection:$,getSections:W,getTasks:q,addTask:nt,findTaskById:rt,addTaskOrg:it,setExcludes:P,getExcludes:Y,setClickEvent:lt,setLink:ot,bindFunctions:ut,durationToDate:Z}},"./src/diagrams/gantt/ganttRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return u})),n.d(e,"draw",(function(){return h}));var r=n("d3"),i=n("./src/diagrams/gantt/parser/gantt.jison"),a=n("./src/diagrams/common/common.js"),o=n("./src/diagrams/gantt/ganttDb.js"),s=n("./src/config.js"),c=n("./src/utils.js");i.parser.yy=o.default;var l,u=function(){},h=function(t,e){var n=Object(s.getConfig)().gantt;i.parser.yy.clear(),i.parser.parse(t);var u=document.getElementById(e);void 0===(l=u.parentElement.offsetWidth)&&(l=1200),void 0!==n.useWidth&&(l=n.useWidth);var h=i.parser.yy.getTasks(),d=h.length*(n.barHeight+n.barGap)+2*n.topPadding;u.setAttribute("viewBox","0 0 "+l+" "+d);for(var f=Object(r.select)('[id="'.concat(e,'"]')),p=Object(r.scaleTime)().domain([Object(r.min)(h,(function(t){return t.startTime})),Object(r.max)(h,(function(t){return t.endTime}))]).rangeRound([0,l-n.leftPadding-n.rightPadding]),g=[],y=0;y<h.length;y++)g.push(h[y].type);var m,v,b,_,w,x,k,C=g;function T(t,e){return function(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(e)[t]||0}g=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}(g),h.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),m=h,v=l,b=d,_=n.barHeight,w=_+n.barGap,x=n.topPadding,k=n.leftPadding,Object(r.scaleLinear)().domain([0,g.length]).range(["#00B9FA","#F95002"]).interpolate(r.interpolateHcl),function(t,e,a,s){var c=Object(r.axisBottom)(p).tickSize(-s+e+n.gridLineStartPadding).tickFormat(Object(r.timeFormat)(i.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(f.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),o.default.topAxisEnabled()||n.topAxis){var l=Object(r.axisTop)(p).tickSize(-s+e+n.gridLineStartPadding).tickFormat(Object(r.timeFormat)(i.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));f.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(l).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(k,x,0,b),function(t,e,r,i,a,o,s){f.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,n){return t.order*e+r-2})).attr("width",(function(){return s-n.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t.type===g[e])return"section section"+e%n.numberSectionStyles;return"section section0"}));var c=f.append("g").selectAll("rect").data(t).enter();c.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?p(t.startTime)+i+.5*(p(t.endTime)-p(t.startTime))-.5*a:p(t.startTime)+i})).attr("y",(function(t,n){return t.order*e+r})).attr("width",(function(t){return t.milestone?a:p(t.renderEndTime||t.endTime)-p(t.startTime)})).attr("height",a).attr("transform-origin",(function(t,n){return n=t.order,(p(t.startTime)+i+.5*(p(t.endTime)-p(t.startTime))).toString()+"px "+(n*e+r+.5*a).toString()+"px"})).attr("class",(function(t){var e="task",r="";t.classes.length>0&&(r=t.classes.join(" "));for(var i=0,a=0;a<g.length;a++)t.type===g[a]&&(i=a%n.numberSectionStyles);var o="";return t.active?t.crit?o+=" activeCrit":o=" active":t.done?o=t.crit?" doneCrit":" done":t.crit&&(o+=" crit"),0===o.length&&(o=" task"),t.milestone&&(o=" milestone "+o),o+=i,e+(o+=" "+r)})),c.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=p(t.startTime),r=p(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(p(t.endTime)-p(t.startTime))-.5*a),t.milestone&&(r=e+a);var o=this.getBBox().width;return o>r-e?r+o+1.5*n.leftPadding>s?e+i-5:r+i+5:(r-e)/2+e+i})).attr("y",(function(t,i){return t.order*e+n.barHeight/2+(n.fontSize/2-2)+r})).attr("text-height",a).attr("class",(function(t){var e=p(t.startTime),r=p(t.endTime);t.milestone&&(r=e+a);var i=this.getBBox().width,o="";t.classes.length>0&&(o=t.classes.join(" "));for(var c=0,l=0;l<g.length;l++)t.type===g[l]&&(c=l%n.numberSectionStyles);var u="";return t.active&&(u=t.crit?"activeCritText"+c:"activeText"+c),t.done?u=t.crit?u+" doneCritText"+c:u+" doneText"+c:t.crit&&(u=u+" critText"+c),t.milestone&&(u+=" milestoneText"),i>r-e?r+i+1.5*n.leftPadding>s?o+" taskTextOutsideLeft taskTextOutside"+c+" "+u:o+" taskTextOutsideRight taskTextOutside"+c+" "+u+" width-"+i:o+" taskText taskText"+c+" "+u+" width-"+i}))}(m,w,x,k,_,0,v),function(t,e){for(var r=[],i=0,o=0;o<g.length;o++)r[o]=[g[o],T(g[o],C)];f.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split(a.default.lineBreakRegex),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(n,a){if(!(a>0))return n[1]*t/2+e;for(var o=0;o<a;o++)return i+=r[a-1][1],n[1]*t/2+i*t+e})).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t[0]===g[e])return"sectionTitle sectionTitle"+e%n.numberSectionStyles;return"sectionTitle"}))}(w,x),function(t,e,r,i){var a=o.default.getTodayMarker();if("off"!==a){var s=f.append("g").attr("class","today"),c=new Date,l=s.append("line");l.attr("x1",p(c)+t).attr("x2",p(c)+t).attr("y1",n.titleTopMargin).attr("y2",i-n.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}}(k,0,0,b),Object(c.configureSvgSize)(f,d,l,n.useMaxWidth),f.append("text").text(i.parser.yy.getTitle()).attr("x",l/2).attr("y",n.titleTopMargin).attr("class","titleText")};e.default={setConf:u,draw:h}},"./src/diagrams/gantt/parser/gantt.jison":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,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,21,28,33],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],l=[1,20],u=[1,21],h=[1,22],d=[1,24],f=[1,26],p=[1,29],g=[5,7,9,11,12,13,14,15,16,17,18,19,21,28,33],y={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,todayMarker:17,title:18,section:19,clickStatement:20,taskTxt:21,taskData:22,openDirective:23,typeDirective:24,closeDirective:25,":":26,argDirective:27,click:28,callbackname:29,callbackargs:30,href:31,clickStatementDebug:32,open_directive:33,type_directive:34,arg_directive:35,close_directive:36,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"todayMarker",18:"title",19:"section",21:"taskTxt",22:"taskData",26:":",28:"click",29:"callbackname",30:"callbackargs",31:"href",33:"open_directive",34:"type_directive",35:"arg_directive",36:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[20,2],[20,3],[20,3],[20,4],[20,3],[20,4],[20,2],[32,2],[32,3],[32,3],[32,4],[32,3],[32,4],[32,2],[23,1],[24,1],[27,1],[25,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 15:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 16:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s-1],a[s]),this.$="task";break;case 22:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 23:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 24:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 25:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 26:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 27:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 28:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 29:case 35:this.$=a[s-1]+" "+a[s];break;case 30:case 31:case 33:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 32:case 34:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:r.parseDirective("%%{","open_directive");break;case 37:r.parseDirective(a[s],"type_directive");break;case 38:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 39:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,23:4,33:n},{1:[3]},{3:6,4:2,5:e,23:4,33:n},t(r,[2,3],{6:7}),{24:8,34:[1,9]},{34:[2,36]},{1:[2,1]},{4:25,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:l,18:u,19:h,20:23,21:d,23:4,28:f,33:n},{25:27,26:[1,28],36:p},t([26,36],[2,37]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:25,10:30,12:i,13:a,14:o,15:s,16:c,17:l,18:u,19:h,20:23,21:d,23:4,28:f,33:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),{22:[1,31]},t(r,[2,19]),{29:[1,32],31:[1,33]},{11:[1,34]},{27:35,35:[1,36]},{11:[2,39]},t(r,[2,5]),t(r,[2,18]),t(r,[2,22],{30:[1,37],31:[1,38]}),t(r,[2,28],{29:[1,39]}),t(g,[2,20]),{25:40,36:p},{36:[2,38]},t(r,[2,23],{31:[1,41]}),t(r,[2,24]),t(r,[2,26],{30:[1,42]}),{11:[1,43]},t(r,[2,25]),t(r,[2,27]),t(g,[2,21])],defaultActions:{5:[2,36],6:[2,1],29:[2,39],36:[2,38]},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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},m={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 this.begin("open_directive"),33;case 1:return this.begin("type_directive"),34;case 2:return this.popState(),this.begin("arg_directive"),26;case 3:return this.popState(),this.popState(),36;case 4:return 35;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 31;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 29;case 19:this.popState();break;case 20:return 30;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 28;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return 17;case 31:return"date";case 32:return 18;case 33:return 19;case 34:return 21;case 35:return 22;case 36:return 26;case 37:return 7;case 38:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\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,/^(?:topAxis\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:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};function v(){this.yy={}}return y.lexer=m,v.prototype=y,y.Parser=v,new v}();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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/gantt/styles.js":function(t,e,n){n.r(e),e.default=function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: '.concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(t.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(t.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")}},"./src/diagrams/git/gitGraphAst.js":function(t,e,n){n.r(e),n.d(e,"setDirection",(function(){return f})),n.d(e,"setOptions",(function(){return g})),n.d(e,"getOptions",(function(){return y})),n.d(e,"commit",(function(){return m})),n.d(e,"branch",(function(){return v})),n.d(e,"merge",(function(){return b})),n.d(e,"checkout",(function(){return _})),n.d(e,"reset",(function(){return w})),n.d(e,"prettyPrint",(function(){return C})),n.d(e,"clear",(function(){return T})),n.d(e,"getBranchesAsObjArray",(function(){return E})),n.d(e,"getBranches",(function(){return S})),n.d(e,"getCommits",(function(){return O})),n.d(e,"getCommitsArray",(function(){return A})),n.d(e,"getCurrentBranch",(function(){return M})),n.d(e,"getDirection",(function(){return D})),n.d(e,"getHead",(function(){return j}));var r=n("./src/logger.js"),i=n("./src/utils.js"),a={},o=null,s={master:o},c="master",l="LR",u=0;function h(){return Object(i.random)({length:7})}function d(t,e){for(r.log.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return r.log.debug("In merge commit:",e.parent),d(t,a[e.parent[0]])||d(t,a[e.parent[1]]);e=a[e.parent]}return r.log.debug(t.id,e.id),t.id===e.id}var f=function(t){l=t},p={},g=function(t){r.log.debug("options str",t),t=(t=t&&t.trim())||"{}";try{p=JSON.parse(t)}catch(lX){r.log.error("error while parsing gitGraph options",lX.message)}},y=function(){return p},m=function(t){var e={id:h(),message:t,seq:u++,parent:null==o?null:o.id};o=e,a[e.id]=e,s[c]=e.id,r.log.debug("in pushCommit "+e.id)},v=function(t){s[t]=null!=o?o.id:null,r.log.debug("in createBranch")},b=function(t){var e=a[s[c]],n=a[s[t]];if(function(t,e){return t.seq>e.seq&&d(e,t)}(e,n))r.log.debug("Already merged");else{if(d(e,n))s[c]=s[t],o=a[s[c]];else{var i={id:h(),message:"merged branch "+t+" into "+c,seq:u++,parent:[null==o?null:o.id,s[t]]};o=i,a[i.id]=i,s[c]=i.id}r.log.debug(s),r.log.debug("in mergeBranch")}},_=function(t){r.log.debug("in checkout");var e=s[c=t];o=a[e]},w=function(t){r.log.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),i="HEAD"===e?o:a[s[e]];for(r.log.debug(i,n);n>0;)if(n--,!(i=a[i.parent])){var l="Critical error - unique parent commit not found during reset";throw r.log.error(l),l}o=i,s[c]=i.id};function x(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function k(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 i,o,c,l=[n,e.id,e.seq];for(var u in s)s[u]===e.id&&l.push(u);if(r.log.debug(l.join(" ")),Array.isArray(e.parent)){var h=a[e.parent[0]];x(t,e,h),t.push(a[e.parent[1]])}else{if(null==e.parent)return;var d=a[e.parent];x(t,e,d)}i=t,o=function(t){return t.id},c=Object.create(null),k(t=i.reduce((function(t,e){var n=o(e);return c[n]||(c[n]=!0,t.push(e)),t}),[]))}var C=function(){r.log.debug(a),k([A()[0]])},T=function(){a={},s={master:o=null},c="master",u=0},E=function(){var t=[];for(var e in s)t.push({name:e,commit:a[s[e]]});return t},S=function(){return s},O=function(){return a},A=function(){var t=Object.keys(a).map((function(t){return a[t]}));return t.forEach((function(t){r.log.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},M=function(){return c},D=function(){return l},j=function(){return o};e.default={setDirection:f,setOptions:g,getOptions:y,commit:m,branch:v,merge:b,checkout:_,reset:w,prettyPrint:C,clear:T,getBranchesAsObjArray:E,getBranches:S,getCommits:O,getCommitsArray:A,getCurrentBranch:M,getDirection:D,getHead:j}},"./src/diagrams/git/gitGraphRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return f})),n.d(e,"draw",(function(){return _}));var r,i=n("d3"),a=n("./src/diagrams/git/gitGraphAst.js"),o=n("./src/diagrams/git/parser/gitGraph.jison"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/utils.js"),u={},h={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}},d={},f=function(t){d=t};function p(t,e,n,r){var a=Object(l.interpolateToCurve)(r,i.curveBasis),o=h.branchColors[n%h.branchColors.length],s=Object(i.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(a);t.append("svg:path").attr("d",s(e)).style("stroke",o).style("stroke-width",h.lineStrokeWidth).style("fill","none")}function g(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 y(t,e,n,r,i){c.log.debug("svgDrawLineForCommits: ",e,n);var a=g(t.select("#node-"+e+" circle")),o=g(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>h.nodeSpacing){var s={x:a.left-h.nodeSpacing,y:o.top+o.height/2};p(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),p(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-h.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-h.nodeSpacing/2,y:s.y},s],i)}else p(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-h.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-h.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>h.nodeSpacing){var l={x:o.left+o.width/2,y:a.top+a.height+h.nodeSpacing};p(t,[l,{x:o.left+o.width/2,y:o.top}],i,"linear"),p(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+h.nodeSpacing/2},{x:o.left+o.width/2,y:l.y-h.nodeSpacing/2},l],i)}else p(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+h.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-h.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function m(t,e){return t.select(e).node().cloneNode(!0)}function v(t,e,n,i){var a,o=Object.keys(u).length;if("string"==typeof e)do{if(a=u[e],c.log.debug("in renderCommitHistory",a.id,a.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return m(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+a.id})).attr("transform",(function(){switch(i){case"LR":return"translate("+(a.seq*h.nodeSpacing+h.leftMargin)+", "+r*h.branchOffset+")";case"BT":return"translate("+(r*h.branchOffset+h.leftMargin)+", "+(o-a.seq)*h.nodeSpacing+")"}})).attr("fill",h.nodeFillColor).attr("stroke",h.nodeStrokeColor).attr("stroke-width",h.nodeStrokeWidth);var s=void 0;for(var l in n)if(n[l].commit===a){s=n[l];break}s&&(c.log.debug("found branch ",s.name),t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","branch-label").text(s.name+", ")),t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","commit-id").text(a.id),""!==a.message&&"BT"===i&&t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+a.message),e=a.parent}while(e&&u[e]);Array.isArray(e)&&(c.log.debug("found merge commmit",e),v(t,e[0],n,i),r++,v(t,e[1],n,i),r--)}function b(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(y(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=u[e.parent]):Array.isArray(e.parent)&&(y(t,e.id,e.parent[0],n,r),y(t,e.id,e.parent[1],n,r+1),b(t,u[e.parent[1]],n,r+1),e.lineDrawn=!0,e=u[e.parent[0]])}var _=function(t,e,n){try{var o=s.a.parser;o.yy=a.default,o.yy.clear(),c.log.debug("in gitgraph renderer",t+"\n","id:",e,n),o.parse(t+"\n"),h=Object.assign(h,d,a.default.getOptions()),c.log.debug("effective options",h);var l=a.default.getDirection();u=a.default.getCommits();var f=a.default.getBranchesAsObjArray();"BT"===l&&(h.nodeLabel.x=f.length*h.branchOffset,h.nodeLabel.width="100%",h.nodeLabel.y=-2*h.nodeRadius);var p=Object(i.select)('[id="'.concat(e,'"]'));for(var g in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",h.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",h.nodeLabel.width).attr("height",h.nodeLabel.height).attr("x",h.nodeLabel.x).attr("y",h.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(p),r=1,f){var y=f[g];v(p,y.commit.id,f,l),b(p,y.commit,l),r++}p.attr("height",(function(){return"BT"===l?Object.keys(u).length*h.nodeSpacing:(f.length+1)*h.branchOffset}))}catch(lX){c.log.error("Error while rendering gitgraph"),c.log.error(lX.message)}};e.default={setConf:f,draw:_}},"./src/diagrams/git/parser/gitGraph.jison":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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},c={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]*[-_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 l(){this.yy={}}return s.lexer=c,l.prototype=s,s.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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/git/styles.js":function(t,e,n){n.r(e),e.default=function(){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n"}},"./src/diagrams/info/infoDb.js":function(t,e,n){n.r(e),n.d(e,"setMessage",(function(){return o})),n.d(e,"getMessage",(function(){return s})),n.d(e,"setInfo",(function(){return c})),n.d(e,"getInfo",(function(){return l}));var r=n("./src/logger.js"),i="",a=!1,o=function(t){r.log.debug("Setting message to: "+t),i=t},s=function(){return i},c=function(t){a=t},l=function(){return a};e.default={setMessage:o,getMessage:s,setInfo:c,getInfo:l}},"./src/diagrams/info/infoRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return l})),n.d(e,"draw",(function(){return u}));var r=n("d3"),i=n("./src/diagrams/info/infoDb.js"),a=n("./src/diagrams/info/parser/info.jison"),o=n.n(a),s=n("./src/logger.js"),c={},l=function(t){Object.keys(t).forEach((function(e){c[e]=t[e]}))},u=function(t,e,n){try{var a=o.a.parser;a.yy=i.default,s.log.debug("Renering info diagram\n"+t),a.parse(t),s.log.debug("Parsed info diagram");var c=Object(r.select)("#"+e);c.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),c.attr("height",100),c.attr("width",400)}catch(lX){s.log.error("Error while rendering info diagram"),s.log.error(lX.message)}};e.default={setConf:l,draw:u}},"./src/diagrams/info/parser/info.jison":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){switch(a.length,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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/info/styles.js":function(t,e,n){n.r(e),e.default=function(){return""}},"./src/diagrams/pie/parser/pie.jison":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,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,20,21,22,23],s=[2,5],c=[1,6,11,13,20,21,22,23],l=[20,21,22],u=[2,8],h=[1,18],d=[1,19],f=[1,24],p=[6,20,21,22,23],g={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,openDirective:15,typeDirective:16,closeDirective:17,":":18,argDirective:19,NEWLINE:20,";":21,EOF:22,open_directive:23,type_directive:24,arg_directive:25,close_directive:26,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",18:":",20:"NEWLINE",21:";",22:"EOF",23:"open_directive",24:"type_directive",25:"arg_directive",26:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[15,1],[16,1],[19,1],[17,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setTitle(this.$);break;case 17:r.parseDirective("%%{","open_directive");break;case 18:r.parseDirective(a[s],"type_directive");break;case 19:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 20:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{1:[3]},{3:10,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{3:11,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,14]),t(c,[2,15]),t(c,[2,16]),{16:14,24:[1,15]},{24:[2,17]},{1:[2,1]},{1:[2,2]},t(l,u,{15:8,9:16,10:17,5:20,1:[2,3],11:h,13:d,23:a}),t(o,s,{7:21}),{17:22,18:[1,23],26:f},t([18,26],[2,18]),t(o,[2,6]),{4:25,20:n,21:r,22:i},{12:[1,26]},{14:[1,27]},t(l,[2,11]),t(l,u,{15:8,9:16,10:17,5:20,1:[2,4],11:h,13:d,23:a}),t(p,[2,12]),{19:28,25:[1,29]},t(p,[2,20]),t(o,[2,7]),t(l,[2,9]),t(l,[2,10]),{17:30,26:f},{26:[2,19]},t(p,[2,13])],defaultActions:{9:[2,17],10:[2,1],11:[2,2],29:[2,19]},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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},y={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 this.begin("open_directive"),23;case 1:return this.begin("type_directive"),24;case 2:return this.popState(),this.begin("arg_directive"),18;case 3:return this.popState(),this.popState(),26;case 4:return 25;case 5:case 6:break;case 7:return 20;case 8:case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return 8;case 17:return"value";case 18:return 22}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17,18],inclusive:!0}}};function m(){this.yy={}}return g.lexer=y,m.prototype=g,g.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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/pie/pieDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return l}));var r=n("./src/logger.js"),i=n("./src/mermaidAPI.js"),a=n("./src/config.js"),o={},s="",c=!1,l=function(t,e,n){i.default.parseDirective(this,t,e,n)};e.default={parseDirective:l,getConfig:function(){return a.getConfig().pie},addSection:function(t,e){void 0===o[t]&&(o[t]=e,r.log.debug("Added new section :",t))},getSections:function(){return o},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){o={},s="",c=!1},setTitle:function(t){s=t},getTitle:function(){return s},setShowData:function(t){c=t},getShowData:function(){return c}}},"./src/diagrams/pie/pieRenderer.js":function(t,e,n){n.r(e),n.d(e,"draw",(function(){return f}));var r,i=n("d3"),a=n("./src/diagrams/pie/pieDb.js"),o=n("./src/diagrams/pie/parser/pie.jison"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/utils.js"),u=n("./src/config.js"),h=u.getConfig(),d=450,f=function(t,e){try{h=u.getConfig();var n=s.a.parser;n.yy=a.default,c.log.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),c.log.debug("Parsed info diagram");var o=document.getElementById(e);void 0===(r=o.parentElement.offsetWidth)&&(r=1200),void 0!==h.useWidth&&(r=h.useWidth),void 0!==h.pie.useWidth&&(r=h.pie.useWidth);var f=Object(i.select)("#"+e);Object(l.configureSvgSize)(f,d,r,h.pie.useMaxWidth),o.setAttribute("viewBox","0 0 "+r+" "+d);var p=18,g=Math.min(r,d)/2-40,y=f.append("g").attr("transform","translate("+r/2+",225)"),m=a.default.getSections(),v=0;Object.keys(m).forEach((function(t){v+=m[t]}));var b=h.themeVariables,_=[b.pie1,b.pie2,b.pie3,b.pie4,b.pie5,b.pie6,b.pie7,b.pie8,b.pie9,b.pie10,b.pie11,b.pie12],w=Object(i.scaleOrdinal)().domain(m).range(_),x=Object(i.pie)().value((function(t){return t.value}))(Object(i.entries)(m)),k=Object(i.arc)().innerRadius(0).outerRadius(g);y.selectAll("mySlices").data(x).enter().append("path").attr("d",k).attr("fill",(function(t){return w(t.data.key)})).attr("class","pieCircle"),y.selectAll("mySlices").data(x.filter((function(t){return 0!==t.data.value}))).enter().append("text").text((function(t){return(t.data.value/v*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+k.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),y.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var C=y.selectAll(".legend").data(w.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*w.domain().length/2)+")"}));C.append("rect").attr("width",p).attr("height",p).style("fill",w).style("stroke",w),C.data(x.filter((function(t){return 0!==t.data.value}))).append("text").attr("x",22).attr("y",14).text((function(t){return n.yy.getShowData()||h.showData||h.pie.showData?t.data.key+" ["+t.data.value+"]":t.data.key}))}catch(lX){c.log.error("Error while rendering info diagram"),c.log.error(lX)}};e.default={draw:f}},"./src/diagrams/pie/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"\n .pieCircle{\n stroke: ".concat(t.pieStrokeColor,";\n stroke-width : ").concat(t.pieStrokeWidth,";\n opacity : ").concat(t.pieOpacity,";\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(t.pieTitleTextSize,";\n fill: ").concat(t.pieTitleTextColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.pieSectionTextColor,";\n font-size:").concat(t.pieSectionTextSize,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.pieLegendTextColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.pieLegendTextSize,";\n }\n")}},"./src/diagrams/requirement/parser/requirementDiagram.jison":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,3],n=[1,5],r=[1,17],i=[2,10],a=[1,21],o=[1,22],s=[1,23],c=[1,24],l=[1,25],u=[1,26],h=[1,19],d=[1,27],f=[1,28],p=[1,31],g=[66,67],y=[5,8,14,35,36,37,38,39,40,48,55,57,66,67],m=[5,6,8,14,35,36,37,38,39,40,48,66,67],v=[1,51],b=[1,52],_=[1,53],w=[1,54],x=[1,55],k=[1,56],C=[1,57],T=[57,58],E=[1,69],S=[1,65],O=[1,66],A=[1,67],M=[1,68],D=[1,70],j=[1,74],N=[1,75],B=[1,72],L=[1,73],R=[5,8,14,35,36,37,38,39,40,48,66,67],I={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,open_directive:14,type_directive:15,arg_directive:16,close_directive:17,requirementDef:18,elementDef:19,relationshipDef:20,requirementType:21,requirementName:22,STRUCT_START:23,requirementBody:24,ID:25,COLONSEP:26,id:27,TEXT:28,text:29,RISK:30,riskLevel:31,VERIFYMTHD:32,verifyType:33,STRUCT_STOP:34,REQUIREMENT:35,FUNCTIONAL_REQUIREMENT:36,INTERFACE_REQUIREMENT:37,PERFORMANCE_REQUIREMENT:38,PHYSICAL_REQUIREMENT:39,DESIGN_CONSTRAINT:40,LOW_RISK:41,MED_RISK:42,HIGH_RISK:43,VERIFY_ANALYSIS:44,VERIFY_DEMONSTRATION:45,VERIFY_INSPECTION:46,VERIFY_TEST:47,ELEMENT:48,elementName:49,elementBody:50,TYPE:51,type:52,DOCREF:53,ref:54,END_ARROW_L:55,relationship:56,LINE:57,END_ARROW_R:58,CONTAINS:59,COPIES:60,DERIVES:61,SATISFIES:62,VERIFIES:63,REFINES:64,TRACES:65,unqString:66,qString:67,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"open_directive",15:"type_directive",16:"arg_directive",17:"close_directive",23:"STRUCT_START",25:"ID",26:"COLONSEP",28:"TEXT",30:"RISK",32:"VERIFYMTHD",34:"STRUCT_STOP",35:"REQUIREMENT",36:"FUNCTIONAL_REQUIREMENT",37:"INTERFACE_REQUIREMENT",38:"PERFORMANCE_REQUIREMENT",39:"PHYSICAL_REQUIREMENT",40:"DESIGN_CONSTRAINT",41:"LOW_RISK",42:"MED_RISK",43:"HIGH_RISK",44:"VERIFY_ANALYSIS",45:"VERIFY_DEMONSTRATION",46:"VERIFY_INSPECTION",47:"VERIFY_TEST",48:"ELEMENT",51:"TYPE",53:"DOCREF",55:"END_ARROW_L",57:"LINE",58:"END_ARROW_R",59:"CONTAINS",60:"COPIES",61:"DERIVES",62:"SATISFIES",63:"VERIFIES",64:"REFINES",65:"TRACES",66:"unqString",67:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[18,5],[24,5],[24,5],[24,5],[24,5],[24,2],[24,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[31,1],[31,1],[31,1],[33,1],[33,1],[33,1],[33,1],[19,5],[50,5],[50,5],[50,2],[50,1],[20,5],[20,5],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[27,1],[27,1],[29,1],[29,1],[49,1],[49,1],[52,1],[52,1],[54,1],[54,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","pie");break;case 10:this.$=[];break;case 16:r.addRequirement(a[s-3],a[s-4]);break;case 17:r.setNewReqId(a[s-2]);break;case 18:r.setNewReqText(a[s-2]);break;case 19:r.setNewReqRisk(a[s-2]);break;case 20:r.setNewReqVerifyMethod(a[s-2]);break;case 23:this.$=r.RequirementType.REQUIREMENT;break;case 24:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 25:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 26:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 27:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 29:this.$=r.RiskLevel.LOW_RISK;break;case 30:this.$=r.RiskLevel.MED_RISK;break;case 31:this.$=r.RiskLevel.HIGH_RISK;break;case 32:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 33:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 34:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 35:this.$=r.VerifyType.VERIFY_TEST;break;case 36:r.addElement(a[s-3]);break;case 37:r.setNewElementType(a[s-2]);break;case 38:r.setNewElementDocRef(a[s-2]);break;case 41:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 42:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 43:this.$=r.Relationships.CONTAINS;break;case 44:this.$=r.Relationships.COPIES;break;case 45:this.$=r.Relationships.DERIVES;break;case 46:this.$=r.Relationships.SATISFIES;break;case 47:this.$=r.Relationships.VERIFIES;break;case 48:this.$=r.Relationships.REFINES;break;case 49:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n},{1:[3]},{3:7,4:2,5:[1,6],6:e,9:4,14:n},{5:[1,8]},{10:9,15:[1,10]},{15:[2,6]},{3:11,4:2,6:e,9:4,14:n},{1:[2,2]},{4:16,5:r,7:12,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{11:29,12:[1,30],17:p},t([12,17],[2,7]),{1:[2,1]},{8:[1,32]},{4:16,5:r,7:33,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{4:16,5:r,7:34,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{4:16,5:r,7:35,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{4:16,5:r,7:36,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{4:16,5:r,7:37,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:l,40:u,48:h,66:d,67:f},{22:38,66:[1,39],67:[1,40]},{49:41,66:[1,42],67:[1,43]},{55:[1,44],57:[1,45]},t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(y,[2,52]),t(y,[2,53]),t(m,[2,4]),{13:46,16:[1,47]},t(m,[2,9]),{1:[2,3]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{23:[1,48]},{23:[2,50]},{23:[2,51]},{23:[1,49]},{23:[2,56]},{23:[2,57]},{56:50,59:v,60:b,61:_,62:w,63:x,64:k,65:C},{56:58,59:v,60:b,61:_,62:w,63:x,64:k,65:C},{11:59,17:p},{17:[2,8]},{5:[1,60]},{5:[1,61]},{57:[1,62]},t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),{58:[1,63]},t(m,[2,5]),{5:E,24:64,25:S,28:O,30:A,32:M,34:D},{5:j,34:N,50:71,51:B,53:L},{27:76,66:d,67:f},{27:77,66:d,67:f},t(R,[2,16]),{26:[1,78]},{26:[1,79]},{26:[1,80]},{26:[1,81]},{5:E,24:82,25:S,28:O,30:A,32:M,34:D},t(R,[2,22]),t(R,[2,36]),{26:[1,83]},{26:[1,84]},{5:j,34:N,50:85,51:B,53:L},t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),{27:86,66:d,67:f},{29:87,66:[1,88],67:[1,89]},{31:90,41:[1,91],42:[1,92],43:[1,93]},{33:94,44:[1,95],45:[1,96],46:[1,97],47:[1,98]},t(R,[2,21]),{52:99,66:[1,100],67:[1,101]},{54:102,66:[1,103],67:[1,104]},t(R,[2,39]),{5:[1,105]},{5:[1,106]},{5:[2,54]},{5:[2,55]},{5:[1,107]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[1,108]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[1,109]},{5:[2,58]},{5:[2,59]},{5:[1,110]},{5:[2,60]},{5:[2,61]},{5:E,24:111,25:S,28:O,30:A,32:M,34:D},{5:E,24:112,25:S,28:O,30:A,32:M,34:D},{5:E,24:113,25:S,28:O,30:A,32:M,34:D},{5:E,24:114,25:S,28:O,30:A,32:M,34:D},{5:j,34:N,50:115,51:B,53:L},{5:j,34:N,50:116,51:B,53:L},t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,37]),t(R,[2,38])],defaultActions:{5:[2,6],7:[2,2],11:[2,1],32:[2,3],33:[2,11],34:[2,12],35:[2,13],36:[2,14],37:[2,15],39:[2,50],40:[2,51],42:[2,56],43:[2,57],47:[2,8],88:[2,54],89:[2,55],91:[2,29],92:[2,30],93:[2,31],95:[2,32],96:[2,33],97:[2,34],98:[2,35],100:[2,58],101:[2,59],103:[2,60],104:[2,61]},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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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 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 this.begin("open_directive"),14;case 1:return this.begin("type_directive"),15;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),17;case 4:return 16;case 5:return 5;case 6:case 7:case 8:break;case 9:return 8;case 10:return 6;case 11:return 23;case 12:return 34;case 13:return 26;case 14:return 25;case 15:return 28;case 16:return 30;case 17:return 32;case 18:return 35;case 19:return 36;case 20:return 37;case 21:return 38;case 22:return 39;case 23:return 40;case 24:return 41;case 25:return 42;case 26:return 43;case 27:return 44;case 28:return 45;case 29:return 46;case 30:return 47;case 31:return 48;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 62;case 36:return 63;case 37:return 64;case 38:return 65;case 39:return 51;case 40:return 53;case 41:return 55;case 42:return 58;case 43:return 57;case 44:this.begin("string");break;case 45:this.popState();break;case 46:return"qString";case 47:return e.yytext=e.yytext.trim(),66}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[45,46],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47],inclusive:!0}}};function P(){this.yy={}}return I.lexer=F,P.prototype=I,I.Parser=P,new P}();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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/requirement/requirementDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return h}));var r=n("./src/config.js"),i=n("./src/logger.js"),a=n("./src/mermaidAPI.js"),o=[],s={},c={},l={},u={},h=function(t,e,n){a.default.parseDirective(this,t,e,n)};e.default={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:h,getConfig:function(){return r.getConfig().req},addRequirement:function(t,e){return void 0===c[t]&&(c[t]={name:t,type:e,id:s.id,text:s.text,risk:s.risk,verifyMethod:s.verifyMethod}),s={},c[t]},getRequirements:function(){return c},setNewReqId:function(t){void 0!==s&&(s.id=t)},setNewReqText:function(t){void 0!==s&&(s.text=t)},setNewReqRisk:function(t){void 0!==s&&(s.risk=t)},setNewReqVerifyMethod:function(t){void 0!==s&&(s.verifyMethod=t)},addElement:function(t){return void 0===u[t]&&(u[t]={name:t,type:l.type,docRef:l.docRef},i.log.info("Added new requirement: ",t)),l={},u[t]},getElements:function(){return u},setNewElementType:function(t){void 0!==l&&(l.type=t)},setNewElementDocRef:function(t){void 0!==l&&(l.docRef=t)},addRelationship:function(t,e,n){o.push({type:t,src:e,dst:n})},getRelationships:function(){return o},clear:function(){o=[],s={},c={},l={},u={}}}},"./src/diagrams/requirement/requirementMarkers.js":function(t,e,n){n.r(e);var r={CONTAINS:"contains",ARROW:"arrow"};e.default={ReqMarkers:r,insertLineEndings:function(t,e){var n=t.append("defs").append("marker").attr("id",r.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",r.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d","M0,0\n L".concat(e.line_height,",").concat(e.line_height/2,"\n M").concat(e.line_height,",").concat(e.line_height/2,"\n L0,").concat(e.line_height)).attr("stroke-width",1)}}},"./src/diagrams/requirement/requirementRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return y})),n.d(e,"drawReqs",(function(){return w})),n.d(e,"drawElements",(function(){return x})),n.d(e,"draw",(function(){return C}));var r=n("d3"),i=n("dagre"),a=n.n(i),o=n("graphlib"),s=n.n(o),c=n("./src/logger.js"),l=n("./src/utils.js"),u=n("./src/diagrams/common/common.js"),h=n("./src/diagrams/requirement/parser/requirementDiagram.jison"),d=n("./src/diagrams/requirement/requirementDb.js"),f=n("./src/diagrams/requirement/requirementMarkers.js"),p={},g=0,y=function(t){if(void 0!==t)for(var e=Object.keys(t),n=0;n<e.length;n++)p[e[n]]=t[e[n]]},m=function(t,e){return t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",p.rect_min_width+"px").attr("height",p.rect_min_height+"px")},v=function(t,e,n){var r=p.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",p.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((function(t){0==a?i.append("tspan").attr("text-anchor","middle").attr("x",p.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",p.rect_min_width/2).attr("dy",.75*p.line_height).text(t),a++}));var o=1.5*p.rect_padding+a*p.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",p.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},b=function(t,e,n,r){var i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",p.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((function(t){i.append("tspan").attr("x",p.rect_padding).attr("dy",p.line_height).text(t)})),i},_=function(t,e,n,i){var a=n.edge(k(e.src),k(e.dst)),o=Object(r.line)().x((function(t){return t.x})).y((function(t){return t.y})),s=t.insert("path","#"+i).attr("class","er relationshipLine").attr("d",o(a.points)).attr("fill","none");e.type==d.default.Relationships.CONTAINS?s.attr("marker-start","url("+u.default.getUrl(p.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(s.attr("stroke-dasharray","10,7"),s.attr("marker-end","url("+u.default.getUrl(p.arrowMarkerAbsolute)+"#"+f.default.ReqMarkers.ARROW+"_line_ending)")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+g;g++;var s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")}(t,s,0,"<<".concat(e.type,">>"))},w=function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r];r=k(r),c.log.info("Added new requirement: ",r);var a=n.append("g").attr("id",r),o=m(a,"req-"+r),s=v(a,r+"_title",["<<".concat(i.type,">>"),"".concat(i.name)]);b(a,r+"_body",["Id: ".concat(i.id),"Text: ".concat(i.text),"Risk: ".concat(i.risk),"Verification: ".concat(i.verifyMethod)],s.y);var l=o.node().getBBox();e.setNode(r,{width:l.width,height:l.height,shape:"rect",id:r})}))},x=function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=k(r),o=n.append("g").attr("id",a),s="element-"+a,c=m(o,s),l=v(o,s+"_title",["<<Element>>","".concat(r)]);b(o,s+"_body",["Type: ".concat(i.type||"Not Specified"),"Doc Ref: ".concat(i.docRef||"None")],l.y);var u=c.node().getBBox();e.setNode(a,{width:u.width,height:u.height,shape:"rect",id:a})}))},k=function(t){return t.replace(/\s/g,"").replace(/\./g,"_")},C=function(t,e){h.parser.yy=d.default,h.parser.yy.clear(),h.parser.parse(t);var n=Object(r.select)("[id='".concat(e,"']"));f.default.insertLineEndings(n,p);var i,o,c=new s.a.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:p.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),u=d.default.getRequirements(),g=d.default.getElements(),y=d.default.getRelationships();w(u,c,n),x(g,c,n),function(t,e){t.forEach((function(t){var n=k(t.src),r=k(t.dst);e.setEdge(n,r,{relationship:t})}))}(y,c),a.a.layout(c),i=n,(o=c).nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)&&(i.select("#"+t),i.select("#"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )"))})),y.forEach((function(t){_(n,t,c,e)}));var m=p.rect_padding,v=n.node().getBBox(),b=v.width+2*m,C=v.height+2*m;Object(l.configureSvgSize)(n,C,b,p.useMaxWidth),n.attr("viewBox","".concat(v.x-m," ").concat(v.y-m," ").concat(b," ").concat(C))};e.default={setConf:y,draw:C}},"./src/diagrams/requirement/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"\n\n marker {\n fill: ".concat(t.relationColor,";\n stroke: ").concat(t.relationColor,";\n }\n\n marker.cross {\n stroke: ").concat(t.lineColor,";\n }\n\n svg {\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.fontSize,";\n }\n\n .reqBox {\n fill: ").concat(t.requirementBackground,";\n fill-opacity: 100%;\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n \n .reqTitle, .reqLabel{\n fill: ").concat(t.requirementTextColor,";\n }\n .reqLabelBox {\n fill: ").concat(t.relationLabelBackground,";\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n .relationshipLine {\n stroke: ").concat(t.relationColor,";\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ").concat(t.relationLabelColor,";\n }\n\n")}},"./src/diagrams/sequence/parser/sequenceDiagram.jison":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,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],l=[1,20],u=[1,21],h=[1,22],d=[1,24],f=[1,25],p=[1,26],g=[1,27],y=[1,28],m=[1,29],v=[1,32],b=[1,33],_=[1,36],w=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],x=[1,44],k=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,58],C=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,58],T=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,58],E=[46,47,48],S=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],O={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,signal:20,autonumber:21,activate:22,deactivate:23,note_statement:24,title:25,text2:26,loop:27,end:28,rect:29,opt:30,alt:31,else_sections:32,par:33,par_sections:34,and:35,else:36,note:37,placement:38,over:39,actor_pair:40,spaceList:41,",":42,left_of:43,right_of:44,signaltype:45,"+":46,"-":47,ACTOR:48,SOLID_OPEN_ARROW:49,DOTTED_OPEN_ARROW:50,SOLID_ARROW:51,DOTTED_ARROW:52,SOLID_CROSS:53,DOTTED_CROSS:54,SOLID_POINT:55,DOTTED_POINT:56,TXT:57,open_directive:58,type_directive:59,arg_directive:60,close_directive:61,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"SOLID_POINT",56:"DOTTED_POINT",57:"TXT",58:"open_directive",59:"type_directive",60:"arg_directive",61:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:this.$=[];break;case 12:a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:this.$=a[s-1];break;case 15:r.enableSequenceNumbers();break;case 16:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 17:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 19:this.$=[{type:"setTitle",text:a[s-1]}];break;case 20:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(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 21:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 22:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 23:a[s-1].unshift({type:"altStart",altText:r.parseMessage(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 24:a[s-1].unshift({type:"parStart",parText:r.parseMessage(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 27:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 29:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 30:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 31: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 34:this.$=[a[s-2],a[s]];break;case 35:this.$=a[s];break;case 36:this.$=r.PLACEMENT.LEFTOF;break;case 37:this.$=r.PLACEMENT.RIGHTOF;break;case 38: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 39: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 40: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 41:this.$={type:"addActor",actor:a[s]};break;case 42:this.$=r.LINETYPE.SOLID_OPEN;break;case 43:this.$=r.LINETYPE.DOTTED_OPEN;break;case 44:this.$=r.LINETYPE.SOLID;break;case 45:this.$=r.LINETYPE.DOTTED;break;case 46:this.$=r.LINETYPE.SOLID_CROSS;break;case 47:this.$=r.LINETYPE.DOTTED_CROSS;break;case 48:this.$=r.LINETYPE.SOLID_POINT;break;case 49:this.$=r.LINETYPE.DOTTED_POINT;break;case 50:this.$=r.parseMessage(a[s].trim().substring(1));break;case 51:r.parseDirective("%%{","open_directive");break;case 52:r.parseDirective(a[s],"type_directive");break;case 53:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 54:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,58:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,58:i},{3:9,4:e,5:n,6:4,7:r,11:6,58:i},{3:10,4:e,5:n,6:4,7:r,11:6,58:i},t([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,58],a,{8:11}),{12:12,59:[1,13]},{59:[2,51]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,29:p,30:g,31:y,33:m,37:v,48:b,58:i},{13:34,14:[1,35],61:_},t([14,61],[2,52]),t(w,[2,6]),{6:30,10:37,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,29:p,30:g,31:y,33:m,37:v,48:b,58:i},t(w,[2,8]),t(w,[2,9]),{17:38,48:b},{5:[1,39]},t(w,[2,15]),{17:40,48:b},{17:41,48:b},{5:[1,42]},{26:43,57:x},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},t(w,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56],55:[1,57],56:[1,58]},{38:59,39:[1,60],43:[1,61],44:[1,62]},t([5,18,42,49,50,51,52,53,54,55,56,57],[2,41]),{5:[1,63]},{15:64,60:[1,65]},{5:[2,54]},t(w,[2,7]),{5:[1,67],18:[1,66]},t(w,[2,14]),{5:[1,68]},{5:[1,69]},t(w,[2,18]),{5:[1,70]},{5:[2,50]},t(k,a,{8:71}),t(k,a,{8:72}),t(k,a,{8:73}),t(C,a,{32:74,8:75}),t(T,a,{34:76,8:77}),{17:80,46:[1,78],47:[1,79],48:b},t(E,[2,42]),t(E,[2,43]),t(E,[2,44]),t(E,[2,45]),t(E,[2,46]),t(E,[2,47]),t(E,[2,48]),t(E,[2,49]),{17:81,48:b},{17:83,40:82,48:b},{48:[2,36]},{48:[2,37]},t(S,[2,10]),{13:84,61:_},{61:[2,53]},{19:[1,85]},t(w,[2,13]),t(w,[2,16]),t(w,[2,17]),t(w,[2,19]),{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[1,86],29:p,30:g,31:y,33:m,37:v,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[1,87],29:p,30:g,31:y,33:m,37:v,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[1,88],29:p,30:g,31:y,33:m,37:v,48:b,58:i},{28:[1,89]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[2,28],29:p,30:g,31:y,33:m,36:[1,90],37:v,48:b,58:i},{28:[1,91]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:l,22:u,23:h,24:23,25:d,27:f,28:[2,26],29:p,30:g,31:y,33:m,35:[1,92],37:v,48:b,58:i},{17:93,48:b},{17:94,48:b},{26:95,57:x},{26:96,57:x},{26:97,57:x},{42:[1,98],57:[2,35]},{5:[1,99]},{5:[1,100]},t(w,[2,20]),t(w,[2,21]),t(w,[2,22]),t(w,[2,23]),{19:[1,101]},t(w,[2,24]),{19:[1,102]},{26:103,57:x},{26:104,57:x},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:105,48:b},t(S,[2,11]),t(w,[2,12]),t(C,a,{8:75,32:106}),t(T,a,{8:77,34:107}),{5:[2,38]},{5:[2,39]},{57:[2,34]},{28:[2,29]},{28:[2,27]}],defaultActions:{7:[2,51],8:[2,1],9:[2,2],10:[2,3],36:[2,54],44:[2,50],61:[2,36],62:[2,37],65:[2,53],95:[2,40],96:[2,30],97:[2,31],103:[2,38],104:[2,39],105:[2,34],106:[2,29],107:[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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),58;case 1:return this.begin("type_directive"),59;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),61;case 4:return 60;case 5:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),48;case 13:return this.popState(),this.popState(),this.begin("LINE"),18;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),27;case 16:return this.begin("LINE"),29;case 17:return this.begin("LINE"),30;case 18:return this.begin("LINE"),31;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),33;case 21:return this.begin("LINE"),35;case 22:return this.popState(),19;case 23:return 28;case 24:return 43;case 25:return 44;case 26:return 39;case 27:return 37;case 28:return this.begin("ID"),22;case 29:return this.begin("ID"),23;case 30:return 25;case 31:return 7;case 32:return 21;case 33:return 42;case 34:return 5;case 35:return e.yytext=e.yytext.trim(),48;case 36:return 51;case 37:return 52;case 38:return 49;case 39:return 50;case 40:return 53;case 41:return 54;case 42:return 55;case 43:return 56;case 44:return 57;case 45:return 46;case 46:return 47;case 47:return 5;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/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,/^(?:(?:[:]?(?:no)?wrap)?[^#\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,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,12],inclusive:!1},ALIAS:{rules:[7,8,13,14],inclusive:!1},LINE:{rules:[7,8,22],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function M(){this.yy={}}return O.lexer=A,M.prototype=O,O.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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/sequence/sequenceDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return f})),n.d(e,"addActor",(function(){return p})),n.d(e,"addMessage",(function(){return y})),n.d(e,"addSignal",(function(){return m})),n.d(e,"getMessages",(function(){return v})),n.d(e,"getActors",(function(){return b})),n.d(e,"getActor",(function(){return _})),n.d(e,"getActorKeys",(function(){return w})),n.d(e,"getTitle",(function(){return x})),n.d(e,"getTitleWrapped",(function(){return k})),n.d(e,"enableSequenceNumbers",(function(){return C})),n.d(e,"showSequenceNumbers",(function(){return T})),n.d(e,"setWrap",(function(){return E})),n.d(e,"autoWrap",(function(){return S})),n.d(e,"clear",(function(){return O})),n.d(e,"parseMessage",(function(){return A})),n.d(e,"LINETYPE",(function(){return M})),n.d(e,"ARROWTYPE",(function(){return D})),n.d(e,"PLACEMENT",(function(){return j})),n.d(e,"addNote",(function(){return N})),n.d(e,"setTitle",(function(){return B})),n.d(e,"apply",(function(){return L}));var r=n("./src/mermaidAPI.js"),i=n("./src/config.js"),a=n("./src/logger.js"),o=void 0,s={},c=[],l="",u=!1,h=!1,d=!1,f=function(t,e,n){r.default.parseDirective(this,t,e,n)},p=function(t,e,n){var r=s[t];r&&e===r.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null}),s[t]={name:e,description:n.text,wrap:void 0===n.wrap&&S()||!!n.wrap,prevActor:o},o&&s[o]&&(s[o].nextActor=t),o=t)},g=function(t){var e,n=0;for(e=0;e<c.length;e++)c[e].type===M.ACTIVE_START&&c[e].from.actor===t&&n++,c[e].type===M.ACTIVE_END&&c[e].from.actor===t&&n--;return n},y=function(t,e,n,r){c.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&S()||!!n.wrap,answer:r})},m=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===M.ACTIVE_END){var i=g(t.actor);if(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 c.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&S()||!!n.wrap,type:r}),!0},v=function(){return c},b=function(){return s},_=function(t){return s[t]},w=function(){return Object.keys(s)},x=function(){return l},k=function(){return u},C=function(){h=!0},T=function(){return h},E=function(t){d=t},S=function(){return d},O=function(){s={},c=[]},A=function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return a.log.debug("parseMessage:",n),n},M={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,SOLID_POINT:24,DOTTED_POINT:25},D={FILLED:0,OPEN:1},j={LEFTOF:0,RIGHTOF:1,OVER:2},N=function(t,e,n){n.text,void 0===n.wrap&&S()||n.wrap;var r=[].concat(t,t);c.push({from:r[0],to:r[1],message:n.text,wrap:void 0===n.wrap&&S()||!!n.wrap,type:M.NOTE,placement:e})},B=function(t){l=t.text,u=void 0===t.wrap&&S()||!!t.wrap},L=function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":p(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":m(e.actor,void 0,void 0,e.signalType);break;case"addNote":N(e.actor,e.placement,e.text);break;case"addMessage":m(e.from,e.to,e.msg,e.signalType);break;case"loopStart":m(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":m(void 0,void 0,void 0,e.signalType);break;case"rectStart":m(void 0,void 0,e.color,e.signalType);break;case"rectEnd":m(void 0,void 0,void 0,e.signalType);break;case"optStart":m(void 0,void 0,e.optText,e.signalType);break;case"optEnd":m(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":m(void 0,void 0,e.altText,e.signalType);break;case"altEnd":m(void 0,void 0,void 0,e.signalType);break;case"setTitle":B(e.text);break;case"parStart":case"and":m(void 0,void 0,e.parText,e.signalType);break;case"parEnd":m(void 0,void 0,void 0,e.signalType)}};e.default={addActor:p,addMessage:y,addSignal:m,autoWrap:S,setWrap:E,enableSequenceNumbers:C,showSequenceNumbers:T,getMessages:v,getActors:b,getActor:_,getActorKeys:w,getTitle:x,parseDirective:f,getConfig:function(){return i.getConfig().sequence},getTitleWrapped:k,clear:O,parseMessage:A,LINETYPE:M,ARROWTYPE:D,PLACEMENT:j,addNote:N,setTitle:B,apply:L}},"./src/diagrams/sequence/sequenceRenderer.js":function(t,e,n){n.r(e),n.d(e,"bounds",(function(){return d})),n.d(e,"drawActors",(function(){return y})),n.d(e,"setConf",(function(){return m})),n.d(e,"draw",(function(){return w}));var r=n("d3"),i=n("./src/diagrams/sequence/svgDraw.js"),a=n("./src/logger.js"),o=n("./src/diagrams/sequence/parser/sequenceDiagram.jison"),s=n("./src/diagrams/common/common.js"),c=n("./src/diagrams/sequence/sequenceDb.js"),l=n("./src/config.js"),u=n("./src/utils.js");o.parser.yy=c.default;var h={},d={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,m(o.parser.yy.getConfig())},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 c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*h.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*h.boxMargin,Math.max),i.updateVal(d.data,"startx",t-c*h.boxMargin,Math.min),i.updateVal(d.data,"stopx",n+c*h.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*h.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*h.boxMargin,Math.max),i.updateVal(d.data,"starty",e-c*h.boxMargin,Math.min),i.updateVal(d.data,"stopy",r+c*h.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(d.data,"startx",i,Math.min),this.updateVal(d.data,"starty",o,Math.min),this.updateVal(d.data,"stopx",a,Math.max),this.updateVal(d.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],a=v(t.from.actor).length||0,o=r.x+r.width/2+(a-1)*h.activationWidth/2;this.activations.push({startx:o,starty:this.verticalPos+2,stopx:o+h.activationWidth,stopy:void 0,actor:t.from.actor,anchored:i.default.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]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,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({y:d.getVerticalPos(),height:0}),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{bounds:this.data,models:this.models}}},f=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},p=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},g=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},y=function(t,e,n,r){for(var a=0,o=0,s=0;s<n.length;s++){var c=e[n[s]];c.width=c.width||h.width,c.height=Math.max(c.height||h.height,h.height),c.margin=c.margin||h.actorMargin,c.x=a+o,c.y=r,i.default.drawActor(t,c,h),d.insert(c.x,r,c.x+c.width,c.height),a+=c.width,o+=c.margin,d.models.addActor(c)}d.bumpVerticalPos(h.height)},m=function(t){Object(u.assignWithDepth)(h,t),t.fontFamily&&(h.actorFontFamily=h.noteFontFamily=h.messageFontFamily=t.fontFamily),t.fontSize&&(h.actorFontSize=h.noteFontSize=h.messageFontSize=t.fontSize),t.fontWeight&&(h.actorFontWeight=h.noteFontWeight=h.messageFontWeight=t.fontWeight)},v=function(t){return d.activations.filter((function(e){return e.actor===t}))},b=function(t,e){var n=e[t],r=v(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function _(t,e,n,r,i){d.bumpVerticalPos(n);var o=r;if(e.id&&e.message&&t[e.id]){var s=t[e.id].width,c=f(h);e.message=u.default.wrapLabel("[".concat(e.message,"]"),s-2*h.wrapPadding,c),e.width=s,e.wrap=!0;var l=u.default.calculateTextDimensions(e.message,c),p=Math.max(l.height,h.labelBoxHeight);o=r+p,a.log.debug("".concat(p," - ").concat(e.message))}i(e),d.bumpVerticalPos(o)}var w=function(t,e){h=l.getConfig().sequence,o.parser.yy.clear(),o.parser.yy.setWrap(h.wrap),o.parser.parse(t+"\n"),d.init(),a.log.debug("C:".concat(JSON.stringify(h,null,2)));var n=Object(r.select)('[id="'.concat(e,'"]')),p=o.parser.yy.getActors(),g=o.parser.yy.getActorKeys(),m=o.parser.yy.getMessages(),b=o.parser.yy.getTitle(),w=x(p,m);h.height=k(p,w),y(n,p,g,0);var T=C(m,p,w);i.default.insertArrowHead(n),i.default.insertArrowCrossHead(n),i.default.insertArrowFilledHead(n),i.default.insertSequenceNumber(n);var E=1;m.forEach((function(t){var e,r,l;switch(t.type){case o.parser.yy.LINETYPE.NOTE:r=t.noteModel,function(t,e){d.bumpVerticalPos(h.boxMargin),e.height=h.boxMargin,e.starty=d.getVerticalPos();var n=i.default.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||h.width,n.class="note";var r=t.append("g"),a=i.default.drawRect(r,n),o=i.default.getTextObj();o.x=e.startx,o.y=e.starty,o.width=n.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=h.noteFontFamily,o.fontSize=h.noteFontSize,o.fontWeight=h.noteFontWeight,o.anchor=h.noteAlign,o.textMargin=h.noteMargin,o.valign=h.noteAlign;var s=Object(i.drawText)(r,o),c=Math.round(s.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));a.attr("height",c+2*h.noteMargin),e.height+=c+2*h.noteMargin,d.bumpVerticalPos(c+2*h.noteMargin),e.stopy=e.starty+c+2*h.noteMargin,e.stopx=e.startx+n.width,d.insert(e.startx,e.starty,e.stopx,e.stopy),d.models.addNote(e)}(n,r);break;case o.parser.yy.LINETYPE.ACTIVE_START:d.newActivation(t,n,p);break;case o.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var r=d.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),i.default.drawActivation(n,r,e,h,v(t.from.actor).length),d.insert(r.startx,e-10,r.stopx,e)}(t,d.getVerticalPos());break;case o.parser.yy.LINETYPE.LOOP_START:_(T,t,h.boxMargin,h.boxMargin+h.boxTextMargin,(function(t){return d.newLoop(t)}));break;case o.parser.yy.LINETYPE.LOOP_END:e=d.endLoop(),i.default.drawLoop(n,e,"loop",h),d.bumpVerticalPos(e.stopy-d.getVerticalPos()),d.models.addLoop(e);break;case o.parser.yy.LINETYPE.RECT_START:_(T,t,h.boxMargin,h.boxMargin,(function(t){return d.newLoop(void 0,t.message)}));break;case o.parser.yy.LINETYPE.RECT_END:e=d.endLoop(),i.default.drawBackgroundRect(n,e),d.models.addLoop(e),d.bumpVerticalPos(e.stopy-d.getVerticalPos());break;case o.parser.yy.LINETYPE.OPT_START:_(T,t,h.boxMargin,h.boxMargin+h.boxTextMargin,(function(t){return d.newLoop(t)}));break;case o.parser.yy.LINETYPE.OPT_END:e=d.endLoop(),i.default.drawLoop(n,e,"opt",h),d.bumpVerticalPos(e.stopy-d.getVerticalPos()),d.models.addLoop(e);break;case o.parser.yy.LINETYPE.ALT_START:_(T,t,h.boxMargin,h.boxMargin+h.boxTextMargin,(function(t){return d.newLoop(t)}));break;case o.parser.yy.LINETYPE.ALT_ELSE:_(T,t,h.boxMargin+h.boxTextMargin,h.boxMargin,(function(t){return d.addSectionToLoop(t)}));break;case o.parser.yy.LINETYPE.ALT_END:e=d.endLoop(),i.default.drawLoop(n,e,"alt",h),d.bumpVerticalPos(e.stopy-d.getVerticalPos()),d.models.addLoop(e);break;case o.parser.yy.LINETYPE.PAR_START:_(T,t,h.boxMargin,h.boxMargin+h.boxTextMargin,(function(t){return d.newLoop(t)}));break;case o.parser.yy.LINETYPE.PAR_AND:_(T,t,h.boxMargin+h.boxTextMargin,h.boxMargin,(function(t){return d.addSectionToLoop(t)}));break;case o.parser.yy.LINETYPE.PAR_END:e=d.endLoop(),i.default.drawLoop(n,e,"par",h),d.bumpVerticalPos(e.stopy-d.getVerticalPos()),d.models.addLoop(e);break;default:try{(l=t.msgModel).starty=d.getVerticalPos(),l.sequenceIndex=E,function(t,e){d.bumpVerticalPos(10);var n=e.startx,r=e.stopx,a=e.starty,l=e.message,p=e.type,g=e.sequenceIndex,y=s.default.splitBreaks(l).length,m=u.default.calculateTextDimensions(l,f(h)),v=m.height/y;e.height+=v,d.bumpVerticalPos(v);var b=i.default.getTextObj();b.x=n,b.y=a+10,b.width=r-n,b.class="messageText",b.dy="1em",b.text=l,b.fontFamily=h.messageFontFamily,b.fontSize=h.messageFontSize,b.fontWeight=h.messageFontWeight,b.anchor=h.messageAlign,b.valign=h.messageAlign,b.textMargin=h.wrapPadding,b.tspan=!1,Object(i.drawText)(t,b);var _,w,x=m.height-10,k=m.width;if(n===r){w=d.getVerticalPos()+x,h.rightAngles?_=t.append("path").attr("d","M ".concat(n,",").concat(w," H ").concat(n+Math.max(h.width/2,k/2)," V ").concat(w+25," H ").concat(n)):(x+=h.boxMargin,w=d.getVerticalPos()+x,_=t.append("path").attr("d","M "+n+","+w+" C "+(n+60)+","+(w-10)+" "+(n+60)+","+(w+30)+" "+n+","+(w+20))),x+=30;var C=Math.max(k/2,h.width/2);d.insert(n-C,d.getVerticalPos()-10+x,r+C,d.getVerticalPos()+30+x)}else x+=h.boxMargin,w=d.getVerticalPos()+x,(_=t.append("line")).attr("x1",n),_.attr("y1",w),_.attr("x2",r),_.attr("y2",w),d.insert(n,w-10,r,w);p===o.parser.yy.LINETYPE.DOTTED||p===o.parser.yy.LINETYPE.DOTTED_CROSS||p===o.parser.yy.LINETYPE.DOTTED_POINT||p===o.parser.yy.LINETYPE.DOTTED_OPEN?(_.style("stroke-dasharray","3, 3"),_.attr("class","messageLine1")):_.attr("class","messageLine0");var T="";h.arrowMarkerAbsolute&&(T=(T=(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),_.attr("stroke-width",2),_.attr("stroke","none"),_.style("fill","none"),p!==o.parser.yy.LINETYPE.SOLID&&p!==o.parser.yy.LINETYPE.DOTTED||_.attr("marker-end","url("+T+"#arrowhead)"),p!==o.parser.yy.LINETYPE.SOLID_POINT&&p!==o.parser.yy.LINETYPE.DOTTED_POINT||_.attr("marker-end","url("+T+"#filled-head)"),p!==o.parser.yy.LINETYPE.SOLID_CROSS&&p!==o.parser.yy.LINETYPE.DOTTED_CROSS||_.attr("marker-end","url("+T+"#crosshead)"),(c.default.showSequenceNumbers()||h.showSequenceNumbers)&&(_.attr("marker-start","url("+T+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",w+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(g)),d.bumpVerticalPos(x),e.height+=x,e.stopy=e.starty+e.height,d.insert(e.fromBounds,e.starty,e.toBounds,e.stopy)}(n,l),d.models.addMessage(l)}catch(lX){a.log.error("error while drawing message",lX)}}[o.parser.yy.LINETYPE.SOLID_OPEN,o.parser.yy.LINETYPE.DOTTED_OPEN,o.parser.yy.LINETYPE.SOLID,o.parser.yy.LINETYPE.DOTTED,o.parser.yy.LINETYPE.SOLID_CROSS,o.parser.yy.LINETYPE.DOTTED_CROSS,o.parser.yy.LINETYPE.SOLID_POINT,o.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&E++})),h.mirrorActors&&(d.bumpVerticalPos(2*h.boxMargin),y(n,p,g,d.getVerticalPos()));var S=d.getBounds().bounds;a.log.debug("For line height fix Querying: #"+e+" .actor-line"),Object(r.selectAll)("#"+e+" .actor-line").attr("y2",S.stopy);var O=S.stopy-S.starty+2*h.diagramMarginY;h.mirrorActors&&(O=O-h.boxMargin+h.bottomMarginAdj);var A=S.stopx-S.startx+2*h.diagramMarginX;b&&n.append("text").text(b).attr("x",(S.stopx-S.startx)/2-2*h.diagramMarginX).attr("y",-25),Object(u.configureSvgSize)(n,O,A,h.useMaxWidth);var M=b?40:0;n.attr("viewBox",S.startx-h.diagramMarginX+" -"+(h.diagramMarginY+M)+" "+A+" "+(O+M)),a.log.debug("models:",d.models)},x=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===o.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===o.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,s=i?p(h):f(h),c=e.wrap?u.default.wrapLabel(e.message,h.width-2*h.wrapPadding,s):e.message,l=u.default.calculateTextDimensions(c,s).width+2*h.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,l):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,l):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,l/2),n[e.to]=Math.max(n[e.to]||0,l/2)):e.placement===o.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,l):e.placement===o.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,l):e.placement===o.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,l/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,l/2)))}})),a.log.debug("maxMessageWidthPerActor:",n),n},k=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=u.default.wrapLabel(r.description,h.width-2*h.wrapPadding,g(h)));var i=u.default.calculateTextDimensions(r.description,g(h));r.width=r.wrap?h.width:Math.max(h.width,i.width+2*h.wrapPadding),r.height=r.wrap?Math.max(i.height,h.height):h.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+h.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,h.actorMargin)}}}return Math.max(n,h.height)},C=function(t,e){var n,r,i,s={},c=[];return t.forEach((function(t){switch(t.id=u.default.random({length:10}),t.type){case o.parser.yy.LINETYPE.LOOP_START:case o.parser.yy.LINETYPE.ALT_START:case o.parser.yy.LINETYPE.OPT_START:case o.parser.yy.LINETYPE.PAR_START:c.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case o.parser.yy.LINETYPE.ALT_ELSE:case o.parser.yy.LINETYPE.PAR_AND:t.message&&(n=c.pop(),s[n.id]=n,s[t.id]=n,c.push(n));break;case o.parser.yy.LINETYPE.LOOP_END:case o.parser.yy.LINETYPE.ALT_END:case o.parser.yy.LINETYPE.OPT_END:case o.parser.yy.LINETYPE.PAR_END:n=c.pop(),s[n.id]=n;break;case o.parser.yy.LINETYPE.ACTIVE_START:var l=e[t.from?t.from.actor:t.to.actor],g=v(t.from?t.from.actor:t.to.actor).length,y=l.x+l.width/2+(g-1)*h.activationWidth/2,m={startx:y,stopx:y+h.activationWidth,actor:t.from.actor,enabled:!0};d.activations.push(m);break;case o.parser.yy.LINETYPE.ACTIVE_END:var _=d.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete d.activations.splice(_,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,s=u.default.calculateTextDimensions(i?u.default.wrapLabel(t.message,h.width,p(h)):t.message,p(h)),c={width:i?h.width:Math.max(h.width,s.width+2*h.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.parser.yy.PLACEMENT.RIGHTOF?(c.width=i?Math.max(h.width,s.width):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*h.noteMargin),c.startx=n+(e[t.from].width+h.actorMargin)/2):t.placement===o.parser.yy.PLACEMENT.LEFTOF?(c.width=i?Math.max(h.width,s.width+2*h.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*h.noteMargin),c.startx=n-c.width+(e[t.from].width-h.actorMargin)/2):t.to===t.from?(s=u.default.calculateTextDimensions(i?u.default.wrapLabel(t.message,Math.max(h.width,e[t.from].width),p(h)):t.message,p(h)),c.width=i?Math.max(h.width,e[t.from].width):Math.max(e[t.from].width,h.width,s.width+2*h.noteMargin),c.startx=n+(e[t.from].width-c.width)/2):(c.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+h.actorMargin,c.startx=n<r?n+e[t.from].width/2-h.actorMargin/2:r+e[t.to].width/2-h.actorMargin/2),i&&(c.message=u.default.wrapLabel(t.message,c.width-2*h.wrapPadding,p(h))),a.log.debug("NM:[".concat(c.startx,",").concat(c.stopx,",").concat(c.starty,",").concat(c.stopy,":").concat(c.width,",").concat(c.height,"=").concat(t.message,"]")),c}(t,e),t.noteModel=r,c.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-h.labelBoxWidth}))):(i=function(t,e){var n=!1;if([o.parser.yy.LINETYPE.SOLID_OPEN,o.parser.yy.LINETYPE.DOTTED_OPEN,o.parser.yy.LINETYPE.SOLID,o.parser.yy.LINETYPE.DOTTED,o.parser.yy.LINETYPE.SOLID_CROSS,o.parser.yy.LINETYPE.DOTTED_CROSS,o.parser.yy.LINETYPE.SOLID_POINT,o.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};var r=b(t.from,e),i=b(t.to,e),a=r[0]<=i[0]?1:0,s=r[0]<i[0]?0:1,c=r.concat(i),l=Math.abs(i[s]-r[a]);t.wrap&&t.message&&(t.message=u.default.wrapLabel(t.message,Math.max(l+2*h.wrapPadding,h.width),f(h)));var d=u.default.calculateTextDimensions(t.message,f(h));return{width:Math.max(t.wrap?0:d.width+2*h.wrapPadding,l+2*h.wrapPadding,h.width),height:0,startx:r[a],stopx:i[s],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,c),toBounds:Math.max.apply(null,c)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&c.length>0&&c.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-h.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-h.labelBoxWidth})))})),d.activations=[],a.log.debug("Loop type widths:",s),s};e.default={bounds:d,drawActors:y,setConf:m,draw:w}},"./src/diagrams/sequence/styles.js":function(t,e,n){n.r(e),e.default=function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n")}},"./src/diagrams/sequence/svgDraw.js":function(t,e,n){n.r(e),n.d(e,"drawRect",(function(){return i})),n.d(e,"drawText",(function(){return a})),n.d(e,"drawLabel",(function(){return o})),n.d(e,"drawActor",(function(){return c})),n.d(e,"anchorElement",(function(){return l})),n.d(e,"drawActivation",(function(){return u})),n.d(e,"drawLoop",(function(){return h})),n.d(e,"drawBackgroundRect",(function(){return d})),n.d(e,"insertArrowHead",(function(){return f})),n.d(e,"insertArrowFilledHead",(function(){return p})),n.d(e,"insertSequenceNumber",(function(){return g})),n.d(e,"insertArrowCrossHead",(function(){return y})),n.d(e,"getTextObj",(function(){return m})),n.d(e,"getNoteRect",(function(){return v}));var r=n("./src/diagrams/common/common.js"),i=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},a=function(t,e){var n=0,i=0,a=e.text.split(r.default.lineBreakRegex),o=[],s=0,c=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":c=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":c=function(){return Math.round(e.y+(n+i+e.textMargin)/2)};break;case"bottom":case"end":c=function(){return Math.round(e.y+(n+i+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var l=0;l<a.length;l++){var u=a[l];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(s=l*e.fontSize);var h=t.append("text");if(h.attr("x",e.x),h.attr("y",c()),void 0!==e.anchor&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&h.style("font-family",e.fontFamily),void 0!==e.fontSize&&h.style("font-size",e.fontSize),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==s&&h.attr("dy",s),e.tspan){var d=h.append("tspan");d.attr("x",e.x),void 0!==e.fill&&d.attr("fill",e.fill),d.text(u)}else h.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(i+=(h._groups||h)[0][0].getBBox().height,n=i),o.push(h)}return o},o=function(t,e){var n,r,i,o,s,c=t.append("polygon");return c.attr("points",(n=e.x,r=e.y,i=e.width,o=e.height,n+","+r+" "+(n+i)+","+r+" "+(n+i)+","+(r+o-(s=7))+" "+(n+i-1.2*s)+","+(r+o)+" "+n+","+(r+o))),c.attr("class","labelBox"),e.y=e.y+e.height/2,a(t,e),c},s=-1,c=function(t,e,n){var r=e.x+e.width/2,a=t.append("g");0===e.y&&(s++,a.append("line").attr("id","actor"+s).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 o=v();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,i(a,o),b(n)(e.description,a,o.x,o.y,o.width,o.height,{class:"actor"},n)},l=function(t){return t.append("g")},u=function(t,e,n,r,a){var o=v(),s=e.anchored;o.x=e.startx,o.y=e.starty,o.class="activation"+a%3,o.width=e.stopx-e.startx,o.height=n-e.starty,i(s,o)},h=function(t,e,n,r){var i=r.boxMargin,s=r.boxTextMargin,c=r.labelBoxHeight,l=r.labelBoxWidth,u=r.messageFontFamily,h=r.messageFontSize,d=r.messageFontWeight,f=t.append("g"),p=function(t,e,n,r){return f.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){p(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var g=m();g.text=n,g.x=e.startx,g.y=e.starty,g.fontFamily=u,g.fontSize=h,g.fontWeight=d,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=l||50,g.height=c||20,g.textMargin=s,g.class="labelText",o(f,g),(g=m()).text=e.title,g.x=e.startx+l/2+(e.stopx-e.startx)/2,g.y=e.starty+i+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=u,g.fontSize=h,g.fontWeight=d,g.wrap=!0;var y=a(f,g);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){g.text=t.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[n].y+i+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=u,g.fontSize=h,g.fontWeight=d,g.wrap=e.wrap,y=a(f,g);var r=Math.round(y.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+s)}})),e.height=Math.round(e.stopy-e.starty),f},d=function(t,e){i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},f=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},p=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},g=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)},y=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")},m=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},v=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},b=function(){function t(t,e,n,r,a,o,s){i(e.append("text").attr("x",n+a/2).attr("y",r+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,a,o,s,c,l){for(var u=l.actorFontSize,h=l.actorFontFamily,d=l.actorFontWeight,f=t.split(r.default.lineBreakRegex),p=0;p<f.length;p++){var g=p*u-u*(f.length-1)/2,y=e.append("text").attr("x",n+o/2).attr("y",a).style("text-anchor","middle").style("font-size",u).style("font-weight",d).style("font-family",h);y.append("tspan").attr("x",n+o/2).attr("dy",g).text(f[p]),y.attr("y",a+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,c)}}function n(t,n,r,a,o,s,c,l){var u=n.append("switch"),h=u.append("foreignObject").attr("x",r).attr("y",a).attr("width",o).attr("height",s).append("xhtml: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").text(t),e(t,u,r,a,o,s,c,l),i(h,c)}function i(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}}();e.default={drawRect:i,drawText:a,drawLabel:o,drawActor:c,anchorElement:l,drawActivation:u,drawLoop:h,drawBackgroundRect:d,insertArrowHead:f,insertArrowFilledHead:p,insertSequenceNumber:g,insertArrowCrossHead:y,getTextObj:m,getNoteRect:v}},"./src/diagrams/state/id-cache.js":function(t,e,n){n.r(e),n.d(e,"set",(function(){return i})),n.d(e,"get",(function(){return a})),n.d(e,"keys",(function(){return o})),n.d(e,"size",(function(){return s}));var r={},i=function(t,e){r[t]=e},a=function(t){return r[t]},o=function(){return Object.keys(r)},s=function(){return o().length};e.default={get:a,set:i,keys:o,size:s}},"./src/diagrams/state/parser/stateDiagram.jison":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,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],l=[1,20],u=[1,21],h=[1,22],d=[1,30],f=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,27],v=[1,32],b=[1,33],_=[1,34],w=[1,35],x=[1,31],k=[1,38],C=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],T=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],E=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],S=[4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],O={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement: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,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,openDirective:31,typeDirective:32,closeDirective:33,":":34,argDirective:35,direction_tb:36,direction_bt:37,direction_rl:38,direction_lr:39,eol:40,";":41,EDGE_STATE:42,left_of:43,right_of:44,open_directive:45,type_directive:46,arg_directive:47,close_directive:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",34:":",36:"direction_tb",37:"direction_bt",38:"direction_rl",39:"direction_lr",41:";",42:"EDGE_STATE",43:"left_of",44:"right_of",45:"open_directive",46:"type_directive",47:"arg_directive",48:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[40,1],[40,1],[11,1],[11,1],[28,1],[28,1],[31,1],[32,1],[35,1],[33,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13: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 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],l=a[s-2].trim();if(a[s].match(":")){var u=a[s].split(":");c=u[0],l=[l,u[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 30:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 31:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 32:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 33:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 36:case 37:this.$=a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,31:6,45:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,31:6,45:i},{3:9,4:e,5:n,6:4,7:r,31:6,45:i},{3:10,4:e,5:n,6:4,7:r,31:6,45:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,36,37,38,39,42,45],a,{8:11}),{32:12,46:[1,13]},{46:[2,40]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,20:h,22:d,23:f,24:p,25:g,26:y,27:m,30:29,31:6,36:v,37:b,38:_,39:w,42:x,45:i},{33:36,34:[1,37],48:k},t([34,48],[2,41]),t(C,[2,6]),{6:28,10:39,11:18,14:c,15:l,17:u,20:h,22:d,23:f,24:p,25:g,26:y,27:m,30:29,31:6,36:v,37:b,38:_,39:w,42:x,45:i},t(C,[2,8]),t(C,[2,9]),t(C,[2,10],{12:[1,40],13:[1,41]}),t(C,[2,14]),{16:[1,42]},t(C,[2,16],{18:[1,43]}),{21:[1,44]},t(C,[2,20]),t(C,[2,21]),t(C,[2,22]),t(C,[2,23]),{28:45,29:[1,46],43:[1,47],44:[1,48]},t(C,[2,26]),t(C,[2,27]),t(T,[2,36]),t(T,[2,37]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(E,[2,28]),{35:49,47:[1,50]},t(E,[2,43]),t(C,[2,7]),t(C,[2,11]),{11:51,22:d,42:x},t(C,[2,15]),t(S,a,{8:52}),{22:[1,53]},{22:[1,54]},{21:[1,55]},{22:[2,38]},{22:[2,39]},{33:56,48:k},{48:[2,42]},t(C,[2,12],{12:[1,57]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,19:[1,58],20:h,22:d,23:f,24:p,25:g,26:y,27:m,30:29,31:6,36:v,37:b,38:_,39:w,42:x,45:i},t(C,[2,18],{18:[1,59]}),{29:[1,60]},{22:[1,61]},t(E,[2,29]),t(C,[2,13]),t(C,[2,17]),t(S,a,{8:62}),t(C,[2,24]),t(C,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:l,17:u,19:[1,63],20:h,22:d,23:f,24:p,25:g,26:y,27:m,30:29,31:6,36:v,37:b,38:_,39:w,42:x,45:i},t(C,[2,19])],defaultActions:{7:[2,40],8:[2,1],9:[2,2],10:[2,3],47:[2,38],48:[2,39],50:[2,42]},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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 36;case 1:return 37;case 2:return 38;case 3:return 39;case 4:return this.begin("open_directive"),45;case 5:return this.begin("type_directive"),46;case 6:return this.popState(),this.begin("arg_directive"),34;case 7:return this.popState(),this.popState(),48;case 8:return 47;case 9:case 10:break;case 11:return 5;case 12:case 13:case 14:case 15:break;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:this.popState();break;case 19:this.pushState("STATE");break;case 20:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 21:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 22:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 23:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 24:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 25:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:this.begin("STATE_STRING");break;case 31:return this.popState(),this.pushState("STATE_ID"),"AS";case 32:return this.popState(),"ID";case 33:this.popState();break;case 34:return"STATE_DESCR";case 35:return 17;case 36:this.popState();break;case 37:return this.popState(),this.pushState("struct"),18;case 38:return this.popState(),19;case 39:break;case 40:return this.begin("NOTE"),27;case 41:return this.popState(),this.pushState("NOTE_ID"),43;case 42:return this.popState(),this.pushState("NOTE_ID"),44;case 43:this.popState(),this.pushState("FLOATING_NOTE");break;case 44:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 45:break;case 46:return"NOTE_TEXT";case 47:return this.popState(),"ID";case 48:return this.popState(),this.pushState("NOTE_TEXT"),22;case 49:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 50:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 51:case 52:return 7;case 53:return 14;case 54:return 42;case 55:return 22;case 56:return e.yytext=e.yytext.trim(),12;case 57:return 13;case 58:return 26;case 59:return 5;case 60:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\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,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/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\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:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,19,26,27,28,29,38,39,40,54,55,56,57,58],inclusive:!1},FLOATING_NOTE_ID:{rules:[47],inclusive:!1},FLOATING_NOTE:{rules:[44,45,46],inclusive:!1},NOTE_TEXT:{rules:[49,50],inclusive:!1},NOTE_ID:{rules:[48],inclusive:!1},NOTE:{rules:[41,42,43],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[32],inclusive:!1},STATE_STRING:{rules:[33,34],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,20,21,22,23,24,25,30,31,35,36,37],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,37,40,51,52,53,54,55,56,57,59,60],inclusive:!0}}};function M(){this.yy={}}return O.lexer=A,M.prototype=O,O.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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/state/shapes.js":function(t,e,n){n.r(e),n.d(e,"drawStartState",(function(){return d})),n.d(e,"drawDivider",(function(){return f})),n.d(e,"drawSimpleState",(function(){return p})),n.d(e,"drawDescrState",(function(){return g})),n.d(e,"addTitleAndBox",(function(){return y})),n.d(e,"drawText",(function(){return m})),n.d(e,"drawNote",(function(){return v})),n.d(e,"drawState",(function(){return b})),n.d(e,"drawEdge",(function(){return w}));var r=n("d3"),i=n("./src/diagrams/state/id-cache.js"),a=n("./src/diagrams/state/stateDb.js"),o=n("./src/utils.js"),s=n("./src/diagrams/common/common.js"),c=n("./src/config.js"),l=n("./src/logger.js");function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d=function(t){return t.append("circle").attr("class","start-state").attr("r",Object(c.getConfig)().state.sizeUnit).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit)},f=function(t){return t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Object(c.getConfig)().state.textHeight).attr("class","divider").attr("x2",2*Object(c.getConfig)().state.textHeight).attr("y1",0).attr("y2",0)},p=function(t,e){var n=t.append("text").attr("x",2*Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.textHeight+2*Object(c.getConfig)().state.padding).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();return t.insert("rect",":first-child").attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding).attr("width",r.width+2*Object(c.getConfig)().state.padding).attr("height",r.height+2*Object(c.getConfig)().state.padding).attr("rx",Object(c.getConfig)().state.radius),n},g=function(t,e){var n=t.append("text").attr("x",2*Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.textHeight+1.3*Object(c.getConfig)().state.padding).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",Object(c.getConfig)().state.padding).attr("y",r+.4*Object(c.getConfig)().state.padding+Object(c.getConfig)().state.dividerMargin+Object(c.getConfig)().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){var e,n,r;a||(e=t,n=o,r=i.append("tspan").attr("x",2*Object(c.getConfig)().state.padding).text(e),n||r.attr("dy",Object(c.getConfig)().state.textHeight),o=!1),a=!1}));var s=t.append("line").attr("x1",Object(c.getConfig)().state.padding).attr("y1",Object(c.getConfig)().state.padding+r+Object(c.getConfig)().state.dividerMargin/2).attr("y2",Object(c.getConfig)().state.padding+r+Object(c.getConfig)().state.dividerMargin/2).attr("class","descr-divider"),l=i.node().getBBox(),u=Math.max(l.width,n.width);return s.attr("x2",u+3*Object(c.getConfig)().state.padding),t.insert("rect",":first-child").attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding).attr("width",u+2*Object(c.getConfig)().state.padding).attr("height",l.height+r+2*Object(c.getConfig)().state.padding).attr("rx",Object(c.getConfig)().state.radius),t},y=function(t,e,n){var r,i=Object(c.getConfig)().state.padding,a=2*Object(c.getConfig)().state.padding,o=t.node().getBBox(),s=o.width,l=o.x,u=t.append("text").attr("x",0).attr("y",Object(c.getConfig)().state.titleShift).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.id),h=u.node().getBBox().width+a,d=Math.max(h,s);d===s&&(d+=a);var f=t.node().getBBox();e.doc,r=l-i,h>s&&(r=(s-d)/2+i),Math.abs(l-f.x)<i&&h>s&&(r=l-(h-s)/2);var p=1-Object(c.getConfig)().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",d).attr("height",f.height+Object(c.getConfig)().state.textHeight+Object(c.getConfig)().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),h<=s&&u.attr("x",l+(d-a)/2-h/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",Object(c.getConfig)().state.titleShift-Object(c.getConfig)().state.textHeight-Object(c.getConfig)().state.padding).attr("width",d).attr("height",3*Object(c.getConfig)().state.textHeight).attr("rx",Object(c.getConfig)().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",Object(c.getConfig)().state.titleShift-Object(c.getConfig)().state.textHeight-Object(c.getConfig)().state.padding).attr("width",d).attr("height",f.height+3+2*Object(c.getConfig)().state.textHeight).attr("rx",Object(c.getConfig)().state.radius),t},m=function(t,e){var n=e.text.replace(s.default.lineBreakRegex," "),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},v=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",Object(c.getConfig)().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,l=t.replace(/\r\n/g,"<br/>"),h=(l=l.replace(/\n/g,"<br/>")).split(s.default.lineBreakRegex),d=1.25*Object(c.getConfig)().state.noteMargin,f=u(h);try{for(f.s();!(o=f.n()).done;){var p=o.value.trim();if(p.length>0){var g=a.append("tspan");g.text(p),0===d&&(d+=g.node().getBBox().height),i+=d,g.attr("x",e+Object(c.getConfig)().state.noteMargin),g.attr("y",n+i+1.25*Object(c.getConfig)().state.noteMargin)}}}catch(y){f.e(y)}finally{f.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*Object(c.getConfig)().state.noteMargin),n.attr("width",i+2*Object(c.getConfig)().state.noteMargin),n},b=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&d(a),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Object(c.getConfig)().state.sizeUnit).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+2).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+2)}(a),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=Object(c.getConfig)().state.forkWidth,r=Object(c.getConfig)().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",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding)}(a,e),"note"===e.type&&v(e.note.text,a),"divider"===e.type&&f(a),"default"===e.type&&0===e.descriptions.length&&p(a,e),"default"===e.type&&e.descriptions.length>0&&g(a,e);var o=a.node().getBBox();return r.width=o.width+2*Object(c.getConfig)().state.padding,r.height=o.height+2*Object(c.getConfig)().state.padding,i.default.set(n,r),r},_=0,w=function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var i=e.points,u=Object(r.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(r.curveBasis),h=t.append("path").attr("d",u(i)).attr("id","edge"+_).attr("class","transition"),d="";if(Object(c.getConfig)().state.arrowMarkerAbsolute&&(d=(d=(d=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),h.attr("marker-end","url("+d+"#"+function(t){switch(t){case a.default.relationType.AGGREGATION:return"aggregation";case a.default.relationType.EXTENSION:return"extension";case a.default.relationType.COMPOSITION:return"composition";case a.default.relationType.DEPENDENCY:return"dependency"}}(a.default.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var f=t.append("g").attr("class","stateLabel"),p=o.default.calcLabelPosition(e.points),g=p.x,y=p.y,m=s.default.getRows(n.title),v=0,b=[],w=0,x=0,k=0;k<=m.length;k++){var C=f.append("text").attr("text-anchor","middle").text(m[k]).attr("x",g).attr("y",y+v),T=C.node().getBBox();if(w=Math.max(w,T.width),x=Math.min(x,T.x),l.log.info(T.x,g,y+v),0===v){var E=C.node().getBBox();v=E.height,l.log.info("Title height",v,y)}b.push(C)}var S=v*m.length;if(m.length>1){var O=(m.length-1)*v*.5;b.forEach((function(t,e){return t.attr("y",y+e*v-O)})),S=v*m.length}var A=f.node().getBBox();f.insert("rect",":first-child").attr("class","box").attr("x",g-w/2-Object(c.getConfig)().state.padding/2).attr("y",y-S/2-Object(c.getConfig)().state.padding/2-3.5).attr("width",w+Object(c.getConfig)().state.padding).attr("height",S+Object(c.getConfig)().state.padding),l.log.info(A)}_++}},"./src/diagrams/state/stateDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return u})),n.d(e,"addState",(function(){return g})),n.d(e,"clear",(function(){return y})),n.d(e,"getState",(function(){return m})),n.d(e,"getStates",(function(){return v})),n.d(e,"logDocuments",(function(){return b})),n.d(e,"getRelations",(function(){return _})),n.d(e,"addRelation",(function(){return w})),n.d(e,"cleanupLabel",(function(){return k})),n.d(e,"lineType",(function(){return C})),n.d(e,"relationType",(function(){return O}));var r=n("./src/logger.js"),i=n("./src/utils.js"),a=n("./src/mermaidAPI.js"),o=n("./src/config.js");function s(t){return(s="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 c=function(t){return JSON.parse(JSON.stringify(t))},l=[],u=function(t,e,n){a.default.parseDirective(this,t,e,n)},h=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 a=[],o=0,s=[];for(o=0;o<n.doc.length;o++)if("divider"===n.doc[o].type){var l=c(n.doc[o]);l.doc=c(s),a.push(l),s=[]}else s.push(n.doc[o]);if(a.length>0&&s.length>0){var u={stmt:"state",id:Object(i.generateId)(),type:"divider",doc:c(s)};a.push(c(u)),n.doc=a}n.doc.forEach((function(e){return t(n,e,!0)}))}},d={root:{relations:[],states:{},documents:{}}},f=d.root,p=0,g=function(t,e,n,i,a){void 0===f.states[t]?f.states[t]={id:t,descriptions:[],type:e,doc:n,note:a}:(f.states[t].doc||(f.states[t].doc=n),f.states[t].type||(f.states[t].type=e)),i&&(r.log.info("Adding state ",t,i),"string"==typeof i&&x(t,i.trim()),"object"===s(i)&&i.forEach((function(e){return x(t,e.trim())}))),a&&(f.states[t].note=a)},y=function(){f=(d={root:{relations:[],states:{},documents:{}}}).root,f=d.root,p=0,E=[]},m=function(t){return f.states[t]},v=function(){return f.states},b=function(){r.log.info("Documents = ",d)},_=function(){return f.relations},w=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++p,a="start"),"[*]"===e&&(i="end"+p,o="end"),g(r,a),g(i,o),f.relations.push({id1:r,id2:i,title:n})},x=function(t,e){var n=f.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},k=function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},C={LINE:0,DOTTED_LINE:1},T=0,E=[],S="TB",O={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3};e.default={parseDirective:u,getConfig:function(){return o.getConfig().state},addState:g,clear:y,getState:m,getStates:v,getRelations:_,getClasses:function(){return E},getDirection:function(){return S},addRelation:w,getDividerId:function(){return"divider-id-"+ ++T},setDirection:function(t){S=t},cleanupLabel:k,lineType:C,relationType:O,logDocuments:b,getRootDoc:function(){return l},setRootDoc:function(t){r.log.info("Setting root doc",t),l=t},getRootDocV2:function(){return h({id:"root"},{id:"root",doc:l},!0),{id:"root",doc:l}},extract:function(t){var e;e=t.doc?t.doc:t,r.log.info(e),y(),r.log.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&g(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&w(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}}},"./src/diagrams/state/stateRenderer-v2.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return p})),n.d(e,"getClasses",(function(){return y})),n.d(e,"draw",(function(){return w}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/state/stateDb.js"),s=n("./src/diagrams/state/parser/stateDiagram.jison"),c=n.n(s),l=n("./src/config.js"),u=n("./src/dagre-wrapper/index.js"),h=n("./src/logger.js"),d=n("./src/utils.js"),f={},p=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)f[e[n]]=t[e[n]]},g={},y=function(t){h.log.trace("Extracting classes"),o.default.clear();var e=c.a.parser;return e.yy=o.default,e.parse(t),o.default.getClasses()},m=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),g[n.id]||(g[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(g[n.id].description)?(g[n.id].shape="rectWithTitle",g[n.id].description.push(n.description)):g[n.id].description.length>0?(g[n.id].shape="rectWithTitle",g[n.id].description===n.id?g[n.id].description=[n.description]:g[n.id].description=[g[n.id].description,n.description]):(g[n.id].shape="rect",g[n.id].description=n.description)),!g[n.id].type&&n.doc&&(h.log.info("Setting cluster for ",n.id,_(n)),g[n.id].type="group",g[n.id].dir=_(n),g[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",g[n.id].classes=g[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:g[n.id].shape,labelText:g[n.id].description,classes:g[n.id].classes,style:"",id:n.id,dir:g[n.id].dir,domId:"state-"+n.id+"-"+v,type:g[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-"+v,domId:"state-"+n.id+"----note-"+v,type:g[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:g[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+v,type:"group",padding:0};v++,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 c=n.id,l=o.id;"left of"===n.note.position&&(c=o.id,l=n.id),t.setEdge(c,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(h.log.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(h.log.trace("Adding nodes children "),b(t,n,n.doc,!r))},v=0,b=function(t,e,n,r){h.log.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)m(t,e,n,r);else if("relation"===n.stmt){m(t,e,n.state1,r),m(t,e,n.state2,r);var i={id:"edge"+v,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,v),v++}}))},_=function(t,e){var n=e||"TB";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];"dir"===i.stmt&&(n=i.value)}return n},w=function(t,e){h.log.info("Drawing state diagram (v2)",e),o.default.clear(),g={};var n=c.a.parser;n.yy=o.default,n.parse(t),o.default.getDirection();var r=Object(l.getConfig)().state,s=r.nodeSpacing||50,f=r.rankSpacing||50;h.log.info(o.default.getRootDocV2()),o.default.extract(o.default.getRootDocV2()),h.log.info(o.default.getRootDocV2());var p=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:_(o.default.getRootDocV2()),nodesep:s,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));m(p,void 0,o.default.getRootDocV2(),!0);var y=Object(a.select)('[id="'.concat(e,'"]')),v=Object(a.select)("#"+e+" g");Object(u.render)(v,p,["barb"],"statediagram",e);var b=y.node().getBBox(),w=b.width+16,x=b.height+16;y.attr("class","statediagram");var k=y.node().getBBox();Object(d.configureSvgSize)(y,x,1.75*w,r.useMaxWidth);var C="".concat(k.x-8," ").concat(k.y-8," ").concat(w," ").concat(x);h.log.debug("viewBox ".concat(C)),y.attr("viewBox",C);for(var T=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),E=0;E<T.length;E++){var S=T[E],O=S.getBBox(),A=document.createElementNS("http://www.w3.org/2000/svg","rect");A.setAttribute("rx",0),A.setAttribute("ry",0),A.setAttribute("width",O.width),A.setAttribute("height",O.height),S.insertBefore(A,S.firstChild)}};e.default={setConf:p,getClasses:y,draw:w}},"./src/diagrams/state/stateRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return m})),n.d(e,"draw",(function(){return v}));var r,i=n("d3"),a=n("dagre"),o=n.n(a),s=n("graphlib"),c=n.n(s),l=n("./src/logger.js"),u=n("./src/diagrams/state/stateDb.js"),h=n("./src/diagrams/common/common.js"),d=n("./src/diagrams/state/parser/stateDiagram.jison"),f=n("./src/diagrams/state/shapes.js"),p=n("./src/config.js"),g=n("./src/utils.js");d.parser.yy=u.default;var y={},m=function(){},v=function(t,e){r=Object(p.getConfig)().state,d.parser.yy.clear(),d.parser.parse(t),l.log.debug("Rendering diagram "+t);var n=Object(i.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 c.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var a=u.default.getRootDoc();b(a,n,void 0,!1);var o=r.padding,s=n.node().getBBox(),h=s.width+2*o,f=s.height+2*o,y=1.75*h;Object(g.configureSvgSize)(n,f,y,r.useMaxWidth),n.attr("viewBox","".concat(s.x-r.padding," ").concat(s.y-r.padding," ")+h+" "+f)},b=function t(e,n,a,s){var d,p=new c.a.Graph({compound:!0,multigraph:!0}),g=!0;for(d=0;d<e.length;d++)if("relation"===e[d].stmt){g=!1;break}a?p.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:g?1:r.edgeLengthFactor,nodeSep:g?1:50,isMultiGraph:!0}):p.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:g?1:r.edgeLengthFactor,nodeSep:g?1:50,ranker:"tight-tree",isMultiGraph:!0}),p.setDefaultEdgeLabel((function(){return{}})),u.default.extract(e);for(var m=u.default.getStates(),v=u.default.getRelations(),b=Object.keys(m),_=0;_<b.length;_++){var w=m[b[_]];a&&(w.parentId=a);var x=void 0;if(w.doc){var k=n.append("g").attr("id",w.id).attr("class","stateGroup");x=t(w.doc,k,w.id,!s);var C=(k=Object(f.addTitleAndBox)(k,w,s)).node().getBBox();x.width=C.width,x.height=C.height+r.padding/2,y[w.id]={y:r.compositTitleSize}}else x=Object(f.drawState)(n,w,p);if(w.note){var T={descriptions:[],id:w.id+"-note",note:w.note,type:"note"},E=Object(f.drawState)(n,T,p);"left of"===w.note.position?(p.setNode(x.id+"-note",E),p.setNode(x.id,x)):(p.setNode(x.id,x),p.setNode(x.id+"-note",E)),p.setParent(x.id,x.id+"-group"),p.setParent(x.id+"-note",x.id+"-group")}else p.setNode(x.id,x)}l.log.debug("Count=",p.nodeCount(),p);var S=0;v.forEach((function(t){var e;S++,l.log.debug("Setting edge",t),p.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*r.fontSizeFactor:1),height:r.labelHeight*h.default.getRows(t.title).length,labelpos:"c"},"id"+S)})),o.a.layout(p),l.log.debug("Graph after layout",p.nodes());var O=n.node();p.nodes().forEach((function(t){void 0!==t&&void 0!==p.node(t)?(l.log.warn("Node "+t+": "+JSON.stringify(p.node(t))),Object(i.select)("#"+O.id+" #"+t).attr("transform","translate("+(p.node(t).x-p.node(t).width/2)+","+(p.node(t).y+(y[t]?y[t].y:0)-p.node(t).height/2)+" )"),Object(i.select)("#"+O.id+" #"+t).attr("data-x-shift",p.node(t).x-p.node(t).width/2),document.querySelectorAll("#"+O.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)}))):l.log.debug("No Node "+t+": "+JSON.stringify(p.node(t)))}));var A=O.getBBox();p.edges().forEach((function(t){void 0!==t&&void 0!==p.edge(t)&&(l.log.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(p.edge(t))),Object(f.drawEdge)(n,p.edge(t),p.edge(t).relation))})),A=O.getBBox();var M={id:a||"root",label:a||"root",width:0,height:0};return M.width=A.width+2*r.padding,M.height=A.height+2*r.padding,l.log.debug("Doc rendered",M,p),M};e.default={setConf:m,draw:v}},"./src/diagrams/state/styles.js":function(t,e,n){n.r(e),e.default=function(t){return"\ndefs #statediagram-barbEnd {\n fill: ".concat(t.transitionColor,";\n stroke: ").concat(t.transitionColor,";\n }\ng.stateGroup text {\n fill: ").concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.stateLabelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.transitionColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.labelBackgroundColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.stateLabelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node .fork-join {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node circle.state-end {\n fill: ").concat(t.innerEndBackground,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.compositeBackground||t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.stateBkg||t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n.node polygon {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.compositeTitleBackground,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.stateLabelColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.compositeBackground||t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n.statediagram .edgeLabel {\n color: red; // ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")}},"./src/diagrams/user-journey/journeyDb.js":function(t,e,n){n.r(e),n.d(e,"parseDirective",(function(){return d})),n.d(e,"clear",(function(){return f})),n.d(e,"setTitle",(function(){return p})),n.d(e,"getTitle",(function(){return g})),n.d(e,"addSection",(function(){return y})),n.d(e,"getSections",(function(){return m})),n.d(e,"getTasks",(function(){return v})),n.d(e,"addTask",(function(){return b})),n.d(e,"addTaskOrg",(function(){return _}));var r=n("./src/mermaidAPI.js"),i=n("./src/config.js");function a(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var s="",c="",l=[],u=[],h=[],d=function(t,e,n){r.default.parseDirective(this,t,e,n)},f=function(){l.length=0,u.length=0,c="",s="",h.length=0},p=function(t){s=t},g=function(){return s},y=function(t){c=t,l.push(t)},m=function(){return l},v=function(){for(var t=w(),e=0;!t&&e<100;)t=w(),e++;return u.push.apply(u,h),u},b=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:c,type:c,people:a,task:t,score:r};h.push(o)},_=function(t){var e={section:c,type:c,description:t,task:t,classes:[]};u.push(e)},w=function(){for(var t=!0,e=0;e<h.length;e++)h[e].processed,t=t&&h[e].processed;return t};e.default={parseDirective:d,getConfig:function(){return i.getConfig().journey},clear:f,setTitle:p,getTitle:g,addSection:y,getSections:m,getTasks:v,addTask:b,addTaskOrg:_,getActors:function(){return t=[],u.forEach((function(e){e.people&&t.push.apply(t,a(e.people))})),a(new Set(t)).sort();var t}}},"./src/diagrams/user-journey/journeyRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return l})),n.d(e,"draw",(function(){return f})),n.d(e,"bounds",(function(){return p})),n.d(e,"drawTasks",(function(){return m}));var r=n("d3"),i=n("./src/diagrams/user-journey/parser/journey.jison"),a=n("./src/diagrams/user-journey/journeyDb.js"),o=n("./src/diagrams/user-journey/svgDraw.js"),s=n("./src/config.js"),c=n("./src/utils.js");i.parser.yy=a.default;var l=function(t){Object.keys(t).forEach((function(e){h[e]=t[e]}))},u={},h=Object(s.getConfig)().journey,d=Object(s.getConfig)().journey.leftMargin,f=function(t,e){var n=Object(s.getConfig)().journey;i.parser.yy.clear(),i.parser.parse(t+"\n"),p.init();var a=Object(r.select)("#"+e);a.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.default.initGraphics(a);var l=i.parser.yy.getTasks(),h=i.parser.yy.getTitle(),f=i.parser.yy.getActors();for(var g in u)delete u[g];var y=0;f.forEach((function(t){u[t]={color:n.actorColours[y%n.actorColours.length],position:y},y++})),function(t){var e=Object(s.getConfig)().journey,n=60;Object.keys(u).forEach((function(r){var i=u[r].color,a={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:u[r].position};o.default.drawCircle(t,a);var s={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};o.default.drawText(t,s),n+=20}))}(a),p.insert(0,0,d,50*Object.keys(u).length),m(a,l,0);var v=p.getBounds();h&&a.append("text").text(h).attr("x",d).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var b=v.stopy-v.starty+2*n.diagramMarginY,_=d+v.stopx+2*n.diagramMarginX;Object(c.configureSvgSize)(a,b,_,n.useMaxWidth),a.append("line").attr("x1",d).attr("y1",4*n.height).attr("x2",_-d-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var w=h?70:0;a.attr("viewBox","".concat(v.startx," -25 ").concat(_," ").concat(b+w)),a.attr("preserveAspectRatio","xMinYMin meet"),a.attr("height",b+w+25)},p={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=Object(s.getConfig)().journey,o=this,c=0;this.sequenceItems.forEach((function(s){c++;var l=o.sequenceItems.length-c+1;o.updateVal(s,"starty",e-l*a.boxMargin,Math.min),o.updateVal(s,"stopy",r+l*a.boxMargin,Math.max),o.updateVal(p.data,"startx",t-l*a.boxMargin,Math.min),o.updateVal(p.data,"stopx",n+l*a.boxMargin,Math.max),"activation"!==i&&(o.updateVal(s,"startx",t-l*a.boxMargin,Math.min),o.updateVal(s,"stopx",n+l*a.boxMargin,Math.max),o.updateVal(p.data,"starty",e-l*a.boxMargin,Math.min),o.updateVal(p.data,"stopy",r+l*a.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(p.data,"startx",i,Math.min),this.updateVal(p.data,"starty",o,Math.min),this.updateVal(p.data,"stopx",a,Math.max),this.updateVal(p.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}},g=h.sectionFills,y=h.sectionColours,m=function(t,e,n){for(var r=Object(s.getConfig)().journey,i="",a=n+(2*r.height+r.diagramMarginY),c=0,l="#CCC",h="black",f=0,m=0;m<e.length;m++){var v=e[m];if(i!==v.section){l=g[c%g.length],f=c%g.length,h=y[c%y.length];var b={x:m*r.taskMargin+m*r.width+d,y:50,text:v.section,fill:l,num:f,colour:h};o.default.drawSection(t,b,r),i=v.section,c++}var _=v.people.reduce((function(t,e){return u[e]&&(t[e]=u[e]),t}),{});v.x=m*r.taskMargin+m*r.width+d,v.y=a,v.width=r.diagramMarginX,v.height=r.diagramMarginY,v.colour=h,v.fill=l,v.num=f,v.actors=_,o.default.drawTask(t,v,r),p.insert(v.x,v.y,v.x+v.width+r.taskMargin,450)}};e.default={setConf:l,draw:f}},"./src/diagrams/user-journey/parser/journey.jison":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,5],r=[6,9,11,17,18,19,21],i=[1,15],a=[1,16],o=[1,17],s=[1,21],c=[4,6,9,11,17,18,19,21],l={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,section:18,taskName:19,taskData:20,open_directive:21,type_directive:22,arg_directive:23,close_directive:24,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$="task";break;case 15:r.parseDirective("%%{","open_directive");break;case 16:r.parseDirective(a[s],"type_directive");break;case 17:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 18:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,21:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,21:n},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,19:o,21:n},{1:[2,2]},{14:19,15:[1,20],24:s},t([15,24],[2,16]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:18,10:22,12:4,17:i,18:a,19:o,21:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,12]),{20:[1,23]},t(r,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},t(r,[2,5]),t(r,[2,13]),t(c,[2,9]),{14:27,24:s},{24:[2,17]},{11:[1,28]},t(c,[2,10])],defaultActions:{5:[2,15],7:[2,2],21:[2,18],26:[2,17]},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="",c=0,l=0,u=2,h=1,d=a.slice.call(arguments,1),f=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);f.setInput(t,p.yy),p.yy.lexer=f,p.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var y=f.yylloc;a.push(y);var m=f.options&&f.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||f.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,w,x,k,C,T,E,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=v()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var O="";for(k in E=[],o[_])this.terminals_[k]&&k>u&&E.push("'"+this.terminals_[k]+"'");O=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:y,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(w[1]),b=null,l=f.yyleng,s=f.yytext,c=f.yylineno,y=f.yylloc;break;case 2:if(C=this.productions_[w[1]][1],S.$=i[i.length-C],S._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(S,[s,l,c,p.yy,w[1],i,a].concat(d))))return x;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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 this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:break;case 7:return 11;case 8:case 9:break;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function h(){this.yy={}}return l.lexer=u,h.prototype=l,l.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("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/user-journey/styles.js":function(t,e,n){n.r(e),e.default=function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n ").concat(t.faceColor?"fill: ".concat(t.faceColor):"fill: #FFF8DC",";\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n\n .actor-0 {\n ").concat(t.actor0?"fill: ".concat(t.actor0):"",";\n }\n .actor-1 {\n ").concat(t.actor1?"fill: ".concat(t.actor1):"",";\n }\n .actor-2 {\n ").concat(t.actor2?"fill: ".concat(t.actor2):"",";\n }\n .actor-3 {\n ").concat(t.actor3?"fill: ".concat(t.actor3):"",";\n }\n .actor-4 {\n ").concat(t.actor4?"fill: ".concat(t.actor4):"",";\n }\n .actor-5 {\n ").concat(t.actor5?"fill: ".concat(t.actor5):"",";\n }\n\n }\n")}},"./src/diagrams/user-journey/svgDraw.js":function(t,e,n){n.r(e),n.d(e,"drawRect",(function(){return i})),n.d(e,"drawFace",(function(){return a})),n.d(e,"drawCircle",(function(){return o})),n.d(e,"drawText",(function(){return s})),n.d(e,"drawLabel",(function(){return c})),n.d(e,"drawSection",(function(){return l})),n.d(e,"drawTask",(function(){return h})),n.d(e,"drawBackgroundRect",(function(){return d})),n.d(e,"getTextObj",(function(){return f})),n.d(e,"getNoteRect",(function(){return p}));var r=n("d3"),i=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},a=function(t,e){var n,i,a=15,o=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",a).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?(n=s,i=Object(r.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(a/2.2),n.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")):e.score<3?function(t){var n=Object(r.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(a/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(s):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(s),o},o=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),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},s=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("class","legend"),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},c=function(t,e){var n,r,i,a,o,c=t.append("polygon");c.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))),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,s(t,e)},l=function(t,e,n){var r=t.append("g"),a=p();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,i(r,a),g(n)(e.text,r,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},n,e.colour)},u=-1,h=function(t,e,n){var r=e.x+n.width/2,s=t.append("g");u++,s.append("line").attr("id","task"+u).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"),a(s,{cx:r,cy:300+30*(5-e.score),score:e.score});var c=p();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,i(s,c);var l=e.x+14;e.people.forEach((function(t){var n=e.actors[t].color,r={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};o(s,r),l+=10})),g(n)(e.task,s,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)},d=function(t,e){i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},f=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},p=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},g=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,l){for(var u=c.taskFontSize,h=c.taskFontFamily,d=t.split(/<br\s*\/?>/gi),f=0;f<d.length;f++){var p=f*u-u*(d.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",l).style("text-anchor","middle").style("font-size",u).style("font-family",h);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(d[f]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,l){var u=n.append("switch"),h=u.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,u,i,a,o,s,c,l),r(h,c)}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}}();e.default={drawRect:i,drawCircle:o,drawSection:l,drawText:s,drawLabel:c,drawTask:h,drawBackgroundRect:d,getTextObj:f,getNoteRect:p,initGraphics: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")}}},"./src/errorRenderer.js":function(t,e,n){n.r(e),n.d(e,"setConf",(function(){return o})),n.d(e,"draw",(function(){return s}));var r=n("d3"),i=n("./src/logger.js"),a={},o=function(t){Object.keys(t).forEach((function(e){a[e]=t[e]}))},s=function(t,e){try{i.log.debug("Renering svg for syntax error\n");var n=Object(r.select)("#"+t),a=n.append("g");a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),a.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(lX){i.log.error("Error while rendering info diagram"),i.log.error(lX.message)}};e.default={setConf:o,draw:s}},"./src/logger.js":function(t,e,n){n.r(e),n.d(e,"LEVELS",(function(){return a})),n.d(e,"log",(function(){return o})),n.d(e,"setLogLevel",(function(){return s}));var r=n("moment-mini"),i=n.n(r),a={debug:1,info:2,warn:3,error:4,fatal:5},o={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==a[t]&&(t=a[t])),o.trace=function(){},o.debug=function(){},o.info=function(){},o.warn=function(){},o.error=function(){},o.fatal=function(){},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"",c("FATAL"))),t<=a.error&&(o.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"",c("ERROR"))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"",c("WARN"))),t<=a.info&&(o.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"",c("INFO"))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"",c("DEBUG")))},c=function(t){var e=i()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")}},"./src/mermaid.js":function(t,e,n){n.r(e);var r=n("./src/logger.js"),i=n("./src/mermaidAPI.js"),a=n("./src/utils.js"),o=function(){s.startOnLoad?i.default.getConfig().startOnLoad&&s.init():void 0===s.startOnLoad&&(r.log.debug("In start, no config"),i.default.getConfig().startOnLoad&&s.init())};"undefined"!=typeof document&&
/*!
* Wait for document loaded before starting the execution
*/
window.addEventListener("load",(function(){o()}),!1);var s={startOnLoad:!0,htmlLabels:!0,mermaidAPI:i.default,parse:i.default.parse,render:i.default.render,init:function(){var t,e,n=this,o=i.default.getConfig();arguments.length>=2?(
/*! sequence config was passed as #1 */
void 0!==arguments[0]&&(s.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],r.log.debug("Callback function found")):void 0!==o.mermaid&&("function"==typeof o.mermaid.callback?(e=o.mermaid.callback,r.log.debug("Callback function found")):r.log.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,r.log.debug("Start On Load before: "+s.startOnLoad),void 0!==s.startOnLoad&&(r.log.debug("Start On Load inner: "+s.startOnLoad),i.default.updateSiteConfig({startOnLoad:s.startOnLoad})),void 0!==s.ganttConfig&&i.default.updateSiteConfig({gantt:s.ganttConfig});for(var c,l=new a.default.initIdGeneratior(o.deterministicIds,o.deterministicIDSeed),u=function(o){var s=t[o];
/*! Check if previously processed */if(s.getAttribute("data-processed"))return"continue";s.setAttribute("data-processed",!0);var u="mermaid-".concat(l.next());c=s.innerHTML,c=a.default.entityDecode(c).trim().replace(/<br\s*\/?>/gi,"<br/>");var h=a.default.detectInit(c);h&&r.log.debug("Detected early reinit: ",h);try{i.default.render(u,c,(function(t,n){s.innerHTML=t,void 0!==e&&e(u),n&&n(s)}),s)}catch(lX){r.log.warn("Syntax Error rendering"),r.log.warn(lX),n.parseError&&n.parseError(lX)}},h=0;h<t.length;h++)u(h)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(s.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(s.htmlLabels="false"!==t.mermaid.htmlLabels&&!1!==t.mermaid.htmlLabels)),i.default.initialize(t)},contentLoaded:o};e.default=s},"./src/mermaidAPI.js":function(t,e,n){n.r(e),n.d(e,"encodeEntities",(function(){return ot})),n.d(e,"decodeEntities",(function(){return st}));var r=n("d3"),i=n("stylis"),a=n("./package.json"),o=n("./src/config.js"),s=n("./src/diagrams/class/classDb.js"),c=n("./src/diagrams/class/classRenderer.js"),l=n("./src/diagrams/class/classRenderer-v2.js"),u=n("./src/diagrams/class/parser/classDiagram.jison"),h=n.n(u),d=n("./src/diagrams/er/erDb.js"),f=n("./src/diagrams/er/erRenderer.js"),p=n("./src/diagrams/er/parser/erDiagram.jison"),g=n.n(p),y=n("./src/diagrams/flowchart/flowDb.js"),m=n("./src/diagrams/flowchart/flowRenderer.js"),v=n("./src/diagrams/flowchart/flowRenderer-v2.js"),b=n("./src/diagrams/flowchart/parser/flow.jison"),_=n.n(b),w=n("./src/diagrams/gantt/ganttDb.js"),x=n("./src/diagrams/gantt/ganttRenderer.js"),k=n("./src/diagrams/gantt/parser/gantt.jison"),C=n.n(k),T=n("./src/diagrams/git/gitGraphAst.js"),E=n("./src/diagrams/git/gitGraphRenderer.js"),S=n("./src/diagrams/git/parser/gitGraph.jison"),O=n.n(S),A=n("./src/diagrams/info/infoDb.js"),M=n("./src/diagrams/info/infoRenderer.js"),D=n("./src/diagrams/info/parser/info.jison"),j=n.n(D),N=n("./src/diagrams/pie/parser/pie.jison"),B=n.n(N),L=n("./src/diagrams/pie/pieDb.js"),R=n("./src/diagrams/pie/pieRenderer.js"),I=n("./src/diagrams/requirement/parser/requirementDiagram.jison"),F=n.n(I),P=n("./src/diagrams/requirement/requirementDb.js"),Y=n("./src/diagrams/requirement/requirementRenderer.js"),z=n("./src/diagrams/sequence/parser/sequenceDiagram.jison"),U=n.n(z),$=n("./src/diagrams/sequence/sequenceDb.js"),W=n("./src/diagrams/sequence/sequenceRenderer.js"),q=n("./src/diagrams/state/parser/stateDiagram.jison"),H=n.n(q),V=n("./src/diagrams/state/stateDb.js"),G=n("./src/diagrams/state/stateRenderer.js"),X=n("./src/diagrams/state/stateRenderer-v2.js"),Z=n("./src/diagrams/user-journey/journeyDb.js"),Q=n("./src/diagrams/user-journey/journeyRenderer.js"),K=n("./src/diagrams/user-journey/parser/journey.jison"),J=n.n(K),tt=n("./src/errorRenderer.js"),et=n("./src/logger.js"),nt=n("./src/styles.js"),rt=n("./src/themes/index.js"),it=n("./src/utils.js");function at(t){return(at="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 ot=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+"¶ß"}))},st=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))},ct={},lt=function(t,e,n){switch(et.log.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),et.log.debug("sanitize in handleDirective",e.args),Object(it.directiveSanitizer)(e.args),et.log.debug("sanitize in handleDirective (done)",e.args),e.args,o.addDirective(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;default:et.log.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}};function ut(t){E.default.setConf(t.git),m.default.setConf(t.flowchart),v.default.setConf(t.flowchart),void 0!==t.sequenceDiagram&&W.default.setConf(Object(it.assignWithDepth)(t.sequence,t.sequenceDiagram)),W.default.setConf(t.sequence),x.default.setConf(t.gantt),c.default.setConf(t.class),G.default.setConf(t.state),X.default.setConf(t.state),M.default.setConf(t.class),f.default.setConf(t.er),Q.default.setConf(t.journey),Y.default.setConf(t.requirement),tt.default.setConf(t.class)}function ht(){}var dt=Object.freeze({render:function(t,e,n,u){o.reset();var h=e,d=it.default.detectInit(h);d&&o.addDirective(d);var p=o.getConfig();if(e.length>p.maxTextSize&&(h="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==u)u.innerHTML="",Object(r.select)(u).append("div").attr("id","d"+t).attr("style","font-family: "+p.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var g=document.getElementById(t);g&&g.remove();var b=document.querySelector("#d"+t);b&&b.remove(),Object(r.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=h,h=ot(h);var _=Object(r.select)("#d"+t).node(),k=it.default.detectType(h,p),C=_.firstChild,T=C.firstChild,S="";if(void 0!==p.themeCSS&&(S+="\n".concat(p.themeCSS)),void 0!==p.fontFamily&&(S+="\n:root { --mermaid-font-family: ".concat(p.fontFamily,"}")),void 0!==p.altFontFamily&&(S+="\n:root { --mermaid-alt-font-family: ".concat(p.altFontFamily,"}")),"flowchart"===k||"flowchart-v2"===k||"graph"===k){var O=m.default.getClasses(h),A=p.htmlLabels||p.flowchart.htmlLabels;for(var D in O)A?(S+="\n.".concat(D," > * { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," span { ").concat(O[D].styles.join(" !important; ")," !important; }")):(S+="\n.".concat(D," path { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," rect { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," polygon { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," ellipse { ").concat(O[D].styles.join(" !important; ")," !important; }"),S+="\n.".concat(D," circle { ").concat(O[D].styles.join(" !important; ")," !important; }"),O[D].textStyles&&(S+="\n.".concat(D," tspan { ").concat(O[D].textStyles.join(" !important; ")," !important; }")))}var j,N,B=(j="#".concat(t),N=Object(nt.default)(k,S,p.themeVariables),Object(i.serialize)(Object(i.compile)("".concat(j,"{").concat(N,"}")),i.stringify)),L=document.createElement("style");L.innerHTML="#".concat(t," ")+B,C.insertBefore(L,T);try{switch(k){case"git":p.flowchart.arrowMarkerAbsolute=p.arrowMarkerAbsolute,E.default.setConf(p.git),E.default.draw(h,t,!1);break;case"flowchart":p.flowchart.arrowMarkerAbsolute=p.arrowMarkerAbsolute,m.default.setConf(p.flowchart),m.default.draw(h,t,!1);break;case"flowchart-v2":p.flowchart.arrowMarkerAbsolute=p.arrowMarkerAbsolute,v.default.setConf(p.flowchart),v.default.draw(h,t,!1);break;case"sequence":p.sequence.arrowMarkerAbsolute=p.arrowMarkerAbsolute,p.sequenceDiagram?(W.default.setConf(Object.assign(p.sequence,p.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):W.default.setConf(p.sequence),W.default.draw(h,t);break;case"gantt":p.gantt.arrowMarkerAbsolute=p.arrowMarkerAbsolute,x.default.setConf(p.gantt),x.default.draw(h,t);break;case"class":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,c.default.setConf(p.class),c.default.draw(h,t);break;case"classDiagram":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,l.default.setConf(p.class),l.default.draw(h,t);break;case"state":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,G.default.setConf(p.state),G.default.draw(h,t);break;case"stateDiagram":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,X.default.setConf(p.state),X.default.draw(h,t);break;case"info":p.class.arrowMarkerAbsolute=p.arrowMarkerAbsolute,M.default.setConf(p.class),M.default.draw(h,t,a.version);break;case"pie":R.default.draw(h,t,a.version);break;case"er":f.default.setConf(p.er),f.default.draw(h,t,a.version);break;case"journey":Q.default.setConf(p.journey),Q.default.draw(h,t,a.version);break;case"requirement":Y.default.setConf(p.requirement),Y.default.draw(h,t,a.version)}}catch(lX){throw tt.default.draw(t,a.version),lX}Object(r.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var I=Object(r.select)("#d"+t).node().innerHTML;if(et.log.debug("cnf.arrowMarkerAbsolute",p.arrowMarkerAbsolute),p.arrowMarkerAbsolute&&"false"!==p.arrowMarkerAbsolute||(I=I.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),I=(I=st(I)).replace(/<br>/g,"<br/>"),void 0!==n)switch(k){case"flowchart":case"flowchart-v2":n(I,y.default.bindFunctions);break;case"gantt":n(I,w.default.bindFunctions);break;case"class":case"classDiagram":n(I,s.default.bindFunctions);break;default:n(I)}else et.log.debug("CB = undefined!");var F=Object(r.select)("#d"+t).node();return null!==F&&"function"==typeof F.remove&&Object(r.select)("#d"+t).node().remove(),I},parse:function(t){var e=o.getConfig(),n=it.default.detectInit(t,e);n&&et.log.debug("reinit ",n);var r,i=it.default.detectType(t,e);switch(et.log.debug("Type "+i),i){case"git":(r=O.a).parser.yy=T.default;break;case"flowchart":case"flowchart-v2":y.default.clear(),(r=_.a).parser.yy=y.default;break;case"sequence":(r=U.a).parser.yy=$.default;break;case"gantt":(r=C.a).parser.yy=w.default;break;case"class":case"classDiagram":(r=h.a).parser.yy=s.default;break;case"state":case"stateDiagram":(r=H.a).parser.yy=V.default;break;case"info":et.log.debug("info info info"),(r=j.a).parser.yy=A.default;break;case"pie":et.log.debug("pie"),(r=B.a).parser.yy=L.default;break;case"er":et.log.debug("er"),(r=g.a).parser.yy=d.default;break;case"journey":et.log.debug("Journey"),(r=J.a).parser.yy=Z.default;break;case"requirement":case"requirementDiagram":et.log.debug("RequirementDiagram"),(r=F.a).parser.yy=P.default}return r.parser.yy.graphType=i,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":ct={};break;case"type_directive":ct.type=e.toLowerCase();break;case"arg_directive":ct.args=JSON.parse(e);break;case"close_directive":lt(t,ct,r),ct=null}}catch(i){et.log.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),et.log.error(i.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),o.saveConfigFromInitilize(t),t&&t.theme&&rt.default[t.theme]?t.themeVariables=rt.default[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=rt.default.default.getThemeVariables(t.themeVariables));var e="object"===at(t)?o.setSiteConfig(t):o.getSiteConfig();ut(e),Object(et.setLogLevel)(e.logLevel)},reinitialize:ht,getConfig:o.getConfig,setConfig:o.setConfig,getSiteConfig:o.getSiteConfig,updateSiteConfig:o.updateSiteConfig,reset:function(){o.reset()},globalReset:function(){o.reset(o.defaultConfig),ut(o.getConfig())},defaultConfig:o.defaultConfig});Object(et.setLogLevel)(o.getConfig().logLevel),o.reset(o.getConfig()),e.default=dt},"./src/styles.js":function(t,e,n){n.r(e),n.d(e,"calcThemeVariables",(function(){return g}));var r=n("./src/diagrams/class/styles.js"),i=n("./src/diagrams/er/styles.js"),a=n("./src/diagrams/flowchart/styles.js"),o=n("./src/diagrams/gantt/styles.js"),s=n("./src/diagrams/git/styles.js"),c=n("./src/diagrams/info/styles.js"),l=n("./src/diagrams/pie/styles.js"),u=n("./src/diagrams/requirement/styles.js"),h=n("./src/diagrams/sequence/styles.js"),d=n("./src/diagrams/state/styles.js"),f=n("./src/diagrams/user-journey/styles.js"),p={flowchart:a.default,"flowchart-v2":a.default,sequence:h.default,gantt:o.default,classDiagram:r.default,"classDiagram-v2":r.default,class:r.default,stateDiagram:d.default,state:d.default,git:s.default,info:c.default,pie:l.default,er:i.default,journey:f.default,requirement:u.default},g=function(t,e){return t.calcColors(e)};e.default=function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(p[t](n),"\n\n ").concat(e,"\n")}},"./src/themes/index.js":function(t,e,n){n.r(e);var r=n("./src/themes/theme-base.js"),i=n("./src/themes/theme-dark.js"),a=n("./src/themes/theme-default.js"),o=n("./src/themes/theme-forest.js"),s=n("./src/themes/theme-neutral.js");e.default={base:{getThemeVariables:r.getThemeVariables},dark:{getThemeVariables:i.getThemeVariables},default:{getThemeVariables:a.getThemeVariables},forest:{getThemeVariables:o.getThemeVariables},neutral:{getThemeVariables:s.getThemeVariables}}},"./src/themes/theme-base.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#ddd":"#333"),this.secondaryColor=this.secondaryColor||Object(r.adjust)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Object(r.adjust)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Object(i.mkBorder)(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Object(r.invert)(this.tertiaryColor),this.lineColor=this.lineColor||Object(r.invert)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Object(r.darken)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Object(r.darken)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Object(r.invert)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Object(r.lighten)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(r.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(r.adjust)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Object(r.adjust)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Object(r.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(r.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(r.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(r.adjust)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Object(r.adjust)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Object(r.adjust)(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(r.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-dark.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Object(r.lighten)(this.primaryColor,16),this.tertiaryColor=Object(r.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(r.invert)(this.primaryColor),this.secondaryTextColor=Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=Object(r.invert)(this.tertiaryColor),this.lineColor=Object(r.invert)(this.background),this.textColor=Object(r.invert)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Object(r.lighten)(Object(r.invert)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Object(r.rgba)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Object(r.darken)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Object(r.rgba)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Object(r.rgba)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(r.lighten)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Object(r.lighten)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Object(r.lighten)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#0b0000",this.pie2=this.pie2||"#4d1037",this.pie3=this.pie3||"#3f5258",this.pie4=this.pie4||"#4f2f1b",this.pie5=this.pie5||"#6e0a0a",this.pie6=this.pie6||"#3b0048",this.pie7=this.pie7||"#995a01",this.pie8=this.pie8||"#154706",this.pie9=this.pie9||"#161722",this.pie10=this.pie10||"#00296f",this.pie11=this.pie11||"#01629c",this.pie12=this.pie12||"#010029",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(r.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-default.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Object(r.adjust)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Object(r.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(r.invert)(this.primaryColor),this.secondaryTextColor=Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=Object(r.invert)(this.tertiaryColor),this.lineColor=Object(r.invert)(this.background),this.textColor=Object(r.invert)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Object(r.rgba)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Object(r.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Object(r.adjust)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Object(r.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(r.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(r.adjust)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Object(r.adjust)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Object(r.adjust)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Object(r.adjust)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Object(r.adjust)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Object(r.adjust)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Object(r.adjust)(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-forest.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Object(r.lighten)("#cde498",10),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(r.invert)(this.primaryColor),this.secondaryTextColor=Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=Object(r.invert)(this.primaryColor),this.lineColor=Object(r.invert)(this.background),this.textColor=Object(r.invert)(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Object(r.darken)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(r.adjust)(this.primaryColor,{l:-30}),this.pie5=this.pie5||Object(r.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(r.adjust)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Object(r.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(r.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(r.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(r.adjust)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Object(r.adjust)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Object(r.adjust)(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/themes/theme-helpers.js":function(t,e,n){n.r(e),n.d(e,"mkBorder",(function(){return i}));var r=n("khroma"),i=function(t,e){return e?Object(r.adjust)(t,{s:-40,l:10}):Object(r.adjust)(t,{s:-40,l:-10})}},"./src/themes/theme-neutral.js":function(t,e,n){n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Object(r.lighten)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Object(r.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=Object(i.mkBorder)(this.primaryColor,this.darkMode),this.secondaryBorderColor=Object(i.mkBorder)(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Object(i.mkBorder)(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(r.invert)(this.primaryColor),this.secondaryTextColor=Object(r.invert)(this.secondaryColor),this.tertiaryTextColor=Object(r.invert)(this.tertiaryColor),this.lineColor=Object(r.invert)(this.background),this.textColor=Object(r.invert)(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,s;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(r.lighten)(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=Object(r.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=Object(r.lighten)(this.contrast,30),this.sectionBkgColor2=Object(r.lighten)(this.contrast,30),this.taskBorderColor=Object(r.darken)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Object(r.lighten)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Object(r.darken)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(r.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(r.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(r.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(r.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(r.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(r.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#F4F4F4",this.pie2=this.pie2||"#555",this.pie3=this.pie3||"#BBB",this.pie4=this.pie4||"#777",this.pie5=this.pie5||"#999",this.pie6=this.pie6||"#DDD",this.pie7=this.pie7||"#FFF",this.pie8=this.pie8||"#DDD",this.pie9=this.pie9||"#BBB",this.pie10=this.pie10||"#999",this.pie11=this.pie11||"#777",this.pie12=this.pie12||"#555",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===a(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&o(e.prototype,n),s&&o(e,s),t}(),c=function(t){var e=new s;return e.calculate(t),e}},"./src/utils.js":function(t,e,n){n.r(e),n.d(e,"detectInit",(function(){return _})),n.d(e,"detectDirective",(function(){return w})),n.d(e,"detectType",(function(){return x})),n.d(e,"isSubstringInArray",(function(){return C})),n.d(e,"interpolateToCurve",(function(){return T})),n.d(e,"formatUrl",(function(){return E})),n.d(e,"runFunc",(function(){return S})),n.d(e,"getStylesFromArray",(function(){return A})),n.d(e,"generateId",(function(){return D})),n.d(e,"random",(function(){return j})),n.d(e,"assignWithDepth",(function(){return N})),n.d(e,"getTextObj",(function(){return B})),n.d(e,"drawSimpleText",(function(){return L})),n.d(e,"wrapLabel",(function(){return R})),n.d(e,"calculateTextHeight",(function(){return F})),n.d(e,"calculateTextWidth",(function(){return P})),n.d(e,"calculateTextDimensions",(function(){return Y})),n.d(e,"calculateSvgSizeAttrs",(function(){return z})),n.d(e,"configureSvgSize",(function(){return U})),n.d(e,"initIdGeneratior",(function(){return $})),n.d(e,"entityDecode",(function(){return W})),n.d(e,"directiveSanitizer",(function(){return q}));var r=n("@braintree/sanitize-url"),i=n("d3"),a=n("./src/diagrams/common/common.js"),o=n("./src/defaultConfig.js"),s=n("./src/logger.js"),c=void 0;function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=f(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var g,y={curveBasis:i.curveBasis,curveBasisClosed:i.curveBasisClosed,curveBasisOpen:i.curveBasisOpen,curveLinear:i.curveLinear,curveLinearClosed:i.curveLinearClosed,curveMonotoneX:i.curveMonotoneX,curveMonotoneY:i.curveMonotoneY,curveNatural:i.curveNatural,curveStep:i.curveStep,curveStepAfter:i.curveStepAfter,curveStepBefore:i.curveStepBefore},m=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,v=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,b=/\s*%%.*\n/gm,_=function(t,e){var n=w(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));q(i),r=N(r,d(i))}else r=n.args;if(r){var a=x(t,e);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===a&&(a="flowchart"),r[a]=r[t],delete r[t])}))}return r},w=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(v.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),s.log.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=m.exec(t));)if(r.index===m.lastIndex&&m.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],o=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:o})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(c){return s.log.error("ERROR: ".concat(c.message," - Unable to parse directive\n ").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},x=function(t,e){return(t=t.replace(m,"").replace(b,"\n")).match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?e&&e.class&&"dagre-wrapper"===e.class.defaultRenderer?"classDiagram":"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?e&&e.class&&"dagre-wrapper"===e.state.defaultRenderer?"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":t.match(/^\s*requirement/)||t.match(/^\s*requirementDiagram/)?"requirement":e&&e.flowchart&&"dagre-wrapper"===e.flowchart.defaultRenderer?"flowchart-v2":"flowchart"},k=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(c,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},C=function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},T=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return y[n]||e},E=function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(r.sanitizeUrl)(n):n},S=function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),l=1;l<s;l++)c[l-1]=arguments[l];(e=a)[i].apply(e,c)},O=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},A=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,D=function(){return M++,"id-"+Math.random().toString(36).substr(2,12)+"-"+M},j=function(t){return function(t){for(var e="",n="0123456789abcdef",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}(t.length)},N=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===h(e)&&"object"===h(n)?Object.assign(e,n):n:(void 0!==n&&"object"===h(e)&&"object"===h(n)&&Object.keys(n).forEach((function(r){"object"!==h(n[r])||void 0!==e[r]&&"object"!==h(e[r])?(o||"object"!==h(e[r])&&"object"!==h(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},B=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},L=function(t,e){var n=e.text.replace(a.default.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),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},R=k((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),a.default.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],o="";return r.forEach((function(t,a){var s=P("".concat(t," "),n),c=P(o,n);if(s>e){var l=I(t,e,"-",n),u=l.hyphenatedStrings,h=l.remainingWord;i.push.apply(i,[o].concat(d(u))),o=h}else c+s>=e?(i.push(o),o=t):o=[o,t].filter(Boolean).join(" ");a+1===r.length&&i.push(o)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),I=k((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(P(c,r)>=e){var l=s+1,u=i.length===l,h="".concat(c).concat(n);a.push(u?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),F=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),Y(t,e).height},P=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),Y(t,e).width},Y=k((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,o=n.fontFamily,s=n.fontWeight;if(!t)return{width:0,height:0};var c=["sans-serif",o],l=t.split(a.default.lineBreakRegex),h=[],d=Object(i.select)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};for(var f=d.append("svg"),p=0,g=c;p<g.length;p++){var y,m=g[p],v=0,b={width:0,height:0,lineHeight:0},_=u(l);try{for(_.s();!(y=_.n()).done;){var w=y.value,x=B();x.text=w;var k=L(f,x).style("font-size",r).style("font-weight",s).style("font-family",m),C=(k._groups||k)[0][0].getBBox();b.width=Math.round(Math.max(b.width,C.width)),v=Math.round(C.height),b.height+=v,b.lineHeight=Math.round(Math.max(b.lineHeight,v))}}catch(T){_.e(T)}finally{_.f()}h.push(b)}return f.remove(),h[isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),z=function(t,e,n){var r=new Map;return r.set("height",t),n?(r.set("width","100%"),r.set("style","max-width: ".concat(e,"px;"))):r.set("width",e),r},U=function(t,e,n,r){!function(t,e){var n,r=u(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.attr(i[0],i[1])}}catch(a){r.e(a)}finally{r.f()}}(t,z(e,n,r))},$=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0}var e,n,r;return e=t,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&l(e.prototype,n),r&&l(e,r),t}(),W=function(t){return g=g||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),g.innerHTML=t,unescape(g.textContent)},q=function t(e){s.log.debug("directiveSanitizer called with",e),"object"===h(e)&&(e.length?e.forEach((function(e){return t(e)})):Object.keys(e).forEach((function(n){s.log.debug("Checking key",n),0===n.indexOf("__")&&(s.log.debug("sanitize deleting __ option",n),delete e[n]),n.indexOf("proto")>=0&&(s.log.debug("sanitize deleting proto option",n),delete e[n]),n.indexOf("constr")>=0&&(s.log.debug("sanitize deleting constr option",n),delete e[n]),o.configKeys.indexOf(n)<0?(s.log.debug("sanitize deleting option",n),delete e[n]):"object"===h(e[n])&&(s.log.debug("sanitize deleting object",n),t(e[n]))})))};e.default={assignWithDepth:N,wrapLabel:R,calculateTextHeight:F,calculateTextWidth:P,calculateTextDimensions:Y,calculateSvgSizeAttrs:z,configureSvgSize:U,detectInit:_,detectDirective:w,detectType:x,isSubstringInArray:C,interpolateToCurve:T,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=O(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=O(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;s.log.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){O(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=O(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,c=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(c)*o+(e[0].x+i.x)/2,l.y=-Math.cos(c)*o+(e[0].y+i.y)/2,l},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));s.log.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((function(t){O(t,r),r=t}));var a,o=25;r=void 0,i.forEach((function(t){if(r&&!a){var e=O(t,r);if(e<o)o-=e;else{var n=o/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var c=10,l=Math.atan2(i[0].y-a.y,i[0].x-a.x),u={x:0,y:0};return u.x=Math.sin(l)*c+(i[0].x+a.x)/2,u.y=-Math.cos(l)*c+(i[0].y+a.y)/2,"start_left"===e&&(u.x=Math.sin(l+Math.PI)*c+(i[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*c+(i[0].y+a.y)/2),"end_right"===e&&(u.x=Math.sin(l-Math.PI)*c+(i[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*c+(i[0].y+a.y)/2-5),"end_left"===e&&(u.x=Math.sin(l)*c+(i[0].x+a.x)/2-5,u.y=-Math.cos(l)*c+(i[0].y+a.y)/2-5),u},formatUrl:E,getStylesFromArray:A,generateId:D,random:j,memoize:k,runFunc:S,entityDecode:W,initIdGeneratior:$,directiveSanitizer:q}},"@braintree/sanitize-url":function(t,e){t.exports=Ea},d3:function(t,e){t.exports=dS},dagre:function(t,e){t.exports=I$},"dagre-d3":function(t,e){t.exports=nq},"dagre-d3/lib/label/add-html-label.js":function(t,e){t.exports=aW},dompurify:function(t,e){t.exports=Kq},graphlib:function(t,e){t.exports=hF},khroma:function(t,e){t.exports=Jq},"moment-mini":function(t,e){t.exports=eX.exports},stylis:function(t,e){t.exports=nX.exports}}).default;var rX={},iX={};!function(t){var e=va&&va.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.getWordsByCategory=t.wordList=void 0,t.wordList={noun:[{word:"accountant",categories:["profession"]},{word:"actor",categories:["profession"]},{word:"advertisement",categories:["media"]},{word:"afternoon",categories:["time"]},{word:"airport",categories:["transportation"]},{word:"alligator",categories:["animals"]},{word:"ambulance",categories:["health"]},{word:"animal",categories:["animals"]},{word:"answer",categories:["thing"]},{word:"apple",categories:["food"]},{word:"architect",categories:["profession"]},{word:"army",categories:["thing"]},{word:"artist",categories:["profession"]},{word:"australia",categories:["place"]},{word:"author",categories:["profession"]},{word:"autumn",categories:["time"]},{word:"baby",categories:["people","family"]},{word:"baker",categories:["profession"]},{word:"balloon",categories:["thing"]},{word:"banana",categories:["food"]},{word:"barista",categories:["profession"]},{word:"battery",categories:["thing"]},{word:"beach",categories:["place"]},{word:"bear",categories:["animals"]},{word:"beard",categories:["thing"]},{word:"bed",categories:["thing"]},{word:"belgium",categories:["place"]},{word:"bird",categories:["animals"]},{word:"bit",categories:["thing","technology"]},{word:"book",categories:["thing","education"]},{word:"boots",categories:["thing"]},{word:"boy",categories:["people"]},{word:"branch",categories:["thing"]},{word:"breakfast",categories:["thing"]},{word:"brother",categories:["family"]},{word:"businessperson",categories:["people","business"]},{word:"butcher",categories:["profession"]},{word:"byte",categories:["thing","technology"]},{word:"camera",categories:["thing"]},{word:"candle",categories:["thing"]},{word:"car",categories:["transportation"]},{word:"caravan",categories:["transportation"]},{word:"carpenter",categories:["profession"]},{word:"carpet",categories:["thing"]},{word:"cartoon",categories:["media"]},{word:"cat",categories:["animals"]},{word:"chef",categories:["profession"]},{word:"child",categories:["people","family"]},{word:"china",categories:["place"]},{word:"church",categories:["religion"]},{word:"city",categories:["place"]},{word:"coat",categories:["thing"]},{word:"coffeeshop",categories:["place"]},{word:"computer",categories:["thing","technology"]},{word:"continent",categories:["place"]},{word:"controller",categories:["thing","technology"]},{word:"country",categories:["place"]},{word:"cpu",categories:["thing","technology"]},{word:"crayon",categories:["thing"]},{word:"cricket",categories:["animals"]},{word:"crowd",categories:["people"]},{word:"daughter",categories:["family"]},{word:"dawn",categories:["time"]},{word:"daybreak",categories:["time"]},{word:"death",categories:["thing"]},{word:"denmark",categories:["place"]},{word:"dentist",categories:["profession"]},{word:"diamond",categories:["thing"]},{word:"dinner",categories:["food"]},{word:"disease",categories:["thing"]},{word:"doctor",categories:["profession"]},{word:"dog",categories:["animals"]},{word:"dream",categories:["thing"]},{word:"dress",categories:["thing"]},{word:"dusk",categories:["time"]},{word:"easter",categories:["religion"]},{word:"egg",categories:["food"]},{word:"eggplant",categories:["food"]},{word:"egypt",categories:["place"]},{word:"electrician",categories:["profession"]},{word:"elephant",categories:["animals"]},{word:"energy",categories:["thing"]},{word:"engine",categories:["transportation"]},{word:"engineer",categories:["profession"]},{word:"england",categories:["place"]},{word:"eve",categories:["time"]},{word:"evening",categories:["time"]},{word:"eventide",categories:["time"]},{word:"exabyte",categories:["thing","technology"]},{word:"eye",categories:["thing"]},{word:"fall",categories:["time"]},{word:"family",categories:["family"]},{word:"farmer",categories:["profession"]},{word:"father",categories:["people","family"]},{word:"finland",categories:["place"]},{word:"fireman",categories:["profession"]},{word:"fish",categories:["animals"]},{word:"flag",categories:["thing"]},{word:"florist",categories:["profession"]},{word:"flower",categories:["thing"]},{word:"football",categories:["sports"]},{word:"forest",categories:["place"]},{word:"fountain",categories:["thing"]},{word:"france",categories:["place"]},{word:"furniture",categories:["thing"]},{word:"garage",categories:["place"]},{word:"garden",categories:["food"]},{word:"gas",categories:["transportation"]},{word:"ghost",categories:["thing"]},{word:"gigabyte",categories:["thing","technology"]},{word:"girl",categories:["people"]},{word:"glass",categories:["thing"]},{word:"gold",categories:["thing"]},{word:"gpu",categories:["thing","technology"]},{word:"grandmother",categories:["people","family"]},{word:"grass",categories:["thing"]},{word:"greece",categories:["place"]},{word:"guitar",categories:["thing"]},{word:"hair",categories:["thing"]},{word:"hairdresser",categories:["profession"]},{word:"hamburger",categories:["food"]},{word:"helicopter",categories:["transportation"]},{word:"helmet",categories:["thing"]},{word:"holiday",categories:["thing"]},{word:"honey",categories:["food"]},{word:"horse",categories:["animals"]},{word:"hospital",categories:["place"]},{word:"house",categories:["place"]},{word:"hydrogen",categories:["science"]},{word:"ice",categories:["science"]},{word:"insect",categories:["animals"]},{word:"insurance",categories:["thing"]},{word:"intern",categories:["profession"]},{word:"iron",categories:["science"]},{word:"island",categories:["place"]},{word:"jackal",categories:["animals"]},{word:"jelly",categories:["food"]},{word:"jewellery",categories:["thing"]},{word:"jordan",categories:["place"]},{word:"journalist",categories:["profession"]},{word:"joystick",categories:["thing","technology"]},{word:"judge",categories:["profession"]},{word:"juice",categories:["food"]},{word:"kangaroo",categories:["animals"]},{word:"keyboard",categories:["thing","technology"]},{word:"kilobyte",categories:["thing","technology"]},{word:"king",categories:["people"]},{word:"kitchen",categories:["place"]},{word:"kite",categories:["thing"]},{word:"knife",categories:["thing"]},{word:"lamp",categories:["thing"]},{word:"laptop",categories:["thing","technology"]},{word:"lawyer",categories:["profession"]},{word:"leather",categories:["thing"]},{word:"librarian",categories:["profession"]},{word:"library",categories:["place"]},{word:"lifeguard",categories:["profession"]},{word:"lighter",categories:["thing"]},{word:"lion",categories:["animals"]},{word:"lizard",categories:["animals"]},{word:"lock",categories:["thing"]},{word:"london",categories:["place"]},{word:"lunch",categories:["food"]},{word:"machine",categories:["science"]},{word:"magazine",categories:["media"]},{word:"magician",categories:["people"]},{word:"man",categories:["people"]},{word:"manchester",categories:["place"]},{word:"market",categories:["place"]},{word:"match",categories:["thing"]},{word:"mechanic",categories:["profession"]},{word:"megabyte",categories:["thing","technology"]},{word:"memory",categories:["thing","technology"]},{word:"microphone",categories:["thing"]},{word:"midnight",categories:["time"]},{word:"minister",categories:["people","religion"]},{word:"monitor",categories:["thing","technology"]},{word:"monkey",categories:["animals"]},{word:"morn",categories:["time"]},{word:"morning",categories:["time"]},{word:"mother",categories:["people","family"]},{word:"motherboard",categories:["thing","technology"]},{word:"motorcycle",categories:["transportation"]},{word:"mouse",categories:["thing","technology","animal"]},{word:"musician",categories:["profession"]},{word:"nail",categories:["thing"]},{word:"napkin",categories:["thing"]},{word:"needle",categories:["thing"]},{word:"nest",categories:["thing"]},{word:"nigeria",categories:["place"]},{word:"night",categories:["time"]},{word:"nightfall",categories:["time"]},{word:"noon",categories:["time"]},{word:"notebook",categories:["thing"]},{word:"nurse",categories:["profession"]},{word:"ocean",categories:["place"]},{word:"oil",categories:["thing"]},{word:"optician",categories:["profession"]},{word:"orange",categories:["food"]},{word:"oxygen",categories:["science"]},{word:"oyster",categories:["animals"]},{word:"pager",categories:["thing","technology"]},{word:"painter",categories:["profession"]},{word:"painting",categories:["media"]},{word:"park",categories:["place"]},{word:"parrot",categories:["animals"]},{word:"pencil",categories:["thing","education"]},{word:"petabyte",categories:["thing","technology"]},{word:"pharmacist",categories:["profession"]},{word:"photographer",categories:["profession"]},{word:"piano",categories:["thing"]},{word:"pillow",categories:["thing"]},{word:"pilot",categories:["profession"]},{word:"pizza",categories:["food"]},{word:"planet",categories:["science"]},{word:"plastic",categories:["thing"]},{word:"plumber",categories:["profession"]},{word:"policeman",categories:["profession"]},{word:"portugal",categories:["place"]},{word:"postman",categories:["profession"]},{word:"potato",categories:["food"]},{word:"printer",categories:["thing","technology"]},{word:"processor",categories:["thing","technology"]},{word:"psychiatrist",categories:["profession"]},{word:"queen",categories:["people"]},{word:"quill",categories:["thing"]},{word:"rain",categories:["thing"]},{word:"rainbow",categories:["science"]},{word:"raincoat",categories:["thing"]},{word:"ram",categories:["thing","technology"]},{word:"receptionist",categories:["profession"]},{word:"refrigerator",categories:["food"]},{word:"restaurant",categories:["place"]},{word:"river",categories:["thing"]},{word:"rocket",categories:["science"]},{word:"room",categories:["place"]},{word:"rose",categories:["thing"]},{word:"russia",categories:["place"]},{word:"salesclerk",categories:["people","business"]},{word:"salesmen",categories:["profession"]},{word:"sandwich",categories:["food"]},{word:"school",categories:["education"]},{word:"scientist",categories:["profession"]},{word:"scooter",categories:["transportation"]},{word:"secretary",categories:["profession"]},{word:"shampoo",categories:["thing"]},{word:"shoe",categories:["thing"]},{word:"smartphone",categories:["thing","technology"]},{word:"soccer",categories:["sports"]},{word:"solstice",categories:["time"]},{word:"spoon",categories:["thing"]},{word:"spring",categories:["time"]},{word:"state",categories:["place"]},{word:"stone",categories:["thing"]},{word:"student",categories:["people","education"]},{word:"sugar",categories:["food"]},{word:"summer",categories:["time"]},{word:"sundown",categories:["time"]},{word:"sunset",categories:["time"]},{word:"sweden",categories:["place"]},{word:"table",categories:["thing"]},{word:"tailor",categories:["profession"]},{word:"teacher",categories:["people","education","profession"]},{word:"teenager",categories:["people","family"]},{word:"telephone",categories:["thing"]},{word:"television",categories:["media"]},{word:"tent",categories:["thing"]},{word:"terabyte",categories:["thing","technology"]},{word:"thailand",categories:["place"]},{word:"tiger",categories:["animals"]},{word:"toddler",categories:["people","family"]},{word:"tomato",categories:["food"]},{word:"toothbrush",categories:["thing"]},{word:"traffic",categories:["thing"]},{word:"train",categories:["transportation"]},{word:"translator",categories:["profession"]},{word:"truck",categories:["thing","transportation"]},{word:"twilight",categories:["time"]},{word:"uganda",categories:["place"]},{word:"umbrella",categories:["thing"]},{word:"van",categories:["transportation"]},{word:"vase",categories:["thing"]},{word:"vegetable",categories:["food"]},{word:"vr",categories:["thing","technology"]},{word:"vulture",categories:["animals"]},{word:"waiter",categories:["profession"]},{word:"waitress",categories:["profession"]},{word:"wall",categories:["thing"]},{word:"whale",categories:["animals"]},{word:"window",categories:["thing"]},{word:"winter",categories:["time"]},{word:"wire",categories:["thing"]},{word:"wolf",categories:["animals"]},{word:"woman",categories:["people"]},{word:"xylophone",categories:["thing"]},{word:"yacht",categories:["transportation"]},{word:"yak",categories:["animals"]},{word:"yottabyte",categories:["thing","technology"]},{word:"zebra",categories:["animals"]},{word:"zettabyte",categories:["thing","technology"]},{word:"zoo",categories:["animals"]}],adjective:[{word:"abundant",categories:["quantity"]},{word:"acidic",categories:["taste"]},{word:"aggressive",categories:["personality"]},{word:"agreeable",categories:["personality"]},{word:"alive",categories:["condition"]},{word:"ambitious",categories:["personality"]},{word:"ancient",categories:["time"]},{word:"angry",categories:["personality"]},{word:"attractive",categories:["appearance"]},{word:"bald",categories:["appearance"]},{word:"beautiful",categories:["appearance"]},{word:"better",categories:["condition"]},{word:"bewildered",categories:["personality"]},{word:"big",categories:["size"]},{word:"billions",categories:["quantity"]},{word:"bitter",categories:["taste"]},{word:"black",categories:["color"]},{word:"blue",categories:["color"]},{word:"brave",categories:["personality"]},{word:"breezy",categories:["touch"]},{word:"brief",categories:["time"]},{word:"broad",categories:["shapes"]},{word:"bumpy",categories:["touch"]},{word:"calm",categories:["personality"]},{word:"careful",categories:["condition"]},{word:"chilly",categories:["touch"]},{word:"chubby",categories:["appearance"]},{word:"clean",categories:["appearance"]},{word:"clever",categories:["condition"]},{word:"clumsy",categories:["personality"]},{word:"cold",categories:["touch"]},{word:"colossal",categories:["size"]},{word:"cool",categories:["touch"]},{word:"crashing",categories:["sounds"]},{word:"creamy",categories:["taste"]},{word:"crooked",categories:["shapes"]},{word:"cuddly",categories:["touch"]},{word:"curved",categories:["shapes"]},{word:"damaged",categories:["touch"]},{word:"damp",categories:["touch"]},{word:"dazzling",categories:["appearance"]},{word:"dead",categories:["condition"]},{word:"deafening",categories:["sounds"]},{word:"deep",categories:["shapes"]},{word:"defeated",categories:["personality"]},{word:"delicious",categories:["taste"]},{word:"delightful",categories:["personality"]},{word:"dirty",categories:["touch"]},{word:"disgusting",categories:["taste"]},{word:"drab",categories:["appearance"]},{word:"dry",categories:["touch"]},{word:"eager",categories:["personality"]},{word:"early",categories:["time"]},{word:"easy",categories:["condition"]},{word:"echoing",categories:["sounds"]},{word:"elegant",categories:["appearance"]},{word:"embarrassed",categories:["personality"]},{word:"enough",categories:["quantity"]},{word:"faint",categories:["sounds"]},{word:"faithful",categories:["personality"]},{word:"famous",categories:["condition"]},{word:"fancy",categories:["appearance"]},{word:"fast",categories:["time"]},{word:"fat",categories:["size"]},{word:"few",categories:["quantity"]},{word:"fierce",categories:["personality"]},{word:"fit",categories:["appearance"]},{word:"flabby",categories:["appearance"]},{word:"flaky",categories:["touch"]},{word:"flat",categories:["shapes"]},{word:"fluffy",categories:["touch"]},{word:"freezing",categories:["touch"]},{word:"fresh",categories:["taste"]},{word:"full",categories:["quantity"]},{word:"future",categories:["time"]},{word:"gentle",categories:["personality"]},{word:"gifted",categories:["condition"]},{word:"gigantic",categories:["size"]},{word:"glamorous",categories:["appearance"]},{word:"gorgeous",categories:["appearance"]},{word:"gray",categories:["color"]},{word:"greasy",categories:["touch","taste"]},{word:"great",categories:["size"]},{word:"green",categories:["color"]},{word:"grumpy",categories:["personality"]},{word:"hallowed",categories:["condition"]},{word:"handsome",categories:["appearance"]},{word:"happy",categories:["personality"]},{word:"harsh",categories:["sounds"]},{word:"helpful",categories:["condition"]},{word:"helpless",categories:["personality"]},{word:"high",categories:["shapes"]},{word:"hissing",categories:["sounds"]},{word:"hollow",categories:["shapes"]},{word:"hot",categories:["touch","taste"]},{word:"howling",categories:["sounds"]},{word:"huge",categories:["size"]},{word:"hundreds",categories:["quantity"]},{word:"icy",categories:["touch"]},{word:"immense",categories:["size"]},{word:"important",categories:["condition"]},{word:"incalculable",categories:["quantity"]},{word:"inexpensive",categories:["condition"]},{word:"itchy",categories:["personality"]},{word:"jealous",categories:["personality"]},{word:"jolly",categories:["personality"]},{word:"juicy",categories:["taste"]},{word:"kind",categories:["personality"]},{word:"large",categories:["size"]},{word:"late",categories:["time"]},{word:"lazy",categories:["personality"]},{word:"lemon",categories:["color"]},{word:"limited",categories:["quantity"]},{word:"little",categories:["size","quantity"]},{word:"lively",categories:["personality"]},{word:"long",categories:["time","appearance"]},{word:"loose",categories:["touch"]},{word:"loud",categories:["sounds"]},{word:"low",categories:["shapes"]},{word:"magnificent",categories:["appearance"]},{word:"mammoth",categories:["size"]},{word:"mango",categories:["color"]},{word:"many",categories:["quantity"]},{word:"massive",categories:["size"]},{word:"mealy",categories:["condition"]},{word:"melodic",categories:["sounds"]},{word:"melted",categories:["touch"]},{word:"microscopic",categories:["size"]},{word:"millions",categories:["quantity"]},{word:"miniature",categories:["size"]},{word:"modern",categories:["time"]},{word:"moldy",categories:["taste"]},{word:"most",categories:["quantity"]},{word:"muscular",categories:["appearance"]},{word:"mushy",categories:["condition"]},{word:"mysterious",categories:["personality"]},{word:"narrow",categories:["shapes"]},{word:"nervous",categories:["personality"]},{word:"nice",categories:["personality"]},{word:"noisy",categories:["sounds"]},{word:"numerous",categories:["quantity"]},{word:"nutritious",categories:["taste"]},{word:"nutty",categories:["taste"]},{word:"obedient",categories:["personality"]},{word:"obnoxious",categories:["personality"]},{word:"odd",categories:["condition"]},{word:"old",categories:["time"]},{word:"orange",categories:["color"]},{word:"panicky",categories:["personality"]},{word:"petite",categories:["size"]},{word:"pitiful",categories:["personality"]},{word:"plain",categories:["appearance"]},{word:"plump",categories:["appearance"]},{word:"polite",categories:["personality"]},{word:"poor",categories:["condition"]},{word:"powerful",categories:["condition"]},{word:"prehistoric",categories:["time"]},{word:"prickly",categories:["touch"]},{word:"proud",categories:["personality"]},{word:"puny",categories:["size"]},{word:"purple",categories:["color"]},{word:"purring",categories:["sounds"]},{word:"putrid",categories:["taste"]},{word:"quaint",categories:["appearance"]},{word:"quick",categories:["time"]},{word:"quiet",categories:["sounds"]},{word:"rancid",categories:["taste"]},{word:"rapid",categories:["time"]},{word:"rapping",categories:["sounds"]},{word:"raspy",categories:["sounds"]},{word:"red",categories:["color"]},{word:"refined",categories:["shapes"]},{word:"repulsive",categories:["personality"]},{word:"rhythmic",categories:["sounds"]},{word:"rich",categories:["condition"]},{word:"ripe",categories:["taste"]},{word:"rotten",categories:["taste"]},{word:"rough",categories:["touch"]},{word:"round",categories:["shapes"]},{word:"salmon",categories:["color"]},{word:"salty",categories:["taste"]},{word:"savory",categories:["taste"]},{word:"scarce",categories:["quantity"]},{word:"scary",categories:["personality"]},{word:"scrawny",categories:["size"]},{word:"screeching",categories:["sounds"]},{word:"scruffy",categories:["appearance"]},{word:"shaggy",categories:["touch"]},{word:"shallow",categories:["shapes"]},{word:"shapely",categories:["appearance"]},{word:"sharp",categories:["touch"]},{word:"short",categories:["size","appearance","time"]},{word:"shrilling",categories:["sounds"]},{word:"shy",categories:["condition"]},{word:"silly",categories:["personality"]},{word:"skinny",categories:["appearance","shapes"]},{word:"slimy",categories:["touch"]},{word:"slow",categories:["time"]},{word:"small",categories:["size"]},{word:"some",categories:["quantity"]},{word:"sour",categories:["taste"]},{word:"sparse",categories:["quantity"]},{word:"spicy",categories:["taste"]},{word:"spoiled",categories:["taste"]},{word:"square",categories:["shapes"]},{word:"squeaking",categories:["sounds"]},{word:"stale",categories:["taste"]},{word:"steep",categories:["shapes"]},{word:"sticky",categories:["touch"]},{word:"stocky",categories:["appearance"]},{word:"straight",categories:["shapes"]},{word:"strong",categories:["touch"]},{word:"substantial",categories:["quantity"]},{word:"sweet",categories:["taste"]},{word:"swift",categories:["time"]},{word:"tall",categories:["size"]},{word:"tangy",categories:["taste"]},{word:"tart",categories:["taste"]},{word:"tasteless",categories:["taste"]},{word:"tasty",categories:["taste"]},{word:"teeny",categories:["size"]},{word:"tender",categories:["condition"]},{word:"thankful",categories:["personality"]},{word:"thoughtless",categories:["personality"]},{word:"thousands",categories:["quantity"]},{word:"thundering",categories:["sounds"]},{word:"tight",categories:["touch"]},{word:"tinkling",categories:["sounds"]},{word:"tiny",categories:["size"]},{word:"ugly",categories:["appearance"]},{word:"uneven",categories:["touch"]},{word:"unimportant",categories:["condition"]},{word:"uninterested",categories:["condition"]},{word:"unkempt",categories:["appearance"]},{word:"unsightly",categories:["appearance"]},{word:"uptight",categories:["personality"]},{word:"vast",categories:["condition"]},{word:"victorious",categories:["personality"]},{word:"wailing",categories:["sounds"]},{word:"warm",categories:["touch"]},{word:"weak",categories:["touch"]},{word:"wet",categories:["touch"]},{word:"whining",categories:["sounds"]},{word:"whispering",categories:["sounds"]},{word:"white",categories:["color"]},{word:"wide",categories:["shapes"]},{word:"witty",categories:["personality"]},{word:"wonderful",categories:["personality"]},{word:"wooden",categories:["touch"]},{word:"worried",categories:["personality"]},{word:"wrong",categories:["condition"]},{word:"yellow",categories:["color"]},{word:"young",categories:["time"]},{word:"yummy",categories:["taste"]},{word:"zealous",categories:["personality"]}]},t.getWordsByCategory=function(n,r){var i,a;void 0===r&&(r=[]);var o=new Set(r),s=[];try{for(var c=e(t.wordList[n]),l=c.next();!l.done;l=c.next()){var u=l.value;(0===r.length||u.categories.some((function(t){return o.has(t)})))&&s.push(u.word)}}catch(h){i={error:h}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}return s}}(iX);var aX=va&&va.__assign||function(){return(aX=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(rX,"__esModule",{value:!0}),rX.totalUniqueSlugs=rX.generateSlug=void 0;var oX=iX;var sX=rX.generateSlug=function(t,e){for(var n=t||3,r={partsOfSpeech:cX(n),categories:{},format:"kebab"},i=aX(aX({},r),e),a=[],o=0;o<n;o++){var s=i.partsOfSpeech[o],c=oX.getWordsByCategory(i.partsOfSpeech[o],i.categories[s]),l=c[Math.floor(Math.random()*c.length)];a.push(l)}return function(t,e){if("kebab"===e)return t.join("-").toLowerCase();if("camel"===e)return t.map((function(t,e){return 0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()})).join("");if("lower"===e)return t.join(" ").toLowerCase();if("sentence"===e)return t.map((function(t,e){return 0===e?t[0].toUpperCase()+t.slice(1).toLowerCase():t})).join(" ");return t.map((function(t){return t[0].toUpperCase()+t.slice(1).toLowerCase()})).join(" ")}(a,i.format)};function cX(t){for(var e=[],n=0;n<t-1;n++)e.push("adjective");return e.push("noun"),e}rX.totalUniqueSlugs=function(t,e){for(var n,r,i={adjective:oX.getWordsByCategory("adjective",null===(n=null==e?void 0:e.categories)||void 0===n?void 0:n.adjective).length,noun:oX.getWordsByCategory("noun",null===(r=null==e?void 0:e.categories)||void 0===r?void 0:r.noun).length},a=t||3,o=(null==e?void 0:e.partsOfSpeech)||cX(a),s=1,c=0;c<a;c++)s*=i[o[c]];return s};export{be as $,at as A,n as B,$t as C,h as D,S as E,p as F,g as G,f as H,u as I,qt as J,Vt as K,t as L,st as M,ht as N,yt as O,G as P,R as Q,M as R,zt as S,a as T,X as U,me as V,j as W,y as X,Z as Y,I as Z,Dt as _,Y as a,Bt as a0,mt as a1,_e as a2,lt as a3,ue as a4,H as a5,P as a6,ke as a7,V as a8,m as a9,wa as aa,Wt as ab,l as ac,ye as ad,sX as ae,F as b,U as c,A as d,D as e,O as f,$ as g,q as h,Yt as i,Lt as j,B as k,L as l,Rt as m,W as n,It as o,jt as p,Nt as q,Et as r,s,N as t,At as u,Ft as v,St as w,Ot as x,ct as y,ot as z};