1298 lines
1.4 MiB
Plaintext
1298 lines
1.4 MiB
Plaintext
var _n=Object.defineProperty;var mn=(e,t,r)=>t in e?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yr=(e,t,r)=>(mn(e,typeof t!="symbol"?t+"":t,r),r);import{B as writable,I as derived,J as get_store_value}from"./index-e85f5ed2.js";import{_ as __vitePreload}from"./preload-helper-b21cceae.js";const defaultLoading={loading:!1},loadingStateStore=writable(defaultLoading),initLoading=async(e,t)=>{loadingStateStore.set({loading:!0,message:e});const r=await t;return loadingStateStore.set({loading:!1}),r};var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var bundle$1={};(function(exports){(function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})})(exports,(()=>{var __webpack_modules__={607:(module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0});var serializer_1=__webpack_require__(810),deserializer_1=__webpack_require__(496),Module;typeof process<"u"&&process.release.name==="node"&&(Module=eval("require")("module"));var ESSerializer=function(){function e(){}return e.throwErrorIfInNonNodeEnvironment=function(){if(!Module)throw new Error("Cannot intercept require in non-Node environment.")},e.interceptRequire=function(){this.isRequireIntercepted||(this.isRequireIntercepted=!0,this.throwErrorIfInNonNodeEnvironment(),e.originRequire=Module.prototype.require,Module.prototype.require=function(){var t=e.originRequire.apply(this,arguments),r=t.name;return e.requiredClasses[r]||(e.requiredClasses[r]=t),t})},e.stopInterceptRequire=function(){this.throwErrorIfInNonNodeEnvironment(),Module.prototype.require=e.originRequire,this.isRequireIntercepted=!1},e.isInterceptingRequire=function(){return this.isRequireIntercepted},e.getRequiredClasses=function(){return this.requiredClasses},e.clearRequiredClasses=function(){this.requiredClasses={}},e.registerClass=function(t){this.registeredClasses.push(t)},e.registerClasses=function(t){this.registeredClasses=this.registeredClasses.concat(t)},e.clearRegisteredClasses=function(){this.registeredClasses=[]},e.serialize=function(t,r){return r===void 0&&(r={}),JSON.stringify(serializer_1.getSerializeValueWithClassName(t,r))},e.deserialize=function(t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),deserializer_1.deserializeFromParsedObj(JSON.parse(t),Object.values(this.requiredClasses).concat(this.registeredClasses).concat(r),n)},e.originRequire=null,e.isRequireIntercepted=!1,e.requiredClasses={},e.registeredClasses=[],e}();module.exports=ESSerializer},917:function(e,t){var r=this&&this.__spreadArrays||function(){for(var _e=0,ke=0,de=arguments.length;ke<de;ke++)_e+=arguments[ke].length;var ce=Array(_e),he=0;for(ke=0;ke<de;ke++)for(var Se=arguments[ke],ve=0,me=Se.length;ve<me;ve++,he++)ce[he]=Se[ve];return ce};Object.defineProperty(t,"__esModule",{value:!0}),t.TO_STRING_FIELD=t.TIMESTAMP_FIELD=t.OPTIONS_FIELD=t.CLASS_NAME_FIELD=t.BOOLEAN_FIELD=t.ARRAY_FIELD=t.BUILTIN_TYPE_UNDEFINED=t.BUILTIN_TYPE_NOT_FINITE=t.BUILTIN_TYPE_BIG_INT=t.BUILTIN_CLASS_AGGREGATE_ERROR=t.BUILTIN_CLASS_URI_ERROR=t.BUILTIN_CLASS_TYPE_ERROR=t.BUILTIN_CLASS_SYNTAX_ERROR=t.BUILTIN_CLASS_REFERENCE_ERROR=t.BUILTIN_CLASS_RANGE_ERROR=t.BUILTIN_CLASS_EVAL_ERROR=t.BUILTIN_CLASS_ERROR=t.BUILTIN_CLASS_STRING=t.BUILTIN_CLASS_SET=t.BUILTIN_CLASS_REGEXP=t.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT=t.BUILTIN_CLASS_INTL_PLURALRULES=t.BUILTIN_CLASS_INTL_NUMBERFORMAT=t.BUILTIN_CLASS_INTL_LOCALE=t.BUILTIN_CLASS_INTL_LISTFORMAT=t.BUILTIN_CLASS_INTL_DATETIMEFORMAT=t.BUILTIN_CLASS_INTL_COLLATOR=t.BUILTIN_CLASS_DATE=t.BUILTIN_CLASS_DATAVIEW=t.BUILTIN_CLASS_BOOLEAN=t.BUILTIN_CLASS_SHAREDARRAYBUFFER=t.BUILTIN_CLASS_ARRAYBUFFER=t.BUILTIN_CLASS_BIGUINT64ARRAY=t.BUILTIN_CLASS_BIGINT64ARRAY=t.BUILTIN_CLASS_FLOAT64ARRAY=t.BUILTIN_CLASS_FLOAT32ARRAY=t.BUILTIN_CLASS_UINT32ARRAY=t.BUILTIN_CLASS_INT32ARRAY=t.BUILTIN_CLASS_UINT16ARRAY=t.BUILTIN_CLASS_INT16ARRAY=t.BUILTIN_CLASS_UINT8CLAMPEDARRAY=t.BUILTIN_CLASS_UINT8ARRAY=t.BUILTIN_CLASS_INT8ARRAY=t.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED=t.ALL_BUILTIN_INTLS=t.ALL_BUILTIN_ERRORS=t.ALL_BUILTIN_ARRAYS=t.ESSERIALIZER_NULL=void 0,t.ESSERIALIZER_NULL="__ESSERIALIZER_NULL__",t.ARRAY_FIELD="ess_arr",t.BOOLEAN_FIELD="ess_bool",t.CLASS_NAME_FIELD="ess_cn",t.OPTIONS_FIELD="ess_opt",t.TIMESTAMP_FIELD="ess_ts",t.TO_STRING_FIELD="ess_str";var n="Int8Array";t.BUILTIN_CLASS_INT8ARRAY=n;var i="Uint8Array";t.BUILTIN_CLASS_UINT8ARRAY=i;var o="Uint8ClampedArray";t.BUILTIN_CLASS_UINT8CLAMPEDARRAY=o;var l="Int16Array";t.BUILTIN_CLASS_INT16ARRAY=l;var u="Uint16Array";t.BUILTIN_CLASS_UINT16ARRAY=u;var h="Int32Array";t.BUILTIN_CLASS_INT32ARRAY=h;var f="Uint32Array";t.BUILTIN_CLASS_UINT32ARRAY=f;var d="Float32Array";t.BUILTIN_CLASS_FLOAT32ARRAY=d;var g="Float64Array";t.BUILTIN_CLASS_FLOAT64ARRAY=g;var p="BigInt64Array";t.BUILTIN_CLASS_BIGINT64ARRAY=p;var m="BigUint64Array";t.BUILTIN_CLASS_BIGUINT64ARRAY=m,t.BUILTIN_CLASS_ARRAYBUFFER="ArrayBuffer",t.BUILTIN_CLASS_SHAREDARRAYBUFFER="SharedArrayBuffer",t.BUILTIN_CLASS_BOOLEAN="Boolean",t.BUILTIN_CLASS_DATAVIEW="DataView",t.BUILTIN_CLASS_DATE="Date";var b="Collator";t.BUILTIN_CLASS_INTL_COLLATOR=b;var $="DateTimeFormat";t.BUILTIN_CLASS_INTL_DATETIMEFORMAT=$;var S="ListFormat";t.BUILTIN_CLASS_INTL_LISTFORMAT=S,t.BUILTIN_CLASS_INTL_LOCALE="Locale";var R="NumberFormat";t.BUILTIN_CLASS_INTL_NUMBERFORMAT=R;var L="PluralRules";t.BUILTIN_CLASS_INTL_PLURALRULES=L;var N="RelativeTimeFormat";t.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT=N,t.BUILTIN_CLASS_REGEXP="RegExp",t.BUILTIN_CLASS_SET="Set";var F="String";t.BUILTIN_CLASS_STRING=F;var H="Error";t.BUILTIN_CLASS_ERROR=H;var G="EvalError";t.BUILTIN_CLASS_EVAL_ERROR=G;var P="RangeError";t.BUILTIN_CLASS_RANGE_ERROR=P;var V="ReferenceError";t.BUILTIN_CLASS_REFERENCE_ERROR=V;var z="SyntaxError";t.BUILTIN_CLASS_SYNTAX_ERROR=z;var W="TypeError";t.BUILTIN_CLASS_TYPE_ERROR=W;var T="URIError";t.BUILTIN_CLASS_URI_ERROR=T;var U="AggregateError";t.BUILTIN_CLASS_AGGREGATE_ERROR=U,t.BUILTIN_TYPE_BIG_INT="BI",t.BUILTIN_TYPE_NOT_FINITE="NF",t.BUILTIN_TYPE_UNDEFINED="UD";var I=[n,i,o,l,u,h,f,d,g,p,m];t.ALL_BUILTIN_ARRAYS=I;var ae=[H,G,P,V,z,W,T,U];t.ALL_BUILTIN_ERRORS=ae;var Q=[b,$,S,R,L,N];t.ALL_BUILTIN_INTLS=Q;var ue=r([F],I);t.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED=ue},496:function(e,t,r){var n=this&&this.__spreadArrays||function(){for(var R=0,L=0,N=arguments.length;L<N;L++)R+=arguments[L].length;var F=Array(R),H=0;for(L=0;L<N;L++)for(var G=arguments[L],P=0,V=G.length;P<V;P++,H++)F[H]=G[P];return F};Object.defineProperty(t,"__esModule",{value:!0}),t.getParentClassName=t.getClassMappingFromClassArray=t.deserializeFromParsedObjWithClassMapping=t.deserializeFromParsedObj=void 0;var i=r(821),o=r(917),l=/^\s*class\s+/;function u(R,L,N){if(N===void 0&&(N={}),i.notObject(R))return R;if(Array.isArray(R))return h(R,L);var F=R[o.CLASS_NAME_FIELD],H=function(P,V,z){switch(P){case o.BUILTIN_CLASS_INT8ARRAY:return f(V[o.ARRAY_FIELD],Int8Array);case o.BUILTIN_CLASS_UINT8ARRAY:return f(V[o.ARRAY_FIELD],Uint8Array);case o.BUILTIN_CLASS_UINT8CLAMPEDARRAY:return f(V[o.ARRAY_FIELD],Uint8ClampedArray);case o.BUILTIN_CLASS_INT16ARRAY:return f(V[o.ARRAY_FIELD],Int16Array);case o.BUILTIN_CLASS_UINT16ARRAY:return f(V[o.ARRAY_FIELD],Uint16Array);case o.BUILTIN_CLASS_INT32ARRAY:return f(V[o.ARRAY_FIELD],Int32Array);case o.BUILTIN_CLASS_UINT32ARRAY:return f(V[o.ARRAY_FIELD],Uint32Array);case o.BUILTIN_CLASS_FLOAT32ARRAY:return f(V[o.ARRAY_FIELD],Float32Array);case o.BUILTIN_CLASS_FLOAT64ARRAY:return f(V[o.ARRAY_FIELD],Float64Array);case o.BUILTIN_CLASS_BIGINT64ARRAY:return d(V[o.ARRAY_FIELD],BigInt64Array);case o.BUILTIN_CLASS_BIGUINT64ARRAY:return d(V[o.ARRAY_FIELD],BigUint64Array);case o.BUILTIN_TYPE_BIG_INT:return g(V[o.TO_STRING_FIELD]);case o.BUILTIN_TYPE_UNDEFINED:return;case o.BUILTIN_TYPE_NOT_FINITE:return i.getValueFromToStringResult(V[o.TO_STRING_FIELD]);case o.BUILTIN_CLASS_ARRAYBUFFER:return W=V[o.ARRAY_FIELD],new Uint8Array(W).buffer;case o.BUILTIN_CLASS_SHAREDARRAYBUFFER:return function(T){var U=new SharedArrayBuffer(T.length),I=new Uint8Array(U);return T.forEach(function(ae,Q){I[Q]=ae}),U}(V[o.ARRAY_FIELD]);case o.BUILTIN_CLASS_BOOLEAN:return function(T){return new Boolean(T[o.BOOLEAN_FIELD])}(V);case o.BUILTIN_CLASS_DATAVIEW:return function(T){return new DataView(new Uint8Array(T).buffer)}(V[o.ARRAY_FIELD]);case o.BUILTIN_CLASS_DATE:return function(T){return typeof T[o.TIMESTAMP_FIELD]=="number"?new Date(T[o.TIMESTAMP_FIELD]):null}(V);case o.BUILTIN_CLASS_INTL_COLLATOR:return p(V,Intl.Collator);case o.BUILTIN_CLASS_INTL_DATETIMEFORMAT:return p(V,Intl.DateTimeFormat);case o.BUILTIN_CLASS_INTL_LISTFORMAT:return p(V,Intl.ListFormat);case o.BUILTIN_CLASS_INTL_LOCALE:return new Intl.Locale(V[o.TO_STRING_FIELD]);case o.BUILTIN_CLASS_INTL_NUMBERFORMAT:return p(V,Intl.NumberFormat);case o.BUILTIN_CLASS_INTL_PLURALRULES:return p(V,Intl.PluralRules);case o.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT:return p(V,Intl.RelativeTimeFormat);case o.BUILTIN_CLASS_REGEXP:return function(T){var U=T[o.TO_STRING_FIELD],I=U.lastIndexOf("/");return new RegExp(U.substring(1,I),U.substring(I+1))}(V);case o.BUILTIN_CLASS_SET:return function(T,U){return new Set(h(T[o.ARRAY_FIELD],U))}(V,z);case o.BUILTIN_CLASS_STRING:return function(T){return new String(T[o.TO_STRING_FIELD])}(V);case o.BUILTIN_CLASS_ERROR:return m(V,Error);case o.BUILTIN_CLASS_EVAL_ERROR:return m(V,EvalError);case o.BUILTIN_CLASS_RANGE_ERROR:return m(V,RangeError);case o.BUILTIN_CLASS_REFERENCE_ERROR:return m(V,ReferenceError);case o.BUILTIN_CLASS_SYNTAX_ERROR:return m(V,SyntaxError);case o.BUILTIN_CLASS_TYPE_ERROR:return m(V,TypeError);case o.BUILTIN_CLASS_URI_ERROR:return m(V,URIError);case o.BUILTIN_CLASS_AGGREGATE_ERROR:return m(V,AggregateError);default:return o.ESSERIALIZER_NULL}var W}(F,R,L);if(H!==o.ESSERIALIZER_NULL)return H;if(F&&!L[F])throw new Error("Class "+F+" not found");var G=[];return N.fieldsForConstructorParameters&&(G=N.fieldsForConstructorParameters.map(function(P){return P in R?R[P]:{}})),function(P,V,z,W){for(var T in V){var U=V[T];if(!W.ignoreProperties||!W.ignoreProperties.includes(T))if(W.rawProperties&&W.rawProperties.includes(T))P[T]=JSON.stringify(U);else{var I=Object.getOwnPropertyDescriptor(P,T);ae=U,Q=I,T===o.CLASS_NAME_FIELD||Q&&(typeof Q.set=="function"||Q.writable===!1&&typeof ae!="object")||(I&&I.writable===!1&&typeof U=="object"?$(P[T],U,z):P[T]=u(U,z))}}var ae,Q;return P}(function(P,V){var z={};if(!P)return z;var W=P.length-V.length;if(W>0&&(V=V.concat(Array.from(Array(W),function(){return{}}))),l.test(P.toString()))try{z=new(P.bind.apply(P,n([void 0],V)))}catch{b(P.name),z={},Object.setPrototypeOf(z,P?P.prototype:Object.prototype)}else{z=Object.create(P.prototype.constructor.prototype);try{P.prototype.constructor.call(z,V)}catch{b(P.name)}}return z}(L[F],G),R,L,N)}function h(R,L){return R.map(function(N){return u(N,L)})}function f(R,L){return new L(R)}function d(R,L){return new L(R.map(function(N){return g(N[o.TO_STRING_FIELD])}))}function g(R){return BigInt(R)}function p(R,L){var N=R[o.OPTIONS_FIELD],F=N.locale;return delete N.locale,new L(F,N)}function m(R,L){var N;return delete(N=R.message?new L(R.message):new L).stack,R.name&&(N.name=R.name),R.stack&&(N.stack=R.stack),L===AggregateError&&(N.errors=u(R.errors,{})),N}function b(R){console.warn("Incorrect parameter type passed to constructor: "+R)}function $(R,L,N){for(var F in L){var H=Object.getOwnPropertyDescriptor(R,F);H&&H.writable!==!0&&typeof H.set!="function"||(R[F]=u(L[F],N))}}function S(R){R===void 0&&(R=[]);var L={};return R.forEach(function(N){if(i.isClass(N)){var F=N.name,H=L[F];H&&H!==N&&console.warn("WARNING: Found class definition with the same name: "+F),L[F]=N}}),L}t.deserializeFromParsedObj=function(R,L,N){return u(R,S(L),N)},t.deserializeFromParsedObjWithClassMapping=u,t.getClassMappingFromClassArray=S,t.getParentClassName=function(R){return R.prototype.__proto__.constructor.name}},821:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isClass=t.notObject=t.getValueFromToStringResult=void 0,t.notObject=function(r){return r===null||typeof r!="object"},t.getValueFromToStringResult=function(r){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN;default:return null}},t.isClass=function(r){if(function(n){return[Date].indexOf(n)>=0}(r))return!0;try{Reflect.construct(String,[],r)}catch{return!1}return!0}},810:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializeValueWithClassName=void 0;var n=r(917),i=r(821);function o(u,h){h===void 0&&(h={});var f=function(m){var b,$,S;return m===void 0?((b={})[n.CLASS_NAME_FIELD]=n.BUILTIN_TYPE_UNDEFINED,b):typeof m!="number"||isFinite(m)?typeof m=="bigint"?((S={})[n.CLASS_NAME_FIELD]=n.BUILTIN_TYPE_BIG_INT,S[n.TO_STRING_FIELD]=m.toString(),S):i.notObject(m)?m:n.ESSERIALIZER_NULL:(($={})[n.CLASS_NAME_FIELD]=n.BUILTIN_TYPE_NOT_FINITE,$[n.TO_STRING_FIELD]=m.toString(),$)}(u);if(f!==n.ESSERIALIZER_NULL)return f;if(Array.isArray(u))return l(u);var d={};if(!function(m){var b=m.__proto__.constructor.name;return n.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED.includes(b)}(u)){if(h.ignoreProperties&&h.ignoreProperties.forEach(function(m){delete u[m]}),h.interceptProperties)for(var g in h.interceptProperties)u[g]=h.interceptProperties[g].call(u,u[g]);for(var p in u)d[p]=o(u[p])}return function(m,b){var $=m.__proto__.constructor.name;return $!=="Object"&&(b[n.CLASS_NAME_FIELD]=$,$===n.BUILTIN_CLASS_ARRAYBUFFER||$===n.BUILTIN_CLASS_SHAREDARRAYBUFFER?b[n.ARRAY_FIELD]=l(Array.from(new Uint8Array(m))):$===n.BUILTIN_CLASS_BOOLEAN?b[n.BOOLEAN_FIELD]=m.valueOf():$===n.BUILTIN_CLASS_DATAVIEW?b[n.ARRAY_FIELD]=l(Array.from(new Uint8Array(m.buffer))):$===n.BUILTIN_CLASS_DATE?b[n.TIMESTAMP_FIELD]=m.getTime():$===n.BUILTIN_CLASS_INTL_LOCALE||$===n.BUILTIN_CLASS_REGEXP?b[n.TO_STRING_FIELD]=m.toString():$===n.BUILTIN_CLASS_SET?b[n.ARRAY_FIELD]=l(Array.from(m)):$===n.BUILTIN_CLASS_STRING?b[n.TO_STRING_FIELD]=m.toString():n.ALL_BUILTIN_ARRAYS.includes($)?b[n.ARRAY_FIELD]=l(Array.from(m)):n.ALL_BUILTIN_ERRORS.includes($)?function(S,R,L){S.name!=="Error"&&(R.name=S.name),S.message&&(R.message=S.message),S.stack&&(R.stack=S.stack),L===n.BUILTIN_CLASS_AGGREGATE_ERROR&&(R.errors=o(S.errors))}(m,b,$):n.ALL_BUILTIN_INTLS.includes($)&&(b[n.OPTIONS_FIELD]=m.resolvedOptions())),b}(u,d)}function l(u){return u.map(function(h){return o(h)})}t.getSerializeValueWithClassName=o}},__webpack_module_cache__={};function __webpack_require__(e){if(__webpack_module_cache__[e])return __webpack_module_cache__[e].exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.exports}return __webpack_require__(607)})())})(bundle$1);const ESSerializer=getDefaultExportFromCjs(bundle$1),alreadyWarnFor=[],warnStorageNotFound=e=>{const t=typeof process<"u"&&!0;if(!alreadyWarnFor.includes(e)&&!t){let r=`Unable to find the ${e}. No data will be persisted.`;typeof window>"u"&&(r+=`
|
|
Are you running on a server? Most of storages are not available while running on a server.`),console.warn(r),alreadyWarnFor.push(e)}},serialize$1=e=>ESSerializer.serialize(e),deserialize=e=>{if(e!=="undefined"){if(e!=null){try{return ESSerializer.deserialize(e)}catch{}try{return JSON.parse(e)}catch{}}return e}};function persist(e,t,r){const n=t.getValue(r);return n!==null&&e.set(n),"addListener"in t&&t.addListener(r,i=>{e.set(i)}),e.subscribe(i=>{t.setValue(r,i)}),{...e,delete(){t.deleteValue(r)}}}function getBrowserStorage(e,t=!1){const r=[],n=l=>{const u=l.key;l.storageArea===e&&r.filter(({key:h})=>h===u).forEach(({listener:h})=>{h(deserialize(l.newValue))})},i=()=>{t&&typeof window<"u"&&window.addEventListener&&window.addEventListener("storage",n)},o=()=>{t&&typeof window<"u"&&window.removeEventListener&&window.removeEventListener("storage",n)};return{addListener(l,u){r.push({key:l,listener:u}),r.length===1&&i()},removeListener(l,u){const h=r.indexOf({key:l,listener:u});h!==-1&&r.splice(h,1),r.length===0&&o()},getValue(l){const u=e.getItem(l);return deserialize(u)},deleteValue(l){e.removeItem(l)},setValue(l,u){e.setItem(l,serialize$1(u))}}}function localStorage(e=!1){return typeof window<"u"&&window.localStorage?getBrowserStorage(window.localStorage,e):(warnStorageNotFound("window.localStorage"),noopStorage())}function noopStorage(){return{getValue(){return null},deleteValue(){},setValue(){}}}let analytics;const initAnalytics=async()=>{if(!analytics)try{const[{Analytics:e},{default:t}]=await Promise.all([__vitePreload(()=>import("./analytics.browser.es-80770405.js"),[],import.meta.url),__vitePreload(()=>import("./plausible-eef04f76.js").then(r=>r.p),[],import.meta.url)]);analytics=e({app:"mermaid-live-editor",plugins:[t({domain:"mermaid.live",hashMode:!1,trackLocalhost:!1,apiHost:"https://plausible.io"})]})}catch(e){console.log(e),console.info("Analytics blocked ;)")}},detectType$1=e=>{const t=["classDiagram","erDiagram","flowChart","gantt","gitGraph","graph","journey","pie","stateDiagram"],r=e.replace(/^\s*%%.*\n/g,`
|
|
`).trimStart().split(" ")[0].toLowerCase();return t.find(i=>r.includes(i.toLowerCase()))},countLines=e=>{var t,r;return((r=(t=e.match(/\n/g))==null?void 0:t.length)!=null?r:0)+1},saveStatistics=e=>{const t=detectType$1(e);if(!t)return;const r=countLines(e);logEvent("render",{graphType:t,length:r})},minutesToMilliSeconds=e=>e*6e4,defaultDelay=minutesToMilliSeconds(1),delaysPerEvent={render:minutesToMilliSeconds(5),panZoom:minutesToMilliSeconds(10),copyClipboard:defaultDelay,download:defaultDelay,copyMarkdown:defaultDelay,loadGist:defaultDelay,loadSampleDiagram:defaultDelay,renderDiagram:defaultDelay,history:defaultDelay,migration:defaultDelay,themeChange:defaultDelay},timeouts=new Map,logEvent=(e,t)=>{if(!analytics)return;const r=t?JSON.stringify({name:e,data:t}):e;timeouts.has(r)?clearTimeout(timeouts.get(r)):analytics.track(e,t),timeouts.set(r,window.setTimeout(()=>timeouts.delete(r),delaysPerEvent[e]))};/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1$1(e){let t=e.length;for(;--t>=0;)e[t]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1$1(base_length);const base_dist=new Array(D_CODES$1);zero$1$1(base_dist);function StaticTreeDesc(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const d_code=e=>e<256?_dist_code[e]:_dist_code[256+(e>>>7)],put_short=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},send_bits=(e,t,r)=>{e.bi_valid>Buf_size-r?(e.bi_buf|=t<<e.bi_valid&65535,put_short(e,e.bi_buf),e.bi_buf=t>>Buf_size-e.bi_valid,e.bi_valid+=r-Buf_size):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},send_code=(e,t,r)=>{send_bits(e,r[t*2],r[t*2+1])},bi_reverse=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},bi_flush=e=>{e.bi_valid===16?(put_short(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},gen_bitlen=(e,t)=>{const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,h=t.stat_desc.max_length;let f,d,g,p,m,b,$=0;for(p=0;p<=MAX_BITS$1;p++)e.bl_count[p]=0;for(r[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;f<HEAP_SIZE$1;f++)d=e.heap[f],p=r[r[d*2+1]*2+1]+1,p>h&&(p=h,$++),r[d*2+1]=p,!(d>n)&&(e.bl_count[p]++,m=0,d>=u&&(m=l[d-u]),b=r[d*2],e.opt_len+=b*(p+m),o&&(e.static_len+=b*(i[d*2+1]+m)));if($!==0){do{for(p=h-1;e.bl_count[p]===0;)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[h]--,$-=2}while($>0);for(p=h;p!==0;p--)for(d=e.bl_count[p];d!==0;)g=e.heap[--f],!(g>n)&&(r[g*2+1]!==p&&(e.opt_len+=(p-r[g*2+1])*r[g*2],r[g*2+1]=p),d--)}},gen_codes=(e,t,r)=>{const n=new Array(MAX_BITS$1+1);let i=0,o,l;for(o=1;o<=MAX_BITS$1;o++)i=i+r[o-1]<<1,n[o]=i;for(l=0;l<=t;l++){let u=e[l*2+1];u!==0&&(e[l*2]=bi_reverse(n[u]++,u))}},tr_static_init=()=>{let e,t,r,n,i;const o=new Array(MAX_BITS$1+1);for(r=0,n=0;n<LENGTH_CODES$1-1;n++)for(base_length[n]=r,e=0;e<1<<extra_lbits[n];e++)_length_code[r++]=n;for(_length_code[r-1]=n,i=0,n=0;n<16;n++)for(base_dist[n]=i,e=0;e<1<<extra_dbits[n];e++)_dist_code[i++]=n;for(i>>=7;n<D_CODES$1;n++)for(base_dist[n]=i<<7,e=0;e<1<<extra_dbits[n]-7;e++)_dist_code[256+i++]=n;for(t=0;t<=MAX_BITS$1;t++)o[t]=0;for(e=0;e<=143;)static_ltree[e*2+1]=8,e++,o[8]++;for(;e<=255;)static_ltree[e*2+1]=9,e++,o[9]++;for(;e<=279;)static_ltree[e*2+1]=7,e++,o[7]++;for(;e<=287;)static_ltree[e*2+1]=8,e++,o[8]++;for(gen_codes(static_ltree,L_CODES$1+1,o),e=0;e<D_CODES$1;e++)static_dtree[e*2+1]=5,static_dtree[e*2]=bi_reverse(e,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=e=>{let t;for(t=0;t<L_CODES$1;t++)e.dyn_ltree[t*2]=0;for(t=0;t<D_CODES$1;t++)e.dyn_dtree[t*2]=0;for(t=0;t<BL_CODES$1;t++)e.bl_tree[t*2]=0;e.dyn_ltree[END_BLOCK*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},bi_windup=e=>{e.bi_valid>8?put_short(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},smaller=(e,t,r,n)=>{const i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]},pqdownheap=(e,t,r)=>{const n=e.heap[r];let i=r<<1;for(;i<=e.heap_len&&(i<e.heap_len&&smaller(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!smaller(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n},compress_block=(e,t,r)=>{let n,i,o=0,l,u;if(e.sym_next!==0)do n=e.pending_buf[e.sym_buf+o++]&255,n+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],n===0?send_code(e,i,t):(l=_length_code[i],send_code(e,l+LITERALS$1+1,t),u=extra_lbits[l],u!==0&&(i-=base_length[l],send_bits(e,i,u)),n--,l=d_code(n),send_code(e,l,r),u=extra_dbits[l],u!==0&&(n-=base_dist[l],send_bits(e,n,u)));while(o<e.sym_next);send_code(e,END_BLOCK,t)},build_tree=(e,t)=>{const r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let l,u,h=-1,f;for(e.heap_len=0,e.heap_max=HEAP_SIZE$1,l=0;l<o;l++)r[l*2]!==0?(e.heap[++e.heap_len]=h=l,e.depth[l]=0):r[l*2+1]=0;for(;e.heap_len<2;)f=e.heap[++e.heap_len]=h<2?++h:0,r[f*2]=1,e.depth[f]=0,e.opt_len--,i&&(e.static_len-=n[f*2+1]);for(t.max_code=h,l=e.heap_len>>1;l>=1;l--)pqdownheap(e,r,l);f=o;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pqdownheap(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=u,r[f*2]=r[l*2]+r[u*2],e.depth[f]=(e.depth[l]>=e.depth[u]?e.depth[l]:e.depth[u])+1,r[l*2+1]=r[u*2+1]=f,e.heap[1]=f++,pqdownheap(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gen_bitlen(e,t),gen_codes(r,h,e.bl_count)},scan_tree=(e,t,r)=>{let n,i=-1,o,l=t[0*2+1],u=0,h=7,f=4;for(l===0&&(h=138,f=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=l,l=t[(n+1)*2+1],!(++u<h&&o===l)&&(u<f?e.bl_tree[o*2]+=u:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[REP_3_6*2]++):u<=10?e.bl_tree[REPZ_3_10*2]++:e.bl_tree[REPZ_11_138*2]++,u=0,i=o,l===0?(h=138,f=3):o===l?(h=6,f=3):(h=7,f=4))},send_tree=(e,t,r)=>{let n,i=-1,o,l=t[0*2+1],u=0,h=7,f=4;for(l===0&&(h=138,f=3),n=0;n<=r;n++)if(o=l,l=t[(n+1)*2+1],!(++u<h&&o===l)){if(u<f)do send_code(e,o,e.bl_tree);while(--u!==0);else o!==0?(o!==i&&(send_code(e,o,e.bl_tree),u--),send_code(e,REP_3_6,e.bl_tree),send_bits(e,u-3,2)):u<=10?(send_code(e,REPZ_3_10,e.bl_tree),send_bits(e,u-3,3)):(send_code(e,REPZ_11_138,e.bl_tree),send_bits(e,u-11,7));u=0,i=o,l===0?(h=138,f=3):o===l?(h=6,f=3):(h=7,f=4)}},build_bl_tree=e=>{let t;for(scan_tree(e,e.dyn_ltree,e.l_desc.max_code),scan_tree(e,e.dyn_dtree,e.d_desc.max_code),build_tree(e,e.bl_desc),t=BL_CODES$1-1;t>=3&&e.bl_tree[bl_order[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},send_all_trees=(e,t,r,n)=>{let i;for(send_bits(e,t-257,5),send_bits(e,r-1,5),send_bits(e,n-4,4),i=0;i<n;i++)send_bits(e,e.bl_tree[bl_order[i]*2+1],3);send_tree(e,e.dyn_ltree,t-1),send_tree(e,e.dyn_dtree,r-1)},detect_data_type=e=>{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Z_BINARY;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Z_TEXT;for(r=32;r<LITERALS$1;r++)if(e.dyn_ltree[r*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=e=>{static_init_done||(tr_static_init(),static_init_done=!0),e.l_desc=new TreeDesc(e.dyn_ltree,static_l_desc),e.d_desc=new TreeDesc(e.dyn_dtree,static_d_desc),e.bl_desc=new TreeDesc(e.bl_tree,static_bl_desc),e.bi_buf=0,e.bi_valid=0,init_block(e)},_tr_stored_block$1=(e,t,r,n)=>{send_bits(e,(STORED_BLOCK<<1)+(n?1:0),3),bi_windup(e),put_short(e,r),put_short(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},_tr_align$1=e=>{send_bits(e,STATIC_TREES<<1,3),send_code(e,END_BLOCK,static_ltree),bi_flush(e)},_tr_flush_block$1=(e,t,r,n)=>{let i,o,l=0;e.level>0?(e.strm.data_type===Z_UNKNOWN$1&&(e.strm.data_type=detect_data_type(e)),build_tree(e,e.l_desc),build_tree(e,e.d_desc),l=build_bl_tree(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?_tr_stored_block$1(e,t,r,n):e.strategy===Z_FIXED$1||o===i?(send_bits(e,(STATIC_TREES<<1)+(n?1:0),3),compress_block(e,static_ltree,static_dtree)):(send_bits(e,(DYN_TREES<<1)+(n?1:0),3),send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),compress_block(e,e.dyn_ltree,e.dyn_dtree)),init_block(e),n&&bi_windup(e)},_tr_tally$1=(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(_length_code[r]+LITERALS$1+1)*2]++,e.dyn_dtree[d_code(t)*2]++),e.sym_next===e.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(e,t,r,n)=>{let i=e&65535|0,o=e>>>16&65535|0,l=0;for(;r!==0;){l=r>2e3?2e3:r,r-=l;do i=i+t[n++]|0,o=o+i|0;while(--l);i%=65521,o%=65521}return i|o<<16|0};var adler32_1=adler32;const makeTable=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t},crcTable=new Uint32Array(makeTable()),crc32=(e,t,r,n)=>{const i=crcTable,o=n+r;e^=-1;for(let l=n;l<o;l++)e=e>>>8^i[(e^t[l])&255];return e^-1};var crc32_1=crc32,messages$1={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(e,t)=>(e.msg=messages$1[t],t),rank$2=e=>e*2-(e>4?9:0),zero$3=e=>{let t=e.length;for(;--t>=0;)e[t]=0},slide_hash=e=>{let t,r,n,i=e.w_size;t=e.hash_size,n=t;do r=e.head[--n],e.head[n]=r>=i?r-i:0;while(--t);t=i,n=t;do r=e.prev[--n],e.prev[n]=r>=i?r-i:0;while(--t)};let HASH_ZLIB=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask,HASH=HASH_ZLIB;const flush_pending=e=>{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))},flush_block_only=(e,t)=>{_tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,flush_pending(e.strm)},put_byte=(e,t)=>{e.pending_buf[e.pending++]=t},putShortMSB=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},read_buf=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),e.state.wrap===1?e.adler=adler32_1(e.adler,t,i,r):e.state.wrap===2&&(e.adler=crc32_1(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},longest_match=(e,t)=>{let r=e.max_chain_length,n=e.strstart,i,o,l=e.prev_length,u=e.nice_match;const h=e.strstart>e.w_size-MIN_LOOKAHEAD?e.strstart-(e.w_size-MIN_LOOKAHEAD):0,f=e.window,d=e.w_mask,g=e.prev,p=e.strstart+MAX_MATCH;let m=f[n+l-1],b=f[n+l];e.prev_length>=e.good_match&&(r>>=2),u>e.lookahead&&(u=e.lookahead);do if(i=t,!(f[i+l]!==b||f[i+l-1]!==m||f[i]!==f[n]||f[++i]!==f[n+1])){n+=2,i++;do;while(f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&n<p);if(o=MAX_MATCH-(p-n),n=p-MAX_MATCH,o>l){if(e.match_start=t,l=o,o>=u)break;m=f[n+l-1],b=f[n+l]}}while((t=g[t&d])>h&&--r!==0);return l<=e.lookahead?l:e.lookahead},fill_window=e=>{const t=e.w_size;let r,n,i;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-MIN_LOOKAHEAD)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),slide_hash(e),n+=t),e.strm.avail_in===0)break;if(r=read_buf(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=MIN_MATCH)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=HASH(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=HASH(e,e.ins_h,e.window[i+MIN_MATCH-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<MIN_MATCH)););}while(e.lookahead<MIN_LOOKAHEAD&&e.strm.avail_in!==0)},deflate_stored=(e,t)=>{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,i,o,l=0,u=e.strm.avail_in;do{if(n=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o||(o=e.strm.avail_out-o,i=e.strstart-e.block_start,n>i+e.strm.avail_in&&(n=i+e.strm.avail_in),n>o&&(n=o),n<r&&(n===0&&t!==Z_FINISH$3||t===Z_NO_FLUSH$2||n!==i+e.strm.avail_in)))break;l=t===Z_FINISH$3&&n===i+e.strm.avail_in?1:0,_tr_stored_block(e,0,0,l),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,flush_pending(e.strm),i&&(i>n&&(i=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,n-=i),n&&(read_buf(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(l===0);return u-=e.strm.avail_in,u&&(u>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=u&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-u,e.strm.next_in),e.strstart),e.strstart+=u,e.insert+=u>e.w_size-e.insert?e.w_size-e.insert:u),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),l?BS_FINISH_DONE:t!==Z_NO_FLUSH$2&&t!==Z_FINISH$3&&e.strm.avail_in===0&&e.strstart===e.block_start?BS_BLOCK_DONE:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(read_buf(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,r=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=r||(i||t===Z_FINISH$3)&&t!==Z_NO_FLUSH$2&&e.strm.avail_in===0&&i<=o)&&(n=i>o?o:i,l=t===Z_FINISH$3&&e.strm.avail_in===0&&n===i?1:0,_tr_stored_block(e,e.block_start,n,l),e.block_start+=n,flush_pending(e.strm)),l?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(e,t)=>{let r,n;for(;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&t===Z_NO_FLUSH$2)return BS_NEED_MORE;if(e.lookahead===0)break}if(r=0,e.lookahead>=MIN_MATCH&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,r)),e.match_length>=MIN_MATCH)if(n=_tr_tally(e,e.strstart-e.match_start,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=MIN_MATCH){e.match_length--;do e.strstart++,e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+1]);else n=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,t===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(e,t)=>{let r,n,i;for(;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&t===Z_NO_FLUSH$2)return BS_NEED_MORE;if(e.lookahead===0)break}if(r=0,e.lookahead>=MIN_MATCH&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=MIN_MATCH-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,r),e.match_length<=5&&(e.strategy===Z_FILTERED||e.match_length===MIN_MATCH&&e.strstart-e.match_start>4096)&&(e.match_length=MIN_MATCH-1)),e.prev_length>=MIN_MATCH&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-MIN_MATCH,n=_tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-MIN_MATCH),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=MIN_MATCH-1,e.strstart++,n&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}else if(e.match_available){if(n=_tr_tally(e,0,e.window[e.strstart-1]),n&&flush_block_only(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return BS_NEED_MORE}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=_tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,t===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(e,t)=>{let r,n,i,o;const l=e.window;for(;;){if(e.lookahead<=MAX_MATCH){if(fill_window(e),e.lookahead<=MAX_MATCH&&t===Z_NO_FLUSH$2)return BS_NEED_MORE;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=MIN_MATCH&&e.strstart>0&&(i=e.strstart-1,n=l[i],n===l[++i]&&n===l[++i]&&n===l[++i])){o=e.strstart+MAX_MATCH;do;while(n===l[++i]&&n===l[++i]&&n===l[++i]&&n===l[++i]&&n===l[++i]&&n===l[++i]&&n===l[++i]&&n===l[++i]&&i<o);e.match_length=MAX_MATCH-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=MIN_MATCH?(r=_tr_tally(e,1,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(fill_window(e),e.lookahead===0)){if(t===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(e.match_length=0,r=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=e=>{e.window_size=2*e.w_size,zero$3(e.head),e.max_lazy_match=configuration_table[e.level].max_lazy,e.good_match=configuration_table[e.level].good_length,e.nice_match=configuration_table[e.level].nice_length,e.max_chain_length=configuration_table[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=MIN_MATCH-1,e.match_available=0,e.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero$3(this.dyn_ltree),zero$3(this.dyn_dtree),zero$3(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero$3(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero$3(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==INIT_STATE&&t.status!==GZIP_STATE&&t.status!==EXTRA_STATE&&t.status!==NAME_STATE&&t.status!==COMMENT_STATE&&t.status!==HCRC_STATE&&t.status!==BUSY_STATE&&t.status!==FINISH_STATE?1:0},deflateResetKeep=e=>{if(deflateStateCheck(e))return err(e,Z_STREAM_ERROR$2);e.total_in=e.total_out=0,e.data_type=Z_UNKNOWN;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?GZIP_STATE:t.wrap?INIT_STATE:BUSY_STATE,e.adler=t.wrap===2?0:1,t.last_flush=-2,_tr_init(t),Z_OK$3},deflateReset=e=>{const t=deflateResetKeep(e);return t===Z_OK$3&&lm_init(e.state),t},deflateSetHeader=(e,t)=>deflateStateCheck(e)||e.state.wrap!==2?Z_STREAM_ERROR$2:(e.state.gzhead=t,Z_OK$3),deflateInit2=(e,t,r,n,i,o)=>{if(!e)return Z_STREAM_ERROR$2;let l=1;if(t===Z_DEFAULT_COMPRESSION$1&&(t=6),n<0?(l=0,n=-n):n>15&&(l=2,n-=16),i<1||i>MAX_MEM_LEVEL||r!==Z_DEFLATED$2||n<8||n>15||t<0||t>9||o<0||o>Z_FIXED||n===8&&l!==1)return err(e,Z_STREAM_ERROR$2);n===8&&(n=9);const u=new DeflateState;return e.state=u,u.strm=e,u.status=INIT_STATE,u.wrap=l,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=i+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+MIN_MATCH-1)/MIN_MATCH),u.window=new Uint8Array(u.w_size*2),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=(u.lit_bufsize-1)*3,u.level=t,u.strategy=o,u.method=r,deflateReset(e)},deflateInit=(e,t)=>deflateInit2(e,t,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(e,t)=>{if(deflateStateCheck(e)||t>Z_BLOCK$1||t<0)return e?err(e,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===FINISH_STATE&&t!==Z_FINISH$3)return err(e,e.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const n=r.last_flush;if(r.last_flush=t,r.pending!==0){if(flush_pending(e),e.avail_out===0)return r.last_flush=-1,Z_OK$3}else if(e.avail_in===0&&rank$2(t)<=rank$2(n)&&t!==Z_FINISH$3)return err(e,Z_BUF_ERROR$1);if(r.status===FINISH_STATE&&e.avail_in!==0)return err(e,Z_BUF_ERROR$1);if(r.status===INIT_STATE&&r.wrap===0&&(r.status=BUSY_STATE),r.status===INIT_STATE){let i=Z_DEFLATED$2+(r.w_bits-8<<4)<<8,o=-1;if(r.strategy>=Z_HUFFMAN_ONLY||r.level<2?o=0:r.level<6?o=1:r.level===6?o=2:o=3,i|=o<<6,r.strstart!==0&&(i|=PRESET_DICT),i+=31-i%31,putShortMSB(r,i),r.strstart!==0&&(putShortMSB(r,e.adler>>>16),putShortMSB(r,e.adler&65535)),e.adler=1,r.status=BUSY_STATE,flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(r.status===GZIP_STATE){if(e.adler=0,put_byte(r,31),put_byte(r,139),put_byte(r,8),r.gzhead)put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),put_byte(r,r.gzhead.time&255),put_byte(r,r.gzhead.time>>8&255),put_byte(r,r.gzhead.time>>16&255),put_byte(r,r.gzhead.time>>24&255),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(put_byte(r,r.gzhead.extra.length&255),put_byte(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=EXTRA_STATE;else if(put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,OS_CODE),r.status=BUSY_STATE,flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(r.status===EXTRA_STATE){if(r.gzhead.extra){let i=r.pending,o=(r.gzhead.extra.length&65535)-r.gzindex;for(;r.pending+o>r.pending_buf_size;){let u=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+u),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex+=u,flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3;i=0,o-=u}let l=new Uint8Array(r.gzhead.extra);r.pending_buf.set(l.subarray(r.gzindex,r.gzindex+o),r.pending),r.pending+=o,r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=NAME_STATE}if(r.status===NAME_STATE){if(r.gzhead.name){let i=r.pending,o;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-i,i)),flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3;i=0}r.gzindex<r.gzhead.name.length?o=r.gzhead.name.charCodeAt(r.gzindex++)&255:o=0,put_byte(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=COMMENT_STATE}if(r.status===COMMENT_STATE){if(r.gzhead.comment){let i=r.pending,o;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-i,i)),flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3;i=0}r.gzindex<r.gzhead.comment.length?o=r.gzhead.comment.charCodeAt(r.gzindex++)&255:o=0,put_byte(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-i,i))}r.status=HCRC_STATE}if(r.status===HCRC_STATE){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(flush_pending(e),r.pending!==0))return r.last_flush=-1,Z_OK$3;put_byte(r,e.adler&255),put_byte(r,e.adler>>8&255),e.adler=0}if(r.status=BUSY_STATE,flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(e.avail_in!==0||r.lookahead!==0||t!==Z_NO_FLUSH$2&&r.status!==FINISH_STATE){let i=r.level===0?deflate_stored(r,t):r.strategy===Z_HUFFMAN_ONLY?deflate_huff(r,t):r.strategy===Z_RLE?deflate_rle(r,t):configuration_table[r.level].func(r,t);if((i===BS_FINISH_STARTED||i===BS_FINISH_DONE)&&(r.status=FINISH_STATE),i===BS_NEED_MORE||i===BS_FINISH_STARTED)return e.avail_out===0&&(r.last_flush=-1),Z_OK$3;if(i===BS_BLOCK_DONE&&(t===Z_PARTIAL_FLUSH?_tr_align(r):t!==Z_BLOCK$1&&(_tr_stored_block(r,0,0,!1),t===Z_FULL_FLUSH$1&&(zero$3(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),flush_pending(e),e.avail_out===0))return r.last_flush=-1,Z_OK$3}return t!==Z_FINISH$3?Z_OK$3:r.wrap<=0?Z_STREAM_END$3:(r.wrap===2?(put_byte(r,e.adler&255),put_byte(r,e.adler>>8&255),put_byte(r,e.adler>>16&255),put_byte(r,e.adler>>24&255),put_byte(r,e.total_in&255),put_byte(r,e.total_in>>8&255),put_byte(r,e.total_in>>16&255),put_byte(r,e.total_in>>24&255)):(putShortMSB(r,e.adler>>>16),putShortMSB(r,e.adler&65535)),flush_pending(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=e=>{if(deflateStateCheck(e))return Z_STREAM_ERROR$2;const t=e.state.status;return e.state=null,t===BUSY_STATE?err(e,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(e,t)=>{let r=t.length;if(deflateStateCheck(e))return Z_STREAM_ERROR$2;const n=e.state,i=n.wrap;if(i===2||i===1&&n.status!==INIT_STATE||n.lookahead)return Z_STREAM_ERROR$2;if(i===1&&(e.adler=adler32_1(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){i===0&&(zero$3(n.head),n.strstart=0,n.block_start=0,n.insert=0);let h=new Uint8Array(n.w_size);h.set(t.subarray(r-n.w_size,r),0),t=h,r=n.w_size}const o=e.avail_in,l=e.next_in,u=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,fill_window(n);n.lookahead>=MIN_MATCH;){let h=n.strstart,f=n.lookahead-(MIN_MATCH-1);do n.ins_h=HASH(n,n.ins_h,n.window[h+MIN_MATCH-1]),n.prev[h&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=h,h++;while(--f);n.strstart=h,n.lookahead=MIN_MATCH-1,fill_window(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=MIN_MATCH-1,n.match_available=0,e.next_in=l,e.input=u,e.avail_in=o,n.wrap=i,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var assign=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(!!r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const n in r)_has(r,n)&&(e[n]=r[n])}}return e},flattenChunks=e=>{let t=0;for(let n=0,i=e.length;n<i;n++)t+=e[n].length;const r=new Uint8Array(t);for(let n=0,i=0,o=e.length;n<o;n++){let l=e[n];r.set(l,i),i+=l.length}return r},common$1={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let e=0;e<256;e++)_utf8len[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,n,i,o,l=e.length,u=0;for(i=0;i<l;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<l&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(u),o=0,i=0;o<u;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<l&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};const buf2binstring=(e,t)=>{if(t<65534&&e.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r};var buf2string=(e,t)=>{const r=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let n,i;const o=new Array(r*2);for(i=0,n=0;n<r;){let l=e[n++];if(l<128){o[i++]=l;continue}let u=_utf8len[l];if(u>4){o[i++]=65533,n+=u-1;continue}for(l&=u===2?31:u===3?15:7;u>1&&n<r;)l=l<<6|e[n++]&63,u--;if(u>1){o[i++]=65533;continue}l<65536?o[i++]=l:(l-=65536,o[i++]=55296|l>>10&1023,o[i++]=56320|l&1023)}return buf2binstring(o,i)},utf8border=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let r=t-1;for(;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+_utf8len[e[r]]>t?r:t},strings={string2buf,buf2string,utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(e){this.options=common$1.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=deflate_1$2.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Z_OK$2)throw new Error(messages$1[r]);if(t.header&&deflate_1$2.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=strings.string2buf(t.dictionary):toString$1.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=deflate_1$2.deflateSetDictionary(this.strm,n),r!==Z_OK$2)throw new Error(messages$1[r]);this._dict_set=!0}}Deflate$1.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof e=="string"?r.input=strings.string2buf(e):toString$1.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===Z_SYNC_FLUSH||o===Z_FULL_FLUSH)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(i=deflate_1$2.deflate(r,o),i===Z_STREAM_END$2)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=deflate_1$2.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Z_OK$2;if(r.avail_out===0){this.onData(r.output);continue}if(o>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0};Deflate$1.prototype.onData=function(e){this.chunks.push(e)};Deflate$1.prototype.onEnd=function(e){e===Z_OK$2&&(this.result=common$1.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function deflate$1(e,t){const r=new Deflate$1(t);if(r.push(e,!0),r.err)throw r.msg||messages$1[r.err];return r.result}function deflateRaw$1(e,t){return t=t||{},t.raw=!0,deflate$1(e,t)}function gzip$1(e,t){return t=t||{},t.gzip=!0,deflate$1(e,t)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,constants$1=constants$2,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1,constants:constants$1};const BAD$1=16209,TYPE$1=16191;var inffast=function e(t,r){let n,i,o,l,u,h,f,d,g,p,m,b,$,S,R,L,N,F,H,G,P,V,z,W;const T=t.state;n=t.next_in,z=t.input,i=n+(t.avail_in-5),o=t.next_out,W=t.output,l=o-(r-t.avail_out),u=o+(t.avail_out-257),h=T.dmax,f=T.wsize,d=T.whave,g=T.wnext,p=T.window,m=T.hold,b=T.bits,$=T.lencode,S=T.distcode,R=(1<<T.lenbits)-1,L=(1<<T.distbits)-1;e:do{b<15&&(m+=z[n++]<<b,b+=8,m+=z[n++]<<b,b+=8),N=$[m&R];t:for(;;){if(F=N>>>24,m>>>=F,b-=F,F=N>>>16&255,F===0)W[o++]=N&65535;else if(F&16){H=N&65535,F&=15,F&&(b<F&&(m+=z[n++]<<b,b+=8),H+=m&(1<<F)-1,m>>>=F,b-=F),b<15&&(m+=z[n++]<<b,b+=8,m+=z[n++]<<b,b+=8),N=S[m&L];r:for(;;){if(F=N>>>24,m>>>=F,b-=F,F=N>>>16&255,F&16){if(G=N&65535,F&=15,b<F&&(m+=z[n++]<<b,b+=8,b<F&&(m+=z[n++]<<b,b+=8)),G+=m&(1<<F)-1,G>h){t.msg="invalid distance too far back",T.mode=BAD$1;break e}if(m>>>=F,b-=F,F=o-l,G>F){if(F=G-F,F>d&&T.sane){t.msg="invalid distance too far back",T.mode=BAD$1;break e}if(P=0,V=p,g===0){if(P+=f-F,F<H){H-=F;do W[o++]=p[P++];while(--F);P=o-G,V=W}}else if(g<F){if(P+=f+g-F,F-=g,F<H){H-=F;do W[o++]=p[P++];while(--F);if(P=0,g<H){F=g,H-=F;do W[o++]=p[P++];while(--F);P=o-G,V=W}}}else if(P+=g-F,F<H){H-=F;do W[o++]=p[P++];while(--F);P=o-G,V=W}for(;H>2;)W[o++]=V[P++],W[o++]=V[P++],W[o++]=V[P++],H-=3;H&&(W[o++]=V[P++],H>1&&(W[o++]=V[P++]))}else{P=o-G;do W[o++]=W[P++],W[o++]=W[P++],W[o++]=W[P++],H-=3;while(H>2);H&&(W[o++]=W[P++],H>1&&(W[o++]=W[P++]))}}else if((F&64)===0){N=S[(N&65535)+(m&(1<<F)-1)];continue r}else{t.msg="invalid distance code",T.mode=BAD$1;break e}break}}else if((F&64)===0){N=$[(N&65535)+(m&(1<<F)-1)];continue t}else if(F&32){T.mode=TYPE$1;break e}else{t.msg="invalid literal/length code",T.mode=BAD$1;break e}break}}while(n<i&&o<u);H=b>>3,n-=H,b-=H<<3,m&=(1<<b)-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?5+(i-n):5-(n-i),t.avail_out=o<u?257+(u-o):257-(o-u),T.hold=m,T.bits=b};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=(e,t,r,n,i,o,l,u)=>{const h=u.bits;let f=0,d=0,g=0,p=0,m=0,b=0,$=0,S=0,R=0,L=0,N,F,H,G,P,V=null,z;const W=new Uint16Array(MAXBITS+1),T=new Uint16Array(MAXBITS+1);let U=null,I,ae,Q;for(f=0;f<=MAXBITS;f++)W[f]=0;for(d=0;d<n;d++)W[t[r+d]]++;for(m=h,p=MAXBITS;p>=1&&W[p]===0;p--);if(m>p&&(m=p),p===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,u.bits=1,0;for(g=1;g<p&&W[g]===0;g++);for(m<g&&(m=g),S=1,f=1;f<=MAXBITS;f++)if(S<<=1,S-=W[f],S<0)return-1;if(S>0&&(e===CODES$1||p!==1))return-1;for(T[1]=0,f=1;f<MAXBITS;f++)T[f+1]=T[f]+W[f];for(d=0;d<n;d++)t[r+d]!==0&&(l[T[t[r+d]]++]=d);if(e===CODES$1?(V=U=l,z=20):e===LENS$1?(V=lbase,U=lext,z=257):(V=dbase,U=dext,z=0),L=0,d=0,f=g,P=o,b=m,$=0,H=-1,R=1<<m,G=R-1,e===LENS$1&&R>ENOUGH_LENS$1||e===DISTS$1&&R>ENOUGH_DISTS$1)return 1;for(;;){I=f-$,l[d]+1<z?(ae=0,Q=l[d]):l[d]>=z?(ae=U[l[d]-z],Q=V[l[d]-z]):(ae=32+64,Q=0),N=1<<f-$,F=1<<b,g=F;do F-=N,i[P+(L>>$)+F]=I<<24|ae<<16|Q|0;while(F!==0);for(N=1<<f-1;L&N;)N>>=1;if(N!==0?(L&=N-1,L+=N):L=0,d++,--W[f]===0){if(f===p)break;f=t[r+l[d]]}if(f>m&&(L&G)!==H){for($===0&&($=m),P+=g,b=f-$,S=1<<b;b+$<p&&(S-=W[b+$],!(S<=0));)b++,S<<=1;if(R+=1<<b,e===LENS$1&&R>ENOUGH_LENS$1||e===DISTS$1&&R>ENOUGH_DISTS$1)return 1;H=L&G,i[H]=m<<24|b<<16|P-o|0}}return L!==0&&(i[P+L]=f-$<<24|64<<16|0),u.bits=m,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT$1=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE$2=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<HEAD||t.mode>SYNC?1:0},inflateResetKeep=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=HEAD,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(ENOUGH_LENS),t.distcode=t.distdyn=new Int32Array(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK$1},inflateReset=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)},inflateReset2=(e,t)=>{let r;if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const n=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR$1:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,inflateReset(e))},inflateInit2=(e,t)=>{if(!e)return Z_STREAM_ERROR$1;const r=new InflateState;e.state=r,r.strm=e,r.window=null,r.mode=HEAD;const n=inflateReset2(e,t);return n!==Z_OK$1&&(e.state=null),n},inflateInit=e=>inflateInit2(e,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=e=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inftrees(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inftrees(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5},updatewindow=(e,t,r,n)=>{let i;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),n>=o.wsize?(o.window.set(t.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(t.subarray(r-n,r-n+i),o.wnext),n-=i,n?(o.window.set(t.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},inflate$2=(e,t)=>{let r,n,i,o,l,u,h,f,d,g,p,m,b,$,S=0,R,L,N,F,H,G,P,V;const z=new Uint8Array(4);let W,T;const U=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(e)||!e.output||!e.input&&e.avail_in!==0)return Z_STREAM_ERROR$1;r=e.state,r.mode===TYPE$2&&(r.mode=TYPEDO),l=e.next_out,i=e.output,h=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,f=r.hold,d=r.bits,g=u,p=h,V=Z_OK$1;e:for(;;)switch(r.mode){case HEAD:if(r.wrap===0){r.mode=TYPEDO;break}for(;d<16;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if(r.wrap&2&&f===35615){r.wbits===0&&(r.wbits=15),r.check=0,z[0]=f&255,z[1]=f>>>8&255,r.check=crc32_1(r.check,z,2,0),f=0,d=0,r.mode=FLAGS;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=BAD;break}if((f&15)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(f>>>=4,d-=4,P=(f&15)+8,r.wbits===0&&(r.wbits=P),P>15||P>r.wbits){e.msg="invalid window size",r.mode=BAD;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=f&512?DICTID:TYPE$2,f=0,d=0;break;case FLAGS:for(;d<16;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if(r.flags=f,(r.flags&255)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=BAD;break}r.head&&(r.head.text=f>>8&1),r.flags&512&&r.wrap&4&&(z[0]=f&255,z[1]=f>>>8&255,r.check=crc32_1(r.check,z,2,0)),f=0,d=0,r.mode=TIME;case TIME:for(;d<32;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}r.head&&(r.head.time=f),r.flags&512&&r.wrap&4&&(z[0]=f&255,z[1]=f>>>8&255,z[2]=f>>>16&255,z[3]=f>>>24&255,r.check=crc32_1(r.check,z,4,0)),f=0,d=0,r.mode=OS;case OS:for(;d<16;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}r.head&&(r.head.xflags=f&255,r.head.os=f>>8),r.flags&512&&r.wrap&4&&(z[0]=f&255,z[1]=f>>>8&255,r.check=crc32_1(r.check,z,2,0)),f=0,d=0,r.mode=EXLEN;case EXLEN:if(r.flags&1024){for(;d<16;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}r.length=f,r.head&&(r.head.extra_len=f),r.flags&512&&r.wrap&4&&(z[0]=f&255,z[1]=f>>>8&255,r.check=crc32_1(r.check,z,2,0)),f=0,d=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(r.flags&1024&&(m=r.length,m>u&&(m=u),m&&(r.head&&(P=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+m),P)),r.flags&512&&r.wrap&4&&(r.check=crc32_1(r.check,n,m,o)),u-=m,o+=m,r.length-=m),r.length))break e;r.length=0,r.mode=NAME;case NAME:if(r.flags&2048){if(u===0)break e;m=0;do P=n[o+m++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P));while(P&&m<u);if(r.flags&512&&r.wrap&4&&(r.check=crc32_1(r.check,n,m,o)),u-=m,o+=m,P)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=COMMENT$1;case COMMENT$1:if(r.flags&4096){if(u===0)break e;m=0;do P=n[o+m++],r.head&&P&&r.length<65536&&(r.head.comment+=String.fromCharCode(P));while(P&&m<u);if(r.flags&512&&r.wrap&4&&(r.check=crc32_1(r.check,n,m,o)),u-=m,o+=m,P)break e}else r.head&&(r.head.comment=null);r.mode=HCRC;case HCRC:if(r.flags&512){for(;d<16;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if(r.wrap&4&&f!==(r.check&65535)){e.msg="header crc mismatch",r.mode=BAD;break}f=0,d=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=TYPE$2;break;case DICTID:for(;d<32;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}e.adler=r.check=zswap32(f),f=0,d=0,r.mode=DICT;case DICT:if(r.havedict===0)return e.next_out=l,e.avail_out=h,e.next_in=o,e.avail_in=u,r.hold=f,r.bits=d,Z_NEED_DICT$1;e.adler=r.check=1,r.mode=TYPE$2;case TYPE$2:if(t===Z_BLOCK||t===Z_TREES)break e;case TYPEDO:if(r.last){f>>>=d&7,d-=d&7,r.mode=CHECK;break}for(;d<3;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}switch(r.last=f&1,f>>>=1,d-=1,f&3){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,t===Z_TREES){f>>>=2,d-=2;break e}break;case 2:r.mode=TABLE;break;case 3:e.msg="invalid block type",r.mode=BAD}f>>>=2,d-=2;break;case STORED:for(f>>>=d&7,d-=d&7;d<32;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if((f&65535)!==(f>>>16^65535)){e.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=f&65535,f=0,d=0,r.mode=COPY_,t===Z_TREES)break e;case COPY_:r.mode=COPY;case COPY:if(m=r.length,m){if(m>u&&(m=u),m>h&&(m=h),m===0)break e;i.set(n.subarray(o,o+m),l),u-=m,o+=m,h-=m,l+=m,r.length-=m;break}r.mode=TYPE$2;break;case TABLE:for(;d<14;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if(r.nlen=(f&31)+257,f>>>=5,d-=5,r.ndist=(f&31)+1,f>>>=5,d-=5,r.ncode=(f&15)+4,f>>>=4,d-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have<r.ncode;){for(;d<3;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}r.lens[U[r.have++]]=f&7,f>>>=3,d-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,W={bits:r.lenbits},V=inftrees(CODES,r.lens,0,19,r.lencode,0,r.work,W),r.lenbits=W.bits,V){e.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have<r.nlen+r.ndist;){for(;S=r.lencode[f&(1<<r.lenbits)-1],R=S>>>24,L=S>>>16&255,N=S&65535,!(R<=d);){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if(N<16)f>>>=R,d-=R,r.lens[r.have++]=N;else{if(N===16){for(T=R+2;d<T;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if(f>>>=R,d-=R,r.have===0){e.msg="invalid bit length repeat",r.mode=BAD;break}P=r.lens[r.have-1],m=3+(f&3),f>>>=2,d-=2}else if(N===17){for(T=R+3;d<T;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}f>>>=R,d-=R,P=0,m=3+(f&7),f>>>=3,d-=3}else{for(T=R+7;d<T;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}f>>>=R,d-=R,P=0,m=11+(f&127),f>>>=7,d-=7}if(r.have+m>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=BAD;break}for(;m--;)r.lens[r.have++]=P}}if(r.mode===BAD)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,W={bits:r.lenbits},V=inftrees(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,W),r.lenbits=W.bits,V){e.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,W={bits:r.distbits},V=inftrees(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,W),r.distbits=W.bits,V){e.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,t===Z_TREES)break e;case LEN_:r.mode=LEN;case LEN:if(u>=6&&h>=258){e.next_out=l,e.avail_out=h,e.next_in=o,e.avail_in=u,r.hold=f,r.bits=d,inffast(e,p),l=e.next_out,i=e.output,h=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,f=r.hold,d=r.bits,r.mode===TYPE$2&&(r.back=-1);break}for(r.back=0;S=r.lencode[f&(1<<r.lenbits)-1],R=S>>>24,L=S>>>16&255,N=S&65535,!(R<=d);){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if(L&&(L&240)===0){for(F=R,H=L,G=N;S=r.lencode[G+((f&(1<<F+H)-1)>>F)],R=S>>>24,L=S>>>16&255,N=S&65535,!(F+R<=d);){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}f>>>=F,d-=F,r.back+=F}if(f>>>=R,d-=R,r.back+=R,r.length=N,L===0){r.mode=LIT;break}if(L&32){r.back=-1,r.mode=TYPE$2;break}if(L&64){e.msg="invalid literal/length code",r.mode=BAD;break}r.extra=L&15,r.mode=LENEXT;case LENEXT:if(r.extra){for(T=r.extra;d<T;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;S=r.distcode[f&(1<<r.distbits)-1],R=S>>>24,L=S>>>16&255,N=S&65535,!(R<=d);){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if((L&240)===0){for(F=R,H=L,G=N;S=r.distcode[G+((f&(1<<F+H)-1)>>F)],R=S>>>24,L=S>>>16&255,N=S&65535,!(F+R<=d);){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}f>>>=F,d-=F,r.back+=F}if(f>>>=R,d-=R,r.back+=R,L&64){e.msg="invalid distance code",r.mode=BAD;break}r.offset=N,r.extra=L&15,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(T=r.extra;d<T;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(h===0)break e;if(m=p-h,r.offset>m){if(m=r.offset-m,m>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=BAD;break}m>r.wnext?(m-=r.wnext,b=r.wsize-m):b=r.wnext-m,m>r.length&&(m=r.length),$=r.window}else $=i,b=l-r.offset,m=r.length;m>h&&(m=h),h-=m,r.length-=m;do i[l++]=$[b++];while(--m);r.length===0&&(r.mode=LEN);break;case LIT:if(h===0)break e;i[l++]=r.length,h--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;d<32;){if(u===0)break e;u--,f|=n[o++]<<d,d+=8}if(p-=h,e.total_out+=p,r.total+=p,r.wrap&4&&p&&(e.adler=r.check=r.flags?crc32_1(r.check,i,p,l-p):adler32_1(r.check,i,p,l-p)),p=h,r.wrap&4&&(r.flags?f:zswap32(f))!==r.check){e.msg="incorrect data check",r.mode=BAD;break}f=0,d=0}r.mode=LENGTH;case LENGTH:if(r.wrap&&r.flags){for(;d<32;){if(u===0)break e;u--,f+=n[o++]<<d,d+=8}if(r.wrap&4&&f!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=BAD;break}f=0,d=0}r.mode=DONE;case DONE:V=Z_STREAM_END$1;break e;case BAD:V=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return e.next_out=l,e.avail_out=h,e.next_in=o,e.avail_in=u,r.hold=f,r.bits=d,(r.wsize||p!==e.avail_out&&r.mode<BAD&&(r.mode<CHECK||t!==Z_FINISH$1))&&updatewindow(e,e.output,e.next_out,p-e.avail_out),g-=e.avail_in,p-=e.avail_out,e.total_in+=g,e.total_out+=p,r.total+=p,r.wrap&4&&p&&(e.adler=r.check=r.flags?crc32_1(r.check,i,p,e.next_out-p):adler32_1(r.check,i,p,e.next_out-p)),e.data_type=r.bits+(r.last?64:0)+(r.mode===TYPE$2?128:0)+(r.mode===LEN_||r.mode===COPY_?256:0),(g===0&&p===0||t===Z_FINISH$1)&&V===Z_OK$1&&(V=Z_BUF_ERROR),V},inflateEnd=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;let t=e.state;return t.window&&(t.window=null),e.state=null,Z_OK$1},inflateGetHeader=(e,t)=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const r=e.state;return(r.wrap&2)===0?Z_STREAM_ERROR$1:(r.head=t,t.done=!1,Z_OK$1)},inflateSetDictionary=(e,t)=>{const r=t.length;let n,i,o;return inflateStateCheck(e)||(n=e.state,n.wrap!==0&&n.mode!==DICT)?Z_STREAM_ERROR$1:n.mode===DICT&&(i=1,i=adler32_1(i,t,r,0),i!==n.check)?Z_DATA_ERROR$1:(o=updatewindow(e,t,r,r),o?(n.mode=MEM,Z_MEM_ERROR$1):(n.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(e){this.options=common$1.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=inflate_1$2.inflateInit2(this.strm,t.windowBits);if(r!==Z_OK)throw new Error(messages$1[r]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=strings.string2buf(t.dictionary):toString.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=inflate_1$2.inflateSetDictionary(this.strm,t.dictionary),r!==Z_OK)))throw new Error(messages$1[r])}Inflate$1.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,l,u;if(this.ended)return!1;for(t===~~t?l=t:l=t===!0?Z_FINISH:Z_NO_FLUSH,toString.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=inflate_1$2.inflate(r,l),o===Z_NEED_DICT&&i&&(o=inflate_1$2.inflateSetDictionary(r,i),o===Z_OK?o=inflate_1$2.inflate(r,l):o===Z_DATA_ERROR&&(o=Z_NEED_DICT));r.avail_in>0&&o===Z_STREAM_END&&r.state.wrap>0&&e[r.next_in]!==0;)inflate_1$2.inflateReset(r),o=inflate_1$2.inflate(r,l);switch(o){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(o),this.ended=!0,!1}if(u=r.avail_out,r.next_out&&(r.avail_out===0||o===Z_STREAM_END))if(this.options.to==="string"){let h=strings.utf8border(r.output,r.next_out),f=r.next_out-h,d=strings.buf2string(r.output,h);r.next_out=f,r.avail_out=n-f,f&&r.output.set(r.output.subarray(h,h+f),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(o===Z_OK&&u===0)){if(o===Z_STREAM_END)return o=inflate_1$2.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};Inflate$1.prototype.onData=function(e){this.chunks.push(e)};Inflate$1.prototype.onEnd=function(e){e===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common$1.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function inflate$1(e,t){const r=new Inflate$1(t);if(r.push(e),r.err)throw r.msg||messages$1[r.err];return r.result}function inflateRaw$1(e,t){return t=t||{},t.raw=!0,inflate$1(e,t)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants$3=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants:constants$3};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var deflate_1=deflate,inflate_1=inflate;const _hasatob=typeof atob=="function",_hasbtoa=typeof btoa=="function",_hasBuffer=typeof Buffer=="function",_TD=typeof TextDecoder=="function"?new TextDecoder:void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(e=>{let t={};return e.forEach((r,n)=>t[r]=n),t})(b64chs),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):(e,t=r=>r)=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),_mkUriSafe=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),_tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=e=>{let t,r,n,i,o="";const l=e.length%3;for(let u=0;u<e.length;){if((r=e.charCodeAt(u++))>255||(n=e.charCodeAt(u++))>255||(i=e.charCodeAt(u++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=b64chs[t>>18&63]+b64chs[t>>12&63]+b64chs[t>>6&63]+b64chs[t&63]}return l?o.slice(0,l-3)+"===".substring(l):o},_btoa=_hasbtoa?e=>btoa(e):_hasBuffer?e=>Buffer.from(e,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?e=>Buffer.from(e).toString("base64"):e=>{let r=[];for(let n=0,i=e.length;n<i;n+=4096)r.push(_fromCC.apply(null,e.subarray(n,n+4096)));return _btoa(r.join(""))},fromUint8Array=(e,t=!1)=>t?_mkUriSafe(_fromUint8Array(e)):_fromUint8Array(e),cb_utob=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?_fromCC(192|t>>>6)+_fromCC(128|t&63):_fromCC(224|t>>>12&15)+_fromCC(128|t>>>6&63)+_fromCC(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return _fromCC(240|t>>>18&7)+_fromCC(128|t>>>12&63)+_fromCC(128|t>>>6&63)+_fromCC(128|t&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=e=>e.replace(re_utob,cb_utob),_encode=_hasBuffer?e=>Buffer.from(e,"utf8").toString("base64"):_TE?e=>_fromUint8Array(_TE.encode(e)):e=>_btoa(utob(e)),encode=(e,t=!1)=>t?_mkUriSafe(_encode(e)):_encode(e),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return _fromCC((r>>>10)+55296)+_fromCC((r&1023)+56320);case 3:return _fromCC((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return _fromCC((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=e=>e.replace(re_btou,cb_btou),atobPolyfill=e=>{if(e=e.replace(/\s+/g,""),!b64re.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r="",n,i;for(let o=0;o<e.length;)t=b64tab[e.charAt(o++)]<<18|b64tab[e.charAt(o++)]<<12|(n=b64tab[e.charAt(o++)])<<6|(i=b64tab[e.charAt(o++)]),r+=n===64?_fromCC(t>>16&255):i===64?_fromCC(t>>16&255,t>>8&255):_fromCC(t>>16&255,t>>8&255,t&255);return r},_atob=_hasatob?e=>atob(_tidyB64(e)):_hasBuffer?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?e=>_U8Afrom(Buffer.from(e,"base64")):e=>_U8Afrom(_atob(e),t=>t.charCodeAt(0)),toUint8Array=e=>_toUint8Array(_unURI(e)),_decode=_hasBuffer?e=>Buffer.from(e,"base64").toString("utf8"):_TD?e=>_TD.decode(_toUint8Array(e)):e=>btou(_atob(e)),_unURI=e=>_tidyB64(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),decode=e=>_decode(_unURI(e)),base64Serde={serialize:e=>encode(e,!0),deserialize:e=>decode(e)},pakoSerde={serialize:e=>{const t=new TextEncoder().encode(e),r=deflate_1(t,{level:9});return fromUint8Array(r,!0)},deserialize:e=>{const t=toUint8Array(e);return inflate_1(t,{to:"string"})}},serdes={base64:base64Serde,pako:pakoSerde},serializeState=(e,t="pako")=>{if(!(t in serdes))throw new Error(`Unknown serde type: ${t}`);const r=JSON.stringify(e),n=serdes[t].serialize(r);return`${t}:${n}`},deserializeState=e=>{let t,r;if(e.includes(":")){let i;if([i,r]=e.split(":"),i in serdes)t=i;else throw new Error(`Unknown serde type: ${i}`)}else t="base64",r=e;const n=serdes[t].deserialize(r);return JSON.parse(n)};var dist$1={},words={};(function(e){var t=commonjsGlobal$1&&commonjsGlobal$1.__values||function(n){var i=typeof Symbol=="function"&&Symbol.iterator,o=i&&n[i],l=0;if(o)return o.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&l>=n.length&&(n=void 0),{value:n&&n[l++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.getWordsByCategory=e.wordList=void 0,e.wordList={noun:[{word:"accountant",categories:["profession"]},{word:"ability",categories:["thing"]},{word:"accident",categories:["thing"]},{word:"account",categories:["thing"]},{word:"action",categories:["thing"]},{word:"activity",categories:["thing"]},{word:"actor",categories:["profession"]},{word:"ad",categories:["media"]},{word:"addition",categories:["thing"]},{word:"address",categories:["thing"]},{word:"adult",categories:["people"]},{word:"advantage",categories:["thing"]},{word:"advertisement",categories:["media"]},{word:"afternoon",categories:["time"]},{word:"agency",categories:["thing"]},{word:"agent",categories:["people"]},{word:"air",categories:["thing"]},{word:"airline",categories:["transportation"]},{word:"airplane",categories:["transportation"]},{word:"airport",categories:["transportation","place"]},{word:"alarm",categories:["thing"]},{word:"alligator",categories:["animals"]},{word:"ambulance",categories:["health"]},{word:"analyst",categories:["profession"]},{word:"angle",categories:["thing"]},{word:"animal",categories:["animals"]},{word:"answer",categories:["thing"]},{word:"apartment",categories:["place"]},{word:"apple",categories:["food"]},{word:"application",categories:["thing"]},{word:"appointment",categories:["thing"]},{word:"architect",categories:["profession"]},{word:"argument",categories:["thing"]},{word:"area",categories:["thing"]},{word:"arm",categories:["thing"]},{word:"army",categories:["thing"]},{word:"art",categories:["thing"]},{word:"article",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","animals"]},{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:"abandoned",categories:["condition"]},{word:"abiding",categories:["personality"]},{word:"able",categories:["condition"]},{word:"abrasive",categories:["condition","personality"]},{word:"abnormal",categories:["condition"]},{word:"absurd",categories:["condition"]},{word:"abundant",categories:["quantity"]},{word:"acceptable",categories:["condition"]},{word:"acidic",categories:["taste"]},{word:"acoustic",categories:["sounds"]},{word:"acrid",categories:["condition"]},{word:"adamant",categories:["personality"]},{word:"adorable",categories:["personality"]},{word:"adventurous",categories:["personality"]},{word:"aggressive",categories:["personality"]},{word:"agitated",categories:["personality"]},{word:"agreeable",categories:["personality"]},{word:"alert",categories:["condition"]},{word:"alive",categories:["condition"]},{word:"aloof",categories:["personality"]},{word:"ambitious",categories:["personality"]},{word:"ancient",categories:["time"]},{word:"angry",categories:["personality"]},{word:"annoyed",categories:["personality"]},{word:"antsy",categories:["personality"]},{word:"anxious",categories:["personality"]},{word:"appalling",categories:["personality"]},{word:"appetizing",categories:["taste"]},{word:"apprehensive",categories:["personality"]},{word:"arrogant",categories:["personality"]},{word:"ashamed",categories:["personality"]},{word:"astonishing",categories:["personality"]},{word:"attractive",categories:["appearance"]},{word:"average",categories:["appearance"]},{word:"bad",categories:["condition"]},{word:"bald",categories:["appearance"]},{word:"bashful",categories:["personality"]},{word:"beautiful",categories:["appearance"]},{word:"beefy",categories:["appearance"]},{word:"belligerent",categories:["personality"]},{word:"bent",categories:["condition"]},{word:"better",categories:["condition"]},{word:"best",categories:["condition"]},{word:"better",categories:["condition"]},{word:"bewildered",categories:["personality"]},{word:"big",categories:["size"]},{word:"billions",categories:["quantity"]},{word:"billowy",categories:["appearance"]},{word:"bitter",categories:["taste"]},{word:"black",categories:["color"]},{word:"bland",categories:["taste"]},{word:"blue",categories:["color"]},{word:"blushing",categories:["appearance"]},{word:"bored",categories:["personality"]},{word:"boring",categories:["personality"]},{word:"boundless",categories:["personality"]},{word:"brainy",categories:["personality"]},{word:"brash",categories:["personality"]},{word:"brave",categories:["personality"]},{word:"breezy",categories:["touch"]},{word:"brief",categories:["time"]},{word:"bright",categories:["appearance"]},{word:"broad",categories:["shapes"]},{word:"broken",categories:["condition"]},{word:"brown",categories:["color"]},{word:"bulky",categories:["appearance"]},{word:"bumpy",categories:["touch"]},{word:"burly",categories:["appearance"]},{word:"busy",categories:["personality"]},{word:"cagey",categories:["personality"]},{word:"calm",categories:["personality"]},{word:"callous",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"]}]};function r(n,i){var o,l;i===void 0&&(i=[]);var u=new Set(i),h=[];try{for(var f=t(e.wordList[n]),d=f.next();!d.done;d=f.next()){var g=d.value;(i.length===0||g.categories.some(function(p){return u.has(p)}))&&h.push(g.word)}}catch(p){o={error:p}}finally{try{d&&!d.done&&(l=f.return)&&l.call(f)}finally{if(o)throw o.error}}return h}e.getWordsByCategory=r})(words);var __assign=commonjsGlobal$1&&commonjsGlobal$1.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},__assign.apply(this,arguments)};Object.defineProperty(dist$1,"__esModule",{value:!0});dist$1.totalUniqueSlugs=generateSlug_1=dist$1.generateSlug=void 0;var words_1=words,DEFAULT_NUMBER_OF_WORDS=3;function generateSlug(e,t){for(var r=e||DEFAULT_NUMBER_OF_WORDS,n={partsOfSpeech:getDefaultPartsOfSpeech(r),categories:{},format:"kebab"},i=__assign(__assign({},n),t),o=[],l=0;l<r;l++){var u=i.partsOfSpeech[l],h=words_1.getWordsByCategory(i.partsOfSpeech[l],i.categories[u]),f=h[Math.floor(Math.random()*h.length)];o.push(f)}return formatter(o,i.format)}var generateSlug_1=dist$1.generateSlug=generateSlug;function getDefaultPartsOfSpeech(e){for(var t=[],r=0;r<e-1;r++)t.push("adjective");return t.push("noun"),t}function formatter(e,t){return t==="kebab"?e.join("-").toLowerCase():t==="camel"?e.map(function(r,n){return n===0?r.toLowerCase():r[0].toUpperCase()+r.slice(1).toLowerCase()}).join(""):t==="lower"?e.join(" ").toLowerCase():t==="sentence"?e.map(function(r,n){return n===0?r[0].toUpperCase()+r.slice(1).toLowerCase():r}).join(" "):e.map(function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()}).join(" ")}function totalUniqueSlugs(e,t){for(var r,n,i=words_1.getWordsByCategory("adjective",(r=t==null?void 0:t.categories)===null||r===void 0?void 0:r.adjective).length,o=words_1.getWordsByCategory("noun",(n=t==null?void 0:t.categories)===null||n===void 0?void 0:n.noun).length,l={adjective:i,noun:o},u=e||DEFAULT_NUMBER_OF_WORDS,h=(t==null?void 0:t.partsOfSpeech)||getDefaultPartsOfSpeech(u),f=1,d=0;d<u;d++)f*=l[h[d]];return f}dist$1.totalUniqueSlugs=totalUniqueSlugs;let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let e=0;e<256;++e)byteToHex.push((e+256).toString(16).slice(1));function unsafeStringify(e,t=0){return(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase()}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(e,t,r){if(native.randomUUID&&!t&&!e)return native.randomUUID();e=e||{};const n=e.random||(e.rng||rng)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return unsafeStringify(n)}const MAX_AUTO_HISTORY_LENGTH=30,historyModeStore=persist(writable("manual"),localStorage(),"autoHistoryMode"),autoHistoryStore=persist(writable([]),localStorage(),"autoHistoryStore"),manualHistoryStore=persist(writable([]),localStorage(),"manualHistoryStore"),loaderHistoryStore=writable([]),historyStore=derived([historyModeStore,autoHistoryStore,manualHistoryStore,loaderHistoryStore],([e,t,r,n],i)=>{i(e==="auto"?t:e==="manual"?r:e==="loader"?n:t)}),addHistoryEntry=e=>{const t={...e,id:v4()};if(t.type==="loader"){loaderHistoryStore.update(r=>[t,...r]);return}t.name||(t.name=generateSlug_1(2)),t.type==="auto"?autoHistoryStore.update(r=>(r.length>=MAX_AUTO_HISTORY_LENGTH&&(r=r.slice(0,MAX_AUTO_HISTORY_LENGTH-1)),[t,...r])):t.type==="manual"&&(manualHistoryStore.update(r=>[t,...r]),logEvent("history",{action:"save"}))},clearHistoryData=e=>{(get_store_value(historyModeStore)==="auto"?autoHistoryStore:manualHistoryStore).update(t=>(get_store_value(historyModeStore)!=="loader"&&(t=t.filter(({id:r})=>e&&r!=e),logEvent("history",{action:"clear",type:e?"single":"all"})),t))},getPreviousState=e=>{const t=get_store_value(e?autoHistoryStore:manualHistoryStore);return t.length>0?JSON.stringify(t[0].state):""},restoreHistory=e=>{const t=e.filter(validateEntry),r=e.length-t.length;if(r>0&&(console.error(`${r} invalid history entries were removed.`),console.error(e)),t.length>0){let n=0;(t[0].type==="auto"?autoHistoryStore:manualHistoryStore).update(i=>{const o=new Set(i.map(({id:h})=>h)),l=t.filter(({id:h})=>!o.has(h));n=l.length;const u=[...i,...l];return u.sort((h,f)=>f.time-h.time),u}),alert(`${n} entries restored. ${r} invalid, ${t.length-n} duplicates.`),logEvent("history",{action:"restore",success:n,invalid:r,duplicates:t.length-n})}else alert("No valid entries found.")},injectHistoryIDs=()=>{const e=t=>{for(const r of t)r.id||(r.id=v4());return t};autoHistoryStore.update(e),manualHistoryStore.update(e)},validateEntry=e=>e.type&&e.state&&e.time&&!0,codeFileName="code.mmd",configFileName="config.json",isValidGist=e=>codeFileName in e,getFileContent=async e=>e.truncated?await(await fetch(e.raw_url)).text():e.content,getGistData=async e=>{const t=e.split("github.com").pop();if(!t)throw new Error("Invalid GitHub URL"+e);const[r,n,i,o]=t.split("/"),{html_url:l,files:u,history:h}=await(await fetch(`https://api.github.com/gists/${i}${o?"/"+o:""}`)).json();if(isValidGist(u)){const f=await getFileContent(u[codeFileName]);let d="{}";configFileName in u&&(d=await getFileContent(u[configFileName]));const g=h[0];return{url:`${l}/${g.version}`,code:f,config:d,author:g.user.login,time:new Date(g.committed_at).getTime(),version:g.version.slice(-7)}}else throw new Error("Invalid gist provided")},getStateFromGist=(e,t=e.url)=>{const r={...defaultState,code:e.code,loader:{type:"gist",config:{url:t}}};return e.config&&(r.mermaid=e.config),r},loadGistData=async e=>{const t=e.split("github.com").pop();if(!t)throw new Error("Invalid GitHub URL"+e);const[r,n,i,o]=t.split("/"),{history:l}=await(await fetch(`https://api.github.com/gists/${i}${o?"/"+o:""}`)).json(),u=[];for(const d of l){const g=await getGistData(d.url).catch(()=>{});g&&u.push(g)}if(u.length===0)throw new Error("Invalid gist provided");u.reverse();const h=u.slice(-1).pop();if(!h)throw new Error("Invalid gist provided");const f=getStateFromGist(h,e);for(const d of u)addHistoryEntry({state:getStateFromGist(d),time:d.time,type:"loader",url:d.url,name:`${d.author} v${d.version}`});return f},loaders={gist:loadGistData},loadDataFromUrl=async()=>{var u,h;const e=new URLSearchParams(window.location.search);let t=defaultState,r,n,i=!1;const o=(u=e.get("code"))!=null?u:void 0,l=(h=e.get("config"))!=null?h:void 0;if(o&&(r=await(await fetch(o)).text(),i=!0),l?n=await(await fetch(l)).text():n=defaultState.mermaid,r){if(!o)throw new Error("Code URL is not defined");t={code:r,mermaid:n,loader:{type:"files",config:{codeURL:o,configURL:l}}}}else for(const[f,d]of e.entries())if(f in loaders)try{t=await loaders[f](d),i=!0;break}catch(g){console.error(g)}i&&updateCodeStore({...t,autoSync:!0,updateDiagram:!0})},migrations={injectHistoryIDs},migrationStore=persist(writable({version:-1}),localStorage(),"migrations"),applyMigrations=()=>{const{version:e}=get_store_value(migrationStore),t=Object.entries(migrations);if(e!==t.length-1){console.log(`Current migration version: v${e}. Migrating to v${t.length-1}.`);for(let r=e+1;r<t.length;r++){const[n,i]=t[r];console.log(`Applying migration ${r}: ${n}.`),i(),logEvent("migration",{key:n}),migrationStore.set({version:r})}logEvent("migration",{status:"complete",from:e,to:t.length-1})}};function commonjsRequire$1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var moment_min={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(commonjsGlobal$1,function(){var r;function n(){return r.apply(null,arguments)}function i(v){return v instanceof Array||Object.prototype.toString.call(v)==="[object Array]"}function o(v){return v!=null&&Object.prototype.toString.call(v)==="[object Object]"}function l(v,O){return Object.prototype.hasOwnProperty.call(v,O)}function u(v){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(v).length===0;for(var O in v)if(l(v,O))return;return 1}function h(v){return v===void 0}function f(v){return typeof v=="number"||Object.prototype.toString.call(v)==="[object Number]"}function d(v){return v instanceof Date||Object.prototype.toString.call(v)==="[object Date]"}function g(v,O){for(var j=[],ne=v.length,le=0;le<ne;++le)j.push(O(v[le],le));return j}function p(v,O){for(var j in O)l(O,j)&&(v[j]=O[j]);return l(O,"toString")&&(v.toString=O.toString),l(O,"valueOf")&&(v.valueOf=O.valueOf),v}function m(v,O,j,ne){return zt(v,O,j,ne,!0).utc()}function b(v){return v._pf==null&&(v._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}),v._pf}function $(v){if(v._isValid==null){var O=b(v),j=R.call(O.parsedDateParts,function(ne){return ne!=null}),j=!isNaN(v._d.getTime())&&O.overflow<0&&!O.empty&&!O.invalidEra&&!O.invalidMonth&&!O.invalidWeekday&&!O.weekdayMismatch&&!O.nullInput&&!O.invalidFormat&&!O.userInvalidated&&(!O.meridiem||O.meridiem&&j);if(v._strict&&(j=j&&O.charsLeftOver===0&&O.unusedTokens.length===0&&O.bigHour===void 0),Object.isFrozen!=null&&Object.isFrozen(v))return j;v._isValid=j}return v._isValid}function S(v){var O=m(NaN);return v!=null?p(b(O),v):b(O).userInvalidated=!0,O}var R=Array.prototype.some||function(v){for(var O=Object(this),j=O.length>>>0,ne=0;ne<j;ne++)if(ne in O&&v.call(this,O[ne],ne,O))return!0;return!1},L=n.momentProperties=[],N=!1;function F(v,O){var j,ne,le,$e=L.length;if(h(O._isAMomentObject)||(v._isAMomentObject=O._isAMomentObject),h(O._i)||(v._i=O._i),h(O._f)||(v._f=O._f),h(O._l)||(v._l=O._l),h(O._strict)||(v._strict=O._strict),h(O._tzm)||(v._tzm=O._tzm),h(O._isUTC)||(v._isUTC=O._isUTC),h(O._offset)||(v._offset=O._offset),h(O._pf)||(v._pf=b(O)),h(O._locale)||(v._locale=O._locale),0<$e)for(j=0;j<$e;j++)h(le=O[ne=L[j]])||(v[ne]=le);return v}function H(v){F(this,v),this._d=new Date(v._d!=null?v._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),N===!1&&(N=!0,n.updateOffset(this),N=!1)}function G(v){return v instanceof H||v!=null&&v._isAMomentObject!=null}function P(v){n.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+v)}function V(v,O){var j=!0;return p(function(){if(n.deprecationHandler!=null&&n.deprecationHandler(null,v),j){for(var ne,le,$e=[],De=arguments.length,ze=0;ze<De;ze++){if(ne="",typeof arguments[ze]=="object"){for(le in ne+=`
|
|
[`+ze+"] ",arguments[0])l(arguments[0],le)&&(ne+=le+": "+arguments[0][le]+", ");ne=ne.slice(0,-2)}else ne=arguments[ze];$e.push(ne)}P(v+`
|
|
Arguments: `+Array.prototype.slice.call($e).join("")+`
|
|
`+new Error().stack),j=!1}return O.apply(this,arguments)},O)}var z={};function W(v,O){n.deprecationHandler!=null&&n.deprecationHandler(v,O),z[v]||(P(O),z[v]=!0)}function T(v){return typeof Function<"u"&&v instanceof Function||Object.prototype.toString.call(v)==="[object Function]"}function U(v,O){var j,ne=p({},v);for(j in O)l(O,j)&&(o(v[j])&&o(O[j])?(ne[j]={},p(ne[j],v[j]),p(ne[j],O[j])):O[j]!=null?ne[j]=O[j]:delete ne[j]);for(j in v)l(v,j)&&!l(O,j)&&o(v[j])&&(ne[j]=p({},ne[j]));return ne}function I(v){v!=null&&this.set(v)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;var ae=Object.keys||function(v){var O,j=[];for(O in v)l(v,O)&&j.push(O);return j};function Q(v,O,j){var ne=""+Math.abs(v);return(0<=v?j?"+":"":"-")+Math.pow(10,Math.max(0,O-ne.length)).toString().substr(1)+ne}var ue=/(\[[^\[]*\])|(\\)?([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,_e=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ke={},de={};function ce(v,O,j,ne){var le=typeof ne=="string"?function(){return this[ne]()}:ne;v&&(de[v]=le),O&&(de[O[0]]=function(){return Q(le.apply(this,arguments),O[1],O[2])}),j&&(de[j]=function(){return this.localeData().ordinal(le.apply(this,arguments),v)})}function he(v,O){return v.isValid()?(O=Se(O,v.localeData()),ke[O]=ke[O]||function(j){for(var ne,le=j.match(ue),$e=0,De=le.length;$e<De;$e++)de[le[$e]]?le[$e]=de[le[$e]]:le[$e]=(ne=le[$e]).match(/\[[\s\S]/)?ne.replace(/^\[|\]$/g,""):ne.replace(/\\/g,"");return function(ze){for(var Qe="",We=0;We<De;We++)Qe+=T(le[We])?le[We].call(ze,j):le[We];return Qe}}(O),ke[O](v)):v.localeData().invalidDate()}function Se(v,O){var j=5;function ne(le){return O.longDateFormat(le)||le}for(_e.lastIndex=0;0<=j&&_e.test(v);)v=v.replace(_e,ne),_e.lastIndex=0,--j;return v}var ve={};function me(v,O){var j=v.toLowerCase();ve[j]=ve[j+"s"]=ve[O]=v}function Ce(v){return typeof v=="string"?ve[v]||ve[v.toLowerCase()]:void 0}function xe(v){var O,j,ne={};for(j in v)l(v,j)&&(O=Ce(j))&&(ne[O]=v[j]);return ne}var Ne={};function pe(v,O){Ne[v]=O}function J(v){return v%4==0&&v%100!=0||v%400==0}function oe(v){return v<0?Math.ceil(v)||0:Math.floor(v)}function ee(O){var O=+O,j=0;return j=O!=0&&isFinite(O)?oe(O):j}function Z(v,O){return function(j){return j!=null?(se(this,v,j),n.updateOffset(this,O),this):ie(this,v)}}function ie(v,O){return v.isValid()?v._d["get"+(v._isUTC?"UTC":"")+O]():NaN}function se(v,O,j){v.isValid()&&!isNaN(j)&&(O==="FullYear"&&J(v.year())&&v.month()===1&&v.date()===29?(j=ee(j),v._d["set"+(v._isUTC?"UTC":"")+O](j,v.month(),Re(j,v.month()))):v._d["set"+(v._isUTC?"UTC":"")+O](j))}var te=/\d/,mt=/\d\d/,fe=/\d{3}/,_r=/\d{4}/,ur=/[+-]?\d{6}/,we=/\d\d?/,Ye=/\d\d\d\d?/,He=/\d\d\d\d\d\d?/,je=/\d{1,3}/,hr=/\d{1,4}/,lr=/[+-]?\d{1,6}/,Pe=/\d+/,Ee=/[+-]?\d+/,Ie=/Z|[+-]\d\d:?\d\d/gi,Le=/Z|[+-]\d\d(?::?\d\d)?/gi,Be=/[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 Te(v,O,j){rt[v]=T(O)?O:function(ne,le){return ne&&j?j:O}}function dt(v,O){return l(rt,v)?rt[v](O._strict,O._locale):new RegExp(Ge(v.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(j,ne,le,$e,De){return ne||le||$e||De})))}function Ge(v){return v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var rt={},it={};function st(v,O){var j,ne,le=O;for(typeof v=="string"&&(v=[v]),f(O)&&(le=function($e,De){De[O]=ee($e)}),ne=v.length,j=0;j<ne;j++)it[v[j]]=le}function wt(v,O){st(v,function(j,ne,le,$e){le._w=le._w||{},O(j,le._w,le,$e)})}var nt,Ke=0,Je=1,Oe=2,Me=3,Fe=4,qe=5,et=6,Ae=7,_t=8;function Re(v,O){if(isNaN(v)||isNaN(O))return NaN;var j=(O%(j=12)+j)%j;return v+=(O-j)/12,j==1?J(v)?29:28:31-j%7%2}nt=Array.prototype.indexOf||function(v){for(var O=0;O<this.length;++O)if(this[O]===v)return O;return-1},ce("M",["MM",2],"Mo",function(){return this.month()+1}),ce("MMM",0,0,function(v){return this.localeData().monthsShort(this,v)}),ce("MMMM",0,0,function(v){return this.localeData().months(this,v)}),me("month","M"),pe("month",8),Te("M",we),Te("MM",we,mt),Te("MMM",function(v,O){return O.monthsShortRegex(v)}),Te("MMMM",function(v,O){return O.monthsRegex(v)}),st(["M","MM"],function(v,O){O[Je]=ee(v)-1}),st(["MMM","MMMM"],function(v,O,j,ne){ne=j._locale.monthsParse(v,ne,j._strict),ne!=null?O[Je]=ne:b(j).invalidMonth=v});var lt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),bt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$t=Be,kt=Be;function tt(v,O){var j;if(v.isValid()){if(typeof O=="string"){if(/^\d+$/.test(O))O=ee(O);else if(!f(O=v.localeData().monthsParse(O)))return}j=Math.min(v.date(),Re(v.year(),O)),v._d["set"+(v._isUTC?"UTC":"")+"Month"](O,j)}}function ht(v){return v!=null?(tt(this,v),n.updateOffset(this,!0),this):ie(this,"Month")}function vt(){function v(De,ze){return ze.length-De.length}for(var O,j=[],ne=[],le=[],$e=0;$e<12;$e++)O=m([2e3,$e]),j.push(this.monthsShort(O,"")),ne.push(this.months(O,"")),le.push(this.months(O,"")),le.push(this.monthsShort(O,""));for(j.sort(v),ne.sort(v),le.sort(v),$e=0;$e<12;$e++)j[$e]=Ge(j[$e]),ne[$e]=Ge(ne[$e]);for($e=0;$e<24;$e++)le[$e]=Ge(le[$e]);this._monthsRegex=new RegExp("^("+le.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+ne.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+j.join("|")+")","i")}function gt(v){return J(v)?366:365}ce("Y",0,0,function(){var v=this.year();return v<=9999?Q(v,4):"+"+v}),ce(0,["YY",2],0,function(){return this.year()%100}),ce(0,["YYYY",4],0,"year"),ce(0,["YYYYY",5],0,"year"),ce(0,["YYYYYY",6,!0],0,"year"),me("year","y"),pe("year",1),Te("Y",Ee),Te("YY",we,mt),Te("YYYY",hr,_r),Te("YYYYY",lr,ur),Te("YYYYYY",lr,ur),st(["YYYYY","YYYYYY"],Ke),st("YYYY",function(v,O){O[Ke]=v.length===2?n.parseTwoDigitYear(v):ee(v)}),st("YY",function(v,O){O[Ke]=n.parseTwoDigitYear(v)}),st("Y",function(v,O){O[Ke]=parseInt(v,10)}),n.parseTwoDigitYear=function(v){return ee(v)+(68<ee(v)?1900:2e3)};var Dr=Z("FullYear",!0);function tr(v,O,j,ne,le,$e,De){var ze;return v<100&&0<=v?(ze=new Date(v+400,O,j,ne,le,$e,De),isFinite(ze.getFullYear())&&ze.setFullYear(v)):ze=new Date(v,O,j,ne,le,$e,De),ze}function Ht(v){var O;return v<100&&0<=v?((O=Array.prototype.slice.call(arguments))[0]=v+400,O=new Date(Date.UTC.apply(null,O)),isFinite(O.getUTCFullYear())&&O.setUTCFullYear(v)):O=new Date(Date.UTC.apply(null,arguments)),O}function St(v,O,j){return j=7+O-j,j-(7+Ht(v,0,j).getUTCDay()-O)%7-1}function ft(v,De,ze,ne,le){var $e,De=1+7*(De-1)+(7+ze-ne)%7+St(v,ne,le),ze=De<=0?gt($e=v-1)+De:De>gt(v)?($e=v+1,De-gt(v)):($e=v,De);return{year:$e,dayOfYear:ze}}function Nt(v,O,j){var ne,le,$e=St(v.year(),O,j),$e=Math.floor((v.dayOfYear()-$e-1)/7)+1;return $e<1?ne=$e+Pt(le=v.year()-1,O,j):$e>Pt(v.year(),O,j)?(ne=$e-Pt(v.year(),O,j),le=v.year()+1):(le=v.year(),ne=$e),{week:ne,year:le}}function Pt(v,le,j){var ne=St(v,le,j),le=St(v+1,le,j);return(gt(v)-ne+le)/7}ce("w",["ww",2],"wo","week"),ce("W",["WW",2],"Wo","isoWeek"),me("week","w"),me("isoWeek","W"),pe("week",5),pe("isoWeek",5),Te("w",we),Te("ww",we,mt),Te("W",we),Te("WW",we,mt),wt(["w","ww","W","WW"],function(v,O,j,ne){O[ne.substr(0,1)]=ee(v)});function Lt(v,O){return v.slice(O,7).concat(v.slice(0,O))}ce("d",0,"do","day"),ce("dd",0,0,function(v){return this.localeData().weekdaysMin(this,v)}),ce("ddd",0,0,function(v){return this.localeData().weekdaysShort(this,v)}),ce("dddd",0,0,function(v){return this.localeData().weekdays(this,v)}),ce("e",0,0,"weekday"),ce("E",0,0,"isoWeekday"),me("day","d"),me("weekday","e"),me("isoWeekday","E"),pe("day",11),pe("weekday",11),pe("isoWeekday",11),Te("d",we),Te("e",we),Te("E",we),Te("dd",function(v,O){return O.weekdaysMinRegex(v)}),Te("ddd",function(v,O){return O.weekdaysShortRegex(v)}),Te("dddd",function(v,O){return O.weekdaysRegex(v)}),wt(["dd","ddd","dddd"],function(v,O,j,ne){ne=j._locale.weekdaysParse(v,ne,j._strict),ne!=null?O.d=ne:b(j).invalidWeekday=v}),wt(["d","e","E"],function(v,O,j,ne){O[ne]=ee(v)});var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ye="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ue=Be,Ve=Be,ot=Be;function Mt(){function v(We,yt){return yt.length-We.length}for(var O,j,ne,le=[],$e=[],De=[],ze=[],Qe=0;Qe<7;Qe++)ne=m([2e3,1]).day(Qe),O=Ge(this.weekdaysMin(ne,"")),j=Ge(this.weekdaysShort(ne,"")),ne=Ge(this.weekdays(ne,"")),le.push(O),$e.push(j),De.push(ne),ze.push(O),ze.push(j),ze.push(ne);le.sort(v),$e.sort(v),De.sort(v),ze.sort(v),this._weekdaysRegex=new RegExp("^("+ze.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+De.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+$e.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+le.join("|")+")","i")}function At(){return this.hours()%12||12}function Rt(v,O){ce(v,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),O)})}function Ut(v,O){return O._meridiemParse}ce("H",["HH",2],0,"hour"),ce("h",["hh",2],0,At),ce("k",["kk",2],0,function(){return this.hours()||24}),ce("hmm",0,0,function(){return""+At.apply(this)+Q(this.minutes(),2)}),ce("hmmss",0,0,function(){return""+At.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),ce("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),ce("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),Rt("a",!0),Rt("A",!1),me("hour","h"),pe("hour",13),Te("a",Ut),Te("A",Ut),Te("H",we),Te("h",we),Te("k",we),Te("HH",we,mt),Te("hh",we,mt),Te("kk",we,mt),Te("hmm",Ye),Te("hmmss",He),Te("Hmm",Ye),Te("Hmmss",He),st(["H","HH"],Me),st(["k","kk"],function(v,O,j){v=ee(v),O[Me]=v===24?0:v}),st(["a","A"],function(v,O,j){j._isPm=j._locale.isPM(v),j._meridiem=v}),st(["h","hh"],function(v,O,j){O[Me]=ee(v),b(j).bigHour=!0}),st("hmm",function(v,O,j){var ne=v.length-2;O[Me]=ee(v.substr(0,ne)),O[Fe]=ee(v.substr(ne)),b(j).bigHour=!0}),st("hmmss",function(v,O,j){var ne=v.length-4,le=v.length-2;O[Me]=ee(v.substr(0,ne)),O[Fe]=ee(v.substr(ne,2)),O[qe]=ee(v.substr(le)),b(j).bigHour=!0}),st("Hmm",function(v,O,j){var ne=v.length-2;O[Me]=ee(v.substr(0,ne)),O[Fe]=ee(v.substr(ne))}),st("Hmmss",function(v,O,j){var ne=v.length-4,le=v.length-2;O[Me]=ee(v.substr(0,ne)),O[Fe]=ee(v.substr(ne,2)),O[qe]=ee(v.substr(le))}),Be=Z("Hours",!0);var It,rr={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:lt,monthsShort:xt,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:ye,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},Tt={},Qt={};function Sr(v){return v&&v.toLowerCase().replace("_","-")}function xr(v){for(var O,j,ne,le,$e=0;$e<v.length;){for(O=(le=Sr(v[$e]).split("-")).length,j=(j=Sr(v[$e+1]))?j.split("-"):null;0<O;){if(ne=Gt(le.slice(0,O).join("-")))return ne;if(j&&j.length>=O&&function(De,ze){for(var Qe=Math.min(De.length,ze.length),We=0;We<Qe;We+=1)if(De[We]!==ze[We])return We;return Qe}(le,j)>=O-1)break;O--}$e++}return It}function Gt(v){var O;if(Tt[v]===void 0&&!0&&e&&e.exports&&v.match("^[^/\\\\]*$")!=null)try{O=It._abbr,commonjsRequire$1("./locale/"+v),at(O)}catch{Tt[v]=null}return Tt[v]}function at(v,O){return v&&((O=h(O)?pt(v):ct(v,O))?It=O:typeof console<"u"&&console.warn&&console.warn("Locale "+v+" not found. Did you forget to load it?")),It._abbr}function ct(v,O){if(O===null)return delete Tt[v],null;var j,ne=rr;if(O.abbr=v,Tt[v]!=null)W("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."),ne=Tt[v]._config;else if(O.parentLocale!=null)if(Tt[O.parentLocale]!=null)ne=Tt[O.parentLocale]._config;else{if((j=Gt(O.parentLocale))==null)return Qt[O.parentLocale]||(Qt[O.parentLocale]=[]),Qt[O.parentLocale].push({name:v,config:O}),null;ne=j._config}return Tt[v]=new I(U(ne,O)),Qt[v]&&Qt[v].forEach(function(le){ct(le.name,le.config)}),at(v),Tt[v]}function pt(v){var O;if(!(v=v&&v._locale&&v._locale._abbr?v._locale._abbr:v))return It;if(!i(v)){if(O=Gt(v))return O;v=[v]}return xr(v)}function Ze(v){var O=v._a;return O&&b(v).overflow===-2&&(O=O[Je]<0||11<O[Je]?Je:O[Oe]<1||O[Oe]>Re(O[Ke],O[Je])?Oe:O[Me]<0||24<O[Me]||O[Me]===24&&(O[Fe]!==0||O[qe]!==0||O[et]!==0)?Me:O[Fe]<0||59<O[Fe]?Fe:O[qe]<0||59<O[qe]?qe:O[et]<0||999<O[et]?et:-1,b(v)._overflowDayOfYear&&(O<Ke||Oe<O)&&(O=Oe),b(v)._overflowWeeks&&O===-1&&(O=Ae),b(v)._overflowWeekday&&O===-1&&(O=_t),b(v).overflow=O),v}var Dt=/^\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)?)?$/,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)?)?$/,fr=/Z|[+-]\d\d(?::?\d\d)?/,be=[["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]],Yt=[["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/]],Cr=/^\/?Date\((-?\d+)/i,qr=/^(?:(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}))$/,Er={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ar(v){var O,j,ne,le,$e,De,Qe=v._i,ze=Dt.exec(Qe)||ge.exec(Qe),Qe=be.length,We=Yt.length;if(ze){for(b(v).iso=!0,O=0,j=Qe;O<j;O++)if(be[O][1].exec(ze[1])){le=be[O][0],ne=be[O][2]!==!1;break}if(le==null)v._isValid=!1;else{if(ze[3]){for(O=0,j=We;O<j;O++)if(Yt[O][1].exec(ze[3])){$e=(ze[2]||" ")+Yt[O][0];break}if($e==null)return void(v._isValid=!1)}if(ne||$e==null){if(ze[4]){if(!fr.exec(ze[4]))return void(v._isValid=!1);De="Z"}v._f=le+($e||"")+(De||""),wr(v)}else v._isValid=!1}}else v._isValid=!1}function Bt(v,O,j,ne,le,$e){return v=[function(De){De=parseInt(De,10);{if(De<=49)return 2e3+De;if(De<=999)return 1900+De}return De}(v),xt.indexOf(O),parseInt(j,10),parseInt(ne,10),parseInt(le,10)],$e&&v.push(parseInt($e,10)),v}function Jt(v){var O,j,ne,le,$e=qr.exec(v._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));$e?(O=Bt($e[4],$e[3],$e[2],$e[5],$e[6],$e[7]),j=$e[1],ne=O,le=v,j&&Xe.indexOf(j)!==new Date(ne[0],ne[1],ne[2]).getDay()?(b(le).weekdayMismatch=!0,le._isValid=!1):(v._a=O,v._tzm=(j=$e[8],ne=$e[9],le=$e[10],j?Er[j]:ne?0:60*(((j=parseInt(le,10))-(ne=j%100))/100)+ne),v._d=Ht.apply(null,v._a),v._d.setUTCMinutes(v._d.getUTCMinutes()-v._tzm),b(v).rfc2822=!0)):v._isValid=!1}function er(v,O,j){return v!=null?v:O!=null?O:j}function dr(v){var O,j,ne,le,$e,De,ze,Qe,We,yt,ut,Ot=[];if(!v._d){for(ne=v,le=new Date(n.now()),j=ne._useUTC?[le.getUTCFullYear(),le.getUTCMonth(),le.getUTCDate()]:[le.getFullYear(),le.getMonth(),le.getDate()],v._w&&v._a[Oe]==null&&v._a[Je]==null&&((le=(ne=v)._w).GG!=null||le.W!=null||le.E!=null?(Qe=1,We=4,$e=er(le.GG,ne._a[Ke],Nt(Et(),1,4).year),De=er(le.W,1),((ze=er(le.E,1))<1||7<ze)&&(yt=!0)):(Qe=ne._locale._week.dow,We=ne._locale._week.doy,ut=Nt(Et(),Qe,We),$e=er(le.gg,ne._a[Ke],ut.year),De=er(le.w,ut.week),le.d!=null?((ze=le.d)<0||6<ze)&&(yt=!0):le.e!=null?(ze=le.e+Qe,(le.e<0||6<le.e)&&(yt=!0)):ze=Qe),De<1||De>Pt($e,Qe,We)?b(ne)._overflowWeeks=!0:yt!=null?b(ne)._overflowWeekday=!0:(ut=ft($e,De,ze,Qe,We),ne._a[Ke]=ut.year,ne._dayOfYear=ut.dayOfYear)),v._dayOfYear!=null&&(le=er(v._a[Ke],j[Ke]),(v._dayOfYear>gt(le)||v._dayOfYear===0)&&(b(v)._overflowDayOfYear=!0),yt=Ht(le,0,v._dayOfYear),v._a[Je]=yt.getUTCMonth(),v._a[Oe]=yt.getUTCDate()),O=0;O<3&&v._a[O]==null;++O)v._a[O]=Ot[O]=j[O];for(;O<7;O++)v._a[O]=Ot[O]=v._a[O]==null?O===2?1:0:v._a[O];v._a[Me]===24&&v._a[Fe]===0&&v._a[qe]===0&&v._a[et]===0&&(v._nextDay=!0,v._a[Me]=0),v._d=(v._useUTC?Ht:tr).apply(null,Ot),$e=v._useUTC?v._d.getUTCDay():v._d.getDay(),v._tzm!=null&&v._d.setUTCMinutes(v._d.getUTCMinutes()-v._tzm),v._nextDay&&(v._a[Me]=24),v._w&&v._w.d!==void 0&&v._w.d!==$e&&(b(v).weekdayMismatch=!0)}}function wr(v){if(v._f===n.ISO_8601)Ar(v);else if(v._f===n.RFC_2822)Jt(v);else{v._a=[],b(v).empty=!0;for(var O,j,ne,le,$e,De=""+v._i,ze=De.length,Qe=0,We=Se(v._f,v._locale).match(ue)||[],yt=We.length,ut=0;ut<yt;ut++)j=We[ut],(O=(De.match(dt(j,v))||[])[0])&&(0<(ne=De.substr(0,De.indexOf(O))).length&&b(v).unusedInput.push(ne),De=De.slice(De.indexOf(O)+O.length),Qe+=O.length),de[j]?(O?b(v).empty=!1:b(v).unusedTokens.push(j),ne=j,$e=v,(le=O)!=null&&l(it,ne)&&it[ne](le,$e._a,$e,ne)):v._strict&&!O&&b(v).unusedTokens.push(j);b(v).charsLeftOver=ze-Qe,0<De.length&&b(v).unusedInput.push(De),v._a[Me]<=12&&b(v).bigHour===!0&&0<v._a[Me]&&(b(v).bigHour=void 0),b(v).parsedDateParts=v._a.slice(0),b(v).meridiem=v._meridiem,v._a[Me]=function(Ot,Ft,Xt){return Xt==null?Ft:Ot.meridiemHour!=null?Ot.meridiemHour(Ft,Xt):Ot.isPM!=null?((Ot=Ot.isPM(Xt))&&Ft<12&&(Ft+=12),Ft=Ot||Ft!==12?Ft:0):Ft}(v._locale,v._a[Me],v._meridiem),(ze=b(v).era)!==null&&(v._a[Ke]=v._locale.erasConvertYear(ze,v._a[Ke])),dr(v),Ze(v)}}function Rr(v){var O,j,ne,le=v._i,$e=v._f;return v._locale=v._locale||pt(v._l),le===null||$e===void 0&&le===""?S({nullInput:!0}):(typeof le=="string"&&(v._i=le=v._locale.preparse(le)),G(le)?new H(Ze(le)):(d(le)?v._d=le:i($e)?function(De){var ze,Qe,We,yt,ut,Ot,Ft=!1,Xt=De._f.length;if(Xt===0)return b(De).invalidFormat=!0,De._d=new Date(NaN);for(yt=0;yt<Xt;yt++)ut=0,Ot=!1,ze=F({},De),De._useUTC!=null&&(ze._useUTC=De._useUTC),ze._f=De._f[yt],wr(ze),$(ze)&&(Ot=!0),ut=(ut+=b(ze).charsLeftOver)+10*b(ze).unusedTokens.length,b(ze).score=ut,Ft?ut<We&&(We=ut,Qe=ze):(We==null||ut<We||Ot)&&(We=ut,Qe=ze,Ot&&(Ft=!0));p(De,Qe||ze)}(v):$e?wr(v):h($e=(le=v)._i)?le._d=new Date(n.now()):d($e)?le._d=new Date($e.valueOf()):typeof $e=="string"?(j=le,(O=Cr.exec(j._i))!==null?j._d=new Date(+O[1]):(Ar(j),j._isValid===!1&&(delete j._isValid,Jt(j),j._isValid===!1&&(delete j._isValid,j._strict?j._isValid=!1:n.createFromInputFallback(j))))):i($e)?(le._a=g($e.slice(0),function(De){return parseInt(De,10)}),dr(le)):o($e)?(O=le)._d||(ne=(j=xe(O._i)).day===void 0?j.date:j.day,O._a=g([j.year,j.month,ne,j.hour,j.minute,j.second,j.millisecond],function(De){return De&&parseInt(De,10)}),dr(O)):f($e)?le._d=new Date($e):n.createFromInputFallback(le),$(v)||(v._d=null),v))}function zt(v,O,j,ne,le){var $e={};return O!==!0&&O!==!1||(ne=O,O=void 0),j!==!0&&j!==!1||(ne=j,j=void 0),(o(v)&&u(v)||i(v)&&v.length===0)&&(v=void 0),$e._isAMomentObject=!0,$e._useUTC=$e._isUTC=le,$e._l=j,$e._i=v,$e._f=O,$e._strict=ne,(le=new H(Ze(Rr(le=$e))))._nextDay&&(le.add(1,"d"),le._nextDay=void 0),le}function Et(v,O,j,ne){return zt(v,O,j,ne,!1)}n.createFromInputFallback=V("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(v){v._d=new Date(v._i+(v._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){},Ye=V("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var v=Et.apply(null,arguments);return this.isValid()&&v.isValid()?v<this?this:v:S()}),He=V("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var v=Et.apply(null,arguments);return this.isValid()&&v.isValid()?this<v?this:v:S()});function Vt(v,O){var j,ne;if(!(O=O.length===1&&i(O[0])?O[0]:O).length)return Et();for(j=O[0],ne=1;ne<O.length;++ne)O[ne].isValid()&&!O[ne][v](j)||(j=O[ne]);return j}var nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Kt(O){var O=xe(O),j=O.year||0,ne=O.quarter||0,le=O.month||0,$e=O.week||O.isoWeek||0,De=O.day||0,ze=O.hour||0,Qe=O.minute||0,We=O.second||0,yt=O.millisecond||0;this._isValid=function(ut){var Ot,Ft,Xt=!1,Hr=nr.length;for(Ot in ut)if(l(ut,Ot)&&(nt.call(nr,Ot)===-1||ut[Ot]!=null&&isNaN(ut[Ot])))return!1;for(Ft=0;Ft<Hr;++Ft)if(ut[nr[Ft]]){if(Xt)return!1;parseFloat(ut[nr[Ft]])!==ee(ut[nr[Ft]])&&(Xt=!0)}return!0}(O),this._milliseconds=+yt+1e3*We+6e4*Qe+1e3*ze*60*60,this._days=+De+7*$e,this._months=+le+3*ne+12*j,this._data={},this._locale=pt(),this._bubble()}function ir(v){return v instanceof Kt}function Wt(v){return v<0?-1*Math.round(-1*v):Math.round(v)}function Tr(v,O){ce(v,0,0,function(){var j=this.utcOffset(),ne="+";return j<0&&(j=-j,ne="-"),ne+Q(~~(j/60),2)+O+Q(~~j%60,2)})}Tr("Z",":"),Tr("ZZ",""),Te("Z",Le),Te("ZZ",Le),st(["Z","ZZ"],function(v,O,j){j._useUTC=!0,j._tzm=pr(Le,v)});var yr=/([\+\-]|\d\d)/gi;function pr(v,j){var j=(j||"").match(v);return j===null?null:(j=60*(v=((j[j.length-1]||[])+"").match(yr)||["-",0,0])[1]+ee(v[2]))===0?0:v[0]==="+"?j:-j}function jt(v,O){var j;return O._isUTC?(O=O.clone(),j=(G(v)||d(v)?v:Et(v)).valueOf()-O.valueOf(),O._d.setTime(O._d.valueOf()+j),n.updateOffset(O,!1),O):Et(v).local()}function Or(v){return-Math.round(v._d.getTimezoneOffset())}function Vr(){return!!this.isValid()&&this._isUTC&&this._offset===0}n.updateOffset=function(){};var cn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ln=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Zt(v,O){var j,ne=v,le=null;return ir(v)?ne={ms:v._milliseconds,d:v._days,M:v._months}:f(v)||!isNaN(+v)?(ne={},O?ne[O]=+v:ne.milliseconds=+v):(le=cn.exec(v))?(j=le[1]==="-"?-1:1,ne={y:0,d:ee(le[Oe])*j,h:ee(le[Me])*j,m:ee(le[Fe])*j,s:ee(le[qe])*j,ms:ee(Wt(1e3*le[et]))*j}):(le=ln.exec(v))?(j=le[1]==="-"?-1:1,ne={y:gr(le[2],j),M:gr(le[3],j),w:gr(le[4],j),d:gr(le[5],j),h:gr(le[6],j),m:gr(le[7],j),s:gr(le[8],j)}):ne==null?ne={}:typeof ne=="object"&&("from"in ne||"to"in ne)&&(O=function($e,De){var ze;return!$e.isValid()||!De.isValid()?{milliseconds:0,months:0}:(De=jt(De,$e),$e.isBefore(De)?ze=Gr($e,De):((ze=Gr(De,$e)).milliseconds=-ze.milliseconds,ze.months=-ze.months),ze)}(Et(ne.from),Et(ne.to)),(ne={}).ms=O.milliseconds,ne.M=O.months),le=new Kt(ne),ir(v)&&l(v,"_locale")&&(le._locale=v._locale),ir(v)&&l(v,"_isValid")&&(le._isValid=v._isValid),le}function gr(v,O){return v=v&&parseFloat(v.replace(",",".")),(isNaN(v)?0:v)*O}function Gr(v,O){var j={};return j.months=O.month()-v.month()+12*(O.year()-v.year()),v.clone().add(j.months,"M").isAfter(O)&&--j.months,j.milliseconds=+O-+v.clone().add(j.months,"M"),j}function Wr(v,O){return function(j,ne){var le;return ne===null||isNaN(+ne)||(W(O,"moment()."+O+"(period, number) is deprecated. Please use moment()."+O+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),le=j,j=ne,ne=le),jr(this,Zt(j,ne),v),this}}function jr(v,De,j,ne){var le=De._milliseconds,$e=Wt(De._days),De=Wt(De._months);v.isValid()&&(ne=ne==null||ne,De&&tt(v,ie(v,"Month")+De*j),$e&&se(v,"Date",ie(v,"Date")+$e*j),le&&v._d.setTime(v._d.valueOf()+le*j),ne&&n.updateOffset(v,$e||De))}Zt.fn=Kt.prototype,Zt.invalid=function(){return Zt(NaN)},lt=Wr(1,"add"),qt=Wr(-1,"subtract");function Kr(v){return typeof v=="string"||v instanceof String}function un(v){return G(v)||d(v)||Kr(v)||f(v)||function(O){var j=i(O),ne=!1;return j&&(ne=O.filter(function(le){return!f(le)&&Kr(O)}).length===0),j&&ne}(v)||function(O){var j,ne,le=o(O)&&!u(O),$e=!1,De=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],ze=De.length;for(j=0;j<ze;j+=1)ne=De[j],$e=$e||l(O,ne);return le&&$e}(v)||v==null}function Ir(v,le){if(v.date()<le.date())return-Ir(le,v);var j=12*(le.year()-v.year())+(le.month()-v.month()),ne=v.clone().add(j,"months"),le=le-ne<0?(le-ne)/(ne-v.clone().add(j-1,"months")):(le-ne)/(v.clone().add(1+j,"months")-ne);return-(j+le)||0}function Zr(v){return v===void 0?this._locale._abbr:((v=pt(v))!=null&&(this._locale=v),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",ye=V("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(v){return v===void 0?this.localeData():this.locale(v)});function Xr(){return this._locale}var Qr=126227808e5;function br(v,O){return(v%O+O)%O}function Jr(v,O,j){return v<100&&0<=v?new Date(v+400,O,j)-Qr:new Date(v,O,j).valueOf()}function en(v,O,j){return v<100&&0<=v?Date.UTC(v+400,O,j)-Qr:Date.UTC(v,O,j)}function Br(v,O){return O.erasAbbrRegex(v)}function Fr(){for(var v=[],O=[],j=[],ne=[],le=this.eras(),$e=0,De=le.length;$e<De;++$e)O.push(Ge(le[$e].name)),v.push(Ge(le[$e].abbr)),j.push(Ge(le[$e].narrow)),ne.push(Ge(le[$e].name)),ne.push(Ge(le[$e].abbr)),ne.push(Ge(le[$e].narrow));this._erasRegex=new RegExp("^("+ne.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+O.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+v.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+j.join("|")+")","i")}function Mr(v,O){ce(0,[v,v.length],0,O)}function tn(v,O,j,ne,le){var $e;return v==null?Nt(this,ne,le).year:($e=Pt(v,ne,le),function(De,ze,Qe,We,yt){return De=ft(De,ze,Qe,We,yt),ze=Ht(De.year,0,De.dayOfYear),this.year(ze.getUTCFullYear()),this.month(ze.getUTCMonth()),this.date(ze.getUTCDate()),this}.call(this,v,O=$e<O?$e:O,j,ne,le))}ce("N",0,0,"eraAbbr"),ce("NN",0,0,"eraAbbr"),ce("NNN",0,0,"eraAbbr"),ce("NNNN",0,0,"eraName"),ce("NNNNN",0,0,"eraNarrow"),ce("y",["y",1],"yo","eraYear"),ce("y",["yy",2],0,"eraYear"),ce("y",["yyy",3],0,"eraYear"),ce("y",["yyyy",4],0,"eraYear"),Te("N",Br),Te("NN",Br),Te("NNN",Br),Te("NNNN",function(v,O){return O.erasNameRegex(v)}),Te("NNNNN",function(v,O){return O.erasNarrowRegex(v)}),st(["N","NN","NNN","NNNN","NNNNN"],function(v,O,j,ne){ne=j._locale.erasParse(v,ne,j._strict),ne?b(j).era=ne:b(j).invalidEra=v}),Te("y",Pe),Te("yy",Pe),Te("yyy",Pe),Te("yyyy",Pe),Te("yo",function(v,O){return O._eraYearOrdinalRegex||Pe}),st(["y","yy","yyy","yyyy"],Ke),st(["yo"],function(v,O,j,ne){var le;j._locale._eraYearOrdinalRegex&&(le=v.match(j._locale._eraYearOrdinalRegex)),j._locale.eraYearOrdinalParse?O[Ke]=j._locale.eraYearOrdinalParse(v,le):O[Ke]=parseInt(v,10)}),ce(0,["gg",2],0,function(){return this.weekYear()%100}),ce(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Mr("gggg","weekYear"),Mr("ggggg","weekYear"),Mr("GGGG","isoWeekYear"),Mr("GGGGG","isoWeekYear"),me("weekYear","gg"),me("isoWeekYear","GG"),pe("weekYear",1),pe("isoWeekYear",1),Te("G",Ee),Te("g",Ee),Te("GG",we,mt),Te("gg",we,mt),Te("GGGG",hr,_r),Te("gggg",hr,_r),Te("GGGGG",lr,ur),Te("ggggg",lr,ur),wt(["gggg","ggggg","GGGG","GGGGG"],function(v,O,j,ne){O[ne.substr(0,2)]=ee(v)}),wt(["gg","GG"],function(v,O,j,ne){O[ne]=n.parseTwoDigitYear(v)}),ce("Q",0,"Qo","quarter"),me("quarter","Q"),pe("quarter",7),Te("Q",te),st("Q",function(v,O){O[Je]=3*(ee(v)-1)}),ce("D",["DD",2],"Do","date"),me("date","D"),pe("date",9),Te("D",we),Te("DD",we,mt),Te("Do",function(v,O){return v?O._dayOfMonthOrdinalParse||O._ordinalParse:O._dayOfMonthOrdinalParseLenient}),st(["D","DD"],Oe),st("Do",function(v,O){O[Oe]=ee(v.match(we)[0])}),hr=Z("Date",!0),ce("DDD",["DDDD",3],"DDDo","dayOfYear"),me("dayOfYear","DDD"),pe("dayOfYear",4),Te("DDD",je),Te("DDDD",fe),st(["DDD","DDDD"],function(v,O,j){j._dayOfYear=ee(v)}),ce("m",["mm",2],0,"minute"),me("minute","m"),pe("minute",14),Te("m",we),Te("mm",we,mt),st(["m","mm"],Fe);var cr,_r=Z("Minutes",!1),lr=(ce("s",["ss",2],0,"second"),me("second","s"),pe("second",15),Te("s",we),Te("ss",we,mt),st(["s","ss"],qe),Z("Seconds",!1));for(ce("S",0,0,function(){return~~(this.millisecond()/100)}),ce(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ce(0,["SSS",3],0,"millisecond"),ce(0,["SSSS",4],0,function(){return 10*this.millisecond()}),ce(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),ce(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),ce(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),ce(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),ce(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),me("millisecond","ms"),pe("millisecond",16),Te("S",je,te),Te("SS",je,mt),Te("SSS",je,fe),cr="SSSS";cr.length<=9;cr+="S")Te(cr,Pe);function hn(v,O){O[et]=ee(1e3*("0."+v))}for(cr="S";cr.length<=9;cr+="S")st(cr,hn);ur=Z("Milliseconds",!1),ce("z",0,0,"zoneAbbr"),ce("zz",0,0,"zoneName"),te=H.prototype;function rn(v){return v}te.add=lt,te.calendar=function(j,le){arguments.length===1&&(arguments[0]?un(arguments[0])?(j=arguments[0],le=void 0):function($e){for(var De=o($e)&&!u($e),ze=!1,Qe=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],We=0;We<Qe.length;We+=1)ze=ze||l($e,Qe[We]);return De&&ze}(arguments[0])&&(le=arguments[0],j=void 0):le=j=void 0);var j=j||Et(),ne=jt(j,this).startOf("day"),ne=n.calendarFormat(this,ne)||"sameElse",le=le&&(T(le[ne])?le[ne].call(this,j):le[ne]);return this.format(le||this.localeData().calendar(ne,this,Et(j)))},te.clone=function(){return new H(this)},te.diff=function(v,O,j){var ne,le,$e;if(!this.isValid())return NaN;if(!(ne=jt(v,this)).isValid())return NaN;switch(le=6e4*(ne.utcOffset()-this.utcOffset()),O=Ce(O)){case"year":$e=Ir(this,ne)/12;break;case"month":$e=Ir(this,ne);break;case"quarter":$e=Ir(this,ne)/3;break;case"second":$e=(this-ne)/1e3;break;case"minute":$e=(this-ne)/6e4;break;case"hour":$e=(this-ne)/36e5;break;case"day":$e=(this-ne-le)/864e5;break;case"week":$e=(this-ne-le)/6048e5;break;default:$e=this-ne}return j?$e:oe($e)},te.endOf=function(v){var O,j;if((v=Ce(v))===void 0||v==="millisecond"||!this.isValid())return this;switch(j=this._isUTC?en:Jr,v){case"year":O=j(this.year()+1,0,1)-1;break;case"quarter":O=j(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":O=j(this.year(),this.month()+1,1)-1;break;case"week":O=j(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":O=j(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":O=j(this.year(),this.month(),this.date()+1)-1;break;case"hour":O=this._d.valueOf(),O+=36e5-br(O+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":O=this._d.valueOf(),O+=6e4-br(O,6e4)-1;break;case"second":O=this._d.valueOf(),O+=1e3-br(O,1e3)-1;break}return this._d.setTime(O),n.updateOffset(this,!0),this},te.format=function(v){return v=v||(this.isUtc()?n.defaultFormatUtc:n.defaultFormat),v=he(this,v),this.localeData().postformat(v)},te.from=function(v,O){return this.isValid()&&(G(v)&&v.isValid()||Et(v).isValid())?Zt({to:this,from:v}).locale(this.locale()).humanize(!O):this.localeData().invalidDate()},te.fromNow=function(v){return this.from(Et(),v)},te.to=function(v,O){return this.isValid()&&(G(v)&&v.isValid()||Et(v).isValid())?Zt({from:this,to:v}).locale(this.locale()).humanize(!O):this.localeData().invalidDate()},te.toNow=function(v){return this.to(Et(),v)},te.get=function(v){return T(this[v=Ce(v)])?this[v]():this},te.invalidAt=function(){return b(this).overflow},te.isAfter=function(v,O){return v=G(v)?v:Et(v),!(!this.isValid()||!v.isValid())&&((O=Ce(O)||"millisecond")==="millisecond"?this.valueOf()>v.valueOf():v.valueOf()<this.clone().startOf(O).valueOf())},te.isBefore=function(v,O){return v=G(v)?v:Et(v),!(!this.isValid()||!v.isValid())&&((O=Ce(O)||"millisecond")==="millisecond"?this.valueOf()<v.valueOf():this.clone().endOf(O).valueOf()<v.valueOf())},te.isBetween=function(v,O,j,ne){return v=G(v)?v:Et(v),O=G(O)?O:Et(O),!!(this.isValid()&&v.isValid()&&O.isValid())&&((ne=ne||"()")[0]==="("?this.isAfter(v,j):!this.isBefore(v,j))&&(ne[1]===")"?this.isBefore(O,j):!this.isAfter(O,j))},te.isSame=function(j,O){var j=G(j)?j:Et(j);return!(!this.isValid()||!j.isValid())&&((O=Ce(O)||"millisecond")==="millisecond"?this.valueOf()===j.valueOf():(j=j.valueOf(),this.clone().startOf(O).valueOf()<=j&&j<=this.clone().endOf(O).valueOf()))},te.isSameOrAfter=function(v,O){return this.isSame(v,O)||this.isAfter(v,O)},te.isSameOrBefore=function(v,O){return this.isSame(v,O)||this.isBefore(v,O)},te.isValid=function(){return $(this)},te.lang=ye,te.locale=Zr,te.localeData=Xr,te.max=He,te.min=Ye,te.parsingFlags=function(){return p({},b(this))},te.set=function(v,O){if(typeof v=="object")for(var j=function($e){var De,ze=[];for(De in $e)l($e,De)&&ze.push({unit:De,priority:Ne[De]});return ze.sort(function(Qe,We){return Qe.priority-We.priority}),ze}(v=xe(v)),ne=j.length,le=0;le<ne;le++)this[j[le].unit](v[j[le].unit]);else if(T(this[v=Ce(v)]))return this[v](O);return this},te.startOf=function(v){var O,j;if((v=Ce(v))===void 0||v==="millisecond"||!this.isValid())return this;switch(j=this._isUTC?en:Jr,v){case"year":O=j(this.year(),0,1);break;case"quarter":O=j(this.year(),this.month()-this.month()%3,1);break;case"month":O=j(this.year(),this.month(),1);break;case"week":O=j(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":O=j(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":O=j(this.year(),this.month(),this.date());break;case"hour":O=this._d.valueOf(),O-=br(O+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":O=this._d.valueOf(),O-=br(O,6e4);break;case"second":O=this._d.valueOf(),O-=br(O,1e3);break}return this._d.setTime(O),n.updateOffset(this,!0),this},te.subtract=qt,te.toArray=function(){var v=this;return[v.year(),v.month(),v.date(),v.hour(),v.minute(),v.second(),v.millisecond()]},te.toObject=function(){var v=this;return{years:v.year(),months:v.month(),date:v.date(),hours:v.hours(),minutes:v.minutes(),seconds:v.seconds(),milliseconds:v.milliseconds()}},te.toDate=function(){return new Date(this.valueOf())},te.toISOString=function(v){if(!this.isValid())return null;var O=(v=v!==!0)?this.clone().utc():this;return O.year()<0||9999<O.year()?he(O,v?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?v?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",he(O,"Z")):he(O,v?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},te.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var v,O="moment",j="";return this.isLocal()||(O=this.utcOffset()===0?"moment.utc":"moment.parseZone",j="Z"),O="["+O+'("]',v=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(O+v+"-MM-DD[T]HH:mm:ss.SSS"+(j+'[")]'))},typeof Symbol<"u"&&Symbol.for!=null&&(te[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),te.toJSON=function(){return this.isValid()?this.toISOString():null},te.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},te.unix=function(){return Math.floor(this.valueOf()/1e3)},te.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},te.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},te.eraName=function(){for(var v,O=this.localeData().eras(),j=0,ne=O.length;j<ne;++j)if(v=this.clone().startOf("day").valueOf(),O[j].since<=v&&v<=O[j].until||O[j].until<=v&&v<=O[j].since)return O[j].name;return""},te.eraNarrow=function(){for(var v,O=this.localeData().eras(),j=0,ne=O.length;j<ne;++j)if(v=this.clone().startOf("day").valueOf(),O[j].since<=v&&v<=O[j].until||O[j].until<=v&&v<=O[j].since)return O[j].narrow;return""},te.eraAbbr=function(){for(var v,O=this.localeData().eras(),j=0,ne=O.length;j<ne;++j)if(v=this.clone().startOf("day").valueOf(),O[j].since<=v&&v<=O[j].until||O[j].until<=v&&v<=O[j].since)return O[j].abbr;return""},te.eraYear=function(){for(var v,O,j=this.localeData().eras(),ne=0,le=j.length;ne<le;++ne)if(v=j[ne].since<=j[ne].until?1:-1,O=this.clone().startOf("day").valueOf(),j[ne].since<=O&&O<=j[ne].until||j[ne].until<=O&&O<=j[ne].since)return(this.year()-n(j[ne].since).year())*v+j[ne].offset;return this.year()},te.year=Dr,te.isLeapYear=function(){return J(this.year())},te.weekYear=function(v){return tn.call(this,v,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},te.isoWeekYear=function(v){return tn.call(this,v,this.isoWeek(),this.isoWeekday(),1,4)},te.quarter=te.quarters=function(v){return v==null?Math.ceil((this.month()+1)/3):this.month(3*(v-1)+this.month()%3)},te.month=ht,te.daysInMonth=function(){return Re(this.year(),this.month())},te.week=te.weeks=function(v){var O=this.localeData().week(this);return v==null?O:this.add(7*(v-O),"d")},te.isoWeek=te.isoWeeks=function(v){var O=Nt(this,1,4).week;return v==null?O:this.add(7*(v-O),"d")},te.weeksInYear=function(){var v=this.localeData()._week;return Pt(this.year(),v.dow,v.doy)},te.weeksInWeekYear=function(){var v=this.localeData()._week;return Pt(this.weekYear(),v.dow,v.doy)},te.isoWeeksInYear=function(){return Pt(this.year(),1,4)},te.isoWeeksInISOWeekYear=function(){return Pt(this.isoWeekYear(),1,4)},te.date=hr,te.day=te.days=function(v){if(!this.isValid())return v!=null?this:NaN;var O,j,ne=this._isUTC?this._d.getUTCDay():this._d.getDay();return v!=null?(O=v,j=this.localeData(),v=typeof O!="string"?O:isNaN(O)?typeof(O=j.weekdaysParse(O))=="number"?O:null:parseInt(O,10),this.add(v-ne,"d")):ne},te.weekday=function(v){if(!this.isValid())return v!=null?this:NaN;var O=(this.day()+7-this.localeData()._week.dow)%7;return v==null?O:this.add(v-O,"d")},te.isoWeekday=function(v){return this.isValid()?v!=null?(O=v,j=this.localeData(),j=typeof O=="string"?j.weekdaysParse(O)%7||7:isNaN(O)?null:O,this.day(this.day()%7?j:j-7)):this.day()||7:v!=null?this:NaN;var O,j},te.dayOfYear=function(v){var O=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return v==null?O:this.add(v-O,"d")},te.hour=te.hours=Be,te.minute=te.minutes=_r,te.second=te.seconds=lr,te.millisecond=te.milliseconds=ur,te.utcOffset=function(v,O,j){var ne,le=this._offset||0;if(!this.isValid())return v!=null?this:NaN;if(v==null)return this._isUTC?le:Or(this);if(typeof v=="string"){if((v=pr(Le,v))===null)return this}else Math.abs(v)<16&&!j&&(v*=60);return!this._isUTC&&O&&(ne=Or(this)),this._offset=v,this._isUTC=!0,ne!=null&&this.add(ne,"m"),le!==v&&(!O||this._changeInProgress?jr(this,Zt(v-le,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this},te.utc=function(v){return this.utcOffset(0,v)},te.local=function(v){return this._isUTC&&(this.utcOffset(0,v),this._isUTC=!1,v&&this.subtract(Or(this),"m")),this},te.parseZone=function(){var v;return this._tzm!=null?this.utcOffset(this._tzm,!1,!0):typeof this._i=="string"&&((v=pr(Ie,this._i))!=null?this.utcOffset(v):this.utcOffset(0,!0)),this},te.hasAlignedHourOffset=function(v){return!!this.isValid()&&(v=v?Et(v).utcOffset():0,(this.utcOffset()-v)%60==0)},te.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},te.isLocal=function(){return!!this.isValid()&&!this._isUTC},te.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},te.isUtc=Vr,te.isUTC=Vr,te.zoneAbbr=function(){return this._isUTC?"UTC":""},te.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},te.dates=V("dates accessor is deprecated. Use date instead.",hr),te.months=V("months accessor is deprecated. Use month instead",ht),te.years=V("years accessor is deprecated. Use year instead",Dr),te.zone=V("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(v,O){return v!=null?(this.utcOffset(v=typeof v!="string"?-v:v,O),this):-this.utcOffset()}),te.isDSTShifted=V("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!h(this._isDSTShifted))return this._isDSTShifted;var v,O={};return F(O,this),(O=Rr(O))._a?(v=(O._isUTC?m:Et)(O._a),this._isDSTShifted=this.isValid()&&0<function(j,ne,le){for(var $e=Math.min(j.length,ne.length),De=Math.abs(j.length-ne.length),ze=0,Qe=0;Qe<$e;Qe++)(le&&j[Qe]!==ne[Qe]||!le&&ee(j[Qe])!==ee(ne[Qe]))&&ze++;return ze+De}(O._a,v.toArray())):this._isDSTShifted=!1,this._isDSTShifted}),mt=I.prototype;function Lr(v,O,j,$e){var le=pt(),$e=m().set($e,O);return le[j]($e,v)}function nn(v,O,j){if(f(v)&&(O=v,v=void 0),v=v||"",O!=null)return Lr(v,O,j,"month");for(var ne=[],le=0;le<12;le++)ne[le]=Lr(v,le,j,"month");return ne}function Pr(v,O,j,ne){O=(typeof v=="boolean"?f(O)&&(j=O,O=void 0):(O=v,v=!1,f(j=O)&&(j=O,O=void 0)),O||"");var le,$e=pt(),De=v?$e._week.dow:0,ze=[];if(j!=null)return Lr(O,(j+De)%7,ne,"day");for(le=0;le<7;le++)ze[le]=Lr(O,(le+De)%7,ne,"day");return ze}mt.calendar=function(v,O,j){return T(v=this._calendar[v]||this._calendar.sameElse)?v.call(O,j):v},mt.longDateFormat=function(v){var O=this._longDateFormat[v],j=this._longDateFormat[v.toUpperCase()];return O||!j?O:(this._longDateFormat[v]=j.match(ue).map(function(ne){return ne==="MMMM"||ne==="MM"||ne==="DD"||ne==="dddd"?ne.slice(1):ne}).join(""),this._longDateFormat[v])},mt.invalidDate=function(){return this._invalidDate},mt.ordinal=function(v){return this._ordinal.replace("%d",v)},mt.preparse=rn,mt.postformat=rn,mt.relativeTime=function(v,O,j,ne){var le=this._relativeTime[j];return T(le)?le(v,O,j,ne):le.replace(/%d/i,v)},mt.pastFuture=function(v,O){return T(v=this._relativeTime[0<v?"future":"past"])?v(O):v.replace(/%s/i,O)},mt.set=function(v){var O,j;for(j in v)l(v,j)&&(T(O=v[j])?this[j]=O:this["_"+j]=O);this._config=v,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},mt.eras=function(v,O){for(var j,ne=this._eras||pt("en")._eras,le=0,$e=ne.length;le<$e;++le){switch(typeof ne[le].since){case"string":j=n(ne[le].since).startOf("day"),ne[le].since=j.valueOf();break}switch(typeof ne[le].until){case"undefined":ne[le].until=1/0;break;case"string":j=n(ne[le].until).startOf("day").valueOf(),ne[le].until=j.valueOf();break}}return ne},mt.erasParse=function(v,O,j){var ne,le,$e,De,ze,Qe=this.eras();for(v=v.toUpperCase(),ne=0,le=Qe.length;ne<le;++ne)if($e=Qe[ne].name.toUpperCase(),De=Qe[ne].abbr.toUpperCase(),ze=Qe[ne].narrow.toUpperCase(),j)switch(O){case"N":case"NN":case"NNN":if(De===v)return Qe[ne];break;case"NNNN":if($e===v)return Qe[ne];break;case"NNNNN":if(ze===v)return Qe[ne];break}else if(0<=[$e,De,ze].indexOf(v))return Qe[ne]},mt.erasConvertYear=function(v,O){var j=v.since<=v.until?1:-1;return O===void 0?n(v.since).year():n(v.since).year()+(O-v.offset)*j},mt.erasAbbrRegex=function(v){return l(this,"_erasAbbrRegex")||Fr.call(this),v?this._erasAbbrRegex:this._erasRegex},mt.erasNameRegex=function(v){return l(this,"_erasNameRegex")||Fr.call(this),v?this._erasNameRegex:this._erasRegex},mt.erasNarrowRegex=function(v){return l(this,"_erasNarrowRegex")||Fr.call(this),v?this._erasNarrowRegex:this._erasRegex},mt.months=function(v,O){return v?(i(this._months)?this._months:this._months[(this._months.isFormat||bt).test(O)?"format":"standalone"])[v.month()]:i(this._months)?this._months:this._months.standalone},mt.monthsShort=function(v,O){return v?(i(this._monthsShort)?this._monthsShort:this._monthsShort[bt.test(O)?"format":"standalone"])[v.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},mt.monthsParse=function(v,O,j){var ne,le;if(this._monthsParseExact)return function(ut,De,ze){var Qe,We,yt,ut=ut.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],Qe=0;Qe<12;++Qe)yt=m([2e3,Qe]),this._shortMonthsParse[Qe]=this.monthsShort(yt,"").toLocaleLowerCase(),this._longMonthsParse[Qe]=this.months(yt,"").toLocaleLowerCase();return ze?De==="MMM"?(We=nt.call(this._shortMonthsParse,ut))!==-1?We:null:(We=nt.call(this._longMonthsParse,ut))!==-1?We:null:De==="MMM"?(We=nt.call(this._shortMonthsParse,ut))!==-1||(We=nt.call(this._longMonthsParse,ut))!==-1?We:null:(We=nt.call(this._longMonthsParse,ut))!==-1||(We=nt.call(this._shortMonthsParse,ut))!==-1?We:null}.call(this,v,O,j);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),ne=0;ne<12;ne++)if(le=m([2e3,ne]),j&&!this._longMonthsParse[ne]&&(this._longMonthsParse[ne]=new RegExp("^"+this.months(le,"").replace(".","")+"$","i"),this._shortMonthsParse[ne]=new RegExp("^"+this.monthsShort(le,"").replace(".","")+"$","i")),j||this._monthsParse[ne]||(le="^"+this.months(le,"")+"|^"+this.monthsShort(le,""),this._monthsParse[ne]=new RegExp(le.replace(".",""),"i")),j&&O==="MMMM"&&this._longMonthsParse[ne].test(v)||j&&O==="MMM"&&this._shortMonthsParse[ne].test(v)||!j&&this._monthsParse[ne].test(v))return ne},mt.monthsRegex=function(v){return this._monthsParseExact?(l(this,"_monthsRegex")||vt.call(this),v?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=kt),this._monthsStrictRegex&&v?this._monthsStrictRegex:this._monthsRegex)},mt.monthsShortRegex=function(v){return this._monthsParseExact?(l(this,"_monthsRegex")||vt.call(this),v?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=$t),this._monthsShortStrictRegex&&v?this._monthsShortStrictRegex:this._monthsShortRegex)},mt.week=function(v){return Nt(v,this._week.dow,this._week.doy).week},mt.firstDayOfYear=function(){return this._week.doy},mt.firstDayOfWeek=function(){return this._week.dow},mt.weekdays=function(v,O){return O=i(this._weekdays)?this._weekdays:this._weekdays[v&&v!==!0&&this._weekdays.isFormat.test(O)?"format":"standalone"],v===!0?Lt(O,this._week.dow):v?O[v.day()]:O},mt.weekdaysMin=function(v){return v===!0?Lt(this._weekdaysMin,this._week.dow):v?this._weekdaysMin[v.day()]:this._weekdaysMin},mt.weekdaysShort=function(v){return v===!0?Lt(this._weekdaysShort,this._week.dow):v?this._weekdaysShort[v.day()]:this._weekdaysShort},mt.weekdaysParse=function(v,O,j){var ne,le;if(this._weekdaysParseExact)return function(ut,De,ze){var Qe,We,yt,ut=ut.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Qe=0;Qe<7;++Qe)yt=m([2e3,1]).day(Qe),this._minWeekdaysParse[Qe]=this.weekdaysMin(yt,"").toLocaleLowerCase(),this._shortWeekdaysParse[Qe]=this.weekdaysShort(yt,"").toLocaleLowerCase(),this._weekdaysParse[Qe]=this.weekdays(yt,"").toLocaleLowerCase();return ze?De==="dddd"?(We=nt.call(this._weekdaysParse,ut))!==-1?We:null:De==="ddd"?(We=nt.call(this._shortWeekdaysParse,ut))!==-1?We:null:(We=nt.call(this._minWeekdaysParse,ut))!==-1?We:null:De==="dddd"?(We=nt.call(this._weekdaysParse,ut))!==-1||(We=nt.call(this._shortWeekdaysParse,ut))!==-1||(We=nt.call(this._minWeekdaysParse,ut))!==-1?We:null:De==="ddd"?(We=nt.call(this._shortWeekdaysParse,ut))!==-1||(We=nt.call(this._weekdaysParse,ut))!==-1||(We=nt.call(this._minWeekdaysParse,ut))!==-1?We:null:(We=nt.call(this._minWeekdaysParse,ut))!==-1||(We=nt.call(this._weekdaysParse,ut))!==-1||(We=nt.call(this._shortWeekdaysParse,ut))!==-1?We:null}.call(this,v,O,j);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),ne=0;ne<7;ne++)if(le=m([2e3,1]).day(ne),j&&!this._fullWeekdaysParse[ne]&&(this._fullWeekdaysParse[ne]=new RegExp("^"+this.weekdays(le,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[ne]=new RegExp("^"+this.weekdaysShort(le,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[ne]=new RegExp("^"+this.weekdaysMin(le,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[ne]||(le="^"+this.weekdays(le,"")+"|^"+this.weekdaysShort(le,"")+"|^"+this.weekdaysMin(le,""),this._weekdaysParse[ne]=new RegExp(le.replace(".",""),"i")),j&&O==="dddd"&&this._fullWeekdaysParse[ne].test(v)||j&&O==="ddd"&&this._shortWeekdaysParse[ne].test(v)||j&&O==="dd"&&this._minWeekdaysParse[ne].test(v)||!j&&this._weekdaysParse[ne].test(v))return ne},mt.weekdaysRegex=function(v){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Mt.call(this),v?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ue),this._weekdaysStrictRegex&&v?this._weekdaysStrictRegex:this._weekdaysRegex)},mt.weekdaysShortRegex=function(v){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Mt.call(this),v?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ve),this._weekdaysShortStrictRegex&&v?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},mt.weekdaysMinRegex=function(v){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Mt.call(this),v?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ot),this._weekdaysMinStrictRegex&&v?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},mt.isPM=function(v){return(v+"").toLowerCase().charAt(0)==="p"},mt.meridiem=function(v,O,j){return 11<v?j?"pm":"PM":j?"am":"AM"},at("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(v){var O=v%10;return v+(ee(v%100/10)===1?"th":O==1?"st":O==2?"nd":O==3?"rd":"th")}}),n.lang=V("moment.lang is deprecated. Use moment.locale instead.",at),n.langData=V("moment.langData is deprecated. Use moment.localeData instead.",pt);var ar=Math.abs;function an(v,O,j,ne){return O=Zt(O,j),v._milliseconds+=ne*O._milliseconds,v._days+=ne*O._days,v._months+=ne*O._months,v._bubble()}function sn(v){return v<0?Math.floor(v):Math.ceil(v)}function on(v){return 4800*v/146097}function Ur(v){return 146097*v/4800}function sr(v){return function(){return this.as(v)}}je=sr("ms"),fe=sr("s"),lt=sr("m"),He=sr("h"),Ye=sr("d"),qt=sr("w"),Be=sr("M"),_r=sr("Q"),lr=sr("y");function mr(v){return function(){return this.isValid()?this._data[v]:NaN}}var ur=mr("milliseconds"),hr=mr("seconds"),Dr=mr("minutes"),mt=mr("hours"),fn=mr("days"),dn=mr("months"),pn=mr("years"),or=Math.round,vr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function gn(v,O,j,ne){var We=Zt(v).abs(),yt=or(We.as("s")),le=or(We.as("m")),$e=or(We.as("h")),De=or(We.as("d")),ze=or(We.as("M")),Qe=or(We.as("w")),We=or(We.as("y")),yt=(yt<=j.ss?["s",yt]:yt<j.s&&["ss",yt])||le<=1&&["m"]||le<j.m&&["mm",le]||$e<=1&&["h"]||$e<j.h&&["hh",$e]||De<=1&&["d"]||De<j.d&&["dd",De];return(yt=(yt=j.w!=null?yt||Qe<=1&&["w"]||Qe<j.w&&["ww",Qe]:yt)||ze<=1&&["M"]||ze<j.M&&["MM",ze]||We<=1&&["y"]||["yy",We])[2]=O,yt[3]=0<+v,yt[4]=ne,function(ut,Ot,Ft,Xt,Hr){return Hr.relativeTime(Ot||1,!!Ft,ut,Xt)}.apply(null,yt)}var zr=Math.abs;function $r(v){return(0<v)-(v<0)||+v}function Nr(){if(!this.isValid())return this.localeData().invalidDate();var v,O,j,ne,le,$e,De,ze=zr(this._milliseconds)/1e3,Qe=zr(this._days),We=zr(this._months),yt=this.asSeconds();return yt?(v=oe(ze/60),O=oe(v/60),ze%=60,v%=60,j=oe(We/12),We%=12,ne=ze?ze.toFixed(3).replace(/\.?0+$/,""):"",le=$r(this._months)!==$r(yt)?"-":"",$e=$r(this._days)!==$r(yt)?"-":"",De=$r(this._milliseconds)!==$r(yt)?"-":"",(yt<0?"-":"")+"P"+(j?le+j+"Y":"")+(We?le+We+"M":"")+(Qe?$e+Qe+"D":"")+(O||v||ze?"T":"")+(O?De+O+"H":"")+(v?De+v+"M":"")+(ze?De+ne+"S":"")):"P0D"}var Ct=Kt.prototype;return Ct.isValid=function(){return this._isValid},Ct.abs=function(){var v=this._data;return this._milliseconds=ar(this._milliseconds),this._days=ar(this._days),this._months=ar(this._months),v.milliseconds=ar(v.milliseconds),v.seconds=ar(v.seconds),v.minutes=ar(v.minutes),v.hours=ar(v.hours),v.months=ar(v.months),v.years=ar(v.years),this},Ct.add=function(v,O){return an(this,v,O,1)},Ct.subtract=function(v,O){return an(this,v,O,-1)},Ct.as=function(v){if(!this.isValid())return NaN;var O,j,ne=this._milliseconds;if((v=Ce(v))==="month"||v==="quarter"||v==="year")switch(O=this._days+ne/864e5,j=this._months+on(O),v){case"month":return j;case"quarter":return j/3;case"year":return j/12}else switch(O=this._days+Math.round(Ur(this._months)),v){case"week":return O/7+ne/6048e5;case"day":return O+ne/864e5;case"hour":return 24*O+ne/36e5;case"minute":return 1440*O+ne/6e4;case"second":return 86400*O+ne/1e3;case"millisecond":return Math.floor(864e5*O)+ne;default:throw new Error("Unknown unit "+v)}},Ct.asMilliseconds=je,Ct.asSeconds=fe,Ct.asMinutes=lt,Ct.asHours=He,Ct.asDays=Ye,Ct.asWeeks=qt,Ct.asMonths=Be,Ct.asQuarters=_r,Ct.asYears=lr,Ct.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ee(this._months/12):NaN},Ct._bubble=function(){var v=this._milliseconds,O=this._days,j=this._months,ne=this._data;return 0<=v&&0<=O&&0<=j||v<=0&&O<=0&&j<=0||(v+=864e5*sn(Ur(j)+O),j=O=0),ne.milliseconds=v%1e3,v=oe(v/1e3),ne.seconds=v%60,v=oe(v/60),ne.minutes=v%60,v=oe(v/60),ne.hours=v%24,O+=oe(v/24),j+=v=oe(on(O)),O-=sn(Ur(v)),v=oe(j/12),j%=12,ne.days=O,ne.months=j,ne.years=v,this},Ct.clone=function(){return Zt(this)},Ct.get=function(v){return v=Ce(v),this.isValid()?this[v+"s"]():NaN},Ct.milliseconds=ur,Ct.seconds=hr,Ct.minutes=Dr,Ct.hours=mt,Ct.days=fn,Ct.weeks=function(){return oe(this.days()/7)},Ct.months=dn,Ct.years=pn,Ct.humanize=function(v,O){if(!this.isValid())return this.localeData().invalidDate();var j=!1,ne=vr;return typeof v=="object"&&(O=v,v=!1),typeof v=="boolean"&&(j=v),typeof O=="object"&&(ne=Object.assign({},vr,O),O.s!=null&&O.ss==null&&(ne.ss=O.s-1)),v=this.localeData(),O=gn(this,!j,ne,v),j&&(O=v.pastFuture(+this,O)),v.postformat(O)},Ct.toISOString=Nr,Ct.toString=Nr,Ct.toJSON=Nr,Ct.locale=Zr,Ct.localeData=Xr,Ct.toIsoString=V("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Nr),Ct.lang=ye,ce("X",0,0,"unix"),ce("x",0,0,"valueOf"),Te("x",Ee),Te("X",/[+-]?\d+(\.\d{1,3})?/),st("X",function(v,O,j){j._d=new Date(1e3*parseFloat(v))}),st("x",function(v,O,j){j._d=new Date(ee(v))}),n.version="2.29.4",r=Et,n.fn=te,n.min=function(){return Vt("isBefore",[].slice.call(arguments,0))},n.max=function(){return Vt("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=m,n.unix=function(v){return Et(1e3*v)},n.months=function(v,O){return nn(v,O,"months")},n.isDate=d,n.locale=at,n.invalid=S,n.duration=Zt,n.isMoment=G,n.weekdays=function(v,O,j){return Pr(v,O,j,"weekdays")},n.parseZone=function(){return Et.apply(null,arguments).parseZone()},n.localeData=pt,n.isDuration=ir,n.monthsShort=function(v,O){return nn(v,O,"monthsShort")},n.weekdaysMin=function(v,O,j){return Pr(v,O,j,"weekdaysMin")},n.defineLocale=ct,n.updateLocale=function(v,O){var j,ne;return O!=null?(ne=rr,Tt[v]!=null&&Tt[v].parentLocale!=null?Tt[v].set(U(Tt[v]._config,O)):(O=U(ne=(j=Gt(v))!=null?j._config:ne,O),j==null&&(O.abbr=v),(ne=new I(O)).parentLocale=Tt[v],Tt[v]=ne),at(v)):Tt[v]!=null&&(Tt[v].parentLocale!=null?(Tt[v]=Tt[v].parentLocale,v===at()&&at(v)):Tt[v]!=null&&delete Tt[v]),Tt[v]},n.locales=function(){return ae(Tt)},n.weekdaysShort=function(v,O,j){return Pr(v,O,j,"weekdaysShort")},n.normalizeUnits=Ce,n.relativeTimeRounding=function(v){return v===void 0?or:typeof v=="function"&&(or=v,!0)},n.relativeTimeThreshold=function(v,O){return vr[v]!==void 0&&(O===void 0?vr[v]:(vr[v]=O,v==="s"&&(vr.ss=O-1),!0))},n.calendarFormat=function(v,O){return(v=v.diff(O,"days",!0))<-6?"sameElse":v<-1?"lastWeek":v<0?"lastDay":v<1?"sameDay":v<2?"nextDay":v<7?"nextWeek":"sameElse"},n.prototype=te,n.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"},n})})(moment_min);const moment=moment_min.exports;var dist={};Object.defineProperty(dist,"__esModule",{value:!0});var sanitizeUrl_1=dist.sanitizeUrl=void 0,invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,urlSchemeRegex=/^([^:]+):/gm,relativeFirstCharacters=[".","/"];function isRelativeUrlWithoutProtocol(e){return relativeFirstCharacters.indexOf(e[0])>-1}function decodeHtmlCharacters(e){return e.replace(htmlEntitiesRegex,function(t,r){return String.fromCharCode(r)})}function sanitizeUrl(e){var t=decodeHtmlCharacters(e||"").replace(ctrlCharactersRegex,"").trim();if(!t)return"about:blank";if(isRelativeUrlWithoutProtocol(t))return t;var r=t.match(urlSchemeRegex);if(!r)return t;var n=r[0];return invalidProtocolRegex.test(n)?"about:blank":t}sanitizeUrl_1=dist.sanitizeUrl=sanitizeUrl;class InternMap extends Map{constructor(t,r=keyof){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(intern_get(this,t))}has(t){return super.has(intern_get(this,t))}set(t,r){return super.set(intern_set(this,t),r)}delete(t){return super.delete(intern_delete(this,t))}}function intern_get({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function intern_set({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function intern_delete({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function keyof(e){return e!==null&&typeof e=="object"?e.valueOf():e}function max$4(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function min$3(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function identity$e(e){return e}var top$1=1,right$1=2,bottom$1=3,left$1=4,epsilon$7=1e-6;function translateX$1(e){return"translate("+e+",0)"}function translateY$1(e){return"translate(0,"+e+")"}function number$7(e){return t=>+e(t)}function center$2(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function entering$1(){return!this.__axis}function axis$1(e,t){var r=[],n=null,i=null,o=6,l=6,u=3,h=typeof window<"u"&&window.devicePixelRatio>1?0:.5,f=e===top$1||e===left$1?-1:1,d=e===left$1||e===right$1?"x":"y",g=e===top$1||e===bottom$1?translateX$1:translateY$1;function p(m){var b=n==null?t.ticks?t.ticks.apply(t,r):t.domain():n,$=i==null?t.tickFormat?t.tickFormat.apply(t,r):identity$e:i,S=Math.max(o,0)+u,R=t.range(),L=+R[0]+h,N=+R[R.length-1]+h,F=(t.bandwidth?center$2:number$7)(t.copy(),h),H=m.selection?m.selection():m,G=H.selectAll(".domain").data([null]),P=H.selectAll(".tick").data(b,t).order(),V=P.exit(),z=P.enter().append("g").attr("class","tick"),W=P.select("line"),T=P.select("text");G=G.merge(G.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(z),W=W.merge(z.append("line").attr("stroke","currentColor").attr(d+"2",f*o)),T=T.merge(z.append("text").attr("fill","currentColor").attr(d,f*S).attr("dy",e===top$1?"0em":e===bottom$1?"0.71em":"0.32em")),m!==H&&(G=G.transition(m),P=P.transition(m),W=W.transition(m),T=T.transition(m),V=V.transition(m).attr("opacity",epsilon$7).attr("transform",function(U){return isFinite(U=F(U))?g(U+h):this.getAttribute("transform")}),z.attr("opacity",epsilon$7).attr("transform",function(U){var I=this.parentNode.__axis;return g((I&&isFinite(I=I(U))?I:F(U))+h)})),V.remove(),G.attr("d",e===left$1||e===right$1?l?"M"+f*l+","+L+"H"+h+"V"+N+"H"+f*l:"M"+h+","+L+"V"+N:l?"M"+L+","+f*l+"V"+h+"H"+N+"V"+f*l:"M"+L+","+h+"H"+N),P.attr("opacity",1).attr("transform",function(U){return g(F(U)+h)}),W.attr(d+"2",f*o),T.attr(d,f*S).text($),H.filter(entering$1).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===right$1?"start":e===left$1?"end":"middle"),H.each(function(){this.__axis=F})}return p.scale=function(m){return arguments.length?(t=m,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),p):n&&n.slice()},p.tickFormat=function(m){return arguments.length?(i=m,p):i},p.tickSize=function(m){return arguments.length?(o=l=+m,p):o},p.tickSizeInner=function(m){return arguments.length?(o=+m,p):o},p.tickSizeOuter=function(m){return arguments.length?(l=+m,p):l},p.tickPadding=function(m){return arguments.length?(u=+m,p):u},p.offset=function(m){return arguments.length?(h=+m,p):h},p}function axisTop$1(e){return axis$1(top$1,e)}function axisBottom$1(e){return axis$1(bottom$1,e)}function define$2(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function extend$2(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Color$4(){}var darker$2=.7,brighter$2=1/darker$2,reI$2="\\s*([+-]?\\d+)\\s*",reN$2="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",reP$2="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",reHex$2=/^#([0-9a-f]{3,8})$/,reRgbInteger$2=new RegExp("^rgb\\("+[reI$2,reI$2,reI$2]+"\\)$"),reRgbPercent$2=new RegExp("^rgb\\("+[reP$2,reP$2,reP$2]+"\\)$"),reRgbaInteger$2=new RegExp("^rgba\\("+[reI$2,reI$2,reI$2,reN$2]+"\\)$"),reRgbaPercent$2=new RegExp("^rgba\\("+[reP$2,reP$2,reP$2,reN$2]+"\\)$"),reHslPercent$2=new RegExp("^hsl\\("+[reN$2,reP$2,reP$2]+"\\)$"),reHslaPercent$2=new RegExp("^hsla\\("+[reN$2,reP$2,reP$2,reN$2]+"\\)$"),named$2={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};define$2(Color$4,color$2,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:color_formatHex$2,formatHex:color_formatHex$2,formatHsl:color_formatHsl$2,formatRgb:color_formatRgb$2,toString:color_formatRgb$2});function color_formatHex$2(){return this.rgb().formatHex()}function color_formatHsl$2(){return hslConvert$2(this).formatHsl()}function color_formatRgb$2(){return this.rgb().formatRgb()}function color$2(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=reHex$2.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?rgbn$2(t):r===3?new Rgb$2(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?rgba$4(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?rgba$4(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=reRgbInteger$2.exec(e))?new Rgb$2(t[1],t[2],t[3],1):(t=reRgbPercent$2.exec(e))?new Rgb$2(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=reRgbaInteger$2.exec(e))?rgba$4(t[1],t[2],t[3],t[4]):(t=reRgbaPercent$2.exec(e))?rgba$4(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=reHslPercent$2.exec(e))?hsla$2(t[1],t[2]/100,t[3]/100,1):(t=reHslaPercent$2.exec(e))?hsla$2(t[1],t[2]/100,t[3]/100,t[4]):named$2.hasOwnProperty(e)?rgbn$2(named$2[e]):e==="transparent"?new Rgb$2(NaN,NaN,NaN,0):null}function rgbn$2(e){return new Rgb$2(e>>16&255,e>>8&255,e&255,1)}function rgba$4(e,t,r,n){return n<=0&&(e=t=r=NaN),new Rgb$2(e,t,r,n)}function rgbConvert$2(e){return e instanceof Color$4||(e=color$2(e)),e?(e=e.rgb(),new Rgb$2(e.r,e.g,e.b,e.opacity)):new Rgb$2}function rgb$3(e,t,r,n){return arguments.length===1?rgbConvert$2(e):new Rgb$2(e,t,r,n==null?1:n)}function Rgb$2(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}define$2(Rgb$2,rgb$3,extend$2(Color$4,{brighter:function(e){return e=e==null?brighter$2:Math.pow(brighter$2,e),new Rgb$2(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?darker$2:Math.pow(darker$2,e),new Rgb$2(this.r*e,this.g*e,this.b*e,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:rgb_formatHex$2,formatHex:rgb_formatHex$2,formatRgb:rgb_formatRgb$2,toString:rgb_formatRgb$2}));function rgb_formatHex$2(){return"#"+hex$2(this.r)+hex$2(this.g)+hex$2(this.b)}function rgb_formatRgb$2(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"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))+(e===1?")":", "+e+")")}function hex$2(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function hsla$2(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Hsl$2(e,t,r,n)}function hslConvert$2(e){if(e instanceof Hsl$2)return new Hsl$2(e.h,e.s,e.l,e.opacity);if(e instanceof Color$4||(e=color$2(e)),!e)return new Hsl$2;if(e instanceof Hsl$2)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),l=NaN,u=o-i,h=(o+i)/2;return u?(t===o?l=(r-n)/u+(r<n)*6:r===o?l=(n-t)/u+2:l=(t-r)/u+4,u/=h<.5?o+i:2-o-i,l*=60):u=h>0&&h<1?0:l,new Hsl$2(l,u,h,e.opacity)}function hsl$4(e,t,r,n){return arguments.length===1?hslConvert$2(e):new Hsl$2(e,t,r,n==null?1:n)}function Hsl$2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}define$2(Hsl$2,hsl$4,extend$2(Color$4,{brighter:function(e){return e=e==null?brighter$2:Math.pow(brighter$2,e),new Hsl$2(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?darker$2:Math.pow(darker$2,e),new Hsl$2(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Rgb$2(hsl2rgb$2(e>=240?e-240:e+120,i,n),hsl2rgb$2(e,i,n),hsl2rgb$2(e<120?e+240:e-120,i,n),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 e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function hsl2rgb$2(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const radians$1=Math.PI/180,degrees$3=180/Math.PI,K$1=18,Xn$1=.96422,Yn$1=1,Zn$1=.82521,t0$4=4/29,t1$4=6/29,t2$1=3*t1$4*t1$4,t3$1=t1$4*t1$4*t1$4;function labConvert$1(e){if(e instanceof Lab$1)return new Lab$1(e.l,e.a,e.b,e.opacity);if(e instanceof Hcl$1)return hcl2lab$1(e);e instanceof Rgb$2||(e=rgbConvert$2(e));var t=rgb2lrgb$1(e.r),r=rgb2lrgb$1(e.g),n=rgb2lrgb$1(e.b),i=xyz2lab$1((.2225045*t+.7168786*r+.0606169*n)/Yn$1),o,l;return t===r&&r===n?o=l=i:(o=xyz2lab$1((.4360747*t+.3850649*r+.1430804*n)/Xn$1),l=xyz2lab$1((.0139322*t+.0971045*r+.7141733*n)/Zn$1)),new Lab$1(116*i-16,500*(o-i),200*(i-l),e.opacity)}function lab$2(e,t,r,n){return arguments.length===1?labConvert$1(e):new Lab$1(e,t,r,n==null?1:n)}function Lab$1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}define$2(Lab$1,lab$2,extend$2(Color$4,{brighter:function(e){return new Lab$1(this.l+K$1*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Lab$1(this.l-K$1*(e==null?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=Xn$1*lab2xyz$1(t),e=Yn$1*lab2xyz$1(e),r=Zn$1*lab2xyz$1(r),new Rgb$2(lrgb2rgb$1(3.1338561*t-1.6168667*e-.4906146*r),lrgb2rgb$1(-.9787684*t+1.9161415*e+.033454*r),lrgb2rgb$1(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function xyz2lab$1(e){return e>t3$1?Math.pow(e,1/3):e/t2$1+t0$4}function lab2xyz$1(e){return e>t1$4?e*e*e:t2$1*(e-t0$4)}function lrgb2rgb$1(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function rgb2lrgb$1(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function hclConvert$1(e){if(e instanceof Hcl$1)return new Hcl$1(e.h,e.c,e.l,e.opacity);if(e instanceof Lab$1||(e=labConvert$1(e)),e.a===0&&e.b===0)return new Hcl$1(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*degrees$3;return new Hcl$1(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function hcl$4(e,t,r,n){return arguments.length===1?hclConvert$1(e):new Hcl$1(e,t,r,n==null?1:n)}function Hcl$1(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function hcl2lab$1(e){if(isNaN(e.h))return new Lab$1(e.l,0,0,e.opacity);var t=e.h*radians$1;return new Lab$1(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}define$2(Hcl$1,hcl$4,extend$2(Color$4,{brighter:function(e){return new Hcl$1(this.h,this.c,this.l+K$1*(e==null?1:e),this.opacity)},darker:function(e){return new Hcl$1(this.h,this.c,this.l-K$1*(e==null?1:e),this.opacity)},rgb:function(){return hcl2lab$1(this).rgb()}}));var noop$5={value:()=>{}};function dispatch$1(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Dispatch$1(r)}function Dispatch$1(e){this._=e}function parseTypenames$3(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Dispatch$1.prototype=dispatch$1.prototype={constructor:Dispatch$1,on:function(e,t){var r=this._,n=parseTypenames$3(e+"",r),i,o=-1,l=n.length;if(arguments.length<2){for(;++o<l;)if((i=(e=n[o]).type)&&(i=get$3(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<l;)if(i=(e=n[o]).type)r[i]=set$4(r[i],e.name,t);else if(t==null)for(i in r)r[i]=set$4(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Dispatch$1(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function get$3(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function set$4(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=noop$5,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var xhtml$1="http://www.w3.org/1999/xhtml";const namespaces$1={svg:"http://www.w3.org/2000/svg",xhtml:xhtml$1,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function namespace$1(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),namespaces$1.hasOwnProperty(t)?{space:namespaces$1[t],local:e}:e}function creatorInherit$1(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===xhtml$1&&t.documentElement.namespaceURI===xhtml$1?t.createElement(e):t.createElementNS(r,e)}}function creatorFixed$1(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function creator$1(e){var t=namespace$1(e);return(t.local?creatorFixed$1:creatorInherit$1)(t)}function none$3(){}function selector$1(e){return e==null?none$3:function(){return this.querySelector(e)}}function selection_select$1(e){typeof e!="function"&&(e=selector$1(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],l=o.length,u=n[i]=new Array(l),h,f,d=0;d<l;++d)(h=o[d])&&(f=e.call(h,h.__data__,d,o))&&("__data__"in h&&(f.__data__=h.__data__),u[d]=f);return new Selection$3(n,this._parents)}function array$5(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function empty$2(){return[]}function selectorAll$1(e){return e==null?empty$2:function(){return this.querySelectorAll(e)}}function arrayAll(e){return function(){return array$5(e.apply(this,arguments))}}function selection_selectAll$1(e){typeof e=="function"?e=arrayAll(e):e=selectorAll$1(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var l=t[o],u=l.length,h,f=0;f<u;++f)(h=l[f])&&(n.push(e.call(h,h.__data__,f,l)),i.push(h));return new Selection$3(n,i)}function matcher$1(e){return function(){return this.matches(e)}}function childMatcher(e){return function(t){return t.matches(e)}}var find$1=Array.prototype.find;function childFind(e){return function(){return find$1.call(this.children,e)}}function childFirst(){return this.firstElementChild}function selection_selectChild(e){return this.select(e==null?childFirst:childFind(typeof e=="function"?e:childMatcher(e)))}var filter=Array.prototype.filter;function children(){return Array.from(this.children)}function childrenFilter(e){return function(){return filter.call(this.children,e)}}function selection_selectChildren(e){return this.selectAll(e==null?children:childrenFilter(typeof e=="function"?e:childMatcher(e)))}function selection_filter$1(e){typeof e!="function"&&(e=matcher$1(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],l=o.length,u=n[i]=[],h,f=0;f<l;++f)(h=o[f])&&e.call(h,h.__data__,f,o)&&u.push(h);return new Selection$3(n,this._parents)}function sparse$1(e){return new Array(e.length)}function selection_enter$1(){return new Selection$3(this._enter||this._groups.map(sparse$1),this._parents)}function EnterNode$1(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}EnterNode$1.prototype={constructor:EnterNode$1,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function constant$h(e){return function(){return e}}function bindIndex$1(e,t,r,n,i,o){for(var l=0,u,h=t.length,f=o.length;l<f;++l)(u=t[l])?(u.__data__=o[l],n[l]=u):r[l]=new EnterNode$1(e,o[l]);for(;l<h;++l)(u=t[l])&&(i[l]=u)}function bindKey$1(e,t,r,n,i,o,l){var u,h,f=new Map,d=t.length,g=o.length,p=new Array(d),m;for(u=0;u<d;++u)(h=t[u])&&(p[u]=m=l.call(h,h.__data__,u,t)+"",f.has(m)?i[u]=h:f.set(m,h));for(u=0;u<g;++u)m=l.call(e,o[u],u,o)+"",(h=f.get(m))?(n[u]=h,h.__data__=o[u],f.delete(m)):r[u]=new EnterNode$1(e,o[u]);for(u=0;u<d;++u)(h=t[u])&&f.get(p[u])===h&&(i[u]=h)}function datum(e){return e.__data__}function selection_data$1(e,t){if(!arguments.length)return Array.from(this,datum);var r=t?bindKey$1:bindIndex$1,n=this._parents,i=this._groups;typeof e!="function"&&(e=constant$h(e));for(var o=i.length,l=new Array(o),u=new Array(o),h=new Array(o),f=0;f<o;++f){var d=n[f],g=i[f],p=g.length,m=arraylike(e.call(d,d&&d.__data__,f,n)),b=m.length,$=u[f]=new Array(b),S=l[f]=new Array(b),R=h[f]=new Array(p);r(d,g,$,S,R,m,t);for(var L=0,N=0,F,H;L<b;++L)if(F=$[L]){for(L>=N&&(N=L+1);!(H=S[N])&&++N<b;);F._next=H||null}}return l=new Selection$3(l,n),l._enter=u,l._exit=h,l}function arraylike(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function selection_exit$1(){return new Selection$3(this._exit||this._groups.map(sparse$1),this._parents)}function selection_join$1(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function selection_merge$1(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,l=Math.min(i,o),u=new Array(i),h=0;h<l;++h)for(var f=r[h],d=n[h],g=f.length,p=u[h]=new Array(g),m,b=0;b<g;++b)(m=f[b]||d[b])&&(p[b]=m);for(;h<i;++h)u[h]=r[h];return new Selection$3(u,this._parents)}function selection_order$1(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],l;--i>=0;)(l=n[i])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function selection_sort$1(e){e||(e=ascending$5);function t(g,p){return g&&p?e(g.__data__,p.__data__):!g-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var l=r[o],u=l.length,h=i[o]=new Array(u),f,d=0;d<u;++d)(f=l[d])&&(h[d]=f);h.sort(t)}return new Selection$3(i,this._parents).order()}function ascending$5(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function selection_call$1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function selection_nodes$1(){return Array.from(this)}function selection_node$1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var l=n[i];if(l)return l}return null}function selection_size$1(){let e=0;for(const t of this)++e;return e}function selection_empty$1(){return!this.node()}function selection_each$1(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,l=i.length,u;o<l;++o)(u=i[o])&&e.call(u,u.__data__,o,i);return this}function attrRemove$3(e){return function(){this.removeAttribute(e)}}function attrRemoveNS$3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function attrConstant$3(e,t){return function(){this.setAttribute(e,t)}}function attrConstantNS$3(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function attrFunction$3(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function attrFunctionNS$3(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function selection_attr$1(e,t){var r=namespace$1(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?attrRemoveNS$3:attrRemove$3:typeof t=="function"?r.local?attrFunctionNS$3:attrFunction$3:r.local?attrConstantNS$3:attrConstant$3)(r,t))}function defaultView$1(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function styleRemove$3(e){return function(){this.style.removeProperty(e)}}function styleConstant$3(e,t,r){return function(){this.style.setProperty(e,t,r)}}function styleFunction$3(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function selection_style$1(e,t,r){return arguments.length>1?this.each((t==null?styleRemove$3:typeof t=="function"?styleFunction$3:styleConstant$3)(e,t,r==null?"":r)):styleValue$1(this.node(),e)}function styleValue$1(e,t){return e.style.getPropertyValue(t)||defaultView$1(e).getComputedStyle(e,null).getPropertyValue(t)}function propertyRemove$1(e){return function(){delete this[e]}}function propertyConstant$1(e,t){return function(){this[e]=t}}function propertyFunction$1(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function selection_property$1(e,t){return arguments.length>1?this.each((t==null?propertyRemove$1:typeof t=="function"?propertyFunction$1:propertyConstant$1)(e,t)):this.node()[e]}function classArray$1(e){return e.trim().split(/^|\s+/)}function classList$1(e){return e.classList||new ClassList$1(e)}function ClassList$1(e){this._node=e,this._names=classArray$1(e.getAttribute("class")||"")}ClassList$1.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function classedAdd$1(e,t){for(var r=classList$1(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function classedRemove$1(e,t){for(var r=classList$1(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function classedTrue$1(e){return function(){classedAdd$1(this,e)}}function classedFalse$1(e){return function(){classedRemove$1(this,e)}}function classedFunction$1(e,t){return function(){(t.apply(this,arguments)?classedAdd$1:classedRemove$1)(this,e)}}function selection_classed$1(e,t){var r=classArray$1(e+"");if(arguments.length<2){for(var n=classList$1(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?classedFunction$1:t?classedTrue$1:classedFalse$1)(r,t))}function textRemove$1(){this.textContent=""}function textConstant$3(e){return function(){this.textContent=e}}function textFunction$3(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function selection_text$1(e){return arguments.length?this.each(e==null?textRemove$1:(typeof e=="function"?textFunction$3:textConstant$3)(e)):this.node().textContent}function htmlRemove$1(){this.innerHTML=""}function htmlConstant$1(e){return function(){this.innerHTML=e}}function htmlFunction$1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function selection_html$1(e){return arguments.length?this.each(e==null?htmlRemove$1:(typeof e=="function"?htmlFunction$1:htmlConstant$1)(e)):this.node().innerHTML}function raise$1(){this.nextSibling&&this.parentNode.appendChild(this)}function selection_raise$1(){return this.each(raise$1)}function lower$1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function selection_lower$1(){return this.each(lower$1)}function selection_append$1(e){var t=typeof e=="function"?e:creator$1(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function constantNull$1(){return null}function selection_insert$1(e,t){var r=typeof e=="function"?e:creator$1(e),n=t==null?constantNull$1:typeof t=="function"?t:selector$1(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function remove$1(){var e=this.parentNode;e&&e.removeChild(this)}function selection_remove$1(){return this.each(remove$1)}function selection_cloneShallow$1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function selection_cloneDeep$1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function selection_clone$1(e){return this.select(e?selection_cloneDeep$1:selection_cloneShallow$1)}function selection_datum$1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function contextListener$1(e){return function(t){e.call(this,t,this.__data__)}}function parseTypenames$2(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function onRemove$1(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function onAdd$1(e,t,r){return function(){var n=this.__on,i,o=contextListener$1(t);if(n){for(var l=0,u=n.length;l<u;++l)if((i=n[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function selection_on$1(e,t,r){var n=parseTypenames$2(e+""),i,o=n.length,l;if(arguments.length<2){var u=this.node().__on;if(u){for(var h=0,f=u.length,d;h<f;++h)for(i=0,d=u[h];i<o;++i)if((l=n[i]).type===d.type&&l.name===d.name)return d.value}return}for(u=t?onAdd$1:onRemove$1,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function dispatchEvent$1(e,t,r){var n=defaultView$1(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function dispatchConstant$1(e,t){return function(){return dispatchEvent$1(this,e,t)}}function dispatchFunction$1(e,t){return function(){return dispatchEvent$1(this,e,t.apply(this,arguments))}}function selection_dispatch$1(e,t){return this.each((typeof t=="function"?dispatchFunction$1:dispatchConstant$1)(e,t))}function*selection_iterator(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,l;i<o;++i)(l=n[i])&&(yield l)}var root$3=[null];function Selection$3(e,t){this._groups=e,this._parents=t}function selection$1(){return new Selection$3([[document.documentElement]],root$3)}function selection_selection(){return this}Selection$3.prototype=selection$1.prototype={constructor:Selection$3,select:selection_select$1,selectAll:selection_selectAll$1,selectChild:selection_selectChild,selectChildren:selection_selectChildren,filter:selection_filter$1,data:selection_data$1,enter:selection_enter$1,exit:selection_exit$1,join:selection_join$1,merge:selection_merge$1,selection:selection_selection,order:selection_order$1,sort:selection_sort$1,call:selection_call$1,nodes:selection_nodes$1,node:selection_node$1,size:selection_size$1,empty:selection_empty$1,each:selection_each$1,attr:selection_attr$1,style:selection_style$1,property:selection_property$1,classed:selection_classed$1,text:selection_text$1,html:selection_html$1,raise:selection_raise$1,lower:selection_lower$1,append:selection_append$1,insert:selection_insert$1,remove:selection_remove$1,clone:selection_clone$1,datum:selection_datum$1,on:selection_on$1,dispatch:selection_dispatch$1,[Symbol.iterator]:selection_iterator};function select$1(e){return typeof e=="string"?new Selection$3([[document.querySelector(e)]],[document.documentElement]):new Selection$3([[e]],root$3)}function selectAll$1(e){return typeof e=="string"?new Selection$3([document.querySelectorAll(e)],[document.documentElement]):new Selection$3([array$5(e)],root$3)}function cubicInOut$1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}const constant$g=e=>()=>e;function linear$5(e,t){return function(r){return e+r*t}}function exponential$3(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function hue$2(e,t){var r=t-e;return r?linear$5(e,r>180||r<-180?r-360*Math.round(r/360):r):constant$g(isNaN(e)?t:e)}function gamma$2(e){return(e=+e)==1?nogamma$2:function(t,r){return r-t?exponential$3(t,r,e):constant$g(isNaN(t)?r:t)}}function nogamma$2(e,t){var r=t-e;return r?linear$5(e,r):constant$g(isNaN(e)?t:e)}const interpolateRgb$1=function e(t){var r=gamma$2(t);function n(i,o){var l=r((i=rgb$3(i)).r,(o=rgb$3(o)).r),u=r(i.g,o.g),h=r(i.b,o.b),f=nogamma$2(i.opacity,o.opacity);return function(d){return i.r=l(d),i.g=u(d),i.b=h(d),i.opacity=f(d),i+""}}return n.gamma=e,n}(1);function interpolateNumber$2(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var reA$2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB$2=new RegExp(reA$2.source,"g");function zero$2(e){return function(){return e}}function one$2(e){return function(t){return e(t)+""}}function interpolateString$1(e,t){var r=reA$2.lastIndex=reB$2.lastIndex=0,n,i,o,l=-1,u=[],h=[];for(e=e+"",t=t+"";(n=reA$2.exec(e))&&(i=reB$2.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),u[l]?u[l]+=o:u[++l]=o),(n=n[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,h.push({i:l,x:interpolateNumber$2(n,i)})),r=reB$2.lastIndex;return r<t.length&&(o=t.slice(r),u[l]?u[l]+=o:u[++l]=o),u.length<2?h[0]?one$2(h[0].x):zero$2(t):(t=h.length,function(f){for(var d=0,g;d<t;++d)u[(g=h[d]).i]=g.x(f);return u.join("")})}var degrees$2=180/Math.PI,identity$d={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function decompose$1(e,t,r,n,i,o){var l,u,h;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(h=e*r+t*n)&&(r-=e*h,n-=t*h),(u=Math.sqrt(r*r+n*n))&&(r/=u,n/=u,h/=u),e*n<t*r&&(e=-e,t=-t,h=-h,l=-l),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*degrees$2,skewX:Math.atan(h)*degrees$2,scaleX:l,scaleY:u}}var svgNode$1;function parseCss$1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?identity$d:decompose$1(t.a,t.b,t.c,t.d,t.e,t.f)}function parseSvg$1(e){return e==null||(svgNode$1||(svgNode$1=document.createElementNS("http://www.w3.org/2000/svg","g")),svgNode$1.setAttribute("transform",e),!(e=svgNode$1.transform.baseVal.consolidate()))?identity$d:(e=e.matrix,decompose$1(e.a,e.b,e.c,e.d,e.e,e.f))}function interpolateTransform$1(e,t,r,n){function i(f){return f.length?f.pop()+" ":""}function o(f,d,g,p,m,b){if(f!==g||d!==p){var $=m.push("translate(",null,t,null,r);b.push({i:$-4,x:interpolateNumber$2(f,g)},{i:$-2,x:interpolateNumber$2(d,p)})}else(g||p)&&m.push("translate("+g+t+p+r)}function l(f,d,g,p){f!==d?(f-d>180?d+=360:d-f>180&&(f+=360),p.push({i:g.push(i(g)+"rotate(",null,n)-2,x:interpolateNumber$2(f,d)})):d&&g.push(i(g)+"rotate("+d+n)}function u(f,d,g,p){f!==d?p.push({i:g.push(i(g)+"skewX(",null,n)-2,x:interpolateNumber$2(f,d)}):d&&g.push(i(g)+"skewX("+d+n)}function h(f,d,g,p,m,b){if(f!==g||d!==p){var $=m.push(i(m)+"scale(",null,",",null,")");b.push({i:$-4,x:interpolateNumber$2(f,g)},{i:$-2,x:interpolateNumber$2(d,p)})}else(g!==1||p!==1)&&m.push(i(m)+"scale("+g+","+p+")")}return function(f,d){var g=[],p=[];return f=e(f),d=e(d),o(f.translateX,f.translateY,d.translateX,d.translateY,g,p),l(f.rotate,d.rotate,g,p),u(f.skewX,d.skewX,g,p),h(f.scaleX,f.scaleY,d.scaleX,d.scaleY,g,p),f=d=null,function(m){for(var b=-1,$=p.length,S;++b<$;)g[(S=p[b]).i]=S.x(m);return g.join("")}}}var interpolateTransformCss$1=interpolateTransform$1(parseCss$1,"px, ","px)","deg)"),interpolateTransformSvg$1=interpolateTransform$1(parseSvg$1,", ",")",")");function hcl$3(e){return function(t,r){var n=e((t=hcl$4(t)).h,(r=hcl$4(r)).h),i=nogamma$2(t.c,r.c),o=nogamma$2(t.l,r.l),l=nogamma$2(t.opacity,r.opacity);return function(u){return t.h=n(u),t.c=i(u),t.l=o(u),t.opacity=l(u),t+""}}}const interpolateHcl=hcl$3(hue$2);function ascending$4(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function bisector$1(e){let t=e,r=e,n=e;e.length!==2&&(t=(u,h)=>e(u)-h,r=ascending$4,n=(u,h)=>ascending$4(e(u),h));function i(u,h,f=0,d=u.length){if(f<d){if(r(h,h)!==0)return d;do{const g=f+d>>>1;n(u[g],h)<0?f=g+1:d=g}while(f<d)}return f}function o(u,h,f=0,d=u.length){if(f<d){if(r(h,h)!==0)return d;do{const g=f+d>>>1;n(u[g],h)<=0?f=g+1:d=g}while(f<d)}return f}function l(u,h,f=0,d=u.length){const g=i(u,h,f,d-1);return g>f&&t(u[g-1],h)>-t(u[g],h)?g-1:g}return{left:i,center:l,right:o}}function number$6(e){return e===null?NaN:+e}const ascendingBisect$1=bisector$1(ascending$4),bisectRight$1=ascendingBisect$1.right;bisector$1(number$6).center;const bisect=bisectRight$1;var e10$1=Math.sqrt(50),e5$1=Math.sqrt(10),e2$1=Math.sqrt(2);function ticks$1(e,t,r){var n,i=-1,o,l,u;if(t=+t,e=+e,r=+r,e===t&&r>0)return[e];if((n=t<e)&&(o=e,e=t,t=o),(u=tickIncrement$1(e,t,r))===0||!isFinite(u))return[];if(u>0){let h=Math.round(e/u),f=Math.round(t/u);for(h*u<e&&++h,f*u>t&&--f,l=new Array(o=f-h+1);++i<o;)l[i]=(h+i)*u}else{u=-u;let h=Math.round(e*u),f=Math.round(t*u);for(h/u<e&&++h,f/u>t&&--f,l=new Array(o=f-h+1);++i<o;)l[i]=(h+i)/u}return n&&l.reverse(),l}function tickIncrement$1(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=e10$1?10:o>=e5$1?5:o>=e2$1?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=e10$1?10:o>=e5$1?5:o>=e2$1?2:1)}function tickStep$1(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=e10$1?i*=10:o>=e5$1?i*=5:o>=e2$1&&(i*=2),t<e?-i:i}function initRange$1(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const implicit$1=Symbol("implicit");function ordinal$1(){var e=new InternMap,t=[],r=[],n=implicit$1;function i(o){let l=e.get(o);if(l===void 0){if(n!==implicit$1)return n;e.set(o,l=t.push(o)-1)}return r[l%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new InternMap;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return ordinal$1(t,r).unknown(n)},initRange$1.apply(i,arguments),i}function define$1(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function extend$1(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Color$3(){}var darker$1=.7,brighter$1=1/darker$1,reI$1="\\s*([+-]?\\d+)\\s*",reN$1="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",reP$1="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",reHex$1=/^#([0-9a-f]{3,8})$/,reRgbInteger$1=new RegExp("^rgb\\("+[reI$1,reI$1,reI$1]+"\\)$"),reRgbPercent$1=new RegExp("^rgb\\("+[reP$1,reP$1,reP$1]+"\\)$"),reRgbaInteger$1=new RegExp("^rgba\\("+[reI$1,reI$1,reI$1,reN$1]+"\\)$"),reRgbaPercent$1=new RegExp("^rgba\\("+[reP$1,reP$1,reP$1,reN$1]+"\\)$"),reHslPercent$1=new RegExp("^hsl\\("+[reN$1,reP$1,reP$1]+"\\)$"),reHslaPercent$1=new RegExp("^hsla\\("+[reN$1,reP$1,reP$1,reN$1]+"\\)$"),named$1={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};define$1(Color$3,color$1,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:color_formatHex$1,formatHex:color_formatHex$1,formatHsl:color_formatHsl$1,formatRgb:color_formatRgb$1,toString:color_formatRgb$1});function color_formatHex$1(){return this.rgb().formatHex()}function color_formatHsl$1(){return hslConvert$1(this).formatHsl()}function color_formatRgb$1(){return this.rgb().formatRgb()}function color$1(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=reHex$1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?rgbn$1(t):r===3?new Rgb$1(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?rgba$3(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?rgba$3(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=reRgbInteger$1.exec(e))?new Rgb$1(t[1],t[2],t[3],1):(t=reRgbPercent$1.exec(e))?new Rgb$1(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=reRgbaInteger$1.exec(e))?rgba$3(t[1],t[2],t[3],t[4]):(t=reRgbaPercent$1.exec(e))?rgba$3(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=reHslPercent$1.exec(e))?hsla$1(t[1],t[2]/100,t[3]/100,1):(t=reHslaPercent$1.exec(e))?hsla$1(t[1],t[2]/100,t[3]/100,t[4]):named$1.hasOwnProperty(e)?rgbn$1(named$1[e]):e==="transparent"?new Rgb$1(NaN,NaN,NaN,0):null}function rgbn$1(e){return new Rgb$1(e>>16&255,e>>8&255,e&255,1)}function rgba$3(e,t,r,n){return n<=0&&(e=t=r=NaN),new Rgb$1(e,t,r,n)}function rgbConvert$1(e){return e instanceof Color$3||(e=color$1(e)),e?(e=e.rgb(),new Rgb$1(e.r,e.g,e.b,e.opacity)):new Rgb$1}function rgb$2(e,t,r,n){return arguments.length===1?rgbConvert$1(e):new Rgb$1(e,t,r,n==null?1:n)}function Rgb$1(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}define$1(Rgb$1,rgb$2,extend$1(Color$3,{brighter:function(e){return e=e==null?brighter$1:Math.pow(brighter$1,e),new Rgb$1(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?darker$1:Math.pow(darker$1,e),new Rgb$1(this.r*e,this.g*e,this.b*e,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:rgb_formatHex$1,formatHex:rgb_formatHex$1,formatRgb:rgb_formatRgb$1,toString:rgb_formatRgb$1}));function rgb_formatHex$1(){return"#"+hex$1(this.r)+hex$1(this.g)+hex$1(this.b)}function rgb_formatRgb$1(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"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))+(e===1?")":", "+e+")")}function hex$1(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function hsla$1(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Hsl$1(e,t,r,n)}function hslConvert$1(e){if(e instanceof Hsl$1)return new Hsl$1(e.h,e.s,e.l,e.opacity);if(e instanceof Color$3||(e=color$1(e)),!e)return new Hsl$1;if(e instanceof Hsl$1)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),l=NaN,u=o-i,h=(o+i)/2;return u?(t===o?l=(r-n)/u+(r<n)*6:r===o?l=(n-t)/u+2:l=(t-r)/u+4,u/=h<.5?o+i:2-o-i,l*=60):u=h>0&&h<1?0:l,new Hsl$1(l,u,h,e.opacity)}function hsl$3(e,t,r,n){return arguments.length===1?hslConvert$1(e):new Hsl$1(e,t,r,n==null?1:n)}function Hsl$1(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}define$1(Hsl$1,hsl$3,extend$1(Color$3,{brighter:function(e){return e=e==null?brighter$1:Math.pow(brighter$1,e),new Hsl$1(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?darker$1:Math.pow(darker$1,e),new Hsl$1(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Rgb$1(hsl2rgb$1(e>=240?e-240:e+120,i,n),hsl2rgb$1(e,i,n),hsl2rgb$1(e<120?e+240:e-120,i,n),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 e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function hsl2rgb$1(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const constant$f=e=>()=>e;function linear$4(e,t){return function(r){return e+r*t}}function exponential$2(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function gamma$1(e){return(e=+e)==1?nogamma$1:function(t,r){return r-t?exponential$2(t,r,e):constant$f(isNaN(t)?r:t)}}function nogamma$1(e,t){var r=t-e;return r?linear$4(e,r):constant$f(isNaN(e)?t:e)}const rgb$1=function e(t){var r=gamma$1(t);function n(i,o){var l=r((i=rgb$2(i)).r,(o=rgb$2(o)).r),u=r(i.g,o.g),h=r(i.b,o.b),f=nogamma$1(i.opacity,o.opacity);return function(d){return i.r=l(d),i.g=u(d),i.b=h(d),i.opacity=f(d),i+""}}return n.gamma=e,n}(1);function numberArray$1(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function isNumberArray$1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function genericArray$1(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),l;for(l=0;l<n;++l)i[l]=interpolate$3(e[l],t[l]);for(;l<r;++l)o[l]=t[l];return function(u){for(l=0;l<n;++l)o[l]=i[l](u);return o}}function date$3(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function interpolateNumber$1(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function object$2(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=interpolate$3(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var reA$1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB$1=new RegExp(reA$1.source,"g");function zero$1(e){return function(){return e}}function one$1(e){return function(t){return e(t)+""}}function string(e,t){var r=reA$1.lastIndex=reB$1.lastIndex=0,n,i,o,l=-1,u=[],h=[];for(e=e+"",t=t+"";(n=reA$1.exec(e))&&(i=reB$1.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),u[l]?u[l]+=o:u[++l]=o),(n=n[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,h.push({i:l,x:interpolateNumber$1(n,i)})),r=reB$1.lastIndex;return r<t.length&&(o=t.slice(r),u[l]?u[l]+=o:u[++l]=o),u.length<2?h[0]?one$1(h[0].x):zero$1(t):(t=h.length,function(f){for(var d=0,g;d<t;++d)u[(g=h[d]).i]=g.x(f);return u.join("")})}function interpolate$3(e,t){var r=typeof t,n;return t==null||r==="boolean"?constant$f(t):(r==="number"?interpolateNumber$1:r==="string"?(n=color$1(t))?(t=n,rgb$1):string:t instanceof color$1?rgb$1:t instanceof Date?date$3:isNumberArray$1(t)?numberArray$1:Array.isArray(t)?genericArray$1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?object$2:interpolateNumber$1)(e,t)}function interpolateRound$1(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function constants(e){return function(){return e}}function number$5(e){return+e}var unit$2=[0,1];function identity$c(e){return e}function normalize$3(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:constants(isNaN(t)?NaN:.5)}function clamper$1(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function bimap$1(e,t,r){var n=e[0],i=e[1],o=t[0],l=t[1];return i<n?(n=normalize$3(i,n),o=r(l,o)):(n=normalize$3(n,i),o=r(o,l)),function(u){return o(n(u))}}function polymap$1(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),l=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<n;)i[l]=normalize$3(e[l],e[l+1]),o[l]=r(t[l],t[l+1]);return function(u){var h=bisect(e,u,1,n)-1;return o[h](i[h](u))}}function copy$3(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function transformer$4(){var e=unit$2,t=unit$2,r=interpolate$3,n,i,o,l=identity$c,u,h,f;function d(){var p=Math.min(e.length,t.length);return l!==identity$c&&(l=clamper$1(e[0],e[p-1])),u=p>2?polymap$1:bimap$1,h=f=null,g}function g(p){return p==null||isNaN(p=+p)?o:(h||(h=u(e.map(n),t,r)))(n(l(p)))}return g.invert=function(p){return l(i((f||(f=u(t,e.map(n),interpolateNumber$1)))(p)))},g.domain=function(p){return arguments.length?(e=Array.from(p,number$5),d()):e.slice()},g.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},g.rangeRound=function(p){return t=Array.from(p),r=interpolateRound$1,d()},g.clamp=function(p){return arguments.length?(l=p?!0:identity$c,d()):l!==identity$c},g.interpolate=function(p){return arguments.length?(r=p,d()):r},g.unknown=function(p){return arguments.length?(o=p,g):o},function(p,m){return n=p,i=m,d()}}function continuous$1(){return transformer$4()(identity$c,identity$c)}function formatDecimal$1(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function formatDecimalParts$1(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function exponent$2(e){return e=formatDecimalParts$1(Math.abs(e)),e?e[1]:NaN}function formatGroup$1(e,t){return function(r,n){for(var i=r.length,o=[],l=0,u=e[0],h=0;i>0&&u>0&&(h+u+1>n&&(u=Math.max(1,n-h)),o.push(r.substring(i-=u,i+u)),!((h+=u+1)>n));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function formatNumerals$1(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var re$1=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier$1(e){if(!(t=re$1.exec(e)))throw new Error("invalid format: "+e);var t;return new FormatSpecifier$1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}formatSpecifier$1.prototype=FormatSpecifier$1.prototype;function FormatSpecifier$1(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}FormatSpecifier$1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim$1(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var prefixExponent$1;function formatPrefixAuto$1(e,t){var r=formatDecimalParts$1(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(prefixExponent$1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=n.length;return o===l?n:o>l?n+new Array(o-l+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+formatDecimalParts$1(e,Math.max(0,t+o-1))[0]}function formatRounded$1(e,t){var r=formatDecimalParts$1(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const formatTypes$1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:formatDecimal$1,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>formatRounded$1(e*100,t),r:formatRounded$1,s:formatPrefixAuto$1,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function identity$b(e){return e}var map$4=Array.prototype.map,prefixes$1=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function formatLocale$4(e){var t=e.grouping===void 0||e.thousands===void 0?identity$b:formatGroup$1(map$4.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?identity$b:formatNumerals$1(map$4.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"\u2212":e.minus+"",h=e.nan===void 0?"NaN":e.nan+"";function f(g){g=formatSpecifier$1(g);var p=g.fill,m=g.align,b=g.sign,$=g.symbol,S=g.zero,R=g.width,L=g.comma,N=g.precision,F=g.trim,H=g.type;H==="n"?(L=!0,H="g"):formatTypes$1[H]||(N===void 0&&(N=12),F=!0,H="g"),(S||p==="0"&&m==="=")&&(S=!0,p="0",m="=");var G=$==="$"?r:$==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():"",P=$==="$"?n:/[%p]/.test(H)?l:"",V=formatTypes$1[H],z=/[defgprs%]/.test(H);N=N===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function W(T){var U=G,I=P,ae,Q,ue;if(H==="c")I=V(T)+I,T="";else{T=+T;var _e=T<0||1/T<0;if(T=isNaN(T)?h:V(Math.abs(T),N),F&&(T=formatTrim$1(T)),_e&&+T==0&&b!=="+"&&(_e=!1),U=(_e?b==="("?b:u:b==="-"||b==="("?"":b)+U,I=(H==="s"?prefixes$1[8+prefixExponent$1/3]:"")+I+(_e&&b==="("?")":""),z){for(ae=-1,Q=T.length;++ae<Q;)if(ue=T.charCodeAt(ae),48>ue||ue>57){I=(ue===46?i+T.slice(ae+1):T.slice(ae))+I,T=T.slice(0,ae);break}}}L&&!S&&(T=t(T,1/0));var ke=U.length+T.length+I.length,de=ke<R?new Array(R-ke+1).join(p):"";switch(L&&S&&(T=t(de+T,de.length?R-I.length:1/0),de=""),m){case"<":T=U+T+I+de;break;case"=":T=U+de+T+I;break;case"^":T=de.slice(0,ke=de.length>>1)+U+T+I+de.slice(ke);break;default:T=de+U+T+I;break}return o(T)}return W.toString=function(){return g+""},W}function d(g,p){var m=f((g=formatSpecifier$1(g),g.type="f",g)),b=Math.max(-8,Math.min(8,Math.floor(exponent$2(p)/3)))*3,$=Math.pow(10,-b),S=prefixes$1[8+b/3];return function(R){return m($*R)+S}}return{format:f,formatPrefix:d}}var locale$4,format$2,formatPrefix$1;defaultLocale$4({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale$4(e){return locale$4=formatLocale$4(e),format$2=locale$4.format,formatPrefix$1=locale$4.formatPrefix,locale$4}function precisionFixed$1(e){return Math.max(0,-exponent$2(Math.abs(e)))}function precisionPrefix$1(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(exponent$2(t)/3)))*3-exponent$2(Math.abs(e)))}function precisionRound$1(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,exponent$2(t)-exponent$2(e))+1}function tickFormat$1(e,t,r,n){var i=tickStep$1(e,t,r),o;switch(n=formatSpecifier$1(n==null?",f":n),n.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=precisionPrefix$1(i,l))&&(n.precision=o),formatPrefix$1(n,l)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=precisionRound$1(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=precisionFixed$1(i))&&(n.precision=o-(n.type==="%")*2);break}}return format$2(n)}function linearish$1(e){var t=e.domain;return e.ticks=function(r){var n=t();return ticks$1(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){var i=t();return tickFormat$1(i[0],i[i.length-1],r==null?10:r,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,l=n[i],u=n[o],h,f,d=10;for(u<l&&(f=l,l=u,u=f,f=i,i=o,o=f);d-- >0;){if(f=tickIncrement$1(l,u,r),f===h)return n[i]=l,n[o]=u,t(n);if(f>0)l=Math.floor(l/f)*f,u=Math.ceil(u/f)*f;else if(f<0)l=Math.ceil(l*f)/f,u=Math.floor(u*f)/f;else break;h=f}return e},e}function linear$3(){var e=continuous$1();return e.copy=function(){return copy$3(e,linear$3())},initRange$1.apply(e,arguments),linearish$1(e)}function nice$1(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],l;return o<i&&(l=r,r=n,n=l,l=i,i=o,o=l),e[r]=t.floor(i),e[n]=t.ceil(o),e}var t0$3=new Date,t1$3=new Date;function newInterval$2(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var l=i(o),u=i.ceil(o);return o-l<u-o?l:u},i.offset=function(o,l){return t(o=new Date(+o),l==null?1:Math.floor(l)),o},i.range=function(o,l,u){var h=[],f;if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return h;do h.push(f=new Date(+o)),t(o,u),e(o);while(f<o&&o<l);return h},i.filter=function(o){return newInterval$2(function(l){if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},function(l,u){if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););})},r&&(i.count=function(o,l){return t0$3.setTime(+o),t1$3.setTime(+l),e(t0$3),e(t1$3),Math.floor(r(t0$3,t1$3))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(l){return n(l)%o===0}:function(l){return i.count(0,l)%o===0}):i}),i}var millisecond$1=newInterval$2(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});millisecond$1.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?newInterval$2(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):millisecond$1};const millisecond$2=millisecond$1;millisecond$1.range;const durationSecond$3=1e3,durationMinute$3=durationSecond$3*60,durationHour$3=durationMinute$3*60,durationDay$3=durationHour$3*24,durationWeek$3=durationDay$3*7,durationMonth$1=durationDay$3*30,durationYear$1=durationDay$3*365;var second$1=newInterval$2(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*durationSecond$3)},function(e,t){return(t-e)/durationSecond$3},function(e){return e.getUTCSeconds()});const utcSecond$1=second$1;second$1.range;var minute$1=newInterval$2(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*durationSecond$3)},function(e,t){e.setTime(+e+t*durationMinute$3)},function(e,t){return(t-e)/durationMinute$3},function(e){return e.getMinutes()});const timeMinute$1=minute$1;minute$1.range;var hour$1=newInterval$2(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*durationSecond$3-e.getMinutes()*durationMinute$3)},function(e,t){e.setTime(+e+t*durationHour$3)},function(e,t){return(t-e)/durationHour$3},function(e){return e.getHours()});const timeHour$1=hour$1;hour$1.range;var day$2=newInterval$2(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*durationMinute$3)/durationDay$3,e=>e.getDate()-1);const timeDay$2=day$2;day$2.range;function weekday$2(e){return newInterval$2(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*durationMinute$3)/durationWeek$3})}var sunday$2=weekday$2(0),monday$2=weekday$2(1),tuesday$2=weekday$2(2),wednesday$2=weekday$2(3),thursday$2=weekday$2(4),friday$2=weekday$2(5),saturday$2=weekday$2(6);sunday$2.range;monday$2.range;tuesday$2.range;wednesday$2.range;thursday$2.range;friday$2.range;saturday$2.range;var month$1=newInterval$2(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});const timeMonth$1=month$1;month$1.range;var year$2=newInterval$2(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});year$2.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:newInterval$2(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};const timeYear$2=year$2;year$2.range;var utcMinute$2=newInterval$2(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*durationMinute$3)},function(e,t){return(t-e)/durationMinute$3},function(e){return e.getUTCMinutes()});const utcMinute$3=utcMinute$2;utcMinute$2.range;var utcHour$2=newInterval$2(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*durationHour$3)},function(e,t){return(t-e)/durationHour$3},function(e){return e.getUTCHours()});const utcHour$3=utcHour$2;utcHour$2.range;var utcDay$4=newInterval$2(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/durationDay$3},function(e){return e.getUTCDate()-1});const utcDay$5=utcDay$4;utcDay$4.range;function utcWeekday$2(e){return newInterval$2(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/durationWeek$3})}var utcSunday$2=utcWeekday$2(0),utcMonday$2=utcWeekday$2(1),utcTuesday$2=utcWeekday$2(2),utcWednesday$2=utcWeekday$2(3),utcThursday$2=utcWeekday$2(4),utcFriday$2=utcWeekday$2(5),utcSaturday$2=utcWeekday$2(6);utcSunday$2.range;utcMonday$2.range;utcTuesday$2.range;utcWednesday$2.range;utcThursday$2.range;utcFriday$2.range;utcSaturday$2.range;var utcMonth$2=newInterval$2(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});const utcMonth$3=utcMonth$2;utcMonth$2.range;var utcYear$4=newInterval$2(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});utcYear$4.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:newInterval$2(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};const utcYear$5=utcYear$4;utcYear$4.range;function ticker(e,t,r,n,i,o){const l=[[utcSecond$1,1,durationSecond$3],[utcSecond$1,5,5*durationSecond$3],[utcSecond$1,15,15*durationSecond$3],[utcSecond$1,30,30*durationSecond$3],[o,1,durationMinute$3],[o,5,5*durationMinute$3],[o,15,15*durationMinute$3],[o,30,30*durationMinute$3],[i,1,durationHour$3],[i,3,3*durationHour$3],[i,6,6*durationHour$3],[i,12,12*durationHour$3],[n,1,durationDay$3],[n,2,2*durationDay$3],[r,1,durationWeek$3],[t,1,durationMonth$1],[t,3,3*durationMonth$1],[e,1,durationYear$1]];function u(f,d,g){const p=d<f;p&&([f,d]=[d,f]);const m=g&&typeof g.range=="function"?g:h(f,d,g),b=m?m.range(f,+d+1):[];return p?b.reverse():b}function h(f,d,g){const p=Math.abs(d-f)/g,m=bisector$1(([,,S])=>S).right(l,p);if(m===l.length)return e.every(tickStep$1(f/durationYear$1,d/durationYear$1,g));if(m===0)return millisecond$2.every(Math.max(tickStep$1(f,d,g),1));const[b,$]=l[p/l[m-1][2]<l[m][2]/p?m-1:m];return b.every($)}return[u,h]}ticker(utcYear$5,utcMonth$3,utcSunday$2,utcDay$5,utcHour$3,utcMinute$3);const[timeTicks,timeTickInterval]=ticker(timeYear$2,timeMonth$1,sunday$2,timeDay$2,timeHour$1,timeMinute$1);function localDate$2(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function utcDate$2(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function newDate$2(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function formatLocale$3(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,h=e.shortMonths,f=formatRe$2(i),d=formatLookup$2(i),g=formatRe$2(o),p=formatLookup$2(o),m=formatRe$2(l),b=formatLookup$2(l),$=formatRe$2(u),S=formatLookup$2(u),R=formatRe$2(h),L=formatLookup$2(h),N={a:_e,A:ke,b:de,B:ce,c:null,d:formatDayOfMonth$2,e:formatDayOfMonth$2,f:formatMicroseconds$2,g:formatYearISO$2,G:formatFullYearISO$2,H:formatHour24$2,I:formatHour12$2,j:formatDayOfYear$2,L:formatMilliseconds$2,m:formatMonthNumber$2,M:formatMinutes$2,p:he,q:Se,Q:formatUnixTimestamp$2,s:formatUnixTimestampSeconds$2,S:formatSeconds$2,u:formatWeekdayNumberMonday$2,U:formatWeekNumberSunday$2,V:formatWeekNumberISO$2,w:formatWeekdayNumberSunday$2,W:formatWeekNumberMonday$2,x:null,X:null,y:formatYear$3,Y:formatFullYear$2,Z:formatZone$2,"%":formatLiteralPercent$2},F={a:ve,A:me,b:Ce,B:xe,c:null,d:formatUTCDayOfMonth$2,e:formatUTCDayOfMonth$2,f:formatUTCMicroseconds$2,g:formatUTCYearISO$2,G:formatUTCFullYearISO$2,H:formatUTCHour24$2,I:formatUTCHour12$2,j:formatUTCDayOfYear$2,L:formatUTCMilliseconds$2,m:formatUTCMonthNumber$2,M:formatUTCMinutes$2,p:Ne,q:pe,Q:formatUnixTimestamp$2,s:formatUnixTimestampSeconds$2,S:formatUTCSeconds$2,u:formatUTCWeekdayNumberMonday$2,U:formatUTCWeekNumberSunday$2,V:formatUTCWeekNumberISO$2,w:formatUTCWeekdayNumberSunday$2,W:formatUTCWeekNumberMonday$2,x:null,X:null,y:formatUTCYear$2,Y:formatUTCFullYear$2,Z:formatUTCZone$2,"%":formatLiteralPercent$2},H={a:W,A:T,b:U,B:I,c:ae,d:parseDayOfMonth$2,e:parseDayOfMonth$2,f:parseMicroseconds$2,g:parseYear$2,G:parseFullYear$2,H:parseHour24$2,I:parseHour24$2,j:parseDayOfYear$2,L:parseMilliseconds$2,m:parseMonthNumber$2,M:parseMinutes$2,p:z,q:parseQuarter$2,Q:parseUnixTimestamp$2,s:parseUnixTimestampSeconds$2,S:parseSeconds$2,u:parseWeekdayNumberMonday$2,U:parseWeekNumberSunday$2,V:parseWeekNumberISO$2,w:parseWeekdayNumberSunday$2,W:parseWeekNumberMonday$2,x:Q,X:ue,y:parseYear$2,Y:parseFullYear$2,Z:parseZone$2,"%":parseLiteralPercent$2};N.x=G(r,N),N.X=G(n,N),N.c=G(t,N),F.x=G(r,F),F.X=G(n,F),F.c=G(t,F);function G(J,oe){return function(ee){var Z=[],ie=-1,se=0,te=J.length,fe,we,Ye;for(ee instanceof Date||(ee=new Date(+ee));++ie<te;)J.charCodeAt(ie)===37&&(Z.push(J.slice(se,ie)),(we=pads$2[fe=J.charAt(++ie)])!=null?fe=J.charAt(++ie):we=fe==="e"?" ":"0",(Ye=oe[fe])&&(fe=Ye(ee,we)),Z.push(fe),se=ie+1);return Z.push(J.slice(se,ie)),Z.join("")}}function P(J,oe){return function(ee){var Z=newDate$2(1900,void 0,1),ie=V(Z,J,ee+="",0),se,te;if(ie!=ee.length)return null;if("Q"in Z)return new Date(Z.Q);if("s"in Z)return new Date(Z.s*1e3+("L"in Z?Z.L:0));if(oe&&!("Z"in Z)&&(Z.Z=0),"p"in Z&&(Z.H=Z.H%12+Z.p*12),Z.m===void 0&&(Z.m="q"in Z?Z.q:0),"V"in Z){if(Z.V<1||Z.V>53)return null;"w"in Z||(Z.w=1),"Z"in Z?(se=utcDate$2(newDate$2(Z.y,0,1)),te=se.getUTCDay(),se=te>4||te===0?utcMonday$2.ceil(se):utcMonday$2(se),se=utcDay$5.offset(se,(Z.V-1)*7),Z.y=se.getUTCFullYear(),Z.m=se.getUTCMonth(),Z.d=se.getUTCDate()+(Z.w+6)%7):(se=localDate$2(newDate$2(Z.y,0,1)),te=se.getDay(),se=te>4||te===0?monday$2.ceil(se):monday$2(se),se=timeDay$2.offset(se,(Z.V-1)*7),Z.y=se.getFullYear(),Z.m=se.getMonth(),Z.d=se.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),te="Z"in Z?utcDate$2(newDate$2(Z.y,0,1)).getUTCDay():localDate$2(newDate$2(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(te+5)%7:Z.w+Z.U*7-(te+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,utcDate$2(Z)):localDate$2(Z)}}function V(J,oe,ee,Z){for(var ie=0,se=oe.length,te=ee.length,fe,we;ie<se;){if(Z>=te)return-1;if(fe=oe.charCodeAt(ie++),fe===37){if(fe=oe.charAt(ie++),we=H[fe in pads$2?oe.charAt(ie++):fe],!we||(Z=we(J,ee,Z))<0)return-1}else if(fe!=ee.charCodeAt(Z++))return-1}return Z}function z(J,oe,ee){var Z=f.exec(oe.slice(ee));return Z?(J.p=d.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function W(J,oe,ee){var Z=m.exec(oe.slice(ee));return Z?(J.w=b.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function T(J,oe,ee){var Z=g.exec(oe.slice(ee));return Z?(J.w=p.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function U(J,oe,ee){var Z=R.exec(oe.slice(ee));return Z?(J.m=L.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function I(J,oe,ee){var Z=$.exec(oe.slice(ee));return Z?(J.m=S.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function ae(J,oe,ee){return V(J,t,oe,ee)}function Q(J,oe,ee){return V(J,r,oe,ee)}function ue(J,oe,ee){return V(J,n,oe,ee)}function _e(J){return l[J.getDay()]}function ke(J){return o[J.getDay()]}function de(J){return h[J.getMonth()]}function ce(J){return u[J.getMonth()]}function he(J){return i[+(J.getHours()>=12)]}function Se(J){return 1+~~(J.getMonth()/3)}function ve(J){return l[J.getUTCDay()]}function me(J){return o[J.getUTCDay()]}function Ce(J){return h[J.getUTCMonth()]}function xe(J){return u[J.getUTCMonth()]}function Ne(J){return i[+(J.getUTCHours()>=12)]}function pe(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var oe=G(J+="",N);return oe.toString=function(){return J},oe},parse:function(J){var oe=P(J+="",!1);return oe.toString=function(){return J},oe},utcFormat:function(J){var oe=G(J+="",F);return oe.toString=function(){return J},oe},utcParse:function(J){var oe=P(J+="",!0);return oe.toString=function(){return J},oe}}}var pads$2={"-":"",_:" ",0:"0"},numberRe$2=/^\s*\d+/,percentRe$2=/^%/,requoteRe$2=/[\\^$*+?|[\]().{}]/g;function pad$3(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function requote$2(e){return e.replace(requoteRe$2,"\\$&")}function formatRe$2(e){return new RegExp("^(?:"+e.map(requote$2).join("|")+")","i")}function formatLookup$2(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function parseWeekdayNumberSunday$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function parseWeekdayNumberMonday$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function parseWeekNumberSunday$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function parseWeekNumberISO$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function parseWeekNumberMonday$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function parseFullYear$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function parseYear$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function parseZone$2(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function parseQuarter$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function parseMonthNumber$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function parseDayOfMonth$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function parseDayOfYear$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function parseHour24$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function parseMinutes$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function parseSeconds$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function parseMilliseconds$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function parseMicroseconds$2(e,t,r){var n=numberRe$2.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function parseLiteralPercent$2(e,t,r){var n=percentRe$2.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function parseUnixTimestamp$2(e,t,r){var n=numberRe$2.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function parseUnixTimestampSeconds$2(e,t,r){var n=numberRe$2.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function formatDayOfMonth$2(e,t){return pad$3(e.getDate(),t,2)}function formatHour24$2(e,t){return pad$3(e.getHours(),t,2)}function formatHour12$2(e,t){return pad$3(e.getHours()%12||12,t,2)}function formatDayOfYear$2(e,t){return pad$3(1+timeDay$2.count(timeYear$2(e),e),t,3)}function formatMilliseconds$2(e,t){return pad$3(e.getMilliseconds(),t,3)}function formatMicroseconds$2(e,t){return formatMilliseconds$2(e,t)+"000"}function formatMonthNumber$2(e,t){return pad$3(e.getMonth()+1,t,2)}function formatMinutes$2(e,t){return pad$3(e.getMinutes(),t,2)}function formatSeconds$2(e,t){return pad$3(e.getSeconds(),t,2)}function formatWeekdayNumberMonday$2(e){var t=e.getDay();return t===0?7:t}function formatWeekNumberSunday$2(e,t){return pad$3(sunday$2.count(timeYear$2(e)-1,e),t,2)}function dISO$2(e){var t=e.getDay();return t>=4||t===0?thursday$2(e):thursday$2.ceil(e)}function formatWeekNumberISO$2(e,t){return e=dISO$2(e),pad$3(thursday$2.count(timeYear$2(e),e)+(timeYear$2(e).getDay()===4),t,2)}function formatWeekdayNumberSunday$2(e){return e.getDay()}function formatWeekNumberMonday$2(e,t){return pad$3(monday$2.count(timeYear$2(e)-1,e),t,2)}function formatYear$3(e,t){return pad$3(e.getFullYear()%100,t,2)}function formatYearISO$2(e,t){return e=dISO$2(e),pad$3(e.getFullYear()%100,t,2)}function formatFullYear$2(e,t){return pad$3(e.getFullYear()%1e4,t,4)}function formatFullYearISO$2(e,t){var r=e.getDay();return e=r>=4||r===0?thursday$2(e):thursday$2.ceil(e),pad$3(e.getFullYear()%1e4,t,4)}function formatZone$2(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pad$3(t/60|0,"0",2)+pad$3(t%60,"0",2)}function formatUTCDayOfMonth$2(e,t){return pad$3(e.getUTCDate(),t,2)}function formatUTCHour24$2(e,t){return pad$3(e.getUTCHours(),t,2)}function formatUTCHour12$2(e,t){return pad$3(e.getUTCHours()%12||12,t,2)}function formatUTCDayOfYear$2(e,t){return pad$3(1+utcDay$5.count(utcYear$5(e),e),t,3)}function formatUTCMilliseconds$2(e,t){return pad$3(e.getUTCMilliseconds(),t,3)}function formatUTCMicroseconds$2(e,t){return formatUTCMilliseconds$2(e,t)+"000"}function formatUTCMonthNumber$2(e,t){return pad$3(e.getUTCMonth()+1,t,2)}function formatUTCMinutes$2(e,t){return pad$3(e.getUTCMinutes(),t,2)}function formatUTCSeconds$2(e,t){return pad$3(e.getUTCSeconds(),t,2)}function formatUTCWeekdayNumberMonday$2(e){var t=e.getUTCDay();return t===0?7:t}function formatUTCWeekNumberSunday$2(e,t){return pad$3(utcSunday$2.count(utcYear$5(e)-1,e),t,2)}function UTCdISO$2(e){var t=e.getUTCDay();return t>=4||t===0?utcThursday$2(e):utcThursday$2.ceil(e)}function formatUTCWeekNumberISO$2(e,t){return e=UTCdISO$2(e),pad$3(utcThursday$2.count(utcYear$5(e),e)+(utcYear$5(e).getUTCDay()===4),t,2)}function formatUTCWeekdayNumberSunday$2(e){return e.getUTCDay()}function formatUTCWeekNumberMonday$2(e,t){return pad$3(utcMonday$2.count(utcYear$5(e)-1,e),t,2)}function formatUTCYear$2(e,t){return pad$3(e.getUTCFullYear()%100,t,2)}function formatUTCYearISO$2(e,t){return e=UTCdISO$2(e),pad$3(e.getUTCFullYear()%100,t,2)}function formatUTCFullYear$2(e,t){return pad$3(e.getUTCFullYear()%1e4,t,4)}function formatUTCFullYearISO$2(e,t){var r=e.getUTCDay();return e=r>=4||r===0?utcThursday$2(e):utcThursday$2.ceil(e),pad$3(e.getUTCFullYear()%1e4,t,4)}function formatUTCZone$2(){return"+0000"}function formatLiteralPercent$2(){return"%"}function formatUnixTimestamp$2(e){return+e}function formatUnixTimestampSeconds$2(e){return Math.floor(+e/1e3)}var locale$3,timeFormat$2;defaultLocale$3({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function defaultLocale$3(e){return locale$3=formatLocale$3(e),timeFormat$2=locale$3.format,locale$3.parse,locale$3.utcFormat,locale$3.utcParse,locale$3}function date$2(e){return new Date(e)}function number$4(e){return e instanceof Date?+e:+new Date(+e)}function calendar$1(e,t,r,n,i,o,l,u,h,f){var d=continuous$1(),g=d.invert,p=d.domain,m=f(".%L"),b=f(":%S"),$=f("%I:%M"),S=f("%I %p"),R=f("%a %d"),L=f("%b %d"),N=f("%B"),F=f("%Y");function H(G){return(h(G)<G?m:u(G)<G?b:l(G)<G?$:o(G)<G?S:n(G)<G?i(G)<G?R:L:r(G)<G?N:F)(G)}return d.invert=function(G){return new Date(g(G))},d.domain=function(G){return arguments.length?p(Array.from(G,number$4)):p().map(date$2)},d.ticks=function(G){var P=p();return e(P[0],P[P.length-1],G==null?10:G)},d.tickFormat=function(G,P){return P==null?H:f(P)},d.nice=function(G){var P=p();return(!G||typeof G.range!="function")&&(G=t(P[0],P[P.length-1],G==null?10:G)),G?p(nice$1(P,G)):d},d.copy=function(){return copy$3(d,calendar$1(e,t,r,n,i,o,l,u,h,f))},d}function time$2(){return initRange$1.apply(calendar$1(timeTicks,timeTickInterval,timeYear$2,timeMonth$1,sunday$2,timeDay$2,timeHour$1,timeMinute$1,utcSecond$1,timeFormat$2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}const pi$6=Math.PI,tau$6=2*pi$6,epsilon$6=1e-6,tauEpsilon$1=tau$6-epsilon$6;function Path$1(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function path$1(){return new Path$1}Path$1.prototype=path$1.prototype={constructor:Path$1,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,l=this._y1,u=r-e,h=n-t,f=o-e,d=l-t,g=f*f+d*d;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(g>epsilon$6)if(!(Math.abs(d*u-h*f)>epsilon$6)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=r-o,m=n-l,b=u*u+h*h,$=p*p+m*m,S=Math.sqrt(b),R=Math.sqrt(g),L=i*Math.tan((pi$6-Math.acos((b+g-$)/(2*S*R)))/2),N=L/R,F=L/S;Math.abs(N-1)>epsilon$6&&(this._+="L"+(e+N*f)+","+(t+N*d)),this._+="A"+i+","+i+",0,0,"+ +(d*p>f*m)+","+(this._x1=e+F*u)+","+(this._y1=t+F*h)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r,o=!!o;var l=r*Math.cos(n),u=r*Math.sin(n),h=e+l,f=t+u,d=1^o,g=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+h+","+f:(Math.abs(this._x1-h)>epsilon$6||Math.abs(this._y1-f)>epsilon$6)&&(this._+="L"+h+","+f),r&&(g<0&&(g=g%tau$6+tau$6),g>tauEpsilon$1?this._+="A"+r+","+r+",0,1,"+d+","+(e-l)+","+(t-u)+"A"+r+","+r+",0,1,"+d+","+(this._x1=h)+","+(this._y1=f):g>epsilon$6&&(this._+="A"+r+","+r+",0,"+ +(g>=pi$6)+","+d+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function constant$e(e){return function(){return e}}var abs$3=Math.abs,atan2$2=Math.atan2,cos$3=Math.cos,max$3=Math.max,min$2=Math.min,sin$3=Math.sin,sqrt$3=Math.sqrt,epsilon$5=1e-12,pi$5=Math.PI,halfPi$4=pi$5/2,tau$5=2*pi$5;function acos$2(e){return e>1?0:e<-1?pi$5:Math.acos(e)}function asin$2(e){return e>=1?halfPi$4:e<=-1?-halfPi$4:Math.asin(e)}function arcInnerRadius$1(e){return e.innerRadius}function arcOuterRadius$1(e){return e.outerRadius}function arcStartAngle$1(e){return e.startAngle}function arcEndAngle$1(e){return e.endAngle}function arcPadAngle$1(e){return e&&e.padAngle}function intersect$3(e,t,r,n,i,o,l,u){var h=r-e,f=n-t,d=l-i,g=u-o,p=g*h-d*f;if(!(p*p<epsilon$5))return p=(d*(t-o)-g*(e-i))/p,[e+p*h,t+p*f]}function cornerTangents$1(e,t,r,n,i,o,l){var u=e-r,h=t-n,f=(l?o:-o)/sqrt$3(u*u+h*h),d=f*h,g=-f*u,p=e+d,m=t+g,b=r+d,$=n+g,S=(p+b)/2,R=(m+$)/2,L=b-p,N=$-m,F=L*L+N*N,H=i-o,G=p*$-b*m,P=(N<0?-1:1)*sqrt$3(max$3(0,H*H*F-G*G)),V=(G*N-L*P)/F,z=(-G*L-N*P)/F,W=(G*N+L*P)/F,T=(-G*L+N*P)/F,U=V-S,I=z-R,ae=W-S,Q=T-R;return U*U+I*I>ae*ae+Q*Q&&(V=W,z=T),{cx:V,cy:z,x01:-d,y01:-g,x11:V*(i/H-1),y11:z*(i/H-1)}}function arc$1(){var e=arcInnerRadius$1,t=arcOuterRadius$1,r=constant$e(0),n=null,i=arcStartAngle$1,o=arcEndAngle$1,l=arcPadAngle$1,u=null;function h(){var f,d,g=+e.apply(this,arguments),p=+t.apply(this,arguments),m=i.apply(this,arguments)-halfPi$4,b=o.apply(this,arguments)-halfPi$4,$=abs$3(b-m),S=b>m;if(u||(u=f=path$1()),p<g&&(d=p,p=g,g=d),!(p>epsilon$5))u.moveTo(0,0);else if($>tau$5-epsilon$5)u.moveTo(p*cos$3(m),p*sin$3(m)),u.arc(0,0,p,m,b,!S),g>epsilon$5&&(u.moveTo(g*cos$3(b),g*sin$3(b)),u.arc(0,0,g,b,m,S));else{var R=m,L=b,N=m,F=b,H=$,G=$,P=l.apply(this,arguments)/2,V=P>epsilon$5&&(n?+n.apply(this,arguments):sqrt$3(g*g+p*p)),z=min$2(abs$3(p-g)/2,+r.apply(this,arguments)),W=z,T=z,U,I;if(V>epsilon$5){var ae=asin$2(V/g*sin$3(P)),Q=asin$2(V/p*sin$3(P));(H-=ae*2)>epsilon$5?(ae*=S?1:-1,N+=ae,F-=ae):(H=0,N=F=(m+b)/2),(G-=Q*2)>epsilon$5?(Q*=S?1:-1,R+=Q,L-=Q):(G=0,R=L=(m+b)/2)}var ue=p*cos$3(R),_e=p*sin$3(R),ke=g*cos$3(F),de=g*sin$3(F);if(z>epsilon$5){var ce=p*cos$3(L),he=p*sin$3(L),Se=g*cos$3(N),ve=g*sin$3(N),me;if($<pi$5&&(me=intersect$3(ue,_e,Se,ve,ce,he,ke,de))){var Ce=ue-me[0],xe=_e-me[1],Ne=ce-me[0],pe=he-me[1],J=1/sin$3(acos$2((Ce*Ne+xe*pe)/(sqrt$3(Ce*Ce+xe*xe)*sqrt$3(Ne*Ne+pe*pe)))/2),oe=sqrt$3(me[0]*me[0]+me[1]*me[1]);W=min$2(z,(g-oe)/(J-1)),T=min$2(z,(p-oe)/(J+1))}}G>epsilon$5?T>epsilon$5?(U=cornerTangents$1(Se,ve,ue,_e,p,T,S),I=cornerTangents$1(ce,he,ke,de,p,T,S),u.moveTo(U.cx+U.x01,U.cy+U.y01),T<z?u.arc(U.cx,U.cy,T,atan2$2(U.y01,U.x01),atan2$2(I.y01,I.x01),!S):(u.arc(U.cx,U.cy,T,atan2$2(U.y01,U.x01),atan2$2(U.y11,U.x11),!S),u.arc(0,0,p,atan2$2(U.cy+U.y11,U.cx+U.x11),atan2$2(I.cy+I.y11,I.cx+I.x11),!S),u.arc(I.cx,I.cy,T,atan2$2(I.y11,I.x11),atan2$2(I.y01,I.x01),!S))):(u.moveTo(ue,_e),u.arc(0,0,p,R,L,!S)):u.moveTo(ue,_e),!(g>epsilon$5)||!(H>epsilon$5)?u.lineTo(ke,de):W>epsilon$5?(U=cornerTangents$1(ke,de,ce,he,g,-W,S),I=cornerTangents$1(ue,_e,Se,ve,g,-W,S),u.lineTo(U.cx+U.x01,U.cy+U.y01),W<z?u.arc(U.cx,U.cy,W,atan2$2(U.y01,U.x01),atan2$2(I.y01,I.x01),!S):(u.arc(U.cx,U.cy,W,atan2$2(U.y01,U.x01),atan2$2(U.y11,U.x11),!S),u.arc(0,0,g,atan2$2(U.cy+U.y11,U.cx+U.x11),atan2$2(I.cy+I.y11,I.cx+I.x11),S),u.arc(I.cx,I.cy,W,atan2$2(I.y11,I.x11),atan2$2(I.y01,I.x01),!S))):u.arc(0,0,g,F,N,S)}if(u.closePath(),f)return u=null,f+""||null}return h.centroid=function(){var f=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-pi$5/2;return[cos$3(d)*f,sin$3(d)*f]},h.innerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:constant$e(+f),h):e},h.outerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:constant$e(+f),h):t},h.cornerRadius=function(f){return arguments.length?(r=typeof f=="function"?f:constant$e(+f),h):r},h.padRadius=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:constant$e(+f),h):n},h.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:constant$e(+f),h):i},h.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:constant$e(+f),h):o},h.padAngle=function(f){return arguments.length?(l=typeof f=="function"?f:constant$e(+f),h):l},h.context=function(f){return arguments.length?(u=f==null?null:f,h):u},h}function array$4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Linear$1(e){this._context=e}Linear$1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function curveLinear$1(e){return new Linear$1(e)}function x$5(e){return e[0]}function y$5(e){return e[1]}function line$2(e,t){var r=constant$e(!0),n=null,i=curveLinear$1,o=null;e=typeof e=="function"?e:e===void 0?x$5:constant$e(e),t=typeof t=="function"?t:t===void 0?y$5:constant$e(t);function l(u){var h,f=(u=array$4(u)).length,d,g=!1,p;for(n==null&&(o=i(p=path$1())),h=0;h<=f;++h)!(h<f&&r(d=u[h],h,u))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(d,h,u),+t(d,h,u));if(p)return o=null,p+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:constant$e(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:constant$e(+u),l):t},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:constant$e(!!u),l):r},l.curve=function(u){return arguments.length?(i=u,n!=null&&(o=i(n)),l):i},l.context=function(u){return arguments.length?(u==null?n=o=null:o=i(n=u),l):n},l}function descending$3(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function identity$a(e){return e}function pie$1(){var e=identity$a,t=descending$3,r=null,n=constant$e(0),i=constant$e(tau$5),o=constant$e(0);function l(u){var h,f=(u=array$4(u)).length,d,g,p=0,m=new Array(f),b=new Array(f),$=+n.apply(this,arguments),S=Math.min(tau$5,Math.max(-tau$5,i.apply(this,arguments)-$)),R,L=Math.min(Math.abs(S)/f,o.apply(this,arguments)),N=L*(S<0?-1:1),F;for(h=0;h<f;++h)(F=b[m[h]=h]=+e(u[h],h,u))>0&&(p+=F);for(t!=null?m.sort(function(H,G){return t(b[H],b[G])}):r!=null&&m.sort(function(H,G){return r(u[H],u[G])}),h=0,g=p?(S-f*N)/p:0;h<f;++h,$=R)d=m[h],F=b[d],R=$+(F>0?F*g:0)+N,b[d]={data:u[d],index:h,value:F,startAngle:$,endAngle:R,padAngle:L};return b}return l.value=function(u){return arguments.length?(e=typeof u=="function"?u:constant$e(+u),l):e},l.sortValues=function(u){return arguments.length?(t=u,r=null,l):t},l.sort=function(u){return arguments.length?(r=u,t=null,l):r},l.startAngle=function(u){return arguments.length?(n=typeof u=="function"?u:constant$e(+u),l):n},l.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:constant$e(+u),l):i},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:constant$e(+u),l):o},l}function noop$4(){}function point$8(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Basis$1(e){this._context=e}Basis$1.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:point$8(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:point$8(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasis(e){return new Basis$1(e)}function BasisClosed$1(e){this._context=e}BasisClosed$1.prototype={areaStart:noop$4,areaEnd:noop$4,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);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:point$8(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasisClosed(e){return new BasisClosed$1(e)}function BasisOpen$1(e){this._context=e}BasisOpen$1.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:point$8(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function curveBasisOpen(e){return new BasisOpen$1(e)}function LinearClosed$1(e){this._context=e}LinearClosed$1.prototype={areaStart:noop$4,areaEnd:noop$4,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function curveLinearClosed(e){return new LinearClosed$1(e)}function sign$2(e){return e<0?-1:1}function slope3$1(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),l=(r-e._y1)/(i||n<0&&-0),u=(o*i+l*n)/(n+i);return(sign$2(o)+sign$2(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function slope2$1(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function point$7(e,t,r){var n=e._x0,i=e._y0,o=e._x1,l=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,l-u*r,o,l)}function MonotoneX$1(e){this._context=e}MonotoneX$1.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:point$7(this,this._t0,slope2$1(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,point$7(this,slope2$1(this,r=slope3$1(this,e,t)),r);break;default:point$7(this,this._t0,r=slope3$1(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function MonotoneY$1(e){this._context=new ReflectContext$1(e)}(MonotoneY$1.prototype=Object.create(MonotoneX$1.prototype)).point=function(e,t){MonotoneX$1.prototype.point.call(this,t,e)};function ReflectContext$1(e){this._context=e}ReflectContext$1.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function monotoneX$1(e){return new MonotoneX$1(e)}function monotoneY$1(e){return new MonotoneY$1(e)}function Natural$1(e){this._context=e}Natural$1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=controlPoints$1(e),i=controlPoints$1(t),o=0,l=1;l<r;++o,++l)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[l],t[l]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function controlPoints$1(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),l=new Array(r);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,l[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,l[t]-=n*l[t-1];for(i[r-1]=l[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function curveNatural(e){return new Natural$1(e)}function Step$1(e,t){this._context=e,this._t=t}Step$1.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function curveStep(e){return new Step$1(e,.5)}function stepBefore$1(e){return new Step$1(e,0)}function stepAfter$1(e){return new Step$1(e,1)}var t0$2=new Date,t1$2=new Date;function newInterval$1(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var l=i(o),u=i.ceil(o);return o-l<u-o?l:u},i.offset=function(o,l){return t(o=new Date(+o),l==null?1:Math.floor(l)),o},i.range=function(o,l,u){var h=[],f;if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return h;do h.push(f=new Date(+o)),t(o,u),e(o);while(f<o&&o<l);return h},i.filter=function(o){return newInterval$1(function(l){if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},function(l,u){if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););})},r&&(i.count=function(o,l){return t0$2.setTime(+o),t1$2.setTime(+l),e(t0$2),e(t1$2),Math.floor(r(t0$2,t1$2))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(l){return n(l)%o===0}:function(l){return i.count(0,l)%o===0}):i}),i}const durationSecond$2=1e3,durationMinute$2=durationSecond$2*60,durationHour$2=durationMinute$2*60,durationDay$2=durationHour$2*24,durationWeek$2=durationDay$2*7;var day$1=newInterval$1(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*durationMinute$2)/durationDay$2,e=>e.getDate()-1);const timeDay$1=day$1;day$1.range;function weekday$1(e){return newInterval$1(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*durationMinute$2)/durationWeek$2})}var sunday$1=weekday$1(0),monday$1=weekday$1(1),tuesday$1=weekday$1(2),wednesday$1=weekday$1(3),thursday$1=weekday$1(4),friday$1=weekday$1(5),saturday$1=weekday$1(6);sunday$1.range;monday$1.range;tuesday$1.range;wednesday$1.range;thursday$1.range;friday$1.range;saturday$1.range;var year$1=newInterval$1(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});year$1.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:newInterval$1(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};const timeYear$1=year$1;year$1.range;var utcDay$2=newInterval$1(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/durationDay$2},function(e){return e.getUTCDate()-1});const utcDay$3=utcDay$2;utcDay$2.range;function utcWeekday$1(e){return newInterval$1(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/durationWeek$2})}var utcSunday$1=utcWeekday$1(0),utcMonday$1=utcWeekday$1(1),utcTuesday$1=utcWeekday$1(2),utcWednesday$1=utcWeekday$1(3),utcThursday$1=utcWeekday$1(4),utcFriday$1=utcWeekday$1(5),utcSaturday$1=utcWeekday$1(6);utcSunday$1.range;utcMonday$1.range;utcTuesday$1.range;utcWednesday$1.range;utcThursday$1.range;utcFriday$1.range;utcSaturday$1.range;var utcYear$2=newInterval$1(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});utcYear$2.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:newInterval$1(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};const utcYear$3=utcYear$2;utcYear$2.range;function localDate$1(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function utcDate$1(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function newDate$1(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function formatLocale$2(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,h=e.shortMonths,f=formatRe$1(i),d=formatLookup$1(i),g=formatRe$1(o),p=formatLookup$1(o),m=formatRe$1(l),b=formatLookup$1(l),$=formatRe$1(u),S=formatLookup$1(u),R=formatRe$1(h),L=formatLookup$1(h),N={a:_e,A:ke,b:de,B:ce,c:null,d:formatDayOfMonth$1,e:formatDayOfMonth$1,f:formatMicroseconds$1,g:formatYearISO$1,G:formatFullYearISO$1,H:formatHour24$1,I:formatHour12$1,j:formatDayOfYear$1,L:formatMilliseconds$1,m:formatMonthNumber$1,M:formatMinutes$1,p:he,q:Se,Q:formatUnixTimestamp$1,s:formatUnixTimestampSeconds$1,S:formatSeconds$1,u:formatWeekdayNumberMonday$1,U:formatWeekNumberSunday$1,V:formatWeekNumberISO$1,w:formatWeekdayNumberSunday$1,W:formatWeekNumberMonday$1,x:null,X:null,y:formatYear$2,Y:formatFullYear$1,Z:formatZone$1,"%":formatLiteralPercent$1},F={a:ve,A:me,b:Ce,B:xe,c:null,d:formatUTCDayOfMonth$1,e:formatUTCDayOfMonth$1,f:formatUTCMicroseconds$1,g:formatUTCYearISO$1,G:formatUTCFullYearISO$1,H:formatUTCHour24$1,I:formatUTCHour12$1,j:formatUTCDayOfYear$1,L:formatUTCMilliseconds$1,m:formatUTCMonthNumber$1,M:formatUTCMinutes$1,p:Ne,q:pe,Q:formatUnixTimestamp$1,s:formatUnixTimestampSeconds$1,S:formatUTCSeconds$1,u:formatUTCWeekdayNumberMonday$1,U:formatUTCWeekNumberSunday$1,V:formatUTCWeekNumberISO$1,w:formatUTCWeekdayNumberSunday$1,W:formatUTCWeekNumberMonday$1,x:null,X:null,y:formatUTCYear$1,Y:formatUTCFullYear$1,Z:formatUTCZone$1,"%":formatLiteralPercent$1},H={a:W,A:T,b:U,B:I,c:ae,d:parseDayOfMonth$1,e:parseDayOfMonth$1,f:parseMicroseconds$1,g:parseYear$1,G:parseFullYear$1,H:parseHour24$1,I:parseHour24$1,j:parseDayOfYear$1,L:parseMilliseconds$1,m:parseMonthNumber$1,M:parseMinutes$1,p:z,q:parseQuarter$1,Q:parseUnixTimestamp$1,s:parseUnixTimestampSeconds$1,S:parseSeconds$1,u:parseWeekdayNumberMonday$1,U:parseWeekNumberSunday$1,V:parseWeekNumberISO$1,w:parseWeekdayNumberSunday$1,W:parseWeekNumberMonday$1,x:Q,X:ue,y:parseYear$1,Y:parseFullYear$1,Z:parseZone$1,"%":parseLiteralPercent$1};N.x=G(r,N),N.X=G(n,N),N.c=G(t,N),F.x=G(r,F),F.X=G(n,F),F.c=G(t,F);function G(J,oe){return function(ee){var Z=[],ie=-1,se=0,te=J.length,fe,we,Ye;for(ee instanceof Date||(ee=new Date(+ee));++ie<te;)J.charCodeAt(ie)===37&&(Z.push(J.slice(se,ie)),(we=pads$1[fe=J.charAt(++ie)])!=null?fe=J.charAt(++ie):we=fe==="e"?" ":"0",(Ye=oe[fe])&&(fe=Ye(ee,we)),Z.push(fe),se=ie+1);return Z.push(J.slice(se,ie)),Z.join("")}}function P(J,oe){return function(ee){var Z=newDate$1(1900,void 0,1),ie=V(Z,J,ee+="",0),se,te;if(ie!=ee.length)return null;if("Q"in Z)return new Date(Z.Q);if("s"in Z)return new Date(Z.s*1e3+("L"in Z?Z.L:0));if(oe&&!("Z"in Z)&&(Z.Z=0),"p"in Z&&(Z.H=Z.H%12+Z.p*12),Z.m===void 0&&(Z.m="q"in Z?Z.q:0),"V"in Z){if(Z.V<1||Z.V>53)return null;"w"in Z||(Z.w=1),"Z"in Z?(se=utcDate$1(newDate$1(Z.y,0,1)),te=se.getUTCDay(),se=te>4||te===0?utcMonday$1.ceil(se):utcMonday$1(se),se=utcDay$3.offset(se,(Z.V-1)*7),Z.y=se.getUTCFullYear(),Z.m=se.getUTCMonth(),Z.d=se.getUTCDate()+(Z.w+6)%7):(se=localDate$1(newDate$1(Z.y,0,1)),te=se.getDay(),se=te>4||te===0?monday$1.ceil(se):monday$1(se),se=timeDay$1.offset(se,(Z.V-1)*7),Z.y=se.getFullYear(),Z.m=se.getMonth(),Z.d=se.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),te="Z"in Z?utcDate$1(newDate$1(Z.y,0,1)).getUTCDay():localDate$1(newDate$1(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(te+5)%7:Z.w+Z.U*7-(te+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,utcDate$1(Z)):localDate$1(Z)}}function V(J,oe,ee,Z){for(var ie=0,se=oe.length,te=ee.length,fe,we;ie<se;){if(Z>=te)return-1;if(fe=oe.charCodeAt(ie++),fe===37){if(fe=oe.charAt(ie++),we=H[fe in pads$1?oe.charAt(ie++):fe],!we||(Z=we(J,ee,Z))<0)return-1}else if(fe!=ee.charCodeAt(Z++))return-1}return Z}function z(J,oe,ee){var Z=f.exec(oe.slice(ee));return Z?(J.p=d.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function W(J,oe,ee){var Z=m.exec(oe.slice(ee));return Z?(J.w=b.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function T(J,oe,ee){var Z=g.exec(oe.slice(ee));return Z?(J.w=p.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function U(J,oe,ee){var Z=R.exec(oe.slice(ee));return Z?(J.m=L.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function I(J,oe,ee){var Z=$.exec(oe.slice(ee));return Z?(J.m=S.get(Z[0].toLowerCase()),ee+Z[0].length):-1}function ae(J,oe,ee){return V(J,t,oe,ee)}function Q(J,oe,ee){return V(J,r,oe,ee)}function ue(J,oe,ee){return V(J,n,oe,ee)}function _e(J){return l[J.getDay()]}function ke(J){return o[J.getDay()]}function de(J){return h[J.getMonth()]}function ce(J){return u[J.getMonth()]}function he(J){return i[+(J.getHours()>=12)]}function Se(J){return 1+~~(J.getMonth()/3)}function ve(J){return l[J.getUTCDay()]}function me(J){return o[J.getUTCDay()]}function Ce(J){return h[J.getUTCMonth()]}function xe(J){return u[J.getUTCMonth()]}function Ne(J){return i[+(J.getUTCHours()>=12)]}function pe(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var oe=G(J+="",N);return oe.toString=function(){return J},oe},parse:function(J){var oe=P(J+="",!1);return oe.toString=function(){return J},oe},utcFormat:function(J){var oe=G(J+="",F);return oe.toString=function(){return J},oe},utcParse:function(J){var oe=P(J+="",!0);return oe.toString=function(){return J},oe}}}var pads$1={"-":"",_:" ",0:"0"},numberRe$1=/^\s*\d+/,percentRe$1=/^%/,requoteRe$1=/[\\^$*+?|[\]().{}]/g;function pad$2(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function requote$1(e){return e.replace(requoteRe$1,"\\$&")}function formatRe$1(e){return new RegExp("^(?:"+e.map(requote$1).join("|")+")","i")}function formatLookup$1(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function parseWeekdayNumberSunday$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function parseWeekdayNumberMonday$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function parseWeekNumberSunday$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function parseWeekNumberISO$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function parseWeekNumberMonday$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function parseFullYear$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function parseYear$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function parseZone$1(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function parseQuarter$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function parseMonthNumber$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function parseDayOfMonth$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function parseDayOfYear$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function parseHour24$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function parseMinutes$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function parseSeconds$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function parseMilliseconds$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function parseMicroseconds$1(e,t,r){var n=numberRe$1.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function parseLiteralPercent$1(e,t,r){var n=percentRe$1.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function parseUnixTimestamp$1(e,t,r){var n=numberRe$1.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function parseUnixTimestampSeconds$1(e,t,r){var n=numberRe$1.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function formatDayOfMonth$1(e,t){return pad$2(e.getDate(),t,2)}function formatHour24$1(e,t){return pad$2(e.getHours(),t,2)}function formatHour12$1(e,t){return pad$2(e.getHours()%12||12,t,2)}function formatDayOfYear$1(e,t){return pad$2(1+timeDay$1.count(timeYear$1(e),e),t,3)}function formatMilliseconds$1(e,t){return pad$2(e.getMilliseconds(),t,3)}function formatMicroseconds$1(e,t){return formatMilliseconds$1(e,t)+"000"}function formatMonthNumber$1(e,t){return pad$2(e.getMonth()+1,t,2)}function formatMinutes$1(e,t){return pad$2(e.getMinutes(),t,2)}function formatSeconds$1(e,t){return pad$2(e.getSeconds(),t,2)}function formatWeekdayNumberMonday$1(e){var t=e.getDay();return t===0?7:t}function formatWeekNumberSunday$1(e,t){return pad$2(sunday$1.count(timeYear$1(e)-1,e),t,2)}function dISO$1(e){var t=e.getDay();return t>=4||t===0?thursday$1(e):thursday$1.ceil(e)}function formatWeekNumberISO$1(e,t){return e=dISO$1(e),pad$2(thursday$1.count(timeYear$1(e),e)+(timeYear$1(e).getDay()===4),t,2)}function formatWeekdayNumberSunday$1(e){return e.getDay()}function formatWeekNumberMonday$1(e,t){return pad$2(monday$1.count(timeYear$1(e)-1,e),t,2)}function formatYear$2(e,t){return pad$2(e.getFullYear()%100,t,2)}function formatYearISO$1(e,t){return e=dISO$1(e),pad$2(e.getFullYear()%100,t,2)}function formatFullYear$1(e,t){return pad$2(e.getFullYear()%1e4,t,4)}function formatFullYearISO$1(e,t){var r=e.getDay();return e=r>=4||r===0?thursday$1(e):thursday$1.ceil(e),pad$2(e.getFullYear()%1e4,t,4)}function formatZone$1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pad$2(t/60|0,"0",2)+pad$2(t%60,"0",2)}function formatUTCDayOfMonth$1(e,t){return pad$2(e.getUTCDate(),t,2)}function formatUTCHour24$1(e,t){return pad$2(e.getUTCHours(),t,2)}function formatUTCHour12$1(e,t){return pad$2(e.getUTCHours()%12||12,t,2)}function formatUTCDayOfYear$1(e,t){return pad$2(1+utcDay$3.count(utcYear$3(e),e),t,3)}function formatUTCMilliseconds$1(e,t){return pad$2(e.getUTCMilliseconds(),t,3)}function formatUTCMicroseconds$1(e,t){return formatUTCMilliseconds$1(e,t)+"000"}function formatUTCMonthNumber$1(e,t){return pad$2(e.getUTCMonth()+1,t,2)}function formatUTCMinutes$1(e,t){return pad$2(e.getUTCMinutes(),t,2)}function formatUTCSeconds$1(e,t){return pad$2(e.getUTCSeconds(),t,2)}function formatUTCWeekdayNumberMonday$1(e){var t=e.getUTCDay();return t===0?7:t}function formatUTCWeekNumberSunday$1(e,t){return pad$2(utcSunday$1.count(utcYear$3(e)-1,e),t,2)}function UTCdISO$1(e){var t=e.getUTCDay();return t>=4||t===0?utcThursday$1(e):utcThursday$1.ceil(e)}function formatUTCWeekNumberISO$1(e,t){return e=UTCdISO$1(e),pad$2(utcThursday$1.count(utcYear$3(e),e)+(utcYear$3(e).getUTCDay()===4),t,2)}function formatUTCWeekdayNumberSunday$1(e){return e.getUTCDay()}function formatUTCWeekNumberMonday$1(e,t){return pad$2(utcMonday$1.count(utcYear$3(e)-1,e),t,2)}function formatUTCYear$1(e,t){return pad$2(e.getUTCFullYear()%100,t,2)}function formatUTCYearISO$1(e,t){return e=UTCdISO$1(e),pad$2(e.getUTCFullYear()%100,t,2)}function formatUTCFullYear$1(e,t){return pad$2(e.getUTCFullYear()%1e4,t,4)}function formatUTCFullYearISO$1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?utcThursday$1(e):utcThursday$1.ceil(e),pad$2(e.getUTCFullYear()%1e4,t,4)}function formatUTCZone$1(){return"+0000"}function formatLiteralPercent$1(){return"%"}function formatUnixTimestamp$1(e){return+e}function formatUnixTimestampSeconds$1(e){return Math.floor(+e/1e3)}var locale$2,timeFormat$1;defaultLocale$2({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function defaultLocale$2(e){return locale$2=formatLocale$2(e),timeFormat$1=locale$2.format,locale$2.parse,locale$2.utcFormat,locale$2.utcParse,locale$2}var frame$1=0,timeout$3=0,interval$2=0,pokeDelay$1=1e3,taskHead$1,taskTail$1,clockLast$1=0,clockNow$1=0,clockSkew$1=0,clock$1=typeof performance=="object"&&performance.now?performance:Date,setFrame$1=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function now$1(){return clockNow$1||(setFrame$1(clearNow$1),clockNow$1=clock$1.now()+clockSkew$1)}function clearNow$1(){clockNow$1=0}function Timer$1(){this._call=this._time=this._next=null}Timer$1.prototype=timer$1.prototype={constructor:Timer$1,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?now$1():+r)+(t==null?0:+t),!this._next&&taskTail$1!==this&&(taskTail$1?taskTail$1._next=this:taskHead$1=this,taskTail$1=this),this._call=e,this._time=r,sleep$1()},stop:function(){this._call&&(this._call=null,this._time=1/0,sleep$1())}};function timer$1(e,t,r){var n=new Timer$1;return n.restart(e,t,r),n}function timerFlush$1(){now$1(),++frame$1;for(var e=taskHead$1,t;e;)(t=clockNow$1-e._time)>=0&&e._call.call(void 0,t),e=e._next;--frame$1}function wake$1(){clockNow$1=(clockLast$1=clock$1.now())+clockSkew$1,frame$1=timeout$3=0;try{timerFlush$1()}finally{frame$1=0,nap$1(),clockNow$1=0}}function poke$1(){var e=clock$1.now(),t=e-clockLast$1;t>pokeDelay$1&&(clockSkew$1-=t,clockLast$1=e)}function nap$1(){for(var e,t=taskHead$1,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:taskHead$1=r);taskTail$1=e,sleep$1(n)}function sleep$1(e){if(!frame$1){timeout$3&&(timeout$3=clearTimeout(timeout$3));var t=e-clockNow$1;t>24?(e<1/0&&(timeout$3=setTimeout(wake$1,e-clock$1.now()-clockSkew$1)),interval$2&&(interval$2=clearInterval(interval$2))):(interval$2||(clockLast$1=clock$1.now(),interval$2=setInterval(poke$1,pokeDelay$1)),frame$1=1,setFrame$1(wake$1))}}function timeout$2(e,t,r){var n=new Timer$1;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var emptyOn$1=dispatch$1("start","end","cancel","interrupt"),emptyTween$1=[],CREATED$1=0,SCHEDULED$1=1,STARTING$1=2,STARTED$1=3,RUNNING$1=4,ENDING$1=5,ENDED$1=6;function schedule$1(e,t,r,n,i,o){var l=e.__transition;if(!l)e.__transition={};else if(r in l)return;create$3(e,r,{name:t,index:n,group:i,on:emptyOn$1,tween:emptyTween$1,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:CREATED$1})}function init$3(e,t){var r=get$2(e,t);if(r.state>CREATED$1)throw new Error("too late; already scheduled");return r}function set$3(e,t){var r=get$2(e,t);if(r.state>STARTED$1)throw new Error("too late; already running");return r}function get$2(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function create$3(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=timer$1(o,0,r.time);function o(f){r.state=SCHEDULED$1,r.timer.restart(l,r.delay,r.time),r.delay<=f&&l(f-r.delay)}function l(f){var d,g,p,m;if(r.state!==SCHEDULED$1)return h();for(d in n)if(m=n[d],m.name===r.name){if(m.state===STARTED$1)return timeout$2(l);m.state===RUNNING$1?(m.state=ENDED$1,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete n[d]):+d<t&&(m.state=ENDED$1,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete n[d])}if(timeout$2(function(){r.state===STARTED$1&&(r.state=RUNNING$1,r.timer.restart(u,r.delay,r.time),u(f))}),r.state=STARTING$1,r.on.call("start",e,e.__data__,r.index,r.group),r.state===STARTING$1){for(r.state=STARTED$1,i=new Array(p=r.tween.length),d=0,g=-1;d<p;++d)(m=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[++g]=m);i.length=g+1}}function u(f){for(var d=f<r.duration?r.ease.call(null,f/r.duration):(r.timer.restart(h),r.state=ENDING$1,1),g=-1,p=i.length;++g<p;)i[g].call(e,d);r.state===ENDING$1&&(r.on.call("end",e,e.__data__,r.index,r.group),h())}function h(){r.state=ENDED$1,r.timer.stop(),delete n[t];for(var f in n)return;delete e.__transition}}function interrupt$1(e,t){var r=e.__transition,n,i,o=!0,l;if(!!r){t=t==null?null:t+"";for(l in r){if((n=r[l]).name!==t){o=!1;continue}i=n.state>STARTING$1&&n.state<ENDING$1,n.state=ENDED$1,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[l]}o&&delete e.__transition}}function selection_interrupt$1(e){return this.each(function(){interrupt$1(this,e)})}function tweenRemove$1(e,t){var r,n;return function(){var i=set$3(this,e),o=i.tween;if(o!==r){n=r=o;for(var l=0,u=n.length;l<u;++l)if(n[l].name===t){n=n.slice(),n.splice(l,1);break}}i.tween=n}}function tweenFunction$1(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=set$3(this,e),l=o.tween;if(l!==n){i=(n=l).slice();for(var u={name:t,value:r},h=0,f=i.length;h<f;++h)if(i[h].name===t){i[h]=u;break}h===f&&i.push(u)}o.tween=i}}function transition_tween$1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=get$2(this.node(),r).tween,i=0,o=n.length,l;i<o;++i)if((l=n[i]).name===e)return l.value;return null}return this.each((t==null?tweenRemove$1:tweenFunction$1)(r,e,t))}function tweenValue$1(e,t,r){var n=e._id;return e.each(function(){var i=set$3(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return get$2(i,n).value[t]}}function interpolate$2(e,t){var r;return(typeof t=="number"?interpolateNumber$2:t instanceof color$2?interpolateRgb$1:(r=color$2(t))?(t=r,interpolateRgb$1):interpolateString$1)(e,t)}function attrRemove$2(e){return function(){this.removeAttribute(e)}}function attrRemoveNS$2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function attrConstant$2(e,t,r){var n,i=r+"",o;return function(){var l=this.getAttribute(e);return l===i?null:l===n?o:o=t(n=l,r)}}function attrConstantNS$2(e,t,r){var n,i=r+"",o;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===n?o:o=t(n=l,r)}}function attrFunction$2(e,t,r){var n,i,o;return function(){var l,u=r(this),h;return u==null?void this.removeAttribute(e):(l=this.getAttribute(e),h=u+"",l===h?null:l===n&&h===i?o:(i=h,o=t(n=l,u)))}}function attrFunctionNS$2(e,t,r){var n,i,o;return function(){var l,u=r(this),h;return u==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),h=u+"",l===h?null:l===n&&h===i?o:(i=h,o=t(n=l,u)))}}function transition_attr$1(e,t){var r=namespace$1(e),n=r==="transform"?interpolateTransformSvg$1:interpolate$2;return this.attrTween(e,typeof t=="function"?(r.local?attrFunctionNS$2:attrFunction$2)(r,n,tweenValue$1(this,"attr."+e,t)):t==null?(r.local?attrRemoveNS$2:attrRemove$2)(r):(r.local?attrConstantNS$2:attrConstant$2)(r,n,t))}function attrInterpolate$1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function attrInterpolateNS$1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function attrTweenNS$1(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&attrInterpolateNS$1(e,o)),r}return i._value=t,i}function attrTween$1(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&attrInterpolate$1(e,o)),r}return i._value=t,i}function transition_attrTween$1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=namespace$1(e);return this.tween(r,(n.local?attrTweenNS$1:attrTween$1)(n,t))}function delayFunction$1(e,t){return function(){init$3(this,e).delay=+t.apply(this,arguments)}}function delayConstant$1(e,t){return t=+t,function(){init$3(this,e).delay=t}}function transition_delay$1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?delayFunction$1:delayConstant$1)(t,e)):get$2(this.node(),t).delay}function durationFunction$1(e,t){return function(){set$3(this,e).duration=+t.apply(this,arguments)}}function durationConstant$1(e,t){return t=+t,function(){set$3(this,e).duration=t}}function transition_duration$1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?durationFunction$1:durationConstant$1)(t,e)):get$2(this.node(),t).duration}function easeConstant$1(e,t){if(typeof t!="function")throw new Error;return function(){set$3(this,e).ease=t}}function transition_ease$1(e){var t=this._id;return arguments.length?this.each(easeConstant$1(t,e)):get$2(this.node(),t).ease}function easeVarying(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;set$3(this,e).ease=r}}function transition_easeVarying(e){if(typeof e!="function")throw new Error;return this.each(easeVarying(this._id,e))}function transition_filter$1(e){typeof e!="function"&&(e=matcher$1(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],l=o.length,u=n[i]=[],h,f=0;f<l;++f)(h=o[f])&&e.call(h,h.__data__,f,o)&&u.push(h);return new Transition$1(n,this._parents,this._name,this._id)}function transition_merge$1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),l=new Array(n),u=0;u<o;++u)for(var h=t[u],f=r[u],d=h.length,g=l[u]=new Array(d),p,m=0;m<d;++m)(p=h[m]||f[m])&&(g[m]=p);for(;u<n;++u)l[u]=t[u];return new Transition$1(l,this._parents,this._name,this._id)}function start$2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function onFunction$1(e,t,r){var n,i,o=start$2(t)?init$3:set$3;return function(){var l=o(this,e),u=l.on;u!==n&&(i=(n=u).copy()).on(t,r),l.on=i}}function transition_on$1(e,t){var r=this._id;return arguments.length<2?get$2(this.node(),r).on.on(e):this.each(onFunction$1(r,e,t))}function removeFunction$1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function transition_remove$1(){return this.on("end.remove",removeFunction$1(this._id))}function transition_select$1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=selector$1(e));for(var n=this._groups,i=n.length,o=new Array(i),l=0;l<i;++l)for(var u=n[l],h=u.length,f=o[l]=new Array(h),d,g,p=0;p<h;++p)(d=u[p])&&(g=e.call(d,d.__data__,p,u))&&("__data__"in d&&(g.__data__=d.__data__),f[p]=g,schedule$1(f[p],t,r,p,f,get$2(d,r)));return new Transition$1(o,this._parents,t,r)}function transition_selectAll$1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=selectorAll$1(e));for(var n=this._groups,i=n.length,o=[],l=[],u=0;u<i;++u)for(var h=n[u],f=h.length,d,g=0;g<f;++g)if(d=h[g]){for(var p=e.call(d,d.__data__,g,h),m,b=get$2(d,r),$=0,S=p.length;$<S;++$)(m=p[$])&&schedule$1(m,t,r,$,p,b);o.push(p),l.push(d)}return new Transition$1(o,l,t,r)}var Selection$2=selection$1.prototype.constructor;function transition_selection$1(){return new Selection$2(this._groups,this._parents)}function styleNull$1(e,t){var r,n,i;return function(){var o=styleValue$1(this,e),l=(this.style.removeProperty(e),styleValue$1(this,e));return o===l?null:o===r&&l===n?i:i=t(r=o,n=l)}}function styleRemove$2(e){return function(){this.style.removeProperty(e)}}function styleConstant$2(e,t,r){var n,i=r+"",o;return function(){var l=styleValue$1(this,e);return l===i?null:l===n?o:o=t(n=l,r)}}function styleFunction$2(e,t,r){var n,i,o;return function(){var l=styleValue$1(this,e),u=r(this),h=u+"";return u==null&&(h=u=(this.style.removeProperty(e),styleValue$1(this,e))),l===h?null:l===n&&h===i?o:(i=h,o=t(n=l,u))}}function styleMaybeRemove$1(e,t){var r,n,i,o="style."+t,l="end."+o,u;return function(){var h=set$3(this,e),f=h.on,d=h.value[o]==null?u||(u=styleRemove$2(t)):void 0;(f!==r||i!==d)&&(n=(r=f).copy()).on(l,i=d),h.on=n}}function transition_style$1(e,t,r){var n=(e+="")=="transform"?interpolateTransformCss$1:interpolate$2;return t==null?this.styleTween(e,styleNull$1(e,n)).on("end.style."+e,styleRemove$2(e)):typeof t=="function"?this.styleTween(e,styleFunction$2(e,n,tweenValue$1(this,"style."+e,t))).each(styleMaybeRemove$1(this._id,e)):this.styleTween(e,styleConstant$2(e,n,t),r).on("end.style."+e,null)}function styleInterpolate$1(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function styleTween$1(e,t,r){var n,i;function o(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&styleInterpolate$1(e,l,r)),n}return o._value=t,o}function transition_styleTween$1(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,styleTween$1(e,t,r==null?"":r))}function textConstant$2(e){return function(){this.textContent=e}}function textFunction$2(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function transition_text$1(e){return this.tween("text",typeof e=="function"?textFunction$2(tweenValue$1(this,"text",e)):textConstant$2(e==null?"":e+""))}function textInterpolate$1(e){return function(t){this.textContent=e.call(this,t)}}function textTween$1(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&textInterpolate$1(i)),t}return n._value=e,n}function transition_textTween$1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,textTween$1(e))}function transition_transition$1(){for(var e=this._name,t=this._id,r=newId$1(),n=this._groups,i=n.length,o=0;o<i;++o)for(var l=n[o],u=l.length,h,f=0;f<u;++f)if(h=l[f]){var d=get$2(h,t);schedule$1(h,e,r,f,l,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Transition$1(n,this._parents,e,r)}function transition_end$1(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,l){var u={value:l},h={value:function(){--i===0&&o()}};r.each(function(){var f=set$3(this,n),d=f.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(h)),f.on=t}),i===0&&o()})}var id$2=0;function Transition$1(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function newId$1(){return++id$2}var selection_prototype$1=selection$1.prototype;Transition$1.prototype={constructor:Transition$1,select:transition_select$1,selectAll:transition_selectAll$1,selectChild:selection_prototype$1.selectChild,selectChildren:selection_prototype$1.selectChildren,filter:transition_filter$1,merge:transition_merge$1,selection:transition_selection$1,transition:transition_transition$1,call:selection_prototype$1.call,nodes:selection_prototype$1.nodes,node:selection_prototype$1.node,size:selection_prototype$1.size,empty:selection_prototype$1.empty,each:selection_prototype$1.each,on:transition_on$1,attr:transition_attr$1,attrTween:transition_attrTween$1,style:transition_style$1,styleTween:transition_styleTween$1,text:transition_text$1,textTween:transition_textTween$1,remove:transition_remove$1,tween:transition_tween$1,delay:transition_delay$1,duration:transition_duration$1,ease:transition_ease$1,easeVarying:transition_easeVarying,end:transition_end$1,[Symbol.iterator]:selection_prototype$1[Symbol.iterator]};var defaultTiming$1={time:null,delay:0,duration:250,ease:cubicInOut$1};function inherit$1(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function selection_transition$1(e){var t,r;e instanceof Transition$1?(t=e._id,e=e._name):(t=newId$1(),(r=defaultTiming$1).time=now$1(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var l=n[o],u=l.length,h,f=0;f<u;++f)(h=l[f])&&schedule$1(h,e,t,f,l,r||inherit$1(h,t));return new Transition$1(n,this._parents,e,t)}selection$1.prototype.interrupt=selection_interrupt$1;selection$1.prototype.transition=selection_transition$1;function Transform$1(e,t,r){this.k=e,this.x=t,this.y=r}Transform$1.prototype={constructor:Transform$1,scale:function(e){return e===1?this:new Transform$1(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Transform$1(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new Transform$1(1,0,0);Transform$1.prototype;/*! @license DOMPurify 2.4.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.4.0/LICENSE */function _typeof(e){return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(e)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_setPrototypeOf(e,t)}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct(e,t,r){return _isNativeReflectConstruct()?_construct=Reflect.construct:_construct=function(i,o,l){var u=[null];u.push.apply(u,o);var h=Function.bind.apply(i,u),f=new h;return l&&_setPrototypeOf(f,l.prototype),f},_construct.apply(null,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _unsupportedIterableToArray(e,t){if(!!e){if(typeof e=="string")return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}}function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var hasOwnProperty$2=Object.hasOwnProperty,setPrototypeOf=Object.setPrototypeOf,isFrozen=Object.isFrozen,getPrototypeOf=Object.getPrototypeOf,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,freeze=Object.freeze,seal=Object.seal,create$2=Object.create,_ref=typeof Reflect<"u"&&Reflect,apply$1=_ref.apply,construct=_ref.construct;apply$1||(apply$1=function(t,r,n){return t.apply(r,n)});freeze||(freeze=function(t){return t});seal||(seal=function(t){return t});construct||(construct=function(t,r){return _construct(t,_toConsumableArray(r))});var arrayForEach=unapply(Array.prototype.forEach),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),stringToLowerCase=unapply(String.prototype.toLowerCase),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf=unapply(String.prototype.indexOf),stringTrim=unapply(String.prototype.trim),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return apply$1(e,t,n)}}function unconstruct(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return construct(e,r)}}function addToSet(e,t,r){r=r||stringToLowerCase,setPrototypeOf&&setPrototypeOf(e,null);for(var n=t.length;n--;){var i=t[n];if(typeof i=="string"){var o=r(i);o!==i&&(isFrozen(t)||(t[n]=o),i=o)}e[i]=!0}return e}function clone$1(e){var t=create$2(null),r;for(r in e)apply$1(hasOwnProperty$2,e,[r])&&(t[r]=e[r]);return t}function lookupGetter(e,t){for(;e!==null;){var r=getOwnPropertyDescriptor(e,t);if(r){if(r.get)return unapply(r.get);if(typeof r.value=="function")return unapply(r.value)}e=getPrototypeOf(e)}function n(i){return console.warn("fallback value for",i),null}return n}var html$1=freeze(["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"]),svg$1=freeze(["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"]),svgFilters=freeze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),svgDisallowed=freeze(["animate","color-profile","cursor","discard","fedropshadow","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"]),mathMl$1=freeze(["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"]),mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),text$1=freeze(["#text"]),html$2=freeze(["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","nonce","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"]),svg$2=freeze(["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","transform-origin","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"]),mathMl=freeze(["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"]),xml$1=freeze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MUSTACHE_EXPR=seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ERB_EXPR=seal(/<%[\w\W]*|[\w\W]*%>/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i),getGlobal=function e(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function e(t,r){if(_typeof(t)!=="object"||typeof t.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(i)&&(n=r.currentScript.getAttribute(i));var o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:function(u){return u},createScriptURL:function(u){return u}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function createDOMPurify(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal(),t=function(ye){return createDOMPurify(ye)};if(t.version="2.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;var r=e.document,n=e.document,i=e.DocumentFragment,o=e.HTMLTemplateElement,l=e.Node,u=e.Element,h=e.NodeFilter,f=e.NamedNodeMap,d=f===void 0?e.NamedNodeMap||e.MozNamedAttrMap:f,g=e.HTMLFormElement,p=e.DOMParser,m=e.trustedTypes,b=u.prototype,$=lookupGetter(b,"cloneNode"),S=lookupGetter(b,"nextSibling"),R=lookupGetter(b,"childNodes"),L=lookupGetter(b,"parentNode");if(typeof o=="function"){var N=n.createElement("template");N.content&&N.content.ownerDocument&&(n=N.content.ownerDocument)}var F=_createTrustedTypesPolicy(m,r),H=F?F.createHTML(""):"",G=n,P=G.implementation,V=G.createNodeIterator,z=G.createDocumentFragment,W=G.getElementsByTagName,T=r.importNode,U={};try{U=clone$1(n).documentMode?n.documentMode:{}}catch{}var I={};t.isSupported=typeof L=="function"&&P&&typeof P.createHTMLDocument<"u"&&U!==9;var ae=MUSTACHE_EXPR,Q=ERB_EXPR,ue=DATA_ATTR,_e=ARIA_ATTR,ke=IS_SCRIPT_OR_DATA,de=ATTR_WHITESPACE,ce=IS_ALLOWED_URI,he=null,Se=addToSet({},[].concat(_toConsumableArray(html$1),_toConsumableArray(svg$1),_toConsumableArray(svgFilters),_toConsumableArray(mathMl$1),_toConsumableArray(text$1))),ve=null,me=addToSet({},[].concat(_toConsumableArray(html$2),_toConsumableArray(svg$2),_toConsumableArray(mathMl),_toConsumableArray(xml$1))),Ce=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Ne=null,pe=!0,J=!0,oe=!1,ee=!1,Z=!1,ie=!1,se=!1,te=!1,fe=!1,we=!1,Ye=!0,He=!1,je="user-content-",Pe=!0,Ee=!1,Ie={},Le=null,Be=addToSet({},["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"]),Te=null,dt=addToSet({},["audio","video","img","source","image","track"]),Ge=null,rt=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),it="http://www.w3.org/1998/Math/MathML",st="http://www.w3.org/2000/svg",wt="http://www.w3.org/1999/xhtml",nt=wt,Ke=!1,Je,Oe=["application/xhtml+xml","text/html"],Me="text/html",Fe,qe=null,et=n.createElement("form"),Ae=function(ye){return ye instanceof RegExp||ye instanceof Function},_t=function(ye){qe&&qe===ye||((!ye||_typeof(ye)!=="object")&&(ye={}),ye=clone$1(ye),Je=Oe.indexOf(ye.PARSER_MEDIA_TYPE)===-1?Je=Me:Je=ye.PARSER_MEDIA_TYPE,Fe=Je==="application/xhtml+xml"?function(Ue){return Ue}:stringToLowerCase,he="ALLOWED_TAGS"in ye?addToSet({},ye.ALLOWED_TAGS,Fe):Se,ve="ALLOWED_ATTR"in ye?addToSet({},ye.ALLOWED_ATTR,Fe):me,Ge="ADD_URI_SAFE_ATTR"in ye?addToSet(clone$1(rt),ye.ADD_URI_SAFE_ATTR,Fe):rt,Te="ADD_DATA_URI_TAGS"in ye?addToSet(clone$1(dt),ye.ADD_DATA_URI_TAGS,Fe):dt,Le="FORBID_CONTENTS"in ye?addToSet({},ye.FORBID_CONTENTS,Fe):Be,xe="FORBID_TAGS"in ye?addToSet({},ye.FORBID_TAGS,Fe):{},Ne="FORBID_ATTR"in ye?addToSet({},ye.FORBID_ATTR,Fe):{},Ie="USE_PROFILES"in ye?ye.USE_PROFILES:!1,pe=ye.ALLOW_ARIA_ATTR!==!1,J=ye.ALLOW_DATA_ATTR!==!1,oe=ye.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=ye.SAFE_FOR_TEMPLATES||!1,Z=ye.WHOLE_DOCUMENT||!1,te=ye.RETURN_DOM||!1,fe=ye.RETURN_DOM_FRAGMENT||!1,we=ye.RETURN_TRUSTED_TYPE||!1,se=ye.FORCE_BODY||!1,Ye=ye.SANITIZE_DOM!==!1,He=ye.SANITIZE_NAMED_PROPS||!1,Pe=ye.KEEP_CONTENT!==!1,Ee=ye.IN_PLACE||!1,ce=ye.ALLOWED_URI_REGEXP||ce,nt=ye.NAMESPACE||wt,ye.CUSTOM_ELEMENT_HANDLING&&Ae(ye.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=ye.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ye.CUSTOM_ELEMENT_HANDLING&&Ae(ye.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=ye.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ye.CUSTOM_ELEMENT_HANDLING&&typeof ye.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ce.allowCustomizedBuiltInElements=ye.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(J=!1),fe&&(te=!0),Ie&&(he=addToSet({},_toConsumableArray(text$1)),ve=[],Ie.html===!0&&(addToSet(he,html$1),addToSet(ve,html$2)),Ie.svg===!0&&(addToSet(he,svg$1),addToSet(ve,svg$2),addToSet(ve,xml$1)),Ie.svgFilters===!0&&(addToSet(he,svgFilters),addToSet(ve,svg$2),addToSet(ve,xml$1)),Ie.mathMl===!0&&(addToSet(he,mathMl$1),addToSet(ve,mathMl),addToSet(ve,xml$1))),ye.ADD_TAGS&&(he===Se&&(he=clone$1(he)),addToSet(he,ye.ADD_TAGS,Fe)),ye.ADD_ATTR&&(ve===me&&(ve=clone$1(ve)),addToSet(ve,ye.ADD_ATTR,Fe)),ye.ADD_URI_SAFE_ATTR&&addToSet(Ge,ye.ADD_URI_SAFE_ATTR,Fe),ye.FORBID_CONTENTS&&(Le===Be&&(Le=clone$1(Le)),addToSet(Le,ye.FORBID_CONTENTS,Fe)),Pe&&(he["#text"]=!0),Z&&addToSet(he,["html","head","body"]),he.table&&(addToSet(he,["tbody"]),delete xe.tbody),freeze&&freeze(ye),qe=ye)},Re=addToSet({},["mi","mo","mn","ms","mtext"]),lt=addToSet({},["foreignobject","desc","title","annotation-xml"]),xt=addToSet({},["title","style","font","a","script"]),bt=addToSet({},svg$1);addToSet(bt,svgFilters),addToSet(bt,svgDisallowed);var $t=addToSet({},mathMl$1);addToSet($t,mathMlDisallowed);var kt=function(ye){var Ue=L(ye);(!Ue||!Ue.tagName)&&(Ue={namespaceURI:wt,tagName:"template"});var Ve=stringToLowerCase(ye.tagName),ot=stringToLowerCase(Ue.tagName);return ye.namespaceURI===st?Ue.namespaceURI===wt?Ve==="svg":Ue.namespaceURI===it?Ve==="svg"&&(ot==="annotation-xml"||Re[ot]):Boolean(bt[Ve]):ye.namespaceURI===it?Ue.namespaceURI===wt?Ve==="math":Ue.namespaceURI===st?Ve==="math"&<[ot]:Boolean($t[Ve]):ye.namespaceURI===wt?Ue.namespaceURI===st&&!lt[ot]||Ue.namespaceURI===it&&!Re[ot]?!1:!$t[Ve]&&(xt[Ve]||!bt[Ve]):!1},tt=function(ye){arrayPush(t.removed,{element:ye});try{ye.parentNode.removeChild(ye)}catch{try{ye.outerHTML=H}catch{ye.remove()}}},ht=function(ye,Ue){try{arrayPush(t.removed,{attribute:Ue.getAttributeNode(ye),from:Ue})}catch{arrayPush(t.removed,{attribute:null,from:Ue})}if(Ue.removeAttribute(ye),ye==="is"&&!ve[ye])if(te||fe)try{tt(Ue)}catch{}else try{Ue.setAttribute(ye,"")}catch{}},vt=function(ye){var Ue,Ve;if(se)ye="<remove></remove>"+ye;else{var ot=stringMatch(ye,/^[\r\n\t ]+/);Ve=ot&&ot[0]}Je==="application/xhtml+xml"&&(ye='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ye+"</body></html>");var Mt=F?F.createHTML(ye):ye;if(nt===wt)try{Ue=new p().parseFromString(Mt,Je)}catch{}if(!Ue||!Ue.documentElement){Ue=P.createDocument(nt,"template",null);try{Ue.documentElement.innerHTML=Ke?"":Mt}catch{}}var At=Ue.body||Ue.documentElement;return ye&&Ve&&At.insertBefore(n.createTextNode(Ve),At.childNodes[0]||null),nt===wt?W.call(Ue,Z?"html":"body")[0]:Z?Ue.documentElement:At},gt=function(ye){return V.call(ye.ownerDocument||ye,ye,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},tr=function(ye){return ye instanceof g&&(typeof ye.nodeName!="string"||typeof ye.textContent!="string"||typeof ye.removeChild!="function"||!(ye.attributes instanceof d)||typeof ye.removeAttribute!="function"||typeof ye.setAttribute!="function"||typeof ye.namespaceURI!="string"||typeof ye.insertBefore!="function")},Ht=function(ye){return _typeof(l)==="object"?ye instanceof l:ye&&_typeof(ye)==="object"&&typeof ye.nodeType=="number"&&typeof ye.nodeName=="string"},St=function(ye,Ue,Ve){!I[ye]||arrayForEach(I[ye],function(ot){ot.call(t,Ue,Ve,qe)})},ft=function(ye){var Ue;if(St("beforeSanitizeElements",ye,null),tr(ye)||regExpTest(/[\u0080-\uFFFF]/,ye.nodeName))return tt(ye),!0;var Ve=Fe(ye.nodeName);if(St("uponSanitizeElement",ye,{tagName:Ve,allowedTags:he}),ye.hasChildNodes()&&!Ht(ye.firstElementChild)&&(!Ht(ye.content)||!Ht(ye.content.firstElementChild))&®ExpTest(/<[/\w]/g,ye.innerHTML)&®ExpTest(/<[/\w]/g,ye.textContent)||Ve==="select"&®ExpTest(/<template/i,ye.innerHTML))return tt(ye),!0;if(!he[Ve]||xe[Ve]){if(!xe[Ve]&&Pt(Ve)&&(Ce.tagNameCheck instanceof RegExp&®ExpTest(Ce.tagNameCheck,Ve)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(Ve)))return!1;if(Pe&&!Le[Ve]){var ot=L(ye)||ye.parentNode,Mt=R(ye)||ye.childNodes;if(Mt&&ot)for(var At=Mt.length,Rt=At-1;Rt>=0;--Rt)ot.insertBefore($(Mt[Rt],!0),S(ye))}return tt(ye),!0}return ye instanceof u&&!kt(ye)||(Ve==="noscript"||Ve==="noembed")&®ExpTest(/<\/no(script|embed)/i,ye.innerHTML)?(tt(ye),!0):(ee&&ye.nodeType===3&&(Ue=ye.textContent,Ue=stringReplace(Ue,ae," "),Ue=stringReplace(Ue,Q," "),ye.textContent!==Ue&&(arrayPush(t.removed,{element:ye.cloneNode()}),ye.textContent=Ue)),St("afterSanitizeElements",ye,null),!1)},Nt=function(ye,Ue,Ve){if(Ye&&(Ue==="id"||Ue==="name")&&(Ve in n||Ve in et))return!1;if(!(J&&!Ne[Ue]&®ExpTest(ue,Ue))){if(!(pe&®ExpTest(_e,Ue))){if(!ve[Ue]||Ne[Ue]){if(!(Pt(ye)&&(Ce.tagNameCheck instanceof RegExp&®ExpTest(Ce.tagNameCheck,ye)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(ye))&&(Ce.attributeNameCheck instanceof RegExp&®ExpTest(Ce.attributeNameCheck,Ue)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(Ue))||Ue==="is"&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&®ExpTest(Ce.tagNameCheck,Ve)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(Ve))))return!1}else if(!Ge[Ue]){if(!regExpTest(ce,stringReplace(Ve,de,""))){if(!((Ue==="src"||Ue==="xlink:href"||Ue==="href")&&ye!=="script"&&stringIndexOf(Ve,"data:")===0&&Te[ye])){if(!(oe&&!regExpTest(ke,stringReplace(Ve,de,"")))){if(Ve)return!1}}}}}}return!0},Pt=function(ye){return ye.indexOf("-")>0},Lt=function(ye){var Ue,Ve,ot,Mt;St("beforeSanitizeAttributes",ye,null);var At=ye.attributes;if(!!At){var Rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve};for(Mt=At.length;Mt--;){Ue=At[Mt];var Ut=Ue,It=Ut.name,rr=Ut.namespaceURI;if(Ve=It==="value"?Ue.value:stringTrim(Ue.value),ot=Fe(It),Rt.attrName=ot,Rt.attrValue=Ve,Rt.keepAttr=!0,Rt.forceKeepAttr=void 0,St("uponSanitizeAttribute",ye,Rt),Ve=Rt.attrValue,!Rt.forceKeepAttr&&(ht(It,ye),!!Rt.keepAttr)){if(regExpTest(/\/>/i,Ve)){ht(It,ye);continue}ee&&(Ve=stringReplace(Ve,ae," "),Ve=stringReplace(Ve,Q," "));var Tt=Fe(ye.nodeName);if(!!Nt(Tt,ot,Ve)){if(He&&(ot==="id"||ot==="name")&&(ht(It,ye),Ve=je+Ve),F&&_typeof(m)==="object"&&typeof m.getAttributeType=="function"&&!rr)switch(m.getAttributeType(Tt,ot)){case"TrustedHTML":Ve=F.createHTML(Ve);break;case"TrustedScriptURL":Ve=F.createScriptURL(Ve);break}try{rr?ye.setAttributeNS(rr,It,Ve):ye.setAttribute(It,Ve),arrayPop(t.removed)}catch{}}}}St("afterSanitizeAttributes",ye,null)}},qt=function Xe(ye){var Ue,Ve=gt(ye);for(St("beforeSanitizeShadowDOM",ye,null);Ue=Ve.nextNode();)St("uponSanitizeShadowNode",Ue,null),!ft(Ue)&&(Ue.content instanceof i&&Xe(Ue.content),Lt(Ue));St("afterSanitizeShadowDOM",ye,null)};return t.sanitize=function(Xe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ue,Ve,ot,Mt,At;if(Ke=!Xe,Ke&&(Xe="<!-->"),typeof Xe!="string"&&!Ht(Xe)){if(typeof Xe.toString!="function")throw typeErrorCreate("toString is not a function");if(Xe=Xe.toString(),typeof Xe!="string")throw typeErrorCreate("dirty is not a string, aborting")}if(!t.isSupported){if(_typeof(e.toStaticHTML)==="object"||typeof e.toStaticHTML=="function"){if(typeof Xe=="string")return e.toStaticHTML(Xe);if(Ht(Xe))return e.toStaticHTML(Xe.outerHTML)}return Xe}if(ie||_t(ye),t.removed=[],typeof Xe=="string"&&(Ee=!1),Ee){if(Xe.nodeName){var Rt=Fe(Xe.nodeName);if(!he[Rt]||xe[Rt])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(Xe instanceof l)Ue=vt("<!---->"),Ve=Ue.ownerDocument.importNode(Xe,!0),Ve.nodeType===1&&Ve.nodeName==="BODY"||Ve.nodeName==="HTML"?Ue=Ve:Ue.appendChild(Ve);else{if(!te&&!ee&&!Z&&Xe.indexOf("<")===-1)return F&&we?F.createHTML(Xe):Xe;if(Ue=vt(Xe),!Ue)return te?null:we?H:""}Ue&&se&&tt(Ue.firstChild);for(var Ut=gt(Ee?Xe:Ue);ot=Ut.nextNode();)ot.nodeType===3&&ot===Mt||ft(ot)||(ot.content instanceof i&&qt(ot.content),Lt(ot),Mt=ot);if(Mt=null,Ee)return Xe;if(te){if(fe)for(At=z.call(Ue.ownerDocument);Ue.firstChild;)At.appendChild(Ue.firstChild);else At=Ue;return ve.shadowroot&&(At=T.call(r,At,!0)),At}var It=Z?Ue.outerHTML:Ue.innerHTML;return Z&&he["!doctype"]&&Ue.ownerDocument&&Ue.ownerDocument.doctype&&Ue.ownerDocument.doctype.name&®ExpTest(DOCTYPE_NAME,Ue.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+Ue.ownerDocument.doctype.name+`>
|
|
`+It),ee&&(It=stringReplace(It,ae," "),It=stringReplace(It,Q," ")),F&&we?F.createHTML(It):It},t.setConfig=function(Xe){_t(Xe),ie=!0},t.clearConfig=function(){qe=null,ie=!1},t.isValidAttribute=function(Xe,ye,Ue){qe||_t({});var Ve=Fe(Xe),ot=Fe(ye);return Nt(Ve,ot,Ue)},t.addHook=function(Xe,ye){typeof ye=="function"&&(I[Xe]=I[Xe]||[],arrayPush(I[Xe],ye))},t.removeHook=function(Xe){if(I[Xe])return arrayPop(I[Xe])},t.removeHooks=function(Xe){I[Xe]&&(I[Xe]=[])},t.removeAllHooks=function(){I={}},t}var purify=createDOMPurify();const Channel={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:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},n)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const i=r<.5?r*(1+t):r+t-r*t,o=2*r-i;switch(n){case"r":return Channel.hue2rgb(o,i,e+1/3)*255;case"g":return Channel.hue2rgb(o,i,e)*255;case"b":return Channel.hue2rgb(o,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;const i=Math.max(e,t,r),o=Math.min(e,t,r),l=(i+o)/2;if(n==="l")return l*100;if(i===o)return 0;const u=i-o,h=l>.5?u/(2-i-o):u/(i+o);if(n==="s")return h*100;switch(i){case e:return((t-r)/u+(t<r?6:0))*60;case t:return((r-e)/u+2)*60;case r:return((e-t)/u+4)*60;default:return-1}}},channel=Channel,Lang={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},lang=Lang,Unit={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},unit$1=Unit,Utils={channel,lang,unit:unit$1},_$D=Utils,DEC2HEX={};for(let e=0;e<=255;e++)DEC2HEX[e]=_$D.unit.dec2hex(e);const TYPE={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=TYPE.ALL}is(t){return this.type===t}}const Type$1=Type;class Channels{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Type$1}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=TYPE.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:n,l:i}=t;r===void 0&&(t.h=_$D.channel.rgb2hsl(t,"h")),n===void 0&&(t.s=_$D.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=_$D.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:n,b:i}=t;r===void 0&&(t.r=_$D.channel.hsl2rgb(t,"r")),n===void 0&&(t.g=_$D.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=_$D.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(TYPE.HSL)&&r!==void 0?r:(this._ensureHSL(),_$D.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(TYPE.HSL)&&r!==void 0?r:(this._ensureHSL(),_$D.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(TYPE.HSL)&&r!==void 0?r:(this._ensureHSL(),_$D.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(TYPE.RGB)&&r!==void 0?r:(this._ensureRGB(),_$D.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(TYPE.RGB)&&r!==void 0?r:(this._ensureRGB(),_$D.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(TYPE.RGB)&&r!==void 0?r:(this._ensureRGB(),_$D.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(TYPE.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(TYPE.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(TYPE.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(TYPE.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(TYPE.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(TYPE.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Channels$1=Channels,channels=new Channels$1({r:0,g:0,b:0,a:0},"transparent"),ChannelsReusable=channels,Hex={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Hex.re);if(!t)return;const r=t[1],n=parseInt(r,16),i=r.length,o=i%4===0,l=i>4,u=l?1:17,h=l?8:4,f=o?0:-1,d=l?255:15;return ChannelsReusable.set({r:(n>>h*(f+3)&d)*u,g:(n>>h*(f+2)&d)*u,b:(n>>h*(f+1)&d)*u,a:o?(n&d)*u/255:1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`#${DEC2HEX[Math.round(t)]}${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(n)]}${DEC2HEX[Math.round(i*255)]}`:`#${DEC2HEX[Math.round(t)]}${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(n)]}`}},Hex$1=Hex,HSL={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:e=>{const t=e.match(HSL.hueRe);if(t){const[,r,n]=t;switch(n){case"grad":return _$D.channel.clamp.h(parseFloat(r)*.9);case"rad":return _$D.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return _$D.channel.clamp.h(parseFloat(r)*360)}}return _$D.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(HSL.re);if(!r)return;const[,n,i,o,l,u]=r;return ChannelsReusable.set({h:HSL._hue2deg(n),s:_$D.channel.clamp.s(parseFloat(i)),l:_$D.channel.clamp.l(parseFloat(o)),a:l?_$D.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${_$D.lang.round(t)}, ${_$D.lang.round(r)}%, ${_$D.lang.round(n)}%, ${i})`:`hsl(${_$D.lang.round(t)}, ${_$D.lang.round(r)}%, ${_$D.lang.round(n)}%)`}},HSL$1=HSL,Keyword={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:e=>{e=e.toLowerCase();const t=Keyword.colors[e];if(!!t)return Hex$1.parse(t)},stringify:e=>{const t=Hex$1.stringify(e);for(const r in Keyword.colors)if(Keyword.colors[r]===t)return r}},Keyword$1=Keyword,RGB={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:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(RGB.re);if(!r)return;const[,n,i,o,l,u,h,f,d]=r;return ChannelsReusable.set({r:_$D.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:_$D.channel.clamp.g(l?parseFloat(o)*2.55:parseFloat(o)),b:_$D.channel.clamp.b(h?parseFloat(u)*2.55:parseFloat(u)),a:f?_$D.channel.clamp.a(d?parseFloat(f)/100:parseFloat(f)):1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${_$D.lang.round(t)}, ${_$D.lang.round(r)}, ${_$D.lang.round(n)}, ${_$D.lang.round(i)})`:`rgb(${_$D.lang.round(t)}, ${_$D.lang.round(r)}, ${_$D.lang.round(n)})`}},RGB$1=RGB,Color$1={format:{keyword:Keyword$1,hex:Hex$1,rgb:RGB$1,rgba:RGB$1,hsl:HSL$1,hsla:HSL$1},parse:e=>{if(typeof e!="string")return e;const t=Hex$1.parse(e)||RGB$1.parse(e)||HSL$1.parse(e)||Keyword$1.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(TYPE.HSL)||e.data.r===void 0?HSL$1.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?RGB$1.stringify(e):Hex$1.stringify(e)},Color$2=Color$1,change=(e,t)=>{const r=Color$2.parse(e);for(const n in t)r[n]=_$D.channel.clamp[n](t[n]);return Color$2.stringify(r)},change$1=change,rgba$1=(e,t,r=0,n=1)=>{if(typeof e!="number")return change$1(e,{a:t});const i=ChannelsReusable.set({r:_$D.channel.clamp.r(e),g:_$D.channel.clamp.g(t),b:_$D.channel.clamp.b(r),a:_$D.channel.clamp.a(n)});return Color$2.stringify(i)},rgba$2=rgba$1,adjustChannel=(e,t,r)=>{const n=Color$2.parse(e),i=n[t],o=_$D.channel.clamp[t](i+r);return i!==o&&(n[t]=o),Color$2.stringify(n)},adjustChannel$1=adjustChannel,lighten=(e,t)=>adjustChannel$1(e,"l",t),lighten$1=lighten,darken=(e,t)=>adjustChannel$1(e,"l",-t),darken$1=darken,adjust$1=(e,t)=>{const r=Color$2.parse(e),n={};for(const i in t)!t[i]||(n[i]=r[i]+t[i]);return change$1(e,n)},adjust$2=adjust$1,mix=(e,t,r=50)=>{const{r:n,g:i,b:o,a:l}=Color$2.parse(e),{r:u,g:h,b:f,a:d}=Color$2.parse(t),g=r/100,p=g*2-1,m=l-d,$=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,S=1-$,R=n*$+u*S,L=i*$+h*S,N=o*$+f*S,F=l*g+d*(1-g);return rgba$2(R,L,N,F)},mix$1=mix,invert=(e,t=100)=>{const r=Color$2.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,mix$1(r,e,t)},invert$1=invert;var COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",abs$2=Math.abs,from=String.fromCharCode;function trim(e){return e.trim()}function replace(e,t,r){return e.replace(t,r)}function indexof(e,t){return e.indexOf(t)}function charat(e,t){return e.charCodeAt(t)|0}function substr(e,t,r){return e.slice(t,r)}function strlen(e){return e.length}function sizeof(e){return e.length}function append(e,t){return t.push(e),e}var line$1=1,column=1,length$3=0,position$2=0,character=0,characters="";function node(e,t,r,n,i,o,l){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:line$1,column,length:l,return:""}}function char(){return character}function prev(){return character=position$2>0?charat(characters,--position$2):0,column--,character===10&&(column=1,line$1--),character}function next(){return character=position$2<length$3?charat(characters,position$2++):0,column++,character===10&&(column=1,line$1++),character}function peek(){return charat(characters,position$2)}function caret(){return position$2}function slice$7(e,t){return substr(characters,e,t)}function token(e){switch(e){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 alloc(e){return line$1=column=1,length$3=strlen(characters=e),position$2=0,[]}function dealloc(e){return characters="",e}function delimit(e){return trim(slice$7(position$2-1,delimiter(e===91?e+2:e===40?e+1:e)))}function whitespace(e){for(;(character=peek())&&character<33;)next();return token(e)>2||token(character)>3?"":" "}function escaping(e,t){for(;--t&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice$7(e,caret()+(t<6&&peek()==32&&next()==32))}function delimiter(e){for(;next();)switch(character){case e:return position$2;case 34:case 39:e!==34&&e!==39&&delimiter(character);break;case 40:e===41&&delimiter(e);break;case 92:next();break}return position$2}function commenter(e,t){for(;next()&&e+character!==47+10;)if(e+character===42+42&&peek()===47)break;return"/*"+slice$7(t,position$2-1)+"*"+from(e===47?e:next())}function identifier(e){for(;!token(peek());)next();return slice$7(e,position$2)}function compile(e){return dealloc(parse$3("",null,null,null,[""],e=alloc(e),0,[0],e))}function parse$3(e,t,r,n,i,o,l,u,h){for(var f=0,d=0,g=l,p=0,m=0,b=0,$=1,S=1,R=1,L=0,N="",F=i,H=o,G=n,P=N;S;)switch(b=L,L=next()){case 40:if(b!=108&&charat(P,g-1)==58){indexof(P+=replace(delimit(L),"&","&\f"),"&\f")!=-1&&(R=-1);break}case 34:case 39:case 91:P+=delimit(L);break;case 9:case 10:case 13:case 32:P+=whitespace(b);break;case 92:P+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),t,r),h);break;default:P+="/"}break;case 123*$:u[f++]=strlen(P)*R;case 125*$:case 59:case 0:switch(L){case 0:case 125:S=0;case 59+d:m>0&&strlen(P)-g&&append(m>32?declaration(P+";",n,r,g-1):declaration(replace(P," ","")+";",n,r,g-2),h);break;case 59:P+=";";default:if(append(G=ruleset(P,t,r,f,d,i,u,N,F=[],H=[],g),o),L===123)if(d===0)parse$3(P,t,G,G,F,o,g,u,H);else switch(p){case 100:case 109:case 115:parse$3(e,G,G,n&&append(ruleset(e,G,G,0,0,i,u,N,i,F=[],g),H),i,H,g,u,n?F:H);break;default:parse$3(P,G,G,G,[""],H,0,u,H)}}f=d=m=0,$=R=1,N=P="",g=l;break;case 58:g=1+strlen(P),m=b;default:if($<1){if(L==123)--$;else if(L==125&&$++==0&&prev()==125)continue}switch(P+=from(L),L*$){case 38:R=d>0?1:(P+="\f",-1);break;case 44:u[f++]=(strlen(P)-1)*R,R=1;break;case 64:peek()===45&&(P+=delimit(next())),p=peek(),d=g=strlen(N=P+=identifier(caret())),L++;break;case 45:b===45&&strlen(P)==2&&($=0)}}return o}function ruleset(e,t,r,n,i,o,l,u,h,f,d){for(var g=i-1,p=i===0?o:[""],m=sizeof(p),b=0,$=0,S=0;b<n;++b)for(var R=0,L=substr(e,g+1,g=abs$2($=l[b])),N=e;R<m;++R)(N=trim($>0?p[R]+" "+L:replace(L,/&\f/g,p[R])))&&(h[S++]=N);return node(e,t,r,i===0?RULESET:u,h,f,d)}function comment(e,t,r){return node(e,t,r,COMMENT,from(char()),substr(e,2,-2),0)}function declaration(e,t,r,n){return node(e,t,r,DECLARATION,substr(e,0,n),substr(e,n+1,-1),n)}function serialize(e,t){for(var r="",n=sizeof(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function stringify(e,t,r,n){switch(e.type){case IMPORT:case DECLARATION:return e.return=e.return||e.value;case COMMENT:return"";case KEYFRAMES:return e.return=e.value+"{"+serialize(e.children,n)+"}";case RULESET:e.value=e.props.join(",")}return strlen(r=serialize(e.children,n))?e.return=e.value+"{"+r+"}":""}var _listCacheClear$1,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear$1;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear$1=e,_listCacheClear$1}var eq_1$1,hasRequiredEq$1;function requireEq$1(){if(hasRequiredEq$1)return eq_1$1;hasRequiredEq$1=1;function e(t,r){return t===r||t!==t&&r!==r}return eq_1$1=e,eq_1$1}var _assocIndexOf$1,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf$1;hasRequired_assocIndexOf=1;var e=requireEq$1();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return _assocIndexOf$1=t,_assocIndexOf$1}var _listCacheDelete$1,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete$1;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,r=t.splice;function n(i){var o=this.__data__,l=e(o,i);if(l<0)return!1;var u=o.length-1;return l==u?o.pop():r.call(o,l,1),--this.size,!0}return _listCacheDelete$1=n,_listCacheDelete$1}var _listCacheGet$1,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet$1;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return _listCacheGet$1=t,_listCacheGet$1}var _listCacheHas$1,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas$1;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(r){return e(this.__data__,r)>-1}return _listCacheHas$1=t,_listCacheHas$1}var _listCacheSet$1,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet$1;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return _listCacheSet$1=t,_listCacheSet$1}var _ListCache$1,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache$1;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),r=require_listCacheGet(),n=require_listCacheHas(),i=require_listCacheSet();function o(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var f=l[u];this.set(f[0],f[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,_ListCache$1=o,_ListCache$1}var _stackClear,hasRequired_stackClear;function require_stackClear(){if(hasRequired_stackClear)return _stackClear;hasRequired_stackClear=1;var e=require_ListCache();function t(){this.__data__=new e,this.size=0}return _stackClear=t,_stackClear}var _stackDelete,hasRequired_stackDelete;function require_stackDelete(){if(hasRequired_stackDelete)return _stackDelete;hasRequired_stackDelete=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return _stackDelete=e,_stackDelete}var _stackGet,hasRequired_stackGet;function require_stackGet(){if(hasRequired_stackGet)return _stackGet;hasRequired_stackGet=1;function e(t){return this.__data__.get(t)}return _stackGet=e,_stackGet}var _stackHas,hasRequired_stackHas;function require_stackHas(){if(hasRequired_stackHas)return _stackHas;hasRequired_stackHas=1;function e(t){return this.__data__.has(t)}return _stackHas=e,_stackHas}var _freeGlobal$1,hasRequired_freeGlobal$1;function require_freeGlobal$1(){if(hasRequired_freeGlobal$1)return _freeGlobal$1;hasRequired_freeGlobal$1=1;var e=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1;return _freeGlobal$1=e,_freeGlobal$1}var _root$1,hasRequired_root$1;function require_root$1(){if(hasRequired_root$1)return _root$1;hasRequired_root$1=1;var e=require_freeGlobal$1(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return _root$1=r,_root$1}var _Symbol$1,hasRequired_Symbol$1;function require_Symbol$1(){if(hasRequired_Symbol$1)return _Symbol$1;hasRequired_Symbol$1=1;var e=require_root$1(),t=e.Symbol;return _Symbol$1=t,_Symbol$1}var _getRawTag$1,hasRequired_getRawTag$1;function require_getRawTag$1(){if(hasRequired_getRawTag$1)return _getRawTag$1;hasRequired_getRawTag$1=1;var e=require_Symbol$1(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(l){var u=r.call(l,i),h=l[i];try{l[i]=void 0;var f=!0}catch{}var d=n.call(l);return f&&(u?l[i]=h:delete l[i]),d}return _getRawTag$1=o,_getRawTag$1}var _objectToString$1,hasRequired_objectToString$1;function require_objectToString$1(){if(hasRequired_objectToString$1)return _objectToString$1;hasRequired_objectToString$1=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return _objectToString$1=r,_objectToString$1}var _baseGetTag$1,hasRequired_baseGetTag$1;function require_baseGetTag$1(){if(hasRequired_baseGetTag$1)return _baseGetTag$1;hasRequired_baseGetTag$1=1;var e=require_Symbol$1(),t=require_getRawTag$1(),r=require_objectToString$1(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function l(u){return u==null?u===void 0?i:n:o&&o in Object(u)?t(u):r(u)}return _baseGetTag$1=l,_baseGetTag$1}var isObject_1$1,hasRequiredIsObject$1;function requireIsObject$1(){if(hasRequiredIsObject$1)return isObject_1$1;hasRequiredIsObject$1=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return isObject_1$1=e,isObject_1$1}var isFunction_1$1,hasRequiredIsFunction$1;function requireIsFunction$1(){if(hasRequiredIsFunction$1)return isFunction_1$1;hasRequiredIsFunction$1=1;var e=require_baseGetTag$1(),t=requireIsObject$1(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function l(u){if(!t(u))return!1;var h=e(u);return h==n||h==i||h==r||h==o}return isFunction_1$1=l,isFunction_1$1}var _coreJsData$1,hasRequired_coreJsData$1;function require_coreJsData$1(){if(hasRequired_coreJsData$1)return _coreJsData$1;hasRequired_coreJsData$1=1;var e=require_root$1(),t=e["__core-js_shared__"];return _coreJsData$1=t,_coreJsData$1}var _isMasked$1,hasRequired_isMasked$1;function require_isMasked$1(){if(hasRequired_isMasked$1)return _isMasked$1;hasRequired_isMasked$1=1;var e=require_coreJsData$1(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return _isMasked$1=r,_isMasked$1}var _toSource$1,hasRequired_toSource$1;function require_toSource$1(){if(hasRequired_toSource$1)return _toSource$1;hasRequired_toSource$1=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return _toSource$1=r,_toSource$1}var _baseIsNative$1,hasRequired_baseIsNative$1;function require_baseIsNative$1(){if(hasRequired_baseIsNative$1)return _baseIsNative$1;hasRequired_baseIsNative$1=1;var e=requireIsFunction$1(),t=require_isMasked$1(),r=requireIsObject$1(),n=require_toSource$1(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,f=u.hasOwnProperty,d=RegExp("^"+h.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(p){if(!r(p)||t(p))return!1;var m=e(p)?d:o;return m.test(n(p))}return _baseIsNative$1=g,_baseIsNative$1}var _getValue$1,hasRequired_getValue$1;function require_getValue$1(){if(hasRequired_getValue$1)return _getValue$1;hasRequired_getValue$1=1;function e(t,r){return t==null?void 0:t[r]}return _getValue$1=e,_getValue$1}var _getNative$1,hasRequired_getNative$1;function require_getNative$1(){if(hasRequired_getNative$1)return _getNative$1;hasRequired_getNative$1=1;var e=require_baseIsNative$1(),t=require_getValue$1();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return _getNative$1=r,_getNative$1}var _Map$1,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map$1;hasRequired_Map=1;var e=require_getNative$1(),t=require_root$1(),r=e(t,"Map");return _Map$1=r,_Map$1}var _nativeCreate$1,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate$1;hasRequired_nativeCreate=1;var e=require_getNative$1(),t=e(Object,"create");return _nativeCreate$1=t,_nativeCreate$1}var _hashClear$1,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear$1;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear$1=t,_hashClear$1}var _hashDelete$1,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete$1;hasRequired_hashDelete=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return _hashDelete$1=e,_hashDelete$1}var _hashGet$1,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet$1;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var l=this.__data__;if(e){var u=l[o];return u===t?void 0:u}return n.call(l,o)?l[o]:void 0}return _hashGet$1=i,_hashGet$1}var _hashHas$1,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas$1;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return _hashHas$1=n,_hashHas$1}var _hashSet$1,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet$1;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function r(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&i===void 0?t:i,this}return _hashSet$1=r,_hashSet$1}var _Hash$1,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash$1;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),r=require_hashGet(),n=require_hashHas(),i=require_hashSet();function o(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var f=l[u];this.set(f[0],f[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,_Hash$1=o,_Hash$1}var _mapCacheClear$1,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear$1;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),r=require_Map();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return _mapCacheClear$1=n,_mapCacheClear$1}var _isKeyable$1,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable$1;hasRequired_isKeyable=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return _isKeyable$1=e,_isKeyable$1}var _getMapData$1,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData$1;hasRequired_getMapData=1;var e=require_isKeyable();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return _getMapData$1=t,_getMapData$1}var _mapCacheDelete$1,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete$1;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return _mapCacheDelete$1=t,_mapCacheDelete$1}var _mapCacheGet$1,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet$1;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(r){return e(this,r).get(r)}return _mapCacheGet$1=t,_mapCacheGet$1}var _mapCacheHas$1,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas$1;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(r){return e(this,r).has(r)}return _mapCacheHas$1=t,_mapCacheHas$1}var _mapCacheSet$1,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet$1;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(r,n){var i=e(this,r),o=i.size;return i.set(r,n),this.size+=i.size==o?0:1,this}return _mapCacheSet$1=t,_mapCacheSet$1}var _MapCache$1,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache$1;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),r=require_mapCacheGet(),n=require_mapCacheHas(),i=require_mapCacheSet();function o(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var f=l[u];this.set(f[0],f[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,_MapCache$1=o,_MapCache$1}var _stackSet,hasRequired_stackSet;function require_stackSet(){if(hasRequired_stackSet)return _stackSet;hasRequired_stackSet=1;var e=require_ListCache(),t=require_Map(),r=require_MapCache(),n=200;function i(o,l){var u=this.__data__;if(u instanceof e){var h=u.__data__;if(!t||h.length<n-1)return h.push([o,l]),this.size=++u.size,this;u=this.__data__=new r(h)}return u.set(o,l),this.size=u.size,this}return _stackSet=i,_stackSet}var _Stack,hasRequired_Stack;function require_Stack(){if(hasRequired_Stack)return _Stack;hasRequired_Stack=1;var e=require_ListCache(),t=require_stackClear(),r=require_stackDelete(),n=require_stackGet(),i=require_stackHas(),o=require_stackSet();function l(u){var h=this.__data__=new e(u);this.size=h.size}return l.prototype.clear=t,l.prototype.delete=r,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_Stack=l,_Stack}var _arrayEach$1,hasRequired_arrayEach$1;function require_arrayEach$1(){if(hasRequired_arrayEach$1)return _arrayEach$1;hasRequired_arrayEach$1=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return _arrayEach$1=e,_arrayEach$1}var _defineProperty$1,hasRequired_defineProperty$1;function require_defineProperty$1(){if(hasRequired_defineProperty$1)return _defineProperty$1;hasRequired_defineProperty$1=1;var e=require_getNative$1(),t=function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}}();return _defineProperty$1=t,_defineProperty$1}var _baseAssignValue$1,hasRequired_baseAssignValue$1;function require_baseAssignValue$1(){if(hasRequired_baseAssignValue$1)return _baseAssignValue$1;hasRequired_baseAssignValue$1=1;var e=require_defineProperty$1();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return _baseAssignValue$1=t,_baseAssignValue$1}var _assignValue$1,hasRequired_assignValue$1;function require_assignValue$1(){if(hasRequired_assignValue$1)return _assignValue$1;hasRequired_assignValue$1=1;var e=require_baseAssignValue$1(),t=requireEq$1(),r=Object.prototype,n=r.hasOwnProperty;function i(o,l,u){var h=o[l];(!(n.call(o,l)&&t(h,u))||u===void 0&&!(l in o))&&e(o,l,u)}return _assignValue$1=i,_assignValue$1}var _copyObject,hasRequired_copyObject;function require_copyObject(){if(hasRequired_copyObject)return _copyObject;hasRequired_copyObject=1;var e=require_assignValue$1(),t=require_baseAssignValue$1();function r(n,i,o,l){var u=!o;o||(o={});for(var h=-1,f=i.length;++h<f;){var d=i[h],g=l?l(o[d],n[d],d,o,n):void 0;g===void 0&&(g=n[d]),u?t(o,d,g):e(o,d,g)}return o}return _copyObject=r,_copyObject}var _baseTimes$1,hasRequired_baseTimes$1;function require_baseTimes$1(){if(hasRequired_baseTimes$1)return _baseTimes$1;hasRequired_baseTimes$1=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return _baseTimes$1=e,_baseTimes$1}var isObjectLike_1$1,hasRequiredIsObjectLike$1;function requireIsObjectLike$1(){if(hasRequiredIsObjectLike$1)return isObjectLike_1$1;hasRequiredIsObjectLike$1=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1$1=e,isObjectLike_1$1}var _baseIsArguments$1,hasRequired_baseIsArguments$1;function require_baseIsArguments$1(){if(hasRequired_baseIsArguments$1)return _baseIsArguments$1;hasRequired_baseIsArguments$1=1;var e=require_baseGetTag$1(),t=requireIsObjectLike$1(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return _baseIsArguments$1=n,_baseIsArguments$1}var isArguments_1$1,hasRequiredIsArguments$1;function requireIsArguments$1(){if(hasRequiredIsArguments$1)return isArguments_1$1;hasRequiredIsArguments$1=1;var e=require_baseIsArguments$1(),t=requireIsObjectLike$1(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(l){return t(l)&&n.call(l,"callee")&&!i.call(l,"callee")};return isArguments_1$1=o,isArguments_1$1}var isArray_1$1,hasRequiredIsArray$1;function requireIsArray$1(){if(hasRequiredIsArray$1)return isArray_1$1;hasRequiredIsArray$1=1;var e=Array.isArray;return isArray_1$1=e,isArray_1$1}var isBuffer$1={exports:{}},stubFalse_1$1,hasRequiredStubFalse$1;function requireStubFalse$1(){if(hasRequiredStubFalse$1)return stubFalse_1$1;hasRequiredStubFalse$1=1;function e(){return!1}return stubFalse_1$1=e,stubFalse_1$1}var hasRequiredIsBuffer$1;function requireIsBuffer$1(){return hasRequiredIsBuffer$1||(hasRequiredIsBuffer$1=1,function(e,t){var r=require_root$1(),n=requireStubFalse$1(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?r.Buffer:void 0,h=u?u.isBuffer:void 0,f=h||n;e.exports=f}(isBuffer$1,isBuffer$1.exports)),isBuffer$1.exports}var _isIndex$1,hasRequired_isIndex$1;function require_isIndex$1(){if(hasRequired_isIndex$1)return _isIndex$1;hasRequired_isIndex$1=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var o=typeof n;return i=i==null?e:i,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return _isIndex$1=r,_isIndex$1}var isLength_1$1,hasRequiredIsLength$1;function requireIsLength$1(){if(hasRequiredIsLength$1)return isLength_1$1;hasRequiredIsLength$1=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return isLength_1$1=t,isLength_1$1}var _baseIsTypedArray$1,hasRequired_baseIsTypedArray$1;function require_baseIsTypedArray$1(){if(hasRequired_baseIsTypedArray$1)return _baseIsTypedArray$1;hasRequired_baseIsTypedArray$1=1;var e=require_baseGetTag$1(),t=requireIsLength$1(),r=requireIsObjectLike$1(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",f="[object Map]",d="[object Number]",g="[object Object]",p="[object RegExp]",m="[object Set]",b="[object String]",$="[object WeakMap]",S="[object ArrayBuffer]",R="[object DataView]",L="[object Float32Array]",N="[object Float64Array]",F="[object Int8Array]",H="[object Int16Array]",G="[object Int32Array]",P="[object Uint8Array]",V="[object Uint8ClampedArray]",z="[object Uint16Array]",W="[object Uint32Array]",T={};T[L]=T[N]=T[F]=T[H]=T[G]=T[P]=T[V]=T[z]=T[W]=!0,T[n]=T[i]=T[S]=T[o]=T[R]=T[l]=T[u]=T[h]=T[f]=T[d]=T[g]=T[p]=T[m]=T[b]=T[$]=!1;function U(I){return r(I)&&t(I.length)&&!!T[e(I)]}return _baseIsTypedArray$1=U,_baseIsTypedArray$1}var _baseUnary$1,hasRequired_baseUnary$1;function require_baseUnary$1(){if(hasRequired_baseUnary$1)return _baseUnary$1;hasRequired_baseUnary$1=1;function e(t){return function(r){return t(r)}}return _baseUnary$1=e,_baseUnary$1}var _nodeUtil$1={exports:{}},hasRequired_nodeUtil$1;function require_nodeUtil$1(){return hasRequired_nodeUtil$1||(hasRequired_nodeUtil$1=1,function(e,t){var r=require_freeGlobal$1(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,l=o&&r.process,u=function(){try{var h=i&&i.require&&i.require("util").types;return h||l&&l.binding&&l.binding("util")}catch{}}();e.exports=u}(_nodeUtil$1,_nodeUtil$1.exports)),_nodeUtil$1.exports}var isTypedArray_1$1,hasRequiredIsTypedArray$1;function requireIsTypedArray$1(){if(hasRequiredIsTypedArray$1)return isTypedArray_1$1;hasRequiredIsTypedArray$1=1;var e=require_baseIsTypedArray$1(),t=require_baseUnary$1(),r=require_nodeUtil$1(),n=r&&r.isTypedArray,i=n?t(n):e;return isTypedArray_1$1=i,isTypedArray_1$1}var _arrayLikeKeys$1,hasRequired_arrayLikeKeys$1;function require_arrayLikeKeys$1(){if(hasRequired_arrayLikeKeys$1)return _arrayLikeKeys$1;hasRequired_arrayLikeKeys$1=1;var e=require_baseTimes$1(),t=requireIsArguments$1(),r=requireIsArray$1(),n=requireIsBuffer$1(),i=require_isIndex$1(),o=requireIsTypedArray$1(),l=Object.prototype,u=l.hasOwnProperty;function h(f,d){var g=r(f),p=!g&&t(f),m=!g&&!p&&n(f),b=!g&&!p&&!m&&o(f),$=g||p||m||b,S=$?e(f.length,String):[],R=S.length;for(var L in f)(d||u.call(f,L))&&!($&&(L=="length"||m&&(L=="offset"||L=="parent")||b&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||i(L,R)))&&S.push(L);return S}return _arrayLikeKeys$1=h,_arrayLikeKeys$1}var _isPrototype$1,hasRequired_isPrototype$1;function require_isPrototype$1(){if(hasRequired_isPrototype$1)return _isPrototype$1;hasRequired_isPrototype$1=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return _isPrototype$1=t,_isPrototype$1}var _overArg$1,hasRequired_overArg$1;function require_overArg$1(){if(hasRequired_overArg$1)return _overArg$1;hasRequired_overArg$1=1;function e(t,r){return function(n){return t(r(n))}}return _overArg$1=e,_overArg$1}var _nativeKeys$1,hasRequired_nativeKeys$1;function require_nativeKeys$1(){if(hasRequired_nativeKeys$1)return _nativeKeys$1;hasRequired_nativeKeys$1=1;var e=require_overArg$1(),t=e(Object.keys,Object);return _nativeKeys$1=t,_nativeKeys$1}var _baseKeys$1,hasRequired_baseKeys$1;function require_baseKeys$1(){if(hasRequired_baseKeys$1)return _baseKeys$1;hasRequired_baseKeys$1=1;var e=require_isPrototype$1(),t=require_nativeKeys$1(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var l=[];for(var u in Object(o))n.call(o,u)&&u!="constructor"&&l.push(u);return l}return _baseKeys$1=i,_baseKeys$1}var isArrayLike_1$1,hasRequiredIsArrayLike$1;function requireIsArrayLike$1(){if(hasRequiredIsArrayLike$1)return isArrayLike_1$1;hasRequiredIsArrayLike$1=1;var e=requireIsFunction$1(),t=requireIsLength$1();function r(n){return n!=null&&t(n.length)&&!e(n)}return isArrayLike_1$1=r,isArrayLike_1$1}var keys_1$1,hasRequiredKeys$1;function requireKeys$1(){if(hasRequiredKeys$1)return keys_1$1;hasRequiredKeys$1=1;var e=require_arrayLikeKeys$1(),t=require_baseKeys$1(),r=requireIsArrayLike$1();function n(i){return r(i)?e(i):t(i)}return keys_1$1=n,keys_1$1}var _baseAssign,hasRequired_baseAssign;function require_baseAssign(){if(hasRequired_baseAssign)return _baseAssign;hasRequired_baseAssign=1;var e=require_copyObject(),t=requireKeys$1();function r(n,i){return n&&e(i,t(i),n)}return _baseAssign=r,_baseAssign}var _nativeKeysIn$1,hasRequired_nativeKeysIn$1;function require_nativeKeysIn$1(){if(hasRequired_nativeKeysIn$1)return _nativeKeysIn$1;hasRequired_nativeKeysIn$1=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return _nativeKeysIn$1=e,_nativeKeysIn$1}var _baseKeysIn$1,hasRequired_baseKeysIn$1;function require_baseKeysIn$1(){if(hasRequired_baseKeysIn$1)return _baseKeysIn$1;hasRequired_baseKeysIn$1=1;var e=requireIsObject$1(),t=require_isPrototype$1(),r=require_nativeKeysIn$1(),n=Object.prototype,i=n.hasOwnProperty;function o(l){if(!e(l))return r(l);var u=t(l),h=[];for(var f in l)f=="constructor"&&(u||!i.call(l,f))||h.push(f);return h}return _baseKeysIn$1=o,_baseKeysIn$1}var keysIn_1$1,hasRequiredKeysIn$1;function requireKeysIn$1(){if(hasRequiredKeysIn$1)return keysIn_1$1;hasRequiredKeysIn$1=1;var e=require_arrayLikeKeys$1(),t=require_baseKeysIn$1(),r=requireIsArrayLike$1();function n(i){return r(i)?e(i,!0):t(i)}return keysIn_1$1=n,keysIn_1$1}var _baseAssignIn,hasRequired_baseAssignIn;function require_baseAssignIn(){if(hasRequired_baseAssignIn)return _baseAssignIn;hasRequired_baseAssignIn=1;var e=require_copyObject(),t=requireKeysIn$1();function r(n,i){return n&&e(i,t(i),n)}return _baseAssignIn=r,_baseAssignIn}var _cloneBuffer={exports:{}},hasRequired_cloneBuffer;function require_cloneBuffer(){return hasRequired_cloneBuffer||(hasRequired_cloneBuffer=1,function(e,t){var r=require_root$1(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,l=o?r.Buffer:void 0,u=l?l.allocUnsafe:void 0;function h(f,d){if(d)return f.slice();var g=f.length,p=u?u(g):new f.constructor(g);return f.copy(p),p}e.exports=h}(_cloneBuffer,_cloneBuffer.exports)),_cloneBuffer.exports}var _copyArray,hasRequired_copyArray;function require_copyArray(){if(hasRequired_copyArray)return _copyArray;hasRequired_copyArray=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return _copyArray=e,_copyArray}var _arrayFilter,hasRequired_arrayFilter;function require_arrayFilter(){if(hasRequired_arrayFilter)return _arrayFilter;hasRequired_arrayFilter=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=0,l=[];++n<i;){var u=t[n];r(u,n,t)&&(l[o++]=u)}return l}return _arrayFilter=e,_arrayFilter}var stubArray_1,hasRequiredStubArray;function requireStubArray(){if(hasRequiredStubArray)return stubArray_1;hasRequiredStubArray=1;function e(){return[]}return stubArray_1=e,stubArray_1}var _getSymbols,hasRequired_getSymbols;function require_getSymbols(){if(hasRequired_getSymbols)return _getSymbols;hasRequired_getSymbols=1;var e=require_arrayFilter(),t=requireStubArray(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(l){return l==null?[]:(l=Object(l),e(i(l),function(u){return n.call(l,u)}))}:t;return _getSymbols=o,_getSymbols}var _copySymbols,hasRequired_copySymbols;function require_copySymbols(){if(hasRequired_copySymbols)return _copySymbols;hasRequired_copySymbols=1;var e=require_copyObject(),t=require_getSymbols();function r(n,i){return e(n,t(n),i)}return _copySymbols=r,_copySymbols}var _arrayPush$1,hasRequired_arrayPush$1;function require_arrayPush$1(){if(hasRequired_arrayPush$1)return _arrayPush$1;hasRequired_arrayPush$1=1;function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}return _arrayPush$1=e,_arrayPush$1}var _getPrototype$1,hasRequired_getPrototype$1;function require_getPrototype$1(){if(hasRequired_getPrototype$1)return _getPrototype$1;hasRequired_getPrototype$1=1;var e=require_overArg$1(),t=e(Object.getPrototypeOf,Object);return _getPrototype$1=t,_getPrototype$1}var _getSymbolsIn,hasRequired_getSymbolsIn;function require_getSymbolsIn(){if(hasRequired_getSymbolsIn)return _getSymbolsIn;hasRequired_getSymbolsIn=1;var e=require_arrayPush$1(),t=require_getPrototype$1(),r=require_getSymbols(),n=requireStubArray(),i=Object.getOwnPropertySymbols,o=i?function(l){for(var u=[];l;)e(u,r(l)),l=t(l);return u}:n;return _getSymbolsIn=o,_getSymbolsIn}var _copySymbolsIn,hasRequired_copySymbolsIn;function require_copySymbolsIn(){if(hasRequired_copySymbolsIn)return _copySymbolsIn;hasRequired_copySymbolsIn=1;var e=require_copyObject(),t=require_getSymbolsIn();function r(n,i){return e(n,t(n),i)}return _copySymbolsIn=r,_copySymbolsIn}var _baseGetAllKeys,hasRequired_baseGetAllKeys;function require_baseGetAllKeys(){if(hasRequired_baseGetAllKeys)return _baseGetAllKeys;hasRequired_baseGetAllKeys=1;var e=require_arrayPush$1(),t=requireIsArray$1();function r(n,i,o){var l=i(n);return t(n)?l:e(l,o(n))}return _baseGetAllKeys=r,_baseGetAllKeys}var _getAllKeys,hasRequired_getAllKeys;function require_getAllKeys(){if(hasRequired_getAllKeys)return _getAllKeys;hasRequired_getAllKeys=1;var e=require_baseGetAllKeys(),t=require_getSymbols(),r=requireKeys$1();function n(i){return e(i,r,t)}return _getAllKeys=n,_getAllKeys}var _getAllKeysIn,hasRequired_getAllKeysIn;function require_getAllKeysIn(){if(hasRequired_getAllKeysIn)return _getAllKeysIn;hasRequired_getAllKeysIn=1;var e=require_baseGetAllKeys(),t=require_getSymbolsIn(),r=requireKeysIn$1();function n(i){return e(i,r,t)}return _getAllKeysIn=n,_getAllKeysIn}var _DataView,hasRequired_DataView;function require_DataView(){if(hasRequired_DataView)return _DataView;hasRequired_DataView=1;var e=require_getNative$1(),t=require_root$1(),r=e(t,"DataView");return _DataView=r,_DataView}var _Promise,hasRequired_Promise;function require_Promise(){if(hasRequired_Promise)return _Promise;hasRequired_Promise=1;var e=require_getNative$1(),t=require_root$1(),r=e(t,"Promise");return _Promise=r,_Promise}var _Set,hasRequired_Set;function require_Set(){if(hasRequired_Set)return _Set;hasRequired_Set=1;var e=require_getNative$1(),t=require_root$1(),r=e(t,"Set");return _Set=r,_Set}var _WeakMap,hasRequired_WeakMap;function require_WeakMap(){if(hasRequired_WeakMap)return _WeakMap;hasRequired_WeakMap=1;var e=require_getNative$1(),t=require_root$1(),r=e(t,"WeakMap");return _WeakMap=r,_WeakMap}var _getTag,hasRequired_getTag;function require_getTag(){if(hasRequired_getTag)return _getTag;hasRequired_getTag=1;var e=require_DataView(),t=require_Map(),r=require_Promise(),n=require_Set(),i=require_WeakMap(),o=require_baseGetTag$1(),l=require_toSource$1(),u="[object Map]",h="[object Object]",f="[object Promise]",d="[object Set]",g="[object WeakMap]",p="[object DataView]",m=l(e),b=l(t),$=l(r),S=l(n),R=l(i),L=o;return(e&&L(new e(new ArrayBuffer(1)))!=p||t&&L(new t)!=u||r&&L(r.resolve())!=f||n&&L(new n)!=d||i&&L(new i)!=g)&&(L=function(N){var F=o(N),H=F==h?N.constructor:void 0,G=H?l(H):"";if(G)switch(G){case m:return p;case b:return u;case $:return f;case S:return d;case R:return g}return F}),_getTag=L,_getTag}var _initCloneArray,hasRequired_initCloneArray;function require_initCloneArray(){if(hasRequired_initCloneArray)return _initCloneArray;hasRequired_initCloneArray=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return _initCloneArray=r,_initCloneArray}var _Uint8Array,hasRequired_Uint8Array;function require_Uint8Array(){if(hasRequired_Uint8Array)return _Uint8Array;hasRequired_Uint8Array=1;var e=require_root$1(),t=e.Uint8Array;return _Uint8Array=t,_Uint8Array}var _cloneArrayBuffer,hasRequired_cloneArrayBuffer;function require_cloneArrayBuffer(){if(hasRequired_cloneArrayBuffer)return _cloneArrayBuffer;hasRequired_cloneArrayBuffer=1;var e=require_Uint8Array();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return _cloneArrayBuffer=t,_cloneArrayBuffer}var _cloneDataView,hasRequired_cloneDataView;function require_cloneDataView(){if(hasRequired_cloneDataView)return _cloneDataView;hasRequired_cloneDataView=1;var e=require_cloneArrayBuffer();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return _cloneDataView=t,_cloneDataView}var _cloneRegExp,hasRequired_cloneRegExp;function require_cloneRegExp(){if(hasRequired_cloneRegExp)return _cloneRegExp;hasRequired_cloneRegExp=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return _cloneRegExp=t,_cloneRegExp}var _cloneSymbol,hasRequired_cloneSymbol;function require_cloneSymbol(){if(hasRequired_cloneSymbol)return _cloneSymbol;hasRequired_cloneSymbol=1;var e=require_Symbol$1(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return _cloneSymbol=n,_cloneSymbol}var _cloneTypedArray,hasRequired_cloneTypedArray;function require_cloneTypedArray(){if(hasRequired_cloneTypedArray)return _cloneTypedArray;hasRequired_cloneTypedArray=1;var e=require_cloneArrayBuffer();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return _cloneTypedArray=t,_cloneTypedArray}var _initCloneByTag,hasRequired_initCloneByTag;function require_initCloneByTag(){if(hasRequired_initCloneByTag)return _initCloneByTag;hasRequired_initCloneByTag=1;var e=require_cloneArrayBuffer(),t=require_cloneDataView(),r=require_cloneRegExp(),n=require_cloneSymbol(),i=require_cloneTypedArray(),o="[object Boolean]",l="[object Date]",u="[object Map]",h="[object Number]",f="[object RegExp]",d="[object Set]",g="[object String]",p="[object Symbol]",m="[object ArrayBuffer]",b="[object DataView]",$="[object Float32Array]",S="[object Float64Array]",R="[object Int8Array]",L="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",H="[object Uint8ClampedArray]",G="[object Uint16Array]",P="[object Uint32Array]";function V(z,W,T){var U=z.constructor;switch(W){case m:return e(z);case o:case l:return new U(+z);case b:return t(z,T);case $:case S:case R:case L:case N:case F:case H:case G:case P:return i(z,T);case u:return new U;case h:case g:return new U(z);case f:return r(z);case d:return new U;case p:return n(z)}}return _initCloneByTag=V,_initCloneByTag}var _baseCreate,hasRequired_baseCreate;function require_baseCreate(){if(hasRequired_baseCreate)return _baseCreate;hasRequired_baseCreate=1;var e=requireIsObject$1(),t=Object.create,r=function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var o=new n;return n.prototype=void 0,o}}();return _baseCreate=r,_baseCreate}var _initCloneObject,hasRequired_initCloneObject;function require_initCloneObject(){if(hasRequired_initCloneObject)return _initCloneObject;hasRequired_initCloneObject=1;var e=require_baseCreate(),t=require_getPrototype$1(),r=require_isPrototype$1();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return _initCloneObject=n,_initCloneObject}var _baseIsMap,hasRequired_baseIsMap;function require_baseIsMap(){if(hasRequired_baseIsMap)return _baseIsMap;hasRequired_baseIsMap=1;var e=require_getTag(),t=requireIsObjectLike$1(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return _baseIsMap=n,_baseIsMap}var isMap_1,hasRequiredIsMap;function requireIsMap(){if(hasRequiredIsMap)return isMap_1;hasRequiredIsMap=1;var e=require_baseIsMap(),t=require_baseUnary$1(),r=require_nodeUtil$1(),n=r&&r.isMap,i=n?t(n):e;return isMap_1=i,isMap_1}var _baseIsSet,hasRequired_baseIsSet;function require_baseIsSet(){if(hasRequired_baseIsSet)return _baseIsSet;hasRequired_baseIsSet=1;var e=require_getTag(),t=requireIsObjectLike$1(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return _baseIsSet=n,_baseIsSet}var isSet_1,hasRequiredIsSet;function requireIsSet(){if(hasRequiredIsSet)return isSet_1;hasRequiredIsSet=1;var e=require_baseIsSet(),t=require_baseUnary$1(),r=require_nodeUtil$1(),n=r&&r.isSet,i=n?t(n):e;return isSet_1=i,isSet_1}var _baseClone,hasRequired_baseClone;function require_baseClone(){if(hasRequired_baseClone)return _baseClone;hasRequired_baseClone=1;var e=require_Stack(),t=require_arrayEach$1(),r=require_assignValue$1(),n=require_baseAssign(),i=require_baseAssignIn(),o=require_cloneBuffer(),l=require_copyArray(),u=require_copySymbols(),h=require_copySymbolsIn(),f=require_getAllKeys(),d=require_getAllKeysIn(),g=require_getTag(),p=require_initCloneArray(),m=require_initCloneByTag(),b=require_initCloneObject(),$=requireIsArray$1(),S=requireIsBuffer$1(),R=requireIsMap(),L=requireIsObject$1(),N=requireIsSet(),F=requireKeys$1(),H=requireKeysIn$1(),G=1,P=2,V=4,z="[object Arguments]",W="[object Array]",T="[object Boolean]",U="[object Date]",I="[object Error]",ae="[object Function]",Q="[object GeneratorFunction]",ue="[object Map]",_e="[object Number]",ke="[object Object]",de="[object RegExp]",ce="[object Set]",he="[object String]",Se="[object Symbol]",ve="[object WeakMap]",me="[object ArrayBuffer]",Ce="[object DataView]",xe="[object Float32Array]",Ne="[object Float64Array]",pe="[object Int8Array]",J="[object Int16Array]",oe="[object Int32Array]",ee="[object Uint8Array]",Z="[object Uint8ClampedArray]",ie="[object Uint16Array]",se="[object Uint32Array]",te={};te[z]=te[W]=te[me]=te[Ce]=te[T]=te[U]=te[xe]=te[Ne]=te[pe]=te[J]=te[oe]=te[ue]=te[_e]=te[ke]=te[de]=te[ce]=te[he]=te[Se]=te[ee]=te[Z]=te[ie]=te[se]=!0,te[I]=te[ae]=te[ve]=!1;function fe(we,Ye,He,je,Pe,Ee){var Ie,Le=Ye&G,Be=Ye&P,Te=Ye&V;if(He&&(Ie=Pe?He(we,je,Pe,Ee):He(we)),Ie!==void 0)return Ie;if(!L(we))return we;var dt=$(we);if(dt){if(Ie=p(we),!Le)return l(we,Ie)}else{var Ge=g(we),rt=Ge==ae||Ge==Q;if(S(we))return o(we,Le);if(Ge==ke||Ge==z||rt&&!Pe){if(Ie=Be||rt?{}:b(we),!Le)return Be?h(we,i(Ie,we)):u(we,n(Ie,we))}else{if(!te[Ge])return Pe?we:{};Ie=m(we,Ge,Le)}}Ee||(Ee=new e);var it=Ee.get(we);if(it)return it;Ee.set(we,Ie),N(we)?we.forEach(function(nt){Ie.add(fe(nt,Ye,He,nt,we,Ee))}):R(we)&&we.forEach(function(nt,Ke){Ie.set(Ke,fe(nt,Ye,He,Ke,we,Ee))});var st=Te?Be?d:f:Be?H:F,wt=dt?void 0:st(we);return t(wt||we,function(nt,Ke){wt&&(Ke=nt,nt=we[Ke]),r(Ie,Ke,fe(nt,Ye,He,Ke,we,Ee))}),Ie}return _baseClone=fe,_baseClone}var clone_1,hasRequiredClone;function requireClone(){if(hasRequiredClone)return clone_1;hasRequiredClone=1;var e=require_baseClone(),t=4;function r(n){return e(n,t)}return clone_1=r,clone_1}var constant_1$1,hasRequiredConstant$1;function requireConstant$1(){if(hasRequiredConstant$1)return constant_1$1;hasRequiredConstant$1=1;function e(t){return function(){return t}}return constant_1$1=e,constant_1$1}var each$1={exports:{}},_createBaseFor$1,hasRequired_createBaseFor$1;function require_createBaseFor$1(){if(hasRequired_createBaseFor$1)return _createBaseFor$1;hasRequired_createBaseFor$1=1;function e(t){return function(r,n,i){for(var o=-1,l=Object(r),u=i(r),h=u.length;h--;){var f=u[t?h:++o];if(n(l[f],f,l)===!1)break}return r}}return _createBaseFor$1=e,_createBaseFor$1}var _baseFor$1,hasRequired_baseFor$1;function require_baseFor$1(){if(hasRequired_baseFor$1)return _baseFor$1;hasRequired_baseFor$1=1;var e=require_createBaseFor$1(),t=e();return _baseFor$1=t,_baseFor$1}var _baseForOwn$1,hasRequired_baseForOwn$1;function require_baseForOwn$1(){if(hasRequired_baseForOwn$1)return _baseForOwn$1;hasRequired_baseForOwn$1=1;var e=require_baseFor$1(),t=requireKeys$1();function r(n,i){return n&&e(n,i,t)}return _baseForOwn$1=r,_baseForOwn$1}var _createBaseEach$1,hasRequired_createBaseEach$1;function require_createBaseEach$1(){if(hasRequired_createBaseEach$1)return _createBaseEach$1;hasRequired_createBaseEach$1=1;var e=requireIsArrayLike$1();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var l=i.length,u=n?l:-1,h=Object(i);(n?u--:++u<l)&&o(h[u],u,h)!==!1;);return i}}return _createBaseEach$1=t,_createBaseEach$1}var _baseEach$1,hasRequired_baseEach$1;function require_baseEach$1(){if(hasRequired_baseEach$1)return _baseEach$1;hasRequired_baseEach$1=1;var e=require_baseForOwn$1(),t=require_createBaseEach$1(),r=t(e);return _baseEach$1=r,_baseEach$1}var identity_1$1,hasRequiredIdentity$1;function requireIdentity$1(){if(hasRequiredIdentity$1)return identity_1$1;hasRequiredIdentity$1=1;function e(t){return t}return identity_1$1=e,identity_1$1}var _castFunction$1,hasRequired_castFunction$1;function require_castFunction$1(){if(hasRequired_castFunction$1)return _castFunction$1;hasRequired_castFunction$1=1;var e=requireIdentity$1();function t(r){return typeof r=="function"?r:e}return _castFunction$1=t,_castFunction$1}var forEach_1$1,hasRequiredForEach$1;function requireForEach$1(){if(hasRequiredForEach$1)return forEach_1$1;hasRequiredForEach$1=1;var e=require_arrayEach$1(),t=require_baseEach$1(),r=require_castFunction$1(),n=requireIsArray$1();function i(o,l){var u=n(o)?e:t;return u(o,r(l))}return forEach_1$1=i,forEach_1$1}var hasRequiredEach$1;function requireEach$1(){return hasRequiredEach$1||(hasRequiredEach$1=1,function(e){e.exports=requireForEach$1()}(each$1)),each$1.exports}var _baseFilter,hasRequired_baseFilter;function require_baseFilter(){if(hasRequired_baseFilter)return _baseFilter;hasRequired_baseFilter=1;var e=require_baseEach$1();function t(r,n){var i=[];return e(r,function(o,l,u){n(o,l,u)&&i.push(o)}),i}return _baseFilter=t,_baseFilter}var _setCacheAdd,hasRequired_setCacheAdd;function require_setCacheAdd(){if(hasRequired_setCacheAdd)return _setCacheAdd;hasRequired_setCacheAdd=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return _setCacheAdd=t,_setCacheAdd}var _setCacheHas,hasRequired_setCacheHas;function require_setCacheHas(){if(hasRequired_setCacheHas)return _setCacheHas;hasRequired_setCacheHas=1;function e(t){return this.__data__.has(t)}return _setCacheHas=e,_setCacheHas}var _SetCache,hasRequired_SetCache;function require_SetCache(){if(hasRequired_SetCache)return _SetCache;hasRequired_SetCache=1;var e=require_MapCache(),t=require_setCacheAdd(),r=require_setCacheHas();function n(i){var o=-1,l=i==null?0:i.length;for(this.__data__=new e;++o<l;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,_SetCache=n,_SetCache}var _arraySome,hasRequired_arraySome;function require_arraySome(){if(hasRequired_arraySome)return _arraySome;hasRequired_arraySome=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return _arraySome=e,_arraySome}var _cacheHas,hasRequired_cacheHas;function require_cacheHas(){if(hasRequired_cacheHas)return _cacheHas;hasRequired_cacheHas=1;function e(t,r){return t.has(r)}return _cacheHas=e,_cacheHas}var _equalArrays,hasRequired_equalArrays;function require_equalArrays(){if(hasRequired_equalArrays)return _equalArrays;hasRequired_equalArrays=1;var e=require_SetCache(),t=require_arraySome(),r=require_cacheHas(),n=1,i=2;function o(l,u,h,f,d,g){var p=h&n,m=l.length,b=u.length;if(m!=b&&!(p&&b>m))return!1;var $=g.get(l),S=g.get(u);if($&&S)return $==u&&S==l;var R=-1,L=!0,N=h&i?new e:void 0;for(g.set(l,u),g.set(u,l);++R<m;){var F=l[R],H=u[R];if(f)var G=p?f(H,F,R,u,l,g):f(F,H,R,l,u,g);if(G!==void 0){if(G)continue;L=!1;break}if(N){if(!t(u,function(P,V){if(!r(N,V)&&(F===P||d(F,P,h,f,g)))return N.push(V)})){L=!1;break}}else if(!(F===H||d(F,H,h,f,g))){L=!1;break}}return g.delete(l),g.delete(u),L}return _equalArrays=o,_equalArrays}var _mapToArray,hasRequired_mapToArray;function require_mapToArray(){if(hasRequired_mapToArray)return _mapToArray;hasRequired_mapToArray=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return _mapToArray=e,_mapToArray}var _setToArray,hasRequired_setToArray;function require_setToArray(){if(hasRequired_setToArray)return _setToArray;hasRequired_setToArray=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return _setToArray=e,_setToArray}var _equalByTag,hasRequired_equalByTag;function require_equalByTag(){if(hasRequired_equalByTag)return _equalByTag;hasRequired_equalByTag=1;var e=require_Symbol$1(),t=require_Uint8Array(),r=requireEq$1(),n=require_equalArrays(),i=require_mapToArray(),o=require_setToArray(),l=1,u=2,h="[object Boolean]",f="[object Date]",d="[object Error]",g="[object Map]",p="[object Number]",m="[object RegExp]",b="[object Set]",$="[object String]",S="[object Symbol]",R="[object ArrayBuffer]",L="[object DataView]",N=e?e.prototype:void 0,F=N?N.valueOf:void 0;function H(G,P,V,z,W,T,U){switch(V){case L:if(G.byteLength!=P.byteLength||G.byteOffset!=P.byteOffset)return!1;G=G.buffer,P=P.buffer;case R:return!(G.byteLength!=P.byteLength||!T(new t(G),new t(P)));case h:case f:case p:return r(+G,+P);case d:return G.name==P.name&&G.message==P.message;case m:case $:return G==P+"";case g:var I=i;case b:var ae=z&l;if(I||(I=o),G.size!=P.size&&!ae)return!1;var Q=U.get(G);if(Q)return Q==P;z|=u,U.set(G,P);var ue=n(I(G),I(P),z,W,T,U);return U.delete(G),ue;case S:if(F)return F.call(G)==F.call(P)}return!1}return _equalByTag=H,_equalByTag}var _equalObjects,hasRequired_equalObjects;function require_equalObjects(){if(hasRequired_equalObjects)return _equalObjects;hasRequired_equalObjects=1;var e=require_getAllKeys(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,l,u,h,f,d){var g=u&t,p=e(o),m=p.length,b=e(l),$=b.length;if(m!=$&&!g)return!1;for(var S=m;S--;){var R=p[S];if(!(g?R in l:n.call(l,R)))return!1}var L=d.get(o),N=d.get(l);if(L&&N)return L==l&&N==o;var F=!0;d.set(o,l),d.set(l,o);for(var H=g;++S<m;){R=p[S];var G=o[R],P=l[R];if(h)var V=g?h(P,G,R,l,o,d):h(G,P,R,o,l,d);if(!(V===void 0?G===P||f(G,P,u,h,d):V)){F=!1;break}H||(H=R=="constructor")}if(F&&!H){var z=o.constructor,W=l.constructor;z!=W&&"constructor"in o&&"constructor"in l&&!(typeof z=="function"&&z instanceof z&&typeof W=="function"&&W instanceof W)&&(F=!1)}return d.delete(o),d.delete(l),F}return _equalObjects=i,_equalObjects}var _baseIsEqualDeep,hasRequired_baseIsEqualDeep;function require_baseIsEqualDeep(){if(hasRequired_baseIsEqualDeep)return _baseIsEqualDeep;hasRequired_baseIsEqualDeep=1;var e=require_Stack(),t=require_equalArrays(),r=require_equalByTag(),n=require_equalObjects(),i=require_getTag(),o=requireIsArray$1(),l=requireIsBuffer$1(),u=requireIsTypedArray$1(),h=1,f="[object Arguments]",d="[object Array]",g="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function b($,S,R,L,N,F){var H=o($),G=o(S),P=H?d:i($),V=G?d:i(S);P=P==f?g:P,V=V==f?g:V;var z=P==g,W=V==g,T=P==V;if(T&&l($)){if(!l(S))return!1;H=!0,z=!1}if(T&&!z)return F||(F=new e),H||u($)?t($,S,R,L,N,F):r($,S,P,R,L,N,F);if(!(R&h)){var U=z&&m.call($,"__wrapped__"),I=W&&m.call(S,"__wrapped__");if(U||I){var ae=U?$.value():$,Q=I?S.value():S;return F||(F=new e),N(ae,Q,R,L,F)}}return T?(F||(F=new e),n($,S,R,L,N,F)):!1}return _baseIsEqualDeep=b,_baseIsEqualDeep}var _baseIsEqual,hasRequired_baseIsEqual;function require_baseIsEqual(){if(hasRequired_baseIsEqual)return _baseIsEqual;hasRequired_baseIsEqual=1;var e=require_baseIsEqualDeep(),t=requireIsObjectLike$1();function r(n,i,o,l,u){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,o,l,r,u)}return _baseIsEqual=r,_baseIsEqual}var _baseIsMatch,hasRequired_baseIsMatch;function require_baseIsMatch(){if(hasRequired_baseIsMatch)return _baseIsMatch;hasRequired_baseIsMatch=1;var e=require_Stack(),t=require_baseIsEqual(),r=1,n=2;function i(o,l,u,h){var f=u.length,d=f,g=!h;if(o==null)return!d;for(o=Object(o);f--;){var p=u[f];if(g&&p[2]?p[1]!==o[p[0]]:!(p[0]in o))return!1}for(;++f<d;){p=u[f];var m=p[0],b=o[m],$=p[1];if(g&&p[2]){if(b===void 0&&!(m in o))return!1}else{var S=new e;if(h)var R=h(b,$,m,o,l,S);if(!(R===void 0?t($,b,r|n,h,S):R))return!1}}return!0}return _baseIsMatch=i,_baseIsMatch}var _isStrictComparable,hasRequired_isStrictComparable;function require_isStrictComparable(){if(hasRequired_isStrictComparable)return _isStrictComparable;hasRequired_isStrictComparable=1;var e=requireIsObject$1();function t(r){return r===r&&!e(r)}return _isStrictComparable=t,_isStrictComparable}var _getMatchData,hasRequired_getMatchData;function require_getMatchData(){if(hasRequired_getMatchData)return _getMatchData;hasRequired_getMatchData=1;var e=require_isStrictComparable(),t=requireKeys$1();function r(n){for(var i=t(n),o=i.length;o--;){var l=i[o],u=n[l];i[o]=[l,u,e(u)]}return i}return _getMatchData=r,_getMatchData}var _matchesStrictComparable,hasRequired_matchesStrictComparable;function require_matchesStrictComparable(){if(hasRequired_matchesStrictComparable)return _matchesStrictComparable;hasRequired_matchesStrictComparable=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return _matchesStrictComparable=e,_matchesStrictComparable}var _baseMatches,hasRequired_baseMatches;function require_baseMatches(){if(hasRequired_baseMatches)return _baseMatches;hasRequired_baseMatches=1;var e=require_baseIsMatch(),t=require_getMatchData(),r=require_matchesStrictComparable();function n(i){var o=t(i);return o.length==1&&o[0][2]?r(o[0][0],o[0][1]):function(l){return l===i||e(l,i,o)}}return _baseMatches=n,_baseMatches}var isSymbol_1$1,hasRequiredIsSymbol$1;function requireIsSymbol$1(){if(hasRequiredIsSymbol$1)return isSymbol_1$1;hasRequiredIsSymbol$1=1;var e=require_baseGetTag$1(),t=requireIsObjectLike$1(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return isSymbol_1$1=n,isSymbol_1$1}var _isKey$1,hasRequired_isKey$1;function require_isKey$1(){if(hasRequired_isKey$1)return _isKey$1;hasRequired_isKey$1=1;var e=requireIsArray$1(),t=requireIsSymbol$1(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,l){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||l!=null&&o in Object(l)}return _isKey$1=i,_isKey$1}var memoize_1$1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1$1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var l=arguments,u=i?i.apply(this,l):l[0],h=o.cache;if(h.has(u))return h.get(u);var f=n.apply(this,l);return o.cache=h.set(u,f)||h,f};return o.cache=new(r.Cache||e),o}return r.Cache=e,memoize_1$1=r,memoize_1$1}var _memoizeCapped$1,hasRequired_memoizeCapped$1;function require_memoizeCapped$1(){if(hasRequired_memoizeCapped$1)return _memoizeCapped$1;hasRequired_memoizeCapped$1=1;var e=requireMemoize(),t=500;function r(n){var i=e(n,function(l){return o.size===t&&o.clear(),l}),o=i.cache;return i}return _memoizeCapped$1=r,_memoizeCapped$1}var _stringToPath$1,hasRequired_stringToPath$1;function require_stringToPath$1(){if(hasRequired_stringToPath$1)return _stringToPath$1;hasRequired_stringToPath$1=1;var e=require_memoizeCapped$1(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(l,u,h,f){o.push(h?f.replace(r,"$1"):u||l)}),o});return _stringToPath$1=n,_stringToPath$1}var _arrayMap$1,hasRequired_arrayMap$1;function require_arrayMap$1(){if(hasRequired_arrayMap$1)return _arrayMap$1;hasRequired_arrayMap$1=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}return _arrayMap$1=e,_arrayMap$1}var _baseToString$1,hasRequired_baseToString$1;function require_baseToString$1(){if(hasRequired_baseToString$1)return _baseToString$1;hasRequired_baseToString$1=1;var e=require_Symbol$1(),t=require_arrayMap$1(),r=requireIsArray$1(),n=requireIsSymbol$1(),i=1/0,o=e?e.prototype:void 0,l=o?o.toString:void 0;function u(h){if(typeof h=="string")return h;if(r(h))return t(h,u)+"";if(n(h))return l?l.call(h):"";var f=h+"";return f=="0"&&1/h==-i?"-0":f}return _baseToString$1=u,_baseToString$1}var toString_1$1,hasRequiredToString$1;function requireToString$1(){if(hasRequiredToString$1)return toString_1$1;hasRequiredToString$1=1;var e=require_baseToString$1();function t(r){return r==null?"":e(r)}return toString_1$1=t,toString_1$1}var _castPath$1,hasRequired_castPath$1;function require_castPath$1(){if(hasRequired_castPath$1)return _castPath$1;hasRequired_castPath$1=1;var e=requireIsArray$1(),t=require_isKey$1(),r=require_stringToPath$1(),n=requireToString$1();function i(o,l){return e(o)?o:t(o,l)?[o]:r(n(o))}return _castPath$1=i,_castPath$1}var _toKey$1,hasRequired_toKey$1;function require_toKey$1(){if(hasRequired_toKey$1)return _toKey$1;hasRequired_toKey$1=1;var e=requireIsSymbol$1(),t=1/0;function r(n){if(typeof n=="string"||e(n))return n;var i=n+"";return i=="0"&&1/n==-t?"-0":i}return _toKey$1=r,_toKey$1}var _baseGet$1,hasRequired_baseGet$1;function require_baseGet$1(){if(hasRequired_baseGet$1)return _baseGet$1;hasRequired_baseGet$1=1;var e=require_castPath$1(),t=require_toKey$1();function r(n,i){i=e(i,n);for(var o=0,l=i.length;n!=null&&o<l;)n=n[t(i[o++])];return o&&o==l?n:void 0}return _baseGet$1=r,_baseGet$1}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet$1();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return get_1=t,get_1}var _baseHasIn$1,hasRequired_baseHasIn$1;function require_baseHasIn$1(){if(hasRequired_baseHasIn$1)return _baseHasIn$1;hasRequired_baseHasIn$1=1;function e(t,r){return t!=null&&r in Object(t)}return _baseHasIn$1=e,_baseHasIn$1}var _hasPath$1,hasRequired_hasPath$1;function require_hasPath$1(){if(hasRequired_hasPath$1)return _hasPath$1;hasRequired_hasPath$1=1;var e=require_castPath$1(),t=requireIsArguments$1(),r=requireIsArray$1(),n=require_isIndex$1(),i=requireIsLength$1(),o=require_toKey$1();function l(u,h,f){h=e(h,u);for(var d=-1,g=h.length,p=!1;++d<g;){var m=o(h[d]);if(!(p=u!=null&&f(u,m)))break;u=u[m]}return p||++d!=g?p:(g=u==null?0:u.length,!!g&&i(g)&&n(m,g)&&(r(u)||t(u)))}return _hasPath$1=l,_hasPath$1}var hasIn_1$1,hasRequiredHasIn$1;function requireHasIn$1(){if(hasRequiredHasIn$1)return hasIn_1$1;hasRequiredHasIn$1=1;var e=require_baseHasIn$1(),t=require_hasPath$1();function r(n,i){return n!=null&&t(n,i,e)}return hasIn_1$1=r,hasIn_1$1}var _baseMatchesProperty,hasRequired_baseMatchesProperty;function require_baseMatchesProperty(){if(hasRequired_baseMatchesProperty)return _baseMatchesProperty;hasRequired_baseMatchesProperty=1;var e=require_baseIsEqual(),t=requireGet(),r=requireHasIn$1(),n=require_isKey$1(),i=require_isStrictComparable(),o=require_matchesStrictComparable(),l=require_toKey$1(),u=1,h=2;function f(d,g){return n(d)&&i(g)?o(l(d),g):function(p){var m=t(p,d);return m===void 0&&m===g?r(p,d):e(g,m,u|h)}}return _baseMatchesProperty=f,_baseMatchesProperty}var _baseProperty,hasRequired_baseProperty;function require_baseProperty(){if(hasRequired_baseProperty)return _baseProperty;hasRequired_baseProperty=1;function e(t){return function(r){return r==null?void 0:r[t]}}return _baseProperty=e,_baseProperty}var _basePropertyDeep,hasRequired_basePropertyDeep;function require_basePropertyDeep(){if(hasRequired_basePropertyDeep)return _basePropertyDeep;hasRequired_basePropertyDeep=1;var e=require_baseGet$1();function t(r){return function(n){return e(n,r)}}return _basePropertyDeep=t,_basePropertyDeep}var property_1,hasRequiredProperty;function requireProperty(){if(hasRequiredProperty)return property_1;hasRequiredProperty=1;var e=require_baseProperty(),t=require_basePropertyDeep(),r=require_isKey$1(),n=require_toKey$1();function i(o){return r(o)?e(n(o)):t(o)}return property_1=i,property_1}var _baseIteratee,hasRequired_baseIteratee;function require_baseIteratee(){if(hasRequired_baseIteratee)return _baseIteratee;hasRequired_baseIteratee=1;var e=require_baseMatches(),t=require_baseMatchesProperty(),r=requireIdentity$1(),n=requireIsArray$1(),i=requireProperty();function o(l){return typeof l=="function"?l:l==null?r:typeof l=="object"?n(l)?t(l[0],l[1]):e(l):i(l)}return _baseIteratee=o,_baseIteratee}var filter_1,hasRequiredFilter;function requireFilter(){if(hasRequiredFilter)return filter_1;hasRequiredFilter=1;var e=require_arrayFilter(),t=require_baseFilter(),r=require_baseIteratee(),n=requireIsArray$1();function i(o,l){var u=n(o)?e:t;return u(o,r(l,3))}return filter_1=i,filter_1}var _baseHas$1,hasRequired_baseHas$1;function require_baseHas$1(){if(hasRequired_baseHas$1)return _baseHas$1;hasRequired_baseHas$1=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return _baseHas$1=r,_baseHas$1}var has_1$1,hasRequiredHas$1;function requireHas$1(){if(hasRequiredHas$1)return has_1$1;hasRequiredHas$1=1;var e=require_baseHas$1(),t=require_hasPath$1();function r(n,i){return n!=null&&t(n,i,e)}return has_1$1=r,has_1$1}var isEmpty_1,hasRequiredIsEmpty;function requireIsEmpty(){if(hasRequiredIsEmpty)return isEmpty_1;hasRequiredIsEmpty=1;var e=require_baseKeys$1(),t=require_getTag(),r=requireIsArguments$1(),n=requireIsArray$1(),i=requireIsArrayLike$1(),o=requireIsBuffer$1(),l=require_isPrototype$1(),u=requireIsTypedArray$1(),h="[object Map]",f="[object Set]",d=Object.prototype,g=d.hasOwnProperty;function p(m){if(m==null)return!0;if(i(m)&&(n(m)||typeof m=="string"||typeof m.splice=="function"||o(m)||u(m)||r(m)))return!m.length;var b=t(m);if(b==h||b==f)return!m.size;if(l(m))return!e(m).length;for(var $ in m)if(g.call(m,$))return!1;return!0}return isEmpty_1=p,isEmpty_1}var isUndefined_1,hasRequiredIsUndefined;function requireIsUndefined(){if(hasRequiredIsUndefined)return isUndefined_1;hasRequiredIsUndefined=1;function e(t){return t===void 0}return isUndefined_1=e,isUndefined_1}var _baseMap,hasRequired_baseMap;function require_baseMap(){if(hasRequired_baseMap)return _baseMap;hasRequired_baseMap=1;var e=require_baseEach$1(),t=requireIsArrayLike$1();function r(n,i){var o=-1,l=t(n)?Array(n.length):[];return e(n,function(u,h,f){l[++o]=i(u,h,f)}),l}return _baseMap=r,_baseMap}var map_1,hasRequiredMap;function requireMap(){if(hasRequiredMap)return map_1;hasRequiredMap=1;var e=require_arrayMap$1(),t=require_baseIteratee(),r=require_baseMap(),n=requireIsArray$1();function i(o,l){var u=n(o)?e:r;return u(o,t(l,3))}return map_1=i,map_1}var _arrayReduce,hasRequired_arrayReduce;function require_arrayReduce(){if(hasRequired_arrayReduce)return _arrayReduce;hasRequired_arrayReduce=1;function e(t,r,n,i){var o=-1,l=t==null?0:t.length;for(i&&l&&(n=t[++o]);++o<l;)n=r(n,t[o],o,t);return n}return _arrayReduce=e,_arrayReduce}var _baseReduce,hasRequired_baseReduce;function require_baseReduce(){if(hasRequired_baseReduce)return _baseReduce;hasRequired_baseReduce=1;function e(t,r,n,i,o){return o(t,function(l,u,h){n=i?(i=!1,l):r(n,l,u,h)}),n}return _baseReduce=e,_baseReduce}var reduce_1,hasRequiredReduce;function requireReduce(){if(hasRequiredReduce)return reduce_1;hasRequiredReduce=1;var e=require_arrayReduce(),t=require_baseEach$1(),r=require_baseIteratee(),n=require_baseReduce(),i=requireIsArray$1();function o(l,u,h){var f=i(l)?e:n,d=arguments.length<3;return f(l,r(u,4),h,d,t)}return reduce_1=o,reduce_1}var isString_1,hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag$1(),t=requireIsArray$1(),r=requireIsObjectLike$1(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return isString_1=i,isString_1}var _asciiSize,hasRequired_asciiSize;function require_asciiSize(){if(hasRequired_asciiSize)return _asciiSize;hasRequired_asciiSize=1;var e=require_baseProperty(),t=e("length");return _asciiSize=t,_asciiSize}var _hasUnicode,hasRequired_hasUnicode;function require_hasUnicode(){if(hasRequired_hasUnicode)return _hasUnicode;hasRequired_hasUnicode=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",l="\\u200d",u=RegExp("["+l+e+i+o+"]");function h(f){return u.test(f)}return _hasUnicode=h,_hasUnicode}var _unicodeSize,hasRequired_unicodeSize;function require_unicodeSize(){if(hasRequired_unicodeSize)return _unicodeSize;hasRequired_unicodeSize=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",l="["+e+"]",u="["+i+"]",h="\\ud83c[\\udffb-\\udfff]",f="(?:"+u+"|"+h+")",d="[^"+e+"]",g="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",b=f+"?",$="["+o+"]?",S="(?:"+m+"(?:"+[d,g,p].join("|")+")"+$+b+")*",R=$+b+S,L="(?:"+[d+u+"?",u,g,p,l].join("|")+")",N=RegExp(h+"(?="+h+")|"+L+R,"g");function F(H){for(var G=N.lastIndex=0;N.test(H);)++G;return G}return _unicodeSize=F,_unicodeSize}var _stringSize,hasRequired_stringSize;function require_stringSize(){if(hasRequired_stringSize)return _stringSize;hasRequired_stringSize=1;var e=require_asciiSize(),t=require_hasUnicode(),r=require_unicodeSize();function n(i){return t(i)?r(i):e(i)}return _stringSize=n,_stringSize}var size_1,hasRequiredSize;function requireSize(){if(hasRequiredSize)return size_1;hasRequiredSize=1;var e=require_baseKeys$1(),t=require_getTag(),r=requireIsArrayLike$1(),n=requireIsString(),i=require_stringSize(),o="[object Map]",l="[object Set]";function u(h){if(h==null)return 0;if(r(h))return n(h)?i(h):h.length;var f=t(h);return f==o||f==l?h.size:e(h).length}return size_1=u,size_1}var transform_1,hasRequiredTransform;function requireTransform(){if(hasRequiredTransform)return transform_1;hasRequiredTransform=1;var e=require_arrayEach$1(),t=require_baseCreate(),r=require_baseForOwn$1(),n=require_baseIteratee(),i=require_getPrototype$1(),o=requireIsArray$1(),l=requireIsBuffer$1(),u=requireIsFunction$1(),h=requireIsObject$1(),f=requireIsTypedArray$1();function d(g,p,m){var b=o(g),$=b||l(g)||f(g);if(p=n(p,4),m==null){var S=g&&g.constructor;$?m=b?new S:[]:h(g)?m=u(S)?t(i(g)):{}:m={}}return($?e:r)(g,function(R,L,N){return p(m,R,L,N)}),m}return transform_1=d,transform_1}var _isFlattenable$1,hasRequired_isFlattenable$1;function require_isFlattenable$1(){if(hasRequired_isFlattenable$1)return _isFlattenable$1;hasRequired_isFlattenable$1=1;var e=require_Symbol$1(),t=requireIsArguments$1(),r=requireIsArray$1(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return _isFlattenable$1=i,_isFlattenable$1}var _baseFlatten$1,hasRequired_baseFlatten$1;function require_baseFlatten$1(){if(hasRequired_baseFlatten$1)return _baseFlatten$1;hasRequired_baseFlatten$1=1;var e=require_arrayPush$1(),t=require_isFlattenable$1();function r(n,i,o,l,u){var h=-1,f=n.length;for(o||(o=t),u||(u=[]);++h<f;){var d=n[h];i>0&&o(d)?i>1?r(d,i-1,o,l,u):e(u,d):l||(u[u.length]=d)}return u}return _baseFlatten$1=r,_baseFlatten$1}var _apply$1,hasRequired_apply$1;function require_apply$1(){if(hasRequired_apply$1)return _apply$1;hasRequired_apply$1=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return _apply$1=e,_apply$1}var _overRest$1,hasRequired_overRest$1;function require_overRest$1(){if(hasRequired_overRest$1)return _overRest$1;hasRequired_overRest$1=1;var e=require_apply$1(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var l=arguments,u=-1,h=t(l.length-i,0),f=Array(h);++u<h;)f[u]=l[i+u];u=-1;for(var d=Array(i+1);++u<i;)d[u]=l[u];return d[i]=o(f),e(n,this,d)}}return _overRest$1=r,_overRest$1}var _baseSetToString$1,hasRequired_baseSetToString$1;function require_baseSetToString$1(){if(hasRequired_baseSetToString$1)return _baseSetToString$1;hasRequired_baseSetToString$1=1;var e=requireConstant$1(),t=require_defineProperty$1(),r=requireIdentity$1(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return _baseSetToString$1=n,_baseSetToString$1}var _shortOut$1,hasRequired_shortOut$1;function require_shortOut$1(){if(hasRequired_shortOut$1)return _shortOut$1;hasRequired_shortOut$1=1;var e=800,t=16,r=Date.now;function n(i){var o=0,l=0;return function(){var u=r(),h=t-(u-l);if(l=u,h>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return _shortOut$1=n,_shortOut$1}var _setToString$1,hasRequired_setToString$1;function require_setToString$1(){if(hasRequired_setToString$1)return _setToString$1;hasRequired_setToString$1=1;var e=require_baseSetToString$1(),t=require_shortOut$1(),r=t(e);return _setToString$1=r,_setToString$1}var _baseRest$1,hasRequired_baseRest$1;function require_baseRest$1(){if(hasRequired_baseRest$1)return _baseRest$1;hasRequired_baseRest$1=1;var e=requireIdentity$1(),t=require_overRest$1(),r=require_setToString$1();function n(i,o){return r(t(i,o,e),i+"")}return _baseRest$1=n,_baseRest$1}var _baseFindIndex,hasRequired_baseFindIndex;function require_baseFindIndex(){if(hasRequired_baseFindIndex)return _baseFindIndex;hasRequired_baseFindIndex=1;function e(t,r,n,i){for(var o=t.length,l=n+(i?1:-1);i?l--:++l<o;)if(r(t[l],l,t))return l;return-1}return _baseFindIndex=e,_baseFindIndex}var _baseIsNaN,hasRequired_baseIsNaN;function require_baseIsNaN(){if(hasRequired_baseIsNaN)return _baseIsNaN;hasRequired_baseIsNaN=1;function e(t){return t!==t}return _baseIsNaN=e,_baseIsNaN}var _strictIndexOf,hasRequired_strictIndexOf;function require_strictIndexOf(){if(hasRequired_strictIndexOf)return _strictIndexOf;hasRequired_strictIndexOf=1;function e(t,r,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===r)return i;return-1}return _strictIndexOf=e,_strictIndexOf}var _baseIndexOf,hasRequired_baseIndexOf;function require_baseIndexOf(){if(hasRequired_baseIndexOf)return _baseIndexOf;hasRequired_baseIndexOf=1;var e=require_baseFindIndex(),t=require_baseIsNaN(),r=require_strictIndexOf();function n(i,o,l){return o===o?r(i,o,l):e(i,t,l)}return _baseIndexOf=n,_baseIndexOf}var _arrayIncludes,hasRequired_arrayIncludes;function require_arrayIncludes(){if(hasRequired_arrayIncludes)return _arrayIncludes;hasRequired_arrayIncludes=1;var e=require_baseIndexOf();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return _arrayIncludes=t,_arrayIncludes}var _arrayIncludesWith,hasRequired_arrayIncludesWith;function require_arrayIncludesWith(){if(hasRequired_arrayIncludesWith)return _arrayIncludesWith;hasRequired_arrayIncludesWith=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(r,t[i]))return!0;return!1}return _arrayIncludesWith=e,_arrayIncludesWith}var noop_1,hasRequiredNoop;function requireNoop(){if(hasRequiredNoop)return noop_1;hasRequiredNoop=1;function e(){}return noop_1=e,noop_1}var _createSet,hasRequired_createSet;function require_createSet(){if(hasRequired_createSet)return _createSet;hasRequired_createSet=1;var e=require_Set(),t=requireNoop(),r=require_setToArray(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return _createSet=i,_createSet}var _baseUniq,hasRequired_baseUniq;function require_baseUniq(){if(hasRequired_baseUniq)return _baseUniq;hasRequired_baseUniq=1;var e=require_SetCache(),t=require_arrayIncludes(),r=require_arrayIncludesWith(),n=require_cacheHas(),i=require_createSet(),o=require_setToArray(),l=200;function u(h,f,d){var g=-1,p=t,m=h.length,b=!0,$=[],S=$;if(d)b=!1,p=r;else if(m>=l){var R=f?null:i(h);if(R)return o(R);b=!1,p=n,S=new e}else S=f?[]:$;e:for(;++g<m;){var L=h[g],N=f?f(L):L;if(L=d||L!==0?L:0,b&&N===N){for(var F=S.length;F--;)if(S[F]===N)continue e;f&&S.push(N),$.push(L)}else p(S,N,d)||(S!==$&&S.push(N),$.push(L))}return $}return _baseUniq=u,_baseUniq}var isArrayLikeObject_1,hasRequiredIsArrayLikeObject;function requireIsArrayLikeObject(){if(hasRequiredIsArrayLikeObject)return isArrayLikeObject_1;hasRequiredIsArrayLikeObject=1;var e=requireIsArrayLike$1(),t=requireIsObjectLike$1();function r(n){return t(n)&&e(n)}return isArrayLikeObject_1=r,isArrayLikeObject_1}var union_1,hasRequiredUnion;function requireUnion(){if(hasRequiredUnion)return union_1;hasRequiredUnion=1;var e=require_baseFlatten$1(),t=require_baseRest$1(),r=require_baseUniq(),n=requireIsArrayLikeObject(),i=t(function(o){return r(e(o,1,n,!0))});return union_1=i,union_1}var _baseValues,hasRequired_baseValues;function require_baseValues(){if(hasRequired_baseValues)return _baseValues;hasRequired_baseValues=1;var e=require_arrayMap$1();function t(r,n){return e(n,function(i){return r[i]})}return _baseValues=t,_baseValues}var values_1,hasRequiredValues;function requireValues(){if(hasRequiredValues)return values_1;hasRequiredValues=1;var e=require_baseValues(),t=requireKeys$1();function r(n){return n==null?[]:e(n,t(n))}return values_1=r,values_1}var lodash$3;if(typeof commonjsRequire$1=="function")try{lodash$3={clone:requireClone(),constant:requireConstant$1(),each:requireEach$1(),filter:requireFilter(),has:requireHas$1(),isArray:requireIsArray$1(),isEmpty:requireIsEmpty(),isFunction:requireIsFunction$1(),isUndefined:requireIsUndefined(),keys:requireKeys$1(),map:requireMap(),reduce:requireReduce(),size:requireSize(),transform:requireTransform(),union:requireUnion(),values:requireValues()}}catch{}lodash$3||(lodash$3=window._);var lodash_1$3=lodash$3,_$C=lodash_1$3,graph=Graph$a,DEFAULT_EDGE_NAME="\0",GRAPH_NODE="\0",EDGE_KEY_DELIM="";function Graph$a(e){this._isDirected=_$C.has(e,"directed")?e.directed:!0,this._isMultigraph=_$C.has(e,"multigraph")?e.multigraph:!1,this._isCompound=_$C.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=_$C.constant(void 0),this._defaultEdgeLabelFn=_$C.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[GRAPH_NODE]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}Graph$a.prototype._nodeCount=0;Graph$a.prototype._edgeCount=0;Graph$a.prototype.isDirected=function(){return this._isDirected};Graph$a.prototype.isMultigraph=function(){return this._isMultigraph};Graph$a.prototype.isCompound=function(){return this._isCompound};Graph$a.prototype.setGraph=function(e){return this._label=e,this};Graph$a.prototype.graph=function(){return this._label};Graph$a.prototype.setDefaultNodeLabel=function(e){return _$C.isFunction(e)||(e=_$C.constant(e)),this._defaultNodeLabelFn=e,this};Graph$a.prototype.nodeCount=function(){return this._nodeCount};Graph$a.prototype.nodes=function(){return _$C.keys(this._nodes)};Graph$a.prototype.sources=function(){var e=this;return _$C.filter(this.nodes(),function(t){return _$C.isEmpty(e._in[t])})};Graph$a.prototype.sinks=function(){var e=this;return _$C.filter(this.nodes(),function(t){return _$C.isEmpty(e._out[t])})};Graph$a.prototype.setNodes=function(e,t){var r=arguments,n=this;return _$C.each(e,function(i){r.length>1?n.setNode(i,t):n.setNode(i)}),this};Graph$a.prototype.setNode=function(e,t){return _$C.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=GRAPH_NODE,this._children[e]={},this._children[GRAPH_NODE][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};Graph$a.prototype.node=function(e){return this._nodes[e]};Graph$a.prototype.hasNode=function(e){return _$C.has(this._nodes,e)};Graph$a.prototype.removeNode=function(e){var t=this;if(_$C.has(this._nodes,e)){var r=function(n){t.removeEdge(t._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],_$C.each(this.children(e),function(n){t.setParent(n)}),delete this._children[e]),_$C.each(_$C.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],_$C.each(_$C.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};Graph$a.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(_$C.isUndefined(t))t=GRAPH_NODE;else{t+="";for(var r=t;!_$C.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this};Graph$a.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};Graph$a.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==GRAPH_NODE)return t}};Graph$a.prototype.children=function(e){if(_$C.isUndefined(e)&&(e=GRAPH_NODE),this._isCompound){var t=this._children[e];if(t)return _$C.keys(t)}else{if(e===GRAPH_NODE)return this.nodes();if(this.hasNode(e))return[]}};Graph$a.prototype.predecessors=function(e){var t=this._preds[e];if(t)return _$C.keys(t)};Graph$a.prototype.successors=function(e){var t=this._sucs[e];if(t)return _$C.keys(t)};Graph$a.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return _$C.union(t,this.successors(e))};Graph$a.prototype.isLeaf=function(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0};Graph$a.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;_$C.each(this._nodes,function(o,l){e(l)&&t.setNode(l,o)}),_$C.each(this._edgeObjs,function(o){t.hasNode(o.v)&&t.hasNode(o.w)&&t.setEdge(o,r.edge(o))});var n={};function i(o){var l=r.parent(o);return l===void 0||t.hasNode(l)?(n[o]=l,l):l in n?n[l]:i(l)}return this._isCompound&&_$C.each(t.nodes(),function(o){t.setParent(o,i(o))}),t};Graph$a.prototype.setDefaultEdgeLabel=function(e){return _$C.isFunction(e)||(e=_$C.constant(e)),this._defaultEdgeLabelFn=e,this};Graph$a.prototype.edgeCount=function(){return this._edgeCount};Graph$a.prototype.edges=function(){return _$C.values(this._edgeObjs)};Graph$a.prototype.setPath=function(e,t){var r=this,n=arguments;return _$C.reduce(e,function(i,o){return n.length>1?r.setEdge(i,o,t):r.setEdge(i,o),o}),this};Graph$a.prototype.setEdge=function(){var e,t,r,n,i=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,t=o.w,r=o.name,arguments.length===2&&(n=arguments[1],i=!0)):(e=o,t=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),e=""+e,t=""+t,_$C.isUndefined(r)||(r=""+r);var l=edgeArgsToId(this._isDirected,e,t,r);if(_$C.has(this._edgeLabels,l))return i&&(this._edgeLabels[l]=n),this;if(!_$C.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=i?n:this._defaultEdgeLabelFn(e,t,r);var u=edgeArgsToObj(this._isDirected,e,t,r);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[l]=u,incrementOrInitEntry(this._preds[t],e),incrementOrInitEntry(this._sucs[e],t),this._in[t][l]=u,this._out[e][l]=u,this._edgeCount++,this};Graph$a.prototype.edge=function(e,t,r){var n=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,e,t,r);return this._edgeLabels[n]};Graph$a.prototype.hasEdge=function(e,t,r){var n=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,e,t,r);return _$C.has(this._edgeLabels,n)};Graph$a.prototype.removeEdge=function(e,t,r){var n=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,e,t,r),i=this._edgeObjs[n];return i&&(e=i.v,t=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],decrementOrRemoveEntry(this._preds[t],e),decrementOrRemoveEntry(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this};Graph$a.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=_$C.values(r);return t?_$C.filter(n,function(i){return i.v===t}):n}};Graph$a.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var n=_$C.values(r);return t?_$C.filter(n,function(i){return i.w===t}):n}};Graph$a.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))};function incrementOrInitEntry(e,t){e[t]?e[t]++:e[t]=1}function decrementOrRemoveEntry(e,t){--e[t]||delete e[t]}function edgeArgsToId(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var l=i;i=o,o=l}return i+EDGE_KEY_DELIM+o+EDGE_KEY_DELIM+(_$C.isUndefined(n)?DEFAULT_EDGE_NAME:n)}function edgeArgsToObj(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var l=i;i=o,o=l}var u={v:i,w:o};return n&&(u.name=n),u}function edgeObjToId(e,t){return edgeArgsToId(e,t.v,t.w,t.name)}var version$5="2.1.8",lib$1={Graph:graph,version:version$5},_$B=lodash_1$3,Graph$9=graph,json$1={write,read};function write(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:writeNodes(e),edges:writeEdges(e)};return _$B.isUndefined(e.graph())||(t.value=_$B.clone(e.graph())),t}function writeNodes(e){return _$B.map(e.nodes(),function(t){var r=e.node(t),n=e.parent(t),i={v:t};return _$B.isUndefined(r)||(i.value=r),_$B.isUndefined(n)||(i.parent=n),i})}function writeEdges(e){return _$B.map(e.edges(),function(t){var r=e.edge(t),n={v:t.v,w:t.w};return _$B.isUndefined(t.name)||(n.name=t.name),_$B.isUndefined(r)||(n.value=r),n})}function read(e){var t=new Graph$9(e.options).setGraph(e.value);return _$B.each(e.nodes,function(r){t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),_$B.each(e.edges,function(r){t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}var _$A=lodash_1$3,components_1=components;function components(e){var t={},r=[],n;function i(o){_$A.has(t,o)||(t[o]=!0,n.push(o),_$A.each(e.successors(o),i),_$A.each(e.predecessors(o),i))}return _$A.each(e.nodes(),function(o){n=[],i(o),n.length&&r.push(n)}),r}var _$z=lodash_1$3,priorityQueue=PriorityQueue$2;function PriorityQueue$2(){this._arr=[],this._keyIndices={}}PriorityQueue$2.prototype.size=function(){return this._arr.length};PriorityQueue$2.prototype.keys=function(){return this._arr.map(function(e){return e.key})};PriorityQueue$2.prototype.has=function(e){return _$z.has(this._keyIndices,e)};PriorityQueue$2.prototype.priority=function(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority};PriorityQueue$2.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};PriorityQueue$2.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!_$z.has(r,e)){var n=this._arr,i=n.length;return r[e]=i,n.push({key:e,priority:t}),this._decrease(i),!0}return!1};PriorityQueue$2.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};PriorityQueue$2.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)};PriorityQueue$2.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))};PriorityQueue$2.prototype._decrease=function(e){for(var t=this._arr,r=t[e].priority,n;e!==0&&(n=e>>1,!(t[n].priority<r));)this._swap(e,n),e=n};PriorityQueue$2.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t};var _$y=lodash_1$3,PriorityQueue$1=priorityQueue,dijkstra_1=dijkstra$1,DEFAULT_WEIGHT_FUNC$1=_$y.constant(1);function dijkstra$1(e,t,r,n){return runDijkstra(e,String(t),r||DEFAULT_WEIGHT_FUNC$1,n||function(i){return e.outEdges(i)})}function runDijkstra(e,t,r,n){var i={},o=new PriorityQueue$1,l,u,h=function(f){var d=f.v!==l?f.v:f.w,g=i[d],p=r(f),m=u.distance+p;if(p<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+f+" Weight: "+p);m<g.distance&&(g.distance=m,g.predecessor=l,o.decrease(d,m))};for(e.nodes().forEach(function(f){var d=f===t?0:Number.POSITIVE_INFINITY;i[f]={distance:d},o.add(f,d)});o.size()>0&&(l=o.removeMin(),u=i[l],u.distance!==Number.POSITIVE_INFINITY);)n(l).forEach(h);return i}var dijkstra=dijkstra_1,_$x=lodash_1$3,dijkstraAll_1=dijkstraAll;function dijkstraAll(e,t,r){return _$x.transform(e.nodes(),function(n,i){n[i]=dijkstra(e,i,t,r)},{})}var _$w=lodash_1$3,tarjan_1=tarjan$1;function tarjan$1(e){var t=0,r=[],n={},i=[];function o(l){var u=n[l]={onStack:!0,lowlink:t,index:t++};if(r.push(l),e.successors(l).forEach(function(d){_$w.has(n,d)?n[d].onStack&&(u.lowlink=Math.min(u.lowlink,n[d].index)):(o(d),u.lowlink=Math.min(u.lowlink,n[d].lowlink))}),u.lowlink===u.index){var h=[],f;do f=r.pop(),n[f].onStack=!1,h.push(f);while(l!==f);i.push(h)}}return e.nodes().forEach(function(l){_$w.has(n,l)||o(l)}),i}var _$v=lodash_1$3,tarjan=tarjan_1,findCycles_1=findCycles;function findCycles(e){return _$v.filter(tarjan(e),function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var _$u=lodash_1$3,floydWarshall_1=floydWarshall,DEFAULT_WEIGHT_FUNC=_$u.constant(1);function floydWarshall(e,t,r){return runFloydWarshall(e,t||DEFAULT_WEIGHT_FUNC,r||function(n){return e.outEdges(n)})}function runFloydWarshall(e,t,r){var n={},i=e.nodes();return i.forEach(function(o){n[o]={},n[o][o]={distance:0},i.forEach(function(l){o!==l&&(n[o][l]={distance:Number.POSITIVE_INFINITY})}),r(o).forEach(function(l){var u=l.v===o?l.w:l.v,h=t(l);n[o][u]={distance:h,predecessor:o}})}),i.forEach(function(o){var l=n[o];i.forEach(function(u){var h=n[u];i.forEach(function(f){var d=h[o],g=l[f],p=h[f],m=d.distance+g.distance;m<p.distance&&(p.distance=m,p.predecessor=g.predecessor)})})}),n}var _$t=lodash_1$3,topsort_1=topsort$1;topsort$1.CycleException=CycleException;function topsort$1(e){var t={},r={},n=[];function i(o){if(_$t.has(r,o))throw new CycleException;_$t.has(t,o)||(r[o]=!0,t[o]=!0,_$t.each(e.predecessors(o),i),delete r[o],n.push(o))}if(_$t.each(e.sinks(),i),_$t.size(t)!==e.nodeCount())throw new CycleException;return n}function CycleException(){}CycleException.prototype=new Error;var topsort=topsort_1,isAcyclic_1=isAcyclic;function isAcyclic(e){try{topsort(e)}catch(t){if(t instanceof topsort.CycleException)return!1;throw t}return!0}var _$s=lodash_1$3,dfs_1=dfs$3;function dfs$3(e,t,r){_$s.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return _$s.each(t,function(l){if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);doDfs(e,l,r==="post",o,n,i)}),i}function doDfs(e,t,r,n,i,o){_$s.has(n,t)||(n[t]=!0,r||o.push(t),_$s.each(i(t),function(l){doDfs(e,l,r,n,i,o)}),r&&o.push(t))}var dfs$2=dfs_1,postorder_1=postorder$2;function postorder$2(e,t){return dfs$2(e,t,"post")}var dfs$1=dfs_1,preorder_1=preorder$1;function preorder$1(e,t){return dfs$1(e,t,"pre")}var _$r=lodash_1$3,Graph$8=graph,PriorityQueue=priorityQueue,prim_1=prim;function prim(e,t){var r=new Graph$8,n={},i=new PriorityQueue,o;function l(h){var f=h.v===o?h.w:h.v,d=i.priority(f);if(d!==void 0){var g=t(h);g<d&&(n[f]=o,i.decrease(f,g))}}if(e.nodeCount()===0)return r;_$r.each(e.nodes(),function(h){i.add(h,Number.POSITIVE_INFINITY),r.setNode(h)}),i.decrease(e.nodes()[0],0);for(var u=!1;i.size()>0;){if(o=i.removeMin(),_$r.has(n,o))r.setEdge(o,n[o]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}e.nodeEdges(o).forEach(l)}return r}var alg={components:components_1,dijkstra:dijkstra_1,dijkstraAll:dijkstraAll_1,findCycles:findCycles_1,floydWarshall:floydWarshall_1,isAcyclic:isAcyclic_1,postorder:postorder_1,preorder:preorder_1,prim:prim_1,tarjan:tarjan_1,topsort:topsort_1},lib=lib$1,graphlib$2={Graph:lib.Graph,json:json$1,alg,version:lib.version},graphlib$1;if(typeof commonjsRequire$1=="function")try{graphlib$1=graphlib$2}catch{}graphlib$1||(graphlib$1=window.graphlib);var graphlib_1$1=graphlib$1,cloneDeep_1,hasRequiredCloneDeep;function requireCloneDeep(){if(hasRequiredCloneDeep)return cloneDeep_1;hasRequiredCloneDeep=1;var e=require_baseClone(),t=1,r=4;function n(i){return e(i,t|r)}return cloneDeep_1=n,cloneDeep_1}var _isIterateeCall$1,hasRequired_isIterateeCall$1;function require_isIterateeCall$1(){if(hasRequired_isIterateeCall$1)return _isIterateeCall$1;hasRequired_isIterateeCall$1=1;var e=requireEq$1(),t=requireIsArrayLike$1(),r=require_isIndex$1(),n=requireIsObject$1();function i(o,l,u){if(!n(u))return!1;var h=typeof l;return(h=="number"?t(u)&&r(l,u.length):h=="string"&&l in u)?e(u[l],o):!1}return _isIterateeCall$1=i,_isIterateeCall$1}var defaults_1$1,hasRequiredDefaults$1;function requireDefaults$1(){if(hasRequiredDefaults$1)return defaults_1$1;hasRequiredDefaults$1=1;var e=require_baseRest$1(),t=requireEq$1(),r=require_isIterateeCall$1(),n=requireKeysIn$1(),i=Object.prototype,o=i.hasOwnProperty,l=e(function(u,h){u=Object(u);var f=-1,d=h.length,g=d>2?h[2]:void 0;for(g&&r(h[0],h[1],g)&&(d=1);++f<d;)for(var p=h[f],m=n(p),b=-1,$=m.length;++b<$;){var S=m[b],R=u[S];(R===void 0||t(R,i[S])&&!o.call(u,S))&&(u[S]=p[S])}return u});return defaults_1$1=l,defaults_1$1}var _createFind,hasRequired_createFind;function require_createFind(){if(hasRequired_createFind)return _createFind;hasRequired_createFind=1;var e=require_baseIteratee(),t=requireIsArrayLike$1(),r=requireKeys$1();function n(i){return function(o,l,u){var h=Object(o);if(!t(o)){var f=e(l,3);o=r(o),l=function(g){return f(h[g],g,h)}}var d=i(o,l,u);return d>-1?h[f?o[d]:d]:void 0}}return _createFind=n,_createFind}var _trimmedEndIndex$1,hasRequired_trimmedEndIndex$1;function require_trimmedEndIndex$1(){if(hasRequired_trimmedEndIndex$1)return _trimmedEndIndex$1;hasRequired_trimmedEndIndex$1=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return _trimmedEndIndex$1=t,_trimmedEndIndex$1}var _baseTrim$1,hasRequired_baseTrim$1;function require_baseTrim$1(){if(hasRequired_baseTrim$1)return _baseTrim$1;hasRequired_baseTrim$1=1;var e=require_trimmedEndIndex$1(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return _baseTrim$1=r,_baseTrim$1}var toNumber_1$1,hasRequiredToNumber$1;function requireToNumber$1(){if(hasRequiredToNumber$1)return toNumber_1$1;hasRequiredToNumber$1=1;var e=require_baseTrim$1(),t=requireIsObject$1(),r=requireIsSymbol$1(),n=0/0,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function h(f){if(typeof f=="number")return f;if(r(f))return n;if(t(f)){var d=typeof f.valueOf=="function"?f.valueOf():f;f=t(d)?d+"":d}if(typeof f!="string")return f===0?f:+f;f=e(f);var g=o.test(f);return g||l.test(f)?u(f.slice(2),g?2:8):i.test(f)?n:+f}return toNumber_1$1=h,toNumber_1$1}var toFinite_1$1,hasRequiredToFinite$1;function requireToFinite$1(){if(hasRequiredToFinite$1)return toFinite_1$1;hasRequiredToFinite$1=1;var e=requireToNumber$1(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return toFinite_1$1=n,toFinite_1$1}var toInteger_1,hasRequiredToInteger;function requireToInteger(){if(hasRequiredToInteger)return toInteger_1;hasRequiredToInteger=1;var e=requireToFinite$1();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return toInteger_1=t,toInteger_1}var findIndex_1,hasRequiredFindIndex;function requireFindIndex(){if(hasRequiredFindIndex)return findIndex_1;hasRequiredFindIndex=1;var e=require_baseFindIndex(),t=require_baseIteratee(),r=requireToInteger(),n=Math.max;function i(o,l,u){var h=o==null?0:o.length;if(!h)return-1;var f=u==null?0:r(u);return f<0&&(f=n(h+f,0)),e(o,t(l,3),f)}return findIndex_1=i,findIndex_1}var find_1,hasRequiredFind;function requireFind(){if(hasRequiredFind)return find_1;hasRequiredFind=1;var e=require_createFind(),t=requireFindIndex(),r=e(t);return find_1=r,find_1}var flatten_1$1,hasRequiredFlatten$1;function requireFlatten$1(){if(hasRequiredFlatten$1)return flatten_1$1;hasRequiredFlatten$1=1;var e=require_baseFlatten$1();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return flatten_1$1=t,flatten_1$1}var forIn_1,hasRequiredForIn;function requireForIn(){if(hasRequiredForIn)return forIn_1;hasRequiredForIn=1;var e=require_baseFor$1(),t=require_castFunction$1(),r=requireKeysIn$1();function n(i,o){return i==null?i:e(i,t(o),r)}return forIn_1=n,forIn_1}var last_1,hasRequiredLast;function requireLast(){if(hasRequiredLast)return last_1;hasRequiredLast=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return last_1=e,last_1}var mapValues_1,hasRequiredMapValues;function requireMapValues(){if(hasRequiredMapValues)return mapValues_1;hasRequiredMapValues=1;var e=require_baseAssignValue$1(),t=require_baseForOwn$1(),r=require_baseIteratee();function n(i,o){var l={};return o=r(o,3),t(i,function(u,h,f){e(l,h,o(u,h,f))}),l}return mapValues_1=n,mapValues_1}var _baseExtremum,hasRequired_baseExtremum;function require_baseExtremum(){if(hasRequired_baseExtremum)return _baseExtremum;hasRequired_baseExtremum=1;var e=requireIsSymbol$1();function t(r,n,i){for(var o=-1,l=r.length;++o<l;){var u=r[o],h=n(u);if(h!=null&&(f===void 0?h===h&&!e(h):i(h,f)))var f=h,d=u}return d}return _baseExtremum=t,_baseExtremum}var _baseGt,hasRequired_baseGt;function require_baseGt(){if(hasRequired_baseGt)return _baseGt;hasRequired_baseGt=1;function e(t,r){return t>r}return _baseGt=e,_baseGt}var max_1,hasRequiredMax;function requireMax(){if(hasRequiredMax)return max_1;hasRequiredMax=1;var e=require_baseExtremum(),t=require_baseGt(),r=requireIdentity$1();function n(i){return i&&i.length?e(i,r,t):void 0}return max_1=n,max_1}var _assignMergeValue,hasRequired_assignMergeValue;function require_assignMergeValue(){if(hasRequired_assignMergeValue)return _assignMergeValue;hasRequired_assignMergeValue=1;var e=require_baseAssignValue$1(),t=requireEq$1();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return _assignMergeValue=r,_assignMergeValue}var isPlainObject_1$1,hasRequiredIsPlainObject$1;function requireIsPlainObject$1(){if(hasRequiredIsPlainObject$1)return isPlainObject_1$1;hasRequiredIsPlainObject$1=1;var e=require_baseGetTag$1(),t=require_getPrototype$1(),r=requireIsObjectLike$1(),n="[object Object]",i=Function.prototype,o=Object.prototype,l=i.toString,u=o.hasOwnProperty,h=l.call(Object);function f(d){if(!r(d)||e(d)!=n)return!1;var g=t(d);if(g===null)return!0;var p=u.call(g,"constructor")&&g.constructor;return typeof p=="function"&&p instanceof p&&l.call(p)==h}return isPlainObject_1$1=f,isPlainObject_1$1}var _safeGet,hasRequired_safeGet;function require_safeGet(){if(hasRequired_safeGet)return _safeGet;hasRequired_safeGet=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return _safeGet=e,_safeGet}var toPlainObject_1,hasRequiredToPlainObject;function requireToPlainObject(){if(hasRequiredToPlainObject)return toPlainObject_1;hasRequiredToPlainObject=1;var e=require_copyObject(),t=requireKeysIn$1();function r(n){return e(n,t(n))}return toPlainObject_1=r,toPlainObject_1}var _baseMergeDeep,hasRequired_baseMergeDeep;function require_baseMergeDeep(){if(hasRequired_baseMergeDeep)return _baseMergeDeep;hasRequired_baseMergeDeep=1;var e=require_assignMergeValue(),t=require_cloneBuffer(),r=require_cloneTypedArray(),n=require_copyArray(),i=require_initCloneObject(),o=requireIsArguments$1(),l=requireIsArray$1(),u=requireIsArrayLikeObject(),h=requireIsBuffer$1(),f=requireIsFunction$1(),d=requireIsObject$1(),g=requireIsPlainObject$1(),p=requireIsTypedArray$1(),m=require_safeGet(),b=requireToPlainObject();function $(S,R,L,N,F,H,G){var P=m(S,L),V=m(R,L),z=G.get(V);if(z){e(S,L,z);return}var W=H?H(P,V,L+"",S,R,G):void 0,T=W===void 0;if(T){var U=l(V),I=!U&&h(V),ae=!U&&!I&&p(V);W=V,U||I||ae?l(P)?W=P:u(P)?W=n(P):I?(T=!1,W=t(V,!0)):ae?(T=!1,W=r(V,!0)):W=[]:g(V)||o(V)?(W=P,o(P)?W=b(P):(!d(P)||f(P))&&(W=i(V))):T=!1}T&&(G.set(V,W),F(W,V,N,H,G),G.delete(V)),e(S,L,W)}return _baseMergeDeep=$,_baseMergeDeep}var _baseMerge,hasRequired_baseMerge;function require_baseMerge(){if(hasRequired_baseMerge)return _baseMerge;hasRequired_baseMerge=1;var e=require_Stack(),t=require_assignMergeValue(),r=require_baseFor$1(),n=require_baseMergeDeep(),i=requireIsObject$1(),o=requireKeysIn$1(),l=require_safeGet();function u(h,f,d,g,p){h!==f&&r(f,function(m,b){if(p||(p=new e),i(m))n(h,f,b,d,u,g,p);else{var $=g?g(l(h,b),m,b+"",h,f,p):void 0;$===void 0&&($=m),t(h,b,$)}},o)}return _baseMerge=u,_baseMerge}var _createAssigner,hasRequired_createAssigner;function require_createAssigner(){if(hasRequired_createAssigner)return _createAssigner;hasRequired_createAssigner=1;var e=require_baseRest$1(),t=require_isIterateeCall$1();function r(n){return e(function(i,o){var l=-1,u=o.length,h=u>1?o[u-1]:void 0,f=u>2?o[2]:void 0;for(h=n.length>3&&typeof h=="function"?(u--,h):void 0,f&&t(o[0],o[1],f)&&(h=u<3?void 0:h,u=1),i=Object(i);++l<u;){var d=o[l];d&&n(i,d,l,h)}return i})}return _createAssigner=r,_createAssigner}var merge_1,hasRequiredMerge;function requireMerge(){if(hasRequiredMerge)return merge_1;hasRequiredMerge=1;var e=require_baseMerge(),t=require_createAssigner(),r=t(function(n,i,o){e(n,i,o)});return merge_1=r,merge_1}var _baseLt,hasRequired_baseLt;function require_baseLt(){if(hasRequired_baseLt)return _baseLt;hasRequired_baseLt=1;function e(t,r){return t<r}return _baseLt=e,_baseLt}var min_1,hasRequiredMin;function requireMin(){if(hasRequiredMin)return min_1;hasRequiredMin=1;var e=require_baseExtremum(),t=require_baseLt(),r=requireIdentity$1();function n(i){return i&&i.length?e(i,r,t):void 0}return min_1=n,min_1}var minBy_1,hasRequiredMinBy;function requireMinBy(){if(hasRequiredMinBy)return minBy_1;hasRequiredMinBy=1;var e=require_baseExtremum(),t=require_baseIteratee(),r=require_baseLt();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return minBy_1=n,minBy_1}var now_1,hasRequiredNow;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root$1(),t=function(){return e.Date.now()};return now_1=t,now_1}var _baseSet$1,hasRequired_baseSet$1;function require_baseSet$1(){if(hasRequired_baseSet$1)return _baseSet$1;hasRequired_baseSet$1=1;var e=require_assignValue$1(),t=require_castPath$1(),r=require_isIndex$1(),n=requireIsObject$1(),i=require_toKey$1();function o(l,u,h,f){if(!n(l))return l;u=t(u,l);for(var d=-1,g=u.length,p=g-1,m=l;m!=null&&++d<g;){var b=i(u[d]),$=h;if(b==="__proto__"||b==="constructor"||b==="prototype")return l;if(d!=p){var S=m[b];$=f?f(S,b,m):void 0,$===void 0&&($=n(S)?S:r(u[d+1])?[]:{})}e(m,b,$),m=m[b]}return l}return _baseSet$1=o,_baseSet$1}var _basePickBy$1,hasRequired_basePickBy$1;function require_basePickBy$1(){if(hasRequired_basePickBy$1)return _basePickBy$1;hasRequired_basePickBy$1=1;var e=require_baseGet$1(),t=require_baseSet$1(),r=require_castPath$1();function n(i,o,l){for(var u=-1,h=o.length,f={};++u<h;){var d=o[u],g=e(i,d);l(g,d)&&t(f,r(d,i),g)}return f}return _basePickBy$1=n,_basePickBy$1}var _basePick$1,hasRequired_basePick$1;function require_basePick$1(){if(hasRequired_basePick$1)return _basePick$1;hasRequired_basePick$1=1;var e=require_basePickBy$1(),t=requireHasIn$1();function r(n,i){return e(n,i,function(o,l){return t(n,l)})}return _basePick$1=r,_basePick$1}var _flatRest$1,hasRequired_flatRest$1;function require_flatRest$1(){if(hasRequired_flatRest$1)return _flatRest$1;hasRequired_flatRest$1=1;var e=requireFlatten$1(),t=require_overRest$1(),r=require_setToString$1();function n(i){return r(t(i,void 0,e),i+"")}return _flatRest$1=n,_flatRest$1}var pick_1$1,hasRequiredPick$1;function requirePick$1(){if(hasRequiredPick$1)return pick_1$1;hasRequiredPick$1=1;var e=require_basePick$1(),t=require_flatRest$1(),r=t(function(n,i){return n==null?{}:e(n,i)});return pick_1$1=r,pick_1$1}var _baseRange$1,hasRequired_baseRange$1;function require_baseRange$1(){if(hasRequired_baseRange$1)return _baseRange$1;hasRequired_baseRange$1=1;var e=Math.ceil,t=Math.max;function r(n,i,o,l){for(var u=-1,h=t(e((i-n)/(o||1)),0),f=Array(h);h--;)f[l?h:++u]=n,n+=o;return f}return _baseRange$1=r,_baseRange$1}var _createRange$1,hasRequired_createRange$1;function require_createRange$1(){if(hasRequired_createRange$1)return _createRange$1;hasRequired_createRange$1=1;var e=require_baseRange$1(),t=require_isIterateeCall$1(),r=requireToFinite$1();function n(i){return function(o,l,u){return u&&typeof u!="number"&&t(o,l,u)&&(l=u=void 0),o=r(o),l===void 0?(l=o,o=0):l=r(l),u=u===void 0?o<l?1:-1:r(u),e(o,l,u,i)}}return _createRange$1=n,_createRange$1}var range_1$1,hasRequiredRange$1;function requireRange$1(){if(hasRequiredRange$1)return range_1$1;hasRequiredRange$1=1;var e=require_createRange$1(),t=e();return range_1$1=t,range_1$1}var _baseSortBy,hasRequired_baseSortBy;function require_baseSortBy(){if(hasRequired_baseSortBy)return _baseSortBy;hasRequired_baseSortBy=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return _baseSortBy=e,_baseSortBy}var _compareAscending,hasRequired_compareAscending;function require_compareAscending(){if(hasRequired_compareAscending)return _compareAscending;hasRequired_compareAscending=1;var e=requireIsSymbol$1();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,l=r===r,u=e(r),h=n!==void 0,f=n===null,d=n===n,g=e(n);if(!f&&!g&&!u&&r>n||u&&h&&d&&!f&&!g||o&&h&&d||!i&&d||!l)return 1;if(!o&&!u&&!g&&r<n||g&&i&&l&&!o&&!u||f&&i&&l||!h&&l||!d)return-1}return 0}return _compareAscending=t,_compareAscending}var _compareMultiple,hasRequired_compareMultiple;function require_compareMultiple(){if(hasRequired_compareMultiple)return _compareMultiple;hasRequired_compareMultiple=1;var e=require_compareAscending();function t(r,n,i){for(var o=-1,l=r.criteria,u=n.criteria,h=l.length,f=i.length;++o<h;){var d=e(l[o],u[o]);if(d){if(o>=f)return d;var g=i[o];return d*(g=="desc"?-1:1)}}return r.index-n.index}return _compareMultiple=t,_compareMultiple}var _baseOrderBy,hasRequired_baseOrderBy;function require_baseOrderBy(){if(hasRequired_baseOrderBy)return _baseOrderBy;hasRequired_baseOrderBy=1;var e=require_arrayMap$1(),t=require_baseGet$1(),r=require_baseIteratee(),n=require_baseMap(),i=require_baseSortBy(),o=require_baseUnary$1(),l=require_compareMultiple(),u=requireIdentity$1(),h=requireIsArray$1();function f(d,g,p){g.length?g=e(g,function($){return h($)?function(S){return t(S,$.length===1?$[0]:$)}:$}):g=[u];var m=-1;g=e(g,o(r));var b=n(d,function($,S,R){var L=e(g,function(N){return N($)});return{criteria:L,index:++m,value:$}});return i(b,function($,S){return l($,S,p)})}return _baseOrderBy=f,_baseOrderBy}var sortBy_1,hasRequiredSortBy;function requireSortBy(){if(hasRequiredSortBy)return sortBy_1;hasRequiredSortBy=1;var e=require_baseFlatten$1(),t=require_baseOrderBy(),r=require_baseRest$1(),n=require_isIterateeCall$1(),i=r(function(o,l){if(o==null)return[];var u=l.length;return u>1&&n(o,l[0],l[1])?l=[]:u>2&&n(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return sortBy_1=i,sortBy_1}var uniqueId_1$1,hasRequiredUniqueId$1;function requireUniqueId$1(){if(hasRequiredUniqueId$1)return uniqueId_1$1;hasRequiredUniqueId$1=1;var e=requireToString$1(),t=0;function r(n){var i=++t;return e(n)+i}return uniqueId_1$1=r,uniqueId_1$1}var _baseZipObject,hasRequired_baseZipObject;function require_baseZipObject(){if(hasRequired_baseZipObject)return _baseZipObject;hasRequired_baseZipObject=1;function e(t,r,n){for(var i=-1,o=t.length,l=r.length,u={};++i<o;){var h=i<l?r[i]:void 0;n(u,t[i],h)}return u}return _baseZipObject=e,_baseZipObject}var zipObject_1,hasRequiredZipObject;function requireZipObject(){if(hasRequiredZipObject)return zipObject_1;hasRequiredZipObject=1;var e=require_assignValue$1(),t=require_baseZipObject();function r(n,i){return t(n||[],i||[],e)}return zipObject_1=r,zipObject_1}var lodash$2;if(typeof commonjsRequire$1=="function")try{lodash$2={cloneDeep:requireCloneDeep(),constant:requireConstant$1(),defaults:requireDefaults$1(),each:requireEach$1(),filter:requireFilter(),find:requireFind(),flatten:requireFlatten$1(),forEach:requireForEach$1(),forIn:requireForIn(),has:requireHas$1(),isUndefined:requireIsUndefined(),last:requireLast(),map:requireMap(),mapValues:requireMapValues(),max:requireMax(),merge:requireMerge(),min:requireMin(),minBy:requireMinBy(),now:requireNow(),pick:requirePick$1(),range:requireRange$1(),reduce:requireReduce(),sortBy:requireSortBy(),uniqueId:requireUniqueId$1(),values:requireValues(),zipObject:requireZipObject()}}catch{}lodash$2||(lodash$2=window._);var lodash_1$2=lodash$2,list=List$1;function List$1(){var e={};e._next=e._prev=e,this._sentinel=e}List$1.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return unlink(t),t};List$1.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&unlink(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};List$1.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,filterOutLinks)),r=r._prev;return"["+e.join(", ")+"]"};function unlink(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function filterOutLinks(e,t){if(e!=="_next"&&e!=="_prev")return t}var _$q=lodash_1$2,Graph$7=graphlib_1$1.Graph,List=list,greedyFas=greedyFAS$1,DEFAULT_WEIGHT_FN=_$q.constant(1);function greedyFAS$1(e,t){if(e.nodeCount()<=1)return[];var r=buildState(e,t||DEFAULT_WEIGHT_FN),n=doGreedyFAS(r.graph,r.buckets,r.zeroIdx);return _$q.flatten(_$q.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function doGreedyFAS(e,t,r){for(var n=[],i=t[t.length-1],o=t[0],l;e.nodeCount();){for(;l=o.dequeue();)removeNode(e,t,r,l);for(;l=i.dequeue();)removeNode(e,t,r,l);if(e.nodeCount()){for(var u=t.length-2;u>0;--u)if(l=t[u].dequeue(),l){n=n.concat(removeNode(e,t,r,l,!0));break}}}return n}function removeNode(e,t,r,n,i){var o=i?[]:void 0;return _$q.forEach(e.inEdges(n.v),function(l){var u=e.edge(l),h=e.node(l.v);i&&o.push({v:l.v,w:l.w}),h.out-=u,assignBucket(t,r,h)}),_$q.forEach(e.outEdges(n.v),function(l){var u=e.edge(l),h=l.w,f=e.node(h);f.in-=u,assignBucket(t,r,f)}),e.removeNode(n.v),o}function buildState(e,t){var r=new Graph$7,n=0,i=0;_$q.forEach(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),_$q.forEach(e.edges(),function(u){var h=r.edge(u.v,u.w)||0,f=t(u),d=h+f;r.setEdge(u.v,u.w,d),i=Math.max(i,r.node(u.v).out+=f),n=Math.max(n,r.node(u.w).in+=f)});var o=_$q.range(i+n+3).map(function(){return new List}),l=n+1;return _$q.forEach(r.nodes(),function(u){assignBucket(o,l,r.node(u))}),{graph:r,buckets:o,zeroIdx:l}}function assignBucket(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var _$p=lodash_1$2,greedyFAS=greedyFas,acyclic$1={run:run$2,undo:undo$2};function run$2(e){var t=e.graph().acyclicer==="greedy"?greedyFAS(e,r(e)):dfsFAS(e);_$p.forEach(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,_$p.uniqueId("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function dfsFAS(e){var t=[],r={},n={};function i(o){_$p.has(n,o)||(n[o]=!0,r[o]=!0,_$p.forEach(e.outEdges(o),function(l){_$p.has(r,l.w)?t.push(l):i(l.w)}),delete r[o])}return _$p.forEach(e.nodes(),i),t}function undo$2(e){_$p.forEach(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var _$o=lodash_1$2,Graph$6=graphlib_1$1.Graph,util$d={addDummyNode,simplify:simplify$1,asNonCompoundGraph,successorWeights,predecessorWeights,intersectRect:intersectRect$2,buildLayerMatrix,normalizeRanks:normalizeRanks$1,removeEmptyRanks:removeEmptyRanks$1,addBorderNode:addBorderNode$1,maxRank,partition:partition$1,time:time$1,notime};function addDummyNode(e,t,r,n){var i;do i=_$o.uniqueId(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function simplify$1(e){var t=new Graph$6().setGraph(e.graph());return _$o.forEach(e.nodes(),function(r){t.setNode(r,e.node(r))}),_$o.forEach(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function asNonCompoundGraph(e){var t=new Graph$6({multigraph:e.isMultigraph()}).setGraph(e.graph());return _$o.forEach(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),_$o.forEach(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function successorWeights(e){var t=_$o.map(e.nodes(),function(r){var n={};return _$o.forEach(e.outEdges(r),function(i){n[i.w]=(n[i.w]||0)+e.edge(i).weight}),n});return _$o.zipObject(e.nodes(),t)}function predecessorWeights(e){var t=_$o.map(e.nodes(),function(r){var n={};return _$o.forEach(e.inEdges(r),function(i){n[i.v]=(n[i.v]||0)+e.edge(i).weight}),n});return _$o.zipObject(e.nodes(),t)}function intersectRect$2(e,t){var r=e.x,n=e.y,i=t.x-r,o=t.y-n,l=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var h,f;return Math.abs(o)*l>Math.abs(i)*u?(o<0&&(u=-u),h=u*i/o,f=u):(i<0&&(l=-l),h=l,f=l*o/i),{x:r+h,y:n+f}}function buildLayerMatrix(e){var t=_$o.map(_$o.range(maxRank(e)+1),function(){return[]});return _$o.forEach(e.nodes(),function(r){var n=e.node(r),i=n.rank;_$o.isUndefined(i)||(t[i][n.order]=r)}),t}function normalizeRanks$1(e){var t=_$o.min(_$o.map(e.nodes(),function(r){return e.node(r).rank}));_$o.forEach(e.nodes(),function(r){var n=e.node(r);_$o.has(n,"rank")&&(n.rank-=t)})}function removeEmptyRanks$1(e){var t=_$o.min(_$o.map(e.nodes(),function(o){return e.node(o).rank})),r=[];_$o.forEach(e.nodes(),function(o){var l=e.node(o).rank-t;r[l]||(r[l]=[]),r[l].push(o)});var n=0,i=e.graph().nodeRankFactor;_$o.forEach(r,function(o,l){_$o.isUndefined(o)&&l%i!==0?--n:n&&_$o.forEach(o,function(u){e.node(u).rank+=n})})}function addBorderNode$1(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),addDummyNode(e,"border",i,t)}function maxRank(e){return _$o.max(_$o.map(e.nodes(),function(t){var r=e.node(t).rank;if(!_$o.isUndefined(r))return r}))}function partition$1(e,t){var r={lhs:[],rhs:[]};return _$o.forEach(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function time$1(e,t){var r=_$o.now();try{return t()}finally{console.log(e+" time: "+(_$o.now()-r)+"ms")}}function notime(e,t){return t()}var _$n=lodash_1$2,util$c=util$d,normalize$2={run:run$1,undo:undo$1};function run$1(e){e.graph().dummyChains=[],_$n.forEach(e.edges(),function(t){normalizeEdge(e,t)})}function normalizeEdge(e,t){var r=t.v,n=e.node(r).rank,i=t.w,o=e.node(i).rank,l=t.name,u=e.edge(t),h=u.labelRank;if(o!==n+1){e.removeEdge(t);var f,d,g;for(g=0,++n;n<o;++g,++n)u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:t,rank:n},f=util$c.addDummyNode(e,"edge",d,"_d"),n===h&&(d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos),e.setEdge(r,f,{weight:u.weight},l),g===0&&e.graph().dummyChains.push(f),r=f;e.setEdge(r,i,{weight:u.weight},l)}}function undo$1(e){_$n.forEach(e.graph().dummyChains,function(t){var r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t)})}var _$m=lodash_1$2,util$b={longestPath:longestPath$1,slack:slack$2};function longestPath$1(e){var t={};function r(n){var i=e.node(n);if(_$m.has(t,n))return i.rank;t[n]=!0;var o=_$m.min(_$m.map(e.outEdges(n),function(l){return r(l.w)-e.edge(l).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}_$m.forEach(e.sources(),r)}function slack$2(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var _$l=lodash_1$2,Graph$5=graphlib_1$1.Graph,slack$1=util$b.slack,feasibleTree_1=feasibleTree$2;function feasibleTree$2(e){var t=new Graph$5({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,o;tightTree(t,e)<n;)i=findMinSlackEdge(t,e),o=t.hasNode(i.v)?slack$1(e,i):-slack$1(e,i),shiftRanks(t,e,o);return t}function tightTree(e,t){function r(n){_$l.forEach(t.nodeEdges(n),function(i){var o=i.v,l=n===o?i.w:o;!e.hasNode(l)&&!slack$1(t,i)&&(e.setNode(l,{}),e.setEdge(n,l,{}),r(l))})}return _$l.forEach(e.nodes(),r),e.nodeCount()}function findMinSlackEdge(e,t){return _$l.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return slack$1(t,r)})}function shiftRanks(e,t,r){_$l.forEach(e.nodes(),function(n){t.node(n).rank+=r})}var _$k=lodash_1$2,feasibleTree$1=feasibleTree_1,slack=util$b.slack,initRank=util$b.longestPath,preorder=graphlib_1$1.alg.preorder,postorder$1=graphlib_1$1.alg.postorder,simplify=util$d.simplify,networkSimplex_1=networkSimplex$1;networkSimplex$1.initLowLimValues=initLowLimValues;networkSimplex$1.initCutValues=initCutValues;networkSimplex$1.calcCutValue=calcCutValue;networkSimplex$1.leaveEdge=leaveEdge;networkSimplex$1.enterEdge=enterEdge;networkSimplex$1.exchangeEdges=exchangeEdges;function networkSimplex$1(e){e=simplify(e),initRank(e);var t=feasibleTree$1(e);initLowLimValues(t),initCutValues(t,e);for(var r,n;r=leaveEdge(t);)n=enterEdge(t,e,r),exchangeEdges(t,e,r,n)}function initCutValues(e,t){var r=postorder$1(e,e.nodes());r=r.slice(0,r.length-1),_$k.forEach(r,function(n){assignCutValue(e,t,n)})}function assignCutValue(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=calcCutValue(e,t,r)}function calcCutValue(e,t,r){var n=e.node(r),i=n.parent,o=!0,l=t.edge(r,i),u=0;return l||(o=!1,l=t.edge(i,r)),u=l.weight,_$k.forEach(t.nodeEdges(r),function(h){var f=h.v===r,d=f?h.w:h.v;if(d!==i){var g=f===o,p=t.edge(h).weight;if(u+=g?p:-p,isTreeEdge(e,r,d)){var m=e.edge(r,d).cutvalue;u+=g?-m:m}}}),u}function initLowLimValues(e,t){arguments.length<2&&(t=e.nodes()[0]),dfsAssignLowLim(e,{},1,t)}function dfsAssignLowLim(e,t,r,n,i){var o=r,l=e.node(n);return t[n]=!0,_$k.forEach(e.neighbors(n),function(u){_$k.has(t,u)||(r=dfsAssignLowLim(e,t,r,u,n))}),l.low=o,l.lim=r++,i?l.parent=i:delete l.parent,r}function leaveEdge(e){return _$k.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function enterEdge(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var o=e.node(n),l=e.node(i),u=o,h=!1;o.lim>l.lim&&(u=l,h=!0);var f=_$k.filter(t.edges(),function(d){return h===isDescendant(e,e.node(d.v),u)&&h!==isDescendant(e,e.node(d.w),u)});return _$k.minBy(f,function(d){return slack(t,d)})}function exchangeEdges(e,t,r,n){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),initLowLimValues(e),initCutValues(e,t),updateRanks(e,t)}function updateRanks(e,t){var r=_$k.find(e.nodes(),function(i){return!t.node(i).parent}),n=preorder(e,r);n=n.slice(1),_$k.forEach(n,function(i){var o=e.node(i).parent,l=t.edge(i,o),u=!1;l||(l=t.edge(o,i),u=!0),t.node(i).rank=t.node(o).rank+(u?l.minlen:-l.minlen)})}function isTreeEdge(e,t,r){return e.hasEdge(t,r)}function isDescendant(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var rankUtil=util$b,longestPath=rankUtil.longestPath,feasibleTree=feasibleTree_1,networkSimplex=networkSimplex_1,rank_1=rank$1;function rank$1(e){switch(e.graph().ranker){case"network-simplex":networkSimplexRanker(e);break;case"tight-tree":tightTreeRanker(e);break;case"longest-path":longestPathRanker(e);break;default:networkSimplexRanker(e)}}var longestPathRanker=longestPath;function tightTreeRanker(e){longestPath(e),feasibleTree(e)}function networkSimplexRanker(e){networkSimplex(e)}var _$j=lodash_1$2,parentDummyChains_1=parentDummyChains$1;function parentDummyChains$1(e){var t=postorder(e);_$j.forEach(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,o=findPath(e,t,i.v,i.w),l=o.path,u=o.lca,h=0,f=l[h],d=!0;r!==i.w;){if(n=e.node(r),d){for(;(f=l[h])!==u&&e.node(f).maxRank<n.rank;)h++;f===u&&(d=!1)}if(!d){for(;h<l.length-1&&e.node(f=l[h+1]).minRank<=n.rank;)h++;f=l[h]}e.setParent(r,f),r=e.successors(r)[0]}})}function findPath(e,t,r,n){var i=[],o=[],l=Math.min(t[r].low,t[n].low),u=Math.max(t[r].lim,t[n].lim),h,f;h=r;do h=e.parent(h),i.push(h);while(h&&(t[h].low>l||u>t[h].lim));for(f=h,h=n;(h=e.parent(h))!==f;)o.push(h);return{path:i.concat(o.reverse()),lca:f}}function postorder(e){var t={},r=0;function n(i){var o=r;_$j.forEach(e.children(i),n),t[i]={low:o,lim:r++}}return _$j.forEach(e.children(),n),t}var _$i=lodash_1$2,util$a=util$d,nestingGraph$1={run,cleanup};function run(e){var t=util$a.addDummyNode(e,"root",{},"_root"),r=treeDepths(e),n=_$i.max(_$i.values(r))-1,i=2*n+1;e.graph().nestingRoot=t,_$i.forEach(e.edges(),function(l){e.edge(l).minlen*=i});var o=sumWeights(e)+1;_$i.forEach(e.children(),function(l){dfs(e,t,i,o,n,r,l)}),e.graph().nodeRankFactor=i}function dfs(e,t,r,n,i,o,l){var u=e.children(l);if(!u.length){l!==t&&e.setEdge(t,l,{weight:0,minlen:r});return}var h=util$a.addBorderNode(e,"_bt"),f=util$a.addBorderNode(e,"_bb"),d=e.node(l);e.setParent(h,l),d.borderTop=h,e.setParent(f,l),d.borderBottom=f,_$i.forEach(u,function(g){dfs(e,t,r,n,i,o,g);var p=e.node(g),m=p.borderTop?p.borderTop:g,b=p.borderBottom?p.borderBottom:g,$=p.borderTop?n:2*n,S=m!==b?1:i-o[l]+1;e.setEdge(h,m,{weight:$,minlen:S,nestingEdge:!0}),e.setEdge(b,f,{weight:$,minlen:S,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,h,{weight:0,minlen:i+o[l]})}function treeDepths(e){var t={};function r(n,i){var o=e.children(n);o&&o.length&&_$i.forEach(o,function(l){r(l,i+1)}),t[n]=i}return _$i.forEach(e.children(),function(n){r(n,1)}),t}function sumWeights(e){return _$i.reduce(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function cleanup(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,_$i.forEach(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var _$h=lodash_1$2,util$9=util$d,addBorderSegments_1=addBorderSegments$1;function addBorderSegments$1(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&_$h.forEach(n,t),_$h.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,l=i.maxRank+1;o<l;++o)addBorderNode(e,"borderLeft","_bl",r,i,o),addBorderNode(e,"borderRight","_br",r,i,o)}}_$h.forEach(e.children(),t)}function addBorderNode(e,t,r,n,i,o){var l={width:0,height:0,rank:o,borderType:t},u=i[t][o-1],h=util$9.addDummyNode(e,"border",l,r);i[t][o]=h,e.setParent(h,n),u&&e.setEdge(u,h,{weight:1})}var _$g=lodash_1$2,coordinateSystem$1={adjust,undo};function adjust(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&swapWidthHeight(e)}function undo(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&reverseY(e),(t==="lr"||t==="rl")&&(swapXY(e),swapWidthHeight(e))}function swapWidthHeight(e){_$g.forEach(e.nodes(),function(t){swapWidthHeightOne(e.node(t))}),_$g.forEach(e.edges(),function(t){swapWidthHeightOne(e.edge(t))})}function swapWidthHeightOne(e){var t=e.width;e.width=e.height,e.height=t}function reverseY(e){_$g.forEach(e.nodes(),function(t){reverseYOne(e.node(t))}),_$g.forEach(e.edges(),function(t){var r=e.edge(t);_$g.forEach(r.points,reverseYOne),_$g.has(r,"y")&&reverseYOne(r)})}function reverseYOne(e){e.y=-e.y}function swapXY(e){_$g.forEach(e.nodes(),function(t){swapXYOne(e.node(t))}),_$g.forEach(e.edges(),function(t){var r=e.edge(t);_$g.forEach(r.points,swapXYOne),_$g.has(r,"x")&&swapXYOne(r)})}function swapXYOne(e){var t=e.x;e.x=e.y,e.y=t}var _$f=lodash_1$2,initOrder_1=initOrder$1;function initOrder$1(e){var t={},r=_$f.filter(e.nodes(),function(u){return!e.children(u).length}),n=_$f.max(_$f.map(r,function(u){return e.node(u).rank})),i=_$f.map(_$f.range(n+1),function(){return[]});function o(u){if(!_$f.has(t,u)){t[u]=!0;var h=e.node(u);i[h.rank].push(u),_$f.forEach(e.successors(u),o)}}var l=_$f.sortBy(r,function(u){return e.node(u).rank});return _$f.forEach(l,o),i}var _$e=lodash_1$2,crossCount_1=crossCount$1;function crossCount$1(e,t){for(var r=0,n=1;n<t.length;++n)r+=twoLayerCrossCount(e,t[n-1],t[n]);return r}function twoLayerCrossCount(e,t,r){for(var n=_$e.zipObject(r,_$e.map(r,function(f,d){return d})),i=_$e.flatten(_$e.map(t,function(f){return _$e.sortBy(_$e.map(e.outEdges(f),function(d){return{pos:n[d.w],weight:e.edge(d).weight}}),"pos")}),!0),o=1;o<r.length;)o<<=1;var l=2*o-1;o-=1;var u=_$e.map(new Array(l),function(){return 0}),h=0;return _$e.forEach(i.forEach(function(f){var d=f.pos+o;u[d]+=f.weight;for(var g=0;d>0;)d%2&&(g+=u[d+1]),d=d-1>>1,u[d]+=f.weight;h+=f.weight*g})),h}var _$d=lodash_1$2,barycenter_1=barycenter$1;function barycenter$1(e,t){return _$d.map(t,function(r){var n=e.inEdges(r);if(n.length){var i=_$d.reduce(n,function(o,l){var u=e.edge(l),h=e.node(l.v);return{sum:o.sum+u.weight*h.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var _$c=lodash_1$2,resolveConflicts_1=resolveConflicts$1;function resolveConflicts$1(e,t){var r={};_$c.forEach(e,function(i,o){var l=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};_$c.isUndefined(i.barycenter)||(l.barycenter=i.barycenter,l.weight=i.weight)}),_$c.forEach(t.edges(),function(i){var o=r[i.v],l=r[i.w];!_$c.isUndefined(o)&&!_$c.isUndefined(l)&&(l.indegree++,o.out.push(r[i.w]))});var n=_$c.filter(r,function(i){return!i.indegree});return doResolveConflicts(n)}function doResolveConflicts(e){var t=[];function r(o){return function(l){l.merged||(_$c.isUndefined(l.barycenter)||_$c.isUndefined(o.barycenter)||l.barycenter>=o.barycenter)&&mergeEntries(o,l)}}function n(o){return function(l){l.in.push(o),--l.indegree===0&&e.push(l)}}for(;e.length;){var i=e.pop();t.push(i),_$c.forEach(i.in.reverse(),r(i)),_$c.forEach(i.out,n(i))}return _$c.map(_$c.filter(t,function(o){return!o.merged}),function(o){return _$c.pick(o,["vs","i","barycenter","weight"])})}function mergeEntries(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var _$b=lodash_1$2,util$8=util$d,sort_1=sort$1;function sort$1(e,t){var r=util$8.partition(e,function(d){return _$b.has(d,"barycenter")}),n=r.lhs,i=_$b.sortBy(r.rhs,function(d){return-d.i}),o=[],l=0,u=0,h=0;n.sort(compareWithBias(!!t)),h=consumeUnsortable(o,i,h),_$b.forEach(n,function(d){h+=d.vs.length,o.push(d.vs),l+=d.barycenter*d.weight,u+=d.weight,h=consumeUnsortable(o,i,h)});var f={vs:_$b.flatten(o,!0)};return u&&(f.barycenter=l/u,f.weight=u),f}function consumeUnsortable(e,t,r){for(var n;t.length&&(n=_$b.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function compareWithBias(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}var _$a=lodash_1$2,barycenter=barycenter_1,resolveConflicts=resolveConflicts_1,sort=sort_1,sortSubgraph_1=sortSubgraph$1;function sortSubgraph$1(e,t,r,n){var i=e.children(t),o=e.node(t),l=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,h={};l&&(i=_$a.filter(i,function(b){return b!==l&&b!==u}));var f=barycenter(e,i);_$a.forEach(f,function(b){if(e.children(b.v).length){var $=sortSubgraph$1(e,b.v,r,n);h[b.v]=$,_$a.has($,"barycenter")&&mergeBarycenters(b,$)}});var d=resolveConflicts(f,r);expandSubgraphs(d,h);var g=sort(d,n);if(l&&(g.vs=_$a.flatten([l,g.vs,u],!0),e.predecessors(l).length)){var p=e.node(e.predecessors(l)[0]),m=e.node(e.predecessors(u)[0]);_$a.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+p.order+m.order)/(g.weight+2),g.weight+=2}return g}function expandSubgraphs(e,t){_$a.forEach(e,function(r){r.vs=_$a.flatten(r.vs.map(function(n){return t[n]?t[n].vs:n}),!0)})}function mergeBarycenters(e,t){_$a.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var _$9=lodash_1$2,Graph$4=graphlib_1$1.Graph,buildLayerGraph_1=buildLayerGraph$1;function buildLayerGraph$1(e,t,r){var n=createRootNode(e),i=new Graph$4({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(o){return e.node(o)});return _$9.forEach(e.nodes(),function(o){var l=e.node(o),u=e.parent(o);(l.rank===t||l.minRank<=t&&t<=l.maxRank)&&(i.setNode(o),i.setParent(o,u||n),_$9.forEach(e[r](o),function(h){var f=h.v===o?h.w:h.v,d=i.edge(f,o),g=_$9.isUndefined(d)?0:d.weight;i.setEdge(f,o,{weight:e.edge(h).weight+g})}),_$9.has(l,"minRank")&&i.setNode(o,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),i}function createRootNode(e){for(var t;e.hasNode(t=_$9.uniqueId("_root")););return t}var _$8=lodash_1$2,addSubgraphConstraints_1=addSubgraphConstraints$1;function addSubgraphConstraints$1(e,t,r){var n={},i;_$8.forEach(r,function(o){for(var l=e.parent(o),u,h;l;){if(u=e.parent(l),u?(h=n[u],n[u]=l):(h=i,i=l),h&&h!==l){t.setEdge(h,l);return}l=u}})}var _$7=lodash_1$2,initOrder=initOrder_1,crossCount=crossCount_1,sortSubgraph=sortSubgraph_1,buildLayerGraph=buildLayerGraph_1,addSubgraphConstraints=addSubgraphConstraints_1,Graph$3=graphlib_1$1.Graph,util$7=util$d,order_1=order$1;function order$1(e){var t=util$7.maxRank(e),r=buildLayerGraphs(e,_$7.range(1,t+1),"inEdges"),n=buildLayerGraphs(e,_$7.range(t-1,-1,-1),"outEdges"),i=initOrder(e);assignOrder(e,i);for(var o=Number.POSITIVE_INFINITY,l,u=0,h=0;h<4;++u,++h){sweepLayerGraphs(u%2?r:n,u%4>=2),i=util$7.buildLayerMatrix(e);var f=crossCount(e,i);f<o&&(h=0,l=_$7.cloneDeep(i),o=f)}assignOrder(e,l)}function buildLayerGraphs(e,t,r){return _$7.map(t,function(n){return buildLayerGraph(e,n,r)})}function sweepLayerGraphs(e,t){var r=new Graph$3;_$7.forEach(e,function(n){var i=n.graph().root,o=sortSubgraph(n,i,r,t);_$7.forEach(o.vs,function(l,u){n.node(l).order=u}),addSubgraphConstraints(n,r,o.vs)})}function assignOrder(e,t){_$7.forEach(t,function(r){_$7.forEach(r,function(n,i){e.node(n).order=i})})}var _$6=lodash_1$2,Graph$2=graphlib_1$1.Graph,util$6=util$d,bk={positionX:positionX$1,findType1Conflicts,findType2Conflicts,addConflict,hasConflict,verticalAlignment,horizontalCompaction,alignCoordinates,findSmallestWidthAlignment,balance};function findType1Conflicts(e,t){var r={};function n(i,o){var l=0,u=0,h=i.length,f=_$6.last(o);return _$6.forEach(o,function(d,g){var p=findOtherInnerSegmentNode(e,d),m=p?e.node(p).order:h;(p||d===f)&&(_$6.forEach(o.slice(u,g+1),function(b){_$6.forEach(e.predecessors(b),function($){var S=e.node($),R=S.order;(R<l||m<R)&&!(S.dummy&&e.node(b).dummy)&&addConflict(r,$,b)})}),u=g+1,l=m)}),o}return _$6.reduce(t,n),r}function findType2Conflicts(e,t){var r={};function n(o,l,u,h,f){var d;_$6.forEach(_$6.range(l,u),function(g){d=o[g],e.node(d).dummy&&_$6.forEach(e.predecessors(d),function(p){var m=e.node(p);m.dummy&&(m.order<h||m.order>f)&&addConflict(r,p,d)})})}function i(o,l){var u=-1,h,f=0;return _$6.forEach(l,function(d,g){if(e.node(d).dummy==="border"){var p=e.predecessors(d);p.length&&(h=e.node(p[0]).order,n(l,f,g,u,h),f=g,u=h)}n(l,f,l.length,h,o.length)}),l}return _$6.reduce(t,i),r}function findOtherInnerSegmentNode(e,t){if(e.node(t).dummy)return _$6.find(e.predecessors(t),function(r){return e.node(r).dummy})}function addConflict(e,t,r){if(t>r){var n=t;t=r,r=n}var i=e[t];i||(e[t]=i={}),i[r]=!0}function hasConflict(e,t,r){if(t>r){var n=t;t=r,r=n}return _$6.has(e[t],r)}function verticalAlignment(e,t,r,n){var i={},o={},l={};return _$6.forEach(t,function(u){_$6.forEach(u,function(h,f){i[h]=h,o[h]=h,l[h]=f})}),_$6.forEach(t,function(u){var h=-1;_$6.forEach(u,function(f){var d=n(f);if(d.length){d=_$6.sortBy(d,function($){return l[$]});for(var g=(d.length-1)/2,p=Math.floor(g),m=Math.ceil(g);p<=m;++p){var b=d[p];o[f]===f&&h<l[b]&&!hasConflict(r,f,b)&&(o[b]=f,o[f]=i[f]=i[b],h=l[b])}}})}),{root:i,align:o}}function horizontalCompaction(e,t,r,n,i){var o={},l=buildBlockGraph(e,t,r,i),u=i?"borderLeft":"borderRight";function h(g,p){for(var m=l.nodes(),b=m.pop(),$={};b;)$[b]?g(b):($[b]=!0,m.push(b),m=m.concat(p(b))),b=m.pop()}function f(g){o[g]=l.inEdges(g).reduce(function(p,m){return Math.max(p,o[m.v]+l.edge(m))},0)}function d(g){var p=l.outEdges(g).reduce(function(b,$){return Math.min(b,o[$.w]-l.edge($))},Number.POSITIVE_INFINITY),m=e.node(g);p!==Number.POSITIVE_INFINITY&&m.borderType!==u&&(o[g]=Math.max(o[g],p))}return h(f,l.predecessors.bind(l)),h(d,l.successors.bind(l)),_$6.forEach(n,function(g){o[g]=o[r[g]]}),o}function buildBlockGraph(e,t,r,n){var i=new Graph$2,o=e.graph(),l=sep(o.nodesep,o.edgesep,n);return _$6.forEach(t,function(u){var h;_$6.forEach(u,function(f){var d=r[f];if(i.setNode(d),h){var g=r[h],p=i.edge(g,d);i.setEdge(g,d,Math.max(l(e,f,h),p||0))}h=f})}),i}function findSmallestWidthAlignment(e,t){return _$6.minBy(_$6.values(t),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return _$6.forIn(r,function(o,l){var u=width$1(e,l)/2;n=Math.max(o+u,n),i=Math.min(o-u,i)}),n-i})}function alignCoordinates(e,t){var r=_$6.values(t),n=_$6.min(r),i=_$6.max(r);_$6.forEach(["u","d"],function(o){_$6.forEach(["l","r"],function(l){var u=o+l,h=e[u],f;if(h!==t){var d=_$6.values(h);f=l==="l"?n-_$6.min(d):i-_$6.max(d),f&&(e[u]=_$6.mapValues(h,function(g){return g+f}))}})})}function balance(e,t){return _$6.mapValues(e.ul,function(r,n){if(t)return e[t.toLowerCase()][n];var i=_$6.sortBy(_$6.map(e,n));return(i[1]+i[2])/2})}function positionX$1(e){var t=util$6.buildLayerMatrix(e),r=_$6.merge(findType1Conflicts(e,t),findType2Conflicts(e,t)),n={},i;_$6.forEach(["u","d"],function(l){i=l==="u"?t:_$6.values(t).reverse(),_$6.forEach(["l","r"],function(u){u==="r"&&(i=_$6.map(i,function(g){return _$6.values(g).reverse()}));var h=(l==="u"?e.predecessors:e.successors).bind(e),f=verticalAlignment(e,i,r,h),d=horizontalCompaction(e,i,f.root,f.align,u==="r");u==="r"&&(d=_$6.mapValues(d,function(g){return-g})),n[l+u]=d})});var o=findSmallestWidthAlignment(e,n);return alignCoordinates(n,o),balance(n,e.graph().align)}function sep(e,t,r){return function(n,i,o){var l=n.node(i),u=n.node(o),h=0,f;if(h+=l.width/2,_$6.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":f=-l.width/2;break;case"r":f=l.width/2;break}if(f&&(h+=r?f:-f),f=0,h+=(l.dummy?t:e)/2,h+=(u.dummy?t:e)/2,h+=u.width/2,_$6.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":f=u.width/2;break;case"r":f=-u.width/2;break}return f&&(h+=r?f:-f),f=0,h}}function width$1(e,t){return e.node(t).width}var _$5=lodash_1$2,util$5=util$d,positionX=bk.positionX,position_1=position$1;function position$1(e){e=util$5.asNonCompoundGraph(e),positionY(e),_$5.forEach(positionX(e),function(t,r){e.node(r).x=t})}function positionY(e){var t=util$5.buildLayerMatrix(e),r=e.graph().ranksep,n=0;_$5.forEach(t,function(i){var o=_$5.max(_$5.map(i,function(l){return e.node(l).height}));_$5.forEach(i,function(l){e.node(l).y=n+o/2}),n+=o+r})}var _$4=lodash_1$2,acyclic=acyclic$1,normalize$1=normalize$2,rank=rank_1,normalizeRanks=util$d.normalizeRanks,parentDummyChains=parentDummyChains_1,removeEmptyRanks=util$d.removeEmptyRanks,nestingGraph=nestingGraph$1,addBorderSegments=addBorderSegments_1,coordinateSystem=coordinateSystem$1,order=order_1,position=position_1,util$4=util$d,Graph$1=graphlib_1$1.Graph,layout_1=layout$1;function layout$1(e,t){var r=t&&t.debugTiming?util$4.time:util$4.notime;r("layout",function(){var n=r(" buildLayoutGraph",function(){return buildLayoutGraph(e)});r(" runLayout",function(){runLayout(n,r)}),r(" updateInputGraph",function(){updateInputGraph(e,n)})})}function runLayout(e,t){t(" makeSpaceForEdgeLabels",function(){makeSpaceForEdgeLabels(e)}),t(" removeSelfEdges",function(){removeSelfEdges(e)}),t(" acyclic",function(){acyclic.run(e)}),t(" nestingGraph.run",function(){nestingGraph.run(e)}),t(" rank",function(){rank(util$4.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){injectEdgeLabelProxies(e)}),t(" removeEmptyRanks",function(){removeEmptyRanks(e)}),t(" nestingGraph.cleanup",function(){nestingGraph.cleanup(e)}),t(" normalizeRanks",function(){normalizeRanks(e)}),t(" assignRankMinMax",function(){assignRankMinMax(e)}),t(" removeEdgeLabelProxies",function(){removeEdgeLabelProxies(e)}),t(" normalize.run",function(){normalize$1.run(e)}),t(" parentDummyChains",function(){parentDummyChains(e)}),t(" addBorderSegments",function(){addBorderSegments(e)}),t(" order",function(){order(e)}),t(" insertSelfEdges",function(){insertSelfEdges(e)}),t(" adjustCoordinateSystem",function(){coordinateSystem.adjust(e)}),t(" position",function(){position(e)}),t(" positionSelfEdges",function(){positionSelfEdges(e)}),t(" removeBorderNodes",function(){removeBorderNodes(e)}),t(" normalize.undo",function(){normalize$1.undo(e)}),t(" fixupEdgeLabelCoords",function(){fixupEdgeLabelCoords(e)}),t(" undoCoordinateSystem",function(){coordinateSystem.undo(e)}),t(" translateGraph",function(){translateGraph(e)}),t(" assignNodeIntersects",function(){assignNodeIntersects(e)}),t(" reversePoints",function(){reversePointsForReversedEdges(e)}),t(" acyclic.undo",function(){acyclic.undo(e)})}function updateInputGraph(e,t){_$4.forEach(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),_$4.forEach(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,_$4.has(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var graphNumAttrs=["nodesep","edgesep","ranksep","marginx","marginy"],graphDefaults={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},graphAttrs=["acyclicer","ranker","rankdir","align"],nodeNumAttrs=["width","height"],nodeDefaults={width:0,height:0},edgeNumAttrs=["minlen","weight","width","height","labeloffset"],edgeDefaults={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},edgeAttrs=["labelpos"];function buildLayoutGraph(e){var t=new Graph$1({multigraph:!0,compound:!0}),r=canonicalize(e.graph());return t.setGraph(_$4.merge({},graphDefaults,selectNumberAttrs(r,graphNumAttrs),_$4.pick(r,graphAttrs))),_$4.forEach(e.nodes(),function(n){var i=canonicalize(e.node(n));t.setNode(n,_$4.defaults(selectNumberAttrs(i,nodeNumAttrs),nodeDefaults)),t.setParent(n,e.parent(n))}),_$4.forEach(e.edges(),function(n){var i=canonicalize(e.edge(n));t.setEdge(n,_$4.merge({},edgeDefaults,selectNumberAttrs(i,edgeNumAttrs),_$4.pick(i,edgeAttrs)))}),t}function makeSpaceForEdgeLabels(e){var t=e.graph();t.ranksep/=2,_$4.forEach(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function injectEdgeLabelProxies(e){_$4.forEach(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),o={rank:(i.rank-n.rank)/2+n.rank,e:t};util$4.addDummyNode(e,"edge-proxy",o,"_ep")}})}function assignRankMinMax(e){var t=0;_$4.forEach(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=_$4.max(t,n.maxRank))}),e.graph().maxRank=t}function removeEdgeLabelProxies(e){_$4.forEach(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function translateGraph(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,o=e.graph(),l=o.marginx||0,u=o.marginy||0;function h(f){var d=f.x,g=f.y,p=f.width,m=f.height;t=Math.min(t,d-p/2),r=Math.max(r,d+p/2),n=Math.min(n,g-m/2),i=Math.max(i,g+m/2)}_$4.forEach(e.nodes(),function(f){h(e.node(f))}),_$4.forEach(e.edges(),function(f){var d=e.edge(f);_$4.has(d,"x")&&h(d)}),t-=l,n-=u,_$4.forEach(e.nodes(),function(f){var d=e.node(f);d.x-=t,d.y-=n}),_$4.forEach(e.edges(),function(f){var d=e.edge(f);_$4.forEach(d.points,function(g){g.x-=t,g.y-=n}),_$4.has(d,"x")&&(d.x-=t),_$4.has(d,"y")&&(d.y-=n)}),o.width=r-t+l,o.height=i-n+u}function assignNodeIntersects(e){_$4.forEach(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),o,l;r.points?(o=r.points[0],l=r.points[r.points.length-1]):(r.points=[],o=i,l=n),r.points.unshift(util$4.intersectRect(n,o)),r.points.push(util$4.intersectRect(i,l))})}function fixupEdgeLabelCoords(e){_$4.forEach(e.edges(),function(t){var r=e.edge(t);if(_$4.has(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function reversePointsForReversedEdges(e){_$4.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function removeBorderNodes(e){_$4.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(_$4.last(r.borderLeft)),l=e.node(_$4.last(r.borderRight));r.width=Math.abs(l.x-o.x),r.height=Math.abs(i.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2}}),_$4.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function removeSelfEdges(e){_$4.forEach(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function insertSelfEdges(e){var t=util$4.buildLayerMatrix(e);_$4.forEach(t,function(r){var n=0;_$4.forEach(r,function(i,o){var l=e.node(i);l.order=o+n,_$4.forEach(l.selfEdges,function(u){util$4.addDummyNode(e,"selfedge",{width:u.label.width,height:u.label.height,rank:l.rank,order:o+ ++n,e:u.e,label:u.label},"_se")}),delete l.selfEdges})})}function positionSelfEdges(e){_$4.forEach(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,o=n.y,l=r.x-i,u=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*l/3,y:o-u},{x:i+5*l/6,y:o-u},{x:i+l,y:o},{x:i+5*l/6,y:o+u},{x:i+2*l/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function selectNumberAttrs(e,t){return _$4.mapValues(_$4.pick(e,t),Number)}function canonicalize(e){var t={};return _$4.forEach(e,function(r,n){t[n.toLowerCase()]=r}),t}var _$3=lodash_1$2,util$3=util$d,Graph=graphlib_1$1.Graph,debug={debugOrdering};function debugOrdering(e){var t=util$3.buildLayerMatrix(e),r=new Graph({compound:!0,multigraph:!0}).setGraph({});return _$3.forEach(e.nodes(),function(n){r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),_$3.forEach(e.edges(),function(n){r.setEdge(n.v,n.w,{},n.name)}),_$3.forEach(t,function(n,i){var o="layer"+i;r.setNode(o,{rank:"same"}),_$3.reduce(n,function(l,u){return r.setEdge(l,u,{style:"invis"}),u})}),r}var version$4="0.8.5",dagre$1={graphlib:graphlib_1$1,layout:layout_1,debug,util:{time:util$d.time,notime:util$d.notime},version:version$4},graphlib;if(typeof commonjsRequire$1=="function")try{graphlib=graphlib$2}catch{}graphlib||(graphlib=window.graphlib);var graphlib_1=graphlib,dagre;if(typeof commonjsRequire$1=="function")try{dagre=dagre$1}catch{}dagre||(dagre=window.dagre);var dagre_1=dagre,intersectNode_1=intersectNode$1;function intersectNode$1(e,t){return e.intersect(t)}var intersectEllipse_1=intersectEllipse$2;function intersectEllipse$2(e,t,r,n){var i=e.x,o=e.y,l=i-n.x,u=o-n.y,h=Math.sqrt(t*t*u*u+r*r*l*l),f=Math.abs(t*r*l/h);n.x<i&&(f=-f);var d=Math.abs(t*r*u/h);return n.y<o&&(d=-d),{x:i+f,y:o+d}}var intersectEllipse$1=intersectEllipse_1,intersectCircle_1=intersectCircle$1;function intersectCircle$1(e,t,r){return intersectEllipse$1(e,t,t,r)}var intersectLine_1=intersectLine$2;function intersectLine$2(e,t,r,n){var i,o,l,u,h,f,d,g,p,m,b,$,S,R,L;if(i=t.y-e.y,l=e.x-t.x,h=t.x*e.y-e.x*t.y,p=i*r.x+l*r.y+h,m=i*n.x+l*n.y+h,!(p!==0&&m!==0&&sameSign$1(p,m))&&(o=n.y-r.y,u=r.x-n.x,f=n.x*r.y-r.x*n.y,d=o*e.x+u*e.y+f,g=o*t.x+u*t.y+f,!(d!==0&&g!==0&&sameSign$1(d,g))&&(b=i*u-o*l,b!==0)))return $=Math.abs(b/2),S=l*f-u*h,R=S<0?(S-$)/b:(S+$)/b,S=o*h-i*f,L=S<0?(S-$)/b:(S+$)/b,{x:R,y:L}}function sameSign$1(e,t){return e*t>0}var intersectLine$1=intersectLine_1,intersectPolygon_1=intersectPolygon$1;function intersectPolygon$1(e,t,r){var n=e.x,i=e.y,o=[],l=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY;t.forEach(function(b){l=Math.min(l,b.x),u=Math.min(u,b.y)});for(var h=n-e.width/2-l,f=i-e.height/2-u,d=0;d<t.length;d++){var g=t[d],p=t[d<t.length-1?d+1:0],m=intersectLine$1(e,r,{x:h+g.x,y:f+g.y},{x:h+p.x,y:f+p.y});m&&o.push(m)}return o.length?(o.length>1&&o.sort(function(b,$){var S=b.x-r.x,R=b.y-r.y,L=Math.sqrt(S*S+R*R),N=$.x-r.x,F=$.y-r.y,H=Math.sqrt(N*N+F*F);return L<H?-1:L===H?0:1}),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",e),e)}var intersectRect_1=intersectRect$1;function intersectRect$1(e,t){var r=e.x,n=e.y,i=t.x-r,o=t.y-n,l=e.width/2,u=e.height/2,h,f;return Math.abs(o)*l>Math.abs(i)*u?(o<0&&(u=-u),h=o===0?0:u*i/o,f=u):(i<0&&(l=-l),h=l,f=i===0?0:l*o/i),{x:r+h,y:n+f}}var intersect$2={node:intersectNode_1,circle:intersectCircle_1,ellipse:intersectEllipse_1,polygon:intersectPolygon_1,rect:intersectRect_1},lodash$1;if(typeof commonjsRequire$1=="function")try{lodash$1={defaults:requireDefaults$1(),each:requireEach$1(),isFunction:requireIsFunction$1(),isPlainObject:requireIsPlainObject$1(),pick:requirePick$1(),has:requireHas$1(),range:requireRange$1(),uniqueId:requireUniqueId$1()}}catch{}lodash$1||(lodash$1=window._);var lodash_1$1=lodash$1,version$3="5.16.0";function ascending$3(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function bisector(e){return e.length===1&&(e=ascendingComparator(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function ascendingComparator(e){return function(t,r){return ascending$3(e(t),r)}}var ascendingBisect=bisector(ascending$3),bisectRight=ascendingBisect.right,bisectLeft=ascendingBisect.left;function pairs(e,t){t==null&&(t=pair);for(var r=0,n=e.length-1,i=e[0],o=new Array(n<0?0:n);r<n;)o[r]=t(i,i=e[++r]);return o}function pair(e,t){return[e,t]}function cross$3(e,t,r){var n=e.length,i=t.length,o=new Array(n*i),l,u,h,f;for(r==null&&(r=pair),l=h=0;l<n;++l)for(f=e[l],u=0;u<i;++u,++h)o[h]=r(f,t[u]);return o}function descending$2(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function number$3(e){return e===null?NaN:+e}function variance(e,t){var r=e.length,n=0,i=-1,o=0,l,u,h=0;if(t==null)for(;++i<r;)isNaN(l=number$3(e[i]))||(u=l-o,o+=u/++n,h+=u*(l-o));else for(;++i<r;)isNaN(l=number$3(t(e[i],i,e)))||(u=l-o,o+=u/++n,h+=u*(l-o));if(n>1)return h/(n-1)}function deviation(e,t){var r=variance(e,t);return r&&Math.sqrt(r)}function extent$1(e,t){var r=e.length,n=-1,i,o,l;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=l=i;++n<r;)(i=e[n])!=null&&(o>i&&(o=i),l<i&&(l=i))}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=l=i;++n<r;)(i=t(e[n],n,e))!=null&&(o>i&&(o=i),l<i&&(l=i));return[o,l]}var array$3=Array.prototype,slice$6=array$3.slice,map$3=array$3.map;function constant$d(e){return function(){return e}}function identity$9(e){return e}function sequence(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var e10=Math.sqrt(50),e5=Math.sqrt(10),e2=Math.sqrt(2);function ticks(e,t,r){var n,i=-1,o,l,u;if(t=+t,e=+e,r=+r,e===t&&r>0)return[e];if((n=t<e)&&(o=e,e=t,t=o),(u=tickIncrement(e,t,r))===0||!isFinite(u))return[];if(u>0)for(e=Math.ceil(e/u),t=Math.floor(t/u),l=new Array(o=Math.ceil(t-e+1));++i<o;)l[i]=(e+i)*u;else for(e=Math.floor(e*u),t=Math.ceil(t*u),l=new Array(o=Math.ceil(e-t+1));++i<o;)l[i]=(e-i)/u;return n&&l.reverse(),l}function tickIncrement(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=e10?10:o>=e5?5:o>=e2?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=e10?10:o>=e5?5:o>=e2?2:1)}function tickStep(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=e10?i*=10:o>=e5?i*=5:o>=e2&&(i*=2),t<e?-i:i}function thresholdSturges(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function histogram(){var e=identity$9,t=extent$1,r=thresholdSturges;function n(i){var o,l=i.length,u,h=new Array(l);for(o=0;o<l;++o)h[o]=e(i[o],o,i);var f=t(h),d=f[0],g=f[1],p=r(h,d,g);Array.isArray(p)||(p=tickStep(d,g,p),p=sequence(Math.ceil(d/p)*p,g,p));for(var m=p.length;p[0]<=d;)p.shift(),--m;for(;p[m-1]>g;)p.pop(),--m;var b=new Array(m+1),$;for(o=0;o<=m;++o)$=b[o]=[],$.x0=o>0?p[o-1]:d,$.x1=o<m?p[o]:g;for(o=0;o<l;++o)u=h[o],d<=u&&u<=g&&b[bisectRight(p,u,0,m)].push(i[o]);return b}return n.value=function(i){return arguments.length?(e=typeof i=="function"?i:constant$d(i),n):e},n.domain=function(i){return arguments.length?(t=typeof i=="function"?i:constant$d([i[0],i[1]]),n):t},n.thresholds=function(i){return arguments.length?(r=typeof i=="function"?i:Array.isArray(i)?constant$d(slice$6.call(i)):constant$d(i),n):r},n}function threshold$1(e,t,r){if(r==null&&(r=number$3),!!(n=e.length)){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),l=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return l+(u-l)*(i-o)}}function freedmanDiaconis(e,t,r){return e=map$3.call(e,number$3).sort(ascending$3),Math.ceil((r-t)/(2*(threshold$1(e,.75)-threshold$1(e,.25))*Math.pow(e.length,-1/3)))}function scott(e,t,r){return Math.ceil((r-t)/(3.5*deviation(e)*Math.pow(e.length,-1/3)))}function max$2(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&i>o&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&i>o&&(o=i);return o}function mean(e,t){var r=e.length,n=r,i=-1,o,l=0;if(t==null)for(;++i<r;)isNaN(o=number$3(e[i]))?--n:l+=o;else for(;++i<r;)isNaN(o=number$3(t(e[i],i,e)))?--n:l+=o;if(n)return l/n}function median(e,t){var r=e.length,n=-1,i,o=[];if(t==null)for(;++n<r;)isNaN(i=number$3(e[n]))||o.push(i);else for(;++n<r;)isNaN(i=number$3(t(e[n],n,e)))||o.push(i);return threshold$1(o.sort(ascending$3),.5)}function merge$1(e){for(var t=e.length,r,n=-1,i=0,o,l;++n<t;)i+=e[n].length;for(o=new Array(i);--t>=0;)for(l=e[t],r=l.length;--r>=0;)o[--i]=l[r];return o}function min$1(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&o>i&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&o>i&&(o=i);return o}function permute(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n}function scan(e,t){if(!!(r=e.length)){var r,n=0,i=0,o,l=e[i];for(t==null&&(t=ascending$3);++n<r;)(t(o=e[n],l)<0||t(l,l)!==0)&&(l=o,i=n);if(t(l,l)===0)return i}}function shuffle$1(e,t,r){for(var n=(r==null?e.length:r)-(t=t==null?0:+t),i,o;n;)o=Math.random()*n--|0,i=e[n+t],e[n+t]=e[o+t],e[o+t]=i;return e}function sum$2(e,t){var r=e.length,n=-1,i,o=0;if(t==null)for(;++n<r;)(i=+e[n])&&(o+=i);else for(;++n<r;)(i=+t(e[n],n,e))&&(o+=i);return o}function transpose(e){if(!(o=e.length))return[];for(var t=-1,r=min$1(e,length$2),n=new Array(r);++t<r;)for(var i=-1,o,l=n[t]=new Array(o);++i<o;)l[i]=e[i][t];return n}function length$2(e){return e.length}function zip(){return transpose(arguments)}var slice$5=Array.prototype.slice;function identity$8(e){return e}var top=1,right=2,bottom=3,left=4,epsilon$4=1e-6;function translateX(e){return"translate("+(e+.5)+",0)"}function translateY(e){return"translate(0,"+(e+.5)+")"}function number$2(e){return function(t){return+e(t)}}function center$1(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(r){return+e(r)+t}}function entering(){return!this.__axis}function axis(e,t){var r=[],n=null,i=null,o=6,l=6,u=3,h=e===top||e===left?-1:1,f=e===left||e===right?"x":"y",d=e===top||e===bottom?translateX:translateY;function g(p){var m=n==null?t.ticks?t.ticks.apply(t,r):t.domain():n,b=i==null?t.tickFormat?t.tickFormat.apply(t,r):identity$8:i,$=Math.max(o,0)+u,S=t.range(),R=+S[0]+.5,L=+S[S.length-1]+.5,N=(t.bandwidth?center$1:number$2)(t.copy()),F=p.selection?p.selection():p,H=F.selectAll(".domain").data([null]),G=F.selectAll(".tick").data(m,t).order(),P=G.exit(),V=G.enter().append("g").attr("class","tick"),z=G.select("line"),W=G.select("text");H=H.merge(H.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),G=G.merge(V),z=z.merge(V.append("line").attr("stroke","currentColor").attr(f+"2",h*o)),W=W.merge(V.append("text").attr("fill","currentColor").attr(f,h*$).attr("dy",e===top?"0em":e===bottom?"0.71em":"0.32em")),p!==F&&(H=H.transition(p),G=G.transition(p),z=z.transition(p),W=W.transition(p),P=P.transition(p).attr("opacity",epsilon$4).attr("transform",function(T){return isFinite(T=N(T))?d(T):this.getAttribute("transform")}),V.attr("opacity",epsilon$4).attr("transform",function(T){var U=this.parentNode.__axis;return d(U&&isFinite(U=U(T))?U:N(T))})),P.remove(),H.attr("d",e===left||e==right?l?"M"+h*l+","+R+"H0.5V"+L+"H"+h*l:"M0.5,"+R+"V"+L:l?"M"+R+","+h*l+"V0.5H"+L+"V"+h*l:"M"+R+",0.5H"+L),G.attr("opacity",1).attr("transform",function(T){return d(N(T))}),z.attr(f+"2",h*o),W.attr(f,h*$).text(b),F.filter(entering).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===right?"start":e===left?"end":"middle"),F.each(function(){this.__axis=N})}return g.scale=function(p){return arguments.length?(t=p,g):t},g.ticks=function(){return r=slice$5.call(arguments),g},g.tickArguments=function(p){return arguments.length?(r=p==null?[]:slice$5.call(p),g):r.slice()},g.tickValues=function(p){return arguments.length?(n=p==null?null:slice$5.call(p),g):n&&n.slice()},g.tickFormat=function(p){return arguments.length?(i=p,g):i},g.tickSize=function(p){return arguments.length?(o=l=+p,g):o},g.tickSizeInner=function(p){return arguments.length?(o=+p,g):o},g.tickSizeOuter=function(p){return arguments.length?(l=+p,g):l},g.tickPadding=function(p){return arguments.length?(u=+p,g):u},g}function axisTop(e){return axis(top,e)}function axisRight(e){return axis(right,e)}function axisBottom(e){return axis(bottom,e)}function axisLeft(e){return axis(left,e)}var noop$3={value:function(){}};function dispatch(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Dispatch(r)}function Dispatch(e){this._=e}function parseTypenames$1(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(e,t){var r=this._,n=parseTypenames$1(e+"",r),i,o=-1,l=n.length;if(arguments.length<2){for(;++o<l;)if((i=(e=n[o]).type)&&(i=get$1(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<l;)if(i=(e=n[o]).type)r[i]=set$2(r[i],e.name,t);else if(t==null)for(i in r)r[i]=set$2(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Dispatch(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function get$1(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function set$2(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=noop$3,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var xhtml="http://www.w3.org/1999/xhtml";const namespaces={svg:"http://www.w3.org/2000/svg",xhtml,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function namespace(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),namespaces.hasOwnProperty(t)?{space:namespaces[t],local:e}:e}function creatorInherit(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===xhtml&&t.documentElement.namespaceURI===xhtml?t.createElement(e):t.createElementNS(r,e)}}function creatorFixed(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function creator(e){var t=namespace(e);return(t.local?creatorFixed:creatorInherit)(t)}function none$2(){}function selector(e){return e==null?none$2:function(){return this.querySelector(e)}}function selection_select(e){typeof e!="function"&&(e=selector(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],l=o.length,u=n[i]=new Array(l),h,f,d=0;d<l;++d)(h=o[d])&&(f=e.call(h,h.__data__,d,o))&&("__data__"in h&&(f.__data__=h.__data__),u[d]=f);return new Selection$1(n,this._parents)}function empty$1(){return[]}function selectorAll(e){return e==null?empty$1:function(){return this.querySelectorAll(e)}}function selection_selectAll(e){typeof e!="function"&&(e=selectorAll(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var l=t[o],u=l.length,h,f=0;f<u;++f)(h=l[f])&&(n.push(e.call(h,h.__data__,f,l)),i.push(h));return new Selection$1(n,i)}function matcher(e){return function(){return this.matches(e)}}function selection_filter(e){typeof e!="function"&&(e=matcher(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],l=o.length,u=n[i]=[],h,f=0;f<l;++f)(h=o[f])&&e.call(h,h.__data__,f,o)&&u.push(h);return new Selection$1(n,this._parents)}function sparse(e){return new Array(e.length)}function selection_enter(){return new Selection$1(this._enter||this._groups.map(sparse),this._parents)}function EnterNode(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}EnterNode.prototype={constructor:EnterNode,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function constant$c(e){return function(){return e}}var keyPrefix$1="$";function bindIndex(e,t,r,n,i,o){for(var l=0,u,h=t.length,f=o.length;l<f;++l)(u=t[l])?(u.__data__=o[l],n[l]=u):r[l]=new EnterNode(e,o[l]);for(;l<h;++l)(u=t[l])&&(i[l]=u)}function bindKey(e,t,r,n,i,o,l){var u,h,f={},d=t.length,g=o.length,p=new Array(d),m;for(u=0;u<d;++u)(h=t[u])&&(p[u]=m=keyPrefix$1+l.call(h,h.__data__,u,t),m in f?i[u]=h:f[m]=h);for(u=0;u<g;++u)m=keyPrefix$1+l.call(e,o[u],u,o),(h=f[m])?(n[u]=h,h.__data__=o[u],f[m]=null):r[u]=new EnterNode(e,o[u]);for(u=0;u<d;++u)(h=t[u])&&f[p[u]]===h&&(i[u]=h)}function selection_data(e,t){if(!e)return m=new Array(this.size()),f=-1,this.each(function(G){m[++f]=G}),m;var r=t?bindKey:bindIndex,n=this._parents,i=this._groups;typeof e!="function"&&(e=constant$c(e));for(var o=i.length,l=new Array(o),u=new Array(o),h=new Array(o),f=0;f<o;++f){var d=n[f],g=i[f],p=g.length,m=e.call(d,d&&d.__data__,f,n),b=m.length,$=u[f]=new Array(b),S=l[f]=new Array(b),R=h[f]=new Array(p);r(d,g,$,S,R,m,t);for(var L=0,N=0,F,H;L<b;++L)if(F=$[L]){for(L>=N&&(N=L+1);!(H=S[N])&&++N<b;);F._next=H||null}}return l=new Selection$1(l,n),l._enter=u,l._exit=h,l}function selection_exit(){return new Selection$1(this._exit||this._groups.map(sparse),this._parents)}function selection_join(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function selection_merge(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),l=new Array(n),u=0;u<o;++u)for(var h=t[u],f=r[u],d=h.length,g=l[u]=new Array(d),p,m=0;m<d;++m)(p=h[m]||f[m])&&(g[m]=p);for(;u<n;++u)l[u]=t[u];return new Selection$1(l,this._parents)}function selection_order(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],l;--i>=0;)(l=n[i])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function selection_sort(e){e||(e=ascending$2);function t(g,p){return g&&p?e(g.__data__,p.__data__):!g-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var l=r[o],u=l.length,h=i[o]=new Array(u),f,d=0;d<u;++d)(f=l[d])&&(h[d]=f);h.sort(t)}return new Selection$1(i,this._parents).order()}function ascending$2(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function selection_call(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function selection_nodes(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function selection_node(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var l=n[i];if(l)return l}return null}function selection_size(){var e=0;return this.each(function(){++e}),e}function selection_empty(){return!this.node()}function selection_each(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,l=i.length,u;o<l;++o)(u=i[o])&&e.call(u,u.__data__,o,i);return this}function attrRemove$1(e){return function(){this.removeAttribute(e)}}function attrRemoveNS$1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function attrConstant$1(e,t){return function(){this.setAttribute(e,t)}}function attrConstantNS$1(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function attrFunction$1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function attrFunctionNS$1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function selection_attr(e,t){var r=namespace(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?attrRemoveNS$1:attrRemove$1:typeof t=="function"?r.local?attrFunctionNS$1:attrFunction$1:r.local?attrConstantNS$1:attrConstant$1)(r,t))}function defaultView(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function styleRemove$1(e){return function(){this.style.removeProperty(e)}}function styleConstant$1(e,t,r){return function(){this.style.setProperty(e,t,r)}}function styleFunction$1(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function selection_style(e,t,r){return arguments.length>1?this.each((t==null?styleRemove$1:typeof t=="function"?styleFunction$1:styleConstant$1)(e,t,r==null?"":r)):styleValue(this.node(),e)}function styleValue(e,t){return e.style.getPropertyValue(t)||defaultView(e).getComputedStyle(e,null).getPropertyValue(t)}function propertyRemove(e){return function(){delete this[e]}}function propertyConstant(e,t){return function(){this[e]=t}}function propertyFunction(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function selection_property(e,t){return arguments.length>1?this.each((t==null?propertyRemove:typeof t=="function"?propertyFunction:propertyConstant)(e,t)):this.node()[e]}function classArray(e){return e.trim().split(/^|\s+/)}function classList(e){return e.classList||new ClassList(e)}function ClassList(e){this._node=e,this._names=classArray(e.getAttribute("class")||"")}ClassList.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function classedAdd(e,t){for(var r=classList(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function classedRemove(e,t){for(var r=classList(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function classedTrue(e){return function(){classedAdd(this,e)}}function classedFalse(e){return function(){classedRemove(this,e)}}function classedFunction(e,t){return function(){(t.apply(this,arguments)?classedAdd:classedRemove)(this,e)}}function selection_classed(e,t){var r=classArray(e+"");if(arguments.length<2){for(var n=classList(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?classedFunction:t?classedTrue:classedFalse)(r,t))}function textRemove(){this.textContent=""}function textConstant$1(e){return function(){this.textContent=e}}function textFunction$1(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function selection_text(e){return arguments.length?this.each(e==null?textRemove:(typeof e=="function"?textFunction$1:textConstant$1)(e)):this.node().textContent}function htmlRemove(){this.innerHTML=""}function htmlConstant(e){return function(){this.innerHTML=e}}function htmlFunction(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function selection_html(e){return arguments.length?this.each(e==null?htmlRemove:(typeof e=="function"?htmlFunction:htmlConstant)(e)):this.node().innerHTML}function raise(){this.nextSibling&&this.parentNode.appendChild(this)}function selection_raise(){return this.each(raise)}function lower(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function selection_lower(){return this.each(lower)}function selection_append(e){var t=typeof e=="function"?e:creator(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function constantNull(){return null}function selection_insert(e,t){var r=typeof e=="function"?e:creator(e),n=t==null?constantNull:typeof t=="function"?t:selector(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function remove(){var e=this.parentNode;e&&e.removeChild(this)}function selection_remove(){return this.each(remove)}function selection_cloneShallow(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function selection_cloneDeep(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function selection_clone(e){return this.select(e?selection_cloneDeep:selection_cloneShallow)}function selection_datum(e){return arguments.length?this.property("__data__",e):this.node().__data__}var filterEvents={},event=null;if(typeof document<"u"){var element=document.documentElement;"onmouseenter"in element||(filterEvents={mouseenter:"mouseover",mouseleave:"mouseout"})}function filterContextListener(e,t,r){return e=contextListener(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function contextListener(e,t,r){return function(n){var i=event;event=n;try{e.call(this,this.__data__,t,r)}finally{event=i}}}function parseTypenames(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function onRemove(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function onAdd(e,t,r){var n=filterEvents.hasOwnProperty(e.type)?filterContextListener:contextListener;return function(i,o,l){var u=this.__on,h,f=n(t,o,l);if(u){for(var d=0,g=u.length;d<g;++d)if((h=u[d]).type===e.type&&h.name===e.name){this.removeEventListener(h.type,h.listener,h.capture),this.addEventListener(h.type,h.listener=f,h.capture=r),h.value=t;return}}this.addEventListener(e.type,f,r),h={type:e.type,name:e.name,value:t,listener:f,capture:r},u?u.push(h):this.__on=[h]}}function selection_on(e,t,r){var n=parseTypenames(e+""),i,o=n.length,l;if(arguments.length<2){var u=this.node().__on;if(u){for(var h=0,f=u.length,d;h<f;++h)for(i=0,d=u[h];i<o;++i)if((l=n[i]).type===d.type&&l.name===d.name)return d.value}return}for(u=t?onAdd:onRemove,r==null&&(r=!1),i=0;i<o;++i)this.each(u(n[i],t,r));return this}function customEvent(e,t,r,n){var i=event;e.sourceEvent=event,event=e;try{return t.apply(r,n)}finally{event=i}}function dispatchEvent(e,t,r){var n=defaultView(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function dispatchConstant(e,t){return function(){return dispatchEvent(this,e,t)}}function dispatchFunction(e,t){return function(){return dispatchEvent(this,e,t.apply(this,arguments))}}function selection_dispatch(e,t){return this.each((typeof t=="function"?dispatchFunction:dispatchConstant)(e,t))}var root$2=[null];function Selection$1(e,t){this._groups=e,this._parents=t}function selection(){return new Selection$1([[document.documentElement]],root$2)}Selection$1.prototype=selection.prototype={constructor:Selection$1,select:selection_select,selectAll:selection_selectAll,filter:selection_filter,data:selection_data,enter:selection_enter,exit:selection_exit,join:selection_join,merge:selection_merge,order:selection_order,sort:selection_sort,call:selection_call,nodes:selection_nodes,node:selection_node,size:selection_size,empty:selection_empty,each:selection_each,attr:selection_attr,style:selection_style,property:selection_property,classed:selection_classed,text:selection_text,html:selection_html,raise:selection_raise,lower:selection_lower,append:selection_append,insert:selection_insert,remove:selection_remove,clone:selection_clone,datum:selection_datum,on:selection_on,dispatch:selection_dispatch};function select(e){return typeof e=="string"?new Selection$1([[document.querySelector(e)]],[document.documentElement]):new Selection$1([[e]],root$2)}function create$1(e){return select(creator(e).call(document.documentElement))}var nextId=0;function local$1(){return new Local}function Local(){this._="@"+(++nextId).toString(36)}Local.prototype=local$1.prototype={constructor:Local,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function sourceEvent(){for(var e=event,t;t=e.sourceEvent;)e=t;return e}function point$6(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function mouse(e){var t=sourceEvent();return t.changedTouches&&(t=t.changedTouches[0]),point$6(e,t)}function selectAll(e){return typeof e=="string"?new Selection$1([document.querySelectorAll(e)],[document.documentElement]):new Selection$1([e==null?[]:e],root$2)}function touch(e,t,r){arguments.length<3&&(r=t,t=sourceEvent().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return point$6(e,o);return null}function touches(e,t){t==null&&(t=sourceEvent().touches);for(var r=0,n=t?t.length:0,i=new Array(n);r<n;++r)i[r]=point$6(e,t[r]);return i}function nopropagation$2(){event.stopImmediatePropagation()}function noevent$2(){event.preventDefault(),event.stopImmediatePropagation()}function dragDisable(e){var t=e.document.documentElement,r=select(e).on("dragstart.drag",noevent$2,!0);"onselectstart"in t?r.on("selectstart.drag",noevent$2,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function yesdrag(e,t){var r=e.document.documentElement,n=select(e).on("dragstart.drag",null);t&&(n.on("click.drag",noevent$2,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}function constant$b(e){return function(){return e}}function DragEvent(e,t,r,n,i,o,l,u,h,f){this.target=e,this.type=t,this.subject=r,this.identifier=n,this.active=i,this.x=o,this.y=l,this.dx=u,this.dy=h,this._=f}DragEvent.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function defaultFilter$2(){return!event.ctrlKey&&!event.button}function defaultContainer(){return this.parentNode}function defaultSubject(e){return e==null?{x:event.x,y:event.y}:e}function defaultTouchable$2(){return navigator.maxTouchPoints||"ontouchstart"in this}function drag(){var e=defaultFilter$2,t=defaultContainer,r=defaultSubject,n=defaultTouchable$2,i={},o=dispatch("start","drag","end"),l=0,u,h,f,d,g=0;function p(F){F.on("mousedown.drag",m).filter(n).on("touchstart.drag",S).on("touchmove.drag",R).on("touchend.drag touchcancel.drag",L).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(){if(!(d||!e.apply(this,arguments))){var F=N("mouse",t.apply(this,arguments),mouse,this,arguments);!F||(select(event.view).on("mousemove.drag",b,!0).on("mouseup.drag",$,!0),dragDisable(event.view),nopropagation$2(),f=!1,u=event.clientX,h=event.clientY,F("start"))}}function b(){if(noevent$2(),!f){var F=event.clientX-u,H=event.clientY-h;f=F*F+H*H>g}i.mouse("drag")}function $(){select(event.view).on("mousemove.drag mouseup.drag",null),yesdrag(event.view,f),noevent$2(),i.mouse("end")}function S(){if(!!e.apply(this,arguments)){var F=event.changedTouches,H=t.apply(this,arguments),G=F.length,P,V;for(P=0;P<G;++P)(V=N(F[P].identifier,H,touch,this,arguments))&&(nopropagation$2(),V("start"))}}function R(){var F=event.changedTouches,H=F.length,G,P;for(G=0;G<H;++G)(P=i[F[G].identifier])&&(noevent$2(),P("drag"))}function L(){var F=event.changedTouches,H=F.length,G,P;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),G=0;G<H;++G)(P=i[F[G].identifier])&&(nopropagation$2(),P("end"))}function N(F,H,G,P,V){var z=G(H,F),W,T,U,I=o.copy();if(!!customEvent(new DragEvent(p,"beforestart",W,F,l,z[0],z[1],0,0,I),function(){return(event.subject=W=r.apply(P,V))==null?!1:(T=W.x-z[0]||0,U=W.y-z[1]||0,!0)}))return function ae(Q){var ue=z,_e;switch(Q){case"start":i[F]=ae,_e=l++;break;case"end":delete i[F],--l;case"drag":z=G(H,F),_e=l;break}customEvent(new DragEvent(p,Q,W,F,_e,z[0]+T,z[1]+U,z[0]-ue[0],z[1]-ue[1],I),I.apply,I,[Q,P,V])}}return p.filter=function(F){return arguments.length?(e=typeof F=="function"?F:constant$b(!!F),p):e},p.container=function(F){return arguments.length?(t=typeof F=="function"?F:constant$b(F),p):t},p.subject=function(F){return arguments.length?(r=typeof F=="function"?F:constant$b(F),p):r},p.touchable=function(F){return arguments.length?(n=typeof F=="function"?F:constant$b(!!F),p):n},p.on=function(){var F=o.on.apply(o,arguments);return F===o?p:F},p.clickDistance=function(F){return arguments.length?(g=(F=+F)*F,p):Math.sqrt(g)},p}function define(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function extend(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Color(){}var darker=.7,brighter=1/darker,reI="\\s*([+-]?\\d+)\\s*",reN="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",reP="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",reHex=/^#([0-9a-f]{3,8})$/,reRgbInteger=new RegExp("^rgb\\("+[reI,reI,reI]+"\\)$"),reRgbPercent=new RegExp("^rgb\\("+[reP,reP,reP]+"\\)$"),reRgbaInteger=new RegExp("^rgba\\("+[reI,reI,reI,reN]+"\\)$"),reRgbaPercent=new RegExp("^rgba\\("+[reP,reP,reP,reN]+"\\)$"),reHslPercent=new RegExp("^hsl\\("+[reN,reP,reP]+"\\)$"),reHslaPercent=new RegExp("^hsla\\("+[reN,reP,reP,reN]+"\\)$"),named={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};define(Color,color,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHsl:color_formatHsl,formatRgb:color_formatRgb,toString:color_formatRgb});function color_formatHex(){return this.rgb().formatHex()}function color_formatHsl(){return hslConvert(this).formatHsl()}function color_formatRgb(){return this.rgb().formatRgb()}function color(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=reHex.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?rgbn(t):r===3?new Rgb(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?rgba(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?rgba(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=reRgbInteger.exec(e))?new Rgb(t[1],t[2],t[3],1):(t=reRgbPercent.exec(e))?new Rgb(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=reRgbaInteger.exec(e))?rgba(t[1],t[2],t[3],t[4]):(t=reRgbaPercent.exec(e))?rgba(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=reHslPercent.exec(e))?hsla(t[1],t[2]/100,t[3]/100,1):(t=reHslaPercent.exec(e))?hsla(t[1],t[2]/100,t[3]/100,t[4]):named.hasOwnProperty(e)?rgbn(named[e]):e==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(e){return new Rgb(e>>16&255,e>>8&255,e&255,1)}function rgba(e,t,r,n){return n<=0&&(e=t=r=NaN),new Rgb(e,t,r,n)}function rgbConvert(e){return e instanceof Color||(e=color(e)),e?(e=e.rgb(),new Rgb(e.r,e.g,e.b,e.opacity)):new Rgb}function rgb(e,t,r,n){return arguments.length===1?rgbConvert(e):new Rgb(e,t,r,n==null?1:n)}function Rgb(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}define(Rgb,rgb,extend(Color,{brighter:function(e){return e=e==null?brighter:Math.pow(brighter,e),new Rgb(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?darker:Math.pow(darker,e),new Rgb(this.r*e,this.g*e,this.b*e,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:rgb_formatHex,formatHex:rgb_formatHex,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return"#"+hex(this.r)+hex(this.g)+hex(this.b)}function rgb_formatRgb(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"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))+(e===1?")":", "+e+")")}function hex(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function hsla(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Hsl(e,t,r,n)}function hslConvert(e){if(e instanceof Hsl)return new Hsl(e.h,e.s,e.l,e.opacity);if(e instanceof Color||(e=color(e)),!e)return new Hsl;if(e instanceof Hsl)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),l=NaN,u=o-i,h=(o+i)/2;return u?(t===o?l=(r-n)/u+(r<n)*6:r===o?l=(n-t)/u+2:l=(t-r)/u+4,u/=h<.5?o+i:2-o-i,l*=60):u=h>0&&h<1?0:l,new Hsl(l,u,h,e.opacity)}function hsl$2(e,t,r,n){return arguments.length===1?hslConvert(e):new Hsl(e,t,r,n==null?1:n)}function Hsl(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}define(Hsl,hsl$2,extend(Color,{brighter:function(e){return e=e==null?brighter:Math.pow(brighter,e),new Hsl(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?darker:Math.pow(darker,e),new Hsl(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Rgb(hsl2rgb(e>=240?e-240:e+120,i,n),hsl2rgb(e,i,n),hsl2rgb(e<120?e+240:e-120,i,n),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 e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function hsl2rgb(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var deg2rad=Math.PI/180,rad2deg=180/Math.PI,K=18,Xn=.96422,Yn=1,Zn=.82521,t0$1=4/29,t1$1=6/29,t2=3*t1$1*t1$1,t3=t1$1*t1$1*t1$1;function labConvert(e){if(e instanceof Lab)return new Lab(e.l,e.a,e.b,e.opacity);if(e instanceof Hcl)return hcl2lab(e);e instanceof Rgb||(e=rgbConvert(e));var t=rgb2lrgb(e.r),r=rgb2lrgb(e.g),n=rgb2lrgb(e.b),i=xyz2lab((.2225045*t+.7168786*r+.0606169*n)/Yn),o,l;return t===r&&r===n?o=l=i:(o=xyz2lab((.4360747*t+.3850649*r+.1430804*n)/Xn),l=xyz2lab((.0139322*t+.0971045*r+.7141733*n)/Zn)),new Lab(116*i-16,500*(o-i),200*(i-l),e.opacity)}function gray(e,t){return new Lab(e,0,0,t==null?1:t)}function lab$1(e,t,r,n){return arguments.length===1?labConvert(e):new Lab(e,t,r,n==null?1:n)}function Lab(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}define(Lab,lab$1,extend(Color,{brighter:function(e){return new Lab(this.l+K*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Lab(this.l-K*(e==null?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=Xn*lab2xyz(t),e=Yn*lab2xyz(e),r=Zn*lab2xyz(r),new Rgb(lrgb2rgb(3.1338561*t-1.6168667*e-.4906146*r),lrgb2rgb(-.9787684*t+1.9161415*e+.033454*r),lrgb2rgb(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function xyz2lab(e){return e>t3?Math.pow(e,1/3):e/t2+t0$1}function lab2xyz(e){return e>t1$1?e*e*e:t2*(e-t0$1)}function lrgb2rgb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function rgb2lrgb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function hclConvert(e){if(e instanceof Hcl)return new Hcl(e.h,e.c,e.l,e.opacity);if(e instanceof Lab||(e=labConvert(e)),e.a===0&&e.b===0)return new Hcl(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*rad2deg;return new Hcl(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function lch(e,t,r,n){return arguments.length===1?hclConvert(e):new Hcl(r,t,e,n==null?1:n)}function hcl$2(e,t,r,n){return arguments.length===1?hclConvert(e):new Hcl(e,t,r,n==null?1:n)}function Hcl(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function hcl2lab(e){if(isNaN(e.h))return new Lab(e.l,0,0,e.opacity);var t=e.h*deg2rad;return new Lab(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}define(Hcl,hcl$2,extend(Color,{brighter:function(e){return new Hcl(this.h,this.c,this.l+K*(e==null?1:e),this.opacity)},darker:function(e){return new Hcl(this.h,this.c,this.l-K*(e==null?1:e),this.opacity)},rgb:function(){return hcl2lab(this).rgb()}}));var A=-.14861,B=1.78277,C=-.29227,D=-.90649,E=1.97294,ED=E*D,EB=E*B,BC_DA=B*C-D*A;function cubehelixConvert(e){if(e instanceof Cubehelix)return new Cubehelix(e.h,e.s,e.l,e.opacity);e instanceof Rgb||(e=rgbConvert(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(BC_DA*n+ED*t-EB*r)/(BC_DA+ED-EB),o=n-i,l=(E*(r-i)-C*o)/D,u=Math.sqrt(l*l+o*o)/(E*i*(1-i)),h=u?Math.atan2(l,o)*rad2deg-120:NaN;return new Cubehelix(h<0?h+360:h,u,i,e.opacity)}function cubehelix$3(e,t,r,n){return arguments.length===1?cubehelixConvert(e):new Cubehelix(e,t,r,n==null?1:n)}function Cubehelix(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}define(Cubehelix,cubehelix$3,extend(Color,{brighter:function(e){return e=e==null?brighter:Math.pow(brighter,e),new Cubehelix(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?darker:Math.pow(darker,e),new Cubehelix(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*deg2rad,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new Rgb(255*(t+r*(A*n+B*i)),255*(t+r*(C*n+D*i)),255*(t+r*(E*n)),this.opacity)}}));function basis$1(e,t,r,n,i){var o=e*e,l=o*e;return((1-3*e+3*o-l)*t+(4-6*o+3*l)*r+(1+3*e+3*o-3*l)*n+l*i)/6}function basis$2(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],l=n>0?e[n-1]:2*i-o,u=n<t-1?e[n+2]:2*o-i;return basis$1((r-n/t)*t,l,i,o,u)}}function basisClosed$1(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],l=e[(n+1)%t],u=e[(n+2)%t];return basis$1((r-n/t)*t,i,o,l,u)}}function constant$a(e){return function(){return e}}function linear$2(e,t){return function(r){return e+r*t}}function exponential$1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function hue$1(e,t){var r=t-e;return r?linear$2(e,r>180||r<-180?r-360*Math.round(r/360):r):constant$a(isNaN(e)?t:e)}function gamma(e){return(e=+e)==1?nogamma:function(t,r){return r-t?exponential$1(t,r,e):constant$a(isNaN(t)?r:t)}}function nogamma(e,t){var r=t-e;return r?linear$2(e,r):constant$a(isNaN(e)?t:e)}const interpolateRgb=function e(t){var r=gamma(t);function n(i,o){var l=r((i=rgb(i)).r,(o=rgb(o)).r),u=r(i.g,o.g),h=r(i.b,o.b),f=nogamma(i.opacity,o.opacity);return function(d){return i.r=l(d),i.g=u(d),i.b=h(d),i.opacity=f(d),i+""}}return n.gamma=e,n}(1);function rgbSpline(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),l,u;for(l=0;l<r;++l)u=rgb(t[l]),n[l]=u.r||0,i[l]=u.g||0,o[l]=u.b||0;return n=e(n),i=e(i),o=e(o),u.opacity=1,function(h){return u.r=n(h),u.g=i(h),u.b=o(h),u+""}}}var rgbBasis=rgbSpline(basis$2),rgbBasisClosed=rgbSpline(basisClosed$1);function numberArray(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function isNumberArray(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function array$2(e,t){return(isNumberArray(t)?numberArray:genericArray)(e,t)}function genericArray(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),l;for(l=0;l<n;++l)i[l]=interpolateValue(e[l],t[l]);for(;l<r;++l)o[l]=t[l];return function(u){for(l=0;l<n;++l)o[l]=i[l](u);return o}}function date$1(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function interpolateNumber(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function object$1(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=interpolateValue(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero(e){return function(){return e}}function one(e){return function(t){return e(t)+""}}function interpolateString(e,t){var r=reA.lastIndex=reB.lastIndex=0,n,i,o,l=-1,u=[],h=[];for(e=e+"",t=t+"";(n=reA.exec(e))&&(i=reB.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),u[l]?u[l]+=o:u[++l]=o),(n=n[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,h.push({i:l,x:interpolateNumber(n,i)})),r=reB.lastIndex;return r<t.length&&(o=t.slice(r),u[l]?u[l]+=o:u[++l]=o),u.length<2?h[0]?one(h[0].x):zero(t):(t=h.length,function(f){for(var d=0,g;d<t;++d)u[(g=h[d]).i]=g.x(f);return u.join("")})}function interpolateValue(e,t){var r=typeof t,n;return t==null||r==="boolean"?constant$a(t):(r==="number"?interpolateNumber:r==="string"?(n=color(t))?(t=n,interpolateRgb):interpolateString:t instanceof color?interpolateRgb:t instanceof Date?date$1:isNumberArray(t)?numberArray:Array.isArray(t)?genericArray:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?object$1:interpolateNumber)(e,t)}function discrete(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}function hue(e,t){var r=hue$1(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}function interpolateRound(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var degrees$1=180/Math.PI,identity$7={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function decompose(e,t,r,n,i,o){var l,u,h;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(h=e*r+t*n)&&(r-=e*h,n-=t*h),(u=Math.sqrt(r*r+n*n))&&(r/=u,n/=u,h/=u),e*n<t*r&&(e=-e,t=-t,h=-h,l=-l),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*degrees$1,skewX:Math.atan(h)*degrees$1,scaleX:l,scaleY:u}}var cssNode,cssRoot,cssView,svgNode;function parseCss(e){return e==="none"?identity$7:(cssNode||(cssNode=document.createElement("DIV"),cssRoot=document.documentElement,cssView=document.defaultView),cssNode.style.transform=e,e=cssView.getComputedStyle(cssRoot.appendChild(cssNode),null).getPropertyValue("transform"),cssRoot.removeChild(cssNode),e=e.slice(7,-1).split(","),decompose(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function parseSvg(e){return e==null||(svgNode||(svgNode=document.createElementNS("http://www.w3.org/2000/svg","g")),svgNode.setAttribute("transform",e),!(e=svgNode.transform.baseVal.consolidate()))?identity$7:(e=e.matrix,decompose(e.a,e.b,e.c,e.d,e.e,e.f))}function interpolateTransform(e,t,r,n){function i(f){return f.length?f.pop()+" ":""}function o(f,d,g,p,m,b){if(f!==g||d!==p){var $=m.push("translate(",null,t,null,r);b.push({i:$-4,x:interpolateNumber(f,g)},{i:$-2,x:interpolateNumber(d,p)})}else(g||p)&&m.push("translate("+g+t+p+r)}function l(f,d,g,p){f!==d?(f-d>180?d+=360:d-f>180&&(f+=360),p.push({i:g.push(i(g)+"rotate(",null,n)-2,x:interpolateNumber(f,d)})):d&&g.push(i(g)+"rotate("+d+n)}function u(f,d,g,p){f!==d?p.push({i:g.push(i(g)+"skewX(",null,n)-2,x:interpolateNumber(f,d)}):d&&g.push(i(g)+"skewX("+d+n)}function h(f,d,g,p,m,b){if(f!==g||d!==p){var $=m.push(i(m)+"scale(",null,",",null,")");b.push({i:$-4,x:interpolateNumber(f,g)},{i:$-2,x:interpolateNumber(d,p)})}else(g!==1||p!==1)&&m.push(i(m)+"scale("+g+","+p+")")}return function(f,d){var g=[],p=[];return f=e(f),d=e(d),o(f.translateX,f.translateY,d.translateX,d.translateY,g,p),l(f.rotate,d.rotate,g,p),u(f.skewX,d.skewX,g,p),h(f.scaleX,f.scaleY,d.scaleX,d.scaleY,g,p),f=d=null,function(m){for(var b=-1,$=p.length,S;++b<$;)g[(S=p[b]).i]=S.x(m);return g.join("")}}}var interpolateTransformCss=interpolateTransform(parseCss,"px, ","px)","deg)"),interpolateTransformSvg=interpolateTransform(parseSvg,", ",")",")"),rho=Math.SQRT2,rho2=2,rho4=4,epsilon2$2=1e-12;function cosh(e){return((e=Math.exp(e))+1/e)/2}function sinh(e){return((e=Math.exp(e))-1/e)/2}function tanh(e){return((e=Math.exp(2*e))-1)/(e+1)}function interpolateZoom(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],l=t[1],u=t[2],h=o-r,f=l-n,d=h*h+f*f,g,p;if(d<epsilon2$2)p=Math.log(u/i)/rho,g=function(L){return[r+L*h,n+L*f,i*Math.exp(rho*L*p)]};else{var m=Math.sqrt(d),b=(u*u-i*i+rho4*d)/(2*i*rho2*m),$=(u*u-i*i-rho4*d)/(2*u*rho2*m),S=Math.log(Math.sqrt(b*b+1)-b),R=Math.log(Math.sqrt($*$+1)-$);p=(R-S)/rho,g=function(L){var N=L*p,F=cosh(S),H=i/(rho2*m)*(F*tanh(rho*N+S)-sinh(S));return[r+H*h,n+H*f,i*F/cosh(rho*N+S)]}}return g.duration=p*1e3,g}function hsl(e){return function(t,r){var n=e((t=hsl$2(t)).h,(r=hsl$2(r)).h),i=nogamma(t.s,r.s),o=nogamma(t.l,r.l),l=nogamma(t.opacity,r.opacity);return function(u){return t.h=n(u),t.s=i(u),t.l=o(u),t.opacity=l(u),t+""}}}const hsl$1=hsl(hue$1);var hslLong=hsl(nogamma);function lab(e,t){var r=nogamma((e=lab$1(e)).l,(t=lab$1(t)).l),n=nogamma(e.a,t.a),i=nogamma(e.b,t.b),o=nogamma(e.opacity,t.opacity);return function(l){return e.l=r(l),e.a=n(l),e.b=i(l),e.opacity=o(l),e+""}}function hcl(e){return function(t,r){var n=e((t=hcl$2(t)).h,(r=hcl$2(r)).h),i=nogamma(t.c,r.c),o=nogamma(t.l,r.l),l=nogamma(t.opacity,r.opacity);return function(u){return t.h=n(u),t.c=i(u),t.l=o(u),t.opacity=l(u),t+""}}}const hcl$1=hcl(hue$1);var hclLong=hcl(nogamma);function cubehelix$1(e){return function t(r){r=+r;function n(i,o){var l=e((i=cubehelix$3(i)).h,(o=cubehelix$3(o)).h),u=nogamma(i.s,o.s),h=nogamma(i.l,o.l),f=nogamma(i.opacity,o.opacity);return function(d){return i.h=l(d),i.s=u(d),i.l=h(Math.pow(d,r)),i.opacity=f(d),i+""}}return n.gamma=t,n}(1)}const cubehelix$2=cubehelix$1(hue$1);var cubehelixLong=cubehelix$1(nogamma);function piecewise(e,t){for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(l){var u=Math.max(0,Math.min(n-1,Math.floor(l*=n)));return o[u](l-u)}}function quantize$1(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}var frame=0,timeout$1=0,interval$1=0,pokeDelay=1e3,taskHead,taskTail,clockLast=0,clockNow=0,clockSkew=0,clock=typeof performance=="object"&&performance.now?performance:Date,setFrame=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function now(){return clockNow||(setFrame(clearNow),clockNow=clock.now()+clockSkew)}function clearNow(){clockNow=0}function Timer(){this._call=this._time=this._next=null}Timer.prototype=timer.prototype={constructor:Timer,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?now():+r)+(t==null?0:+t),!this._next&&taskTail!==this&&(taskTail?taskTail._next=this:taskHead=this,taskTail=this),this._call=e,this._time=r,sleep()},stop:function(){this._call&&(this._call=null,this._time=1/0,sleep())}};function timer(e,t,r){var n=new Timer;return n.restart(e,t,r),n}function timerFlush(){now(),++frame;for(var e=taskHead,t;e;)(t=clockNow-e._time)>=0&&e._call.call(null,t),e=e._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var e=clock.now(),t=e-clockLast;t>pokeDelay&&(clockSkew-=t,clockLast=e)}function nap(){for(var e,t=taskHead,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:taskHead=r);taskTail=e,sleep(n)}function sleep(e){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var t=e-clockNow;t>24?(e<1/0&&(timeout$1=setTimeout(wake,e-clock.now()-clockSkew)),interval$1&&(interval$1=clearInterval(interval$1))):(interval$1||(clockLast=clock.now(),interval$1=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function timeout(e,t,r){var n=new Timer;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}function interval(e,t,r){var n=new Timer,i=t;return t==null?(n.restart(e,t,r),n):(t=+t,r=r==null?now():+r,n.restart(function o(l){l+=i,n.restart(o,i+=t,r),e(l)},t,r),n)}var emptyOn=dispatch("start","end","cancel","interrupt"),emptyTween=[],CREATED=0,SCHEDULED=1,STARTING=2,STARTED=3,RUNNING=4,ENDING=5,ENDED=6;function schedule(e,t,r,n,i,o){var l=e.__transition;if(!l)e.__transition={};else if(r in l)return;create(e,r,{name:t,index:n,group:i,on:emptyOn,tween:emptyTween,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:CREATED})}function init$2(e,t){var r=get(e,t);if(r.state>CREATED)throw new Error("too late; already scheduled");return r}function set$1(e,t){var r=get(e,t);if(r.state>STARTED)throw new Error("too late; already running");return r}function get(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function create(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=timer(o,0,r.time);function o(f){r.state=SCHEDULED,r.timer.restart(l,r.delay,r.time),r.delay<=f&&l(f-r.delay)}function l(f){var d,g,p,m;if(r.state!==SCHEDULED)return h();for(d in n)if(m=n[d],m.name===r.name){if(m.state===STARTED)return timeout(l);m.state===RUNNING?(m.state=ENDED,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete n[d]):+d<t&&(m.state=ENDED,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete n[d])}if(timeout(function(){r.state===STARTED&&(r.state=RUNNING,r.timer.restart(u,r.delay,r.time),u(f))}),r.state=STARTING,r.on.call("start",e,e.__data__,r.index,r.group),r.state===STARTING){for(r.state=STARTED,i=new Array(p=r.tween.length),d=0,g=-1;d<p;++d)(m=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[++g]=m);i.length=g+1}}function u(f){for(var d=f<r.duration?r.ease.call(null,f/r.duration):(r.timer.restart(h),r.state=ENDING,1),g=-1,p=i.length;++g<p;)i[g].call(e,d);r.state===ENDING&&(r.on.call("end",e,e.__data__,r.index,r.group),h())}function h(){r.state=ENDED,r.timer.stop(),delete n[t];for(var f in n)return;delete e.__transition}}function interrupt(e,t){var r=e.__transition,n,i,o=!0,l;if(!!r){t=t==null?null:t+"";for(l in r){if((n=r[l]).name!==t){o=!1;continue}i=n.state>STARTING&&n.state<ENDING,n.state=ENDED,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[l]}o&&delete e.__transition}}function selection_interrupt(e){return this.each(function(){interrupt(this,e)})}function tweenRemove(e,t){var r,n;return function(){var i=set$1(this,e),o=i.tween;if(o!==r){n=r=o;for(var l=0,u=n.length;l<u;++l)if(n[l].name===t){n=n.slice(),n.splice(l,1);break}}i.tween=n}}function tweenFunction(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=set$1(this,e),l=o.tween;if(l!==n){i=(n=l).slice();for(var u={name:t,value:r},h=0,f=i.length;h<f;++h)if(i[h].name===t){i[h]=u;break}h===f&&i.push(u)}o.tween=i}}function transition_tween(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=get(this.node(),r).tween,i=0,o=n.length,l;i<o;++i)if((l=n[i]).name===e)return l.value;return null}return this.each((t==null?tweenRemove:tweenFunction)(r,e,t))}function tweenValue(e,t,r){var n=e._id;return e.each(function(){var i=set$1(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return get(i,n).value[t]}}function interpolate$1(e,t){var r;return(typeof t=="number"?interpolateNumber:t instanceof color?interpolateRgb:(r=color(t))?(t=r,interpolateRgb):interpolateString)(e,t)}function attrRemove(e){return function(){this.removeAttribute(e)}}function attrRemoveNS(e){return function(){this.removeAttributeNS(e.space,e.local)}}function attrConstant(e,t,r){var n,i=r+"",o;return function(){var l=this.getAttribute(e);return l===i?null:l===n?o:o=t(n=l,r)}}function attrConstantNS(e,t,r){var n,i=r+"",o;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===n?o:o=t(n=l,r)}}function attrFunction(e,t,r){var n,i,o;return function(){var l,u=r(this),h;return u==null?void this.removeAttribute(e):(l=this.getAttribute(e),h=u+"",l===h?null:l===n&&h===i?o:(i=h,o=t(n=l,u)))}}function attrFunctionNS(e,t,r){var n,i,o;return function(){var l,u=r(this),h;return u==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),h=u+"",l===h?null:l===n&&h===i?o:(i=h,o=t(n=l,u)))}}function transition_attr(e,t){var r=namespace(e),n=r==="transform"?interpolateTransformSvg:interpolate$1;return this.attrTween(e,typeof t=="function"?(r.local?attrFunctionNS:attrFunction)(r,n,tweenValue(this,"attr."+e,t)):t==null?(r.local?attrRemoveNS:attrRemove)(r):(r.local?attrConstantNS:attrConstant)(r,n,t))}function attrInterpolate(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function attrInterpolateNS(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function attrTweenNS(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&attrInterpolateNS(e,o)),r}return i._value=t,i}function attrTween(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&attrInterpolate(e,o)),r}return i._value=t,i}function transition_attrTween(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=namespace(e);return this.tween(r,(n.local?attrTweenNS:attrTween)(n,t))}function delayFunction(e,t){return function(){init$2(this,e).delay=+t.apply(this,arguments)}}function delayConstant(e,t){return t=+t,function(){init$2(this,e).delay=t}}function transition_delay(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?delayFunction:delayConstant)(t,e)):get(this.node(),t).delay}function durationFunction(e,t){return function(){set$1(this,e).duration=+t.apply(this,arguments)}}function durationConstant(e,t){return t=+t,function(){set$1(this,e).duration=t}}function transition_duration(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?durationFunction:durationConstant)(t,e)):get(this.node(),t).duration}function easeConstant(e,t){if(typeof t!="function")throw new Error;return function(){set$1(this,e).ease=t}}function transition_ease(e){var t=this._id;return arguments.length?this.each(easeConstant(t,e)):get(this.node(),t).ease}function transition_filter(e){typeof e!="function"&&(e=matcher(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],l=o.length,u=n[i]=[],h,f=0;f<l;++f)(h=o[f])&&e.call(h,h.__data__,f,o)&&u.push(h);return new Transition(n,this._parents,this._name,this._id)}function transition_merge(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),l=new Array(n),u=0;u<o;++u)for(var h=t[u],f=r[u],d=h.length,g=l[u]=new Array(d),p,m=0;m<d;++m)(p=h[m]||f[m])&&(g[m]=p);for(;u<n;++u)l[u]=t[u];return new Transition(l,this._parents,this._name,this._id)}function start$1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function onFunction(e,t,r){var n,i,o=start$1(t)?init$2:set$1;return function(){var l=o(this,e),u=l.on;u!==n&&(i=(n=u).copy()).on(t,r),l.on=i}}function transition_on(e,t){var r=this._id;return arguments.length<2?get(this.node(),r).on.on(e):this.each(onFunction(r,e,t))}function removeFunction(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(e){var t=this._name,r=this._id;typeof e!="function"&&(e=selector(e));for(var n=this._groups,i=n.length,o=new Array(i),l=0;l<i;++l)for(var u=n[l],h=u.length,f=o[l]=new Array(h),d,g,p=0;p<h;++p)(d=u[p])&&(g=e.call(d,d.__data__,p,u))&&("__data__"in d&&(g.__data__=d.__data__),f[p]=g,schedule(f[p],t,r,p,f,get(d,r)));return new Transition(o,this._parents,t,r)}function transition_selectAll(e){var t=this._name,r=this._id;typeof e!="function"&&(e=selectorAll(e));for(var n=this._groups,i=n.length,o=[],l=[],u=0;u<i;++u)for(var h=n[u],f=h.length,d,g=0;g<f;++g)if(d=h[g]){for(var p=e.call(d,d.__data__,g,h),m,b=get(d,r),$=0,S=p.length;$<S;++$)(m=p[$])&&schedule(m,t,r,$,p,b);o.push(p),l.push(d)}return new Transition(o,l,t,r)}var Selection=selection.prototype.constructor;function transition_selection(){return new Selection(this._groups,this._parents)}function styleNull(e,t){var r,n,i;return function(){var o=styleValue(this,e),l=(this.style.removeProperty(e),styleValue(this,e));return o===l?null:o===r&&l===n?i:i=t(r=o,n=l)}}function styleRemove(e){return function(){this.style.removeProperty(e)}}function styleConstant(e,t,r){var n,i=r+"",o;return function(){var l=styleValue(this,e);return l===i?null:l===n?o:o=t(n=l,r)}}function styleFunction(e,t,r){var n,i,o;return function(){var l=styleValue(this,e),u=r(this),h=u+"";return u==null&&(h=u=(this.style.removeProperty(e),styleValue(this,e))),l===h?null:l===n&&h===i?o:(i=h,o=t(n=l,u))}}function styleMaybeRemove(e,t){var r,n,i,o="style."+t,l="end."+o,u;return function(){var h=set$1(this,e),f=h.on,d=h.value[o]==null?u||(u=styleRemove(t)):void 0;(f!==r||i!==d)&&(n=(r=f).copy()).on(l,i=d),h.on=n}}function transition_style(e,t,r){var n=(e+="")=="transform"?interpolateTransformCss:interpolate$1;return t==null?this.styleTween(e,styleNull(e,n)).on("end.style."+e,styleRemove(e)):typeof t=="function"?this.styleTween(e,styleFunction(e,n,tweenValue(this,"style."+e,t))).each(styleMaybeRemove(this._id,e)):this.styleTween(e,styleConstant(e,n,t),r).on("end.style."+e,null)}function styleInterpolate(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function styleTween(e,t,r){var n,i;function o(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&styleInterpolate(e,l,r)),n}return o._value=t,o}function transition_styleTween(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,styleTween(e,t,r==null?"":r))}function textConstant(e){return function(){this.textContent=e}}function textFunction(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function transition_text(e){return this.tween("text",typeof e=="function"?textFunction(tweenValue(this,"text",e)):textConstant(e==null?"":e+""))}function textInterpolate(e){return function(t){this.textContent=e.call(this,t)}}function textTween(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&textInterpolate(i)),t}return n._value=e,n}function transition_textTween(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,textTween(e))}function transition_transition(){for(var e=this._name,t=this._id,r=newId(),n=this._groups,i=n.length,o=0;o<i;++o)for(var l=n[o],u=l.length,h,f=0;f<u;++f)if(h=l[f]){var d=get(h,t);schedule(h,e,r,f,l,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Transition(n,this._parents,e,r)}function transition_end(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,l){var u={value:l},h={value:function(){--i===0&&o()}};r.each(function(){var f=set$1(this,n),d=f.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(h)),f.on=t})})}var id$1=0;function Transition(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function transition(e){return selection().transition(e)}function newId(){return++id$1}var selection_prototype=selection.prototype;Transition.prototype=transition.prototype={constructor:Transition,select:transition_select,selectAll:transition_selectAll,filter:transition_filter,merge:transition_merge,selection:transition_selection,transition:transition_transition,call:selection_prototype.call,nodes:selection_prototype.nodes,node:selection_prototype.node,size:selection_prototype.size,empty:selection_prototype.empty,each:selection_prototype.each,on:transition_on,attr:transition_attr,attrTween:transition_attrTween,style:transition_style,styleTween:transition_styleTween,text:transition_text,textTween:transition_textTween,remove:transition_remove,tween:transition_tween,delay:transition_delay,duration:transition_duration,ease:transition_ease,end:transition_end};function linear$1(e){return+e}function quadIn(e){return e*e}function quadOut(e){return e*(2-e)}function quadInOut(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function cubicIn(e){return e*e*e}function cubicOut(e){return--e*e*e+1}function cubicInOut(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var exponent$1=3,polyIn=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(exponent$1),polyOut=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(exponent$1),polyInOut=function e(t){t=+t;function r(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return r.exponent=e,r}(exponent$1),pi$4=Math.PI,halfPi$3=pi$4/2;function sinIn(e){return+e==1?1:1-Math.cos(e*halfPi$3)}function sinOut(e){return Math.sin(e*halfPi$3)}function sinInOut(e){return(1-Math.cos(pi$4*e))/2}function tpmt(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function expIn(e){return tpmt(1-+e)}function expOut(e){return 1-tpmt(e)}function expInOut(e){return((e*=2)<=1?tpmt(1-e):2-tpmt(e-1))/2}function circleIn(e){return 1-Math.sqrt(1-e*e)}function circleOut(e){return Math.sqrt(1- --e*e)}function circleInOut(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var b1=4/11,b2=6/11,b3=8/11,b4=3/4,b5=9/11,b6=10/11,b7=15/16,b8=21/22,b9=63/64,b0=1/b1/b1;function bounceIn(e){return 1-bounceOut(1-e)}function bounceOut(e){return(e=+e)<b1?b0*e*e:e<b3?b0*(e-=b2)*e+b4:e<b6?b0*(e-=b5)*e+b7:b0*(e-=b8)*e+b9}function bounceInOut(e){return((e*=2)<=1?1-bounceOut(1-e):bounceOut(e-1)+1)/2}var overshoot=1.70158,backIn=function e(t){t=+t;function r(n){return(n=+n)*n*(t*(n-1)+n)}return r.overshoot=e,r}(overshoot),backOut=function e(t){t=+t;function r(n){return--n*n*((n+1)*t+n)+1}return r.overshoot=e,r}(overshoot),backInOut=function e(t){t=+t;function r(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}return r.overshoot=e,r}(overshoot),tau$4=2*Math.PI,amplitude=1,period=.3,elasticIn=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=tau$4);function i(o){return t*tpmt(- --o)*Math.sin((n-o)/r)}return i.amplitude=function(o){return e(o,r*tau$4)},i.period=function(o){return e(t,o)},i}(amplitude,period),elasticOut=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=tau$4);function i(o){return 1-t*tpmt(o=+o)*Math.sin((o+n)/r)}return i.amplitude=function(o){return e(o,r*tau$4)},i.period=function(o){return e(t,o)},i}(amplitude,period),elasticInOut=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=tau$4);function i(o){return((o=o*2-1)<0?t*tpmt(-o)*Math.sin((n-o)/r):2-t*tpmt(o)*Math.sin((n+o)/r))/2}return i.amplitude=function(o){return e(o,r*tau$4)},i.period=function(o){return e(t,o)},i}(amplitude,period),defaultTiming={time:null,delay:0,duration:250,ease:cubicInOut};function inherit(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return defaultTiming.time=now(),defaultTiming;return r}function selection_transition(e){var t,r;e instanceof Transition?(t=e._id,e=e._name):(t=newId(),(r=defaultTiming).time=now(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var l=n[o],u=l.length,h,f=0;f<u;++f)(h=l[f])&&schedule(h,e,t,f,l,r||inherit(h,t));return new Transition(n,this._parents,e,t)}selection.prototype.interrupt=selection_interrupt;selection.prototype.transition=selection_transition;var root$1=[null];function active(e,t){var r=e.__transition,n,i;if(r){t=t==null?null:t+"";for(i in r)if((n=r[i]).state>SCHEDULED&&n.name===t)return new Transition([[e]],root$1,t,+i)}return null}function constant$9(e){return function(){return e}}function BrushEvent(e,t,r){this.target=e,this.type=t,this.selection=r}function nopropagation$1(){event.stopImmediatePropagation()}function noevent$1(){event.preventDefault(),event.stopImmediatePropagation()}var MODE_DRAG={name:"drag"},MODE_SPACE={name:"space"},MODE_HANDLE={name:"handle"},MODE_CENTER={name:"center"};function number1(e){return[+e[0],+e[1]]}function number2(e){return[number1(e[0]),number1(e[1])]}function toucher(e){return function(t){return touch(t,event.touches,e)}}var X={name:"x",handles:["w","e"].map(type$1),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Y={name:"y",handles:["n","s"].map(type$1),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},XY={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(type$1),input:function(e){return e==null?null:number2(e)},output:function(e){return e}},cursors={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"},flipX={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},flipY={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},signsX={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},signsY={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function type$1(e){return{type:e}}function defaultFilter$1(){return!event.ctrlKey&&!event.button}function defaultExtent$1(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function defaultTouchable$1(){return navigator.maxTouchPoints||"ontouchstart"in this}function local(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function empty(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function brushSelection(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function brushX(){return brush$1(X)}function brushY(){return brush$1(Y)}function brush(){return brush$1(XY)}function brush$1(e){var t=defaultExtent$1,r=defaultFilter$1,n=defaultTouchable$1,i=!0,o=dispatch("start","brush","end"),l=6,u;function h(S){var R=S.property("__brush",$).selectAll(".overlay").data([type$1("overlay")]);R.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",cursors.overlay).merge(R).each(function(){var N=local(this).extent;select(this).attr("x",N[0][0]).attr("y",N[0][1]).attr("width",N[1][0]-N[0][0]).attr("height",N[1][1]-N[0][1])}),S.selectAll(".selection").data([type$1("selection")]).enter().append("rect").attr("class","selection").attr("cursor",cursors.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var L=S.selectAll(".handle").data(e.handles,function(N){return N.type});L.exit().remove(),L.enter().append("rect").attr("class",function(N){return"handle handle--"+N.type}).attr("cursor",function(N){return cursors[N.type]}),S.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",p).filter(n).on("touchstart.brush",p).on("touchmove.brush",m).on("touchend.brush touchcancel.brush",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}h.move=function(S,R){S.selection?S.on("start.brush",function(){d(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){d(this,arguments).end()}).tween("brush",function(){var L=this,N=L.__brush,F=d(L,arguments),H=N.selection,G=e.input(typeof R=="function"?R.apply(this,arguments):R,N.extent),P=interpolateValue(H,G);function V(z){N.selection=z===1&&G===null?null:P(z),f.call(L),F.brush()}return H!==null&&G!==null?V:V(1)}):S.each(function(){var L=this,N=arguments,F=L.__brush,H=e.input(typeof R=="function"?R.apply(L,N):R,F.extent),G=d(L,N).beforestart();interrupt(L),F.selection=H===null?null:H,f.call(L),G.start().brush().end()})},h.clear=function(S){h.move(S,null)};function f(){var S=select(this),R=local(this).selection;R?(S.selectAll(".selection").style("display",null).attr("x",R[0][0]).attr("y",R[0][1]).attr("width",R[1][0]-R[0][0]).attr("height",R[1][1]-R[0][1]),S.selectAll(".handle").style("display",null).attr("x",function(L){return L.type[L.type.length-1]==="e"?R[1][0]-l/2:R[0][0]-l/2}).attr("y",function(L){return L.type[0]==="s"?R[1][1]-l/2:R[0][1]-l/2}).attr("width",function(L){return L.type==="n"||L.type==="s"?R[1][0]-R[0][0]+l:l}).attr("height",function(L){return L.type==="e"||L.type==="w"?R[1][1]-R[0][1]+l:l})):S.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function d(S,R,L){var N=S.__brush.emitter;return N&&(!L||!N.clean)?N:new g(S,R,L)}function g(S,R,L){this.that=S,this.args=R,this.state=S.__brush,this.active=0,this.clean=L}g.prototype={beforestart:function(){return++this.active===1&&(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--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(S){customEvent(new BrushEvent(h,S,e.output(this.state.selection)),o.apply,o,[S,this.that,this.args])}};function p(){if(u&&!event.touches||!r.apply(this,arguments))return;var S=this,R=event.target.__data__.type,L=(i&&event.metaKey?R="overlay":R)==="selection"?MODE_DRAG:i&&event.altKey?MODE_CENTER:MODE_HANDLE,N=e===Y?null:signsX[R],F=e===X?null:signsY[R],H=local(S),G=H.extent,P=H.selection,V=G[0][0],z,W,T=G[0][1],U,I,ae=G[1][0],Q,ue,_e=G[1][1],ke,de,ce=0,he=0,Se,ve=N&&F&&i&&event.shiftKey,me,Ce,xe=event.touches?toucher(event.changedTouches[0].identifier):mouse,Ne=xe(S),pe=Ne,J=d(S,arguments,!0).beforestart();R==="overlay"?(P&&(Se=!0),H.selection=P=[[z=e===Y?V:Ne[0],U=e===X?T:Ne[1]],[Q=e===Y?ae:z,ke=e===X?_e:U]]):(z=P[0][0],U=P[0][1],Q=P[1][0],ke=P[1][1]),W=z,I=U,ue=Q,de=ke;var oe=select(S).attr("pointer-events","none"),ee=oe.selectAll(".overlay").attr("cursor",cursors[R]);if(event.touches)J.moved=ie,J.ended=te;else{var Z=select(event.view).on("mousemove.brush",ie,!0).on("mouseup.brush",te,!0);i&&Z.on("keydown.brush",fe,!0).on("keyup.brush",we,!0),dragDisable(event.view)}nopropagation$1(),interrupt(S),f.call(S),J.start();function ie(){var Ye=xe(S);ve&&!me&&!Ce&&(Math.abs(Ye[0]-pe[0])>Math.abs(Ye[1]-pe[1])?Ce=!0:me=!0),pe=Ye,Se=!0,noevent$1(),se()}function se(){var Ye;switch(ce=pe[0]-Ne[0],he=pe[1]-Ne[1],L){case MODE_SPACE:case MODE_DRAG:{N&&(ce=Math.max(V-z,Math.min(ae-Q,ce)),W=z+ce,ue=Q+ce),F&&(he=Math.max(T-U,Math.min(_e-ke,he)),I=U+he,de=ke+he);break}case MODE_HANDLE:{N<0?(ce=Math.max(V-z,Math.min(ae-z,ce)),W=z+ce,ue=Q):N>0&&(ce=Math.max(V-Q,Math.min(ae-Q,ce)),W=z,ue=Q+ce),F<0?(he=Math.max(T-U,Math.min(_e-U,he)),I=U+he,de=ke):F>0&&(he=Math.max(T-ke,Math.min(_e-ke,he)),I=U,de=ke+he);break}case MODE_CENTER:{N&&(W=Math.max(V,Math.min(ae,z-ce*N)),ue=Math.max(V,Math.min(ae,Q+ce*N))),F&&(I=Math.max(T,Math.min(_e,U-he*F)),de=Math.max(T,Math.min(_e,ke+he*F)));break}}ue<W&&(N*=-1,Ye=z,z=Q,Q=Ye,Ye=W,W=ue,ue=Ye,R in flipX&&ee.attr("cursor",cursors[R=flipX[R]])),de<I&&(F*=-1,Ye=U,U=ke,ke=Ye,Ye=I,I=de,de=Ye,R in flipY&&ee.attr("cursor",cursors[R=flipY[R]])),H.selection&&(P=H.selection),me&&(W=P[0][0],ue=P[1][0]),Ce&&(I=P[0][1],de=P[1][1]),(P[0][0]!==W||P[0][1]!==I||P[1][0]!==ue||P[1][1]!==de)&&(H.selection=[[W,I],[ue,de]],f.call(S),J.brush())}function te(){if(nopropagation$1(),event.touches){if(event.touches.length)return;u&&clearTimeout(u),u=setTimeout(function(){u=null},500)}else yesdrag(event.view,Se),Z.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);oe.attr("pointer-events","all"),ee.attr("cursor",cursors.overlay),H.selection&&(P=H.selection),empty(P)&&(H.selection=null,f.call(S)),J.end()}function fe(){switch(event.keyCode){case 16:{ve=N&&F;break}case 18:{L===MODE_HANDLE&&(N&&(Q=ue-ce*N,z=W+ce*N),F&&(ke=de-he*F,U=I+he*F),L=MODE_CENTER,se());break}case 32:{(L===MODE_HANDLE||L===MODE_CENTER)&&(N<0?Q=ue-ce:N>0&&(z=W-ce),F<0?ke=de-he:F>0&&(U=I-he),L=MODE_SPACE,ee.attr("cursor",cursors.selection),se());break}default:return}noevent$1()}function we(){switch(event.keyCode){case 16:{ve&&(me=Ce=ve=!1,se());break}case 18:{L===MODE_CENTER&&(N<0?Q=ue:N>0&&(z=W),F<0?ke=de:F>0&&(U=I),L=MODE_HANDLE,se());break}case 32:{L===MODE_SPACE&&(event.altKey?(N&&(Q=ue-ce*N,z=W+ce*N),F&&(ke=de-he*F,U=I+he*F),L=MODE_CENTER):(N<0?Q=ue:N>0&&(z=W),F<0?ke=de:F>0&&(U=I),L=MODE_HANDLE),ee.attr("cursor",cursors[R]),se());break}default:return}noevent$1()}}function m(){d(this,arguments).moved()}function b(){d(this,arguments).ended()}function $(){var S=this.__brush||{selection:null};return S.extent=number2(t.apply(this,arguments)),S.dim=e,S}return h.extent=function(S){return arguments.length?(t=typeof S=="function"?S:constant$9(number2(S)),h):t},h.filter=function(S){return arguments.length?(r=typeof S=="function"?S:constant$9(!!S),h):r},h.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:constant$9(!!S),h):n},h.handleSize=function(S){return arguments.length?(l=+S,h):l},h.keyModifiers=function(S){return arguments.length?(i=!!S,h):i},h.on=function(){var S=o.on.apply(o,arguments);return S===o?h:S},h}var cos$2=Math.cos,sin$2=Math.sin,pi$3=Math.PI,halfPi$2=pi$3/2,tau$3=pi$3*2,max$1=Math.max;function compareValue(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function chord(){var e=0,t=null,r=null,n=null;function i(o){var l=o.length,u=[],h=sequence(l),f=[],d=[],g=d.groups=new Array(l),p=new Array(l*l),m,b,$,S,R,L;for(m=0,R=-1;++R<l;){for(b=0,L=-1;++L<l;)b+=o[R][L];u.push(b),f.push(sequence(l)),m+=b}for(t&&h.sort(function(W,T){return t(u[W],u[T])}),r&&f.forEach(function(W,T){W.sort(function(U,I){return r(o[T][U],o[T][I])})}),m=max$1(0,tau$3-e*l)/m,S=m?e:tau$3/l,b=0,R=-1;++R<l;){for($=b,L=-1;++L<l;){var N=h[R],F=f[N][L],H=o[N][F],G=b,P=b+=H*m;p[F*l+N]={index:N,subindex:F,startAngle:G,endAngle:P,value:H}}g[N]={index:N,startAngle:$,endAngle:b,value:u[N]},b+=S}for(R=-1;++R<l;)for(L=R-1;++L<l;){var V=p[L*l+R],z=p[R*l+L];(V.value||z.value)&&d.push(V.value<z.value?{source:z,target:V}:{source:V,target:z})}return n?d.sort(n):d}return i.padAngle=function(o){return arguments.length?(e=max$1(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(r=o,i):r},i.sortChords=function(o){return arguments.length?(o==null?n=null:(n=compareValue(o))._=o,i):n&&n._},i}var slice$4=Array.prototype.slice;function constant$8(e){return function(){return e}}var pi$2=Math.PI,tau$2=2*pi$2,epsilon$3=1e-6,tauEpsilon=tau$2-epsilon$3;function Path(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function path(){return new Path}Path.prototype=path.prototype={constructor:Path,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,l=this._y1,u=r-e,h=n-t,f=o-e,d=l-t,g=f*f+d*d;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(g>epsilon$3)if(!(Math.abs(d*u-h*f)>epsilon$3)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=r-o,m=n-l,b=u*u+h*h,$=p*p+m*m,S=Math.sqrt(b),R=Math.sqrt(g),L=i*Math.tan((pi$2-Math.acos((b+g-$)/(2*S*R)))/2),N=L/R,F=L/S;Math.abs(N-1)>epsilon$3&&(this._+="L"+(e+N*f)+","+(t+N*d)),this._+="A"+i+","+i+",0,0,"+ +(d*p>f*m)+","+(this._x1=e+F*u)+","+(this._y1=t+F*h)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r,o=!!o;var l=r*Math.cos(n),u=r*Math.sin(n),h=e+l,f=t+u,d=1^o,g=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+h+","+f:(Math.abs(this._x1-h)>epsilon$3||Math.abs(this._y1-f)>epsilon$3)&&(this._+="L"+h+","+f),r&&(g<0&&(g=g%tau$2+tau$2),g>tauEpsilon?this._+="A"+r+","+r+",0,1,"+d+","+(e-l)+","+(t-u)+"A"+r+","+r+",0,1,"+d+","+(this._x1=h)+","+(this._y1=f):g>epsilon$3&&(this._+="A"+r+","+r+",0,"+ +(g>=pi$2)+","+d+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function defaultSource$1(e){return e.source}function defaultTarget(e){return e.target}function defaultRadius$1(e){return e.radius}function defaultStartAngle(e){return e.startAngle}function defaultEndAngle(e){return e.endAngle}function ribbon(){var e=defaultSource$1,t=defaultTarget,r=defaultRadius$1,n=defaultStartAngle,i=defaultEndAngle,o=null;function l(){var u,h=slice$4.call(arguments),f=e.apply(this,h),d=t.apply(this,h),g=+r.apply(this,(h[0]=f,h)),p=n.apply(this,h)-halfPi$2,m=i.apply(this,h)-halfPi$2,b=g*cos$2(p),$=g*sin$2(p),S=+r.apply(this,(h[0]=d,h)),R=n.apply(this,h)-halfPi$2,L=i.apply(this,h)-halfPi$2;if(o||(o=u=path()),o.moveTo(b,$),o.arc(0,0,g,p,m),(p!==R||m!==L)&&(o.quadraticCurveTo(0,0,S*cos$2(R),S*sin$2(R)),o.arc(0,0,S,R,L)),o.quadraticCurveTo(0,0,b,$),o.closePath(),u)return o=null,u+""||null}return l.radius=function(u){return arguments.length?(r=typeof u=="function"?u:constant$8(+u),l):r},l.startAngle=function(u){return arguments.length?(n=typeof u=="function"?u:constant$8(+u),l):n},l.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:constant$8(+u),l):i},l.source=function(u){return arguments.length?(e=u,l):e},l.target=function(u){return arguments.length?(t=u,l):t},l.context=function(u){return arguments.length?(o=u==null?null:u,l):o},l}var prefix="$";function Map$3(){}Map$3.prototype=map$2.prototype={constructor:Map$3,has:function(e){return prefix+e in this},get:function(e){return this[prefix+e]},set:function(e,t){return this[prefix+e]=t,this},remove:function(e){var t=prefix+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===prefix&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===prefix&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===prefix&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===prefix&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===prefix&&++e;return e},empty:function(){for(var e in this)if(e[0]===prefix)return!1;return!0},each:function(e){for(var t in this)t[0]===prefix&&e(this[t],t.slice(1),this)}};function map$2(e,t){var r=new Map$3;if(e instanceof Map$3)e.each(function(u,h){r.set(h,u)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var l in e)r.set(l,e[l]);return r}function nest(){var e=[],t=[],r,n,i;function o(u,h,f,d){if(h>=e.length)return r!=null&&u.sort(r),n!=null?n(u):u;for(var g=-1,p=u.length,m=e[h++],b,$,S=map$2(),R,L=f();++g<p;)(R=S.get(b=m($=u[g])+""))?R.push($):S.set(b,[$]);return S.each(function(N,F){d(L,F,o(N,h,f,d))}),L}function l(u,h){if(++h>e.length)return u;var f,d=t[h-1];return n!=null&&h>=e.length?f=u.entries():(f=[],u.each(function(g,p){f.push({key:p,values:l(g,h)})})),d!=null?f.sort(function(g,p){return d(g.key,p.key)}):f}return i={object:function(u){return o(u,0,createObject,setObject)},map:function(u){return o(u,0,createMap,setMap)},entries:function(u){return l(o(u,0,createMap,setMap),0)},key:function(u){return e.push(u),i},sortKeys:function(u){return t[e.length-1]=u,i},sortValues:function(u){return r=u,i},rollup:function(u){return n=u,i}}}function createObject(){return{}}function setObject(e,t,r){e[t]=r}function createMap(){return map$2()}function setMap(e,t,r){e.set(t,r)}function Set$1(){}var proto=map$2.prototype;Set$1.prototype=set.prototype={constructor:Set$1,has:proto.has,add:function(e){return e+="",this[prefix+e]=e,this},remove:proto.remove,clear:proto.clear,values:proto.keys,size:proto.size,empty:proto.empty,each:proto.each};function set(e,t){var r=new Set$1;if(e instanceof Set$1)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}function keys(e){var t=[];for(var r in e)t.push(r);return t}function values(e){var t=[];for(var r in e)t.push(e[r]);return t}function entries(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t}var array$1=Array.prototype,slice$3=array$1.slice;function ascending$1(e,t){return e-t}function area$3(e){for(var t=0,r=e.length,n=e[r-1][1]*e[0][0]-e[r-1][0]*e[0][1];++t<r;)n+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return n}function constant$7(e){return function(){return e}}function contains$2(e,t){for(var r=-1,n=t.length,i;++r<n;)if(i=ringContains(e,t[r]))return i;return 0}function ringContains(e,t){for(var r=t[0],n=t[1],i=-1,o=0,l=e.length,u=l-1;o<l;u=o++){var h=e[o],f=h[0],d=h[1],g=e[u],p=g[0],m=g[1];if(segmentContains(h,g,t))return 0;d>n!=m>n&&r<(p-f)*(n-d)/(m-d)+f&&(i=-i)}return i}function segmentContains(e,t,r){var n;return collinear(e,t,r)&&within(e[n=+(e[0]===t[0])],r[n],t[n])}function collinear(e,t,r){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])}function within(e,t,r){return e<=t&&t<=r||r<=t&&t<=e}function noop$2(){}var cases=[[],[[[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 contours(){var e=1,t=1,r=thresholdSturges,n=h;function i(f){var d=r(f);if(Array.isArray(d))d=d.slice().sort(ascending$1);else{var g=extent$1(f),p=g[0],m=g[1];d=tickStep(p,m,d),d=sequence(Math.floor(p/d)*d,Math.floor(m/d)*d,d)}return d.map(function(b){return o(f,b)})}function o(f,d){var g=[],p=[];return l(f,d,function(m){n(m,f,d),area$3(m)>0?g.push([m]):p.push(m)}),p.forEach(function(m){for(var b=0,$=g.length,S;b<$;++b)if(contains$2((S=g[b])[0],m)!==-1){S.push(m);return}}),{type:"MultiPolygon",value:d,coordinates:g}}function l(f,d,g){var p=new Array,m=new Array,b,$,S,R,L,N;for(b=$=-1,R=f[0]>=d,cases[R<<1].forEach(F);++b<e-1;)S=R,R=f[b+1]>=d,cases[S|R<<1].forEach(F);for(cases[R<<0].forEach(F);++$<t-1;){for(b=-1,R=f[$*e+e]>=d,L=f[$*e]>=d,cases[R<<1|L<<2].forEach(F);++b<e-1;)S=R,R=f[$*e+e+b+1]>=d,N=L,L=f[$*e+b+1]>=d,cases[S|R<<1|L<<2|N<<3].forEach(F);cases[R|L<<3].forEach(F)}for(b=-1,L=f[$*e]>=d,cases[L<<2].forEach(F);++b<e-1;)N=L,L=f[$*e+b+1]>=d,cases[L<<2|N<<3].forEach(F);cases[L<<3].forEach(F);function F(H){var G=[H[0][0]+b,H[0][1]+$],P=[H[1][0]+b,H[1][1]+$],V=u(G),z=u(P),W,T;(W=m[V])?(T=p[z])?(delete m[W.end],delete p[T.start],W===T?(W.ring.push(P),g(W.ring)):p[W.start]=m[T.end]={start:W.start,end:T.end,ring:W.ring.concat(T.ring)}):(delete m[W.end],W.ring.push(P),m[W.end=z]=W):(W=p[z])?(T=m[V])?(delete p[W.start],delete m[T.end],W===T?(W.ring.push(P),g(W.ring)):p[T.start]=m[W.end]={start:T.start,end:W.end,ring:T.ring.concat(W.ring)}):(delete p[W.start],W.ring.unshift(G),p[W.start=V]=W):p[V]=m[z]={start:V,end:z,ring:[G,P]}}}function u(f){return f[0]*2+f[1]*(e+1)*4}function h(f,d,g){f.forEach(function(p){var m=p[0],b=p[1],$=m|0,S=b|0,R,L=d[S*e+$];m>0&&m<e&&$===m&&(R=d[S*e+$-1],p[0]=m+(g-R)/(L-R)-.5),b>0&&b<t&&S===b&&(R=d[(S-1)*e+$],p[1]=b+(g-R)/(L-R)-.5)})}return i.contour=o,i.size=function(f){if(!arguments.length)return[e,t];var d=Math.ceil(f[0]),g=Math.ceil(f[1]);if(!(d>0)||!(g>0))throw new Error("invalid size");return e=d,t=g,i},i.thresholds=function(f){return arguments.length?(r=typeof f=="function"?f:Array.isArray(f)?constant$7(slice$3.call(f)):constant$7(f),i):r},i.smooth=function(f){return arguments.length?(n=f?h:noop$2,i):n===h},i}function blurX(e,t,r){for(var n=e.width,i=e.height,o=(r<<1)+1,l=0;l<i;++l)for(var u=0,h=0;u<n+r;++u)u<n&&(h+=e.data[u+l*n]),u>=r&&(u>=o&&(h-=e.data[u-o+l*n]),t.data[u-r+l*n]=h/Math.min(u+1,n-1+o-u,o))}function blurY(e,t,r){for(var n=e.width,i=e.height,o=(r<<1)+1,l=0;l<n;++l)for(var u=0,h=0;u<i+r;++u)u<i&&(h+=e.data[l+u*n]),u>=r&&(u>=o&&(h-=e.data[l+(u-o)*n]),t.data[l+(u-r)*n]=h/Math.min(u+1,i-1+o-u,o))}function defaultX$1(e){return e[0]}function defaultY$1(e){return e[1]}function defaultWeight(){return 1}function density(){var e=defaultX$1,t=defaultY$1,r=defaultWeight,n=960,i=500,o=20,l=2,u=o*3,h=n+u*2>>l,f=i+u*2>>l,d=constant$7(20);function g(R){var L=new Float32Array(h*f),N=new Float32Array(h*f);R.forEach(function(G,P,V){var z=+e(G,P,V)+u>>l,W=+t(G,P,V)+u>>l,T=+r(G,P,V);z>=0&&z<h&&W>=0&&W<f&&(L[z+W*h]+=T)}),blurX({width:h,height:f,data:L},{width:h,height:f,data:N},o>>l),blurY({width:h,height:f,data:N},{width:h,height:f,data:L},o>>l),blurX({width:h,height:f,data:L},{width:h,height:f,data:N},o>>l),blurY({width:h,height:f,data:N},{width:h,height:f,data:L},o>>l),blurX({width:h,height:f,data:L},{width:h,height:f,data:N},o>>l),blurY({width:h,height:f,data:N},{width:h,height:f,data:L},o>>l);var F=d(L);if(!Array.isArray(F)){var H=max$2(L);F=tickStep(0,H,F),F=sequence(0,Math.floor(H/F)*F,F),F.shift()}return contours().thresholds(F).size([h,f])(L).map(p)}function p(R){return R.value*=Math.pow(2,-2*l),R.coordinates.forEach(m),R}function m(R){R.forEach(b)}function b(R){R.forEach($)}function $(R){R[0]=R[0]*Math.pow(2,l)-u,R[1]=R[1]*Math.pow(2,l)-u}function S(){return u=o*3,h=n+u*2>>l,f=i+u*2>>l,g}return g.x=function(R){return arguments.length?(e=typeof R=="function"?R:constant$7(+R),g):e},g.y=function(R){return arguments.length?(t=typeof R=="function"?R:constant$7(+R),g):t},g.weight=function(R){return arguments.length?(r=typeof R=="function"?R:constant$7(+R),g):r},g.size=function(R){if(!arguments.length)return[n,i];var L=Math.ceil(R[0]),N=Math.ceil(R[1]);if(!(L>=0)&&!(L>=0))throw new Error("invalid size");return n=L,i=N,S()},g.cellSize=function(R){if(!arguments.length)return 1<<l;if(!((R=+R)>=1))throw new Error("invalid cell size");return l=Math.floor(Math.log(R)/Math.LN2),S()},g.thresholds=function(R){return arguments.length?(d=typeof R=="function"?R:Array.isArray(R)?constant$7(slice$3.call(R)):constant$7(R),g):d},g.bandwidth=function(R){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((R=+R)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*R*R+1)-1)/2),S()},g}var EOL={},EOF={},QUOTE=34,NEWLINE=10,RETURN=13;function objectConverter(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function customConverter(e,t){var r=objectConverter(e);return function(n,i){return t(r(n),i,e)}}function inferColumns(e){var t=Object.create(null),r=[];return e.forEach(function(n){for(var i in n)i in t||r.push(t[i]=i)}),r}function pad$1(e,t){var r=e+"",n=r.length;return n<t?new Array(t-n+1).join(0)+r:r}function formatYear$1(e){return e<0?"-"+pad$1(-e,6):e>9999?"+"+pad$1(e,6):pad$1(e,4)}function formatDate(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":formatYear$1(e.getUTCFullYear())+"-"+pad$1(e.getUTCMonth()+1,2)+"-"+pad$1(e.getUTCDate(),2)+(i?"T"+pad$1(t,2)+":"+pad$1(r,2)+":"+pad$1(n,2)+"."+pad$1(i,3)+"Z":n?"T"+pad$1(t,2)+":"+pad$1(r,2)+":"+pad$1(n,2)+"Z":r||t?"T"+pad$1(t,2)+":"+pad$1(r,2)+"Z":"")}function dsvFormat(e){var t=new RegExp('["'+e+`
|
|
\r]`),r=e.charCodeAt(0);function n(g,p){var m,b,$=i(g,function(S,R){if(m)return m(S,R-1);b=S,m=p?customConverter(S,p):objectConverter(S)});return $.columns=b||[],$}function i(g,p){var m=[],b=g.length,$=0,S=0,R,L=b<=0,N=!1;g.charCodeAt(b-1)===NEWLINE&&--b,g.charCodeAt(b-1)===RETURN&&--b;function F(){if(L)return EOF;if(N)return N=!1,EOL;var G,P=$,V;if(g.charCodeAt(P)===QUOTE){for(;$++<b&&g.charCodeAt($)!==QUOTE||g.charCodeAt(++$)===QUOTE;);return(G=$)>=b?L=!0:(V=g.charCodeAt($++))===NEWLINE?N=!0:V===RETURN&&(N=!0,g.charCodeAt($)===NEWLINE&&++$),g.slice(P+1,G-1).replace(/""/g,'"')}for(;$<b;){if((V=g.charCodeAt(G=$++))===NEWLINE)N=!0;else if(V===RETURN)N=!0,g.charCodeAt($)===NEWLINE&&++$;else if(V!==r)continue;return g.slice(P,G)}return L=!0,g.slice(P,b)}for(;(R=F())!==EOF;){for(var H=[];R!==EOL&&R!==EOF;)H.push(R),R=F();p&&(H=p(H,S++))==null||m.push(H)}return m}function o(g,p){return g.map(function(m){return p.map(function(b){return d(m[b])}).join(e)})}function l(g,p){return p==null&&(p=inferColumns(g)),[p.map(d).join(e)].concat(o(g,p)).join(`
|
|
`)}function u(g,p){return p==null&&(p=inferColumns(g)),o(g,p).join(`
|
|
`)}function h(g){return g.map(f).join(`
|
|
`)}function f(g){return g.map(d).join(e)}function d(g){return g==null?"":g instanceof Date?formatDate(g):t.test(g+="")?'"'+g.replace(/"/g,'""')+'"':g}return{parse:n,parseRows:i,format:l,formatBody:u,formatRows:h,formatRow:f,formatValue:d}}var csv$1=dsvFormat(","),csvParse=csv$1.parse,csvParseRows=csv$1.parseRows,csvFormat=csv$1.format,csvFormatBody=csv$1.formatBody,csvFormatRows=csv$1.formatRows,csvFormatRow=csv$1.formatRow,csvFormatValue=csv$1.formatValue,tsv$1=dsvFormat(" "),tsvParse=tsv$1.parse,tsvParseRows=tsv$1.parseRows,tsvFormat=tsv$1.format,tsvFormatBody=tsv$1.formatBody,tsvFormatRows=tsv$1.formatRows,tsvFormatRow=tsv$1.formatRow,tsvFormatValue=tsv$1.formatValue;function autoType(e){for(var t in e){var r=e[t].trim(),n,i;if(!r)r=null;else if(r==="true")r=!0;else if(r==="false")r=!1;else if(r==="NaN")r=NaN;else if(!isNaN(n=+r))r=n;else if(i=r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))fixtz&&!!i[4]&&!i[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;e[t]=r}return e}var fixtz=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function responseBlob(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function blob(e,t){return fetch(e,t).then(responseBlob)}function responseArrayBuffer(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function buffer(e,t){return fetch(e,t).then(responseArrayBuffer)}function responseText(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function text(e,t){return fetch(e,t).then(responseText)}function dsvParse(e){return function(t,r,n){return arguments.length===2&&typeof r=="function"&&(n=r,r=void 0),text(t,r).then(function(i){return e(i,n)})}}function dsv(e,t,r,n){arguments.length===3&&typeof r=="function"&&(n=r,r=void 0);var i=dsvFormat(e);return text(t,r).then(function(o){return i.parse(o,n)})}var csv=dsvParse(csvParse),tsv=dsvParse(tsvParse);function image(e,t){return new Promise(function(r,n){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=n,i.onload=function(){r(i)},i.src=e})}function responseJson(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function json(e,t){return fetch(e,t).then(responseJson)}function parser$c(e){return function(t,r){return text(t,r).then(function(n){return new DOMParser().parseFromString(n,e)})}}const xml=parser$c("application/xml");var html=parser$c("text/html"),svg=parser$c("image/svg+xml");function center(e,t){var r;e==null&&(e=0),t==null&&(t=0);function n(){var i,o=r.length,l,u=0,h=0;for(i=0;i<o;++i)l=r[i],u+=l.x,h+=l.y;for(u=u/o-e,h=h/o-t,i=0;i<o;++i)l=r[i],l.x-=u,l.y-=h}return n.initialize=function(i){r=i},n.x=function(i){return arguments.length?(e=+i,n):e},n.y=function(i){return arguments.length?(t=+i,n):t},n}function constant$6(e){return function(){return e}}function jiggle(){return(Math.random()-.5)*1e-6}function tree_add(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return add$1(this.cover(t,r),t,r,e)}function add$1(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o=e._root,l={data:n},u=e._x0,h=e._y0,f=e._x1,d=e._y1,g,p,m,b,$,S,R,L;if(!o)return e._root=l,e;for(;o.length;)if(($=t>=(g=(u+f)/2))?u=g:f=g,(S=r>=(p=(h+d)/2))?h=p:d=p,i=o,!(o=o[R=S<<1|$]))return i[R]=l,e;if(m=+e._x.call(null,o.data),b=+e._y.call(null,o.data),t===m&&r===b)return l.next=o,i?i[R]=l:e._root=l,e;do i=i?i[R]=new Array(4):e._root=new Array(4),($=t>=(g=(u+f)/2))?u=g:f=g,(S=r>=(p=(h+d)/2))?h=p:d=p;while((R=S<<1|$)===(L=(b>=p)<<1|m>=g));return i[L]=o,i[R]=l,e}function addAll(e){var t,r,n=e.length,i,o,l=new Array(n),u=new Array(n),h=1/0,f=1/0,d=-1/0,g=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(l[r]=i,u[r]=o,i<h&&(h=i),i>d&&(d=i),o<f&&(f=o),o>g&&(g=o));if(h>d||f>g)return this;for(this.cover(h,f).cover(d,g),r=0;r<n;++r)add$1(this,l[r],u[r],e[r]);return this}function tree_cover(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var l=i-r,u=this._root,h,f;r>e||e>=i||n>t||t>=o;)switch(f=(t<n)<<1|e<r,h=new Array(4),h[f]=u,u=h,l*=2,f){case 0:i=r+l,o=n+l;break;case 1:r=i-l,o=n+l;break;case 2:i=r+l,n=o-l;break;case 3:r=i-l,n=o-l;break}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function tree_data(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function tree_extent(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Quad(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function tree_find(e,t,r){var n,i=this._x0,o=this._y0,l,u,h,f,d=this._x1,g=this._y1,p=[],m=this._root,b,$;for(m&&p.push(new Quad(m,i,o,d,g)),r==null?r=1/0:(i=e-r,o=t-r,d=e+r,g=t+r,r*=r);b=p.pop();)if(!(!(m=b.node)||(l=b.x0)>d||(u=b.y0)>g||(h=b.x1)<i||(f=b.y1)<o))if(m.length){var S=(l+h)/2,R=(u+f)/2;p.push(new Quad(m[3],S,R,h,f),new Quad(m[2],l,R,S,f),new Quad(m[1],S,u,h,R),new Quad(m[0],l,u,S,R)),($=(t>=R)<<1|e>=S)&&(b=p[p.length-1],p[p.length-1]=p[p.length-1-$],p[p.length-1-$]=b)}else{var L=e-+this._x.call(null,m.data),N=t-+this._y.call(null,m.data),F=L*L+N*N;if(F<r){var H=Math.sqrt(r=F);i=e-H,o=t-H,d=e+H,g=t+H,n=m.data}}return n}function tree_remove(e){if(isNaN(d=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e)))return this;var t,r=this._root,n,i,o,l=this._x0,u=this._y0,h=this._x1,f=this._y1,d,g,p,m,b,$,S,R;if(!r)return this;if(r.length)for(;;){if((b=d>=(p=(l+h)/2))?l=p:h=p,($=g>=(m=(u+f)/2))?u=m:f=m,t=r,!(r=r[S=$<<1|b]))return this;if(!r.length)break;(t[S+1&3]||t[S+2&3]||t[S+3&3])&&(n=t,R=S)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,i?(o?i.next=o:delete i.next,this):t?(o?t[S]=o:delete t[S],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[R]=r:this._root=r),this):(this._root=o,this)}function removeAll(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function tree_root(){return this._root}function tree_size(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function tree_visit(e){var t=[],r,n=this._root,i,o,l,u,h;for(n&&t.push(new Quad(n,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(n=r.node,o=r.x0,l=r.y0,u=r.x1,h=r.y1)&&n.length){var f=(o+u)/2,d=(l+h)/2;(i=n[3])&&t.push(new Quad(i,f,d,u,h)),(i=n[2])&&t.push(new Quad(i,o,d,f,h)),(i=n[1])&&t.push(new Quad(i,f,l,u,d)),(i=n[0])&&t.push(new Quad(i,o,l,f,d))}return this}function tree_visitAfter(e){var t=[],r=[],n;for(this._root&&t.push(new Quad(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var o,l=n.x0,u=n.y0,h=n.x1,f=n.y1,d=(l+h)/2,g=(u+f)/2;(o=i[0])&&t.push(new Quad(o,l,u,d,g)),(o=i[1])&&t.push(new Quad(o,d,u,h,g)),(o=i[2])&&t.push(new Quad(o,l,g,d,f)),(o=i[3])&&t.push(new Quad(o,d,g,h,f))}r.push(n)}for(;n=r.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}function defaultX(e){return e[0]}function tree_x(e){return arguments.length?(this._x=e,this):this._x}function defaultY(e){return e[1]}function tree_y(e){return arguments.length?(this._y=e,this):this._y}function quadtree(e,t,r){var n=new Quadtree(t==null?defaultX:t,r==null?defaultY:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function Quadtree(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function leaf_copy(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var treeProto=quadtree.prototype=Quadtree.prototype;treeProto.copy=function(){var e=new Quadtree(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,n;if(!t)return e;if(!t.length)return e._root=leaf_copy(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?r.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=leaf_copy(n));return e};treeProto.add=tree_add;treeProto.addAll=addAll;treeProto.cover=tree_cover;treeProto.data=tree_data;treeProto.extent=tree_extent;treeProto.find=tree_find;treeProto.remove=tree_remove;treeProto.removeAll=removeAll;treeProto.root=tree_root;treeProto.size=tree_size;treeProto.visit=tree_visit;treeProto.visitAfter=tree_visitAfter;treeProto.x=tree_x;treeProto.y=tree_y;function x$4(e){return e.x+e.vx}function y$4(e){return e.y+e.vy}function collide(e){var t,r,n=1,i=1;typeof e!="function"&&(e=constant$6(e==null?1:+e));function o(){for(var h,f=t.length,d,g,p,m,b,$,S=0;S<i;++S)for(d=quadtree(t,x$4,y$4).visitAfter(l),h=0;h<f;++h)g=t[h],b=r[g.index],$=b*b,p=g.x+g.vx,m=g.y+g.vy,d.visit(R);function R(L,N,F,H,G){var P=L.data,V=L.r,z=b+V;if(P){if(P.index>g.index){var W=p-P.x-P.vx,T=m-P.y-P.vy,U=W*W+T*T;U<z*z&&(W===0&&(W=jiggle(),U+=W*W),T===0&&(T=jiggle(),U+=T*T),U=(z-(U=Math.sqrt(U)))/U*n,g.vx+=(W*=U)*(z=(V*=V)/($+V)),g.vy+=(T*=U)*z,P.vx-=W*(z=1-z),P.vy-=T*z)}return}return N>p+z||H<p-z||F>m+z||G<m-z}}function l(h){if(h.data)return h.r=r[h.data.index];for(var f=h.r=0;f<4;++f)h[f]&&h[f].r>h.r&&(h.r=h[f].r)}function u(){if(!!t){var h,f=t.length,d;for(r=new Array(f),h=0;h<f;++h)d=t[h],r[d.index]=+e(d,h,t)}}return o.initialize=function(h){t=h,u()},o.iterations=function(h){return arguments.length?(i=+h,o):i},o.strength=function(h){return arguments.length?(n=+h,o):n},o.radius=function(h){return arguments.length?(e=typeof h=="function"?h:constant$6(+h),u(),o):e},o}function index$3(e){return e.index}function find(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function link$2(e){var t=index$3,r=d,n,i=constant$6(30),o,l,u,h,f=1;e==null&&(e=[]);function d($){return 1/Math.min(u[$.source.index],u[$.target.index])}function g($){for(var S=0,R=e.length;S<f;++S)for(var L=0,N,F,H,G,P,V,z;L<R;++L)N=e[L],F=N.source,H=N.target,G=H.x+H.vx-F.x-F.vx||jiggle(),P=H.y+H.vy-F.y-F.vy||jiggle(),V=Math.sqrt(G*G+P*P),V=(V-o[L])/V*$*n[L],G*=V,P*=V,H.vx-=G*(z=h[L]),H.vy-=P*z,F.vx+=G*(z=1-z),F.vy+=P*z}function p(){if(!!l){var $,S=l.length,R=e.length,L=map$2(l,t),N;for($=0,u=new Array(S);$<R;++$)N=e[$],N.index=$,typeof N.source!="object"&&(N.source=find(L,N.source)),typeof N.target!="object"&&(N.target=find(L,N.target)),u[N.source.index]=(u[N.source.index]||0)+1,u[N.target.index]=(u[N.target.index]||0)+1;for($=0,h=new Array(R);$<R;++$)N=e[$],h[$]=u[N.source.index]/(u[N.source.index]+u[N.target.index]);n=new Array(R),m(),o=new Array(R),b()}}function m(){if(!!l)for(var $=0,S=e.length;$<S;++$)n[$]=+r(e[$],$,e)}function b(){if(!!l)for(var $=0,S=e.length;$<S;++$)o[$]=+i(e[$],$,e)}return g.initialize=function($){l=$,p()},g.links=function($){return arguments.length?(e=$,p(),g):e},g.id=function($){return arguments.length?(t=$,g):t},g.iterations=function($){return arguments.length?(f=+$,g):f},g.strength=function($){return arguments.length?(r=typeof $=="function"?$:constant$6(+$),m(),g):r},g.distance=function($){return arguments.length?(i=typeof $=="function"?$:constant$6(+$),b(),g):i},g}function x$3(e){return e.x}function y$3(e){return e.y}var initialRadius=10,initialAngle=Math.PI*(3-Math.sqrt(5));function simulation(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,l=.6,u=map$2(),h=timer(d),f=dispatch("tick","end");e==null&&(e=[]);function d(){g(),f.call("tick",t),r<n&&(h.stop(),f.call("end",t))}function g(b){var $,S=e.length,R;b===void 0&&(b=1);for(var L=0;L<b;++L)for(r+=(o-r)*i,u.each(function(N){N(r)}),$=0;$<S;++$)R=e[$],R.fx==null?R.x+=R.vx*=l:(R.x=R.fx,R.vx=0),R.fy==null?R.y+=R.vy*=l:(R.y=R.fy,R.vy=0);return t}function p(){for(var b=0,$=e.length,S;b<$;++b){if(S=e[b],S.index=b,S.fx!=null&&(S.x=S.fx),S.fy!=null&&(S.y=S.fy),isNaN(S.x)||isNaN(S.y)){var R=initialRadius*Math.sqrt(b),L=b*initialAngle;S.x=R*Math.cos(L),S.y=R*Math.sin(L)}(isNaN(S.vx)||isNaN(S.vy))&&(S.vx=S.vy=0)}}function m(b){return b.initialize&&b.initialize(e),b}return p(),t={tick:g,restart:function(){return h.restart(d),t},stop:function(){return h.stop(),t},nodes:function(b){return arguments.length?(e=b,p(),u.each(m),t):e},alpha:function(b){return arguments.length?(r=+b,t):r},alphaMin:function(b){return arguments.length?(n=+b,t):n},alphaDecay:function(b){return arguments.length?(i=+b,t):+i},alphaTarget:function(b){return arguments.length?(o=+b,t):o},velocityDecay:function(b){return arguments.length?(l=1-b,t):1-l},force:function(b,$){return arguments.length>1?($==null?u.remove(b):u.set(b,m($)),t):u.get(b)},find:function(b,$,S){var R=0,L=e.length,N,F,H,G,P;for(S==null?S=1/0:S*=S,R=0;R<L;++R)G=e[R],N=b-G.x,F=$-G.y,H=N*N+F*F,H<S&&(P=G,S=H);return P},on:function(b,$){return arguments.length>1?(f.on(b,$),t):f.on(b)}}}function manyBody(){var e,t,r,n=constant$6(-30),i,o=1,l=1/0,u=.81;function h(p){var m,b=e.length,$=quadtree(e,x$3,y$3).visitAfter(d);for(r=p,m=0;m<b;++m)t=e[m],$.visit(g)}function f(){if(!!e){var p,m=e.length,b;for(i=new Array(m),p=0;p<m;++p)b=e[p],i[b.index]=+n(b,p,e)}}function d(p){var m=0,b,$,S=0,R,L,N;if(p.length){for(R=L=N=0;N<4;++N)(b=p[N])&&($=Math.abs(b.value))&&(m+=b.value,S+=$,R+=$*b.x,L+=$*b.y);p.x=R/S,p.y=L/S}else{b=p,b.x=b.data.x,b.y=b.data.y;do m+=i[b.data.index];while(b=b.next)}p.value=m}function g(p,m,b,$){if(!p.value)return!0;var S=p.x-t.x,R=p.y-t.y,L=$-m,N=S*S+R*R;if(L*L/u<N)return N<l&&(S===0&&(S=jiggle(),N+=S*S),R===0&&(R=jiggle(),N+=R*R),N<o&&(N=Math.sqrt(o*N)),t.vx+=S*p.value*r/N,t.vy+=R*p.value*r/N),!0;if(p.length||N>=l)return;(p.data!==t||p.next)&&(S===0&&(S=jiggle(),N+=S*S),R===0&&(R=jiggle(),N+=R*R),N<o&&(N=Math.sqrt(o*N)));do p.data!==t&&(L=i[p.data.index]*r/N,t.vx+=S*L,t.vy+=R*L);while(p=p.next)}return h.initialize=function(p){e=p,f()},h.strength=function(p){return arguments.length?(n=typeof p=="function"?p:constant$6(+p),f(),h):n},h.distanceMin=function(p){return arguments.length?(o=p*p,h):Math.sqrt(o)},h.distanceMax=function(p){return arguments.length?(l=p*p,h):Math.sqrt(l)},h.theta=function(p){return arguments.length?(u=p*p,h):Math.sqrt(u)},h}function radial(e,t,r){var n,i=constant$6(.1),o,l;typeof e!="function"&&(e=constant$6(+e)),t==null&&(t=0),r==null&&(r=0);function u(f){for(var d=0,g=n.length;d<g;++d){var p=n[d],m=p.x-t||1e-6,b=p.y-r||1e-6,$=Math.sqrt(m*m+b*b),S=(l[d]-$)*o[d]*f/$;p.vx+=m*S,p.vy+=b*S}}function h(){if(!!n){var f,d=n.length;for(o=new Array(d),l=new Array(d),f=0;f<d;++f)l[f]=+e(n[f],f,n),o[f]=isNaN(l[f])?0:+i(n[f],f,n)}}return u.initialize=function(f){n=f,h()},u.strength=function(f){return arguments.length?(i=typeof f=="function"?f:constant$6(+f),h(),u):i},u.radius=function(f){return arguments.length?(e=typeof f=="function"?f:constant$6(+f),h(),u):e},u.x=function(f){return arguments.length?(t=+f,u):t},u.y=function(f){return arguments.length?(r=+f,u):r},u}function x$2(e){var t=constant$6(.1),r,n,i;typeof e!="function"&&(e=constant$6(e==null?0:+e));function o(u){for(var h=0,f=r.length,d;h<f;++h)d=r[h],d.vx+=(i[h]-d.x)*n[h]*u}function l(){if(!!r){var u,h=r.length;for(n=new Array(h),i=new Array(h),u=0;u<h;++u)n[u]=isNaN(i[u]=+e(r[u],u,r))?0:+t(r[u],u,r)}}return o.initialize=function(u){r=u,l()},o.strength=function(u){return arguments.length?(t=typeof u=="function"?u:constant$6(+u),l(),o):t},o.x=function(u){return arguments.length?(e=typeof u=="function"?u:constant$6(+u),l(),o):e},o}function y$2(e){var t=constant$6(.1),r,n,i;typeof e!="function"&&(e=constant$6(e==null?0:+e));function o(u){for(var h=0,f=r.length,d;h<f;++h)d=r[h],d.vy+=(i[h]-d.y)*n[h]*u}function l(){if(!!r){var u,h=r.length;for(n=new Array(h),i=new Array(h),u=0;u<h;++u)n[u]=isNaN(i[u]=+e(r[u],u,r))?0:+t(r[u],u,r)}}return o.initialize=function(u){r=u,l()},o.strength=function(u){return arguments.length?(t=typeof u=="function"?u:constant$6(+u),l(),o):t},o.y=function(u){return arguments.length?(e=typeof u=="function"?u:constant$6(+u),l(),o):e},o}function formatDecimal(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function formatDecimalParts(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function exponent(e){return e=formatDecimalParts(Math.abs(e)),e?e[1]:NaN}function formatGroup(e,t){return function(r,n){for(var i=r.length,o=[],l=0,u=e[0],h=0;i>0&&u>0&&(h+u+1>n&&(u=Math.max(1,n-h)),o.push(r.substring(i-=u,i+u)),!((h+=u+1)>n));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function formatNumerals(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var re=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(e){if(!(t=re.exec(e)))throw new Error("invalid format: "+e);var t;return new FormatSpecifier({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var prefixExponent;function formatPrefixAuto(e,t){var r=formatDecimalParts(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=n.length;return o===l?n:o>l?n+new Array(o-l+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+formatDecimalParts(e,Math.max(0,t+o-1))[0]}function formatRounded(e,t){var r=formatDecimalParts(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const formatTypes={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:formatDecimal,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return formatRounded(e*100,t)},r:formatRounded,s:formatPrefixAuto,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function identity$6(e){return e}var map$1=Array.prototype.map,prefixes=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function formatLocale$1(e){var t=e.grouping===void 0||e.thousands===void 0?identity$6:formatGroup(map$1.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?identity$6:formatNumerals(map$1.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"-":e.minus+"",h=e.nan===void 0?"NaN":e.nan+"";function f(g){g=formatSpecifier(g);var p=g.fill,m=g.align,b=g.sign,$=g.symbol,S=g.zero,R=g.width,L=g.comma,N=g.precision,F=g.trim,H=g.type;H==="n"?(L=!0,H="g"):formatTypes[H]||(N===void 0&&(N=12),F=!0,H="g"),(S||p==="0"&&m==="=")&&(S=!0,p="0",m="=");var G=$==="$"?r:$==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():"",P=$==="$"?n:/[%p]/.test(H)?l:"",V=formatTypes[H],z=/[defgprs%]/.test(H);N=N===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function W(T){var U=G,I=P,ae,Q,ue;if(H==="c")I=V(T)+I,T="";else{T=+T;var _e=T<0||1/T<0;if(T=isNaN(T)?h:V(Math.abs(T),N),F&&(T=formatTrim(T)),_e&&+T==0&&b!=="+"&&(_e=!1),U=(_e?b==="("?b:u:b==="-"||b==="("?"":b)+U,I=(H==="s"?prefixes[8+prefixExponent/3]:"")+I+(_e&&b==="("?")":""),z){for(ae=-1,Q=T.length;++ae<Q;)if(ue=T.charCodeAt(ae),48>ue||ue>57){I=(ue===46?i+T.slice(ae+1):T.slice(ae))+I,T=T.slice(0,ae);break}}}L&&!S&&(T=t(T,1/0));var ke=U.length+T.length+I.length,de=ke<R?new Array(R-ke+1).join(p):"";switch(L&&S&&(T=t(de+T,de.length?R-I.length:1/0),de=""),m){case"<":T=U+T+I+de;break;case"=":T=U+de+T+I;break;case"^":T=de.slice(0,ke=de.length>>1)+U+T+I+de.slice(ke);break;default:T=de+U+T+I;break}return o(T)}return W.toString=function(){return g+""},W}function d(g,p){var m=f((g=formatSpecifier(g),g.type="f",g)),b=Math.max(-8,Math.min(8,Math.floor(exponent(p)/3)))*3,$=Math.pow(10,-b),S=prefixes[8+b/3];return function(R){return m($*R)+S}}return{format:f,formatPrefix:d}}var locale$1,format$1,formatPrefix;defaultLocale$1({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function defaultLocale$1(e){return locale$1=formatLocale$1(e),format$1=locale$1.format,formatPrefix=locale$1.formatPrefix,locale$1}function precisionFixed(e){return Math.max(0,-exponent(Math.abs(e)))}function precisionPrefix(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(exponent(t)/3)))*3-exponent(Math.abs(e)))}function precisionRound(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,exponent(t)-exponent(e))+1}function adder(){return new Adder}function Adder(){this.reset()}Adder.prototype={constructor:Adder,reset:function(){this.s=this.t=0},add:function(e){add(temp,e,this.t),add(this,temp.s,this.s),this.s?this.t+=temp.t:this.s=temp.t},valueOf:function(){return this.s}};var temp=new Adder;function add(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}var epsilon$2=1e-6,epsilon2$1=1e-12,pi$1=Math.PI,halfPi$1=pi$1/2,quarterPi=pi$1/4,tau$1=pi$1*2,degrees=180/pi$1,radians=pi$1/180,abs$1=Math.abs,atan=Math.atan,atan2$1=Math.atan2,cos$1=Math.cos,ceil=Math.ceil,exp=Math.exp,log$3=Math.log,pow$1=Math.pow,sin$1=Math.sin,sign$1=Math.sign||function(e){return e>0?1:e<0?-1:0},sqrt$2=Math.sqrt,tan=Math.tan;function acos$1(e){return e>1?0:e<-1?pi$1:Math.acos(e)}function asin$1(e){return e>1?halfPi$1:e<-1?-halfPi$1:Math.asin(e)}function haversin(e){return(e=sin$1(e/2))*e}function noop$1(){}function streamGeometry(e,t){e&&streamGeometryType.hasOwnProperty(e.type)&&streamGeometryType[e.type](e,t)}var streamObjectType={Feature:function(e,t){streamGeometry(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)streamGeometry(r[n].geometry,t)}},streamGeometryType={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)e=r[n],t.point(e[0],e[1],e[2])},LineString:function(e,t){streamLine(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)streamLine(r[n],t,0)},Polygon:function(e,t){streamPolygon(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)streamPolygon(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)streamGeometry(r[n],t)}};function streamLine(e,t,r){var n=-1,i=e.length-r,o;for(t.lineStart();++n<i;)o=e[n],t.point(o[0],o[1],o[2]);t.lineEnd()}function streamPolygon(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)streamLine(e[r],t,1);t.polygonEnd()}function geoStream(e,t){e&&streamObjectType.hasOwnProperty(e.type)?streamObjectType[e.type](e,t):streamGeometry(e,t)}var areaRingSum$1=adder(),areaSum$1=adder(),lambda00$2,phi00$2,lambda0$2,cosPhi0$1,sinPhi0$1,areaStream$1={point:noop$1,lineStart:noop$1,lineEnd:noop$1,polygonStart:function(){areaRingSum$1.reset(),areaStream$1.lineStart=areaRingStart$1,areaStream$1.lineEnd=areaRingEnd$1},polygonEnd:function(){var e=+areaRingSum$1;areaSum$1.add(e<0?tau$1+e:e),this.lineStart=this.lineEnd=this.point=noop$1},sphere:function(){areaSum$1.add(tau$1)}};function areaRingStart$1(){areaStream$1.point=areaPointFirst$1}function areaRingEnd$1(){areaPoint$1(lambda00$2,phi00$2)}function areaPointFirst$1(e,t){areaStream$1.point=areaPoint$1,lambda00$2=e,phi00$2=t,e*=radians,t*=radians,lambda0$2=e,cosPhi0$1=cos$1(t=t/2+quarterPi),sinPhi0$1=sin$1(t)}function areaPoint$1(e,t){e*=radians,t*=radians,t=t/2+quarterPi;var r=e-lambda0$2,n=r>=0?1:-1,i=n*r,o=cos$1(t),l=sin$1(t),u=sinPhi0$1*l,h=cosPhi0$1*o+u*cos$1(i),f=u*n*sin$1(i);areaRingSum$1.add(atan2$1(f,h)),lambda0$2=e,cosPhi0$1=o,sinPhi0$1=l}function area$2(e){return areaSum$1.reset(),geoStream(e,areaStream$1),areaSum$1*2}function spherical(e){return[atan2$1(e[1],e[0]),asin$1(e[2])]}function cartesian(e){var t=e[0],r=e[1],n=cos$1(r);return[n*cos$1(t),n*sin$1(t),sin$1(r)]}function cartesianDot(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function cartesianCross(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function cartesianAddInPlace(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function cartesianScale(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function cartesianNormalizeInPlace(e){var t=sqrt$2(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var lambda0$1,phi0,lambda1,phi1,lambda2,lambda00$1,phi00$1,p0,deltaSum=adder(),ranges,range,boundsStream$2={point:boundsPoint$1,lineStart:boundsLineStart,lineEnd:boundsLineEnd,polygonStart:function(){boundsStream$2.point=boundsRingPoint,boundsStream$2.lineStart=boundsRingStart,boundsStream$2.lineEnd=boundsRingEnd,deltaSum.reset(),areaStream$1.polygonStart()},polygonEnd:function(){areaStream$1.polygonEnd(),boundsStream$2.point=boundsPoint$1,boundsStream$2.lineStart=boundsLineStart,boundsStream$2.lineEnd=boundsLineEnd,areaRingSum$1<0?(lambda0$1=-(lambda1=180),phi0=-(phi1=90)):deltaSum>epsilon$2?phi1=90:deltaSum<-epsilon$2&&(phi0=-90),range[0]=lambda0$1,range[1]=lambda1},sphere:function(){lambda0$1=-(lambda1=180),phi0=-(phi1=90)}};function boundsPoint$1(e,t){ranges.push(range=[lambda0$1=e,lambda1=e]),t<phi0&&(phi0=t),t>phi1&&(phi1=t)}function linePoint(e,t){var r=cartesian([e*radians,t*radians]);if(p0){var n=cartesianCross(p0,r),i=[n[1],-n[0],0],o=cartesianCross(i,n);cartesianNormalizeInPlace(o),o=spherical(o);var l=e-lambda2,u=l>0?1:-1,h=o[0]*degrees*u,f,d=abs$1(l)>180;d^(u*lambda2<h&&h<u*e)?(f=o[1]*degrees,f>phi1&&(phi1=f)):(h=(h+360)%360-180,d^(u*lambda2<h&&h<u*e)?(f=-o[1]*degrees,f<phi0&&(phi0=f)):(t<phi0&&(phi0=t),t>phi1&&(phi1=t))),d?e<lambda2?angle(lambda0$1,e)>angle(lambda0$1,lambda1)&&(lambda1=e):angle(e,lambda1)>angle(lambda0$1,lambda1)&&(lambda0$1=e):lambda1>=lambda0$1?(e<lambda0$1&&(lambda0$1=e),e>lambda1&&(lambda1=e)):e>lambda2?angle(lambda0$1,e)>angle(lambda0$1,lambda1)&&(lambda1=e):angle(e,lambda1)>angle(lambda0$1,lambda1)&&(lambda0$1=e)}else ranges.push(range=[lambda0$1=e,lambda1=e]);t<phi0&&(phi0=t),t>phi1&&(phi1=t),p0=r,lambda2=e}function boundsLineStart(){boundsStream$2.point=linePoint}function boundsLineEnd(){range[0]=lambda0$1,range[1]=lambda1,boundsStream$2.point=boundsPoint$1,p0=null}function boundsRingPoint(e,t){if(p0){var r=e-lambda2;deltaSum.add(abs$1(r)>180?r+(r>0?360:-360):r)}else lambda00$1=e,phi00$1=t;areaStream$1.point(e,t),linePoint(e,t)}function boundsRingStart(){areaStream$1.lineStart()}function boundsRingEnd(){boundsRingPoint(lambda00$1,phi00$1),areaStream$1.lineEnd(),abs$1(deltaSum)>epsilon$2&&(lambda0$1=-(lambda1=180)),range[0]=lambda0$1,range[1]=lambda1,p0=null}function angle(e,t){return(t-=e)<0?t+360:t}function rangeCompare(e,t){return e[0]-t[0]}function rangeContains(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function bounds$2(e){var t,r,n,i,o,l,u;if(phi1=lambda1=-(lambda0$1=phi0=1/0),ranges=[],geoStream(e,boundsStream$2),r=ranges.length){for(ranges.sort(rangeCompare),t=1,n=ranges[0],o=[n];t<r;++t)i=ranges[t],rangeContains(n,i[0])||rangeContains(n,i[1])?(angle(n[0],i[1])>angle(n[0],n[1])&&(n[1]=i[1]),angle(i[0],n[1])>angle(n[0],n[1])&&(n[0]=i[0])):o.push(n=i);for(l=-1/0,r=o.length-1,t=0,n=o[r];t<=r;n=i,++t)i=o[t],(u=angle(n[1],i[0]))>l&&(l=u,lambda0$1=i[0],lambda1=n[1])}return ranges=range=null,lambda0$1===1/0||phi0===1/0?[[NaN,NaN],[NaN,NaN]]:[[lambda0$1,phi0],[lambda1,phi1]]}var W0,W1,X0$1,Y0$1,Z0$1,X1$1,Y1$1,Z1$1,X2$1,Y2$1,Z2$1,lambda00,phi00,x0$4,y0$4,z0,centroidStream$1={sphere:noop$1,point:centroidPoint$1,lineStart:centroidLineStart$1,lineEnd:centroidLineEnd$1,polygonStart:function(){centroidStream$1.lineStart=centroidRingStart$1,centroidStream$1.lineEnd=centroidRingEnd$1},polygonEnd:function(){centroidStream$1.lineStart=centroidLineStart$1,centroidStream$1.lineEnd=centroidLineEnd$1}};function centroidPoint$1(e,t){e*=radians,t*=radians;var r=cos$1(t);centroidPointCartesian(r*cos$1(e),r*sin$1(e),sin$1(t))}function centroidPointCartesian(e,t,r){++W0,X0$1+=(e-X0$1)/W0,Y0$1+=(t-Y0$1)/W0,Z0$1+=(r-Z0$1)/W0}function centroidLineStart$1(){centroidStream$1.point=centroidLinePointFirst}function centroidLinePointFirst(e,t){e*=radians,t*=radians;var r=cos$1(t);x0$4=r*cos$1(e),y0$4=r*sin$1(e),z0=sin$1(t),centroidStream$1.point=centroidLinePoint,centroidPointCartesian(x0$4,y0$4,z0)}function centroidLinePoint(e,t){e*=radians,t*=radians;var r=cos$1(t),n=r*cos$1(e),i=r*sin$1(e),o=sin$1(t),l=atan2$1(sqrt$2((l=y0$4*o-z0*i)*l+(l=z0*n-x0$4*o)*l+(l=x0$4*i-y0$4*n)*l),x0$4*n+y0$4*i+z0*o);W1+=l,X1$1+=l*(x0$4+(x0$4=n)),Y1$1+=l*(y0$4+(y0$4=i)),Z1$1+=l*(z0+(z0=o)),centroidPointCartesian(x0$4,y0$4,z0)}function centroidLineEnd$1(){centroidStream$1.point=centroidPoint$1}function centroidRingStart$1(){centroidStream$1.point=centroidRingPointFirst}function centroidRingEnd$1(){centroidRingPoint(lambda00,phi00),centroidStream$1.point=centroidPoint$1}function centroidRingPointFirst(e,t){lambda00=e,phi00=t,e*=radians,t*=radians,centroidStream$1.point=centroidRingPoint;var r=cos$1(t);x0$4=r*cos$1(e),y0$4=r*sin$1(e),z0=sin$1(t),centroidPointCartesian(x0$4,y0$4,z0)}function centroidRingPoint(e,t){e*=radians,t*=radians;var r=cos$1(t),n=r*cos$1(e),i=r*sin$1(e),o=sin$1(t),l=y0$4*o-z0*i,u=z0*n-x0$4*o,h=x0$4*i-y0$4*n,f=sqrt$2(l*l+u*u+h*h),d=asin$1(f),g=f&&-d/f;X2$1+=g*l,Y2$1+=g*u,Z2$1+=g*h,W1+=d,X1$1+=d*(x0$4+(x0$4=n)),Y1$1+=d*(y0$4+(y0$4=i)),Z1$1+=d*(z0+(z0=o)),centroidPointCartesian(x0$4,y0$4,z0)}function centroid$1(e){W0=W1=X0$1=Y0$1=Z0$1=X1$1=Y1$1=Z1$1=X2$1=Y2$1=Z2$1=0,geoStream(e,centroidStream$1);var t=X2$1,r=Y2$1,n=Z2$1,i=t*t+r*r+n*n;return i<epsilon2$1&&(t=X1$1,r=Y1$1,n=Z1$1,W1<epsilon$2&&(t=X0$1,r=Y0$1,n=Z0$1),i=t*t+r*r+n*n,i<epsilon2$1)?[NaN,NaN]:[atan2$1(r,t)*degrees,asin$1(n/sqrt$2(i))*degrees]}function constant$5(e){return function(){return e}}function compose(e,t){function r(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(r.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),r}function rotationIdentity(e,t){return[abs$1(e)>pi$1?e+Math.round(-e/tau$1)*tau$1:e,t]}rotationIdentity.invert=rotationIdentity;function rotateRadians(e,t,r){return(e%=tau$1)?t||r?compose(rotationLambda(e),rotationPhiGamma(t,r)):rotationLambda(e):t||r?rotationPhiGamma(t,r):rotationIdentity}function forwardRotationLambda(e){return function(t,r){return t+=e,[t>pi$1?t-tau$1:t<-pi$1?t+tau$1:t,r]}}function rotationLambda(e){var t=forwardRotationLambda(e);return t.invert=forwardRotationLambda(-e),t}function rotationPhiGamma(e,t){var r=cos$1(e),n=sin$1(e),i=cos$1(t),o=sin$1(t);function l(u,h){var f=cos$1(h),d=cos$1(u)*f,g=sin$1(u)*f,p=sin$1(h),m=p*r+d*n;return[atan2$1(g*i-m*o,d*r-p*n),asin$1(m*i+g*o)]}return l.invert=function(u,h){var f=cos$1(h),d=cos$1(u)*f,g=sin$1(u)*f,p=sin$1(h),m=p*i-g*o;return[atan2$1(g*i+p*o,d*r+m*n),asin$1(m*r-d*n)]},l}function rotation(e){e=rotateRadians(e[0]*radians,e[1]*radians,e.length>2?e[2]*radians:0);function t(r){return r=e(r[0]*radians,r[1]*radians),r[0]*=degrees,r[1]*=degrees,r}return t.invert=function(r){return r=e.invert(r[0]*radians,r[1]*radians),r[0]*=degrees,r[1]*=degrees,r},t}function circleStream(e,t,r,n,i,o){if(!!r){var l=cos$1(t),u=sin$1(t),h=n*r;i==null?(i=t+n*tau$1,o=t-h/2):(i=circleRadius(l,i),o=circleRadius(l,o),(n>0?i<o:i>o)&&(i+=n*tau$1));for(var f,d=i;n>0?d>o:d<o;d-=h)f=spherical([l,-u*cos$1(d),-u*sin$1(d)]),e.point(f[0],f[1])}}function circleRadius(e,t){t=cartesian(t),t[0]-=e,cartesianNormalizeInPlace(t);var r=acos$1(-t[1]);return((-t[2]<0?-r:r)+tau$1-epsilon$2)%tau$1}function circle$4(){var e=constant$5([0,0]),t=constant$5(90),r=constant$5(6),n,i,o={point:l};function l(h,f){n.push(h=i(h,f)),h[0]*=degrees,h[1]*=degrees}function u(){var h=e.apply(this,arguments),f=t.apply(this,arguments)*radians,d=r.apply(this,arguments)*radians;return n=[],i=rotateRadians(-h[0]*radians,-h[1]*radians,0).invert,circleStream(o,f,d,1),h={type:"Polygon",coordinates:[n]},n=i=null,h}return u.center=function(h){return arguments.length?(e=typeof h=="function"?h:constant$5([+h[0],+h[1]]),u):e},u.radius=function(h){return arguments.length?(t=typeof h=="function"?h:constant$5(+h),u):t},u.precision=function(h){return arguments.length?(r=typeof h=="function"?h:constant$5(+h),u):r},u}function clipBuffer(){var e=[],t;return{point:function(r,n,i){t.push([r,n,i])},lineStart:function(){e.push(t=[])},lineEnd:noop$1,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function pointEqual(e,t){return abs$1(e[0]-t[0])<epsilon$2&&abs$1(e[1]-t[1])<epsilon$2}function Intersection(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function clipRejoin(e,t,r,n,i){var o=[],l=[],u,h;if(e.forEach(function(b){if(!(($=b.length-1)<=0)){var $,S=b[0],R=b[$],L;if(pointEqual(S,R)){if(!S[2]&&!R[2]){for(i.lineStart(),u=0;u<$;++u)i.point((S=b[u])[0],S[1]);i.lineEnd();return}R[0]+=2*epsilon$2}o.push(L=new Intersection(S,b,null,!0)),l.push(L.o=new Intersection(S,null,L,!1)),o.push(L=new Intersection(R,b,null,!1)),l.push(L.o=new Intersection(R,null,L,!0))}}),!!o.length){for(l.sort(t),link$1(o),link$1(l),u=0,h=l.length;u<h;++u)l[u].e=r=!r;for(var f=o[0],d,g;;){for(var p=f,m=!0;p.v;)if((p=p.n)===f)return;d=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(m)for(u=0,h=d.length;u<h;++u)i.point((g=d[u])[0],g[1]);else n(p.x,p.n.x,1,i);p=p.n}else{if(m)for(d=p.p.z,u=d.length-1;u>=0;--u)i.point((g=d[u])[0],g[1]);else n(p.x,p.p.x,-1,i);p=p.p}p=p.o,d=p.z,m=!m}while(!p.v);i.lineEnd()}}}function link$1(e){if(!!(t=e.length)){for(var t,r=0,n=e[0],i;++r<t;)n.n=i=e[r],i.p=n,n=i;n.n=i=e[0],i.p=n}}var sum$1=adder();function longitude(e){return abs$1(e[0])<=pi$1?e[0]:sign$1(e[0])*((abs$1(e[0])+pi$1)%tau$1-pi$1)}function polygonContains(e,t){var r=longitude(t),n=t[1],i=sin$1(n),o=[sin$1(r),-cos$1(r),0],l=0,u=0;sum$1.reset(),i===1?n=halfPi$1+epsilon$2:i===-1&&(n=-halfPi$1-epsilon$2);for(var h=0,f=e.length;h<f;++h)if(!!(g=(d=e[h]).length))for(var d,g,p=d[g-1],m=longitude(p),b=p[1]/2+quarterPi,$=sin$1(b),S=cos$1(b),R=0;R<g;++R,m=N,$=H,S=G,p=L){var L=d[R],N=longitude(L),F=L[1]/2+quarterPi,H=sin$1(F),G=cos$1(F),P=N-m,V=P>=0?1:-1,z=V*P,W=z>pi$1,T=$*H;if(sum$1.add(atan2$1(T*V*sin$1(z),S*G+T*cos$1(z))),l+=W?P+V*tau$1:P,W^m>=r^N>=r){var U=cartesianCross(cartesian(p),cartesian(L));cartesianNormalizeInPlace(U);var I=cartesianCross(o,U);cartesianNormalizeInPlace(I);var ae=(W^P>=0?-1:1)*asin$1(I[2]);(n>ae||n===ae&&(U[0]||U[1]))&&(u+=W^P>=0?1:-1)}}return(l<-epsilon$2||l<epsilon$2&&sum$1<-epsilon$2)^u&1}function clip(e,t,r,n){return function(i){var o=t(i),l=clipBuffer(),u=t(l),h=!1,f,d,g,p={point:m,lineStart:$,lineEnd:S,polygonStart:function(){p.point=R,p.lineStart=L,p.lineEnd=N,d=[],f=[]},polygonEnd:function(){p.point=m,p.lineStart=$,p.lineEnd=S,d=merge$1(d);var F=polygonContains(f,n);d.length?(h||(i.polygonStart(),h=!0),clipRejoin(d,compareIntersection,F,r,i)):F&&(h||(i.polygonStart(),h=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),d=f=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function m(F,H){e(F,H)&&i.point(F,H)}function b(F,H){o.point(F,H)}function $(){p.point=b,o.lineStart()}function S(){p.point=m,o.lineEnd()}function R(F,H){g.push([F,H]),u.point(F,H)}function L(){u.lineStart(),g=[]}function N(){R(g[0][0],g[0][1]),u.lineEnd();var F=u.clean(),H=l.result(),G,P=H.length,V,z,W;if(g.pop(),f.push(g),g=null,!!P){if(F&1){if(z=H[0],(V=z.length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),G=0;G<V;++G)i.point((W=z[G])[0],W[1]);i.lineEnd()}return}P>1&&F&2&&H.push(H.pop().concat(H.shift())),d.push(H.filter(validSegment))}}return p}}function validSegment(e){return e.length>1}function compareIntersection(e,t){return((e=e.x)[0]<0?e[1]-halfPi$1-epsilon$2:halfPi$1-e[1])-((t=t.x)[0]<0?t[1]-halfPi$1-epsilon$2:halfPi$1-t[1])}const clipAntimeridian=clip(function(){return!0},clipAntimeridianLine,clipAntimeridianInterpolate,[-pi$1,-halfPi$1]);function clipAntimeridianLine(e){var t=NaN,r=NaN,n=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,l){var u=o>0?pi$1:-pi$1,h=abs$1(o-t);abs$1(h-pi$1)<epsilon$2?(e.point(t,r=(r+l)/2>0?halfPi$1:-halfPi$1),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(u,r),e.point(o,r),i=0):n!==u&&h>=pi$1&&(abs$1(t-n)<epsilon$2&&(t-=n*epsilon$2),abs$1(o-u)<epsilon$2&&(o-=u*epsilon$2),r=clipAntimeridianIntersect(t,r,o,l),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(u,r),i=0),e.point(t=o,r=l),n=u},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-i}}}function clipAntimeridianIntersect(e,t,r,n){var i,o,l=sin$1(e-r);return abs$1(l)>epsilon$2?atan((sin$1(t)*(o=cos$1(n))*sin$1(r)-sin$1(n)*(i=cos$1(t))*sin$1(e))/(i*o*l)):(t+n)/2}function clipAntimeridianInterpolate(e,t,r,n){var i;if(e==null)i=r*halfPi$1,n.point(-pi$1,i),n.point(0,i),n.point(pi$1,i),n.point(pi$1,0),n.point(pi$1,-i),n.point(0,-i),n.point(-pi$1,-i),n.point(-pi$1,0),n.point(-pi$1,i);else if(abs$1(e[0]-t[0])>epsilon$2){var o=e[0]<t[0]?pi$1:-pi$1;i=r*o/2,n.point(-o,i),n.point(0,i),n.point(o,i)}else n.point(t[0],t[1])}function clipCircle(e){var t=cos$1(e),r=6*radians,n=t>0,i=abs$1(t)>epsilon$2;function o(d,g,p,m){circleStream(m,e,r,p,d,g)}function l(d,g){return cos$1(d)*cos$1(g)>t}function u(d){var g,p,m,b,$;return{lineStart:function(){b=m=!1,$=1},point:function(S,R){var L=[S,R],N,F=l(S,R),H=n?F?0:f(S,R):F?f(S+(S<0?pi$1:-pi$1),R):0;if(!g&&(b=m=F)&&d.lineStart(),F!==m&&(N=h(g,L),(!N||pointEqual(g,N)||pointEqual(L,N))&&(L[2]=1)),F!==m)$=0,F?(d.lineStart(),N=h(L,g),d.point(N[0],N[1])):(N=h(g,L),d.point(N[0],N[1],2),d.lineEnd()),g=N;else if(i&&g&&n^F){var G;!(H&p)&&(G=h(L,g,!0))&&($=0,n?(d.lineStart(),d.point(G[0][0],G[0][1]),d.point(G[1][0],G[1][1]),d.lineEnd()):(d.point(G[1][0],G[1][1]),d.lineEnd(),d.lineStart(),d.point(G[0][0],G[0][1],3)))}F&&(!g||!pointEqual(g,L))&&d.point(L[0],L[1]),g=L,m=F,p=H},lineEnd:function(){m&&d.lineEnd(),g=null},clean:function(){return $|(b&&m)<<1}}}function h(d,g,p){var m=cartesian(d),b=cartesian(g),$=[1,0,0],S=cartesianCross(m,b),R=cartesianDot(S,S),L=S[0],N=R-L*L;if(!N)return!p&&d;var F=t*R/N,H=-t*L/N,G=cartesianCross($,S),P=cartesianScale($,F),V=cartesianScale(S,H);cartesianAddInPlace(P,V);var z=G,W=cartesianDot(P,z),T=cartesianDot(z,z),U=W*W-T*(cartesianDot(P,P)-1);if(!(U<0)){var I=sqrt$2(U),ae=cartesianScale(z,(-W-I)/T);if(cartesianAddInPlace(ae,P),ae=spherical(ae),!p)return ae;var Q=d[0],ue=g[0],_e=d[1],ke=g[1],de;ue<Q&&(de=Q,Q=ue,ue=de);var ce=ue-Q,he=abs$1(ce-pi$1)<epsilon$2,Se=he||ce<epsilon$2;if(!he&&ke<_e&&(de=_e,_e=ke,ke=de),Se?he?_e+ke>0^ae[1]<(abs$1(ae[0]-Q)<epsilon$2?_e:ke):_e<=ae[1]&&ae[1]<=ke:ce>pi$1^(Q<=ae[0]&&ae[0]<=ue)){var ve=cartesianScale(z,(-W+I)/T);return cartesianAddInPlace(ve,P),[ae,spherical(ve)]}}}function f(d,g){var p=n?e:pi$1-e,m=0;return d<-p?m|=1:d>p&&(m|=2),g<-p?m|=4:g>p&&(m|=8),m}return clip(l,u,o,n?[0,-e]:[-pi$1,e-pi$1])}function clipLine(e,t,r,n,i,o){var l=e[0],u=e[1],h=t[0],f=t[1],d=0,g=1,p=h-l,m=f-u,b;if(b=r-l,!(!p&&b>0)){if(b/=p,p<0){if(b<d)return;b<g&&(g=b)}else if(p>0){if(b>g)return;b>d&&(d=b)}if(b=i-l,!(!p&&b<0)){if(b/=p,p<0){if(b>g)return;b>d&&(d=b)}else if(p>0){if(b<d)return;b<g&&(g=b)}if(b=n-u,!(!m&&b>0)){if(b/=m,m<0){if(b<d)return;b<g&&(g=b)}else if(m>0){if(b>g)return;b>d&&(d=b)}if(b=o-u,!(!m&&b<0)){if(b/=m,m<0){if(b>g)return;b>d&&(d=b)}else if(m>0){if(b<d)return;b<g&&(g=b)}return d>0&&(e[0]=l+d*p,e[1]=u+d*m),g<1&&(t[0]=l+g*p,t[1]=u+g*m),!0}}}}}var clipMax=1e9,clipMin=-clipMax;function clipRectangle(e,t,r,n){function i(f,d){return e<=f&&f<=r&&t<=d&&d<=n}function o(f,d,g,p){var m=0,b=0;if(f==null||(m=l(f,g))!==(b=l(d,g))||h(f,d)<0^g>0)do p.point(m===0||m===3?e:r,m>1?n:t);while((m=(m+g+4)%4)!==b);else p.point(d[0],d[1])}function l(f,d){return abs$1(f[0]-e)<epsilon$2?d>0?0:3:abs$1(f[0]-r)<epsilon$2?d>0?2:1:abs$1(f[1]-t)<epsilon$2?d>0?1:0:d>0?3:2}function u(f,d){return h(f.x,d.x)}function h(f,d){var g=l(f,1),p=l(d,1);return g!==p?g-p:g===0?d[1]-f[1]:g===1?f[0]-d[0]:g===2?f[1]-d[1]:d[0]-f[0]}return function(f){var d=f,g=clipBuffer(),p,m,b,$,S,R,L,N,F,H,G,P={point:V,lineStart:U,lineEnd:I,polygonStart:W,polygonEnd:T};function V(Q,ue){i(Q,ue)&&d.point(Q,ue)}function z(){for(var Q=0,ue=0,_e=m.length;ue<_e;++ue)for(var ke=m[ue],de=1,ce=ke.length,he=ke[0],Se,ve,me=he[0],Ce=he[1];de<ce;++de)Se=me,ve=Ce,he=ke[de],me=he[0],Ce=he[1],ve<=n?Ce>n&&(me-Se)*(n-ve)>(Ce-ve)*(e-Se)&&++Q:Ce<=n&&(me-Se)*(n-ve)<(Ce-ve)*(e-Se)&&--Q;return Q}function W(){d=g,p=[],m=[],G=!0}function T(){var Q=z(),ue=G&&Q,_e=(p=merge$1(p)).length;(ue||_e)&&(f.polygonStart(),ue&&(f.lineStart(),o(null,null,1,f),f.lineEnd()),_e&&clipRejoin(p,u,Q,o,f),f.polygonEnd()),d=f,p=m=b=null}function U(){P.point=ae,m&&m.push(b=[]),H=!0,F=!1,L=N=NaN}function I(){p&&(ae($,S),R&&F&&g.rejoin(),p.push(g.result())),P.point=V,F&&d.lineEnd()}function ae(Q,ue){var _e=i(Q,ue);if(m&&b.push([Q,ue]),H)$=Q,S=ue,R=_e,H=!1,_e&&(d.lineStart(),d.point(Q,ue));else if(_e&&F)d.point(Q,ue);else{var ke=[L=Math.max(clipMin,Math.min(clipMax,L)),N=Math.max(clipMin,Math.min(clipMax,N))],de=[Q=Math.max(clipMin,Math.min(clipMax,Q)),ue=Math.max(clipMin,Math.min(clipMax,ue))];clipLine(ke,de,e,t,r,n)?(F||(d.lineStart(),d.point(ke[0],ke[1])),d.point(de[0],de[1]),_e||d.lineEnd(),G=!1):_e&&(d.lineStart(),d.point(Q,ue),G=!1)}L=Q,N=ue,F=_e}return P}}function extent(){var e=0,t=0,r=960,n=500,i,o,l;return l={stream:function(u){return i&&o===u?i:i=clipRectangle(e,t,r,n)(o=u)},extent:function(u){return arguments.length?(e=+u[0][0],t=+u[0][1],r=+u[1][0],n=+u[1][1],i=o=null,l):[[e,t],[r,n]]}}}var lengthSum$1=adder(),lambda0,sinPhi0,cosPhi0,lengthStream$1={sphere:noop$1,point:noop$1,lineStart:lengthLineStart,lineEnd:noop$1,polygonStart:noop$1,polygonEnd:noop$1};function lengthLineStart(){lengthStream$1.point=lengthPointFirst$1,lengthStream$1.lineEnd=lengthLineEnd}function lengthLineEnd(){lengthStream$1.point=lengthStream$1.lineEnd=noop$1}function lengthPointFirst$1(e,t){e*=radians,t*=radians,lambda0=e,sinPhi0=sin$1(t),cosPhi0=cos$1(t),lengthStream$1.point=lengthPoint$1}function lengthPoint$1(e,t){e*=radians,t*=radians;var r=sin$1(t),n=cos$1(t),i=abs$1(e-lambda0),o=cos$1(i),l=sin$1(i),u=n*l,h=cosPhi0*r-sinPhi0*n*o,f=sinPhi0*r+cosPhi0*n*o;lengthSum$1.add(atan2$1(sqrt$2(u*u+h*h),f)),lambda0=e,sinPhi0=r,cosPhi0=n}function length$1(e){return lengthSum$1.reset(),geoStream(e,lengthStream$1),+lengthSum$1}var coordinates=[null,null],object={type:"LineString",coordinates};function distance$1(e,t){return coordinates[0]=e,coordinates[1]=t,length$1(object)}var containsObjectType={Feature:function(e,t){return containsGeometry(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)if(containsGeometry(r[n].geometry,t))return!0;return!1}},containsGeometryType={Sphere:function(){return!0},Point:function(e,t){return containsPoint(e.coordinates,t)},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(containsPoint(r[n],t))return!0;return!1},LineString:function(e,t){return containsLine(e.coordinates,t)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(containsLine(r[n],t))return!0;return!1},Polygon:function(e,t){return containsPolygon(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(containsPolygon(r[n],t))return!0;return!1},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)if(containsGeometry(r[n],t))return!0;return!1}};function containsGeometry(e,t){return e&&containsGeometryType.hasOwnProperty(e.type)?containsGeometryType[e.type](e,t):!1}function containsPoint(e,t){return distance$1(e,t)===0}function containsLine(e,t){for(var r,n,i,o=0,l=e.length;o<l;o++){if(n=distance$1(e[o],t),n===0||o>0&&(i=distance$1(e[o],e[o-1]),i>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<epsilon2$1*i))return!0;r=n}return!1}function containsPolygon(e,t){return!!polygonContains(e.map(ringRadians),pointRadians(t))}function ringRadians(e){return e=e.map(pointRadians),e.pop(),e}function pointRadians(e){return[e[0]*radians,e[1]*radians]}function contains$1(e,t){return(e&&containsObjectType.hasOwnProperty(e.type)?containsObjectType[e.type]:containsGeometry)(e,t)}function graticuleX(e,t,r){var n=sequence(e,t-epsilon$2,r).concat(t);return function(i){return n.map(function(o){return[i,o]})}}function graticuleY(e,t,r){var n=sequence(e,t-epsilon$2,r).concat(t);return function(i){return n.map(function(o){return[o,i]})}}function graticule(){var e,t,r,n,i,o,l,u,h=10,f=h,d=90,g=360,p,m,b,$,S=2.5;function R(){return{type:"MultiLineString",coordinates:L()}}function L(){return sequence(ceil(n/d)*d,r,d).map(b).concat(sequence(ceil(u/g)*g,l,g).map($)).concat(sequence(ceil(t/h)*h,e,h).filter(function(N){return abs$1(N%d)>epsilon$2}).map(p)).concat(sequence(ceil(o/f)*f,i,f).filter(function(N){return abs$1(N%g)>epsilon$2}).map(m))}return R.lines=function(){return L().map(function(N){return{type:"LineString",coordinates:N}})},R.outline=function(){return{type:"Polygon",coordinates:[b(n).concat($(l).slice(1),b(r).reverse().slice(1),$(u).reverse().slice(1))]}},R.extent=function(N){return arguments.length?R.extentMajor(N).extentMinor(N):R.extentMinor()},R.extentMajor=function(N){return arguments.length?(n=+N[0][0],r=+N[1][0],u=+N[0][1],l=+N[1][1],n>r&&(N=n,n=r,r=N),u>l&&(N=u,u=l,l=N),R.precision(S)):[[n,u],[r,l]]},R.extentMinor=function(N){return arguments.length?(t=+N[0][0],e=+N[1][0],o=+N[0][1],i=+N[1][1],t>e&&(N=t,t=e,e=N),o>i&&(N=o,o=i,i=N),R.precision(S)):[[t,o],[e,i]]},R.step=function(N){return arguments.length?R.stepMajor(N).stepMinor(N):R.stepMinor()},R.stepMajor=function(N){return arguments.length?(d=+N[0],g=+N[1],R):[d,g]},R.stepMinor=function(N){return arguments.length?(h=+N[0],f=+N[1],R):[h,f]},R.precision=function(N){return arguments.length?(S=+N,p=graticuleX(o,i,90),m=graticuleY(t,e,S),b=graticuleX(u,l,90),$=graticuleY(n,r,S),R):S},R.extentMajor([[-180,-90+epsilon$2],[180,90-epsilon$2]]).extentMinor([[-180,-80-epsilon$2],[180,80+epsilon$2]])}function graticule10(){return graticule()()}function interpolate(e,t){var r=e[0]*radians,n=e[1]*radians,i=t[0]*radians,o=t[1]*radians,l=cos$1(n),u=sin$1(n),h=cos$1(o),f=sin$1(o),d=l*cos$1(r),g=l*sin$1(r),p=h*cos$1(i),m=h*sin$1(i),b=2*asin$1(sqrt$2(haversin(o-n)+l*h*haversin(i-r))),$=sin$1(b),S=b?function(R){var L=sin$1(R*=b)/$,N=sin$1(b-R)/$,F=N*d+L*p,H=N*g+L*m,G=N*u+L*f;return[atan2$1(H,F)*degrees,atan2$1(G,sqrt$2(F*F+H*H))*degrees]}:function(){return[r*degrees,n*degrees]};return S.distance=b,S}function identity$5(e){return e}var areaSum=adder(),areaRingSum=adder(),x00$2,y00$2,x0$3,y0$3,areaStream={point:noop$1,lineStart:noop$1,lineEnd:noop$1,polygonStart:function(){areaStream.lineStart=areaRingStart,areaStream.lineEnd=areaRingEnd},polygonEnd:function(){areaStream.lineStart=areaStream.lineEnd=areaStream.point=noop$1,areaSum.add(abs$1(areaRingSum)),areaRingSum.reset()},result:function(){var e=areaSum/2;return areaSum.reset(),e}};function areaRingStart(){areaStream.point=areaPointFirst}function areaPointFirst(e,t){areaStream.point=areaPoint,x00$2=x0$3=e,y00$2=y0$3=t}function areaPoint(e,t){areaRingSum.add(y0$3*e-x0$3*t),x0$3=e,y0$3=t}function areaRingEnd(){areaPoint(x00$2,y00$2)}const pathArea=areaStream;var x0$2=1/0,y0$2=x0$2,x1=-x0$2,y1=x1,boundsStream={point:boundsPoint,lineStart:noop$1,lineEnd:noop$1,polygonStart:noop$1,polygonEnd:noop$1,result:function(){var e=[[x0$2,y0$2],[x1,y1]];return x1=y1=-(y0$2=x0$2=1/0),e}};function boundsPoint(e,t){e<x0$2&&(x0$2=e),e>x1&&(x1=e),t<y0$2&&(y0$2=t),t>y1&&(y1=t)}const boundsStream$1=boundsStream;var X0=0,Y0=0,Z0=0,X1=0,Y1=0,Z1=0,X2=0,Y2=0,Z2=0,x00$1,y00$1,x0$1,y0$1,centroidStream={point:centroidPoint,lineStart:centroidLineStart,lineEnd:centroidLineEnd,polygonStart:function(){centroidStream.lineStart=centroidRingStart,centroidStream.lineEnd=centroidRingEnd},polygonEnd:function(){centroidStream.point=centroidPoint,centroidStream.lineStart=centroidLineStart,centroidStream.lineEnd=centroidLineEnd},result:function(){var e=Z2?[X2/Z2,Y2/Z2]:Z1?[X1/Z1,Y1/Z1]:Z0?[X0/Z0,Y0/Z0]:[NaN,NaN];return X0=Y0=Z0=X1=Y1=Z1=X2=Y2=Z2=0,e}};function centroidPoint(e,t){X0+=e,Y0+=t,++Z0}function centroidLineStart(){centroidStream.point=centroidPointFirstLine}function centroidPointFirstLine(e,t){centroidStream.point=centroidPointLine,centroidPoint(x0$1=e,y0$1=t)}function centroidPointLine(e,t){var r=e-x0$1,n=t-y0$1,i=sqrt$2(r*r+n*n);X1+=i*(x0$1+e)/2,Y1+=i*(y0$1+t)/2,Z1+=i,centroidPoint(x0$1=e,y0$1=t)}function centroidLineEnd(){centroidStream.point=centroidPoint}function centroidRingStart(){centroidStream.point=centroidPointFirstRing}function centroidRingEnd(){centroidPointRing(x00$1,y00$1)}function centroidPointFirstRing(e,t){centroidStream.point=centroidPointRing,centroidPoint(x00$1=x0$1=e,y00$1=y0$1=t)}function centroidPointRing(e,t){var r=e-x0$1,n=t-y0$1,i=sqrt$2(r*r+n*n);X1+=i*(x0$1+e)/2,Y1+=i*(y0$1+t)/2,Z1+=i,i=y0$1*e-x0$1*t,X2+=i*(x0$1+e),Y2+=i*(y0$1+t),Z2+=i*3,centroidPoint(x0$1=e,y0$1=t)}const pathCentroid=centroidStream;function PathContext(e){this._context=e}PathContext.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,tau$1);break}}},result:noop$1};var lengthSum=adder(),lengthRing,x00,y00,x0,y0,lengthStream={point:noop$1,lineStart:function(){lengthStream.point=lengthPointFirst},lineEnd:function(){lengthRing&&lengthPoint(x00,y00),lengthStream.point=noop$1},polygonStart:function(){lengthRing=!0},polygonEnd:function(){lengthRing=null},result:function(){var e=+lengthSum;return lengthSum.reset(),e}};function lengthPointFirst(e,t){lengthStream.point=lengthPoint,x00=x0=e,y00=y0=t}function lengthPoint(e,t){x0-=e,y0-=t,lengthSum.add(sqrt$2(x0*x0+y0*y0)),x0=e,y0=t}const pathMeasure=lengthStream;function PathString(){this._string=[]}PathString.prototype={_radius:4.5,_circle:circle$3(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=circle$3(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function circle$3(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function index$2(e,t){var r=4.5,n,i;function o(l){return l&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),geoStream(l,n(i))),i.result()}return o.area=function(l){return geoStream(l,n(pathArea)),pathArea.result()},o.measure=function(l){return geoStream(l,n(pathMeasure)),pathMeasure.result()},o.bounds=function(l){return geoStream(l,n(boundsStream$1)),boundsStream$1.result()},o.centroid=function(l){return geoStream(l,n(pathCentroid)),pathCentroid.result()},o.projection=function(l){return arguments.length?(n=l==null?(e=null,identity$5):(e=l).stream,o):e},o.context=function(l){return arguments.length?(i=l==null?(t=null,new PathString):new PathContext(t=l),typeof r!="function"&&i.pointRadius(r),o):t},o.pointRadius=function(l){return arguments.length?(r=typeof l=="function"?l:(i.pointRadius(+l),+l),o):r},o.projection(e).context(t)}function transform$1(e){return{stream:transformer$3(e)}}function transformer$3(e){return function(t){var r=new TransformStream;for(var n in e)r[n]=e[n];return r.stream=t,r}}function TransformStream(){}TransformStream.prototype={constructor:TransformStream,point:function(e,t){this.stream.point(e,t)},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()}};function fit(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),n!=null&&e.clipExtent(null),geoStream(r,e.stream(boundsStream$1)),t(boundsStream$1.result()),n!=null&&e.clipExtent(n),e}function fitExtent(e,t,r){return fit(e,function(n){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],l=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),u=+t[0][0]+(i-l*(n[1][0]+n[0][0]))/2,h=+t[0][1]+(o-l*(n[1][1]+n[0][1]))/2;e.scale(150*l).translate([u,h])},r)}function fitSize(e,t,r){return fitExtent(e,[[0,0],t],r)}function fitWidth(e,t,r){return fit(e,function(n){var i=+t,o=i/(n[1][0]-n[0][0]),l=(i-o*(n[1][0]+n[0][0]))/2,u=-o*n[0][1];e.scale(150*o).translate([l,u])},r)}function fitHeight(e,t,r){return fit(e,function(n){var i=+t,o=i/(n[1][1]-n[0][1]),l=-o*n[0][0],u=(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([l,u])},r)}var maxDepth=16,cosMinDistance=cos$1(30*radians);function resample(e,t){return+t?resample$1(e,t):resampleNone(e)}function resampleNone(e){return transformer$3({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function resample$1(e,t){function r(n,i,o,l,u,h,f,d,g,p,m,b,$,S){var R=f-n,L=d-i,N=R*R+L*L;if(N>4*t&&$--){var F=l+p,H=u+m,G=h+b,P=sqrt$2(F*F+H*H+G*G),V=asin$1(G/=P),z=abs$1(abs$1(G)-1)<epsilon$2||abs$1(o-g)<epsilon$2?(o+g)/2:atan2$1(H,F),W=e(z,V),T=W[0],U=W[1],I=T-n,ae=U-i,Q=L*I-R*ae;(Q*Q/N>t||abs$1((R*I+L*ae)/N-.5)>.3||l*p+u*m+h*b<cosMinDistance)&&(r(n,i,o,l,u,h,T,U,z,F/=P,H/=P,G,$,S),S.point(T,U),r(T,U,z,F,H,G,f,d,g,p,m,b,$,S))}}return function(n){var i,o,l,u,h,f,d,g,p,m,b,$,S={point:R,lineStart:L,lineEnd:F,polygonStart:function(){n.polygonStart(),S.lineStart=H},polygonEnd:function(){n.polygonEnd(),S.lineStart=L}};function R(V,z){V=e(V,z),n.point(V[0],V[1])}function L(){g=NaN,S.point=N,n.lineStart()}function N(V,z){var W=cartesian([V,z]),T=e(V,z);r(g,p,d,m,b,$,g=T[0],p=T[1],d=V,m=W[0],b=W[1],$=W[2],maxDepth,n),n.point(g,p)}function F(){S.point=R,n.lineEnd()}function H(){L(),S.point=G,S.lineEnd=P}function G(V,z){N(i=V,z),o=g,l=p,u=m,h=b,f=$,S.point=N}function P(){r(g,p,d,m,b,$,o,l,i,u,h,f,maxDepth,n),S.lineEnd=F,F()}return S}}var transformRadians=transformer$3({point:function(e,t){this.stream.point(e*radians,t*radians)}});function transformRotate(e){return transformer$3({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}function scaleTranslate(e,t,r,n,i){function o(l,u){return l*=n,u*=i,[t+e*l,r-e*u]}return o.invert=function(l,u){return[(l-t)/e*n,(r-u)/e*i]},o}function scaleTranslateRotate(e,t,r,n,i,o){var l=cos$1(o),u=sin$1(o),h=l*e,f=u*e,d=l/e,g=u/e,p=(u*r-l*t)/e,m=(u*t+l*r)/e;function b($,S){return $*=n,S*=i,[h*$-f*S+t,r-f*$-h*S]}return b.invert=function($,S){return[n*(d*$-g*S+p),i*(m-g*$-d*S)]},b}function projection(e){return projectionMutator(function(){return e})()}function projectionMutator(e){var t,r=150,n=480,i=250,o=0,l=0,u=0,h=0,f=0,d,g=0,p=1,m=1,b=null,$=clipAntimeridian,S=null,R,L,N,F=identity$5,H=.5,G,P,V,z,W;function T(Q){return V(Q[0]*radians,Q[1]*radians)}function U(Q){return Q=V.invert(Q[0],Q[1]),Q&&[Q[0]*degrees,Q[1]*degrees]}T.stream=function(Q){return z&&W===Q?z:z=transformRadians(transformRotate(d)($(G(F(W=Q)))))},T.preclip=function(Q){return arguments.length?($=Q,b=void 0,ae()):$},T.postclip=function(Q){return arguments.length?(F=Q,S=R=L=N=null,ae()):F},T.clipAngle=function(Q){return arguments.length?($=+Q?clipCircle(b=Q*radians):(b=null,clipAntimeridian),ae()):b*degrees},T.clipExtent=function(Q){return arguments.length?(F=Q==null?(S=R=L=N=null,identity$5):clipRectangle(S=+Q[0][0],R=+Q[0][1],L=+Q[1][0],N=+Q[1][1]),ae()):S==null?null:[[S,R],[L,N]]},T.scale=function(Q){return arguments.length?(r=+Q,I()):r},T.translate=function(Q){return arguments.length?(n=+Q[0],i=+Q[1],I()):[n,i]},T.center=function(Q){return arguments.length?(o=Q[0]%360*radians,l=Q[1]%360*radians,I()):[o*degrees,l*degrees]},T.rotate=function(Q){return arguments.length?(u=Q[0]%360*radians,h=Q[1]%360*radians,f=Q.length>2?Q[2]%360*radians:0,I()):[u*degrees,h*degrees,f*degrees]},T.angle=function(Q){return arguments.length?(g=Q%360*radians,I()):g*degrees},T.reflectX=function(Q){return arguments.length?(p=Q?-1:1,I()):p<0},T.reflectY=function(Q){return arguments.length?(m=Q?-1:1,I()):m<0},T.precision=function(Q){return arguments.length?(G=resample(P,H=Q*Q),ae()):sqrt$2(H)},T.fitExtent=function(Q,ue){return fitExtent(T,Q,ue)},T.fitSize=function(Q,ue){return fitSize(T,Q,ue)},T.fitWidth=function(Q,ue){return fitWidth(T,Q,ue)},T.fitHeight=function(Q,ue){return fitHeight(T,Q,ue)};function I(){var Q=scaleTranslateRotate(r,0,0,p,m,g).apply(null,t(o,l)),ue=(g?scaleTranslateRotate:scaleTranslate)(r,n-Q[0],i-Q[1],p,m,g);return d=rotateRadians(u,h,f),P=compose(t,ue),V=compose(d,P),G=resample(P,H),ae()}function ae(){return z=W=null,T}return function(){return t=e.apply(this,arguments),T.invert=t.invert&&U,I()}}function conicProjection(e){var t=0,r=pi$1/3,n=projectionMutator(e),i=n(t,r);return i.parallels=function(o){return arguments.length?n(t=o[0]*radians,r=o[1]*radians):[t*degrees,r*degrees]},i}function cylindricalEqualAreaRaw(e){var t=cos$1(e);function r(n,i){return[n*t,sin$1(i)/t]}return r.invert=function(n,i){return[n/t,asin$1(i*t)]},r}function conicEqualAreaRaw(e,t){var r=sin$1(e),n=(r+sin$1(t))/2;if(abs$1(n)<epsilon$2)return cylindricalEqualAreaRaw(e);var i=1+r*(2*n-r),o=sqrt$2(i)/n;function l(u,h){var f=sqrt$2(i-2*n*sin$1(h))/n;return[f*sin$1(u*=n),o-f*cos$1(u)]}return l.invert=function(u,h){var f=o-h,d=atan2$1(u,abs$1(f))*sign$1(f);return f*n<0&&(d-=pi$1*sign$1(u)*sign$1(f)),[d/n,asin$1((i-(u*u+f*f)*n*n)/(2*n))]},l}function conicEqualArea(){return conicProjection(conicEqualAreaRaw).scale(155.424).center([0,33.6442])}function albers(){return conicEqualArea().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function multiplex(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i<t;)e[i].point(r,n)},sphere:function(){for(var r=-1;++r<t;)e[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)e[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)e[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)e[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)e[r].polygonEnd()}}}function albersUsa(){var e,t,r=albers(),n,i=conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,l=conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u,h,f={point:function(p,m){h=[p,m]}};function d(p){var m=p[0],b=p[1];return h=null,n.point(m,b),h||(o.point(m,b),h)||(u.point(m,b),h)}d.invert=function(p){var m=r.scale(),b=r.translate(),$=(p[0]-b[0])/m,S=(p[1]-b[1])/m;return(S>=.12&&S<.234&&$>=-.425&&$<-.214?i:S>=.166&&S<.234&&$>=-.214&&$<-.115?l:r).invert(p)},d.stream=function(p){return e&&t===p?e:e=multiplex([r.stream(t=p),i.stream(p),l.stream(p)])},d.precision=function(p){return arguments.length?(r.precision(p),i.precision(p),l.precision(p),g()):r.precision()},d.scale=function(p){return arguments.length?(r.scale(p),i.scale(p*.35),l.scale(p),d.translate(r.translate())):r.scale()},d.translate=function(p){if(!arguments.length)return r.translate();var m=r.scale(),b=+p[0],$=+p[1];return n=r.translate(p).clipExtent([[b-.455*m,$-.238*m],[b+.455*m,$+.238*m]]).stream(f),o=i.translate([b-.307*m,$+.201*m]).clipExtent([[b-.425*m+epsilon$2,$+.12*m+epsilon$2],[b-.214*m-epsilon$2,$+.234*m-epsilon$2]]).stream(f),u=l.translate([b-.205*m,$+.212*m]).clipExtent([[b-.214*m+epsilon$2,$+.166*m+epsilon$2],[b-.115*m-epsilon$2,$+.234*m-epsilon$2]]).stream(f),g()},d.fitExtent=function(p,m){return fitExtent(d,p,m)},d.fitSize=function(p,m){return fitSize(d,p,m)},d.fitWidth=function(p,m){return fitWidth(d,p,m)},d.fitHeight=function(p,m){return fitHeight(d,p,m)};function g(){return e=t=null,d}return d.scale(1070)}function azimuthalRaw(e){return function(t,r){var n=cos$1(t),i=cos$1(r),o=e(n*i);return[o*i*sin$1(t),o*sin$1(r)]}}function azimuthalInvert(e){return function(t,r){var n=sqrt$2(t*t+r*r),i=e(n),o=sin$1(i),l=cos$1(i);return[atan2$1(t*o,n*l),asin$1(n&&r*o/n)]}}var azimuthalEqualAreaRaw=azimuthalRaw(function(e){return sqrt$2(2/(1+e))});azimuthalEqualAreaRaw.invert=azimuthalInvert(function(e){return 2*asin$1(e/2)});function azimuthalEqualArea(){return projection(azimuthalEqualAreaRaw).scale(124.75).clipAngle(180-.001)}var azimuthalEquidistantRaw=azimuthalRaw(function(e){return(e=acos$1(e))&&e/sin$1(e)});azimuthalEquidistantRaw.invert=azimuthalInvert(function(e){return e});function azimuthalEquidistant(){return projection(azimuthalEquidistantRaw).scale(79.4188).clipAngle(180-.001)}function mercatorRaw(e,t){return[e,log$3(tan((halfPi$1+t)/2))]}mercatorRaw.invert=function(e,t){return[e,2*atan(exp(t))-halfPi$1]};function mercator(){return mercatorProjection(mercatorRaw).scale(961/tau$1)}function mercatorProjection(e){var t=projection(e),r=t.center,n=t.scale,i=t.translate,o=t.clipExtent,l=null,u,h,f;t.scale=function(g){return arguments.length?(n(g),d()):n()},t.translate=function(g){return arguments.length?(i(g),d()):i()},t.center=function(g){return arguments.length?(r(g),d()):r()},t.clipExtent=function(g){return arguments.length?(g==null?l=u=h=f=null:(l=+g[0][0],u=+g[0][1],h=+g[1][0],f=+g[1][1]),d()):l==null?null:[[l,u],[h,f]]};function d(){var g=pi$1*n(),p=t(rotation(t.rotate()).invert([0,0]));return o(l==null?[[p[0]-g,p[1]-g],[p[0]+g,p[1]+g]]:e===mercatorRaw?[[Math.max(p[0]-g,l),u],[Math.min(p[0]+g,h),f]]:[[l,Math.max(p[1]-g,u)],[h,Math.min(p[1]+g,f)]])}return d()}function tany(e){return tan((halfPi$1+e)/2)}function conicConformalRaw(e,t){var r=cos$1(e),n=e===t?sin$1(e):log$3(r/cos$1(t))/log$3(tany(t)/tany(e)),i=r*pow$1(tany(e),n)/n;if(!n)return mercatorRaw;function o(l,u){i>0?u<-halfPi$1+epsilon$2&&(u=-halfPi$1+epsilon$2):u>halfPi$1-epsilon$2&&(u=halfPi$1-epsilon$2);var h=i/pow$1(tany(u),n);return[h*sin$1(n*l),i-h*cos$1(n*l)]}return o.invert=function(l,u){var h=i-u,f=sign$1(n)*sqrt$2(l*l+h*h),d=atan2$1(l,abs$1(h))*sign$1(h);return h*n<0&&(d-=pi$1*sign$1(l)*sign$1(h)),[d/n,2*atan(pow$1(i/f,1/n))-halfPi$1]},o}function conicConformal(){return conicProjection(conicConformalRaw).scale(109.5).parallels([30,30])}function equirectangularRaw(e,t){return[e,t]}equirectangularRaw.invert=equirectangularRaw;function equirectangular(){return projection(equirectangularRaw).scale(152.63)}function conicEquidistantRaw(e,t){var r=cos$1(e),n=e===t?sin$1(e):(r-cos$1(t))/(t-e),i=r/n+e;if(abs$1(n)<epsilon$2)return equirectangularRaw;function o(l,u){var h=i-u,f=n*l;return[h*sin$1(f),i-h*cos$1(f)]}return o.invert=function(l,u){var h=i-u,f=atan2$1(l,abs$1(h))*sign$1(h);return h*n<0&&(f-=pi$1*sign$1(l)*sign$1(h)),[f/n,i-sign$1(n)*sqrt$2(l*l+h*h)]},o}function conicEquidistant(){return conicProjection(conicEquidistantRaw).scale(131.154).center([0,13.9389])}var A1=1.340264,A2=-.081106,A3=893e-6,A4=.003796,M=sqrt$2(3)/2,iterations=12;function equalEarthRaw(e,t){var r=asin$1(M*sin$1(t)),n=r*r,i=n*n*n;return[e*cos$1(r)/(M*(A1+3*A2*n+i*(7*A3+9*A4*n))),r*(A1+A2*n+i*(A3+A4*n))]}equalEarthRaw.invert=function(e,t){for(var r=t,n=r*r,i=n*n*n,o=0,l,u,h;o<iterations&&(u=r*(A1+A2*n+i*(A3+A4*n))-t,h=A1+3*A2*n+i*(7*A3+9*A4*n),r-=l=u/h,n=r*r,i=n*n*n,!(abs$1(l)<epsilon2$1));++o);return[M*e*(A1+3*A2*n+i*(7*A3+9*A4*n))/cos$1(r),asin$1(sin$1(r)/M)]};function equalEarth(){return projection(equalEarthRaw).scale(177.158)}function gnomonicRaw(e,t){var r=cos$1(t),n=cos$1(e)*r;return[r*sin$1(e)/n,sin$1(t)/n]}gnomonicRaw.invert=azimuthalInvert(atan);function gnomonic(){return projection(gnomonicRaw).scale(144.049).clipAngle(60)}function identity$4(){var e=1,t=0,r=0,n=1,i=1,o=0,l,u,h=null,f,d,g,p=1,m=1,b=transformer$3({point:function(F,H){var G=N([F,H]);this.stream.point(G[0],G[1])}}),$=identity$5,S,R;function L(){return p=e*n,m=e*i,S=R=null,N}function N(F){var H=F[0]*p,G=F[1]*m;if(o){var P=G*l-H*u;H=H*l+G*u,G=P}return[H+t,G+r]}return N.invert=function(F){var H=F[0]-t,G=F[1]-r;if(o){var P=G*l+H*u;H=H*l-G*u,G=P}return[H/p,G/m]},N.stream=function(F){return S&&R===F?S:S=b($(R=F))},N.postclip=function(F){return arguments.length?($=F,h=f=d=g=null,L()):$},N.clipExtent=function(F){return arguments.length?($=F==null?(h=f=d=g=null,identity$5):clipRectangle(h=+F[0][0],f=+F[0][1],d=+F[1][0],g=+F[1][1]),L()):h==null?null:[[h,f],[d,g]]},N.scale=function(F){return arguments.length?(e=+F,L()):e},N.translate=function(F){return arguments.length?(t=+F[0],r=+F[1],L()):[t,r]},N.angle=function(F){return arguments.length?(o=F%360*radians,u=sin$1(o),l=cos$1(o),L()):o*degrees},N.reflectX=function(F){return arguments.length?(n=F?-1:1,L()):n<0},N.reflectY=function(F){return arguments.length?(i=F?-1:1,L()):i<0},N.fitExtent=function(F,H){return fitExtent(N,F,H)},N.fitSize=function(F,H){return fitSize(N,F,H)},N.fitWidth=function(F,H){return fitWidth(N,F,H)},N.fitHeight=function(F,H){return fitHeight(N,F,H)},N}function naturalEarth1Raw(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),t*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}naturalEarth1Raw.invert=function(e,t){var r=t,n=25,i;do{var o=r*r,l=o*o;r-=i=(r*(1.007226+o*(.015085+l*(-.044475+.028874*o-.005916*l)))-t)/(1.007226+o*(.015085*3+l*(-.044475*7+.028874*9*o-.005916*11*l)))}while(abs$1(i)>epsilon$2&&--n>0);return[e/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]};function naturalEarth1(){return projection(naturalEarth1Raw).scale(175.295)}function orthographicRaw(e,t){return[cos$1(t)*sin$1(e),sin$1(t)]}orthographicRaw.invert=azimuthalInvert(asin$1);function orthographic(){return projection(orthographicRaw).scale(249.5).clipAngle(90+epsilon$2)}function stereographicRaw(e,t){var r=cos$1(t),n=1+cos$1(e)*r;return[r*sin$1(e)/n,sin$1(t)/n]}stereographicRaw.invert=azimuthalInvert(function(e){return 2*atan(e)});function stereographic(){return projection(stereographicRaw).scale(250).clipAngle(142)}function transverseMercatorRaw(e,t){return[log$3(tan((halfPi$1+t)/2)),-e]}transverseMercatorRaw.invert=function(e,t){return[-t,2*atan(exp(e))-halfPi$1]};function transverseMercator(){var e=mercatorProjection(transverseMercatorRaw),t=e.center,r=e.rotate;return e.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},e.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}function defaultSeparation$1(e,t){return e.parent===t.parent?1:2}function meanX(e){return e.reduce(meanXReduce,0)/e.length}function meanXReduce(e,t){return e+t.x}function maxY(e){return 1+e.reduce(maxYReduce,0)}function maxYReduce(e,t){return Math.max(e,t.y)}function leafLeft(e){for(var t;t=e.children;)e=t[0];return e}function leafRight(e){for(var t;t=e.children;)e=t[t.length-1];return e}function cluster(){var e=defaultSeparation$1,t=1,r=1,n=!1;function i(o){var l,u=0;o.eachAfter(function(p){var m=p.children;m?(p.x=meanX(m),p.y=maxY(m)):(p.x=l?u+=e(p,l):0,p.y=0,l=p)});var h=leafLeft(o),f=leafRight(o),d=h.x-e(h,f)/2,g=f.x+e(f,h)/2;return o.eachAfter(n?function(p){p.x=(p.x-o.x)*t,p.y=(o.y-p.y)*r}:function(p){p.x=(p.x-d)/(g-d)*t,p.y=(1-(o.y?p.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}function count$1(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function node_count(){return this.eachAfter(count$1)}function node_each(e){var t=this,r,n=[t],i,o,l;do for(r=n.reverse(),n=[];t=r.pop();)if(e(t),i=t.children,i)for(o=0,l=i.length;o<l;++o)n.push(i[o]);while(n.length);return this}function node_eachBefore(e){for(var t=this,r=[t],n,i;t=r.pop();)if(e(t),n=t.children,n)for(i=n.length-1;i>=0;--i)r.push(n[i]);return this}function node_eachAfter(e){for(var t=this,r=[t],n=[],i,o,l;t=r.pop();)if(n.push(t),i=t.children,i)for(o=0,l=i.length;o<l;++o)r.push(i[o]);for(;t=n.pop();)e(t);return this}function node_sum(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}function node_sort(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function node_path(e){for(var t=this,r=leastCommonAncestor(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function leastCommonAncestor(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function node_ancestors(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function node_descendants(){var e=[];return this.each(function(t){e.push(t)}),e}function node_leaves(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function node_links(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function hierarchy(e,t){var r=new Node$1(e),n=+e.value&&(r.value=e.value),i,o=[r],l,u,h,f;for(t==null&&(t=defaultChildren);i=o.pop();)if(n&&(i.value=+i.data.value),(u=t(i.data))&&(f=u.length))for(i.children=new Array(f),h=f-1;h>=0;--h)o.push(l=i.children[h]=new Node$1(u[h])),l.parent=i,l.depth=i.depth+1;return r.eachBefore(computeHeight)}function node_copy(){return hierarchy(this).eachBefore(copyData)}function defaultChildren(e){return e.children}function copyData(e){e.data=e.data.data}function computeHeight(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Node$1(e){this.data=e,this.depth=this.height=0,this.parent=null}Node$1.prototype=hierarchy.prototype={constructor:Node$1,count:node_count,each:node_each,eachAfter:node_eachAfter,eachBefore:node_eachBefore,sum:node_sum,sort:node_sort,path:node_path,ancestors:node_ancestors,descendants:node_descendants,leaves:node_leaves,links:node_links,copy:node_copy};var slice$2=Array.prototype.slice;function shuffle(e){for(var t=e.length,r,n;t;)n=Math.random()*t--|0,r=e[t],e[t]=e[n],e[n]=r;return e}function enclose(e){for(var t=0,r=(e=shuffle(slice$2.call(e))).length,n=[],i,o;t<r;)i=e[t],o&&enclosesWeak(o,i)?++t:(o=encloseBasis(n=extendBasis(n,i)),t=0);return o}function extendBasis(e,t){var r,n;if(enclosesWeakAll(t,e))return[t];for(r=0;r<e.length;++r)if(enclosesNot(t,e[r])&&enclosesWeakAll(encloseBasis2(e[r],t),e))return[e[r],t];for(r=0;r<e.length-1;++r)for(n=r+1;n<e.length;++n)if(enclosesNot(encloseBasis2(e[r],e[n]),t)&&enclosesNot(encloseBasis2(e[r],t),e[n])&&enclosesNot(encloseBasis2(e[n],t),e[r])&&enclosesWeakAll(encloseBasis3(e[r],e[n],t),e))return[e[r],e[n],t];throw new Error}function enclosesNot(e,t){var r=e.r-t.r,n=t.x-e.x,i=t.y-e.y;return r<0||r*r<n*n+i*i}function enclosesWeak(e,t){var r=e.r-t.r+1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function enclosesWeakAll(e,t){for(var r=0;r<t.length;++r)if(!enclosesWeak(e,t[r]))return!1;return!0}function encloseBasis(e){switch(e.length){case 1:return encloseBasis1(e[0]);case 2:return encloseBasis2(e[0],e[1]);case 3:return encloseBasis3(e[0],e[1],e[2])}}function encloseBasis1(e){return{x:e.x,y:e.y,r:e.r}}function encloseBasis2(e,t){var r=e.x,n=e.y,i=e.r,o=t.x,l=t.y,u=t.r,h=o-r,f=l-n,d=u-i,g=Math.sqrt(h*h+f*f);return{x:(r+o+h/g*d)/2,y:(n+l+f/g*d)/2,r:(g+i+u)/2}}function encloseBasis3(e,t,r){var n=e.x,i=e.y,o=e.r,l=t.x,u=t.y,h=t.r,f=r.x,d=r.y,g=r.r,p=n-l,m=n-f,b=i-u,$=i-d,S=h-o,R=g-o,L=n*n+i*i-o*o,N=L-l*l-u*u+h*h,F=L-f*f-d*d+g*g,H=m*b-p*$,G=(b*F-$*N)/(H*2)-n,P=($*S-b*R)/H,V=(m*N-p*F)/(H*2)-i,z=(p*R-m*S)/H,W=P*P+z*z-1,T=2*(o+G*P+V*z),U=G*G+V*V-o*o,I=-(W?(T+Math.sqrt(T*T-4*W*U))/(2*W):U/T);return{x:n+G+P*I,y:i+V+z*I,r:I}}function place(e,t,r){var n=e.x-t.x,i,o,l=e.y-t.y,u,h,f=n*n+l*l;f?(o=t.r+r.r,o*=o,h=e.r+r.r,h*=h,o>h?(i=(f+h-o)/(2*f),u=Math.sqrt(Math.max(0,h/f-i*i)),r.x=e.x-i*n-u*l,r.y=e.y-i*l+u*n):(i=(f+o-h)/(2*f),u=Math.sqrt(Math.max(0,o/f-i*i)),r.x=t.x+i*n-u*l,r.y=t.y+i*l+u*n)):(r.x=t.x+r.r,r.y=t.y)}function intersects(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function score(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,o=(t.y*r.r+r.y*t.r)/n;return i*i+o*o}function Node(e){this._=e,this.next=null,this.previous=null}function packEnclose(e){if(!(i=e.length))return 0;var t,r,n,i,o,l,u,h,f,d,g;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;place(r,t,n=e[2]),t=new Node(t),r=new Node(r),n=new Node(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(u=3;u<i;++u){place(t._,r._,n=e[u]),n=new Node(n),h=r.next,f=t.previous,d=r._.r,g=t._.r;do if(d<=g){if(intersects(h._,n._)){r=h,t.next=r,r.previous=t,--u;continue e}d+=h._.r,h=h.next}else{if(intersects(f._,n._)){t=f,t.next=r,r.previous=t,--u;continue e}g+=f._.r,f=f.previous}while(h!==f.next);for(n.previous=t,n.next=r,t.next=r.previous=r=n,o=score(t);(n=n.next)!==r;)(l=score(n))<o&&(t=n,o=l);r=t.next}for(t=[r._],n=r;(n=n.next)!==r;)t.push(n._);for(n=enclose(t),u=0;u<i;++u)t=e[u],t.x-=n.x,t.y-=n.y;return n.r}function siblings(e){return packEnclose(e),e}function optional(e){return e==null?null:required(e)}function required(e){if(typeof e!="function")throw new Error;return e}function constantZero(){return 0}function constant$4(e){return function(){return e}}function defaultRadius(e){return Math.sqrt(e.value)}function index$1(){var e=null,t=1,r=1,n=constantZero;function i(o){return o.x=t/2,o.y=r/2,e?o.eachBefore(radiusLeaf(e)).eachAfter(packChildren(n,.5)).eachBefore(translateChild(1)):o.eachBefore(radiusLeaf(defaultRadius)).eachAfter(packChildren(constantZero,1)).eachAfter(packChildren(n,o.r/Math.min(t,r))).eachBefore(translateChild(Math.min(t,r)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=optional(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],r=+o[1],i):[t,r]},i.padding=function(o){return arguments.length?(n=typeof o=="function"?o:constant$4(+o),i):n},i}function radiusLeaf(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function packChildren(e,t){return function(r){if(n=r.children){var n,i,o=n.length,l=e(r)*t||0,u;if(l)for(i=0;i<o;++i)n[i].r+=l;if(u=packEnclose(n),l)for(i=0;i<o;++i)n[i].r-=l;r.r=u+l}}}function translateChild(e){return function(t){var r=t.parent;t.r*=e,r&&(t.x=r.x+e*t.x,t.y=r.y+e*t.y)}}function roundNode(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function treemapDice(e,t,r,n,i){for(var o=e.children,l,u=-1,h=o.length,f=e.value&&(n-t)/e.value;++u<h;)l=o[u],l.y0=r,l.y1=i,l.x0=t,l.x1=t+=l.value*f}function partition(){var e=1,t=1,r=0,n=!1;function i(l){var u=l.height+1;return l.x0=l.y0=r,l.x1=e,l.y1=t/u,l.eachBefore(o(t,u)),n&&l.eachBefore(roundNode),l}function o(l,u){return function(h){h.children&&treemapDice(h,h.x0,l*(h.depth+1)/u,h.x1,l*(h.depth+2)/u);var f=h.x0,d=h.y0,g=h.x1-r,p=h.y1-r;g<f&&(f=g=(f+g)/2),p<d&&(d=p=(d+p)/2),h.x0=f,h.y0=d,h.x1=g,h.y1=p}}return i.round=function(l){return arguments.length?(n=!!l,i):n},i.size=function(l){return arguments.length?(e=+l[0],t=+l[1],i):[e,t]},i.padding=function(l){return arguments.length?(r=+l,i):r},i}var keyPrefix="$",preroot={depth:-1},ambiguous={};function defaultId(e){return e.id}function defaultParentId(e){return e.parentId}function stratify(){var e=defaultId,t=defaultParentId;function r(n){var i,o,l=n.length,u,h,f,d=new Array(l),g,p,m={};for(o=0;o<l;++o)i=n[o],f=d[o]=new Node$1(i),(g=e(i,o,n))!=null&&(g+="")&&(p=keyPrefix+(f.id=g),m[p]=p in m?ambiguous:f);for(o=0;o<l;++o)if(f=d[o],g=t(n[o],o,n),g==null||!(g+="")){if(u)throw new Error("multiple roots");u=f}else{if(h=m[keyPrefix+g],!h)throw new Error("missing: "+g);if(h===ambiguous)throw new Error("ambiguous: "+g);h.children?h.children.push(f):h.children=[f],f.parent=h}if(!u)throw new Error("no root");if(u.parent=preroot,u.eachBefore(function(b){b.depth=b.parent.depth+1,--l}).eachBefore(computeHeight),u.parent=null,l>0)throw new Error("cycle");return u}return r.id=function(n){return arguments.length?(e=required(n),r):e},r.parentId=function(n){return arguments.length?(t=required(n),r):t},r}function defaultSeparation(e,t){return e.parent===t.parent?1:2}function nextLeft(e){var t=e.children;return t?t[0]:e.t}function nextRight(e){var t=e.children;return t?t[t.length-1]:e.t}function moveSubtree(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function executeShifts(e){for(var t=0,r=0,n=e.children,i=n.length,o;--i>=0;)o=n[i],o.z+=t,o.m+=t,t+=o.s+(r+=o.c)}function nextAncestor(e,t,r){return e.a.parent===t.parent?e.a:r}function TreeNode(e,t){this._=e,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=t}TreeNode.prototype=Object.create(Node$1.prototype);function treeRoot(e){for(var t=new TreeNode(e,0),r,n=[t],i,o,l,u;r=n.pop();)if(o=r._.children)for(r.children=new Array(u=o.length),l=u-1;l>=0;--l)n.push(i=r.children[l]=new TreeNode(o[l],l)),i.parent=r;return(t.parent=new TreeNode(null,0)).children=[t],t}function tree(){var e=defaultSeparation,t=1,r=1,n=null;function i(f){var d=treeRoot(f);if(d.eachAfter(o),d.parent.m=-d.z,d.eachBefore(l),n)f.eachBefore(h);else{var g=f,p=f,m=f;f.eachBefore(function(L){L.x<g.x&&(g=L),L.x>p.x&&(p=L),L.depth>m.depth&&(m=L)});var b=g===p?1:e(g,p)/2,$=b-g.x,S=t/(p.x+b+$),R=r/(m.depth||1);f.eachBefore(function(L){L.x=(L.x+$)*S,L.y=L.depth*R})}return f}function o(f){var d=f.children,g=f.parent.children,p=f.i?g[f.i-1]:null;if(d){executeShifts(f);var m=(d[0].z+d[d.length-1].z)/2;p?(f.z=p.z+e(f._,p._),f.m=f.z-m):f.z=m}else p&&(f.z=p.z+e(f._,p._));f.parent.A=u(f,p,f.parent.A||g[0])}function l(f){f._.x=f.z+f.parent.m,f.m+=f.parent.m}function u(f,d,g){if(d){for(var p=f,m=f,b=d,$=p.parent.children[0],S=p.m,R=m.m,L=b.m,N=$.m,F;b=nextRight(b),p=nextLeft(p),b&&p;)$=nextLeft($),m=nextRight(m),m.a=f,F=b.z+L-p.z-S+e(b._,p._),F>0&&(moveSubtree(nextAncestor(b,f,g),f,F),S+=F,R+=F),L+=b.m,S+=p.m,N+=$.m,R+=m.m;b&&!nextRight(m)&&(m.t=b,m.m+=L-R),p&&!nextLeft($)&&($.t=p,$.m+=S-N,g=f)}return g}function h(f){f.x*=t,f.y=f.depth*r}return i.separation=function(f){return arguments.length?(e=f,i):e},i.size=function(f){return arguments.length?(n=!1,t=+f[0],r=+f[1],i):n?null:[t,r]},i.nodeSize=function(f){return arguments.length?(n=!0,t=+f[0],r=+f[1],i):n?[t,r]:null},i}function treemapSlice(e,t,r,n,i){for(var o=e.children,l,u=-1,h=o.length,f=e.value&&(i-r)/e.value;++u<h;)l=o[u],l.x0=t,l.x1=n,l.y0=r,l.y1=r+=l.value*f}var phi=(1+Math.sqrt(5))/2;function squarifyRatio(e,t,r,n,i,o){for(var l=[],u=t.children,h,f,d=0,g=0,p=u.length,m,b,$=t.value,S,R,L,N,F,H,G;d<p;){m=i-r,b=o-n;do S=u[g++].value;while(!S&&g<p);for(R=L=S,H=Math.max(b/m,m/b)/($*e),G=S*S*H,F=Math.max(L/G,G/R);g<p;++g){if(S+=f=u[g].value,f<R&&(R=f),f>L&&(L=f),G=S*S*H,N=Math.max(L/G,G/R),N>F){S-=f;break}F=N}l.push(h={value:S,dice:m<b,children:u.slice(d,g)}),h.dice?treemapDice(h,r,n,i,$?n+=b*S/$:o):treemapSlice(h,r,n,$?r+=m*S/$:i,o),$-=S,d=g}return l}const squarify=function e(t){function r(n,i,o,l,u){squarifyRatio(t,n,i,o,l,u)}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(phi);function index(){var e=squarify,t=!1,r=1,n=1,i=[0],o=constantZero,l=constantZero,u=constantZero,h=constantZero,f=constantZero;function d(p){return p.x0=p.y0=0,p.x1=r,p.y1=n,p.eachBefore(g),i=[0],t&&p.eachBefore(roundNode),p}function g(p){var m=i[p.depth],b=p.x0+m,$=p.y0+m,S=p.x1-m,R=p.y1-m;S<b&&(b=S=(b+S)/2),R<$&&($=R=($+R)/2),p.x0=b,p.y0=$,p.x1=S,p.y1=R,p.children&&(m=i[p.depth+1]=o(p)/2,b+=f(p)-m,$+=l(p)-m,S-=u(p)-m,R-=h(p)-m,S<b&&(b=S=(b+S)/2),R<$&&($=R=($+R)/2),e(p,b,$,S,R))}return d.round=function(p){return arguments.length?(t=!!p,d):t},d.size=function(p){return arguments.length?(r=+p[0],n=+p[1],d):[r,n]},d.tile=function(p){return arguments.length?(e=required(p),d):e},d.padding=function(p){return arguments.length?d.paddingInner(p).paddingOuter(p):d.paddingInner()},d.paddingInner=function(p){return arguments.length?(o=typeof p=="function"?p:constant$4(+p),d):o},d.paddingOuter=function(p){return arguments.length?d.paddingTop(p).paddingRight(p).paddingBottom(p).paddingLeft(p):d.paddingTop()},d.paddingTop=function(p){return arguments.length?(l=typeof p=="function"?p:constant$4(+p),d):l},d.paddingRight=function(p){return arguments.length?(u=typeof p=="function"?p:constant$4(+p),d):u},d.paddingBottom=function(p){return arguments.length?(h=typeof p=="function"?p:constant$4(+p),d):h},d.paddingLeft=function(p){return arguments.length?(f=typeof p=="function"?p:constant$4(+p),d):f},d}function binary(e,t,r,n,i){var o=e.children,l,u=o.length,h,f=new Array(u+1);for(f[0]=h=l=0;l<u;++l)f[l+1]=h+=o[l].value;d(0,u,e.value,t,r,n,i);function d(g,p,m,b,$,S,R){if(g>=p-1){var L=o[g];L.x0=b,L.y0=$,L.x1=S,L.y1=R;return}for(var N=f[g],F=m/2+N,H=g+1,G=p-1;H<G;){var P=H+G>>>1;f[P]<F?H=P+1:G=P}F-f[H-1]<f[H]-F&&g+1<H&&--H;var V=f[H]-N,z=m-V;if(S-b>R-$){var W=(b*z+S*V)/m;d(g,H,V,b,$,W,R),d(H,p,z,W,$,S,R)}else{var T=($*z+R*V)/m;d(g,H,V,b,$,S,T),d(H,p,z,b,T,S,R)}}}function sliceDice(e,t,r,n,i){(e.depth&1?treemapSlice:treemapDice)(e,t,r,n,i)}const resquarify=function e(t){function r(n,i,o,l,u){if((h=n._squarify)&&h.ratio===t)for(var h,f,d,g,p=-1,m,b=h.length,$=n.value;++p<b;){for(f=h[p],d=f.children,g=f.value=0,m=d.length;g<m;++g)f.value+=d[g].value;f.dice?treemapDice(f,i,o,l,o+=(u-o)*f.value/$):treemapSlice(f,i,o,i+=(l-i)*f.value/$,u),$-=f.value}else n._squarify=h=squarifyRatio(t,n,i,o,l,u),h.ratio=t}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(phi);function area$1(e){for(var t=-1,r=e.length,n,i=e[r-1],o=0;++t<r;)n=i,i=e[t],o+=n[1]*i[0]-n[0]*i[1];return o/2}function centroid(e){for(var t=-1,r=e.length,n=0,i=0,o,l=e[r-1],u,h=0;++t<r;)o=l,l=e[t],h+=u=o[0]*l[1]-l[0]*o[1],n+=(o[0]+l[0])*u,i+=(o[1]+l[1])*u;return h*=3,[n/h,i/h]}function cross$2(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}function lexicographicOrder(e,t){return e[0]-t[0]||e[1]-t[1]}function computeUpperHullIndexes(e){for(var t=e.length,r=[0,1],n=2,i=2;i<t;++i){for(;n>1&&cross$2(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function hull(e){if((r=e.length)<3)return null;var t,r,n=new Array(r),i=new Array(r);for(t=0;t<r;++t)n[t]=[+e[t][0],+e[t][1],t];for(n.sort(lexicographicOrder),t=0;t<r;++t)i[t]=[n[t][0],-n[t][1]];var o=computeUpperHullIndexes(n),l=computeUpperHullIndexes(i),u=l[0]===o[0],h=l[l.length-1]===o[o.length-1],f=[];for(t=o.length-1;t>=0;--t)f.push(e[n[o[t]][2]]);for(t=+u;t<l.length-h;++t)f.push(e[n[l[t]][2]]);return f}function contains(e,t){for(var r=e.length,n=e[r-1],i=t[0],o=t[1],l=n[0],u=n[1],h,f,d=!1,g=0;g<r;++g)n=e[g],h=n[0],f=n[1],f>o!=u>o&&i<(l-h)*(o-f)/(u-f)+h&&(d=!d),l=h,u=f;return d}function length(e){for(var t=-1,r=e.length,n=e[r-1],i,o,l=n[0],u=n[1],h=0;++t<r;)i=l,o=u,n=e[t],l=n[0],u=n[1],i-=l,o-=u,h+=Math.sqrt(i*i+o*o);return h}function defaultSource(){return Math.random()}const uniform=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,arguments.length===1?(i=n,n=0):i-=n,function(){return t()*i+n}}return r.source=e,r}(defaultSource),normal=function e(t){function r(n,i){var o,l;return n=n==null?0:+n,i=i==null?1:+i,function(){var u;if(o!=null)u=o,o=null;else do o=t()*2-1,u=t()*2-1,l=o*o+u*u;while(!l||l>1);return n+i*u*Math.sqrt(-2*Math.log(l)/l)}}return r.source=e,r}(defaultSource),logNormal=function e(t){function r(){var n=normal.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=e,r}(defaultSource),irwinHall=function e(t){function r(n){return function(){for(var i=0,o=0;o<n;++o)i+=t();return i}}return r.source=e,r}(defaultSource),bates=function e(t){function r(n){var i=irwinHall.source(t)(n);return function(){return i()/n}}return r.source=e,r}(defaultSource),exponential=function e(t){function r(n){return function(){return-Math.log(1-t())/n}}return r.source=e,r}(defaultSource);function initRange(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function initInterpolator(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e);break}return this}var array=Array.prototype,map=array.map,slice$1=array.slice,implicit={name:"implicit"};function ordinal(){var e=map$2(),t=[],r=[],n=implicit;function i(o){var l=o+"",u=e.get(l);if(!u){if(n!==implicit)return n;e.set(l,u=t.push(o))}return r[(u-1)%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=map$2();for(var l=-1,u=o.length,h,f;++l<u;)e.has(f=(h=o[l])+"")||e.set(f,t.push(h));return i},i.range=function(o){return arguments.length?(r=slice$1.call(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return ordinal(t,r).unknown(n)},initRange.apply(i,arguments),i}function band(){var e=ordinal().unknown(void 0),t=e.domain,r=e.range,n=[0,1],i,o,l=!1,u=0,h=0,f=.5;delete e.unknown;function d(){var g=t().length,p=n[1]<n[0],m=n[p-0],b=n[1-p];i=(b-m)/Math.max(1,g-u+h*2),l&&(i=Math.floor(i)),m+=(b-m-i*(g-u))*f,o=i*(1-u),l&&(m=Math.round(m),o=Math.round(o));var $=sequence(g).map(function(S){return m+i*S});return r(p?$.reverse():$)}return e.domain=function(g){return arguments.length?(t(g),d()):t()},e.range=function(g){return arguments.length?(n=[+g[0],+g[1]],d()):n.slice()},e.rangeRound=function(g){return n=[+g[0],+g[1]],l=!0,d()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(g){return arguments.length?(l=!!g,d()):l},e.padding=function(g){return arguments.length?(u=Math.min(1,h=+g),d()):u},e.paddingInner=function(g){return arguments.length?(u=Math.min(1,g),d()):u},e.paddingOuter=function(g){return arguments.length?(h=+g,d()):h},e.align=function(g){return arguments.length?(f=Math.max(0,Math.min(1,g)),d()):f},e.copy=function(){return band(t(),n).round(l).paddingInner(u).paddingOuter(h).align(f)},initRange.apply(d(),arguments)}function pointish(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return pointish(t())},e}function point$5(){return pointish(band.apply(null,arguments).paddingInner(1))}function constant$3(e){return function(){return e}}function number$1(e){return+e}var unit=[0,1];function identity$3(e){return e}function normalize(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:constant$3(isNaN(t)?NaN:.5)}function clamper(e){var t=e[0],r=e[e.length-1],n;return t>r&&(n=t,t=r,r=n),function(i){return Math.max(t,Math.min(r,i))}}function bimap(e,t,r){var n=e[0],i=e[1],o=t[0],l=t[1];return i<n?(n=normalize(i,n),o=r(l,o)):(n=normalize(n,i),o=r(o,l)),function(u){return o(n(u))}}function polymap(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),l=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<n;)i[l]=normalize(e[l],e[l+1]),o[l]=r(t[l],t[l+1]);return function(u){var h=bisectRight(e,u,1,n)-1;return o[h](i[h](u))}}function copy$2(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function transformer$2(){var e=unit,t=unit,r=interpolateValue,n,i,o,l=identity$3,u,h,f;function d(){return u=Math.min(e.length,t.length)>2?polymap:bimap,h=f=null,g}function g(p){return isNaN(p=+p)?o:(h||(h=u(e.map(n),t,r)))(n(l(p)))}return g.invert=function(p){return l(i((f||(f=u(t,e.map(n),interpolateNumber)))(p)))},g.domain=function(p){return arguments.length?(e=map.call(p,number$1),l===identity$3||(l=clamper(e)),d()):e.slice()},g.range=function(p){return arguments.length?(t=slice$1.call(p),d()):t.slice()},g.rangeRound=function(p){return t=slice$1.call(p),r=interpolateRound,d()},g.clamp=function(p){return arguments.length?(l=p?clamper(e):identity$3,g):l!==identity$3},g.interpolate=function(p){return arguments.length?(r=p,d()):r},g.unknown=function(p){return arguments.length?(o=p,g):o},function(p,m){return n=p,i=m,d()}}function continuous(e,t){return transformer$2()(e,t)}function tickFormat(e,t,r,n){var i=tickStep(e,t,r),o;switch(n=formatSpecifier(n==null?",f":n),n.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=precisionPrefix(i,l))&&(n.precision=o),formatPrefix(n,l)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=precisionRound(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=precisionFixed(i))&&(n.precision=o-(n.type==="%")*2);break}}return format$1(n)}function linearish(e){var t=e.domain;return e.ticks=function(r){var n=t();return ticks(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){var i=t();return tickFormat(i[0],i[i.length-1],r==null?10:r,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,l=n[i],u=n[o],h;return u<l&&(h=l,l=u,u=h,h=i,i=o,o=h),h=tickIncrement(l,u,r),h>0?(l=Math.floor(l/h)*h,u=Math.ceil(u/h)*h,h=tickIncrement(l,u,r)):h<0&&(l=Math.ceil(l*h)/h,u=Math.floor(u*h)/h,h=tickIncrement(l,u,r)),h>0?(n[i]=Math.floor(l/h)*h,n[o]=Math.ceil(u/h)*h,t(n)):h<0&&(n[i]=Math.ceil(l*h)/h,n[o]=Math.floor(u*h)/h,t(n)),e},e}function linear(){var e=continuous(identity$3,identity$3);return e.copy=function(){return copy$2(e,linear())},initRange.apply(e,arguments),linearish(e)}function identity$2(e){var t;function r(n){return isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=map.call(n,number$1),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return identity$2(e).unknown(t)},e=arguments.length?map.call(e,number$1):[0,1],linearish(r)}function nice(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],l;return o<i&&(l=r,r=n,n=l,l=i,i=o,o=l),e[r]=t.floor(i),e[n]=t.ceil(o),e}function transformLog(e){return Math.log(e)}function transformExp(e){return Math.exp(e)}function transformLogn(e){return-Math.log(-e)}function transformExpn(e){return-Math.exp(-e)}function pow10(e){return isFinite(e)?+("1e"+e):e<0?0:e}function powp(e){return e===10?pow10:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function logp(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function reflect(e){return function(t){return-e(-t)}}function loggish(e){var t=e(transformLog,transformExp),r=t.domain,n=10,i,o;function l(){return i=logp(n),o=powp(n),r()[0]<0?(i=reflect(i),o=reflect(o),e(transformLogn,transformExpn)):e(transformLog,transformExp),t}return t.base=function(u){return arguments.length?(n=+u,l()):n},t.domain=function(u){return arguments.length?(r(u),l()):r()},t.ticks=function(u){var h=r(),f=h[0],d=h[h.length-1],g;(g=d<f)&&(p=f,f=d,d=p);var p=i(f),m=i(d),b,$,S,R=u==null?10:+u,L=[];if(!(n%1)&&m-p<R){if(p=Math.round(p)-1,m=Math.round(m)+1,f>0){for(;p<m;++p)for($=1,b=o(p);$<n;++$)if(S=b*$,!(S<f)){if(S>d)break;L.push(S)}}else for(;p<m;++p)for($=n-1,b=o(p);$>=1;--$)if(S=b*$,!(S<f)){if(S>d)break;L.push(S)}}else L=ticks(p,m,Math.min(m-p,R)).map(o);return g?L.reverse():L},t.tickFormat=function(u,h){if(h==null&&(h=n===10?".0e":","),typeof h!="function"&&(h=format$1(h)),u===1/0)return h;u==null&&(u=10);var f=Math.max(1,n*u/t.ticks().length);return function(d){var g=d/o(Math.round(i(d)));return g*n<n-.5&&(g*=n),g<=f?h(d):""}},t.nice=function(){return r(nice(r(),{floor:function(u){return o(Math.floor(i(u)))},ceil:function(u){return o(Math.ceil(i(u)))}}))},t}function log$2(){var e=loggish(transformer$2()).domain([1,10]);return e.copy=function(){return copy$2(e,log$2()).base(e.base())},initRange.apply(e,arguments),e}function transformSymlog(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function transformSymexp(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function symlogish(e){var t=1,r=e(transformSymlog(t),transformSymexp(t));return r.constant=function(n){return arguments.length?e(transformSymlog(t=+n),transformSymexp(t)):t},linearish(r)}function symlog(){var e=symlogish(transformer$2());return e.copy=function(){return copy$2(e,symlog()).constant(e.constant())},initRange.apply(e,arguments)}function transformPow(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function transformSqrt(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function transformSquare(e){return e<0?-e*e:e*e}function powish(e){var t=e(identity$3,identity$3),r=1;function n(){return r===1?e(identity$3,identity$3):r===.5?e(transformSqrt,transformSquare):e(transformPow(r),transformPow(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},linearish(t)}function pow(){var e=powish(transformer$2());return e.copy=function(){return copy$2(e,pow()).exponent(e.exponent())},initRange.apply(e,arguments),e}function sqrt$1(){return pow.apply(null,arguments).exponent(.5)}function quantile(){var e=[],t=[],r=[],n;function i(){var l=0,u=Math.max(1,t.length);for(r=new Array(u-1);++l<u;)r[l-1]=threshold$1(e,l/u);return o}function o(l){return isNaN(l=+l)?n:t[bisectRight(r,l)]}return o.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?r[u-1]:e[0],u<r.length?r[u]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(var u=0,h=l.length,f;u<h;++u)f=l[u],f!=null&&!isNaN(f=+f)&&e.push(f);return e.sort(ascending$3),i()},o.range=function(l){return arguments.length?(t=slice$1.call(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(n=l,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return quantile().domain(e).range(t).unknown(n)},initRange.apply(o,arguments)}function quantize(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function l(h){return h<=h?i[bisectRight(n,h,0,r)]:o}function u(){var h=-1;for(n=new Array(r);++h<r;)n[h]=((h+1)*t-(h-r)*e)/(r+1);return l}return l.domain=function(h){return arguments.length?(e=+h[0],t=+h[1],u()):[e,t]},l.range=function(h){return arguments.length?(r=(i=slice$1.call(h)).length-1,u()):i.slice()},l.invertExtent=function(h){var f=i.indexOf(h);return f<0?[NaN,NaN]:f<1?[e,n[0]]:f>=r?[n[r-1],t]:[n[f-1],n[f]]},l.unknown=function(h){return arguments.length&&(o=h),l},l.thresholds=function(){return n.slice()},l.copy=function(){return quantize().domain([e,t]).range(i).unknown(o)},initRange.apply(linearish(l),arguments)}function threshold(){var e=[.5],t=[0,1],r,n=1;function i(o){return o<=o?t[bisectRight(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=slice$1.call(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=slice$1.call(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return threshold().domain(e).range(t).unknown(r)},initRange.apply(i,arguments)}var t0=new Date,t1=new Date;function newInterval(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var l=i(o),u=i.ceil(o);return o-l<u-o?l:u},i.offset=function(o,l){return t(o=new Date(+o),l==null?1:Math.floor(l)),o},i.range=function(o,l,u){var h=[],f;if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return h;do h.push(f=new Date(+o)),t(o,u),e(o);while(f<o&&o<l);return h},i.filter=function(o){return newInterval(function(l){if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},function(l,u){if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););})},r&&(i.count=function(o,l){return t0.setTime(+o),t1.setTime(+l),e(t0),e(t1),Math.floor(r(t0,t1))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(l){return n(l)%o===0}:function(l){return i.count(0,l)%o===0}):i}),i}var millisecond=newInterval(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});millisecond.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?newInterval(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):millisecond};const utcMillisecond=millisecond;var milliseconds=millisecond.range,durationSecond$1=1e3,durationMinute$1=6e4,durationHour$1=36e5,durationDay$1=864e5,durationWeek$1=6048e5,second=newInterval(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*durationSecond$1)},function(e,t){return(t-e)/durationSecond$1},function(e){return e.getUTCSeconds()});const utcSecond=second;var seconds=second.range,minute=newInterval(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*durationSecond$1)},function(e,t){e.setTime(+e+t*durationMinute$1)},function(e,t){return(t-e)/durationMinute$1},function(e){return e.getMinutes()});const timeMinute=minute;var minutes=minute.range,hour=newInterval(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*durationSecond$1-e.getMinutes()*durationMinute$1)},function(e,t){e.setTime(+e+t*durationHour$1)},function(e,t){return(t-e)/durationHour$1},function(e){return e.getHours()});const timeHour=hour;var hours=hour.range,day=newInterval(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*durationMinute$1)/durationDay$1},function(e){return e.getDate()-1});const timeDay=day;var days=day.range;function weekday(e){return newInterval(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*durationMinute$1)/durationWeek$1})}var sunday=weekday(0),monday=weekday(1),tuesday=weekday(2),wednesday=weekday(3),thursday=weekday(4),friday=weekday(5),saturday=weekday(6),sundays=sunday.range,mondays=monday.range,tuesdays=tuesday.range,wednesdays=wednesday.range,thursdays=thursday.range,fridays=friday.range,saturdays=saturday.range,month=newInterval(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});const timeMonth=month;var months=month.range,year=newInterval(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});year.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:newInterval(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};const timeYear=year;var years=year.range,utcMinute=newInterval(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*durationMinute$1)},function(e,t){return(t-e)/durationMinute$1},function(e){return e.getUTCMinutes()});const utcMinute$1=utcMinute;var utcMinutes=utcMinute.range,utcHour=newInterval(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*durationHour$1)},function(e,t){return(t-e)/durationHour$1},function(e){return e.getUTCHours()});const utcHour$1=utcHour;var utcHours=utcHour.range,utcDay=newInterval(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/durationDay$1},function(e){return e.getUTCDate()-1});const utcDay$1=utcDay;var utcDays=utcDay.range;function utcWeekday(e){return newInterval(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/durationWeek$1})}var utcSunday=utcWeekday(0),utcMonday=utcWeekday(1),utcTuesday=utcWeekday(2),utcWednesday=utcWeekday(3),utcThursday=utcWeekday(4),utcFriday=utcWeekday(5),utcSaturday=utcWeekday(6),utcSundays=utcSunday.range,utcMondays=utcMonday.range,utcTuesdays=utcTuesday.range,utcWednesdays=utcWednesday.range,utcThursdays=utcThursday.range,utcFridays=utcFriday.range,utcSaturdays=utcSaturday.range,utcMonth=newInterval(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});const utcMonth$1=utcMonth;var utcMonths=utcMonth.range,utcYear=newInterval(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});utcYear.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:newInterval(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};const utcYear$1=utcYear;var utcYears=utcYear.range;function localDate(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function utcDate(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function newDate(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function formatLocale(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,h=e.shortMonths,f=formatRe(i),d=formatLookup(i),g=formatRe(o),p=formatLookup(o),m=formatRe(l),b=formatLookup(l),$=formatRe(u),S=formatLookup(u),R=formatRe(h),L=formatLookup(h),N={a:_e,A:ke,b:de,B:ce,c:null,d:formatDayOfMonth,e:formatDayOfMonth,f:formatMicroseconds,g:formatYearISO,G:formatFullYearISO,H:formatHour24,I:formatHour12,j:formatDayOfYear,L:formatMilliseconds,m:formatMonthNumber,M:formatMinutes,p:he,q:Se,Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatSeconds,u:formatWeekdayNumberMonday,U:formatWeekNumberSunday,V:formatWeekNumberISO,w:formatWeekdayNumberSunday,W:formatWeekNumberMonday,x:null,X:null,y:formatYear,Y:formatFullYear,Z:formatZone,"%":formatLiteralPercent},F={a:ve,A:me,b:Ce,B:xe,c:null,d:formatUTCDayOfMonth,e:formatUTCDayOfMonth,f:formatUTCMicroseconds,g:formatUTCYearISO,G:formatUTCFullYearISO,H:formatUTCHour24,I:formatUTCHour12,j:formatUTCDayOfYear,L:formatUTCMilliseconds,m:formatUTCMonthNumber,M:formatUTCMinutes,p:Ne,q:pe,Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatUTCSeconds,u:formatUTCWeekdayNumberMonday,U:formatUTCWeekNumberSunday,V:formatUTCWeekNumberISO,w:formatUTCWeekdayNumberSunday,W:formatUTCWeekNumberMonday,x:null,X:null,y:formatUTCYear,Y:formatUTCFullYear,Z:formatUTCZone,"%":formatLiteralPercent},H={a:W,A:T,b:U,B:I,c:ae,d:parseDayOfMonth,e:parseDayOfMonth,f:parseMicroseconds,g:parseYear,G:parseFullYear,H:parseHour24,I:parseHour24,j:parseDayOfYear,L:parseMilliseconds,m:parseMonthNumber,M:parseMinutes,p:z,q:parseQuarter,Q:parseUnixTimestamp,s:parseUnixTimestampSeconds,S:parseSeconds,u:parseWeekdayNumberMonday,U:parseWeekNumberSunday,V:parseWeekNumberISO,w:parseWeekdayNumberSunday,W:parseWeekNumberMonday,x:Q,X:ue,y:parseYear,Y:parseFullYear,Z:parseZone,"%":parseLiteralPercent};N.x=G(r,N),N.X=G(n,N),N.c=G(t,N),F.x=G(r,F),F.X=G(n,F),F.c=G(t,F);function G(J,oe){return function(ee){var Z=[],ie=-1,se=0,te=J.length,fe,we,Ye;for(ee instanceof Date||(ee=new Date(+ee));++ie<te;)J.charCodeAt(ie)===37&&(Z.push(J.slice(se,ie)),(we=pads[fe=J.charAt(++ie)])!=null?fe=J.charAt(++ie):we=fe==="e"?" ":"0",(Ye=oe[fe])&&(fe=Ye(ee,we)),Z.push(fe),se=ie+1);return Z.push(J.slice(se,ie)),Z.join("")}}function P(J,oe){return function(ee){var Z=newDate(1900,void 0,1),ie=V(Z,J,ee+="",0),se,te;if(ie!=ee.length)return null;if("Q"in Z)return new Date(Z.Q);if("s"in Z)return new Date(Z.s*1e3+("L"in Z?Z.L:0));if(oe&&!("Z"in Z)&&(Z.Z=0),"p"in Z&&(Z.H=Z.H%12+Z.p*12),Z.m===void 0&&(Z.m="q"in Z?Z.q:0),"V"in Z){if(Z.V<1||Z.V>53)return null;"w"in Z||(Z.w=1),"Z"in Z?(se=utcDate(newDate(Z.y,0,1)),te=se.getUTCDay(),se=te>4||te===0?utcMonday.ceil(se):utcMonday(se),se=utcDay$1.offset(se,(Z.V-1)*7),Z.y=se.getUTCFullYear(),Z.m=se.getUTCMonth(),Z.d=se.getUTCDate()+(Z.w+6)%7):(se=localDate(newDate(Z.y,0,1)),te=se.getDay(),se=te>4||te===0?monday.ceil(se):monday(se),se=timeDay.offset(se,(Z.V-1)*7),Z.y=se.getFullYear(),Z.m=se.getMonth(),Z.d=se.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),te="Z"in Z?utcDate(newDate(Z.y,0,1)).getUTCDay():localDate(newDate(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(te+5)%7:Z.w+Z.U*7-(te+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,utcDate(Z)):localDate(Z)}}function V(J,oe,ee,Z){for(var ie=0,se=oe.length,te=ee.length,fe,we;ie<se;){if(Z>=te)return-1;if(fe=oe.charCodeAt(ie++),fe===37){if(fe=oe.charAt(ie++),we=H[fe in pads?oe.charAt(ie++):fe],!we||(Z=we(J,ee,Z))<0)return-1}else if(fe!=ee.charCodeAt(Z++))return-1}return Z}function z(J,oe,ee){var Z=f.exec(oe.slice(ee));return Z?(J.p=d[Z[0].toLowerCase()],ee+Z[0].length):-1}function W(J,oe,ee){var Z=m.exec(oe.slice(ee));return Z?(J.w=b[Z[0].toLowerCase()],ee+Z[0].length):-1}function T(J,oe,ee){var Z=g.exec(oe.slice(ee));return Z?(J.w=p[Z[0].toLowerCase()],ee+Z[0].length):-1}function U(J,oe,ee){var Z=R.exec(oe.slice(ee));return Z?(J.m=L[Z[0].toLowerCase()],ee+Z[0].length):-1}function I(J,oe,ee){var Z=$.exec(oe.slice(ee));return Z?(J.m=S[Z[0].toLowerCase()],ee+Z[0].length):-1}function ae(J,oe,ee){return V(J,t,oe,ee)}function Q(J,oe,ee){return V(J,r,oe,ee)}function ue(J,oe,ee){return V(J,n,oe,ee)}function _e(J){return l[J.getDay()]}function ke(J){return o[J.getDay()]}function de(J){return h[J.getMonth()]}function ce(J){return u[J.getMonth()]}function he(J){return i[+(J.getHours()>=12)]}function Se(J){return 1+~~(J.getMonth()/3)}function ve(J){return l[J.getUTCDay()]}function me(J){return o[J.getUTCDay()]}function Ce(J){return h[J.getUTCMonth()]}function xe(J){return u[J.getUTCMonth()]}function Ne(J){return i[+(J.getUTCHours()>=12)]}function pe(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var oe=G(J+="",N);return oe.toString=function(){return J},oe},parse:function(J){var oe=P(J+="",!1);return oe.toString=function(){return J},oe},utcFormat:function(J){var oe=G(J+="",F);return oe.toString=function(){return J},oe},utcParse:function(J){var oe=P(J+="",!0);return oe.toString=function(){return J},oe}}}var pads={"-":"",_:" ",0:"0"},numberRe=/^\s*\d+/,percentRe=/^%/,requoteRe=/[\\^$*+?|[\]().{}]/g;function pad(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function requote(e){return e.replace(requoteRe,"\\$&")}function formatRe(e){return new RegExp("^(?:"+e.map(requote).join("|")+")","i")}function formatLookup(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function parseWeekdayNumberSunday(e,t,r){var n=numberRe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function parseWeekdayNumberMonday(e,t,r){var n=numberRe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function parseWeekNumberSunday(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function parseWeekNumberISO(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function parseWeekNumberMonday(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function parseFullYear(e,t,r){var n=numberRe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function parseYear(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function parseZone(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function parseQuarter(e,t,r){var n=numberRe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function parseMonthNumber(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function parseDayOfMonth(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function parseDayOfYear(e,t,r){var n=numberRe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function parseHour24(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function parseMinutes(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function parseSeconds(e,t,r){var n=numberRe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function parseMilliseconds(e,t,r){var n=numberRe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function parseMicroseconds(e,t,r){var n=numberRe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function parseLiteralPercent(e,t,r){var n=percentRe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function parseUnixTimestamp(e,t,r){var n=numberRe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function parseUnixTimestampSeconds(e,t,r){var n=numberRe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function formatDayOfMonth(e,t){return pad(e.getDate(),t,2)}function formatHour24(e,t){return pad(e.getHours(),t,2)}function formatHour12(e,t){return pad(e.getHours()%12||12,t,2)}function formatDayOfYear(e,t){return pad(1+timeDay.count(timeYear(e),e),t,3)}function formatMilliseconds(e,t){return pad(e.getMilliseconds(),t,3)}function formatMicroseconds(e,t){return formatMilliseconds(e,t)+"000"}function formatMonthNumber(e,t){return pad(e.getMonth()+1,t,2)}function formatMinutes(e,t){return pad(e.getMinutes(),t,2)}function formatSeconds(e,t){return pad(e.getSeconds(),t,2)}function formatWeekdayNumberMonday(e){var t=e.getDay();return t===0?7:t}function formatWeekNumberSunday(e,t){return pad(sunday.count(timeYear(e)-1,e),t,2)}function dISO(e){var t=e.getDay();return t>=4||t===0?thursday(e):thursday.ceil(e)}function formatWeekNumberISO(e,t){return e=dISO(e),pad(thursday.count(timeYear(e),e)+(timeYear(e).getDay()===4),t,2)}function formatWeekdayNumberSunday(e){return e.getDay()}function formatWeekNumberMonday(e,t){return pad(monday.count(timeYear(e)-1,e),t,2)}function formatYear(e,t){return pad(e.getFullYear()%100,t,2)}function formatYearISO(e,t){return e=dISO(e),pad(e.getFullYear()%100,t,2)}function formatFullYear(e,t){return pad(e.getFullYear()%1e4,t,4)}function formatFullYearISO(e,t){var r=e.getDay();return e=r>=4||r===0?thursday(e):thursday.ceil(e),pad(e.getFullYear()%1e4,t,4)}function formatZone(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pad(t/60|0,"0",2)+pad(t%60,"0",2)}function formatUTCDayOfMonth(e,t){return pad(e.getUTCDate(),t,2)}function formatUTCHour24(e,t){return pad(e.getUTCHours(),t,2)}function formatUTCHour12(e,t){return pad(e.getUTCHours()%12||12,t,2)}function formatUTCDayOfYear(e,t){return pad(1+utcDay$1.count(utcYear$1(e),e),t,3)}function formatUTCMilliseconds(e,t){return pad(e.getUTCMilliseconds(),t,3)}function formatUTCMicroseconds(e,t){return formatUTCMilliseconds(e,t)+"000"}function formatUTCMonthNumber(e,t){return pad(e.getUTCMonth()+1,t,2)}function formatUTCMinutes(e,t){return pad(e.getUTCMinutes(),t,2)}function formatUTCSeconds(e,t){return pad(e.getUTCSeconds(),t,2)}function formatUTCWeekdayNumberMonday(e){var t=e.getUTCDay();return t===0?7:t}function formatUTCWeekNumberSunday(e,t){return pad(utcSunday.count(utcYear$1(e)-1,e),t,2)}function UTCdISO(e){var t=e.getUTCDay();return t>=4||t===0?utcThursday(e):utcThursday.ceil(e)}function formatUTCWeekNumberISO(e,t){return e=UTCdISO(e),pad(utcThursday.count(utcYear$1(e),e)+(utcYear$1(e).getUTCDay()===4),t,2)}function formatUTCWeekdayNumberSunday(e){return e.getUTCDay()}function formatUTCWeekNumberMonday(e,t){return pad(utcMonday.count(utcYear$1(e)-1,e),t,2)}function formatUTCYear(e,t){return pad(e.getUTCFullYear()%100,t,2)}function formatUTCYearISO(e,t){return e=UTCdISO(e),pad(e.getUTCFullYear()%100,t,2)}function formatUTCFullYear(e,t){return pad(e.getUTCFullYear()%1e4,t,4)}function formatUTCFullYearISO(e,t){var r=e.getUTCDay();return e=r>=4||r===0?utcThursday(e):utcThursday.ceil(e),pad(e.getUTCFullYear()%1e4,t,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}function formatUnixTimestamp(e){return+e}function formatUnixTimestampSeconds(e){return Math.floor(+e/1e3)}var locale,timeFormat,timeParse,utcFormat,utcParse;defaultLocale({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function defaultLocale(e){return locale=formatLocale(e),timeFormat=locale.format,timeParse=locale.parse,utcFormat=locale.utcFormat,utcParse=locale.utcParse,locale}var isoSpecifier="%Y-%m-%dT%H:%M:%S.%LZ";function formatIsoNative(e){return e.toISOString()}var formatIso=Date.prototype.toISOString?formatIsoNative:utcFormat(isoSpecifier);const formatIso$1=formatIso;function parseIsoNative(e){var t=new Date(e);return isNaN(t)?null:t}var parseIso=+new Date("2000-01-01T00:00:00.000Z")?parseIsoNative:utcParse(isoSpecifier);const parseIso$1=parseIso;var durationSecond=1e3,durationMinute=durationSecond*60,durationHour=durationMinute*60,durationDay=durationHour*24,durationWeek=durationDay*7,durationMonth=durationDay*30,durationYear=durationDay*365;function date(e){return new Date(e)}function number(e){return e instanceof Date?+e:+new Date(+e)}function calendar(e,t,r,n,i,o,l,u,h){var f=continuous(identity$3,identity$3),d=f.invert,g=f.domain,p=h(".%L"),m=h(":%S"),b=h("%I:%M"),$=h("%I %p"),S=h("%a %d"),R=h("%b %d"),L=h("%B"),N=h("%Y"),F=[[l,1,durationSecond],[l,5,5*durationSecond],[l,15,15*durationSecond],[l,30,30*durationSecond],[o,1,durationMinute],[o,5,5*durationMinute],[o,15,15*durationMinute],[o,30,30*durationMinute],[i,1,durationHour],[i,3,3*durationHour],[i,6,6*durationHour],[i,12,12*durationHour],[n,1,durationDay],[n,2,2*durationDay],[r,1,durationWeek],[t,1,durationMonth],[t,3,3*durationMonth],[e,1,durationYear]];function H(P){return(l(P)<P?p:o(P)<P?m:i(P)<P?b:n(P)<P?$:t(P)<P?r(P)<P?S:R:e(P)<P?L:N)(P)}function G(P,V,z,W){if(P==null&&(P=10),typeof P=="number"){var T=Math.abs(z-V)/P,U=bisector(function(I){return I[2]}).right(F,T);U===F.length?(W=tickStep(V/durationYear,z/durationYear,P),P=e):U?(U=F[T/F[U-1][2]<F[U][2]/T?U-1:U],W=U[1],P=U[0]):(W=Math.max(tickStep(V,z,P),1),P=u)}return W==null?P:P.every(W)}return f.invert=function(P){return new Date(d(P))},f.domain=function(P){return arguments.length?g(map.call(P,number)):g().map(date)},f.ticks=function(P,V){var z=g(),W=z[0],T=z[z.length-1],U=T<W,I;return U&&(I=W,W=T,T=I),I=G(P,W,T,V),I=I?I.range(W,T+1):[],U?I.reverse():I},f.tickFormat=function(P,V){return V==null?H:h(V)},f.nice=function(P,V){var z=g();return(P=G(P,z[0],z[z.length-1],V))?g(nice(z,P)):f},f.copy=function(){return copy$2(f,calendar(e,t,r,n,i,o,l,u,h))},f}function time(){return initRange.apply(calendar(timeYear,timeMonth,sunday,timeDay,timeHour,timeMinute,utcSecond,utcMillisecond,timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function utcTime(){return initRange.apply(calendar(utcYear$1,utcMonth$1,utcSunday,utcDay$1,utcHour$1,utcMinute$1,utcSecond,utcMillisecond,utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function transformer$1(){var e=0,t=1,r,n,i,o,l=identity$3,u=!1,h;function f(d){return isNaN(d=+d)?h:l(i===0?.5:(d=(o(d)-r)*i,u?Math.max(0,Math.min(1,d)):d))}return f.domain=function(d){return arguments.length?(r=o(e=+d[0]),n=o(t=+d[1]),i=r===n?0:1/(n-r),f):[e,t]},f.clamp=function(d){return arguments.length?(u=!!d,f):u},f.interpolator=function(d){return arguments.length?(l=d,f):l},f.unknown=function(d){return arguments.length?(h=d,f):h},function(d){return o=d,r=d(e),n=d(t),i=r===n?0:1/(n-r),f}}function copy$1(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function sequential(){var e=linearish(transformer$1()(identity$3));return e.copy=function(){return copy$1(e,sequential())},initInterpolator.apply(e,arguments)}function sequentialLog(){var e=loggish(transformer$1()).domain([1,10]);return e.copy=function(){return copy$1(e,sequentialLog()).base(e.base())},initInterpolator.apply(e,arguments)}function sequentialSymlog(){var e=symlogish(transformer$1());return e.copy=function(){return copy$1(e,sequentialSymlog()).constant(e.constant())},initInterpolator.apply(e,arguments)}function sequentialPow(){var e=powish(transformer$1());return e.copy=function(){return copy$1(e,sequentialPow()).exponent(e.exponent())},initInterpolator.apply(e,arguments)}function sequentialSqrt(){return sequentialPow.apply(null,arguments).exponent(.5)}function sequentialQuantile(){var e=[],t=identity$3;function r(n){if(!isNaN(n=+n))return t((bisectRight(e,n)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(var i=0,o=n.length,l;i<o;++i)l=n[i],l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(ascending$3),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return sequentialQuantile(t).domain(e)},initInterpolator.apply(r,arguments)}function transformer(){var e=0,t=.5,r=1,n,i,o,l,u,h=identity$3,f,d=!1,g;function p(m){return isNaN(m=+m)?g:(m=.5+((m=+f(m))-i)*(m<i?l:u),h(d?Math.max(0,Math.min(1,m)):m))}return p.domain=function(m){return arguments.length?(n=f(e=+m[0]),i=f(t=+m[1]),o=f(r=+m[2]),l=n===i?0:.5/(i-n),u=i===o?0:.5/(o-i),p):[e,t,r]},p.clamp=function(m){return arguments.length?(d=!!m,p):d},p.interpolator=function(m){return arguments.length?(h=m,p):h},p.unknown=function(m){return arguments.length?(g=m,p):g},function(m){return f=m,n=m(e),i=m(t),o=m(r),l=n===i?0:.5/(i-n),u=i===o?0:.5/(o-i),p}}function diverging$1(){var e=linearish(transformer()(identity$3));return e.copy=function(){return copy$1(e,diverging$1())},initInterpolator.apply(e,arguments)}function divergingLog(){var e=loggish(transformer()).domain([.1,1,10]);return e.copy=function(){return copy$1(e,divergingLog()).base(e.base())},initInterpolator.apply(e,arguments)}function divergingSymlog(){var e=symlogish(transformer());return e.copy=function(){return copy$1(e,divergingSymlog()).constant(e.constant())},initInterpolator.apply(e,arguments)}function divergingPow(){var e=powish(transformer());return e.copy=function(){return copy$1(e,divergingPow()).exponent(e.exponent())},initInterpolator.apply(e,arguments)}function divergingSqrt(){return divergingPow.apply(null,arguments).exponent(.5)}function colors(e){for(var t=e.length/6|0,r=new Array(t),n=0;n<t;)r[n]="#"+e.slice(n*6,++n*6);return r}const category10=colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Accent=colors("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Dark2=colors("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Paired=colors("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Pastel1=colors("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Pastel2=colors("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Set1=colors("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Set2=colors("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Set3=colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Tableau10=colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ramp$1(e){return rgbBasis(e[e.length-1])}var scheme$q=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(colors);const BrBG=ramp$1(scheme$q);var scheme$p=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(colors);const PRGn=ramp$1(scheme$p);var scheme$o=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(colors);const PiYG=ramp$1(scheme$o);var scheme$n=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(colors);const PuOr=ramp$1(scheme$n);var scheme$m=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(colors);const RdBu=ramp$1(scheme$m);var scheme$l=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(colors);const RdGy=ramp$1(scheme$l);var scheme$k=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(colors);const RdYlBu=ramp$1(scheme$k);var scheme$j=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(colors);const RdYlGn=ramp$1(scheme$j);var scheme$i=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(colors);const Spectral=ramp$1(scheme$i);var scheme$h=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(colors);const BuGn=ramp$1(scheme$h);var scheme$g=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(colors);const BuPu=ramp$1(scheme$g);var scheme$f=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(colors);const GnBu=ramp$1(scheme$f);var scheme$e=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(colors);const OrRd=ramp$1(scheme$e);var scheme$d=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(colors);const PuBuGn=ramp$1(scheme$d);var scheme$c=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(colors);const PuBu=ramp$1(scheme$c);var scheme$b=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(colors);const PuRd=ramp$1(scheme$b);var scheme$a=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(colors);const RdPu=ramp$1(scheme$a);var scheme$9=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(colors);const YlGnBu=ramp$1(scheme$9);var scheme$8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(colors);const YlGn=ramp$1(scheme$8);var scheme$7=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(colors);const YlOrBr=ramp$1(scheme$7);var scheme$6=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(colors);const YlOrRd=ramp$1(scheme$6);var scheme$5=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(colors);const Blues=ramp$1(scheme$5);var scheme$4=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(colors);const Greens=ramp$1(scheme$4);var scheme$3=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(colors);const Greys=ramp$1(scheme$3);var scheme$2=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(colors);const Purples=ramp$1(scheme$2);var scheme$1=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(colors);const Reds=ramp$1(scheme$1);var scheme=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(colors);const Oranges=ramp$1(scheme);function cividis(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const cubehelix=cubehelixLong(cubehelix$3(300,.5,0),cubehelix$3(-240,.5,1));var warm=cubehelixLong(cubehelix$3(-100,.75,.35),cubehelix$3(80,1.5,.8)),cool=cubehelixLong(cubehelix$3(260,.75,.35),cubehelix$3(80,1.5,.8)),c$3=cubehelix$3();function rainbow(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return c$3.h=360*e-100,c$3.s=1.5-1.5*t,c$3.l=.8-.9*t,c$3+""}var c$2=rgb(),pi_1_3=Math.PI/3,pi_2_3=Math.PI*2/3;function sinebow(e){var t;return e=(.5-e)*Math.PI,c$2.r=255*(t=Math.sin(e))*t,c$2.g=255*(t=Math.sin(e+pi_1_3))*t,c$2.b=255*(t=Math.sin(e+pi_2_3))*t,c$2+""}function turbo(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function ramp(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}const viridis=ramp(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var magma=ramp(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),inferno=ramp(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),plasma=ramp(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function constant$2(e){return function(){return e}}var abs=Math.abs,atan2=Math.atan2,cos=Math.cos,max=Math.max,min=Math.min,sin=Math.sin,sqrt=Math.sqrt,epsilon$1=1e-12,pi=Math.PI,halfPi=pi/2,tau=2*pi;function acos(e){return e>1?0:e<-1?pi:Math.acos(e)}function asin(e){return e>=1?halfPi:e<=-1?-halfPi:Math.asin(e)}function arcInnerRadius(e){return e.innerRadius}function arcOuterRadius(e){return e.outerRadius}function arcStartAngle(e){return e.startAngle}function arcEndAngle(e){return e.endAngle}function arcPadAngle(e){return e&&e.padAngle}function intersect$1(e,t,r,n,i,o,l,u){var h=r-e,f=n-t,d=l-i,g=u-o,p=g*h-d*f;if(!(p*p<epsilon$1))return p=(d*(t-o)-g*(e-i))/p,[e+p*h,t+p*f]}function cornerTangents(e,t,r,n,i,o,l){var u=e-r,h=t-n,f=(l?o:-o)/sqrt(u*u+h*h),d=f*h,g=-f*u,p=e+d,m=t+g,b=r+d,$=n+g,S=(p+b)/2,R=(m+$)/2,L=b-p,N=$-m,F=L*L+N*N,H=i-o,G=p*$-b*m,P=(N<0?-1:1)*sqrt(max(0,H*H*F-G*G)),V=(G*N-L*P)/F,z=(-G*L-N*P)/F,W=(G*N+L*P)/F,T=(-G*L+N*P)/F,U=V-S,I=z-R,ae=W-S,Q=T-R;return U*U+I*I>ae*ae+Q*Q&&(V=W,z=T),{cx:V,cy:z,x01:-d,y01:-g,x11:V*(i/H-1),y11:z*(i/H-1)}}function arc(){var e=arcInnerRadius,t=arcOuterRadius,r=constant$2(0),n=null,i=arcStartAngle,o=arcEndAngle,l=arcPadAngle,u=null;function h(){var f,d,g=+e.apply(this,arguments),p=+t.apply(this,arguments),m=i.apply(this,arguments)-halfPi,b=o.apply(this,arguments)-halfPi,$=abs(b-m),S=b>m;if(u||(u=f=path()),p<g&&(d=p,p=g,g=d),!(p>epsilon$1))u.moveTo(0,0);else if($>tau-epsilon$1)u.moveTo(p*cos(m),p*sin(m)),u.arc(0,0,p,m,b,!S),g>epsilon$1&&(u.moveTo(g*cos(b),g*sin(b)),u.arc(0,0,g,b,m,S));else{var R=m,L=b,N=m,F=b,H=$,G=$,P=l.apply(this,arguments)/2,V=P>epsilon$1&&(n?+n.apply(this,arguments):sqrt(g*g+p*p)),z=min(abs(p-g)/2,+r.apply(this,arguments)),W=z,T=z,U,I;if(V>epsilon$1){var ae=asin(V/g*sin(P)),Q=asin(V/p*sin(P));(H-=ae*2)>epsilon$1?(ae*=S?1:-1,N+=ae,F-=ae):(H=0,N=F=(m+b)/2),(G-=Q*2)>epsilon$1?(Q*=S?1:-1,R+=Q,L-=Q):(G=0,R=L=(m+b)/2)}var ue=p*cos(R),_e=p*sin(R),ke=g*cos(F),de=g*sin(F);if(z>epsilon$1){var ce=p*cos(L),he=p*sin(L),Se=g*cos(N),ve=g*sin(N),me;if($<pi&&(me=intersect$1(ue,_e,Se,ve,ce,he,ke,de))){var Ce=ue-me[0],xe=_e-me[1],Ne=ce-me[0],pe=he-me[1],J=1/sin(acos((Ce*Ne+xe*pe)/(sqrt(Ce*Ce+xe*xe)*sqrt(Ne*Ne+pe*pe)))/2),oe=sqrt(me[0]*me[0]+me[1]*me[1]);W=min(z,(g-oe)/(J-1)),T=min(z,(p-oe)/(J+1))}}G>epsilon$1?T>epsilon$1?(U=cornerTangents(Se,ve,ue,_e,p,T,S),I=cornerTangents(ce,he,ke,de,p,T,S),u.moveTo(U.cx+U.x01,U.cy+U.y01),T<z?u.arc(U.cx,U.cy,T,atan2(U.y01,U.x01),atan2(I.y01,I.x01),!S):(u.arc(U.cx,U.cy,T,atan2(U.y01,U.x01),atan2(U.y11,U.x11),!S),u.arc(0,0,p,atan2(U.cy+U.y11,U.cx+U.x11),atan2(I.cy+I.y11,I.cx+I.x11),!S),u.arc(I.cx,I.cy,T,atan2(I.y11,I.x11),atan2(I.y01,I.x01),!S))):(u.moveTo(ue,_e),u.arc(0,0,p,R,L,!S)):u.moveTo(ue,_e),!(g>epsilon$1)||!(H>epsilon$1)?u.lineTo(ke,de):W>epsilon$1?(U=cornerTangents(ke,de,ce,he,g,-W,S),I=cornerTangents(ue,_e,Se,ve,g,-W,S),u.lineTo(U.cx+U.x01,U.cy+U.y01),W<z?u.arc(U.cx,U.cy,W,atan2(U.y01,U.x01),atan2(I.y01,I.x01),!S):(u.arc(U.cx,U.cy,W,atan2(U.y01,U.x01),atan2(U.y11,U.x11),!S),u.arc(0,0,g,atan2(U.cy+U.y11,U.cx+U.x11),atan2(I.cy+I.y11,I.cx+I.x11),S),u.arc(I.cx,I.cy,W,atan2(I.y11,I.x11),atan2(I.y01,I.x01),!S))):u.arc(0,0,g,F,N,S)}if(u.closePath(),f)return u=null,f+""||null}return h.centroid=function(){var f=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-pi/2;return[cos(d)*f,sin(d)*f]},h.innerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:constant$2(+f),h):e},h.outerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:constant$2(+f),h):t},h.cornerRadius=function(f){return arguments.length?(r=typeof f=="function"?f:constant$2(+f),h):r},h.padRadius=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:constant$2(+f),h):n},h.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:constant$2(+f),h):i},h.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:constant$2(+f),h):o},h.padAngle=function(f){return arguments.length?(l=typeof f=="function"?f:constant$2(+f),h):l},h.context=function(f){return arguments.length?(u=f==null?null:f,h):u},h}function Linear(e){this._context=e}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function curveLinear(e){return new Linear(e)}function x$1(e){return e[0]}function y$1(e){return e[1]}function line(){var e=x$1,t=y$1,r=constant$2(!0),n=null,i=curveLinear,o=null;function l(u){var h,f=u.length,d,g=!1,p;for(n==null&&(o=i(p=path())),h=0;h<=f;++h)!(h<f&&r(d=u[h],h,u))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(d,h,u),+t(d,h,u));if(p)return o=null,p+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:constant$2(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:constant$2(+u),l):t},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:constant$2(!!u),l):r},l.curve=function(u){return arguments.length?(i=u,n!=null&&(o=i(n)),l):i},l.context=function(u){return arguments.length?(u==null?n=o=null:o=i(n=u),l):n},l}function area(){var e=x$1,t=null,r=constant$2(0),n=y$1,i=constant$2(!0),o=null,l=curveLinear,u=null;function h(d){var g,p,m,b=d.length,$,S=!1,R,L=new Array(b),N=new Array(b);for(o==null&&(u=l(R=path())),g=0;g<=b;++g){if(!(g<b&&i($=d[g],g,d))===S)if(S=!S)p=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),m=g-1;m>=p;--m)u.point(L[m],N[m]);u.lineEnd(),u.areaEnd()}S&&(L[g]=+e($,g,d),N[g]=+r($,g,d),u.point(t?+t($,g,d):L[g],n?+n($,g,d):N[g]))}if(R)return u=null,R+""||null}function f(){return line().defined(i).curve(l).context(o)}return h.x=function(d){return arguments.length?(e=typeof d=="function"?d:constant$2(+d),t=null,h):e},h.x0=function(d){return arguments.length?(e=typeof d=="function"?d:constant$2(+d),h):e},h.x1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:constant$2(+d),h):t},h.y=function(d){return arguments.length?(r=typeof d=="function"?d:constant$2(+d),n=null,h):r},h.y0=function(d){return arguments.length?(r=typeof d=="function"?d:constant$2(+d),h):r},h.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:constant$2(+d),h):n},h.lineX0=h.lineY0=function(){return f().x(e).y(r)},h.lineY1=function(){return f().x(e).y(n)},h.lineX1=function(){return f().x(t).y(r)},h.defined=function(d){return arguments.length?(i=typeof d=="function"?d:constant$2(!!d),h):i},h.curve=function(d){return arguments.length?(l=d,o!=null&&(u=l(o)),h):l},h.context=function(d){return arguments.length?(d==null?o=u=null:u=l(o=d),h):o},h}function descending$1(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function identity$1(e){return e}function pie(){var e=identity$1,t=descending$1,r=null,n=constant$2(0),i=constant$2(tau),o=constant$2(0);function l(u){var h,f=u.length,d,g,p=0,m=new Array(f),b=new Array(f),$=+n.apply(this,arguments),S=Math.min(tau,Math.max(-tau,i.apply(this,arguments)-$)),R,L=Math.min(Math.abs(S)/f,o.apply(this,arguments)),N=L*(S<0?-1:1),F;for(h=0;h<f;++h)(F=b[m[h]=h]=+e(u[h],h,u))>0&&(p+=F);for(t!=null?m.sort(function(H,G){return t(b[H],b[G])}):r!=null&&m.sort(function(H,G){return r(u[H],u[G])}),h=0,g=p?(S-f*N)/p:0;h<f;++h,$=R)d=m[h],F=b[d],R=$+(F>0?F*g:0)+N,b[d]={data:u[d],index:h,value:F,startAngle:$,endAngle:R,padAngle:L};return b}return l.value=function(u){return arguments.length?(e=typeof u=="function"?u:constant$2(+u),l):e},l.sortValues=function(u){return arguments.length?(t=u,r=null,l):t},l.sort=function(u){return arguments.length?(r=u,t=null,l):r},l.startAngle=function(u){return arguments.length?(n=typeof u=="function"?u:constant$2(+u),l):n},l.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:constant$2(+u),l):i},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:constant$2(+u),l):o},l}var curveRadialLinear=curveRadial$1(curveLinear);function Radial(e){this._curve=e}Radial.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function curveRadial$1(e){function t(r){return new Radial(e(r))}return t._curve=e,t}function lineRadial(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(curveRadial$1(r)):t()._curve},e}function lineRadial$1(){return lineRadial(line().curve(curveRadialLinear))}function areaRadial(){var e=area().curve(curveRadialLinear),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return lineRadial(r())},delete e.lineX0,e.lineEndAngle=function(){return lineRadial(n())},delete e.lineX1,e.lineInnerRadius=function(){return lineRadial(i())},delete e.lineY0,e.lineOuterRadius=function(){return lineRadial(o())},delete e.lineY1,e.curve=function(l){return arguments.length?t(curveRadial$1(l)):t()._curve},e}function pointRadial(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var slice=Array.prototype.slice;function linkSource(e){return e.source}function linkTarget(e){return e.target}function link(e){var t=linkSource,r=linkTarget,n=x$1,i=y$1,o=null;function l(){var u,h=slice.call(arguments),f=t.apply(this,h),d=r.apply(this,h);if(o||(o=u=path()),e(o,+n.apply(this,(h[0]=f,h)),+i.apply(this,h),+n.apply(this,(h[0]=d,h)),+i.apply(this,h)),u)return o=null,u+""||null}return l.source=function(u){return arguments.length?(t=u,l):t},l.target=function(u){return arguments.length?(r=u,l):r},l.x=function(u){return arguments.length?(n=typeof u=="function"?u:constant$2(+u),l):n},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:constant$2(+u),l):i},l.context=function(u){return arguments.length?(o=u==null?null:u,l):o},l}function curveHorizontal(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function curveVertical(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function curveRadial(e,t,r,n,i){var o=pointRadial(t,r),l=pointRadial(t,r=(r+i)/2),u=pointRadial(n,r),h=pointRadial(n,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}function linkHorizontal(){return link(curveHorizontal)}function linkVertical(){return link(curveVertical)}function linkRadial(){var e=link(curveRadial);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const circle$2={draw:function(e,t){var r=Math.sqrt(t/pi);e.moveTo(r,0),e.arc(0,0,r,0,tau)}},cross$1={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}};var tan30=Math.sqrt(1/3),tan30_2=tan30*2;const diamond={draw:function(e,t){var r=Math.sqrt(t/tan30_2),n=r*tan30;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}};var ka=.8908130915292852,kr=Math.sin(pi/10)/Math.sin(7*pi/10),kx=Math.sin(tau/10)*kr,ky=-Math.cos(tau/10)*kr;const star={draw:function(e,t){var r=Math.sqrt(t*ka),n=kx*r,i=ky*r;e.moveTo(0,-r),e.lineTo(n,i);for(var o=1;o<5;++o){var l=tau*o/5,u=Math.cos(l),h=Math.sin(l);e.lineTo(h*r,-u*r),e.lineTo(u*n-h*i,h*n+u*i)}e.closePath()}},square={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}};var sqrt3=Math.sqrt(3);const triangle={draw:function(e,t){var r=-Math.sqrt(t/(sqrt3*3));e.moveTo(0,r*2),e.lineTo(-sqrt3*r,-r),e.lineTo(sqrt3*r,-r),e.closePath()}};var c$1=-.5,s=Math.sqrt(3)/2,k=1/Math.sqrt(12),a=(k/2+1)*3;const wye={draw:function(e,t){var r=Math.sqrt(t/a),n=r/2,i=r*k,o=n,l=r*k+r,u=-o,h=l;e.moveTo(n,i),e.lineTo(o,l),e.lineTo(u,h),e.lineTo(c$1*n-s*i,s*n+c$1*i),e.lineTo(c$1*o-s*l,s*o+c$1*l),e.lineTo(c$1*u-s*h,s*u+c$1*h),e.lineTo(c$1*n+s*i,c$1*i-s*n),e.lineTo(c$1*o+s*l,c$1*l-s*o),e.lineTo(c$1*u+s*h,c$1*h-s*u),e.closePath()}};var symbols=[circle$2,cross$1,diamond,square,star,triangle,wye];function symbol(){var e=constant$2(circle$2),t=constant$2(64),r=null;function n(){var i;if(r||(r=i=path()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(e=typeof i=="function"?i:constant$2(i),n):e},n.size=function(i){return arguments.length?(t=typeof i=="function"?i:constant$2(+i),n):t},n.context=function(i){return arguments.length?(r=i==null?null:i,n):r},n}function noop(){}function point$4(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Basis(e){this._context=e}Basis.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:point$4(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:point$4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function basis(e){return new Basis(e)}function BasisClosed(e){this._context=e}BasisClosed.prototype={areaStart:noop,areaEnd:noop,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);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:point$4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function basisClosed(e){return new BasisClosed(e)}function BasisOpen(e){this._context=e}BasisOpen.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:point$4(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function basisOpen(e){return new BasisOpen(e)}function Bundle(e,t){this._basis=new Basis(e),this._beta=t}Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],o=e[r]-n,l=t[r]-i,u=-1,h;++u<=r;)h=u/r,this._basis.point(this._beta*e[u]+(1-this._beta)*(n+h*o),this._beta*t[u]+(1-this._beta)*(i+h*l));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const bundle=function e(t){function r(n){return t===1?new Basis(n):new Bundle(n,t)}return r.beta=function(n){return e(+n)},r}(.85);function point$3(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Cardinal(e,t){this._context=e,this._k=(1-t)/6}Cardinal.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:point$3(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:point$3(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cardinal=function e(t){function r(n){return new Cardinal(n,t)}return r.tension=function(n){return e(+n)},r}(0);function CardinalClosed(e,t){this._context=e,this._k=(1-t)/6}CardinalClosed.prototype={areaStart:noop,areaEnd:noop,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);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:point$3(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cardinalClosed=function e(t){function r(n){return new CardinalClosed(n,t)}return r.tension=function(n){return e(+n)},r}(0);function CardinalOpen(e,t){this._context=e,this._k=(1-t)/6}CardinalOpen.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,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:point$3(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cardinalOpen=function e(t){function r(n){return new CardinalOpen(n,t)}return r.tension=function(n){return e(+n)},r}(0);function point$2(e,t,r){var n=e._x1,i=e._y1,o=e._x2,l=e._y2;if(e._l01_a>epsilon$1){var u=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,h=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*u-e._x0*e._l12_2a+e._x2*e._l01_2a)/h,i=(i*u-e._y0*e._l12_2a+e._y2*e._l01_2a)/h}if(e._l23_a>epsilon$1){var f=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*f+e._x1*e._l23_2a-t*e._l12_2a)/d,l=(l*f+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(n,i,o,l,e._x2,e._y2)}function CatmullRom(e,t){this._context=e,this._alpha=t}CatmullRom.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:point$2(this,e,t);break}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const catmullRom=function e(t){function r(n){return t?new CatmullRom(n,t):new Cardinal(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function CatmullRomClosed(e,t){this._context=e,this._alpha=t}CatmullRomClosed.prototype={areaStart:noop,areaEnd:noop,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);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:point$2(this,e,t);break}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const catmullRomClosed=function e(t){function r(n){return t?new CatmullRomClosed(n,t):new CardinalClosed(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function CatmullRomOpen(e,t){this._context=e,this._alpha=t}CatmullRomOpen.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:point$2(this,e,t);break}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const catmullRomOpen=function e(t){function r(n){return t?new CatmullRomOpen(n,t):new CardinalOpen(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function LinearClosed(e){this._context=e}LinearClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function linearClosed(e){return new LinearClosed(e)}function sign(e){return e<0?-1:1}function slope3(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),l=(r-e._y1)/(i||n<0&&-0),u=(o*i+l*n)/(n+i);return(sign(o)+sign(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function slope2(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function point$1(e,t,r){var n=e._x0,i=e._y0,o=e._x1,l=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,l-u*r,o,l)}function MonotoneX(e){this._context=e}MonotoneX.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:point$1(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,point$1(this,slope2(this,r=slope3(this,e,t)),r);break;default:point$1(this,this._t0,r=slope3(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function MonotoneY(e){this._context=new ReflectContext(e)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(e,t){MonotoneX.prototype.point.call(this,t,e)};function ReflectContext(e){this._context=e}ReflectContext.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function monotoneX(e){return new MonotoneX(e)}function monotoneY(e){return new MonotoneY(e)}function Natural(e){this._context=e}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=controlPoints(e),i=controlPoints(t),o=0,l=1;l<r;++o,++l)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[l],t[l]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function controlPoints(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),l=new Array(r);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,l[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,l[t]-=n*l[t-1];for(i[r-1]=l[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function natural(e){return new Natural(e)}function Step(e,t){this._context=e,this._t=t}Step.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function step(e){return new Step(e,.5)}function stepBefore(e){return new Step(e,0)}function stepAfter(e){return new Step(e,1)}function none$1(e,t){if((l=e.length)>1)for(var r=1,n,i,o=e[t[0]],l,u=o.length;r<l;++r)for(i=o,o=e[t[r]],n=0;n<u;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function none(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function stackValue(e,t){return e[t]}function stack(){var e=constant$2([]),t=none,r=none$1,n=stackValue;function i(o){var l=e.apply(this,arguments),u,h=o.length,f=l.length,d=new Array(f),g;for(u=0;u<f;++u){for(var p=l[u],m=d[u]=new Array(h),b=0,$;b<h;++b)m[b]=$=[0,+n(o[b],p,b,o)],$.data=o[b];m.key=p}for(u=0,g=t(d);u<f;++u)d[g[u]].index=u;return r(d,g),d}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:constant$2(slice.call(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:constant$2(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?none:typeof o=="function"?o:constant$2(slice.call(o)),i):t},i.offset=function(o){return arguments.length?(r=o==null?none$1:o,i):r},i}function expand(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,l;i<o;++i){for(l=r=0;r<n;++r)l+=e[r][i][1]||0;if(l)for(r=0;r<n;++r)e[r][i][1]/=l}none$1(e,t)}}function diverging(e,t){if((h=e.length)>0)for(var r,n=0,i,o,l,u,h,f=e[t[0]].length;n<f;++n)for(l=u=0,r=0;r<h;++r)(o=(i=e[t[r]][n])[1]-i[0])>0?(i[0]=l,i[1]=l+=o):o<0?(i[1]=u,i[0]=u+=o):(i[0]=0,i[1]=o)}function silhouette(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var l=0,u=0;l<i;++l)u+=e[l][r][1]||0;n[r][1]+=n[r][0]=-u/2}none$1(e,t)}}function wiggle(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,l;n<o;++n){for(var u=0,h=0,f=0;u<l;++u){for(var d=e[t[u]],g=d[n][1]||0,p=d[n-1][1]||0,m=(g-p)/2,b=0;b<u;++b){var $=e[t[b]],S=$[n][1]||0,R=$[n-1][1]||0;m+=S-R}h+=g,f+=m*g}i[n-1][1]+=i[n-1][0]=r,h&&(r-=f/h)}i[n-1][1]+=i[n-1][0]=r,none$1(e,t)}}function appearance(e){var t=e.map(peak);return none(e).sort(function(r,n){return t[r]-t[n]})}function peak(e){for(var t=-1,r=0,n=e.length,i,o=-1/0;++t<n;)(i=+e[t][1])>o&&(o=i,r=t);return r}function ascending(e){var t=e.map(sum);return none(e).sort(function(r,n){return t[r]-t[n]})}function sum(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}function descending(e){return ascending(e).reverse()}function insideOut(e){var t=e.length,r,n,i=e.map(sum),o=appearance(e),l=0,u=0,h=[],f=[];for(r=0;r<t;++r)n=o[r],l<u?(l+=i[n],h.push(n)):(u+=i[n],f.push(n));return f.reverse().concat(h)}function reverse(e){return none(e).reverse()}function constant$1(e){return function(){return e}}function x(e){return e[0]}function y(e){return e[1]}function RedBlackTree(){this._=null}function RedBlackNode(e){e.U=e.C=e.L=e.R=e.P=e.N=null}RedBlackTree.prototype={constructor:RedBlackTree,insert:function(e,t){var r,n,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=RedBlackFirst(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)n=r.U,r===n.L?(i=n.R,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.R&&(RedBlackRotateLeft(this,r),e=r,r=e.U),r.C=!1,n.C=!0,RedBlackRotateRight(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(RedBlackRotateRight(this,r),e=r,r=e.U),r.C=!1,n.C=!0,RedBlackRotateLeft(this,n))),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,r,n=e.L,i=e.R,o,l;if(n?i?o=RedBlackFirst(i):o=n:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,n&&i?(l=o.C,o.C=e.C,o.L=n,n.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(l=e.C,e=o),e&&(e.U=t),!l){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(r=t.R,r.C&&(r.C=!1,t.C=!0,RedBlackRotateLeft(this,t),r=t.R),r.L&&r.L.C||r.R&&r.R.C){(!r.R||!r.R.C)&&(r.L.C=!1,r.C=!0,RedBlackRotateRight(this,r),r=t.R),r.C=t.C,t.C=r.R.C=!1,RedBlackRotateLeft(this,t),e=this._;break}}else if(r=t.L,r.C&&(r.C=!1,t.C=!0,RedBlackRotateRight(this,t),r=t.L),r.L&&r.L.C||r.R&&r.R.C){(!r.L||!r.L.C)&&(r.R.C=!1,r.C=!0,RedBlackRotateLeft(this,r),r=t.L),r.C=t.C,t.C=r.L.C=!1,RedBlackRotateRight(this,t),e=this._;break}r.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function RedBlackRotateLeft(e,t){var r=t,n=t.R,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function RedBlackRotateRight(e,t){var r=t,n=t.L,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function RedBlackFirst(e){for(;e.L;)e=e.L;return e}function createEdge(e,t,r,n){var i=[null,null],o=edges$1.push(i)-1;return i.left=e,i.right=t,r&&setEdgeEnd(i,e,t,r),n&&setEdgeEnd(i,t,e,n),cells[e.index].halfedges.push(o),cells[t.index].halfedges.push(o),i}function createBorderEdge(e,t,r){var n=[t,r];return n.left=e,n}function setEdgeEnd(e,t,r,n){!e[0]&&!e[1]?(e[0]=n,e.left=t,e.right=r):e.left===r?e[1]=n:e[0]=n}function clipEdge(e,t,r,n,i){var o=e[0],l=e[1],u=o[0],h=o[1],f=l[0],d=l[1],g=0,p=1,m=f-u,b=d-h,$;if($=t-u,!(!m&&$>0)){if($/=m,m<0){if($<g)return;$<p&&(p=$)}else if(m>0){if($>p)return;$>g&&(g=$)}if($=n-u,!(!m&&$<0)){if($/=m,m<0){if($>p)return;$>g&&(g=$)}else if(m>0){if($<g)return;$<p&&(p=$)}if($=r-h,!(!b&&$>0)){if($/=b,b<0){if($<g)return;$<p&&(p=$)}else if(b>0){if($>p)return;$>g&&(g=$)}if($=i-h,!(!b&&$<0)){if($/=b,b<0){if($>p)return;$>g&&(g=$)}else if(b>0){if($<g)return;$<p&&(p=$)}return!(g>0)&&!(p<1)||(g>0&&(e[0]=[u+g*m,h+g*b]),p<1&&(e[1]=[u+p*m,h+p*b])),!0}}}}}function connectEdge(e,t,r,n,i){var o=e[1];if(o)return!0;var l=e[0],u=e.left,h=e.right,f=u[0],d=u[1],g=h[0],p=h[1],m=(f+g)/2,b=(d+p)/2,$,S;if(p===d){if(m<t||m>=n)return;if(f>g){if(!l)l=[m,r];else if(l[1]>=i)return;o=[m,i]}else{if(!l)l=[m,i];else if(l[1]<r)return;o=[m,r]}}else if($=(f-g)/(p-d),S=b-$*m,$<-1||$>1)if(f>g){if(!l)l=[(r-S)/$,r];else if(l[1]>=i)return;o=[(i-S)/$,i]}else{if(!l)l=[(i-S)/$,i];else if(l[1]<r)return;o=[(r-S)/$,r]}else if(d<p){if(!l)l=[t,$*t+S];else if(l[0]>=n)return;o=[n,$*n+S]}else{if(!l)l=[n,$*n+S];else if(l[0]<t)return;o=[t,$*t+S]}return e[0]=l,e[1]=o,!0}function clipEdges(e,t,r,n){for(var i=edges$1.length,o;i--;)(!connectEdge(o=edges$1[i],e,t,r,n)||!clipEdge(o,e,t,r,n)||!(Math.abs(o[0][0]-o[1][0])>epsilon||Math.abs(o[0][1]-o[1][1])>epsilon))&&delete edges$1[i]}function createCell(e){return cells[e.index]={site:e,halfedges:[]}}function cellHalfedgeAngle(e,t){var r=e.site,n=t.left,i=t.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=t[1],i=t[0]):(n=t[0],i=t[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function cellHalfedgeStart(e,t){return t[+(t.left!==e.site)]}function cellHalfedgeEnd(e,t){return t[+(t.left===e.site)]}function sortCellHalfedges(){for(var e=0,t=cells.length,r,n,i,o;e<t;++e)if((r=cells[e])&&(o=(n=r.halfedges).length)){var l=new Array(o),u=new Array(o);for(i=0;i<o;++i)l[i]=i,u[i]=cellHalfedgeAngle(r,edges$1[n[i]]);for(l.sort(function(h,f){return u[f]-u[h]}),i=0;i<o;++i)u[i]=n[l[i]];for(i=0;i<o;++i)n[i]=u[i]}}function clipCells(e,t,r,n){var i=cells.length,o,l,u,h,f,d,g,p,m,b,$,S,R=!0;for(o=0;o<i;++o)if(l=cells[o]){for(u=l.site,f=l.halfedges,h=f.length;h--;)edges$1[f[h]]||f.splice(h,1);for(h=0,d=f.length;h<d;)b=cellHalfedgeEnd(l,edges$1[f[h]]),$=b[0],S=b[1],g=cellHalfedgeStart(l,edges$1[f[++h%d]]),p=g[0],m=g[1],(Math.abs($-p)>epsilon||Math.abs(S-m)>epsilon)&&(f.splice(h,0,edges$1.push(createBorderEdge(u,b,Math.abs($-e)<epsilon&&n-S>epsilon?[e,Math.abs(p-e)<epsilon?m:n]:Math.abs(S-n)<epsilon&&r-$>epsilon?[Math.abs(m-n)<epsilon?p:r,n]:Math.abs($-r)<epsilon&&S-t>epsilon?[r,Math.abs(p-r)<epsilon?m:t]:Math.abs(S-t)<epsilon&&$-e>epsilon?[Math.abs(m-t)<epsilon?p:e,t]:null))-1),++d);d&&(R=!1)}if(R){var L,N,F,H=1/0;for(o=0,R=null;o<i;++o)(l=cells[o])&&(u=l.site,L=u[0]-e,N=u[1]-t,F=L*L+N*N,F<H&&(H=F,R=l));if(R){var G=[e,t],P=[e,n],V=[r,n],z=[r,t];R.halfedges.push(edges$1.push(createBorderEdge(u=R.site,G,P))-1,edges$1.push(createBorderEdge(u,P,V))-1,edges$1.push(createBorderEdge(u,V,z))-1,edges$1.push(createBorderEdge(u,z,G))-1)}}for(o=0;o<i;++o)(l=cells[o])&&(l.halfedges.length||delete cells[o])}var circlePool=[],firstCircle;function Circle(){RedBlackNode(this),this.x=this.y=this.arc=this.site=this.cy=null}function attachCircle(e){var t=e.P,r=e.N;if(!(!t||!r)){var n=t.site,i=e.site,o=r.site;if(n!==o){var l=i[0],u=i[1],h=n[0]-l,f=n[1]-u,d=o[0]-l,g=o[1]-u,p=2*(h*g-f*d);if(!(p>=-epsilon2)){var m=h*h+f*f,b=d*d+g*g,$=(g*m-f*b)/p,S=(h*b-d*m)/p,R=circlePool.pop()||new Circle;R.arc=e,R.site=i,R.x=$+l,R.y=(R.cy=S+u)+Math.sqrt($*$+S*S),e.circle=R;for(var L=null,N=circles._;N;)if(R.y<N.y||R.y===N.y&&R.x<=N.x)if(N.L)N=N.L;else{L=N.P;break}else if(N.R)N=N.R;else{L=N;break}circles.insert(L,R),L||(firstCircle=R)}}}}function detachCircle(e){var t=e.circle;t&&(t.P||(firstCircle=t.N),circles.remove(t),circlePool.push(t),RedBlackNode(t),e.circle=null)}var beachPool=[];function Beach(){RedBlackNode(this),this.edge=this.site=this.circle=null}function createBeach(e){var t=beachPool.pop()||new Beach;return t.site=e,t}function detachBeach(e){detachCircle(e),beaches.remove(e),beachPool.push(e),RedBlackNode(e)}function removeBeach(e){var t=e.circle,r=t.x,n=t.cy,i=[r,n],o=e.P,l=e.N,u=[e];detachBeach(e);for(var h=o;h.circle&&Math.abs(r-h.circle.x)<epsilon&&Math.abs(n-h.circle.cy)<epsilon;)o=h.P,u.unshift(h),detachBeach(h),h=o;u.unshift(h),detachCircle(h);for(var f=l;f.circle&&Math.abs(r-f.circle.x)<epsilon&&Math.abs(n-f.circle.cy)<epsilon;)l=f.N,u.push(f),detachBeach(f),f=l;u.push(f),detachCircle(f);var d=u.length,g;for(g=1;g<d;++g)f=u[g],h=u[g-1],setEdgeEnd(f.edge,h.site,f.site,i);h=u[0],f=u[d-1],f.edge=createEdge(h.site,f.site,null,i),attachCircle(h),attachCircle(f)}function addBeach(e){for(var t=e[0],r=e[1],n,i,o,l,u=beaches._;u;)if(o=leftBreakPoint(u,r)-t,o>epsilon)u=u.L;else if(l=t-rightBreakPoint(u,r),l>epsilon){if(!u.R){n=u;break}u=u.R}else{o>-epsilon?(n=u.P,i=u):l>-epsilon?(n=u,i=u.N):n=i=u;break}createCell(e);var h=createBeach(e);if(beaches.insert(n,h),!(!n&&!i)){if(n===i){detachCircle(n),i=createBeach(n.site),beaches.insert(h,i),h.edge=i.edge=createEdge(n.site,h.site),attachCircle(n),attachCircle(i);return}if(!i){h.edge=createEdge(n.site,h.site);return}detachCircle(n),detachCircle(i);var f=n.site,d=f[0],g=f[1],p=e[0]-d,m=e[1]-g,b=i.site,$=b[0]-d,S=b[1]-g,R=2*(p*S-m*$),L=p*p+m*m,N=$*$+S*S,F=[(S*L-m*N)/R+d,(p*N-$*L)/R+g];setEdgeEnd(i.edge,f,b,F),h.edge=createEdge(f,e,null,F),i.edge=createEdge(e,b,null,F),attachCircle(n),attachCircle(i)}}function leftBreakPoint(e,t){var r=e.site,n=r[0],i=r[1],o=i-t;if(!o)return n;var l=e.P;if(!l)return-1/0;r=l.site;var u=r[0],h=r[1],f=h-t;if(!f)return u;var d=u-n,g=1/o-1/f,p=d/f;return g?(-p+Math.sqrt(p*p-2*g*(d*d/(-2*f)-h+f/2+i-o/2)))/g+n:(n+u)/2}function rightBreakPoint(e,t){var r=e.N;if(r)return leftBreakPoint(r,t);var n=e.site;return n[1]===t?n[0]:1/0}var epsilon=1e-6,epsilon2=1e-12,beaches,cells,circles,edges$1;function triangleArea(e,t,r){return(e[0]-r[0])*(t[1]-e[1])-(e[0]-t[0])*(r[1]-e[1])}function lexicographic(e,t){return t[1]-e[1]||t[0]-e[0]}function Diagram$1(e,t){var r=e.sort(lexicographic).pop(),n,i,o;for(edges$1=[],cells=new Array(e.length),beaches=new RedBlackTree,circles=new RedBlackTree;;)if(o=firstCircle,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(addBeach(r),n=r[0],i=r[1]),r=e.pop();else if(o)removeBeach(o.arc);else break;if(sortCellHalfedges(),t){var l=+t[0][0],u=+t[0][1],h=+t[1][0],f=+t[1][1];clipEdges(l,u,h,f),clipCells(l,u,h,f)}this.edges=edges$1,this.cells=cells,beaches=circles=edges$1=cells=null}Diagram$1.prototype={constructor:Diagram$1,polygons:function(){var e=this.edges;return this.cells.map(function(t){var r=t.halfedges.map(function(n){return cellHalfedgeStart(t,e[n])});return r.data=t.site.data,r})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(r,n){if(!!(u=(o=r.halfedges).length))for(var i=r.site,o,l=-1,u,h,f=t[o[u-1]],d=f.left===i?f.right:f.left;++l<u;)h=d,f=t[o[l]],d=f.left===i?f.right:f.left,h&&d&&n<h.index&&n<d.index&&triangleArea(i,h,d)<0&&e.push([i.data,h.data,d.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,r){for(var n=this,i,o=n._found||0,l=n.cells.length,u;!(u=n.cells[o]);)if(++o>=l)return null;var h=e-u.site[0],f=t-u.site[1],d=h*h+f*f;do u=n.cells[i=o],o=null,u.halfedges.forEach(function(g){var p=n.edges[g],m=p.left;if(!((m===u.site||!m)&&!(m=p.right))){var b=e-m[0],$=t-m[1],S=b*b+$*$;S<d&&(d=S,o=m.index)}});while(o!==null);return n._found=i,r==null||d<=r*r?u.site:null}};function voronoi(){var e=x,t=y,r=null;function n(i){return new Diagram$1(i.map(function(o,l){var u=[Math.round(e(o,l,i)/epsilon)*epsilon,Math.round(t(o,l,i)/epsilon)*epsilon];return u.index=l,u.data=o,u}),r)}return n.polygons=function(i){return n(i).polygons()},n.links=function(i){return n(i).links()},n.triangles=function(i){return n(i).triangles()},n.x=function(i){return arguments.length?(e=typeof i=="function"?i:constant$1(+i),n):e},n.y=function(i){return arguments.length?(t=typeof i=="function"?i:constant$1(+i),n):t},n.extent=function(i){return arguments.length?(r=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],n):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},n.size=function(i){return arguments.length?(r=i==null?null:[[0,0],[+i[0],+i[1]]],n):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},n}function constant(e){return function(){return e}}function ZoomEvent(e,t,r){this.target=e,this.type=t,this.transform=r}function Transform(e,t,r){this.k=e,this.x=t,this.y=r}Transform.prototype={constructor:Transform,scale:function(e){return e===1?this:new Transform(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Transform(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var identity=new Transform(1,0,0);transform.prototype=Transform.prototype;function transform(e){for(;!e.__zoom;)if(!(e=e.parentNode))return identity;return e.__zoom}function nopropagation(){event.stopImmediatePropagation()}function noevent(){event.preventDefault(),event.stopImmediatePropagation()}function defaultFilter(){return!event.ctrlKey&&!event.button}function defaultExtent(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function defaultTransform(){return this.__zoom||identity}function defaultWheelDelta(){return-event.deltaY*(event.deltaMode===1?.05:event.deltaMode?1:.002)}function defaultTouchable(){return navigator.maxTouchPoints||"ontouchstart"in this}function defaultConstrain(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],l=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),l>o?(o+l)/2:Math.min(0,o)||Math.max(0,l))}function zoom(){var e=defaultFilter,t=defaultExtent,r=defaultConstrain,n=defaultWheelDelta,i=defaultTouchable,o=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],u=250,h=interpolateZoom,f=dispatch("start","zoom","end"),d,g,p=500,m=150,b=0;function $(U){U.property("__zoom",defaultTransform).on("wheel.zoom",G).on("mousedown.zoom",P).on("dblclick.zoom",V).filter(i).on("touchstart.zoom",z).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}$.transform=function(U,I,ae){var Q=U.selection?U.selection():U;Q.property("__zoom",defaultTransform),U!==Q?N(U,I,ae):Q.interrupt().each(function(){F(this,arguments).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},$.scaleBy=function(U,I,ae){$.scaleTo(U,function(){var Q=this.__zoom.k,ue=typeof I=="function"?I.apply(this,arguments):I;return Q*ue},ae)},$.scaleTo=function(U,I,ae){$.transform(U,function(){var Q=t.apply(this,arguments),ue=this.__zoom,_e=ae==null?L(Q):typeof ae=="function"?ae.apply(this,arguments):ae,ke=ue.invert(_e),de=typeof I=="function"?I.apply(this,arguments):I;return r(R(S(ue,de),_e,ke),Q,l)},ae)},$.translateBy=function(U,I,ae){$.transform(U,function(){return r(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof ae=="function"?ae.apply(this,arguments):ae),t.apply(this,arguments),l)})},$.translateTo=function(U,I,ae,Q){$.transform(U,function(){var ue=t.apply(this,arguments),_e=this.__zoom,ke=Q==null?L(ue):typeof Q=="function"?Q.apply(this,arguments):Q;return r(identity.translate(ke[0],ke[1]).scale(_e.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof ae=="function"?-ae.apply(this,arguments):-ae),ue,l)},Q)};function S(U,I){return I=Math.max(o[0],Math.min(o[1],I)),I===U.k?U:new Transform(I,U.x,U.y)}function R(U,I,ae){var Q=I[0]-ae[0]*U.k,ue=I[1]-ae[1]*U.k;return Q===U.x&&ue===U.y?U:new Transform(U.k,Q,ue)}function L(U){return[(+U[0][0]+ +U[1][0])/2,(+U[0][1]+ +U[1][1])/2]}function N(U,I,ae){U.on("start.zoom",function(){F(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){F(this,arguments).end()}).tween("zoom",function(){var Q=this,ue=arguments,_e=F(Q,ue),ke=t.apply(Q,ue),de=ae==null?L(ke):typeof ae=="function"?ae.apply(Q,ue):ae,ce=Math.max(ke[1][0]-ke[0][0],ke[1][1]-ke[0][1]),he=Q.__zoom,Se=typeof I=="function"?I.apply(Q,ue):I,ve=h(he.invert(de).concat(ce/he.k),Se.invert(de).concat(ce/Se.k));return function(me){if(me===1)me=Se;else{var Ce=ve(me),xe=ce/Ce[2];me=new Transform(xe,de[0]-Ce[0]*xe,de[1]-Ce[1]*xe)}_e.zoom(null,me)}})}function F(U,I,ae){return!ae&&U.__zooming||new H(U,I)}function H(U,I){this.that=U,this.args=I,this.active=0,this.extent=t.apply(U,I),this.taps=0}H.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(U,I){return this.mouse&&U!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&U!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&U!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(U){customEvent(new ZoomEvent($,U,this.that.__zoom),f.apply,f,[U,this.that,this.args])}};function G(){if(!e.apply(this,arguments))return;var U=F(this,arguments),I=this.__zoom,ae=Math.max(o[0],Math.min(o[1],I.k*Math.pow(2,n.apply(this,arguments)))),Q=mouse(this);if(U.wheel)(U.mouse[0][0]!==Q[0]||U.mouse[0][1]!==Q[1])&&(U.mouse[1]=I.invert(U.mouse[0]=Q)),clearTimeout(U.wheel);else{if(I.k===ae)return;U.mouse=[Q,I.invert(Q)],interrupt(this),U.start()}noevent(),U.wheel=setTimeout(ue,m),U.zoom("mouse",r(R(S(I,ae),U.mouse[0],U.mouse[1]),U.extent,l));function ue(){U.wheel=null,U.end()}}function P(){if(g||!e.apply(this,arguments))return;var U=F(this,arguments,!0),I=select(event.view).on("mousemove.zoom",_e,!0).on("mouseup.zoom",ke,!0),ae=mouse(this),Q=event.clientX,ue=event.clientY;dragDisable(event.view),nopropagation(),U.mouse=[ae,this.__zoom.invert(ae)],interrupt(this),U.start();function _e(){if(noevent(),!U.moved){var de=event.clientX-Q,ce=event.clientY-ue;U.moved=de*de+ce*ce>b}U.zoom("mouse",r(R(U.that.__zoom,U.mouse[0]=mouse(U.that),U.mouse[1]),U.extent,l))}function ke(){I.on("mousemove.zoom mouseup.zoom",null),yesdrag(event.view,U.moved),noevent(),U.end()}}function V(){if(!!e.apply(this,arguments)){var U=this.__zoom,I=mouse(this),ae=U.invert(I),Q=U.k*(event.shiftKey?.5:2),ue=r(R(S(U,Q),I,ae),t.apply(this,arguments),l);noevent(),u>0?select(this).transition().duration(u).call(N,ue,I):select(this).call($.transform,ue)}}function z(){if(!!e.apply(this,arguments)){var U=event.touches,I=U.length,ae=F(this,arguments,event.changedTouches.length===I),Q,ue,_e,ke;for(nopropagation(),ue=0;ue<I;++ue)_e=U[ue],ke=touch(this,U,_e.identifier),ke=[ke,this.__zoom.invert(ke),_e.identifier],ae.touch0?!ae.touch1&&ae.touch0[2]!==ke[2]&&(ae.touch1=ke,ae.taps=0):(ae.touch0=ke,Q=!0,ae.taps=1+!!d);d&&(d=clearTimeout(d)),Q&&(ae.taps<2&&(d=setTimeout(function(){d=null},p)),interrupt(this),ae.start())}}function W(){if(!!this.__zooming){var U=F(this,arguments),I=event.changedTouches,ae=I.length,Q,ue,_e,ke;for(noevent(),d&&(d=clearTimeout(d)),U.taps=0,Q=0;Q<ae;++Q)ue=I[Q],_e=touch(this,I,ue.identifier),U.touch0&&U.touch0[2]===ue.identifier?U.touch0[0]=_e:U.touch1&&U.touch1[2]===ue.identifier&&(U.touch1[0]=_e);if(ue=U.that.__zoom,U.touch1){var de=U.touch0[0],ce=U.touch0[1],he=U.touch1[0],Se=U.touch1[1],ve=(ve=he[0]-de[0])*ve+(ve=he[1]-de[1])*ve,me=(me=Se[0]-ce[0])*me+(me=Se[1]-ce[1])*me;ue=S(ue,Math.sqrt(ve/me)),_e=[(de[0]+he[0])/2,(de[1]+he[1])/2],ke=[(ce[0]+Se[0])/2,(ce[1]+Se[1])/2]}else if(U.touch0)_e=U.touch0[0],ke=U.touch0[1];else return;U.zoom("touch",r(R(ue,_e,ke),U.extent,l))}}function T(){if(!!this.__zooming){var U=F(this,arguments),I=event.changedTouches,ae=I.length,Q,ue;for(nopropagation(),g&&clearTimeout(g),g=setTimeout(function(){g=null},p),Q=0;Q<ae;++Q)ue=I[Q],U.touch0&&U.touch0[2]===ue.identifier?delete U.touch0:U.touch1&&U.touch1[2]===ue.identifier&&delete U.touch1;if(U.touch1&&!U.touch0&&(U.touch0=U.touch1,delete U.touch1),U.touch0)U.touch0[1]=this.__zoom.invert(U.touch0[0]);else if(U.end(),U.taps===2){var _e=select(this).on("dblclick.zoom");_e&&_e.apply(this,arguments)}}}return $.wheelDelta=function(U){return arguments.length?(n=typeof U=="function"?U:constant(+U),$):n},$.filter=function(U){return arguments.length?(e=typeof U=="function"?U:constant(!!U),$):e},$.touchable=function(U){return arguments.length?(i=typeof U=="function"?U:constant(!!U),$):i},$.extent=function(U){return arguments.length?(t=typeof U=="function"?U:constant([[+U[0][0],+U[0][1]],[+U[1][0],+U[1][1]]]),$):t},$.scaleExtent=function(U){return arguments.length?(o[0]=+U[0],o[1]=+U[1],$):[o[0],o[1]]},$.translateExtent=function(U){return arguments.length?(l[0][0]=+U[0][0],l[1][0]=+U[1][0],l[0][1]=+U[0][1],l[1][1]=+U[1][1],$):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},$.constrain=function(U){return arguments.length?(r=U,$):r},$.duration=function(U){return arguments.length?(u=+U,$):u},$.interpolate=function(U){return arguments.length?(h=U,$):h},$.on=function(){var U=f.on.apply(f,arguments);return U===f?$:U},$.clickDistance=function(U){return arguments.length?(b=(U=+U)*U,$):Math.sqrt(b)},$}const d3$2=Object.freeze(Object.defineProperty({__proto__:null,version:version$3,bisect:bisectRight,bisectRight,bisectLeft,ascending:ascending$3,bisector,cross:cross$3,descending:descending$2,deviation,extent:extent$1,histogram,thresholdFreedmanDiaconis:freedmanDiaconis,thresholdScott:scott,thresholdSturges,max:max$2,mean,median,merge:merge$1,min:min$1,pairs,permute,quantile:threshold$1,range:sequence,scan,shuffle:shuffle$1,sum:sum$2,ticks,tickIncrement,tickStep,transpose,variance,zip,axisTop,axisRight,axisBottom,axisLeft,brush,brushX,brushY,brushSelection,chord,ribbon,nest,set,map:map$2,keys,values,entries,color,rgb,hsl:hsl$2,lab:lab$1,hcl:hcl$2,lch,gray,cubehelix:cubehelix$3,contours,contourDensity:density,dispatch,drag,dragDisable,dragEnable:yesdrag,dsvFormat,csvParse,csvParseRows,csvFormat,csvFormatBody,csvFormatRows,csvFormatRow,csvFormatValue,tsvParse,tsvParseRows,tsvFormat,tsvFormatBody,tsvFormatRows,tsvFormatRow,tsvFormatValue,autoType,easeLinear:linear$1,easeQuad:quadInOut,easeQuadIn:quadIn,easeQuadOut:quadOut,easeQuadInOut:quadInOut,easeCubic:cubicInOut,easeCubicIn:cubicIn,easeCubicOut:cubicOut,easeCubicInOut:cubicInOut,easePoly:polyInOut,easePolyIn:polyIn,easePolyOut:polyOut,easePolyInOut:polyInOut,easeSin:sinInOut,easeSinIn:sinIn,easeSinOut:sinOut,easeSinInOut:sinInOut,easeExp:expInOut,easeExpIn:expIn,easeExpOut:expOut,easeExpInOut:expInOut,easeCircle:circleInOut,easeCircleIn:circleIn,easeCircleOut:circleOut,easeCircleInOut:circleInOut,easeBounce:bounceOut,easeBounceIn:bounceIn,easeBounceOut:bounceOut,easeBounceInOut:bounceInOut,easeBack:backInOut,easeBackIn:backIn,easeBackOut:backOut,easeBackInOut:backInOut,easeElastic:elasticOut,easeElasticIn:elasticIn,easeElasticOut:elasticOut,easeElasticInOut:elasticInOut,blob,buffer,dsv,csv,tsv,image,json,text,xml,html,svg,forceCenter:center,forceCollide:collide,forceLink:link$2,forceManyBody:manyBody,forceRadial:radial,forceSimulation:simulation,forceX:x$2,forceY:y$2,formatDefaultLocale:defaultLocale$1,get format(){return format$1},get formatPrefix(){return formatPrefix},formatLocale:formatLocale$1,formatSpecifier,FormatSpecifier,precisionFixed,precisionPrefix,precisionRound,geoArea:area$2,geoBounds:bounds$2,geoCentroid:centroid$1,geoCircle:circle$4,geoClipAntimeridian:clipAntimeridian,geoClipCircle:clipCircle,geoClipExtent:extent,geoClipRectangle:clipRectangle,geoContains:contains$1,geoDistance:distance$1,geoGraticule:graticule,geoGraticule10:graticule10,geoInterpolate:interpolate,geoLength:length$1,geoPath:index$2,geoAlbers:albers,geoAlbersUsa:albersUsa,geoAzimuthalEqualArea:azimuthalEqualArea,geoAzimuthalEqualAreaRaw:azimuthalEqualAreaRaw,geoAzimuthalEquidistant:azimuthalEquidistant,geoAzimuthalEquidistantRaw:azimuthalEquidistantRaw,geoConicConformal:conicConformal,geoConicConformalRaw:conicConformalRaw,geoConicEqualArea:conicEqualArea,geoConicEqualAreaRaw:conicEqualAreaRaw,geoConicEquidistant:conicEquidistant,geoConicEquidistantRaw:conicEquidistantRaw,geoEqualEarth:equalEarth,geoEqualEarthRaw:equalEarthRaw,geoEquirectangular:equirectangular,geoEquirectangularRaw:equirectangularRaw,geoGnomonic:gnomonic,geoGnomonicRaw:gnomonicRaw,geoIdentity:identity$4,geoProjection:projection,geoProjectionMutator:projectionMutator,geoMercator:mercator,geoMercatorRaw:mercatorRaw,geoNaturalEarth1:naturalEarth1,geoNaturalEarth1Raw:naturalEarth1Raw,geoOrthographic:orthographic,geoOrthographicRaw:orthographicRaw,geoStereographic:stereographic,geoStereographicRaw:stereographicRaw,geoTransverseMercator:transverseMercator,geoTransverseMercatorRaw:transverseMercatorRaw,geoRotation:rotation,geoStream,geoTransform:transform$1,cluster,hierarchy,pack:index$1,packSiblings:siblings,packEnclose:enclose,partition,stratify,tree,treemap:index,treemapBinary:binary,treemapDice,treemapSlice,treemapSliceDice:sliceDice,treemapSquarify:squarify,treemapResquarify:resquarify,interpolate:interpolateValue,interpolateArray:array$2,interpolateBasis:basis$2,interpolateBasisClosed:basisClosed$1,interpolateDate:date$1,interpolateDiscrete:discrete,interpolateHue:hue,interpolateNumber,interpolateNumberArray:numberArray,interpolateObject:object$1,interpolateRound,interpolateString,interpolateTransformCss,interpolateTransformSvg,interpolateZoom,interpolateRgb,interpolateRgbBasis:rgbBasis,interpolateRgbBasisClosed:rgbBasisClosed,interpolateHsl:hsl$1,interpolateHslLong:hslLong,interpolateLab:lab,interpolateHcl:hcl$1,interpolateHclLong:hclLong,interpolateCubehelix:cubehelix$2,interpolateCubehelixLong:cubehelixLong,piecewise,quantize:quantize$1,path,polygonArea:area$1,polygonCentroid:centroid,polygonHull:hull,polygonContains:contains,polygonLength:length,quadtree,randomUniform:uniform,randomNormal:normal,randomLogNormal:logNormal,randomBates:bates,randomIrwinHall:irwinHall,randomExponential:exponential,scaleBand:band,scalePoint:point$5,scaleIdentity:identity$2,scaleLinear:linear,scaleLog:log$2,scaleSymlog:symlog,scaleOrdinal:ordinal,scaleImplicit:implicit,scalePow:pow,scaleSqrt:sqrt$1,scaleQuantile:quantile,scaleQuantize:quantize,scaleThreshold:threshold,scaleTime:time,scaleUtc:utcTime,scaleSequential:sequential,scaleSequentialLog:sequentialLog,scaleSequentialPow:sequentialPow,scaleSequentialSqrt:sequentialSqrt,scaleSequentialSymlog:sequentialSymlog,scaleSequentialQuantile:sequentialQuantile,scaleDiverging:diverging$1,scaleDivergingLog:divergingLog,scaleDivergingPow:divergingPow,scaleDivergingSqrt:divergingSqrt,scaleDivergingSymlog:divergingSymlog,tickFormat,schemeCategory10:category10,schemeAccent:Accent,schemeDark2:Dark2,schemePaired:Paired,schemePastel1:Pastel1,schemePastel2:Pastel2,schemeSet1:Set1,schemeSet2:Set2,schemeSet3:Set3,schemeTableau10:Tableau10,interpolateBrBG:BrBG,schemeBrBG:scheme$q,interpolatePRGn:PRGn,schemePRGn:scheme$p,interpolatePiYG:PiYG,schemePiYG:scheme$o,interpolatePuOr:PuOr,schemePuOr:scheme$n,interpolateRdBu:RdBu,schemeRdBu:scheme$m,interpolateRdGy:RdGy,schemeRdGy:scheme$l,interpolateRdYlBu:RdYlBu,schemeRdYlBu:scheme$k,interpolateRdYlGn:RdYlGn,schemeRdYlGn:scheme$j,interpolateSpectral:Spectral,schemeSpectral:scheme$i,interpolateBuGn:BuGn,schemeBuGn:scheme$h,interpolateBuPu:BuPu,schemeBuPu:scheme$g,interpolateGnBu:GnBu,schemeGnBu:scheme$f,interpolateOrRd:OrRd,schemeOrRd:scheme$e,interpolatePuBuGn:PuBuGn,schemePuBuGn:scheme$d,interpolatePuBu:PuBu,schemePuBu:scheme$c,interpolatePuRd:PuRd,schemePuRd:scheme$b,interpolateRdPu:RdPu,schemeRdPu:scheme$a,interpolateYlGnBu:YlGnBu,schemeYlGnBu:scheme$9,interpolateYlGn:YlGn,schemeYlGn:scheme$8,interpolateYlOrBr:YlOrBr,schemeYlOrBr:scheme$7,interpolateYlOrRd:YlOrRd,schemeYlOrRd:scheme$6,interpolateBlues:Blues,schemeBlues:scheme$5,interpolateGreens:Greens,schemeGreens:scheme$4,interpolateGreys:Greys,schemeGreys:scheme$3,interpolatePurples:Purples,schemePurples:scheme$2,interpolateReds:Reds,schemeReds:scheme$1,interpolateOranges:Oranges,schemeOranges:scheme,interpolateCividis:cividis,interpolateCubehelixDefault:cubehelix,interpolateRainbow:rainbow,interpolateWarm:warm,interpolateCool:cool,interpolateSinebow:sinebow,interpolateTurbo:turbo,interpolateViridis:viridis,interpolateMagma:magma,interpolateInferno:inferno,interpolatePlasma:plasma,create:create$1,creator,local:local$1,matcher,mouse,namespace,namespaces,clientPoint:point$6,select,selectAll,selection,selector,selectorAll,style:styleValue,touch,touches,window:defaultView,get event(){return event},customEvent,arc,area,line,pie,areaRadial,radialArea:areaRadial,lineRadial:lineRadial$1,radialLine:lineRadial$1,pointRadial,linkHorizontal,linkVertical,linkRadial,symbol,symbols,symbolCircle:circle$2,symbolCross:cross$1,symbolDiamond:diamond,symbolSquare:square,symbolStar:star,symbolTriangle:triangle,symbolWye:wye,curveBasisClosed:basisClosed,curveBasisOpen:basisOpen,curveBasis:basis,curveBundle:bundle,curveCardinalClosed:cardinalClosed,curveCardinalOpen:cardinalOpen,curveCardinal:cardinal,curveCatmullRomClosed:catmullRomClosed,curveCatmullRomOpen:catmullRomOpen,curveCatmullRom:catmullRom,curveLinearClosed:linearClosed,curveLinear,curveMonotoneX:monotoneX,curveMonotoneY:monotoneY,curveNatural:natural,curveStep:step,curveStepAfter:stepAfter,curveStepBefore:stepBefore,stack,stackOffsetExpand:expand,stackOffsetDiverging:diverging,stackOffsetNone:none$1,stackOffsetSilhouette:silhouette,stackOffsetWiggle:wiggle,stackOrderAppearance:appearance,stackOrderAscending:ascending,stackOrderDescending:descending,stackOrderInsideOut:insideOut,stackOrderNone:none,stackOrderReverse:reverse,timeInterval:newInterval,timeMillisecond:utcMillisecond,timeMilliseconds:milliseconds,utcMillisecond,utcMilliseconds:milliseconds,timeSecond:utcSecond,timeSeconds:seconds,utcSecond,utcSeconds:seconds,timeMinute,timeMinutes:minutes,timeHour,timeHours:hours,timeDay,timeDays:days,timeWeek:sunday,timeWeeks:sundays,timeSunday:sunday,timeSundays:sundays,timeMonday:monday,timeMondays:mondays,timeTuesday:tuesday,timeTuesdays:tuesdays,timeWednesday:wednesday,timeWednesdays:wednesdays,timeThursday:thursday,timeThursdays:thursdays,timeFriday:friday,timeFridays:fridays,timeSaturday:saturday,timeSaturdays:saturdays,timeMonth,timeMonths:months,timeYear,timeYears:years,utcMinute:utcMinute$1,utcMinutes,utcHour:utcHour$1,utcHours,utcDay:utcDay$1,utcDays,utcWeek:utcSunday,utcWeeks:utcSundays,utcSunday,utcSundays,utcMonday,utcMondays,utcTuesday,utcTuesdays,utcWednesday,utcWednesdays,utcThursday,utcThursdays,utcFriday,utcFridays,utcSaturday,utcSaturdays,utcMonth:utcMonth$1,utcMonths,utcYear:utcYear$1,utcYears,timeFormatDefaultLocale:defaultLocale,get timeFormat(){return timeFormat},get timeParse(){return timeParse},get utcFormat(){return utcFormat},get utcParse(){return utcParse},timeFormatLocale:formatLocale,isoFormat:formatIso$1,isoParse:parseIso$1,now,timer,timerFlush,timeout,interval,transition,active,interrupt,voronoi,zoom,zoomTransform:transform,zoomIdentity:identity},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(d3$2);var d3$1;if(!d3$1&&typeof commonjsRequire$1=="function")try{d3$1=require$$0}catch{}d3$1||(d3$1=window.d3);var d3_1=d3$1,_$2=lodash_1$1,util$2={isSubgraph:isSubgraph$1,edgeToId:edgeToId$1,applyStyle:applyStyle$2,applyClass:applyClass$1,applyTransition:applyTransition$1};function isSubgraph$1(e,t){return!!e.children(t).length}function edgeToId$1(e){return escapeId$1(e.v)+":"+escapeId$1(e.w)+":"+escapeId$1(e.name)}var ID_DELIM$1=/:/g;function escapeId$1(e){return e?String(e).replace(ID_DELIM$1,"\\:"):""}function applyStyle$2(e,t){t&&e.attr("style",t)}function applyClass$1(e,t,r){t&&e.attr("class",t).attr("class",r+" "+e.attr("class"))}function applyTransition$1(e,t){var r=t.graph();if(_$2.isPlainObject(r)){var n=r.transition;if(_$2.isFunction(n))return n(e)}return e}var addTextLabel_1,hasRequiredAddTextLabel;function requireAddTextLabel(){if(hasRequiredAddTextLabel)return addTextLabel_1;hasRequiredAddTextLabel=1;var e=util$2;addTextLabel_1=t;function t(n,i){for(var o=n.append("text"),l=r(i.label).split(`
|
|
`),u=0;u<l.length;u++)o.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(l[u]);return e.applyStyle(o,i.labelStyle),o}function r(n){for(var i="",o=!1,l,u=0;u<n.length;++u)if(l=n[u],o){switch(l){case"n":i+=`
|
|
`;break;default:i+=l}o=!1}else l==="\\"?o=!0:i+=l;return i}return addTextLabel_1}var addHtmlLabel_1$1,hasRequiredAddHtmlLabel;function requireAddHtmlLabel(){if(hasRequiredAddHtmlLabel)return addHtmlLabel_1$1;hasRequiredAddHtmlLabel=1;var e=util$2;addHtmlLabel_1$1=t;function t(r,n){var i=r.append("foreignObject").attr("width","100000"),o=i.append("xhtml:div");o.attr("xmlns","http://www.w3.org/1999/xhtml");var l=n.label;switch(typeof l){case"function":o.insert(l);break;case"object":o.insert(function(){return l});break;default:o.html(l)}e.applyStyle(o,n.labelStyle),o.style("display","inline-block"),o.style("white-space","nowrap");var u=o.node().getBoundingClientRect();return i.attr("width",u.width).attr("height",u.height),i}return addHtmlLabel_1$1}var addSvgLabel,hasRequiredAddSvgLabel;function requireAddSvgLabel(){if(hasRequiredAddSvgLabel)return addSvgLabel;hasRequiredAddSvgLabel=1;var e=util$2;addSvgLabel=t;function t(r,n){var i=r;return i.node().appendChild(n.label),e.applyStyle(i,n.labelStyle),i}return addSvgLabel}var addLabel_1,hasRequiredAddLabel;function requireAddLabel(){if(hasRequiredAddLabel)return addLabel_1;hasRequiredAddLabel=1;var e=requireAddTextLabel(),t=requireAddHtmlLabel(),r=requireAddSvgLabel();addLabel_1=n;function n(i,o,l){var u=o.label,h=i.append("g");o.labelType==="svg"?r(h,o):typeof u!="string"||o.labelType==="html"?t(h,o):e(h,o);var f=h.node().getBBox(),d;switch(l){case"top":d=-o.height/2;break;case"bottom":d=o.height/2-f.height;break;default:d=-f.height/2}return h.attr("transform","translate("+-f.width/2+","+d+")"),h}return addLabel_1}var createNodes_1,hasRequiredCreateNodes;function requireCreateNodes(){if(hasRequiredCreateNodes)return createNodes_1;hasRequiredCreateNodes=1;var e=lodash_1$1,t=requireAddLabel(),r=util$2,n=d3_1;createNodes_1=i;function i(o,l,u){var h=l.nodes().filter(function(g){return!r.isSubgraph(l,g)}),f=o.selectAll("g.node").data(h,function(g){return g}).classed("update",!0);f.exit().remove(),f.enter().append("g").attr("class","node").style("opacity",0),f=o.selectAll("g.node"),f.each(function(g){var p=l.node(g),m=n.select(this);r.applyClass(m,p.class,(m.classed("update")?"update ":"")+"node"),m.select("g.label").remove();var b=m.append("g").attr("class","label"),$=t(b,p),S=u[p.shape],R=e.pick($.node().getBBox(),"width","height");p.elem=this,p.id&&m.attr("id",p.id),p.labelId&&b.attr("id",p.labelId),e.has(p,"width")&&(R.width=p.width),e.has(p,"height")&&(R.height=p.height),R.width+=p.paddingLeft+p.paddingRight,R.height+=p.paddingTop+p.paddingBottom,b.attr("transform","translate("+(p.paddingLeft-p.paddingRight)/2+","+(p.paddingTop-p.paddingBottom)/2+")");var L=n.select(this);L.select(".label-container").remove();var N=S(L,R,p).classed("label-container",!0);r.applyStyle(N,p.style);var F=N.node().getBBox();p.width=F.width,p.height=F.height});var d;return f.exit?d=f.exit():d=f.selectAll(null),r.applyTransition(d,l).style("opacity",0).remove(),f}return createNodes_1}var createClusters_1,hasRequiredCreateClusters;function requireCreateClusters(){if(hasRequiredCreateClusters)return createClusters_1;hasRequiredCreateClusters=1;var e=util$2,t=d3_1,r=requireAddLabel();createClusters_1=n;function n(i,o){var l=o.nodes().filter(function(f){return e.isSubgraph(o,f)}),u=i.selectAll("g.cluster").data(l,function(f){return f});u.selectAll("*").remove(),u.enter().append("g").attr("class","cluster").attr("id",function(f){var d=o.node(f);return d.id}).style("opacity",0),u=i.selectAll("g.cluster"),e.applyTransition(u,o).style("opacity",1),u.each(function(f){var d=o.node(f),g=t.select(this);t.select(this).append("rect");var p=g.append("g").attr("class","label");r(p,d,d.clusterLabelPos)}),u.selectAll("rect").each(function(f){var d=o.node(f),g=t.select(this);e.applyStyle(g,d.style)});var h;return u.exit?h=u.exit():h=u.selectAll(null),e.applyTransition(h,o).style("opacity",0).remove(),u}return createClusters_1}var createEdgeLabels_1,hasRequiredCreateEdgeLabels;function requireCreateEdgeLabels(){if(hasRequiredCreateEdgeLabels)return createEdgeLabels_1;hasRequiredCreateEdgeLabels=1;var e=lodash_1$1,t=requireAddLabel(),r=util$2,n=d3_1;createEdgeLabels_1=i;function i(o,l){var u=o.selectAll("g.edgeLabel").data(l.edges(),function(f){return r.edgeToId(f)}).classed("update",!0);u.exit().remove(),u.enter().append("g").classed("edgeLabel",!0).style("opacity",0),u=o.selectAll("g.edgeLabel"),u.each(function(f){var d=n.select(this);d.select(".label").remove();var g=l.edge(f),p=t(d,l.edge(f),0,0).classed("label",!0),m=p.node().getBBox();g.labelId&&p.attr("id",g.labelId),e.has(g,"width")||(g.width=m.width),e.has(g,"height")||(g.height=m.height)});var h;return u.exit?h=u.exit():h=u.selectAll(null),r.applyTransition(h,l).style("opacity",0).remove(),u}return createEdgeLabels_1}var createEdgePaths_1,hasRequiredCreateEdgePaths;function requireCreateEdgePaths(){if(hasRequiredCreateEdgePaths)return createEdgePaths_1;hasRequiredCreateEdgePaths=1;var e=lodash_1$1,t=intersectNode_1,r=util$2,n=d3_1;createEdgePaths_1=i;function i(g,p,m){var b=g.selectAll("g.edgePath").data(p.edges(),function(R){return r.edgeToId(R)}).classed("update",!0),$=f(b,p);d(b,p);var S=b.merge!==void 0?b.merge($):b;return r.applyTransition(S,p).style("opacity",1),S.each(function(R){var L=n.select(this),N=p.edge(R);N.elem=this,N.id&&L.attr("id",N.id),r.applyClass(L,N.class,(L.classed("update")?"update ":"")+"edgePath")}),S.selectAll("path.path").each(function(R){var L=p.edge(R);L.arrowheadId=e.uniqueId("arrowhead");var N=n.select(this).attr("marker-end",function(){return"url("+o(location.href,L.arrowheadId)+")"}).style("fill","none");r.applyTransition(N,p).attr("d",function(F){return l(p,F)}),r.applyStyle(N,L.style)}),S.selectAll("defs *").remove(),S.selectAll("defs").each(function(R){var L=p.edge(R),N=m[L.arrowhead];N(n.select(this),L.arrowheadId,L,"arrowhead")}),S}function o(g,p){var m=g.split("#")[0];return m+"#"+p}function l(g,p){var m=g.edge(p),b=g.node(p.v),$=g.node(p.w),S=m.points.slice(1,m.points.length-1);return S.unshift(t(b,S[0])),S.push(t($,S[S.length-1])),u(m,S)}function u(g,p){var m=(n.line||n.svg.line)().x(function(b){return b.x}).y(function(b){return b.y});return(m.curve||m.interpolate)(g.curve),m(p)}function h(g){var p=g.getBBox(),m=g.ownerSVGElement.getScreenCTM().inverse().multiply(g.getScreenCTM()).translate(p.width/2,p.height/2);return{x:m.e,y:m.f}}function f(g,p){var m=g.enter().append("g").attr("class","edgePath").style("opacity",0);return m.append("path").attr("class","path").attr("d",function(b){var $=p.edge(b),S=p.node(b.v).elem,R=e.range($.points.length).map(function(){return h(S)});return u($,R)}),m.append("defs"),m}function d(g,p){var m=g.exit();r.applyTransition(m,p).style("opacity",0).remove()}return createEdgePaths_1}var positionNodes_1,hasRequiredPositionNodes;function requirePositionNodes(){if(hasRequiredPositionNodes)return positionNodes_1;hasRequiredPositionNodes=1;var e=util$2,t=d3_1;positionNodes_1=r;function r(n,i){var o=n.filter(function(){return!t.select(this).classed("update")});function l(u){var h=i.node(u);return"translate("+h.x+","+h.y+")"}o.attr("transform",l),e.applyTransition(n,i).style("opacity",1).attr("transform",l)}return positionNodes_1}var positionEdgeLabels_1,hasRequiredPositionEdgeLabels;function requirePositionEdgeLabels(){if(hasRequiredPositionEdgeLabels)return positionEdgeLabels_1;hasRequiredPositionEdgeLabels=1;var e=util$2,t=d3_1,r=lodash_1$1;positionEdgeLabels_1=n;function n(i,o){var l=i.filter(function(){return!t.select(this).classed("update")});function u(h){var f=o.edge(h);return r.has(f,"x")?"translate("+f.x+","+f.y+")":""}l.attr("transform",u),e.applyTransition(i,o).style("opacity",1).attr("transform",u)}return positionEdgeLabels_1}var positionClusters_1,hasRequiredPositionClusters;function requirePositionClusters(){if(hasRequiredPositionClusters)return positionClusters_1;hasRequiredPositionClusters=1;var e=util$2,t=d3_1;positionClusters_1=r;function r(n,i){var o=n.filter(function(){return!t.select(this).classed("update")});function l(u){var h=i.node(u);return"translate("+h.x+","+h.y+")"}o.attr("transform",l),e.applyTransition(n,i).style("opacity",1).attr("transform",l),e.applyTransition(o.selectAll("rect"),i).attr("width",function(u){return i.node(u).width}).attr("height",function(u){return i.node(u).height}).attr("x",function(u){var h=i.node(u);return-h.width/2}).attr("y",function(u){var h=i.node(u);return-h.height/2})}return positionClusters_1}var shapes$2,hasRequiredShapes;function requireShapes(){if(hasRequiredShapes)return shapes$2;hasRequiredShapes=1;var e=intersectRect_1,t=intersectEllipse_1,r=intersectCircle_1,n=intersectPolygon_1;shapes$2={rect:i,ellipse:o,circle:l,diamond:u};function i(h,f,d){var g=h.insert("rect",":first-child").attr("rx",d.rx).attr("ry",d.ry).attr("x",-f.width/2).attr("y",-f.height/2).attr("width",f.width).attr("height",f.height);return d.intersect=function(p){return e(d,p)},g}function o(h,f,d){var g=f.width/2,p=f.height/2,m=h.insert("ellipse",":first-child").attr("x",-f.width/2).attr("y",-f.height/2).attr("rx",g).attr("ry",p);return d.intersect=function(b){return t(d,g,p,b)},m}function l(h,f,d){var g=Math.max(f.width,f.height)/2,p=h.insert("circle",":first-child").attr("x",-f.width/2).attr("y",-f.height/2).attr("r",g);return d.intersect=function(m){return r(d,g,m)},p}function u(h,f,d){var g=f.width*Math.SQRT2/2,p=f.height*Math.SQRT2/2,m=[{x:0,y:-p},{x:-g,y:0},{x:0,y:p},{x:g,y:0}],b=h.insert("polygon",":first-child").attr("points",m.map(function($){return $.x+","+$.y}).join(" "));return d.intersect=function($){return n(d,m,$)},b}return shapes$2}var arrows,hasRequiredArrows;function requireArrows(){if(hasRequiredArrows)return arrows;hasRequiredArrows=1;var e=util$2;arrows={default:t,normal:t,vee:r,undirected:n};function t(i,o,l,u){var h=i.append("marker").attr("id",o).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),f=h.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");e.applyStyle(f,l[u+"Style"]),l[u+"Class"]&&f.attr("class",l[u+"Class"])}function r(i,o,l,u){var h=i.append("marker").attr("id",o).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),f=h.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");e.applyStyle(f,l[u+"Style"]),l[u+"Class"]&&f.attr("class",l[u+"Class"])}function n(i,o,l,u){var h=i.append("marker").attr("id",o).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),f=h.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");e.applyStyle(f,l[u+"Style"]),l[u+"Class"]&&f.attr("class",l[u+"Class"])}return arrows}var _$1=lodash_1$1,d3=d3_1,layout=dagre_1.layout,render_1=render$3;function render$3(){var e=requireCreateNodes(),t=requireCreateClusters(),r=requireCreateEdgeLabels(),n=requireCreateEdgePaths(),i=requirePositionNodes(),o=requirePositionEdgeLabels(),l=requirePositionClusters(),u=requireShapes(),h=requireArrows(),f=function(d,g){preProcessGraph(g);var p=createOrSelectGroup(d,"output"),m=createOrSelectGroup(p,"clusters"),b=createOrSelectGroup(p,"edgePaths"),$=r(createOrSelectGroup(p,"edgeLabels"),g),S=e(createOrSelectGroup(p,"nodes"),g,u);layout(g),i(S,g),o($,g),n(b,g,h);var R=t(m,g);l(R,g),postProcessGraph(g)};return f.createNodes=function(d){return arguments.length?(e=d,f):e},f.createClusters=function(d){return arguments.length?(t=d,f):t},f.createEdgeLabels=function(d){return arguments.length?(r=d,f):r},f.createEdgePaths=function(d){return arguments.length?(n=d,f):n},f.shapes=function(d){return arguments.length?(u=d,f):u},f.arrows=function(d){return arguments.length?(h=d,f):h},f}var NODE_DEFAULT_ATTRS={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},EDGE_DEFAULT_ATTRS={arrowhead:"normal",curve:d3.curveLinear};function preProcessGraph(e){e.nodes().forEach(function(t){var r=e.node(t);!_$1.has(r,"label")&&!e.children(t).length&&(r.label=t),_$1.has(r,"paddingX")&&_$1.defaults(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),_$1.has(r,"paddingY")&&_$1.defaults(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),_$1.has(r,"padding")&&_$1.defaults(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),_$1.defaults(r,NODE_DEFAULT_ATTRS),_$1.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(n){r[n]=Number(r[n])}),_$1.has(r,"width")&&(r._prevWidth=r.width),_$1.has(r,"height")&&(r._prevHeight=r.height)}),e.edges().forEach(function(t){var r=e.edge(t);_$1.has(r,"label")||(r.label=""),_$1.defaults(r,EDGE_DEFAULT_ATTRS)})}function postProcessGraph(e){_$1.each(e.nodes(),function(t){var r=e.node(t);_$1.has(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,_$1.has(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function createOrSelectGroup(e,t){var r=e.select("g."+t);return r.empty()&&(r=e.append("g").attr("class",t)),r}var version$2="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 dagreD3={graphlib:graphlib_1,dagre:dagre_1,intersect:intersect$2,render:render_1,util:util$2,version:version$2},__defProp=Object.defineProperty,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField=(e,t,r)=>(__defNormalProp(e,typeof t!="symbol"?t+"":t,r),r);const LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},log$1={trace:(...e)=>{},debug:(...e)=>{},info:(...e)=>{},warn:(...e)=>{},error:(...e)=>{},fatal:(...e)=>{}},setLogLevel$1=function(e="fatal"){let t=LEVELS.fatal;typeof e=="string"?(e=e.toLowerCase(),e in LEVELS&&(t=LEVELS[e])):typeof e=="number"&&(t=e),log$1.trace=()=>{},log$1.debug=()=>{},log$1.info=()=>{},log$1.warn=()=>{},log$1.error=()=>{},log$1.fatal=()=>{},t<=LEVELS.fatal&&(log$1.fatal=console.error?console.error.bind(console,format("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",format("FATAL"))),t<=LEVELS.error&&(log$1.error=console.error?console.error.bind(console,format("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",format("ERROR"))),t<=LEVELS.warn&&(log$1.warn=console.warn?console.warn.bind(console,format("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",format("WARN"))),t<=LEVELS.info&&(log$1.info=console.info?console.info.bind(console,format("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",format("INFO"))),t<=LEVELS.debug&&(log$1.debug=console.debug?console.debug.bind(console,format("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("DEBUG"))),t<=LEVELS.trace&&(log$1.trace=console.debug?console.debug.bind(console,format("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("TRACE")))},format=e=>`%c${moment().format("ss.SSS")} : ${e} : `,getRows=e=>e?breakToPlaceholder(e).replace(/\\n/g,"#br#").split("#br#"):[""],removeScript=e=>purify.sanitize(e),sanitizeMore=(e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=t.securityLevel;n==="antiscript"||n==="strict"?e=removeScript(e):n!=="loose"&&(e=breakToPlaceholder(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=placeholderToBreak(e))}return e},sanitizeText$5=(e,t)=>e&&(t.dompurifyConfig?e=purify.sanitize(sanitizeMore(e,t),t.dompurifyConfig).toString():e=purify.sanitize(sanitizeMore(e,t)),e),sanitizeTextOrArray=(e,t)=>typeof e=="string"?sanitizeText$5(e,t):e.flat().map(r=>sanitizeText$5(r,t)),lineBreakRegex=/<br\s*\/?>/gi,hasBreaks=e=>lineBreakRegex.test(e),splitBreaks=e=>e.split(lineBreakRegex),placeholderToBreak=e=>e.replace(/#br#/g,"<br/>"),breakToPlaceholder=e=>e.replace(lineBreakRegex,"#br#"),getUrl=e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},evaluate=e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),parseGenericTypes=function(e){let t=e;return e.indexOf("~")!==-1?(t=t.replace(/~([^~].*)/,"<$1"),t=t.replace(/~([^~]*)$/,">$1"),parseGenericTypes(t)):t},common={getRows,sanitizeText:sanitizeText$5,sanitizeTextOrArray,hasBreaks,splitBreaks,lineBreakRegex,removeScript,getUrl,evaluate},mkBorder=(e,t)=>t?adjust$2(e,{s:-40,l:10}):adjust$2(e,{s:-40,l:-10}),oldAttributeBackgroundColorOdd="#ffffff",oldAttributeBackgroundColorEven="#f2f2f2";class Theme$4{constructor(){this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust$2(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust$2(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert$1(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert$1(this.tertiaryColor),this.lineColor=this.lineColor||invert$1(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?darken$1(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||darken$1(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert$1(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.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||lighten$1(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||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||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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$2(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$2(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$2(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$2(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$2(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$2(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust$2(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$2(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$2(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=darken$1(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=darken$1(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||invert$1(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||lighten$1(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||darken$1(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||adjust$2(this.primaryColor,{h:64}),this.fillType3=this.fillType3||adjust$2(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust$2(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust$2(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust$2(this.primaryColor,{h:128}),this.fillType7=this.fillType7||adjust$2(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||adjust$2(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust$2(this.secondaryColor,{l:-10}),this.pie6=this.pie6||adjust$2(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust$2(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust$2(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust$2(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust$2(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust$2(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust$2(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?darken$1(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||adjust$2(this.primaryColor,{h:-30}),this.git4=this.git4||adjust$2(this.primaryColor,{h:-60}),this.git5=this.git5||adjust$2(this.primaryColor,{h:-90}),this.git6=this.git6||adjust$2(this.primaryColor,{h:60}),this.git7=this.git7||adjust$2(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten$1(this.git0,25),this.git1=lighten$1(this.git1,25),this.git2=lighten$1(this.git2,25),this.git3=lighten$1(this.git3,25),this.git4=lighten$1(this.git4,25),this.git5=lighten$1(this.git5,25),this.git6=lighten$1(this.git6,25),this.git7=lighten$1(this.git7,25)):(this.git0=darken$1(this.git0,25),this.git1=darken$1(this.git1,25),this.git2=darken$1(this.git2,25),this.git3=darken$1(this.git3,25),this.git4=darken$1(this.git4,25),this.git5=darken$1(this.git5,25),this.git6=darken$1(this.git6,25),this.git7=darken$1(this.git7,25)),this.gitInv0=this.gitInv0||invert$1(this.git0),this.gitInv1=this.gitInv1||invert$1(this.git1),this.gitInv2=this.gitInv2||invert$1(this.git2),this.gitInv3=this.gitInv3||invert$1(this.git3),this.gitInv4=this.gitInv4||invert$1(this.git4),this.gitInv5=this.gitInv5||invert$1(this.git5),this.gitInv6=this.gitInv6||invert$1(this.git6),this.gitInv7=this.gitInv7||invert$1(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}}const getThemeVariables$4=e=>{const t=new Theme$4;return t.calculate(e),t};class Theme$3{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten$1(this.primaryColor,16),this.tertiaryColor=adjust$2(this.primaryColor,{h:-160}),this.primaryBorderColor=invert$1(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten$1(invert$1("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=rgba$2(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.THEME_COLOR_LIMIT=12,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=darken$1("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=rgba$2(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=rgba$2(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.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=lighten$1(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=lighten$1(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=lighten$1(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=adjust$2(this.primaryColor,{h:64}),this.fillType3=adjust$2(this.secondaryColor,{h:64}),this.fillType4=adjust$2(this.primaryColor,{h:-64}),this.fillType5=adjust$2(this.secondaryColor,{h:-64}),this.fillType6=adjust$2(this.primaryColor,{h:128}),this.fillType7=adjust$2(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$2(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$2(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$2(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$2(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$2(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$2(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$2(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$2(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$2(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||invert$1(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||lighten$1(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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?darken$1(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=lighten$1(this.secondaryColor,20),this.git1=lighten$1(this.pie2||this.secondaryColor,20),this.git2=lighten$1(this.pie3||this.tertiaryColor,20),this.git3=lighten$1(this.pie4||adjust$2(this.primaryColor,{h:-30}),20),this.git4=lighten$1(this.pie5||adjust$2(this.primaryColor,{h:-60}),20),this.git5=lighten$1(this.pie6||adjust$2(this.primaryColor,{h:-90}),10),this.git6=lighten$1(this.pie7||adjust$2(this.primaryColor,{h:60}),10),this.git7=lighten$1(this.pie8||adjust$2(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||invert$1(this.git0),this.gitInv1=this.gitInv1||invert$1(this.git1),this.gitInv2=this.gitInv2||invert$1(this.git2),this.gitInv3=this.gitInv3||invert$1(this.git3),this.gitInv4=this.gitInv4||invert$1(this.git4),this.gitInv5=this.gitInv5||invert$1(this.git5),this.gitInv6=this.gitInv6||invert$1(this.git6),this.gitInv7=this.gitInv7||invert$1(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lighten$1(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lighten$1(this.background,2)}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}}const getThemeVariables$3=e=>{const t=new Theme$3;return t.calculate(e),t};class Theme$2{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=adjust$2(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=adjust$2(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(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.THEME_COLOR_LIMIT=12,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.excludeBkgColor="#eeeeee",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=rgba$2(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.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$2(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$2(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$2(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$2(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$2(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$2(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$2(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$2(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$2(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||darken$1(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||darken$1(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=darken$1(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||darken$1(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||adjust$2(this["cScale"+t],{h:180});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||invert$1(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||invert$1(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}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=lighten$1(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=adjust$2(this.primaryColor,{h:64}),this.fillType3=adjust$2(this.secondaryColor,{h:64}),this.fillType4=adjust$2(this.primaryColor,{h:-64}),this.fillType5=adjust$2(this.secondaryColor,{h:-64}),this.fillType6=adjust$2(this.primaryColor,{h:128}),this.fillType7=adjust$2(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||adjust$2(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||adjust$2(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust$2(this.secondaryColor,{l:-30}),this.pie6=this.pie6||adjust$2(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||adjust$2(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||adjust$2(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||adjust$2(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||adjust$2(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||adjust$2(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||adjust$2(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,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||adjust$2(this.primaryColor,{h:-30}),this.git4=this.git4||adjust$2(this.primaryColor,{h:-60}),this.git5=this.git5||adjust$2(this.primaryColor,{h:-90}),this.git6=this.git6||adjust$2(this.primaryColor,{h:60}),this.git7=this.git7||adjust$2(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten$1(this.git0,25),this.git1=lighten$1(this.git1,25),this.git2=lighten$1(this.git2,25),this.git3=lighten$1(this.git3,25),this.git4=lighten$1(this.git4,25),this.git5=lighten$1(this.git5,25),this.git6=lighten$1(this.git6,25),this.git7=lighten$1(this.git7,25)):(this.git0=darken$1(this.git0,25),this.git1=darken$1(this.git1,25),this.git2=darken$1(this.git2,25),this.git3=darken$1(this.git3,25),this.git4=darken$1(this.git4,25),this.git5=darken$1(this.git5,25),this.git6=darken$1(this.git6,25),this.git7=darken$1(this.git7,25)),this.gitInv0=this.gitInv0||darken$1(invert$1(this.git0),25),this.gitInv1=this.gitInv1||invert$1(this.git1),this.gitInv2=this.gitInv2||invert$1(this.git2),this.gitInv3=this.gitInv3||invert$1(this.git3),this.gitInv4=this.gitInv4||invert$1(this.git4),this.gitInv5=this.gitInv5||invert$1(this.git5),this.gitInv6=this.gitInv6||invert$1(this.git6),this.gitInv7=this.gitInv7||invert$1(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert$1(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert$1(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}}const getThemeVariables$2=e=>{const t=new Theme$2;return t.calculate(e),t};class Theme$1{constructor(){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=lighten$1("#cde498",10),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.primaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.THEME_COLOR_LIMIT=12,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.excludeBkgColor="#eeeeee",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.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$2(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$2(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$2(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$2(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$2(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$2(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$2(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$2(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$2(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||darken$1(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||darken$1(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=darken$1(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||darken$1(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||adjust$2(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=darken$1(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=adjust$2(this.primaryColor,{h:64}),this.fillType3=adjust$2(this.secondaryColor,{h:64}),this.fillType4=adjust$2(this.primaryColor,{h:-64}),this.fillType5=adjust$2(this.secondaryColor,{h:-64}),this.fillType6=adjust$2(this.primaryColor,{h:128}),this.fillType7=adjust$2(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||adjust$2(this.primaryColor,{l:-30}),this.pie5=this.pie5||adjust$2(this.secondaryColor,{l:-30}),this.pie6=this.pie6||adjust$2(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||adjust$2(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust$2(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust$2(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust$2(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||adjust$2(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||adjust$2(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,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||adjust$2(this.primaryColor,{h:-30}),this.git4=this.git4||adjust$2(this.primaryColor,{h:-60}),this.git5=this.git5||adjust$2(this.primaryColor,{h:-90}),this.git6=this.git6||adjust$2(this.primaryColor,{h:60}),this.git7=this.git7||adjust$2(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten$1(this.git0,25),this.git1=lighten$1(this.git1,25),this.git2=lighten$1(this.git2,25),this.git3=lighten$1(this.git3,25),this.git4=lighten$1(this.git4,25),this.git5=lighten$1(this.git5,25),this.git6=lighten$1(this.git6,25),this.git7=lighten$1(this.git7,25)):(this.git0=darken$1(this.git0,25),this.git1=darken$1(this.git1,25),this.git2=darken$1(this.git2,25),this.git3=darken$1(this.git3,25),this.git4=darken$1(this.git4,25),this.git5=darken$1(this.git5,25),this.git6=darken$1(this.git6,25),this.git7=darken$1(this.git7,25)),this.gitInv0=this.gitInv0||invert$1(this.git0),this.gitInv1=this.gitInv1||invert$1(this.git1),this.gitInv2=this.gitInv2||invert$1(this.git2),this.gitInv3=this.gitInv3||invert$1(this.git3),this.gitInv4=this.gitInv4||invert$1(this.git4),this.gitInv5=this.gitInv5||invert$1(this.git5),this.gitInv6=this.gitInv6||invert$1(this.git6),this.gitInv7=this.gitInv7||invert$1(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}}const getThemeVariables$1=e=>{const t=new Theme$1;return t.calculate(e),t};class Theme{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=lighten$1(this.contrast,55),this.background="#ffffff",this.tertiaryColor=adjust$2(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(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.THEME_COLOR_LIMIT=12,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.excludeBkgColor="#eeeeee",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.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=lighten$1(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||invert$1(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||lighten$1(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||darken$1(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;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=lighten$1(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=lighten$1(this.contrast,30),this.sectionBkgColor2=lighten$1(this.contrast,30),this.taskBorderColor=darken$1(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=lighten$1(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=darken$1(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=adjust$2(this.primaryColor,{h:64}),this.fillType3=adjust$2(this.secondaryColor,{h:64}),this.fillType4=adjust$2(this.primaryColor,{h:-64}),this.fillType5=adjust$2(this.secondaryColor,{h:-64}),this.fillType6=adjust$2(this.primaryColor,{h:128}),this.fillType7=adjust$2(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,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,this.git0=darken$1(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||adjust$2(this.primaryColor,{h:-30}),this.git4=this.pie5||adjust$2(this.primaryColor,{h:-60}),this.git5=this.pie6||adjust$2(this.primaryColor,{h:-90}),this.git6=this.pie7||adjust$2(this.primaryColor,{h:60}),this.git7=this.pie8||adjust$2(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||invert$1(this.git0),this.gitInv1=this.gitInv1||invert$1(this.git1),this.gitInv2=this.gitInv2||invert$1(this.git2),this.gitInv3=this.gitInv3||invert$1(this.git3),this.gitInv4=this.gitInv4||invert$1(this.git4),this.gitInv5=this.gitInv5||invert$1(this.git5),this.gitInv6=this.gitInv6||invert$1(this.git6),this.gitInv7=this.gitInv7||invert$1(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}}const getThemeVariables=e=>{const t=new Theme;return t.calculate(e),t},theme={base:{getThemeVariables:getThemeVariables$4},dark:{getThemeVariables:getThemeVariables$3},default:{getThemeVariables:getThemeVariables$2},forest:{getThemeVariables:getThemeVariables$1},neutral:{getThemeVariables}},config$1={theme:"default",themeVariables:theme.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,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-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,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,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},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},gitGraph:{diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};config$1.class&&(config$1.class.arrowMarkerAbsolute=config$1.arrowMarkerAbsolute);config$1.gitGraph&&(config$1.gitGraph.arrowMarkerAbsolute=config$1.arrowMarkerAbsolute);const keyify=(e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:typeof e[n]=="object"&&e[n]!==null?[...r,t+n,...keyify(e[n],"")]:[...r,t+n],[]),configKeys=keyify(config$1,""),directive$1=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,anyComment=/\s*%%.*\n/gm,detectors={},detectType=function(e,t){e=e.replace(directive$1,"").replace(anyComment,`
|
|
`);for(const[r,{detector:n}]of Object.entries(detectors))if(n(e,t))return r;throw new Error(`No diagram type detected for text: ${e}`)},addDetector=(e,t,r)=>{if(detectors[e])throw new Error(`Detector with key ${e} already exists`);detectors[e]={detector:t,loader:r},log$1.debug(`Detector with key ${e} added${r?" with loader":""}`)},getDiagramLoader=e=>detectors[e].loader,assignWithDepth=function(e,t,r){const{depth:n,clobber:i}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>assignWithDepth(e,o,r)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.indexOf(o)===-1&&e.push(o)}),e):typeof e>"u"||n<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(typeof t<"u"&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]=="object"&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=assignWithDepth(e[o],t[o],{depth:n-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return _root=r,_root}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(l){var u=r.call(l,i),h=l[i];try{l[i]=void 0;var f=!0}catch{}var d=n.call(l);return f&&(u?l[i]=h:delete l[i]),d}return _getRawTag=o,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return _objectToString=r,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),r=require_objectToString(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function l(u){return u==null?u===void 0?i:n:o&&o in Object(u)?t(u):r(u)}return _baseGetTag=l,_baseGetTag}var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return isObject_1=e,isObject_1}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function l(u){if(!t(u))return!1;var h=e(u);return h==n||h==i||h==r||h==o}return isFunction_1=l,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return _isMasked=r,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return _toSource=r,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),r=requireIsObject(),n=require_toSource(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,f=u.hasOwnProperty,d=RegExp("^"+h.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(p){if(!r(p)||t(p))return!1;var m=e(p)?d:o;return m.test(n(p))}return _baseIsNative=g,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,r){return t==null?void 0:t[r]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return _getNative=r,_getNative}var getNative$1=require_getNative(),nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?t[e]!==void 0:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&t===void 0?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear;Hash$1.prototype.delete=hashDelete;Hash$1.prototype.get=hashGet;Hash$1.prototype.has=hashHas;Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1,eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,r){return t===r||t!==t&&r!==r}return eq_1=e,eq_1}var eq=requireEq();function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():splice.call(t,r,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear;ListCache$1.prototype.delete=listCacheDelete;ListCache$1.prototype.get=listCacheGet;ListCache$1.prototype.has=listCacheHas;ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=require_getNative(),root=require_root(),Map$2=getNative(root,"Map"),_Map=Map$2,Hash=_Hash,ListCache=_ListCache,Map$1=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r[typeof t=="string"?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear;MapCache$1.prototype.delete=mapCacheDelete;MapCache$1.prototype.get=mapCacheGet;MapCache$1.prototype.has=mapCacheHas;MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var l=e.apply(this,n);return r.cache=o.set(i,l)||o,l};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var memoize_1=memoize;const d3CurveTypes={curveBasis,curveBasisClosed,curveBasisOpen,curveLinear:curveLinear$1,curveLinearClosed,curveMonotoneX:monotoneX$1,curveMonotoneY:monotoneY$1,curveNatural,curveStep,curveStepAfter:stepAfter$1,curveStepBefore:stepBefore$1},directive=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,directiveWithoutOpen=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,detectInit=function(e,t){const r=detectDirective(e,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const i=r.map(o=>o.args);directiveSanitizer(i),n=assignWithDepth(n,[...i])}else n=r.args;if(n){let i=detectType(e,t);["config"].forEach(o=>{typeof n[o]<"u"&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[o],delete n[o])})}return n},detectDirective=function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
|
|
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),log$1.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n;const i=[];for(;(n=directive.exec(e))!==null;)if(n.index===directive.lastIndex&&directive.lastIndex++,n&&!t||t&&n[1]&&n[1].match(t)||t&&n[2]&&n[2].match(t)){const o=n[1]?n[1]:n[2],l=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:o,args:l})}return i.length===0&&i.push({type:e,args:null}),i.length===1?i[0]:i}catch(r){return log$1.error(`ERROR: ${r.message} - Unable to parse directive
|
|
${t!==null?" type:"+t:""} based on the text:${e}`),{type:null,args:null}}},isSubstringInArray=function(e,t){for(let r=0;r<t.length;r++)if(t[r].match(e))return r;return-1},interpolateToCurve=(e,t)=>{if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return d3CurveTypes[r]||t},formatUrl=(e,t)=>{const r=e.trim();if(r)return t.securityLevel!=="loose"?sanitizeUrl_1(r):r},runFunc=(e,...t)=>{const r=e.split("."),n=r.length-1,i=r[n];let o=window;for(let l=0;l<n;l++)if(o=o[r[l]],!o)return;o[i](...t)},distance=(e,t)=>e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0,traverseEdge=e=>{let t,r=0;e.forEach(o=>{r+=distance(o,t),t=o});let n=r/2,i;return t=void 0,e.forEach(o=>{if(t&&!i){const l=distance(o,t);if(l<n)n-=l;else{const u=n/l;u<=0&&(i=t),u>=1&&(i={x:o.x,y:o.y}),u>0&&u<1&&(i={x:(1-u)*t.x+u*o.x,y:(1-u)*t.y+u*o.y})}}t=o}),i},calcLabelPosition=e=>e.length===1?e[0]:traverseEdge(e),calcCardinalityPosition=(e,t,r)=>{let n;log$1.info("our points",t),t[0]!==r&&(t=t.reverse()),t.forEach(d=>{totalDistance+=distance(d,n),n=d});let o=25,l;n=void 0,t.forEach(d=>{if(n&&!l){const g=distance(d,n);if(g<o)o-=g;else{const p=o/g;p<=0&&(l=n),p>=1&&(l={x:d.x,y:d.y}),p>0&&p<1&&(l={x:(1-p)*n.x+p*d.x,y:(1-p)*n.y+p*d.y})}}n=d});const u=e?10:5,h=Math.atan2(t[0].y-l.y,t[0].x-l.x),f={x:0,y:0};return f.x=Math.sin(h)*u+(t[0].x+l.x)/2,f.y=-Math.cos(h)*u+(t[0].y+l.y)/2,f},calcTerminalLabelPosition=(e,t,r)=>{let n=JSON.parse(JSON.stringify(r)),i;log$1.info("our points",n),t!=="start_left"&&t!=="start_right"&&(n=n.reverse()),n.forEach(g=>{i=g});let l=25+e,u;i=void 0,n.forEach(g=>{if(i&&!u){const p=distance(g,i);if(p<l)l-=p;else{const m=l/p;m<=0&&(u=i),m>=1&&(u={x:g.x,y:g.y}),m>0&&m<1&&(u={x:(1-m)*i.x+m*g.x,y:(1-m)*i.y+m*g.y})}}i=g});const h=10+e*.5,f=Math.atan2(n[0].y-u.y,n[0].x-u.x),d={x:0,y:0};return d.x=Math.sin(f)*h+(n[0].x+u.x)/2,d.y=-Math.cos(f)*h+(n[0].y+u.y)/2,t==="start_left"&&(d.x=Math.sin(f+Math.PI)*h+(n[0].x+u.x)/2,d.y=-Math.cos(f+Math.PI)*h+(n[0].y+u.y)/2),t==="end_right"&&(d.x=Math.sin(f-Math.PI)*h+(n[0].x+u.x)/2-5,d.y=-Math.cos(f-Math.PI)*h+(n[0].y+u.y)/2-5),t==="end_left"&&(d.x=Math.sin(f)*h+(n[0].x+u.x)/2-5,d.y=-Math.cos(f)*h+(n[0].y+u.y)/2-5),d},getStylesFromArray=e=>{let t="",r="";for(let n=0;n<e.length;n++)typeof e[n]<"u"&&(e[n].startsWith("color:")||e[n].startsWith("text-align:")?r=r+e[n]+";":t=t+e[n]+";");return{style:t,labelStyle:r}};let cnt$1=0;const generateId$1=()=>(cnt$1++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt$1);function makeid(e){let t="";const r="0123456789abcdef",n=r.length;for(let i=0;i<e;i++)t+=r.charAt(Math.floor(Math.random()*n));return t}const random=e=>makeid(e.length),getTextObj$3=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}},drawSimpleText=function(e,t){const r=t.text.replace(common.lineBreakRegex," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",t.fontSize),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),typeof t.class<"u"&&n.attr("class",t.class);const i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.attr("fill",t.fill),i.text(r),n},wrapLabel=memoize_1((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),common.lineBreakRegex.test(e)))return e;const n=e.split(" "),i=[];let o="";return n.forEach((l,u)=>{const h=calculateTextWidth(`${l} `,r),f=calculateTextWidth(o,r);if(h>t){const{hyphenatedStrings:p,remainingWord:m}=breakString(l,t,"-",r);i.push(o,...p),o=m}else f+h>=t?(i.push(o),o=l):o=[o,l].filter(Boolean).join(" ");u+1===n.length&&i.push(o)}),i.filter(l=>l!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),breakString=memoize_1((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=e.split(""),o=[];let l="";return i.forEach((u,h)=>{const f=`${l}${u}`;if(calculateTextWidth(f,n)>=t){const g=h+1,p=i.length===g,m=`${f}${r}`;o.push(p?f:m),l=""}else l=f}),{hyphenatedStrings:o,remainingWord:l}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`),calculateTextHeight=function(e,t){return t=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},t),calculateTextDimensions(e,t).height},calculateTextWidth=function(e,t){return t=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},t),calculateTextDimensions(e,t).width},calculateTextDimensions=memoize_1(function(e,t){t=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},t);const{fontSize:r,fontFamily:n,fontWeight:i}=t;if(!e)return{width:0,height:0};const o=["sans-serif",n],l=e.split(common.lineBreakRegex),u=[],h=select$1("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const f=h.append("svg");for(const g of o){let p=0;const m={width:0,height:0,lineHeight:0};for(const b of l){const $=getTextObj$3();$.text=b;const S=drawSimpleText(f,$).style("font-size",r).style("font-weight",i).style("font-family",g),R=(S._groups||S)[0][0].getBBox();m.width=Math.round(Math.max(m.width,R.width)),p=Math.round(R.height),m.height+=p,m.lineHeight=Math.round(Math.max(m.lineHeight,p))}u.push(m)}f.remove();const d=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),initIdGenerator=class{constructor(t,r){this.deterministic=t,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let decoder;const entityDecode=function(e){return decoder=decoder||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),decoder.innerHTML=e,unescape(decoder.textContent)},directiveSanitizer=e=>{if(log$1.debug("directiveSanitizer called with",e),typeof e=="object"&&(e.length?e.forEach(t=>directiveSanitizer(t)):Object.keys(e).forEach(t=>{log$1.debug("Checking key",t),t.indexOf("__")===0&&(log$1.debug("sanitize deleting __ option",t),delete e[t]),t.indexOf("proto")>=0&&(log$1.debug("sanitize deleting proto option",t),delete e[t]),t.indexOf("constr")>=0&&(log$1.debug("sanitize deleting constr option",t),delete e[t]),t.indexOf("themeCSS")>=0&&(log$1.debug("sanitizing themeCss option"),e[t]=sanitizeCss(e[t])),t.indexOf("fontFamily")>=0&&(log$1.debug("sanitizing fontFamily option"),e[t]=sanitizeCss(e[t])),t.indexOf("altFontFamily")>=0&&(log$1.debug("sanitizing altFontFamily option"),e[t]=sanitizeCss(e[t])),configKeys.indexOf(t)<0?(log$1.debug("sanitize deleting option",t),delete e[t]):typeof e[t]=="object"&&(log$1.debug("sanitize deleting object",t),directiveSanitizer(e[t]))})),e.themeVariables){const t=Object.keys(e.themeVariables);for(let r=0;r<t.length;r++){const n=t[r],i=e.themeVariables[n];i&&i.match&&!i.match(/^[a-zA-Z0-9#,";()%. ]+$/)&&(e.themeVariables[n]="")}}log$1.debug("After sanitization",e)},sanitizeCss=e=>{let t=0,r=0;for(let n=0;n<e.length;n++){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";e[n]==="{"?t++:e[n]==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e};function isDetailedError(e){return"str"in e}function getErrorMessage(e){return e instanceof Error?e.message:String(e)}const utils={assignWithDepth,wrapLabel,calculateTextHeight,calculateTextWidth,calculateTextDimensions,detectInit,detectDirective,isSubstringInArray,interpolateToCurve,calcLabelPosition,calcCardinalityPosition,calcTerminalLabelPosition,formatUrl,getStylesFromArray,generateId:generateId$1,random,runFunc,entityDecode,initIdGenerator,directiveSanitizer,sanitizeCss},name="mermaid",version$1="9.2.2",description$1="Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",main="./dist/mermaid.min.js",module="./dist/mermaid.core.mjs",types="./dist/mermaid.d.ts",type="commonjs",exports={".":{require:"./dist/mermaid.min.js",import:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts"},"./*":"./*"},keywords=["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],scripts={clean:"rimraf dist","build:code":"node .esbuild/esbuild.cjs","build:types":"tsc -p ./tsconfig.json --emitDeclarationOnly","build:watch":"yarn build:code --watch","build:esbuild":'concurrently "yarn build:code" "yarn build:types"',build:"yarn clean; yarn build:esbuild",dev:"node .esbuild/serve.cjs","docs:build":"ts-node-esm src/docs.mts","docs:verify":"yarn docs:build --verify","todo-postbuild":"documentation build src/mermaidAPI.ts src/config.ts src/defaultConfig.ts --shallow -f md --markdown-toc false > src/docs/Setup.md && prettier --write src/docs/Setup.md",release:"yarn build",lint:"eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .","lint:fix":"eslint --fix --ignore-path .gitignore . && prettier --write .","lint:jison":"ts-node-esm src/jison/lint.mts",cypress:"cypress run","cypress:open":"cypress open",e2e:"start-server-and-test dev http://localhost:9000/ cypress","todo-prepare":'concurrently "husky install" "yarn build"',"pre-commit":"lint-staged"},repository={type:"git",url:"https://github.com/mermaid-js/mermaid"},author="Knut Sveidqvist",license="MIT",standard={ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies={"@braintree/sanitize-url":"^6.0.0",d3:"^7.0.0",dagre:"^0.8.5","dagre-d3":"^0.6.4",dompurify:"2.4.0","fast-clone":"^1.5.13",graphlib:"^2.1.8",khroma:"^2.0.0",lodash:"^4.17.21","moment-mini":"^2.24.0","non-layered-tidy-tree-layout":"^2.0.2",stylis:"^4.1.2",uuid:"^9.0.0"},devDependencies={"@applitools/eyes-cypress":"^3.25.7","@commitlint/cli":"^17.1.2","@commitlint/config-conventional":"^17.0.0","@types/d3":"^7.4.0","@types/dompurify":"^2.3.4","@types/eslint":"^8.4.6","@types/express":"^4.17.13","@types/jsdom":"^20.0.0","@types/lodash":"^4.14.185","@types/prettier":"^2.7.0","@types/stylis":"^4.0.2","@types/uuid":"^8.3.4","@typescript-eslint/eslint-plugin":"^5.37.0","@typescript-eslint/parser":"^5.37.0",concurrently:"^7.4.0",coveralls:"^3.1.1",cypress:"^10.0.0","cypress-image-snapshot":"^4.0.1",documentation:"13.2.0",esbuild:"^0.15.8",eslint:"^8.23.1","eslint-config-prettier":"^8.5.0","eslint-plugin-cypress":"^2.12.1","eslint-plugin-html":"^7.1.0","eslint-plugin-jest":"^27.0.4","eslint-plugin-jsdoc":"^39.3.6","eslint-plugin-json":"^3.1.0","eslint-plugin-markdown":"^3.0.0",express:"^4.18.1",globby:"^13.1.2",husky:"^8.0.0","identity-obj-proxy":"^3.0.0",jison:"^0.4.18","js-base64":"3.7.2",jsdom:"^20.0.0","lint-staged":"^13.0.0",moment:"^2.23.0","path-browserify":"^1.0.1",prettier:"^2.7.1","prettier-plugin-jsdoc":"^0.4.2",remark:"^14.0.2",rimraf:"^3.0.2","start-server-and-test":"^1.12.6","ts-node":"^10.9.1",typescript:"^4.8.3","unist-util-flatmap":"^1.0.0"},resolutions={d3:"^7.0.0"},files=["dist","README.md"],sideEffects=["**/*.css","**/*.scss"],pkg={name,version:version$1,description:description$1,main,module,types,type,exports,keywords,scripts,repository,author,license,standard,dependencies,devDependencies,resolutions,files,sideEffects},defaultConfig=Object.freeze(config$1);let siteConfig=assignWithDepth({},defaultConfig),configFromInitialize,directives=[],currentConfig=assignWithDepth({},defaultConfig);const updateCurrentConfig=(e,t)=>{let r=assignWithDepth({},e),n={};for(let i=0;i<t.length;i++){const o=t[i];sanitize(o),n=assignWithDepth(n,o)}if(r=assignWithDepth(r,n),n.theme&&n.theme in theme){const i=assignWithDepth({},configFromInitialize),o=assignWithDepth(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in theme&&(r.themeVariables=theme[r.theme].getThemeVariables(o))}return currentConfig=r,checkConfig(currentConfig),currentConfig},setSiteConfig=e=>(siteConfig=assignWithDepth({},defaultConfig),siteConfig=assignWithDepth(siteConfig,e),e.theme&&theme[e.theme]&&(siteConfig.themeVariables=theme[e.theme].getThemeVariables(e.themeVariables)),updateCurrentConfig(siteConfig,directives),siteConfig),saveConfigFromInitialize=e=>{configFromInitialize=assignWithDepth({},e)},updateSiteConfig=e=>(siteConfig=assignWithDepth(siteConfig,e),updateCurrentConfig(siteConfig,directives),siteConfig),getSiteConfig=()=>assignWithDepth({},siteConfig),setConfig=e=>(checkConfig(e),assignWithDepth(currentConfig,e),getConfig$1()),getConfig$1=()=>assignWithDepth({},currentConfig),sanitize=e=>{var t;["secure",...(t=siteConfig.secure)!=null?t:[]].forEach(r=>{typeof e[r]<"u"&&(log$1.debug(`Denied attempt to modify a secure key ${r}`,e[r]),delete e[r])}),Object.keys(e).forEach(r=>{r.indexOf("__")===0&&delete e[r]}),Object.keys(e).forEach(r=>{typeof e[r]=="string"&&(e[r].indexOf("<")>-1||e[r].indexOf(">")>-1||e[r].indexOf("url(data:")>-1)&&delete e[r],typeof e[r]=="object"&&sanitize(e[r])})},addDirective=e=>{e.fontFamily&&(e.themeVariables?e.themeVariables.fontFamily||(e.themeVariables={fontFamily:e.fontFamily}):e.themeVariables={fontFamily:e.fontFamily}),directives.push(e),updateCurrentConfig(siteConfig,directives)},reset=(e=siteConfig)=>{directives=[],updateCurrentConfig(e,directives)};var ConfigWarning=(e=>(e.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",e))(ConfigWarning||{});const issuedWarnings={},issueWarning=e=>{issuedWarnings[e]||(log$1.warn(ConfigWarning[e]),issuedWarnings[e]=!0)},checkConfig=e=>{!e||(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&issueWarning("LAZY_LOAD_DEPRECATED")},d3Attrs=function(e,t){for(let r of t)e.attr(r[0],r[1])},calculateSvgSizeAttrs=function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):n.set("width",t),n},configureSvgSize=function(e,t,r,n){const i=calculateSvgSizeAttrs(t,r,n);d3Attrs(e,i)},setupGraphViewbox$1=function(e,t,r,n){const i=t.node().getBBox(),o=i.width,l=i.height;log$1.info(`SVG bounds: ${o}x${l}`,i);let u=0,h=0;log$1.info(`Graph bounds: ${u}x${h}`,e),u=o+r*2,h=l+r*2,log$1.info(`Calculated bounds: ${u}x${h}`),configureSvgSize(t,h,u,n);const f=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",f)},getStyles$d=e=>`g.classGroup text {
|
|
fill: ${e.nodeBorder};
|
|
fill: ${e.classText};
|
|
stroke: none;
|
|
font-family: ${e.fontFamily};
|
|
font-size: 10px;
|
|
|
|
.title {
|
|
font-weight: bolder;
|
|
}
|
|
|
|
}
|
|
|
|
.nodeLabel, .edgeLabel {
|
|
color: ${e.classText};
|
|
}
|
|
.edgeLabel .label rect {
|
|
fill: ${e.mainBkg};
|
|
}
|
|
.label text {
|
|
fill: ${e.classText};
|
|
}
|
|
.edgeLabel .label span {
|
|
background: ${e.mainBkg};
|
|
}
|
|
|
|
.classTitle {
|
|
font-weight: bolder;
|
|
}
|
|
.node rect,
|
|
.node circle,
|
|
.node ellipse,
|
|
.node polygon,
|
|
.node path {
|
|
fill: ${e.mainBkg};
|
|
stroke: ${e.nodeBorder};
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
|
|
.divider {
|
|
stroke: ${e.nodeBorder};
|
|
stroke: 1;
|
|
}
|
|
|
|
g.clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
g.classGroup rect {
|
|
fill: ${e.mainBkg};
|
|
stroke: ${e.nodeBorder};
|
|
}
|
|
|
|
g.classGroup line {
|
|
stroke: ${e.nodeBorder};
|
|
stroke-width: 1;
|
|
}
|
|
|
|
.classLabel .box {
|
|
stroke: none;
|
|
stroke-width: 0;
|
|
fill: ${e.mainBkg};
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.classLabel .label {
|
|
fill: ${e.nodeBorder};
|
|
font-size: 10px;
|
|
}
|
|
|
|
.relation {
|
|
stroke: ${e.lineColor};
|
|
stroke-width: 1;
|
|
fill: none;
|
|
}
|
|
|
|
.dashed-line{
|
|
stroke-dasharray: 3;
|
|
}
|
|
|
|
#compositionStart, .composition {
|
|
fill: ${e.lineColor} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#compositionEnd, .composition {
|
|
fill: ${e.lineColor} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#dependencyStart, .dependency {
|
|
fill: ${e.lineColor} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#dependencyStart, .dependency {
|
|
fill: ${e.lineColor} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#extensionStart, .extension {
|
|
fill: ${e.lineColor} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#extensionEnd, .extension {
|
|
fill: ${e.lineColor} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#aggregationStart, .aggregation {
|
|
fill: ${e.mainBkg} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#aggregationEnd, .aggregation {
|
|
fill: ${e.mainBkg} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#lollipopStart, .lollipop {
|
|
fill: ${e.mainBkg} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
#lollipopEnd, .lollipop {
|
|
fill: ${e.mainBkg} !important;
|
|
stroke: ${e.lineColor} !important;
|
|
stroke-width: 1;
|
|
}
|
|
|
|
.edgeTerminals {
|
|
font-size: 11px;
|
|
}
|
|
|
|
`,getStyles$c=e=>`
|
|
.entityBox {
|
|
fill: ${e.mainBkg};
|
|
stroke: ${e.nodeBorder};
|
|
}
|
|
|
|
.attributeBoxOdd {
|
|
fill: ${e.attributeBackgroundColorOdd};
|
|
stroke: ${e.nodeBorder};
|
|
}
|
|
|
|
.attributeBoxEven {
|
|
fill: ${e.attributeBackgroundColorEven};
|
|
stroke: ${e.nodeBorder};
|
|
}
|
|
|
|
.relationshipLabelBox {
|
|
fill: ${e.tertiaryColor};
|
|
opacity: 0.7;
|
|
background-color: ${e.tertiaryColor};
|
|
rect {
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
.relationshipLine {
|
|
stroke: ${e.lineColor};
|
|
}
|
|
`,getStyles$b=()=>"",getStyles$a=e=>`.label {
|
|
font-family: ${e.fontFamily};
|
|
color: ${e.nodeTextColor||e.textColor};
|
|
}
|
|
.cluster-label text {
|
|
fill: ${e.titleColor};
|
|
}
|
|
.cluster-label span {
|
|
color: ${e.titleColor};
|
|
}
|
|
|
|
.label text,span {
|
|
fill: ${e.nodeTextColor||e.textColor};
|
|
color: ${e.nodeTextColor||e.textColor};
|
|
}
|
|
|
|
.node rect,
|
|
.node circle,
|
|
.node ellipse,
|
|
.node polygon,
|
|
.node path {
|
|
fill: ${e.mainBkg};
|
|
stroke: ${e.nodeBorder};
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
.node .label {
|
|
text-align: center;
|
|
}
|
|
.node.clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.arrowheadPath {
|
|
fill: ${e.arrowheadColor};
|
|
}
|
|
|
|
.edgePath .path {
|
|
stroke: ${e.lineColor};
|
|
stroke-width: 2.0px;
|
|
}
|
|
|
|
.flowchart-link {
|
|
stroke: ${e.lineColor};
|
|
fill: none;
|
|
}
|
|
|
|
.edgeLabel {
|
|
background-color: ${e.edgeLabelBackground};
|
|
rect {
|
|
opacity: 0.5;
|
|
background-color: ${e.edgeLabelBackground};
|
|
fill: ${e.edgeLabelBackground};
|
|
}
|
|
text-align: center;
|
|
}
|
|
|
|
.cluster rect {
|
|
fill: ${e.clusterBkg};
|
|
stroke: ${e.clusterBorder};
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
.cluster text {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.cluster span {
|
|
color: ${e.titleColor};
|
|
}
|
|
/* .cluster div {
|
|
color: ${e.titleColor};
|
|
} */
|
|
|
|
div.mermaidTooltip {
|
|
position: absolute;
|
|
text-align: center;
|
|
max-width: 200px;
|
|
padding: 2px;
|
|
font-family: ${e.fontFamily};
|
|
font-size: 12px;
|
|
background: ${e.tertiaryColor};
|
|
border: 1px solid ${e.border2};
|
|
border-radius: 2px;
|
|
pointer-events: none;
|
|
z-index: 100;
|
|
}
|
|
`,getStyles$9=e=>`
|
|
.mermaid-main-font {
|
|
font-family: "trebuchet ms", verdana, arial, sans-serif;
|
|
font-family: var(--mermaid-font-family);
|
|
}
|
|
.exclude-range {
|
|
fill: ${e.excludeBkgColor};
|
|
}
|
|
|
|
.section {
|
|
stroke: none;
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.section0 {
|
|
fill: ${e.sectionBkgColor};
|
|
}
|
|
|
|
.section2 {
|
|
fill: ${e.sectionBkgColor2};
|
|
}
|
|
|
|
.section1,
|
|
.section3 {
|
|
fill: ${e.altSectionBkgColor};
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.sectionTitle0 {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.sectionTitle1 {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.sectionTitle2 {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.sectionTitle3 {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
.sectionTitle {
|
|
text-anchor: start;
|
|
// font-size: ${e.ganttFontSize};
|
|
// text-height: 14px;
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
font-family: var(--mermaid-font-family);
|
|
|
|
}
|
|
|
|
|
|
/* Grid and axis */
|
|
|
|
.grid .tick {
|
|
stroke: ${e.gridColor};
|
|
opacity: 0.8;
|
|
shape-rendering: crispEdges;
|
|
text {
|
|
font-family: ${e.fontFamily};
|
|
fill: ${e.textColor};
|
|
}
|
|
}
|
|
|
|
.grid path {
|
|
stroke-width: 0;
|
|
}
|
|
|
|
|
|
/* Today line */
|
|
|
|
.today {
|
|
fill: none;
|
|
stroke: ${e.todayLineColor};
|
|
stroke-width: 2px;
|
|
}
|
|
|
|
|
|
/* Task styling */
|
|
|
|
/* Default task */
|
|
|
|
.task {
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.taskText {
|
|
text-anchor: middle;
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
font-family: var(--mermaid-font-family);
|
|
}
|
|
|
|
// .taskText:not([font-size]) {
|
|
// font-size: ${e.ganttFontSize};
|
|
// }
|
|
|
|
.taskTextOutsideRight {
|
|
fill: ${e.taskTextDarkColor};
|
|
text-anchor: start;
|
|
// font-size: ${e.ganttFontSize};
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
font-family: var(--mermaid-font-family);
|
|
|
|
}
|
|
|
|
.taskTextOutsideLeft {
|
|
fill: ${e.taskTextDarkColor};
|
|
text-anchor: end;
|
|
// font-size: ${e.ganttFontSize};
|
|
}
|
|
|
|
/* Special case clickable */
|
|
.task.clickable {
|
|
cursor: pointer;
|
|
}
|
|
.taskText.clickable {
|
|
cursor: pointer;
|
|
fill: ${e.taskTextClickableColor} !important;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.taskTextOutsideLeft.clickable {
|
|
cursor: pointer;
|
|
fill: ${e.taskTextClickableColor} !important;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.taskTextOutsideRight.clickable {
|
|
cursor: pointer;
|
|
fill: ${e.taskTextClickableColor} !important;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Specific task settings for the sections*/
|
|
|
|
.taskText0,
|
|
.taskText1,
|
|
.taskText2,
|
|
.taskText3 {
|
|
fill: ${e.taskTextColor};
|
|
}
|
|
|
|
.task0,
|
|
.task1,
|
|
.task2,
|
|
.task3 {
|
|
fill: ${e.taskBkgColor};
|
|
stroke: ${e.taskBorderColor};
|
|
}
|
|
|
|
.taskTextOutside0,
|
|
.taskTextOutside2
|
|
{
|
|
fill: ${e.taskTextOutsideColor};
|
|
}
|
|
|
|
.taskTextOutside1,
|
|
.taskTextOutside3 {
|
|
fill: ${e.taskTextOutsideColor};
|
|
}
|
|
|
|
|
|
/* Active task */
|
|
|
|
.active0,
|
|
.active1,
|
|
.active2,
|
|
.active3 {
|
|
fill: ${e.activeTaskBkgColor};
|
|
stroke: ${e.activeTaskBorderColor};
|
|
}
|
|
|
|
.activeText0,
|
|
.activeText1,
|
|
.activeText2,
|
|
.activeText3 {
|
|
fill: ${e.taskTextDarkColor} !important;
|
|
}
|
|
|
|
|
|
/* Completed task */
|
|
|
|
.done0,
|
|
.done1,
|
|
.done2,
|
|
.done3 {
|
|
stroke: ${e.doneTaskBorderColor};
|
|
fill: ${e.doneTaskBkgColor};
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.doneText0,
|
|
.doneText1,
|
|
.doneText2,
|
|
.doneText3 {
|
|
fill: ${e.taskTextDarkColor} !important;
|
|
}
|
|
|
|
|
|
/* Tasks on the critical line */
|
|
|
|
.crit0,
|
|
.crit1,
|
|
.crit2,
|
|
.crit3 {
|
|
stroke: ${e.critBorderColor};
|
|
fill: ${e.critBkgColor};
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.activeCrit0,
|
|
.activeCrit1,
|
|
.activeCrit2,
|
|
.activeCrit3 {
|
|
stroke: ${e.critBorderColor};
|
|
fill: ${e.activeTaskBkgColor};
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.doneCrit0,
|
|
.doneCrit1,
|
|
.doneCrit2,
|
|
.doneCrit3 {
|
|
stroke: ${e.critBorderColor};
|
|
fill: ${e.doneTaskBkgColor};
|
|
stroke-width: 2;
|
|
cursor: pointer;
|
|
shape-rendering: crispEdges;
|
|
}
|
|
|
|
.milestone {
|
|
transform: rotate(45deg) scale(0.8,0.8);
|
|
}
|
|
|
|
.milestoneText {
|
|
font-style: italic;
|
|
}
|
|
.doneCritText0,
|
|
.doneCritText1,
|
|
.doneCritText2,
|
|
.doneCritText3 {
|
|
fill: ${e.taskTextDarkColor} !important;
|
|
}
|
|
|
|
.activeCritText0,
|
|
.activeCritText1,
|
|
.activeCritText2,
|
|
.activeCritText3 {
|
|
fill: ${e.taskTextDarkColor} !important;
|
|
}
|
|
|
|
.titleText {
|
|
text-anchor: middle;
|
|
font-size: 18px;
|
|
fill: ${e.textColor} ;
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
font-family: var(--mermaid-font-family);
|
|
}
|
|
`,getStyles$8=()=>"",getStyles$7=e=>`
|
|
.pieCircle{
|
|
stroke: ${e.pieStrokeColor};
|
|
stroke-width : ${e.pieStrokeWidth};
|
|
opacity : ${e.pieOpacity};
|
|
}
|
|
.pieTitleText {
|
|
text-anchor: middle;
|
|
font-size: ${e.pieTitleTextSize};
|
|
fill: ${e.pieTitleTextColor};
|
|
font-family: ${e.fontFamily};
|
|
}
|
|
.slice {
|
|
font-family: ${e.fontFamily};
|
|
fill: ${e.pieSectionTextColor};
|
|
font-size:${e.pieSectionTextSize};
|
|
// fill: white;
|
|
}
|
|
.legend text {
|
|
fill: ${e.pieLegendTextColor};
|
|
font-family: ${e.fontFamily};
|
|
font-size: ${e.pieLegendTextSize};
|
|
}
|
|
`,getStyles$6=e=>`
|
|
|
|
marker {
|
|
fill: ${e.relationColor};
|
|
stroke: ${e.relationColor};
|
|
}
|
|
|
|
marker.cross {
|
|
stroke: ${e.lineColor};
|
|
}
|
|
|
|
svg {
|
|
font-family: ${e.fontFamily};
|
|
font-size: ${e.fontSize};
|
|
}
|
|
|
|
.reqBox {
|
|
fill: ${e.requirementBackground};
|
|
fill-opacity: 100%;
|
|
stroke: ${e.requirementBorderColor};
|
|
stroke-width: ${e.requirementBorderSize};
|
|
}
|
|
|
|
.reqTitle, .reqLabel{
|
|
fill: ${e.requirementTextColor};
|
|
}
|
|
.reqLabelBox {
|
|
fill: ${e.relationLabelBackground};
|
|
fill-opacity: 100%;
|
|
}
|
|
|
|
.req-title-line {
|
|
stroke: ${e.requirementBorderColor};
|
|
stroke-width: ${e.requirementBorderSize};
|
|
}
|
|
.relationshipLine {
|
|
stroke: ${e.relationColor};
|
|
stroke-width: 1;
|
|
}
|
|
.relationshipLabel {
|
|
fill: ${e.relationLabelColor};
|
|
}
|
|
|
|
`,getStyles$5=e=>`.actor {
|
|
stroke: ${e.actorBorder};
|
|
fill: ${e.actorBkg};
|
|
}
|
|
|
|
text.actor > tspan {
|
|
fill: ${e.actorTextColor};
|
|
stroke: none;
|
|
}
|
|
|
|
.actor-line {
|
|
stroke: ${e.actorLineColor};
|
|
}
|
|
|
|
.messageLine0 {
|
|
stroke-width: 1.5;
|
|
stroke-dasharray: none;
|
|
stroke: ${e.signalColor};
|
|
}
|
|
|
|
.messageLine1 {
|
|
stroke-width: 1.5;
|
|
stroke-dasharray: 2, 2;
|
|
stroke: ${e.signalColor};
|
|
}
|
|
|
|
#arrowhead path {
|
|
fill: ${e.signalColor};
|
|
stroke: ${e.signalColor};
|
|
}
|
|
|
|
.sequenceNumber {
|
|
fill: ${e.sequenceNumberColor};
|
|
}
|
|
|
|
#sequencenumber {
|
|
fill: ${e.signalColor};
|
|
}
|
|
|
|
#crosshead path {
|
|
fill: ${e.signalColor};
|
|
stroke: ${e.signalColor};
|
|
}
|
|
|
|
.messageText {
|
|
fill: ${e.signalTextColor};
|
|
stroke: none;
|
|
}
|
|
|
|
.labelBox {
|
|
stroke: ${e.labelBoxBorderColor};
|
|
fill: ${e.labelBoxBkgColor};
|
|
}
|
|
|
|
.labelText, .labelText > tspan {
|
|
fill: ${e.labelTextColor};
|
|
stroke: none;
|
|
}
|
|
|
|
.loopText, .loopText > tspan {
|
|
fill: ${e.loopTextColor};
|
|
stroke: none;
|
|
}
|
|
|
|
.loopLine {
|
|
stroke-width: 2px;
|
|
stroke-dasharray: 2, 2;
|
|
stroke: ${e.labelBoxBorderColor};
|
|
fill: ${e.labelBoxBorderColor};
|
|
}
|
|
|
|
.note {
|
|
//stroke: #decc93;
|
|
stroke: ${e.noteBorderColor};
|
|
fill: ${e.noteBkgColor};
|
|
}
|
|
|
|
.noteText, .noteText > tspan {
|
|
fill: ${e.noteTextColor};
|
|
stroke: none;
|
|
}
|
|
|
|
.activation0 {
|
|
fill: ${e.activationBkgColor};
|
|
stroke: ${e.activationBorderColor};
|
|
}
|
|
|
|
.activation1 {
|
|
fill: ${e.activationBkgColor};
|
|
stroke: ${e.activationBorderColor};
|
|
}
|
|
|
|
.activation2 {
|
|
fill: ${e.activationBkgColor};
|
|
stroke: ${e.activationBorderColor};
|
|
}
|
|
|
|
.actorPopupMenu {
|
|
position: absolute;
|
|
}
|
|
|
|
.actorPopupMenuPanel {
|
|
position: absolute;
|
|
fill: ${e.actorBkg};
|
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
}
|
|
.actor-man line {
|
|
stroke: ${e.actorBorder};
|
|
fill: ${e.actorBkg};
|
|
}
|
|
.actor-man circle, line {
|
|
stroke: ${e.actorBorder};
|
|
fill: ${e.actorBkg};
|
|
stroke-width: 2px;
|
|
}
|
|
`,getStyles$4=e=>`
|
|
defs #statediagram-barbEnd {
|
|
fill: ${e.transitionColor};
|
|
stroke: ${e.transitionColor};
|
|
}
|
|
g.stateGroup text {
|
|
fill: ${e.nodeBorder};
|
|
stroke: none;
|
|
font-size: 10px;
|
|
}
|
|
g.stateGroup text {
|
|
fill: ${e.textColor};
|
|
stroke: none;
|
|
font-size: 10px;
|
|
|
|
}
|
|
g.stateGroup .state-title {
|
|
font-weight: bolder;
|
|
fill: ${e.stateLabelColor};
|
|
}
|
|
|
|
g.stateGroup rect {
|
|
fill: ${e.mainBkg};
|
|
stroke: ${e.nodeBorder};
|
|
}
|
|
|
|
g.stateGroup line {
|
|
stroke: ${e.lineColor};
|
|
stroke-width: 1;
|
|
}
|
|
|
|
.transition {
|
|
stroke: ${e.transitionColor};
|
|
stroke-width: 1;
|
|
fill: none;
|
|
}
|
|
|
|
.stateGroup .composit {
|
|
fill: ${e.background};
|
|
border-bottom: 1px
|
|
}
|
|
|
|
.stateGroup .alt-composit {
|
|
fill: #e0e0e0;
|
|
border-bottom: 1px
|
|
}
|
|
|
|
.state-note {
|
|
stroke: ${e.noteBorderColor};
|
|
fill: ${e.noteBkgColor};
|
|
|
|
text {
|
|
fill: ${e.noteTextColor};
|
|
stroke: none;
|
|
font-size: 10px;
|
|
}
|
|
}
|
|
|
|
.stateLabel .box {
|
|
stroke: none;
|
|
stroke-width: 0;
|
|
fill: ${e.mainBkg};
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.edgeLabel .label rect {
|
|
fill: ${e.labelBackgroundColor};
|
|
opacity: 0.5;
|
|
}
|
|
.edgeLabel .label text {
|
|
fill: ${e.transitionLabelColor||e.tertiaryTextColor};
|
|
}
|
|
.label div .edgeLabel {
|
|
color: ${e.transitionLabelColor||e.tertiaryTextColor};
|
|
}
|
|
|
|
.stateLabel text {
|
|
fill: ${e.stateLabelColor};
|
|
font-size: 10px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.node circle.state-start {
|
|
fill: ${e.specialStateColor};
|
|
stroke: ${e.specialStateColor};
|
|
}
|
|
|
|
.node .fork-join {
|
|
fill: ${e.specialStateColor};
|
|
stroke: ${e.specialStateColor};
|
|
}
|
|
|
|
.node circle.state-end {
|
|
fill: ${e.innerEndBackground};
|
|
stroke: ${e.background};
|
|
stroke-width: 1.5
|
|
}
|
|
.end-state-inner {
|
|
fill: ${e.compositeBackground||e.background};
|
|
// stroke: ${e.background};
|
|
stroke-width: 1.5
|
|
}
|
|
|
|
.node rect {
|
|
fill: ${e.stateBkg||e.mainBkg};
|
|
stroke: ${e.stateBorder||e.nodeBorder};
|
|
stroke-width: 1px;
|
|
}
|
|
.node polygon {
|
|
fill: ${e.mainBkg};
|
|
stroke: ${e.stateBorder||e.nodeBorder};;
|
|
stroke-width: 1px;
|
|
}
|
|
#statediagram-barbEnd {
|
|
fill: ${e.lineColor};
|
|
}
|
|
|
|
.statediagram-cluster rect {
|
|
fill: ${e.compositeTitleBackground};
|
|
stroke: ${e.stateBorder||e.nodeBorder};
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
.cluster-label, .nodeLabel {
|
|
color: ${e.stateLabelColor};
|
|
}
|
|
|
|
.statediagram-cluster rect.outer {
|
|
rx: 5px;
|
|
ry: 5px;
|
|
}
|
|
.statediagram-state .divider {
|
|
stroke: ${e.stateBorder||e.nodeBorder};
|
|
}
|
|
|
|
.statediagram-state .title-state {
|
|
rx: 5px;
|
|
ry: 5px;
|
|
}
|
|
.statediagram-cluster.statediagram-cluster .inner {
|
|
fill: ${e.compositeBackground||e.background};
|
|
}
|
|
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
fill: ${e.altBackground?e.altBackground:"#efefef"};
|
|
}
|
|
|
|
.statediagram-cluster .inner {
|
|
rx:0;
|
|
ry:0;
|
|
}
|
|
|
|
.statediagram-state rect.basic {
|
|
rx: 5px;
|
|
ry: 5px;
|
|
}
|
|
.statediagram-state rect.divider {
|
|
stroke-dasharray: 10,10;
|
|
fill: ${e.altBackground?e.altBackground:"#efefef"};
|
|
}
|
|
|
|
.note-edge {
|
|
stroke-dasharray: 5;
|
|
}
|
|
|
|
.statediagram-note rect {
|
|
fill: ${e.noteBkgColor};
|
|
stroke: ${e.noteBorderColor};
|
|
stroke-width: 1px;
|
|
rx: 0;
|
|
ry: 0;
|
|
}
|
|
.statediagram-note rect {
|
|
fill: ${e.noteBkgColor};
|
|
stroke: ${e.noteBorderColor};
|
|
stroke-width: 1px;
|
|
rx: 0;
|
|
ry: 0;
|
|
}
|
|
|
|
.statediagram-note text {
|
|
fill: ${e.noteTextColor};
|
|
}
|
|
|
|
.statediagram-note .nodeLabel {
|
|
color: ${e.noteTextColor};
|
|
}
|
|
.statediagram .edgeLabel {
|
|
color: red; // ${e.noteTextColor};
|
|
}
|
|
|
|
#dependencyStart, #dependencyEnd {
|
|
fill: ${e.lineColor};
|
|
stroke: ${e.lineColor};
|
|
stroke-width: 1;
|
|
}
|
|
`,getStyles$3=e=>`.label {
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
font-family: var(--mermaid-font-family);
|
|
color: ${e.textColor};
|
|
}
|
|
.mouth {
|
|
stroke: #666;
|
|
}
|
|
|
|
line {
|
|
stroke: ${e.textColor}
|
|
}
|
|
|
|
.legend {
|
|
fill: ${e.textColor};
|
|
}
|
|
|
|
.label text {
|
|
fill: #333;
|
|
}
|
|
.label {
|
|
color: ${e.textColor}
|
|
}
|
|
|
|
.face {
|
|
${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};
|
|
stroke: #999;
|
|
}
|
|
|
|
.node rect,
|
|
.node circle,
|
|
.node ellipse,
|
|
.node polygon,
|
|
.node path {
|
|
fill: ${e.mainBkg};
|
|
stroke: ${e.nodeBorder};
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
.node .label {
|
|
text-align: center;
|
|
}
|
|
.node.clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.arrowheadPath {
|
|
fill: ${e.arrowheadColor};
|
|
}
|
|
|
|
.edgePath .path {
|
|
stroke: ${e.lineColor};
|
|
stroke-width: 1.5px;
|
|
}
|
|
|
|
.flowchart-link {
|
|
stroke: ${e.lineColor};
|
|
fill: none;
|
|
}
|
|
|
|
.edgeLabel {
|
|
background-color: ${e.edgeLabelBackground};
|
|
rect {
|
|
opacity: 0.5;
|
|
}
|
|
text-align: center;
|
|
}
|
|
|
|
.cluster rect {
|
|
}
|
|
|
|
.cluster text {
|
|
fill: ${e.titleColor};
|
|
}
|
|
|
|
div.mermaidTooltip {
|
|
position: absolute;
|
|
text-align: center;
|
|
max-width: 200px;
|
|
padding: 2px;
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
font-family: var(--mermaid-font-family);
|
|
font-size: 12px;
|
|
background: ${e.tertiaryColor};
|
|
border: 1px solid ${e.border2};
|
|
border-radius: 2px;
|
|
pointer-events: none;
|
|
z-index: 100;
|
|
}
|
|
|
|
.task-type-0, .section-type-0 {
|
|
${e.fillType0?`fill: ${e.fillType0}`:""};
|
|
}
|
|
.task-type-1, .section-type-1 {
|
|
${e.fillType0?`fill: ${e.fillType1}`:""};
|
|
}
|
|
.task-type-2, .section-type-2 {
|
|
${e.fillType0?`fill: ${e.fillType2}`:""};
|
|
}
|
|
.task-type-3, .section-type-3 {
|
|
${e.fillType0?`fill: ${e.fillType3}`:""};
|
|
}
|
|
.task-type-4, .section-type-4 {
|
|
${e.fillType0?`fill: ${e.fillType4}`:""};
|
|
}
|
|
.task-type-5, .section-type-5 {
|
|
${e.fillType0?`fill: ${e.fillType5}`:""};
|
|
}
|
|
.task-type-6, .section-type-6 {
|
|
${e.fillType0?`fill: ${e.fillType6}`:""};
|
|
}
|
|
.task-type-7, .section-type-7 {
|
|
${e.fillType0?`fill: ${e.fillType7}`:""};
|
|
}
|
|
|
|
.actor-0 {
|
|
${e.actor0?`fill: ${e.actor0}`:""};
|
|
}
|
|
.actor-1 {
|
|
${e.actor1?`fill: ${e.actor1}`:""};
|
|
}
|
|
.actor-2 {
|
|
${e.actor2?`fill: ${e.actor2}`:""};
|
|
}
|
|
.actor-3 {
|
|
${e.actor3?`fill: ${e.actor3}`:""};
|
|
}
|
|
.actor-4 {
|
|
${e.actor4?`fill: ${e.actor4}`:""};
|
|
}
|
|
.actor-5 {
|
|
${e.actor5?`fill: ${e.actor5}`:""};
|
|
}
|
|
`,getStyles$2=e=>`.person {
|
|
stroke: ${e.personBorder};
|
|
fill: ${e.personBkg};
|
|
}
|
|
`,themes={flowchart:getStyles$a,"flowchart-v2":getStyles$a,sequence:getStyles$5,gantt:getStyles$9,classDiagram:getStyles$d,"classDiagram-v2":getStyles$d,class:getStyles$d,stateDiagram:getStyles$4,state:getStyles$4,info:getStyles$8,pie:getStyles$7,er:getStyles$c,error:getStyles$b,journey:getStyles$3,requirement:getStyles$6,c4:getStyles$2},getStyles$1=(e,t,r)=>{let n="";return e in themes&&themes[e]?n=themes[e](r):log$1.warn(`No theme found for ${e}`),` {
|
|
font-family: ${r.fontFamily};
|
|
font-size: ${r.fontSize};
|
|
fill: ${r.textColor}
|
|
}
|
|
|
|
/* Classes common for multiple diagrams */
|
|
|
|
.error-icon {
|
|
fill: ${r.errorBkgColor};
|
|
}
|
|
.error-text {
|
|
fill: ${r.errorTextColor};
|
|
stroke: ${r.errorTextColor};
|
|
}
|
|
|
|
.edge-thickness-normal {
|
|
stroke-width: 2px;
|
|
}
|
|
.edge-thickness-thick {
|
|
stroke-width: 3.5px
|
|
}
|
|
.edge-pattern-solid {
|
|
stroke-dasharray: 0;
|
|
}
|
|
|
|
.edge-pattern-dashed{
|
|
stroke-dasharray: 3;
|
|
}
|
|
.edge-pattern-dotted {
|
|
stroke-dasharray: 2;
|
|
}
|
|
|
|
.marker {
|
|
fill: ${r.lineColor};
|
|
stroke: ${r.lineColor};
|
|
}
|
|
.marker.cross {
|
|
stroke: ${r.lineColor};
|
|
}
|
|
|
|
svg {
|
|
font-family: ${r.fontFamily};
|
|
font-size: ${r.fontSize};
|
|
}
|
|
|
|
${n}
|
|
|
|
${t}
|
|
`},addStylesForDiagram=(e,t)=>{themes[e]=t},log=log$1,setLogLevel=setLogLevel$1,getConfig=getConfig$1,sanitizeText$4=e=>sanitizeText$5(e,getConfig()),setupGraphViewbox=setupGraphViewbox$1,diagrams={},registerDiagram=(e,t,r)=>{log.debug(`Registering diagram ${e}`),diagrams[e]&&log.warn(`Diagram ${e} already registered.`),diagrams[e]=t,r&&addDetector(e,r),addStylesForDiagram(e,t.styles),t.injectUtils&&t.injectUtils(log,setLogLevel,getConfig,sanitizeText$4,setupGraphViewbox),log.debug(`Registered diagram ${e}. ${Object.keys(diagrams).join(", ")} diagrams registered.`)},getDiagram=e=>{if(log.debug(`Getting diagram ${e}. ${Object.keys(diagrams).join(", ")} diagrams registered.`),e in diagrams)return diagrams[e];throw new DiagramNotFoundError(e)};class DiagramNotFoundError extends Error{constructor(t){super(`Diagram ${t} not found.`)}}var parser$b=function(){var e=function(H,G,P,V){for(P=P||{},V=H.length;V--;P[H[V]]=G);return P},t=[1,4],r=[1,7],n=[1,5],i=[1,9],o=[1,6],l=[2,6],u=[1,16],h=[6,8,14,20,22,24,25,27,29,32,37,40,50,54],f=[8,14,20,22,24,25,27,29,32,37,40],d=[8,13,14,20,22,24,25,27,29,32,37,40],g=[1,26],p=[6,8,14,50,54],m=[8,14,54],b=[1,65],$=[1,66],S=[1,67],R=[8,14,33,35,42,54],L={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ID:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,";":54,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",28:"ID",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[4,1],[4,1],[4,1]],performAction:function(G,P,V,z,W,T,U){var I=T.length-1;switch(W){case 3:return T[I];case 4:return T[I-1];case 5:return z.setDirection(T[I-3]),T[I-1];case 7:z.setOptions(T[I-1]),this.$=T[I];break;case 8:T[I-1]+=T[I],this.$=T[I-1];break;case 10:this.$=[];break;case 11:T[I-1].push(T[I]),this.$=T[I-1];break;case 12:this.$=T[I-1];break;case 17:this.$=T[I].trim(),z.setAccTitle(this.$);break;case 18:case 19:this.$=T[I].trim(),z.setAccDescription(this.$);break;case 20:z.addSection(T[I].substr(8)),this.$=T[I].substr(8);break;case 22:z.checkout(T[I]);break;case 23:z.branch(T[I]);break;case 24:z.branch(T[I-2],T[I]);break;case 25:z.cherryPick(T[I],"",void 0);break;case 26:z.cherryPick(T[I-2],"",T[I]);break;case 27:case 29:z.cherryPick(T[I-2],"","");break;case 28:z.cherryPick(T[I],"",T[I-2]);break;case 30:z.merge(T[I],"","","");break;case 31:z.merge(T[I-2],T[I],"","");break;case 32:z.merge(T[I-2],"",T[I],"");break;case 33:z.merge(T[I-2],"","",T[I]);break;case 34:z.merge(T[I-4],T[I],"",T[I-2]);break;case 35:z.merge(T[I-4],"",T[I],T[I-2]);break;case 36:z.merge(T[I-4],"",T[I-2],T[I]);break;case 37:z.merge(T[I-4],T[I-2],T[I],"");break;case 38:z.merge(T[I-4],T[I-2],"",T[I]);break;case 39:z.merge(T[I-4],T[I],T[I-2],"");break;case 40:z.merge(T[I-6],T[I-4],T[I-2],T[I]);break;case 41:z.merge(T[I-6],T[I],T[I-4],T[I-2]);break;case 42:z.merge(T[I-6],T[I-4],T[I],T[I-2]);break;case 43:z.merge(T[I-6],T[I-2],T[I-4],T[I]);break;case 44:z.merge(T[I-6],T[I],T[I-2],T[I-4]);break;case 45:z.merge(T[I-6],T[I-2],T[I],T[I-4]);break;case 46:z.commit(T[I]);break;case 47:z.commit("","",z.commitType.NORMAL,T[I]);break;case 48:z.commit("","",T[I],"");break;case 49:z.commit("","",T[I],T[I-2]);break;case 50:z.commit("","",T[I-2],T[I]);break;case 51:z.commit("",T[I],z.commitType.NORMAL,"");break;case 52:z.commit("",T[I-2],z.commitType.NORMAL,T[I]);break;case 53:z.commit("",T[I],z.commitType.NORMAL,T[I-2]);break;case 54:z.commit("",T[I-2],T[I],"");break;case 55:z.commit("",T[I],T[I-2],"");break;case 56:z.commit("",T[I-4],T[I-2],T[I]);break;case 57:z.commit("",T[I-4],T[I],T[I-2]);break;case 58:z.commit("",T[I-2],T[I-4],T[I]);break;case 59:z.commit("",T[I],T[I-4],T[I-2]);break;case 60:z.commit("",T[I],T[I-2],T[I-4]);break;case 61:z.commit("",T[I-2],T[I],T[I-4]);break;case 62:z.commit(T[I],"",z.commitType.NORMAL,"");break;case 63:z.commit(T[I],"",z.commitType.NORMAL,T[I-2]);break;case 64:z.commit(T[I-2],"",z.commitType.NORMAL,T[I]);break;case 65:z.commit(T[I-2],"",T[I],"");break;case 66:z.commit(T[I],"",T[I-2],"");break;case 67:z.commit(T[I],T[I-2],z.commitType.NORMAL,"");break;case 68:z.commit(T[I-2],T[I],z.commitType.NORMAL,"");break;case 69:z.commit(T[I-4],"",T[I-2],T[I]);break;case 70:z.commit(T[I-4],"",T[I],T[I-2]);break;case 71:z.commit(T[I-2],"",T[I-4],T[I]);break;case 72:z.commit(T[I],"",T[I-4],T[I-2]);break;case 73:z.commit(T[I],"",T[I-2],T[I-4]);break;case 74:z.commit(T[I-2],"",T[I],T[I-4]);break;case 75:z.commit(T[I-4],T[I],T[I-2],"");break;case 76:z.commit(T[I-4],T[I-2],T[I],"");break;case 77:z.commit(T[I-2],T[I],T[I-4],"");break;case 78:z.commit(T[I],T[I-2],T[I-4],"");break;case 79:z.commit(T[I],T[I-4],T[I-2],"");break;case 80:z.commit(T[I-2],T[I-4],T[I],"");break;case 81:z.commit(T[I-4],T[I],z.commitType.NORMAL,T[I-2]);break;case 82:z.commit(T[I-4],T[I-2],z.commitType.NORMAL,T[I]);break;case 83:z.commit(T[I-2],T[I],z.commitType.NORMAL,T[I-4]);break;case 84:z.commit(T[I],T[I-2],z.commitType.NORMAL,T[I-4]);break;case 85:z.commit(T[I],T[I-4],z.commitType.NORMAL,T[I-2]);break;case 86:z.commit(T[I-2],T[I-4],z.commitType.NORMAL,T[I]);break;case 87:z.commit(T[I-6],T[I-4],T[I-2],T[I]);break;case 88:z.commit(T[I-6],T[I-4],T[I],T[I-2]);break;case 89:z.commit(T[I-6],T[I-2],T[I-4],T[I]);break;case 90:z.commit(T[I-6],T[I],T[I-4],T[I-2]);break;case 91:z.commit(T[I-6],T[I-2],T[I],T[I-4]);break;case 92:z.commit(T[I-6],T[I],T[I-2],T[I-4]);break;case 93:z.commit(T[I-4],T[I-6],T[I-2],T[I]);break;case 94:z.commit(T[I-4],T[I-6],T[I],T[I-2]);break;case 95:z.commit(T[I-2],T[I-6],T[I-4],T[I]);break;case 96:z.commit(T[I],T[I-6],T[I-4],T[I-2]);break;case 97:z.commit(T[I-2],T[I-6],T[I],T[I-4]);break;case 98:z.commit(T[I],T[I-6],T[I-2],T[I-4]);break;case 99:z.commit(T[I],T[I-4],T[I-2],T[I-6]);break;case 100:z.commit(T[I-2],T[I-4],T[I],T[I-6]);break;case 101:z.commit(T[I],T[I-2],T[I-4],T[I-6]);break;case 102:z.commit(T[I-2],T[I],T[I-4],T[I-6]);break;case 103:z.commit(T[I-4],T[I-2],T[I],T[I-6]);break;case 104:z.commit(T[I-4],T[I],T[I-2],T[I-6]);break;case 105:z.commit(T[I-2],T[I-4],T[I-6],T[I]);break;case 106:z.commit(T[I],T[I-4],T[I-6],T[I-2]);break;case 107:z.commit(T[I-2],T[I],T[I-6],T[I-4]);break;case 108:z.commit(T[I],T[I-2],T[I-6],T[I-4]);break;case 109:z.commit(T[I-4],T[I-2],T[I-6],T[I]);break;case 110:z.commit(T[I-4],T[I],T[I-6],T[I-2]);break;case 111:this.$="";break;case 112:this.$=T[I];break;case 113:this.$=z.commitType.NORMAL;break;case 114:this.$=z.commitType.REVERSE;break;case 115:this.$=z.commitType.HIGHLIGHT;break;case 118:z.parseDirective("%%{","open_directive");break;case 119:z.parseDirective(T[I],"type_directive");break;case 120:T[I]=T[I].trim().replace(/'/g,'"'),z.parseDirective(T[I],"arg_directive");break;case 121:z.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:t,8:r,14:n,46:8,50:i,54:o},{1:[3]},{3:10,4:2,5:3,6:t,8:r,14:n,46:8,50:i,54:o},{3:11,4:2,5:3,6:t,8:r,14:n,46:8,50:i,54:o},{7:12,8:l,9:[1,13],10:[1,14],11:15,14:u},e(h,[2,122]),e(h,[2,123]),e(h,[2,124]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:l,11:15,14:u},{9:[1,21]},e(f,[2,10],{12:22,13:[1,23]}),e(d,[2,9]),{9:[1,25],48:24,53:g},e([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:l,11:15,14:u},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},e(d,[2,8]),e(p,[2,116]),{49:45,52:[1,46]},e(p,[2,121]),{1:[2,4]},{8:[1,47]},e(f,[2,11]),{4:48,8:r,14:n,54:o},e(f,[2,13]),e(m,[2,14]),e(m,[2,15]),e(m,[2,16]),{21:[1,49]},{23:[1,50]},e(m,[2,19]),e(m,[2,20]),e(m,[2,21]),{28:[1,51]},e(m,[2,111],{41:52,33:[1,55],34:[1,57],35:[1,53],38:[1,54],42:[1,56]}),{28:[1,58]},{33:[1,59],35:[1,60]},{28:[1,61]},{48:62,53:g},{53:[2,120]},{1:[2,5]},e(f,[2,12]),e(m,[2,17]),e(m,[2,18]),e(m,[2,22]),e(m,[2,46]),{34:[1,63]},{39:64,43:b,44:$,45:S},{34:[1,68]},{34:[1,69]},e(m,[2,112]),e(m,[2,30],{33:[1,70],35:[1,72],38:[1,71]}),{34:[1,73]},{34:[1,74],36:[1,75]},e(m,[2,23],{30:[1,76]}),e(p,[2,117]),e(m,[2,47],{33:[1,78],38:[1,77],42:[1,79]}),e(m,[2,48],{33:[1,81],35:[1,80],42:[1,82]}),e(R,[2,113]),e(R,[2,114]),e(R,[2,115]),e(m,[2,51],{35:[1,83],38:[1,84],42:[1,85]}),e(m,[2,62],{33:[1,88],35:[1,86],38:[1,87]}),{34:[1,89]},{39:90,43:b,44:$,45:S},{34:[1,91]},e(m,[2,25],{35:[1,92]}),{33:[1,93]},{33:[1,94]},{31:[1,95]},{39:96,43:b,44:$,45:S},{34:[1,97]},{34:[1,98]},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{39:103,43:b,44:$,45:S},{34:[1,104]},{34:[1,105]},{39:106,43:b,44:$,45:S},{34:[1,107]},e(m,[2,31],{35:[1,109],38:[1,108]}),e(m,[2,32],{33:[1,111],35:[1,110]}),e(m,[2,33],{33:[1,112],38:[1,113]}),{34:[1,114],36:[1,115]},{34:[1,116]},{34:[1,117]},e(m,[2,24]),e(m,[2,49],{33:[1,118],42:[1,119]}),e(m,[2,53],{38:[1,120],42:[1,121]}),e(m,[2,63],{33:[1,123],38:[1,122]}),e(m,[2,50],{33:[1,124],42:[1,125]}),e(m,[2,55],{35:[1,126],42:[1,127]}),e(m,[2,66],{33:[1,129],35:[1,128]}),e(m,[2,52],{38:[1,130],42:[1,131]}),e(m,[2,54],{35:[1,132],42:[1,133]}),e(m,[2,67],{35:[1,135],38:[1,134]}),e(m,[2,64],{33:[1,137],38:[1,136]}),e(m,[2,65],{33:[1,139],35:[1,138]}),e(m,[2,68],{35:[1,141],38:[1,140]}),{39:142,43:b,44:$,45:S},{34:[1,143]},{34:[1,144]},{34:[1,145]},{34:[1,146]},{39:147,43:b,44:$,45:S},e(m,[2,26]),e(m,[2,27]),e(m,[2,28]),e(m,[2,29]),{34:[1,148]},{34:[1,149]},{39:150,43:b,44:$,45:S},{34:[1,151]},{39:152,43:b,44:$,45:S},{34:[1,153]},{34:[1,154]},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{39:160,43:b,44:$,45:S},{34:[1,161]},{34:[1,162]},{34:[1,163]},{39:164,43:b,44:$,45:S},{34:[1,165]},{39:166,43:b,44:$,45:S},{34:[1,167]},{34:[1,168]},{34:[1,169]},{39:170,43:b,44:$,45:S},{34:[1,171]},e(m,[2,37],{35:[1,172]}),e(m,[2,38],{38:[1,173]}),e(m,[2,36],{33:[1,174]}),e(m,[2,39],{35:[1,175]}),e(m,[2,34],{38:[1,176]}),e(m,[2,35],{33:[1,177]}),e(m,[2,60],{42:[1,178]}),e(m,[2,73],{33:[1,179]}),e(m,[2,61],{42:[1,180]}),e(m,[2,84],{38:[1,181]}),e(m,[2,74],{33:[1,182]}),e(m,[2,83],{38:[1,183]}),e(m,[2,59],{42:[1,184]}),e(m,[2,72],{33:[1,185]}),e(m,[2,58],{42:[1,186]}),e(m,[2,78],{35:[1,187]}),e(m,[2,71],{33:[1,188]}),e(m,[2,77],{35:[1,189]}),e(m,[2,57],{42:[1,190]}),e(m,[2,85],{38:[1,191]}),e(m,[2,56],{42:[1,192]}),e(m,[2,79],{35:[1,193]}),e(m,[2,80],{35:[1,194]}),e(m,[2,86],{38:[1,195]}),e(m,[2,70],{33:[1,196]}),e(m,[2,81],{38:[1,197]}),e(m,[2,69],{33:[1,198]}),e(m,[2,75],{35:[1,199]}),e(m,[2,76],{35:[1,200]}),e(m,[2,82],{38:[1,201]}),{34:[1,202]},{39:203,43:b,44:$,45:S},{34:[1,204]},{34:[1,205]},{39:206,43:b,44:$,45:S},{34:[1,207]},{34:[1,208]},{34:[1,209]},{34:[1,210]},{39:211,43:b,44:$,45:S},{34:[1,212]},{39:213,43:b,44:$,45:S},{34:[1,214]},{34:[1,215]},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{39:221,43:b,44:$,45:S},{34:[1,222]},{34:[1,223]},{34:[1,224]},{39:225,43:b,44:$,45:S},{34:[1,226]},{39:227,43:b,44:$,45:S},{34:[1,228]},{34:[1,229]},{34:[1,230]},{39:231,43:b,44:$,45:S},e(m,[2,40]),e(m,[2,42]),e(m,[2,41]),e(m,[2,43]),e(m,[2,45]),e(m,[2,44]),e(m,[2,101]),e(m,[2,102]),e(m,[2,99]),e(m,[2,100]),e(m,[2,104]),e(m,[2,103]),e(m,[2,108]),e(m,[2,107]),e(m,[2,106]),e(m,[2,105]),e(m,[2,110]),e(m,[2,109]),e(m,[2,98]),e(m,[2,97]),e(m,[2,96]),e(m,[2,95]),e(m,[2,93]),e(m,[2,94]),e(m,[2,92]),e(m,[2,91]),e(m,[2,90]),e(m,[2,89]),e(m,[2,87]),e(m,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(G,P){if(P.recoverable)this.trace(G);else{var V=new Error(G);throw V.hash=P,V}},parse:function(G){var P=this,V=[0],z=[],W=[null],T=[],U=this.table,I="",ae=0,Q=0,ue=2,_e=1,ke=T.slice.call(arguments,1),de=Object.create(this.lexer),ce={yy:{}};for(var he in this.yy)Object.prototype.hasOwnProperty.call(this.yy,he)&&(ce.yy[he]=this.yy[he]);de.setInput(G,ce.yy),ce.yy.lexer=de,ce.yy.parser=this,typeof de.yylloc>"u"&&(de.yylloc={});var Se=de.yylloc;T.push(Se);var ve=de.options&&de.options.ranges;typeof ce.yy.parseError=="function"?this.parseError=ce.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function me(){var te;return te=z.pop()||de.lex()||_e,typeof te!="number"&&(te instanceof Array&&(z=te,te=z.pop()),te=P.symbols_[te]||te),te}for(var Ce,xe,Ne,pe,J={},oe,ee,Z,ie;;){if(xe=V[V.length-1],this.defaultActions[xe]?Ne=this.defaultActions[xe]:((Ce===null||typeof Ce>"u")&&(Ce=me()),Ne=U[xe]&&U[xe][Ce]),typeof Ne>"u"||!Ne.length||!Ne[0]){var se="";ie=[];for(oe in U[xe])this.terminals_[oe]&&oe>ue&&ie.push("'"+this.terminals_[oe]+"'");de.showPosition?se="Parse error on line "+(ae+1)+`:
|
|
`+de.showPosition()+`
|
|
Expecting `+ie.join(", ")+", got '"+(this.terminals_[Ce]||Ce)+"'":se="Parse error on line "+(ae+1)+": Unexpected "+(Ce==_e?"end of input":"'"+(this.terminals_[Ce]||Ce)+"'"),this.parseError(se,{text:de.match,token:this.terminals_[Ce]||Ce,line:de.yylineno,loc:Se,expected:ie})}if(Ne[0]instanceof Array&&Ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xe+", token: "+Ce);switch(Ne[0]){case 1:V.push(Ce),W.push(de.yytext),T.push(de.yylloc),V.push(Ne[1]),Ce=null,Q=de.yyleng,I=de.yytext,ae=de.yylineno,Se=de.yylloc;break;case 2:if(ee=this.productions_[Ne[1]][1],J.$=W[W.length-ee],J._$={first_line:T[T.length-(ee||1)].first_line,last_line:T[T.length-1].last_line,first_column:T[T.length-(ee||1)].first_column,last_column:T[T.length-1].last_column},ve&&(J._$.range=[T[T.length-(ee||1)].range[0],T[T.length-1].range[1]]),pe=this.performAction.apply(J,[I,Q,ae,ce.yy,Ne[1],W,T].concat(ke)),typeof pe<"u")return pe;ee&&(V=V.slice(0,-1*ee*2),W=W.slice(0,-1*ee),T=T.slice(0,-1*ee)),V.push(this.productions_[Ne[1]][0]),W.push(J.$),T.push(J._$),Z=U[V[V.length-2]][V[V.length-1]],V.push(Z);break;case 3:return!0}}return!0}},N=function(){var H={EOF:1,parseError:function(P,V){if(this.yy.parser)this.yy.parser.parseError(P,V);else throw new Error(P)},setInput:function(G,P){return this.yy=P||this.yy||{},this._input=G,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 G=this._input[0];this.yytext+=G,this.yyleng++,this.offset++,this.match+=G,this.matched+=G;var P=G.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),G},unput:function(G){var P=G.length,V=G.split(/(?:\r\n?|\n)/g);this._input=G+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var z=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),V.length-1&&(this.yylineno-=V.length-1);var W=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:V?(V.length===z.length?this.yylloc.first_column:0)+z[z.length-V.length].length-V[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[W[0],W[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(G){this.unput(this.match.slice(G))},pastInput:function(){var G=this.matched.substr(0,this.matched.length-this.match.length);return(G.length>20?"...":"")+G.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var G=this.match;return G.length<20&&(G+=this._input.substr(0,20-G.length)),(G.substr(0,20)+(G.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var G=this.pastInput(),P=new Array(G.length+1).join("-");return G+this.upcomingInput()+`
|
|
`+P+"^"},test_match:function(G,P){var V,z,W;if(this.options.backtrack_lexer&&(W={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&&(W.yylloc.range=this.yylloc.range.slice(0))),z=G[0].match(/(?:\r\n?|\n).*/g),z&&(this.yylineno+=z.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:z?z[z.length-1].length-z[z.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+G[0].length},this.yytext+=G[0],this.match+=G[0],this.matches=G,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(G[0].length),this.matched+=G[0],V=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),V)return V;if(this._backtrack){for(var T in W)this[T]=W[T];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var G,P,V,z;this._more||(this.yytext="",this.match="");for(var W=this._currentRules(),T=0;T<W.length;T++)if(V=this._input.match(this.rules[W[T]]),V&&(!P||V[0].length>P[0].length)){if(P=V,z=T,this.options.backtrack_lexer){if(G=this.test_match(V,W[T]),G!==!1)return G;if(this._backtrack){P=!1;continue}else return!1}else if(!this.options.flex)break}return P?(G=this.test_match(P,W[z]),G!==!1?G:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var P=this.next();return P||this.lex()},begin:function(P){this.conditionStack.push(P)},popState:function(){var P=this.conditionStack.length-1;return P>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(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},pushState:function(P){this.begin(P)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(P,V,z,W){switch(z){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 28;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},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},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return H}();L.lexer=N;function F(){this.yy={}}return F.prototype=L,L.Parser=F,new F}();parser$b.parser=parser$b;const gitGraphDetector=e=>e.match(/^\s*gitGraph/)!==null;let title$1="",diagramTitle="",description="";const sanitizeText$3=e=>sanitizeText$5(e,getConfig$1()),clear$g=function(){title$1="",description="",diagramTitle=""},setAccTitle=function(e){title$1=sanitizeText$3(e).replace(/^\s+/g,"")},getAccTitle=function(){return title$1||diagramTitle},setAccDescription=function(e){description=sanitizeText$3(e).replace(/\n\s+/g,`
|
|
`)},getAccDescription=function(){return description},setDiagramTitle=function(e){diagramTitle=sanitizeText$3(e)},getDiagramTitle=function(){return diagramTitle};let mainBranchName=getConfig$1().gitGraph.mainBranchName,mainBranchOrder=getConfig$1().gitGraph.mainBranchOrder,commits={},head=null,branchesConfig={};branchesConfig[mainBranchName]={name:mainBranchName,order:mainBranchOrder};let branches={};branches[mainBranchName]=head;let curBranch=mainBranchName,direction$3="LR",seq=0;function getId(){return random({length:7})}const parseDirective$b=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)};function uniqBy(e,t){const r=Object.create(null);return e.reduce((n,i)=>{const o=t(i);return r[o]||(r[o]=!0,n.push(i)),n},[])}const setDirection$3=function(e){direction$3=e};let options={};const setOptions=function(e){log$1.debug("options str",e),e=e&&e.trim(),e=e||"{}";try{options=JSON.parse(e)}catch(t){log$1.error("error while parsing gitGraph options",t.message)}},getOptions=function(){return options},commit=function(e,t,r,n){log$1.debug("Entering commit:",e,t,r,n),t=common.sanitizeText(t,getConfig$1()),e=common.sanitizeText(e,getConfig$1()),n=common.sanitizeText(n,getConfig$1());const i={id:t||seq+"-"+getId(),message:e,seq:seq++,type:r||commitType$1.NORMAL,tag:n||"",parents:head==null?[]:[head.id],branch:curBranch};head=i,commits[i.id]=i,branches[curBranch]=i.id,log$1.debug("in pushCommit "+i.id)},branch=function(e,t){if(e=common.sanitizeText(e,getConfig$1()),typeof branches[e]>"u")branches[e]=head!=null?head.id:null,branchesConfig[e]={name:e,order:t?parseInt(t,10):null},checkout(e),log$1.debug("in createBranch");else{let r=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+e+'")');throw r.hash={text:"branch "+e,token:"branch "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+e+'"']},r}},merge=function(e,t,r,n){e=common.sanitizeText(e,getConfig$1()),t=common.sanitizeText(t,getConfig$1());const i=commits[branches[curBranch]],o=commits[branches[e]];if(curBranch===e){let u=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw u.hash={text:"merge "+e,token:"merge "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},u}else if(typeof i>"u"||!i){let u=new Error('Incorrect usage of "merge". Current branch ('+curBranch+")has no commits");throw u.hash={text:"merge "+e,token:"merge "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},u}else if(typeof branches[e]>"u"){let u=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw u.hash={text:"merge "+e,token:"merge "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+e]},u}else if(typeof o>"u"||!o){let u=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw u.hash={text:"merge "+e,token:"merge "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},u}else if(i===o){let u=new Error('Incorrect usage of "merge". Both branches have same head');throw u.hash={text:"merge "+e,token:"merge "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},u}else if(t&&typeof commits[t]<"u"){let u=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom Id");throw u.hash={text:"merge "+e+t+r+n,token:"merge "+e+t+r+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+e+" "+t+"_UNIQUE "+r+" "+n]},u}const l={id:t||seq+"-"+getId(),message:"merged branch "+e+" into "+curBranch,seq:seq++,parents:[head==null?null:head.id,branches[e]],branch:curBranch,type:commitType$1.MERGE,customType:r,customId:!!t,tag:n||""};head=l,commits[l.id]=l,branches[curBranch]=l.id,log$1.debug(branches),log$1.debug("in mergeBranch")},cherryPick=function(e,t,r){if(log$1.debug("Entering cherryPick:",e,t,r),e=common.sanitizeText(e,getConfig$1()),t=common.sanitizeText(t,getConfig$1()),r=common.sanitizeText(r,getConfig$1()),!e||typeof commits[e]>"u"){let o=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw o.hash={text:"cherryPick "+e+" "+t,token:"cherryPick "+e+" "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}let n=commits[e],i=n.branch;if(n.type===commitType$1.MERGE){let o=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw o.hash={text:"cherryPick "+e+" "+t,token:"cherryPick "+e+" "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}if(!t||typeof commits[t]>"u"){if(i===curBranch){let u=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw u.hash={text:"cherryPick "+e+" "+t,token:"cherryPick "+e+" "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},u}const o=commits[branches[curBranch]];if(typeof o>"u"||!o){let u=new Error('Incorrect usage of "cherry-pick". Current branch ('+curBranch+")has no commits");throw u.hash={text:"cherryPick "+e+" "+t,token:"cherryPick "+e+" "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},u}const l={id:seq+"-"+getId(),message:"cherry-picked "+n+" into "+curBranch,seq:seq++,parents:[head==null?null:head.id,n.id],branch:curBranch,type:commitType$1.CHERRY_PICK,tag:r!=null?r:"cherry-pick:"+n.id};head=l,commits[l.id]=l,branches[curBranch]=l.id,log$1.debug(branches),log$1.debug("in cherryPick")}},checkout=function(e){if(e=common.sanitizeText(e,getConfig$1()),typeof branches[e]>"u"){let t=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+e+'")');throw t.hash={text:"checkout "+e,token:"checkout "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+e+'"']},t}else{curBranch=e;const t=branches[curBranch];head=commits[t]}};function upsert(e,t,r){const n=e.indexOf(t);n===-1?e.push(r):e.splice(n,1,r)}function prettyPrintCommitHistory(e){const t=e.reduce((i,o)=>i.seq>o.seq?i:o,e[0]);let r="";e.forEach(function(i){i===t?r+=" *":r+=" |"});const n=[r,t.id,t.seq];for(let i in branches)branches[i]===t.id&&n.push(i);if(log$1.debug(n.join(" ")),t.parents&&t.parents.length==2){const i=commits[t.parents[0]];upsert(e,t,i),e.push(commits[t.parents[1]])}else{if(t.parents.length==0)return;{const i=commits[t.parents];upsert(e,t,i)}}e=uniqBy(e,i=>i.id),prettyPrintCommitHistory(e)}const prettyPrint=function(){log$1.debug(commits);const e=getCommitsArray()[0];prettyPrintCommitHistory([e])},clear$f=function(){commits={},head=null;let e=getConfig$1().gitGraph.mainBranchName,t=getConfig$1().gitGraph.mainBranchOrder;branches={},branches[e]=null,branchesConfig={},branchesConfig[e]={name:e,order:t},curBranch=e,seq=0,clear$g()},getBranchesAsObjArray=function(){return Object.values(branchesConfig).map((t,r)=>t.order!==null?t:{...t,order:parseFloat(`0.${r}`,10)}).sort((t,r)=>t.order-r.order).map(({name:t})=>({name:t}))},getBranches=function(){return branches},getCommits=function(){return commits},getCommitsArray=function(){const e=Object.keys(commits).map(function(t){return commits[t]});return e.forEach(function(t){log$1.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},getCurrentBranch=function(){return curBranch},getDirection$3=function(){return direction$3},getHead=function(){return head},commitType$1={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},gitGraphDb={parseDirective:parseDirective$b,getConfig:()=>getConfig$1().gitGraph,setDirection:setDirection$3,setOptions,getOptions,commit,branch,merge,cherryPick,checkout,prettyPrint,clear:clear$f,getBranchesAsObjArray,getBranches,getCommits,getCommitsArray,getCurrentBranch,getDirection:getDirection$3,getHead,setAccTitle,getAccTitle,getAccDescription,setAccDescription,commitType:commitType$1};function addSVGAccessibilityFields(e,t,r){if(typeof t.insert>"u")return;let n=e.getAccTitle(),i=e.getAccDescription();t.attr("role","img").attr("aria-labelledby","chart-title-"+r+" chart-desc-"+r),t.insert("desc",":first-child").attr("id","chart-desc-"+r).text(i),t.insert("title",":first-child").attr("id","chart-title-"+r).text(n)}let allCommitsDict={};const commitType={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},THEME_COLOR_LIMIT=8;let branchPos={},commitPos={},lanes=[],maxPos=0;const clear$e=()=>{branchPos={},commitPos={},allCommitsDict={},maxPos=0,lanes=[]},drawText$3=e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];typeof e=="string"?r=e.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(e)?r=e:r=[];for(let n=0;n<r.length;n++){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=r[n].trim(),t.appendChild(i)}return t},drawCommits=(e,t,r)=>{const n=getConfig().gitGraph,i=e.append("g").attr("class","commit-bullets"),o=e.append("g").attr("class","commit-labels");let l=0;Object.keys(t).sort((f,d)=>t[f].seq-t[d].seq).forEach(f=>{const d=t[f],g=branchPos[d.branch].pos,p=l+10;if(r){let m,b=typeof d.customType<"u"&&d.customType!==""?d.customType:d.type;switch(b){case commitType.NORMAL:m="commit-normal";break;case commitType.REVERSE:m="commit-reverse";break;case commitType.HIGHLIGHT:m="commit-highlight";break;case commitType.MERGE:m="commit-merge";break;case commitType.CHERRY_PICK:m="commit-cherry-pick";break;default:m="commit-normal"}if(b===commitType.HIGHLIGHT){const $=i.append("rect");$.attr("x",p-10),$.attr("y",g-10),$.attr("height",20),$.attr("width",20),$.attr("class",`commit ${d.id} commit-highlight${branchPos[d.branch].index%THEME_COLOR_LIMIT} ${m}-outer`),i.append("rect").attr("x",p-6).attr("y",g-6).attr("height",12).attr("width",12).attr("class",`commit ${d.id} commit${branchPos[d.branch].index%THEME_COLOR_LIMIT} ${m}-inner`)}else if(b===commitType.CHERRY_PICK)i.append("circle").attr("cx",p).attr("cy",g).attr("r",10).attr("class",`commit ${d.id} ${m}`),i.append("circle").attr("cx",p-3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${m}`),i.append("circle").attr("cx",p+3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${m}`),i.append("line").attr("x1",p+3).attr("y1",g+1).attr("x2",p).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${m}`),i.append("line").attr("x1",p-3).attr("y1",g+1).attr("x2",p).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${m}`);else{const $=i.append("circle");if($.attr("cx",p),$.attr("cy",g),$.attr("r",d.type===commitType.MERGE?9:10),$.attr("class",`commit ${d.id} commit${branchPos[d.branch].index%THEME_COLOR_LIMIT}`),b===commitType.MERGE){const S=i.append("circle");S.attr("cx",p),S.attr("cy",g),S.attr("r",6),S.attr("class",`commit ${m} ${d.id} commit${branchPos[d.branch].index%THEME_COLOR_LIMIT}`)}b===commitType.REVERSE&&i.append("path").attr("d",`M ${p-5},${g-5}L${p+5},${g+5}M${p-5},${g+5}L${p+5},${g-5}`).attr("class",`commit ${m} ${d.id} commit${branchPos[d.branch].index%THEME_COLOR_LIMIT}`)}}if(commitPos[d.id]={x:l+10,y:g},r){if(d.type!==commitType.CHERRY_PICK&&(d.customId&&d.type===commitType.MERGE||d.type!==commitType.MERGE)&&n.showCommitLabel){const $=o.append("g"),S=$.insert("rect").attr("class","commit-label-bkg"),R=$.append("text").attr("x",l).attr("y",g+25).attr("class","commit-label").text(d.id);let L=R.node().getBBox();if(S.attr("x",l+10-L.width/2-2).attr("y",g+13.5).attr("width",L.width+2*2).attr("height",L.height+2*2),R.attr("x",l+10-L.width/2),n.rotateCommitLabel){let N=-7.5-(L.width+10)/25*9.5,F=10+L.width/25*8.5;$.attr("transform","translate("+N+", "+F+") rotate("+-45+", "+l+", "+g+")")}}if(d.tag){const $=o.insert("polygon"),S=o.append("circle"),R=o.append("text").attr("y",g-16).attr("class","tag-label").text(d.tag);let L=R.node().getBBox();R.attr("x",l+10-L.width/2);const N=L.height/2,F=g-19.2;$.attr("class","tag-label-bkg").attr("points",`
|
|
${l-L.width/2-4/2},${F+2}
|
|
${l-L.width/2-4/2},${F-2}
|
|
${l+10-L.width/2-4},${F-N-2}
|
|
${l+10+L.width/2+4},${F-N-2}
|
|
${l+10+L.width/2+4},${F+N+2}
|
|
${l+10-L.width/2-4},${F+N+2}`),S.attr("cx",l-L.width/2+4/2).attr("cy",F).attr("r",1.5).attr("class","tag-hole")}}l+=50,l>maxPos&&(maxPos=l)})},hasOverlappingCommits=(e,t,r)=>Object.keys(r).filter(o=>r[o].branch===t.branch&&r[o].seq>e.seq&&r[o].seq<t.seq).length>0,findLane=(e,t,r)=>{const n=r||0,i=e+Math.abs(e-t)/2;if(n>5)return i;let o=!0;for(let u=0;u<lanes.length;u++)Math.abs(lanes[u]-i)<10&&(o=!1);if(o)return lanes.push(i),i;const l=Math.abs(e-t);return findLane(e,t-l/5,n+1)},drawArrow=(e,t,r,n)=>{const i=commitPos[t.id],o=commitPos[r.id],l=hasOverlappingCommits(t,r,n);let u="",h="",f=0,d=0,g=branchPos[r.branch].index,p;if(l){u="A 10 10, 0, 0, 0,",h="A 10 10, 0, 0, 1,",f=10,d=10,g=branchPos[r.branch].index;const m=i.y<o.y?findLane(i.y,o.y):findLane(o.y,i.y);i.y<o.y?p=`M ${i.x} ${i.y} L ${i.x} ${m-f} ${u} ${i.x+d} ${m} L ${o.x-f} ${m} ${h} ${o.x} ${m+d} L ${o.x} ${o.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${m+f} ${h} ${i.x+d} ${m} L ${o.x-f} ${m} ${u} ${o.x} ${m-d} L ${o.x} ${o.y}`}else i.y<o.y&&(u="A 20 20, 0, 0, 0,",f=20,d=20,g=branchPos[r.branch].index,p=`M ${i.x} ${i.y} L ${i.x} ${o.y-f} ${u} ${i.x+d} ${o.y} L ${o.x} ${o.y}`),i.y>o.y&&(u="A 20 20, 0, 0, 0,",f=20,d=20,g=branchPos[t.branch].index,p=`M ${i.x} ${i.y} L ${o.x-f} ${i.y} ${u} ${o.x} ${i.y-d} L ${o.x} ${o.y}`),i.y===o.y&&(g=branchPos[t.branch].index,p=`M ${i.x} ${i.y} L ${i.x} ${o.y-f} ${u} ${i.x+d} ${o.y} L ${o.x} ${o.y}`);e.append("path").attr("d",p).attr("class","arrow arrow"+g%THEME_COLOR_LIMIT)},drawArrows=(e,t)=>{const r=e.append("g").attr("class","commit-arrows");Object.keys(t).forEach(n=>{const i=t[n];i.parents&&i.parents.length>0&&i.parents.forEach(o=>{drawArrow(r,t[o],i,t)})})},drawBranches=(e,t)=>{const r=getConfig().gitGraph,n=e.append("g");t.forEach((i,o)=>{const l=o%THEME_COLOR_LIMIT,u=branchPos[i.name].pos,h=n.append("line");h.attr("x1",0),h.attr("y1",u),h.attr("x2",maxPos),h.attr("y2",u),h.attr("class","branch branch"+l),lanes.push(u);let f=i.name;const d=drawText$3(f),g=n.insert("rect"),m=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+l);m.node().appendChild(d);let b=d.getBBox();g.attr("class","branchLabelBkg label"+l).attr("rx",4).attr("ry",4).attr("x",-b.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-b.height/2+8).attr("width",b.width+18).attr("height",b.height+4),m.attr("transform","translate("+(-b.width-14-(r.rotateCommitLabel===!0?30:0))+", "+(u-b.height/2-1)+")"),g.attr("transform","translate("+-19+", "+(u-b.height/2)+")")})},draw$f=function(e,t,r,n){clear$e();const i=getConfig(),o=getConfig().gitGraph;log$1.debug("in gitgraph renderer",e+`
|
|
`,"id:",t,r),allCommitsDict=n.db.getCommits();const l=n.db.getBranchesAsObjArray();let u=0;l.forEach((f,d)=>{branchPos[f.name]={pos:u,index:d},u+=50+(o.rotateCommitLabel?40:0)});const h=select$1(`[id="${t}"]`);addSVGAccessibilityFields(n.db,h,t),drawCommits(h,allCommitsDict,!1),o.showBranches&&drawBranches(h,l),drawArrows(h,allCommitsDict),drawCommits(h,allCommitsDict,!0),setupGraphViewbox(void 0,h,o.diagramPadding,i.useMaxWidth)},gitGraphRenderer={draw:draw$f},getStyles=e=>`
|
|
.commit-id,
|
|
.commit-msg,
|
|
.branch-label {
|
|
fill: lightgrey;
|
|
color: lightgrey;
|
|
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
font-family: var(--mermaid-font-family);
|
|
}
|
|
${[0,1,2,3,4,5,6,7].map(t=>`
|
|
.branch-label${t} { fill: ${e["gitBranchLabel"+t]}; }
|
|
.commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
|
|
.commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
|
|
.label${t} { fill: ${e["git"+t]}; }
|
|
.arrow${t} { stroke: ${e["git"+t]}; }
|
|
`).join(`
|
|
`)}
|
|
|
|
.branch {
|
|
stroke-width: 1;
|
|
stroke: ${e.lineColor};
|
|
stroke-dasharray: 2;
|
|
}
|
|
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};}
|
|
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; }
|
|
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
|
|
.tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; }
|
|
.tag-hole { fill: ${e.textColor}; }
|
|
|
|
.commit-merge {
|
|
stroke: ${e.primaryColor};
|
|
fill: ${e.primaryColor};
|
|
}
|
|
.commit-reverse {
|
|
stroke: ${e.primaryColor};
|
|
fill: ${e.primaryColor};
|
|
stroke-width: 3;
|
|
}
|
|
.commit-highlight-outer {
|
|
}
|
|
.commit-highlight-inner {
|
|
stroke: ${e.primaryColor};
|
|
fill: ${e.primaryColor};
|
|
}
|
|
|
|
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
}
|
|
`;var parser$a=function(){var e=function(Je,Oe,Me,Fe){for(Me=Me||{},Fe=Je.length;Fe--;Me[Je[Fe]]=Oe);return Me},t=[1,6],r=[1,7],n=[1,8],i=[1,9],o=[1,16],l=[1,11],u=[1,12],h=[1,13],f=[1,14],d=[1,15],g=[1,27],p=[1,33],m=[1,34],b=[1,35],$=[1,36],S=[1,37],R=[1,72],L=[1,73],N=[1,74],F=[1,75],H=[1,76],G=[1,77],P=[1,78],V=[1,38],z=[1,39],W=[1,40],T=[1,41],U=[1,42],I=[1,43],ae=[1,44],Q=[1,45],ue=[1,46],_e=[1,47],ke=[1,48],de=[1,49],ce=[1,50],he=[1,51],Se=[1,52],ve=[1,53],me=[1,54],Ce=[1,55],xe=[1,56],Ne=[1,57],pe=[1,59],J=[1,60],oe=[1,61],ee=[1,62],Z=[1,63],ie=[1,64],se=[1,65],te=[1,66],fe=[1,67],we=[1,68],Ye=[1,69],He=[24,52],je=[24,44,46,47,48,49,50,51,52,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],Pe=[15,24,44,46,47,48,49,50,51,52,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],Ee=[1,94],Ie=[1,95],Le=[1,96],Be=[1,97],Te=[15,24,52],dt=[7,8,9,10,18,22,25,26,27,28],Ge=[15,24,43,52],rt=[15,24,43,52,86,87,89,90],it=[15,43],st=[44,46,47,48,49,50,51,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],wt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(Oe,Me,Fe,qe,et,Ae,_t){var Re=Ae.length-1;switch(et){case 4:qe.setDirection("TB");break;case 5:qe.setDirection("BT");break;case 6:qe.setDirection("RL");break;case 7:qe.setDirection("LR");break;case 11:qe.parseDirective("%%{","open_directive");break;case 12:break;case 13:Ae[Re]=Ae[Re].trim().replace(/'/g,'"'),qe.parseDirective(Ae[Re],"arg_directive");break;case 14:qe.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:qe.setC4Type(Ae[Re-3]);break;case 26:qe.setTitle(Ae[Re].substring(6)),this.$=Ae[Re].substring(6);break;case 27:qe.setAccDescription(Ae[Re].substring(15)),this.$=Ae[Re].substring(15);break;case 28:this.$=Ae[Re].trim(),qe.setTitle(this.$);break;case 29:case 30:this.$=Ae[Re].trim(),qe.setAccDescription(this.$);break;case 35:case 36:Ae[Re].splice(2,0,"ENTERPRISE"),qe.addPersonOrSystemBoundary(...Ae[Re]),this.$=Ae[Re];break;case 37:qe.addPersonOrSystemBoundary(...Ae[Re]),this.$=Ae[Re];break;case 38:Ae[Re].splice(2,0,"CONTAINER"),qe.addContainerBoundary(...Ae[Re]),this.$=Ae[Re];break;case 39:qe.addDeploymentNode("node",...Ae[Re]),this.$=Ae[Re];break;case 40:qe.addDeploymentNode("nodeL",...Ae[Re]),this.$=Ae[Re];break;case 41:qe.addDeploymentNode("nodeR",...Ae[Re]),this.$=Ae[Re];break;case 42:qe.popBoundaryParseStack();break;case 46:qe.addPersonOrSystem("person",...Ae[Re]),this.$=Ae[Re];break;case 47:qe.addPersonOrSystem("external_person",...Ae[Re]),this.$=Ae[Re];break;case 48:qe.addPersonOrSystem("system",...Ae[Re]),this.$=Ae[Re];break;case 49:qe.addPersonOrSystem("system_db",...Ae[Re]),this.$=Ae[Re];break;case 50:qe.addPersonOrSystem("system_queue",...Ae[Re]),this.$=Ae[Re];break;case 51:qe.addPersonOrSystem("external_system",...Ae[Re]),this.$=Ae[Re];break;case 52:qe.addPersonOrSystem("external_system_db",...Ae[Re]),this.$=Ae[Re];break;case 53:qe.addPersonOrSystem("external_system_queue",...Ae[Re]),this.$=Ae[Re];break;case 54:qe.addContainer("container",...Ae[Re]),this.$=Ae[Re];break;case 55:qe.addContainer("container_db",...Ae[Re]),this.$=Ae[Re];break;case 56:qe.addContainer("container_queue",...Ae[Re]),this.$=Ae[Re];break;case 57:qe.addContainer("external_container",...Ae[Re]),this.$=Ae[Re];break;case 58:qe.addContainer("external_container_db",...Ae[Re]),this.$=Ae[Re];break;case 59:qe.addContainer("external_container_queue",...Ae[Re]),this.$=Ae[Re];break;case 60:qe.addComponent("component",...Ae[Re]),this.$=Ae[Re];break;case 61:qe.addComponent("component_db",...Ae[Re]),this.$=Ae[Re];break;case 62:qe.addComponent("component_queue",...Ae[Re]),this.$=Ae[Re];break;case 63:qe.addComponent("external_component",...Ae[Re]),this.$=Ae[Re];break;case 64:qe.addComponent("external_component_db",...Ae[Re]),this.$=Ae[Re];break;case 65:qe.addComponent("external_component_queue",...Ae[Re]),this.$=Ae[Re];break;case 67:qe.addRel("rel",...Ae[Re]),this.$=Ae[Re];break;case 68:qe.addRel("birel",...Ae[Re]),this.$=Ae[Re];break;case 69:qe.addRel("rel_u",...Ae[Re]),this.$=Ae[Re];break;case 70:qe.addRel("rel_d",...Ae[Re]),this.$=Ae[Re];break;case 71:qe.addRel("rel_l",...Ae[Re]),this.$=Ae[Re];break;case 72:qe.addRel("rel_r",...Ae[Re]),this.$=Ae[Re];break;case 73:qe.addRel("rel_b",...Ae[Re]),this.$=Ae[Re];break;case 74:Ae[Re].splice(0,1),qe.addRel("rel",...Ae[Re]),this.$=Ae[Re];break;case 75:qe.updateElStyle("update_el_style",...Ae[Re]),this.$=Ae[Re];break;case 76:qe.updateRelStyle("update_rel_style",...Ae[Re]),this.$=Ae[Re];break;case 77:qe.updateLayoutConfig("update_layout_config",...Ae[Re]),this.$=Ae[Re];break;case 78:this.$=[Ae[Re]];break;case 79:Ae[Re].unshift(Ae[Re-1]),this.$=Ae[Re];break;case 80:case 82:this.$=Ae[Re].trim();break;case 81:let lt={};lt[Ae[Re-1].trim()]=Ae[Re].trim(),this.$=lt;break;case 83:this.$="";break}},table:[{3:1,4:2,5:3,6:4,7:t,8:r,9:n,10:i,11:5,12:10,18:o,22:l,25:u,26:h,27:f,28:d},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:t,8:r,9:n,10:i,11:5,12:10,18:o,22:l,25:u,26:h,27:f,28:d},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:g},e([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:p,33:m,34:b,36:$,38:S,39:58,40:70,42:71,44:R,46:L,47:N,48:F,49:H,50:G,51:P,53:32,54:V,55:z,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue,63:_e,64:ke,65:de,66:ce,67:he,68:Se,69:ve,70:me,71:Ce,72:xe,73:Ne,74:pe,75:J,76:oe,77:ee,78:Z,79:ie,80:se,81:te,82:fe,83:we,84:Ye},{23:79,29:29,30:30,31:31,32:p,33:m,34:b,36:$,38:S,39:58,40:70,42:71,44:R,46:L,47:N,48:F,49:H,50:G,51:P,53:32,54:V,55:z,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue,63:_e,64:ke,65:de,66:ce,67:he,68:Se,69:ve,70:me,71:Ce,72:xe,73:Ne,74:pe,75:J,76:oe,77:ee,78:Z,79:ie,80:se,81:te,82:fe,83:we,84:Ye},{23:80,29:29,30:30,31:31,32:p,33:m,34:b,36:$,38:S,39:58,40:70,42:71,44:R,46:L,47:N,48:F,49:H,50:G,51:P,53:32,54:V,55:z,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue,63:_e,64:ke,65:de,66:ce,67:he,68:Se,69:ve,70:me,71:Ce,72:xe,73:Ne,74:pe,75:J,76:oe,77:ee,78:Z,79:ie,80:se,81:te,82:fe,83:we,84:Ye},{23:81,29:29,30:30,31:31,32:p,33:m,34:b,36:$,38:S,39:58,40:70,42:71,44:R,46:L,47:N,48:F,49:H,50:G,51:P,53:32,54:V,55:z,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue,63:_e,64:ke,65:de,66:ce,67:he,68:Se,69:ve,70:me,71:Ce,72:xe,73:Ne,74:pe,75:J,76:oe,77:ee,78:Z,79:ie,80:se,81:te,82:fe,83:we,84:Ye},{23:82,29:29,30:30,31:31,32:p,33:m,34:b,36:$,38:S,39:58,40:70,42:71,44:R,46:L,47:N,48:F,49:H,50:G,51:P,53:32,54:V,55:z,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue,63:_e,64:ke,65:de,66:ce,67:he,68:Se,69:ve,70:me,71:Ce,72:xe,73:Ne,74:pe,75:J,76:oe,77:ee,78:Z,79:ie,80:se,81:te,82:fe,83:we,84:Ye},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},e(He,[2,20],{53:32,39:58,40:70,42:71,30:87,44:R,46:L,47:N,48:F,49:H,50:G,51:P,54:V,55:z,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue,63:_e,64:ke,65:de,66:ce,67:he,68:Se,69:ve,70:me,71:Ce,72:xe,73:Ne,74:pe,75:J,76:oe,77:ee,78:Z,79:ie,80:se,81:te,82:fe,83:we,84:Ye}),e(He,[2,21]),e(je,[2,23],{15:[1,88]}),e(He,[2,43],{15:[1,89]}),e(Pe,[2,26]),e(Pe,[2,27]),{35:[1,90]},{37:[1,91]},e(Pe,[2,30]),{45:92,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:98,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:99,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:100,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:101,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:102,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:103,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:104,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:105,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:106,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:107,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:108,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:109,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:110,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:111,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:112,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:113,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:114,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:115,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:116,85:93,86:Ee,87:Ie,89:Le,90:Be},e(Te,[2,66]),{45:117,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:118,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:119,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:120,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:121,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:122,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:123,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:124,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:125,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:126,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:127,85:93,86:Ee,87:Ie,89:Le,90:Be},{30:128,39:58,40:70,42:71,44:R,46:L,47:N,48:F,49:H,50:G,51:P,53:32,54:V,55:z,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue,63:_e,64:ke,65:de,66:ce,67:he,68:Se,69:ve,70:me,71:Ce,72:xe,73:Ne,74:pe,75:J,76:oe,77:ee,78:Z,79:ie,80:se,81:te,82:fe,83:we,84:Ye},{15:[1,130],43:[1,129]},{45:131,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:132,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:133,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:134,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:135,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:136,85:93,86:Ee,87:Ie,89:Le,90:Be},{45:137,85:93,86:Ee,87:Ie,89:Le,90:Be},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},e(dt,[2,9]),{14:142,21:g},{21:[2,13]},{1:[2,15]},e(He,[2,22]),e(je,[2,24],{31:31,29:143,32:p,33:m,34:b,36:$,38:S}),e(He,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:p,33:m,34:b,36:$,38:S,44:R,46:L,47:N,48:F,49:H,50:G,51:P,54:V,55:z,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue,63:_e,64:ke,65:de,66:ce,67:he,68:Se,69:ve,70:me,71:Ce,72:xe,73:Ne,74:pe,75:J,76:oe,77:ee,78:Z,79:ie,80:se,81:te,82:fe,83:we,84:Ye}),e(Pe,[2,28]),e(Pe,[2,29]),e(Te,[2,46]),e(Ge,[2,78],{85:93,45:145,86:Ee,87:Ie,89:Le,90:Be}),e(rt,[2,80]),{88:[1,146]},e(rt,[2,82]),e(rt,[2,83]),e(Te,[2,47]),e(Te,[2,48]),e(Te,[2,49]),e(Te,[2,50]),e(Te,[2,51]),e(Te,[2,52]),e(Te,[2,53]),e(Te,[2,54]),e(Te,[2,55]),e(Te,[2,56]),e(Te,[2,57]),e(Te,[2,58]),e(Te,[2,59]),e(Te,[2,60]),e(Te,[2,61]),e(Te,[2,62]),e(Te,[2,63]),e(Te,[2,64]),e(Te,[2,65]),e(Te,[2,67]),e(Te,[2,68]),e(Te,[2,69]),e(Te,[2,70]),e(Te,[2,71]),e(Te,[2,72]),e(Te,[2,73]),e(Te,[2,74]),e(Te,[2,75]),e(Te,[2,76]),e(Te,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},e(it,[2,35]),e(it,[2,36]),e(it,[2,37]),e(it,[2,38]),e(it,[2,39]),e(it,[2,40]),e(it,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},e(je,[2,25]),e(He,[2,45]),e(Ge,[2,79]),e(rt,[2,81]),e(Te,[2,31]),e(Te,[2,42]),e(st,[2,32]),e(st,[2,33],{15:[1,152]}),e(dt,[2,10]),e(st,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(Oe,Me){if(Me.recoverable)this.trace(Oe);else{var Fe=new Error(Oe);throw Fe.hash=Me,Fe}},parse:function(Oe){var Me=this,Fe=[0],qe=[],et=[null],Ae=[],_t=this.table,Re="",lt=0,xt=0,bt=2,$t=1,kt=Ae.slice.call(arguments,1),tt=Object.create(this.lexer),ht={yy:{}};for(var vt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,vt)&&(ht.yy[vt]=this.yy[vt]);tt.setInput(Oe,ht.yy),ht.yy.lexer=tt,ht.yy.parser=this,typeof tt.yylloc>"u"&&(tt.yylloc={});var gt=tt.yylloc;Ae.push(gt);var tr=tt.options&&tt.options.ranges;typeof ht.yy.parseError=="function"?this.parseError=ht.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ht(){var ot;return ot=qe.pop()||tt.lex()||$t,typeof ot!="number"&&(ot instanceof Array&&(qe=ot,ot=qe.pop()),ot=Me.symbols_[ot]||ot),ot}for(var St,ft,Nt,Pt,Lt={},qt,Xe,ye,Ue;;){if(ft=Fe[Fe.length-1],this.defaultActions[ft]?Nt=this.defaultActions[ft]:((St===null||typeof St>"u")&&(St=Ht()),Nt=_t[ft]&&_t[ft][St]),typeof Nt>"u"||!Nt.length||!Nt[0]){var Ve="";Ue=[];for(qt in _t[ft])this.terminals_[qt]&&qt>bt&&Ue.push("'"+this.terminals_[qt]+"'");tt.showPosition?Ve="Parse error on line "+(lt+1)+`:
|
|
`+tt.showPosition()+`
|
|
Expecting `+Ue.join(", ")+", got '"+(this.terminals_[St]||St)+"'":Ve="Parse error on line "+(lt+1)+": Unexpected "+(St==$t?"end of input":"'"+(this.terminals_[St]||St)+"'"),this.parseError(Ve,{text:tt.match,token:this.terminals_[St]||St,line:tt.yylineno,loc:gt,expected:Ue})}if(Nt[0]instanceof Array&&Nt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ft+", token: "+St);switch(Nt[0]){case 1:Fe.push(St),et.push(tt.yytext),Ae.push(tt.yylloc),Fe.push(Nt[1]),St=null,xt=tt.yyleng,Re=tt.yytext,lt=tt.yylineno,gt=tt.yylloc;break;case 2:if(Xe=this.productions_[Nt[1]][1],Lt.$=et[et.length-Xe],Lt._$={first_line:Ae[Ae.length-(Xe||1)].first_line,last_line:Ae[Ae.length-1].last_line,first_column:Ae[Ae.length-(Xe||1)].first_column,last_column:Ae[Ae.length-1].last_column},tr&&(Lt._$.range=[Ae[Ae.length-(Xe||1)].range[0],Ae[Ae.length-1].range[1]]),Pt=this.performAction.apply(Lt,[Re,xt,lt,ht.yy,Nt[1],et,Ae].concat(kt)),typeof Pt<"u")return Pt;Xe&&(Fe=Fe.slice(0,-1*Xe*2),et=et.slice(0,-1*Xe),Ae=Ae.slice(0,-1*Xe)),Fe.push(this.productions_[Nt[1]][0]),et.push(Lt.$),Ae.push(Lt._$),ye=_t[Fe[Fe.length-2]][Fe[Fe.length-1]],Fe.push(ye);break;case 3:return!0}}return!0}},nt=function(){var Je={EOF:1,parseError:function(Me,Fe){if(this.yy.parser)this.yy.parser.parseError(Me,Fe);else throw new Error(Me)},setInput:function(Oe,Me){return this.yy=Me||this.yy||{},this._input=Oe,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 Oe=this._input[0];this.yytext+=Oe,this.yyleng++,this.offset++,this.match+=Oe,this.matched+=Oe;var Me=Oe.match(/(?:\r\n?|\n).*/g);return Me?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Oe},unput:function(Oe){var Me=Oe.length,Fe=Oe.split(/(?:\r\n?|\n)/g);this._input=Oe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Me),this.offset-=Me;var qe=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),Fe.length-1&&(this.yylineno-=Fe.length-1);var et=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:Fe?(Fe.length===qe.length?this.yylloc.first_column:0)+qe[qe.length-Fe.length].length-Fe[0].length:this.yylloc.first_column-Me},this.options.ranges&&(this.yylloc.range=[et[0],et[0]+this.yyleng-Me]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Oe){this.unput(this.match.slice(Oe))},pastInput:function(){var Oe=this.matched.substr(0,this.matched.length-this.match.length);return(Oe.length>20?"...":"")+Oe.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Oe=this.match;return Oe.length<20&&(Oe+=this._input.substr(0,20-Oe.length)),(Oe.substr(0,20)+(Oe.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Oe=this.pastInput(),Me=new Array(Oe.length+1).join("-");return Oe+this.upcomingInput()+`
|
|
`+Me+"^"},test_match:function(Oe,Me){var Fe,qe,et;if(this.options.backtrack_lexer&&(et={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&&(et.yylloc.range=this.yylloc.range.slice(0))),qe=Oe[0].match(/(?:\r\n?|\n).*/g),qe&&(this.yylineno+=qe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:qe?qe[qe.length-1].length-qe[qe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Oe[0].length},this.yytext+=Oe[0],this.match+=Oe[0],this.matches=Oe,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(Oe[0].length),this.matched+=Oe[0],Fe=this.performAction.call(this,this.yy,this,Me,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Fe)return Fe;if(this._backtrack){for(var Ae in et)this[Ae]=et[Ae];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Oe,Me,Fe,qe;this._more||(this.yytext="",this.match="");for(var et=this._currentRules(),Ae=0;Ae<et.length;Ae++)if(Fe=this._input.match(this.rules[et[Ae]]),Fe&&(!Me||Fe[0].length>Me[0].length)){if(Me=Fe,qe=Ae,this.options.backtrack_lexer){if(Oe=this.test_match(Fe,et[Ae]),Oe!==!1)return Oe;if(this._backtrack){Me=!1;continue}else return!1}else if(!this.options.flex)break}return Me?(Oe=this.test_match(Me,et[qe]),Oe!==!1?Oe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Me=this.next();return Me||this.lex()},begin:function(Me){this.conditionStack.push(Me)},popState:function(){var Me=this.conditionStack.length-1;return Me>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(Me){return Me=this.conditionStack.length-1-Math.abs(Me||0),Me>=0?this.conditionStack[Me]:"INITIAL"},pushState:function(Me){this.begin(Me)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Me,Fe,qe,et){switch(qe){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};return Je}();wt.lexer=nt;function Ke(){this.yy={}}return Ke.prototype=wt,wt.Parser=Ke,new Ke}();parser$a.parser=parser$a;const c4Detector=e=>e.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let c4ShapeArray=[],boundaryParseStack=[""],currentBoundaryParse="global",parentBoundaryParse="",boundarys=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],rels=[],title="",wrapEnabled$1=!1,c4ShapeInRow$1=4,c4BoundaryInRow$1=2;var c4Type;const getC4Type=function(){return c4Type},setC4Type=function(e){c4Type=sanitizeText$5(e,getConfig$1())},parseDirective$a=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},addRel=function(e,t,r,n,i,o,l,u,h){if(e==null||t===void 0||t===null||r===void 0||r===null||n===void 0||n===null)return;let f={};const d=rels.find(g=>g.from===t&&g.to===r);if(d?f=d:rels.push(f),f.type=e,f.from=t,f.to=r,f.label={text:n},i==null)f.techn={text:""};else if(typeof i=="object"){let[g,p]=Object.entries(i)[0];f[g]={text:p}}else f.techn={text:i};if(o==null)f.descr={text:""};else if(typeof o=="object"){let[g,p]=Object.entries(o)[0];f[g]={text:p}}else f.descr={text:o};if(typeof l=="object"){let[g,p]=Object.entries(l)[0];f[g]=p}else f.sprite=l;if(typeof u=="object"){let[g,p]=Object.entries(u)[0];f[g]=p}else f.tags=u;if(typeof h=="object"){let[g,p]=Object.entries(h)[0];f[g]=p}else f.link=h;f.wrap=autoWrap$1()},addPersonOrSystem=function(e,t,r,n,i,o,l){if(t===null||r===null)return;let u={};const h=c4ShapeArray.find(f=>f.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,c4ShapeArray.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.descr={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.descr={text:n};if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]=d}else u.sprite=i;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.typeC4Shape={text:e},u.parentBoundary=currentBoundaryParse,u.wrap=autoWrap$1()},addContainer=function(e,t,r,n,i,o,l,u){if(t===null||r===null)return;let h={};const f=c4ShapeArray.find(d=>d.alias===t);if(f&&t===f.alias?h=f:(h.alias=t,c4ShapeArray.push(h)),r==null?h.label={text:""}:h.label={text:r},n==null)h.techn={text:""};else if(typeof n=="object"){let[d,g]=Object.entries(n)[0];h[d]={text:g}}else h.techn={text:n};if(i==null)h.descr={text:""};else if(typeof i=="object"){let[d,g]=Object.entries(i)[0];h[d]={text:g}}else h.descr={text:i};if(typeof o=="object"){let[d,g]=Object.entries(o)[0];h[d]=g}else h.sprite=o;if(typeof l=="object"){let[d,g]=Object.entries(l)[0];h[d]=g}else h.tags=l;if(typeof u=="object"){let[d,g]=Object.entries(u)[0];h[d]=g}else h.link=u;h.wrap=autoWrap$1(),h.typeC4Shape={text:e},h.parentBoundary=currentBoundaryParse},addComponent=function(e,t,r,n,i,o,l,u){if(t===null||r===null)return;let h={};const f=c4ShapeArray.find(d=>d.alias===t);if(f&&t===f.alias?h=f:(h.alias=t,c4ShapeArray.push(h)),r==null?h.label={text:""}:h.label={text:r},n==null)h.techn={text:""};else if(typeof n=="object"){let[d,g]=Object.entries(n)[0];h[d]={text:g}}else h.techn={text:n};if(i==null)h.descr={text:""};else if(typeof i=="object"){let[d,g]=Object.entries(i)[0];h[d]={text:g}}else h.descr={text:i};if(typeof o=="object"){let[d,g]=Object.entries(o)[0];h[d]=g}else h.sprite=o;if(typeof l=="object"){let[d,g]=Object.entries(l)[0];h[d]=g}else h.tags=l;if(typeof u=="object"){let[d,g]=Object.entries(u)[0];h[d]=g}else h.link=u;h.wrap=autoWrap$1(),h.typeC4Shape={text:e},h.parentBoundary=currentBoundaryParse},addPersonOrSystemBoundary=function(e,t,r,n,i){if(e===null||t===null)return;let o={};const l=boundarys.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,boundarys.push(o)),t==null?o.label={text:""}:o.label={text:t},r==null)o.type={text:"system"};else if(typeof r=="object"){let[u,h]=Object.entries(r)[0];o[u]={text:h}}else o.type={text:r};if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]=h}else o.tags=n;if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=h}else o.link=i;o.parentBoundary=currentBoundaryParse,o.wrap=autoWrap$1(),parentBoundaryParse=currentBoundaryParse,currentBoundaryParse=e,boundaryParseStack.push(parentBoundaryParse)},addContainerBoundary=function(e,t,r,n,i){if(e===null||t===null)return;let o={};const l=boundarys.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,boundarys.push(o)),t==null?o.label={text:""}:o.label={text:t},r==null)o.type={text:"container"};else if(typeof r=="object"){let[u,h]=Object.entries(r)[0];o[u]={text:h}}else o.type={text:r};if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]=h}else o.tags=n;if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=h}else o.link=i;o.parentBoundary=currentBoundaryParse,o.wrap=autoWrap$1(),parentBoundaryParse=currentBoundaryParse,currentBoundaryParse=e,boundaryParseStack.push(parentBoundaryParse)},addDeploymentNode=function(e,t,r,n,i,o,l,u){if(t===null||r===null)return;let h={};const f=boundarys.find(d=>d.alias===t);if(f&&t===f.alias?h=f:(h.alias=t,boundarys.push(h)),r==null?h.label={text:""}:h.label={text:r},n==null)h.type={text:"node"};else if(typeof n=="object"){let[d,g]=Object.entries(n)[0];h[d]={text:g}}else h.type={text:n};if(i==null)h.descr={text:""};else if(typeof i=="object"){let[d,g]=Object.entries(i)[0];h[d]={text:g}}else h.descr={text:i};if(typeof l=="object"){let[d,g]=Object.entries(l)[0];h[d]=g}else h.tags=l;if(typeof u=="object"){let[d,g]=Object.entries(u)[0];h[d]=g}else h.link=u;h.nodeType=e,h.parentBoundary=currentBoundaryParse,h.wrap=autoWrap$1(),parentBoundaryParse=currentBoundaryParse,currentBoundaryParse=t,boundaryParseStack.push(parentBoundaryParse)},popBoundaryParseStack=function(){currentBoundaryParse=parentBoundaryParse,boundaryParseStack.pop(),parentBoundaryParse=boundaryParseStack.pop(),boundaryParseStack.push(parentBoundaryParse)},updateElStyle=function(e,t,r,n,i,o,l,u,h,f,d){let g=c4ShapeArray.find(p=>p.alias===t);if(!(g===void 0&&(g=boundarys.find(p=>p.alias===t),g===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];g[p]=m}else g.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];g[p]=m}else g.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];g[p]=m}else g.borderColor=i;if(o!=null)if(typeof o=="object"){let[p,m]=Object.entries(o)[0];g[p]=m}else g.shadowing=o;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];g[p]=m}else g.shape=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];g[p]=m}else g.sprite=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];g[p]=m}else g.techn=h;if(f!=null)if(typeof f=="object"){let[p,m]=Object.entries(f)[0];g[p]=m}else g.legendText=f;if(d!=null)if(typeof d=="object"){let[p,m]=Object.entries(d)[0];g[p]=m}else g.legendSprite=d}},updateRelStyle=function(e,t,r,n,i,o,l){const u=rels.find(h=>h.from===t&&h.to===r);if(u!==void 0){if(n!=null)if(typeof n=="object"){let[h,f]=Object.entries(n)[0];u[h]=f}else u.textColor=n;if(i!=null)if(typeof i=="object"){let[h,f]=Object.entries(i)[0];u[h]=f}else u.lineColor=i;if(o!=null)if(typeof o=="object"){let[h,f]=Object.entries(o)[0];u[h]=parseInt(f)}else u.offsetX=parseInt(o);if(l!=null)if(typeof l=="object"){let[h,f]=Object.entries(l)[0];u[h]=parseInt(f)}else u.offsetY=parseInt(l)}},updateLayoutConfig=function(e,t,r){let n=c4ShapeInRow$1,i=c4BoundaryInRow$1;if(typeof t=="object"){const o=Object.values(t)[0];n=parseInt(o)}else n=parseInt(t);if(typeof r=="object"){const o=Object.values(r)[0];i=parseInt(o)}else i=parseInt(r);n>=1&&(c4ShapeInRow$1=n),i>=1&&(c4BoundaryInRow$1=i)},getC4ShapeInRow=function(){return c4ShapeInRow$1},getC4BoundaryInRow=function(){return c4BoundaryInRow$1},getCurrentBoundaryParse=function(){return currentBoundaryParse},getParentBoundaryParse=function(){return parentBoundaryParse},getC4ShapeArray=function(e){return e==null?c4ShapeArray:c4ShapeArray.filter(t=>t.parentBoundary===e)},getC4Shape=function(e){return c4ShapeArray.find(t=>t.alias===e)},getC4ShapeKeys=function(e){return Object.keys(getC4ShapeArray(e))},getBoundarys=function(e){return e==null?boundarys:boundarys.filter(t=>t.parentBoundary===e)},getRels=function(){return rels},getTitle=function(){return title},setWrap$1=function(e){wrapEnabled$1=e},autoWrap$1=function(){return wrapEnabled$1},clear$d=function(){c4ShapeArray=[],boundarys=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],parentBoundaryParse="",currentBoundaryParse="global",boundaryParseStack=[""],rels=[],boundaryParseStack=[""],title="",wrapEnabled$1=!1,c4ShapeInRow$1=4,c4BoundaryInRow$1=2},LINETYPE$1={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},ARROWTYPE$1={FILLED:0,OPEN:1},PLACEMENT$1={LEFTOF:0,RIGHTOF:1,OVER:2},setTitle=function(e){title=sanitizeText$5(e,getConfig$1())},c4Db={addPersonOrSystem,addPersonOrSystemBoundary,addContainer,addContainerBoundary,addComponent,addDeploymentNode,popBoundaryParseStack,addRel,updateElStyle,updateRelStyle,updateLayoutConfig,autoWrap:autoWrap$1,setWrap:setWrap$1,getC4ShapeArray,getC4Shape,getC4ShapeKeys,getBoundarys,getCurrentBoundaryParse,getParentBoundaryParse,getRels,getTitle,getC4Type,getC4ShapeInRow,getC4BoundaryInRow,setAccTitle,getAccTitle,getAccDescription,setAccDescription,parseDirective:parseDirective$a,getConfig:()=>getConfig$1().c4,clear:clear$d,LINETYPE:LINETYPE$1,ARROWTYPE:ARROWTYPE$1,PLACEMENT:PLACEMENT$1,setTitle,setC4Type},drawRect$2=function(e,t){const r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),t.attrs!=="undefined"&&t.attrs!==null)for(let n in t.attrs)r.attr(n,t.attrs[n]);return t.class!=="undefined"&&r.attr("class",t.class),r},drawImage$1=function(e,t,r,n,i,o){const l=e.append("image");l.attr("width",t),l.attr("height",r),l.attr("x",n),l.attr("y",i);let u=o.startsWith("data:image/png;base64")?o:sanitizeUrl_1(o);l.attr("xlink:href",u)},drawEmbeddedImage$1=function(e,t,r,n){const i=e.append("use");i.attr("x",t),i.attr("y",r);var o=sanitizeUrl_1(n);i.attr("xlink:href","#"+o)},drawText$2=function(e,t){let r=0,n=0;const i=t.text.split(common.lineBreakRegex);let o=[],l=0,u=()=>t.y;if(typeof t.valign<"u"&&typeof t.textMargin<"u"&&t.textMargin>0)switch(t.valign){case"top":case"start":u=()=>Math.round(t.y+t.textMargin);break;case"middle":case"center":u=()=>Math.round(t.y+(r+n+t.textMargin)/2);break;case"bottom":case"end":u=()=>Math.round(t.y+(r+n+2*t.textMargin)-t.textMargin);break}if(typeof t.anchor<"u"&&typeof t.textMargin<"u"&&typeof t.width<"u")switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="text-after-edge",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="text-before-edge",t.alignmentBaseline="middle";break}for(let h=0;h<i.length;h++){let f=i[h];typeof t.textMargin<"u"&&t.textMargin===0&&typeof t.fontSize<"u"&&(l=h*t.fontSize);const d=e.append("text");if(d.attr("x",t.x),d.attr("y",u()),typeof t.anchor<"u"&&d.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),typeof t.fontFamily<"u"&&d.style("font-family",t.fontFamily),typeof t.fontSize<"u"&&d.style("font-size",t.fontSize),typeof t.fontWeight<"u"&&d.style("font-weight",t.fontWeight),typeof t.fill<"u"&&d.attr("fill",t.fill),typeof t.class<"u"&&d.attr("class",t.class),typeof t.dy<"u"?d.attr("dy",t.dy):l!==0&&d.attr("dy",l),t.tspan){const g=d.append("tspan");g.attr("x",t.x),typeof t.fill<"u"&&g.attr("fill",t.fill),g.text(f)}else d.text(f);typeof t.valign<"u"&&typeof t.textMargin<"u"&&t.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),o.push(d)}return o},drawLabel$2=function(e,t){function r(i,o,l,u,h){return i+","+o+" "+(i+l)+","+o+" "+(i+l)+","+(o+u-h)+" "+(i+l-h*1.2)+","+(o+u)+" "+i+","+(o+u)}const n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,drawText$2(e,t),n},drawRels$1=(e,t,r)=>{const n=e.append("g");let i=0;for(let o of t){let l=o.textColor?o.textColor:"#444444",u=o.lineColor?o.lineColor:"#444444",h=o.offsetX?parseInt(o.offsetX):0,f=o.offsetY?parseInt(o.offsetY):0,d="";if(i===0){let p=n.append("line");p.attr("x1",o.startPoint.x),p.attr("y1",o.startPoint.y),p.attr("x2",o.endPoint.x),p.attr("y2",o.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",u),p.style("fill","none"),o.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(o.type==="birel"||o.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)"),i=-1}else{let p=n.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",u).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",o.startPoint.x).replaceAll("starty",o.startPoint.y).replaceAll("controlx",o.startPoint.x+(o.endPoint.x-o.startPoint.x)/2-(o.endPoint.x-o.startPoint.x)/4).replaceAll("controly",o.startPoint.y+(o.endPoint.y-o.startPoint.y)/2).replaceAll("stopx",o.endPoint.x).replaceAll("stopy",o.endPoint.y)),o.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(o.type==="birel"||o.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)")}let g=r.messageFont();_drawTextCandidateFunc$2(r)(o.label.text,n,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+h,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+f,o.label.width,o.label.height,{fill:l},g),o.techn&&o.techn.text!==""&&(g=r.messageFont(),_drawTextCandidateFunc$2(r)("["+o.techn.text+"]",n,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+h,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+r.messageFontSize+5+f,Math.max(o.label.width,o.techn.width),o.techn.height,{fill:l,"font-style":"italic"},g))}},drawBoundary$1=function(e,t,r){const n=e.append("g");let i=t.bgColor?t.bgColor:"none",o=t.borderColor?t.borderColor:"#444444",l=t.fontColor?t.fontColor:"black",u={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(u={"stroke-width":1});let h={x:t.x,y:t.y,fill:i,stroke:o,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:u};drawRect$2(n,h);let f=r.boundaryFont();f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=l,_drawTextCandidateFunc$2(r)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},f),t.type&&t.type.text!==""&&(f=r.boundaryFont(),f.fontColor=l,_drawTextCandidateFunc$2(r)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},f)),t.descr&&t.descr.text!==""&&(f=r.boundaryFont(),f.fontSize=f.fontSize-2,f.fontColor=l,_drawTextCandidateFunc$2(r)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},f))},drawC4Shape=function(e,t,r){let n=t.bgColor?t.bgColor:r[t.typeC4Shape.text+"_bg_color"],i=t.borderColor?t.borderColor:r[t.typeC4Shape.text+"_border_color"],o=t.fontColor?t.fontColor:"#FFFFFF",l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const u=e.append("g");u.attr("class","person-man");const h=getNoteRect$2();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=t.x,h.y=t.y,h.fill=n,h.width=t.width,h.height=t.height,h.style="stroke:"+i+";stroke-width:0.5;",h.rx=2.5,h.ry=2.5,drawRect$2(u,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":u.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),u.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":u.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),u.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let f=getC4ShapeFont(r,t.typeC4Shape.text);switch(u.append("text").attr("fill",o).attr("font-family",f.fontFamily).attr("font-size",f.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":drawImage$1(u,48,48,t.x+t.width/2-24,t.y+t.image.Y,l);break}let d=r[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=o,_drawTextCandidateFunc$2(r)(t.label.text,u,t.x,t.y+t.label.Y,t.width,t.height,{fill:o},d),d=r[t.typeC4Shape.text+"Font"](),d.fontColor=o,t.thchn&&t.thchn.text!==""?_drawTextCandidateFunc$2(r)(t.thchn.text,u,t.x,t.y+t.thchn.Y,t.width,t.height,{fill:o,"font-style":"italic"},d):t.type&&t.type.text!==""&&_drawTextCandidateFunc$2(r)(t.type.text,u,t.x,t.y+t.type.Y,t.width,t.height,{fill:o,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=r.personFont(),d.fontColor=o,_drawTextCandidateFunc$2(r)(t.descr.text,u,t.x,t.y+t.descr.Y,t.width,t.height,{fill:o},d)),t.height},insertDatabaseIcon$1=function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},insertComputerIcon$1=function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},insertClockIcon$1=function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},insertArrowHead$1=function(e){e.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")},insertArrowEnd=function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},insertArrowFilledHead$1=function(e){e.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")},insertDynamicNumber=function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead$1=function(e){const r=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.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"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},getTextObj$2=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}},getNoteRect$2=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},getC4ShapeFont=(e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),_drawTextCandidateFunc$2=function(){function e(i,o,l,u,h,f,d){const g=o.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(i);n(g,d)}function t(i,o,l,u,h,f,d,g){const{fontSize:p,fontFamily:m,fontWeight:b}=g,$=i.split(common.lineBreakRegex);for(let S=0;S<$.length;S++){const R=S*p-p*($.length-1)/2,L=o.append("text").attr("x",l+h/2).attr("y",u).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",b).style("font-family",m);L.append("tspan").attr("dy",R).text($[S]).attr("alignment-baseline","mathematical"),n(L,d)}}function r(i,o,l,u,h,f,d,g){const p=o.append("switch"),b=p.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,p,l,u,h,f,d,g),n(b,d)}function n(i,o){for(const l in o)o.hasOwnProperty(l)&&i.attr(l,o[l])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?e:t}}(),svgDraw$3={drawRect:drawRect$2,drawText:drawText$2,drawLabel:drawLabel$2,drawBoundary:drawBoundary$1,drawC4Shape,drawRels:drawRels$1,drawImage:drawImage$1,drawEmbeddedImage:drawEmbeddedImage$1,insertArrowHead:insertArrowHead$1,insertArrowEnd,insertArrowFilledHead:insertArrowFilledHead$1,insertDynamicNumber,insertArrowCrossHead:insertArrowCrossHead$1,insertDatabaseIcon:insertDatabaseIcon$1,insertComputerIcon:insertComputerIcon$1,insertClockIcon:insertClockIcon$1,getTextObj:getTextObj$2,getNoteRect:getNoteRect$2,sanitizeUrl:sanitizeUrl_1};let globalBoundaryMaxX=0,globalBoundaryMaxY=0,c4ShapeInRow=4,c4BoundaryInRow=2;parser$a.yy=c4Db;let conf$a={};class Bounds{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,setConf$a(t.db.getConfig())}setData(t,r,n,i){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(t,r,n,i){typeof t[r]>"u"?t[r]=n:t[r]=i(n,t[r])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+t.margin*2,n=r+t.width,i=this.nextData.starty+t.margin*2,o=i+t.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>c4ShapeInRow)&&(r=this.nextData.startx+t.margin+conf$a.nextLinePaddingX,i=this.nextData.stopy+t.margin*2,this.nextData.stopx=n=r+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=o=i+t.height,this.nextData.cnt=1),t.x=r,t.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",o,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",o,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},setConf$a(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const setConf$a=function(e){assignWithDepth(conf$a,e),e.fontFamily&&(conf$a.personFontFamily=conf$a.systemFontFamily=conf$a.messageFontFamily=e.fontFamily),e.fontSize&&(conf$a.personFontSize=conf$a.systemFontSize=conf$a.messageFontSize=e.fontSize),e.fontWeight&&(conf$a.personFontWeight=conf$a.systemFontWeight=conf$a.messageFontWeight=e.fontWeight)},c4ShapeFont=(e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),boundaryFont=e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),messageFont$1=e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight});function calcC4ShapeTextWH(e,t,r,n,i){if(!t[e].width)if(r)t[e].text=wrapLabel(t[e].text,i,n),t[e].textLines=t[e].text.split(common.lineBreakRegex).length,t[e].width=i,t[e].height=calculateTextHeight(t[e].text,n);else{let o=t[e].text.split(common.lineBreakRegex);t[e].textLines=o.length;let l=0;t[e].height=0,t[e].width=0;for(let u=0;u<o.length;u++)t[e].width=Math.max(calculateTextWidth(o[u],n),t[e].width),l=calculateTextHeight(o[u],n),t[e].height=t[e].height+l}}const drawBoundary=function(e,t,r){t.x=r.data.startx,t.y=r.data.starty,t.width=r.data.stopx-r.data.startx,t.height=r.data.stopy-r.data.starty,t.label.y=conf$a.c4ShapeMargin-35;let n=t.wrap&&conf$a.wrap,i=boundaryFont(conf$a);i.fontSize=i.fontSize+2,i.fontWeight="bold";let o=calculateTextWidth(t.label.text,i);calcC4ShapeTextWH("label",t,n,i,o),svgDraw$3.drawBoundary(e,t,conf$a)},drawC4ShapeArray=function(e,t,r,n){let i=0;for(let o=0;o<n.length;o++){i=0;const l=r[n[o]];let u=c4ShapeFont(conf$a,l.typeC4Shape.text);switch(u.fontSize=u.fontSize-2,l.typeC4Shape.width=calculateTextWidth("<<"+l.typeC4Shape.text+">>",u),l.typeC4Shape.height=u.fontSize+2,l.typeC4Shape.Y=conf$a.c4ShapePadding,i=l.typeC4Shape.Y+l.typeC4Shape.height-4,l.image={width:0,height:0,Y:0},l.typeC4Shape.text){case"person":case"external_person":l.image.width=48,l.image.height=48,l.image.Y=i,i=l.image.Y+l.image.height;break}l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=i,i=l.image.Y+l.image.height);let h=l.wrap&&conf$a.wrap,f=conf$a.width-conf$a.c4ShapePadding*2,d=c4ShapeFont(conf$a,l.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",calcC4ShapeTextWH("label",l,h,d,f),l.label.Y=i+8,i=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let m=c4ShapeFont(conf$a,l.typeC4Shape.text);calcC4ShapeTextWH("type",l,h,m,f),l.type.Y=i+5,i=l.type.Y+l.type.height}else if(l.techn&&l.techn.text!==""){l.techn.text="["+l.techn.text+"]";let m=c4ShapeFont(conf$a,l.techn.text);calcC4ShapeTextWH("techn",l,h,m,f),l.techn.Y=i+5,i=l.techn.Y+l.techn.height}let g=i,p=l.label.width;if(l.descr&&l.descr.text!==""){let m=c4ShapeFont(conf$a,l.typeC4Shape.text);calcC4ShapeTextWH("descr",l,h,m,f),l.descr.Y=i+20,i=l.descr.Y+l.descr.height,p=Math.max(l.label.width,l.descr.width),g=i-l.descr.textLines*5}p=p+conf$a.c4ShapePadding,l.width=Math.max(l.width||conf$a.width,p,conf$a.width),l.height=Math.max(l.height||conf$a.height,g,conf$a.height),l.margin=l.margin||conf$a.c4ShapeMargin,e.insert(l),svgDraw$3.drawC4Shape(t,l,conf$a)}e.bumpLastMargin(conf$a.c4ShapeMargin)};class Point{constructor(t,r){this.x=t,this.y=r}}let getIntersectPoint=function(e,t){let r=e.x,n=e.y,i=t.x,o=t.y,l=r+e.width/2,u=n+e.height/2,h=Math.abs(r-i),f=Math.abs(n-o),d=f/h,g=e.height/e.width,p=null;return n==o&&r<i?p=new Point(r+e.width,u):n==o&&r>i?p=new Point(r,u):r==i&&n<o?p=new Point(l,n+e.height):r==i&&n>o&&(p=new Point(l,n)),r>i&&n<o?g>=d?p=new Point(r,u+d*e.width/2):p=new Point(l-h/f*e.height/2,n+e.height):r<i&&n<o?g>=d?p=new Point(r+e.width,u+d*e.width/2):p=new Point(l+h/f*e.height/2,n+e.height):r<i&&n>o?g>=d?p=new Point(r+e.width,u-d*e.width/2):p=new Point(l+e.height/2*h/f,n):r>i&&n>o&&(g>=d?p=new Point(r,u-e.width/2*d):p=new Point(l-e.height/2*h/f,n)),p},getIntersectPoints=function(e,t){let r={x:0,y:0};r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=getIntersectPoint(e,r);r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=getIntersectPoint(t,r);return{startPoint:n,endPoint:i}};const drawRels=function(e,t,r,n){let i=0;for(let o of t){i=i+1;let l=o.wrap&&conf$a.wrap,u=messageFont$1(conf$a);n.db.getC4Type()==="C4Dynamic"&&(o.label.text=i+": "+o.label.text);let f=calculateTextWidth(o.label.text,u);calcC4ShapeTextWH("label",o,l,u,f),o.techn&&o.techn.text!==""&&(f=calculateTextWidth(o.techn.text,u),calcC4ShapeTextWH("techn",o,l,u,f)),o.descr&&o.descr.text!==""&&(f=calculateTextWidth(o.descr.text,u),calcC4ShapeTextWH("descr",o,l,u,f));let d=r(o.from),g=r(o.to),p=getIntersectPoints(d,g);o.startPoint=p.startPoint,o.endPoint=p.endPoint}svgDraw$3.drawRels(e,t,conf$a)};function drawInsideBoundary(e,t,r,n,i){let o=new Bounds(i);o.data.widthLimit=r.data.widthLimit/Math.min(c4BoundaryInRow,n.length);for(let l=0;l<n.length;l++){let u=n[l],h=0;u.image={width:0,height:0,Y:0},u.sprite&&(u.image.width=48,u.image.height=48,u.image.Y=h,h=u.image.Y+u.image.height);let f=u.wrap&&conf$a.wrap,d=boundaryFont(conf$a);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",calcC4ShapeTextWH("label",u,f,d,o.data.widthLimit),u.label.Y=h+8,h=u.label.Y+u.label.height,u.type&&u.type.text!==""){u.type.text="["+u.type.text+"]";let b=boundaryFont(conf$a);calcC4ShapeTextWH("type",u,f,b,o.data.widthLimit),u.type.Y=h+5,h=u.type.Y+u.type.height}if(u.descr&&u.descr.text!==""){let b=boundaryFont(conf$a);b.fontSize=b.fontSize-2,calcC4ShapeTextWH("descr",u,f,b,o.data.widthLimit),u.descr.Y=h+20,h=u.descr.Y+u.descr.height}if(l==0||l%c4BoundaryInRow===0){let b=r.data.startx+conf$a.diagramMarginX,$=r.data.stopy+conf$a.diagramMarginY+h;o.setData(b,b,$,$)}else{let b=o.data.stopx!==o.data.startx?o.data.stopx+conf$a.diagramMarginX:o.data.startx,$=o.data.starty;o.setData(b,b,$,$)}o.name=u.alias;let g=i.db.getC4ShapeArray(u.alias),p=i.db.getC4ShapeKeys(u.alias);p.length>0&&drawC4ShapeArray(o,e,g,p),t=u.alias;let m=i.db.getBoundarys(t);m.length>0&&drawInsideBoundary(e,t,o,m,i),u.alias!=="global"&&drawBoundary(e,u,o),r.data.stopy=Math.max(o.data.stopy+conf$a.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(o.data.stopx+conf$a.c4ShapeMargin,r.data.stopx),globalBoundaryMaxX=Math.max(globalBoundaryMaxX,r.data.stopx),globalBoundaryMaxY=Math.max(globalBoundaryMaxY,r.data.stopy)}}const draw$e=function(e,t,r,n){conf$a=getConfig$1().c4;const i=getConfig$1().securityLevel;let o;i==="sandbox"&&(o=select$1("#i"+t));const l=select$1(i==="sandbox"?o.nodes()[0].contentDocument.body:"body");let u=n.db;n.db.setWrap(conf$a.wrap),c4ShapeInRow=u.getC4ShapeInRow(),c4BoundaryInRow=u.getC4BoundaryInRow(),log$1.debug(`C:${JSON.stringify(conf$a,null,2)}`);const h=i==="sandbox"?l.select(`[id="${t}"]`):select$1(`[id="${t}"]`);svgDraw$3.insertComputerIcon(h),svgDraw$3.insertDatabaseIcon(h),svgDraw$3.insertClockIcon(h);let f=new Bounds(n);f.setData(conf$a.diagramMarginX,conf$a.diagramMarginX,conf$a.diagramMarginY,conf$a.diagramMarginY),f.data.widthLimit=screen.availWidth,globalBoundaryMaxX=conf$a.diagramMarginX,globalBoundaryMaxY=conf$a.diagramMarginY;const d=n.db.getTitle();let g=n.db.getBoundarys("");drawInsideBoundary(h,"",f,g,n),svgDraw$3.insertArrowHead(h),svgDraw$3.insertArrowEnd(h),svgDraw$3.insertArrowCrossHead(h),svgDraw$3.insertArrowFilledHead(h),drawRels(h,n.db.getRels(),n.db.getC4Shape,n),f.data.stopx=globalBoundaryMaxX,f.data.stopy=globalBoundaryMaxY;const p=f.data;let b=p.stopy-p.starty+2*conf$a.diagramMarginY;const S=p.stopx-p.startx+2*conf$a.diagramMarginX;d&&h.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*conf$a.diagramMarginX).attr("y",p.starty+conf$a.diagramMarginY),configureSvgSize(h,b,S,conf$a.useMaxWidth);const R=d?60:0;h.attr("viewBox",p.startx-conf$a.diagramMarginX+" -"+(conf$a.diagramMarginY+R)+" "+S+" "+(b+R)),addSVGAccessibilityFields(parser$a.yy,h,t),log$1.debug("models:",p)},c4Renderer={drawPersonOrSystemArray:drawC4ShapeArray,drawBoundary,setConf:setConf$a,draw:draw$e};var parser$9=function(){var e=function(pe,J,oe,ee){for(oe=oe||{},ee=pe.length;ee--;oe[pe[ee]]=J);return oe},t=[1,3],r=[1,7],n=[1,8],i=[1,9],o=[1,10],l=[1,13],u=[1,12],h=[1,16,25],f=[1,20],d=[1,31],g=[1,32],p=[1,33],m=[1,35],b=[1,38],$=[1,36],S=[1,37],R=[1,39],L=[1,40],N=[1,41],F=[1,42],H=[1,45],G=[1,46],P=[1,47],V=[1,48],z=[16,25],W=[1,62],T=[1,63],U=[1,64],I=[1,65],ae=[1,66],Q=[1,67],ue=[1,68],_e=[16,25,32,44,45,53,56,57,58,59,60,61,62,67,69],ke=[16,25,30,32,44,45,49,53,56,57,58,59,60,61,62,67,69,84,85,86,87],de=[5,8,9,10,11,16,19,23,25],ce=[53,84,85,86,87],he=[53,61,62,84,85,86,87],Se=[53,56,57,58,59,60,84,85,86,87],ve=[16,25,32],me=[1,100],Ce={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,CLASS:43,STYLE_SEPARATOR:44,STRUCT_START:45,members:46,STRUCT_STOP:47,ANNOTATION_START:48,ANNOTATION_END:49,MEMBER:50,SEPARATOR:51,relation:52,STR:53,relationType:54,lineType:55,AGGREGATION:56,EXTENSION:57,COMPOSITION:58,DEPENDENCY:59,LOLLIPOP:60,LINE:61,DOTTED_LINE:62,CALLBACK:63,LINK:64,LINK_TARGET:65,CLICK:66,CALLBACK_NAME:67,CALLBACK_ARGS:68,HREF:69,CSSCLASS:70,commentToken:71,textToken:72,graphCodeTokens:73,textNoTagsToken:74,TAGSTART:75,TAGEND:76,"==":77,"--":78,PCT:79,DEFAULT:80,SPACE:81,MINUS:82,keywords:83,UNICODE_TEXT:84,NUM:85,ALPHA:86,BQUOTE_STR:87,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"CLASS",44:"STYLE_SEPARATOR",45:"STRUCT_START",47:"STRUCT_STOP",48:"ANNOTATION_START",49:"ANNOTATION_END",50:"MEMBER",51:"SEPARATOR",53:"STR",56:"AGGREGATION",57:"EXTENSION",58:"COMPOSITION",59:"DEPENDENCY",60:"LOLLIPOP",61:"LINE",62:"DOTTED_LINE",63:"CALLBACK",64:"LINK",65:"LINK_TARGET",66:"CLICK",67:"CALLBACK_NAME",68:"CALLBACK_ARGS",69:"HREF",70:"CSSCLASS",73:"graphCodeTokens",75:"TAGSTART",76:"TAGEND",77:"==",78:"--",79:"PCT",80:"DEFAULT",81:"SPACE",82:"MINUS",83:"keywords",84:"UNICODE_TEXT",85:"NUM",86:"ALPHA",87:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[46,1],[46,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[52,3],[52,2],[52,2],[52,1],[54,1],[54,1],[54,1],[54,1],[54,1],[55,1],[55,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[71,1],[71,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[74,1],[74,1],[74,1],[74,1],[28,1],[28,1],[28,1],[29,1]],performAction:function(J,oe,ee,Z,ie,se,te){var fe=se.length-1;switch(ie){case 5:Z.setDirection("TB");break;case 6:Z.setDirection("BT");break;case 7:Z.setDirection("RL");break;case 8:Z.setDirection("LR");break;case 12:Z.parseDirective("%%{","open_directive");break;case 13:Z.parseDirective(se[fe],"type_directive");break;case 14:se[fe]=se[fe].trim().replace(/'/g,'"'),Z.parseDirective(se[fe],"arg_directive");break;case 15:Z.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=se[fe];break;case 22:this.$=se[fe-1]+se[fe];break;case 23:case 24:this.$=se[fe-1]+"~"+se[fe];break;case 25:Z.addRelation(se[fe]);break;case 26:se[fe-1].title=Z.cleanupLabel(se[fe]),Z.addRelation(se[fe-1]);break;case 34:this.$=se[fe].trim(),Z.setAccTitle(this.$);break;case 35:case 36:this.$=se[fe].trim(),Z.setAccDescription(this.$);break;case 37:Z.addClass(se[fe]);break;case 38:Z.addClass(se[fe-2]),Z.setCssClass(se[fe-2],se[fe]);break;case 39:Z.addClass(se[fe-3]),Z.addMembers(se[fe-3],se[fe-1]);break;case 40:Z.addClass(se[fe-5]),Z.setCssClass(se[fe-5],se[fe-3]),Z.addMembers(se[fe-5],se[fe-1]);break;case 41:Z.addAnnotation(se[fe],se[fe-2]);break;case 42:this.$=[se[fe]];break;case 43:se[fe].push(se[fe-1]),this.$=se[fe];break;case 44:break;case 45:Z.addMember(se[fe-1],Z.cleanupLabel(se[fe]));break;case 46:break;case 47:break;case 48:this.$={id1:se[fe-2],id2:se[fe],relation:se[fe-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:se[fe-3],id2:se[fe],relation:se[fe-1],relationTitle1:se[fe-2],relationTitle2:"none"};break;case 50:this.$={id1:se[fe-3],id2:se[fe],relation:se[fe-2],relationTitle1:"none",relationTitle2:se[fe-1]};break;case 51:this.$={id1:se[fe-4],id2:se[fe],relation:se[fe-2],relationTitle1:se[fe-3],relationTitle2:se[fe-1]};break;case 52:this.$={type1:se[fe-2],type2:se[fe],lineType:se[fe-1]};break;case 53:this.$={type1:"none",type2:se[fe],lineType:se[fe-1]};break;case 54:this.$={type1:se[fe-1],type2:"none",lineType:se[fe]};break;case 55:this.$={type1:"none",type2:"none",lineType:se[fe]};break;case 56:this.$=Z.relationType.AGGREGATION;break;case 57:this.$=Z.relationType.EXTENSION;break;case 58:this.$=Z.relationType.COMPOSITION;break;case 59:this.$=Z.relationType.DEPENDENCY;break;case 60:this.$=Z.relationType.LOLLIPOP;break;case 61:this.$=Z.lineType.LINE;break;case 62:this.$=Z.lineType.DOTTED_LINE;break;case 63:case 69:this.$=se[fe-2],Z.setClickEvent(se[fe-1],se[fe]);break;case 64:case 70:this.$=se[fe-3],Z.setClickEvent(se[fe-2],se[fe-1]),Z.setTooltip(se[fe-2],se[fe]);break;case 65:case 73:this.$=se[fe-2],Z.setLink(se[fe-1],se[fe]);break;case 66:this.$=se[fe-3],Z.setLink(se[fe-2],se[fe-1],se[fe]);break;case 67:case 75:this.$=se[fe-3],Z.setLink(se[fe-2],se[fe-1]),Z.setTooltip(se[fe-2],se[fe]);break;case 68:case 76:this.$=se[fe-4],Z.setLink(se[fe-3],se[fe-2],se[fe]),Z.setTooltip(se[fe-3],se[fe-1]);break;case 71:this.$=se[fe-3],Z.setClickEvent(se[fe-2],se[fe-1],se[fe]);break;case 72:this.$=se[fe-4],Z.setClickEvent(se[fe-3],se[fe-2],se[fe-1]),Z.setTooltip(se[fe-3],se[fe]);break;case 74:this.$=se[fe-3],Z.setLink(se[fe-2],se[fe-1],se[fe]);break;case 77:Z.setCssClass(se[fe-1],se[fe]);break}},table:[{3:1,4:2,5:t,6:4,7:5,8:r,9:n,10:i,11:o,12:6,13:11,19:l,23:u},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:t,6:4,7:5,8:r,9:n,10:i,11:o,12:6,13:11,19:l,23:u},{1:[2,9]},e(h,[2,5]),e(h,[2,6]),e(h,[2,7]),e(h,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:f},e([17,22],[2,13]),{6:30,7:29,8:r,9:n,10:i,11:o,13:11,19:l,24:21,26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:d,40:g,42:p,43:m,48:b,50:$,51:S,63:R,64:L,66:N,70:F,84:H,85:G,86:P,87:V},{16:[1,49]},{18:50,21:[1,51]},{16:[2,15]},{25:[1,52]},{16:[1,53],25:[2,17]},e(z,[2,25],{32:[1,54]}),e(z,[2,27]),e(z,[2,28]),e(z,[2,29]),e(z,[2,30]),e(z,[2,31]),e(z,[2,32]),e(z,[2,33]),{39:[1,55]},{41:[1,56]},e(z,[2,36]),e(z,[2,44],{52:57,54:60,55:61,32:[1,59],53:[1,58],56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue}),{27:69,28:43,29:44,84:H,85:G,86:P,87:V},e(z,[2,46]),e(z,[2,47]),{28:70,84:H,85:G,86:P},{27:71,28:43,29:44,84:H,85:G,86:P,87:V},{27:72,28:43,29:44,84:H,85:G,86:P,87:V},{27:73,28:43,29:44,84:H,85:G,86:P,87:V},{53:[1,74]},e(_e,[2,20],{28:43,29:44,27:75,30:[1,76],84:H,85:G,86:P,87:V}),e(_e,[2,21],{30:[1,77]}),e(ke,[2,91]),e(ke,[2,92]),e(ke,[2,93]),e([16,25,30,32,44,45,53,56,57,58,59,60,61,62,67,69],[2,94]),e(de,[2,10]),{15:78,22:f},{22:[2,14]},{1:[2,16]},{6:30,7:29,8:r,9:n,10:i,11:o,13:11,19:l,24:79,25:[2,18],26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:d,40:g,42:p,43:m,48:b,50:$,51:S,63:R,64:L,66:N,70:F,84:H,85:G,86:P,87:V},e(z,[2,26]),e(z,[2,34]),e(z,[2,35]),{27:80,28:43,29:44,53:[1,81],84:H,85:G,86:P,87:V},{52:82,54:60,55:61,56:W,57:T,58:U,59:I,60:ae,61:Q,62:ue},e(z,[2,45]),{55:83,61:Q,62:ue},e(ce,[2,55],{54:84,56:W,57:T,58:U,59:I,60:ae}),e(he,[2,56]),e(he,[2,57]),e(he,[2,58]),e(he,[2,59]),e(he,[2,60]),e(Se,[2,61]),e(Se,[2,62]),e(z,[2,37],{44:[1,85],45:[1,86]}),{49:[1,87]},{53:[1,88]},{53:[1,89]},{67:[1,90],69:[1,91]},{28:92,84:H,85:G,86:P},e(_e,[2,22]),e(_e,[2,23]),e(_e,[2,24]),{16:[1,93]},{25:[2,19]},e(ve,[2,48]),{27:94,28:43,29:44,84:H,85:G,86:P,87:V},{27:95,28:43,29:44,53:[1,96],84:H,85:G,86:P,87:V},e(ce,[2,54],{54:97,56:W,57:T,58:U,59:I,60:ae}),e(ce,[2,53]),{28:98,84:H,85:G,86:P},{46:99,50:me},{27:101,28:43,29:44,84:H,85:G,86:P,87:V},e(z,[2,63],{53:[1,102]}),e(z,[2,65],{53:[1,104],65:[1,103]}),e(z,[2,69],{53:[1,105],68:[1,106]}),e(z,[2,73],{53:[1,108],65:[1,107]}),e(z,[2,77]),e(de,[2,11]),e(ve,[2,50]),e(ve,[2,49]),{27:109,28:43,29:44,84:H,85:G,86:P,87:V},e(ce,[2,52]),e(z,[2,38],{45:[1,110]}),{47:[1,111]},{46:112,47:[2,42],50:me},e(z,[2,41]),e(z,[2,64]),e(z,[2,66]),e(z,[2,67],{65:[1,113]}),e(z,[2,70]),e(z,[2,71],{53:[1,114]}),e(z,[2,74]),e(z,[2,75],{65:[1,115]}),e(ve,[2,51]),{46:116,50:me},e(z,[2,39]),{47:[2,43]},e(z,[2,68]),e(z,[2,72]),e(z,[2,76]),{47:[1,117]},e(z,[2,40])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],51:[2,14],52:[2,16],79:[2,19],112:[2,43]},parseError:function(J,oe){if(oe.recoverable)this.trace(J);else{var ee=new Error(J);throw ee.hash=oe,ee}},parse:function(J){var oe=this,ee=[0],Z=[],ie=[null],se=[],te=this.table,fe="",we=0,Ye=0,He=2,je=1,Pe=se.slice.call(arguments,1),Ee=Object.create(this.lexer),Ie={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(Ie.yy[Le]=this.yy[Le]);Ee.setInput(J,Ie.yy),Ie.yy.lexer=Ee,Ie.yy.parser=this,typeof Ee.yylloc>"u"&&(Ee.yylloc={});var Be=Ee.yylloc;se.push(Be);var Te=Ee.options&&Ee.options.ranges;typeof Ie.yy.parseError=="function"?this.parseError=Ie.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(){var Fe;return Fe=Z.pop()||Ee.lex()||je,typeof Fe!="number"&&(Fe instanceof Array&&(Z=Fe,Fe=Z.pop()),Fe=oe.symbols_[Fe]||Fe),Fe}for(var Ge,rt,it,st,wt={},nt,Ke,Je,Oe;;){if(rt=ee[ee.length-1],this.defaultActions[rt]?it=this.defaultActions[rt]:((Ge===null||typeof Ge>"u")&&(Ge=dt()),it=te[rt]&&te[rt][Ge]),typeof it>"u"||!it.length||!it[0]){var Me="";Oe=[];for(nt in te[rt])this.terminals_[nt]&&nt>He&&Oe.push("'"+this.terminals_[nt]+"'");Ee.showPosition?Me="Parse error on line "+(we+1)+`:
|
|
`+Ee.showPosition()+`
|
|
Expecting `+Oe.join(", ")+", got '"+(this.terminals_[Ge]||Ge)+"'":Me="Parse error on line "+(we+1)+": Unexpected "+(Ge==je?"end of input":"'"+(this.terminals_[Ge]||Ge)+"'"),this.parseError(Me,{text:Ee.match,token:this.terminals_[Ge]||Ge,line:Ee.yylineno,loc:Be,expected:Oe})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+rt+", token: "+Ge);switch(it[0]){case 1:ee.push(Ge),ie.push(Ee.yytext),se.push(Ee.yylloc),ee.push(it[1]),Ge=null,Ye=Ee.yyleng,fe=Ee.yytext,we=Ee.yylineno,Be=Ee.yylloc;break;case 2:if(Ke=this.productions_[it[1]][1],wt.$=ie[ie.length-Ke],wt._$={first_line:se[se.length-(Ke||1)].first_line,last_line:se[se.length-1].last_line,first_column:se[se.length-(Ke||1)].first_column,last_column:se[se.length-1].last_column},Te&&(wt._$.range=[se[se.length-(Ke||1)].range[0],se[se.length-1].range[1]]),st=this.performAction.apply(wt,[fe,Ye,we,Ie.yy,it[1],ie,se].concat(Pe)),typeof st<"u")return st;Ke&&(ee=ee.slice(0,-1*Ke*2),ie=ie.slice(0,-1*Ke),se=se.slice(0,-1*Ke)),ee.push(this.productions_[it[1]][0]),ie.push(wt.$),se.push(wt._$),Je=te[ee[ee.length-2]][ee[ee.length-1]],ee.push(Je);break;case 3:return!0}}return!0}},xe=function(){var pe={EOF:1,parseError:function(oe,ee){if(this.yy.parser)this.yy.parser.parseError(oe,ee);else throw new Error(oe)},setInput:function(J,oe){return this.yy=oe||this.yy||{},this._input=J,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 J=this._input[0];this.yytext+=J,this.yyleng++,this.offset++,this.match+=J,this.matched+=J;var oe=J.match(/(?:\r\n?|\n).*/g);return oe?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),J},unput:function(J){var oe=J.length,ee=J.split(/(?:\r\n?|\n)/g);this._input=J+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-oe),this.offset-=oe;var Z=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),ee.length-1&&(this.yylineno-=ee.length-1);var ie=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:ee?(ee.length===Z.length?this.yylloc.first_column:0)+Z[Z.length-ee.length].length-ee[0].length:this.yylloc.first_column-oe},this.options.ranges&&(this.yylloc.range=[ie[0],ie[0]+this.yyleng-oe]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(J){this.unput(this.match.slice(J))},pastInput:function(){var J=this.matched.substr(0,this.matched.length-this.match.length);return(J.length>20?"...":"")+J.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var J=this.match;return J.length<20&&(J+=this._input.substr(0,20-J.length)),(J.substr(0,20)+(J.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var J=this.pastInput(),oe=new Array(J.length+1).join("-");return J+this.upcomingInput()+`
|
|
`+oe+"^"},test_match:function(J,oe){var ee,Z,ie;if(this.options.backtrack_lexer&&(ie={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&&(ie.yylloc.range=this.yylloc.range.slice(0))),Z=J[0].match(/(?:\r\n?|\n).*/g),Z&&(this.yylineno+=Z.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Z?Z[Z.length-1].length-Z[Z.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+J[0].length},this.yytext+=J[0],this.match+=J[0],this.matches=J,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(J[0].length),this.matched+=J[0],ee=this.performAction.call(this,this.yy,this,oe,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ee)return ee;if(this._backtrack){for(var se in ie)this[se]=ie[se];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var J,oe,ee,Z;this._more||(this.yytext="",this.match="");for(var ie=this._currentRules(),se=0;se<ie.length;se++)if(ee=this._input.match(this.rules[ie[se]]),ee&&(!oe||ee[0].length>oe[0].length)){if(oe=ee,Z=se,this.options.backtrack_lexer){if(J=this.test_match(ee,ie[se]),J!==!1)return J;if(this._backtrack){oe=!1;continue}else return!1}else if(!this.options.flex)break}return oe?(J=this.test_match(oe,ie[Z]),J!==!1?J:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var oe=this.next();return oe||this.lex()},begin:function(oe){this.conditionStack.push(oe)},popState:function(){var oe=this.conditionStack.length-1;return oe>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(oe){return oe=this.conditionStack.length-1-Math.abs(oe||0),oe>=0?this.conditionStack[oe]:"INITIAL"},pushState:function(oe){this.begin(oe)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(oe,ee,Z,ie){switch(Z){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),38;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),40;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),45;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),47;case 27:break;case 28:return"MEMBER";case 29:return 43;case 30:return 70;case 31:return 63;case 32:return 64;case 33:return 66;case 34:return 48;case 35:return 49;case 36:this.begin("generic");break;case 37:this.popState();break;case 38:return"GENERICTYPE";case 39:this.begin("string");break;case 40:this.popState();break;case 41:return"STR";case 42:this.begin("bqstring");break;case 43:this.popState();break;case 44:return"BQUOTE_STR";case 45:this.begin("href");break;case 46:this.popState();break;case 47:return 69;case 48:this.begin("callback_name");break;case 49:this.popState();break;case 50:this.popState(),this.begin("callback_args");break;case 51:return 67;case 52:this.popState();break;case 53:return 68;case 54:return 65;case 55:return 65;case 56:return 65;case 57:return 65;case 58:return 57;case 59:return 57;case 60:return 59;case 61:return 59;case 62:return 58;case 63:return 56;case 64:return 60;case 65:return 61;case 66:return 62;case 67:return 32;case 68:return 44;case 69:return 82;case 70:return"DOT";case 71:return"PLUS";case 72:return 79;case 73:return"EQUALS";case 74:return"EQUALS";case 75:return 86;case 76:return"PUNCTUATION";case 77:return 85;case 78:return 84;case 79:return 81;case 80:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\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)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{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:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[52,53],inclusive:!1},callback_name:{rules:[49,50,51],inclusive:!1},href:{rules:[46,47],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[37,38],inclusive:!1},bqstring:{rules:[43,44],inclusive:!1},string:{rules:[40,41],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,39,42,45,48,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],inclusive:!0}}};return pe}();Ce.lexer=xe;function Ne(){this.yy={}}return Ne.prototype=Ce,Ce.Parser=Ne,new Ne}();parser$9.parser=parser$9;const classDetector=(e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:e.match(/^\s*classDiagram/)!==null},classDetectorV2=(e,t)=>{var r;return e.match(/^\s*classDiagram/)!==null&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:e.match(/^\s*classDiagram-v2/)!==null},MERMAID_DOM_ID_PREFIX$1="classid-";let relations$1=[],classes$2={},classCounter=0,funs$2=[];const sanitizeText$2=e=>common.sanitizeText(e,getConfig$1()),parseDirective$9=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},splitClassNameAndType=function(e){let t="",r=e;if(e.indexOf("~")>0){let n=e.split("~");r=n[0],t=common.sanitizeText(n[1],getConfig$1())}return{className:r,type:t}},addClass$1=function(e){let t=splitClassNameAndType(e);typeof classes$2[t.className]<"u"||(classes$2[t.className]={id:t.className,type:t.type,cssClasses:[],methods:[],members:[],annotations:[],domId:MERMAID_DOM_ID_PREFIX$1+t.className+"-"+classCounter},classCounter++)},lookUpDomId$1=function(e){const t=Object.keys(classes$2);for(let r=0;r<t.length;r++)if(classes$2[t[r]].id===e)return classes$2[t[r]].domId},clear$c=function(){relations$1=[],classes$2={},funs$2=[],funs$2.push(setupToolTips$1),clear$g()},getClass=function(e){return classes$2[e]},getClasses$5=function(){return classes$2},getRelations$1=function(){return relations$1},addRelation$1=function(e){log$1.debug("Adding relation: "+JSON.stringify(e)),addClass$1(e.id1),addClass$1(e.id2),e.id1=splitClassNameAndType(e.id1).className,e.id2=splitClassNameAndType(e.id2).className,e.relationTitle1=common.sanitizeText(e.relationTitle1.trim(),getConfig$1()),e.relationTitle2=common.sanitizeText(e.relationTitle2.trim(),getConfig$1()),relations$1.push(e)},addAnnotation=function(e,t){const r=splitClassNameAndType(e).className;classes$2[r].annotations.push(t)},addMember=function(e,t){const r=splitClassNameAndType(e).className,n=classes$2[r];if(typeof t=="string"){const i=t.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(sanitizeText$2(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(sanitizeText$2(i)):i&&n.members.push(sanitizeText$2(i))}},addMembers=function(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(r=>addMember(e,r)))},cleanupLabel$1=function(e){return e.substring(0,1)===":"?common.sanitizeText(e.substr(1).trim(),getConfig$1()):sanitizeText$2(e.trim())},setCssClass=function(e,t){e.split(",").forEach(function(r){let n=r;r[0].match(/\d/)&&(n=MERMAID_DOM_ID_PREFIX$1+n),typeof classes$2[n]<"u"&&classes$2[n].cssClasses.push(t)})},setTooltip$1=function(e,t){const r=getConfig$1();e.split(",").forEach(function(n){typeof t<"u"&&(classes$2[n].tooltip=common.sanitizeText(t,r))})},getTooltip$1=function(e){return classes$2[e].tooltip},setLink$2=function(e,t,r){const n=getConfig$1();e.split(",").forEach(function(i){let o=i;i[0].match(/\d/)&&(o=MERMAID_DOM_ID_PREFIX$1+o),typeof classes$2[o]<"u"&&(classes$2[o].link=utils.formatUrl(t,n),n.securityLevel==="sandbox"?classes$2[o].linkTarget="_top":typeof r=="string"?classes$2[o].linkTarget=sanitizeText$2(r):classes$2[o].linkTarget="_blank")}),setCssClass(e,"clickable")},setClickEvent$2=function(e,t,r){e.split(",").forEach(function(n){setClickFunc(n,t,r),classes$2[n].haveCallback=!0}),setCssClass(e,"clickable")},setClickFunc=function(e,t,r){const n=getConfig$1();let i=e,o=lookUpDomId$1(i);if(n.securityLevel==="loose"&&!(typeof t>"u")&&typeof classes$2[i]<"u"){let l=[];if(typeof r=="string"){l=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u<l.length;u++){let h=l[u].trim();h.charAt(0)==='"'&&h.charAt(h.length-1)==='"'&&(h=h.substr(1,h.length-2)),l[u]=h}}l.length===0&&l.push(o),funs$2.push(function(){const u=document.querySelector(`[id="${o}"]`);u!==null&&u.addEventListener("click",function(){utils.runFunc(t,...l)},!1)})}},bindFunctions$2=function(e){funs$2.forEach(function(t){t(e)})},lineType$1={LINE:0,DOTTED_LINE:1},relationType$1={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setupToolTips$1=function(e){let t=select$1(".mermaidTooltip");(t._groups||t)[0][0]===null&&(t=select$1("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),select$1(e).select("svg").selectAll("g.node").on("mouseover",function(){const i=select$1(this);if(i.attr("title")===null)return;const l=this.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.text(i.attr("title")).style("left",window.scrollX+l.left+(l.right-l.left)/2+"px").style("top",window.scrollY+l.top-14+document.body.scrollTop+"px"),t.html(t.html().replace(/<br\/>/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){t.transition().duration(500).style("opacity",0),select$1(this).classed("hover",!1)})};funs$2.push(setupToolTips$1);let direction$2="TB";const getDirection$2=()=>direction$2,setDirection$2=e=>{direction$2=e},classDb={parseDirective:parseDirective$9,setAccTitle,getAccTitle,getAccDescription,setAccDescription,getConfig:()=>getConfig$1().class,addClass:addClass$1,bindFunctions:bindFunctions$2,clear:clear$c,getClass,getClasses:getClasses$5,addAnnotation,getRelations:getRelations$1,addRelation:addRelation$1,getDirection:getDirection$2,setDirection:setDirection$2,addMember,addMembers,cleanupLabel:cleanupLabel$1,lineType:lineType$1,relationType:relationType$1,setClickEvent:setClickEvent$2,setCssClass,setLink:setLink$2,getTooltip:getTooltip$1,setTooltip:setTooltip$1,lookUpDomId:lookUpDomId$1};let edgeCount$1=0;const drawEdge$1=function(e,t,r,n,i){const o=function(L){switch(L){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.EXTENSION:return"extension";case i.db.COMPOSITION:return"composition";case i.db.DEPENDENCY:return"dependency";case i.db.LOLLIPOP:return"lollipop"}};t.points=t.points.filter(L=>!Number.isNaN(L.y));const l=t.points,u=line$2().x(function(L){return L.x}).y(function(L){return L.y}).curve(curveBasis),h=e.append("path").attr("d",u(l)).attr("id","edge"+edgeCount$1).attr("class","relation");let f="";n.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),r.relation.lineType==1&&h.attr("class","relation dashed-line"),r.relation.type1!=="none"&&h.attr("marker-start","url("+f+"#"+o(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&h.attr("marker-end","url("+f+"#"+o(r.relation.type2)+"End)");let d,g;const p=t.points.length;let m=utils.calcLabelPosition(t.points);d=m.x,g=m.y;let b,$,S,R;if(p%2!==0&&p>1){let L=utils.calcCardinalityPosition(r.relation.type1!=="none",t.points,t.points[0]),N=utils.calcCardinalityPosition(r.relation.type2!=="none",t.points,t.points[p-1]);log$1.debug("cardinality_1_point "+JSON.stringify(L)),log$1.debug("cardinality_2_point "+JSON.stringify(N)),b=L.x,$=L.y,S=N.x,R=N.y}if(typeof r.title<"u"){const L=e.append("g").attr("class","classLabel"),N=L.append("text").attr("class","label").attr("x",d).attr("y",g).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=N;const F=N.node().getBBox();L.insert("rect",":first-child").attr("class","box").attr("x",F.x-n.padding/2).attr("y",F.y-n.padding/2).attr("width",F.width+n.padding).attr("height",F.height+n.padding)}log$1.info("Rendering relation "+JSON.stringify(r)),typeof r.relationTitle1<"u"&&r.relationTitle1!=="none"&&e.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",b).attr("y",$).attr("fill","black").attr("font-size","6").text(r.relationTitle1),typeof r.relationTitle2<"u"&&r.relationTitle2!=="none"&&e.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",S).attr("y",R).attr("fill","black").attr("font-size","6").text(r.relationTitle2),edgeCount$1++},drawClass=function(e,t,r,n){log$1.debug("Rendering class ",t,r);const i=t.id,o={id:i,label:t.id,width:0,height:0},l=e.append("g").attr("id",n.db.lookUpDomId(i)).attr("class","classGroup");let u;t.link?u=l.append("svg:a").attr("xlink:href",t.link).attr("target",t.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):u=l.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let h=!0;t.annotations.forEach(function(H){const G=u.append("tspan").text("\xAB"+H+"\xBB");h||G.attr("dy",r.textHeight),h=!1});let f=t.id;t.type!==void 0&&t.type!==""&&(f+="<"+t.type+">");const d=u.append("tspan").text(f).attr("class","title");h||d.attr("dy",r.textHeight);const g=u.node().getBBox().height,p=l.append("line").attr("x1",0).attr("y1",r.padding+g+r.dividerMargin/2).attr("y2",r.padding+g+r.dividerMargin/2),m=l.append("text").attr("x",r.padding).attr("y",g+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");h=!0,t.members.forEach(function(H){addTspan(m,H,h,r),h=!1});const b=m.node().getBBox(),$=l.append("line").attr("x1",0).attr("y1",r.padding+g+r.dividerMargin+b.height).attr("y2",r.padding+g+r.dividerMargin+b.height),S=l.append("text").attr("x",r.padding).attr("y",g+2*r.dividerMargin+b.height+r.textHeight).attr("fill","white").attr("class","classText");h=!0,t.methods.forEach(function(H){addTspan(S,H,h,r),h=!1});const R=l.node().getBBox();var L=" ";t.cssClasses.length>0&&(L=L+t.cssClasses.join(" "));const F=l.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",R.width+2*r.padding).attr("height",R.height+r.padding+.5*r.dividerMargin).attr("class",L).node().getBBox().width;return u.node().childNodes.forEach(function(H){H.setAttribute("x",(F-H.getBBox().width)/2)}),t.tooltip&&u.insert("title").text(t.tooltip),p.attr("x2",F),$.attr("x2",F),o.width=F,o.height=R.height+r.padding+.5*r.dividerMargin,o},parseMember=function(e){const t=/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/,r=/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/;let n=e.match(t),i=e.match(r);return n&&!i?buildFieldDisplay(n):i?buildMethodDisplay(i):buildLegacyDisplay(e)},buildFieldDisplay=function(e){let t="",r="";try{let n=e[1]?e[1].trim():"",i=e[2]?e[2].trim():"",o=e[3]?parseGenericTypes(e[3].trim()):"",l=e[4]?e[4].trim():"",u=e[5]?e[5].trim():"";r=n+i+o+" "+l,t=parseClassifier(u)}catch{r=e}return{displayText:r,cssStyle:t}},buildMethodDisplay=function(e){let t="",r="";try{let n=e[1]?e[1].trim():"",i=e[2]?e[2].trim():"",o=e[3]?parseGenericTypes(e[3].trim()):"",l=e[4]?e[4].trim():"",u=e[5]?" : "+parseGenericTypes(e[5]).trim():"";r=n+i+"("+o+")"+u,t=parseClassifier(l)}catch{r=e}return{displayText:r,cssStyle:t}},buildLegacyDisplay=function(e){let t="",r="",n="",i=e.indexOf("("),o=e.indexOf(")");if(i>1&&o>i&&o<=e.length){let l="",u="",h=e.substring(0,1);h.match(/\w/)?u=e.substring(0,i).trim():(h.match(/\+|-|~|#/)&&(l=h),u=e.substring(1,i).trim());const f=e.substring(i+1,o);e.substring(o+1,1),r=parseClassifier(e.substring(o+1,o+2)),t=l+u+"("+parseGenericTypes(f.trim())+")",o<e.length&&(n=e.substring(o+2).trim(),n!==""&&(n=" : "+parseGenericTypes(n),t+=n))}else t=parseGenericTypes(e);return{displayText:t,cssStyle:r}},addTspan=function(e,t,r,n){let i=parseMember(t);const o=e.append("tspan").attr("x",n.padding).text(i.displayText);i.cssStyle!==""&&o.attr("style",i.cssStyle),r||o.attr("dy",n.textHeight)},parseClassifier=function(e){switch(e){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},svgDraw$2={drawClass,drawEdge:drawEdge$1,parseMember};let idCache={};const padding=20,getGraphId=function(e){const t=Object.entries(idCache).find(r=>r[1].label===e);if(t)return t[0]},insertMarkers$3=function(e){e.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"),e.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"),e.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"),e.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"),e.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"),e.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"),e.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"),e.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")},draw$d=function(e,t,r,n){const i=getConfig$1().class;idCache={},log$1.info("Rendering diagram "+e);const o=getConfig$1().securityLevel;let l;o==="sandbox"&&(l=select$1("#i"+t));const u=select$1(o==="sandbox"?l.nodes()[0].contentDocument.body:"body"),h=u.select(`[id='${t}']`);insertMarkers$3(h);const f=new graphlib$2.Graph({multigraph:!0});f.setGraph({isMultiGraph:!0}),f.setDefaultEdgeLabel(function(){return{}});const d=n.db.getClasses(),g=Object.keys(d);for(let R=0;R<g.length;R++){const L=d[g[R]],N=svgDraw$2.drawClass(h,L,i,n);idCache[N.id]=N,f.setNode(N.id,N),log$1.info("Org height: "+N.height)}n.db.getRelations().forEach(function(R){log$1.info("tjoho"+getGraphId(R.id1)+getGraphId(R.id2)+JSON.stringify(R)),f.setEdge(getGraphId(R.id1),getGraphId(R.id2),{relation:R},R.title||"DEFAULT")}),dagre$1.layout(f),f.nodes().forEach(function(R){typeof R<"u"&&typeof f.node(R)<"u"&&(log$1.debug("Node "+R+": "+JSON.stringify(f.node(R))),u.select("#"+n.db.lookUpDomId(R)).attr("transform","translate("+(f.node(R).x-f.node(R).width/2)+","+(f.node(R).y-f.node(R).height/2)+" )"))}),f.edges().forEach(function(R){typeof R<"u"&&typeof f.edge(R)<"u"&&(log$1.debug("Edge "+R.v+" -> "+R.w+": "+JSON.stringify(f.edge(R))),svgDraw$2.drawEdge(h,f.edge(R),f.edge(R).relation,i,n))});const m=h.node().getBBox(),b=m.width+padding*2,$=m.height+padding*2;configureSvgSize(h,$,b,i.useMaxWidth);const S=`${m.x-padding} ${m.y-padding} ${b} ${$}`;log$1.debug(`viewBox ${S}`),h.attr("viewBox",S),addSVGAccessibilityFields(n.db,h,t)},classRenderer={draw:draw$d},insertMarkers$2=(e,t,r,n)=>{t.forEach(i=>{markers$1[i](e,r,n)})},extension=(e,t,r)=>{log$1.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",t+"-extensionStart").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",t+"-extensionEnd").attr("class","marker extension "+t).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=(e,t)=>{e.append("defs").append("marker").attr("id",t+"-compositionStart").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",t+"-compositionEnd").attr("class","marker composition "+t).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=(e,t)=>{e.append("defs").append("marker").attr("id",t+"-aggregationStart").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",t+"-aggregationEnd").attr("class","marker aggregation "+t).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=(e,t)=>{e.append("defs").append("marker").attr("id",t+"-dependencyStart").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",t+"-dependencyEnd").attr("class","marker dependency "+t).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")},lollipop=(e,t)=>{e.append("defs").append("marker").attr("id",t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point=(e,t)=>{e.append("marker").attr("id",t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",10).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"),e.append("marker").attr("id",t+"-pointStart").attr("class","marker "+t).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$1=(e,t)=>{e.append("marker").attr("id",t+"-circleEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",t+"-circleStart").attr("class","marker "+t).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=(e,t)=>{e.append("marker").attr("id",t+"-crossEnd").attr("class","marker cross "+t).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"),e.append("marker").attr("id",t+"-crossStart").attr("class","marker cross "+t).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=(e,t)=>{e.append("defs").append("marker").attr("id",t+"-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")},markers$1={extension,composition,aggregation,dependency,lollipop,point,circle:circle$1,cross,barb};function applyStyle$1(e,t){t&&e.attr("style",t)}function addHtmlLabel$1(e){const t=select$1(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+i+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>"),applyStyle$1(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}const createLabel=(e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),evaluate(getConfig$1().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),log$1.info("vertexText"+i);const o={isNode:n,label:decodeEntities(i).replace(/fa[lrsb]?:fa-[\w-]+/g,u=>`<i class='${u.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return addHtmlLabel$1(o)}else{const o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",t.replace("color:","fill:"));let l=[];typeof i=="string"?l=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?l=i:l=[];for(let u=0;u<l.length;u++){const h=document.createElementNS("http://www.w3.org/2000/svg","tspan");h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),h.setAttribute("dy","1em"),h.setAttribute("x","0"),r?h.setAttribute("class","title-row"):h.setAttribute("class","row"),h.textContent=l[u].trim(),o.appendChild(h)}return o}},labelHelper=(e,t,r,n)=>{let i;r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),l=o.insert("g").attr("class","label").attr("style",t.labelStyle);let u;typeof t.labelText>"u"?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=l.node().appendChild(createLabel(sanitizeText$5(decodeEntities(u),getConfig$1()),t.labelStyle,!1,n));let f=h.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const g=h.children[0],p=select$1(h);f=g.getBoundingClientRect(),p.attr("width",f.width),p.attr("height",f.height)}const d=t.padding/2;return l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),{shapeSvg:o,bbox:f,halfPadding:d,label:l}},updateNodeBounds=(e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height};function insertPolygonShape$1(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}let clusterDb={},decendants={},parents={};const clear$b=()=>{decendants={},parents={},clusterDb={}},isDecendant=(e,t)=>(log$1.trace("In isDecendant",t," ",e," = ",decendants[t].indexOf(e)>=0),decendants[t].indexOf(e)>=0),edgeInCluster=(e,t)=>(log$1.info("Decendants of ",t," is ",decendants[t]),log$1.info("Edge is ",e),e.v===t||e.w===t?!1:decendants[t]?!!(decendants[t].indexOf(e.v)>=0||isDecendant(e.v,t)||isDecendant(e.w,t)||decendants[t].indexOf(e.w)>=0):(log$1.debug("Tilt, ",t,",not in decendants"),!1)),copy=(e,t,r,n)=>{log$1.warn("Copying children of ",e,"root",n,"data",t.node(e),n);const i=t.children(e)||[];e!==n&&i.push(e),log$1.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(o=>{if(t.children(o).length>0)copy(o,t,r,n);else{const l=t.node(o);log$1.info("cp ",o," to ",n," with parent ",e),r.setNode(o,l),n!==t.parent(o)&&(log$1.warn("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==n&&o!==e?(log$1.debug("Setting parent",o,e),r.setParent(o,e)):(log$1.info("In copy ",e,"root",n,"data",t.node(e),n),log$1.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==n,"node!==clusterId",o!==e));const u=t.edges(o);log$1.debug("Copying Edges",u),u.forEach(h=>{log$1.info("Edge",h);const f=t.edge(h.v,h.w,h.name);log$1.info("Edge data",f,n);try{edgeInCluster(h,n)?(log$1.info("Copying as ",h.v,h.w,f,h.name),r.setEdge(h.v,h.w,f,h.name),log$1.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):log$1.info("Skipping copy of edge ",h.v,"-->",h.w," rootId: ",n," clusterId:",e)}catch(d){log$1.error(d)}})}log$1.debug("Removing node",o),t.removeNode(o)})},extractDecendants=(e,t)=>{const r=t.children(e);let n=[].concat(r);for(let i=0;i<r.length;i++)parents[r[i]]=e,n=n.concat(extractDecendants(r[i],t));return n},findNonClusterChild=(e,t)=>{log$1.trace("Searching",e);const r=t.children(e);if(log$1.trace("Searching children of id ",e,r),r.length<1)return log$1.trace("This is a valid node",e),e;for(let n=0;n<r.length;n++){const i=findNonClusterChild(r[n],t);if(i)return log$1.trace("Found replacement for",e," => ",i),i}},getAnchorId=e=>!clusterDb[e]||!clusterDb[e].externalConnections?e:clusterDb[e]?clusterDb[e].id:e,adjustClustersAndEdges=(e,t)=>{if(!e||t>10){log$1.debug("Opting out, no graph ");return}else log$1.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(log$1.warn("Cluster identified",r," Replacement id in edges: ",findNonClusterChild(r,e)),decendants[r]=extractDecendants(r,e),clusterDb[r]={id:findNonClusterChild(r,e),clusterData:e.node(r)})}),e.nodes().forEach(function(r){const n=e.children(r),i=e.edges();n.length>0?(log$1.debug("Cluster identified",r,decendants),i.forEach(o=>{if(o.v!==r&&o.w!==r){const l=isDecendant(o.v,r),u=isDecendant(o.w,r);l^u&&(log$1.warn("Edge: ",o," leaves cluster ",r),log$1.warn("Decendants of XXX ",r,": ",decendants[r]),clusterDb[r].externalConnections=!0)}})):log$1.debug("Not a cluster ",r,decendants)}),e.edges().forEach(function(r){const n=e.edge(r);log$1.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),log$1.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let i=r.v,o=r.w;if(log$1.warn("Fix XXX",clusterDb,"ids:",r.v,r.w,"Translateing: ",clusterDb[r.v]," --- ",clusterDb[r.w]),clusterDb[r.v]&&clusterDb[r.w]&&clusterDb[r.v]===clusterDb[r.w]){log$1.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),log$1.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=getAnchorId(r.v),o=getAnchorId(r.w),e.removeEdge(r.v,r.w,r.name);const l=r.w+"---"+r.v;e.setNode(l,{domId:l,id:l,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const u=JSON.parse(JSON.stringify(n)),h=JSON.parse(JSON.stringify(n));u.label="",u.arrowTypeEnd="none",h.label="",u.fromCluster=r.v,h.toCluster=r.v,e.setEdge(i,l,u,r.name+"-cyclic-special"),e.setEdge(l,o,h,r.name+"-cyclic-special")}else(clusterDb[r.v]||clusterDb[r.w])&&(log$1.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=getAnchorId(r.v),o=getAnchorId(r.w),e.removeEdge(r.v,r.w,r.name),i!==r.v&&(n.fromCluster=r.v),o!==r.w&&(n.toCluster=r.w),log$1.warn("Fix Replacing with XXX",i,o,r.name),e.setEdge(i,o,n,r.name))}),log$1.warn("Adjusted Graph",graphlib$2.json.write(e)),extractor(e,0),log$1.trace(clusterDb)},extractor=(e,t)=>{if(log$1.warn("extractor - ",t,graphlib$2.json.write(e),e.children("D")),t>10){log$1.error("Bailing out");return}let r=e.nodes(),n=!1;for(let i=0;i<r.length;i++){const o=r[i],l=e.children(o);n=n||l.length>0}if(!n){log$1.debug("Done, no node has children",e.nodes());return}log$1.debug("Nodes = ",r,t);for(let i=0;i<r.length;i++){const o=r[i];if(log$1.debug("Extracting node",o,clusterDb,clusterDb[o]&&!clusterDb[o].externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!clusterDb[o])log$1.debug("Not a cluster",o,t);else if(!clusterDb[o].externalConnections&&e.children(o)&&e.children(o).length>0){log$1.warn("Cluster without external connections, without a parent and with children",o,t);let u=e.graph().rankdir==="TB"?"LR":"TB";clusterDb[o]&&clusterDb[o].clusterData&&clusterDb[o].clusterData.dir&&(u=clusterDb[o].clusterData.dir,log$1.warn("Fixing dir",clusterDb[o].clusterData.dir,u));const h=new graphlib$2.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});log$1.warn("Old graph before copy",graphlib$2.json.write(e)),copy(o,e,h,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:clusterDb[o].clusterData,labelText:clusterDb[o].labelText,graph:h}),log$1.warn("New graph after copy node: (",o,")",graphlib$2.json.write(h)),log$1.debug("Old graph after copy",graphlib$2.json.write(e))}else log$1.warn("Cluster ** ",o," **not meeting the criteria !externalConnections:",!clusterDb[o].externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),log$1.debug(clusterDb)}r=e.nodes(),log$1.warn("New list of nodes",r);for(let i=0;i<r.length;i++){const o=r[i],l=e.node(o);log$1.warn(" Now next level",o,l),l.clusterNode&&extractor(l.graph,t+1)}},sorter=(e,t)=>{if(t.length===0)return[];let r=Object.assign(t);return t.forEach(n=>{const i=e.children(n),o=sorter(e,i);r=r.concat(o)}),r},sortNodesByHierarchy=e=>sorter(e,e.children());function intersectNode(e,t){return e.intersect(t)}function intersectEllipse(e,t,r,n){var i=e.x,o=e.y,l=i-n.x,u=o-n.y,h=Math.sqrt(t*t*u*u+r*r*l*l),f=Math.abs(t*r*l/h);n.x<i&&(f=-f);var d=Math.abs(t*r*u/h);return n.y<o&&(d=-d),{x:i+f,y:o+d}}function intersectCircle(e,t,r){return intersectEllipse(e,t,t,r)}function intersectLine(e,t,r,n){var i,o,l,u,h,f,d,g,p,m,b,$,S,R,L;if(i=t.y-e.y,l=e.x-t.x,h=t.x*e.y-e.x*t.y,p=i*r.x+l*r.y+h,m=i*n.x+l*n.y+h,!(p!==0&&m!==0&&sameSign(p,m))&&(o=n.y-r.y,u=r.x-n.x,f=n.x*r.y-r.x*n.y,d=o*e.x+u*e.y+f,g=o*t.x+u*t.y+f,!(d!==0&&g!==0&&sameSign(d,g))&&(b=i*u-o*l,b!==0)))return $=Math.abs(b/2),S=l*f-u*h,R=S<0?(S-$)/b:(S+$)/b,S=o*h-i*f,L=S<0?(S-$)/b:(S+$)/b,{x:R,y:L}}function sameSign(e,t){return e*t>0}function intersectPolygon(e,t,r){var n=e.x,i=e.y,o=[],l=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(b){l=Math.min(l,b.x),u=Math.min(u,b.y)}):(l=Math.min(l,t.x),u=Math.min(u,t.y));for(var h=n-e.width/2-l,f=i-e.height/2-u,d=0;d<t.length;d++){var g=t[d],p=t[d<t.length-1?d+1:0],m=intersectLine(e,r,{x:h+g.x,y:f+g.y},{x:h+p.x,y:f+p.y});m&&o.push(m)}return o.length?(o.length>1&&o.sort(function(b,$){var S=b.x-r.x,R=b.y-r.y,L=Math.sqrt(S*S+R*R),N=$.x-r.x,F=$.y-r.y,H=Math.sqrt(N*N+F*F);return L<H?-1:L===H?0:1}),o[0]):e}const intersectRect=(e,t)=>{var r=e.x,n=e.y,i=t.x-r,o=t.y-n,l=e.width/2,u=e.height/2,h,f;return Math.abs(o)*l>Math.abs(i)*u?(o<0&&(u=-u),h=o===0?0:u*i/o,f=u):(i<0&&(l=-l),h=l,f=i===0?0:l*o/i),{x:r+h,y:n+f}},intersect={node:intersectNode,circle:intersectCircle,ellipse:intersectEllipse,polygon:intersectPolygon,rect:intersectRect},note=(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=labelHelper(e,t,"node "+t.classes,!0);log$1.info("Classes = ",t.classes);const o=r.insert("rect",":first-child");return o.attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),updateNodeBounds(t,o),t.intersect=function(l){return intersect.rect(t,l)},r},question$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=n.height+t.padding,l=i+o,u=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];log$1.info("Question main (Circle)");const h=insertPolygonShape$1(r,l,l,u);return h.attr("style",t.style),updateNodeBounds(t,h),t.intersect=function(f){return log$1.warn("Intersect called"),intersect.polygon(t,u,f)},r},choice=(e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(l){return intersect.circle(t,14,l)},r},hexagon$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=4,o=n.height+t.padding,l=o/i,u=n.width+2*l+t.padding,h=[{x:l,y:0},{x:u-l,y:0},{x:u,y:-o/2},{x:u-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}],f=insertPolygonShape$1(r,u,o,h);return f.attr("style",t.style),updateNodeBounds(t,f),t.intersect=function(d){return intersect.polygon(t,h,d)},r},rect_left_inv_arrow$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=n.height+t.padding,l=[{x:-o/2,y:0},{x:i,y:0},{x:i,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}];return insertPolygonShape$1(r,i,o,l).attr("style",t.style),t.width=i+o,t.height=o,t.intersect=function(h){return intersect.polygon(t,l,h)},r},lean_right$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=n.height+t.padding,l=[{x:-2*o/6,y:0},{x:i-o/6,y:0},{x:i+2*o/6,y:-o},{x:o/6,y:-o}],u=insertPolygonShape$1(r,i,o,l);return u.attr("style",t.style),updateNodeBounds(t,u),t.intersect=function(h){return intersect.polygon(t,l,h)},r},lean_left$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=n.height+t.padding,l=[{x:2*o/6,y:0},{x:i+o/6,y:0},{x:i-2*o/6,y:-o},{x:-o/6,y:-o}],u=insertPolygonShape$1(r,i,o,l);return u.attr("style",t.style),updateNodeBounds(t,u),t.intersect=function(h){return intersect.polygon(t,l,h)},r},trapezoid$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=n.height+t.padding,l=[{x:-2*o/6,y:0},{x:i+2*o/6,y:0},{x:i-o/6,y:-o},{x:o/6,y:-o}],u=insertPolygonShape$1(r,i,o,l);return u.attr("style",t.style),updateNodeBounds(t,u),t.intersect=function(h){return intersect.polygon(t,l,h)},r},inv_trapezoid$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=n.height+t.padding,l=[{x:o/6,y:0},{x:i-o/6,y:0},{x:i+2*o/6,y:-o},{x:-2*o/6,y:-o}],u=insertPolygonShape$1(r,i,o,l);return u.attr("style",t.style),updateNodeBounds(t,u),t.intersect=function(h){return intersect.polygon(t,l,h)},r},rect_right_inv_arrow$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=n.height+t.padding,l=[{x:0,y:0},{x:i+o/2,y:0},{x:i,y:-o/2},{x:i+o/2,y:-o},{x:0,y:-o}],u=insertPolygonShape$1(r,i,o,l);return u.attr("style",t.style),updateNodeBounds(t,u),t.intersect=function(h){return intersect.polygon(t,l,h)},r},cylinder$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=i/2,l=o/(2.5+i/50),u=n.height+l+t.padding,h="M 0,"+l+" a "+o+","+l+" 0,0,0 "+i+" 0 a "+o+","+l+" 0,0,0 "+-i+" 0 l 0,"+u+" a "+o+","+l+" 0,0,0 "+i+" 0 l 0,"+-u,f=r.attr("label-offset-y",l).insert("path",":first-child").attr("style",t.style).attr("d",h).attr("transform","translate("+-i/2+","+-(u/2+l)+")");return updateNodeBounds(t,f),t.intersect=function(d){const g=intersect.rect(t,d),p=g.x-t.x;if(o!=0&&(Math.abs(p)<t.width/2||Math.abs(p)==t.width/2&&Math.abs(g.y-t.y)>t.height/2-l)){let m=l*l*(1-p*p/(o*o));m!=0&&(m=Math.sqrt(m)),m=l-m,d.y-t.y>0&&(m=-m),g.y+=m}return g},r},rect$1=(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=labelHelper(e,t,"node "+t.classes,!0);log$1.trace("Classes = ",t.classes);const o=r.insert("rect",":first-child"),l=n.width+t.padding,u=n.height+t.padding;if(o.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",l).attr("height",u),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(applyNodePropertyBorders(o,t.props.borders,l,u),h.delete("borders")),h.forEach(f=>{log$1.warn(`Unknown node property ${f}`)})}return updateNodeBounds(t,o),t.intersect=function(h){return intersect.rect(t,h)},r},labelRect=(e,t)=>{const{shapeSvg:r}=labelHelper(e,t,"label",!0);log$1.trace("Classes = ",t.classes);const n=r.insert("rect",":first-child"),i=0,o=0;if(n.attr("width",i).attr("height",o),r.attr("class","label edgeLabel"),t.props){const l=new Set(Object.keys(t.props));t.props.borders&&(applyNodePropertyBorders(n,t.props.borders,i,o),l.delete("borders")),l.forEach(u=>{log$1.warn(`Unknown node property ${u}`)})}return updateNodeBounds(t,n),t.intersect=function(l){return intersect.rect(t,l)},r};function applyNodePropertyBorders(e,t,r,n){const i=[],o=u=>{i.push(u),i.push(0)},l=u=>{i.push(0),i.push(u)};t.includes("t")?(log$1.debug("add top border"),o(r)):l(r),t.includes("r")?(log$1.debug("add right border"),o(n)):l(n),t.includes("b")?(log$1.debug("add bottom border"),o(r)):l(r),t.includes("l")?(log$1.debug("add left border"),o(n)):l(n),e.attr("stroke-dasharray",i.join(" "))}const rectWithTitle=(e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),o=n.insert("line"),l=n.insert("g").attr("class","label"),u=t.labelText.flat?t.labelText.flat():t.labelText;let h="";typeof u=="object"?h=u[0]:h=u,log$1.info("Label text abc79",h,u,typeof u=="object");const f=l.node().appendChild(createLabel(h,t.labelStyle,!0,!0));let d={width:0,height:0};if(evaluate(getConfig$1().flowchart.htmlLabels)){const $=f.children[0],S=select$1(f);d=$.getBoundingClientRect(),S.attr("width",d.width),S.attr("height",d.height)}log$1.info("Text 2",u);const g=u.slice(1,u.length);let p=f.getBBox();const m=l.node().appendChild(createLabel(g.join?g.join("<br/>"):g,t.labelStyle,!0,!0));if(evaluate(getConfig$1().flowchart.htmlLabels)){const $=m.children[0],S=select$1(m);d=$.getBoundingClientRect(),S.attr("width",d.width),S.attr("height",d.height)}const b=t.padding/2;return select$1(m).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+b+5)+")"),select$1(f).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", "+0+")"),d=l.node().getBBox(),l.attr("transform","translate("+-d.width/2+", "+(-d.height/2-b+3)+")"),i.attr("class","outer title-state").attr("x",-d.width/2-b).attr("y",-d.height/2-b).attr("width",d.width+t.padding).attr("height",d.height+t.padding),o.attr("class","divider").attr("x1",-d.width/2-b).attr("x2",d.width/2+b).attr("y1",-d.height/2-b+p.height+b).attr("y2",-d.height/2-b+p.height+b),updateNodeBounds(t,i),t.intersect=function($){return intersect.rect(t,$)},n},stadium$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.height+t.padding,o=n.width+i/4+t.padding,l=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-o/2).attr("y",-i/2).attr("width",o).attr("height",i);return updateNodeBounds(t,l),t.intersect=function(u){return intersect.rect(t,u)},r},circle=(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=labelHelper(e,t,void 0,!0),o=r.insert("circle",":first-child");return o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),log$1.info("Circle main"),updateNodeBounds(t,o),t.intersect=function(l){return log$1.info("Circle intersect",t,n.width/2+i,l),intersect.circle(t,n.width/2+i,l)},r},doublecircle=(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=labelHelper(e,t,void 0,!0),o=5,l=r.insert("g",":first-child"),u=l.insert("circle"),h=l.insert("circle");return u.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+o).attr("width",n.width+t.padding+o*2).attr("height",n.height+t.padding+o*2),h.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),log$1.info("DoubleCircle main"),updateNodeBounds(t,u),t.intersect=function(f){return log$1.info("DoubleCircle intersect",t,n.width/2+i+o,f),intersect.circle(t,n.width/2+i+o,f)},r},subroutine$1=(e,t)=>{const{shapeSvg:r,bbox:n}=labelHelper(e,t,void 0,!0),i=n.width+t.padding,o=n.height+t.padding,l=[{x:0,y:0},{x:i,y:0},{x:i,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-o},{x:-8,y:-o},{x:-8,y:0}],u=insertPolygonShape$1(r,i,o,l);return u.attr("style",t.style),updateNodeBounds(t,u),t.intersect=function(h){return intersect.polygon(t,l,h)},r},start=(e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),updateNodeBounds(t,n),t.intersect=function(i){return intersect.circle(t,7,i)},r},forkJoin=(e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,o=10;r==="LR"&&(i=10,o=70);const l=n.append("rect").attr("x",-1*i/2).attr("y",-1*o/2).attr("width",i).attr("height",o).attr("class","fork-join");return updateNodeBounds(t,l),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(u){return intersect.rect(t,u)},n},end=(e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),updateNodeBounds(t,i),t.intersect=function(o){return intersect.circle(t,7,o)},r},class_box=(e,t)=>{const r=t.padding/2,n=4,i=8;let o;t.classes?o="node "+t.classes:o="node default";const l=e.insert("g").attr("class",o).attr("id",t.domId||t.id),u=l.insert("rect",":first-child"),h=l.insert("line"),f=l.insert("line");let d=0,g=n;const p=l.insert("g").attr("class","label");let m=0;const b=t.classData.annotations&&t.classData.annotations[0],$=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",S=p.node().appendChild(createLabel($,t.labelStyle,!0,!0));let R=S.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const V=S.children[0],z=select$1(S);R=V.getBoundingClientRect(),z.attr("width",R.width),z.attr("height",R.height)}t.classData.annotations[0]&&(g+=R.height+n,d+=R.width);let L=t.classData.id;t.classData.type!==void 0&&t.classData.type!==""&&(getConfig$1().flowchart.htmlLabels?L+="<"+t.classData.type+">":L+="<"+t.classData.type+">");const N=p.node().appendChild(createLabel(L,t.labelStyle,!0,!0));select$1(N).attr("class","classTitle");let F=N.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const V=N.children[0],z=select$1(N);F=V.getBoundingClientRect(),z.attr("width",F.width),z.attr("height",F.height)}g+=F.height+n,F.width>d&&(d=F.width);const H=[];t.classData.members.forEach(V=>{const z=parseMember(V);let W=z.displayText;getConfig$1().flowchart.htmlLabels&&(W=W.replace(/</g,"<").replace(/>/g,">"));const T=p.node().appendChild(createLabel(W,z.cssStyle?z.cssStyle:t.labelStyle,!0,!0));let U=T.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const I=T.children[0],ae=select$1(T);U=I.getBoundingClientRect(),ae.attr("width",U.width),ae.attr("height",U.height)}U.width>d&&(d=U.width),g+=U.height+n,H.push(T)}),g+=i;const G=[];if(t.classData.methods.forEach(V=>{const z=parseMember(V);let W=z.displayText;getConfig$1().flowchart.htmlLabels&&(W=W.replace(/</g,"<").replace(/>/g,">"));const T=p.node().appendChild(createLabel(W,z.cssStyle?z.cssStyle:t.labelStyle,!0,!0));let U=T.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const I=T.children[0],ae=select$1(T);U=I.getBoundingClientRect(),ae.attr("width",U.width),ae.attr("height",U.height)}U.width>d&&(d=U.width),g+=U.height+n,G.push(T)}),g+=i,b){let V=(d-R.width)/2;select$1(S).attr("transform","translate( "+(-1*d/2+V)+", "+-1*g/2+")"),m=R.height+n}let P=(d-F.width)/2;return select$1(N).attr("transform","translate( "+(-1*d/2+P)+", "+(-1*g/2+m)+")"),m+=F.height+n,h.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-g/2-r+i+m).attr("y2",-g/2-r+i+m),m+=i,H.forEach(V=>{select$1(V).attr("transform","translate( "+-d/2+", "+(-1*g/2+m+i/2)+")"),m+=F.height+n}),m+=i,f.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-g/2-r+i+m).attr("y2",-g/2-r+i+m),m+=i,G.forEach(V=>{select$1(V).attr("transform","translate( "+-d/2+", "+(-1*g/2+m)+")"),m+=F.height+n}),u.attr("class","outer title-state").attr("x",-d/2-r).attr("y",-(g/2)-r).attr("width",d+t.padding).attr("height",g+t.padding),updateNodeBounds(t,u),t.intersect=function(V){return intersect.rect(t,V)},l},shapes$1={question:question$1,rect:rect$1,labelRect,rectWithTitle,choice,circle,doublecircle,stadium:stadium$1,hexagon:hexagon$1,rect_left_inv_arrow:rect_left_inv_arrow$1,lean_right:lean_right$1,lean_left:lean_left$1,trapezoid:trapezoid$1,inv_trapezoid:inv_trapezoid$1,rect_right_inv_arrow:rect_right_inv_arrow$1,cylinder:cylinder$1,start,end,note,subroutine:subroutine$1,fork:forkJoin,join:forkJoin,class_box};let nodeElems={};const insertNode=(e,t,r)=>{let n,i;if(t.link){let o;getConfig$1().securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o),i=shapes$1[t.shape](n,t,r)}else i=shapes$1[t.shape](e,t,r),n=i;t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),nodeElems[t.id]=n,t.haveCallback&&nodeElems[t.id].attr("class",nodeElems[t.id].attr("class")+" clickable")},setNodeElem=(e,t)=>{nodeElems[t.id]=e},clear$a=()=>{nodeElems={}},positionNode=e=>{const t=nodeElems[e.id];log$1.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},rect=(e,t)=>{log$1.trace("Creating subgraph rect for ",t.id,t);const r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),n=r.insert("rect",":first-child"),i=r.insert("g").attr("class","cluster-label"),o=i.node().appendChild(createLabel(t.labelText,t.labelStyle,void 0,!0));let l=o.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const g=o.children[0],p=select$1(o);l=g.getBoundingClientRect(),p.attr("width",l.width),p.attr("height",l.height)}const u=0*t.padding,h=u/2,f=t.width<=l.width+u?l.width+u:t.width;t.width<=l.width+u?t.diff=(l.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,log$1.trace("Data ",t,JSON.stringify(t)),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-f/2).attr("y",t.y-t.height/2-h).attr("width",f).attr("height",t.height+u),i.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2+t.padding/3)+")");const d=n.node().getBBox();return t.width=d.width,t.height=d.height,t.intersect=function(g){return intersectRect(t,g)},r},noteGroup=(e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),n=r.insert("rect",":first-child"),i=0*t.padding,o=i/2;n.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const l=n.node().getBBox();return t.width=l.width,t.height=l.height,t.intersect=function(u){return intersectRect(t,u)},r},roundedWithTitle=(e,t)=>{const r=e.insert("g").attr("class",t.classes).attr("id",t.id),n=r.insert("rect",":first-child"),i=r.insert("g").attr("class","cluster-label"),o=r.append("rect"),l=i.node().appendChild(createLabel(t.labelText,t.labelStyle,void 0,!0));let u=l.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const p=l.children[0],m=select$1(l);u=p.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}u=l.getBBox();const h=0*t.padding,f=h/2,d=t.width<=u.width+t.padding?u.width+t.padding:t.width;t.width<=u.width+t.padding?t.diff=(u.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,n.attr("class","outer").attr("x",t.x-d/2-f).attr("y",t.y-t.height/2-f).attr("width",d+h).attr("height",t.height+h),o.attr("class","inner").attr("x",t.x-d/2-f).attr("y",t.y-t.height/2-f+u.height-1).attr("width",d+h).attr("height",t.height+h-u.height-3),i.attr("transform","translate("+(t.x-u.width/2)+", "+(t.y-t.height/2-t.padding/3+(evaluate(getConfig$1().flowchart.htmlLabels)?5:3))+")");const g=n.node().getBBox();return t.height=g.height,t.intersect=function(p){return intersectRect(t,p)},r},divider=(e,t)=>{const r=e.insert("g").attr("class",t.classes).attr("id",t.id),n=r.insert("rect",":first-child"),i=0*t.padding,o=i/2;n.attr("class","divider").attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2).attr("width",t.width+i).attr("height",t.height+i);const l=n.node().getBBox();return t.width=l.width,t.height=l.height,t.diff=-t.padding/2,t.intersect=function(u){return intersectRect(t,u)},r},shapes={rect,roundedWithTitle,noteGroup,divider};let clusterElems={};const insertCluster=(e,t)=>{log$1.trace("Inserting cluster");const r=t.shape||"rect";clusterElems[t.id]=shapes[r](e,t)},clear$9=()=>{clusterElems={}};let edgeLabels={},terminalLabels={};const clear$8=()=>{edgeLabels={},terminalLabels={}},insertEdgeLabel=(e,t)=>{const r=createLabel(t.label,t.labelStyle),n=e.insert("g").attr("class","edgeLabel"),i=n.insert("g").attr("class","label");i.node().appendChild(r);let o=r.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const u=r.children[0],h=select$1(r);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),edgeLabels[t.id]=n,t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){const u=createLabel(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);const d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),terminalLabels[t.id]||(terminalLabels[t.id]={}),terminalLabels[t.id].startLeft=h,setTerminalWidth(l,t.startLabelLeft)}if(t.startLabelRight){const u=createLabel(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);const d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),terminalLabels[t.id]||(terminalLabels[t.id]={}),terminalLabels[t.id].startRight=h,setTerminalWidth(l,t.startLabelRight)}if(t.endLabelLeft){const u=createLabel(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);const d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),terminalLabels[t.id]||(terminalLabels[t.id]={}),terminalLabels[t.id].endLeft=h,setTerminalWidth(l,t.endLabelLeft)}if(t.endLabelRight){const u=createLabel(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);const d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),terminalLabels[t.id]||(terminalLabels[t.id]={}),terminalLabels[t.id].endRight=h,setTerminalWidth(l,t.endLabelRight)}};function setTerminalWidth(e,t){getConfig$1().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}const positionEdgeLabel=(e,t)=>{log$1.info("Moving label abc78 ",e.id,e.label,edgeLabels[e.id]);let r=t.updatedPath?t.updatedPath:t.originalPath;if(e.label){const n=edgeLabels[e.id];let i=e.x,o=e.y;if(r){const l=utils.calcLabelPosition(r);log$1.info("Moving label from (",i,",",o,") to (",l.x,",",l.y,") abc78")}n.attr("transform","translate("+i+", "+o+")")}if(e.startLabelLeft){const n=terminalLabels[e.id].startLeft;let i=e.x,o=e.y;if(r){const l=utils.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);i=l.x,o=l.y}n.attr("transform","translate("+i+", "+o+")")}if(e.startLabelRight){const n=terminalLabels[e.id].startRight;let i=e.x,o=e.y;if(r){const l=utils.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);i=l.x,o=l.y}n.attr("transform","translate("+i+", "+o+")")}if(e.endLabelLeft){const n=terminalLabels[e.id].endLeft;let i=e.x,o=e.y;if(r){const l=utils.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);i=l.x,o=l.y}n.attr("transform","translate("+i+", "+o+")")}if(e.endLabelRight){const n=terminalLabels[e.id].endRight;let i=e.x,o=e.y;if(r){const l=utils.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);i=l.x,o=l.y}n.attr("transform","translate("+i+", "+o+")")}},outsideNode=(e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),o=Math.abs(t.y-n),l=e.width/2,u=e.height/2;return i>=l||o>=u},intersection=(e,t,r)=>{log$1.warn(`intersection calc abc89:
|
|
outsidePoint: ${JSON.stringify(t)}
|
|
insidePoint : ${JSON.stringify(r)}
|
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,o=Math.abs(n-r.x),l=e.width/2;let u=r.x<t.x?l-o:l+o;const h=e.height/2,f=Math.abs(t.y-r.y),d=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*l>Math.abs(n-t.x)*h){let g=r.y<t.y?t.y-h-i:i-h-t.y;u=d*g/f;const p={x:r.x<t.x?r.x+u:r.x-d+u,y:r.y<t.y?r.y+f-g:r.y-f+g};return u===0&&(p.x=t.x,p.y=t.y),d===0&&(p.x=t.x),f===0&&(p.y=t.y),log$1.warn(`abc89 topp/bott calc, Q ${f}, q ${g}, R ${d}, r ${u}`,p),p}else{r.x<t.x?u=t.x-l-n:u=n-l-t.x;let g=f*u/d,p=r.x<t.x?r.x+d-u:r.x-d+u,m=r.y<t.y?r.y+g:r.y-g;return log$1.warn(`sides calc abc89, Q ${f}, q ${g}, R ${d}, r ${u}`,{_x:p,_y:m}),u===0&&(p=t.x,m=t.y),d===0&&(p=t.x),f===0&&(m=t.y),{x:p,y:m}}},cutPathAtIntersect=(e,t)=>{log$1.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(o=>{if(log$1.info("abc88 checking point",o,t),!outsideNode(t,o)&&!i){const l=intersection(t,n,o);log$1.warn("abc88 inside",o,n,l),log$1.warn("abc88 intersection",l);let u=!1;r.forEach(h=>{u=u||h.x===l.x&&h.y===l.y}),r.find(h=>h.x===l.x&&h.y===l.y)?log$1.warn("abc88 no intersect",l,r):r.push(l),i=!0}else log$1.warn("abc88 outside",o,n),n=o,i||r.push(o)}),log$1.warn("abc88 returning points",r),r},insertEdge=function(e,t,r,n,i,o){let l=r.points,u=!1;const h=o.node(t.v);var f=o.node(t.w);log$1.info("abc88 InsertEdge: ",r),f.intersect&&h.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(h.intersect(l[0])),log$1.info("Last point",l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1]))),r.toCluster&&(log$1.info("to cluster abc88",n[r.toCluster]),l=cutPathAtIntersect(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(log$1.info("from cluster abc88",n[r.fromCluster]),l=cutPathAtIntersect(l.reverse(),n[r.fromCluster].node).reverse(),u=!0);const d=l.filter(R=>!Number.isNaN(R.y));let g;i==="graph"||i==="flowchart"?g=r.curve||curveBasis:g=curveBasis;const p=line$2().x(function(R){return R.x}).y(function(R){return R.y}).curve(g);let m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":m="edge-thickness-thick";break;case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed";break}const b=e.append("path").attr("d",p(d)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style);let $="";switch((getConfig$1().flowchart.arrowMarkerAbsolute||getConfig$1().state.arrowMarkerAbsolute)&&($=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,$=$.replace(/\(/g,"\\("),$=$.replace(/\)/g,"\\)")),log$1.info("arrowTypeStart",r.arrowTypeStart),log$1.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":b.attr("marker-start","url("+$+"#"+i+"-crossStart)");break;case"arrow_point":b.attr("marker-start","url("+$+"#"+i+"-pointStart)");break;case"arrow_barb":b.attr("marker-start","url("+$+"#"+i+"-barbStart)");break;case"arrow_circle":b.attr("marker-start","url("+$+"#"+i+"-circleStart)");break;case"aggregation":b.attr("marker-start","url("+$+"#"+i+"-aggregationStart)");break;case"extension":b.attr("marker-start","url("+$+"#"+i+"-extensionStart)");break;case"composition":b.attr("marker-start","url("+$+"#"+i+"-compositionStart)");break;case"dependency":b.attr("marker-start","url("+$+"#"+i+"-dependencyStart)");break;case"lollipop":b.attr("marker-start","url("+$+"#"+i+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":b.attr("marker-end","url("+$+"#"+i+"-crossEnd)");break;case"arrow_point":b.attr("marker-end","url("+$+"#"+i+"-pointEnd)");break;case"arrow_barb":b.attr("marker-end","url("+$+"#"+i+"-barbEnd)");break;case"arrow_circle":b.attr("marker-end","url("+$+"#"+i+"-circleEnd)");break;case"aggregation":b.attr("marker-end","url("+$+"#"+i+"-aggregationEnd)");break;case"extension":b.attr("marker-end","url("+$+"#"+i+"-extensionEnd)");break;case"composition":b.attr("marker-end","url("+$+"#"+i+"-compositionEnd)");break;case"dependency":b.attr("marker-end","url("+$+"#"+i+"-dependencyEnd)");break;case"lollipop":b.attr("marker-end","url("+$+"#"+i+"-lollipopEnd)");break}let S={};return u&&(S.updatedPath=l),S.originalPath=r.points,S},recursiveRender=(e,t,r,n)=>{log$1.info("Graph in recursive render: XXX",graphlib$2.json.write(t),n);const i=t.graph().rankdir;log$1.trace("Dir in recursive render - dir:",i);const o=e.insert("g").attr("class","root");t.nodes()?log$1.info("Recursive render XXX",t.nodes()):log$1.info("No nodes found for",t),t.edges().length>0&&log$1.trace("Recursive edges",t.edge(t.edges()[0]));const l=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),h=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");t.nodes().forEach(function(g){const p=t.node(g);if(typeof n<"u"){const m=JSON.parse(JSON.stringify(n.clusterData));log$1.info("Setting data for cluster XXX (",g,") ",m,n),t.setNode(n.id,m),t.parent(g)||(log$1.trace("Setting parent",g,n.id),t.setParent(g,n.id,m))}if(log$1.info("(Insert) Node XXX"+g+": "+JSON.stringify(t.node(g))),p&&p.clusterNode){log$1.info("Cluster identified",g,p.width,t.node(g));const m=recursiveRender(f,p.graph,r,t.node(g)),b=m.elem;updateNodeBounds(p,b),p.diff=m.diff||0,log$1.info("Node bounds (abc123)",g,p,p.width,p.x,p.y),setNodeElem(b,p),log$1.warn("Recursive render complete ",b,p)}else t.children(g).length>0?(log$1.info("Cluster - the non recursive path XXX",g,p.id,p,t),log$1.info(findNonClusterChild(p.id,t)),clusterDb[p.id]={id:findNonClusterChild(p.id,t),node:p}):(log$1.info("Node - the non recursive path",g,p.id,p),insertNode(f,t.node(g),i))}),t.edges().forEach(function(g){const p=t.edge(g.v,g.w,g.name);log$1.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),log$1.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(t.edge(g))),log$1.info("Fix",clusterDb,"ids:",g.v,g.w,"Translateing: ",clusterDb[g.v],clusterDb[g.w]),insertEdgeLabel(h,p)}),t.edges().forEach(function(g){log$1.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g))}),log$1.info("#############################################"),log$1.info("### Layout ###"),log$1.info("#############################################"),log$1.info(t),dagre$1.layout(t),log$1.info("Graph after layout:",graphlib$2.json.write(t));let d=0;return sortNodesByHierarchy(t).forEach(function(g){const p=t.node(g);log$1.info("Position "+g+": "+JSON.stringify(t.node(g))),log$1.info("Position "+g+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p&&p.clusterNode?positionNode(p):t.children(g).length>0?(insertCluster(l,p),clusterDb[p.id].node=p):positionNode(p)}),t.edges().forEach(function(g){const p=t.edge(g);log$1.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(p),p);const m=insertEdge(u,g,p,clusterDb,r,t);positionEdgeLabel(p,m)}),t.nodes().forEach(function(g){const p=t.node(g);log$1.info(g,p.type,p.diff),p.type==="group"&&(d=p.diff)}),{elem:o,diff:d}},render$1=(e,t,r,n,i)=>{insertMarkers$2(e,r,n,i),clear$a(),clear$8(),clear$9(),clear$b(),log$1.warn("Graph at first:",graphlib$2.json.write(t)),adjustClustersAndEdges(t),log$1.warn("Graph after:",graphlib$2.json.write(t)),recursiveRender(e,t,n)},sanitizeText$1=e=>common.sanitizeText(e,getConfig$1()),addClasses=function(e,t,r,n){const i=Object.keys(e);log$1.info("keys:",i),log$1.info(e),i.forEach(function(o){const l=e[o];let u="";l.cssClasses.length>0&&(u=u+" "+l.cssClasses.join(" "));const h={labelStyle:""};let f=l.text!==void 0?l.text:l.id,d=0,g="";switch(l.type){case"class":g="class_box";break;default:g="class_box"}t.setNode(l.id,{labelStyle:h.labelStyle,shape:g,labelText:sanitizeText$1(f),classData:l,rx:d,ry:d,class:u,style:h.style,id:l.id,domId:l.domId,tooltip:n.db.getTooltip(l.id)||"",haveCallback:l.haveCallback,link:l.link,width:l.type==="group"?500:void 0,type:l.type,padding:getConfig$1().flowchart.padding}),log$1.info("setNode",{labelStyle:h.labelStyle,shape:g,labelText:f,rx:d,ry:d,class:u,style:h.style,id:l.id,width:l.type==="group"?500:void 0,type:l.type,padding:getConfig$1().flowchart.padding})})},addRelations=function(e,t){const r=getConfig$1().flowchart;let n=0;e.forEach(function(i){n++;const o={};o.classes="relation",o.pattern=i.relation.lineType==1?"dashed":"solid",o.id="id"+n,i.type==="arrow_open"?o.arrowhead="none":o.arrowhead="normal",log$1.info(o,i),o.startLabelRight=i.relationTitle1==="none"?"":i.relationTitle1,o.endLabelLeft=i.relationTitle2==="none"?"":i.relationTitle2,o.arrowTypeStart=getArrowMarker(i.relation.type1),o.arrowTypeEnd=getArrowMarker(i.relation.type2);let l="",u="";if(typeof i.style<"u"){const h=getStylesFromArray(i.style);l=h.style,u=h.labelStyle}else l="fill:none";o.style=l,o.labelStyle=u,typeof i.interpolate<"u"?o.curve=interpolateToCurve(i.interpolate,curveLinear$1):typeof e.defaultInterpolate<"u"?o.curve=interpolateToCurve(e.defaultInterpolate,curveLinear$1):o.curve=interpolateToCurve(r.curve,curveLinear$1),i.text=i.title,typeof i.text>"u"?typeof i.style<"u"&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",getConfig$1().flowchart.htmlLabels?(o.labelType="html",o.label='<span class="edgeLabel">'+i.text+"</span>"):(o.labelType="text",o.label=i.text.replace(common.lineBreakRegex,`
|
|
`),typeof i.style>"u"&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(i.id1,i.id2,o,n)})},setConf$9=function(e){Object.keys(e).forEach(function(r){e[r]})},draw$c=function(e,t,r,n){log$1.info("Drawing class - ",t);const i=getConfig$1().flowchart,o=getConfig$1().securityLevel;log$1.info("config:",i);const l=i.nodeSpacing||50,u=i.rankSpacing||50,h=new graphlib$2.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:l,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),f=n.db.getClasses(),d=n.db.getRelations();log$1.info(d),addClasses(f,h,t,n),addRelations(d,h);let g;o==="sandbox"&&(g=select$1("#i"+t));const p=select$1(o==="sandbox"?g.nodes()[0].contentDocument.body:"body"),m=p.select(`[id="${t}"]`),b=p.select("#"+t+" g");if(render$1(b,h,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),setupGraphViewbox$1(h,m,i.diagramPadding,i.useMaxWidth),!i.htmlLabels){const $=o==="sandbox"?g.nodes()[0].contentDocument:document,S=$.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(let R=0;R<S.length;R++){const L=S[R],N=L.getBBox(),F=$.createElementNS("http://www.w3.org/2000/svg","rect");F.setAttribute("rx",0),F.setAttribute("ry",0),F.setAttribute("width",N.width),F.setAttribute("height",N.height),L.insertBefore(F,L.firstChild)}}addSVGAccessibilityFields(n.db,m,t)};function getArrowMarker(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const classRendererV2={setConf:setConf$9,draw:draw$c};var parser$8=function(){var e=function(z,W,T,U){for(T=T||{},U=z.length;U--;T[z[U]]=W);return T},t=[1,2],r=[1,5],n=[6,9,11,23,25,27,29,30,31,49],i=[1,17],o=[1,18],l=[1,19],u=[1,20],h=[1,21],f=[1,22],d=[1,25],g=[1,30],p=[1,31],m=[1,32],b=[1,33],$=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],S=[1,45],R=[30,31,46,47],L=[4,6,9,11,23,25,27,29,30,31,49],N=[42,43,44,45],F=[22,37],H=[1,64],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,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"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],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(W,T,U,I,ae,Q,ue){var _e=Q.length-1;switch(ae){case 1:break;case 3:this.$=[];break;case 4:Q[_e-1].push(Q[_e]),this.$=Q[_e-1];break;case 5:case 6:this.$=Q[_e];break;case 7:case 8:this.$=[];break;case 12:I.addEntity(Q[_e-4]),I.addEntity(Q[_e-2]),I.addRelationship(Q[_e-4],Q[_e],Q[_e-2],Q[_e-3]);break;case 13:I.addEntity(Q[_e-3]),I.addAttributes(Q[_e-3],Q[_e-1]);break;case 14:I.addEntity(Q[_e-2]);break;case 15:I.addEntity(Q[_e]);break;case 16:case 17:this.$=Q[_e].trim(),I.setAccTitle(this.$);break;case 18:case 19:this.$=Q[_e].trim(),I.setAccDescription(this.$);break;case 20:case 41:this.$=Q[_e];break;case 21:case 39:case 40:this.$=Q[_e].replace(/"/g,"");break;case 22:this.$=[Q[_e]];break;case 23:Q[_e].push(Q[_e-1]),this.$=Q[_e];break;case 24:this.$={attributeType:Q[_e-1],attributeName:Q[_e]};break;case 25:this.$={attributeType:Q[_e-2],attributeName:Q[_e-1],attributeKeyType:Q[_e]};break;case 26:this.$={attributeType:Q[_e-2],attributeName:Q[_e-1],attributeComment:Q[_e]};break;case 27:this.$={attributeType:Q[_e-3],attributeName:Q[_e-2],attributeKeyType:Q[_e-1],attributeComment:Q[_e]};break;case 28:case 29:case 30:this.$=Q[_e];break;case 31:this.$=Q[_e].replace(/"/g,"");break;case 32:this.$={cardA:Q[_e],relType:Q[_e-1],cardB:Q[_e-2]};break;case 33:this.$=I.Cardinality.ZERO_OR_ONE;break;case 34:this.$=I.Cardinality.ZERO_OR_MORE;break;case 35:this.$=I.Cardinality.ONE_OR_MORE;break;case 36:this.$=I.Cardinality.ONLY_ONE;break;case 37:this.$=I.Identification.NON_IDENTIFYING;break;case 38:this.$=I.Identification.IDENTIFYING;break;case 42:I.parseDirective("%%{","open_directive");break;case 43:I.parseDirective(Q[_e],"type_directive");break;case 44:Q[_e]=Q[_e].trim().replace(/'/g,'"'),I.parseDirective(Q[_e],"arg_directive");break;case 45:I.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:t,7:3,12:4,49:r},{1:[3]},e(n,[2,3],{5:6}),{3:7,4:t,7:3,12:4,49:r},{13:8,50:[1,9]},{50:[2,42]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,25:o,27:l,29:u,30:h,31:f,49:r},{1:[2,2]},{14:23,15:[1,24],52:d},e([15,52],[2,43]),e(n,[2,8],{1:[2,1]}),e(n,[2,4]),{7:15,10:26,12:4,17:16,23:i,25:o,27:l,29:u,30:h,31:f,49:r},e(n,[2,6]),e(n,[2,7]),e(n,[2,11]),e(n,[2,15],{18:27,40:29,20:[1,28],42:g,43:p,44:m,45:b}),{24:[1,34]},{26:[1,35]},{28:[1,36]},e(n,[2,19]),e($,[2,20]),e($,[2,21]),{11:[1,37]},{16:38,51:[1,39]},{11:[2,45]},e(n,[2,5]),{17:40,30:h,31:f},{21:41,22:[1,42],32:43,33:44,37:S},{41:46,46:[1,47],47:[1,48]},e(R,[2,33]),e(R,[2,34]),e(R,[2,35]),e(R,[2,36]),e(n,[2,16]),e(n,[2,17]),e(n,[2,18]),e(L,[2,9]),{14:49,52:d},{52:[2,44]},{15:[1,50]},{22:[1,51]},e(n,[2,14]),{21:52,22:[2,22],32:43,33:44,37:S},{34:53,37:[1,54]},{37:[2,28]},{40:55,42:g,43:p,44:m,45:b},e(N,[2,37]),e(N,[2,38]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],48:[1,58]},e(n,[2,13]),{22:[2,23]},e(F,[2,24],{35:61,36:62,38:[1,63],39:H}),e([22,37,38,39],[2,29]),e([30,31],[2,32]),e(L,[2,10]),e(n,[2,12]),e(n,[2,39]),e(n,[2,40]),e(n,[2,41]),e(F,[2,25],{36:65,39:H}),e(F,[2,26]),e([22,37,39],[2,30]),e(F,[2,31]),e(F,[2,27])],defaultActions:{5:[2,42],7:[2,2],25:[2,45],39:[2,44],45:[2,28],52:[2,23]},parseError:function(W,T){if(T.recoverable)this.trace(W);else{var U=new Error(W);throw U.hash=T,U}},parse:function(W){var T=this,U=[0],I=[],ae=[null],Q=[],ue=this.table,_e="",ke=0,de=0,ce=2,he=1,Se=Q.slice.call(arguments,1),ve=Object.create(this.lexer),me={yy:{}};for(var Ce in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ce)&&(me.yy[Ce]=this.yy[Ce]);ve.setInput(W,me.yy),me.yy.lexer=ve,me.yy.parser=this,typeof ve.yylloc>"u"&&(ve.yylloc={});var xe=ve.yylloc;Q.push(xe);var Ne=ve.options&&ve.options.ranges;typeof me.yy.parseError=="function"?this.parseError=me.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(){var He;return He=I.pop()||ve.lex()||he,typeof He!="number"&&(He instanceof Array&&(I=He,He=I.pop()),He=T.symbols_[He]||He),He}for(var J,oe,ee,Z,ie={},se,te,fe,we;;){if(oe=U[U.length-1],this.defaultActions[oe]?ee=this.defaultActions[oe]:((J===null||typeof J>"u")&&(J=pe()),ee=ue[oe]&&ue[oe][J]),typeof ee>"u"||!ee.length||!ee[0]){var Ye="";we=[];for(se in ue[oe])this.terminals_[se]&&se>ce&&we.push("'"+this.terminals_[se]+"'");ve.showPosition?Ye="Parse error on line "+(ke+1)+`:
|
|
`+ve.showPosition()+`
|
|
Expecting `+we.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Ye="Parse error on line "+(ke+1)+": Unexpected "+(J==he?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(Ye,{text:ve.match,token:this.terminals_[J]||J,line:ve.yylineno,loc:xe,expected:we})}if(ee[0]instanceof Array&&ee.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+J);switch(ee[0]){case 1:U.push(J),ae.push(ve.yytext),Q.push(ve.yylloc),U.push(ee[1]),J=null,de=ve.yyleng,_e=ve.yytext,ke=ve.yylineno,xe=ve.yylloc;break;case 2:if(te=this.productions_[ee[1]][1],ie.$=ae[ae.length-te],ie._$={first_line:Q[Q.length-(te||1)].first_line,last_line:Q[Q.length-1].last_line,first_column:Q[Q.length-(te||1)].first_column,last_column:Q[Q.length-1].last_column},Ne&&(ie._$.range=[Q[Q.length-(te||1)].range[0],Q[Q.length-1].range[1]]),Z=this.performAction.apply(ie,[_e,de,ke,me.yy,ee[1],ae,Q].concat(Se)),typeof Z<"u")return Z;te&&(U=U.slice(0,-1*te*2),ae=ae.slice(0,-1*te),Q=Q.slice(0,-1*te)),U.push(this.productions_[ee[1]][0]),ae.push(ie.$),Q.push(ie._$),fe=ue[U[U.length-2]][U[U.length-1]],U.push(fe);break;case 3:return!0}}return!0}},P=function(){var z={EOF:1,parseError:function(T,U){if(this.yy.parser)this.yy.parser.parseError(T,U);else throw new Error(T)},setInput:function(W,T){return this.yy=T||this.yy||{},this._input=W,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 W=this._input[0];this.yytext+=W,this.yyleng++,this.offset++,this.match+=W,this.matched+=W;var T=W.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),W},unput:function(W){var T=W.length,U=W.split(/(?:\r\n?|\n)/g);this._input=W+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var I=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),U.length-1&&(this.yylineno-=U.length-1);var ae=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:U?(U.length===I.length?this.yylloc.first_column:0)+I[I.length-U.length].length-U[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[ae[0],ae[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(W){this.unput(this.match.slice(W))},pastInput:function(){var W=this.matched.substr(0,this.matched.length-this.match.length);return(W.length>20?"...":"")+W.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var W=this.match;return W.length<20&&(W+=this._input.substr(0,20-W.length)),(W.substr(0,20)+(W.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var W=this.pastInput(),T=new Array(W.length+1).join("-");return W+this.upcomingInput()+`
|
|
`+T+"^"},test_match:function(W,T){var U,I,ae;if(this.options.backtrack_lexer&&(ae={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&&(ae.yylloc.range=this.yylloc.range.slice(0))),I=W[0].match(/(?:\r\n?|\n).*/g),I&&(this.yylineno+=I.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:I?I[I.length-1].length-I[I.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+W[0].length},this.yytext+=W[0],this.match+=W[0],this.matches=W,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(W[0].length),this.matched+=W[0],U=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),U)return U;if(this._backtrack){for(var Q in ae)this[Q]=ae[Q];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var W,T,U,I;this._more||(this.yytext="",this.match="");for(var ae=this._currentRules(),Q=0;Q<ae.length;Q++)if(U=this._input.match(this.rules[ae[Q]]),U&&(!T||U[0].length>T[0].length)){if(T=U,I=Q,this.options.backtrack_lexer){if(W=this.test_match(U,ae[Q]),W!==!1)return W;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(W=this.test_match(T,ae[I]),W!==!1?W:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+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(){var T=this.conditionStack.length-1;return T>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),T>=0?this.conditionStack[T]:"INITIAL"},pushState:function(T){this.begin(T)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(T,U,I,ae){switch(I){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 21:break;case 22:return 38;case 23:return 37;case 24:return 37;case 25:return 39;case 26:break;case 27:return this.popState(),22;case 28:return U.yytext[0];case 29:return 42;case 30:return 43;case 31:return 44;case 32:return 45;case 33:return 42;case 34:return 43;case 35:return 44;case 36:return 46;case 37:return 47;case 38:return 46;case 39:return 46;case 40:return 30;case 41:return U.yytext[0];case 42:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i,/^(?:"[^"]*")/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:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};return z}();G.lexer=P;function V(){this.yy={}}return V.prototype=G,G.Parser=V,new V}();parser$8.parser=parser$8;const erDetector=e=>e.match(/^\s*erDiagram/)!==null;let entities={},relationships=[];const 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$8=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},addEntity=function(e){return typeof entities[e]>"u"&&(entities[e]={attributes:[]},log$1.info("Added new entity :",e)),entities[e]},getEntities=()=>entities,addAttributes=function(e,t){let r=addEntity(e),n;for(n=t.length-1;n>=0;n--)r.attributes.push(t[n]),log$1.debug("Added attribute ",t[n].attributeName)},addRelationship$1=function(e,t,r,n){let i={entityA:e,roleA:t,entityB:r,relSpec:n};relationships.push(i),log$1.debug("Added new relationship :",i)},getRelationships$1=()=>relationships,clear$7=function(){entities={},relationships=[],clear$g()},erDb={Cardinality,Identification,parseDirective:parseDirective$8,getConfig:()=>getConfig$1().er,addEntity,addAttributes,getEntities,addRelationship:addRelationship$1,getRelationships:getRelationships$1,clear:clear$7,setAccTitle,getAccTitle,setAccDescription,getAccDescription},ERMarkers={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"},insertMarkers$1=function(e,t){let r;e.append("defs").append("marker").attr("id",ERMarkers.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",t.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",ERMarkers.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",t.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=e.append("defs").append("marker").attr("id",ERMarkers.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",t.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",t.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=e.append("defs").append("marker").attr("id",ERMarkers.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",t.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",t.stroke).attr("fill","none").attr("d","M21,0 L21,18"),e.append("defs").append("marker").attr("id",ERMarkers.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",t.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",ERMarkers.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",t.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=e.append("defs").append("marker").attr("id",ERMarkers.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",t.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",t.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=e.append("defs").append("marker").attr("id",ERMarkers.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",t.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",t.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},erMarkers={ERMarkers,insertMarkers:insertMarkers$1},BAD_ID_CHARS_REGEXP=/[^A-Za-z0-9]([\W])*/g;let conf$9={},entityNameIds=new Map;const setConf$8=function(e){const t=Object.keys(e);for(let r=0;r<t.length;r++)conf$9[t[r]]=e[t[r]]},drawAttributes=(e,t,r)=>{const n=conf$9.entityPadding/3,i=conf$9.entityPadding/3,o=conf$9.fontSize*.85,l=t.node().getBBox(),u=[];let h=!1,f=!1,d=0,g=0,p=0,m=0,b=l.height+n*2,$=1;r.forEach(N=>{N.attributeKeyType!==void 0&&(h=!0),N.attributeComment!==void 0&&(f=!0)}),r.forEach(N=>{const F=`${t.node().id}-attr-${$}`;let H=0;const G=parseGenericTypes(N.attributeType),P=e.append("text").attr("class","er entityLabel").attr("id",`${F}-type`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+getConfig$1().fontFamily+"; font-size: "+o+"px").text(G),V=e.append("text").attr("class","er entityLabel").attr("id",`${F}-name`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+getConfig$1().fontFamily+"; font-size: "+o+"px").text(N.attributeName),z={};z.tn=P,z.nn=V;const W=P.node().getBBox(),T=V.node().getBBox();if(d=Math.max(d,W.width),g=Math.max(g,T.width),H=Math.max(W.height,T.height),h){const U=e.append("text").attr("class","er entityLabel").attr("id",`${F}-key`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+getConfig$1().fontFamily+"; font-size: "+o+"px").text(N.attributeKeyType||"");z.kn=U;const I=U.node().getBBox();p=Math.max(p,I.width),H=Math.max(H,I.height)}if(f){const U=e.append("text").attr("class","er entityLabel").attr("id",`${F}-comment`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+getConfig$1().fontFamily+"; font-size: "+o+"px").text(N.attributeComment||"");z.cn=U;const I=U.node().getBBox();m=Math.max(m,I.width),H=Math.max(H,I.height)}z.height=H,u.push(z),b+=H+n*2,$+=1});let S=4;h&&(S+=2),f&&(S+=2);const R=d+g+p+m,L={width:Math.max(conf$9.minEntityWidth,Math.max(l.width+conf$9.entityPadding*2,R+i*S)),height:r.length>0?b:Math.max(conf$9.minEntityHeight,l.height+conf$9.entityPadding*2)};if(r.length>0){const N=Math.max(0,(L.width-R-i*S)/(S/2));t.attr("transform","translate("+L.width/2+","+(n+l.height/2)+")");let F=l.height+n*2,H="attributeBoxOdd";u.forEach(G=>{const P=F+n+G.height/2;G.tn.attr("transform","translate("+i+","+P+")");const V=e.insert("rect","#"+G.tn.node().id).attr("class",`er ${H}`).attr("fill",conf$9.fill).attr("fill-opacity","100%").attr("stroke",conf$9.stroke).attr("x",0).attr("y",F).attr("width",d+i*2+N).attr("height",G.height+n*2),z=parseFloat(V.attr("x"))+parseFloat(V.attr("width"));G.nn.attr("transform","translate("+(z+i)+","+P+")");const W=e.insert("rect","#"+G.nn.node().id).attr("class",`er ${H}`).attr("fill",conf$9.fill).attr("fill-opacity","100%").attr("stroke",conf$9.stroke).attr("x",z).attr("y",F).attr("width",g+i*2+N).attr("height",G.height+n*2);let T=parseFloat(W.attr("x"))+parseFloat(W.attr("width"));if(h){G.kn.attr("transform","translate("+(T+i)+","+P+")");const U=e.insert("rect","#"+G.kn.node().id).attr("class",`er ${H}`).attr("fill",conf$9.fill).attr("fill-opacity","100%").attr("stroke",conf$9.stroke).attr("x",T).attr("y",F).attr("width",p+i*2+N).attr("height",G.height+n*2);T=parseFloat(U.attr("x"))+parseFloat(U.attr("width"))}f&&(G.cn.attr("transform","translate("+(T+i)+","+P+")"),e.insert("rect","#"+G.cn.node().id).attr("class",`er ${H}`).attr("fill",conf$9.fill).attr("fill-opacity","100%").attr("stroke",conf$9.stroke).attr("x",T).attr("y",F).attr("width",m+i*2+N).attr("height",G.height+n*2)),F+=G.height+n*2,H=H==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else L.height=Math.max(conf$9.minEntityHeight,b),t.attr("transform","translate("+L.width/2+","+L.height/2+")");return L},drawEntities=function(e,t,r){const n=Object.keys(t);let i;return n.forEach(function(o){const l=generateId(o,"entity");entityNameIds.set(o,l);const u=e.append("g").attr("id",l);i=i===void 0?l:i;const h="text-"+l,f=u.append("text").attr("class","er entityLabel").attr("id",h).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+getConfig$1().fontFamily+"; font-size: "+conf$9.fontSize+"px").text(o),{width:d,height:g}=drawAttributes(u,f,t[o].attributes),m=u.insert("rect","#"+h).attr("class","er entityBox").attr("fill",conf$9.fill).attr("fill-opacity","100%").attr("stroke",conf$9.stroke).attr("x",0).attr("y",0).attr("width",d).attr("height",g).node().getBBox();r.setNode(l,{width:m.width,height:m.height,shape:"rect",id:l})}),i},adjustEntities$1=function(e,t){t.nodes().forEach(function(r){typeof r<"u"&&typeof t.node(r)<"u"&&e.select("#"+r).attr("transform","translate("+(t.node(r).x-t.node(r).width/2)+","+(t.node(r).y-t.node(r).height/2)+" )")})},getEdgeName=function(e){return(e.entityA+e.roleA+e.entityB).replace(/\s/g,"")},addRelationships$1=function(e,t){return e.forEach(function(r){t.setEdge(entityNameIds.get(r.entityA),entityNameIds.get(r.entityB),{relationship:r},getEdgeName(r))}),e};let relCnt$1=0;const drawRelationshipFromLayout$1=function(e,t,r,n,i){relCnt$1++;const o=r.edge(entityNameIds.get(t.entityA),entityNameIds.get(t.entityB),getEdgeName(t)),l=line$2().x(function(b){return b.x}).y(function(b){return b.y}).curve(curveBasis),u=e.insert("path","#"+n).attr("class","er relationshipLine").attr("d",l(o.points)).attr("stroke",conf$9.stroke).attr("fill","none");t.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&u.attr("stroke-dasharray","8,8");let h="";switch(conf$9.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),t.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:u.attr("marker-end","url("+h+"#"+erMarkers.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:u.attr("marker-end","url("+h+"#"+erMarkers.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:u.attr("marker-end","url("+h+"#"+erMarkers.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:u.attr("marker-end","url("+h+"#"+erMarkers.ERMarkers.ONLY_ONE_END+")");break}switch(t.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:u.attr("marker-start","url("+h+"#"+erMarkers.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:u.attr("marker-start","url("+h+"#"+erMarkers.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:u.attr("marker-start","url("+h+"#"+erMarkers.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:u.attr("marker-start","url("+h+"#"+erMarkers.ERMarkers.ONLY_ONE_START+")");break}const f=u.node().getTotalLength(),d=u.node().getPointAtLength(f*.5),g="rel"+relCnt$1,m=e.append("text").attr("class","er relationshipLabel").attr("id",g).attr("x",d.x).attr("y",d.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+getConfig$1().fontFamily+"; font-size: "+conf$9.fontSize+"px").text(t.roleA).node().getBBox();e.insert("rect","#"+g).attr("class","er relationshipLabelBox").attr("x",d.x-m.width/2).attr("y",d.y-m.height/2).attr("width",m.width).attr("height",m.height).attr("fill","white").attr("fill-opacity","85%")},draw$b=function(e,t,r,n){conf$9=getConfig$1().er,log$1.info("Drawing ER diagram");const i=getConfig$1().securityLevel;let o;i==="sandbox"&&(o=select$1("#i"+t));const u=select$1(i==="sandbox"?o.nodes()[0].contentDocument.body:"body").select(`[id='${t}']`);erMarkers.insertMarkers(u,conf$9);let h;h=new graphlib$2.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:conf$9.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const f=drawEntities(u,n.db.getEntities(),h),d=addRelationships$1(n.db.getRelationships(),h);dagre$1.layout(h),adjustEntities$1(u,h),d.forEach(function($){drawRelationshipFromLayout$1(u,$,h,f,n)});const g=conf$9.diagramPadding,p=u.node().getBBox(),m=p.width+g*2,b=p.height+g*2;configureSvgSize(u,b,m,conf$9.useMaxWidth),u.attr("viewBox",`${p.x-g} ${p.y-g} ${m} ${b}`),addSVGAccessibilityFields(n.db,u,t)};function generateId(e="",t=""){const r=e.replace(BAD_ID_CHARS_REGEXP,"");return`${strWithHyphen(t)}${strWithHyphen(r)}${v4()}`}function strWithHyphen(e=""){return e.length>0?`${e}-`:""}const erRenderer={setConf:setConf$8,draw:draw$b};var parser$7=function(){var e=function(Gt,at,ct,pt){for(ct=ct||{},pt=Gt.length;pt--;ct[Gt[pt]]=at);return ct},t=[1,9],r=[1,7],n=[1,6],i=[1,8],o=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],l=[2,10],u=[1,20],h=[1,21],f=[1,22],d=[1,23],g=[1,30],p=[1,32],m=[1,33],b=[1,34],$=[1,62],S=[1,48],R=[1,52],L=[1,36],N=[1,37],F=[1,38],H=[1,39],G=[1,40],P=[1,56],V=[1,63],z=[1,51],W=[1,53],T=[1,55],U=[1,59],I=[1,60],ae=[1,41],Q=[1,42],ue=[1,43],_e=[1,44],ke=[1,61],de=[1,50],ce=[1,54],he=[1,57],Se=[1,58],ve=[1,49],me=[1,66],Ce=[1,71],xe=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ne=[1,75],pe=[1,74],J=[1,76],oe=[20,21,23,81,82],ee=[1,99],Z=[1,104],ie=[1,107],se=[1,108],te=[1,101],fe=[1,106],we=[1,109],Ye=[1,102],He=[1,114],je=[1,113],Pe=[1,103],Ee=[1,105],Ie=[1,110],Le=[1,111],Be=[1,112],Te=[1,115],dt=[20,21,22,23,81,82],Ge=[20,21,22,23,53,81,82],rt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],it=[20,21,23],st=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],wt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],nt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Ke=[1,149],Je=[1,157],Oe=[1,158],Me=[1,159],Fe=[1,160],qe=[1,144],et=[1,145],Ae=[1,141],_t=[1,152],Re=[1,153],lt=[1,154],xt=[1,155],bt=[1,156],$t=[1,161],kt=[1,162],tt=[1,147],ht=[1,150],vt=[1,146],gt=[1,143],tr=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ht=[1,165],St=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],ft=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Nt=[12,21,22,24],Pt=[22,106],Lt=[1,250],qt=[1,245],Xe=[1,246],ye=[1,254],Ue=[1,251],Ve=[1,248],ot=[1,247],Mt=[1,249],At=[1,252],Rt=[1,253],Ut=[1,255],It=[1,273],rr=[20,21,23,106],Tt=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],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,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$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",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"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],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,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],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(at,ct,pt,Ze,Dt,ge,fr){var be=ge.length-1;switch(Dt){case 5:Ze.parseDirective("%%{","open_directive");break;case 6:Ze.parseDirective(ge[be],"type_directive");break;case 7:ge[be]=ge[be].trim().replace(/'/g,'"'),Ze.parseDirective(ge[be],"arg_directive");break;case 8:Ze.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(ge[be])||ge[be].length>0)&&ge[be-1].push(ge[be]),this.$=ge[be-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=ge[be];break;case 19:Ze.setDirection("TB"),this.$="TB";break;case 20:Ze.setDirection(ge[be-1]),this.$=ge[be-1];break;case 35:this.$=ge[be-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Ze.addSubGraph(ge[be-6],ge[be-1],ge[be-4]);break;case 42:this.$=Ze.addSubGraph(ge[be-3],ge[be-1],ge[be-3]);break;case 43:this.$=Ze.addSubGraph(void 0,ge[be-1],void 0);break;case 45:this.$=ge[be].trim(),Ze.setAccTitle(this.$);break;case 46:case 47:this.$=ge[be].trim(),Ze.setAccDescription(this.$);break;case 51:Ze.addLink(ge[be-2].stmt,ge[be],ge[be-1]),this.$={stmt:ge[be],nodes:ge[be].concat(ge[be-2].nodes)};break;case 52:Ze.addLink(ge[be-3].stmt,ge[be-1],ge[be-2]),this.$={stmt:ge[be-1],nodes:ge[be-1].concat(ge[be-3].nodes)};break;case 53:this.$={stmt:ge[be-1],nodes:ge[be-1]};break;case 54:this.$={stmt:ge[be],nodes:ge[be]};break;case 55:this.$=[ge[be]];break;case 56:this.$=ge[be-4].concat(ge[be]);break;case 57:this.$=[ge[be-2]],Ze.setClass(ge[be-2],ge[be]);break;case 58:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"square");break;case 59:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"doublecircle");break;case 60:this.$=ge[be-5],Ze.addVertex(ge[be-5],ge[be-2],"circle");break;case 61:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"ellipse");break;case 62:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"stadium");break;case 63:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"subroutine");break;case 64:this.$=ge[be-7],Ze.addVertex(ge[be-7],ge[be-1],"rect",void 0,void 0,void 0,Object.fromEntries([[ge[be-5],ge[be-3]]]));break;case 65:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"cylinder");break;case 66:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"round");break;case 67:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"diamond");break;case 68:this.$=ge[be-5],Ze.addVertex(ge[be-5],ge[be-2],"hexagon");break;case 69:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"odd");break;case 70:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"trapezoid");break;case 71:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"inv_trapezoid");break;case 72:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"lean_right");break;case 73:this.$=ge[be-3],Ze.addVertex(ge[be-3],ge[be-1],"lean_left");break;case 74:this.$=ge[be],Ze.addVertex(ge[be]);break;case 75:ge[be-1].text=ge[be],this.$=ge[be-1];break;case 76:case 77:ge[be-2].text=ge[be-1],this.$=ge[be-2];break;case 78:this.$=ge[be];break;case 79:var Yt=Ze.destructLink(ge[be],ge[be-2]);this.$={type:Yt.type,stroke:Yt.stroke,length:Yt.length,text:ge[be-1]};break;case 80:var Yt=Ze.destructLink(ge[be]);this.$={type:Yt.type,stroke:Yt.stroke,length:Yt.length};break;case 81:this.$=ge[be-1];break;case 83:case 97:case 153:this.$=ge[be-1]+""+ge[be];break;case 98:case 99:this.$=ge[be-4],Ze.addClass(ge[be-2],ge[be]);break;case 100:this.$=ge[be-4],Ze.setClass(ge[be-2],ge[be]);break;case 101:case 109:this.$=ge[be-1],Ze.setClickEvent(ge[be-1],ge[be]);break;case 102:case 110:this.$=ge[be-3],Ze.setClickEvent(ge[be-3],ge[be-2]),Ze.setTooltip(ge[be-3],ge[be]);break;case 103:this.$=ge[be-2],Ze.setClickEvent(ge[be-2],ge[be-1],ge[be]);break;case 104:this.$=ge[be-4],Ze.setClickEvent(ge[be-4],ge[be-3],ge[be-2]),Ze.setTooltip(ge[be-4],ge[be]);break;case 105:case 111:this.$=ge[be-1],Ze.setLink(ge[be-1],ge[be]);break;case 106:case 112:this.$=ge[be-3],Ze.setLink(ge[be-3],ge[be-2]),Ze.setTooltip(ge[be-3],ge[be]);break;case 107:case 113:this.$=ge[be-3],Ze.setLink(ge[be-3],ge[be-2],ge[be]);break;case 108:case 114:this.$=ge[be-5],Ze.setLink(ge[be-5],ge[be-4],ge[be]),Ze.setTooltip(ge[be-5],ge[be-2]);break;case 115:this.$=ge[be-4],Ze.addVertex(ge[be-2],void 0,void 0,ge[be]);break;case 116:case 118:this.$=ge[be-4],Ze.updateLink(ge[be-2],ge[be]);break;case 117:this.$=ge[be-4],Ze.updateLink([ge[be-2]],ge[be]);break;case 119:this.$=ge[be-8],Ze.updateLinkInterpolate([ge[be-6]],ge[be-2]),Ze.updateLink([ge[be-6]],ge[be]);break;case 120:this.$=ge[be-8],Ze.updateLinkInterpolate(ge[be-6],ge[be-2]),Ze.updateLink(ge[be-6],ge[be]);break;case 121:this.$=ge[be-6],Ze.updateLinkInterpolate([ge[be-4]],ge[be]);break;case 122:this.$=ge[be-6],Ze.updateLinkInterpolate(ge[be-4],ge[be]);break;case 123:case 125:this.$=[ge[be]];break;case 124:case 126:ge[be-2].push(ge[be]),this.$=ge[be-2];break;case 128:this.$=ge[be-1]+ge[be];break;case 150:this.$=ge[be];break;case 151:this.$=ge[be-1]+""+ge[be];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:t,16:4,21:r,22:n,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:t,16:4,21:r,22:n,24:i},e(o,l,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:n,24:i},{16:15,21:r,22:n,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:u,21:h,22:f,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:g,43:31,44:p,46:m,48:b,50:35,51:45,52:$,54:46,66:S,67:R,86:L,87:N,88:F,89:H,90:G,91:P,95:V,105:z,106:W,109:T,111:U,112:I,116:47,118:ae,119:Q,120:ue,121:_e,122:ke,123:de,124:ce,125:he,126:Se,127:ve},{8:64,10:[1,65],15:me},e([10,15],[2,6]),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),{20:[1,68],21:[1,69],22:Ce,27:67,30:70},e(xe,[2,11]),e(xe,[2,12]),e(xe,[2,13]),e(xe,[2,14]),e(xe,[2,15]),e(xe,[2,16]),{9:72,20:Ne,21:pe,23:J,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Ne,21:pe,23:J},{9:81,20:Ne,21:pe,23:J},{9:82,20:Ne,21:pe,23:J},{9:83,20:Ne,21:pe,23:J},{9:84,20:Ne,21:pe,23:J},{9:86,20:Ne,21:pe,22:[1,85],23:J},e(xe,[2,44]),{45:[1,87]},{47:[1,88]},e(xe,[2,47]),e(oe,[2,54],{30:89,22:Ce}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:ee,52:Z,66:ie,67:se,84:[1,97],91:te,97:96,98:[1,94],100:[1,95],105:fe,106:we,109:Ye,111:He,112:je,115:100,117:98,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(xe,[2,158]),e(xe,[2,159]),e(xe,[2,160]),e(xe,[2,161]),e(dt,[2,55],{53:[1,116]}),e(Ge,[2,74],{116:129,40:[1,117],52:$,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:S,67:R,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:P,95:V,105:z,106:W,109:T,111:U,112:I,122:ke,123:de,124:ce,125:he,126:Se,127:ve}),e(rt,[2,150]),e(rt,[2,175]),e(rt,[2,176]),e(rt,[2,177]),e(rt,[2,178]),e(rt,[2,179]),e(rt,[2,180]),e(rt,[2,181]),e(rt,[2,182]),e(rt,[2,183]),e(rt,[2,184]),e(rt,[2,185]),e(rt,[2,186]),e(rt,[2,187]),e(rt,[2,188]),e(rt,[2,189]),e(rt,[2,190]),{9:130,20:Ne,21:pe,23:J},{11:131,14:[1,132]},e(it,[2,8]),e(o,[2,20]),e(o,[2,26]),e(o,[2,27]),{21:[1,133]},e(st,[2,34],{30:134,22:Ce}),e(xe,[2,35]),{50:135,51:45,52:$,54:46,66:S,67:R,91:P,95:V,105:z,106:W,109:T,111:U,112:I,116:47,122:ke,123:de,124:ce,125:he,126:Se,127:ve},e(wt,[2,48]),e(wt,[2,49]),e(wt,[2,50]),e(nt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Ke,24:Je,26:Oe,38:Me,39:139,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),e(xe,[2,36]),e(xe,[2,37]),e(xe,[2,38]),e(xe,[2,39]),e(xe,[2,40]),{22:Ke,24:Je,26:Oe,38:Me,39:163,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(tr,l,{17:164}),e(xe,[2,45]),e(xe,[2,46]),e(oe,[2,53],{52:Ht}),{26:ee,52:Z,66:ie,67:se,91:te,97:166,102:[1,167],105:fe,106:we,109:Ye,111:He,112:je,115:100,117:98,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{95:[1,168],103:169,105:[1,170]},{26:ee,52:Z,66:ie,67:se,91:te,95:[1,171],97:172,105:fe,106:we,109:Ye,111:He,112:je,115:100,117:98,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{26:ee,52:Z,66:ie,67:se,91:te,97:173,105:fe,106:we,109:Ye,111:He,112:je,115:100,117:98,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(it,[2,101],{22:[1,174],99:[1,175]}),e(it,[2,105],{22:[1,176]}),e(it,[2,109],{115:100,117:178,22:[1,177],26:ee,52:Z,66:ie,67:se,91:te,105:fe,106:we,109:Ye,111:He,112:je,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te}),e(it,[2,111],{22:[1,179]}),e(St,[2,152]),e(St,[2,154]),e(St,[2,155]),e(St,[2,156]),e(St,[2,157]),e(ft,[2,162]),e(ft,[2,163]),e(ft,[2,164]),e(ft,[2,165]),e(ft,[2,166]),e(ft,[2,167]),e(ft,[2,168]),e(ft,[2,169]),e(ft,[2,170]),e(ft,[2,171]),e(ft,[2,172]),e(ft,[2,173]),e(ft,[2,174]),{52:$,54:180,66:S,67:R,91:P,95:V,105:z,106:W,109:T,111:U,112:I,116:47,122:ke,123:de,124:ce,125:he,126:Se,127:ve},{22:Ke,24:Je,26:Oe,38:Me,39:181,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:182,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:184,42:Fe,52:Z,57:[1,183],66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:185,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:186,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:187,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{66:[1,188]},{22:Ke,24:Je,26:Oe,38:Me,39:189,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:190,42:Fe,52:Z,66:ie,67:se,71:[1,191],73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:192,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:193,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:194,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(rt,[2,151]),e(Nt,[2,3]),{8:195,15:me},{15:[2,7]},e(o,[2,28]),e(st,[2,33]),e(oe,[2,51],{30:196,22:Ce}),e(nt,[2,75],{22:[1,197]}),{22:[1,198]},{22:Ke,24:Je,26:Oe,38:Me,39:199,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,82:[1,200],83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(ft,[2,82]),e(ft,[2,84]),e(ft,[2,140]),e(ft,[2,141]),e(ft,[2,142]),e(ft,[2,143]),e(ft,[2,144]),e(ft,[2,145]),e(ft,[2,146]),e(ft,[2,147]),e(ft,[2,148]),e(ft,[2,149]),e(ft,[2,85]),e(ft,[2,86]),e(ft,[2,87]),e(ft,[2,88]),e(ft,[2,89]),e(ft,[2,90]),e(ft,[2,91]),e(ft,[2,92]),e(ft,[2,93]),e(ft,[2,94]),e(ft,[2,95]),{9:203,20:Ne,21:pe,22:Ke,23:J,24:Je,26:Oe,38:Me,40:[1,202],42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{18:18,19:19,20:u,21:h,22:f,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:g,42:[1,204],43:31,44:p,46:m,48:b,50:35,51:45,52:$,54:46,66:S,67:R,86:L,87:N,88:F,89:H,90:G,91:P,95:V,105:z,106:W,109:T,111:U,112:I,116:47,118:ae,119:Q,120:ue,121:_e,122:ke,123:de,124:ce,125:he,126:Se,127:ve},{22:Ce,30:205},{22:[1,206],26:ee,52:Z,66:ie,67:se,91:te,105:fe,106:we,109:Ye,111:He,112:je,115:100,117:178,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},e(Pt,[2,123]),{22:[1,211]},{22:[1,212],26:ee,52:Z,66:ie,67:se,91:te,105:fe,106:we,109:Ye,111:He,112:je,115:100,117:178,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:[1,213],26:ee,52:Z,66:ie,67:se,91:te,105:fe,106:we,109:Ye,111:He,112:je,115:100,117:178,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{84:[1,214]},e(it,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},e(St,[2,153]),{84:[1,219],101:[1,220]},e(dt,[2,57],{116:129,52:$,66:S,67:R,91:P,95:V,105:z,106:W,109:T,111:U,112:I,122:ke,123:de,124:ce,125:he,126:Se,127:ve}),{22:Ke,24:Je,26:Oe,38:Me,41:[1,221],42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,56:[1,222],66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:223,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,58:[1,224],66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,60:[1,225],66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,62:[1,226],66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,64:[1,227],66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{67:[1,228]},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,66:ie,67:se,70:[1,229],73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,66:ie,67:se,72:[1,230],73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,39:231,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,41:[1,232],42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,66:ie,67:se,73:qe,75:[1,233],77:[1,234],81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,66:ie,67:se,73:qe,75:[1,236],77:[1,235],81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{9:237,20:Ne,21:pe,23:J},e(oe,[2,52],{52:Ht}),e(nt,[2,77]),e(nt,[2,76]),{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,66:ie,67:se,68:[1,238],73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(nt,[2,79]),e(ft,[2,83]),{22:Ke,24:Je,26:Oe,38:Me,39:239,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(tr,l,{17:240}),e(xe,[2,43]),{51:241,52:$,54:46,66:S,67:R,91:P,95:V,105:z,106:W,109:T,111:U,112:I,116:47,122:ke,123:de,124:ce,125:he,126:Se,127:ve},{22:Lt,66:qt,67:Xe,86:ye,96:242,102:Ue,105:Ve,107:243,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},{22:Lt,66:qt,67:Xe,86:ye,96:256,102:Ue,105:Ve,107:243,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},{22:Lt,66:qt,67:Xe,86:ye,96:257,102:Ue,104:[1,258],105:Ve,107:243,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},{22:Lt,66:qt,67:Xe,86:ye,96:259,102:Ue,104:[1,260],105:Ve,107:243,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},{105:[1,261]},{22:Lt,66:qt,67:Xe,86:ye,96:262,102:Ue,105:Ve,107:243,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},{22:Lt,66:qt,67:Xe,86:ye,96:263,102:Ue,105:Ve,107:243,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},{26:ee,52:Z,66:ie,67:se,91:te,97:264,105:fe,106:we,109:Ye,111:He,112:je,115:100,117:98,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(it,[2,102]),{84:[1,265]},e(it,[2,106],{22:[1,266]}),e(it,[2,107]),e(it,[2,110]),e(it,[2,112],{22:[1,267]}),e(it,[2,113]),e(Ge,[2,58]),e(Ge,[2,59]),{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,58:[1,268],66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(Ge,[2,66]),e(Ge,[2,61]),e(Ge,[2,62]),e(Ge,[2,63]),{66:[1,269]},e(Ge,[2,65]),e(Ge,[2,67]),{22:Ke,24:Je,26:Oe,38:Me,42:Fe,52:Z,66:ie,67:se,72:[1,270],73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(Ge,[2,69]),e(Ge,[2,70]),e(Ge,[2,72]),e(Ge,[2,71]),e(Ge,[2,73]),e(Nt,[2,4]),e([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Ke,24:Je,26:Oe,38:Me,41:[1,271],42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{18:18,19:19,20:u,21:h,22:f,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:g,42:[1,272],43:31,44:p,46:m,48:b,50:35,51:45,52:$,54:46,66:S,67:R,86:L,87:N,88:F,89:H,90:G,91:P,95:V,105:z,106:W,109:T,111:U,112:I,116:47,118:ae,119:Q,120:ue,121:_e,122:ke,123:de,124:ce,125:he,126:Se,127:ve},e(dt,[2,56]),e(it,[2,115],{106:It}),e(rr,[2,125],{108:274,22:Lt,66:qt,67:Xe,86:ye,102:Ue,105:Ve,109:ot,110:Mt,111:At,112:Rt,113:Ut}),e(Tt,[2,127]),e(Tt,[2,129]),e(Tt,[2,130]),e(Tt,[2,131]),e(Tt,[2,132]),e(Tt,[2,133]),e(Tt,[2,134]),e(Tt,[2,135]),e(Tt,[2,136]),e(Tt,[2,137]),e(Tt,[2,138]),e(Tt,[2,139]),e(it,[2,116],{106:It}),e(it,[2,117],{106:It}),{22:[1,275]},e(it,[2,118],{106:It}),{22:[1,276]},e(Pt,[2,124]),e(it,[2,98],{106:It}),e(it,[2,99],{106:It}),e(it,[2,100],{115:100,117:178,26:ee,52:Z,66:ie,67:se,91:te,105:fe,106:we,109:Ye,111:He,112:je,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te}),e(it,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Ne,21:pe,23:J},e(xe,[2,42]),{22:Lt,66:qt,67:Xe,86:ye,102:Ue,105:Ve,107:283,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},e(Tt,[2,128]),{26:ee,52:Z,66:ie,67:se,91:te,97:284,105:fe,106:we,109:Ye,111:He,112:je,115:100,117:98,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{26:ee,52:Z,66:ie,67:se,91:te,97:285,105:fe,106:we,109:Ye,111:He,112:je,115:100,117:98,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(it,[2,108]),e(it,[2,114]),e(Ge,[2,60]),{22:Ke,24:Je,26:Oe,38:Me,39:286,42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:140,84:Ae,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},e(Ge,[2,68]),e(tr,l,{17:287}),e(rr,[2,126],{108:274,22:Lt,66:qt,67:Xe,86:ye,102:Ue,105:Ve,109:ot,110:Mt,111:At,112:Rt,113:Ut}),e(it,[2,121],{115:100,117:178,22:[1,288],26:ee,52:Z,66:ie,67:se,91:te,105:fe,106:we,109:Ye,111:He,112:je,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te}),e(it,[2,122],{115:100,117:178,22:[1,289],26:ee,52:Z,66:ie,67:se,91:te,105:fe,106:we,109:Ye,111:He,112:je,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te}),{22:Ke,24:Je,26:Oe,38:Me,41:[1,290],42:Fe,52:Z,66:ie,67:se,73:qe,81:et,83:201,85:151,86:_t,87:Re,88:lt,89:xt,90:bt,91:$t,92:kt,94:142,95:tt,105:fe,106:we,109:ht,111:He,112:je,113:vt,114:gt,115:148,122:Pe,123:Ee,124:Ie,125:Le,126:Be,127:Te},{18:18,19:19,20:u,21:h,22:f,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:g,42:[1,291],43:31,44:p,46:m,48:b,50:35,51:45,52:$,54:46,66:S,67:R,86:L,87:N,88:F,89:H,90:G,91:P,95:V,105:z,106:W,109:T,111:U,112:I,116:47,118:ae,119:Q,120:ue,121:_e,122:ke,123:de,124:ce,125:he,126:Se,127:ve},{22:Lt,66:qt,67:Xe,86:ye,96:292,102:Ue,105:Ve,107:243,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},{22:Lt,66:qt,67:Xe,86:ye,96:293,102:Ue,105:Ve,107:243,108:244,109:ot,110:Mt,111:At,112:Rt,113:Ut},e(Ge,[2,64]),e(xe,[2,41]),e(it,[2,119],{106:It}),e(it,[2,120],{106:It})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(at,ct){if(ct.recoverable)this.trace(at);else{var pt=new Error(at);throw pt.hash=ct,pt}},parse:function(at){var ct=this,pt=[0],Ze=[],Dt=[null],ge=[],fr=this.table,be="",Yt=0,Cr=0,qr=2,Er=1,Ar=ge.slice.call(arguments,1),Bt=Object.create(this.lexer),Jt={yy:{}};for(var er in this.yy)Object.prototype.hasOwnProperty.call(this.yy,er)&&(Jt.yy[er]=this.yy[er]);Bt.setInput(at,Jt.yy),Jt.yy.lexer=Bt,Jt.yy.parser=this,typeof Bt.yylloc>"u"&&(Bt.yylloc={});var dr=Bt.yylloc;ge.push(dr);var wr=Bt.options&&Bt.options.ranges;typeof Jt.yy.parseError=="function"?this.parseError=Jt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Rr(){var jt;return jt=Ze.pop()||Bt.lex()||Er,typeof jt!="number"&&(jt instanceof Array&&(Ze=jt,jt=Ze.pop()),jt=ct.symbols_[jt]||jt),jt}for(var zt,Et,Vt,nr,Kt={},ir,Wt,Tr,yr;;){if(Et=pt[pt.length-1],this.defaultActions[Et]?Vt=this.defaultActions[Et]:((zt===null||typeof zt>"u")&&(zt=Rr()),Vt=fr[Et]&&fr[Et][zt]),typeof Vt>"u"||!Vt.length||!Vt[0]){var pr="";yr=[];for(ir in fr[Et])this.terminals_[ir]&&ir>qr&&yr.push("'"+this.terminals_[ir]+"'");Bt.showPosition?pr="Parse error on line "+(Yt+1)+`:
|
|
`+Bt.showPosition()+`
|
|
Expecting `+yr.join(", ")+", got '"+(this.terminals_[zt]||zt)+"'":pr="Parse error on line "+(Yt+1)+": Unexpected "+(zt==Er?"end of input":"'"+(this.terminals_[zt]||zt)+"'"),this.parseError(pr,{text:Bt.match,token:this.terminals_[zt]||zt,line:Bt.yylineno,loc:dr,expected:yr})}if(Vt[0]instanceof Array&&Vt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Et+", token: "+zt);switch(Vt[0]){case 1:pt.push(zt),Dt.push(Bt.yytext),ge.push(Bt.yylloc),pt.push(Vt[1]),zt=null,Cr=Bt.yyleng,be=Bt.yytext,Yt=Bt.yylineno,dr=Bt.yylloc;break;case 2:if(Wt=this.productions_[Vt[1]][1],Kt.$=Dt[Dt.length-Wt],Kt._$={first_line:ge[ge.length-(Wt||1)].first_line,last_line:ge[ge.length-1].last_line,first_column:ge[ge.length-(Wt||1)].first_column,last_column:ge[ge.length-1].last_column},wr&&(Kt._$.range=[ge[ge.length-(Wt||1)].range[0],ge[ge.length-1].range[1]]),nr=this.performAction.apply(Kt,[be,Cr,Yt,Jt.yy,Vt[1],Dt,ge].concat(Ar)),typeof nr<"u")return nr;Wt&&(pt=pt.slice(0,-1*Wt*2),Dt=Dt.slice(0,-1*Wt),ge=ge.slice(0,-1*Wt)),pt.push(this.productions_[Vt[1]][0]),Dt.push(Kt.$),ge.push(Kt._$),Tr=fr[pt[pt.length-2]][pt[pt.length-1]],pt.push(Tr);break;case 3:return!0}}return!0}},Sr=function(){var Gt={EOF:1,parseError:function(ct,pt){if(this.yy.parser)this.yy.parser.parseError(ct,pt);else throw new Error(ct)},setInput:function(at,ct){return this.yy=ct||this.yy||{},this._input=at,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 at=this._input[0];this.yytext+=at,this.yyleng++,this.offset++,this.match+=at,this.matched+=at;var ct=at.match(/(?:\r\n?|\n).*/g);return ct?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),at},unput:function(at){var ct=at.length,pt=at.split(/(?:\r\n?|\n)/g);this._input=at+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ct),this.offset-=ct;var Ze=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),pt.length-1&&(this.yylineno-=pt.length-1);var Dt=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:pt?(pt.length===Ze.length?this.yylloc.first_column:0)+Ze[Ze.length-pt.length].length-pt[0].length:this.yylloc.first_column-ct},this.options.ranges&&(this.yylloc.range=[Dt[0],Dt[0]+this.yyleng-ct]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(at){this.unput(this.match.slice(at))},pastInput:function(){var at=this.matched.substr(0,this.matched.length-this.match.length);return(at.length>20?"...":"")+at.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var at=this.match;return at.length<20&&(at+=this._input.substr(0,20-at.length)),(at.substr(0,20)+(at.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var at=this.pastInput(),ct=new Array(at.length+1).join("-");return at+this.upcomingInput()+`
|
|
`+ct+"^"},test_match:function(at,ct){var pt,Ze,Dt;if(this.options.backtrack_lexer&&(Dt={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&&(Dt.yylloc.range=this.yylloc.range.slice(0))),Ze=at[0].match(/(?:\r\n?|\n).*/g),Ze&&(this.yylineno+=Ze.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ze?Ze[Ze.length-1].length-Ze[Ze.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+at[0].length},this.yytext+=at[0],this.match+=at[0],this.matches=at,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(at[0].length),this.matched+=at[0],pt=this.performAction.call(this,this.yy,this,ct,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),pt)return pt;if(this._backtrack){for(var ge in Dt)this[ge]=Dt[ge];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var at,ct,pt,Ze;this._more||(this.yytext="",this.match="");for(var Dt=this._currentRules(),ge=0;ge<Dt.length;ge++)if(pt=this._input.match(this.rules[Dt[ge]]),pt&&(!ct||pt[0].length>ct[0].length)){if(ct=pt,Ze=ge,this.options.backtrack_lexer){if(at=this.test_match(pt,Dt[ge]),at!==!1)return at;if(this._backtrack){ct=!1;continue}else return!1}else if(!this.options.flex)break}return ct?(at=this.test_match(ct,Dt[Ze]),at!==!1?at:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ct=this.next();return ct||this.lex()},begin:function(ct){this.conditionStack.push(ct)},popState:function(){var ct=this.conditionStack.length-1;return ct>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(ct){return ct=this.conditionStack.length-1-Math.abs(ct||0),ct>=0?this.conditionStack[ct]:"INITIAL"},pushState:function(ct){this.begin(ct)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ct,pt,Ze,Dt){switch(Ze){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:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return ct.lex.firstGraph()&&this.begin("dir"),24;case 36:return ct.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:return 101;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return this.popState(),25;case 44:return this.popState(),26;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:return 82;case 67:return 82;case 68:return 82;case 69:return 82;case 70:return 81;case 71:return 81;case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:return 125;case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?: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*~~[\~]+\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:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}};return Gt}();Qt.lexer=Sr;function xr(){this.yy={}}return xr.prototype=Qt,Qt.Parser=xr,new xr}();parser$7.parser=parser$7;const flowDetector=(e,t)=>{var r;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:e.match(/^\s*graph/)!==null},flowDetectorV2=(e,t)=>{var r;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"&&e.match(/^\s*graph/)!==null?!0:e.match(/^\s*flowchart/)!==null},MERMAID_DOM_ID_PREFIX="flowchart-";let vertexCounter=0,config=getConfig$1(),vertices={},edges=[],classes$1=[],subGraphs=[],subGraphLookup={},tooltips={},subCount=0,firstGraphFlag=!0,direction$1,version,funs$1=[];const sanitizeText=e=>common.sanitizeText(e,config),parseDirective$7=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},lookUpDomId=function(e){const t=Object.keys(vertices);for(let r=0;r<t.length;r++)if(vertices[t[r]].id===e)return vertices[t[r]].domId;return e},addVertex=function(e,t,r,n,i,o,l={}){let u,h=e;typeof h>"u"||h.trim().length!==0&&(typeof vertices[h]>"u"&&(vertices[h]={id:h,domId:MERMAID_DOM_ID_PREFIX+h+"-"+vertexCounter,styles:[],classes:[]}),vertexCounter++,typeof t<"u"?(config=getConfig$1(),u=sanitizeText(t.trim()),u[0]==='"'&&u[u.length-1]==='"'&&(u=u.substring(1,u.length-1)),vertices[h].text=u):typeof vertices[h].text>"u"&&(vertices[h].text=e),typeof r<"u"&&(vertices[h].type=r),typeof n<"u"&&n!==null&&n.forEach(function(f){vertices[h].styles.push(f)}),typeof i<"u"&&i!==null&&i.forEach(function(f){vertices[h].classes.push(f)}),typeof o<"u"&&(vertices[h].dir=o),vertices[h].props=l)},addSingleLink=function(e,t,r,n){const l={start:e,end:t,type:void 0,text:""};n=r.text,typeof n<"u"&&(l.text=sanitizeText(n.trim()),l.text[0]==='"'&&l.text[l.text.length-1]==='"'&&(l.text=l.text.substring(1,l.text.length-1))),typeof r<"u"&&(l.type=r.type,l.stroke=r.stroke,l.length=r.length),edges.push(l)},addLink=function(e,t,r,n){let i,o;for(i=0;i<e.length;i++)for(o=0;o<t.length;o++)addSingleLink(e[i],t[o],r,n)},updateLinkInterpolate=function(e,t){e.forEach(function(r){r==="default"?edges.defaultInterpolate=t:edges[r].interpolate=t})},updateLink=function(e,t){e.forEach(function(r){r==="default"?edges.defaultStyle=t:(utils.isSubstringInArray("fill",t)===-1&&t.push("fill:none"),edges[r].style=t)})},addClass=function(e,t){typeof classes$1[e]>"u"&&(classes$1[e]={id:e,styles:[],textStyles:[]}),typeof t<"u"&&t!==null&&t.forEach(function(r){if(r.match("color")){const i=r.replace("fill","bgFill").replace("color","fill");classes$1[e].textStyles.push(i)}classes$1[e].styles.push(r)})},setDirection$1=function(e){direction$1=e,direction$1.match(/.*</)&&(direction$1="RL"),direction$1.match(/.*\^/)&&(direction$1="BT"),direction$1.match(/.*>/)&&(direction$1="LR"),direction$1.match(/.*v/)&&(direction$1="TB")},setClass$1=function(e,t){e.split(",").forEach(function(r){let n=r;typeof vertices[n]<"u"&&vertices[n].classes.push(t),typeof subGraphLookup[n]<"u"&&subGraphLookup[n].classes.push(t)})},setTooltip=function(e,t){e.split(",").forEach(function(r){typeof t<"u"&&(tooltips[version==="gen-1"?lookUpDomId(r):r]=sanitizeText(t))})},setClickFun$1=function(e,t,r){let n=lookUpDomId(e);if(getConfig$1().securityLevel!=="loose"||typeof t>"u")return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<i.length;o++){let l=i[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),i[o]=l}}i.length===0&&i.push(e),typeof vertices[e]<"u"&&(vertices[e].haveCallback=!0,funs$1.push(function(){const o=document.querySelector(`[id="${n}"]`);o!==null&&o.addEventListener("click",function(){utils.runFunc(t,...i)},!1)}))},setLink$1=function(e,t,r){e.split(",").forEach(function(n){typeof vertices[n]<"u"&&(vertices[n].link=utils.formatUrl(t,config),vertices[n].linkTarget=r)}),setClass$1(e,"clickable")},getTooltip=function(e){return tooltips[e]},setClickEvent$1=function(e,t,r){e.split(",").forEach(function(n){setClickFun$1(n,t,r)}),setClass$1(e,"clickable")},bindFunctions$1=function(e){funs$1.forEach(function(t){t(e)})},getDirection$1=function(){return direction$1.trim()},getVertices=function(){return vertices},getEdges=function(){return edges},getClasses$4=function(){return classes$1},setupToolTips=function(e){let t=select$1(".mermaidTooltip");(t._groups||t)[0][0]===null&&(t=select$1("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),select$1(e).select("svg").selectAll("g.node").on("mouseover",function(){const i=select$1(this);if(i.attr("title")===null)return;const l=this.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.text(i.attr("title")).style("left",window.scrollX+l.left+(l.right-l.left)/2+"px").style("top",window.scrollY+l.top-14+document.body.scrollTop+"px"),t.html(t.html().replace(/<br\/>/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){t.transition().duration(500).style("opacity",0),select$1(this).classed("hover",!1)})};funs$1.push(setupToolTips);const clear$6=function(e="gen-1"){vertices={},classes$1={},edges=[],funs$1=[setupToolTips],subGraphs=[],subGraphLookup={},subCount=0,tooltips=[],firstGraphFlag=!0,version=e,clear$g()},setGen=e=>{version=e||"gen-1"},defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph=function(e,t,r){let n=e.trim(),i=r.trim();n===i&&i.match(/\s/)&&(n=void 0);function o(d){const g={boolean:{},number:{},string:{}},p=[];let m;return{nodeList:d.filter(function($){const S=typeof $;return $.stmt&&$.stmt==="dir"?(m=$.value,!1):$.trim()===""?!1:S in g?g[S].hasOwnProperty($)?!1:g[S][$]=!0:p.indexOf($)>=0?!1:p.push($)}),dir:m}}let l=[];const{nodeList:u,dir:h}=o(l.concat.apply(l,t));if(l=u,version==="gen-1")for(let d=0;d<l.length;d++)l[d]=lookUpDomId(l[d]);n=n||"subGraph"+subCount,i=i||"",i=sanitizeText(i),subCount=subCount+1;const f={id:n,nodes:l,title:i.trim(),classes:[],dir:h};return log$1.info("Adding",f.id,f.nodes,f.dir),f.nodes=makeUniq(f,subGraphs).nodes,subGraphs.push(f),subGraphLookup[n]=f,n},getPosForId=function(e){for(let t=0;t<subGraphs.length;t++)if(subGraphs[t].id===e)return t;return-1};let secCount=-1;const posCrossRef=[],indexNodes2=function(e,t){const r=subGraphs[t].nodes;if(secCount=secCount+1,secCount>2e3)return;if(posCrossRef[secCount]=t,subGraphs[t].id===e)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){const o=getPosForId(r[n]);if(o>=0){const l=indexNodes2(e,o);if(l.result)return{result:!0,count:i+l.count};i=i+l.count}n=n+1}return{result:!1,count:i}},getDepthFirstPos=function(e){return posCrossRef[e]},indexNodes=function(){secCount=-1,subGraphs.length>0&&indexNodes2("none",subGraphs.length-1)},getSubGraphs=function(){return subGraphs},firstGraph=()=>firstGraphFlag?(firstGraphFlag=!1,!0):!1,destructStartLink=e=>{let t=e.trim(),r="arrow_open";switch(t[0]){case"<":r="arrow_point",t=t.slice(1);break;case"x":r="arrow_cross",t=t.slice(1);break;case"o":r="arrow_circle",t=t.slice(1);break}let n="normal";return t.indexOf("=")!==-1&&(n="thick"),t.indexOf(".")!==-1&&(n="dotted"),{type:r,stroke:n}},countChar=(e,t)=>{const r=t.length;let n=0;for(let i=0;i<r;++i)t[i]===e&&++n;return n},destructEndLink=e=>{const t=e.trim();let r=t.slice(0,-1),n="arrow_open";switch(t.slice(-1)){case"x":n="arrow_cross",t[0]==="x"&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",t[0]==="<"&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",t[0]==="o"&&(n="double_"+n,r=r.slice(1));break}let i="normal",o=r.length-1;r[0]==="="&&(i="thick"),r[0]==="~"&&(i="invisible");let l=countChar(".",r);return l&&(i="dotted",o=l),{type:n,stroke:i,length:o}},destructLink=(e,t)=>{const r=destructEndLink(e);let n;if(t){if(n=destructStartLink(t),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r},exists=(e,t)=>{let r=!1;return e.forEach(n=>{n.nodes.indexOf(t)>=0&&(r=!0)}),r},makeUniq=(e,t)=>{const r=[];return e.nodes.forEach((n,i)=>{exists(t,n)||r.push(e.nodes[i])}),{nodes:r}},flowDb={parseDirective:parseDirective$7,defaultConfig:()=>defaultConfig.flowchart,setAccTitle,getAccTitle,getAccDescription,setAccDescription,addVertex,lookUpDomId,addLink,updateLinkInterpolate,updateLink,addClass,setDirection:setDirection$1,setClass:setClass$1,setTooltip,getTooltip,setClickEvent:setClickEvent$1,setLink:setLink$1,bindFunctions:bindFunctions$1,getDirection:getDirection$1,getVertices,getEdges,getClasses:getClasses$4,clear:clear$6,setGen,defaultStyle,addSubGraph,getDepthFirstPos,indexNodes,getSubGraphs,destructLink,lex:{firstGraph},exists,makeUniq};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var identity_1,hasRequiredIdentity;function requireIdentity(){if(hasRequiredIdentity)return identity_1;hasRequiredIdentity=1;function e(t){return t}return identity_1=e,identity_1}var _apply,hasRequired_apply;function require_apply(){if(hasRequired_apply)return _apply;hasRequired_apply=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return _apply=e,_apply}var _overRest,hasRequired_overRest;function require_overRest(){if(hasRequired_overRest)return _overRest;hasRequired_overRest=1;var e=require_apply(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var l=arguments,u=-1,h=t(l.length-i,0),f=Array(h);++u<h;)f[u]=l[i+u];u=-1;for(var d=Array(i+1);++u<i;)d[u]=l[u];return d[i]=o(f),e(n,this,d)}}return _overRest=r,_overRest}var constant_1,hasRequiredConstant;function requireConstant(){if(hasRequiredConstant)return constant_1;hasRequiredConstant=1;function e(t){return function(){return t}}return constant_1=e,constant_1}var _defineProperty,hasRequired_defineProperty;function require_defineProperty(){if(hasRequired_defineProperty)return _defineProperty;hasRequired_defineProperty=1;var e=require_getNative(),t=function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}}();return _defineProperty=t,_defineProperty}var _baseSetToString,hasRequired_baseSetToString;function require_baseSetToString(){if(hasRequired_baseSetToString)return _baseSetToString;hasRequired_baseSetToString=1;var e=requireConstant(),t=require_defineProperty(),r=requireIdentity(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return _baseSetToString=n,_baseSetToString}var _shortOut,hasRequired_shortOut;function require_shortOut(){if(hasRequired_shortOut)return _shortOut;hasRequired_shortOut=1;var e=800,t=16,r=Date.now;function n(i){var o=0,l=0;return function(){var u=r(),h=t-(u-l);if(l=u,h>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return _shortOut=n,_shortOut}var _setToString,hasRequired_setToString;function require_setToString(){if(hasRequired_setToString)return _setToString;hasRequired_setToString=1;var e=require_baseSetToString(),t=require_shortOut(),r=t(e);return _setToString=r,_setToString}var _baseRest,hasRequired_baseRest;function require_baseRest(){if(hasRequired_baseRest)return _baseRest;hasRequired_baseRest=1;var e=requireIdentity(),t=require_overRest(),r=require_setToString();function n(i,o){return r(t(i,o,e),i+"")}return _baseRest=n,_baseRest}var isLength_1,hasRequiredIsLength;function requireIsLength(){if(hasRequiredIsLength)return isLength_1;hasRequiredIsLength=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return isLength_1=t,isLength_1}var isArrayLike_1,hasRequiredIsArrayLike;function requireIsArrayLike(){if(hasRequiredIsArrayLike)return isArrayLike_1;hasRequiredIsArrayLike=1;var e=requireIsFunction(),t=requireIsLength();function r(n){return n!=null&&t(n.length)&&!e(n)}return isArrayLike_1=r,isArrayLike_1}var _isIndex,hasRequired_isIndex;function require_isIndex(){if(hasRequired_isIndex)return _isIndex;hasRequired_isIndex=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var o=typeof n;return i=i==null?e:i,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return _isIndex=r,_isIndex}var _isIterateeCall,hasRequired_isIterateeCall;function require_isIterateeCall(){if(hasRequired_isIterateeCall)return _isIterateeCall;hasRequired_isIterateeCall=1;var e=requireEq(),t=requireIsArrayLike(),r=require_isIndex(),n=requireIsObject();function i(o,l,u){if(!n(u))return!1;var h=typeof l;return(h=="number"?t(u)&&r(l,u.length):h=="string"&&l in u)?e(u[l],o):!1}return _isIterateeCall=i,_isIterateeCall}var _baseTimes,hasRequired_baseTimes;function require_baseTimes(){if(hasRequired_baseTimes)return _baseTimes;hasRequired_baseTimes=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return _baseTimes=e,_baseTimes}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var _baseIsArguments,hasRequired_baseIsArguments;function require_baseIsArguments(){if(hasRequired_baseIsArguments)return _baseIsArguments;hasRequired_baseIsArguments=1;var e=require_baseGetTag(),t=requireIsObjectLike(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return _baseIsArguments=n,_baseIsArguments}var isArguments_1,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments_1;hasRequiredIsArguments=1;var e=require_baseIsArguments(),t=requireIsObjectLike(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(l){return t(l)&&n.call(l,"callee")&&!i.call(l,"callee")};return isArguments_1=o,isArguments_1}var isArray_1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e,isArray_1}var isBuffer={exports:{}},stubFalse_1,hasRequiredStubFalse;function requireStubFalse(){if(hasRequiredStubFalse)return stubFalse_1;hasRequiredStubFalse=1;function e(){return!1}return stubFalse_1=e,stubFalse_1}var hasRequiredIsBuffer;function requireIsBuffer(){return hasRequiredIsBuffer||(hasRequiredIsBuffer=1,function(e,t){var r=require_root(),n=requireStubFalse(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?r.Buffer:void 0,h=u?u.isBuffer:void 0,f=h||n;e.exports=f}(isBuffer,isBuffer.exports)),isBuffer.exports}var _baseIsTypedArray,hasRequired_baseIsTypedArray;function require_baseIsTypedArray(){if(hasRequired_baseIsTypedArray)return _baseIsTypedArray;hasRequired_baseIsTypedArray=1;var e=require_baseGetTag(),t=requireIsLength(),r=requireIsObjectLike(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",f="[object Map]",d="[object Number]",g="[object Object]",p="[object RegExp]",m="[object Set]",b="[object String]",$="[object WeakMap]",S="[object ArrayBuffer]",R="[object DataView]",L="[object Float32Array]",N="[object Float64Array]",F="[object Int8Array]",H="[object Int16Array]",G="[object Int32Array]",P="[object Uint8Array]",V="[object Uint8ClampedArray]",z="[object Uint16Array]",W="[object Uint32Array]",T={};T[L]=T[N]=T[F]=T[H]=T[G]=T[P]=T[V]=T[z]=T[W]=!0,T[n]=T[i]=T[S]=T[o]=T[R]=T[l]=T[u]=T[h]=T[f]=T[d]=T[g]=T[p]=T[m]=T[b]=T[$]=!1;function U(I){return r(I)&&t(I.length)&&!!T[e(I)]}return _baseIsTypedArray=U,_baseIsTypedArray}var _baseUnary,hasRequired_baseUnary;function require_baseUnary(){if(hasRequired_baseUnary)return _baseUnary;hasRequired_baseUnary=1;function e(t){return function(r){return t(r)}}return _baseUnary=e,_baseUnary}var _nodeUtil={exports:{}},hasRequired_nodeUtil;function require_nodeUtil(){return hasRequired_nodeUtil||(hasRequired_nodeUtil=1,function(e,t){var r=require_freeGlobal(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,l=o&&r.process,u=function(){try{var h=i&&i.require&&i.require("util").types;return h||l&&l.binding&&l.binding("util")}catch{}}();e.exports=u}(_nodeUtil,_nodeUtil.exports)),_nodeUtil.exports}var isTypedArray_1,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray_1;hasRequiredIsTypedArray=1;var e=require_baseIsTypedArray(),t=require_baseUnary(),r=require_nodeUtil(),n=r&&r.isTypedArray,i=n?t(n):e;return isTypedArray_1=i,isTypedArray_1}var _arrayLikeKeys,hasRequired_arrayLikeKeys;function require_arrayLikeKeys(){if(hasRequired_arrayLikeKeys)return _arrayLikeKeys;hasRequired_arrayLikeKeys=1;var e=require_baseTimes(),t=requireIsArguments(),r=requireIsArray(),n=requireIsBuffer(),i=require_isIndex(),o=requireIsTypedArray(),l=Object.prototype,u=l.hasOwnProperty;function h(f,d){var g=r(f),p=!g&&t(f),m=!g&&!p&&n(f),b=!g&&!p&&!m&&o(f),$=g||p||m||b,S=$?e(f.length,String):[],R=S.length;for(var L in f)(d||u.call(f,L))&&!($&&(L=="length"||m&&(L=="offset"||L=="parent")||b&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||i(L,R)))&&S.push(L);return S}return _arrayLikeKeys=h,_arrayLikeKeys}var _isPrototype,hasRequired_isPrototype;function require_isPrototype(){if(hasRequired_isPrototype)return _isPrototype;hasRequired_isPrototype=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return _isPrototype=t,_isPrototype}var _nativeKeysIn,hasRequired_nativeKeysIn;function require_nativeKeysIn(){if(hasRequired_nativeKeysIn)return _nativeKeysIn;hasRequired_nativeKeysIn=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return _nativeKeysIn=e,_nativeKeysIn}var _baseKeysIn,hasRequired_baseKeysIn;function require_baseKeysIn(){if(hasRequired_baseKeysIn)return _baseKeysIn;hasRequired_baseKeysIn=1;var e=requireIsObject(),t=require_isPrototype(),r=require_nativeKeysIn(),n=Object.prototype,i=n.hasOwnProperty;function o(l){if(!e(l))return r(l);var u=t(l),h=[];for(var f in l)f=="constructor"&&(u||!i.call(l,f))||h.push(f);return h}return _baseKeysIn=o,_baseKeysIn}var keysIn_1,hasRequiredKeysIn;function requireKeysIn(){if(hasRequiredKeysIn)return keysIn_1;hasRequiredKeysIn=1;var e=require_arrayLikeKeys(),t=require_baseKeysIn(),r=requireIsArrayLike();function n(i){return r(i)?e(i,!0):t(i)}return keysIn_1=n,keysIn_1}var defaults_1,hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults_1;hasRequiredDefaults=1;var e=require_baseRest(),t=requireEq(),r=require_isIterateeCall(),n=requireKeysIn(),i=Object.prototype,o=i.hasOwnProperty,l=e(function(u,h){u=Object(u);var f=-1,d=h.length,g=d>2?h[2]:void 0;for(g&&r(h[0],h[1],g)&&(d=1);++f<d;)for(var p=h[f],m=n(p),b=-1,$=m.length;++b<$;){var S=m[b],R=u[S];(R===void 0||t(R,i[S])&&!o.call(u,S))&&(u[S]=p[S])}return u});return defaults_1=l,defaults_1}var each={exports:{}},_arrayEach,hasRequired_arrayEach;function require_arrayEach(){if(hasRequired_arrayEach)return _arrayEach;hasRequired_arrayEach=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return _arrayEach=e,_arrayEach}var _createBaseFor,hasRequired_createBaseFor;function require_createBaseFor(){if(hasRequired_createBaseFor)return _createBaseFor;hasRequired_createBaseFor=1;function e(t){return function(r,n,i){for(var o=-1,l=Object(r),u=i(r),h=u.length;h--;){var f=u[t?h:++o];if(n(l[f],f,l)===!1)break}return r}}return _createBaseFor=e,_createBaseFor}var _baseFor,hasRequired_baseFor;function require_baseFor(){if(hasRequired_baseFor)return _baseFor;hasRequired_baseFor=1;var e=require_createBaseFor(),t=e();return _baseFor=t,_baseFor}var _overArg,hasRequired_overArg;function require_overArg(){if(hasRequired_overArg)return _overArg;hasRequired_overArg=1;function e(t,r){return function(n){return t(r(n))}}return _overArg=e,_overArg}var _nativeKeys,hasRequired_nativeKeys;function require_nativeKeys(){if(hasRequired_nativeKeys)return _nativeKeys;hasRequired_nativeKeys=1;var e=require_overArg(),t=e(Object.keys,Object);return _nativeKeys=t,_nativeKeys}var _baseKeys,hasRequired_baseKeys;function require_baseKeys(){if(hasRequired_baseKeys)return _baseKeys;hasRequired_baseKeys=1;var e=require_isPrototype(),t=require_nativeKeys(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var l=[];for(var u in Object(o))n.call(o,u)&&u!="constructor"&&l.push(u);return l}return _baseKeys=i,_baseKeys}var keys_1,hasRequiredKeys;function requireKeys(){if(hasRequiredKeys)return keys_1;hasRequiredKeys=1;var e=require_arrayLikeKeys(),t=require_baseKeys(),r=requireIsArrayLike();function n(i){return r(i)?e(i):t(i)}return keys_1=n,keys_1}var _baseForOwn,hasRequired_baseForOwn;function require_baseForOwn(){if(hasRequired_baseForOwn)return _baseForOwn;hasRequired_baseForOwn=1;var e=require_baseFor(),t=requireKeys();function r(n,i){return n&&e(n,i,t)}return _baseForOwn=r,_baseForOwn}var _createBaseEach,hasRequired_createBaseEach;function require_createBaseEach(){if(hasRequired_createBaseEach)return _createBaseEach;hasRequired_createBaseEach=1;var e=requireIsArrayLike();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var l=i.length,u=n?l:-1,h=Object(i);(n?u--:++u<l)&&o(h[u],u,h)!==!1;);return i}}return _createBaseEach=t,_createBaseEach}var _baseEach,hasRequired_baseEach;function require_baseEach(){if(hasRequired_baseEach)return _baseEach;hasRequired_baseEach=1;var e=require_baseForOwn(),t=require_createBaseEach(),r=t(e);return _baseEach=r,_baseEach}var _castFunction,hasRequired_castFunction;function require_castFunction(){if(hasRequired_castFunction)return _castFunction;hasRequired_castFunction=1;var e=requireIdentity();function t(r){return typeof r=="function"?r:e}return _castFunction=t,_castFunction}var forEach_1,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach_1;hasRequiredForEach=1;var e=require_arrayEach(),t=require_baseEach(),r=require_castFunction(),n=requireIsArray();function i(o,l){var u=n(o)?e:t;return u(o,r(l))}return forEach_1=i,forEach_1}var hasRequiredEach;function requireEach(){return hasRequiredEach||(hasRequiredEach=1,function(e){e.exports=requireForEach()}(each)),each.exports}var _getPrototype,hasRequired_getPrototype;function require_getPrototype(){if(hasRequired_getPrototype)return _getPrototype;hasRequired_getPrototype=1;var e=require_overArg(),t=e(Object.getPrototypeOf,Object);return _getPrototype=t,_getPrototype}var isPlainObject_1,hasRequiredIsPlainObject;function requireIsPlainObject(){if(hasRequiredIsPlainObject)return isPlainObject_1;hasRequiredIsPlainObject=1;var e=require_baseGetTag(),t=require_getPrototype(),r=requireIsObjectLike(),n="[object Object]",i=Function.prototype,o=Object.prototype,l=i.toString,u=o.hasOwnProperty,h=l.call(Object);function f(d){if(!r(d)||e(d)!=n)return!1;var g=t(d);if(g===null)return!0;var p=u.call(g,"constructor")&&g.constructor;return typeof p=="function"&&p instanceof p&&l.call(p)==h}return isPlainObject_1=f,isPlainObject_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return isSymbol_1=n,isSymbol_1}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,l){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||l!=null&&o in Object(l)}return _isKey=i,_isKey}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=memoize_1,t=500;function r(n){var i=e(n,function(l){return o.size===t&&o.clear(),l}),o=i.cache;return i}return _memoizeCapped=r,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(l,u,h,f){o.push(h?f.replace(r,"$1"):u||l)}),o});return _stringToPath=n,_stringToPath}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),r=requireIsArray(),n=requireIsSymbol(),i=1/0,o=e?e.prototype:void 0,l=o?o.toString:void 0;function u(h){if(typeof h=="string")return h;if(r(h))return t(h,u)+"";if(n(h))return l?l.call(h):"";var f=h+"";return f=="0"&&1/h==-i?"-0":f}return _baseToString=u,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(r){return r==null?"":e(r)}return toString_1=t,toString_1}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),r=require_stringToPath(),n=requireToString();function i(o,l){return e(o)?o:t(o,l)?[o]:r(n(o))}return _castPath=i,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol(),t=1/0;function r(n){if(typeof n=="string"||e(n))return n;var i=n+"";return i=="0"&&1/n==-t?"-0":i}return _toKey=r,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function r(n,i){i=e(i,n);for(var o=0,l=i.length;n!=null&&o<l;)n=n[t(i[o++])];return o&&o==l?n:void 0}return _baseGet=r,_baseGet}var _baseAssignValue,hasRequired_baseAssignValue;function require_baseAssignValue(){if(hasRequired_baseAssignValue)return _baseAssignValue;hasRequired_baseAssignValue=1;var e=require_defineProperty();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return _baseAssignValue=t,_baseAssignValue}var _assignValue,hasRequired_assignValue;function require_assignValue(){if(hasRequired_assignValue)return _assignValue;hasRequired_assignValue=1;var e=require_baseAssignValue(),t=requireEq(),r=Object.prototype,n=r.hasOwnProperty;function i(o,l,u){var h=o[l];(!(n.call(o,l)&&t(h,u))||u===void 0&&!(l in o))&&e(o,l,u)}return _assignValue=i,_assignValue}var _baseSet,hasRequired_baseSet;function require_baseSet(){if(hasRequired_baseSet)return _baseSet;hasRequired_baseSet=1;var e=require_assignValue(),t=require_castPath(),r=require_isIndex(),n=requireIsObject(),i=require_toKey();function o(l,u,h,f){if(!n(l))return l;u=t(u,l);for(var d=-1,g=u.length,p=g-1,m=l;m!=null&&++d<g;){var b=i(u[d]),$=h;if(b==="__proto__"||b==="constructor"||b==="prototype")return l;if(d!=p){var S=m[b];$=f?f(S,b,m):void 0,$===void 0&&($=n(S)?S:r(u[d+1])?[]:{})}e(m,b,$),m=m[b]}return l}return _baseSet=o,_baseSet}var _basePickBy,hasRequired_basePickBy;function require_basePickBy(){if(hasRequired_basePickBy)return _basePickBy;hasRequired_basePickBy=1;var e=require_baseGet(),t=require_baseSet(),r=require_castPath();function n(i,o,l){for(var u=-1,h=o.length,f={};++u<h;){var d=o[u],g=e(i,d);l(g,d)&&t(f,r(d,i),g)}return f}return _basePickBy=n,_basePickBy}var _baseHasIn,hasRequired_baseHasIn;function require_baseHasIn(){if(hasRequired_baseHasIn)return _baseHasIn;hasRequired_baseHasIn=1;function e(t,r){return t!=null&&r in Object(t)}return _baseHasIn=e,_baseHasIn}var _hasPath,hasRequired_hasPath;function require_hasPath(){if(hasRequired_hasPath)return _hasPath;hasRequired_hasPath=1;var e=require_castPath(),t=requireIsArguments(),r=requireIsArray(),n=require_isIndex(),i=requireIsLength(),o=require_toKey();function l(u,h,f){h=e(h,u);for(var d=-1,g=h.length,p=!1;++d<g;){var m=o(h[d]);if(!(p=u!=null&&f(u,m)))break;u=u[m]}return p||++d!=g?p:(g=u==null?0:u.length,!!g&&i(g)&&n(m,g)&&(r(u)||t(u)))}return _hasPath=l,_hasPath}var hasIn_1,hasRequiredHasIn;function requireHasIn(){if(hasRequiredHasIn)return hasIn_1;hasRequiredHasIn=1;var e=require_baseHasIn(),t=require_hasPath();function r(n,i){return n!=null&&t(n,i,e)}return hasIn_1=r,hasIn_1}var _basePick,hasRequired_basePick;function require_basePick(){if(hasRequired_basePick)return _basePick;hasRequired_basePick=1;var e=require_basePickBy(),t=requireHasIn();function r(n,i){return e(n,i,function(o,l){return t(n,l)})}return _basePick=r,_basePick}var _arrayPush,hasRequired_arrayPush;function require_arrayPush(){if(hasRequired_arrayPush)return _arrayPush;hasRequired_arrayPush=1;function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}return _arrayPush=e,_arrayPush}var _isFlattenable,hasRequired_isFlattenable;function require_isFlattenable(){if(hasRequired_isFlattenable)return _isFlattenable;hasRequired_isFlattenable=1;var e=require_Symbol(),t=requireIsArguments(),r=requireIsArray(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return _isFlattenable=i,_isFlattenable}var _baseFlatten,hasRequired_baseFlatten;function require_baseFlatten(){if(hasRequired_baseFlatten)return _baseFlatten;hasRequired_baseFlatten=1;var e=require_arrayPush(),t=require_isFlattenable();function r(n,i,o,l,u){var h=-1,f=n.length;for(o||(o=t),u||(u=[]);++h<f;){var d=n[h];i>0&&o(d)?i>1?r(d,i-1,o,l,u):e(u,d):l||(u[u.length]=d)}return u}return _baseFlatten=r,_baseFlatten}var flatten_1,hasRequiredFlatten;function requireFlatten(){if(hasRequiredFlatten)return flatten_1;hasRequiredFlatten=1;var e=require_baseFlatten();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return flatten_1=t,flatten_1}var _flatRest,hasRequired_flatRest;function require_flatRest(){if(hasRequired_flatRest)return _flatRest;hasRequired_flatRest=1;var e=requireFlatten(),t=require_overRest(),r=require_setToString();function n(i){return r(t(i,void 0,e),i+"")}return _flatRest=n,_flatRest}var pick_1,hasRequiredPick;function requirePick(){if(hasRequiredPick)return pick_1;hasRequiredPick=1;var e=require_basePick(),t=require_flatRest(),r=t(function(n,i){return n==null?{}:e(n,i)});return pick_1=r,pick_1}var _baseHas,hasRequired_baseHas;function require_baseHas(){if(hasRequired_baseHas)return _baseHas;hasRequired_baseHas=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return _baseHas=r,_baseHas}var has_1,hasRequiredHas;function requireHas(){if(hasRequiredHas)return has_1;hasRequiredHas=1;var e=require_baseHas(),t=require_hasPath();function r(n,i){return n!=null&&t(n,i,e)}return has_1=r,has_1}var _baseRange,hasRequired_baseRange;function require_baseRange(){if(hasRequired_baseRange)return _baseRange;hasRequired_baseRange=1;var e=Math.ceil,t=Math.max;function r(n,i,o,l){for(var u=-1,h=t(e((i-n)/(o||1)),0),f=Array(h);h--;)f[l?h:++u]=n,n+=o;return f}return _baseRange=r,_baseRange}var _trimmedEndIndex,hasRequired_trimmedEndIndex;function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return _trimmedEndIndex=t,_trimmedEndIndex}var _baseTrim,hasRequired_baseTrim;function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return _baseTrim=r,_baseTrim}var toNumber_1,hasRequiredToNumber;function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),t=requireIsObject(),r=requireIsSymbol(),n=0/0,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function h(f){if(typeof f=="number")return f;if(r(f))return n;if(t(f)){var d=typeof f.valueOf=="function"?f.valueOf():f;f=t(d)?d+"":d}if(typeof f!="string")return f===0?f:+f;f=e(f);var g=o.test(f);return g||l.test(f)?u(f.slice(2),g?2:8):i.test(f)?n:+f}return toNumber_1=h,toNumber_1}var toFinite_1,hasRequiredToFinite;function requireToFinite(){if(hasRequiredToFinite)return toFinite_1;hasRequiredToFinite=1;var e=requireToNumber(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return toFinite_1=n,toFinite_1}var _createRange,hasRequired_createRange;function require_createRange(){if(hasRequired_createRange)return _createRange;hasRequired_createRange=1;var e=require_baseRange(),t=require_isIterateeCall(),r=requireToFinite();function n(i){return function(o,l,u){return u&&typeof u!="number"&&t(o,l,u)&&(l=u=void 0),o=r(o),l===void 0?(l=o,o=0):l=r(l),u=u===void 0?o<l?1:-1:r(u),e(o,l,u,i)}}return _createRange=n,_createRange}var range_1,hasRequiredRange;function requireRange(){if(hasRequiredRange)return range_1;hasRequiredRange=1;var e=require_createRange(),t=e();return range_1=t,range_1}var uniqueId_1,hasRequiredUniqueId;function requireUniqueId(){if(hasRequiredUniqueId)return uniqueId_1;hasRequiredUniqueId=1;var e=requireToString(),t=0;function r(n){var i=++t;return e(n)+i}return uniqueId_1=r,uniqueId_1}var lodash;if(typeof commonjsRequire=="function")try{lodash={defaults:requireDefaults(),each:requireEach(),isFunction:requireIsFunction(),isPlainObject:requireIsPlainObject(),pick:requirePick(),has:requireHas(),range:requireRange(),uniqueId:requireUniqueId()}}catch{}lodash||(lodash=window._);var lodash_1=lodash,_=lodash_1,util$1={isSubgraph,edgeToId,applyStyle,applyClass,applyTransition};function isSubgraph(e,t){return!!e.children(t).length}function edgeToId(e){return escapeId(e.v)+":"+escapeId(e.w)+":"+escapeId(e.name)}var ID_DELIM=/:/g;function escapeId(e){return e?String(e).replace(ID_DELIM,"\\:"):""}function applyStyle(e,t){t&&e.attr("style",t)}function applyClass(e,t,r){t&&e.attr("class",t).attr("class",r+" "+e.attr("class"))}function applyTransition(e,t){var r=t.graph();if(_.isPlainObject(r)){var n=r.transition;if(_.isFunction(n))return n(e)}return e}var util=util$1,addHtmlLabel_1=addHtmlLabel;function addHtmlLabel(e,t){var r=e.append("foreignObject").attr("width","100000"),n=r.append("xhtml:div");n.attr("xmlns","http://www.w3.org/1999/xhtml");var i=t.label;switch(typeof i){case"function":n.insert(i);break;case"object":n.insert(function(){return i});break;default:n.html(i)}util.applyStyle(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap");var o=n.node().getBoundingClientRect();return r.attr("width",o.width).attr("height",o.height),r}function question(e,t,r){const n=t.width,i=t.height,o=(n+i)*.9,l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],u=insertPolygonShape(e,o,o,l);return r.intersect=function(h){return dagreD3.intersect.polygon(r,l,h)},u}function hexagon(e,t,r){const i=t.height,o=i/4,l=t.width+2*o,u=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-i/2},{x:l-o,y:-i},{x:o,y:-i},{x:0,y:-i/2}],h=insertPolygonShape(e,l,i,u);return r.intersect=function(f){return dagreD3.intersect.polygon(r,u,f)},h}function rect_left_inv_arrow(e,t,r){const n=t.width,i=t.height,o=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],l=insertPolygonShape(e,n,i,o);return r.intersect=function(u){return dagreD3.intersect.polygon(r,o,u)},l}function lean_right(e,t,r){const n=t.width,i=t.height,o=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],l=insertPolygonShape(e,n,i,o);return r.intersect=function(u){return dagreD3.intersect.polygon(r,o,u)},l}function lean_left(e,t,r){const n=t.width,i=t.height,o=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],l=insertPolygonShape(e,n,i,o);return r.intersect=function(u){return dagreD3.intersect.polygon(r,o,u)},l}function trapezoid(e,t,r){const n=t.width,i=t.height,o=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],l=insertPolygonShape(e,n,i,o);return r.intersect=function(u){return dagreD3.intersect.polygon(r,o,u)},l}function inv_trapezoid(e,t,r){const n=t.width,i=t.height,o=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],l=insertPolygonShape(e,n,i,o);return r.intersect=function(u){return dagreD3.intersect.polygon(r,o,u)},l}function rect_right_inv_arrow(e,t,r){const n=t.width,i=t.height,o=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],l=insertPolygonShape(e,n,i,o);return r.intersect=function(u){return dagreD3.intersect.polygon(r,o,u)},l}function stadium(e,t,r){const n=t.height,i=t.width+n/4,o=e.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return r.intersect=function(l){return dagreD3.intersect.rect(r,l)},o}function subroutine(e,t,r){const n=t.width,i=t.height,o=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],l=insertPolygonShape(e,n,i,o);return r.intersect=function(u){return dagreD3.intersect.polygon(r,o,u)},l}function cylinder(e,t,r){const n=t.width,i=n/2,o=i/(2.5+n/50),l=t.height+o,u="M 0,"+o+" a "+i+","+o+" 0,0,0 "+n+" 0 a "+i+","+o+" 0,0,0 "+-n+" 0 l 0,"+l+" a "+i+","+o+" 0,0,0 "+n+" 0 l 0,"+-l,h=e.attr("label-offset-y",o).insert("path",":first-child").attr("d",u).attr("transform","translate("+-n/2+","+-(l/2+o)+")");return r.intersect=function(f){const d=dagreD3.intersect.rect(r,f),g=d.x-r.x;if(i!=0&&(Math.abs(g)<r.width/2||Math.abs(g)==r.width/2&&Math.abs(d.y-r.y)>r.height/2-o)){let p=o*o*(1-g*g/(i*i));p!=0&&(p=Math.sqrt(p)),p=o-p,f.y-r.y>0&&(p=-p),d.y+=p}return d},h}function addToRender(e){e.shapes().question=question,e.shapes().hexagon=hexagon,e.shapes().stadium=stadium,e.shapes().subroutine=subroutine,e.shapes().cylinder=cylinder,e.shapes().rect_left_inv_arrow=rect_left_inv_arrow,e.shapes().lean_right=lean_right,e.shapes().lean_left=lean_left,e.shapes().trapezoid=trapezoid,e.shapes().inv_trapezoid=inv_trapezoid,e.shapes().rect_right_inv_arrow=rect_right_inv_arrow}function addToRenderV2(e){e({question}),e({hexagon}),e({stadium}),e({subroutine}),e({cylinder}),e({rect_left_inv_arrow}),e({lean_right}),e({lean_left}),e({trapezoid}),e({inv_trapezoid}),e({rect_right_inv_arrow})}function insertPolygonShape(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("transform","translate("+-t/2+","+r/2+")")}const flowChartShapes={addToRender,addToRenderV2},conf$8={},setConf$7=function(e){const t=Object.keys(e);for(let r=0;r<t.length;r++)conf$8[t[r]]=e[t[r]]},addVertices$1=function(e,t,r,n,i,o){const l=n?n.select(`[id="${r}"]`):select$1(`[id="${r}"]`),u=i||document;Object.keys(e).forEach(function(f){const d=e[f];let g="default";d.classes.length>0&&(g=d.classes.join(" "));const p=getStylesFromArray(d.styles);let m=d.text!==void 0?d.text:d.id,b;if(evaluate(getConfig$1().flowchart.htmlLabels)){const R={label:m.replace(/fa[lrsb]?:fa-[\w-]+/g,L=>`<i class='${L.replace(":"," ")}'></i>`)};b=addHtmlLabel_1(l,R).node(),b.parentNode.removeChild(b)}else{const R=u.createElementNS("http://www.w3.org/2000/svg","text");R.setAttribute("style",p.labelStyle.replace("color:","fill:"));const L=m.split(common.lineBreakRegex);for(let N=0;N<L.length;N++){const F=u.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","1"),F.textContent=L[N],R.appendChild(F)}b=R}let $=0,S="";switch(d.type){case"round":$=5,S="rect";break;case"square":S="rect";break;case"diamond":S="question";break;case"hexagon":S="hexagon";break;case"odd":S="rect_left_inv_arrow";break;case"lean_right":S="lean_right";break;case"lean_left":S="lean_left";break;case"trapezoid":S="trapezoid";break;case"inv_trapezoid":S="inv_trapezoid";break;case"odd_right":S="rect_left_inv_arrow";break;case"circle":S="circle";break;case"ellipse":S="ellipse";break;case"stadium":S="stadium";break;case"subroutine":S="subroutine";break;case"cylinder":S="cylinder";break;case"group":S="rect";break;default:S="rect"}log$1.warn("Adding node",d.id,d.domId),t.setNode(o.db.lookUpDomId(d.id),{labelType:"svg",labelStyle:p.labelStyle,shape:S,label:b,rx:$,ry:$,class:g,style:p.style,id:o.db.lookUpDomId(d.id)})})},addEdges$1=function(e,t,r){let n=0,i,o;if(typeof e.defaultStyle<"u"){const l=getStylesFromArray(e.defaultStyle);i=l.style,o=l.labelStyle}e.forEach(function(l){n++;var u="L-"+l.start+"-"+l.end,h="LS-"+l.start,f="LE-"+l.end;const d={};l.type==="arrow_open"?d.arrowhead="none":d.arrowhead="normal";let g="",p="";if(typeof l.style<"u"){const m=getStylesFromArray(l.style);g=m.style,p=m.labelStyle}else switch(l.stroke){case"normal":g="fill:none",typeof i<"u"&&(g=i),typeof o<"u"&&(p=o);break;case"dotted":g="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":g=" stroke-width: 3.5px;fill:none";break}d.style=g,d.labelStyle=p,typeof l.interpolate<"u"?d.curve=interpolateToCurve(l.interpolate,curveLinear$1):typeof e.defaultInterpolate<"u"?d.curve=interpolateToCurve(e.defaultInterpolate,curveLinear$1):d.curve=interpolateToCurve(conf$8.curve,curveLinear$1),typeof l.text>"u"?typeof l.style<"u"&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",evaluate(getConfig$1().flowchart.htmlLabels)?(d.labelType="html",d.label=`<span id="L-${u}" class="edgeLabel L-${h}' L-${f}" style="${d.labelStyle}">${l.text.replace(/fa[lrsb]?:fa-[\w-]+/g,m=>`<i class='${m.replace(":"," ")}'></i>`)}</span>`):(d.labelType="text",d.label=l.text.replace(common.lineBreakRegex,`
|
|
`),typeof l.style>"u"&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:"))),d.id=u,d.class=h+" "+f,d.minlen=l.length||1,t.setEdge(r.db.lookUpDomId(l.start),r.db.lookUpDomId(l.end),d,n)})},getClasses$3=function(e,t){log$1.info("Extracting classes"),t.db.clear();try{return t.parse(e),t.db.getClasses()}catch{return}},draw$a=function(e,t,r,n){log$1.info("Drawing flowchart"),n.db.clear();const{securityLevel:i,flowchart:o}=getConfig$1();let l;i==="sandbox"&&(l=select$1("#i"+t));const u=select$1(i==="sandbox"?l.nodes()[0].contentDocument.body:"body"),h=i==="sandbox"?l.nodes()[0].contentDocument:document;try{n.parser.parse(e)}catch{log$1.debug("Parsing failed")}let f=n.db.getDirection();typeof f>"u"&&(f="TD");const d=o.nodeSpacing||50,g=o.rankSpacing||50,p=new graphlib$2.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:d,ranksep:g,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let m;const b=n.db.getSubGraphs();for(let P=b.length-1;P>=0;P--)m=b[P],n.db.addVertex(m.id,m.title,"group",void 0,m.classes);const $=n.db.getVertices();log$1.warn("Get vertices",$);const S=n.db.getEdges();let R=0;for(R=b.length-1;R>=0;R--){m=b[R],selectAll$1("cluster").append("text");for(let P=0;P<m.nodes.length;P++)log$1.warn("Setting subgraph",m.nodes[P],n.db.lookUpDomId(m.nodes[P]),n.db.lookUpDomId(m.id)),p.setParent(n.db.lookUpDomId(m.nodes[P]),n.db.lookUpDomId(m.id))}addVertices$1($,p,t,u,h,n),addEdges$1(S,p,n);const L=dagreD3.render,N=new L;flowChartShapes.addToRender(N),N.arrows().none=function(V,z,W,T){const I=V.append("marker").attr("id",z).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");dagreD3.util.applyStyle(I,W[T+"Style"])},N.arrows().normal=function(V,z){V.append("marker").attr("id",z).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")};const F=u.select(`[id="${t}"]`);addSVGAccessibilityFields(n.db,F,t);const H=u.select("#"+t+" g");for(N(H,p),H.selectAll("g.node").attr("title",function(){return n.db.getTooltip(this.id)}),n.db.indexNodes("subGraph"+R),R=0;R<b.length;R++)if(m=b[R],m.title!=="undefined"){const P=h.querySelectorAll("#"+t+' [id="'+n.db.lookUpDomId(m.id)+'"] rect'),V=h.querySelectorAll("#"+t+' [id="'+n.db.lookUpDomId(m.id)+'"]'),z=P[0].x.baseVal.value,W=P[0].y.baseVal.value,T=P[0].width.baseVal.value,I=select$1(V[0]).select(".label");I.attr("transform",`translate(${z+T/2}, ${W+14})`),I.attr("id",t+"Text");for(let ae=0;ae<m.classes.length;ae++)V[0].classList.add(m.classes[ae])}if(!o.htmlLabels){const P=h.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(let V=0;V<P.length;V++){const z=P[V],W=z.getBBox(),T=h.createElementNS("http://www.w3.org/2000/svg","rect");T.setAttribute("rx",0),T.setAttribute("ry",0),T.setAttribute("width",W.width),T.setAttribute("height",W.height),z.insertBefore(T,z.firstChild)}}setupGraphViewbox$1(p,F,o.diagramPadding,o.useMaxWidth),Object.keys($).forEach(function(P){const V=$[P];if(V.link){const z=u.select("#"+t+' [id="'+n.db.lookUpDomId(P)+'"]');if(z){const W=h.createElementNS("http://www.w3.org/2000/svg","a");W.setAttributeNS("http://www.w3.org/2000/svg","class",V.classes.join(" ")),W.setAttributeNS("http://www.w3.org/2000/svg","href",V.link),W.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?W.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):V.linkTarget&&W.setAttributeNS("http://www.w3.org/2000/svg","target",V.linkTarget);const T=z.insert(function(){return W},":first-child"),U=z.select(".label-container");U&&T.append(function(){return U.node()});const I=z.select(".label");I&&T.append(function(){return I.node()})}}})},flowRenderer={setConf:setConf$7,addVertices:addVertices$1,addEdges:addEdges$1,getClasses:getClasses$3,draw:draw$a},conf$7={},setConf$6=function(e){const t=Object.keys(e);for(let r=0;r<t.length;r++)conf$7[t[r]]=e[t[r]]},addVertices=function(e,t,r,n,i,o){const l=n.select(`[id="${r}"]`);Object.keys(e).forEach(function(h){const f=e[h];let d="default";f.classes.length>0&&(d=f.classes.join(" "));const g=getStylesFromArray(f.styles);let p=f.text!==void 0?f.text:f.id,m;if(evaluate(getConfig$1().flowchart.htmlLabels)){const S={label:p.replace(/fa[lrsb]?:fa-[\w-]+/g,R=>`<i class='${R.replace(":"," ")}'></i>`)};m=addHtmlLabel_1(l,S).node(),m.parentNode.removeChild(m)}else{const S=i.createElementNS("http://www.w3.org/2000/svg","text");S.setAttribute("style",g.labelStyle.replace("color:","fill:"));const R=p.split(common.lineBreakRegex);for(let L=0;L<R.length;L++){const N=i.createElementNS("http://www.w3.org/2000/svg","tspan");N.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),N.setAttribute("dy","1em"),N.setAttribute("x","1"),N.textContent=R[L],S.appendChild(N)}m=S}let b=0,$="";switch(f.type){case"round":b=5,$="rect";break;case"square":$="rect";break;case"diamond":$="question";break;case"hexagon":$="hexagon";break;case"odd":$="rect_left_inv_arrow";break;case"lean_right":$="lean_right";break;case"lean_left":$="lean_left";break;case"trapezoid":$="trapezoid";break;case"inv_trapezoid":$="inv_trapezoid";break;case"odd_right":$="rect_left_inv_arrow";break;case"circle":$="circle";break;case"ellipse":$="ellipse";break;case"stadium":$="stadium";break;case"subroutine":$="subroutine";break;case"cylinder":$="cylinder";break;case"group":$="rect";break;case"doublecircle":$="doublecircle";break;default:$="rect"}t.setNode(f.id,{labelStyle:g.labelStyle,shape:$,labelText:p,rx:b,ry:b,class:d,style:g.style,id:f.id,link:f.link,linkTarget:f.linkTarget,tooltip:o.db.getTooltip(f.id)||"",domId:o.db.lookUpDomId(f.id),haveCallback:f.haveCallback,width:f.type==="group"?500:void 0,dir:f.dir,type:f.type,props:f.props,padding:getConfig$1().flowchart.padding}),log$1.info("setNode",{labelStyle:g.labelStyle,shape:$,labelText:p,rx:b,ry:b,class:d,style:g.style,id:f.id,domId:o.db.lookUpDomId(f.id),width:f.type==="group"?500:void 0,type:f.type,dir:f.dir,props:f.props,padding:getConfig$1().flowchart.padding})})},addEdges=function(e,t,r){log$1.info("abc78 edges = ",e);let n=0,i={},o,l;if(typeof e.defaultStyle<"u"){const u=getStylesFromArray(e.defaultStyle);o=u.style,l=u.labelStyle}e.forEach(function(u){n++;var h="L-"+u.start+"-"+u.end;typeof i[h]>"u"?(i[h]=0,log$1.info("abc78 new entry",h,i[h])):(i[h]++,log$1.info("abc78 new entry",h,i[h]));let f=h+"-"+i[h];log$1.info("abc78 new link id to be used is",h,f,i[h]);var d="LS-"+u.start,g="LE-"+u.end;const p={style:"",labelStyle:""};switch(p.minlen=u.length||1,u.type==="arrow_open"?p.arrowhead="none":p.arrowhead="normal",p.arrowTypeStart="arrow_open",p.arrowTypeEnd="arrow_open",u.type){case"double_arrow_cross":p.arrowTypeStart="arrow_cross";case"arrow_cross":p.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":p.arrowTypeStart="arrow_point";case"arrow_point":p.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":p.arrowTypeStart="arrow_circle";case"arrow_circle":p.arrowTypeEnd="arrow_circle";break}let m="",b="";switch(u.stroke){case"normal":m="fill:none;",typeof o<"u"&&(m=o),typeof l<"u"&&(b=l),p.thickness="normal",p.pattern="solid";break;case"dotted":p.thickness="normal",p.pattern="dotted",p.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":p.thickness="thick",p.pattern="solid",p.style="stroke-width: 3.5px;fill:none;";break;case"invisible":p.thickness="invisible",p.pattern="solid",p.style="stroke-width: 0;fill:none;";break}if(typeof u.style<"u"){const $=getStylesFromArray(u.style);m=$.style,b=$.labelStyle}p.style=p.style+=m,p.labelStyle=p.labelStyle+=b,typeof u.interpolate<"u"?p.curve=interpolateToCurve(u.interpolate,curveLinear$1):typeof e.defaultInterpolate<"u"?p.curve=interpolateToCurve(e.defaultInterpolate,curveLinear$1):p.curve=interpolateToCurve(conf$7.curve,curveLinear$1),typeof u.text>"u"?typeof u.style<"u"&&(p.arrowheadStyle="fill: #333"):(p.arrowheadStyle="fill: #333",p.labelpos="c"),p.labelType="text",p.label=u.text.replace(common.lineBreakRegex,`
|
|
`),typeof u.style>"u"&&(p.style=p.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),p.labelStyle=p.labelStyle.replace("color:","fill:"),p.id=f,p.classes="flowchart-link "+d+" "+g,t.setEdge(u.start,u.end,p,n)})},getClasses$2=function(e,t){log$1.info("Extracting classes"),t.db.clear();try{return t.parse(e),t.db.getClasses()}catch{return}},draw$9=function(e,t,r,n){log$1.info("Drawing flowchart"),n.db.clear(),flowDb.setGen("gen-2"),n.parser.parse(e);let i=n.db.getDirection();typeof i>"u"&&(i="TD");const{securityLevel:o,flowchart:l}=getConfig$1(),u=l.nodeSpacing||50,h=l.rankSpacing||50;let f;o==="sandbox"&&(f=select$1("#i"+t));const d=select$1(o==="sandbox"?f.nodes()[0].contentDocument.body:"body"),g=o==="sandbox"?f.nodes()[0].contentDocument:document,p=new graphlib$2.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:u,ranksep:h,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let m;const b=n.db.getSubGraphs();log$1.info("Subgraphs - ",b);for(let H=b.length-1;H>=0;H--)m=b[H],log$1.info("Subgraph - ",m),n.db.addVertex(m.id,m.title,"group",void 0,m.classes,m.dir);const $=n.db.getVertices(),S=n.db.getEdges();log$1.info(S);let R=0;for(R=b.length-1;R>=0;R--){m=b[R],selectAll$1("cluster").append("text");for(let H=0;H<m.nodes.length;H++)log$1.info("Setting up subgraphs",m.nodes[H],m.id),p.setParent(m.nodes[H],m.id)}addVertices($,p,t,d,g,n),addEdges(S,p);const L=d.select(`[id="${t}"]`);addSVGAccessibilityFields(n.db,L,t);const N=d.select("#"+t+" g");if(render$1(N,p,["point","circle","cross"],"flowchart",t),setupGraphViewbox$1(p,L,l.diagramPadding,l.useMaxWidth),n.db.indexNodes("subGraph"+R),!l.htmlLabels){const H=g.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(let G=0;G<H.length;G++){const P=H[G],V=P.getBBox(),z=g.createElementNS("http://www.w3.org/2000/svg","rect");z.setAttribute("rx",0),z.setAttribute("ry",0),z.setAttribute("width",V.width),z.setAttribute("height",V.height),P.insertBefore(z,P.firstChild)}}Object.keys($).forEach(function(H){const G=$[H];if(G.link){const P=select$1("#"+t+' [id="'+H+'"]');if(P){const V=g.createElementNS("http://www.w3.org/2000/svg","a");V.setAttributeNS("http://www.w3.org/2000/svg","class",G.classes.join(" ")),V.setAttributeNS("http://www.w3.org/2000/svg","href",G.link),V.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),o==="sandbox"?V.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):G.linkTarget&&V.setAttributeNS("http://www.w3.org/2000/svg","target",G.linkTarget);const z=P.insert(function(){return V},":first-child"),W=P.select(".label-container");W&&z.append(function(){return W.node()});const T=P.select(".label");T&&z.append(function(){return T.node()})}}})},flowRendererV2={setConf:setConf$6,addVertices,addEdges,getClasses:getClasses$2,draw:draw$9};var parser$6=function(){var e=function(P,V,z,W){for(z=z||{},W=P.length;W--;z[P[W]]=V);return z},t=[1,3],r=[1,5],n=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],i=[1,15],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,20],d=[1,21],g=[1,22],p=[1,23],m=[1,24],b=[1,25],$=[1,26],S=[1,28],R=[1,30],L=[1,33],N=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],F={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,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$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:"includes",18:"todayMarker",19:"title",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"taskTxt",28:"taskData",32:":",34:"click",35:"callbackname",36:"callbackargs",37:"href",39:"open_directive",40:"type_directive",41:"arg_directive",42:"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,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[26,2],[26,3],[26,3],[26,4],[26,3],[26,4],[26,2],[38,2],[38,3],[38,3],[38,4],[38,3],[38,4],[38,2],[29,1],[30,1],[33,1],[31,1]],performAction:function(V,z,W,T,U,I,ae){var Q=I.length-1;switch(U){case 2:return I[Q-1];case 3:this.$=[];break;case 4:I[Q-1].push(I[Q]),this.$=I[Q-1];break;case 5:case 6:this.$=I[Q];break;case 7:case 8:this.$=[];break;case 9:T.setDateFormat(I[Q].substr(11)),this.$=I[Q].substr(11);break;case 10:T.enableInclusiveEndDates(),this.$=I[Q].substr(18);break;case 11:T.TopAxis(),this.$=I[Q].substr(8);break;case 12:T.setAxisFormat(I[Q].substr(11)),this.$=I[Q].substr(11);break;case 13:T.setExcludes(I[Q].substr(9)),this.$=I[Q].substr(9);break;case 14:T.setIncludes(I[Q].substr(9)),this.$=I[Q].substr(9);break;case 15:T.setTodayMarker(I[Q].substr(12)),this.$=I[Q].substr(12);break;case 16:T.setDiagramTitle(I[Q].substr(6)),this.$=I[Q].substr(6);break;case 17:this.$=I[Q].trim(),T.setAccTitle(this.$);break;case 18:case 19:this.$=I[Q].trim(),T.setAccDescription(this.$);break;case 20:T.addSection(I[Q].substr(8)),this.$=I[Q].substr(8);break;case 22:T.addTask(I[Q-1],I[Q]),this.$="task";break;case 26:this.$=I[Q-1],T.setClickEvent(I[Q-1],I[Q],null);break;case 27:this.$=I[Q-2],T.setClickEvent(I[Q-2],I[Q-1],I[Q]);break;case 28:this.$=I[Q-2],T.setClickEvent(I[Q-2],I[Q-1],null),T.setLink(I[Q-2],I[Q]);break;case 29:this.$=I[Q-3],T.setClickEvent(I[Q-3],I[Q-2],I[Q-1]),T.setLink(I[Q-3],I[Q]);break;case 30:this.$=I[Q-2],T.setClickEvent(I[Q-2],I[Q],null),T.setLink(I[Q-2],I[Q-1]);break;case 31:this.$=I[Q-3],T.setClickEvent(I[Q-3],I[Q-1],I[Q]),T.setLink(I[Q-3],I[Q-2]);break;case 32:this.$=I[Q-1],T.setLink(I[Q-1],I[Q]);break;case 33:case 39:this.$=I[Q-1]+" "+I[Q];break;case 34:case 35:case 37:this.$=I[Q-2]+" "+I[Q-1]+" "+I[Q];break;case 36:case 38:this.$=I[Q-3]+" "+I[Q-2]+" "+I[Q-1]+" "+I[Q];break;case 40:T.parseDirective("%%{","open_directive");break;case 41:T.parseDirective(I[Q],"type_directive");break;case 42:I[Q]=I[Q].trim().replace(/'/g,'"'),T.parseDirective(I[Q],"arg_directive");break;case 43:T.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:t,29:4,39:r},{1:[3]},{3:6,4:2,5:t,29:4,39:r},e(n,[2,3],{6:7}),{30:8,40:[1,9]},{40:[2,40]},{1:[2,1]},{4:29,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:o,14:l,15:u,16:h,17:f,18:d,19:g,20:p,22:m,24:b,25:$,26:27,27:S,29:4,34:R,39:r},{31:31,32:[1,32],42:L},e([32,42],[2,41]),e(n,[2,8],{1:[2,2]}),e(n,[2,4]),{4:29,10:34,12:i,13:o,14:l,15:u,16:h,17:f,18:d,19:g,20:p,22:m,24:b,25:$,26:27,27:S,29:4,34:R,39:r},e(n,[2,6]),e(n,[2,7]),e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),{21:[1,35]},{23:[1,36]},e(n,[2,19]),e(n,[2,20]),e(n,[2,21]),{28:[1,37]},e(n,[2,23]),{35:[1,38],37:[1,39]},{11:[1,40]},{33:41,41:[1,42]},{11:[2,43]},e(n,[2,5]),e(n,[2,17]),e(n,[2,18]),e(n,[2,22]),e(n,[2,26],{36:[1,43],37:[1,44]}),e(n,[2,32],{35:[1,45]}),e(N,[2,24]),{31:46,42:L},{42:[2,42]},e(n,[2,27],{37:[1,47]}),e(n,[2,28]),e(n,[2,30],{36:[1,48]}),{11:[1,49]},e(n,[2,29]),e(n,[2,31]),e(N,[2,25])],defaultActions:{5:[2,40],6:[2,1],33:[2,43],42:[2,42]},parseError:function(V,z){if(z.recoverable)this.trace(V);else{var W=new Error(V);throw W.hash=z,W}},parse:function(V){var z=this,W=[0],T=[],U=[null],I=[],ae=this.table,Q="",ue=0,_e=0,ke=2,de=1,ce=I.slice.call(arguments,1),he=Object.create(this.lexer),Se={yy:{}};for(var ve in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ve)&&(Se.yy[ve]=this.yy[ve]);he.setInput(V,Se.yy),Se.yy.lexer=he,Se.yy.parser=this,typeof he.yylloc>"u"&&(he.yylloc={});var me=he.yylloc;I.push(me);var Ce=he.options&&he.options.ranges;typeof Se.yy.parseError=="function"?this.parseError=Se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xe(){var we;return we=T.pop()||he.lex()||de,typeof we!="number"&&(we instanceof Array&&(T=we,we=T.pop()),we=z.symbols_[we]||we),we}for(var Ne,pe,J,oe,ee={},Z,ie,se,te;;){if(pe=W[W.length-1],this.defaultActions[pe]?J=this.defaultActions[pe]:((Ne===null||typeof Ne>"u")&&(Ne=xe()),J=ae[pe]&&ae[pe][Ne]),typeof J>"u"||!J.length||!J[0]){var fe="";te=[];for(Z in ae[pe])this.terminals_[Z]&&Z>ke&&te.push("'"+this.terminals_[Z]+"'");he.showPosition?fe="Parse error on line "+(ue+1)+`:
|
|
`+he.showPosition()+`
|
|
Expecting `+te.join(", ")+", got '"+(this.terminals_[Ne]||Ne)+"'":fe="Parse error on line "+(ue+1)+": Unexpected "+(Ne==de?"end of input":"'"+(this.terminals_[Ne]||Ne)+"'"),this.parseError(fe,{text:he.match,token:this.terminals_[Ne]||Ne,line:he.yylineno,loc:me,expected:te})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pe+", token: "+Ne);switch(J[0]){case 1:W.push(Ne),U.push(he.yytext),I.push(he.yylloc),W.push(J[1]),Ne=null,_e=he.yyleng,Q=he.yytext,ue=he.yylineno,me=he.yylloc;break;case 2:if(ie=this.productions_[J[1]][1],ee.$=U[U.length-ie],ee._$={first_line:I[I.length-(ie||1)].first_line,last_line:I[I.length-1].last_line,first_column:I[I.length-(ie||1)].first_column,last_column:I[I.length-1].last_column},Ce&&(ee._$.range=[I[I.length-(ie||1)].range[0],I[I.length-1].range[1]]),oe=this.performAction.apply(ee,[Q,_e,ue,Se.yy,J[1],U,I].concat(ce)),typeof oe<"u")return oe;ie&&(W=W.slice(0,-1*ie*2),U=U.slice(0,-1*ie),I=I.slice(0,-1*ie)),W.push(this.productions_[J[1]][0]),U.push(ee.$),I.push(ee._$),se=ae[W[W.length-2]][W[W.length-1]],W.push(se);break;case 3:return!0}}return!0}},H=function(){var P={EOF:1,parseError:function(z,W){if(this.yy.parser)this.yy.parser.parseError(z,W);else throw new Error(z)},setInput:function(V,z){return this.yy=z||this.yy||{},this._input=V,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 V=this._input[0];this.yytext+=V,this.yyleng++,this.offset++,this.match+=V,this.matched+=V;var z=V.match(/(?:\r\n?|\n).*/g);return z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),V},unput:function(V){var z=V.length,W=V.split(/(?:\r\n?|\n)/g);this._input=V+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-z),this.offset-=z;var T=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),W.length-1&&(this.yylineno-=W.length-1);var U=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:W?(W.length===T.length?this.yylloc.first_column:0)+T[T.length-W.length].length-W[0].length:this.yylloc.first_column-z},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-z]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(V){this.unput(this.match.slice(V))},pastInput:function(){var V=this.matched.substr(0,this.matched.length-this.match.length);return(V.length>20?"...":"")+V.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var V=this.match;return V.length<20&&(V+=this._input.substr(0,20-V.length)),(V.substr(0,20)+(V.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var V=this.pastInput(),z=new Array(V.length+1).join("-");return V+this.upcomingInput()+`
|
|
`+z+"^"},test_match:function(V,z){var W,T,U;if(this.options.backtrack_lexer&&(U={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&&(U.yylloc.range=this.yylloc.range.slice(0))),T=V[0].match(/(?:\r\n?|\n).*/g),T&&(this.yylineno+=T.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+V[0].length},this.yytext+=V[0],this.match+=V[0],this.matches=V,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(V[0].length),this.matched+=V[0],W=this.performAction.call(this,this.yy,this,z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),W)return W;if(this._backtrack){for(var I in U)this[I]=U[I];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var V,z,W,T;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),I=0;I<U.length;I++)if(W=this._input.match(this.rules[U[I]]),W&&(!z||W[0].length>z[0].length)){if(z=W,T=I,this.options.backtrack_lexer){if(V=this.test_match(W,U[I]),V!==!1)return V;if(this._backtrack){z=!1;continue}else return!1}else if(!this.options.flex)break}return z?(V=this.test_match(z,U[T]),V!==!1?V:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var z=this.next();return z||this.lex()},begin:function(z){this.conditionStack.push(z)},popState:function(){var z=this.conditionStack.length-1;return z>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(z){return z=this.conditionStack.length-1-Math.abs(z||0),z>=0?this.conditionStack[z]:"INITIAL"},pushState:function(z){this.begin(z)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(z,W,T,U){switch(T){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 37;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 35;case 26:this.popState();break;case 27:return 36;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return"date";case 40:return 19;case 41:return"accDescription";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/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,/^(?:includes\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,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},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:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}};return P}();F.lexer=H;function G(){this.yy={}}return G.prototype=F,F.Parser=G,new G}();parser$6.parser=parser$6;const ganttDetector=e=>e.match(/^\s*gantt/)!==null;let dateFormat="",axisFormat="",todayMarker="",includes=[],excludes=[],links={},sections$2=[],tasks$1=[],currentSection$1="";const tags=["active","done","crit","milestone"];let funs=[],inclusiveEndDates=!1,topAxis=!1,lastOrder=0;const parseDirective$6=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},clear$5=function(){sections$2=[],tasks$1=[],currentSection$1="",funs=[],taskCnt=0,lastTask=void 0,lastTaskID=void 0,rawTasks$1=[],dateFormat="",axisFormat="",todayMarker="",includes=[],excludes=[],inclusiveEndDates=!1,topAxis=!1,lastOrder=0,links={},clear$g()},setAxisFormat=function(e){axisFormat=e},getAxisFormat=function(){return axisFormat},setTodayMarker=function(e){todayMarker=e},getTodayMarker=function(){return todayMarker},setDateFormat=function(e){dateFormat=e},enableInclusiveEndDates=function(){inclusiveEndDates=!0},endDatesAreInclusive=function(){return inclusiveEndDates},enableTopAxis=function(){topAxis=!0},topAxisEnabled=function(){return topAxis},getDateFormat=function(){return dateFormat},setIncludes=function(e){includes=e.toLowerCase().split(/[\s,]+/)},getIncludes=function(){return includes},setExcludes=function(e){excludes=e.toLowerCase().split(/[\s,]+/)},getExcludes=function(){return excludes},getLinks=function(){return links},addSection$2=function(e){currentSection$1=e,sections$2.push(e)},getSections$2=function(){return sections$2},getTasks$1=function(){let e=compileTasks$1();const t=10;let r=0;for(;!e&&r<t;)e=compileTasks$1(),r++;return tasks$1=rawTasks$1,tasks$1},isInvalidDate=function(e,t,r,n){return n.indexOf(e.format(t.trim()))>=0?!1:e.isoWeekday()>=6&&r.indexOf("weekends")>=0||r.indexOf(e.format("dddd").toLowerCase())>=0?!0:r.indexOf(e.format(t.trim()))>=0},checkTaskDates=function(e,t,r,n){if(!r.length||e.manualEndTime)return;let i=moment(e.startTime,t,!0);i.add(1,"d");let o=moment(e.endTime,t,!0),l=fixTaskDates(i,o,t,r,n);e.endTime=o.toDate(),e.renderEndTime=l},fixTaskDates=function(e,t,r,n,i){let o=!1,l=null;for(;e<=t;)o||(l=t.toDate()),o=isInvalidDate(e,r,n,i),o&&t.add(1,"d"),e.add(1,"d");return l},getStartDate=function(e,t,r){r=r.trim();const i=/^after\s+([\d\w- ]+)/.exec(r.trim());if(i!==null){let l=null;if(i[1].split(" ").forEach(function(u){let h=findTaskById(u);typeof h<"u"&&(l?h.endTime>l.endTime&&(l=h):l=h)}),l)return l.endTime;{const u=new Date;return u.setHours(0,0,0,0),u}}let o=moment(r,t.trim(),!0);if(o.isValid())return o.toDate();{log$1.debug("Invalid date:"+r),log$1.debug("With date format:"+t.trim());const l=new Date(r);if(typeof l>"u"||isNaN(l.getTime()))throw new Error("Invalid date:"+r);return l}},parseDuration=function(e){const t=/^(\d+(?:\.\d+)?)([yMwdhms]|ms)$/.exec(e.trim());return t!==null?moment.duration(Number.parseFloat(t[1]),t[2]):moment.duration.invalid()},getEndDate=function(e,t,r,n){n=n||!1,r=r.trim();let i=moment(r,t.trim(),!0);if(i.isValid())return n&&i.add(1,"d"),i.toDate();const o=moment(e),l=parseDuration(r);return l.isValid()&&o.add(l),o.toDate()};let taskCnt=0;const parseId=function(e){return typeof e>"u"?(taskCnt=taskCnt+1,"task"+taskCnt):e},compileData=function(e,t){let r;t.substr(0,1)===":"?r=t.substr(1,t.length):r=t;const n=r.split(","),i={};getTaskTags(n,i,tags);for(let l=0;l<n.length;l++)n[l]=n[l].trim();let o="";switch(n.length){case 1:i.id=parseId(),i.startTime=e.endTime,o=n[0];break;case 2:i.id=parseId(),i.startTime=getStartDate(void 0,dateFormat,n[0]),o=n[1];break;case 3:i.id=parseId(n[0]),i.startTime=getStartDate(void 0,dateFormat,n[1]),o=n[2];break}return o&&(i.endTime=getEndDate(i.startTime,dateFormat,o,inclusiveEndDates),i.manualEndTime=moment(o,"YYYY-MM-DD",!0).isValid(),checkTaskDates(i,dateFormat,excludes,includes)),i},parseData=function(e,t){let r;t.substr(0,1)===":"?r=t.substr(1,t.length):r=t;const n=r.split(","),i={};getTaskTags(n,i,tags);for(let o=0;o<n.length;o++)n[o]=n[o].trim();switch(n.length){case 1:i.id=parseId(),i.startTime={type:"prevTaskEnd",id:e},i.endTime={data:n[0]};break;case 2:i.id=parseId(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=parseId(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]};break}return i};let lastTask,lastTaskID,rawTasks$1=[];const taskDb={},addTask$1=function(e,t){const r={section:currentSection$1,type:currentSection$1,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},n=parseData(lastTaskID,t);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=lastTaskID,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.order=lastOrder,lastOrder++;const i=rawTasks$1.push(r);lastTaskID=r.id,taskDb[r.id]=i-1},findTaskById=function(e){const t=taskDb[e];return rawTasks$1[t]},addTaskOrg$1=function(e,t){const r={section:currentSection$1,type:currentSection$1,description:e,task:e,classes:[]},n=compileData(lastTask,t);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,lastTask=r,tasks$1.push(r)},compileTasks$1=function(){const e=function(r){const n=rawTasks$1[r];let i="";switch(rawTasks$1[r].raw.startTime.type){case"prevTaskEnd":{const o=findTaskById(n.prevTaskId);n.startTime=o.endTime;break}case"getStartDate":i=getStartDate(void 0,dateFormat,rawTasks$1[r].raw.startTime.startData),i&&(rawTasks$1[r].startTime=i);break}return rawTasks$1[r].startTime&&(rawTasks$1[r].endTime=getEndDate(rawTasks$1[r].startTime,dateFormat,rawTasks$1[r].raw.endTime.data,inclusiveEndDates),rawTasks$1[r].endTime&&(rawTasks$1[r].processed=!0,rawTasks$1[r].manualEndTime=moment(rawTasks$1[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),checkTaskDates(rawTasks$1[r],dateFormat,excludes,includes))),rawTasks$1[r].processed};let t=!0;for(let r=0;r<rawTasks$1.length;r++)e(r),t=t&&rawTasks$1[r].processed;return t},setLink=function(e,t){let r=t;getConfig$1().securityLevel!=="loose"&&(r=sanitizeUrl_1(t)),e.split(",").forEach(function(n){typeof findTaskById(n)<"u"&&(pushFun(n,()=>{window.open(r,"_self")}),links[n]=r)}),setClass(e,"clickable")},setClass=function(e,t){e.split(",").forEach(function(r){let n=findTaskById(r);typeof n<"u"&&n.classes.push(t)})},setClickFun=function(e,t,r){if(getConfig$1().securityLevel!=="loose"||typeof t>"u")return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<n.length;o++){let l=n[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),n[o]=l}}n.length===0&&n.push(e),typeof findTaskById(e)<"u"&&pushFun(e,()=>{utils.runFunc(t,...n)})},pushFun=function(e,t){funs.push(function(){const r=document.querySelector(`[id="${e}"]`);r!==null&&r.addEventListener("click",function(){t()})}),funs.push(function(){const r=document.querySelector(`[id="${e}-text"]`);r!==null&&r.addEventListener("click",function(){t()})})},setClickEvent=function(e,t,r){e.split(",").forEach(function(n){setClickFun(n,t,r)}),setClass(e,"clickable")},bindFunctions=function(e){funs.forEach(function(t){t(e)})},ganttDb={parseDirective:parseDirective$6,getConfig:()=>getConfig$1().gantt,clear:clear$5,setDateFormat,getDateFormat,enableInclusiveEndDates,endDatesAreInclusive,enableTopAxis,topAxisEnabled,setAxisFormat,getAxisFormat,setTodayMarker,getTodayMarker,setAccTitle,getAccTitle,setDiagramTitle,getDiagramTitle,setAccDescription,getAccDescription,addSection:addSection$2,getSections:getSections$2,getTasks:getTasks$1,addTask:addTask$1,findTaskById,addTaskOrg:addTaskOrg$1,setIncludes,getIncludes,setExcludes,getExcludes,setClickEvent,setLink,getLinks,bindFunctions,parseDuration,isInvalidDate};function getTaskTags(e,t,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){const o="^\\s*"+i+"\\s*$",l=new RegExp(o);e[0].match(l)&&(t[i]=!0,e.shift(1),n=!0)})}const setConf$5=function(){log$1.debug("Something is calling, setConf, remove the call")};let w;const draw$8=function(e,t,r,n){const i=getConfig$1().gantt,o=getConfig$1().securityLevel;let l;o==="sandbox"&&(l=select$1("#i"+t));const u=select$1(o==="sandbox"?l.nodes()[0].contentDocument.body:"body"),h=o==="sandbox"?l.nodes()[0].contentDocument:document,f=h.getElementById(t);w=f.parentElement.offsetWidth,typeof w>"u"&&(w=1200),typeof i.useWidth<"u"&&(w=i.useWidth);const d=n.db.getTasks(),g=d.length*(i.barHeight+i.barGap)+2*i.topPadding;f.setAttribute("viewBox","0 0 "+w+" "+g);const p=u.select(`[id="${t}"]`),m=time$2().domain([min$3(d,function(W){return W.startTime}),max$4(d,function(W){return W.endTime})]).rangeRound([0,w-i.leftPadding-i.rightPadding]);let b=[];for(let W=0;W<d.length;W++)b.push(d[W].type);const $=b;b=P(b);function S(W,T){const U=W.startTime,I=T.startTime;let ae=0;return U>I?ae=1:U<I&&(ae=-1),ae}d.sort(S),R(d,w,g),configureSvgSize(p,g,w,i.useMaxWidth),p.append("text").text(n.db.getDiagramTitle()).attr("x",w/2).attr("y",i.titleTopMargin).attr("class","titleText"),addSVGAccessibilityFields(n.db,p,t);function R(W,T,U){const I=i.barHeight,ae=I+i.barGap,Q=i.topPadding,ue=i.leftPadding,_e=linear$3().domain([0,b.length]).range(["#00B9FA","#F95002"]).interpolate(interpolateHcl);N(ae,Q,ue,T,U,W,n.db.getExcludes(),n.db.getIncludes()),F(ue,Q,T,U),L(W,ae,Q,ue,I,_e,T),H(ae,Q),G(ue,Q,T,U)}function L(W,T,U,I,ae,Q,ue){p.append("g").selectAll("rect").data(W).enter().append("rect").attr("x",0).attr("y",function(ce,he){return he=ce.order,he*T+U-2}).attr("width",function(){return ue-i.rightPadding/2}).attr("height",T).attr("class",function(ce){for(let he=0;he<b.length;he++)if(ce.type===b[he])return"section section"+he%i.numberSectionStyles;return"section section0"});const _e=p.append("g").selectAll("rect").data(W).enter(),ke=n.db.getLinks();if(_e.append("rect").attr("id",function(ce){return ce.id}).attr("rx",3).attr("ry",3).attr("x",function(ce){return ce.milestone?m(ce.startTime)+I+.5*(m(ce.endTime)-m(ce.startTime))-.5*ae:m(ce.startTime)+I}).attr("y",function(ce,he){return he=ce.order,he*T+U}).attr("width",function(ce){return ce.milestone?ae:m(ce.renderEndTime||ce.endTime)-m(ce.startTime)}).attr("height",ae).attr("transform-origin",function(ce,he){return he=ce.order,(m(ce.startTime)+I+.5*(m(ce.endTime)-m(ce.startTime))).toString()+"px "+(he*T+U+.5*ae).toString()+"px"}).attr("class",function(ce){const he="task";let Se="";ce.classes.length>0&&(Se=ce.classes.join(" "));let ve=0;for(let Ce=0;Ce<b.length;Ce++)ce.type===b[Ce]&&(ve=Ce%i.numberSectionStyles);let me="";return ce.active?ce.crit?me+=" activeCrit":me=" active":ce.done?ce.crit?me=" doneCrit":me=" done":ce.crit&&(me+=" crit"),me.length===0&&(me=" task"),ce.milestone&&(me=" milestone "+me),me+=ve,me+=" "+Se,he+me}),_e.append("text").attr("id",function(ce){return ce.id+"-text"}).text(function(ce){return ce.task}).attr("font-size",i.fontSize).attr("x",function(ce){let he=m(ce.startTime),Se=m(ce.renderEndTime||ce.endTime);ce.milestone&&(he+=.5*(m(ce.endTime)-m(ce.startTime))-.5*ae),ce.milestone&&(Se=he+ae);const ve=this.getBBox().width;return ve>Se-he?Se+ve+1.5*i.leftPadding>ue?he+I-5:Se+I+5:(Se-he)/2+he+I}).attr("y",function(ce,he){return he=ce.order,he*T+i.barHeight/2+(i.fontSize/2-2)+U}).attr("text-height",ae).attr("class",function(ce){const he=m(ce.startTime);let Se=m(ce.endTime);ce.milestone&&(Se=he+ae);const ve=this.getBBox().width;let me="";ce.classes.length>0&&(me=ce.classes.join(" "));let Ce=0;for(let Ne=0;Ne<b.length;Ne++)ce.type===b[Ne]&&(Ce=Ne%i.numberSectionStyles);let xe="";return ce.active&&(ce.crit?xe="activeCritText"+Ce:xe="activeText"+Ce),ce.done?ce.crit?xe=xe+" doneCritText"+Ce:xe=xe+" doneText"+Ce:ce.crit&&(xe=xe+" critText"+Ce),ce.milestone&&(xe+=" milestoneText"),ve>Se-he?Se+ve+1.5*i.leftPadding>ue?me+" taskTextOutsideLeft taskTextOutside"+Ce+" "+xe:me+" taskTextOutsideRight taskTextOutside"+Ce+" "+xe+" width-"+ve:me+" taskText taskText"+Ce+" "+xe+" width-"+ve}),getConfig$1().securityLevel==="sandbox"){let ce;ce=select$1("#i"+t);const he=ce.nodes()[0].contentDocument;_e.filter(function(Se){return typeof ke[Se.id]<"u"}).each(function(Se){var ve=he.querySelector("#"+Se.id),me=he.querySelector("#"+Se.id+"-text");const Ce=ve.parentNode;var xe=he.createElement("a");xe.setAttribute("xlink:href",ke[Se.id]),xe.setAttribute("target","_top"),Ce.appendChild(xe),xe.appendChild(ve),xe.appendChild(me)})}}function N(W,T,U,I,ae,Q,ue,_e){const ke=Q.reduce((Ce,{startTime:xe})=>Ce?Math.min(Ce,xe):xe,0),de=Q.reduce((Ce,{endTime:xe})=>Ce?Math.max(Ce,xe):xe,0),ce=n.db.getDateFormat();if(!ke||!de)return;const he=[];let Se=null,ve=moment(ke);for(;ve.valueOf()<=de;)n.db.isInvalidDate(ve,ce,ue,_e)?Se?Se.end=ve.clone():Se={start:ve.clone(),end:ve.clone()}:Se&&(he.push(Se),Se=null),ve.add(1,"d");p.append("g").selectAll("rect").data(he).enter().append("rect").attr("id",function(Ce){return"exclude-"+Ce.start.format("YYYY-MM-DD")}).attr("x",function(Ce){return m(Ce.start)+U}).attr("y",i.gridLineStartPadding).attr("width",function(Ce){const xe=Ce.end.clone().add(1,"day");return m(xe)-m(Ce.start)}).attr("height",ae-T-i.gridLineStartPadding).attr("transform-origin",function(Ce,xe){return(m(Ce.start)+U+.5*(m(Ce.end)-m(Ce.start))).toString()+"px "+(xe*W+.5*ae).toString()+"px"}).attr("class","exclude-range")}function F(W,T,U,I){let ae=axisBottom$1(m).tickSize(-I+T+i.gridLineStartPadding).tickFormat(timeFormat$1(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(p.append("g").attr("class","grid").attr("transform","translate("+W+", "+(I-50)+")").call(ae).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let Q=axisTop$1(m).tickSize(-I+T+i.gridLineStartPadding).tickFormat(timeFormat$1(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));p.append("g").attr("class","grid").attr("transform","translate("+W+", "+T+")").call(Q).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function H(W,T){const U=[];let I=0;for(let ae=0;ae<b.length;ae++)U[ae]=[b[ae],z(b[ae],$)];p.append("g").selectAll("text").data(U).enter().append(function(ae){const Q=ae[0].split(common.lineBreakRegex),ue=-(Q.length-1)/2,_e=h.createElementNS("http://www.w3.org/2000/svg","text");_e.setAttribute("dy",ue+"em");for(let ke=0;ke<Q.length;ke++){const de=h.createElementNS("http://www.w3.org/2000/svg","tspan");de.setAttribute("alignment-baseline","central"),de.setAttribute("x","10"),ke>0&&de.setAttribute("dy","1em"),de.textContent=Q[ke],_e.appendChild(de)}return _e}).attr("x",10).attr("y",function(ae,Q){if(Q>0)for(let ue=0;ue<Q;ue++)return I+=U[Q-1][1],ae[1]*W/2+I*W+T;else return ae[1]*W/2+T}).attr("font-size",i.sectionFontSize).attr("font-size",i.sectionFontSize).attr("class",function(ae){for(let Q=0;Q<b.length;Q++)if(ae[0]===b[Q])return"sectionTitle sectionTitle"+Q%i.numberSectionStyles;return"sectionTitle"})}function G(W,T,U,I){const ae=n.db.getTodayMarker();if(ae==="off")return;const Q=p.append("g").attr("class","today"),ue=new Date,_e=Q.append("line");_e.attr("x1",m(ue)+W).attr("x2",m(ue)+W).attr("y1",i.titleTopMargin).attr("y2",I-i.titleTopMargin).attr("class","today"),ae!==""&&_e.attr("style",ae.replace(/,/g,";"))}function P(W){const T={},U=[];for(let I=0,ae=W.length;I<ae;++I)Object.prototype.hasOwnProperty.call(T,W[I])||(T[W[I]]=!0,U.push(W[I]));return U}function V(W){let T=W.length;const U={};for(;T;)U[W[--T]]=(U[W[T]]||0)+1;return U}function z(W,T){return V(T)[W]||0}},ganttRenderer={setConf:setConf$5,draw:draw$8};var parser$5=function(){var e=function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},t=[6,9,10],r={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(l,u,h,f,d,g,p){switch(g.length-1,d){case 1:return f;case 4:break;case 6:f.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},e(t,[2,3]),e(t,[2,4]),e(t,[2,5]),e(t,[2,6])],defaultActions:{4:[2,1]},parseError:function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},parse:function(l){var u=this,h=[0],f=[],d=[null],g=[],p=this.table,m="",b=0,$=0,S=2,R=1,L=g.slice.call(arguments,1),N=Object.create(this.lexer),F={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(F.yy[H]=this.yy[H]);N.setInput(l,F.yy),F.yy.lexer=N,F.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var G=N.yylloc;g.push(G);var P=N.options&&N.options.ranges;typeof F.yy.parseError=="function"?this.parseError=F.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function V(){var de;return de=f.pop()||N.lex()||R,typeof de!="number"&&(de instanceof Array&&(f=de,de=f.pop()),de=u.symbols_[de]||de),de}for(var z,W,T,U,I={},ae,Q,ue,_e;;){if(W=h[h.length-1],this.defaultActions[W]?T=this.defaultActions[W]:((z===null||typeof z>"u")&&(z=V()),T=p[W]&&p[W][z]),typeof T>"u"||!T.length||!T[0]){var ke="";_e=[];for(ae in p[W])this.terminals_[ae]&&ae>S&&_e.push("'"+this.terminals_[ae]+"'");N.showPosition?ke="Parse error on line "+(b+1)+`:
|
|
`+N.showPosition()+`
|
|
Expecting `+_e.join(", ")+", got '"+(this.terminals_[z]||z)+"'":ke="Parse error on line "+(b+1)+": Unexpected "+(z==R?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(ke,{text:N.match,token:this.terminals_[z]||z,line:N.yylineno,loc:G,expected:_e})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+z);switch(T[0]){case 1:h.push(z),d.push(N.yytext),g.push(N.yylloc),h.push(T[1]),z=null,$=N.yyleng,m=N.yytext,b=N.yylineno,G=N.yylloc;break;case 2:if(Q=this.productions_[T[1]][1],I.$=d[d.length-Q],I._$={first_line:g[g.length-(Q||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(Q||1)].first_column,last_column:g[g.length-1].last_column},P&&(I._$.range=[g[g.length-(Q||1)].range[0],g[g.length-1].range[1]]),U=this.performAction.apply(I,[m,$,b,F.yy,T[1],d,g].concat(L)),typeof U<"u")return U;Q&&(h=h.slice(0,-1*Q*2),d=d.slice(0,-1*Q),g=g.slice(0,-1*Q)),h.push(this.productions_[T[1]][0]),d.push(I.$),g.push(I._$),ue=p[h[h.length-2]][h[h.length-1]],h.push(ue);break;case 3:return!0}}return!0}},n=function(){var o={EOF:1,parseError:function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},setInput:function(l,u){return this.yy=u||this.yy||{},this._input=l,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 l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},unput:function(l){var u=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=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),h.length-1&&(this.yylineno-=h.length-1);var d=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:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(l){this.unput(this.match.slice(l))},pastInput:function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
`+u+"^"},test_match:function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var g in d)this[g]=d[g];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),g=0;g<d.length;g++)if(h=this._input.match(this.rules[d[g]]),h&&(!u||h[0].length>u[0].length)){if(u=h,f=g,this.options.backtrack_lexer){if(l=this.test_match(h,d[g]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var u=this.next();return u||this.lex()},begin:function(u){this.conditionStack.push(u)},popState:function(){var u=this.conditionStack.length-1;return u>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(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},pushState:function(u){this.begin(u)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(u,h,f,d){switch(f){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}}};return o}();r.lexer=n;function i(){this.yy={}}return i.prototype=r,r.Parser=i,new i}();parser$5.parser=parser$5;var message="",info=!1;const setMessage=e=>{log$1.debug("Setting message to: "+e),message=e},getMessage=()=>message,setInfo=e=>{info=e},getInfo=()=>info,infoDb={setMessage,getMessage,setInfo,getInfo,clear:clear$g},draw$7=(e,t,r,n)=>{try{log$1.debug(`Rendering info diagram
|
|
`+e);const i=getConfig$1().securityLevel;let o;i==="sandbox"&&(o=select$1("#i"+t));const u=select$1(i==="sandbox"?o.nodes()[0].contentDocument.body:"body").select("#"+t);u.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),u.attr("height",100),u.attr("width",400)}catch(i){log$1.error("Error while rendering info diagram"),log$1.error(i.message)}},infoRenderer={draw:draw$7},infoDetector=e=>e.match(/^\s*info/)!==null;var parser$4=function(){var e=function(G,P,V,z){for(V=V||{},z=G.length;z--;V[G[z]]=P);return V},t=[1,4],r=[1,5],n=[1,6],i=[1,7],o=[1,9],l=[1,11,13,15,17,19,20,26,27,28,29],u=[2,5],h=[1,6,11,13,15,17,19,20,26,27,28,29],f=[26,27,28],d=[2,8],g=[1,18],p=[1,19],m=[1,20],b=[1,21],$=[1,22],S=[1,23],R=[1,28],L=[6,26,27,28,29],N={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,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"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,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(P,V,z,W,T,U,I){var ae=U.length-1;switch(T){case 4:W.setShowData(!0);break;case 7:this.$=U[ae-1];break;case 9:W.addSection(U[ae-1],W.cleanupValue(U[ae]));break;case 10:this.$=U[ae].trim(),W.setDiagramTitle(this.$);break;case 11:this.$=U[ae].trim(),W.setAccTitle(this.$);break;case 12:case 13:this.$=U[ae].trim(),W.setAccDescription(this.$);break;case 14:W.addSection(U[ae].substr(8)),this.$=U[ae].substr(8);break;case 21:W.parseDirective("%%{","open_directive");break;case 22:W.parseDirective(U[ae],"type_directive");break;case 23:U[ae]=U[ae].trim().replace(/'/g,'"'),W.parseDirective(U[ae],"arg_directive");break;case 24:W.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:t,21:8,26:r,27:n,28:i,29:o},{1:[3]},{3:10,4:2,5:3,6:t,21:8,26:r,27:n,28:i,29:o},{3:11,4:2,5:3,6:t,21:8,26:r,27:n,28:i,29:o},e(l,u,{7:12,8:[1,13]}),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},e(f,d,{21:8,9:16,10:17,5:24,1:[2,3],11:g,13:p,15:m,17:b,19:$,20:S,29:o}),e(l,u,{7:25}),{23:26,24:[1,27],32:R},e([24,32],[2,22]),e(l,[2,6]),{4:29,26:r,27:n,28:i},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},e(f,[2,13]),e(f,[2,14]),e(f,[2,15]),e(f,d,{21:8,9:16,10:17,5:24,1:[2,4],11:g,13:p,15:m,17:b,19:$,20:S,29:o}),e(L,[2,16]),{25:34,31:[1,35]},e(L,[2,24]),e(l,[2,7]),e(f,[2,9]),e(f,[2,10]),e(f,[2,11]),e(f,[2,12]),{23:36,32:R},{32:[2,23]},e(L,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(P,V){if(V.recoverable)this.trace(P);else{var z=new Error(P);throw z.hash=V,z}},parse:function(P){var V=this,z=[0],W=[],T=[null],U=[],I=this.table,ae="",Q=0,ue=0,_e=2,ke=1,de=U.slice.call(arguments,1),ce=Object.create(this.lexer),he={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(he.yy[Se]=this.yy[Se]);ce.setInput(P,he.yy),he.yy.lexer=ce,he.yy.parser=this,typeof ce.yylloc>"u"&&(ce.yylloc={});var ve=ce.yylloc;U.push(ve);var me=ce.options&&ce.options.ranges;typeof he.yy.parseError=="function"?this.parseError=he.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var fe;return fe=W.pop()||ce.lex()||ke,typeof fe!="number"&&(fe instanceof Array&&(W=fe,fe=W.pop()),fe=V.symbols_[fe]||fe),fe}for(var xe,Ne,pe,J,oe={},ee,Z,ie,se;;){if(Ne=z[z.length-1],this.defaultActions[Ne]?pe=this.defaultActions[Ne]:((xe===null||typeof xe>"u")&&(xe=Ce()),pe=I[Ne]&&I[Ne][xe]),typeof pe>"u"||!pe.length||!pe[0]){var te="";se=[];for(ee in I[Ne])this.terminals_[ee]&&ee>_e&&se.push("'"+this.terminals_[ee]+"'");ce.showPosition?te="Parse error on line "+(Q+1)+`:
|
|
`+ce.showPosition()+`
|
|
Expecting `+se.join(", ")+", got '"+(this.terminals_[xe]||xe)+"'":te="Parse error on line "+(Q+1)+": Unexpected "+(xe==ke?"end of input":"'"+(this.terminals_[xe]||xe)+"'"),this.parseError(te,{text:ce.match,token:this.terminals_[xe]||xe,line:ce.yylineno,loc:ve,expected:se})}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ne+", token: "+xe);switch(pe[0]){case 1:z.push(xe),T.push(ce.yytext),U.push(ce.yylloc),z.push(pe[1]),xe=null,ue=ce.yyleng,ae=ce.yytext,Q=ce.yylineno,ve=ce.yylloc;break;case 2:if(Z=this.productions_[pe[1]][1],oe.$=T[T.length-Z],oe._$={first_line:U[U.length-(Z||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-(Z||1)].first_column,last_column:U[U.length-1].last_column},me&&(oe._$.range=[U[U.length-(Z||1)].range[0],U[U.length-1].range[1]]),J=this.performAction.apply(oe,[ae,ue,Q,he.yy,pe[1],T,U].concat(de)),typeof J<"u")return J;Z&&(z=z.slice(0,-1*Z*2),T=T.slice(0,-1*Z),U=U.slice(0,-1*Z)),z.push(this.productions_[pe[1]][0]),T.push(oe.$),U.push(oe._$),ie=I[z[z.length-2]][z[z.length-1]],z.push(ie);break;case 3:return!0}}return!0}},F=function(){var G={EOF:1,parseError:function(V,z){if(this.yy.parser)this.yy.parser.parseError(V,z);else throw new Error(V)},setInput:function(P,V){return this.yy=V||this.yy||{},this._input=P,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 P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var V=P.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),P},unput:function(P){var V=P.length,z=P.split(/(?:\r\n?|\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var W=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),z.length-1&&(this.yylineno-=z.length-1);var T=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:z?(z.length===W.length?this.yylloc.first_column:0)+W[W.length-z.length].length-z[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(P){this.unput(this.match.slice(P))},pastInput:function(){var P=this.matched.substr(0,this.matched.length-this.match.length);return(P.length>20?"...":"")+P.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var P=this.match;return P.length<20&&(P+=this._input.substr(0,20-P.length)),(P.substr(0,20)+(P.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var P=this.pastInput(),V=new Array(P.length+1).join("-");return P+this.upcomingInput()+`
|
|
`+V+"^"},test_match:function(P,V){var z,W,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),W=P[0].match(/(?:\r\n?|\n).*/g),W&&(this.yylineno+=W.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:W?W[W.length-1].length-W[W.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+P[0].length},this.yytext+=P[0],this.match+=P[0],this.matches=P,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(P[0].length),this.matched+=P[0],z=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var U in T)this[U]=T[U];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var P,V,z,W;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),U=0;U<T.length;U++)if(z=this._input.match(this.rules[T[U]]),z&&(!V||z[0].length>V[0].length)){if(V=z,W=U,this.options.backtrack_lexer){if(P=this.test_match(z,T[U]),P!==!1)return P;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(P=this.test_match(V,T[W]),P!==!1?P:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var V=this.next();return V||this.lex()},begin:function(V){this.conditionStack.push(V)},popState:function(){var V=this.conditionStack.length-1;return V>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(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},pushState:function(V){this.begin(V)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(V,z,W,T){switch(W){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},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:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return G}();N.lexer=F;function H(){this.yy={}}return H.prototype=N,N.Parser=H,new H}();parser$4.parser=parser$4;const pieDetector=e=>e.match(/^\s*pie/)!==null;let sections$1={},showData=!1;const parseDirective$5=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},addSection$1=function(e,t){e=common.sanitizeText(e,getConfig$1()),typeof sections$1[e]>"u"&&(sections$1[e]=t,log$1.debug("Added new section :",e))},getSections$1=()=>sections$1,setShowData=function(e){showData=e},getShowData=function(){return showData},cleanupValue=function(e){return e.substring(0,1)===":"&&(e=e.substring(1).trim()),Number(e.trim())},clear$4=function(){sections$1={},showData=!1,clear$g()},pieDb={parseDirective:parseDirective$5,getConfig:()=>getConfig$1().pie,addSection:addSection$1,getSections:getSections$1,cleanupValue,clear:clear$4,setAccTitle,getAccTitle,setDiagramTitle,getDiagramTitle,setShowData,getShowData,getAccDescription,setAccDescription};let conf$6=getConfig$1(),width;const height=450,draw$6=(e,t,r,n)=>{try{conf$6=getConfig$1(),log$1.debug(`Rendering info diagram
|
|
`+e);const R=getConfig$1().securityLevel;let L;R==="sandbox"&&(L=select$1("#i"+t));const N=select$1(R==="sandbox"?L.nodes()[0].contentDocument.body:"body"),F=R==="sandbox"?L.nodes()[0].contentDocument:document;n.db.clear(),n.parser.parse(e),log$1.debug("Parsed info diagram");const H=F.getElementById(t);width=H.parentElement.offsetWidth,typeof width>"u"&&(width=1200),typeof conf$6.useWidth<"u"&&(width=conf$6.useWidth),typeof conf$6.pie.useWidth<"u"&&(width=conf$6.pie.useWidth);const G=N.select("#"+t);configureSvgSize(G,height,width,conf$6.pie.useMaxWidth),addSVGAccessibilityFields(n.db,G,t),H.setAttribute("viewBox","0 0 "+width+" "+height);var i=40,o=18,l=4,u=Math.min(width,height)/2-i,h=G.append("g").attr("transform","translate("+width/2+","+height/2+")"),f=n.db.getSections(),d=0;Object.keys(f).forEach(function(V){d+=f[V]});const P=conf$6.themeVariables;var g=[P.pie1,P.pie2,P.pie3,P.pie4,P.pie5,P.pie6,P.pie7,P.pie8,P.pie9,P.pie10,P.pie11,P.pie12],p=ordinal$1().range(g),m=pie$1().value(function(V){return V[1]}),b=m(Object.entries(f)),$=arc$1().innerRadius(0).outerRadius(u);h.selectAll("mySlices").data(b).enter().append("path").attr("d",$).attr("fill",function(V){return p(V.data[0])}).attr("class","pieCircle"),h.selectAll("mySlices").data(b).enter().append("text").text(function(V){return(V.data[1]/d*100).toFixed(0)+"%"}).attr("transform",function(V){return"translate("+$.centroid(V)+")"}).style("text-anchor","middle").attr("class","slice"),h.append("text").text(n.db.getDiagramTitle()).attr("x",0).attr("y",-(height-50)/2).attr("class","pieTitleText");var S=h.selectAll(".legend").data(p.domain()).enter().append("g").attr("class","legend").attr("transform",function(V,z){var W=o+l,T=W*p.domain().length/2,U=12*o,I=z*W-T;return"translate("+U+","+I+")"});S.append("rect").attr("width",o).attr("height",o).style("fill",p).style("stroke",p),S.data(b).append("text").attr("x",o+l).attr("y",o-l).text(function(V){return n.db.getShowData()||conf$6.showData||conf$6.pie.showData?V.data[0]+" ["+V.data[1]+"]":V.data[0]})}catch(R){log$1.error("Error while rendering info diagram"),log$1.error(R)}},pieRenderer={draw:draw$6};var parser$3=function(){var e=function(Ne,pe,J,oe){for(J=J||{},oe=Ne.length;oe--;J[Ne[oe]]=pe);return J},t=[1,3],r=[1,5],n=[1,6],i=[1,7],o=[1,8],l=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],u=[1,22],h=[2,13],f=[1,26],d=[1,27],g=[1,28],p=[1,29],m=[1,30],b=[1,31],$=[1,24],S=[1,32],R=[1,33],L=[1,36],N=[71,72],F=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],H=[1,56],G=[1,57],P=[1,58],V=[1,59],z=[1,60],W=[1,61],T=[1,62],U=[62,63],I=[1,74],ae=[1,70],Q=[1,71],ue=[1,72],_e=[1,73],ke=[1,75],de=[1,79],ce=[1,80],he=[1,77],Se=[1,78],ve=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],me={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,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(pe,J,oe,ee,Z,ie,se){var te=ie.length-1;switch(Z){case 6:this.$=ie[te].trim(),ee.setAccTitle(this.$);break;case 7:case 8:this.$=ie[te].trim(),ee.setAccDescription(this.$);break;case 9:ee.parseDirective("%%{","open_directive");break;case 10:ee.parseDirective(ie[te],"type_directive");break;case 11:ie[te]=ie[te].trim().replace(/'/g,'"'),ee.parseDirective(ie[te],"arg_directive");break;case 12:ee.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:ee.addRequirement(ie[te-3],ie[te-4]);break;case 20:ee.setNewReqId(ie[te-2]);break;case 21:ee.setNewReqText(ie[te-2]);break;case 22:ee.setNewReqRisk(ie[te-2]);break;case 23:ee.setNewReqVerifyMethod(ie[te-2]);break;case 26:this.$=ee.RequirementType.REQUIREMENT;break;case 27:this.$=ee.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=ee.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=ee.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=ee.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=ee.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=ee.RiskLevel.LOW_RISK;break;case 33:this.$=ee.RiskLevel.MED_RISK;break;case 34:this.$=ee.RiskLevel.HIGH_RISK;break;case 35:this.$=ee.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=ee.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=ee.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=ee.VerifyType.VERIFY_TEST;break;case 39:ee.addElement(ie[te-3]);break;case 40:ee.setNewElementType(ie[te-2]);break;case 41:ee.setNewElementDocRef(ie[te-2]);break;case 44:ee.addRelationship(ie[te-2],ie[te],ie[te-4]);break;case 45:ee.addRelationship(ie[te-2],ie[te-4],ie[te]);break;case 46:this.$=ee.Relationships.CONTAINS;break;case 47:this.$=ee.Relationships.COPIES;break;case 48:this.$=ee.Relationships.DERIVES;break;case 49:this.$=ee.Relationships.SATISFIES;break;case 50:this.$=ee.Relationships.VERIFIES;break;case 51:this.$=ee.Relationships.REFINES;break;case 52:this.$=ee.Relationships.TRACES;break}},table:[{3:1,4:2,6:t,9:4,14:r,16:n,18:i,19:o},{1:[3]},{3:10,4:2,5:[1,9],6:t,9:4,14:r,16:n,18:i,19:o},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},e(l,[2,8]),{20:[2,9]},{3:16,4:2,6:t,9:4,14:r,16:n,18:i,19:o},{1:[2,2]},{4:21,5:u,7:17,8:h,9:4,14:r,16:n,18:i,19:o,23:18,24:19,25:20,26:23,32:25,40:f,41:d,42:g,43:p,44:m,45:b,53:$,71:S,72:R},{11:34,12:[1,35],22:L},e([12,22],[2,10]),e(l,[2,6]),e(l,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:u,7:38,8:h,9:4,14:r,16:n,18:i,19:o,23:18,24:19,25:20,26:23,32:25,40:f,41:d,42:g,43:p,44:m,45:b,53:$,71:S,72:R},{4:21,5:u,7:39,8:h,9:4,14:r,16:n,18:i,19:o,23:18,24:19,25:20,26:23,32:25,40:f,41:d,42:g,43:p,44:m,45:b,53:$,71:S,72:R},{4:21,5:u,7:40,8:h,9:4,14:r,16:n,18:i,19:o,23:18,24:19,25:20,26:23,32:25,40:f,41:d,42:g,43:p,44:m,45:b,53:$,71:S,72:R},{4:21,5:u,7:41,8:h,9:4,14:r,16:n,18:i,19:o,23:18,24:19,25:20,26:23,32:25,40:f,41:d,42:g,43:p,44:m,45:b,53:$,71:S,72:R},{4:21,5:u,7:42,8:h,9:4,14:r,16:n,18:i,19:o,23:18,24:19,25:20,26:23,32:25,40:f,41:d,42:g,43:p,44:m,45:b,53:$,71:S,72:R},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},e(N,[2,26]),e(N,[2,27]),e(N,[2,28]),e(N,[2,29]),e(N,[2,30]),e(N,[2,31]),e(F,[2,55]),e(F,[2,56]),e(l,[2,4]),{13:51,21:[1,52]},e(l,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:H,65:G,66:P,67:V,68:z,69:W,70:T},{61:63,64:H,65:G,66:P,67:V,68:z,69:W,70:T},{11:64,22:L},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},e(U,[2,46]),e(U,[2,47]),e(U,[2,48]),e(U,[2,49]),e(U,[2,50]),e(U,[2,51]),e(U,[2,52]),{63:[1,68]},e(l,[2,5]),{5:I,29:69,30:ae,33:Q,35:ue,37:_e,39:ke},{5:de,39:ce,55:76,56:he,58:Se},{32:81,71:S,72:R},{32:82,71:S,72:R},e(ve,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:I,29:87,30:ae,33:Q,35:ue,37:_e,39:ke},e(ve,[2,25]),e(ve,[2,39]),{31:[1,88]},{31:[1,89]},{5:de,39:ce,55:90,56:he,58:Se},e(ve,[2,43]),e(ve,[2,44]),e(ve,[2,45]),{32:91,71:S,72:R},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},e(ve,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},e(ve,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:I,29:116,30:ae,33:Q,35:ue,37:_e,39:ke},{5:I,29:117,30:ae,33:Q,35:ue,37:_e,39:ke},{5:I,29:118,30:ae,33:Q,35:ue,37:_e,39:ke},{5:I,29:119,30:ae,33:Q,35:ue,37:_e,39:ke},{5:de,39:ce,55:120,56:he,58:Se},{5:de,39:ce,55:121,56:he,58:Se},e(ve,[2,20]),e(ve,[2,21]),e(ve,[2,22]),e(ve,[2,23]),e(ve,[2,40]),e(ve,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(pe,J){if(J.recoverable)this.trace(pe);else{var oe=new Error(pe);throw oe.hash=J,oe}},parse:function(pe){var J=this,oe=[0],ee=[],Z=[null],ie=[],se=this.table,te="",fe=0,we=0,Ye=2,He=1,je=ie.slice.call(arguments,1),Pe=Object.create(this.lexer),Ee={yy:{}};for(var Ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ie)&&(Ee.yy[Ie]=this.yy[Ie]);Pe.setInput(pe,Ee.yy),Ee.yy.lexer=Pe,Ee.yy.parser=this,typeof Pe.yylloc>"u"&&(Pe.yylloc={});var Le=Pe.yylloc;ie.push(Le);var Be=Pe.options&&Pe.options.ranges;typeof Ee.yy.parseError=="function"?this.parseError=Ee.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(){var Me;return Me=ee.pop()||Pe.lex()||He,typeof Me!="number"&&(Me instanceof Array&&(ee=Me,Me=ee.pop()),Me=J.symbols_[Me]||Me),Me}for(var dt,Ge,rt,it,st={},wt,nt,Ke,Je;;){if(Ge=oe[oe.length-1],this.defaultActions[Ge]?rt=this.defaultActions[Ge]:((dt===null||typeof dt>"u")&&(dt=Te()),rt=se[Ge]&&se[Ge][dt]),typeof rt>"u"||!rt.length||!rt[0]){var Oe="";Je=[];for(wt in se[Ge])this.terminals_[wt]&&wt>Ye&&Je.push("'"+this.terminals_[wt]+"'");Pe.showPosition?Oe="Parse error on line "+(fe+1)+`:
|
|
`+Pe.showPosition()+`
|
|
Expecting `+Je.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'":Oe="Parse error on line "+(fe+1)+": Unexpected "+(dt==He?"end of input":"'"+(this.terminals_[dt]||dt)+"'"),this.parseError(Oe,{text:Pe.match,token:this.terminals_[dt]||dt,line:Pe.yylineno,loc:Le,expected:Je})}if(rt[0]instanceof Array&&rt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ge+", token: "+dt);switch(rt[0]){case 1:oe.push(dt),Z.push(Pe.yytext),ie.push(Pe.yylloc),oe.push(rt[1]),dt=null,we=Pe.yyleng,te=Pe.yytext,fe=Pe.yylineno,Le=Pe.yylloc;break;case 2:if(nt=this.productions_[rt[1]][1],st.$=Z[Z.length-nt],st._$={first_line:ie[ie.length-(nt||1)].first_line,last_line:ie[ie.length-1].last_line,first_column:ie[ie.length-(nt||1)].first_column,last_column:ie[ie.length-1].last_column},Be&&(st._$.range=[ie[ie.length-(nt||1)].range[0],ie[ie.length-1].range[1]]),it=this.performAction.apply(st,[te,we,fe,Ee.yy,rt[1],Z,ie].concat(je)),typeof it<"u")return it;nt&&(oe=oe.slice(0,-1*nt*2),Z=Z.slice(0,-1*nt),ie=ie.slice(0,-1*nt)),oe.push(this.productions_[rt[1]][0]),Z.push(st.$),ie.push(st._$),Ke=se[oe[oe.length-2]][oe[oe.length-1]],oe.push(Ke);break;case 3:return!0}}return!0}},Ce=function(){var Ne={EOF:1,parseError:function(J,oe){if(this.yy.parser)this.yy.parser.parseError(J,oe);else throw new Error(J)},setInput:function(pe,J){return this.yy=J||this.yy||{},this._input=pe,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 pe=this._input[0];this.yytext+=pe,this.yyleng++,this.offset++,this.match+=pe,this.matched+=pe;var J=pe.match(/(?:\r\n?|\n).*/g);return J?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),pe},unput:function(pe){var J=pe.length,oe=pe.split(/(?:\r\n?|\n)/g);this._input=pe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-J),this.offset-=J;var ee=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),oe.length-1&&(this.yylineno-=oe.length-1);var Z=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:oe?(oe.length===ee.length?this.yylloc.first_column:0)+ee[ee.length-oe.length].length-oe[0].length:this.yylloc.first_column-J},this.options.ranges&&(this.yylloc.range=[Z[0],Z[0]+this.yyleng-J]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(pe){this.unput(this.match.slice(pe))},pastInput:function(){var pe=this.matched.substr(0,this.matched.length-this.match.length);return(pe.length>20?"...":"")+pe.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var pe=this.match;return pe.length<20&&(pe+=this._input.substr(0,20-pe.length)),(pe.substr(0,20)+(pe.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pe=this.pastInput(),J=new Array(pe.length+1).join("-");return pe+this.upcomingInput()+`
|
|
`+J+"^"},test_match:function(pe,J){var oe,ee,Z;if(this.options.backtrack_lexer&&(Z={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&&(Z.yylloc.range=this.yylloc.range.slice(0))),ee=pe[0].match(/(?:\r\n?|\n).*/g),ee&&(this.yylineno+=ee.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ee?ee[ee.length-1].length-ee[ee.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+pe[0].length},this.yytext+=pe[0],this.match+=pe[0],this.matches=pe,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(pe[0].length),this.matched+=pe[0],oe=this.performAction.call(this,this.yy,this,J,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var ie in Z)this[ie]=Z[ie];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var pe,J,oe,ee;this._more||(this.yytext="",this.match="");for(var Z=this._currentRules(),ie=0;ie<Z.length;ie++)if(oe=this._input.match(this.rules[Z[ie]]),oe&&(!J||oe[0].length>J[0].length)){if(J=oe,ee=ie,this.options.backtrack_lexer){if(pe=this.test_match(oe,Z[ie]),pe!==!1)return pe;if(this._backtrack){J=!1;continue}else return!1}else if(!this.options.flex)break}return J?(pe=this.test_match(J,Z[ee]),pe!==!1?pe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var J=this.next();return J||this.lex()},begin:function(J){this.conditionStack.push(J)},popState:function(){var J=this.conditionStack.length-1;return J>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(J){return J=this.conditionStack.length-1-Math.abs(J||0),J>=0?this.conditionStack[J]:"INITIAL"},pushState:function(J){this.begin(J)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(J,oe,ee,Z){switch(ee){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return oe.yytext=oe.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/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:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},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:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,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,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return Ne}();me.lexer=Ce;function xe(){this.yy={}}return xe.prototype=me,me.Parser=xe,new xe}();parser$3.parser=parser$3;const requirementDetector=e=>e.match(/^\s*requirement(Diagram)?/)!==null;let relations=[],latestRequirement={},requirements={},latestElement={},elements={};const 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$4=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},addRequirement=(e,t)=>(typeof requirements[e]>"u"&&(requirements[e]={name:e,type:t,id:latestRequirement.id,text:latestRequirement.text,risk:latestRequirement.risk,verifyMethod:latestRequirement.verifyMethod}),latestRequirement={},requirements[e]),getRequirements=()=>requirements,setNewReqId=e=>{typeof latestRequirement<"u"&&(latestRequirement.id=e)},setNewReqText=e=>{typeof latestRequirement<"u"&&(latestRequirement.text=e)},setNewReqRisk=e=>{typeof latestRequirement<"u"&&(latestRequirement.risk=e)},setNewReqVerifyMethod=e=>{typeof latestRequirement<"u"&&(latestRequirement.verifyMethod=e)},addElement=e=>(typeof elements[e]>"u"&&(elements[e]={name:e,type:latestElement.type,docRef:latestElement.docRef},log$1.info("Added new requirement: ",e)),latestElement={},elements[e]),getElements=()=>elements,setNewElementType=e=>{typeof latestElement<"u"&&(latestElement.type=e)},setNewElementDocRef=e=>{typeof latestElement<"u"&&(latestElement.docRef=e)},addRelationship=(e,t,r)=>{relations.push({type:e,src:t,dst:r})},getRelationships=()=>relations,clear$3=()=>{relations=[],latestRequirement={},requirements={},latestElement={},elements={},clear$g()},requirementDb={RequirementType,RiskLevel,VerifyType,Relationships,parseDirective:parseDirective$4,getConfig:()=>getConfig$1().req,addRequirement,getRequirements,setNewReqId,setNewReqText,setNewReqRisk,setNewReqVerifyMethod,setAccTitle,getAccTitle,setAccDescription,getAccDescription,addElement,getElements,setNewElementType,setNewElementDocRef,addRelationship,getRelationships,clear:clear$3},ReqMarkers={CONTAINS:"contains",ARROW:"arrow"},insertLineEndings=(e,t)=>{let r=e.append("defs").append("marker").attr("id",ReqMarkers.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",ReqMarkers.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0
|
|
L${t.line_height},${t.line_height/2}
|
|
M${t.line_height},${t.line_height/2}
|
|
L0,${t.line_height}`).attr("stroke-width",1)},markers={ReqMarkers,insertLineEndings};let conf$5={},relCnt=0;const newRectNode=(e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",conf$5.rect_min_width+"px").attr("height",conf$5.rect_min_height+"px"),newTitleNode=(e,t,r)=>{let n=conf$5.rect_min_width/2,i=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",n).attr("y",conf$5.rect_padding).attr("dominant-baseline","hanging"),o=0;r.forEach(f=>{o==0?i.append("tspan").attr("text-anchor","middle").attr("x",conf$5.rect_min_width/2).attr("dy",0).text(f):i.append("tspan").attr("text-anchor","middle").attr("x",conf$5.rect_min_width/2).attr("dy",conf$5.line_height*.75).text(f),o++});let l=1.5*conf$5.rect_padding,u=o*conf$5.line_height*.75,h=l+u;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",conf$5.rect_min_width).attr("y1",h).attr("y2",h),{titleNode:i,y:h}},newBodyNode=(e,t,r,n)=>{let i=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",conf$5.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),o=0;const l=30;let u=[];return r.forEach(h=>{let f=h.length;for(;f>l&&o<3;){let d=h.substring(0,l);h=h.substring(l,h.length),f=h.length,u[u.length]=d,o++}if(o==3){let d=u[u.length-1];u[u.length-1]=d.substring(0,d.length-4)+"..."}else u[u.length]=h;o=0}),u.forEach(h=>{i.append("tspan").attr("x",conf$5.rect_padding).attr("dy",conf$5.line_height).text(h)}),i},addEdgeLabel=(e,t,r,n)=>{const i=t.node().getTotalLength(),o=t.node().getPointAtLength(i*.5),l="rel"+relCnt;relCnt++;const h=e.append("text").attr("class","req relationshipLabel").attr("id",l).attr("x",o.x).attr("y",o.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();e.insert("rect","#"+l).attr("class","req reqLabelBox").attr("x",o.x-h.width/2).attr("y",o.y-h.height/2).attr("width",h.width).attr("height",h.height).attr("fill","white").attr("fill-opacity","85%")},drawRelationshipFromLayout=function(e,t,r,n,i){const o=r.edge(elementString(t.src),elementString(t.dst)),l=line$2().x(function(h){return h.x}).y(function(h){return h.y}),u=e.insert("path","#"+n).attr("class","er relationshipLine").attr("d",l(o.points)).attr("fill","none");t.type==i.db.Relationships.CONTAINS?u.attr("marker-start","url("+common.getUrl(conf$5.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(u.attr("stroke-dasharray","10,7"),u.attr("marker-end","url("+common.getUrl(conf$5.arrowMarkerAbsolute)+"#"+markers.ReqMarkers.ARROW+"_line_ending)")),addEdgeLabel(e,u,conf$5,`<<${t.type}>>`)},drawReqs=(e,t,r)=>{Object.keys(e).forEach(n=>{let i=e[n];n=elementString(n),log$1.info("Added new requirement: ",n);const o=r.append("g").attr("id",n),l="req-"+n,u=newRectNode(o,l);let h=newTitleNode(o,n+"_title",[`<<${i.type}>>`,`${i.name}`]);newBodyNode(o,n+"_body",[`Id: ${i.id}`,`Text: ${i.text}`,`Risk: ${i.risk}`,`Verification: ${i.verifyMethod}`],h.y);const f=u.node().getBBox();t.setNode(n,{width:f.width,height:f.height,shape:"rect",id:n})})},drawElements=(e,t,r)=>{Object.keys(e).forEach(n=>{let i=e[n];const o=elementString(n),l=r.append("g").attr("id",o),u="element-"+o,h=newRectNode(l,u);let f=newTitleNode(l,u+"_title",["<<Element>>",`${n}`]);newBodyNode(l,u+"_body",[`Type: ${i.type||"Not Specified"}`,`Doc Ref: ${i.docRef||"None"}`],f.y);const d=h.node().getBBox();t.setNode(o,{width:d.width,height:d.height,shape:"rect",id:o})})},addRelationships=(e,t)=>(e.forEach(function(r){let n=elementString(r.src),i=elementString(r.dst);t.setEdge(n,i,{relationship:r})}),e),adjustEntities=function(e,t){t.nodes().forEach(function(r){typeof r<"u"&&typeof t.node(r)<"u"&&(e.select("#"+r),e.select("#"+r).attr("transform","translate("+(t.node(r).x-t.node(r).width/2)+","+(t.node(r).y-t.node(r).height/2)+" )"))})},elementString=e=>e.replace(/\s/g,"").replace(/\./g,"_"),draw$5=(e,t,r,n)=>{conf$5=getConfig$1().requirement,n.db.clear(),n.parser.parse(e);const i=conf$5.securityLevel;let o;i==="sandbox"&&(o=select$1("#i"+t));const u=select$1(i==="sandbox"?o.nodes()[0].contentDocument.body:"body").select(`[id='${t}']`);markers.insertLineEndings(u,conf$5);const h=new graphlib$2.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:conf$5.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let f=n.db.getRequirements(),d=n.db.getElements(),g=n.db.getRelationships();drawReqs(f,h,u),drawElements(d,h,u),addRelationships(g,h),dagre$1.layout(h),adjustEntities(u,h),g.forEach(function(S){drawRelationshipFromLayout(u,S,h,t,n)});const p=conf$5.rect_padding,m=u.node().getBBox(),b=m.width+p*2,$=m.height+p*2;configureSvgSize(u,$,b,conf$5.useMaxWidth),u.attr("viewBox",`${m.x-p} ${m.y-p} ${b} ${$}`),addSVGAccessibilityFields(n.db,u,t)},requirementRenderer={draw:draw$5};var parser$2=function(){var e=function(Ne,pe,J,oe){for(J=J||{},oe=Ne.length;oe--;J[Ne[oe]]=pe);return J},t=[1,2],r=[1,3],n=[1,5],i=[1,7],o=[2,5],l=[1,15],u=[1,17],h=[1,18],f=[1,19],d=[1,21],g=[1,22],p=[1,23],m=[1,29],b=[1,30],$=[1,31],S=[1,32],R=[1,33],L=[1,34],N=[1,35],F=[1,36],H=[1,37],G=[1,38],P=[1,39],V=[1,40],z=[1,43],W=[1,44],T=[1,45],U=[1,46],I=[1,47],ae=[1,48],Q=[1,51],ue=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],_e=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],ke=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],de=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],ce=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],he=[67,68,69],Se=[1,121],ve=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],me={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,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"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,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(pe,J,oe,ee,Z,ie,se){var te=ie.length-1;switch(Z){case 4:return ee.apply(ie[te]),ie[te];case 5:this.$=[];break;case 6:ie[te-1].push(ie[te]),this.$=ie[te-1];break;case 7:case 8:this.$=ie[te];break;case 9:this.$=[];break;case 12:ie[te-3].type="addParticipant",ie[te-3].description=ee.parseMessage(ie[te-1]),this.$=ie[te-3];break;case 13:ie[te-1].type="addParticipant",this.$=ie[te-1];break;case 14:ie[te-3].type="addActor",ie[te-3].description=ee.parseMessage(ie[te-1]),this.$=ie[te-3];break;case 15:ie[te-1].type="addActor",this.$=ie[te-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(ie[te-2]),sequenceIndexStep:Number(ie[te-1]),sequenceVisible:!0,signalType:ee.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(ie[te-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:ee.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:ee.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:ee.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:ee.LINETYPE.ACTIVE_START,actor:ie[te-1]};break;case 22:this.$={type:"activeEnd",signalType:ee.LINETYPE.ACTIVE_END,actor:ie[te-1]};break;case 28:ee.setDiagramTitle(ie[te].substring(6)),this.$=ie[te].substring(6);break;case 29:ee.setDiagramTitle(ie[te].substring(7)),this.$=ie[te].substring(7);break;case 30:this.$=ie[te].trim(),ee.setAccTitle(this.$);break;case 31:case 32:this.$=ie[te].trim(),ee.setAccDescription(this.$);break;case 33:ie[te-1].unshift({type:"loopStart",loopText:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.LOOP_START}),ie[te-1].push({type:"loopEnd",loopText:ie[te-2],signalType:ee.LINETYPE.LOOP_END}),this.$=ie[te-1];break;case 34:ie[te-1].unshift({type:"rectStart",color:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.RECT_START}),ie[te-1].push({type:"rectEnd",color:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.RECT_END}),this.$=ie[te-1];break;case 35:ie[te-1].unshift({type:"optStart",optText:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.OPT_START}),ie[te-1].push({type:"optEnd",optText:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.OPT_END}),this.$=ie[te-1];break;case 36:ie[te-1].unshift({type:"altStart",altText:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.ALT_START}),ie[te-1].push({type:"altEnd",signalType:ee.LINETYPE.ALT_END}),this.$=ie[te-1];break;case 37:ie[te-1].unshift({type:"parStart",parText:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.PAR_START}),ie[te-1].push({type:"parEnd",signalType:ee.LINETYPE.PAR_END}),this.$=ie[te-1];break;case 38:ie[te-1].unshift({type:"criticalStart",criticalText:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.CRITICAL_START}),ie[te-1].push({type:"criticalEnd",signalType:ee.LINETYPE.CRITICAL_END}),this.$=ie[te-1];break;case 39:ie[te-1].unshift({type:"breakStart",breakText:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.BREAK_START}),ie[te-1].push({type:"breakEnd",optText:ee.parseMessage(ie[te-2]),signalType:ee.LINETYPE.BREAK_END}),this.$=ie[te-1];break;case 42:this.$=ie[te-3].concat([{type:"option",optionText:ee.parseMessage(ie[te-1]),signalType:ee.LINETYPE.CRITICAL_OPTION},ie[te]]);break;case 44:this.$=ie[te-3].concat([{type:"and",parText:ee.parseMessage(ie[te-1]),signalType:ee.LINETYPE.PAR_AND},ie[te]]);break;case 46:this.$=ie[te-3].concat([{type:"else",altText:ee.parseMessage(ie[te-1]),signalType:ee.LINETYPE.ALT_ELSE},ie[te]]);break;case 47:this.$=[ie[te-1],{type:"addNote",placement:ie[te-2],actor:ie[te-1].actor,text:ie[te]}];break;case 48:ie[te-2]=[].concat(ie[te-1],ie[te-1]).slice(0,2),ie[te-2][0]=ie[te-2][0].actor,ie[te-2][1]=ie[te-2][1].actor,this.$=[ie[te-1],{type:"addNote",placement:ee.PLACEMENT.OVER,actor:ie[te-2].slice(0,2),text:ie[te]}];break;case 49:this.$=[ie[te-1],{type:"addLinks",actor:ie[te-1].actor,text:ie[te]}];break;case 50:this.$=[ie[te-1],{type:"addALink",actor:ie[te-1].actor,text:ie[te]}];break;case 51:this.$=[ie[te-1],{type:"addProperties",actor:ie[te-1].actor,text:ie[te]}];break;case 52:this.$=[ie[te-1],{type:"addDetails",actor:ie[te-1].actor,text:ie[te]}];break;case 55:this.$=[ie[te-2],ie[te]];break;case 56:this.$=ie[te];break;case 57:this.$=ee.PLACEMENT.LEFTOF;break;case 58:this.$=ee.PLACEMENT.RIGHTOF;break;case 59:this.$=[ie[te-4],ie[te-1],{type:"addMessage",from:ie[te-4].actor,to:ie[te-1].actor,signalType:ie[te-3],msg:ie[te]},{type:"activeStart",signalType:ee.LINETYPE.ACTIVE_START,actor:ie[te-1]}];break;case 60:this.$=[ie[te-4],ie[te-1],{type:"addMessage",from:ie[te-4].actor,to:ie[te-1].actor,signalType:ie[te-3],msg:ie[te]},{type:"activeEnd",signalType:ee.LINETYPE.ACTIVE_END,actor:ie[te-4]}];break;case 61:this.$=[ie[te-3],ie[te-1],{type:"addMessage",from:ie[te-3].actor,to:ie[te-1].actor,signalType:ie[te-2],msg:ie[te]}];break;case 62:this.$={type:"addParticipant",actor:ie[te]};break;case 63:this.$=ee.LINETYPE.SOLID_OPEN;break;case 64:this.$=ee.LINETYPE.DOTTED_OPEN;break;case 65:this.$=ee.LINETYPE.SOLID;break;case 66:this.$=ee.LINETYPE.DOTTED;break;case 67:this.$=ee.LINETYPE.SOLID_CROSS;break;case 68:this.$=ee.LINETYPE.DOTTED_CROSS;break;case 69:this.$=ee.LINETYPE.SOLID_POINT;break;case 70:this.$=ee.LINETYPE.DOTTED_POINT;break;case 71:this.$=ee.parseMessage(ie[te].trim().substring(1));break;case 72:ee.parseDirective("%%{","open_directive");break;case 73:ee.parseDirective(ie[te],"type_directive");break;case 74:ie[te]=ie[te].trim().replace(/'/g,'"'),ee.parseDirective(ie[te],"arg_directive");break;case 75:ee.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:t,5:r,6:4,7:n,11:6,79:i},{1:[3]},{3:8,4:t,5:r,6:4,7:n,11:6,79:i},{3:9,4:t,5:r,6:4,7:n,11:6,79:i},{3:10,4:t,5:r,6:4,7:n,11:6,79:i},e([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],o,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:l,5:u,6:41,9:14,10:16,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,41:N,42:F,43:H,45:G,47:P,49:V,53:z,58:W,59:T,60:U,61:I,69:ae,79:i},{13:49,14:[1,50],82:Q},e([14,82],[2,73]),e(ue,[2,6]),{6:41,10:52,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,41:N,42:F,43:H,45:G,47:P,49:V,53:z,58:W,59:T,60:U,61:I,69:ae,79:i},e(ue,[2,8]),e(ue,[2,9]),{17:53,69:ae},{17:54,69:ae},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:ae},{17:60,69:ae},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},e(ue,[2,28]),e(ue,[2,29]),{35:[1,66]},{37:[1,67]},e(ue,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},e(ue,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:ae},{17:89,69:ae},{17:90,69:ae},{17:91,69:ae},e([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},e(ue,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},e(ue,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},e(ue,[2,20]),{5:[1,102]},{5:[1,103]},e(ue,[2,23]),e(ue,[2,24]),e(ue,[2,25]),e(ue,[2,26]),e(ue,[2,27]),e(ue,[2,30]),e(ue,[2,31]),e(_e,o,{8:104}),e(_e,o,{8:105}),e(_e,o,{8:106}),e(ke,o,{44:107,8:108}),e(de,o,{46:109,8:110}),e(ce,o,{48:111,8:112}),e(_e,o,{8:113}),{17:116,67:[1,114],68:[1,115],69:ae},e(he,[2,63]),e(he,[2,64]),e(he,[2,65]),e(he,[2,66]),e(he,[2,67]),e(he,[2,68]),e(he,[2,69]),e(he,[2,70]),{17:117,69:ae},{17:119,57:118,69:ae},{69:[2,57]},{69:[2,58]},{55:120,78:Se},{55:122,78:Se},{55:123,78:Se},{55:124,78:Se},e(ve,[2,10]),{13:125,82:Q},{82:[2,74]},{19:[1,126]},e(ue,[2,13]),{19:[1,127]},e(ue,[2,15]),{5:[1,128]},e(ue,[2,18]),e(ue,[2,19]),e(ue,[2,21]),e(ue,[2,22]),{4:l,5:u,6:41,9:14,10:16,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,40:[1,129],41:N,42:F,43:H,45:G,47:P,49:V,53:z,58:W,59:T,60:U,61:I,69:ae,79:i},{4:l,5:u,6:41,9:14,10:16,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,40:[1,130],41:N,42:F,43:H,45:G,47:P,49:V,53:z,58:W,59:T,60:U,61:I,69:ae,79:i},{4:l,5:u,6:41,9:14,10:16,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,40:[1,131],41:N,42:F,43:H,45:G,47:P,49:V,53:z,58:W,59:T,60:U,61:I,69:ae,79:i},{40:[1,132]},{4:l,5:u,6:41,9:14,10:16,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,40:[2,45],41:N,42:F,43:H,45:G,47:P,49:V,52:[1,133],53:z,58:W,59:T,60:U,61:I,69:ae,79:i},{40:[1,134]},{4:l,5:u,6:41,9:14,10:16,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,40:[2,43],41:N,42:F,43:H,45:G,47:P,49:V,51:[1,135],53:z,58:W,59:T,60:U,61:I,69:ae,79:i},{40:[1,136]},{4:l,5:u,6:41,9:14,10:16,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,40:[2,41],41:N,42:F,43:H,45:G,47:P,49:V,50:[1,137],53:z,58:W,59:T,60:U,61:I,69:ae,79:i},{4:l,5:u,6:41,9:14,10:16,11:6,16:h,17:42,20:f,21:20,22:d,25:g,26:p,27:24,28:25,29:26,30:27,31:28,32:m,33:b,34:$,36:S,38:R,39:L,40:[1,138],41:N,42:F,43:H,45:G,47:P,49:V,53:z,58:W,59:T,60:U,61:I,69:ae,79:i},{17:139,69:ae},{17:140,69:ae},{55:141,78:Se},{55:142,78:Se},{55:143,78:Se},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},e(ue,[2,17]),e(ue,[2,33]),e(ue,[2,34]),e(ue,[2,35]),e(ue,[2,36]),{19:[1,148]},e(ue,[2,37]),{19:[1,149]},e(ue,[2,38]),{19:[1,150]},e(ue,[2,39]),{55:151,78:Se},{55:152,78:Se},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:ae},e(ve,[2,11]),e(ue,[2,12]),e(ue,[2,14]),e(ke,o,{8:108,44:154}),e(de,o,{8:110,46:155}),e(ce,o,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(pe,J){if(J.recoverable)this.trace(pe);else{var oe=new Error(pe);throw oe.hash=J,oe}},parse:function(pe){var J=this,oe=[0],ee=[],Z=[null],ie=[],se=this.table,te="",fe=0,we=0,Ye=2,He=1,je=ie.slice.call(arguments,1),Pe=Object.create(this.lexer),Ee={yy:{}};for(var Ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ie)&&(Ee.yy[Ie]=this.yy[Ie]);Pe.setInput(pe,Ee.yy),Ee.yy.lexer=Pe,Ee.yy.parser=this,typeof Pe.yylloc>"u"&&(Pe.yylloc={});var Le=Pe.yylloc;ie.push(Le);var Be=Pe.options&&Pe.options.ranges;typeof Ee.yy.parseError=="function"?this.parseError=Ee.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(){var Me;return Me=ee.pop()||Pe.lex()||He,typeof Me!="number"&&(Me instanceof Array&&(ee=Me,Me=ee.pop()),Me=J.symbols_[Me]||Me),Me}for(var dt,Ge,rt,it,st={},wt,nt,Ke,Je;;){if(Ge=oe[oe.length-1],this.defaultActions[Ge]?rt=this.defaultActions[Ge]:((dt===null||typeof dt>"u")&&(dt=Te()),rt=se[Ge]&&se[Ge][dt]),typeof rt>"u"||!rt.length||!rt[0]){var Oe="";Je=[];for(wt in se[Ge])this.terminals_[wt]&&wt>Ye&&Je.push("'"+this.terminals_[wt]+"'");Pe.showPosition?Oe="Parse error on line "+(fe+1)+`:
|
|
`+Pe.showPosition()+`
|
|
Expecting `+Je.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'":Oe="Parse error on line "+(fe+1)+": Unexpected "+(dt==He?"end of input":"'"+(this.terminals_[dt]||dt)+"'"),this.parseError(Oe,{text:Pe.match,token:this.terminals_[dt]||dt,line:Pe.yylineno,loc:Le,expected:Je})}if(rt[0]instanceof Array&&rt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ge+", token: "+dt);switch(rt[0]){case 1:oe.push(dt),Z.push(Pe.yytext),ie.push(Pe.yylloc),oe.push(rt[1]),dt=null,we=Pe.yyleng,te=Pe.yytext,fe=Pe.yylineno,Le=Pe.yylloc;break;case 2:if(nt=this.productions_[rt[1]][1],st.$=Z[Z.length-nt],st._$={first_line:ie[ie.length-(nt||1)].first_line,last_line:ie[ie.length-1].last_line,first_column:ie[ie.length-(nt||1)].first_column,last_column:ie[ie.length-1].last_column},Be&&(st._$.range=[ie[ie.length-(nt||1)].range[0],ie[ie.length-1].range[1]]),it=this.performAction.apply(st,[te,we,fe,Ee.yy,rt[1],Z,ie].concat(je)),typeof it<"u")return it;nt&&(oe=oe.slice(0,-1*nt*2),Z=Z.slice(0,-1*nt),ie=ie.slice(0,-1*nt)),oe.push(this.productions_[rt[1]][0]),Z.push(st.$),ie.push(st._$),Ke=se[oe[oe.length-2]][oe[oe.length-1]],oe.push(Ke);break;case 3:return!0}}return!0}},Ce=function(){var Ne={EOF:1,parseError:function(J,oe){if(this.yy.parser)this.yy.parser.parseError(J,oe);else throw new Error(J)},setInput:function(pe,J){return this.yy=J||this.yy||{},this._input=pe,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 pe=this._input[0];this.yytext+=pe,this.yyleng++,this.offset++,this.match+=pe,this.matched+=pe;var J=pe.match(/(?:\r\n?|\n).*/g);return J?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),pe},unput:function(pe){var J=pe.length,oe=pe.split(/(?:\r\n?|\n)/g);this._input=pe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-J),this.offset-=J;var ee=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),oe.length-1&&(this.yylineno-=oe.length-1);var Z=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:oe?(oe.length===ee.length?this.yylloc.first_column:0)+ee[ee.length-oe.length].length-oe[0].length:this.yylloc.first_column-J},this.options.ranges&&(this.yylloc.range=[Z[0],Z[0]+this.yyleng-J]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(pe){this.unput(this.match.slice(pe))},pastInput:function(){var pe=this.matched.substr(0,this.matched.length-this.match.length);return(pe.length>20?"...":"")+pe.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var pe=this.match;return pe.length<20&&(pe+=this._input.substr(0,20-pe.length)),(pe.substr(0,20)+(pe.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pe=this.pastInput(),J=new Array(pe.length+1).join("-");return pe+this.upcomingInput()+`
|
|
`+J+"^"},test_match:function(pe,J){var oe,ee,Z;if(this.options.backtrack_lexer&&(Z={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&&(Z.yylloc.range=this.yylloc.range.slice(0))),ee=pe[0].match(/(?:\r\n?|\n).*/g),ee&&(this.yylineno+=ee.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ee?ee[ee.length-1].length-ee[ee.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+pe[0].length},this.yytext+=pe[0],this.match+=pe[0],this.matches=pe,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(pe[0].length),this.matched+=pe[0],oe=this.performAction.call(this,this.yy,this,J,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var ie in Z)this[ie]=Z[ie];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var pe,J,oe,ee;this._more||(this.yytext="",this.match="");for(var Z=this._currentRules(),ie=0;ie<Z.length;ie++)if(oe=this._input.match(this.rules[Z[ie]]),oe&&(!J||oe[0].length>J[0].length)){if(J=oe,ee=ie,this.options.backtrack_lexer){if(pe=this.test_match(oe,Z[ie]),pe!==!1)return pe;if(this._backtrack){J=!1;continue}else return!1}else if(!this.options.flex)break}return J?(pe=this.test_match(J,Z[ee]),pe!==!1?pe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var J=this.next();return J||this.lex()},begin:function(J){this.conditionStack.push(J)},popState:function(){var J=this.conditionStack.length-1;return J>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(J){return J=this.conditionStack.length-1-Math.abs(J||0),J>=0?this.conditionStack[J]:"INITIAL"},pushState:function(J){this.begin(J)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(J,oe,ee,Z){switch(ee){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return oe.yytext=oe.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 52:return 5;case 53:return oe.yytext=oe.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 65:return 5;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\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,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\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:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},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,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};return Ne}();me.lexer=Ce;function xe(){this.yy={}}return xe.prototype=me,me.Parser=xe,new xe}();parser$2.parser=parser$2;const sequenceDetector=e=>e.match(/^\s*sequenceDiagram/)!==null;let prevActor,actors$1={},messages=[],sequenceNumbersEnabled=!1,wrapEnabled;const parseDirective$3=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},addActor=function(e,t,r,n){const i=actors$1[e];i&&t===i.name&&r==null||((r==null||r.text==null)&&(r={text:t,wrap:null,type:n}),(n==null||r.text==null)&&(r={text:t,wrap:null,type:n}),actors$1[e]={name:t,description:r.text,wrap:r.wrap===void 0&&autoWrap()||!!r.wrap,prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n||"participant"},prevActor&&actors$1[prevActor]&&(actors$1[prevActor].nextActor=e),prevActor=e)},activationCount=e=>{let t,r=0;for(t=0;t<messages.length;t++)messages[t].type===LINETYPE.ACTIVE_START&&messages[t].from.actor===e&&r++,messages[t].type===LINETYPE.ACTIVE_END&&messages[t].from.actor===e&&r--;return r},addMessage=function(e,t,r,n){messages.push({from:e,to:t,message:r.text,wrap:r.wrap===void 0&&autoWrap()||!!r.wrap,answer:n})},addSignal=function(e,t,r={text:void 0,wrap:void 0},n){if(n===LINETYPE.ACTIVE_END&&activationCount(e.actor)<1){let o=new Error("Trying to inactivate an inactive participant ("+e.actor+")");throw o.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}return messages.push({from:e,to:t,message:r.text,wrap:r.wrap===void 0&&autoWrap()||!!r.wrap,type:n}),!0},getMessages=function(){return messages},getActors$1=function(){return actors$1},getActor=function(e){return actors$1[e]},getActorKeys=function(){return Object.keys(actors$1)},enableSequenceNumbers=function(){sequenceNumbersEnabled=!0},disableSequenceNumbers=function(){sequenceNumbersEnabled=!1},showSequenceNumbers=()=>sequenceNumbersEnabled,setWrap=function(e){wrapEnabled=e},autoWrap=()=>typeof wrapEnabled<"u"?wrapEnabled:getConfig$1().sequence.wrap,clear$2=function(){actors$1={},messages=[],sequenceNumbersEnabled=!1,clear$g()},parseMessage=function(e){const t=e.trim(),r={text:t.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:t.match(/^[:]?wrap:/)!==null?!0:t.match(/^[:]?nowrap:/)!==null?!1:void 0};return log$1.debug("parseMessage:",r),r},LINETYPE={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,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},ARROWTYPE={FILLED:0,OPEN:1},PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},addNote=function(e,t,r){r.text,r.wrap===void 0&&autoWrap()||r.wrap;const n=[].concat(e,e);messages.push({from:n[0],to:n[1],message:r.text,wrap:r.wrap===void 0&&autoWrap()||!!r.wrap,type:LINETYPE.NOTE,placement:t})},addLinks=function(e,t){const r=getActor(e);try{let n=sanitizeText$5(t.text,getConfig$1());n=n.replace(/&/g,"&"),n=n.replace(/=/g,"=");const i=JSON.parse(n);insertLinks(r,i)}catch(n){log$1.error("error while parsing actor link text",n)}},addALink=function(e,t){const r=getActor(e);try{const l={};let u=sanitizeText$5(t.text,getConfig$1());var n=u.indexOf("@");u=u.replace(/&/g,"&"),u=u.replace(/=/g,"=");var i=u.slice(0,n-1).trim(),o=u.slice(n+1).trim();l[i]=o,insertLinks(r,l)}catch(l){log$1.error("error while parsing actor link text",l)}};function insertLinks(e,t){if(e.links==null)e.links=t;else for(let r in t)e.links[r]=t[r]}const addProperties=function(e,t){const r=getActor(e);try{let n=sanitizeText$5(t.text,getConfig$1());const i=JSON.parse(n);insertProperties(r,i)}catch(n){log$1.error("error while parsing actor properties text",n)}};function insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let r in t)e.properties[r]=t[r]}const addDetails=function(e,t){const r=getActor(e),n=document.getElementById(t.text);try{const i=n.innerHTML,o=JSON.parse(i);o.properties&&insertProperties(r,o.properties),o.links&&insertLinks(r,o.links)}catch(i){log$1.error("error while parsing actor details text",i)}},getActorProperty=function(e,t){if(typeof e<"u"&&typeof e.properties<"u")return e.properties[t]},apply=function(e){if(e instanceof Array)e.forEach(function(t){apply(t)});else switch(e.type){case"sequenceIndex":messages.push({from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":addActor(e.actor,e.actor,e.description,"participant");break;case"addActor":addActor(e.actor,e.actor,e.description,"actor");break;case"activeStart":addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":addNote(e.actor,e.placement,e.text);break;case"addLinks":addLinks(e.actor,e.text);break;case"addALink":addALink(e.actor,e.text);break;case"addProperties":addProperties(e.actor,e.text);break;case"addDetails":addDetails(e.actor,e.text);break;case"addMessage":addSignal(e.from,e.to,e.msg,e.signalType);break;case"loopStart":addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":setAccTitle(e.text);break;case"parStart":addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":addSignal(void 0,void 0,void 0,e.signalType);break}},sequenceDb={addActor,addMessage,addSignal,addLinks,addDetails,addProperties,autoWrap,setWrap,enableSequenceNumbers,disableSequenceNumbers,showSequenceNumbers,getMessages,getActors:getActors$1,getActor,getActorKeys,getActorProperty,getAccTitle,getDiagramTitle,setDiagramTitle,parseDirective:parseDirective$3,getConfig:()=>getConfig$1().sequence,clear:clear$2,parseMessage,LINETYPE,ARROWTYPE,PLACEMENT,addNote,setAccTitle,apply,setAccDescription,getAccDescription};let interactionFunctions=[];const addFunction=e=>{interactionFunctions.push(e)},attachFunctions=()=>{interactionFunctions.forEach(e=>{e()}),interactionFunctions=[]},drawRect$1=function(e,t){const r=e.append("rect");return r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),typeof t.class<"u"&&r.attr("class",t.class),r},addPopupInteraction=(e,t)=>{addFunction(()=>{const r=document.querySelectorAll(e);r.length!==0&&(r[0].addEventListener("mouseover",function(){popupMenuUpFunc("actor"+t+"_popup")}),r[0].addEventListener("mouseout",function(){popupMenuDownFunc("actor"+t+"_popup")}))})},drawPopup=function(e,t,r,n,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const o=t.links,l=t.actorCnt,u=t.rectData;var h="none";i&&(h="block !important");const f=e.append("g");f.attr("id","actor"+l+"_popup"),f.attr("class","actorPopupMenu"),f.attr("display",h),addPopupInteraction("#actor"+l+"_popup",l);var d="";typeof u.class<"u"&&(d=" "+u.class);let g=u.width>r?u.width:r;const p=f.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",u.x),p.attr("y",u.height),p.attr("fill",u.fill),p.attr("stroke",u.stroke),p.attr("width",g),p.attr("height",u.height),p.attr("rx",u.rx),p.attr("ry",u.ry),o!=null){var m=20;for(let S in o){var b=f.append("a"),$=sanitizeUrl_1(o[S]);b.attr("xlink:href",$),b.attr("target","_blank"),_drawMenuItemTextCandidateFunc(n)(S,b,u.x+10,u.height+m,g,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:u.height+m,width:g}},drawImage=function(e,t,r,n){const i=e.append("image");i.attr("x",t),i.attr("y",r);var o=sanitizeUrl_1(n);i.attr("xlink:href",o)},drawEmbeddedImage=function(e,t,r,n){const i=e.append("use");i.attr("x",t),i.attr("y",r);var o=sanitizeUrl_1(n);i.attr("xlink:href","#"+o)},popupMenu=function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = 'block'; }"},popdownMenu=function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = 'none'; }"},popupMenuUpFunc=function(e){var t=document.getElementById(e);t!=null&&(t.style.display="block")},popupMenuDownFunc=function(e){var t=document.getElementById(e);t!=null&&(t.style.display="none")},drawText$1=function(e,t){let r=0,n=0;const i=t.text.split(common.lineBreakRegex);let o=[],l=0,u=()=>t.y;if(typeof t.valign<"u"&&typeof t.textMargin<"u"&&t.textMargin>0)switch(t.valign){case"top":case"start":u=()=>Math.round(t.y+t.textMargin);break;case"middle":case"center":u=()=>Math.round(t.y+(r+n+t.textMargin)/2);break;case"bottom":case"end":u=()=>Math.round(t.y+(r+n+2*t.textMargin)-t.textMargin);break}if(typeof t.anchor<"u"&&typeof t.textMargin<"u"&&typeof t.width<"u")switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let h=0;h<i.length;h++){let f=i[h];typeof t.textMargin<"u"&&t.textMargin===0&&typeof t.fontSize<"u"&&(l=h*t.fontSize);const d=e.append("text");if(d.attr("x",t.x),d.attr("y",u()),typeof t.anchor<"u"&&d.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),typeof t.fontFamily<"u"&&d.style("font-family",t.fontFamily),typeof t.fontSize<"u"&&d.style("font-size",t.fontSize),typeof t.fontWeight<"u"&&d.style("font-weight",t.fontWeight),typeof t.fill<"u"&&d.attr("fill",t.fill),typeof t.class<"u"&&d.attr("class",t.class),typeof t.dy<"u"?d.attr("dy",t.dy):l!==0&&d.attr("dy",l),t.tspan){const g=d.append("tspan");g.attr("x",t.x),typeof t.fill<"u"&&g.attr("fill",t.fill),g.text(f)}else d.text(f);typeof t.valign<"u"&&typeof t.textMargin<"u"&&t.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),o.push(d)}return o},drawLabel$1=function(e,t){function r(i,o,l,u,h){return i+","+o+" "+(i+l)+","+o+" "+(i+l)+","+(o+u-h)+" "+(i+l-h*1.2)+","+(o+u)+" "+i+","+(o+u)}const n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,drawText$1(e,t),n};let actorCnt=-1;const fixLifeLineHeights=(e,t)=>{!e.selectAll||e.selectAll(".actor-line").attr("class","200").attr("y2",t-55)},drawActorTypeParticipant=function(e,t,r){const n=t.x+t.width/2,i=e.append("g");var o=i;t.y===0&&(actorCnt++,o.append("line").attr("id","actor"+actorCnt).attr("x1",n).attr("y1",5).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),o=i.append("g"),t.actorCnt=actorCnt,t.links!=null&&(o.attr("id","root-"+actorCnt),addPopupInteraction("#root-"+actorCnt,actorCnt)));const l=getNoteRect$1();var u="actor";t.properties!=null&&t.properties.class?u=t.properties.class:l.fill="#eaeaea",l.x=t.x,l.y=t.y,l.width=t.width,l.height=t.height,l.class=u,l.rx=3,l.ry=3;const h=drawRect$1(o,l);if(t.rectData=l,t.properties!=null&&t.properties.icon){const d=t.properties.icon.trim();d.charAt(0)==="@"?drawEmbeddedImage(o,l.x+l.width-20,l.y+10,d.substr(1)):drawImage(o,l.x+l.width-20,l.y+10,d)}_drawTextCandidateFunc$1(r)(t.description,o,l.x,l.y,l.width,l.height,{class:"actor"},r);let f=t.height;if(h.node){const d=h.node().getBBox();t.height=d.height,f=d.height}return f},drawActorTypeActor=function(e,t,r){const n=t.x+t.width/2;t.y===0&&(actorCnt++,e.append("line").attr("id","actor"+actorCnt).attr("x1",n).attr("y1",80).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const i=e.append("g");i.attr("class","actor-man");const o=getNoteRect$1();o.x=t.x,o.y=t.y,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",o.rx=3,o.ry=3,i.append("line").attr("id","actor-man-torso"+actorCnt).attr("x1",n).attr("y1",t.y+25).attr("x2",n).attr("y2",t.y+45),i.append("line").attr("id","actor-man-arms"+actorCnt).attr("x1",n-18).attr("y1",t.y+33).attr("x2",n+18).attr("y2",t.y+33),i.append("line").attr("x1",n-18).attr("y1",t.y+60).attr("x2",n).attr("y2",t.y+45),i.append("line").attr("x1",n).attr("y1",t.y+45).attr("x2",n+16).attr("y2",t.y+60);const l=i.append("circle");l.attr("cx",t.x+t.width/2),l.attr("cy",t.y+10),l.attr("r",15),l.attr("width",t.width),l.attr("height",t.height);const u=i.node().getBBox();return t.height=u.height,_drawTextCandidateFunc$1(r)(t.description,i,o.x,o.y+35,o.width,o.height,{class:"actor"},r),t.height},drawActor=function(e,t,r){switch(t.type){case"actor":return drawActorTypeActor(e,t,r);case"participant":return drawActorTypeParticipant(e,t,r)}},anchorElement=function(e){return e.append("g")},drawActivation=function(e,t,r,n,i){const o=getNoteRect$1(),l=t.anchored;o.x=t.startx,o.y=t.starty,o.class="activation"+i%3,o.width=t.stopx-t.startx,o.height=r-t.starty,drawRect$1(l,o)},drawLoop=function(e,t,r,n){const{boxMargin:i,boxTextMargin:o,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:h,messageFontSize:f,messageFontWeight:d}=n,g=e.append("g"),p=function($,S,R,L){return g.append("line").attr("x1",$).attr("y1",S).attr("x2",R).attr("y2",L).attr("class","loopLine")};p(t.startx,t.starty,t.stopx,t.starty),p(t.stopx,t.starty,t.stopx,t.stopy),p(t.startx,t.stopy,t.stopx,t.stopy),p(t.startx,t.starty,t.startx,t.stopy),typeof t.sections<"u"&&t.sections.forEach(function($){p(t.startx,$.y,t.stopx,$.y).style("stroke-dasharray","3, 3")});let m=getTextObj$1();m.text=r,m.x=t.startx,m.y=t.starty,m.fontFamily=h,m.fontSize=f,m.fontWeight=d,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=u||50,m.height=l||20,m.textMargin=o,m.class="labelText",drawLabel$1(g,m),m=getTextObj$1(),m.text=t.title,m.x=t.startx+u/2+(t.stopx-t.startx)/2,m.y=t.starty+i+o,m.anchor="middle",m.valign="middle",m.textMargin=o,m.class="loopText",m.fontFamily=h,m.fontSize=f,m.fontWeight=d,m.wrap=!0;let b=drawText$1(g,m);return typeof t.sectionTitles<"u"&&t.sectionTitles.forEach(function($,S){if($.message){m.text=$.message,m.x=t.startx+(t.stopx-t.startx)/2,m.y=t.sections[S].y+i+o,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=h,m.fontSize=f,m.fontWeight=d,m.wrap=t.wrap,b=drawText$1(g,m);let R=Math.round(b.map(L=>(L._groups||L)[0][0].getBBox().height).reduce((L,N)=>L+N));t.sections[S].height+=R-(i+o)}}),t.height=Math.round(t.stopy-t.starty),g},drawBackgroundRect$1=function(e,t){drawRect$1(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},insertDatabaseIcon=function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},insertComputerIcon=function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},insertClockIcon=function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},insertArrowHead=function(e){e.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")},insertArrowFilledHead=function(e){e.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")},insertSequenceNumber=function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead=function(e){const r=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.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"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},getTextObj$1=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}},getNoteRect$1=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},_drawTextCandidateFunc$1=function(){function e(i,o,l,u,h,f,d){const g=o.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(i);n(g,d)}function t(i,o,l,u,h,f,d,g){const{actorFontSize:p,actorFontFamily:m,actorFontWeight:b}=g;let $=p&&p.replace?p.replace("px",""):p;const S=i.split(common.lineBreakRegex);for(let R=0;R<S.length;R++){const L=R*$-$*(S.length-1)/2,N=o.append("text").attr("x",l+h/2).attr("y",u).style("text-anchor","middle").style("font-size",p).style("font-weight",b).style("font-family",m);N.append("tspan").attr("x",l+h/2).attr("dy",L).text(S[R]),N.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(N,d)}}function r(i,o,l,u,h,f,d,g){const p=o.append("switch"),b=p.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,p,l,u,h,f,d,g),n(b,d)}function n(i,o){for(const l in o)o.hasOwnProperty(l)&&i.attr(l,o[l])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?e:t}}(),_drawMenuItemTextCandidateFunc=function(){function e(i,o,l,u,h,f,d){const g=o.append("text").attr("x",l).attr("y",u).style("text-anchor","start").text(i);n(g,d)}function t(i,o,l,u,h,f,d,g){const{actorFontSize:p,actorFontFamily:m,actorFontWeight:b}=g,$=i.split(common.lineBreakRegex);for(let S=0;S<$.length;S++){const R=S*p-p*($.length-1)/2,L=o.append("text").attr("x",l).attr("y",u).style("text-anchor","start").style("font-size",p).style("font-weight",b).style("font-family",m);L.append("tspan").attr("x",l).attr("dy",R).text($[S]),L.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(L,d)}}function r(i,o,l,u,h,f,d,g){const p=o.append("switch"),b=p.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,p,l,u,h,f,d,g),n(b,d)}function n(i,o){for(const l in o)o.hasOwnProperty(l)&&i.attr(l,o[l])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?e:t}}(),svgDraw$1={drawRect:drawRect$1,drawText:drawText$1,drawLabel:drawLabel$1,drawActor,drawPopup,drawImage,drawEmbeddedImage,anchorElement,drawActivation,drawLoop,drawBackgroundRect:drawBackgroundRect$1,insertArrowHead,insertArrowFilledHead,insertSequenceNumber,insertArrowCrossHead,insertDatabaseIcon,insertComputerIcon,insertClockIcon,getTextObj:getTextObj$1,getNoteRect:getNoteRect$1,popupMenu,popdownMenu,fixLifeLineHeights,sanitizeUrl:sanitizeUrl_1};let conf$4={};const bounds$1={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,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(e){this.actors.push(e)},addLoop:function(e){this.loops.push(e)},addMessage:function(e){this.messages.push(e)},addNote:function(e){this.notes.push(e)},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,setConf$4(getConfig$1())},updateVal:function(e,t,r,n){typeof e[t]>"u"?e[t]=r:e[t]=n(r,e[t])},updateBounds:function(e,t,r,n){const i=this;let o=0;function l(u){return function(f){o++;const d=i.sequenceItems.length-o+1;i.updateVal(f,"starty",t-d*conf$4.boxMargin,Math.min),i.updateVal(f,"stopy",n+d*conf$4.boxMargin,Math.max),i.updateVal(bounds$1.data,"startx",e-d*conf$4.boxMargin,Math.min),i.updateVal(bounds$1.data,"stopx",r+d*conf$4.boxMargin,Math.max),u!=="activation"&&(i.updateVal(f,"startx",e-d*conf$4.boxMargin,Math.min),i.updateVal(f,"stopx",r+d*conf$4.boxMargin,Math.max),i.updateVal(bounds$1.data,"starty",t-d*conf$4.boxMargin,Math.min),i.updateVal(bounds$1.data,"stopy",n+d*conf$4.boxMargin,Math.max))}}this.sequenceItems.forEach(l()),this.activations.forEach(l("activation"))},insert:function(e,t,r,n){const i=Math.min(e,r),o=Math.max(e,r),l=Math.min(t,n),u=Math.max(t,n);this.updateVal(bounds$1.data,"startx",i,Math.min),this.updateVal(bounds$1.data,"starty",l,Math.min),this.updateVal(bounds$1.data,"stopx",o,Math.max),this.updateVal(bounds$1.data,"stopy",u,Math.max),this.updateBounds(i,l,o,u)},newActivation:function(e,t,r){const n=r[e.from.actor],i=actorActivations(e.from.actor).length||0,o=n.x+n.width/2+(i-1)*conf$4.activationWidth/2;this.activations.push({startx:o,starty:this.verticalPos+2,stopx:o+conf$4.activationWidth,stopy:void 0,actor:e.from.actor,anchored:svgDraw$1.anchorElement(t)})},endActivation:function(e){const t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from.actor);return this.activations.splice(t,1)[0]},createLoop:function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},newLoop:function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:bounds$1.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},bumpVerticalPos:function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},drawNote$1=function(e,t){bounds$1.bumpVerticalPos(conf$4.boxMargin),t.height=conf$4.boxMargin,t.starty=bounds$1.getVerticalPos();const r=svgDraw$1.getNoteRect();r.x=t.startx,r.y=t.starty,r.width=t.width||conf$4.width,r.class="note";const n=e.append("g"),i=svgDraw$1.drawRect(n,r),o=svgDraw$1.getTextObj();o.x=t.startx,o.y=t.starty,o.width=r.width,o.dy="1em",o.text=t.message,o.class="noteText",o.fontFamily=conf$4.noteFontFamily,o.fontSize=conf$4.noteFontSize,o.fontWeight=conf$4.noteFontWeight,o.anchor=conf$4.noteAlign,o.textMargin=conf$4.noteMargin,o.valign="center";const l=drawText$1(n,o),u=Math.round(l.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,f)=>h+f));i.attr("height",u+2*conf$4.noteMargin),t.height+=u+2*conf$4.noteMargin,bounds$1.bumpVerticalPos(u+2*conf$4.noteMargin),t.stopy=t.starty+u+2*conf$4.noteMargin,t.stopx=t.startx+r.width,bounds$1.insert(t.startx,t.starty,t.stopx,t.stopy),bounds$1.models.addNote(t)},messageFont=e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),noteFont=e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),actorFont=e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),boundMessage=function(e,t){bounds$1.bumpVerticalPos(10);const{startx:r,stopx:n,message:i}=t,o=common.splitBreaks(i).length,l=utils.calculateTextDimensions(i,messageFont(conf$4)),u=l.height/o;t.height+=u,bounds$1.bumpVerticalPos(u);let h,f=l.height-10;const d=l.width;if(r===n){h=bounds$1.getVerticalPos()+f,conf$4.rightAngles||(f+=conf$4.boxMargin,h=bounds$1.getVerticalPos()+f),f+=30;const g=Math.max(d/2,conf$4.width/2);bounds$1.insert(r-g,bounds$1.getVerticalPos()-10+f,n+g,bounds$1.getVerticalPos()+30+f)}else f+=conf$4.boxMargin,h=bounds$1.getVerticalPos()+f,bounds$1.insert(r,h-10,n,h);return bounds$1.bumpVerticalPos(f),t.height+=f,t.stopy=t.starty+t.height,bounds$1.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),h},drawMessage=function(e,t,r,n){const{startx:i,stopx:o,starty:l,message:u,type:h,sequenceIndex:f,sequenceVisible:d}=t,g=utils.calculateTextDimensions(u,messageFont(conf$4)),p=svgDraw$1.getTextObj();p.x=i,p.y=l+10,p.width=o-i,p.class="messageText",p.dy="1em",p.text=u,p.fontFamily=conf$4.messageFontFamily,p.fontSize=conf$4.messageFontSize,p.fontWeight=conf$4.messageFontWeight,p.anchor=conf$4.messageAlign,p.valign="center",p.textMargin=conf$4.wrapPadding,p.tspan=!1,drawText$1(e,p);const m=g.width;let b;i===o?conf$4.rightAngles?b=e.append("path").attr("d",`M ${i},${r} H ${i+Math.max(conf$4.width/2,m/2)} V ${r+25} H ${i}`):b=e.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(b=e.append("line"),b.attr("x1",i),b.attr("y1",r),b.attr("x2",o),b.attr("y2",r)),h===n.db.LINETYPE.DOTTED||h===n.db.LINETYPE.DOTTED_CROSS||h===n.db.LINETYPE.DOTTED_POINT||h===n.db.LINETYPE.DOTTED_OPEN?(b.style("stroke-dasharray","3, 3"),b.attr("class","messageLine1")):b.attr("class","messageLine0");let $="";conf$4.arrowMarkerAbsolute&&($=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,$=$.replace(/\(/g,"\\("),$=$.replace(/\)/g,"\\)")),b.attr("stroke-width",2),b.attr("stroke","none"),b.style("fill","none"),(h===n.db.LINETYPE.SOLID||h===n.db.LINETYPE.DOTTED)&&b.attr("marker-end","url("+$+"#arrowhead)"),(h===n.db.LINETYPE.SOLID_POINT||h===n.db.LINETYPE.DOTTED_POINT)&&b.attr("marker-end","url("+$+"#filled-head)"),(h===n.db.LINETYPE.SOLID_CROSS||h===n.db.LINETYPE.DOTTED_CROSS)&&b.attr("marker-end","url("+$+"#crosshead)"),(d||conf$4.showSequenceNumbers)&&(b.attr("marker-start","url("+$+"#sequencenumber)"),e.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(f))},drawActors=function(e,t,r,n,i,o){if(i.hideUnusedParticipants===!0){const f=new Set;o.forEach(d=>{f.add(d.from),f.add(d.to)}),r=r.filter(d=>f.has(d))}let l=0,u=0,h=0;for(let f=0;f<r.length;f++){const d=t[r[f]];d.width=d.width||conf$4.width,d.height=Math.max(d.height||conf$4.height,conf$4.height),d.margin=d.margin||conf$4.actorMargin,d.x=l+u,d.y=n;const g=svgDraw$1.drawActor(e,d,conf$4);h=Math.max(h,g),bounds$1.insert(d.x,n,d.x+d.width,d.height),l+=d.width,u+=d.margin,bounds$1.models.addActor(d)}bounds$1.bumpVerticalPos(h)},drawActorsPopup=function(e,t,r,n){let i=0,o=0;for(let l=0;l<r.length;l++){const u=t[r[l]],h=getRequiredPopupWidth(u),f=svgDraw$1.drawPopup(e,u,h,conf$4,conf$4.forceMenus,n);f.height>i&&(i=f.height),f.width+u.x>o&&(o=f.width+u.x)}return{maxHeight:i,maxWidth:o}},setConf$4=function(e){assignWithDepth(conf$4,e),e.fontFamily&&(conf$4.actorFontFamily=conf$4.noteFontFamily=conf$4.messageFontFamily=e.fontFamily),e.fontSize&&(conf$4.actorFontSize=conf$4.noteFontSize=conf$4.messageFontSize=e.fontSize),e.fontWeight&&(conf$4.actorFontWeight=conf$4.noteFontWeight=conf$4.messageFontWeight=e.fontWeight)},actorActivations=function(e){return bounds$1.activations.filter(function(t){return t.actor===e})},activationBounds=function(e,t){const r=t[e],n=actorActivations(e),i=n.reduce(function(l,u){return Math.min(l,u.startx)},r.x+r.width/2),o=n.reduce(function(l,u){return Math.max(l,u.stopx)},r.x+r.width/2);return[i,o]};function adjustLoopHeightForWrap(e,t,r,n,i){bounds$1.bumpVerticalPos(r);let o=n;if(t.id&&t.message&&e[t.id]){const l=e[t.id].width,u=messageFont(conf$4);t.message=utils.wrapLabel(`[${t.message}]`,l-2*conf$4.wrapPadding,u),t.width=l,t.wrap=!0;const h=utils.calculateTextDimensions(t.message,u),f=Math.max(h.height,conf$4.labelBoxHeight);o=n+f,log$1.debug(`${f} - ${t.message}`)}i(t),bounds$1.bumpVerticalPos(o)}const draw$4=function(e,t,r,n){const{securityLevel:i,sequence:o}=getConfig$1();conf$4=o;let l;i==="sandbox"&&(l=select$1("#i"+t));const u=select$1(i==="sandbox"?l.nodes()[0].contentDocument.body:"body"),h=i==="sandbox"?l.nodes()[0].contentDocument:document;bounds$1.init(),log$1.debug(n.db);const f=i==="sandbox"?u.select(`[id="${t}"]`):select$1(`[id="${t}"]`),d=n.db.getActors(),g=n.db.getActorKeys(),p=n.db.getMessages(),m=n.db.getDiagramTitle(),b=getMaxMessageWidthPerActor(d,p,n);conf$4.height=calculateActorMargins(d,b),svgDraw$1.insertComputerIcon(f),svgDraw$1.insertDatabaseIcon(f),svgDraw$1.insertClockIcon(f),drawActors(f,d,g,0,conf$4,p);const $=calculateLoopBounds(p,d,b,n);svgDraw$1.insertArrowHead(f),svgDraw$1.insertArrowCrossHead(f),svgDraw$1.insertArrowFilledHead(f),svgDraw$1.insertSequenceNumber(f);function S(U,I){const ae=bounds$1.endActivation(U);ae.starty+18>I&&(ae.starty=I-6,I+=12),svgDraw$1.drawActivation(f,ae,I,conf$4,actorActivations(U.from.actor).length),bounds$1.insert(ae.startx,I-10,ae.stopx,I)}let R=1,L=1;const N=[];p.forEach(function(U){let I,ae,Q;switch(U.type){case n.db.LINETYPE.NOTE:ae=U.noteModel,drawNote$1(f,ae);break;case n.db.LINETYPE.ACTIVE_START:bounds$1.newActivation(U,f,d);break;case n.db.LINETYPE.ACTIVE_END:S(U,bounds$1.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:adjustLoopHeightForWrap($,U,conf$4.boxMargin,conf$4.boxMargin+conf$4.boxTextMargin,ue=>bounds$1.newLoop(ue));break;case n.db.LINETYPE.LOOP_END:I=bounds$1.endLoop(),svgDraw$1.drawLoop(f,I,"loop",conf$4),bounds$1.bumpVerticalPos(I.stopy-bounds$1.getVerticalPos()),bounds$1.models.addLoop(I);break;case n.db.LINETYPE.RECT_START:adjustLoopHeightForWrap($,U,conf$4.boxMargin,conf$4.boxMargin,ue=>bounds$1.newLoop(void 0,ue.message));break;case n.db.LINETYPE.RECT_END:I=bounds$1.endLoop(),svgDraw$1.drawBackgroundRect(f,I),bounds$1.models.addLoop(I),bounds$1.bumpVerticalPos(I.stopy-bounds$1.getVerticalPos());break;case n.db.LINETYPE.OPT_START:adjustLoopHeightForWrap($,U,conf$4.boxMargin,conf$4.boxMargin+conf$4.boxTextMargin,ue=>bounds$1.newLoop(ue));break;case n.db.LINETYPE.OPT_END:I=bounds$1.endLoop(),svgDraw$1.drawLoop(f,I,"opt",conf$4),bounds$1.bumpVerticalPos(I.stopy-bounds$1.getVerticalPos()),bounds$1.models.addLoop(I);break;case n.db.LINETYPE.ALT_START:adjustLoopHeightForWrap($,U,conf$4.boxMargin,conf$4.boxMargin+conf$4.boxTextMargin,ue=>bounds$1.newLoop(ue));break;case n.db.LINETYPE.ALT_ELSE:adjustLoopHeightForWrap($,U,conf$4.boxMargin+conf$4.boxTextMargin,conf$4.boxMargin,ue=>bounds$1.addSectionToLoop(ue));break;case n.db.LINETYPE.ALT_END:I=bounds$1.endLoop(),svgDraw$1.drawLoop(f,I,"alt",conf$4),bounds$1.bumpVerticalPos(I.stopy-bounds$1.getVerticalPos()),bounds$1.models.addLoop(I);break;case n.db.LINETYPE.PAR_START:adjustLoopHeightForWrap($,U,conf$4.boxMargin,conf$4.boxMargin+conf$4.boxTextMargin,ue=>bounds$1.newLoop(ue));break;case n.db.LINETYPE.PAR_AND:adjustLoopHeightForWrap($,U,conf$4.boxMargin+conf$4.boxTextMargin,conf$4.boxMargin,ue=>bounds$1.addSectionToLoop(ue));break;case n.db.LINETYPE.PAR_END:I=bounds$1.endLoop(),svgDraw$1.drawLoop(f,I,"par",conf$4),bounds$1.bumpVerticalPos(I.stopy-bounds$1.getVerticalPos()),bounds$1.models.addLoop(I);break;case n.db.LINETYPE.AUTONUMBER:R=U.message.start||R,L=U.message.step||L,U.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:adjustLoopHeightForWrap($,U,conf$4.boxMargin,conf$4.boxMargin+conf$4.boxTextMargin,ue=>bounds$1.newLoop(ue));break;case n.db.LINETYPE.CRITICAL_OPTION:adjustLoopHeightForWrap($,U,conf$4.boxMargin+conf$4.boxTextMargin,conf$4.boxMargin,ue=>bounds$1.addSectionToLoop(ue));break;case n.db.LINETYPE.CRITICAL_END:I=bounds$1.endLoop(),svgDraw$1.drawLoop(f,I,"critical",conf$4),bounds$1.bumpVerticalPos(I.stopy-bounds$1.getVerticalPos()),bounds$1.models.addLoop(I);break;case n.db.LINETYPE.BREAK_START:adjustLoopHeightForWrap($,U,conf$4.boxMargin,conf$4.boxMargin+conf$4.boxTextMargin,ue=>bounds$1.newLoop(ue));break;case n.db.LINETYPE.BREAK_END:I=bounds$1.endLoop(),svgDraw$1.drawLoop(f,I,"break",conf$4),bounds$1.bumpVerticalPos(I.stopy-bounds$1.getVerticalPos()),bounds$1.models.addLoop(I);break;default:try{Q=U.msgModel,Q.starty=bounds$1.getVerticalPos(),Q.sequenceIndex=R,Q.sequenceVisible=n.db.showSequenceNumbers();const ue=boundMessage(f,Q);N.push({messageModel:Q,lineStarty:ue}),bounds$1.models.addMessage(Q)}catch(ue){log$1.error("error while drawing message",ue)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(U.type)&&(R=R+L)}),N.forEach(U=>drawMessage(f,U.messageModel,U.lineStarty,n)),conf$4.mirrorActors&&(bounds$1.bumpVerticalPos(conf$4.boxMargin*2),drawActors(f,d,g,bounds$1.getVerticalPos(),conf$4,p),bounds$1.bumpVerticalPos(conf$4.boxMargin),fixLifeLineHeights(f,bounds$1.getVerticalPos()));const F=drawActorsPopup(f,d,g,h),{bounds:H}=bounds$1.getBounds();log$1.debug("For line height fix Querying: #"+t+" .actor-line"),selectAll$1("#"+t+" .actor-line").attr("y2",H.stopy);let P=H.stopy-H.starty;P<F.maxHeight&&(P=F.maxHeight);let V=P+2*conf$4.diagramMarginY;conf$4.mirrorActors&&(V=V-conf$4.boxMargin+conf$4.bottomMarginAdj);let z=H.stopx-H.startx;z<F.maxWidth&&(z=F.maxWidth);const W=z+2*conf$4.diagramMarginX;m&&f.append("text").text(m).attr("x",(H.stopx-H.startx)/2-2*conf$4.diagramMarginX).attr("y",-25),configureSvgSize(f,V,W,conf$4.useMaxWidth);const T=m?40:0;f.attr("viewBox",H.startx-conf$4.diagramMarginX+" -"+(conf$4.diagramMarginY+T)+" "+W+" "+(V+T)),addSVGAccessibilityFields(n.db,f,t),log$1.debug("models:",bounds$1.models)},getMaxMessageWidthPerActor=function(e,t,r){const n={};return t.forEach(function(i){if(e[i.to]&&e[i.from]){const o=e[i.to];if(i.placement===r.db.PLACEMENT.LEFTOF&&!o.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!o.nextActor)return;const l=i.placement!==void 0,u=!l,h=l?noteFont(conf$4):messageFont(conf$4),f=i.wrap?utils.wrapLabel(i.message,conf$4.width-2*conf$4.wrapPadding,h):i.message,g=utils.calculateTextDimensions(f,h).width+2*conf$4.wrapPadding;u&&i.from===o.nextActor?n[i.to]=Math.max(n[i.to]||0,g):u&&i.from===o.prevActor?n[i.from]=Math.max(n[i.from]||0,g):u&&i.from===i.to?(n[i.from]=Math.max(n[i.from]||0,g/2),n[i.to]=Math.max(n[i.to]||0,g/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=Math.max(n[i.from]||0,g):i.placement===r.db.PLACEMENT.LEFTOF?n[o.prevActor]=Math.max(n[o.prevActor]||0,g):i.placement===r.db.PLACEMENT.OVER&&(o.prevActor&&(n[o.prevActor]=Math.max(n[o.prevActor]||0,g/2)),o.nextActor&&(n[i.from]=Math.max(n[i.from]||0,g/2)))}}),log$1.debug("maxMessageWidthPerActor:",n),n},getRequiredPopupWidth=function(e){let t=0;const r=actorFont(conf$4);for(const n in e.links){const o=utils.calculateTextDimensions(n,r).width+2*conf$4.wrapPadding+2*conf$4.boxMargin;t<o&&(t=o)}return t},calculateActorMargins=function(e,t){let r=0;Object.keys(e).forEach(n=>{const i=e[n];i.wrap&&(i.description=utils.wrapLabel(i.description,conf$4.width-2*conf$4.wrapPadding,actorFont(conf$4)));const o=utils.calculateTextDimensions(i.description,actorFont(conf$4));i.width=i.wrap?conf$4.width:Math.max(conf$4.width,o.width+2*conf$4.wrapPadding),i.height=i.wrap?Math.max(o.height,conf$4.height):conf$4.height,r=Math.max(r,i.height)});for(const n in t){const i=e[n];if(!i)continue;const o=e[i.nextActor];if(!o)continue;const u=t[n]+conf$4.actorMargin-i.width/2-o.width/2;i.margin=Math.max(u,conf$4.actorMargin)}return Math.max(r,conf$4.height)},buildNoteModel=function(e,t,r){const n=t[e.from].x,i=t[e.to].x,o=e.wrap&&e.message;let l=utils.calculateTextDimensions(o?utils.wrapLabel(e.message,conf$4.width,noteFont(conf$4)):e.message,noteFont(conf$4));const u={width:o?conf$4.width:Math.max(conf$4.width,l.width+2*conf$4.noteMargin),height:0,startx:t[e.from].x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===r.db.PLACEMENT.RIGHTOF?(u.width=o?Math.max(conf$4.width,l.width):Math.max(t[e.from].width/2+t[e.to].width/2,l.width+2*conf$4.noteMargin),u.startx=n+(t[e.from].width+conf$4.actorMargin)/2):e.placement===r.db.PLACEMENT.LEFTOF?(u.width=Math.max(o?conf$4.width:t[e.from].width/2+t[e.to].width/2,l.width+2*conf$4.noteMargin),u.startx=n-u.width+(t[e.from].width-conf$4.actorMargin)/2):e.to===e.from?(l=utils.calculateTextDimensions(o?utils.wrapLabel(e.message,Math.max(conf$4.width,t[e.from].width),noteFont(conf$4)):e.message,noteFont(conf$4)),u.width=o?Math.max(conf$4.width,t[e.from].width):Math.max(t[e.from].width,conf$4.width,l.width+2*conf$4.noteMargin),u.startx=n+(t[e.from].width-u.width)/2):(u.width=Math.abs(n+t[e.from].width/2-(i+t[e.to].width/2))+conf$4.actorMargin,u.startx=n<i?n+t[e.from].width/2-conf$4.actorMargin/2:i+t[e.to].width/2-conf$4.actorMargin/2),o&&(u.message=utils.wrapLabel(e.message,u.width-2*conf$4.wrapPadding,noteFont(conf$4))),log$1.debug(`NM:[${u.startx},${u.stopx},${u.starty},${u.stopy}:${u.width},${u.height}=${e.message}]`),u},buildMessageModel=function(e,t,r){let n=!1;if([r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(e.type)&&(n=!0),!n)return{};const i=activationBounds(e.from,t),o=activationBounds(e.to,t),l=i[0]<=o[0]?1:0,u=i[0]<o[0]?0:1,h=i.concat(o),f=Math.abs(o[u]-i[l]);e.wrap&&e.message&&(e.message=utils.wrapLabel(e.message,Math.max(f+2*conf$4.wrapPadding,conf$4.width),messageFont(conf$4)));const d=utils.calculateTextDimensions(e.message,messageFont(conf$4));return{width:Math.max(e.wrap?0:d.width+2*conf$4.wrapPadding,f+2*conf$4.wrapPadding,conf$4.width),height:0,startx:i[l],stopx:o[u],starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,h),toBounds:Math.max.apply(null,h)}},calculateLoopBounds=function(e,t,r,n){const i={},o=[];let l,u,h;return e.forEach(function(f){switch(f.id=utils.random({length:10}),f.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:o.push({id:f.id,msg:f.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:f.message&&(l=o.pop(),i[l.id]=l,i[f.id]=l,o.push(l));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:l=o.pop(),i[l.id]=l;break;case n.db.LINETYPE.ACTIVE_START:{const g=t[f.from?f.from.actor:f.to.actor],p=actorActivations(f.from?f.from.actor:f.to.actor).length,m=g.x+g.width/2+(p-1)*conf$4.activationWidth/2,b={startx:m,stopx:m+conf$4.activationWidth,actor:f.from.actor,enabled:!0};bounds$1.activations.push(b)}break;case n.db.LINETYPE.ACTIVE_END:{const g=bounds$1.activations.map(p=>p.actor).lastIndexOf(f.from.actor);delete bounds$1.activations.splice(g,1)[0]}break}f.placement!==void 0?(u=buildNoteModel(f,t,n),f.noteModel=u,o.forEach(g=>{l=g,l.from=Math.min(l.from,u.startx),l.to=Math.max(l.to,u.startx+u.width),l.width=Math.max(l.width,Math.abs(l.from-l.to))-conf$4.labelBoxWidth})):(h=buildMessageModel(f,t,n),f.msgModel=h,h.startx&&h.stopx&&o.length>0&&o.forEach(g=>{if(l=g,h.startx===h.stopx){const p=t[f.from],m=t[f.to];l.from=Math.min(p.x-h.width/2,p.x-p.width/2,l.from),l.to=Math.max(m.x+h.width/2,m.x+p.width/2,l.to),l.width=Math.max(l.width,Math.abs(l.to-l.from))-conf$4.labelBoxWidth}else l.from=Math.min(h.startx,l.from),l.to=Math.max(h.stopx,l.to),l.width=Math.max(l.width,h.width)-conf$4.labelBoxWidth}))}),bounds$1.activations=[],log$1.debug("Loop type widths:",i),i},sequenceRenderer={bounds:bounds$1,drawActors,drawActorsPopup,setConf:setConf$4,draw:draw$4};var parser$1=function(){var e=function(ke,de,ce,he){for(ce=ce||{},he=ke.length;he--;ce[ke[he]]=de);return ce},t=[1,2],r=[1,3],n=[1,5],i=[1,7],o=[2,5],l=[1,15],u=[1,17],h=[1,19],f=[1,20],d=[1,21],g=[1,22],p=[1,33],m=[1,23],b=[1,24],$=[1,25],S=[1,26],R=[1,27],L=[1,30],N=[1,31],F=[1,32],H=[1,35],G=[1,36],P=[1,37],V=[1,38],z=[1,34],W=[1,41],T=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],U=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],I=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],ae=[4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],Q={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,"-->":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,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,openDirective:36,typeDirective:37,closeDirective:38,":":39,argDirective:40,direction_tb:41,direction_bt:42,direction_rl:43,direction_lr:44,eol:45,";":46,EDGE_STATE:47,left_of:48,right_of:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"-->",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",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",39:":",41:"direction_tb",42:"direction_bt",43:"direction_rl",44:"direction_lr",46:";",47:"EDGE_STATE",48:"left_of",49:"right_of",50:"open_directive",51:"type_directive",52:"arg_directive",53:"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],[10,2],[10,2],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[45,1],[45,1],[11,1],[11,1],[28,1],[28,1],[36,1],[37,1],[40,1],[38,1]],performAction:function(de,ce,he,Se,ve,me,Ce){var xe=me.length-1;switch(ve){case 4:return Se.setRootDoc(me[xe]),me[xe];case 5:this.$=[];break;case 6:me[xe]!="nl"&&(me[xe-1].push(me[xe]),this.$=me[xe-1]);break;case 7:case 8:this.$=me[xe];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:me[xe],type:"default",description:""};break;case 11:this.$={stmt:"state",id:me[xe-1],type:"default",description:Se.trimColon(me[xe])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:me[xe-2],type:"default",description:""},state2:{stmt:"state",id:me[xe],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:me[xe-3],type:"default",description:""},state2:{stmt:"state",id:me[xe-1],type:"default",description:""},description:me[xe].substr(1).trim()};break;case 17:this.$={stmt:"state",id:me[xe-3],type:"default",description:"",doc:me[xe-1]};break;case 18:var Ne=me[xe],pe=me[xe-2].trim();if(me[xe].match(":")){var J=me[xe].split(":");Ne=J[0],pe=[pe,J[1]]}this.$={stmt:"state",id:Ne,type:"default",description:pe};break;case 19:this.$={stmt:"state",id:me[xe-3],type:"default",description:me[xe-5],doc:me[xe-1]};break;case 20:this.$={stmt:"state",id:me[xe],type:"fork"};break;case 21:this.$={stmt:"state",id:me[xe],type:"join"};break;case 22:this.$={stmt:"state",id:me[xe],type:"choice"};break;case 23:this.$={stmt:"state",id:Se.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:me[xe-1].trim(),note:{position:me[xe-2].trim(),text:me[xe].trim()}};break;case 28:this.$=me[xe].trim(),Se.setAccTitle(this.$);break;case 29:case 30:this.$=me[xe].trim(),Se.setAccDescription(this.$);break;case 33:Se.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 34:Se.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 35:Se.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 36:Se.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 39:case 40:this.$=me[xe];break;case 43:Se.parseDirective("%%{","open_directive");break;case 44:Se.parseDirective(me[xe],"type_directive");break;case 45:me[xe]=me[xe].trim().replace(/'/g,'"'),Se.parseDirective(me[xe],"arg_directive");break;case 46:Se.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:t,5:r,6:4,7:n,36:6,50:i},{1:[3]},{3:8,4:t,5:r,6:4,7:n,36:6,50:i},{3:9,4:t,5:r,6:4,7:n,36:6,50:i},{3:10,4:t,5:r,6:4,7:n,36:6,50:i},e([1,4,5,14,15,17,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],o,{8:11}),{37:12,51:[1,13]},{51:[2,43]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:l,5:u,6:28,9:14,10:16,11:18,14:h,15:f,17:d,20:g,22:p,23:m,24:b,25:$,26:S,27:R,30:29,31:L,33:N,35:F,36:6,41:H,42:G,43:P,44:V,47:z,50:i},{38:39,39:[1,40],53:W},e([39,53],[2,44]),e(T,[2,6]),{6:28,10:42,11:18,14:h,15:f,17:d,20:g,22:p,23:m,24:b,25:$,26:S,27:R,30:29,31:L,33:N,35:F,36:6,41:H,42:G,43:P,44:V,47:z,50:i},e(T,[2,8]),e(T,[2,9]),e(T,[2,10],{12:[1,43],13:[1,44]}),e(T,[2,14]),{16:[1,45]},e(T,[2,16],{18:[1,46]}),{21:[1,47]},e(T,[2,20]),e(T,[2,21]),e(T,[2,22]),e(T,[2,23]),{28:48,29:[1,49],48:[1,50],49:[1,51]},e(T,[2,26]),e(T,[2,27]),{32:[1,52]},{34:[1,53]},e(T,[2,30]),e(U,[2,39]),e(U,[2,40]),e(T,[2,33]),e(T,[2,34]),e(T,[2,35]),e(T,[2,36]),e(I,[2,31]),{40:54,52:[1,55]},e(I,[2,46]),e(T,[2,7]),e(T,[2,11]),{11:56,22:p,47:z},e(T,[2,15]),e(ae,o,{8:57}),{22:[1,58]},{22:[1,59]},{21:[1,60]},{22:[2,41]},{22:[2,42]},e(T,[2,28]),e(T,[2,29]),{38:61,53:W},{53:[2,45]},e(T,[2,12],{12:[1,62]}),{4:l,5:u,6:28,9:14,10:16,11:18,14:h,15:f,17:d,19:[1,63],20:g,22:p,23:m,24:b,25:$,26:S,27:R,30:29,31:L,33:N,35:F,36:6,41:H,42:G,43:P,44:V,47:z,50:i},e(T,[2,18],{18:[1,64]}),{29:[1,65]},{22:[1,66]},e(I,[2,32]),e(T,[2,13]),e(T,[2,17]),e(ae,o,{8:67}),e(T,[2,24]),e(T,[2,25]),{4:l,5:u,6:28,9:14,10:16,11:18,14:h,15:f,17:d,19:[1,68],20:g,22:p,23:m,24:b,25:$,26:S,27:R,30:29,31:L,33:N,35:F,36:6,41:H,42:G,43:P,44:V,47:z,50:i},e(T,[2,19])],defaultActions:{7:[2,43],8:[2,1],9:[2,2],10:[2,3],50:[2,41],51:[2,42],55:[2,45]},parseError:function(de,ce){if(ce.recoverable)this.trace(de);else{var he=new Error(de);throw he.hash=ce,he}},parse:function(de){var ce=this,he=[0],Se=[],ve=[null],me=[],Ce=this.table,xe="",Ne=0,pe=0,J=2,oe=1,ee=me.slice.call(arguments,1),Z=Object.create(this.lexer),ie={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(ie.yy[se]=this.yy[se]);Z.setInput(de,ie.yy),ie.yy.lexer=Z,ie.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var te=Z.yylloc;me.push(te);var fe=Z.options&&Z.options.ranges;typeof ie.yy.parseError=="function"?this.parseError=ie.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function we(){var Ge;return Ge=Se.pop()||Z.lex()||oe,typeof Ge!="number"&&(Ge instanceof Array&&(Se=Ge,Ge=Se.pop()),Ge=ce.symbols_[Ge]||Ge),Ge}for(var Ye,He,je,Pe,Ee={},Ie,Le,Be,Te;;){if(He=he[he.length-1],this.defaultActions[He]?je=this.defaultActions[He]:((Ye===null||typeof Ye>"u")&&(Ye=we()),je=Ce[He]&&Ce[He][Ye]),typeof je>"u"||!je.length||!je[0]){var dt="";Te=[];for(Ie in Ce[He])this.terminals_[Ie]&&Ie>J&&Te.push("'"+this.terminals_[Ie]+"'");Z.showPosition?dt="Parse error on line "+(Ne+1)+`:
|
|
`+Z.showPosition()+`
|
|
Expecting `+Te.join(", ")+", got '"+(this.terminals_[Ye]||Ye)+"'":dt="Parse error on line "+(Ne+1)+": Unexpected "+(Ye==oe?"end of input":"'"+(this.terminals_[Ye]||Ye)+"'"),this.parseError(dt,{text:Z.match,token:this.terminals_[Ye]||Ye,line:Z.yylineno,loc:te,expected:Te})}if(je[0]instanceof Array&&je.length>1)throw new Error("Parse Error: multiple actions possible at state: "+He+", token: "+Ye);switch(je[0]){case 1:he.push(Ye),ve.push(Z.yytext),me.push(Z.yylloc),he.push(je[1]),Ye=null,pe=Z.yyleng,xe=Z.yytext,Ne=Z.yylineno,te=Z.yylloc;break;case 2:if(Le=this.productions_[je[1]][1],Ee.$=ve[ve.length-Le],Ee._$={first_line:me[me.length-(Le||1)].first_line,last_line:me[me.length-1].last_line,first_column:me[me.length-(Le||1)].first_column,last_column:me[me.length-1].last_column},fe&&(Ee._$.range=[me[me.length-(Le||1)].range[0],me[me.length-1].range[1]]),Pe=this.performAction.apply(Ee,[xe,pe,Ne,ie.yy,je[1],ve,me].concat(ee)),typeof Pe<"u")return Pe;Le&&(he=he.slice(0,-1*Le*2),ve=ve.slice(0,-1*Le),me=me.slice(0,-1*Le)),he.push(this.productions_[je[1]][0]),ve.push(Ee.$),me.push(Ee._$),Be=Ce[he[he.length-2]][he[he.length-1]],he.push(Be);break;case 3:return!0}}return!0}},ue=function(){var ke={EOF:1,parseError:function(ce,he){if(this.yy.parser)this.yy.parser.parseError(ce,he);else throw new Error(ce)},setInput:function(de,ce){return this.yy=ce||this.yy||{},this._input=de,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 de=this._input[0];this.yytext+=de,this.yyleng++,this.offset++,this.match+=de,this.matched+=de;var ce=de.match(/(?:\r\n?|\n).*/g);return ce?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),de},unput:function(de){var ce=de.length,he=de.split(/(?:\r\n?|\n)/g);this._input=de+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ce),this.offset-=ce;var Se=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),he.length-1&&(this.yylineno-=he.length-1);var ve=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:he?(he.length===Se.length?this.yylloc.first_column:0)+Se[Se.length-he.length].length-he[0].length:this.yylloc.first_column-ce},this.options.ranges&&(this.yylloc.range=[ve[0],ve[0]+this.yyleng-ce]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(de){this.unput(this.match.slice(de))},pastInput:function(){var de=this.matched.substr(0,this.matched.length-this.match.length);return(de.length>20?"...":"")+de.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var de=this.match;return de.length<20&&(de+=this._input.substr(0,20-de.length)),(de.substr(0,20)+(de.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var de=this.pastInput(),ce=new Array(de.length+1).join("-");return de+this.upcomingInput()+`
|
|
`+ce+"^"},test_match:function(de,ce){var he,Se,ve;if(this.options.backtrack_lexer&&(ve={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&&(ve.yylloc.range=this.yylloc.range.slice(0))),Se=de[0].match(/(?:\r\n?|\n).*/g),Se&&(this.yylineno+=Se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Se?Se[Se.length-1].length-Se[Se.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+de[0].length},this.yytext+=de[0],this.match+=de[0],this.matches=de,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(de[0].length),this.matched+=de[0],he=this.performAction.call(this,this.yy,this,ce,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),he)return he;if(this._backtrack){for(var me in ve)this[me]=ve[me];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var de,ce,he,Se;this._more||(this.yytext="",this.match="");for(var ve=this._currentRules(),me=0;me<ve.length;me++)if(he=this._input.match(this.rules[ve[me]]),he&&(!ce||he[0].length>ce[0].length)){if(ce=he,Se=me,this.options.backtrack_lexer){if(de=this.test_match(he,ve[me]),de!==!1)return de;if(this._backtrack){ce=!1;continue}else return!1}else if(!this.options.flex)break}return ce?(de=this.test_match(ce,ve[Se]),de!==!1?de:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ce=this.next();return ce||this.lex()},begin:function(ce){this.conditionStack.push(ce)},popState:function(){var ce=this.conditionStack.length-1;return ce>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(ce){return ce=this.conditionStack.length-1-Math.abs(ce||0),ce>=0?this.conditionStack[ce]:"INITIAL"},pushState:function(ce){this.begin(ce)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(ce,he,Se,ve){switch(Se){case 0:return 41;case 1:return 42;case 2:return 43;case 3:return 44;case 4:return this.begin("open_directive"),50;case 5:return this.begin("type_directive"),51;case 6:return this.popState(),this.begin("arg_directive"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:break;case 10:break;case 11:return 5;case 12:break;case 13:break;case 14:break;case 15:break;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:this.popState();break;case 19:return this.begin("acc_title"),31;case 20:return this.popState(),"acc_title_value";case 21:return this.begin("acc_descr"),33;case 22:return this.popState(),"acc_descr_value";case 23:this.begin("acc_descr_multiline");break;case 24:this.popState();break;case 25:return"acc_descr_multiline_value";case 26:this.pushState("STATE");break;case 27:return this.popState(),he.yytext=he.yytext.slice(0,-8).trim(),23;case 28:return this.popState(),he.yytext=he.yytext.slice(0,-8).trim(),24;case 29:return this.popState(),he.yytext=he.yytext.slice(0,-10).trim(),25;case 30:return this.popState(),he.yytext=he.yytext.slice(0,-8).trim(),23;case 31:return this.popState(),he.yytext=he.yytext.slice(0,-8).trim(),24;case 32:return this.popState(),he.yytext=he.yytext.slice(0,-10).trim(),25;case 33:return 41;case 34:return 42;case 35:return 43;case 36:return 44;case 37:this.begin("STATE_STRING");break;case 38:return this.popState(),this.pushState("STATE_ID"),"AS";case 39:return this.popState(),"ID";case 40:this.popState();break;case 41:return"STATE_DESCR";case 42:return 17;case 43:this.popState();break;case 44:return this.popState(),this.pushState("struct"),18;case 45:return this.popState(),19;case 46:break;case 47:return this.begin("NOTE"),27;case 48:return this.popState(),this.pushState("NOTE_ID"),48;case 49:return this.popState(),this.pushState("NOTE_ID"),49;case 50:this.popState(),this.pushState("FLOATING_NOTE");break;case 51:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 52:break;case 53:return"NOTE_TEXT";case 54:return this.popState(),"ID";case 55:return this.popState(),this.pushState("NOTE_TEXT"),22;case 56:return this.popState(),he.yytext=he.yytext.substr(2).trim(),29;case 57:return this.popState(),he.yytext=he.yytext.slice(0,-8).trim(),29;case 58:return 7;case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return he.yytext=he.yytext.trim(),12;case 64:return 13;case 65:return 26;case 66:return 5;case 67: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,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/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,26,33,34,35,36,45,46,47,61,62,63,64,65],inclusive:!1},FLOATING_NOTE_ID:{rules:[54],inclusive:!1},FLOATING_NOTE:{rules:[51,52,53],inclusive:!1},NOTE_TEXT:{rules:[56,57],inclusive:!1},NOTE_ID:{rules:[55],inclusive:!1},NOTE:{rules:[48,49,50],inclusive:!1},acc_descr_multiline:{rules:[24,25],inclusive:!1},acc_descr:{rules:[22],inclusive:!1},acc_title:{rules:[20],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[39],inclusive:!1},STATE_STRING:{rules:[40,41],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,27,28,29,30,31,32,37,38,42,43,44],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,21,23,26,44,47,58,59,60,61,62,63,64,66,67],inclusive:!0}}};return ke}();Q.lexer=ue;function _e(){this.yy={}}return _e.prototype=Q,Q.Parser=_e,new _e}();parser$1.parser=parser$1;const stateDetector=(e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:e.match(/^\s*stateDiagram/)!==null},stateDetectorV2=(e,t)=>{var r;return!!(e.match(/^\s*stateDiagram-v2/)!==null||e.match(/^\s*stateDiagram/)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},clone=e=>JSON.parse(JSON.stringify(e));let rootDoc=[];const parseDirective$2=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},setRootDoc=e=>{log$1.info("Setting root doc",e),rootDoc=e},getRootDoc=()=>rootDoc,docTranslator=(e,t,r)=>{if(t.stmt==="relation")docTranslator(e,t.state1,!0),docTranslator(e,t.state2,!1);else if(t.stmt==="state"&&t.id==="[*]"&&(t.id=r?e.id+"_start":e.id+"_end",t.start=r),t.doc){const n=[];let i=0,o=[];for(i=0;i<t.doc.length;i++)if(t.doc[i].type==="divider"){const l=clone(t.doc[i]);l.doc=clone(o),n.push(l),o=[]}else o.push(t.doc[i]);if(n.length>0&&o.length>0){const l={stmt:"state",id:generateId$1(),type:"divider",doc:clone(o)};n.push(clone(l)),t.doc=n}t.doc.forEach(l=>docTranslator(t,l,!0))}},getRootDocV2=()=>(docTranslator({id:"root"},{id:"root",doc:rootDoc},!0),{id:"root",doc:rootDoc}),extract=e=>{let t;e.doc?t=e.doc:t=e,log$1.info(t),clear$1(!0),log$1.info("Extract",t),t.forEach(r=>{r.stmt==="state"&&addState(r.id,r.type,r.doc,r.description,r.note),r.stmt==="relation"&&addRelation(r.state1.id,r.state2.id,r.description)})},newDoc=()=>({relations:[],states:{},documents:{}});let documents={root:newDoc()},currentDocument=documents.root,startCnt=0;const addState=function(e,t,r,n,i){typeof currentDocument.states[e]>"u"?currentDocument.states[e]={id:e,descriptions:[],type:t,doc:r,note:i}:(currentDocument.states[e].doc||(currentDocument.states[e].doc=r),currentDocument.states[e].type||(currentDocument.states[e].type=t)),n&&(log$1.info("Adding state ",e,n),typeof n=="string"&&addDescription(e,n.trim()),typeof n=="object"&&n.forEach(o=>addDescription(e,o.trim()))),i&&(currentDocument.states[e].note=i,currentDocument.states[e].note.text=common.sanitizeText(currentDocument.states[e].note.text,getConfig$1()))},clear$1=function(e){documents={root:newDoc()},currentDocument=documents.root,currentDocument=documents.root,startCnt=0,classes=[],e||clear$g()},getState=function(e){return currentDocument.states[e]},getStates=function(){return currentDocument.states},logDocuments=function(){log$1.info("Documents = ",documents)},getRelations=function(){return currentDocument.relations},addRelation=function(e,t,r){let n=e,i=t,o="default",l="default";e==="[*]"&&(startCnt++,n="start"+startCnt,o="start"),t==="[*]"&&(i="end"+startCnt,l="end"),addState(n,o),addState(i,l),currentDocument.relations.push({id1:n,id2:i,title:common.sanitizeText(r,getConfig$1())})},addDescription=function(e,t){const r=currentDocument.states[e];let n=t;n[0]===":"&&(n=n.substr(1).trim()),r.descriptions.push(common.sanitizeText(n,getConfig$1()))},cleanupLabel=function(e){return e.substring(0,1)===":"?e.substr(2).trim():e.trim()},lineType={LINE:0,DOTTED_LINE:1};let dividerCnt=0;const getDividerId=()=>(dividerCnt++,"divider-id-"+dividerCnt);let classes=[];const getClasses$1=()=>classes;let direction="TB";const getDirection=()=>direction,setDirection=e=>{direction=e},relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},trimColon=e=>e&&e[0]===":"?e.substr(1).trim():e.trim(),stateDb={parseDirective:parseDirective$2,getConfig:()=>getConfig$1().state,addState,clear:clear$1,getState,getStates,getRelations,getClasses:getClasses$1,getDirection,addRelation,getDividerId,setDirection,cleanupLabel,lineType,relationType,logDocuments,getRootDoc,setRootDoc,getRootDocV2,extract,trimColon,getAccTitle,setAccTitle,getAccDescription,setAccDescription},drawStartState=e=>e.append("circle").attr("class","start-state").attr("r",getConfig$1().state.sizeUnit).attr("cx",getConfig$1().state.padding+getConfig$1().state.sizeUnit).attr("cy",getConfig$1().state.padding+getConfig$1().state.sizeUnit),drawDivider=e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",getConfig$1().state.textHeight).attr("class","divider").attr("x2",getConfig$1().state.textHeight*2).attr("y1",0).attr("y2",0),drawSimpleState=(e,t)=>{const r=e.append("text").attr("x",2*getConfig$1().state.padding).attr("y",getConfig$1().state.textHeight+2*getConfig$1().state.padding).attr("font-size",getConfig$1().state.fontSize).attr("class","state-title").text(t.id),n=r.node().getBBox();return e.insert("rect",":first-child").attr("x",getConfig$1().state.padding).attr("y",getConfig$1().state.padding).attr("width",n.width+2*getConfig$1().state.padding).attr("height",n.height+2*getConfig$1().state.padding).attr("rx",getConfig$1().state.radius),r},drawDescrState=(e,t)=>{const r=function(p,m,b){const $=p.append("tspan").attr("x",2*getConfig$1().state.padding).text(m);b||$.attr("dy",getConfig$1().state.textHeight)},i=e.append("text").attr("x",2*getConfig$1().state.padding).attr("y",getConfig$1().state.textHeight+1.3*getConfig$1().state.padding).attr("font-size",getConfig$1().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),o=i.height,l=e.append("text").attr("x",getConfig$1().state.padding).attr("y",o+getConfig$1().state.padding*.4+getConfig$1().state.dividerMargin+getConfig$1().state.textHeight).attr("class","state-description");let u=!0,h=!0;t.descriptions.forEach(function(p){u||(r(l,p,h),h=!1),u=!1});const f=e.append("line").attr("x1",getConfig$1().state.padding).attr("y1",getConfig$1().state.padding+o+getConfig$1().state.dividerMargin/2).attr("y2",getConfig$1().state.padding+o+getConfig$1().state.dividerMargin/2).attr("class","descr-divider"),d=l.node().getBBox(),g=Math.max(d.width,i.width);return f.attr("x2",g+3*getConfig$1().state.padding),e.insert("rect",":first-child").attr("x",getConfig$1().state.padding).attr("y",getConfig$1().state.padding).attr("width",g+2*getConfig$1().state.padding).attr("height",d.height+o+2*getConfig$1().state.padding).attr("rx",getConfig$1().state.radius),e},addTitleAndBox=(e,t,r)=>{const n=getConfig$1().state.padding,i=2*getConfig$1().state.padding,o=e.node().getBBox(),l=o.width,u=o.x,h=e.append("text").attr("x",0).attr("y",getConfig$1().state.titleShift).attr("font-size",getConfig$1().state.fontSize).attr("class","state-title").text(t.id),d=h.node().getBBox().width+i;let g=Math.max(d,l);g===l&&(g=g+i);let p;const m=e.node().getBBox();t.doc,p=u-n,d>l&&(p=(l-g)/2+n),Math.abs(u-m.x)<n&&d>l&&(p=u-(d-l)/2);const b=1-getConfig$1().state.textHeight;return e.insert("rect",":first-child").attr("x",p).attr("y",b).attr("class",r?"alt-composit":"composit").attr("width",g).attr("height",m.height+getConfig$1().state.textHeight+getConfig$1().state.titleShift+1).attr("rx","0"),h.attr("x",p+n),d<=l&&h.attr("x",u+(g-i)/2-d/2+n),e.insert("rect",":first-child").attr("x",p).attr("y",getConfig$1().state.titleShift-getConfig$1().state.textHeight-getConfig$1().state.padding).attr("width",g).attr("height",getConfig$1().state.textHeight*3).attr("rx",getConfig$1().state.radius),e.insert("rect",":first-child").attr("x",p).attr("y",getConfig$1().state.titleShift-getConfig$1().state.textHeight-getConfig$1().state.padding).attr("width",g).attr("height",m.height+3+2*getConfig$1().state.textHeight).attr("rx",getConfig$1().state.radius),e},drawEndState=e=>(e.append("circle").attr("class","end-state-outer").attr("r",getConfig$1().state.sizeUnit+getConfig$1().state.miniPadding).attr("cx",getConfig$1().state.padding+getConfig$1().state.sizeUnit+getConfig$1().state.miniPadding).attr("cy",getConfig$1().state.padding+getConfig$1().state.sizeUnit+getConfig$1().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",getConfig$1().state.sizeUnit).attr("cx",getConfig$1().state.padding+getConfig$1().state.sizeUnit+2).attr("cy",getConfig$1().state.padding+getConfig$1().state.sizeUnit+2)),drawForkJoinState=(e,t)=>{let r=getConfig$1().state.forkWidth,n=getConfig$1().state.forkHeight;if(t.parentId){let i=r;r=n,n=i}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",getConfig$1().state.padding).attr("y",getConfig$1().state.padding)},_drawLongText=(e,t,r,n)=>{let i=0;const o=n.append("text");o.style("text-anchor","start"),o.attr("class","noteText");let l=e.replace(/\r\n/g,"<br/>");l=l.replace(/\n/g,"<br/>");const u=l.split(common.lineBreakRegex);let h=1.25*getConfig$1().state.noteMargin;for(const f of u){const d=f.trim();if(d.length>0){const g=o.append("tspan");g.text(d),h===0&&(h+=g.node().getBBox().height),i+=h,g.attr("x",t+getConfig$1().state.noteMargin),g.attr("y",r+i+1.25*getConfig$1().state.noteMargin)}}return{textWidth:o.node().getBBox().width,textHeight:i}},drawNote=(e,t)=>{t.attr("class","state-note");const r=t.append("rect").attr("x",0).attr("y",getConfig$1().state.padding),n=t.append("g"),{textWidth:i,textHeight:o}=_drawLongText(e,0,0,n);return r.attr("height",o+2*getConfig$1().state.noteMargin),r.attr("width",i+getConfig$1().state.noteMargin*2),r},drawState=function(e,t){const r=t.id,n={id:r,label:t.id,width:0,height:0},i=e.append("g").attr("id",r).attr("class","stateGroup");t.type==="start"&&drawStartState(i),t.type==="end"&&drawEndState(i),(t.type==="fork"||t.type==="join")&&drawForkJoinState(i,t),t.type==="note"&&drawNote(t.note.text,i),t.type==="divider"&&drawDivider(i),t.type==="default"&&t.descriptions.length===0&&drawSimpleState(i,t),t.type==="default"&&t.descriptions.length>0&&drawDescrState(i,t);const o=i.node().getBBox();return n.width=o.width+2*getConfig$1().state.padding,n.height=o.height+2*getConfig$1().state.padding,n};let edgeCount=0;const drawEdge=function(e,t,r){const n=function(h){switch(h){case stateDb.relationType.AGGREGATION:return"aggregation";case stateDb.relationType.EXTENSION:return"extension";case stateDb.relationType.COMPOSITION:return"composition";case stateDb.relationType.DEPENDENCY:return"dependency"}};t.points=t.points.filter(h=>!Number.isNaN(h.y));const i=t.points,o=line$2().x(function(h){return h.x}).y(function(h){return h.y}).curve(curveBasis),l=e.append("path").attr("d",o(i)).attr("id","edge"+edgeCount).attr("class","transition");let u="";if(getConfig$1().state.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),l.attr("marker-end","url("+u+"#"+n(stateDb.relationType.DEPENDENCY)+"End)"),typeof r.title<"u"){const h=e.append("g").attr("class","stateLabel"),{x:f,y:d}=utils.calcLabelPosition(t.points),g=common.getRows(r.title);let p=0;const m=[];let b=0,$=0;for(let L=0;L<=g.length;L++){const N=h.append("text").attr("text-anchor","middle").text(g[L]).attr("x",f).attr("y",d+p),F=N.node().getBBox();b=Math.max(b,F.width),$=Math.min($,F.x),log$1.info(F.x,f,d+p),p===0&&(p=N.node().getBBox().height,log$1.info("Title height",p,d)),m.push(N)}let S=p*g.length;if(g.length>1){const L=(g.length-1)*p*.5;m.forEach((N,F)=>N.attr("y",d+F*p-L)),S=p*g.length}const R=h.node().getBBox();h.insert("rect",":first-child").attr("class","box").attr("x",f-b/2-getConfig$1().state.padding/2).attr("y",d-S/2-getConfig$1().state.padding/2-3.5).attr("width",b+getConfig$1().state.padding).attr("height",S+getConfig$1().state.padding),log$1.info(R)}edgeCount++};let conf$3;const transformationLog={},setConf$3=function(){},insertMarkers=function(e){e.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")},draw$3=function(e,t,r,n){conf$3=getConfig$1().state;const i=getConfig$1().securityLevel;let o;i==="sandbox"&&(o=select$1("#i"+t));const l=select$1(i==="sandbox"?o.nodes()[0].contentDocument.body:"body"),u=i==="sandbox"?o.nodes()[0].contentDocument:document;log$1.debug("Rendering diagram "+e);const h=l.select(`[id='${t}']`);insertMarkers(h),new graphlib$2.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const d=n.db.getRootDoc();renderDoc(d,h,void 0,!1,l,u,n);const g=conf$3.padding,p=h.node().getBBox(),m=p.width+g*2,b=p.height+g*2,$=m*1.75;configureSvgSize(h,b,$,conf$3.useMaxWidth),h.attr("viewBox",`${p.x-conf$3.padding} ${p.y-conf$3.padding} `+m+" "+b),addSVGAccessibilityFields(n.db,h,t)},getLabelWidth=e=>e?e.length*conf$3.fontSizeFactor:1,renderDoc=(e,t,r,n,i,o,l)=>{const u=new graphlib$2.Graph({compound:!0,multigraph:!0});let h,f=!0;for(h=0;h<e.length;h++)if(e[h].stmt==="relation"){f=!1;break}r?u.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:f?1:conf$3.edgeLengthFactor,nodeSep:f?1:50,isMultiGraph:!0}):u.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:f?1:conf$3.edgeLengthFactor,nodeSep:f?1:50,ranker:"tight-tree",isMultiGraph:!0}),u.setDefaultEdgeLabel(function(){return{}}),l.db.extract(e);const d=l.db.getStates(),g=l.db.getRelations(),p=Object.keys(d);for(let R=0;R<p.length;R++){const L=d[p[R]];r&&(L.parentId=r);let N;if(L.doc){let F=t.append("g").attr("id",L.id).attr("class","stateGroup");N=renderDoc(L.doc,F,L.id,!n,i,o,l);{F=addTitleAndBox(F,L,n);let H=F.node().getBBox();N.width=H.width,N.height=H.height+conf$3.padding/2,transformationLog[L.id]={y:conf$3.compositTitleSize}}}else N=drawState(t,L);if(L.note){const F={descriptions:[],id:L.id+"-note",note:L.note,type:"note"},H=drawState(t,F);L.note.position==="left of"?(u.setNode(N.id+"-note",H),u.setNode(N.id,N)):(u.setNode(N.id,N),u.setNode(N.id+"-note",H)),u.setParent(N.id,N.id+"-group"),u.setParent(N.id+"-note",N.id+"-group")}else u.setNode(N.id,N)}log$1.debug("Count=",u.nodeCount(),u);let m=0;g.forEach(function(R){m++,log$1.debug("Setting edge",R),u.setEdge(R.id1,R.id2,{relation:R,width:getLabelWidth(R.title),height:conf$3.labelHeight*common.getRows(R.title).length,labelpos:"c"},"id"+m)}),dagre$1.layout(u),log$1.debug("Graph after layout",u.nodes());const b=t.node();u.nodes().forEach(function(R){typeof R<"u"&&typeof u.node(R)<"u"?(log$1.warn("Node "+R+": "+JSON.stringify(u.node(R))),i.select("#"+b.id+" #"+R).attr("transform","translate("+(u.node(R).x-u.node(R).width/2)+","+(u.node(R).y+(transformationLog[R]?transformationLog[R].y:0)-u.node(R).height/2)+" )"),i.select("#"+b.id+" #"+R).attr("data-x-shift",u.node(R).x-u.node(R).width/2),o.querySelectorAll("#"+b.id+" #"+R+" .divider").forEach(N=>{const F=N.parentElement;let H=0,G=0;F&&(F.parentElement&&(H=F.parentElement.getBBox().width),G=parseInt(F.getAttribute("data-x-shift"),10),Number.isNaN(G)&&(G=0)),N.setAttribute("x1",0-G+8),N.setAttribute("x2",H-G-8)})):log$1.debug("No Node "+R+": "+JSON.stringify(u.node(R)))});let $=b.getBBox();u.edges().forEach(function(R){typeof R<"u"&&typeof u.edge(R)<"u"&&(log$1.debug("Edge "+R.v+" -> "+R.w+": "+JSON.stringify(u.edge(R))),drawEdge(t,u.edge(R),u.edge(R).relation))}),$=b.getBBox();const S={id:r||"root",label:r||"root",width:0,height:0};return S.width=$.width+2*conf$3.padding,S.height=$.height+2*conf$3.padding,log$1.debug("Doc rendered",S,u),S},stateRenderer={setConf:setConf$3,draw:draw$3},conf$2={},setConf$2=function(e){const t=Object.keys(e);for(let r=0;r<t.length;r++)conf$2[t[r]]=e[t[r]]};let nodeDb={};const getClasses=function(e,t){return log$1.trace("Extracting classes"),t.sb.clear(),t.parser.parse(e),t.sb.getClasses()},setupNode=(e,t,r,n)=>{if(r.id!=="root"){let i="rect";r.start===!0&&(i="start"),r.start===!1&&(i="end"),r.type!=="default"&&(i=r.type),nodeDb[r.id]||(nodeDb[r.id]={id:r.id,shape:i,description:common.sanitizeText(r.id,getConfig$1()),classes:"statediagram-state"}),r.description&&(Array.isArray(nodeDb[r.id].description)?(nodeDb[r.id].shape="rectWithTitle",nodeDb[r.id].description.push(r.description)):nodeDb[r.id].description.length>0?(nodeDb[r.id].shape="rectWithTitle",nodeDb[r.id].description===r.id?nodeDb[r.id].description=[r.description]:nodeDb[r.id].description=[nodeDb[r.id].description,r.description]):(nodeDb[r.id].shape="rect",nodeDb[r.id].description=r.description),nodeDb[r.id].description=common.sanitizeTextOrArray(nodeDb[r.id].description,getConfig$1())),nodeDb[r.id].description.length===1&&nodeDb[r.id].shape==="rectWithTitle"&&(nodeDb[r.id].shape="rect"),!nodeDb[r.id].type&&r.doc&&(log$1.info("Setting cluster for ",r.id,getDir(r)),nodeDb[r.id].type="group",nodeDb[r.id].dir=getDir(r),nodeDb[r.id].shape=r.type==="divider"?"divider":"roundedWithTitle",nodeDb[r.id].classes=nodeDb[r.id].classes+" "+(n?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));const o={labelStyle:"",shape:nodeDb[r.id].shape,labelText:nodeDb[r.id].description,classes:nodeDb[r.id].classes,style:"",id:r.id,dir:nodeDb[r.id].dir,domId:"state-"+r.id+"-"+cnt,type:nodeDb[r.id].type,padding:15};if(r.note){const l={labelStyle:"",shape:"note",labelText:r.note.text,classes:"statediagram-note",style:"",id:r.id+"----note-"+cnt,domId:"state-"+r.id+"----note-"+cnt,type:nodeDb[r.id].type,padding:15},u={labelStyle:"",shape:"noteGroup",labelText:r.note.text,classes:nodeDb[r.id].classes,style:"",id:r.id+"----parent",domId:"state-"+r.id+"----parent-"+cnt,type:"group",padding:0};cnt++,e.setNode(r.id+"----parent",u),e.setNode(l.id,l),e.setNode(r.id,o),e.setParent(r.id,r.id+"----parent"),e.setParent(l.id,r.id+"----parent");let h=r.id,f=l.id;r.note.position==="left of"&&(h=l.id,f=r.id),e.setEdge(h,f,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else e.setNode(r.id,o)}t&&t.id!=="root"&&(log$1.trace("Setting node ",r.id," to be child of its parent ",t.id),e.setParent(r.id,t.id)),r.doc&&(log$1.trace("Adding nodes children "),setupDoc(e,r,r.doc,!n))};let cnt=0;const setupDoc=(e,t,r,n)=>{log$1.trace("items",r),r.forEach(i=>{if(i.stmt==="state"||i.stmt==="default")setupNode(e,t,i,n);else if(i.stmt==="relation"){setupNode(e,t,i.state1,n),setupNode(e,t,i.state2,n);const o={id:"edge"+cnt,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:common.sanitizeText(i.description,getConfig$1()),arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"};let l=i.state1.id,u=i.state2.id;e.setEdge(l,u,o,cnt),cnt++}})},getDir=(e,t)=>{let r=t||"TB";if(e.doc)for(let n=0;n<e.doc.length;n++){const i=e.doc[n];i.stmt==="dir"&&(r=i.value)}return r},draw$2=function(e,t,r,n){log$1.info("Drawing state diagram (v2)",t),nodeDb={},n.db.getDirection();const{securityLevel:i,state:o}=getConfig$1(),l=o.nodeSpacing||50,u=o.rankSpacing||50;log$1.info(n.db.getRootDocV2()),n.db.extract(n.db.getRootDocV2()),log$1.info(n.db.getRootDocV2());const h=new graphlib$2.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:getDir(n.db.getRootDocV2()),nodesep:l,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});setupNode(h,void 0,n.db.getRootDocV2(),!0);let f;i==="sandbox"&&(f=select$1("#i"+t));const d=select$1(i==="sandbox"?f.nodes()[0].contentDocument.body:"body"),g=d.select(`[id="${t}"]`),p=d.select("#"+t+" g");render$1(p,h,["barb"],"statediagram",t);const m=8,b=g.node().getBBox(),$=b.width+m*2,S=b.height+m*2;g.attr("class","statediagram");const R=g.node().getBBox();configureSvgSize(g,S,$,o.useMaxWidth);const L=`${R.x-m} ${R.y-m} ${$} ${S}`;log$1.debug(`viewBox ${L}`),g.attr("viewBox",L);const N=document.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(let F=0;F<N.length;F++){const H=N[F],G=H.getBBox(),P=document.createElementNS("http://www.w3.org/2000/svg","rect");P.setAttribute("rx",0),P.setAttribute("ry",0),P.setAttribute("width",G.width),P.setAttribute("height",G.height),H.insertBefore(P,H.firstChild)}addSVGAccessibilityFields(n.db,g,t)},stateRendererV2={setConf:setConf$2,getClasses,draw:draw$2};var parser=function(){var e=function($,S,R,L){for(R=R||{},L=$.length;L--;R[$[L]]=S);return R},t=[1,2],r=[1,5],n=[6,9,11,17,18,20,22,23,24,26],i=[1,15],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,20],d=[1,24],g=[4,6,9,11,17,18,20,22,23,24,26],p={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,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"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,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(S,R,L,N,F,H,G){var P=H.length-1;switch(F){case 1:return H[P-1];case 3:this.$=[];break;case 4:H[P-1].push(H[P]),this.$=H[P-1];break;case 5:case 6:this.$=H[P];break;case 7:case 8:this.$=[];break;case 11:N.setDiagramTitle(H[P].substr(6)),this.$=H[P].substr(6);break;case 12:this.$=H[P].trim(),N.setAccTitle(this.$);break;case 13:case 14:this.$=H[P].trim(),N.setAccDescription(this.$);break;case 15:N.addSection(H[P].substr(8)),this.$=H[P].substr(8);break;case 16:N.addTask(H[P-1],H[P]),this.$="task";break;case 18:N.parseDirective("%%{","open_directive");break;case 19:N.parseDirective(H[P],"type_directive");break;case 20:H[P]=H[P].trim().replace(/'/g,'"'),N.parseDirective(H[P],"arg_directive");break;case 21:N.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:t,7:3,12:4,26:r},{1:[3]},e(n,[2,3],{5:6}),{3:7,4:t,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:o,20:l,22:u,23:h,24:f,26:r},{1:[2,2]},{14:22,15:[1,23],29:d},e([15,29],[2,19]),e(n,[2,8],{1:[2,1]}),e(n,[2,4]),{7:21,10:25,12:4,17:i,18:o,20:l,22:u,23:h,24:f,26:r},e(n,[2,6]),e(n,[2,7]),e(n,[2,11]),{19:[1,26]},{21:[1,27]},e(n,[2,14]),e(n,[2,15]),{25:[1,28]},e(n,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},e(n,[2,5]),e(n,[2,12]),e(n,[2,13]),e(n,[2,16]),e(g,[2,9]),{14:32,29:d},{29:[2,20]},{11:[1,33]},e(g,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(S,R){if(R.recoverable)this.trace(S);else{var L=new Error(S);throw L.hash=R,L}},parse:function(S){var R=this,L=[0],N=[],F=[null],H=[],G=this.table,P="",V=0,z=0,W=2,T=1,U=H.slice.call(arguments,1),I=Object.create(this.lexer),ae={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(ae.yy[Q]=this.yy[Q]);I.setInput(S,ae.yy),ae.yy.lexer=I,ae.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var ue=I.yylloc;H.push(ue);var _e=I.options&&I.options.ranges;typeof ae.yy.parseError=="function"?this.parseError=ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(){var J;return J=N.pop()||I.lex()||T,typeof J!="number"&&(J instanceof Array&&(N=J,J=N.pop()),J=R.symbols_[J]||J),J}for(var de,ce,he,Se,ve={},me,Ce,xe,Ne;;){if(ce=L[L.length-1],this.defaultActions[ce]?he=this.defaultActions[ce]:((de===null||typeof de>"u")&&(de=ke()),he=G[ce]&&G[ce][de]),typeof he>"u"||!he.length||!he[0]){var pe="";Ne=[];for(me in G[ce])this.terminals_[me]&&me>W&&Ne.push("'"+this.terminals_[me]+"'");I.showPosition?pe="Parse error on line "+(V+1)+`:
|
|
`+I.showPosition()+`
|
|
Expecting `+Ne.join(", ")+", got '"+(this.terminals_[de]||de)+"'":pe="Parse error on line "+(V+1)+": Unexpected "+(de==T?"end of input":"'"+(this.terminals_[de]||de)+"'"),this.parseError(pe,{text:I.match,token:this.terminals_[de]||de,line:I.yylineno,loc:ue,expected:Ne})}if(he[0]instanceof Array&&he.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ce+", token: "+de);switch(he[0]){case 1:L.push(de),F.push(I.yytext),H.push(I.yylloc),L.push(he[1]),de=null,z=I.yyleng,P=I.yytext,V=I.yylineno,ue=I.yylloc;break;case 2:if(Ce=this.productions_[he[1]][1],ve.$=F[F.length-Ce],ve._$={first_line:H[H.length-(Ce||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(Ce||1)].first_column,last_column:H[H.length-1].last_column},_e&&(ve._$.range=[H[H.length-(Ce||1)].range[0],H[H.length-1].range[1]]),Se=this.performAction.apply(ve,[P,z,V,ae.yy,he[1],F,H].concat(U)),typeof Se<"u")return Se;Ce&&(L=L.slice(0,-1*Ce*2),F=F.slice(0,-1*Ce),H=H.slice(0,-1*Ce)),L.push(this.productions_[he[1]][0]),F.push(ve.$),H.push(ve._$),xe=G[L[L.length-2]][L[L.length-1]],L.push(xe);break;case 3:return!0}}return!0}},m=function(){var $={EOF:1,parseError:function(R,L){if(this.yy.parser)this.yy.parser.parseError(R,L);else throw new Error(R)},setInput:function(S,R){return this.yy=R||this.yy||{},this._input=S,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 S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var R=S.match(/(?:\r\n?|\n).*/g);return R?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},unput:function(S){var R=S.length,L=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-R),this.offset-=R;var N=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),L.length-1&&(this.yylineno-=L.length-1);var F=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:L?(L.length===N.length?this.yylloc.first_column:0)+N[N.length-L.length].length-L[0].length:this.yylloc.first_column-R},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-R]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(S){this.unput(this.match.slice(S))},pastInput:function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var S=this.pastInput(),R=new Array(S.length+1).join("-");return S+this.upcomingInput()+`
|
|
`+R+"^"},test_match:function(S,R){var L,N,F;if(this.options.backtrack_lexer&&(F={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&&(F.yylloc.range=this.yylloc.range.slice(0))),N=S[0].match(/(?:\r\n?|\n).*/g),N&&(this.yylineno+=N.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:N?N[N.length-1].length-N[N.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,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(S[0].length),this.matched+=S[0],L=this.performAction.call(this,this.yy,this,R,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),L)return L;if(this._backtrack){for(var H in F)this[H]=F[H];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,R,L,N;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),H=0;H<F.length;H++)if(L=this._input.match(this.rules[F[H]]),L&&(!R||L[0].length>R[0].length)){if(R=L,N=H,this.options.backtrack_lexer){if(S=this.test_match(L,F[H]),S!==!1)return S;if(this._backtrack){R=!1;continue}else return!1}else if(!this.options.flex)break}return R?(S=this.test_match(R,F[N]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var R=this.next();return R||this.lex()},begin:function(R){this.conditionStack.push(R)},popState:function(){var R=this.conditionStack.length-1;return R>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(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},pushState:function(R){this.begin(R)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(R,L,N,F){switch(N){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24: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,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/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},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return $}();p.lexer=m;function b(){this.yy={}}return b.prototype=p,p.Parser=b,new b}();parser.parser=parser;const journeyDetector=e=>e.match(/^\s*journey/)!==null;let currentSection="";const sections=[],tasks=[],rawTasks=[],parseDirective$1=function(e,t,r){mermaidAPI.parseDirective(this,e,t,r)},clear=function(){sections.length=0,tasks.length=0,currentSection="",rawTasks.length=0,clear$g()},addSection=function(e){currentSection=e,sections.push(e)},getSections=function(){return sections},getTasks=function(){let e=compileTasks();const t=100;let r=0;for(;!e&&r<t;)e=compileTasks(),r++;return tasks.push(...rawTasks),tasks},updateActors=function(){const e=[];return tasks.forEach(r=>{r.people&&e.push(...r.people)}),[...new Set(e)].sort()},addTask=function(e,t){const r=t.substr(1).split(":");let n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));const o=i.map(u=>u.trim()),l={section:currentSection,type:currentSection,people:o,task:e,score:n};rawTasks.push(l)},addTaskOrg=function(e){const t={section:currentSection,type:currentSection,description:e,task:e,classes:[]};tasks.push(t)},compileTasks=function(){const e=function(r){return rawTasks[r].processed};let t=!0;for(let r=0;r<rawTasks.length;r++)e(r),t=t&&rawTasks[r].processed;return t},getActors=function(){return updateActors()},journeyDb={parseDirective:parseDirective$1,getConfig:()=>getConfig$1().journey,clear,setDiagramTitle,getDiagramTitle,setAccTitle,getAccTitle,setAccDescription,getAccDescription,addSection,getSections,getTasks,addTask,addTaskOrg,getActors},drawRect=function(e,t){const r=e.append("rect");return r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),typeof t.class<"u"&&r.attr("class",t.class),r},drawFace=function(e,t){const n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function o(h){const f=arc$1().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function l(h){const f=arc$1().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function u(h){h.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return t.score>3?o(i):t.score<3?l(i):u(i),n},drawCircle=function(e,t){const r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),typeof r.class<"u"&&r.attr("class",r.class),typeof t.title<"u"&&r.append("title").text(t.title),r},drawText=function(e,t){const r=t.text.replace(/<br\s*\/?>/gi," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),typeof t.class<"u"&&n.attr("class",t.class);const i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},drawLabel=function(e,t){function r(i,o,l,u,h){return i+","+o+" "+(i+l)+","+o+" "+(i+l)+","+(o+u-h)+" "+(i+l-h*1.2)+","+(o+u)+" "+i+","+(o+u)}const n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,drawText(e,t)},drawSection=function(e,t,r){const n=e.append("g"),i=getNoteRect();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,drawRect(n,i),_drawTextCandidateFunc(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)};let taskCount=-1;const drawTask=function(e,t,r){const n=t.x+r.width/2,i=e.append("g");taskCount++;const o=300+5*30;i.append("line").attr("id","task"+taskCount).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",o).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),drawFace(i,{cx:n,cy:300+(5-t.score)*30,score:t.score});const l=getNoteRect();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=r.width,l.height=r.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,drawRect(i,l);let u=t.x+14;t.people.forEach(h=>{const f=t.actors[h].color,d={cx:u,cy:t.y,r:7,fill:f,stroke:"#000",title:h,pos:t.actors[h].position};drawCircle(i,d),u+=10}),_drawTextCandidateFunc(r)(t.task,i,l.x,l.y,l.width,l.height,{class:"task"},r,t.colour)},drawBackgroundRect=function(e,t){drawRect(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},getTextObj=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},getNoteRect=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},_drawTextCandidateFunc=function(){function e(i,o,l,u,h,f,d,g){const p=o.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("font-color",g).style("text-anchor","middle").text(i);n(p,d)}function t(i,o,l,u,h,f,d,g,p){const{taskFontSize:m,taskFontFamily:b}=g,$=i.split(/<br\s*\/?>/gi);for(let S=0;S<$.length;S++){const R=S*m-m*($.length-1)/2,L=o.append("text").attr("x",l+h/2).attr("y",u).attr("fill",p).style("text-anchor","middle").style("font-size",m).style("font-family",b);L.append("tspan").attr("x",l+h/2).attr("dy",R).text($[S]),L.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(L,d)}}function r(i,o,l,u,h,f,d,g){const p=o.append("switch"),b=p.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,p,l,u,h,f,d,g),n(b,d)}function n(i,o){for(const l in o)l in o&&i.attr(l,o[l])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?e:t}}(),initGraphics=function(e){e.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")},svgDraw={drawRect,drawCircle,drawSection,drawText,drawLabel,drawTask,drawBackgroundRect,getTextObj,getNoteRect,initGraphics},setConf$1=function(e){Object.keys(e).forEach(function(r){conf$1[r]=e[r]})},actors={};function drawActorLegend(e){const t=getConfig$1().journey;let r=60;Object.keys(actors).forEach(n=>{const i=actors[n].color,o={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:actors[n].position};svgDraw.drawCircle(e,o);const l={x:40,y:r+7,fill:"#666",text:n,textMargin:t.boxTextMargin|5};svgDraw.drawText(e,l),r+=20})}const conf$1=getConfig$1().journey,LEFT_MARGIN=conf$1.leftMargin,draw$1=function(e,t,r,n){const i=getConfig$1().journey;n.db.clear(),n.parser.parse(e+`
|
|
`);const o=getConfig$1().securityLevel;let l;o==="sandbox"&&(l=select$1("#i"+t));const u=select$1(o==="sandbox"?l.nodes()[0].contentDocument.body:"body");bounds.init();const h=u.select("#"+t);svgDraw.initGraphics(h);const f=n.db.getTasks(),d=n.db.getDiagramTitle(),g=n.db.getActors();for(const R in actors)delete actors[R];let p=0;g.forEach(R=>{actors[R]={color:i.actorColours[p%i.actorColours.length],position:p},p++}),drawActorLegend(h),bounds.insert(0,0,LEFT_MARGIN,Object.keys(actors).length*50),drawTasks(h,f,0);const m=bounds.getBounds();d&&h.append("text").text(d).attr("x",LEFT_MARGIN).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const b=m.stopy-m.starty+2*i.diagramMarginY,$=LEFT_MARGIN+m.stopx+2*i.diagramMarginX;configureSvgSize(h,b,$,i.useMaxWidth),h.append("line").attr("x1",LEFT_MARGIN).attr("y1",i.height*4).attr("x2",$-LEFT_MARGIN-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const S=d?70:0;h.attr("viewBox",`${m.startx} -25 ${$} ${b+S}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",b+S+25),addSVGAccessibilityFields(n.db,h,t)},bounds={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(e,t,r,n){typeof e[t]>"u"?e[t]=r:e[t]=n(r,e[t])},updateBounds:function(e,t,r,n){const i=getConfig$1().journey,o=this;let l=0;function u(h){return function(d){l++;const g=o.sequenceItems.length-l+1;o.updateVal(d,"starty",t-g*i.boxMargin,Math.min),o.updateVal(d,"stopy",n+g*i.boxMargin,Math.max),o.updateVal(bounds.data,"startx",e-g*i.boxMargin,Math.min),o.updateVal(bounds.data,"stopx",r+g*i.boxMargin,Math.max),h!=="activation"&&(o.updateVal(d,"startx",e-g*i.boxMargin,Math.min),o.updateVal(d,"stopx",r+g*i.boxMargin,Math.max),o.updateVal(bounds.data,"starty",t-g*i.boxMargin,Math.min),o.updateVal(bounds.data,"stopy",n+g*i.boxMargin,Math.max))}}this.sequenceItems.forEach(u())},insert:function(e,t,r,n){const i=Math.min(e,r),o=Math.max(e,r),l=Math.min(t,n),u=Math.max(t,n);this.updateVal(bounds.data,"startx",i,Math.min),this.updateVal(bounds.data,"starty",l,Math.min),this.updateVal(bounds.data,"stopx",o,Math.max),this.updateVal(bounds.data,"stopy",u,Math.max),this.updateBounds(i,l,o,u)},bumpVerticalPos:function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},fills=conf$1.sectionFills,textColours=conf$1.sectionColours,drawTasks=function(e,t,r){const n=getConfig$1().journey;let i="";const o=n.height*2+n.diagramMarginY,l=r+o;let u=0,h="#CCC",f="black",d=0;for(let g=0;g<t.length;g++){const p=t[g];if(i!==p.section){h=fills[u%fills.length],d=u%fills.length,f=textColours[u%textColours.length];const b={x:g*n.taskMargin+g*n.width+LEFT_MARGIN,y:50,text:p.section,fill:h,num:d,colour:f};svgDraw.drawSection(e,b,n),i=p.section,u++}const m=p.people.reduce((b,$)=>(actors[$]&&(b[$]=actors[$]),b),{});p.x=g*n.taskMargin+g*n.width+LEFT_MARGIN,p.y=l,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=f,p.fill=h,p.num=d,p.actors=m,svgDraw.drawTask(e,p,n),bounds.insert(p.x,p.y,p.x+p.width+n.taskMargin,300+5*30)}},journeyRenderer={setConf:setConf$1,draw:draw$1};let conf={};const setConf=function(e){conf={...conf,...e}},draw=(e,t,r)=>{try{log$1.debug(`Renering svg for syntax error
|
|
`);const n=select$1("#"+t),i=n.append("g");i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),n.attr("height",100),n.attr("width",500),n.attr("viewBox","768 0 912 512")}catch(n){log$1.error("Error while rendering info diagram"),log$1.error(getErrorMessage(n))}},errorRenderer={setConf,draw};let hasLoadedDiagrams=!1;const addDiagrams=()=>{hasLoadedDiagrams||(hasLoadedDiagrams=!0,registerDiagram("error",{db:{clear:()=>{}},styles:getStyles$b,renderer:errorRenderer,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},e=>e.toLowerCase().trim()==="error"),registerDiagram("c4",{parser:parser$a,db:c4Db,renderer:c4Renderer,styles:getStyles$2,init:e=>{c4Renderer.setConf(e.c4)}},c4Detector),registerDiagram("class",{parser:parser$9,db:classDb,renderer:classRenderer,styles:getStyles$d,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,classDb.clear()}},classDetector),registerDiagram("classDiagram",{parser:parser$9,db:classDb,renderer:classRendererV2,styles:getStyles$d,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,classDb.clear()}},classDetectorV2),registerDiagram("er",{parser:parser$8,db:erDb,renderer:erRenderer,styles:getStyles$c},erDetector),registerDiagram("gantt",{parser:parser$6,db:ganttDb,renderer:ganttRenderer,styles:getStyles$9},ganttDetector),registerDiagram("info",{parser:parser$5,db:infoDb,renderer:infoRenderer,styles:getStyles$8},infoDetector),registerDiagram("pie",{parser:parser$4,db:pieDb,renderer:pieRenderer,styles:getStyles$7},pieDetector),registerDiagram("requirement",{parser:parser$3,db:requirementDb,renderer:requirementRenderer,styles:getStyles$6},requirementDetector),registerDiagram("sequence",{parser:parser$2,db:sequenceDb,renderer:sequenceRenderer,styles:getStyles$5,init:e=>{if(e.sequence||(e.sequence={}),e.sequence.arrowMarkerAbsolute=e.arrowMarkerAbsolute,"sequenceDiagram"in e)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");sequenceDb.setWrap(e.wrap),sequenceRenderer.setConf(e.sequence)}},sequenceDetector),registerDiagram("state",{parser:parser$1,db:stateDb,renderer:stateRenderer,styles:getStyles$4,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,stateDb.clear()}},stateDetector),registerDiagram("stateDiagram",{parser:parser$1,db:stateDb,renderer:stateRendererV2,styles:getStyles$4,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,stateDb.clear()}},stateDetectorV2),registerDiagram("journey",{parser,db:journeyDb,renderer:journeyRenderer,styles:getStyles$3,init:e=>{journeyRenderer.setConf(e.journey),journeyDb.clear()}},journeyDetector),registerDiagram("flowchart",{parser:parser$7,db:flowDb,renderer:flowRendererV2,styles:getStyles$a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,flowRenderer.setConf(e.flowchart),flowDb.clear(),flowDb.setGen("gen-1")}},flowDetector),registerDiagram("flowchart-v2",{parser:parser$7,db:flowDb,renderer:flowRendererV2,styles:getStyles$a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,setConfig({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),flowRendererV2.setConf(e.flowchart),flowDb.clear(),flowDb.setGen("gen-2")}},flowDetectorV2),registerDiagram("gitGraph",{parser:parser$b,db:gitGraphDb,renderer:gitGraphRenderer,styles:getStyles},gitGraphDetector))};class Diagram{constructor(t,r){__publicField(this,"type","graph"),__publicField(this,"parser"),__publicField(this,"renderer"),__publicField(this,"db"),__publicField(this,"detectTypeFailed",!1);var n,i;this.txt=t;const o=getConfig$1();this.txt=t;try{this.type=detectType(t,o)}catch(u){this.handleError(u,r),this.type="error",this.detectTypeFailed=!0}const l=getDiagram(this.type);log$1.debug("Type "+this.type),this.db=l.db,(i=(n=this.db).clear)==null||i.call(n),this.renderer=l.renderer,this.parser=l.parser,this.parser.parser.yy=this.db,l.init&&(l.init(o),log$1.debug("Initialized diagram "+this.type,o)),this.txt+=`
|
|
`,this.parse(this.txt,r)}parse(t,r){if(this.detectTypeFailed)return!1;try{return t=t+`
|
|
`,this.db.clear(),this.parser.parse(t),!0}catch(n){this.handleError(n,r)}return!1}handleError(t,r){if(r)isDetailedError(t)?r(t.str,t.hash):r(t);else throw t}getParser(){return this.parser}getType(){return this.type}}const getDiagramFromText=(e,t)=>{const r=detectType(e,getConfig$1());try{return getDiagram(r),new Diagram(e,t)}catch(n){if(!(n instanceof DiagramNotFoundError))throw log$1.error(n),n;const i=getDiagramLoader(r);if(!i)throw new Error(`Loader for ${r} not found.`);return i().then(({diagram:o})=>(registerDiagram(r,o,void 0),new Diagram(e,t)))}};function parse$1(e,t){return addDiagrams(),new Diagram(e,t).parse(e,t)}async function parseAsync$1(e,t){return addDiagrams(),(await getDiagramFromText(e,t)).parse(e,t)}const encodeEntities=function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),t},decodeEntities=function(e){let t=e;return t=t.replace(/fl°°/g,function(){return"&#"}),t=t.replace(/fl°/g,function(){return"&"}),t=t.replace(/¶ß/g,function(){return";"}),t},render$2=function(e,t,r,n){var i;addDiagrams(),reset(),t=t.replace(/\r\n?/g,`
|
|
`);const o=utils.detectInit(t);o&&(directiveSanitizer(o),addDirective(o));const l=getConfig$1();log$1.debug(l),t.length>l.maxTextSize&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let u=select$1("body");if(typeof n<"u"){if(n&&(n.innerHTML=""),l.securityLevel==="sandbox"){const H=select$1(n).append("iframe").attr("id","i"+e).attr("style","width: 100%; height: 100%;").attr("sandbox","");u=select$1(H.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=select$1(n);u.append("div").attr("id","d"+e).attr("style","font-family: "+l.fontFamily).append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").append("g")}else{const H=document.getElementById(e);H&&H.remove();let G;if(l.securityLevel==="sandbox"?G=document.querySelector("#i"+e):G=document.querySelector("#d"+e),G&&G.remove(),l.securityLevel==="sandbox"){const P=select$1("body").append("iframe").attr("id","i"+e).attr("style","width: 100%; height: 100%;").attr("sandbox","");u=select$1(P.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=select$1("body");u.append("div").attr("id","d"+e).append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}t=encodeEntities(t);let h,f;try{if(h=getDiagramFromText(t),"then"in h)throw new Error("Diagram is a promise")}catch(H){h=new Diagram("error"),f=H}const d=u.select("#d"+e).node(),g=h.type,p=d.firstChild,m=p.firstChild;let b="";if(l.themeCSS!==void 0&&(b+=`
|
|
${l.themeCSS}`),l.fontFamily!==void 0&&(b+=`
|
|
:root { --mermaid-font-family: ${l.fontFamily}}`),l.altFontFamily!==void 0&&(b+=`
|
|
:root { --mermaid-alt-font-family: ${l.altFontFamily}}`),g==="flowchart"||g==="flowchart-v2"||g==="graph"){const H=flowRenderer.getClasses(t,h),G=l.htmlLabels||((i=l.flowchart)==null?void 0:i.htmlLabels);for(const P in H)G?(b+=`
|
|
.${P} > * { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} span { ${H[P].styles.join(" !important; ")} !important; }`):(b+=`
|
|
.${P} path { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} rect { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} polygon { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} ellipse { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} circle { ${H[P].styles.join(" !important; ")} !important; }`,H[P].textStyles&&(b+=`
|
|
.${P} tspan { ${H[P].textStyles.join(" !important; ")} !important; }`))}const S=((H,G)=>serialize(compile(`${H}{${G}}`),stringify))(`#${e}`,getStyles$1(g,b,l.themeVariables)),R=document.createElement("style");R.innerHTML=`#${e} `+S,p.insertBefore(R,m);try{h.renderer.draw(t,e,pkg.version,h)}catch(H){throw errorRenderer.draw(t,e,pkg.version),H}u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=u.select("#d"+e).node().innerHTML;if(log$1.debug("cnf.arrowMarkerAbsolute",l.arrowMarkerAbsolute),!evaluate(l.arrowMarkerAbsolute)&&l.securityLevel!=="sandbox"&&(L=L.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),L=decodeEntities(L),L=L.replace(/<br>/g,"<br/>"),l.securityLevel==="sandbox"){const H=u.select("#d"+e+" svg").node(),G="100%";let P="100%";H&&(P=H.viewBox.baseVal.height+"px"),L=`<iframe style="width:${G};height:${P};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+L+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
|
The \u201Ciframe\u201D tag is not supported by your browser.
|
|
</iframe>`}else l.securityLevel!=="loose"&&(L=purify.sanitize(L,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(typeof r<"u")switch(g){case"flowchart":case"flowchart-v2":r(L,flowDb.bindFunctions);break;case"gantt":r(L,ganttDb.bindFunctions);break;case"class":case"classDiagram":r(L,classDb.bindFunctions);break;default:r(L)}else log$1.debug("CB = undefined!");attachFunctions();const N=l.securityLevel==="sandbox"?"#i"+e:"#d"+e,F=select$1(N).node();if(F&&"remove"in F&&F.remove(),f)throw f;return L},renderAsync$1=async function(e,t,r,n){var i;addDiagrams(),reset(),t=t.replace(/\r\n?/g,`
|
|
`);const o=utils.detectInit(t);o&&(directiveSanitizer(o),addDirective(o));const l=getConfig$1();log$1.debug(l),t.length>l.maxTextSize&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let u=select$1("body");if(typeof n<"u"){if(n&&(n.innerHTML=""),l.securityLevel==="sandbox"){const H=select$1(n).append("iframe").attr("id","i"+e).attr("style","width: 100%; height: 100%;").attr("sandbox","");u=select$1(H.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=select$1(n);u.append("div").attr("id","d"+e).attr("style","font-family: "+l.fontFamily).append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").append("g")}else{const H=document.getElementById(e);H&&H.remove();let G;if(l.securityLevel==="sandbox"?G=document.querySelector("#i"+e):G=document.querySelector("#d"+e),G&&G.remove(),l.securityLevel==="sandbox"){const P=select$1("body").append("iframe").attr("id","i"+e).attr("style","width: 100%; height: 100%;").attr("sandbox","");u=select$1(P.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=select$1("body");u.append("div").attr("id","d"+e).append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}t=encodeEntities(t);let h,f;try{h=await getDiagramFromText(t)}catch(H){h=new Diagram("error"),f=H}const d=u.select("#d"+e).node(),g=h.type,p=d.firstChild,m=p.firstChild;let b="";if(l.themeCSS!==void 0&&(b+=`
|
|
${l.themeCSS}`),l.fontFamily!==void 0&&(b+=`
|
|
:root { --mermaid-font-family: ${l.fontFamily}}`),l.altFontFamily!==void 0&&(b+=`
|
|
:root { --mermaid-alt-font-family: ${l.altFontFamily}}`),g==="flowchart"||g==="flowchart-v2"||g==="graph"){const H=flowRenderer.getClasses(t,h),G=l.htmlLabels||((i=l.flowchart)==null?void 0:i.htmlLabels);for(const P in H)G?(b+=`
|
|
.${P} > * { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} span { ${H[P].styles.join(" !important; ")} !important; }`):(b+=`
|
|
.${P} path { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} rect { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} polygon { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} ellipse { ${H[P].styles.join(" !important; ")} !important; }`,b+=`
|
|
.${P} circle { ${H[P].styles.join(" !important; ")} !important; }`,H[P].textStyles&&(b+=`
|
|
.${P} tspan { ${H[P].textStyles.join(" !important; ")} !important; }`))}const S=((H,G)=>serialize(compile(`${H}{${G}}`),stringify))(`#${e}`,getStyles$1(g,b,l.themeVariables)),R=document.createElement("style");R.innerHTML=`#${e} `+S,p.insertBefore(R,m);try{await h.renderer.draw(t,e,pkg.version,h)}catch(H){throw errorRenderer.draw(t,e,pkg.version),H}u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=u.select("#d"+e).node().innerHTML;if(log$1.debug("cnf.arrowMarkerAbsolute",l.arrowMarkerAbsolute),!evaluate(l.arrowMarkerAbsolute)&&l.securityLevel!=="sandbox"&&(L=L.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),L=decodeEntities(L),L=L.replace(/<br>/g,"<br/>"),l.securityLevel==="sandbox"){const H=u.select("#d"+e+" svg").node(),G="100%";let P="100%";H&&(P=H.viewBox.baseVal.height+"px"),L=`<iframe style="width:${G};height:${P};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+L+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
|
The \u201Ciframe\u201D tag is not supported by your browser.
|
|
</iframe>`}else l.securityLevel!=="loose"&&(L=purify.sanitize(L,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(typeof r<"u")switch(g){case"flowchart":case"flowchart-v2":r(L,flowDb.bindFunctions);break;case"gantt":r(L,ganttDb.bindFunctions);break;case"class":case"classDiagram":r(L,classDb.bindFunctions);break;default:r(L)}else log$1.debug("CB = undefined!");attachFunctions();const N=l.securityLevel==="sandbox"?"#i"+e:"#d"+e,F=select$1(N).node();if(F&&"remove"in F&&F.remove(),f)throw f;return L};let currentDirective={};const parseDirective=function(e,t,r,n){try{if(t!==void 0)switch(t=t.trim(),r){case"open_directive":currentDirective={};break;case"type_directive":if(!currentDirective)throw new Error("currentDirective is undefined");currentDirective.type=t.toLowerCase();break;case"arg_directive":if(!currentDirective)throw new Error("currentDirective is undefined");currentDirective.args=JSON.parse(t);break;case"close_directive":handleDirective(e,currentDirective,n),currentDirective=void 0;break}}catch(i){log$1.error(`Error while rendering sequenceDiagram directive: ${t} jison context: ${r}`),log$1.error(i.message)}},handleDirective=function(e,t,r){switch(log$1.debug(`Directive type=${t.type} with args:`,t.args),t.type){case"init":case"initialize":{["config"].forEach(n=>{typeof t.args[n]<"u"&&(r==="flowchart-v2"&&(r="flowchart"),t.args[r]=t.args[n],delete t.args[n])}),log$1.debug("sanitize in handleDirective",t.args),directiveSanitizer(t.args),log$1.debug("sanitize in handleDirective (done)",t.args),addDirective(t.args);break}case"wrap":case"nowrap":e&&e.setWrap&&e.setWrap(t.type==="wrap");break;case"themeCss":log$1.warn("themeCss encountered");break;default:log$1.warn(`Unhandled directive: source: '%%{${t.type}: ${JSON.stringify(t.args?t.args:{})}}%%`,t);break}};function initialize$1(e={}){e.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),saveConfigFromInitialize(e),(e==null?void 0:e.theme)&&e.theme in theme?e.themeVariables=theme[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=theme.default.getThemeVariables(e.themeVariables));const t=typeof e=="object"?setSiteConfig(e):getSiteConfig();setLogLevel$1(t.logLevel),addDiagrams()}const mermaidAPI=Object.freeze({render:render$2,renderAsync:renderAsync$1,parse:parse$1,parseAsync:parseAsync$1,parseDirective,initialize:initialize$1,getConfig:getConfig$1,setConfig,getSiteConfig,updateSiteConfig,reset:()=>{reset()},globalReset:()=>{reset(defaultConfig)},defaultConfig});setLogLevel$1(getConfig$1().logLevel);reset(getConfig$1());let externalDiagramsRegistered=!1;const init$1=async function(e,t,r){try{externalDiagramsRegistered?await initThrowsErrorsAsync(e,t,r):initThrowsErrors(e,t,r)}catch(n){log$1.warn("Syntax Error rendering"),isDetailedError(n)&&log$1.warn(n.str),mermaid.parseError&&mermaid.parseError(n)}},handleError=(e,t,r)=>{log$1.warn(e),isDetailedError(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},initThrowsErrors=function(e,t,r){const n=mermaidAPI.getConfig();e&&(mermaid.sequenceConfig=e),log$1.debug(`${r?"":"No "}Callback function found`);let i;if(typeof t>"u")i=document.querySelectorAll(".mermaid");else if(typeof t=="string")i=document.querySelectorAll(t);else if(t instanceof HTMLElement)i=[t];else if(t instanceof NodeList)i=t;else throw new Error("Invalid argument nodes for mermaid.init");log$1.debug(`Found ${i.length} diagrams`),typeof(e==null?void 0:e.startOnLoad)<"u"&&(log$1.debug("Start On Load: "+(e==null?void 0:e.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:e==null?void 0:e.startOnLoad}));const o=new utils.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let l;const u=[];for(const h of Array.from(i)){log$1.info("Rendering diagram: "+h.id);/*! Check if previously processed */if(h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const f=`mermaid-${o.next()}`;l=h.innerHTML,l=utils.entityDecode(l).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=utils.detectInit(l);d&&log$1.debug("Detected early reinit: ",d);try{mermaidAPI.render(f,l,(g,p)=>{h.innerHTML=g,typeof r<"u"&&r(f),p&&p(h)},h)}catch(g){handleError(g,u,mermaid.parseError)}}if(u.length>0)throw u[0]},registerLazyLoadedDiagrams=e=>{for(const{id:t,detector:r,loader:n}of e)addDetector(t,r,n)},loadExternalDiagrams=async e=>{log$1.debug(`Loading ${e.length} external diagrams`);const r=(await Promise.allSettled(e.map(async({id:n,detector:i,loader:o})=>{const{diagram:l}=await o();registerDiagram(n,l,i)}))).filter(n=>n.status==="rejected");if(r.length>0){log$1.error(`Failed to load ${r.length} external diagrams`);for(const n of r)log$1.error(n);throw new Error(`Failed to load ${r.length} external diagrams`)}},initThrowsErrorsAsync=async function(e,t,r){const n=mermaidAPI.getConfig();e&&(mermaid.sequenceConfig=e),log$1.debug(`${r?"":"No "}Callback function found`);let i;if(typeof t>"u")i=document.querySelectorAll(".mermaid");else if(typeof t=="string")i=document.querySelectorAll(t);else if(t instanceof HTMLElement)i=[t];else if(t instanceof NodeList)i=t;else throw new Error("Invalid argument nodes for mermaid.init");log$1.debug(`Found ${i.length} diagrams`),typeof(e==null?void 0:e.startOnLoad)<"u"&&(log$1.debug("Start On Load: "+(e==null?void 0:e.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:e==null?void 0:e.startOnLoad}));const o=new utils.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let l;const u=[];for(const h of Array.from(i)){log$1.info("Rendering diagram: "+h.id);/*! Check if previously processed */if(h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const f=`mermaid-${o.next()}`;l=h.innerHTML,l=utils.entityDecode(l).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=utils.detectInit(l);d&&log$1.debug("Detected early reinit: ",d);try{await mermaidAPI.renderAsync(f,l,(g,p)=>{h.innerHTML=g,typeof r<"u"&&r(f),p&&p(h)},h)}catch(g){handleError(g,u,mermaid.parseError)}}if(u.length>0)throw u[0]},initialize$2=function(e){mermaidAPI.initialize(e)},registerExternalDiagrams=async(e,{lazyLoad:t=!0}={})=>{t?registerLazyLoadedDiagrams(e):await loadExternalDiagrams(e),externalDiagramsRegistered=!0},contentLoaded=function(){if(mermaid.startOnLoad){const{startOnLoad:e}=mermaidAPI.getConfig();e&&mermaid.init()}};if(typeof document<"u"){/*!
|
|
* Wait for document loaded before starting the execution
|
|
*/window.addEventListener("load",contentLoaded,!1)}const setParseErrorHandler=function(e){mermaid.parseError=e},parse$2=e=>mermaidAPI.parse(e,mermaid.parseError),executionQueue=[];let executionQueueRunning=!1;const executeQueue=async()=>{if(!executionQueueRunning){for(executionQueueRunning=!0;executionQueue.length>0;){const e=executionQueue.shift();if(e)try{await e()}catch(t){log$1.error("Error executing queue",t)}}executionQueueRunning=!1}},parseAsync=e=>new Promise((t,r)=>{const n=()=>new Promise((i,o)=>{mermaidAPI.parseAsync(e,mermaid.parseError).then(l=>{i(l),t(l)},l=>{log$1.error("Error parsing",l),o(l),r(l)})});executionQueue.push(n),executeQueue()}),renderAsync=(e,t,r,n)=>new Promise((i,o)=>{const l=()=>new Promise((u,h)=>{mermaidAPI.renderAsync(e,t,r,n).then(f=>{u(f),i(f)},f=>{log$1.error("Error parsing",f),h(f),o(f)})});executionQueue.push(l),executeQueue()}),mermaid={startOnLoad:!0,diagrams:{},mermaidAPI,parse:parse$2,parseAsync,render:mermaidAPI.render,renderAsync,init:init$1,initThrowsErrors,initThrowsErrorsAsync,registerExternalDiagrams,initialize:initialize$2,parseError:void 0,contentLoaded,setParseErrorHandler},id="mindmap",detector=e=>e.match(/^\s*mindmap/)!==null,loader=async()=>{const{diagram:e}=await __vitePreload(()=>import("./diagram-definition.e1071f13-96a6dc25.js"),[],import.meta.url);return{id,diagram:e}},plugin={id,detector,loader},initialize=mermaid.registerExternalDiagrams([plugin]),init=async()=>{await initialize},render=async(e,t,r,n)=>{mermaid.initialize(e),await init(),await mermaid.mermaidAPI.renderAsync(r,t,n)},parse=async e=>(await init(),await mermaid.parseAsync(e)),loadStateFromURL=()=>{loadState(window.location.hash.slice(1))},syncDiagram=()=>{updateCodeStore({updateDiagram:!0})},initHandler=async()=>{applyMigrations(),await initLoading("Loading Mermaid...",init()),loadStateFromURL(),await initLoading("Loading Gist...",loadDataFromUrl().catch(console.error)),syncDiagram(),initURLSubscription(),await initAnalytics(),await(analytics==null?void 0:analytics.page())},isMac=navigator.platform.toUpperCase().includes("MAC"),cmdKey=isMac?"Cmd":"Ctrl";let count=0;const errorDebug=(e=100)=>{if(count+=1,count>e){console.log(count,e);debugger}};class AsyncQueue{constructor(t){Yr(this,"queue",[]);Yr(this,"running",!1);this.processor=t}async process(t){if(this.queue.push(t),!this.running){for(this.running=!0;this.queue.length>0;){const r=this.queue.shift();r&&await this.processor(r)}this.running=!1}}}const defaultState={code:`graph TD
|
|
A[Christmas] -->|Get money| B(Go shopping)
|
|
B --> C{Let me think}
|
|
C -->|One| D[Laptop]
|
|
C -->|Two| E[iPhone]
|
|
C -->|Three| F[fa:fa-car Car]
|
|
`,mermaid:JSON.stringify({theme:"default"},null,2),autoSync:!0,updateDiagram:!0},urlParseFailedState=`graph TD
|
|
A[Loading URL failed. We can try to figure out why.] -->|Decode JSON| B(Please check the console to see the JSON and error details.)
|
|
B --> C{Is the JSON correct?}
|
|
C -->|Yes| D(Please Click here to Raise an issue in github.<br/>Including the broken link in the issue <br/> will speed up the fix.)
|
|
C -->|No| E{Did someone <br/>send you this link?}
|
|
E -->|Yes| F[Ask them to send <br/>you the complete link]
|
|
E -->|No| G{Did you copy <br/> the complete URL?}
|
|
G --> |Yes| D
|
|
G --> |"No :("| H(Try using the Timeline tab in History <br/>from same browser you used to create the diagram.)
|
|
click D href "https://github.com/mermaid-js/mermaid-live-editor/issues/new?assignees=&labels=bug&template=bug_report.md&title=Broken%20link" "Raise issue"`,inputStateStore=persist(writable(defaultState),localStorage(),"codeStore"),currentState=(()=>{var t;const e=get_store_value(inputStateStore);return{...e,serialized:serializeState(e),errorMarkers:[],error:void 0,editorMode:(t=e.editorMode)!=null?t:"code"}})();let q;const processState=async e=>{var r;const t={...e,serialized:"",errorMarkers:[],error:void 0,editorMode:(r=e.editorMode)!=null?r:"code"};try{t.serialized=serializeState(e),await parse(e.code),JSON.parse(e.mermaid)}catch(n){if(t.error=n,errorDebug(),console.error(n),"hash"in n){const{loc:{first_line:i,last_line:o,first_column:l,last_column:u}}=n.hash;try{const h={severity:8,startLineNumber:i,startColumn:l,endLineNumber:o,endColumn:u+1,message:n.str};t.errorMarkers=[h]}catch(h){console.error("Error without line helper",h)}}}return t},stateStore=derived([inputStateStore],([e],t)=>{q||(q=new AsyncQueue(async r=>{const n=await processState(r);t(n)})),q.process(e)},currentState),loadState=e=>{let t;console.log(`Loading '${e}'`);try{t=deserializeState(e);const r=typeof t.mermaid=="string"?JSON.parse(t.mermaid):t.mermaid;r.securityLevel&&r.securityLevel!=="strict"&&confirm(`Removing "securityLevel":"${r.securityLevel}" from the config for safety.
|
|
Click Cancel if you trust the source of this Diagram.`)&&delete r.securityLevel,t.mermaid=JSON.stringify(r,null,2)}catch(r){t=get_store_value(inputStateStore),e&&(console.error("Init error",r),t.code=urlParseFailedState,t.mermaid=defaultState.mermaid)}updateCodeStore(t)},updateCodeStore=e=>{inputStateStore.update(t=>({...t,...e}))};let prompted=!1;const updateCode=(e,{updateDiagram:t=!1,resetPanZoom:r=!1}={})=>{console.log("updateCode",e);const n=countLines(e);if(saveStatistics(e),errorDebug(),n>50&&!prompted&&get_store_value(stateStore).autoSync){const i=confirm(`Long diagram detected. Turn off Auto Sync? Use ${cmdKey} + Enter or click the sync logo to manually sync.`);prompted=!0,i&&updateCodeStore({autoSync:!1})}inputStateStore.update(i=>(r&&(i.pan=void 0,i.zoom=void 0),{...i,code:e,updateDiagram:t}))},updateConfig=e=>{console.log("updateConfig",e),inputStateStore.update(t=>({...t,mermaid:e}))},toggleDarkTheme=e=>{inputStateStore.update(t=>{const r=JSON.parse(t.mermaid);return(!r.theme||["dark","default"].includes(r.theme))&&(r.theme=e?"dark":"default"),{...t,mermaid:JSON.stringify(r,null,2)}})};let urlDebounce;const initURLSubscription=()=>{stateStore.subscribe(({serialized:e})=>{clearTimeout(urlDebounce),urlDebounce=window.setTimeout(()=>{history.replaceState(void 0,"",`#${e}`)},250)})},getStateString=()=>JSON.stringify(get_store_value(inputStateStore));export{AsyncQueue as A,render as B,getAugmentedNamespace as C,Color$2 as D,select$1 as E,lighten$1 as F,darken$1 as G,_$D as _,localStorage as a,logEvent as b,syncDiagram as c,updateConfig as d,errorDebug as e,analytics as f,pakoSerde as g,encode as h,initHandler as i,inputStateStore as j,historyStore as k,loadingStateStore as l,historyModeStore as m,loaderHistoryStore as n,getStateString as o,persist as p,getPreviousState as q,restoreHistory as r,stateStore as s,toggleDarkTheme as t,updateCode as u,addHistoryEntry as v,clearHistoryData as w,updateCodeStore as x,cmdKey as y,commonjsGlobal$1 as z};
|