Files
mermaid-live-editor/_app/immutable/chunks/state.Bw4wwf0I.js
T
2024-08-28 12:37:07 +00:00

200 lines
586 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./zenuml-definition-ddfc84a5.DtWujIuw.js","./preload-helper.D6kgxu3v.js","./dagre-CQ6OS2HX.VLdvIZ2v.js","./graph.CU6OQpmX.js","./_baseUniq.P9brck0W.js","./layout.6fN4oH7v.js","./_basePickBy.BF4wbNuw.js","./json.PsJeCYKs.js","./clone.Crcj8XFp.js","./c4Diagram-ZHOUKFWV.CMYDrXTc.js","./chunk-AIUMCIBP.CArqa94c.js","./flowDiagram-TGP4CI55.CK1FTbDV.js","./chunk-FUIDI54P.BQCci2DX.js","./chunk-Z2VRG6XP.BWb9lFkO.js","./channel.CVLkdffX.js","./erDiagram-762WSSOR.DCEd0AxH.js","./gitGraphDiagram-LGD5RUNZ.C306g6DN.js","./chunk-JJENOPKO.CV_pxMn8.js","./chunk-FBCX6ULS.C1DVjj5H.js","./gitGraph-F2EDSAW4.DoDanyNy.js","./ganttDiagram-GAYIUD5S.BBAoyECC.js","./linear.BkSH_MAT.js","./init.Gi6I4Gst.js","./infoDiagram-GSXZ5C4N.B0PH93nI.js","./pieDiagram-WEX7LNAG.ClS9n4MM.js","./arc.BfDUOhLO.js","./ordinal.BYWQX77i.js","./quadrantDiagram-SRYJ5FP7.vGRhXkdR.js","./xychartDiagram-BZZU7QT5.ymDHOT10.js","./requirementDiagram-V7TESSIR.DaIojSeB.js","./sequenceDiagram-6SD7JOPP.CaKL0Twr.js","./classDiagram-MQQPYQM5.NcXMI_ZR.js","./chunk-IBIA4ERB.C6cxyJx8.js","./classDiagram-v2-4S5WAI72.DfAlJAdL.js","./chunk-PDCO53Z4.DZ3jrKHf.js","./stateDiagram-N22R6T2Y.YHzsVoVt.js","./chunk-SVGOEX7Z.CpguMRwc.js","./stateDiagram-v2-QXVA2PVL.Dy6xYaFw.js","./journeyDiagram-35ZZFJAM.BxiBLFMB.js","./timeline-definition-SFF34UE4.DU6yl4Re.js","./sankeyDiagram-XVFEVEVI.BjBmXFwF.js","./diagram-KYCGQLJB.BT9Fkfmg.js","./blockDiagram-V6UOASA5.BSZaBRqU.js"])))=>i.map(i=>d[i]);
var Rr=Object.defineProperty;var yr=ee=>{throw TypeError(ee)};var Br=(ee,te,re)=>te in ee?Rr(ee,te,{enumerable:!0,configurable:!0,writable:!0,value:re}):ee[te]=re;var Ye=(ee,te,re)=>Br(ee,typeof te!="symbol"?te+"":te,re),Or=(ee,te,re)=>te.has(ee)||yr("Cannot "+re);var xr=(ee,te,re)=>te.has(ee)?yr("Cannot add the same private member more than once"):te instanceof WeakSet?te.add(ee):te.set(ee,re);var $t=(ee,te,re)=>(Or(ee,te,"access private method"),re);import{w as writable,d as derived}from"./index.BIOmDrk3.js";import{_ as __vitePreload}from"./preload-helper.D6kgxu3v.js";import{T as get_store_value}from"./scheduler.Cj2_EUWt.js";const defaultLoading={loading:!1},loadingStateStore=writable(defaultLoading),initLoading=async(ee,te)=>{loadingStateStore.set({loading:!0,message:ee});const re=await te;return loadingStateStore.set({loading:!1}),re};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(ee){return ee&&ee.__esModule&&Object.prototype.hasOwnProperty.call(ee,"default")?ee.default:ee}var bundle={};(function(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&&process.release.name==="node"&&(Module=eval("require")("module"));var ESSerializer=function(){function ee(){}return ee.throwErrorIfInNonNodeEnvironment=function(){if(!Module)throw new Error("Cannot intercept require in non-Node environment.")},ee.interceptRequire=function(){this.isRequireIntercepted||(this.isRequireIntercepted=!0,this.throwErrorIfInNonNodeEnvironment(),ee.originRequire=Module.prototype.require,Module.prototype.require=function(){var te=ee.originRequire.apply(this,arguments),re=te.name;return ee.requiredClasses[re]||(ee.requiredClasses[re]=te),te})},ee.stopInterceptRequire=function(){this.throwErrorIfInNonNodeEnvironment(),Module.prototype.require=ee.originRequire,this.isRequireIntercepted=!1},ee.isInterceptingRequire=function(){return this.isRequireIntercepted},ee.getRequiredClasses=function(){return this.requiredClasses},ee.clearRequiredClasses=function(){this.requiredClasses={}},ee.registerClass=function(te){this.registeredClasses.push(te)},ee.registerClasses=function(te){this.registeredClasses=this.registeredClasses.concat(te)},ee.clearRegisteredClasses=function(){this.registeredClasses=[]},ee.serialize=function(te,re){return re===void 0&&(re={}),JSON.stringify(serializer_1.getSerializeValueWithClassName(te,re))},ee.deserialize=function(te,re,ie){return re===void 0&&(re=[]),ie===void 0&&(ie={}),deserializer_1.deserializeFromParsedObj(JSON.parse(te),Object.values(this.requiredClasses).concat(this.registeredClasses).concat(re),ie)},ee.originRequire=null,ee.isRequireIntercepted=!1,ee.requiredClasses={},ee.registeredClasses=[],ee}();module.exports=ESSerializer},917:function(ee,te){var re=this&&this.__spreadArrays||function(){for(var Me=0,Re=0,Fe=arguments.length;Re<Fe;Re++)Me+=arguments[Re].length;var Pe=Array(Me),He=0;for(Re=0;Re<Fe;Re++)for(var qe=arguments[Re],Ue=0,Ge=qe.length;Ue<Ge;Ue++,He++)Pe[He]=qe[Ue];return Pe};Object.defineProperty(te,"__esModule",{value:!0}),te.TO_STRING_FIELD=te.TIMESTAMP_FIELD=te.OPTIONS_FIELD=te.CLASS_NAME_FIELD=te.BOOLEAN_FIELD=te.ARRAY_FIELD=te.BUILTIN_TYPE_UNDEFINED=te.BUILTIN_TYPE_NOT_FINITE=te.BUILTIN_TYPE_BIG_INT=te.BUILTIN_CLASS_AGGREGATE_ERROR=te.BUILTIN_CLASS_URI_ERROR=te.BUILTIN_CLASS_TYPE_ERROR=te.BUILTIN_CLASS_SYNTAX_ERROR=te.BUILTIN_CLASS_REFERENCE_ERROR=te.BUILTIN_CLASS_RANGE_ERROR=te.BUILTIN_CLASS_EVAL_ERROR=te.BUILTIN_CLASS_ERROR=te.BUILTIN_CLASS_STRING=te.BUILTIN_CLASS_SET=te.BUILTIN_CLASS_REGEXP=te.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT=te.BUILTIN_CLASS_INTL_PLURALRULES=te.BUILTIN_CLASS_INTL_NUMBERFORMAT=te.BUILTIN_CLASS_INTL_LOCALE=te.BUILTIN_CLASS_INTL_LISTFORMAT=te.BUILTIN_CLASS_INTL_DATETIMEFORMAT=te.BUILTIN_CLASS_INTL_COLLATOR=te.BUILTIN_CLASS_DATE=te.BUILTIN_CLASS_DATAVIEW=te.BUILTIN_CLASS_BOOLEAN=te.BUILTIN_CLASS_SHAREDARRAYBUFFER=te.BUILTIN_CLASS_ARRAYBUFFER=te.BUILTIN_CLASS_BIGUINT64ARRAY=te.BUILTIN_CLASS_BIGINT64ARRAY=te.BUILTIN_CLASS_FLOAT64ARRAY=te.BUILTIN_CLASS_FLOAT32ARRAY=te.BUILTIN_CLASS_UINT32ARRAY=te.BUILTIN_CLASS_INT32ARRAY=te.BUILTIN_CLASS_UINT16ARRAY=te.BUILTIN_CLASS_INT16ARRAY=te.BUILTIN_CLASS_UINT8CLAMPEDARRAY=te.BUILTIN_CLASS_UINT8ARRAY=te.BUILTIN_CLASS_INT8ARRAY=te.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED=te.ALL_BUILTIN_INTLS=te.ALL_BUILTIN_ERRORS=te.ALL_BUILTIN_ARRAYS=te.ESSERIALIZER_NULL=void 0,te.ESSERIALIZER_NULL="__ESSERIALIZER_NULL__",te.ARRAY_FIELD="ess_arr",te.BOOLEAN_FIELD="ess_bool",te.CLASS_NAME_FIELD="ess_cn",te.OPTIONS_FIELD="ess_opt",te.TIMESTAMP_FIELD="ess_ts",te.TO_STRING_FIELD="ess_str";var ie="Int8Array";te.BUILTIN_CLASS_INT8ARRAY=ie;var ne="Uint8Array";te.BUILTIN_CLASS_UINT8ARRAY=ne;var ae="Uint8ClampedArray";te.BUILTIN_CLASS_UINT8CLAMPEDARRAY=ae;var oe="Int16Array";te.BUILTIN_CLASS_INT16ARRAY=oe;var se="Uint16Array";te.BUILTIN_CLASS_UINT16ARRAY=se;var le="Int32Array";te.BUILTIN_CLASS_INT32ARRAY=le;var ce="Uint32Array";te.BUILTIN_CLASS_UINT32ARRAY=ce;var he="Float32Array";te.BUILTIN_CLASS_FLOAT32ARRAY=he;var de="Float64Array";te.BUILTIN_CLASS_FLOAT64ARRAY=de;var ue="BigInt64Array";te.BUILTIN_CLASS_BIGINT64ARRAY=ue;var fe="BigUint64Array";te.BUILTIN_CLASS_BIGUINT64ARRAY=fe,te.BUILTIN_CLASS_ARRAYBUFFER="ArrayBuffer",te.BUILTIN_CLASS_SHAREDARRAYBUFFER="SharedArrayBuffer",te.BUILTIN_CLASS_BOOLEAN="Boolean",te.BUILTIN_CLASS_DATAVIEW="DataView",te.BUILTIN_CLASS_DATE="Date";var pe="Collator";te.BUILTIN_CLASS_INTL_COLLATOR=pe;var ge="DateTimeFormat";te.BUILTIN_CLASS_INTL_DATETIMEFORMAT=ge;var ye="ListFormat";te.BUILTIN_CLASS_INTL_LISTFORMAT=ye,te.BUILTIN_CLASS_INTL_LOCALE="Locale";var _e="NumberFormat";te.BUILTIN_CLASS_INTL_NUMBERFORMAT=_e;var me="PluralRules";te.BUILTIN_CLASS_INTL_PLURALRULES=me;var we="RelativeTimeFormat";te.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT=we,te.BUILTIN_CLASS_REGEXP="RegExp",te.BUILTIN_CLASS_SET="Set";var xe="String";te.BUILTIN_CLASS_STRING=xe;var Te="Error";te.BUILTIN_CLASS_ERROR=Te;var ke="EvalError";te.BUILTIN_CLASS_EVAL_ERROR=ke;var Ce="RangeError";te.BUILTIN_CLASS_RANGE_ERROR=Ce;var Ae="ReferenceError";te.BUILTIN_CLASS_REFERENCE_ERROR=Ae;var ve="SyntaxError";te.BUILTIN_CLASS_SYNTAX_ERROR=ve;var Ee="TypeError";te.BUILTIN_CLASS_TYPE_ERROR=Ee;var Se="URIError";te.BUILTIN_CLASS_URI_ERROR=Se;var Ne="AggregateError";te.BUILTIN_CLASS_AGGREGATE_ERROR=Ne,te.BUILTIN_TYPE_BIG_INT="BI",te.BUILTIN_TYPE_NOT_FINITE="NF",te.BUILTIN_TYPE_UNDEFINED="UD";var ze=[ie,ne,ae,oe,se,le,ce,he,de,ue,fe];te.ALL_BUILTIN_ARRAYS=ze;var Be=[Te,ke,Ce,Ae,ve,Ee,Se,Ne];te.ALL_BUILTIN_ERRORS=Be;var Le=[pe,ge,ye,_e,me,we];te.ALL_BUILTIN_INTLS=Le;var Ie=re([xe],ze);te.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED=Ie},496:function(ee,te,re){var ie=this&&this.__spreadArrays||function(){for(var _e=0,me=0,we=arguments.length;me<we;me++)_e+=arguments[me].length;var xe=Array(_e),Te=0;for(me=0;me<we;me++)for(var ke=arguments[me],Ce=0,Ae=ke.length;Ce<Ae;Ce++,Te++)xe[Te]=ke[Ce];return xe};Object.defineProperty(te,"__esModule",{value:!0}),te.getParentClassName=te.getClassMappingFromClassArray=te.deserializeFromParsedObjWithClassMapping=te.deserializeFromParsedObj=void 0;var ne=re(821),ae=re(917),oe=/^\s*class\s+/;function se(_e,me,we){if(we===void 0&&(we={}),ne.notObject(_e))return _e;if(Array.isArray(_e))return le(_e,me);var xe=_e[ae.CLASS_NAME_FIELD],Te=function(Ae,ve,Ee){switch(Ae){case ae.BUILTIN_CLASS_INT8ARRAY:return ce(ve[ae.ARRAY_FIELD],Int8Array);case ae.BUILTIN_CLASS_UINT8ARRAY:return ce(ve[ae.ARRAY_FIELD],Uint8Array);case ae.BUILTIN_CLASS_UINT8CLAMPEDARRAY:return ce(ve[ae.ARRAY_FIELD],Uint8ClampedArray);case ae.BUILTIN_CLASS_INT16ARRAY:return ce(ve[ae.ARRAY_FIELD],Int16Array);case ae.BUILTIN_CLASS_UINT16ARRAY:return ce(ve[ae.ARRAY_FIELD],Uint16Array);case ae.BUILTIN_CLASS_INT32ARRAY:return ce(ve[ae.ARRAY_FIELD],Int32Array);case ae.BUILTIN_CLASS_UINT32ARRAY:return ce(ve[ae.ARRAY_FIELD],Uint32Array);case ae.BUILTIN_CLASS_FLOAT32ARRAY:return ce(ve[ae.ARRAY_FIELD],Float32Array);case ae.BUILTIN_CLASS_FLOAT64ARRAY:return ce(ve[ae.ARRAY_FIELD],Float64Array);case ae.BUILTIN_CLASS_BIGINT64ARRAY:return he(ve[ae.ARRAY_FIELD],BigInt64Array);case ae.BUILTIN_CLASS_BIGUINT64ARRAY:return he(ve[ae.ARRAY_FIELD],BigUint64Array);case ae.BUILTIN_TYPE_BIG_INT:return de(ve[ae.TO_STRING_FIELD]);case ae.BUILTIN_TYPE_UNDEFINED:return;case ae.BUILTIN_TYPE_NOT_FINITE:return ne.getValueFromToStringResult(ve[ae.TO_STRING_FIELD]);case ae.BUILTIN_CLASS_ARRAYBUFFER:return Se=ve[ae.ARRAY_FIELD],new Uint8Array(Se).buffer;case ae.BUILTIN_CLASS_SHAREDARRAYBUFFER:return function(Ne){var ze=new SharedArrayBuffer(Ne.length),Be=new Uint8Array(ze);return Ne.forEach(function(Le,Ie){Be[Ie]=Le}),ze}(ve[ae.ARRAY_FIELD]);case ae.BUILTIN_CLASS_BOOLEAN:return function(Ne){return new Boolean(Ne[ae.BOOLEAN_FIELD])}(ve);case ae.BUILTIN_CLASS_DATAVIEW:return function(Ne){return new DataView(new Uint8Array(Ne).buffer)}(ve[ae.ARRAY_FIELD]);case ae.BUILTIN_CLASS_DATE:return function(Ne){return typeof Ne[ae.TIMESTAMP_FIELD]=="number"?new Date(Ne[ae.TIMESTAMP_FIELD]):null}(ve);case ae.BUILTIN_CLASS_INTL_COLLATOR:return ue(ve,Intl.Collator);case ae.BUILTIN_CLASS_INTL_DATETIMEFORMAT:return ue(ve,Intl.DateTimeFormat);case ae.BUILTIN_CLASS_INTL_LISTFORMAT:return ue(ve,Intl.ListFormat);case ae.BUILTIN_CLASS_INTL_LOCALE:return new Intl.Locale(ve[ae.TO_STRING_FIELD]);case ae.BUILTIN_CLASS_INTL_NUMBERFORMAT:return ue(ve,Intl.NumberFormat);case ae.BUILTIN_CLASS_INTL_PLURALRULES:return ue(ve,Intl.PluralRules);case ae.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT:return ue(ve,Intl.RelativeTimeFormat);case ae.BUILTIN_CLASS_REGEXP:return function(Ne){var ze=Ne[ae.TO_STRING_FIELD],Be=ze.lastIndexOf("/");return new RegExp(ze.substring(1,Be),ze.substring(Be+1))}(ve);case ae.BUILTIN_CLASS_SET:return function(Ne,ze){return new Set(le(Ne[ae.ARRAY_FIELD],ze))}(ve,Ee);case ae.BUILTIN_CLASS_STRING:return function(Ne){return new String(Ne[ae.TO_STRING_FIELD])}(ve);case ae.BUILTIN_CLASS_ERROR:return fe(ve,Error);case ae.BUILTIN_CLASS_EVAL_ERROR:return fe(ve,EvalError);case ae.BUILTIN_CLASS_RANGE_ERROR:return fe(ve,RangeError);case ae.BUILTIN_CLASS_REFERENCE_ERROR:return fe(ve,ReferenceError);case ae.BUILTIN_CLASS_SYNTAX_ERROR:return fe(ve,SyntaxError);case ae.BUILTIN_CLASS_TYPE_ERROR:return fe(ve,TypeError);case ae.BUILTIN_CLASS_URI_ERROR:return fe(ve,URIError);case ae.BUILTIN_CLASS_AGGREGATE_ERROR:return fe(ve,AggregateError);default:return ae.ESSERIALIZER_NULL}var Se}(xe,_e,me);if(Te!==ae.ESSERIALIZER_NULL)return Te;if(xe&&!me[xe])throw new Error("Class "+xe+" not found");var ke=[];we.fieldsForConstructorParameters&&(ke=we.fieldsForConstructorParameters.map(function(Ae){return Ae in _e?_e[Ae]:{}}));var Ce=function(Ae,ve){if(!Ae)return{};for(var Ee,Se=Math.max(Ae.length-ve.length,0),Ne=[{},0,"",null],ze=Ne.shift();!Ee&&ze!==void 0;)Ee=pe(Ae,ve.concat(Array.from(Array(Se),function(){return ze}))),ze=Se===0?void 0:Ne.shift();return Ee||(Ee={},Object.setPrototypeOf(Ee,Ae?Ae.prototype:Object.prototype)),Ee}(me[xe],ke);return function(Ae,ve,Ee,Se){for(var Ne in ve){var ze=ve[Ne];if(!Se.ignoreProperties||!Se.ignoreProperties.includes(Ne))if(Se.rawProperties&&Se.rawProperties.includes(Ne))Ae[Ne]=JSON.stringify(ze);else{var Be=Object.getOwnPropertyDescriptor(Ae,Ne);Le=ze,Ie=Be,Ne===ae.CLASS_NAME_FIELD||Ie&&(typeof Ie.set=="function"||Ie.writable===!1&&typeof Le!="object")||(Be&&Be.writable===!1&&typeof ze=="object"?ge(Ae[Ne],ze,Ee):Ae[Ne]=se(ze,Ee))}}var Le,Ie;return Ae}(Ce,_e,me,we)}function le(_e,me){return _e.map(function(we){return se(we,me)})}function ce(_e,me){return new me(_e)}function he(_e,me){return new me(_e.map(function(we){return de(we[ae.TO_STRING_FIELD])}))}function de(_e){return BigInt(_e)}function ue(_e,me){var we=_e[ae.OPTIONS_FIELD],xe=we.locale;return delete we.locale,new me(xe,we)}function fe(_e,me){var we;return delete(we=_e.message?new me(_e.message):new me).stack,_e.name&&(we.name=_e.name),_e.stack&&(we.stack=_e.stack),me===AggregateError&&(we.errors=se(_e.errors,{})),we}function pe(_e,me){var we;try{if(oe.test(_e.toString()))we=new(_e.bind.apply(_e,ie([void 0],me)));else{var xe=_e.prototype.constructor;xe.name==="Object"&&(xe=_e),we=Object.create(xe.prototype),xe.call(we,me)}}catch{we=null}return we}function ge(_e,me,we){for(var xe in me){var Te=Object.getOwnPropertyDescriptor(_e,xe);Te&&Te.writable!==!0&&typeof Te.set!="function"||(_e[xe]=se(me[xe],we))}}function ye(_e){_e===void 0&&(_e=[]);var me={};return _e.forEach(function(we){if(ne.isClass(we)){var xe=we.name,Te=me[xe];Te&&Te!==we&&console.warn("WARNING: Found class definition with the same name: "+xe),me[xe]=we}}),me}te.deserializeFromParsedObj=function(_e,me,we){return se(_e,ye(me),we)},te.deserializeFromParsedObjWithClassMapping=se,te.getClassMappingFromClassArray=ye,te.getParentClassName=function(_e){return _e.prototype.__proto__.constructor.name}},821:(ee,te)=>{Object.defineProperty(te,"__esModule",{value:!0}),te.isClass=te.notObject=te.getValueFromToStringResult=void 0,te.notObject=function(re){return re===null||typeof re!="object"},te.getValueFromToStringResult=function(re){switch(re){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN;default:return null}},te.isClass=function(re){if(function(ie){return[Date].indexOf(ie)>=0}(re))return!0;try{Reflect.construct(String,[],re)}catch{return!1}return!0}},810:(ee,te,re)=>{Object.defineProperty(te,"__esModule",{value:!0}),te.getSerializeValueWithClassName=void 0;var ie=re(917),ne=re(821);function ae(se,le){le===void 0&&(le={});var ce=function(ue){var fe,pe,ge;return ue===void 0?((fe={})[ie.CLASS_NAME_FIELD]=ie.BUILTIN_TYPE_UNDEFINED,fe):typeof ue!="number"||isFinite(ue)?typeof ue=="bigint"?((ge={})[ie.CLASS_NAME_FIELD]=ie.BUILTIN_TYPE_BIG_INT,ge[ie.TO_STRING_FIELD]=ue.toString(),ge):ne.notObject(ue)?ue:ie.ESSERIALIZER_NULL:((pe={})[ie.CLASS_NAME_FIELD]=ie.BUILTIN_TYPE_NOT_FINITE,pe[ie.TO_STRING_FIELD]=ue.toString(),pe)}(se);if(ce!==ie.ESSERIALIZER_NULL)return ce;if(Array.isArray(se))return oe(se);var he={};if(!function(ue){var fe=ue.__proto__.constructor.name;return ie.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED.includes(fe)}(se)){if(le.ignoreProperties&&le.ignoreProperties.forEach(function(ue){delete se[ue]}),le.interceptProperties)for(var de in le.interceptProperties)se[de]=le.interceptProperties[de].call(se,se[de]);(function(ue,fe){for(var pe in ue)typeof ue[pe]!="function"&&(fe[pe]=ae(ue[pe]))})(se,he)}return function(ue,fe){var pe=ue.__proto__.constructor.name;return pe==="Object"&&(pe=ue.constructor.name),pe!=="Object"&&(fe[ie.CLASS_NAME_FIELD]=pe,pe===ie.BUILTIN_CLASS_ARRAYBUFFER||pe===ie.BUILTIN_CLASS_SHAREDARRAYBUFFER?fe[ie.ARRAY_FIELD]=oe(Array.from(new Uint8Array(ue))):pe===ie.BUILTIN_CLASS_BOOLEAN?fe[ie.BOOLEAN_FIELD]=ue.valueOf():pe===ie.BUILTIN_CLASS_DATAVIEW?fe[ie.ARRAY_FIELD]=oe(Array.from(new Uint8Array(ue.buffer))):pe===ie.BUILTIN_CLASS_DATE?fe[ie.TIMESTAMP_FIELD]=ue.getTime():pe===ie.BUILTIN_CLASS_INTL_LOCALE||pe===ie.BUILTIN_CLASS_REGEXP?fe[ie.TO_STRING_FIELD]=ue.toString():pe===ie.BUILTIN_CLASS_SET?fe[ie.ARRAY_FIELD]=oe(Array.from(ue)):pe===ie.BUILTIN_CLASS_STRING?fe[ie.TO_STRING_FIELD]=ue.toString():ie.ALL_BUILTIN_ARRAYS.includes(pe)?fe[ie.ARRAY_FIELD]=oe(Array.from(ue)):ie.ALL_BUILTIN_ERRORS.includes(pe)?function(ge,ye,_e){ge.name!=="Error"&&(ye.name=ge.name),ge.message&&(ye.message=ge.message),ge.stack&&(ye.stack=ge.stack),_e===ie.BUILTIN_CLASS_AGGREGATE_ERROR&&(ye.errors=ae(ge.errors))}(ue,fe,pe):ie.ALL_BUILTIN_INTLS.includes(pe)&&(fe[ie.OPTIONS_FIELD]=ue.resolvedOptions())),fe}(se,he)}function oe(se){return se.map(function(le){return ae(le)})}te.getSerializeValueWithClassName=ae}},__webpack_module_cache__={};function __webpack_require__(ee){var te=__webpack_module_cache__[ee];if(te!==void 0)return te.exports;var re=__webpack_module_cache__[ee]={exports:{}};return __webpack_modules__[ee].call(re.exports,re,re.exports,__webpack_require__),re.exports}var __webpack_exports__=__webpack_require__(607),__webpack_export_target__=exports;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})()})(bundle);const ESSerializer=getDefaultExportFromCjs(bundle),alreadyWarnFor=[],warnStorageNotFound=ee=>{const te=typeof process<"u"&&!0;if(!alreadyWarnFor.includes(ee)&&!te){let re=`Unable to find the ${ee}. No data will be persisted.`;typeof window>"u"&&(re+=`
Are you running on a server? Most of storages are not available while running on a server.`),console.warn(re),alreadyWarnFor.push(ee)}},serialize$1=ee=>ESSerializer.serialize(ee),deserialize=ee=>{if(ee!=="undefined"){if(ee!=null){try{return ESSerializer.deserialize(ee)}catch{}try{return JSON.parse(ee)}catch{}}return ee}};function persist(ee,te,re){const ie=te.getValue(re);return ie!==null&&ee.set(ie),"addListener"in te&&te.addListener(re,ne=>{ee.set(ne)}),ee.subscribe(ne=>{te.setValue(re,ne)}),{...ee,delete(){te.deleteValue(re)}}}function getBrowserStorage(ee,te=!1){const re=[],ie=oe=>{const se=oe.key;if(oe.storageArea===ee)for(const{listener:le}of re.filter(({key:ce})=>ce===se))le(deserialize(oe.newValue))},ne=()=>{te&&typeof window<"u"&&window.addEventListener&&window.addEventListener("storage",ie)},ae=()=>{te&&typeof window<"u"&&window.removeEventListener&&window.removeEventListener("storage",ie)};return{addListener(oe,se){re.push({key:oe,listener:se}),re.length===1&&ne()},removeListener(oe,se){const le=re.indexOf({key:oe,listener:se});le!==-1&&re.splice(le,1),re.length===0&&ae()},getValue(oe){const se=ee.getItem(oe);return deserialize(se)},deleteValue(oe){ee.removeItem(oe)},setValue(oe,se){ee.setItem(oe,serialize$1(se))}}}function localStorage(ee=!1){return typeof window<"u"&&window.localStorage?getBrowserStorage(window.localStorage,ee):(warnStorageNotFound("window.localStorage"),noopStorage())}function noopStorage(){return{getValue(){return null},deleteValue(){},setValue(){}}}const env={rendererUrl:"https://mermaid.ink",krokiRendererUrl:"https://kroki.io",analyticsUrl:"https://p.mermaid.live",domain:"mermaid.live"};let plausible;const initAnalytics=async()=>{if(!plausible)try{const{default:ee}=await __vitePreload(async()=>{const{default:te}=await import("./index.B6CSiJCz.js");return{default:te}},[],import.meta.url);plausible=ee({domain:env.domain,hashMode:!1,apiHost:env.analyticsUrl})}catch(ee){console.log(ee),console.info("Analytics blocked ;)")}},detectType$1=ee=>{const te=["classDiagram","erDiagram","flowChart","gantt","gitGraph","graph","journey","pie","stateDiagram","quadrantChart","mindmap"],re=ee.replaceAll(/^\s*%%.*\n/g,`
`).trimStart().split(" ")[0].toLowerCase();return te.find(ne=>re.includes(ne.toLowerCase()))},countLines=ee=>{var te;return(((te=ee.match(/\n/g))==null?void 0:te.length)??0)+1},saveStatistics=({code:ee,renderTime:te,isRough:re})=>{const ie=detectType$1(ee);if(!ie)return;const ne=countLines(ee),ae=getBucket(ne),oe=getBucket(te);logEvent("render",{graphType:ie,length:ne,lengthBucket:ae,renderTimeMsBucket:oe,isRough:re})},getBucket=ee=>ee<10?"0-10":ee<25?"10-25":ee<50?"25-50":ee<100?"50-100":ee<200?"100-200":ee<500?"200-500":ee<700?"500-700":ee<1e3?"700-1000":ee<1500?"1000-1500":ee<2500?"1500-2500":ee<4500?"2500-4500":ee<7e3?"4500-7000":ee<1e4?"7000-10000":"10000+",minutesToMilliSeconds=ee=>ee*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,bannerClick:defaultDelay,version:defaultDelay},timeouts=new Map,logEvent=(ee,te)=>{if(!plausible)return;const re=te?JSON.stringify({name:ee,data:te}):ee;timeouts.has(re)?clearTimeout(timeouts.get(re)):plausible.trackEvent(ee,{props:te},{url:window.location.origin+window.location.pathname}),timeouts.set(re,window.setTimeout(()=>timeouts.delete(re),delaysPerEvent[ee]))};var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$1=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root$1.Symbol,objectProto$c=Object.prototype,hasOwnProperty$a=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(ee){var te=hasOwnProperty$a.call(ee,symToStringTag$1),re=ee[symToStringTag$1];try{ee[symToStringTag$1]=void 0;var ie=!0}catch{}var ne=nativeObjectToString$1.call(ee);return ie&&(te?ee[symToStringTag$1]=re:delete ee[symToStringTag$1]),ne}var objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString(ee){return nativeObjectToString.call(ee)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(ee){return ee==null?ee===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(ee)?getRawTag(ee):objectToString(ee)}function isObjectLike(ee){return ee!=null&&typeof ee=="object"}var symbolTag="[object Symbol]";function isSymbol(ee){return typeof ee=="symbol"||isObjectLike(ee)&&baseGetTag(ee)==symbolTag}var isArray=Array.isArray,reWhitespace=/\s/;function trimmedEndIndex(ee){for(var te=ee.length;te--&&reWhitespace.test(ee.charAt(te)););return te}var reTrimStart=/^\s+/;function baseTrim(ee){return ee&&ee.slice(0,trimmedEndIndex(ee)+1).replace(reTrimStart,"")}function isObject$1(ee){var te=typeof ee;return ee!=null&&(te=="object"||te=="function")}var NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber(ee){if(typeof ee=="number")return ee;if(isSymbol(ee))return NAN;if(isObject$1(ee)){var te=typeof ee.valueOf=="function"?ee.valueOf():ee;ee=isObject$1(te)?te+"":te}if(typeof ee!="string")return ee===0?ee:+ee;ee=baseTrim(ee);var re=reIsBinary.test(ee);return re||reIsOctal.test(ee)?freeParseInt(ee.slice(2),re?2:8):reIsBadHex.test(ee)?NAN:+ee}function identity$1(ee){return ee}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(ee){if(!isObject$1(ee))return!1;var te=baseGetTag(ee);return te==funcTag$1||te==genTag||te==asyncTag||te==proxyTag}var coreJsData=root$1["__core-js_shared__"],maskSrcKey=function(){var ee=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return ee?"Symbol(src)_1."+ee:""}();function isMasked(ee){return!!maskSrcKey&&maskSrcKey in ee}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(ee){if(ee!=null){try{return funcToString$2.call(ee)}catch{}try{return ee+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$a=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$9=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(ee){if(!isObject$1(ee)||isMasked(ee))return!1;var te=isFunction(ee)?reIsNative:reIsHostCtor;return te.test(toSource(ee))}function getValue(ee,te){return ee==null?void 0:ee[te]}function getNative(ee,te){var re=getValue(ee,te);return baseIsNative(re)?re:void 0}var WeakMap=getNative(root$1,"WeakMap"),objectCreate=Object.create,baseCreate=function(){function ee(){}return function(te){if(!isObject$1(te))return{};if(objectCreate)return objectCreate(te);ee.prototype=te;var re=new ee;return ee.prototype=void 0,re}}();function apply$1(ee,te,re){switch(re.length){case 0:return ee.call(te);case 1:return ee.call(te,re[0]);case 2:return ee.call(te,re[0],re[1]);case 3:return ee.call(te,re[0],re[1],re[2])}return ee.apply(te,re)}function copyArray(ee,te){var re=-1,ie=ee.length;for(te||(te=Array(ie));++re<ie;)te[re]=ee[re];return te}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(ee){var te=0,re=0;return function(){var ie=nativeNow(),ne=HOT_SPAN-(ie-re);if(re=ie,ne>0){if(++te>=HOT_COUNT)return arguments[0]}else te=0;return ee.apply(void 0,arguments)}}function constant$3(ee){return function(){return ee}}var defineProperty=function(){try{var ee=getNative(Object,"defineProperty");return ee({},"",{}),ee}catch{}}(),baseSetToString=defineProperty?function(ee,te){return defineProperty(ee,"toString",{configurable:!0,enumerable:!1,value:constant$3(te),writable:!0})}:identity$1,setToString=shortOut(baseSetToString),MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(ee,te){var re=typeof ee;return te=te??MAX_SAFE_INTEGER$1,!!te&&(re=="number"||re!="symbol"&&reIsUint.test(ee))&&ee>-1&&ee%1==0&&ee<te}function baseAssignValue(ee,te,re){te=="__proto__"&&defineProperty?defineProperty(ee,te,{configurable:!0,enumerable:!0,value:re,writable:!0}):ee[te]=re}function eq(ee,te){return ee===te||ee!==ee&&te!==te}var objectProto$9=Object.prototype,hasOwnProperty$8=objectProto$9.hasOwnProperty;function assignValue(ee,te,re){var ie=ee[te];(!(hasOwnProperty$8.call(ee,te)&&eq(ie,re))||re===void 0&&!(te in ee))&&baseAssignValue(ee,te,re)}function copyObject(ee,te,re,ie){var ne=!re;re||(re={});for(var ae=-1,oe=te.length;++ae<oe;){var se=te[ae],le=void 0;le===void 0&&(le=ee[se]),ne?baseAssignValue(re,se,le):assignValue(re,se,le)}return re}var nativeMax$1=Math.max;function overRest(ee,te,re){return te=nativeMax$1(te===void 0?ee.length-1:te,0),function(){for(var ie=arguments,ne=-1,ae=nativeMax$1(ie.length-te,0),oe=Array(ae);++ne<ae;)oe[ne]=ie[te+ne];ne=-1;for(var se=Array(te+1);++ne<te;)se[ne]=ie[ne];return se[te]=re(oe),apply$1(ee,this,se)}}function baseRest(ee,te){return setToString(overRest(ee,te,identity$1),ee+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(ee){return typeof ee=="number"&&ee>-1&&ee%1==0&&ee<=MAX_SAFE_INTEGER}function isArrayLike(ee){return ee!=null&&isLength(ee.length)&&!isFunction(ee)}function isIterateeCall(ee,te,re){if(!isObject$1(re))return!1;var ie=typeof te;return(ie=="number"?isArrayLike(re)&&isIndex(te,re.length):ie=="string"&&te in re)?eq(re[te],ee):!1}function createAssigner(ee){return baseRest(function(te,re){var ie=-1,ne=re.length,ae=ne>1?re[ne-1]:void 0,oe=ne>2?re[2]:void 0;for(ae=ee.length>3&&typeof ae=="function"?(ne--,ae):void 0,oe&&isIterateeCall(re[0],re[1],oe)&&(ae=ne<3?void 0:ae,ne=1),te=Object(te);++ie<ne;){var se=re[ie];se&&ee(te,se,ie,ae)}return te})}var objectProto$8=Object.prototype;function isPrototype(ee){var te=ee&&ee.constructor,re=typeof te=="function"&&te.prototype||objectProto$8;return ee===re}function baseTimes(ee,te){for(var re=-1,ie=Array(ee);++re<ee;)ie[re]=te(re);return ie}var argsTag$1="[object Arguments]";function baseIsArguments(ee){return isObjectLike(ee)&&baseGetTag(ee)==argsTag$1}var objectProto$7=Object.prototype,hasOwnProperty$7=objectProto$7.hasOwnProperty,propertyIsEnumerable=objectProto$7.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(ee){return isObjectLike(ee)&&hasOwnProperty$7.call(ee,"callee")&&!propertyIsEnumerable.call(ee,"callee")};function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$2=moduleExports$2?root$1.Buffer:void 0,nativeIsBuffer=Buffer$2?Buffer$2.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$2="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$2="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$2]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$2]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray(ee){return isObjectLike(ee)&&isLength(ee.length)&&!!typedArrayTags[baseGetTag(ee)]}function baseUnary(ee){return function(te){return ee(te)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal.process,nodeUtil=function(){try{var ee=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return ee||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty;function arrayLikeKeys(ee,te){var re=isArray(ee),ie=!re&&isArguments(ee),ne=!re&&!ie&&isBuffer(ee),ae=!re&&!ie&&!ne&&isTypedArray(ee),oe=re||ie||ne||ae,se=oe?baseTimes(ee.length,String):[],le=se.length;for(var ce in ee)(te||hasOwnProperty$6.call(ee,ce))&&!(oe&&(ce=="length"||ne&&(ce=="offset"||ce=="parent")||ae&&(ce=="buffer"||ce=="byteLength"||ce=="byteOffset")||isIndex(ce,le)))&&se.push(ce);return se}function overArg(ee,te){return function(re){return ee(te(re))}}var nativeKeys=overArg(Object.keys,Object),objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function baseKeys(ee){if(!isPrototype(ee))return nativeKeys(ee);var te=[];for(var re in Object(ee))hasOwnProperty$5.call(ee,re)&&re!="constructor"&&te.push(re);return te}function nativeKeysIn(ee){var te=[];if(ee!=null)for(var re in Object(ee))te.push(re);return te}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function baseKeysIn(ee){if(!isObject$1(ee))return nativeKeysIn(ee);var te=isPrototype(ee),re=[];for(var ie in ee)ie=="constructor"&&(te||!hasOwnProperty$4.call(ee,ie))||re.push(ie);return re}function keysIn(ee){return isArrayLike(ee)?arrayLikeKeys(ee,!0):baseKeysIn(ee)}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(ee){var te=this.has(ee)&&delete this.__data__[ee];return this.size-=te?1:0,te}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function hashGet(ee){var te=this.__data__;if(nativeCreate){var re=te[ee];return re===HASH_UNDEFINED$1?void 0:re}return hasOwnProperty$3.call(te,ee)?te[ee]:void 0}var objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function hashHas(ee){var te=this.__data__;return nativeCreate?te[ee]!==void 0:hasOwnProperty$2.call(te,ee)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(ee,te){var re=this.__data__;return this.size+=this.has(ee)?0:1,re[ee]=nativeCreate&&te===void 0?HASH_UNDEFINED:te,this}function Hash(ee){var te=-1,re=ee==null?0:ee.length;for(this.clear();++te<re;){var ie=ee[te];this.set(ie[0],ie[1])}}Hash.prototype.clear=hashClear;Hash.prototype.delete=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(ee,te){for(var re=ee.length;re--;)if(eq(ee[re][0],te))return re;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(ee){var te=this.__data__,re=assocIndexOf(te,ee);if(re<0)return!1;var ie=te.length-1;return re==ie?te.pop():splice.call(te,re,1),--this.size,!0}function listCacheGet(ee){var te=this.__data__,re=assocIndexOf(te,ee);return re<0?void 0:te[re][1]}function listCacheHas(ee){return assocIndexOf(this.__data__,ee)>-1}function listCacheSet(ee,te){var re=this.__data__,ie=assocIndexOf(re,ee);return ie<0?(++this.size,re.push([ee,te])):re[ie][1]=te,this}function ListCache(ee){var te=-1,re=ee==null?0:ee.length;for(this.clear();++te<re;){var ie=ee[te];this.set(ie[0],ie[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype.delete=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;var Map$1=getNative(root$1,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(ee){var te=typeof ee;return te=="string"||te=="number"||te=="symbol"||te=="boolean"?ee!=="__proto__":ee===null}function getMapData(ee,te){var re=ee.__data__;return isKeyable(te)?re[typeof te=="string"?"string":"hash"]:re.map}function mapCacheDelete(ee){var te=getMapData(this,ee).delete(ee);return this.size-=te?1:0,te}function mapCacheGet(ee){return getMapData(this,ee).get(ee)}function mapCacheHas(ee){return getMapData(this,ee).has(ee)}function mapCacheSet(ee,te){var re=getMapData(this,ee),ie=re.size;return re.set(ee,te),this.size+=re.size==ie?0:1,this}function MapCache(ee){var te=-1,re=ee==null?0:ee.length;for(this.clear();++te<re;){var ie=ee[te];this.set(ie[0],ie[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype.delete=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT$1="Expected a function";function memoize(ee,te){if(typeof ee!="function"||te!=null&&typeof te!="function")throw new TypeError(FUNC_ERROR_TEXT$1);var re=function(){var ie=arguments,ne=te?te.apply(this,ie):ie[0],ae=re.cache;if(ae.has(ne))return ae.get(ne);var oe=ee.apply(this,ie);return re.cache=ae.set(ne,oe)||ae,oe};return re.cache=new(memoize.Cache||MapCache),re}memoize.Cache=MapCache;var getPrototype=overArg(Object.getPrototypeOf,Object),objectTag$1="[object Object]",funcProto=Function.prototype,objectProto$1=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$1=objectProto$1.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(ee){if(!isObjectLike(ee)||baseGetTag(ee)!=objectTag$1)return!1;var te=getPrototype(ee);if(te===null)return!0;var re=hasOwnProperty$1.call(te,"constructor")&&te.constructor;return typeof re=="function"&&re instanceof re&&funcToString.call(re)==objectCtorString}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(ee){var te=this.__data__,re=te.delete(ee);return this.size=te.size,re}function stackGet(ee){return this.__data__.get(ee)}function stackHas(ee){return this.__data__.has(ee)}var LARGE_ARRAY_SIZE=200;function stackSet(ee,te){var re=this.__data__;if(re instanceof ListCache){var ie=re.__data__;if(!Map$1||ie.length<LARGE_ARRAY_SIZE-1)return ie.push([ee,te]),this.size=++re.size,this;re=this.__data__=new MapCache(ie)}return re.set(ee,te),this.size=re.size,this}function Stack(ee){var te=this.__data__=new ListCache(ee);this.size=te.size}Stack.prototype.clear=stackClear;Stack.prototype.delete=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer$1=moduleExports?root$1.Buffer:void 0,allocUnsafe=Buffer$1?Buffer$1.allocUnsafe:void 0;function cloneBuffer(ee,te){if(te)return ee.slice();var re=ee.length,ie=allocUnsafe?allocUnsafe(re):new ee.constructor(re);return ee.copy(ie),ie}var DataView$1=getNative(root$1,"DataView"),Promise$1=getNative(root$1,"Promise"),Set$1=getNative(root$1,"Set"),mapTag$1="[object Map]",objectTag="[object Object]",promiseTag="[object Promise]",setTag$1="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap),getTag=baseGetTag;(DataView$1&&getTag(new DataView$1(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag(new Map$1)!=mapTag$1||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set$1&&getTag(new Set$1)!=setTag$1||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(ee){var te=baseGetTag(ee),re=te==objectTag?ee.constructor:void 0,ie=re?toSource(re):"";if(ie)switch(ie){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag$1;case promiseCtorString:return promiseTag;case setCtorString:return setTag$1;case weakMapCtorString:return weakMapTag}return te});var Uint8Array$1=root$1.Uint8Array;function cloneArrayBuffer(ee){var te=new ee.constructor(ee.byteLength);return new Uint8Array$1(te).set(new Uint8Array$1(ee)),te}function cloneTypedArray(ee,te){var re=te?cloneArrayBuffer(ee.buffer):ee.buffer;return new ee.constructor(re,ee.byteOffset,ee.length)}function initCloneObject(ee){return typeof ee.constructor=="function"&&!isPrototype(ee)?baseCreate(getPrototype(ee)):{}}function createBaseFor(ee){return function(te,re,ie){for(var ne=-1,ae=Object(te),oe=ie(te),se=oe.length;se--;){var le=oe[++ne];if(re(ae[le],le,ae)===!1)break}return te}}var baseFor=createBaseFor(),now$1=function(){return root$1.Date.now()},FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(ee,te,re){var ie,ne,ae,oe,se,le,ce=0,he=!1,de=!1,ue=!0;if(typeof ee!="function")throw new TypeError(FUNC_ERROR_TEXT);te=toNumber(te)||0,isObject$1(re)&&(he=!!re.leading,de="maxWait"in re,ae=de?nativeMax(toNumber(re.maxWait)||0,te):ae,ue="trailing"in re?!!re.trailing:ue);function fe(ke){var Ce=ie,Ae=ne;return ie=ne=void 0,ce=ke,oe=ee.apply(Ae,Ce),oe}function pe(ke){return ce=ke,se=setTimeout(_e,te),he?fe(ke):oe}function ge(ke){var Ce=ke-le,Ae=ke-ce,ve=te-Ce;return de?nativeMin(ve,ae-Ae):ve}function ye(ke){var Ce=ke-le,Ae=ke-ce;return le===void 0||Ce>=te||Ce<0||de&&Ae>=ae}function _e(){var ke=now$1();if(ye(ke))return me(ke);se=setTimeout(_e,ge(ke))}function me(ke){return se=void 0,ue&&ie?fe(ke):(ie=ne=void 0,oe)}function we(){se!==void 0&&clearTimeout(se),ce=0,ie=le=ne=se=void 0}function xe(){return se===void 0?oe:me(now$1())}function Te(){var ke=now$1(),Ce=ye(ke);if(ie=arguments,ne=this,le=ke,Ce){if(se===void 0)return pe(le);if(de)return clearTimeout(se),se=setTimeout(_e,te),fe(le)}return se===void 0&&(se=setTimeout(_e,te)),oe}return Te.cancel=we,Te.flush=xe,Te}function assignMergeValue(ee,te,re){(re!==void 0&&!eq(ee[te],re)||re===void 0&&!(te in ee))&&baseAssignValue(ee,te,re)}function isArrayLikeObject(ee){return isObjectLike(ee)&&isArrayLike(ee)}function safeGet(ee,te){if(!(te==="constructor"&&typeof ee[te]=="function")&&te!="__proto__")return ee[te]}function toPlainObject(ee){return copyObject(ee,keysIn(ee))}function baseMergeDeep(ee,te,re,ie,ne,ae,oe){var se=safeGet(ee,re),le=safeGet(te,re),ce=oe.get(le);if(ce){assignMergeValue(ee,re,ce);return}var he=ae?ae(se,le,re+"",ee,te,oe):void 0,de=he===void 0;if(de){var ue=isArray(le),fe=!ue&&isBuffer(le),pe=!ue&&!fe&&isTypedArray(le);he=le,ue||fe||pe?isArray(se)?he=se:isArrayLikeObject(se)?he=copyArray(se):fe?(de=!1,he=cloneBuffer(le,!0)):pe?(de=!1,he=cloneTypedArray(le,!0)):he=[]:isPlainObject(le)||isArguments(le)?(he=se,isArguments(se)?he=toPlainObject(se):(!isObject$1(se)||isFunction(se))&&(he=initCloneObject(le))):de=!1}de&&(oe.set(le,he),ne(he,le,ie,ae,oe),oe.delete(le)),assignMergeValue(ee,re,he)}function baseMerge(ee,te,re,ie,ne){ee!==te&&baseFor(te,function(ae,oe){if(ne||(ne=new Stack),isObject$1(ae))baseMergeDeep(ee,te,oe,re,baseMerge,ie,ne);else{var se=ie?ie(safeGet(ee,oe),ae,oe+"",ee,te,ne):void 0;se===void 0&&(se=ae),assignMergeValue(ee,oe,se)}},keysIn)}var mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(ee){if(ee==null)return!0;if(isArrayLike(ee)&&(isArray(ee)||typeof ee=="string"||typeof ee.splice=="function"||isBuffer(ee)||isTypedArray(ee)||isArguments(ee)))return!ee.length;var te=getTag(ee);if(te==mapTag||te==setTag)return!ee.size;if(isPrototype(ee))return!baseKeys(ee).length;for(var re in ee)if(hasOwnProperty.call(ee,re))return!1;return!0}var merge$1=createAssigner(function(ee,te,re){baseMerge(ee,te,re)});function findMostRelevantLineNumber(ee,te){const re=te.split(`
`);let ie=-1,ne=0;for(const[ae,oe]of re.entries()){let se=0;for(let le=0;le<=ee.length;le++)for(let ce=le+1;ce<=ee.length;ce++){const he=ee.slice(le,ce);oe.includes(he)&&(se=Math.max(se,he.length))}se>ne&&(ne=se,ie=ae+1)}return ie}function replaceLineNumberInErrorMessage(ee,te){const re=/Parse error on line (\d+):/,ie=/Lexical error on line (\d+)/;return ee.replace(re,`Parse error on line ${te}:`).replace(ie,`Lexical error on line ${te}:`)}function extractErrorLineText(ee){const te=/Error: Parse error on line \d+:\n(.+)\n+/,re=ee.match(te);if(re)return re[1].slice(3);const ie=/Error: Lexical error on line \d+. Unrecognized text.\n(.+)\n-+/,ne=ee.match(ie);return ne?ne[1].slice(3):""}var __defProp$1=Object.defineProperty,__name$1=(ee,te)=>__defProp$1(ee,"name",{value:te,configurable:!0}),loader$2=__name$1(async()=>await __vitePreload(()=>import("./render-FDDGGFDI.Csq8DIFR.js"),[],import.meta.url),"loader"),algos=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap"],layouts=[{name:"elk",loader:loader$2,algorithm:"elk.layered"},...algos.map(ee=>({name:ee,loader:loader$2,algorithm:ee}))],layouts_default=layouts;const id$2="zenuml",detector$1=ee=>/^\s*zenuml/.test(ee),loader$1=async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./zenuml-definition-ddfc84a5.DtWujIuw.js").then(re=>re.z);return{diagram:te}},__vite__mapDeps([0,1]),import.meta.url);return{id:id$2,diagram:ee}},plugin$1={id:id$2,detector:detector$1,loader:loader$1};var dayjs_min={exports:{}};(function(ee,te){(function(re,ie){ee.exports=ie()})(commonjsGlobal,function(){var re=1e3,ie=6e4,ne=36e5,ae="millisecond",oe="second",se="minute",le="hour",ce="day",he="week",de="month",ue="quarter",fe="year",pe="date",ge="Invalid Date",ye=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_e=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,me={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Be){var Le=["th","st","nd","rd"],Ie=Be%100;return"["+Be+(Le[(Ie-20)%10]||Le[Ie]||Le[0])+"]"}},we=function(Be,Le,Ie){var Me=String(Be);return!Me||Me.length>=Le?Be:""+Array(Le+1-Me.length).join(Ie)+Be},xe={s:we,z:function(Be){var Le=-Be.utcOffset(),Ie=Math.abs(Le),Me=Math.floor(Ie/60),Re=Ie%60;return(Le<=0?"+":"-")+we(Me,2,"0")+":"+we(Re,2,"0")},m:function Be(Le,Ie){if(Le.date()<Ie.date())return-Be(Ie,Le);var Me=12*(Ie.year()-Le.year())+(Ie.month()-Le.month()),Re=Le.clone().add(Me,de),Fe=Ie-Re<0,Pe=Le.clone().add(Me+(Fe?-1:1),de);return+(-(Me+(Ie-Re)/(Fe?Re-Pe:Pe-Re))||0)},a:function(Be){return Be<0?Math.ceil(Be)||0:Math.floor(Be)},p:function(Be){return{M:de,y:fe,w:he,d:ce,D:pe,h:le,m:se,s:oe,ms:ae,Q:ue}[Be]||String(Be||"").toLowerCase().replace(/s$/,"")},u:function(Be){return Be===void 0}},Te="en",ke={};ke[Te]=me;var Ce="$isDayjsObject",Ae=function(Be){return Be instanceof Ne||!(!Be||!Be[Ce])},ve=function Be(Le,Ie,Me){var Re;if(!Le)return Te;if(typeof Le=="string"){var Fe=Le.toLowerCase();ke[Fe]&&(Re=Fe),Ie&&(ke[Fe]=Ie,Re=Fe);var Pe=Le.split("-");if(!Re&&Pe.length>1)return Be(Pe[0])}else{var He=Le.name;ke[He]=Le,Re=He}return!Me&&Re&&(Te=Re),Re||!Me&&Te},Ee=function(Be,Le){if(Ae(Be))return Be.clone();var Ie=typeof Le=="object"?Le:{};return Ie.date=Be,Ie.args=arguments,new Ne(Ie)},Se=xe;Se.l=ve,Se.i=Ae,Se.w=function(Be,Le){return Ee(Be,{locale:Le.$L,utc:Le.$u,x:Le.$x,$offset:Le.$offset})};var Ne=function(){function Be(Ie){this.$L=ve(Ie.locale,null,!0),this.parse(Ie),this.$x=this.$x||Ie.x||{},this[Ce]=!0}var Le=Be.prototype;return Le.parse=function(Ie){this.$d=function(Me){var Re=Me.date,Fe=Me.utc;if(Re===null)return new Date(NaN);if(Se.u(Re))return new Date;if(Re instanceof Date)return new Date(Re);if(typeof Re=="string"&&!/Z$/i.test(Re)){var Pe=Re.match(ye);if(Pe){var He=Pe[2]-1||0,qe=(Pe[7]||"0").substring(0,3);return Fe?new Date(Date.UTC(Pe[1],He,Pe[3]||1,Pe[4]||0,Pe[5]||0,Pe[6]||0,qe)):new Date(Pe[1],He,Pe[3]||1,Pe[4]||0,Pe[5]||0,Pe[6]||0,qe)}}return new Date(Re)}(Ie),this.init()},Le.init=function(){var Ie=this.$d;this.$y=Ie.getFullYear(),this.$M=Ie.getMonth(),this.$D=Ie.getDate(),this.$W=Ie.getDay(),this.$H=Ie.getHours(),this.$m=Ie.getMinutes(),this.$s=Ie.getSeconds(),this.$ms=Ie.getMilliseconds()},Le.$utils=function(){return Se},Le.isValid=function(){return this.$d.toString()!==ge},Le.isSame=function(Ie,Me){var Re=Ee(Ie);return this.startOf(Me)<=Re&&Re<=this.endOf(Me)},Le.isAfter=function(Ie,Me){return Ee(Ie)<this.startOf(Me)},Le.isBefore=function(Ie,Me){return this.endOf(Me)<Ee(Ie)},Le.$g=function(Ie,Me,Re){return Se.u(Ie)?this[Me]:this.set(Re,Ie)},Le.unix=function(){return Math.floor(this.valueOf()/1e3)},Le.valueOf=function(){return this.$d.getTime()},Le.startOf=function(Ie,Me){var Re=this,Fe=!!Se.u(Me)||Me,Pe=Se.p(Ie),He=function(ct,Ve){var ht=Se.w(Re.$u?Date.UTC(Re.$y,Ve,ct):new Date(Re.$y,Ve,ct),Re);return Fe?ht:ht.endOf(ce)},qe=function(ct,Ve){return Se.w(Re.toDate()[ct].apply(Re.toDate("s"),(Fe?[0,0,0,0]:[23,59,59,999]).slice(Ve)),Re)},Ue=this.$W,Ge=this.$M,je=this.$D,rt="set"+(this.$u?"UTC":"");switch(Pe){case fe:return Fe?He(1,0):He(31,11);case de:return Fe?He(1,Ge):He(0,Ge+1);case he:var lt=this.$locale().weekStart||0,_t=(Ue<lt?Ue+7:Ue)-lt;return He(Fe?je-_t:je+(6-_t),Ge);case ce:case pe:return qe(rt+"Hours",0);case le:return qe(rt+"Minutes",1);case se:return qe(rt+"Seconds",2);case oe:return qe(rt+"Milliseconds",3);default:return this.clone()}},Le.endOf=function(Ie){return this.startOf(Ie,!1)},Le.$set=function(Ie,Me){var Re,Fe=Se.p(Ie),Pe="set"+(this.$u?"UTC":""),He=(Re={},Re[ce]=Pe+"Date",Re[pe]=Pe+"Date",Re[de]=Pe+"Month",Re[fe]=Pe+"FullYear",Re[le]=Pe+"Hours",Re[se]=Pe+"Minutes",Re[oe]=Pe+"Seconds",Re[ae]=Pe+"Milliseconds",Re)[Fe],qe=Fe===ce?this.$D+(Me-this.$W):Me;if(Fe===de||Fe===fe){var Ue=this.clone().set(pe,1);Ue.$d[He](qe),Ue.init(),this.$d=Ue.set(pe,Math.min(this.$D,Ue.daysInMonth())).$d}else He&&this.$d[He](qe);return this.init(),this},Le.set=function(Ie,Me){return this.clone().$set(Ie,Me)},Le.get=function(Ie){return this[Se.p(Ie)]()},Le.add=function(Ie,Me){var Re,Fe=this;Ie=Number(Ie);var Pe=Se.p(Me),He=function(Ge){var je=Ee(Fe);return Se.w(je.date(je.date()+Math.round(Ge*Ie)),Fe)};if(Pe===de)return this.set(de,this.$M+Ie);if(Pe===fe)return this.set(fe,this.$y+Ie);if(Pe===ce)return He(1);if(Pe===he)return He(7);var qe=(Re={},Re[se]=ie,Re[le]=ne,Re[oe]=re,Re)[Pe]||1,Ue=this.$d.getTime()+Ie*qe;return Se.w(Ue,this)},Le.subtract=function(Ie,Me){return this.add(-1*Ie,Me)},Le.format=function(Ie){var Me=this,Re=this.$locale();if(!this.isValid())return Re.invalidDate||ge;var Fe=Ie||"YYYY-MM-DDTHH:mm:ssZ",Pe=Se.z(this),He=this.$H,qe=this.$m,Ue=this.$M,Ge=Re.weekdays,je=Re.months,rt=Re.meridiem,lt=function(Ve,ht,it,mt){return Ve&&(Ve[ht]||Ve(Me,Fe))||it[ht].slice(0,mt)},_t=function(Ve){return Se.s(He%12||12,Ve,"0")},ct=rt||function(Ve,ht,it){var mt=Ve<12?"AM":"PM";return it?mt.toLowerCase():mt};return Fe.replace(_e,function(Ve,ht){return ht||function(it){switch(it){case"YY":return String(Me.$y).slice(-2);case"YYYY":return Se.s(Me.$y,4,"0");case"M":return Ue+1;case"MM":return Se.s(Ue+1,2,"0");case"MMM":return lt(Re.monthsShort,Ue,je,3);case"MMMM":return lt(je,Ue);case"D":return Me.$D;case"DD":return Se.s(Me.$D,2,"0");case"d":return String(Me.$W);case"dd":return lt(Re.weekdaysMin,Me.$W,Ge,2);case"ddd":return lt(Re.weekdaysShort,Me.$W,Ge,3);case"dddd":return Ge[Me.$W];case"H":return String(He);case"HH":return Se.s(He,2,"0");case"h":return _t(1);case"hh":return _t(2);case"a":return ct(He,qe,!0);case"A":return ct(He,qe,!1);case"m":return String(qe);case"mm":return Se.s(qe,2,"0");case"s":return String(Me.$s);case"ss":return Se.s(Me.$s,2,"0");case"SSS":return Se.s(Me.$ms,3,"0");case"Z":return Pe}return null}(Ve)||Pe.replace(":","")})},Le.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Le.diff=function(Ie,Me,Re){var Fe,Pe=this,He=Se.p(Me),qe=Ee(Ie),Ue=(qe.utcOffset()-this.utcOffset())*ie,Ge=this-qe,je=function(){return Se.m(Pe,qe)};switch(He){case fe:Fe=je()/12;break;case de:Fe=je();break;case ue:Fe=je()/3;break;case he:Fe=(Ge-Ue)/6048e5;break;case ce:Fe=(Ge-Ue)/864e5;break;case le:Fe=Ge/ne;break;case se:Fe=Ge/ie;break;case oe:Fe=Ge/re;break;default:Fe=Ge}return Re?Fe:Se.a(Fe)},Le.daysInMonth=function(){return this.endOf(de).$D},Le.$locale=function(){return ke[this.$L]},Le.locale=function(Ie,Me){if(!Ie)return this.$L;var Re=this.clone(),Fe=ve(Ie,Me,!0);return Fe&&(Re.$L=Fe),Re},Le.clone=function(){return Se.w(this.$d,this)},Le.toDate=function(){return new Date(this.valueOf())},Le.toJSON=function(){return this.isValid()?this.toISOString():null},Le.toISOString=function(){return this.$d.toISOString()},Le.toString=function(){return this.$d.toUTCString()},Be}(),ze=Ne.prototype;return Ee.prototype=ze,[["$ms",ae],["$s",oe],["$m",se],["$H",le],["$W",ce],["$M",de],["$y",fe],["$D",pe]].forEach(function(Be){ze[Be[1]]=function(Le){return this.$g(Le,Be[0],Be[1])}}),Ee.extend=function(Be,Le){return Be.$i||(Be(Le,Ne,Ee),Be.$i=!0),Ee},Ee.locale=ve,Ee.isDayjs=Ae,Ee.unix=function(Be){return Ee(1e3*Be)},Ee.en=ke[Te],Ee.Ls=ke,Ee.p={},Ee})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs2=getDefaultExportFromCjs(dayjs_minExports),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:ee=>ee>=255?255:ee<0?0:ee,g:ee=>ee>=255?255:ee<0?0:ee,b:ee=>ee>=255?255:ee<0?0:ee,h:ee=>ee%360,s:ee=>ee>=100?100:ee<0?0:ee,l:ee=>ee>=100?100:ee<0?0:ee,a:ee=>ee>=1?1:ee<0?0:ee},toLinear:ee=>{const te=ee/255;return ee>.03928?Math.pow((te+.055)/1.055,2.4):te/12.92},hue2rgb:(ee,te,re)=>(re<0&&(re+=1),re>1&&(re-=1),re<1/6?ee+(te-ee)*6*re:re<1/2?te:re<2/3?ee+(te-ee)*(2/3-re)*6:ee),hsl2rgb:({h:ee,s:te,l:re},ie)=>{if(!te)return re*2.55;ee/=360,te/=100,re/=100;const ne=re<.5?re*(1+te):re+te-re*te,ae=2*re-ne;switch(ie){case"r":return Channel.hue2rgb(ae,ne,ee+1/3)*255;case"g":return Channel.hue2rgb(ae,ne,ee)*255;case"b":return Channel.hue2rgb(ae,ne,ee-1/3)*255}},rgb2hsl:({r:ee,g:te,b:re},ie)=>{ee/=255,te/=255,re/=255;const ne=Math.max(ee,te,re),ae=Math.min(ee,te,re),oe=(ne+ae)/2;if(ie==="l")return oe*100;if(ne===ae)return 0;const se=ne-ae,le=oe>.5?se/(2-ne-ae):se/(ne+ae);if(ie==="s")return le*100;switch(ne){case ee:return((te-re)/se+(te<re?6:0))*60;case te:return((re-ee)/se+2)*60;case re:return((ee-te)/se+4)*60;default:return-1}}},Lang={clamp:(ee,te,re)=>te>re?Math.min(te,Math.max(re,ee)):Math.min(re,Math.max(te,ee)),round:ee=>Math.round(ee*1e10)/1e10},Unit={dec2hex:ee=>{const te=Math.round(ee).toString(16);return te.length>1?te:`0${te}`}},Utils={channel:Channel,lang:Lang,unit:Unit},DEC2HEX={};for(let ee=0;ee<=255;ee++)DEC2HEX[ee]=Utils.unit.dec2hex(ee);const TYPE$2={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE$2.ALL}get(){return this.type}set(te){if(this.type&&this.type!==te)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=te}reset(){this.type=TYPE$2.ALL}is(te){return this.type===te}}class Channels{constructor(te,re){this.color=re,this.changed=!1,this.data=te,this.type=new Type}set(te,re){return this.color=re,this.changed=!1,this.data=te,this.type.type=TYPE$2.ALL,this}_ensureHSL(){const te=this.data,{h:re,s:ie,l:ne}=te;re===void 0&&(te.h=Utils.channel.rgb2hsl(te,"h")),ie===void 0&&(te.s=Utils.channel.rgb2hsl(te,"s")),ne===void 0&&(te.l=Utils.channel.rgb2hsl(te,"l"))}_ensureRGB(){const te=this.data,{r:re,g:ie,b:ne}=te;re===void 0&&(te.r=Utils.channel.hsl2rgb(te,"r")),ie===void 0&&(te.g=Utils.channel.hsl2rgb(te,"g")),ne===void 0&&(te.b=Utils.channel.hsl2rgb(te,"b"))}get r(){const te=this.data,re=te.r;return!this.type.is(TYPE$2.HSL)&&re!==void 0?re:(this._ensureHSL(),Utils.channel.hsl2rgb(te,"r"))}get g(){const te=this.data,re=te.g;return!this.type.is(TYPE$2.HSL)&&re!==void 0?re:(this._ensureHSL(),Utils.channel.hsl2rgb(te,"g"))}get b(){const te=this.data,re=te.b;return!this.type.is(TYPE$2.HSL)&&re!==void 0?re:(this._ensureHSL(),Utils.channel.hsl2rgb(te,"b"))}get h(){const te=this.data,re=te.h;return!this.type.is(TYPE$2.RGB)&&re!==void 0?re:(this._ensureRGB(),Utils.channel.rgb2hsl(te,"h"))}get s(){const te=this.data,re=te.s;return!this.type.is(TYPE$2.RGB)&&re!==void 0?re:(this._ensureRGB(),Utils.channel.rgb2hsl(te,"s"))}get l(){const te=this.data,re=te.l;return!this.type.is(TYPE$2.RGB)&&re!==void 0?re:(this._ensureRGB(),Utils.channel.rgb2hsl(te,"l"))}get a(){return this.data.a}set r(te){this.type.set(TYPE$2.RGB),this.changed=!0,this.data.r=te}set g(te){this.type.set(TYPE$2.RGB),this.changed=!0,this.data.g=te}set b(te){this.type.set(TYPE$2.RGB),this.changed=!0,this.data.b=te}set h(te){this.type.set(TYPE$2.HSL),this.changed=!0,this.data.h=te}set s(te){this.type.set(TYPE$2.HSL),this.changed=!0,this.data.s=te}set l(te){this.type.set(TYPE$2.HSL),this.changed=!0,this.data.l=te}set a(te){this.changed=!0,this.data.a=te}}const channels=new Channels({r:0,g:0,b:0,a:0},"transparent"),Hex={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:ee=>{if(ee.charCodeAt(0)!==35)return;const te=ee.match(Hex.re);if(!te)return;const re=te[1],ie=parseInt(re,16),ne=re.length,ae=ne%4===0,oe=ne>4,se=oe?1:17,le=oe?8:4,ce=ae?0:-1,he=oe?255:15;return channels.set({r:(ie>>le*(ce+3)&he)*se,g:(ie>>le*(ce+2)&he)*se,b:(ie>>le*(ce+1)&he)*se,a:ae?(ie&he)*se/255:1},ee)},stringify:ee=>{const{r:te,g:re,b:ie,a:ne}=ee;return ne<1?`#${DEC2HEX[Math.round(te)]}${DEC2HEX[Math.round(re)]}${DEC2HEX[Math.round(ie)]}${DEC2HEX[Math.round(ne*255)]}`:`#${DEC2HEX[Math.round(te)]}${DEC2HEX[Math.round(re)]}${DEC2HEX[Math.round(ie)]}`}},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:ee=>{const te=ee.match(HSL.hueRe);if(te){const[,re,ie]=te;switch(ie){case"grad":return Utils.channel.clamp.h(parseFloat(re)*.9);case"rad":return Utils.channel.clamp.h(parseFloat(re)*180/Math.PI);case"turn":return Utils.channel.clamp.h(parseFloat(re)*360)}}return Utils.channel.clamp.h(parseFloat(ee))},parse:ee=>{const te=ee.charCodeAt(0);if(te!==104&&te!==72)return;const re=ee.match(HSL.re);if(!re)return;const[,ie,ne,ae,oe,se]=re;return channels.set({h:HSL._hue2deg(ie),s:Utils.channel.clamp.s(parseFloat(ne)),l:Utils.channel.clamp.l(parseFloat(ae)),a:oe?Utils.channel.clamp.a(se?parseFloat(oe)/100:parseFloat(oe)):1},ee)},stringify:ee=>{const{h:te,s:re,l:ie,a:ne}=ee;return ne<1?`hsla(${Utils.lang.round(te)}, ${Utils.lang.round(re)}%, ${Utils.lang.round(ie)}%, ${ne})`:`hsl(${Utils.lang.round(te)}, ${Utils.lang.round(re)}%, ${Utils.lang.round(ie)}%)`}},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:ee=>{ee=ee.toLowerCase();const te=Keyword.colors[ee];if(te)return Hex.parse(te)},stringify:ee=>{const te=Hex.stringify(ee);for(const re in Keyword.colors)if(Keyword.colors[re]===te)return re}},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:ee=>{const te=ee.charCodeAt(0);if(te!==114&&te!==82)return;const re=ee.match(RGB.re);if(!re)return;const[,ie,ne,ae,oe,se,le,ce,he]=re;return channels.set({r:Utils.channel.clamp.r(ne?parseFloat(ie)*2.55:parseFloat(ie)),g:Utils.channel.clamp.g(oe?parseFloat(ae)*2.55:parseFloat(ae)),b:Utils.channel.clamp.b(le?parseFloat(se)*2.55:parseFloat(se)),a:ce?Utils.channel.clamp.a(he?parseFloat(ce)/100:parseFloat(ce)):1},ee)},stringify:ee=>{const{r:te,g:re,b:ie,a:ne}=ee;return ne<1?`rgba(${Utils.lang.round(te)}, ${Utils.lang.round(re)}, ${Utils.lang.round(ie)}, ${Utils.lang.round(ne)})`:`rgb(${Utils.lang.round(te)}, ${Utils.lang.round(re)}, ${Utils.lang.round(ie)})`}},Color$1={format:{keyword:Keyword,hex:Hex,rgb:RGB,rgba:RGB,hsl:HSL,hsla:HSL},parse:ee=>{if(typeof ee!="string")return ee;const te=Hex.parse(ee)||RGB.parse(ee)||HSL.parse(ee)||Keyword.parse(ee);if(te)return te;throw new Error(`Unsupported color format: "${ee}"`)},stringify:ee=>!ee.changed&&ee.color?ee.color:ee.type.is(TYPE$2.HSL)||ee.data.r===void 0?HSL.stringify(ee):ee.a<1||!Number.isInteger(ee.r)||!Number.isInteger(ee.g)||!Number.isInteger(ee.b)?RGB.stringify(ee):Hex.stringify(ee)},change=(ee,te)=>{const re=Color$1.parse(ee);for(const ie in te)re[ie]=Utils.channel.clamp[ie](te[ie]);return Color$1.stringify(re)},rgba$1=(ee,te,re=0,ie=1)=>{if(typeof ee!="number")return change(ee,{a:te});const ne=channels.set({r:Utils.channel.clamp.r(ee),g:Utils.channel.clamp.g(te),b:Utils.channel.clamp.b(re),a:Utils.channel.clamp.a(ie)});return Color$1.stringify(ne)},luminance=ee=>{const{r:te,g:re,b:ie}=Color$1.parse(ee),ne=.2126*Utils.channel.toLinear(te)+.7152*Utils.channel.toLinear(re)+.0722*Utils.channel.toLinear(ie);return Utils.lang.round(ne)},isLight=ee=>luminance(ee)>=.5,isDark=ee=>!isLight(ee),adjustChannel=(ee,te,re)=>{const ie=Color$1.parse(ee),ne=ie[te],ae=Utils.channel.clamp[te](ne+re);return ne!==ae&&(ie[te]=ae),Color$1.stringify(ie)},lighten=(ee,te)=>adjustChannel(ee,"l",te),darken=(ee,te)=>adjustChannel(ee,"l",-te),adjust=(ee,te)=>{const re=Color$1.parse(ee),ie={};for(const ne in te)te[ne]&&(ie[ne]=re[ne]+te[ne]);return change(ee,ie)},mix=(ee,te,re=50)=>{const{r:ie,g:ne,b:ae,a:oe}=Color$1.parse(ee),{r:se,g:le,b:ce,a:he}=Color$1.parse(te),de=re/100,ue=de*2-1,fe=oe-he,ge=((ue*fe===-1?ue:(ue+fe)/(1+ue*fe))+1)/2,ye=1-ge,_e=ie*ge+se*ye,me=ne*ge+le*ye,we=ae*ge+ce*ye,xe=oe*de+he*(1-de);return rgba$1(_e,me,we,xe)},invert=(ee,te=100)=>{const re=Color$1.parse(ee);return re.r=255-re.r,re.g=255-re.g,re.b=255-re.b,mix(re,ee,te)};/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries,setPrototypeOf,isFrozen,getPrototypeOf,getOwnPropertyDescriptor}=Object;let{freeze,seal,create:create$1}=Object,{apply,construct}=typeof Reflect<"u"&&Reflect;freeze||(freeze=function(te){return te});seal||(seal=function(te){return te});apply||(apply=function(te,re,ie){return te.apply(re,ie)});construct||(construct=function(te,re){return new te(...re)});const arrayForEach=unapply(Array.prototype.forEach),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),stringToLowerCase=unapply(String.prototype.toLowerCase),stringToString=unapply(String.prototype.toString),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf=unapply(String.prototype.indexOf),stringTrim=unapply(String.prototype.trim),objectHasOwnProperty=unapply(Object.prototype.hasOwnProperty),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(ee){return function(te){for(var re=arguments.length,ie=new Array(re>1?re-1:0),ne=1;ne<re;ne++)ie[ne-1]=arguments[ne];return apply(ee,te,ie)}}function unconstruct(ee){return function(){for(var te=arguments.length,re=new Array(te),ie=0;ie<te;ie++)re[ie]=arguments[ie];return construct(ee,re)}}function addToSet(ee,te){let re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:stringToLowerCase;setPrototypeOf&&setPrototypeOf(ee,null);let ie=te.length;for(;ie--;){let ne=te[ie];if(typeof ne=="string"){const ae=re(ne);ae!==ne&&(isFrozen(te)||(te[ie]=ae),ne=ae)}ee[ne]=!0}return ee}function cleanArray(ee){for(let te=0;te<ee.length;te++)objectHasOwnProperty(ee,te)||(ee[te]=null);return ee}function clone(ee){const te=create$1(null);for(const[re,ie]of entries(ee))objectHasOwnProperty(ee,re)&&(Array.isArray(ie)?te[re]=cleanArray(ie):ie&&typeof ie=="object"&&ie.constructor===Object?te[re]=clone(ie):te[re]=ie);return te}function lookupGetter(ee,te){for(;ee!==null;){const ie=getOwnPropertyDescriptor(ee,te);if(ie){if(ie.get)return unapply(ie.get);if(typeof ie.value=="function")return unapply(ie.value)}ee=getPrototypeOf(ee)}function re(){return null}return re}const 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","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),svgDisallowed=freeze(["animate","color-profile","cursor","discard","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","mprescripts"]),mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),text=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","popover","popovertarget","popovertargetaction","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","wrap","xmlns","slot"]),svg=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=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),TMPLIT_EXPR=seal(/\${[\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|sms|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),CUSTOM_ELEMENT=seal(/^[a-z][.\w]*(-[.\w]+)+$/i);var EXPRESSIONS=Object.freeze({__proto__:null,MUSTACHE_EXPR,ERB_EXPR,TMPLIT_EXPR,DATA_ATTR,ARIA_ATTR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,ATTR_WHITESPACE,DOCTYPE_NAME,CUSTOM_ELEMENT});const NODE_TYPE={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},getGlobal=function ee(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function ee(te,re){if(typeof te!="object"||typeof te.createPolicy!="function")return null;let ie=null;const ne="data-tt-policy-suffix";re&&re.hasAttribute(ne)&&(ie=re.getAttribute(ne));const ae="dompurify"+(ie?"#"+ie:"");try{return te.createPolicy(ae,{createHTML(oe){return oe},createScriptURL(oe){return oe}})}catch{return console.warn("TrustedTypes policy "+ae+" could not be created."),null}};function createDOMPurify(){let ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const te=De=>createDOMPurify(De);if(te.version="3.1.6",te.removed=[],!ee||!ee.document||ee.document.nodeType!==NODE_TYPE.document)return te.isSupported=!1,te;let{document:re}=ee;const ie=re,ne=ie.currentScript,{DocumentFragment:ae,HTMLTemplateElement:oe,Node:se,Element:le,NodeFilter:ce,NamedNodeMap:he=ee.NamedNodeMap||ee.MozNamedAttrMap,HTMLFormElement:de,DOMParser:ue,trustedTypes:fe}=ee,pe=le.prototype,ge=lookupGetter(pe,"cloneNode"),ye=lookupGetter(pe,"remove"),_e=lookupGetter(pe,"nextSibling"),me=lookupGetter(pe,"childNodes"),we=lookupGetter(pe,"parentNode");if(typeof oe=="function"){const De=re.createElement("template");De.content&&De.content.ownerDocument&&(re=De.content.ownerDocument)}let xe,Te="";const{implementation:ke,createNodeIterator:Ce,createDocumentFragment:Ae,getElementsByTagName:ve}=re,{importNode:Ee}=ie;let Se={};te.isSupported=typeof entries=="function"&&typeof we=="function"&&ke&&ke.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ne,ERB_EXPR:ze,TMPLIT_EXPR:Be,DATA_ATTR:Le,ARIA_ATTR:Ie,IS_SCRIPT_OR_DATA:Me,ATTR_WHITESPACE:Re,CUSTOM_ELEMENT:Fe}=EXPRESSIONS;let{IS_ALLOWED_URI:Pe}=EXPRESSIONS,He=null;const qe=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let Ue=null;const Ge=addToSet({},[...html$2,...svg,...mathMl,...xml]);let je=Object.seal(create$1(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}})),rt=null,lt=null,_t=!0,ct=!0,Ve=!1,ht=!0,it=!1,mt=!0,yt=!1,Ut=!1,jt=!1,xt=!1,Dt=!1,Ft=!1,Xt=!0,Kt=!1;const Tr="user-content-";let qt=!0,Ot=!1,wt={},Ct=null;const Qt=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"]);let Jt=null;const er=addToSet({},["audio","video","img","source","image","track"]);let Wt=null;const tr=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pt="http://www.w3.org/1998/Math/MathML",zt="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml";let Tt=ft,Yt=!1,Gt=null;const Sr=addToSet({},[Pt,zt,ft],stringToString);let Mt=null;const vr=["application/xhtml+xml","text/html"],kr="text/html";let Ze=null,St=null;const Er=re.createElement("form"),rr=function(be){return be instanceof RegExp||be instanceof Function},Zt=function(){let be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(St&&St===be)){if((!be||typeof be!="object")&&(be={}),be=clone(be),Mt=vr.indexOf(be.PARSER_MEDIA_TYPE)===-1?kr:be.PARSER_MEDIA_TYPE,Ze=Mt==="application/xhtml+xml"?stringToString:stringToLowerCase,He=objectHasOwnProperty(be,"ALLOWED_TAGS")?addToSet({},be.ALLOWED_TAGS,Ze):qe,Ue=objectHasOwnProperty(be,"ALLOWED_ATTR")?addToSet({},be.ALLOWED_ATTR,Ze):Ge,Gt=objectHasOwnProperty(be,"ALLOWED_NAMESPACES")?addToSet({},be.ALLOWED_NAMESPACES,stringToString):Sr,Wt=objectHasOwnProperty(be,"ADD_URI_SAFE_ATTR")?addToSet(clone(tr),be.ADD_URI_SAFE_ATTR,Ze):tr,Jt=objectHasOwnProperty(be,"ADD_DATA_URI_TAGS")?addToSet(clone(er),be.ADD_DATA_URI_TAGS,Ze):er,Ct=objectHasOwnProperty(be,"FORBID_CONTENTS")?addToSet({},be.FORBID_CONTENTS,Ze):Qt,rt=objectHasOwnProperty(be,"FORBID_TAGS")?addToSet({},be.FORBID_TAGS,Ze):{},lt=objectHasOwnProperty(be,"FORBID_ATTR")?addToSet({},be.FORBID_ATTR,Ze):{},wt=objectHasOwnProperty(be,"USE_PROFILES")?be.USE_PROFILES:!1,_t=be.ALLOW_ARIA_ATTR!==!1,ct=be.ALLOW_DATA_ATTR!==!1,Ve=be.ALLOW_UNKNOWN_PROTOCOLS||!1,ht=be.ALLOW_SELF_CLOSE_IN_ATTR!==!1,it=be.SAFE_FOR_TEMPLATES||!1,mt=be.SAFE_FOR_XML!==!1,yt=be.WHOLE_DOCUMENT||!1,xt=be.RETURN_DOM||!1,Dt=be.RETURN_DOM_FRAGMENT||!1,Ft=be.RETURN_TRUSTED_TYPE||!1,jt=be.FORCE_BODY||!1,Xt=be.SANITIZE_DOM!==!1,Kt=be.SANITIZE_NAMED_PROPS||!1,qt=be.KEEP_CONTENT!==!1,Ot=be.IN_PLACE||!1,Pe=be.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,Tt=be.NAMESPACE||ft,je=be.CUSTOM_ELEMENT_HANDLING||{},be.CUSTOM_ELEMENT_HANDLING&&rr(be.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(je.tagNameCheck=be.CUSTOM_ELEMENT_HANDLING.tagNameCheck),be.CUSTOM_ELEMENT_HANDLING&&rr(be.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(je.attributeNameCheck=be.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),be.CUSTOM_ELEMENT_HANDLING&&typeof be.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(je.allowCustomizedBuiltInElements=be.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),it&&(ct=!1),Dt&&(xt=!0),wt&&(He=addToSet({},text),Ue=[],wt.html===!0&&(addToSet(He,html$1),addToSet(Ue,html$2)),wt.svg===!0&&(addToSet(He,svg$1),addToSet(Ue,svg),addToSet(Ue,xml)),wt.svgFilters===!0&&(addToSet(He,svgFilters),addToSet(Ue,svg),addToSet(Ue,xml)),wt.mathMl===!0&&(addToSet(He,mathMl$1),addToSet(Ue,mathMl),addToSet(Ue,xml))),be.ADD_TAGS&&(He===qe&&(He=clone(He)),addToSet(He,be.ADD_TAGS,Ze)),be.ADD_ATTR&&(Ue===Ge&&(Ue=clone(Ue)),addToSet(Ue,be.ADD_ATTR,Ze)),be.ADD_URI_SAFE_ATTR&&addToSet(Wt,be.ADD_URI_SAFE_ATTR,Ze),be.FORBID_CONTENTS&&(Ct===Qt&&(Ct=clone(Ct)),addToSet(Ct,be.FORBID_CONTENTS,Ze)),qt&&(He["#text"]=!0),yt&&addToSet(He,["html","head","body"]),He.table&&(addToSet(He,["tbody"]),delete rt.tbody),be.TRUSTED_TYPES_POLICY){if(typeof be.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof be.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');xe=be.TRUSTED_TYPES_POLICY,Te=xe.createHTML("")}else xe===void 0&&(xe=_createTrustedTypesPolicy(fe,ne)),xe!==null&&typeof Te=="string"&&(Te=xe.createHTML(""));freeze&&freeze(be),St=be}},ir=addToSet({},["mi","mo","mn","ms","mtext"]),nr=addToSet({},["foreignobject","annotation-xml"]),Ar=addToSet({},["title","style","font","a","script"]),ar=addToSet({},[...svg$1,...svgFilters,...svgDisallowed]),or=addToSet({},[...mathMl$1,...mathMlDisallowed]),Lr=function(be){let Oe=we(be);(!Oe||!Oe.tagName)&&(Oe={namespaceURI:Tt,tagName:"template"});const $e=stringToLowerCase(be.tagName),We=stringToLowerCase(Oe.tagName);return Gt[be.namespaceURI]?be.namespaceURI===zt?Oe.namespaceURI===ft?$e==="svg":Oe.namespaceURI===Pt?$e==="svg"&&(We==="annotation-xml"||ir[We]):!!ar[$e]:be.namespaceURI===Pt?Oe.namespaceURI===ft?$e==="math":Oe.namespaceURI===zt?$e==="math"&&nr[We]:!!or[$e]:be.namespaceURI===ft?Oe.namespaceURI===zt&&!nr[We]||Oe.namespaceURI===Pt&&!ir[We]?!1:!or[$e]&&(Ar[$e]||!ar[$e]):!!(Mt==="application/xhtml+xml"&&Gt[be.namespaceURI]):!1},ut=function(be){arrayPush(te.removed,{element:be});try{we(be).removeChild(be)}catch{ye(be)}},Ht=function(be,Oe){try{arrayPush(te.removed,{attribute:Oe.getAttributeNode(be),from:Oe})}catch{arrayPush(te.removed,{attribute:null,from:Oe})}if(Oe.removeAttribute(be),be==="is"&&!Ue[be])if(xt||Dt)try{ut(Oe)}catch{}else try{Oe.setAttribute(be,"")}catch{}},sr=function(be){let Oe=null,$e=null;if(jt)be="<remove></remove>"+be;else{const Xe=stringMatch(be,/^[\r\n\t ]+/);$e=Xe&&Xe[0]}Mt==="application/xhtml+xml"&&Tt===ft&&(be='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+be+"</body></html>");const We=xe?xe.createHTML(be):be;if(Tt===ft)try{Oe=new ue().parseFromString(We,Mt)}catch{}if(!Oe||!Oe.documentElement){Oe=ke.createDocument(Tt,"template",null);try{Oe.documentElement.innerHTML=Yt?Te:We}catch{}}const Ke=Oe.body||Oe.documentElement;return be&&$e&&Ke.insertBefore(re.createTextNode($e),Ke.childNodes[0]||null),Tt===ft?ve.call(Oe,yt?"html":"body")[0]:yt?Oe.documentElement:Ke},lr=function(be){return Ce.call(be.ownerDocument||be,be,ce.SHOW_ELEMENT|ce.SHOW_COMMENT|ce.SHOW_TEXT|ce.SHOW_PROCESSING_INSTRUCTION|ce.SHOW_CDATA_SECTION,null)},cr=function(be){return be instanceof de&&(typeof be.nodeName!="string"||typeof be.textContent!="string"||typeof be.removeChild!="function"||!(be.attributes instanceof he)||typeof be.removeAttribute!="function"||typeof be.setAttribute!="function"||typeof be.namespaceURI!="string"||typeof be.insertBefore!="function"||typeof be.hasChildNodes!="function")},ur=function(be){return typeof se=="function"&&be instanceof se},pt=function(be,Oe,$e){Se[be]&&arrayForEach(Se[be],We=>{We.call(te,Oe,$e,St)})},dr=function(be){let Oe=null;if(pt("beforeSanitizeElements",be,null),cr(be))return ut(be),!0;const $e=Ze(be.nodeName);if(pt("uponSanitizeElement",be,{tagName:$e,allowedTags:He}),be.hasChildNodes()&&!ur(be.firstElementChild)&&regExpTest(/<[/\w]/g,be.innerHTML)&&regExpTest(/<[/\w]/g,be.textContent)||be.nodeType===NODE_TYPE.progressingInstruction||mt&&be.nodeType===NODE_TYPE.comment&&regExpTest(/<[/\w]/g,be.data))return ut(be),!0;if(!He[$e]||rt[$e]){if(!rt[$e]&&pr($e)&&(je.tagNameCheck instanceof RegExp&&regExpTest(je.tagNameCheck,$e)||je.tagNameCheck instanceof Function&&je.tagNameCheck($e)))return!1;if(qt&&!Ct[$e]){const We=we(be)||be.parentNode,Ke=me(be)||be.childNodes;if(Ke&&We){const Xe=Ke.length;for(let Je=Xe-1;Je>=0;--Je){const dt=ge(Ke[Je],!0);dt.__removalCount=(be.__removalCount||0)+1,We.insertBefore(dt,_e(be))}}}return ut(be),!0}return be instanceof le&&!Lr(be)||($e==="noscript"||$e==="noembed"||$e==="noframes")&&regExpTest(/<\/no(script|embed|frames)/i,be.innerHTML)?(ut(be),!0):(it&&be.nodeType===NODE_TYPE.text&&(Oe=be.textContent,arrayForEach([Ne,ze,Be],We=>{Oe=stringReplace(Oe,We," ")}),be.textContent!==Oe&&(arrayPush(te.removed,{element:be.cloneNode()}),be.textContent=Oe)),pt("afterSanitizeElements",be,null),!1)},fr=function(be,Oe,$e){if(Xt&&(Oe==="id"||Oe==="name")&&($e in re||$e in Er))return!1;if(!(ct&&!lt[Oe]&&regExpTest(Le,Oe))){if(!(_t&&regExpTest(Ie,Oe))){if(!Ue[Oe]||lt[Oe]){if(!(pr(be)&&(je.tagNameCheck instanceof RegExp&&regExpTest(je.tagNameCheck,be)||je.tagNameCheck instanceof Function&&je.tagNameCheck(be))&&(je.attributeNameCheck instanceof RegExp&&regExpTest(je.attributeNameCheck,Oe)||je.attributeNameCheck instanceof Function&&je.attributeNameCheck(Oe))||Oe==="is"&&je.allowCustomizedBuiltInElements&&(je.tagNameCheck instanceof RegExp&&regExpTest(je.tagNameCheck,$e)||je.tagNameCheck instanceof Function&&je.tagNameCheck($e))))return!1}else if(!Wt[Oe]){if(!regExpTest(Pe,stringReplace($e,Re,""))){if(!((Oe==="src"||Oe==="xlink:href"||Oe==="href")&&be!=="script"&&stringIndexOf($e,"data:")===0&&Jt[be])){if(!(Ve&&!regExpTest(Me,stringReplace($e,Re,"")))){if($e)return!1}}}}}}return!0},pr=function(be){return be!=="annotation-xml"&&stringMatch(be,Fe)},gr=function(be){pt("beforeSanitizeAttributes",be,null);const{attributes:Oe}=be;if(!Oe)return;const $e={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ue};let We=Oe.length;for(;We--;){const Ke=Oe[We],{name:Xe,namespaceURI:Je,value:dt}=Ke,Nt=Ze(Xe);let Qe=Xe==="value"?dt:stringTrim(dt);if($e.attrName=Nt,$e.attrValue=Qe,$e.keepAttr=!0,$e.forceKeepAttr=void 0,pt("uponSanitizeAttribute",be,$e),Qe=$e.attrValue,mt&&regExpTest(/((--!?|])>)|<\/(style|title)/i,Qe)){Ht(Xe,be);continue}if($e.forceKeepAttr||(Ht(Xe,be),!$e.keepAttr))continue;if(!ht&&regExpTest(/\/>/i,Qe)){Ht(Xe,be);continue}it&&arrayForEach([Ne,ze,Be],mr=>{Qe=stringReplace(Qe,mr," ")});const _r=Ze(be.nodeName);if(fr(_r,Nt,Qe)){if(Kt&&(Nt==="id"||Nt==="name")&&(Ht(Xe,be),Qe=Tr+Qe),xe&&typeof fe=="object"&&typeof fe.getAttributeType=="function"&&!Je)switch(fe.getAttributeType(_r,Nt)){case"TrustedHTML":{Qe=xe.createHTML(Qe);break}case"TrustedScriptURL":{Qe=xe.createScriptURL(Qe);break}}try{Je?be.setAttributeNS(Je,Xe,Qe):be.setAttribute(Xe,Qe),cr(be)?ut(be):arrayPop(te.removed)}catch{}}}pt("afterSanitizeAttributes",be,null)},Ir=function De(be){let Oe=null;const $e=lr(be);for(pt("beforeSanitizeShadowDOM",be,null);Oe=$e.nextNode();)pt("uponSanitizeShadowNode",Oe,null),!dr(Oe)&&(Oe.content instanceof ae&&De(Oe.content),gr(Oe));pt("afterSanitizeShadowDOM",be,null)};return te.sanitize=function(De){let be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Oe=null,$e=null,We=null,Ke=null;if(Yt=!De,Yt&&(De="<!-->"),typeof De!="string"&&!ur(De))if(typeof De.toString=="function"){if(De=De.toString(),typeof De!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!te.isSupported)return De;if(Ut||Zt(be),te.removed=[],typeof De=="string"&&(Ot=!1),Ot){if(De.nodeName){const dt=Ze(De.nodeName);if(!He[dt]||rt[dt])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(De instanceof se)Oe=sr("<!---->"),$e=Oe.ownerDocument.importNode(De,!0),$e.nodeType===NODE_TYPE.element&&$e.nodeName==="BODY"||$e.nodeName==="HTML"?Oe=$e:Oe.appendChild($e);else{if(!xt&&!it&&!yt&&De.indexOf("<")===-1)return xe&&Ft?xe.createHTML(De):De;if(Oe=sr(De),!Oe)return xt?null:Ft?Te:""}Oe&&jt&&ut(Oe.firstChild);const Xe=lr(Ot?De:Oe);for(;We=Xe.nextNode();)dr(We)||(We.content instanceof ae&&Ir(We.content),gr(We));if(Ot)return De;if(xt){if(Dt)for(Ke=Ae.call(Oe.ownerDocument);Oe.firstChild;)Ke.appendChild(Oe.firstChild);else Ke=Oe;return(Ue.shadowroot||Ue.shadowrootmode)&&(Ke=Ee.call(ie,Ke,!0)),Ke}let Je=yt?Oe.outerHTML:Oe.innerHTML;return yt&&He["!doctype"]&&Oe.ownerDocument&&Oe.ownerDocument.doctype&&Oe.ownerDocument.doctype.name&&regExpTest(DOCTYPE_NAME,Oe.ownerDocument.doctype.name)&&(Je="<!DOCTYPE "+Oe.ownerDocument.doctype.name+`>
`+Je),it&&arrayForEach([Ne,ze,Be],dt=>{Je=stringReplace(Je,dt," ")}),xe&&Ft?xe.createHTML(Je):Je},te.setConfig=function(){let De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zt(De),Ut=!0},te.clearConfig=function(){St=null,Ut=!1},te.isValidAttribute=function(De,be,Oe){St||Zt({});const $e=Ze(De),We=Ze(be);return fr($e,We,Oe)},te.addHook=function(De,be){typeof be=="function"&&(Se[De]=Se[De]||[],arrayPush(Se[De],be))},te.removeHook=function(De){if(Se[De])return arrayPop(Se[De])},te.removeHooks=function(De){Se[De]&&(Se[De]=[])},te.removeAllHooks=function(){Se={}},te}var purify=createDOMPurify(),__defProp=Object.defineProperty,__name=(ee,te)=>__defProp(ee,"name",{value:te,configurable:!0}),__export=(ee,te)=>{for(var re in te)__defProp(ee,re,{get:te[re],enumerable:!0})},LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},log={trace:__name((...ee)=>{},"trace"),debug:__name((...ee)=>{},"debug"),info:__name((...ee)=>{},"info"),warn:__name((...ee)=>{},"warn"),error:__name((...ee)=>{},"error"),fatal:__name((...ee)=>{},"fatal")},setLogLevel=__name(function(ee="fatal"){let te=LEVELS.fatal;typeof ee=="string"?ee.toLowerCase()in LEVELS&&(te=LEVELS[ee]):typeof ee=="number"&&(te=ee),log.trace=()=>{},log.debug=()=>{},log.info=()=>{},log.warn=()=>{},log.error=()=>{},log.fatal=()=>{},te<=LEVELS.fatal&&(log.fatal=console.error?console.error.bind(console,format("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",format("FATAL"))),te<=LEVELS.error&&(log.error=console.error?console.error.bind(console,format("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",format("ERROR"))),te<=LEVELS.warn&&(log.warn=console.warn?console.warn.bind(console,format("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",format("WARN"))),te<=LEVELS.info&&(log.info=console.info?console.info.bind(console,format("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",format("INFO"))),te<=LEVELS.debug&&(log.debug=console.debug?console.debug.bind(console,format("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("DEBUG"))),te<=LEVELS.trace&&(log.trace=console.debug?console.debug.bind(console,format("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("TRACE")))},"setLogLevel"),format=__name(ee=>`%c${dayjs2().format("ss.SSS")} : ${ee} : `,"format"),frontMatterRegex=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,directiveRegex=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,anyCommentRegex=/\s*%%.*\n/gm,vt,UnknownDiagramError=(vt=class extends Error{constructor(te){super(te),this.name="UnknownDiagramError"}},__name(vt,"UnknownDiagramError"),vt),detectors={},detectType=__name(function(ee,te){ee=ee.replace(frontMatterRegex,"").replace(directiveRegex,"").replace(anyCommentRegex,`
`);for(const[re,{detector:ie}]of Object.entries(detectors))if(ie(ee,te))return re;throw new UnknownDiagramError(`No diagram type detected matching given configuration for text: ${ee}`)},"detectType"),registerLazyLoadedDiagrams=__name((...ee)=>{for(const{id:te,detector:re,loader:ie}of ee)addDetector(te,re,ie)},"registerLazyLoadedDiagrams"),addDetector=__name((ee,te,re)=>{detectors[ee]&&log.warn(`Detector with key ${ee} already exists. Overwriting.`),detectors[ee]={detector:te,loader:re},log.debug(`Detector with key ${ee} added${re?" with loader":""}`)},"addDetector"),getDiagramLoader=__name(ee=>detectors[ee].loader,"getDiagramLoader"),assignWithDepth=__name((ee,te,{depth:re=2,clobber:ie=!1}={})=>{const ne={depth:re,clobber:ie};return Array.isArray(te)&&!Array.isArray(ee)?(te.forEach(ae=>assignWithDepth(ee,ae,ne)),ee):Array.isArray(te)&&Array.isArray(ee)?(te.forEach(ae=>{ee.includes(ae)||ee.push(ae)}),ee):ee===void 0||re<=0?ee!=null&&typeof ee=="object"&&typeof te=="object"?Object.assign(ee,te):te:(te!==void 0&&typeof ee=="object"&&typeof te=="object"&&Object.keys(te).forEach(ae=>{typeof te[ae]=="object"&&(ee[ae]===void 0||typeof ee[ae]=="object")?(ee[ae]===void 0&&(ee[ae]=Array.isArray(te[ae])?[]:{}),ee[ae]=assignWithDepth(ee[ae],te[ae],{depth:re-1,clobber:ie})):(ie||typeof ee[ae]!="object"&&typeof te[ae]!="object")&&(ee[ae]=te[ae])}),ee)},"assignWithDepth"),assignWithDepth_default=assignWithDepth,oldAttributeBackgroundColorOdd="#ffffff",oldAttributeBackgroundColorEven="#f2f2f2",mkBorder=__name((ee,te)=>te?adjust(ee,{s:-40,l:10}):adjust(ee,{s:-40,l:-10}),"mkBorder"),kt,Theme=(kt=class{constructor(){this.background="#f4f4f4",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(){var re,ie,ne,ae,oe,se,le,ce,he,de,ue;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(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(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,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(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||this.actorBorder,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(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.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(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(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.darkMode)for(let fe=0;fe<this.THEME_COLOR_LIMIT;fe++)this["cScale"+fe]=darken(this["cScale"+fe],75);else for(let fe=0;fe<this.THEME_COLOR_LIMIT;fe++)this["cScale"+fe]=darken(this["cScale"+fe],25);for(let fe=0;fe<this.THEME_COLOR_LIMIT;fe++)this["cScaleInv"+fe]=this["cScaleInv"+fe]||invert(this["cScale"+fe]);for(let fe=0;fe<this.THEME_COLOR_LIMIT;fe++)this.darkMode?this["cScalePeer"+fe]=this["cScalePeer"+fe]||lighten(this["cScale"+fe],10):this["cScalePeer"+fe]=this["cScalePeer"+fe]||darken(this["cScale"+fe],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let fe=0;fe<this.THEME_COLOR_LIMIT;fe++)this["cScaleLabel"+fe]=this["cScaleLabel"+fe]||this.scaleLabelColor;const te=this.darkMode?-4:-1;for(let fe=0;fe<5;fe++)this["surface"+fe]=this["surface"+fe]||adjust(this.mainBkg,{h:180,s:-15,l:te*(5+fe*3)}),this["surfacePeer"+fe]=this["surfacePeer"+fe]||adjust(this.mainBkg,{h:180,s:-15,l:te*(8+fe*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||adjust(this.primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(this.primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((re=this.xyChart)==null?void 0:re.backgroundColor)||this.background,titleColor:((ie=this.xyChart)==null?void 0:ie.titleColor)||this.primaryTextColor,xAxisTitleColor:((ne=this.xyChart)==null?void 0:ne.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((ae=this.xyChart)==null?void 0:ae.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((oe=this.xyChart)==null?void 0:oe.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((se=this.xyChart)==null?void 0:se.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((le=this.xyChart)==null?void 0:le.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((ce=this.xyChart)==null?void 0:ce.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((he=this.xyChart)==null?void 0:he.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((de=this.xyChart)==null?void 0:de.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((ue=this.xyChart)==null?void 0:ue.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?darken(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(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(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(te){if(typeof te!="object"){this.updateColors();return}const re=Object.keys(te);re.forEach(ie=>{this[ie]=te[ie]}),this.updateColors(),re.forEach(ie=>{this[ie]=te[ie]})}},__name(kt,"Theme"),kt),getThemeVariables=__name(ee=>{const te=new Theme;return te.calculate(ee),te},"getThemeVariables"),Et,Theme2=(Et=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten(this.primaryColor,16),this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=invert(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten(invert("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=rgba$1(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("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=darken(this.sectionBkgColor,10),this.taskBorderColor=rgba$1(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=rgba$1(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=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var te,re,ie,ne,ae,oe,se,le,ce,he,de;this.secondBkg=lighten(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=lighten(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,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(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(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(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(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330});for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScaleInv"+ue]=this["cScaleInv"+ue]||invert(this["cScale"+ue]);for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScalePeer"+ue]=this["cScalePeer"+ue]||lighten(this["cScale"+ue],10);for(let ue=0;ue<5;ue++)this["surface"+ue]=this["surface"+ue]||adjust(this.mainBkg,{h:30,s:-30,l:-(-10+ue*4)}),this["surfacePeer"+ue]=this["surfacePeer"+ue]||adjust(this.mainBkg,{h:30,s:-30,l:-(-7+ue*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScaleLabel"+ue]=this["cScaleLabel"+ue]||this.scaleLabelColor;for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["pie"+ue]=this["cScale"+ue];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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((te=this.xyChart)==null?void 0:te.backgroundColor)||this.background,titleColor:((re=this.xyChart)==null?void 0:re.titleColor)||this.primaryTextColor,xAxisTitleColor:((ie=this.xyChart)==null?void 0:ie.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((ne=this.xyChart)==null?void 0:ne.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((ae=this.xyChart)==null?void 0:ae.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((oe=this.xyChart)==null?void 0:oe.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((se=this.xyChart)==null?void 0:se.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((le=this.xyChart)==null?void 0:le.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((ce=this.xyChart)==null?void 0:ce.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((he=this.xyChart)==null?void 0:he.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((de=this.xyChart)==null?void 0:de.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=lighten(this.secondaryColor,20),this.git1=lighten(this.pie2||this.secondaryColor,20),this.git2=lighten(this.pie3||this.tertiaryColor,20),this.git3=lighten(this.pie4||adjust(this.primaryColor,{h:-30}),20),this.git4=lighten(this.pie5||adjust(this.primaryColor,{h:-60}),20),this.git5=lighten(this.pie6||adjust(this.primaryColor,{h:-90}),10),this.git6=lighten(this.pie7||adjust(this.primaryColor,{h:60}),10),this.git7=lighten(this.pie8||adjust(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(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||lighten(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lighten(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(te){if(typeof te!="object"){this.updateColors();return}const re=Object.keys(te);re.forEach(ie=>{this[ie]=te[ie]}),this.updateColors(),re.forEach(ie=>{this[ie]=te[ie]})}},__name(Et,"Theme"),Et),getThemeVariables2=__name(ee=>{const te=new Theme2;return te.calculate(ee),te},"getThemeVariables"),At,Theme3=(At=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=adjust(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=adjust(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(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",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="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="#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$1(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=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var te,re,ie,ne,ae,oe,se,le,ce,he,de;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken(this.tertiaryColor,40);for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScale"+ue]=darken(this["cScale"+ue],10),this["cScalePeer"+ue]=this["cScalePeer"+ue]||darken(this["cScale"+ue],25);for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScaleInv"+ue]=this["cScaleInv"+ue]||adjust(this["cScale"+ue],{h:180});for(let ue=0;ue<5;ue++)this["surface"+ue]=this["surface"+ue]||adjust(this.mainBkg,{h:30,l:-(5+ue*5)}),this["surfacePeer"+ue]=this["surfacePeer"+ue]||adjust(this.mainBkg,{h:30,l:-(7+ue*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||invert(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||invert(this.labelTextColor);for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScaleLabel"+ue]=this["cScaleLabel"+ue]||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(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.actorLineColor=this.actorBorder,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(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||adjust(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-30}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((te=this.xyChart)==null?void 0:te.backgroundColor)||this.background,titleColor:((re=this.xyChart)==null?void 0:re.titleColor)||this.primaryTextColor,xAxisTitleColor:((ie=this.xyChart)==null?void 0:ie.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((ne=this.xyChart)==null?void 0:ne.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((ae=this.xyChart)==null?void 0:ae.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((oe=this.xyChart)==null?void 0:oe.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((se=this.xyChart)==null?void 0:se.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((le=this.xyChart)==null?void 0:le.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((ce=this.xyChart)==null?void 0:ce.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((he=this.xyChart)==null?void 0:he.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((de=this.xyChart)==null?void 0:de.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",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(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||darken(invert(this.git0),25),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(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(te){if(typeof te!="object"){this.updateColors();return}const re=Object.keys(te);re.forEach(ie=>{this[ie]=te[ie]}),this.updateColors(),re.forEach(ie=>{this[ie]=te[ie]})}},__name(At,"Theme"),At),getThemeVariables3=__name(ee=>{const te=new Theme3;return te.calculate(ee),te},"getThemeVariables"),Lt,Theme4=(Lt=class{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("#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(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.primaryColor),this.lineColor=invert(this.background),this.textColor=invert(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="calculated",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=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var te,re,ie,ne,ae,oe,se,le,ce,he,de;this.actorBorder=darken(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken(this.tertiaryColor,40);for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScale"+ue]=darken(this["cScale"+ue],10),this["cScalePeer"+ue]=this["cScalePeer"+ue]||darken(this["cScale"+ue],25);for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScaleInv"+ue]=this["cScaleInv"+ue]||adjust(this["cScale"+ue],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScaleLabel"+ue]=this["cScaleLabel"+ue]||this.scaleLabelColor;for(let ue=0;ue<5;ue++)this["surface"+ue]=this["surface"+ue]||adjust(this.mainBkg,{h:30,s:-30,l:-(5+ue*5)}),this["surfacePeer"+ue]=this["surfacePeer"+ue]||adjust(this.mainBkg,{h:30,s:-30,l:-(8+ue*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,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(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||adjust(this.primaryColor,{l:-30}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-30}),this.pie6=this.pie6||adjust(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.xyChart={backgroundColor:((te=this.xyChart)==null?void 0:te.backgroundColor)||this.background,titleColor:((re=this.xyChart)==null?void 0:re.titleColor)||this.primaryTextColor,xAxisTitleColor:((ie=this.xyChart)==null?void 0:ie.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((ne=this.xyChart)==null?void 0:ne.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((ae=this.xyChart)==null?void 0:ae.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((oe=this.xyChart)==null?void 0:oe.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((se=this.xyChart)==null?void 0:se.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((le=this.xyChart)==null?void 0:le.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((ce=this.xyChart)==null?void 0:ce.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((he=this.xyChart)==null?void 0:he.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((de=this.xyChart)==null?void 0:de.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",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(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(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(te){if(typeof te!="object"){this.updateColors();return}const re=Object.keys(te);re.forEach(ie=>{this[ie]=te[ie]}),this.updateColors(),re.forEach(ie=>{this[ie]=te[ie]})}},__name(Lt,"Theme"),Lt),getThemeVariables4=__name(ee=>{const te=new Theme4;return te.calculate(ee),te},"getThemeVariables"),It,Theme5=(It=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=lighten(this.contrast,55),this.background="#ffffff",this.tertiaryColor=adjust(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(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.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=this.actorBorder,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=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var te,re,ie,ne,ae,oe,se,le,ce,he,de;this.secondBkg=lighten(this.contrast,55),this.border2=this.contrast,this.actorBorder=lighten(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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.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 ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScaleInv"+ue]=this["cScaleInv"+ue]||invert(this["cScale"+ue]);for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this.darkMode?this["cScalePeer"+ue]=this["cScalePeer"+ue]||lighten(this["cScale"+ue],10):this["cScalePeer"+ue]=this["cScalePeer"+ue]||darken(this["cScale"+ue],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["cScaleLabel"+ue]=this["cScaleLabel"+ue]||this.scaleLabelColor;for(let ue=0;ue<5;ue++)this["surface"+ue]=this["surface"+ue]||adjust(this.mainBkg,{l:-(5+ue*5)}),this["surfacePeer"+ue]=this["surfacePeer"+ue]||adjust(this.mainBkg,{l:-(8+ue*5)});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.sectionBkgColor=lighten(this.contrast,30),this.sectionBkgColor2=lighten(this.contrast,30),this.taskBorderColor=darken(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=lighten(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=darken(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(this.secondaryColor,{h:128});for(let ue=0;ue<this.THEME_COLOR_LIMIT;ue++)this["pie"+ue]=this["cScale"+ue];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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((te=this.xyChart)==null?void 0:te.backgroundColor)||this.background,titleColor:((re=this.xyChart)==null?void 0:re.titleColor)||this.primaryTextColor,xAxisTitleColor:((ie=this.xyChart)==null?void 0:ie.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((ne=this.xyChart)==null?void 0:ne.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((ae=this.xyChart)==null?void 0:ae.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((oe=this.xyChart)==null?void 0:oe.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((se=this.xyChart)==null?void 0:se.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((le=this.xyChart)==null?void 0:le.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((ce=this.xyChart)==null?void 0:ce.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((he=this.xyChart)==null?void 0:he.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((de=this.xyChart)==null?void 0:de.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",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(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||adjust(this.primaryColor,{h:-30}),this.git4=this.pie5||adjust(this.primaryColor,{h:-60}),this.git5=this.pie6||adjust(this.primaryColor,{h:-90}),this.git6=this.pie7||adjust(this.primaryColor,{h:60}),this.git7=this.pie8||adjust(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(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(te){if(typeof te!="object"){this.updateColors();return}const re=Object.keys(te);re.forEach(ie=>{this[ie]=te[ie]}),this.updateColors(),re.forEach(ie=>{this[ie]=te[ie]})}},__name(It,"Theme"),It),getThemeVariables5=__name(ee=>{const te=new Theme5;return te.calculate(ee),te},"getThemeVariables"),themes_default={base:{getThemeVariables},dark:{getThemeVariables:getThemeVariables2},default:{getThemeVariables:getThemeVariables3},forest:{getThemeVariables:getThemeVariables4},neutral:{getThemeVariables:getThemeVariables5}},config_schema_default={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,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,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},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,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:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,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,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{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},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,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"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,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,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"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},config={...config_schema_default,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"SIMPLE"},themeCSS:void 0,themeVariables:themes_default.default.getThemeVariables(),sequence:{...config_schema_default.sequence,messageFont:__name(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:__name(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:__name(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},gantt:{...config_schema_default.gantt,tickInterval:void 0,useWidth:void 0},c4:{...config_schema_default.c4,useWidth:void 0,personFont:__name(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:__name(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:__name(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:__name(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:__name(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:__name(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:__name(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:__name(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:__name(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:__name(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:__name(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:__name(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:__name(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:__name(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:__name(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:__name(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:__name(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:__name(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:__name(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:__name(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:__name(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:__name(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...config_schema_default.pie,useWidth:984},xyChart:{...config_schema_default.xyChart,useWidth:void 0},requirement:{...config_schema_default.requirement,useWidth:void 0},packet:{...config_schema_default.packet}},keyify=__name((ee,te="")=>Object.keys(ee).reduce((re,ie)=>Array.isArray(ee[ie])?re:typeof ee[ie]=="object"&&ee[ie]!==null?[...re,te+ie,...keyify(ee[ie],"")]:[...re,te+ie],[]),"keyify"),configKeys=new Set(keyify(config,"")),defaultConfig_default=config,sanitizeDirective=__name(ee=>{if(log.debug("sanitizeDirective called with",ee),!(typeof ee!="object"||ee==null)){if(Array.isArray(ee)){ee.forEach(te=>sanitizeDirective(te));return}for(const te of Object.keys(ee)){if(log.debug("Checking key",te),te.startsWith("__")||te.includes("proto")||te.includes("constr")||!configKeys.has(te)||ee[te]==null){log.debug("sanitize deleting key: ",te),delete ee[te];continue}if(typeof ee[te]=="object"){log.debug("sanitizing object",te),sanitizeDirective(ee[te]);continue}const re=["themeCSS","fontFamily","altFontFamily"];for(const ie of re)te.includes(ie)&&(log.debug("sanitizing css option",te),ee[te]=sanitizeCss(ee[te]))}if(ee.themeVariables)for(const te of Object.keys(ee.themeVariables)){const re=ee.themeVariables[te];re!=null&&re.match&&!re.match(/^[\d "#%(),.;A-Za-z]+$/)&&(ee.themeVariables[te]="")}log.debug("After sanitization",ee)}},"sanitizeDirective"),sanitizeCss=__name(ee=>{let te=0,re=0;for(const ie of ee){if(te<re)return"{ /* ERROR: Unbalanced CSS */ }";ie==="{"?te++:ie==="}"&&re++}return te!==re?"{ /* ERROR: Unbalanced CSS */ }":ee},"sanitizeCss"),defaultConfig=Object.freeze(defaultConfig_default),siteConfig=assignWithDepth_default({},defaultConfig),configFromInitialize,directives=[],currentConfig=assignWithDepth_default({},defaultConfig),updateCurrentConfig=__name((ee,te)=>{let re=assignWithDepth_default({},ee),ie={};for(const ne of te)sanitize(ne),ie=assignWithDepth_default(ie,ne);if(re=assignWithDepth_default(re,ie),ie.theme&&ie.theme in themes_default){const ne=assignWithDepth_default({},configFromInitialize),ae=assignWithDepth_default(ne.themeVariables||{},ie.themeVariables);re.theme&&re.theme in themes_default&&(re.themeVariables=themes_default[re.theme].getThemeVariables(ae))}return currentConfig=re,checkConfig(currentConfig),currentConfig},"updateCurrentConfig"),setSiteConfig=__name(ee=>(siteConfig=assignWithDepth_default({},defaultConfig),siteConfig=assignWithDepth_default(siteConfig,ee),ee.theme&&themes_default[ee.theme]&&(siteConfig.themeVariables=themes_default[ee.theme].getThemeVariables(ee.themeVariables)),updateCurrentConfig(siteConfig,directives),siteConfig),"setSiteConfig"),saveConfigFromInitialize=__name(ee=>{configFromInitialize=assignWithDepth_default({},ee)},"saveConfigFromInitialize"),updateSiteConfig=__name(ee=>(siteConfig=assignWithDepth_default(siteConfig,ee),updateCurrentConfig(siteConfig,directives),siteConfig),"updateSiteConfig"),getSiteConfig=__name(()=>assignWithDepth_default({},siteConfig),"getSiteConfig"),setConfig=__name(ee=>(checkConfig(ee),assignWithDepth_default(currentConfig,ee),getConfig()),"setConfig"),getConfig=__name(()=>assignWithDepth_default({},currentConfig),"getConfig"),sanitize=__name(ee=>{ee&&(["secure",...siteConfig.secure??[]].forEach(te=>{Object.hasOwn(ee,te)&&(log.debug(`Denied attempt to modify a secure key ${te}`,ee[te]),delete ee[te])}),Object.keys(ee).forEach(te=>{te.startsWith("__")&&delete ee[te]}),Object.keys(ee).forEach(te=>{typeof ee[te]=="string"&&(ee[te].includes("<")||ee[te].includes(">")||ee[te].includes("url(data:"))&&delete ee[te],typeof ee[te]=="object"&&sanitize(ee[te])}))},"sanitize"),addDirective=__name(ee=>{var te;sanitizeDirective(ee),ee.fontFamily&&!((te=ee.themeVariables)!=null&&te.fontFamily)&&(ee.themeVariables={...ee.themeVariables,fontFamily:ee.fontFamily}),directives.push(ee),updateCurrentConfig(siteConfig,directives)},"addDirective"),reset=__name((ee=siteConfig)=>{directives=[],updateCurrentConfig(ee,directives)},"reset"),ConfigWarning={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},issuedWarnings={},issueWarning=__name(ee=>{issuedWarnings[ee]||(log.warn(ConfigWarning[ee]),issuedWarnings[ee]=!0)},"issueWarning"),checkConfig=__name(ee=>{ee&&(ee.lazyLoadedDiagrams||ee.loadExternalDiagramsAtStartup)&&issueWarning("LAZY_LOAD_DEPRECATED")},"checkConfig"),lineBreakRegex=/<br\s*\/?>/gi,getRows=__name(ee=>ee?breakToPlaceholder(ee).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),setupDompurifyHooksIfNotSetup=(()=>{let ee=!1;return()=>{ee||(setupDompurifyHooks(),ee=!0)}})();function setupDompurifyHooks(){const ee="data-temp-href-target";purify.addHook("beforeSanitizeAttributes",te=>{te.tagName==="A"&&te.hasAttribute("target")&&te.setAttribute(ee,te.getAttribute("target")??"")}),purify.addHook("afterSanitizeAttributes",te=>{te.tagName==="A"&&te.hasAttribute(ee)&&(te.setAttribute("target",te.getAttribute(ee)??""),te.removeAttribute(ee),te.getAttribute("target")==="_blank"&&te.setAttribute("rel","noopener"))})}__name(setupDompurifyHooks,"setupDompurifyHooks");var removeScript=__name(ee=>(setupDompurifyHooksIfNotSetup(),purify.sanitize(ee)),"removeScript"),sanitizeMore=__name((ee,te)=>{var re;if(((re=te.flowchart)==null?void 0:re.htmlLabels)!==!1){const ie=te.securityLevel;ie==="antiscript"||ie==="strict"?ee=removeScript(ee):ie!=="loose"&&(ee=breakToPlaceholder(ee),ee=ee.replace(/</g,"&lt;").replace(/>/g,"&gt;"),ee=ee.replace(/=/g,"&equals;"),ee=placeholderToBreak(ee))}return ee},"sanitizeMore"),sanitizeText=__name((ee,te)=>ee&&(te.dompurifyConfig?ee=purify.sanitize(sanitizeMore(ee,te),te.dompurifyConfig).toString():ee=purify.sanitize(sanitizeMore(ee,te),{FORBID_TAGS:["style"]}).toString(),ee),"sanitizeText"),sanitizeTextOrArray=__name((ee,te)=>typeof ee=="string"?sanitizeText(ee,te):ee.flat().map(re=>sanitizeText(re,te)),"sanitizeTextOrArray"),hasBreaks=__name(ee=>lineBreakRegex.test(ee),"hasBreaks"),splitBreaks=__name(ee=>ee.split(lineBreakRegex),"splitBreaks"),placeholderToBreak=__name(ee=>ee.replace(/#br#/g,"<br/>"),"placeholderToBreak"),breakToPlaceholder=__name(ee=>ee.replace(lineBreakRegex,"#br#"),"breakToPlaceholder"),getUrl=__name(ee=>{let te="";return ee&&(te=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,te=te.replaceAll(/\(/g,"\\("),te=te.replaceAll(/\)/g,"\\)")),te},"getUrl"),evaluate=__name(ee=>!(ee===!1||["false","null","0"].includes(String(ee).trim().toLowerCase())),"evaluate"),getMax=__name(function(...ee){const te=ee.filter(re=>!isNaN(re));return Math.max(...te)},"getMax"),getMin=__name(function(...ee){const te=ee.filter(re=>!isNaN(re));return Math.min(...te)},"getMin"),parseGenericTypes=__name(function(ee){const te=ee.split(/(,)/),re=[];for(let ie=0;ie<te.length;ie++){let ne=te[ie];if(ne===","&&ie>0&&ie+1<te.length){const ae=te[ie-1],oe=te[ie+1];shouldCombineSets(ae,oe)&&(ne=ae+","+oe,ie++,re.pop())}re.push(processSet(ne))}return re.join("")},"parseGenericTypes"),countOccurrence=__name((ee,te)=>Math.max(0,ee.split(te).length-1),"countOccurrence"),shouldCombineSets=__name((ee,te)=>{const re=countOccurrence(ee,"~"),ie=countOccurrence(te,"~");return re===1&&ie===1},"shouldCombineSets"),processSet=__name(ee=>{const te=countOccurrence(ee,"~");let re=!1;if(te<=1)return ee;te%2!==0&&ee.startsWith("~")&&(ee=ee.substring(1),re=!0);const ie=[...ee];let ne=ie.indexOf("~"),ae=ie.lastIndexOf("~");for(;ne!==-1&&ae!==-1&&ne!==ae;)ie[ne]="<",ie[ae]=">",ne=ie.indexOf("~"),ae=ie.lastIndexOf("~");return re&&ie.unshift("~"),ie.join("")},"processSet"),isMathMLSupported=__name(()=>window.MathMLElement!==void 0,"isMathMLSupported"),katexRegex=/\$\$(.*)\$\$/g,hasKatex=__name(ee=>{var te;return(((te=ee.match(katexRegex))==null?void 0:te.length)??0)>0},"hasKatex"),calculateMathMLDimensions=__name(async(ee,te)=>{ee=await renderKatex(ee,te);const re=document.createElement("div");re.innerHTML=ee,re.id="katex-temp",re.style.visibility="hidden",re.style.position="absolute",re.style.top="0";const ie=document.querySelector("body");ie==null||ie.insertAdjacentElement("beforeend",re);const ne={width:re.clientWidth,height:re.clientHeight};return re.remove(),ne},"calculateMathMLDimensions"),renderKatex=__name(async(ee,te)=>{if(!hasKatex(ee))return ee;if(!(isMathMLSupported()||te.legacyMathML||te.forceLegacyMathML))return ee.replace(katexRegex,"MathML is unsupported in this environment.");const{default:re}=await __vitePreload(async()=>{const{default:ne}=await import("./katex.rPiVaalG.js");return{default:ne}},[],import.meta.url),ie=te.forceLegacyMathML||!isMathMLSupported()&&te.legacyMathML?"htmlAndMathml":"mathml";return ee.split(lineBreakRegex).map(ne=>hasKatex(ne)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${ne}</div>`:`<div>${ne}</div>`).join("").replace(katexRegex,(ne,ae)=>re.renderToString(ae,{throwOnError:!0,displayMode:!0,output:ie}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},"renderKatex"),common_default={getRows,sanitizeText,sanitizeTextOrArray,hasBreaks,splitBreaks,lineBreakRegex,removeScript,getUrl,evaluate,getMax,getMin},d3Attrs=__name(function(ee,te){for(let re of te)ee.attr(re[0],re[1])},"d3Attrs"),calculateSvgSizeAttrs=__name(function(ee,te,re){let ie=new Map;return re?(ie.set("width","100%"),ie.set("style",`max-width: ${te}px;`)):(ie.set("height",ee),ie.set("width",te)),ie},"calculateSvgSizeAttrs"),configureSvgSize=__name(function(ee,te,re,ie){const ne=calculateSvgSizeAttrs(te,re,ie);d3Attrs(ee,ne)},"configureSvgSize"),setupGraphViewbox=__name(function(ee,te,re,ie){const ne=te.node().getBBox(),ae=ne.width,oe=ne.height;log.info(`SVG bounds: ${ae}x${oe}`,ne);let se=0,le=0;log.info(`Graph bounds: ${se}x${le}`,ee),se=ae+re*2,le=oe+re*2,log.info(`Calculated bounds: ${se}x${le}`),configureSvgSize(te,le,se,ie);const ce=`${ne.x-re} ${ne.y-re} ${ne.width+2*re} ${ne.height+2*re}`;te.attr("viewBox",ce)},"setupGraphViewbox"),themes={},getStyles=__name((ee,te,re)=>{let ie="";return ee in themes&&themes[ee]?ie=themes[ee](re):log.warn(`No theme found for ${ee}`),` & {
font-family: ${re.fontFamily};
font-size: ${re.fontSize};
fill: ${re.textColor}
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${re.errorBkgColor};
}
& .error-text {
fill: ${re.errorTextColor};
stroke: ${re.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: 1px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-thickness-invisible {
stroke-width: 0;
fill: none;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${re.lineColor};
stroke: ${re.lineColor};
}
& .marker.cross {
stroke: ${re.lineColor};
}
& svg {
font-family: ${re.fontFamily};
font-size: ${re.fontSize};
}
& p {
margin: 0
}
${ie}
${te}
`},"getStyles"),addStylesForDiagram=__name((ee,te)=>{te!==void 0&&(themes[ee]=te)},"addStylesForDiagram"),styles_default=getStyles,commonDb_exports={};__export(commonDb_exports,{clear:()=>clear$1,getAccDescription:()=>getAccDescription,getAccTitle:()=>getAccTitle,getDiagramTitle:()=>getDiagramTitle,setAccDescription:()=>setAccDescription,setAccTitle:()=>setAccTitle,setDiagramTitle:()=>setDiagramTitle});var accTitle="",diagramTitle="",accDescription="",sanitizeText2=__name(ee=>sanitizeText(ee,getConfig()),"sanitizeText"),clear$1=__name(()=>{accTitle="",accDescription="",diagramTitle=""},"clear"),setAccTitle=__name(ee=>{accTitle=sanitizeText2(ee).replace(/^\s+/g,"")},"setAccTitle"),getAccTitle=__name(()=>accTitle,"getAccTitle"),setAccDescription=__name(ee=>{accDescription=sanitizeText2(ee).replace(/\n\s+/g,`
`)},"setAccDescription"),getAccDescription=__name(()=>accDescription,"getAccDescription"),setDiagramTitle=__name(ee=>{diagramTitle=sanitizeText2(ee)},"setDiagramTitle"),getDiagramTitle=__name(()=>diagramTitle,"getDiagramTitle"),log2=log,setLogLevel2=setLogLevel,getConfig2=getConfig,setConfig2=setConfig,defaultConfig2=defaultConfig,sanitizeText3=__name(ee=>sanitizeText(ee,getConfig2()),"sanitizeText"),setupGraphViewbox2=setupGraphViewbox,getCommonDb=__name(()=>commonDb_exports,"getCommonDb"),diagrams={},registerDiagram=__name((ee,te,re)=>{var ie;diagrams[ee]&&log2.warn(`Diagram with id ${ee} already registered. Overwriting.`),diagrams[ee]=te,re&&addDetector(ee,re),addStylesForDiagram(ee,te.styles),(ie=te.injectUtils)==null||ie.call(te,log2,setLogLevel2,getConfig2,sanitizeText3,setupGraphViewbox2,getCommonDb(),()=>{})},"registerDiagram"),getDiagram=__name(ee=>{if(ee in diagrams)return diagrams[ee];throw new DiagramNotFoundError(ee)},"getDiagram"),Rt,DiagramNotFoundError=(Rt=class extends Error{constructor(te){super(`Diagram ${te} not found.`)}},__name(Rt,"DiagramNotFoundError"),Rt),getSubGraphTitleMargins=__name(({flowchart:ee})=>{var ne,ae;const te=((ne=ee==null?void 0:ee.subGraphTitleMargin)==null?void 0:ne.top)??0,re=((ae=ee==null?void 0:ee.subGraphTitleMargin)==null?void 0:ae.bottom)??0,ie=te+re;return{subGraphTitleTopMargin:te,subGraphTitleBottomMargin:re,subGraphTitleTotalMargin:ie}},"getSubGraphTitleMargins"),markerOffsets={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function calculateDeltaAndAngle(ee,te){if(ee===void 0||te===void 0)return{angle:0,deltaX:0,deltaY:0};ee=pointTransformer(ee),te=pointTransformer(te);const[re,ie]=[ee.x,ee.y],[ne,ae]=[te.x,te.y],oe=ne-re,se=ae-ie;return{angle:Math.atan(se/oe),deltaX:oe,deltaY:se}}__name(calculateDeltaAndAngle,"calculateDeltaAndAngle");var pointTransformer=__name(ee=>Array.isArray(ee)?{x:ee[0],y:ee[1]}:ee,"pointTransformer"),getLineFunctionsWithOffset=__name(ee=>({x:__name(function(te,re,ie){let ne=0;if(re===0&&Object.hasOwn(markerOffsets,ee.arrowTypeStart)){const{angle:ae,deltaX:oe}=calculateDeltaAndAngle(ie[0],ie[1]);ne=markerOffsets[ee.arrowTypeStart]*Math.cos(ae)*(oe>=0?1:-1)}else if(re===ie.length-1&&Object.hasOwn(markerOffsets,ee.arrowTypeEnd)){const{angle:ae,deltaX:oe}=calculateDeltaAndAngle(ie[ie.length-1],ie[ie.length-2]);ne=markerOffsets[ee.arrowTypeEnd]*Math.cos(ae)*(oe>=0?1:-1)}return pointTransformer(te).x+ne},"x"),y:__name(function(te,re,ie){let ne=0;if(re===0&&Object.hasOwn(markerOffsets,ee.arrowTypeStart)){const{angle:ae,deltaY:oe}=calculateDeltaAndAngle(ie[0],ie[1]);ne=markerOffsets[ee.arrowTypeStart]*Math.abs(Math.sin(ae))*(oe>=0?1:-1)}else if(re===ie.length-1&&Object.hasOwn(markerOffsets,ee.arrowTypeEnd)){const{angle:ae,deltaY:oe}=calculateDeltaAndAngle(ie[ie.length-1],ie[ie.length-2]);ne=markerOffsets[ee.arrowTypeEnd]*Math.abs(Math.sin(ae))*(oe>=0?1:-1)}return pointTransformer(te).y+ne},"y")}),"getLineFunctionsWithOffset"),dist$1={},constants$3={};Object.defineProperty(constants$3,"__esModule",{value:!0});constants$3.BLANK_URL=constants$3.relativeFirstCharacters=constants$3.whitespaceEscapeCharsRegex=constants$3.urlSchemeRegex=constants$3.ctrlCharactersRegex=constants$3.htmlCtrlEntityRegex=constants$3.htmlEntitiesRegex=constants$3.invalidProtocolRegex=void 0;constants$3.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;constants$3.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;constants$3.htmlCtrlEntityRegex=/&(newline|tab);/gi;constants$3.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;constants$3.urlSchemeRegex=/^.+(:|&colon;)/gim;constants$3.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;constants$3.relativeFirstCharacters=[".","/"];constants$3.BLANK_URL="about:blank";Object.defineProperty(dist$1,"__esModule",{value:!0});var sanitizeUrl_1=dist$1.sanitizeUrl=void 0,constants_1=constants$3;function isRelativeUrlWithoutProtocol(ee){return constants_1.relativeFirstCharacters.indexOf(ee[0])>-1}function decodeHtmlCharacters(ee){var te=ee.replace(constants_1.ctrlCharactersRegex,"");return te.replace(constants_1.htmlEntitiesRegex,function(re,ie){return String.fromCharCode(ie)})}function isValidUrl(ee){return URL.canParse(ee)}function decodeURI(ee){try{return decodeURIComponent(ee)}catch{return ee}}function sanitizeUrl(ee){if(!ee)return constants_1.BLANK_URL;var te,re=decodeURI(ee.trim());do re=decodeHtmlCharacters(re).replace(constants_1.htmlCtrlEntityRegex,"").replace(constants_1.ctrlCharactersRegex,"").replace(constants_1.whitespaceEscapeCharsRegex,"").trim(),re=decodeURI(re),te=re.match(constants_1.ctrlCharactersRegex)||re.match(constants_1.htmlEntitiesRegex)||re.match(constants_1.htmlCtrlEntityRegex)||re.match(constants_1.whitespaceEscapeCharsRegex);while(te&&te.length>0);var ie=re;if(!ie)return constants_1.BLANK_URL;if(isRelativeUrlWithoutProtocol(ie))return ie;var ne=ie.trimStart(),ae=ne.match(constants_1.urlSchemeRegex);if(!ae)return ie;var oe=ae[0].toLowerCase().trim();if(constants_1.invalidProtocolRegex.test(oe))return constants_1.BLANK_URL;var se=ne.replace(/\\/g,"/");if(oe==="mailto:"||oe.includes("://"))return se;if(oe==="http:"||oe==="https:"){if(!isValidUrl(se))return constants_1.BLANK_URL;var le=new URL(se);return le.protocol=le.protocol.toLowerCase(),le.hostname=le.hostname.toLowerCase(),le.toString()}return se}sanitizeUrl_1=dist$1.sanitizeUrl=sanitizeUrl;var noop$1={value:()=>{}};function dispatch(){for(var ee=0,te=arguments.length,re={},ie;ee<te;++ee){if(!(ie=arguments[ee]+"")||ie in re||/[\s.]/.test(ie))throw new Error("illegal type: "+ie);re[ie]=[]}return new Dispatch(re)}function Dispatch(ee){this._=ee}function parseTypenames$1(ee,te){return ee.trim().split(/^|\s+/).map(function(re){var ie="",ne=re.indexOf(".");if(ne>=0&&(ie=re.slice(ne+1),re=re.slice(0,ne)),re&&!te.hasOwnProperty(re))throw new Error("unknown type: "+re);return{type:re,name:ie}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(ee,te){var re=this._,ie=parseTypenames$1(ee+"",re),ne,ae=-1,oe=ie.length;if(arguments.length<2){for(;++ae<oe;)if((ne=(ee=ie[ae]).type)&&(ne=get$1(re[ne],ee.name)))return ne;return}if(te!=null&&typeof te!="function")throw new Error("invalid callback: "+te);for(;++ae<oe;)if(ne=(ee=ie[ae]).type)re[ne]=set$2(re[ne],ee.name,te);else if(te==null)for(ne in re)re[ne]=set$2(re[ne],ee.name,null);return this},copy:function(){var ee={},te=this._;for(var re in te)ee[re]=te[re].slice();return new Dispatch(ee)},call:function(ee,te){if((ne=arguments.length-2)>0)for(var re=new Array(ne),ie=0,ne,ae;ie<ne;++ie)re[ie]=arguments[ie+2];if(!this._.hasOwnProperty(ee))throw new Error("unknown type: "+ee);for(ae=this._[ee],ie=0,ne=ae.length;ie<ne;++ie)ae[ie].value.apply(te,re)},apply:function(ee,te,re){if(!this._.hasOwnProperty(ee))throw new Error("unknown type: "+ee);for(var ie=this._[ee],ne=0,ae=ie.length;ne<ae;++ne)ie[ne].value.apply(te,re)}};function get$1(ee,te){for(var re=0,ie=ee.length,ne;re<ie;++re)if((ne=ee[re]).name===te)return ne.value}function set$2(ee,te,re){for(var ie=0,ne=ee.length;ie<ne;++ie)if(ee[ie].name===te){ee[ie]=noop$1,ee=ee.slice(0,ie).concat(ee.slice(ie+1));break}return re!=null&&ee.push({name:te,value:re}),ee}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(ee){var te=ee+="",re=te.indexOf(":");return re>=0&&(te=ee.slice(0,re))!=="xmlns"&&(ee=ee.slice(re+1)),namespaces.hasOwnProperty(te)?{space:namespaces[te],local:ee}:ee}function creatorInherit(ee){return function(){var te=this.ownerDocument,re=this.namespaceURI;return re===xhtml&&te.documentElement.namespaceURI===xhtml?te.createElement(ee):te.createElementNS(re,ee)}}function creatorFixed(ee){return function(){return this.ownerDocument.createElementNS(ee.space,ee.local)}}function creator(ee){var te=namespace(ee);return(te.local?creatorFixed:creatorInherit)(te)}function none(){}function selector(ee){return ee==null?none:function(){return this.querySelector(ee)}}function selection_select(ee){typeof ee!="function"&&(ee=selector(ee));for(var te=this._groups,re=te.length,ie=new Array(re),ne=0;ne<re;++ne)for(var ae=te[ne],oe=ae.length,se=ie[ne]=new Array(oe),le,ce,he=0;he<oe;++he)(le=ae[he])&&(ce=ee.call(le,le.__data__,he,ae))&&("__data__"in le&&(ce.__data__=le.__data__),se[he]=ce);return new Selection$1(ie,this._parents)}function array$1(ee){return ee==null?[]:Array.isArray(ee)?ee:Array.from(ee)}function empty(){return[]}function selectorAll(ee){return ee==null?empty:function(){return this.querySelectorAll(ee)}}function arrayAll(ee){return function(){return array$1(ee.apply(this,arguments))}}function selection_selectAll(ee){typeof ee=="function"?ee=arrayAll(ee):ee=selectorAll(ee);for(var te=this._groups,re=te.length,ie=[],ne=[],ae=0;ae<re;++ae)for(var oe=te[ae],se=oe.length,le,ce=0;ce<se;++ce)(le=oe[ce])&&(ie.push(ee.call(le,le.__data__,ce,oe)),ne.push(le));return new Selection$1(ie,ne)}function matcher(ee){return function(){return this.matches(ee)}}function childMatcher(ee){return function(te){return te.matches(ee)}}var find=Array.prototype.find;function childFind(ee){return function(){return find.call(this.children,ee)}}function childFirst(){return this.firstElementChild}function selection_selectChild(ee){return this.select(ee==null?childFirst:childFind(typeof ee=="function"?ee:childMatcher(ee)))}var filter=Array.prototype.filter;function children(){return Array.from(this.children)}function childrenFilter(ee){return function(){return filter.call(this.children,ee)}}function selection_selectChildren(ee){return this.selectAll(ee==null?children:childrenFilter(typeof ee=="function"?ee:childMatcher(ee)))}function selection_filter(ee){typeof ee!="function"&&(ee=matcher(ee));for(var te=this._groups,re=te.length,ie=new Array(re),ne=0;ne<re;++ne)for(var ae=te[ne],oe=ae.length,se=ie[ne]=[],le,ce=0;ce<oe;++ce)(le=ae[ce])&&ee.call(le,le.__data__,ce,ae)&&se.push(le);return new Selection$1(ie,this._parents)}function sparse(ee){return new Array(ee.length)}function selection_enter(){return new Selection$1(this._enter||this._groups.map(sparse),this._parents)}function EnterNode(ee,te){this.ownerDocument=ee.ownerDocument,this.namespaceURI=ee.namespaceURI,this._next=null,this._parent=ee,this.__data__=te}EnterNode.prototype={constructor:EnterNode,appendChild:function(ee){return this._parent.insertBefore(ee,this._next)},insertBefore:function(ee,te){return this._parent.insertBefore(ee,te)},querySelector:function(ee){return this._parent.querySelector(ee)},querySelectorAll:function(ee){return this._parent.querySelectorAll(ee)}};function constant$2(ee){return function(){return ee}}function bindIndex(ee,te,re,ie,ne,ae){for(var oe=0,se,le=te.length,ce=ae.length;oe<ce;++oe)(se=te[oe])?(se.__data__=ae[oe],ie[oe]=se):re[oe]=new EnterNode(ee,ae[oe]);for(;oe<le;++oe)(se=te[oe])&&(ne[oe]=se)}function bindKey(ee,te,re,ie,ne,ae,oe){var se,le,ce=new Map,he=te.length,de=ae.length,ue=new Array(he),fe;for(se=0;se<he;++se)(le=te[se])&&(ue[se]=fe=oe.call(le,le.__data__,se,te)+"",ce.has(fe)?ne[se]=le:ce.set(fe,le));for(se=0;se<de;++se)fe=oe.call(ee,ae[se],se,ae)+"",(le=ce.get(fe))?(ie[se]=le,le.__data__=ae[se],ce.delete(fe)):re[se]=new EnterNode(ee,ae[se]);for(se=0;se<he;++se)(le=te[se])&&ce.get(ue[se])===le&&(ne[se]=le)}function datum(ee){return ee.__data__}function selection_data(ee,te){if(!arguments.length)return Array.from(this,datum);var re=te?bindKey:bindIndex,ie=this._parents,ne=this._groups;typeof ee!="function"&&(ee=constant$2(ee));for(var ae=ne.length,oe=new Array(ae),se=new Array(ae),le=new Array(ae),ce=0;ce<ae;++ce){var he=ie[ce],de=ne[ce],ue=de.length,fe=arraylike(ee.call(he,he&&he.__data__,ce,ie)),pe=fe.length,ge=se[ce]=new Array(pe),ye=oe[ce]=new Array(pe),_e=le[ce]=new Array(ue);re(he,de,ge,ye,_e,fe,te);for(var me=0,we=0,xe,Te;me<pe;++me)if(xe=ge[me]){for(me>=we&&(we=me+1);!(Te=ye[we])&&++we<pe;);xe._next=Te||null}}return oe=new Selection$1(oe,ie),oe._enter=se,oe._exit=le,oe}function arraylike(ee){return typeof ee=="object"&&"length"in ee?ee:Array.from(ee)}function selection_exit(){return new Selection$1(this._exit||this._groups.map(sparse),this._parents)}function selection_join(ee,te,re){var ie=this.enter(),ne=this,ae=this.exit();return typeof ee=="function"?(ie=ee(ie),ie&&(ie=ie.selection())):ie=ie.append(ee+""),te!=null&&(ne=te(ne),ne&&(ne=ne.selection())),re==null?ae.remove():re(ae),ie&&ne?ie.merge(ne).order():ne}function selection_merge(ee){for(var te=ee.selection?ee.selection():ee,re=this._groups,ie=te._groups,ne=re.length,ae=ie.length,oe=Math.min(ne,ae),se=new Array(ne),le=0;le<oe;++le)for(var ce=re[le],he=ie[le],de=ce.length,ue=se[le]=new Array(de),fe,pe=0;pe<de;++pe)(fe=ce[pe]||he[pe])&&(ue[pe]=fe);for(;le<ne;++le)se[le]=re[le];return new Selection$1(se,this._parents)}function selection_order(){for(var ee=this._groups,te=-1,re=ee.length;++te<re;)for(var ie=ee[te],ne=ie.length-1,ae=ie[ne],oe;--ne>=0;)(oe=ie[ne])&&(ae&&oe.compareDocumentPosition(ae)^4&&ae.parentNode.insertBefore(oe,ae),ae=oe);return this}function selection_sort(ee){ee||(ee=ascending);function te(de,ue){return de&&ue?ee(de.__data__,ue.__data__):!de-!ue}for(var re=this._groups,ie=re.length,ne=new Array(ie),ae=0;ae<ie;++ae){for(var oe=re[ae],se=oe.length,le=ne[ae]=new Array(se),ce,he=0;he<se;++he)(ce=oe[he])&&(le[he]=ce);le.sort(te)}return new Selection$1(ne,this._parents).order()}function ascending(ee,te){return ee<te?-1:ee>te?1:ee>=te?0:NaN}function selection_call(){var ee=arguments[0];return arguments[0]=this,ee.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var ee=this._groups,te=0,re=ee.length;te<re;++te)for(var ie=ee[te],ne=0,ae=ie.length;ne<ae;++ne){var oe=ie[ne];if(oe)return oe}return null}function selection_size(){let ee=0;for(const te of this)++ee;return ee}function selection_empty(){return!this.node()}function selection_each(ee){for(var te=this._groups,re=0,ie=te.length;re<ie;++re)for(var ne=te[re],ae=0,oe=ne.length,se;ae<oe;++ae)(se=ne[ae])&&ee.call(se,se.__data__,ae,ne);return this}function attrRemove$1(ee){return function(){this.removeAttribute(ee)}}function attrRemoveNS$1(ee){return function(){this.removeAttributeNS(ee.space,ee.local)}}function attrConstant$1(ee,te){return function(){this.setAttribute(ee,te)}}function attrConstantNS$1(ee,te){return function(){this.setAttributeNS(ee.space,ee.local,te)}}function attrFunction$1(ee,te){return function(){var re=te.apply(this,arguments);re==null?this.removeAttribute(ee):this.setAttribute(ee,re)}}function attrFunctionNS$1(ee,te){return function(){var re=te.apply(this,arguments);re==null?this.removeAttributeNS(ee.space,ee.local):this.setAttributeNS(ee.space,ee.local,re)}}function selection_attr(ee,te){var re=namespace(ee);if(arguments.length<2){var ie=this.node();return re.local?ie.getAttributeNS(re.space,re.local):ie.getAttribute(re)}return this.each((te==null?re.local?attrRemoveNS$1:attrRemove$1:typeof te=="function"?re.local?attrFunctionNS$1:attrFunction$1:re.local?attrConstantNS$1:attrConstant$1)(re,te))}function defaultView(ee){return ee.ownerDocument&&ee.ownerDocument.defaultView||ee.document&&ee||ee.defaultView}function styleRemove$1(ee){return function(){this.style.removeProperty(ee)}}function styleConstant$1(ee,te,re){return function(){this.style.setProperty(ee,te,re)}}function styleFunction$1(ee,te,re){return function(){var ie=te.apply(this,arguments);ie==null?this.style.removeProperty(ee):this.style.setProperty(ee,ie,re)}}function selection_style(ee,te,re){return arguments.length>1?this.each((te==null?styleRemove$1:typeof te=="function"?styleFunction$1:styleConstant$1)(ee,te,re??"")):styleValue(this.node(),ee)}function styleValue(ee,te){return ee.style.getPropertyValue(te)||defaultView(ee).getComputedStyle(ee,null).getPropertyValue(te)}function propertyRemove(ee){return function(){delete this[ee]}}function propertyConstant(ee,te){return function(){this[ee]=te}}function propertyFunction(ee,te){return function(){var re=te.apply(this,arguments);re==null?delete this[ee]:this[ee]=re}}function selection_property(ee,te){return arguments.length>1?this.each((te==null?propertyRemove:typeof te=="function"?propertyFunction:propertyConstant)(ee,te)):this.node()[ee]}function classArray(ee){return ee.trim().split(/^|\s+/)}function classList(ee){return ee.classList||new ClassList(ee)}function ClassList(ee){this._node=ee,this._names=classArray(ee.getAttribute("class")||"")}ClassList.prototype={add:function(ee){var te=this._names.indexOf(ee);te<0&&(this._names.push(ee),this._node.setAttribute("class",this._names.join(" ")))},remove:function(ee){var te=this._names.indexOf(ee);te>=0&&(this._names.splice(te,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(ee){return this._names.indexOf(ee)>=0}};function classedAdd(ee,te){for(var re=classList(ee),ie=-1,ne=te.length;++ie<ne;)re.add(te[ie])}function classedRemove(ee,te){for(var re=classList(ee),ie=-1,ne=te.length;++ie<ne;)re.remove(te[ie])}function classedTrue(ee){return function(){classedAdd(this,ee)}}function classedFalse(ee){return function(){classedRemove(this,ee)}}function classedFunction(ee,te){return function(){(te.apply(this,arguments)?classedAdd:classedRemove)(this,ee)}}function selection_classed(ee,te){var re=classArray(ee+"");if(arguments.length<2){for(var ie=classList(this.node()),ne=-1,ae=re.length;++ne<ae;)if(!ie.contains(re[ne]))return!1;return!0}return this.each((typeof te=="function"?classedFunction:te?classedTrue:classedFalse)(re,te))}function textRemove(){this.textContent=""}function textConstant$1(ee){return function(){this.textContent=ee}}function textFunction$1(ee){return function(){var te=ee.apply(this,arguments);this.textContent=te??""}}function selection_text(ee){return arguments.length?this.each(ee==null?textRemove:(typeof ee=="function"?textFunction$1:textConstant$1)(ee)):this.node().textContent}function htmlRemove(){this.innerHTML=""}function htmlConstant(ee){return function(){this.innerHTML=ee}}function htmlFunction(ee){return function(){var te=ee.apply(this,arguments);this.innerHTML=te??""}}function selection_html(ee){return arguments.length?this.each(ee==null?htmlRemove:(typeof ee=="function"?htmlFunction:htmlConstant)(ee)):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(ee){var te=typeof ee=="function"?ee:creator(ee);return this.select(function(){return this.appendChild(te.apply(this,arguments))})}function constantNull(){return null}function selection_insert(ee,te){var re=typeof ee=="function"?ee:creator(ee),ie=te==null?constantNull:typeof te=="function"?te:selector(te);return this.select(function(){return this.insertBefore(re.apply(this,arguments),ie.apply(this,arguments)||null)})}function remove(){var ee=this.parentNode;ee&&ee.removeChild(this)}function selection_remove(){return this.each(remove)}function selection_cloneShallow(){var ee=this.cloneNode(!1),te=this.parentNode;return te?te.insertBefore(ee,this.nextSibling):ee}function selection_cloneDeep(){var ee=this.cloneNode(!0),te=this.parentNode;return te?te.insertBefore(ee,this.nextSibling):ee}function selection_clone(ee){return this.select(ee?selection_cloneDeep:selection_cloneShallow)}function selection_datum(ee){return arguments.length?this.property("__data__",ee):this.node().__data__}function contextListener(ee){return function(te){ee.call(this,te,this.__data__)}}function parseTypenames(ee){return ee.trim().split(/^|\s+/).map(function(te){var re="",ie=te.indexOf(".");return ie>=0&&(re=te.slice(ie+1),te=te.slice(0,ie)),{type:te,name:re}})}function onRemove(ee){return function(){var te=this.__on;if(te){for(var re=0,ie=-1,ne=te.length,ae;re<ne;++re)ae=te[re],(!ee.type||ae.type===ee.type)&&ae.name===ee.name?this.removeEventListener(ae.type,ae.listener,ae.options):te[++ie]=ae;++ie?te.length=ie:delete this.__on}}}function onAdd(ee,te,re){return function(){var ie=this.__on,ne,ae=contextListener(te);if(ie){for(var oe=0,se=ie.length;oe<se;++oe)if((ne=ie[oe]).type===ee.type&&ne.name===ee.name){this.removeEventListener(ne.type,ne.listener,ne.options),this.addEventListener(ne.type,ne.listener=ae,ne.options=re),ne.value=te;return}}this.addEventListener(ee.type,ae,re),ne={type:ee.type,name:ee.name,value:te,listener:ae,options:re},ie?ie.push(ne):this.__on=[ne]}}function selection_on(ee,te,re){var ie=parseTypenames(ee+""),ne,ae=ie.length,oe;if(arguments.length<2){var se=this.node().__on;if(se){for(var le=0,ce=se.length,he;le<ce;++le)for(ne=0,he=se[le];ne<ae;++ne)if((oe=ie[ne]).type===he.type&&oe.name===he.name)return he.value}return}for(se=te?onAdd:onRemove,ne=0;ne<ae;++ne)this.each(se(ie[ne],te,re));return this}function dispatchEvent(ee,te,re){var ie=defaultView(ee),ne=ie.CustomEvent;typeof ne=="function"?ne=new ne(te,re):(ne=ie.document.createEvent("Event"),re?(ne.initEvent(te,re.bubbles,re.cancelable),ne.detail=re.detail):ne.initEvent(te,!1,!1)),ee.dispatchEvent(ne)}function dispatchConstant(ee,te){return function(){return dispatchEvent(this,ee,te)}}function dispatchFunction(ee,te){return function(){return dispatchEvent(this,ee,te.apply(this,arguments))}}function selection_dispatch(ee,te){return this.each((typeof te=="function"?dispatchFunction:dispatchConstant)(ee,te))}function*selection_iterator(){for(var ee=this._groups,te=0,re=ee.length;te<re;++te)for(var ie=ee[te],ne=0,ae=ie.length,oe;ne<ae;++ne)(oe=ie[ne])&&(yield oe)}var root=[null];function Selection$1(ee,te){this._groups=ee,this._parents=te}function selection(){return new Selection$1([[document.documentElement]],root)}function selection_selection(){return this}Selection$1.prototype=selection.prototype={constructor:Selection$1,select:selection_select,selectAll:selection_selectAll,selectChild:selection_selectChild,selectChildren:selection_selectChildren,filter:selection_filter,data:selection_data,enter:selection_enter,exit:selection_exit,join:selection_join,merge:selection_merge,selection:selection_selection,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,[Symbol.iterator]:selection_iterator};function d3select(ee){return typeof ee=="string"?new Selection$1([[document.querySelector(ee)]],[document.documentElement]):new Selection$1([[ee]],root)}function define(ee,te,re){ee.prototype=te.prototype=re,re.constructor=ee}function extend$1(ee,te){var re=Object.create(ee.prototype);for(var ie in te)re[ie]=te[ie];return re}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(ee){return Object.assign(new this.constructor,this,ee)},displayable(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHex8:color_formatHex8,formatHsl:color_formatHsl,formatRgb:color_formatRgb,toString:color_formatRgb});function color_formatHex(){return this.rgb().formatHex()}function color_formatHex8(){return this.rgb().formatHex8()}function color_formatHsl(){return hslConvert(this).formatHsl()}function color_formatRgb(){return this.rgb().formatRgb()}function color(ee){var te,re;return ee=(ee+"").trim().toLowerCase(),(te=reHex.exec(ee))?(re=te[1].length,te=parseInt(te[1],16),re===6?rgbn(te):re===3?new Rgb(te>>8&15|te>>4&240,te>>4&15|te&240,(te&15)<<4|te&15,1):re===8?rgba(te>>24&255,te>>16&255,te>>8&255,(te&255)/255):re===4?rgba(te>>12&15|te>>8&240,te>>8&15|te>>4&240,te>>4&15|te&240,((te&15)<<4|te&15)/255):null):(te=reRgbInteger.exec(ee))?new Rgb(te[1],te[2],te[3],1):(te=reRgbPercent.exec(ee))?new Rgb(te[1]*255/100,te[2]*255/100,te[3]*255/100,1):(te=reRgbaInteger.exec(ee))?rgba(te[1],te[2],te[3],te[4]):(te=reRgbaPercent.exec(ee))?rgba(te[1]*255/100,te[2]*255/100,te[3]*255/100,te[4]):(te=reHslPercent.exec(ee))?hsla(te[1],te[2]/100,te[3]/100,1):(te=reHslaPercent.exec(ee))?hsla(te[1],te[2]/100,te[3]/100,te[4]):named.hasOwnProperty(ee)?rgbn(named[ee]):ee==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(ee){return new Rgb(ee>>16&255,ee>>8&255,ee&255,1)}function rgba(ee,te,re,ie){return ie<=0&&(ee=te=re=NaN),new Rgb(ee,te,re,ie)}function rgbConvert(ee){return ee instanceof Color||(ee=color(ee)),ee?(ee=ee.rgb(),new Rgb(ee.r,ee.g,ee.b,ee.opacity)):new Rgb}function rgb(ee,te,re,ie){return arguments.length===1?rgbConvert(ee):new Rgb(ee,te,re,ie??1)}function Rgb(ee,te,re,ie){this.r=+ee,this.g=+te,this.b=+re,this.opacity=+ie}define(Rgb,rgb,extend$1(Color,{brighter(ee){return ee=ee==null?brighter:Math.pow(brighter,ee),new Rgb(this.r*ee,this.g*ee,this.b*ee,this.opacity)},darker(ee){return ee=ee==null?darker:Math.pow(darker,ee),new Rgb(this.r*ee,this.g*ee,this.b*ee,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){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,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const ee=clampa(this.opacity);return`${ee===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${ee===1?")":`, ${ee})`}`}function clampa(ee){return isNaN(ee)?1:Math.max(0,Math.min(1,ee))}function clampi(ee){return Math.max(0,Math.min(255,Math.round(ee)||0))}function hex(ee){return ee=clampi(ee),(ee<16?"0":"")+ee.toString(16)}function hsla(ee,te,re,ie){return ie<=0?ee=te=re=NaN:re<=0||re>=1?ee=te=NaN:te<=0&&(ee=NaN),new Hsl(ee,te,re,ie)}function hslConvert(ee){if(ee instanceof Hsl)return new Hsl(ee.h,ee.s,ee.l,ee.opacity);if(ee instanceof Color||(ee=color(ee)),!ee)return new Hsl;if(ee instanceof Hsl)return ee;ee=ee.rgb();var te=ee.r/255,re=ee.g/255,ie=ee.b/255,ne=Math.min(te,re,ie),ae=Math.max(te,re,ie),oe=NaN,se=ae-ne,le=(ae+ne)/2;return se?(te===ae?oe=(re-ie)/se+(re<ie)*6:re===ae?oe=(ie-te)/se+2:oe=(te-re)/se+4,se/=le<.5?ae+ne:2-ae-ne,oe*=60):se=le>0&&le<1?0:oe,new Hsl(oe,se,le,ee.opacity)}function hsl(ee,te,re,ie){return arguments.length===1?hslConvert(ee):new Hsl(ee,te,re,ie??1)}function Hsl(ee,te,re,ie){this.h=+ee,this.s=+te,this.l=+re,this.opacity=+ie}define(Hsl,hsl,extend$1(Color,{brighter(ee){return ee=ee==null?brighter:Math.pow(brighter,ee),new Hsl(this.h,this.s,this.l*ee,this.opacity)},darker(ee){return ee=ee==null?darker:Math.pow(darker,ee),new Hsl(this.h,this.s,this.l*ee,this.opacity)},rgb(){var ee=this.h%360+(this.h<0)*360,te=isNaN(ee)||isNaN(this.s)?0:this.s,re=this.l,ie=re+(re<.5?re:1-re)*te,ne=2*re-ie;return new Rgb(hsl2rgb(ee>=240?ee-240:ee+120,ne,ie),hsl2rgb(ee,ne,ie),hsl2rgb(ee<120?ee+240:ee-120,ne,ie),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const ee=clampa(this.opacity);return`${ee===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${ee===1?")":`, ${ee})`}`}}));function clamph(ee){return ee=(ee||0)%360,ee<0?ee+360:ee}function clampt(ee){return Math.max(0,Math.min(1,ee||0))}function hsl2rgb(ee,te,re){return(ee<60?te+(re-te)*ee/60:ee<180?re:ee<240?te+(re-te)*(240-ee)/60:te)*255}const constant$1=ee=>()=>ee;function linear(ee,te){return function(re){return ee+re*te}}function exponential(ee,te,re){return ee=Math.pow(ee,re),te=Math.pow(te,re)-ee,re=1/re,function(ie){return Math.pow(ee+ie*te,re)}}function hue(ee,te){var re=te-ee;return re?linear(ee,re>180||re<-180?re-360*Math.round(re/360):re):constant$1(isNaN(ee)?te:ee)}function gamma(ee){return(ee=+ee)==1?nogamma:function(te,re){return re-te?exponential(te,re,ee):constant$1(isNaN(te)?re:te)}}function nogamma(ee,te){var re=te-ee;return re?linear(ee,re):constant$1(isNaN(ee)?te:ee)}const interpolateRgb=function ee(te){var re=gamma(te);function ie(ne,ae){var oe=re((ne=rgb(ne)).r,(ae=rgb(ae)).r),se=re(ne.g,ae.g),le=re(ne.b,ae.b),ce=nogamma(ne.opacity,ae.opacity);return function(he){return ne.r=oe(he),ne.g=se(he),ne.b=le(he),ne.opacity=ce(he),ne+""}}return ie.gamma=ee,ie}(1);function interpolateNumber(ee,te){return ee=+ee,te=+te,function(re){return ee*(1-re)+te*re}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero$2(ee){return function(){return ee}}function one(ee){return function(te){return ee(te)+""}}function interpolateString(ee,te){var re=reA.lastIndex=reB.lastIndex=0,ie,ne,ae,oe=-1,se=[],le=[];for(ee=ee+"",te=te+"";(ie=reA.exec(ee))&&(ne=reB.exec(te));)(ae=ne.index)>re&&(ae=te.slice(re,ae),se[oe]?se[oe]+=ae:se[++oe]=ae),(ie=ie[0])===(ne=ne[0])?se[oe]?se[oe]+=ne:se[++oe]=ne:(se[++oe]=null,le.push({i:oe,x:interpolateNumber(ie,ne)})),re=reB.lastIndex;return re<te.length&&(ae=te.slice(re),se[oe]?se[oe]+=ae:se[++oe]=ae),se.length<2?le[0]?one(le[0].x):zero$2(te):(te=le.length,function(ce){for(var he=0,de;he<te;++he)se[(de=le[he]).i]=de.x(ce);return se.join("")})}var degrees=180/Math.PI,identity={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function decompose(ee,te,re,ie,ne,ae){var oe,se,le;return(oe=Math.sqrt(ee*ee+te*te))&&(ee/=oe,te/=oe),(le=ee*re+te*ie)&&(re-=ee*le,ie-=te*le),(se=Math.sqrt(re*re+ie*ie))&&(re/=se,ie/=se,le/=se),ee*ie<te*re&&(ee=-ee,te=-te,le=-le,oe=-oe),{translateX:ne,translateY:ae,rotate:Math.atan2(te,ee)*degrees,skewX:Math.atan(le)*degrees,scaleX:oe,scaleY:se}}var svgNode;function parseCss(ee){const te=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(ee+"");return te.isIdentity?identity:decompose(te.a,te.b,te.c,te.d,te.e,te.f)}function parseSvg(ee){return ee==null||(svgNode||(svgNode=document.createElementNS("http://www.w3.org/2000/svg","g")),svgNode.setAttribute("transform",ee),!(ee=svgNode.transform.baseVal.consolidate()))?identity:(ee=ee.matrix,decompose(ee.a,ee.b,ee.c,ee.d,ee.e,ee.f))}function interpolateTransform(ee,te,re,ie){function ne(ce){return ce.length?ce.pop()+" ":""}function ae(ce,he,de,ue,fe,pe){if(ce!==de||he!==ue){var ge=fe.push("translate(",null,te,null,re);pe.push({i:ge-4,x:interpolateNumber(ce,de)},{i:ge-2,x:interpolateNumber(he,ue)})}else(de||ue)&&fe.push("translate("+de+te+ue+re)}function oe(ce,he,de,ue){ce!==he?(ce-he>180?he+=360:he-ce>180&&(ce+=360),ue.push({i:de.push(ne(de)+"rotate(",null,ie)-2,x:interpolateNumber(ce,he)})):he&&de.push(ne(de)+"rotate("+he+ie)}function se(ce,he,de,ue){ce!==he?ue.push({i:de.push(ne(de)+"skewX(",null,ie)-2,x:interpolateNumber(ce,he)}):he&&de.push(ne(de)+"skewX("+he+ie)}function le(ce,he,de,ue,fe,pe){if(ce!==de||he!==ue){var ge=fe.push(ne(fe)+"scale(",null,",",null,")");pe.push({i:ge-4,x:interpolateNumber(ce,de)},{i:ge-2,x:interpolateNumber(he,ue)})}else(de!==1||ue!==1)&&fe.push(ne(fe)+"scale("+de+","+ue+")")}return function(ce,he){var de=[],ue=[];return ce=ee(ce),he=ee(he),ae(ce.translateX,ce.translateY,he.translateX,he.translateY,de,ue),oe(ce.rotate,he.rotate,de,ue),se(ce.skewX,he.skewX,de,ue),le(ce.scaleX,ce.scaleY,he.scaleX,he.scaleY,de,ue),ce=he=null,function(fe){for(var pe=-1,ge=ue.length,ye;++pe<ge;)de[(ye=ue[pe]).i]=ye.x(fe);return de.join("")}}}var interpolateTransformCss=interpolateTransform(parseCss,"px, ","px)","deg)"),interpolateTransformSvg=interpolateTransform(parseSvg,", ",")",")"),frame=0,timeout$1=0,interval=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(ee){setTimeout(ee,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(ee,te,re){if(typeof ee!="function")throw new TypeError("callback is not a function");re=(re==null?now():+re)+(te==null?0:+te),!this._next&&taskTail!==this&&(taskTail?taskTail._next=this:taskHead=this,taskTail=this),this._call=ee,this._time=re,sleep()},stop:function(){this._call&&(this._call=null,this._time=1/0,sleep())}};function timer(ee,te,re){var ie=new Timer;return ie.restart(ee,te,re),ie}function timerFlush(){now(),++frame;for(var ee=taskHead,te;ee;)(te=clockNow-ee._time)>=0&&ee._call.call(void 0,te),ee=ee._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var ee=clock.now(),te=ee-clockLast;te>pokeDelay&&(clockSkew-=te,clockLast=ee)}function nap(){for(var ee,te=taskHead,re,ie=1/0;te;)te._call?(ie>te._time&&(ie=te._time),ee=te,te=te._next):(re=te._next,te._next=null,te=ee?ee._next=re:taskHead=re);taskTail=ee,sleep(ie)}function sleep(ee){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var te=ee-clockNow;te>24?(ee<1/0&&(timeout$1=setTimeout(wake,ee-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function timeout(ee,te,re){var ie=new Timer;return te=te==null?0:+te,ie.restart(ne=>{ie.stop(),ee(ne+te)},te,re),ie}var emptyOn=dispatch("start","end","cancel","interrupt"),emptyTween=[],CREATED=0,SCHEDULED=1,STARTING=2,STARTED=3,RUNNING=4,ENDING=5,ENDED=6;function schedule(ee,te,re,ie,ne,ae){var oe=ee.__transition;if(!oe)ee.__transition={};else if(re in oe)return;create(ee,re,{name:te,index:ie,group:ne,on:emptyOn,tween:emptyTween,time:ae.time,delay:ae.delay,duration:ae.duration,ease:ae.ease,timer:null,state:CREATED})}function init$2(ee,te){var re=get(ee,te);if(re.state>CREATED)throw new Error("too late; already scheduled");return re}function set$1(ee,te){var re=get(ee,te);if(re.state>STARTED)throw new Error("too late; already running");return re}function get(ee,te){var re=ee.__transition;if(!re||!(re=re[te]))throw new Error("transition not found");return re}function create(ee,te,re){var ie=ee.__transition,ne;ie[te]=re,re.timer=timer(ae,0,re.time);function ae(ce){re.state=SCHEDULED,re.timer.restart(oe,re.delay,re.time),re.delay<=ce&&oe(ce-re.delay)}function oe(ce){var he,de,ue,fe;if(re.state!==SCHEDULED)return le();for(he in ie)if(fe=ie[he],fe.name===re.name){if(fe.state===STARTED)return timeout(oe);fe.state===RUNNING?(fe.state=ENDED,fe.timer.stop(),fe.on.call("interrupt",ee,ee.__data__,fe.index,fe.group),delete ie[he]):+he<te&&(fe.state=ENDED,fe.timer.stop(),fe.on.call("cancel",ee,ee.__data__,fe.index,fe.group),delete ie[he])}if(timeout(function(){re.state===STARTED&&(re.state=RUNNING,re.timer.restart(se,re.delay,re.time),se(ce))}),re.state=STARTING,re.on.call("start",ee,ee.__data__,re.index,re.group),re.state===STARTING){for(re.state=STARTED,ne=new Array(ue=re.tween.length),he=0,de=-1;he<ue;++he)(fe=re.tween[he].value.call(ee,ee.__data__,re.index,re.group))&&(ne[++de]=fe);ne.length=de+1}}function se(ce){for(var he=ce<re.duration?re.ease.call(null,ce/re.duration):(re.timer.restart(le),re.state=ENDING,1),de=-1,ue=ne.length;++de<ue;)ne[de].call(ee,he);re.state===ENDING&&(re.on.call("end",ee,ee.__data__,re.index,re.group),le())}function le(){re.state=ENDED,re.timer.stop(),delete ie[te];for(var ce in ie)return;delete ee.__transition}}function interrupt(ee,te){var re=ee.__transition,ie,ne,ae=!0,oe;if(re){te=te==null?null:te+"";for(oe in re){if((ie=re[oe]).name!==te){ae=!1;continue}ne=ie.state>STARTING&&ie.state<ENDING,ie.state=ENDED,ie.timer.stop(),ie.on.call(ne?"interrupt":"cancel",ee,ee.__data__,ie.index,ie.group),delete re[oe]}ae&&delete ee.__transition}}function selection_interrupt(ee){return this.each(function(){interrupt(this,ee)})}function tweenRemove(ee,te){var re,ie;return function(){var ne=set$1(this,ee),ae=ne.tween;if(ae!==re){ie=re=ae;for(var oe=0,se=ie.length;oe<se;++oe)if(ie[oe].name===te){ie=ie.slice(),ie.splice(oe,1);break}}ne.tween=ie}}function tweenFunction(ee,te,re){var ie,ne;if(typeof re!="function")throw new Error;return function(){var ae=set$1(this,ee),oe=ae.tween;if(oe!==ie){ne=(ie=oe).slice();for(var se={name:te,value:re},le=0,ce=ne.length;le<ce;++le)if(ne[le].name===te){ne[le]=se;break}le===ce&&ne.push(se)}ae.tween=ne}}function transition_tween(ee,te){var re=this._id;if(ee+="",arguments.length<2){for(var ie=get(this.node(),re).tween,ne=0,ae=ie.length,oe;ne<ae;++ne)if((oe=ie[ne]).name===ee)return oe.value;return null}return this.each((te==null?tweenRemove:tweenFunction)(re,ee,te))}function tweenValue(ee,te,re){var ie=ee._id;return ee.each(function(){var ne=set$1(this,ie);(ne.value||(ne.value={}))[te]=re.apply(this,arguments)}),function(ne){return get(ne,ie).value[te]}}function interpolate(ee,te){var re;return(typeof te=="number"?interpolateNumber:te instanceof color?interpolateRgb:(re=color(te))?(te=re,interpolateRgb):interpolateString)(ee,te)}function attrRemove(ee){return function(){this.removeAttribute(ee)}}function attrRemoveNS(ee){return function(){this.removeAttributeNS(ee.space,ee.local)}}function attrConstant(ee,te,re){var ie,ne=re+"",ae;return function(){var oe=this.getAttribute(ee);return oe===ne?null:oe===ie?ae:ae=te(ie=oe,re)}}function attrConstantNS(ee,te,re){var ie,ne=re+"",ae;return function(){var oe=this.getAttributeNS(ee.space,ee.local);return oe===ne?null:oe===ie?ae:ae=te(ie=oe,re)}}function attrFunction(ee,te,re){var ie,ne,ae;return function(){var oe,se=re(this),le;return se==null?void this.removeAttribute(ee):(oe=this.getAttribute(ee),le=se+"",oe===le?null:oe===ie&&le===ne?ae:(ne=le,ae=te(ie=oe,se)))}}function attrFunctionNS(ee,te,re){var ie,ne,ae;return function(){var oe,se=re(this),le;return se==null?void this.removeAttributeNS(ee.space,ee.local):(oe=this.getAttributeNS(ee.space,ee.local),le=se+"",oe===le?null:oe===ie&&le===ne?ae:(ne=le,ae=te(ie=oe,se)))}}function transition_attr(ee,te){var re=namespace(ee),ie=re==="transform"?interpolateTransformSvg:interpolate;return this.attrTween(ee,typeof te=="function"?(re.local?attrFunctionNS:attrFunction)(re,ie,tweenValue(this,"attr."+ee,te)):te==null?(re.local?attrRemoveNS:attrRemove)(re):(re.local?attrConstantNS:attrConstant)(re,ie,te))}function attrInterpolate(ee,te){return function(re){this.setAttribute(ee,te.call(this,re))}}function attrInterpolateNS(ee,te){return function(re){this.setAttributeNS(ee.space,ee.local,te.call(this,re))}}function attrTweenNS(ee,te){var re,ie;function ne(){var ae=te.apply(this,arguments);return ae!==ie&&(re=(ie=ae)&&attrInterpolateNS(ee,ae)),re}return ne._value=te,ne}function attrTween(ee,te){var re,ie;function ne(){var ae=te.apply(this,arguments);return ae!==ie&&(re=(ie=ae)&&attrInterpolate(ee,ae)),re}return ne._value=te,ne}function transition_attrTween(ee,te){var re="attr."+ee;if(arguments.length<2)return(re=this.tween(re))&&re._value;if(te==null)return this.tween(re,null);if(typeof te!="function")throw new Error;var ie=namespace(ee);return this.tween(re,(ie.local?attrTweenNS:attrTween)(ie,te))}function delayFunction(ee,te){return function(){init$2(this,ee).delay=+te.apply(this,arguments)}}function delayConstant(ee,te){return te=+te,function(){init$2(this,ee).delay=te}}function transition_delay(ee){var te=this._id;return arguments.length?this.each((typeof ee=="function"?delayFunction:delayConstant)(te,ee)):get(this.node(),te).delay}function durationFunction(ee,te){return function(){set$1(this,ee).duration=+te.apply(this,arguments)}}function durationConstant(ee,te){return te=+te,function(){set$1(this,ee).duration=te}}function transition_duration(ee){var te=this._id;return arguments.length?this.each((typeof ee=="function"?durationFunction:durationConstant)(te,ee)):get(this.node(),te).duration}function easeConstant(ee,te){if(typeof te!="function")throw new Error;return function(){set$1(this,ee).ease=te}}function transition_ease(ee){var te=this._id;return arguments.length?this.each(easeConstant(te,ee)):get(this.node(),te).ease}function easeVarying(ee,te){return function(){var re=te.apply(this,arguments);if(typeof re!="function")throw new Error;set$1(this,ee).ease=re}}function transition_easeVarying(ee){if(typeof ee!="function")throw new Error;return this.each(easeVarying(this._id,ee))}function transition_filter(ee){typeof ee!="function"&&(ee=matcher(ee));for(var te=this._groups,re=te.length,ie=new Array(re),ne=0;ne<re;++ne)for(var ae=te[ne],oe=ae.length,se=ie[ne]=[],le,ce=0;ce<oe;++ce)(le=ae[ce])&&ee.call(le,le.__data__,ce,ae)&&se.push(le);return new Transition(ie,this._parents,this._name,this._id)}function transition_merge(ee){if(ee._id!==this._id)throw new Error;for(var te=this._groups,re=ee._groups,ie=te.length,ne=re.length,ae=Math.min(ie,ne),oe=new Array(ie),se=0;se<ae;++se)for(var le=te[se],ce=re[se],he=le.length,de=oe[se]=new Array(he),ue,fe=0;fe<he;++fe)(ue=le[fe]||ce[fe])&&(de[fe]=ue);for(;se<ie;++se)oe[se]=te[se];return new Transition(oe,this._parents,this._name,this._id)}function start(ee){return(ee+"").trim().split(/^|\s+/).every(function(te){var re=te.indexOf(".");return re>=0&&(te=te.slice(0,re)),!te||te==="start"})}function onFunction(ee,te,re){var ie,ne,ae=start(te)?init$2:set$1;return function(){var oe=ae(this,ee),se=oe.on;se!==ie&&(ne=(ie=se).copy()).on(te,re),oe.on=ne}}function transition_on(ee,te){var re=this._id;return arguments.length<2?get(this.node(),re).on.on(ee):this.each(onFunction(re,ee,te))}function removeFunction(ee){return function(){var te=this.parentNode;for(var re in this.__transition)if(+re!==ee)return;te&&te.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(ee){var te=this._name,re=this._id;typeof ee!="function"&&(ee=selector(ee));for(var ie=this._groups,ne=ie.length,ae=new Array(ne),oe=0;oe<ne;++oe)for(var se=ie[oe],le=se.length,ce=ae[oe]=new Array(le),he,de,ue=0;ue<le;++ue)(he=se[ue])&&(de=ee.call(he,he.__data__,ue,se))&&("__data__"in he&&(de.__data__=he.__data__),ce[ue]=de,schedule(ce[ue],te,re,ue,ce,get(he,re)));return new Transition(ae,this._parents,te,re)}function transition_selectAll(ee){var te=this._name,re=this._id;typeof ee!="function"&&(ee=selectorAll(ee));for(var ie=this._groups,ne=ie.length,ae=[],oe=[],se=0;se<ne;++se)for(var le=ie[se],ce=le.length,he,de=0;de<ce;++de)if(he=le[de]){for(var ue=ee.call(he,he.__data__,de,le),fe,pe=get(he,re),ge=0,ye=ue.length;ge<ye;++ge)(fe=ue[ge])&&schedule(fe,te,re,ge,ue,pe);ae.push(ue),oe.push(he)}return new Transition(ae,oe,te,re)}var Selection=selection.prototype.constructor;function transition_selection(){return new Selection(this._groups,this._parents)}function styleNull(ee,te){var re,ie,ne;return function(){var ae=styleValue(this,ee),oe=(this.style.removeProperty(ee),styleValue(this,ee));return ae===oe?null:ae===re&&oe===ie?ne:ne=te(re=ae,ie=oe)}}function styleRemove(ee){return function(){this.style.removeProperty(ee)}}function styleConstant(ee,te,re){var ie,ne=re+"",ae;return function(){var oe=styleValue(this,ee);return oe===ne?null:oe===ie?ae:ae=te(ie=oe,re)}}function styleFunction(ee,te,re){var ie,ne,ae;return function(){var oe=styleValue(this,ee),se=re(this),le=se+"";return se==null&&(le=se=(this.style.removeProperty(ee),styleValue(this,ee))),oe===le?null:oe===ie&&le===ne?ae:(ne=le,ae=te(ie=oe,se))}}function styleMaybeRemove(ee,te){var re,ie,ne,ae="style."+te,oe="end."+ae,se;return function(){var le=set$1(this,ee),ce=le.on,he=le.value[ae]==null?se||(se=styleRemove(te)):void 0;(ce!==re||ne!==he)&&(ie=(re=ce).copy()).on(oe,ne=he),le.on=ie}}function transition_style(ee,te,re){var ie=(ee+="")=="transform"?interpolateTransformCss:interpolate;return te==null?this.styleTween(ee,styleNull(ee,ie)).on("end.style."+ee,styleRemove(ee)):typeof te=="function"?this.styleTween(ee,styleFunction(ee,ie,tweenValue(this,"style."+ee,te))).each(styleMaybeRemove(this._id,ee)):this.styleTween(ee,styleConstant(ee,ie,te),re).on("end.style."+ee,null)}function styleInterpolate(ee,te,re){return function(ie){this.style.setProperty(ee,te.call(this,ie),re)}}function styleTween(ee,te,re){var ie,ne;function ae(){var oe=te.apply(this,arguments);return oe!==ne&&(ie=(ne=oe)&&styleInterpolate(ee,oe,re)),ie}return ae._value=te,ae}function transition_styleTween(ee,te,re){var ie="style."+(ee+="");if(arguments.length<2)return(ie=this.tween(ie))&&ie._value;if(te==null)return this.tween(ie,null);if(typeof te!="function")throw new Error;return this.tween(ie,styleTween(ee,te,re??""))}function textConstant(ee){return function(){this.textContent=ee}}function textFunction(ee){return function(){var te=ee(this);this.textContent=te??""}}function transition_text(ee){return this.tween("text",typeof ee=="function"?textFunction(tweenValue(this,"text",ee)):textConstant(ee==null?"":ee+""))}function textInterpolate(ee){return function(te){this.textContent=ee.call(this,te)}}function textTween(ee){var te,re;function ie(){var ne=ee.apply(this,arguments);return ne!==re&&(te=(re=ne)&&textInterpolate(ne)),te}return ie._value=ee,ie}function transition_textTween(ee){var te="text";if(arguments.length<1)return(te=this.tween(te))&&te._value;if(ee==null)return this.tween(te,null);if(typeof ee!="function")throw new Error;return this.tween(te,textTween(ee))}function transition_transition(){for(var ee=this._name,te=this._id,re=newId(),ie=this._groups,ne=ie.length,ae=0;ae<ne;++ae)for(var oe=ie[ae],se=oe.length,le,ce=0;ce<se;++ce)if(le=oe[ce]){var he=get(le,te);schedule(le,ee,re,ce,oe,{time:he.time+he.delay+he.duration,delay:0,duration:he.duration,ease:he.ease})}return new Transition(ie,this._parents,ee,re)}function transition_end(){var ee,te,re=this,ie=re._id,ne=re.size();return new Promise(function(ae,oe){var se={value:oe},le={value:function(){--ne===0&&ae()}};re.each(function(){var ce=set$1(this,ie),he=ce.on;he!==ee&&(te=(ee=he).copy(),te._.cancel.push(se),te._.interrupt.push(se),te._.end.push(le)),ce.on=te}),ne===0&&ae()})}var id$1=0;function Transition(ee,te,re,ie){this._groups=ee,this._parents=te,this._name=re,this._id=ie}function newId(){return++id$1}var selection_prototype=selection.prototype;Transition.prototype={constructor:Transition,select:transition_select,selectAll:transition_selectAll,selectChild:selection_prototype.selectChild,selectChildren:selection_prototype.selectChildren,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,easeVarying:transition_easeVarying,end:transition_end,[Symbol.iterator]:selection_prototype[Symbol.iterator]};function cubicInOut(ee){return((ee*=2)<=1?ee*ee*ee:(ee-=2)*ee*ee+2)/2}var defaultTiming={time:null,delay:0,duration:250,ease:cubicInOut};function inherit(ee,te){for(var re;!(re=ee.__transition)||!(re=re[te]);)if(!(ee=ee.parentNode))throw new Error(`transition ${te} not found`);return re}function selection_transition(ee){var te,re;ee instanceof Transition?(te=ee._id,ee=ee._name):(te=newId(),(re=defaultTiming).time=now(),ee=ee==null?null:ee+"");for(var ie=this._groups,ne=ie.length,ae=0;ae<ne;++ae)for(var oe=ie[ae],se=oe.length,le,ce=0;ce<se;++ce)(le=oe[ce])&&schedule(le,ee,te,ce,oe,re||inherit(le,te));return new Transition(ie,this._parents,ee,te)}selection.prototype.interrupt=selection_interrupt;selection.prototype.transition=selection_transition;const pi$1=Math.PI,tau$1=2*pi$1,epsilon$1=1e-6,tauEpsilon=tau$1-epsilon$1;function append$1(ee){this._+=ee[0];for(let te=1,re=ee.length;te<re;++te)this._+=arguments[te]+ee[te]}function appendRound(ee){let te=Math.floor(ee);if(!(te>=0))throw new Error(`invalid digits: ${ee}`);if(te>15)return append$1;const re=10**te;return function(ie){this._+=ie[0];for(let ne=1,ae=ie.length;ne<ae;++ne)this._+=Math.round(arguments[ne]*re)/re+ie[ne]}}class Path{constructor(te){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=te==null?append$1:appendRound(te)}moveTo(te,re){this._append`M${this._x0=this._x1=+te},${this._y0=this._y1=+re}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(te,re){this._append`L${this._x1=+te},${this._y1=+re}`}quadraticCurveTo(te,re,ie,ne){this._append`Q${+te},${+re},${this._x1=+ie},${this._y1=+ne}`}bezierCurveTo(te,re,ie,ne,ae,oe){this._append`C${+te},${+re},${+ie},${+ne},${this._x1=+ae},${this._y1=+oe}`}arcTo(te,re,ie,ne,ae){if(te=+te,re=+re,ie=+ie,ne=+ne,ae=+ae,ae<0)throw new Error(`negative radius: ${ae}`);let oe=this._x1,se=this._y1,le=ie-te,ce=ne-re,he=oe-te,de=se-re,ue=he*he+de*de;if(this._x1===null)this._append`M${this._x1=te},${this._y1=re}`;else if(ue>epsilon$1)if(!(Math.abs(de*le-ce*he)>epsilon$1)||!ae)this._append`L${this._x1=te},${this._y1=re}`;else{let fe=ie-oe,pe=ne-se,ge=le*le+ce*ce,ye=fe*fe+pe*pe,_e=Math.sqrt(ge),me=Math.sqrt(ue),we=ae*Math.tan((pi$1-Math.acos((ge+ue-ye)/(2*_e*me)))/2),xe=we/me,Te=we/_e;Math.abs(xe-1)>epsilon$1&&this._append`L${te+xe*he},${re+xe*de}`,this._append`A${ae},${ae},0,0,${+(de*fe>he*pe)},${this._x1=te+Te*le},${this._y1=re+Te*ce}`}}arc(te,re,ie,ne,ae,oe){if(te=+te,re=+re,ie=+ie,oe=!!oe,ie<0)throw new Error(`negative radius: ${ie}`);let se=ie*Math.cos(ne),le=ie*Math.sin(ne),ce=te+se,he=re+le,de=1^oe,ue=oe?ne-ae:ae-ne;this._x1===null?this._append`M${ce},${he}`:(Math.abs(this._x1-ce)>epsilon$1||Math.abs(this._y1-he)>epsilon$1)&&this._append`L${ce},${he}`,ie&&(ue<0&&(ue=ue%tau$1+tau$1),ue>tauEpsilon?this._append`A${ie},${ie},0,1,${de},${te-se},${re-le}A${ie},${ie},0,1,${de},${this._x1=ce},${this._y1=he}`:ue>epsilon$1&&this._append`A${ie},${ie},0,${+(ue>=pi$1)},${de},${this._x1=te+ie*Math.cos(ae)},${this._y1=re+ie*Math.sin(ae)}`)}rect(te,re,ie,ne){this._append`M${this._x0=this._x1=+te},${this._y0=this._y1=+re}h${ie=+ie}v${+ne}h${-ie}Z`}toString(){return this._}}function constant(ee){return function(){return ee}}const abs$1=Math.abs,atan2=Math.atan2,cos=Math.cos,max=Math.max,min=Math.min,sin=Math.sin,sqrt=Math.sqrt,epsilon=1e-12,pi=Math.PI,halfPi=pi/2,tau=2*pi;function acos(ee){return ee>1?0:ee<-1?pi:Math.acos(ee)}function asin(ee){return ee>=1?halfPi:ee<=-1?-halfPi:Math.asin(ee)}function withPath(ee){let te=3;return ee.digits=function(re){if(!arguments.length)return te;if(re==null)te=null;else{const ie=Math.floor(re);if(!(ie>=0))throw new RangeError(`invalid digits: ${re}`);te=ie}return ee},()=>new Path(te)}function array(ee){return typeof ee=="object"&&"length"in ee?ee:Array.from(ee)}function Linear(ee){this._context=ee}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(ee,te){switch(ee=+ee,te=+te,this._point){case 0:this._point=1,this._line?this._context.lineTo(ee,te):this._context.moveTo(ee,te);break;case 1:this._point=2;default:this._context.lineTo(ee,te);break}}};function curveLinear(ee){return new Linear(ee)}function x$1(ee){return ee[0]}function y$1(ee){return ee[1]}function line$1(ee,te){var re=constant(!0),ie=null,ne=curveLinear,ae=null,oe=withPath(se);ee=typeof ee=="function"?ee:ee===void 0?x$1:constant(ee),te=typeof te=="function"?te:te===void 0?y$1:constant(te);function se(le){var ce,he=(le=array(le)).length,de,ue=!1,fe;for(ie==null&&(ae=ne(fe=oe())),ce=0;ce<=he;++ce)!(ce<he&&re(de=le[ce],ce,le))===ue&&((ue=!ue)?ae.lineStart():ae.lineEnd()),ue&&ae.point(+ee(de,ce,le),+te(de,ce,le));if(fe)return ae=null,fe+""||null}return se.x=function(le){return arguments.length?(ee=typeof le=="function"?le:constant(+le),se):ee},se.y=function(le){return arguments.length?(te=typeof le=="function"?le:constant(+le),se):te},se.defined=function(le){return arguments.length?(re=typeof le=="function"?le:constant(!!le),se):re},se.curve=function(le){return arguments.length?(ne=le,ie!=null&&(ae=ne(ie)),se):ne},se.context=function(le){return arguments.length?(le==null?ie=ae=null:ae=ne(ie=le),se):ie},se}class Bump{constructor(te,re){this._context=te,this._x=re}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(te,re){switch(te=+te,re=+re,this._point){case 0:{this._point=1,this._line?this._context.lineTo(te,re):this._context.moveTo(te,re);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+te)/2,this._y0,this._x0,re,te,re):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+re)/2,te,this._y0,te,re);break}}this._x0=te,this._y0=re}}function bumpX(ee){return new Bump(ee,!0)}function bumpY(ee){return new Bump(ee,!1)}function noop(){}function point$4(ee,te,re){ee._context.bezierCurveTo((2*ee._x0+ee._x1)/3,(2*ee._y0+ee._y1)/3,(ee._x0+2*ee._x1)/3,(ee._y0+2*ee._y1)/3,(ee._x0+4*ee._x1+te)/6,(ee._y0+4*ee._y1+re)/6)}function Basis(ee){this._context=ee}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(ee,te){switch(ee=+ee,te=+te,this._point){case 0:this._point=1,this._line?this._context.lineTo(ee,te):this._context.moveTo(ee,te);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,ee,te);break}this._x0=this._x1,this._x1=ee,this._y0=this._y1,this._y1=te}};function curveBasis(ee){return new Basis(ee)}function BasisClosed(ee){this._context=ee}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(ee,te){switch(ee=+ee,te=+te,this._point){case 0:this._point=1,this._x2=ee,this._y2=te;break;case 1:this._point=2,this._x3=ee,this._y3=te;break;case 2:this._point=3,this._x4=ee,this._y4=te,this._context.moveTo((this._x0+4*this._x1+ee)/6,(this._y0+4*this._y1+te)/6);break;default:point$4(this,ee,te);break}this._x0=this._x1,this._x1=ee,this._y0=this._y1,this._y1=te}};function curveBasisClosed(ee){return new BasisClosed(ee)}function BasisOpen(ee){this._context=ee}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(ee,te){switch(ee=+ee,te=+te,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var re=(this._x0+4*this._x1+ee)/6,ie=(this._y0+4*this._y1+te)/6;this._line?this._context.lineTo(re,ie):this._context.moveTo(re,ie);break;case 3:this._point=4;default:point$4(this,ee,te);break}this._x0=this._x1,this._x1=ee,this._y0=this._y1,this._y1=te}};function curveBasisOpen(ee){return new BasisOpen(ee)}function Bundle(ee,te){this._basis=new Basis(ee),this._beta=te}Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ee=this._x,te=this._y,re=ee.length-1;if(re>0)for(var ie=ee[0],ne=te[0],ae=ee[re]-ie,oe=te[re]-ne,se=-1,le;++se<=re;)le=se/re,this._basis.point(this._beta*ee[se]+(1-this._beta)*(ie+le*ae),this._beta*te[se]+(1-this._beta)*(ne+le*oe));this._x=this._y=null,this._basis.lineEnd()},point:function(ee,te){this._x.push(+ee),this._y.push(+te)}};const curveBundle=function ee(te){function re(ie){return te===1?new Basis(ie):new Bundle(ie,te)}return re.beta=function(ie){return ee(+ie)},re}(.85);function point$3(ee,te,re){ee._context.bezierCurveTo(ee._x1+ee._k*(ee._x2-ee._x0),ee._y1+ee._k*(ee._y2-ee._y0),ee._x2+ee._k*(ee._x1-te),ee._y2+ee._k*(ee._y1-re),ee._x2,ee._y2)}function Cardinal(ee,te){this._context=ee,this._k=(1-te)/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(ee,te){switch(ee=+ee,te=+te,this._point){case 0:this._point=1,this._line?this._context.lineTo(ee,te):this._context.moveTo(ee,te);break;case 1:this._point=2,this._x1=ee,this._y1=te;break;case 2:this._point=3;default:point$3(this,ee,te);break}this._x0=this._x1,this._x1=this._x2,this._x2=ee,this._y0=this._y1,this._y1=this._y2,this._y2=te}};const curveCardinal=function ee(te){function re(ie){return new Cardinal(ie,te)}return re.tension=function(ie){return ee(+ie)},re}(0);function CardinalClosed(ee,te){this._context=ee,this._k=(1-te)/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(ee,te){switch(ee=+ee,te=+te,this._point){case 0:this._point=1,this._x3=ee,this._y3=te;break;case 1:this._point=2,this._context.moveTo(this._x4=ee,this._y4=te);break;case 2:this._point=3,this._x5=ee,this._y5=te;break;default:point$3(this,ee,te);break}this._x0=this._x1,this._x1=this._x2,this._x2=ee,this._y0=this._y1,this._y1=this._y2,this._y2=te}};const curveCardinalClosed=function ee(te){function re(ie){return new CardinalClosed(ie,te)}return re.tension=function(ie){return ee(+ie)},re}(0);function CardinalOpen(ee,te){this._context=ee,this._k=(1-te)/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(ee,te){switch(ee=+ee,te=+te,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,ee,te);break}this._x0=this._x1,this._x1=this._x2,this._x2=ee,this._y0=this._y1,this._y1=this._y2,this._y2=te}};const curveCardinalOpen=function ee(te){function re(ie){return new CardinalOpen(ie,te)}return re.tension=function(ie){return ee(+ie)},re}(0);function point$2(ee,te,re){var ie=ee._x1,ne=ee._y1,ae=ee._x2,oe=ee._y2;if(ee._l01_a>epsilon){var se=2*ee._l01_2a+3*ee._l01_a*ee._l12_a+ee._l12_2a,le=3*ee._l01_a*(ee._l01_a+ee._l12_a);ie=(ie*se-ee._x0*ee._l12_2a+ee._x2*ee._l01_2a)/le,ne=(ne*se-ee._y0*ee._l12_2a+ee._y2*ee._l01_2a)/le}if(ee._l23_a>epsilon){var ce=2*ee._l23_2a+3*ee._l23_a*ee._l12_a+ee._l12_2a,he=3*ee._l23_a*(ee._l23_a+ee._l12_a);ae=(ae*ce+ee._x1*ee._l23_2a-te*ee._l12_2a)/he,oe=(oe*ce+ee._y1*ee._l23_2a-re*ee._l12_2a)/he}ee._context.bezierCurveTo(ie,ne,ae,oe,ee._x2,ee._y2)}function CatmullRom(ee,te){this._context=ee,this._alpha=te}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(ee,te){if(ee=+ee,te=+te,this._point){var re=this._x2-ee,ie=this._y2-te;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(re*re+ie*ie,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ee,te):this._context.moveTo(ee,te);break;case 1:this._point=2;break;case 2:this._point=3;default:point$2(this,ee,te);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=ee,this._y0=this._y1,this._y1=this._y2,this._y2=te}};const curveCatmullRom=function ee(te){function re(ie){return te?new CatmullRom(ie,te):new Cardinal(ie,0)}return re.alpha=function(ie){return ee(+ie)},re}(.5);function CatmullRomClosed(ee,te){this._context=ee,this._alpha=te}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(ee,te){if(ee=+ee,te=+te,this._point){var re=this._x2-ee,ie=this._y2-te;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(re*re+ie*ie,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ee,this._y3=te;break;case 1:this._point=2,this._context.moveTo(this._x4=ee,this._y4=te);break;case 2:this._point=3,this._x5=ee,this._y5=te;break;default:point$2(this,ee,te);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=ee,this._y0=this._y1,this._y1=this._y2,this._y2=te}};const curveCatmullRomClosed=function ee(te){function re(ie){return te?new CatmullRomClosed(ie,te):new CardinalClosed(ie,0)}return re.alpha=function(ie){return ee(+ie)},re}(.5);function CatmullRomOpen(ee,te){this._context=ee,this._alpha=te}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(ee,te){if(ee=+ee,te=+te,this._point){var re=this._x2-ee,ie=this._y2-te;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(re*re+ie*ie,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,ee,te);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=ee,this._y0=this._y1,this._y1=this._y2,this._y2=te}};const curveCatmullRomOpen=function ee(te){function re(ie){return te?new CatmullRomOpen(ie,te):new CardinalOpen(ie,0)}return re.alpha=function(ie){return ee(+ie)},re}(.5);function LinearClosed(ee){this._context=ee}LinearClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ee,te){ee=+ee,te=+te,this._point?this._context.lineTo(ee,te):(this._point=1,this._context.moveTo(ee,te))}};function curveLinearClosed(ee){return new LinearClosed(ee)}function sign(ee){return ee<0?-1:1}function slope3(ee,te,re){var ie=ee._x1-ee._x0,ne=te-ee._x1,ae=(ee._y1-ee._y0)/(ie||ne<0&&-0),oe=(re-ee._y1)/(ne||ie<0&&-0),se=(ae*ne+oe*ie)/(ie+ne);return(sign(ae)+sign(oe))*Math.min(Math.abs(ae),Math.abs(oe),.5*Math.abs(se))||0}function slope2(ee,te){var re=ee._x1-ee._x0;return re?(3*(ee._y1-ee._y0)/re-te)/2:te}function point$1(ee,te,re){var ie=ee._x0,ne=ee._y0,ae=ee._x1,oe=ee._y1,se=(ae-ie)/3;ee._context.bezierCurveTo(ie+se,ne+se*te,ae-se,oe-se*re,ae,oe)}function MonotoneX(ee){this._context=ee}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(ee,te){var re=NaN;if(ee=+ee,te=+te,!(ee===this._x1&&te===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ee,te):this._context.moveTo(ee,te);break;case 1:this._point=2;break;case 2:this._point=3,point$1(this,slope2(this,re=slope3(this,ee,te)),re);break;default:point$1(this,this._t0,re=slope3(this,ee,te));break}this._x0=this._x1,this._x1=ee,this._y0=this._y1,this._y1=te,this._t0=re}}};function MonotoneY(ee){this._context=new ReflectContext(ee)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(ee,te){MonotoneX.prototype.point.call(this,te,ee)};function ReflectContext(ee){this._context=ee}ReflectContext.prototype={moveTo:function(ee,te){this._context.moveTo(te,ee)},closePath:function(){this._context.closePath()},lineTo:function(ee,te){this._context.lineTo(te,ee)},bezierCurveTo:function(ee,te,re,ie,ne,ae){this._context.bezierCurveTo(te,ee,ie,re,ae,ne)}};function monotoneX(ee){return new MonotoneX(ee)}function monotoneY(ee){return new MonotoneY(ee)}function Natural(ee){this._context=ee}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ee=this._x,te=this._y,re=ee.length;if(re)if(this._line?this._context.lineTo(ee[0],te[0]):this._context.moveTo(ee[0],te[0]),re===2)this._context.lineTo(ee[1],te[1]);else for(var ie=controlPoints(ee),ne=controlPoints(te),ae=0,oe=1;oe<re;++ae,++oe)this._context.bezierCurveTo(ie[0][ae],ne[0][ae],ie[1][ae],ne[1][ae],ee[oe],te[oe]);(this._line||this._line!==0&&re===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(ee,te){this._x.push(+ee),this._y.push(+te)}};function controlPoints(ee){var te,re=ee.length-1,ie,ne=new Array(re),ae=new Array(re),oe=new Array(re);for(ne[0]=0,ae[0]=2,oe[0]=ee[0]+2*ee[1],te=1;te<re-1;++te)ne[te]=1,ae[te]=4,oe[te]=4*ee[te]+2*ee[te+1];for(ne[re-1]=2,ae[re-1]=7,oe[re-1]=8*ee[re-1]+ee[re],te=1;te<re;++te)ie=ne[te]/ae[te-1],ae[te]-=ie,oe[te]-=ie*oe[te-1];for(ne[re-1]=oe[re-1]/ae[re-1],te=re-2;te>=0;--te)ne[te]=(oe[te]-ne[te+1])/ae[te];for(ae[re-1]=(ee[re]+ne[re-1])/2,te=0;te<re-1;++te)ae[te]=2*ee[te+1]-ne[te+1];return[ne,ae]}function curveNatural(ee){return new Natural(ee)}function Step(ee,te){this._context=ee,this._t=te}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(ee,te){switch(ee=+ee,te=+te,this._point){case 0:this._point=1,this._line?this._context.lineTo(ee,te):this._context.moveTo(ee,te);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,te),this._context.lineTo(ee,te);else{var re=this._x*(1-this._t)+ee*this._t;this._context.lineTo(re,this._y),this._context.lineTo(re,te)}break}}this._x=ee,this._y=te}};function curveStep(ee){return new Step(ee,.5)}function stepBefore(ee){return new Step(ee,0)}function stepAfter(ee){return new Step(ee,1)}function Transform(ee,te,re){this.k=ee,this.x=te,this.y=re}Transform.prototype={constructor:Transform,scale:function(ee){return ee===1?this:new Transform(this.k*ee,this.x,this.y)},translate:function(ee,te){return ee===0&te===0?this:new Transform(this.k,this.x+this.k*ee,this.y+this.k*te)},apply:function(ee){return[ee[0]*this.k+this.x,ee[1]*this.k+this.y]},applyX:function(ee){return ee*this.k+this.x},applyY:function(ee){return ee*this.k+this.y},invert:function(ee){return[(ee[0]-this.x)/this.k,(ee[1]-this.y)/this.k]},invertX:function(ee){return(ee-this.x)/this.k},invertY:function(ee){return(ee-this.y)/this.k},rescaleX:function(ee){return ee.copy().domain(ee.range().map(this.invertX,this).map(ee.invert,ee))},rescaleY:function(ee){return ee.copy().domain(ee.range().map(this.invertY,this).map(ee.invert,ee))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Transform.prototype;var ZERO_WIDTH_SPACE="",d3CurveTypes={curveBasis,curveBasisClosed,curveBasisOpen,curveBumpX:bumpX,curveBumpY:bumpY,curveBundle,curveCardinalClosed,curveCardinalOpen,curveCardinal,curveCatmullRomClosed,curveCatmullRomOpen,curveCatmullRom,curveLinear,curveLinearClosed,curveMonotoneX:monotoneX,curveMonotoneY:monotoneY,curveNatural,curveStep,curveStepAfter:stepAfter,curveStepBefore:stepBefore},directiveWithoutOpen=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,detectInit=__name(function(ee,te){const re=detectDirective(ee,/(?:init\b)|(?:initialize\b)/);let ie={};if(Array.isArray(re)){const oe=re.map(se=>se.args);sanitizeDirective(oe),ie=assignWithDepth_default(ie,[...oe])}else ie=re.args;if(!ie)return;let ne=detectType(ee,te);const ae="config";return ie[ae]!==void 0&&(ne==="flowchart-v2"&&(ne="flowchart"),ie[ne]=ie[ae],delete ie[ae]),ie},"detectInit"),detectDirective=__name(function(ee,te=null){var re,ie;try{const ne=new RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
`,"ig");ee=ee.trim().replace(ne,"").replace(/'/gm,'"'),log.debug(`Detecting diagram directive${te!==null?" type:"+te:""} based on the text:${ee}`);let ae;const oe=[];for(;(ae=directiveRegex.exec(ee))!==null;)if(ae.index===directiveRegex.lastIndex&&directiveRegex.lastIndex++,ae&&!te||te&&((re=ae[1])!=null&&re.match(te))||te&&((ie=ae[2])!=null&&ie.match(te))){const se=ae[1]?ae[1]:ae[2],le=ae[3]?ae[3].trim():ae[4]?JSON.parse(ae[4].trim()):null;oe.push({type:se,args:le})}return oe.length===0?{type:ee,args:null}:oe.length===1?oe[0]:oe}catch(ne){return log.error(`ERROR: ${ne.message} - Unable to parse directive type: '${te}' based on the text: '${ee}'`),{type:void 0,args:null}}},"detectDirective"),removeDirectives=__name(function(ee){return ee.replace(directiveRegex,"")},"removeDirectives"),isSubstringInArray=__name(function(ee,te){for(const[re,ie]of te.entries())if(ie.match(ee))return re;return-1},"isSubstringInArray");function interpolateToCurve(ee,te){if(!ee)return te;const re=`curve${ee.charAt(0).toUpperCase()+ee.slice(1)}`;return d3CurveTypes[re]??te}__name(interpolateToCurve,"interpolateToCurve");function formatUrl(ee,te){const re=ee.trim();if(re)return te.securityLevel!=="loose"?sanitizeUrl_1(re):re}__name(formatUrl,"formatUrl");var runFunc=__name((ee,...te)=>{const re=ee.split("."),ie=re.length-1,ne=re[ie];let ae=window;for(let oe=0;oe<ie;oe++)if(ae=ae[re[oe]],!ae){log.error(`Function name: ${ee} not found in window`);return}ae[ne](...te)},"runFunc");function distance(ee,te){return!ee||!te?0:Math.sqrt(Math.pow(te.x-ee.x,2)+Math.pow(te.y-ee.y,2))}__name(distance,"distance");function traverseEdge(ee){let te,re=0;ee.forEach(ne=>{re+=distance(ne,te),te=ne});const ie=re/2;return calculatePoint(ee,ie)}__name(traverseEdge,"traverseEdge");function calcLabelPosition(ee){return ee.length===1?ee[0]:traverseEdge(ee)}__name(calcLabelPosition,"calcLabelPosition");var roundNumber=__name((ee,te=2)=>{const re=Math.pow(10,te);return Math.round(ee*re)/re},"roundNumber"),calculatePoint=__name((ee,te)=>{let re,ie=te;for(const ne of ee){if(re){const ae=distance(ne,re);if(ae<ie)ie-=ae;else{const oe=ie/ae;if(oe<=0)return re;if(oe>=1)return{x:ne.x,y:ne.y};if(oe>0&&oe<1)return{x:roundNumber((1-oe)*re.x+oe*ne.x,5),y:roundNumber((1-oe)*re.y+oe*ne.y,5)}}}re=ne}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),calcCardinalityPosition=__name((ee,te,re)=>{log.info(`our points ${JSON.stringify(te)}`),te[0]!==re&&(te=te.reverse());const ne=calculatePoint(te,25),ae=ee?10:5,oe=Math.atan2(te[0].y-ne.y,te[0].x-ne.x),se={x:0,y:0};return se.x=Math.sin(oe)*ae+(te[0].x+ne.x)/2,se.y=-Math.cos(oe)*ae+(te[0].y+ne.y)/2,se},"calcCardinalityPosition");function calcTerminalLabelPosition(ee,te,re){const ie=structuredClone(re);log.info("our points",ie),te!=="start_left"&&te!=="start_right"&&ie.reverse();const ne=25+ee,ae=calculatePoint(ie,ne),oe=10+ee*.5,se=Math.atan2(ie[0].y-ae.y,ie[0].x-ae.x),le={x:0,y:0};return te==="start_left"?(le.x=Math.sin(se+Math.PI)*oe+(ie[0].x+ae.x)/2,le.y=-Math.cos(se+Math.PI)*oe+(ie[0].y+ae.y)/2):te==="end_right"?(le.x=Math.sin(se-Math.PI)*oe+(ie[0].x+ae.x)/2-5,le.y=-Math.cos(se-Math.PI)*oe+(ie[0].y+ae.y)/2-5):te==="end_left"?(le.x=Math.sin(se)*oe+(ie[0].x+ae.x)/2-5,le.y=-Math.cos(se)*oe+(ie[0].y+ae.y)/2-5):(le.x=Math.sin(se)*oe+(ie[0].x+ae.x)/2,le.y=-Math.cos(se)*oe+(ie[0].y+ae.y)/2),le}__name(calcTerminalLabelPosition,"calcTerminalLabelPosition");function getStylesFromArray(ee){let te="",re="";for(const ie of ee)ie!==void 0&&(ie.startsWith("color:")||ie.startsWith("text-align:")?re=re+ie+";":te=te+ie+";");return{style:te,labelStyle:re}}__name(getStylesFromArray,"getStylesFromArray");var cnt=0,generateId=__name(()=>(cnt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt),"generateId");function makeRandomHex(ee){let te="";const re="0123456789abcdef",ie=re.length;for(let ne=0;ne<ee;ne++)te+=re.charAt(Math.floor(Math.random()*ie));return te}__name(makeRandomHex,"makeRandomHex");var random=__name(ee=>makeRandomHex(ee.length),"random"),getTextObj=__name(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,text:""}},"getTextObj"),drawSimpleText=__name(function(ee,te){const re=te.text.replace(common_default.lineBreakRegex," "),[,ie]=parseFontSize(te.fontSize),ne=ee.append("text");ne.attr("x",te.x),ne.attr("y",te.y),ne.style("text-anchor",te.anchor),ne.style("font-family",te.fontFamily),ne.style("font-size",ie),ne.style("font-weight",te.fontWeight),ne.attr("fill",te.fill),te.class!==void 0&&ne.attr("class",te.class);const ae=ne.append("tspan");return ae.attr("x",te.x+te.textMargin*2),ae.attr("fill",te.fill),ae.text(re),ne},"drawSimpleText"),wrapLabel=memoize((ee,te,re)=>{if(!ee||(re=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},re),common_default.lineBreakRegex.test(ee)))return ee;const ie=ee.split(" ").filter(Boolean),ne=[];let ae="";return ie.forEach((oe,se)=>{const le=calculateTextWidth(`${oe} `,re),ce=calculateTextWidth(ae,re);if(le>te){const{hyphenatedStrings:ue,remainingWord:fe}=breakString(oe,te,"-",re);ne.push(ae,...ue),ae=fe}else ce+le>=te?(ne.push(ae),ae=oe):ae=[ae,oe].filter(Boolean).join(" ");se+1===ie.length&&ne.push(ae)}),ne.filter(oe=>oe!=="").join(re.joinWith)},(ee,te,re)=>`${ee}${te}${re.fontSize}${re.fontWeight}${re.fontFamily}${re.joinWith}`),breakString=memoize((ee,te,re="-",ie)=>{ie=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},ie);const ne=[...ee],ae=[];let oe="";return ne.forEach((se,le)=>{const ce=`${oe}${se}`;if(calculateTextWidth(ce,ie)>=te){const de=le+1,ue=ne.length===de,fe=`${ce}${re}`;ae.push(ue?ce:fe),oe=""}else oe=ce}),{hyphenatedStrings:ae,remainingWord:oe}},(ee,te,re="-",ie)=>`${ee}${te}${re}${ie.fontSize}${ie.fontWeight}${ie.fontFamily}`);function calculateTextHeight(ee,te){return calculateTextDimensions(ee,te).height}__name(calculateTextHeight,"calculateTextHeight");function calculateTextWidth(ee,te){return calculateTextDimensions(ee,te).width}__name(calculateTextWidth,"calculateTextWidth");var calculateTextDimensions=memoize((ee,te)=>{const{fontSize:re=12,fontFamily:ie="Arial",fontWeight:ne=400}=te;if(!ee)return{width:0,height:0};const[,ae]=parseFontSize(re),oe=["sans-serif",ie],se=ee.split(common_default.lineBreakRegex),le=[],ce=d3select("body");if(!ce.remove)return{width:0,height:0,lineHeight:0};const he=ce.append("svg");for(const ue of oe){let fe=0;const pe={width:0,height:0,lineHeight:0};for(const ge of se){const ye=getTextObj();ye.text=ge||ZERO_WIDTH_SPACE;const _e=drawSimpleText(he,ye).style("font-size",ae).style("font-weight",ne).style("font-family",ue),me=(_e._groups||_e)[0][0].getBBox();if(me.width===0&&me.height===0)throw new Error("svg element not in render tree");pe.width=Math.round(Math.max(pe.width,me.width)),fe=Math.round(me.height),pe.height+=fe,pe.lineHeight=Math.round(Math.max(pe.lineHeight,fe))}le.push(pe)}he.remove();const de=isNaN(le[1].height)||isNaN(le[1].width)||isNaN(le[1].lineHeight)||le[0].height>le[1].height&&le[0].width>le[1].width&&le[0].lineHeight>le[1].lineHeight?0:1;return le[de]},(ee,te)=>`${ee}${te.fontSize}${te.fontWeight}${te.fontFamily}`),Bt,InitIDGenerator=(Bt=class{constructor(te=!1,re){this.count=0,this.count=re?re.length:0,this.next=te?()=>this.count++:()=>Date.now()}},__name(Bt,"InitIDGenerator"),Bt),decoder,entityDecode=__name(function(ee){return decoder=decoder||document.createElement("div"),ee=escape(ee).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),decoder.innerHTML=ee,unescape(decoder.textContent)},"entityDecode");function isDetailedError(ee){return"str"in ee}__name(isDetailedError,"isDetailedError");var insertTitle=__name((ee,te,re,ie)=>{var ae;if(!ie)return;const ne=(ae=ee.node())==null?void 0:ae.getBBox();ne&&ee.append("text").text(ie).attr("x",ne.x+ne.width/2).attr("y",-re).attr("class",te)},"insertTitle"),parseFontSize=__name(ee=>{if(typeof ee=="number")return[ee,ee+"px"];const te=parseInt(ee??"",10);return Number.isNaN(te)?[void 0,void 0]:ee===String(te)?[te,ee+"px"]:[te,ee]},"parseFontSize");function cleanAndMerge(ee,te){return merge$1({},ee,te)}__name(cleanAndMerge,"cleanAndMerge");var utils_default={assignWithDepth:assignWithDepth_default,wrapLabel,calculateTextHeight,calculateTextWidth,calculateTextDimensions,cleanAndMerge,detectInit,detectDirective,isSubstringInArray,interpolateToCurve,calcLabelPosition,calcCardinalityPosition,calcTerminalLabelPosition,formatUrl,getStylesFromArray,generateId,random,runFunc,entityDecode,insertTitle,parseFontSize,InitIDGenerator},encodeEntities=__name(function(ee){let te=ee;return te=te.replace(/style.*:\S*#.*;/g,function(re){return re.substring(0,re.length-1)}),te=te.replace(/classDef.*:\S*#.*;/g,function(re){return re.substring(0,re.length-1)}),te=te.replace(/#\w+;/g,function(re){const ie=re.substring(1,re.length-1);return/^\+?\d+$/.test(ie)?"fl°°"+ie+"¶ß":"fl°"+ie+"¶ß"}),te},"encodeEntities"),decodeEntities=__name(function(ee){return ee.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),getEdgeId=__name((ee,te,{counter:re=0,prefix:ie,suffix:ne})=>`${ie?`${ie}_`:""}${ee}_${te}_${re}${ne?`_${ne}`:""}`,"getEdgeId");function _getDefaults(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let _defaults=_getDefaults();function changeDefaults(ee){_defaults=ee}const escapeTest=/[&<>"']/,escapeReplace=new RegExp(escapeTest.source,"g"),escapeTestNoEncode=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode=new RegExp(escapeTestNoEncode.source,"g"),escapeReplacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},getEscapeReplacement=ee=>escapeReplacements[ee];function escape$1(ee,te){if(te){if(escapeTest.test(ee))return ee.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(ee))return ee.replace(escapeReplaceNoEncode,getEscapeReplacement);return ee}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape$1(ee){return ee.replace(unescapeTest,(te,re)=>(re=re.toLowerCase(),re==="colon"?":":re.charAt(0)==="#"?re.charAt(1)==="x"?String.fromCharCode(parseInt(re.substring(2),16)):String.fromCharCode(+re.substring(1)):""))}const caret$1=/(^|[^\[])\^/g;function edit(ee,te){let re=typeof ee=="string"?ee:ee.source;te=te||"";const ie={replace:(ne,ae)=>{let oe=typeof ae=="string"?ae:ae.source;return oe=oe.replace(caret$1,"$1"),re=re.replace(ne,oe),ie},getRegex:()=>new RegExp(re,te)};return ie}function cleanUrl(ee){try{ee=encodeURI(ee).replace(/%25/g,"%")}catch{return null}return ee}const noopTest={exec:()=>null};function splitCells(ee,te){const re=ee.replace(/\|/g,(ae,oe,se)=>{let le=!1,ce=oe;for(;--ce>=0&&se[ce]==="\\";)le=!le;return le?"|":" |"}),ie=re.split(/ \|/);let ne=0;if(ie[0].trim()||ie.shift(),ie.length>0&&!ie[ie.length-1].trim()&&ie.pop(),te)if(ie.length>te)ie.splice(te);else for(;ie.length<te;)ie.push("");for(;ne<ie.length;ne++)ie[ne]=ie[ne].trim().replace(/\\\|/g,"|");return ie}function rtrim(ee,te,re){const ie=ee.length;if(ie===0)return"";let ne=0;for(;ne<ie;){const ae=ee.charAt(ie-ne-1);if(ae===te&&!re)ne++;else if(ae!==te&&re)ne++;else break}return ee.slice(0,ie-ne)}function findClosingBracket(ee,te){if(ee.indexOf(te[1])===-1)return-1;let re=0;for(let ie=0;ie<ee.length;ie++)if(ee[ie]==="\\")ie++;else if(ee[ie]===te[0])re++;else if(ee[ie]===te[1]&&(re--,re<0))return ie;return-1}function outputLink(ee,te,re,ie){const ne=te.href,ae=te.title?escape$1(te.title):null,oe=ee[1].replace(/\\([\[\]])/g,"$1");if(ee[0].charAt(0)!=="!"){ie.state.inLink=!0;const se={type:"link",raw:re,href:ne,title:ae,text:oe,tokens:ie.inlineTokens(oe)};return ie.state.inLink=!1,se}return{type:"image",raw:re,href:ne,title:ae,text:escape$1(oe)}}function indentCodeCompensation(ee,te){const re=ee.match(/^(\s+)(?:```)/);if(re===null)return te;const ie=re[1];return te.split(`
`).map(ne=>{const ae=ne.match(/^\s+/);if(ae===null)return ne;const[oe]=ae;return oe.length>=ie.length?ne.slice(ie.length):ne}).join(`
`)}class _Tokenizer{constructor(te){Ye(this,"options");Ye(this,"rules");Ye(this,"lexer");this.options=te||_defaults}space(te){const re=this.rules.block.newline.exec(te);if(re&&re[0].length>0)return{type:"space",raw:re[0]}}code(te){const re=this.rules.block.code.exec(te);if(re){const ie=re[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:re[0],codeBlockStyle:"indented",text:this.options.pedantic?ie:rtrim(ie,`
`)}}}fences(te){const re=this.rules.block.fences.exec(te);if(re){const ie=re[0],ne=indentCodeCompensation(ie,re[3]||"");return{type:"code",raw:ie,lang:re[2]?re[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):re[2],text:ne}}}heading(te){const re=this.rules.block.heading.exec(te);if(re){let ie=re[2].trim();if(/#$/.test(ie)){const ne=rtrim(ie,"#");(this.options.pedantic||!ne||/ $/.test(ne))&&(ie=ne.trim())}return{type:"heading",raw:re[0],depth:re[1].length,text:ie,tokens:this.lexer.inline(ie)}}}hr(te){const re=this.rules.block.hr.exec(te);if(re)return{type:"hr",raw:rtrim(re[0],`
`)}}blockquote(te){const re=this.rules.block.blockquote.exec(te);if(re){let ie=rtrim(re[0],`
`).split(`
`),ne="",ae="";const oe=[];for(;ie.length>0;){let se=!1;const le=[];let ce;for(ce=0;ce<ie.length;ce++)if(/^ {0,3}>/.test(ie[ce]))le.push(ie[ce]),se=!0;else if(!se)le.push(ie[ce]);else break;ie=ie.slice(ce);const he=le.join(`
`),de=he.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
$1`).replace(/^ {0,3}>[ \t]?/gm,"");ne=ne?`${ne}
${he}`:he,ae=ae?`${ae}
${de}`:de;const ue=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(de,oe,!0),this.lexer.state.top=ue,ie.length===0)break;const fe=oe[oe.length-1];if((fe==null?void 0:fe.type)==="code")break;if((fe==null?void 0:fe.type)==="blockquote"){const pe=fe,ge=pe.raw+`
`+ie.join(`
`),ye=this.blockquote(ge);oe[oe.length-1]=ye,ne=ne.substring(0,ne.length-pe.raw.length)+ye.raw,ae=ae.substring(0,ae.length-pe.text.length)+ye.text;break}else if((fe==null?void 0:fe.type)==="list"){const pe=fe,ge=pe.raw+`
`+ie.join(`
`),ye=this.list(ge);oe[oe.length-1]=ye,ne=ne.substring(0,ne.length-fe.raw.length)+ye.raw,ae=ae.substring(0,ae.length-pe.raw.length)+ye.raw,ie=ge.substring(oe[oe.length-1].raw.length).split(`
`);continue}}return{type:"blockquote",raw:ne,tokens:oe,text:ae}}}list(te){let re=this.rules.block.list.exec(te);if(re){let ie=re[1].trim();const ne=ie.length>1,ae={type:"list",raw:"",ordered:ne,start:ne?+ie.slice(0,-1):"",loose:!1,items:[]};ie=ne?`\\d{1,9}\\${ie.slice(-1)}`:`\\${ie}`,this.options.pedantic&&(ie=ne?ie:"[*+-]");const oe=new RegExp(`^( {0,3}${ie})((?:[ ][^\\n]*)?(?:\\n|$))`);let se=!1;for(;te;){let le=!1,ce="",he="";if(!(re=oe.exec(te))||this.rules.block.hr.test(te))break;ce=re[0],te=te.substring(ce.length);let de=re[2].split(`
`,1)[0].replace(/^\t+/,_e=>" ".repeat(3*_e.length)),ue=te.split(`
`,1)[0],fe=!de.trim(),pe=0;if(this.options.pedantic?(pe=2,he=de.trimStart()):fe?pe=re[1].length+1:(pe=re[2].search(/[^ ]/),pe=pe>4?1:pe,he=de.slice(pe),pe+=re[1].length),fe&&/^ *$/.test(ue)&&(ce+=ue+`
`,te=te.substring(ue.length+1),le=!0),!le){const _e=new RegExp(`^ {0,${Math.min(3,pe-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),me=new RegExp(`^ {0,${Math.min(3,pe-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),we=new RegExp(`^ {0,${Math.min(3,pe-1)}}(?:\`\`\`|~~~)`),xe=new RegExp(`^ {0,${Math.min(3,pe-1)}}#`);for(;te;){const Te=te.split(`
`,1)[0];if(ue=Te,this.options.pedantic&&(ue=ue.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),we.test(ue)||xe.test(ue)||_e.test(ue)||me.test(te))break;if(ue.search(/[^ ]/)>=pe||!ue.trim())he+=`
`+ue.slice(pe);else{if(fe||de.search(/[^ ]/)>=4||we.test(de)||xe.test(de)||me.test(de))break;he+=`
`+ue}!fe&&!ue.trim()&&(fe=!0),ce+=Te+`
`,te=te.substring(Te.length+1),de=ue.slice(pe)}}ae.loose||(se?ae.loose=!0:/\n *\n *$/.test(ce)&&(se=!0));let ge=null,ye;this.options.gfm&&(ge=/^\[[ xX]\] /.exec(he),ge&&(ye=ge[0]!=="[ ] ",he=he.replace(/^\[[ xX]\] +/,""))),ae.items.push({type:"list_item",raw:ce,task:!!ge,checked:ye,loose:!1,text:he,tokens:[]}),ae.raw+=ce}ae.items[ae.items.length-1].raw=ae.items[ae.items.length-1].raw.trimEnd(),ae.items[ae.items.length-1].text=ae.items[ae.items.length-1].text.trimEnd(),ae.raw=ae.raw.trimEnd();for(let le=0;le<ae.items.length;le++)if(this.lexer.state.top=!1,ae.items[le].tokens=this.lexer.blockTokens(ae.items[le].text,[]),!ae.loose){const ce=ae.items[le].tokens.filter(de=>de.type==="space"),he=ce.length>0&&ce.some(de=>/\n.*\n/.test(de.raw));ae.loose=he}if(ae.loose)for(let le=0;le<ae.items.length;le++)ae.items[le].loose=!0;return ae}}html(te){const re=this.rules.block.html.exec(te);if(re)return{type:"html",block:!0,raw:re[0],pre:re[1]==="pre"||re[1]==="script"||re[1]==="style",text:re[0]}}def(te){const re=this.rules.block.def.exec(te);if(re){const ie=re[1].toLowerCase().replace(/\s+/g," "),ne=re[2]?re[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",ae=re[3]?re[3].substring(1,re[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):re[3];return{type:"def",tag:ie,raw:re[0],href:ne,title:ae}}}table(te){const re=this.rules.block.table.exec(te);if(!re||!/[:|]/.test(re[2]))return;const ie=splitCells(re[1]),ne=re[2].replace(/^\||\| *$/g,"").split("|"),ae=re[3]&&re[3].trim()?re[3].replace(/\n[ \t]*$/,"").split(`
`):[],oe={type:"table",raw:re[0],header:[],align:[],rows:[]};if(ie.length===ne.length){for(const se of ne)/^ *-+: *$/.test(se)?oe.align.push("right"):/^ *:-+: *$/.test(se)?oe.align.push("center"):/^ *:-+ *$/.test(se)?oe.align.push("left"):oe.align.push(null);for(let se=0;se<ie.length;se++)oe.header.push({text:ie[se],tokens:this.lexer.inline(ie[se]),header:!0,align:oe.align[se]});for(const se of ae)oe.rows.push(splitCells(se,oe.header.length).map((le,ce)=>({text:le,tokens:this.lexer.inline(le),header:!1,align:oe.align[ce]})));return oe}}lheading(te){const re=this.rules.block.lheading.exec(te);if(re)return{type:"heading",raw:re[0],depth:re[2].charAt(0)==="="?1:2,text:re[1],tokens:this.lexer.inline(re[1])}}paragraph(te){const re=this.rules.block.paragraph.exec(te);if(re){const ie=re[1].charAt(re[1].length-1)===`
`?re[1].slice(0,-1):re[1];return{type:"paragraph",raw:re[0],text:ie,tokens:this.lexer.inline(ie)}}}text(te){const re=this.rules.block.text.exec(te);if(re)return{type:"text",raw:re[0],text:re[0],tokens:this.lexer.inline(re[0])}}escape(te){const re=this.rules.inline.escape.exec(te);if(re)return{type:"escape",raw:re[0],text:escape$1(re[1])}}tag(te){const re=this.rules.inline.tag.exec(te);if(re)return!this.lexer.state.inLink&&/^<a /i.test(re[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(re[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(re[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(re[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:re[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:re[0]}}link(te){const re=this.rules.inline.link.exec(te);if(re){const ie=re[2].trim();if(!this.options.pedantic&&/^</.test(ie)){if(!/>$/.test(ie))return;const oe=rtrim(ie.slice(0,-1),"\\");if((ie.length-oe.length)%2===0)return}else{const oe=findClosingBracket(re[2],"()");if(oe>-1){const le=(re[0].indexOf("!")===0?5:4)+re[1].length+oe;re[2]=re[2].substring(0,oe),re[0]=re[0].substring(0,le).trim(),re[3]=""}}let ne=re[2],ae="";if(this.options.pedantic){const oe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ne);oe&&(ne=oe[1],ae=oe[3])}else ae=re[3]?re[3].slice(1,-1):"";return ne=ne.trim(),/^</.test(ne)&&(this.options.pedantic&&!/>$/.test(ie)?ne=ne.slice(1):ne=ne.slice(1,-1)),outputLink(re,{href:ne&&ne.replace(this.rules.inline.anyPunctuation,"$1"),title:ae&&ae.replace(this.rules.inline.anyPunctuation,"$1")},re[0],this.lexer)}}reflink(te,re){let ie;if((ie=this.rules.inline.reflink.exec(te))||(ie=this.rules.inline.nolink.exec(te))){const ne=(ie[2]||ie[1]).replace(/\s+/g," "),ae=re[ne.toLowerCase()];if(!ae){const oe=ie[0].charAt(0);return{type:"text",raw:oe,text:oe}}return outputLink(ie,ae,ie[0],this.lexer)}}emStrong(te,re,ie=""){let ne=this.rules.inline.emStrongLDelim.exec(te);if(!ne||ne[3]&&ie.match(/[\p{L}\p{N}]/u))return;if(!(ne[1]||ne[2]||"")||!ie||this.rules.inline.punctuation.exec(ie)){const oe=[...ne[0]].length-1;let se,le,ce=oe,he=0;const de=ne[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(de.lastIndex=0,re=re.slice(-1*te.length+oe);(ne=de.exec(re))!=null;){if(se=ne[1]||ne[2]||ne[3]||ne[4]||ne[5]||ne[6],!se)continue;if(le=[...se].length,ne[3]||ne[4]){ce+=le;continue}else if((ne[5]||ne[6])&&oe%3&&!((oe+le)%3)){he+=le;continue}if(ce-=le,ce>0)continue;le=Math.min(le,le+ce+he);const ue=[...ne[0]][0].length,fe=te.slice(0,oe+ne.index+ue+le);if(Math.min(oe,le)%2){const ge=fe.slice(1,-1);return{type:"em",raw:fe,text:ge,tokens:this.lexer.inlineTokens(ge)}}const pe=fe.slice(2,-2);return{type:"strong",raw:fe,text:pe,tokens:this.lexer.inlineTokens(pe)}}}}codespan(te){const re=this.rules.inline.code.exec(te);if(re){let ie=re[2].replace(/\n/g," ");const ne=/[^ ]/.test(ie),ae=/^ /.test(ie)&&/ $/.test(ie);return ne&&ae&&(ie=ie.substring(1,ie.length-1)),ie=escape$1(ie,!0),{type:"codespan",raw:re[0],text:ie}}}br(te){const re=this.rules.inline.br.exec(te);if(re)return{type:"br",raw:re[0]}}del(te){const re=this.rules.inline.del.exec(te);if(re)return{type:"del",raw:re[0],text:re[2],tokens:this.lexer.inlineTokens(re[2])}}autolink(te){const re=this.rules.inline.autolink.exec(te);if(re){let ie,ne;return re[2]==="@"?(ie=escape$1(re[1]),ne="mailto:"+ie):(ie=escape$1(re[1]),ne=ie),{type:"link",raw:re[0],text:ie,href:ne,tokens:[{type:"text",raw:ie,text:ie}]}}}url(te){var ie;let re;if(re=this.rules.inline.url.exec(te)){let ne,ae;if(re[2]==="@")ne=escape$1(re[0]),ae="mailto:"+ne;else{let oe;do oe=re[0],re[0]=((ie=this.rules.inline._backpedal.exec(re[0]))==null?void 0:ie[0])??"";while(oe!==re[0]);ne=escape$1(re[0]),re[1]==="www."?ae="http://"+re[0]:ae=re[0]}return{type:"link",raw:re[0],text:ne,href:ae,tokens:[{type:"text",raw:ne,text:ne}]}}}inlineText(te){const re=this.rules.inline.text.exec(te);if(re){let ie;return this.lexer.state.inRawBlock?ie=re[0]:ie=escape$1(re[0]),{type:"text",raw:re[0],text:ie}}}}const newline=/^(?: *(?:\n|$))+/,blockCode=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bullet=/(?:[*+-]|\d{1,9}[.)])/,lheading=edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,bullet).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),_paragraph=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,blockText=/^[^\n]+/,_blockLabel=/(?!\s*\])(?:\\.|[^\[\]\\])+/,def=edit(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",_blockLabel).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),list=edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bullet).getRegex(),_tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_comment=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,html=edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",_comment).replace("tag",_tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),paragraph=edit(_paragraph).replace("hr",hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex(),blockquote=edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",paragraph).getRegex(),blockNormal={blockquote,code:blockCode,def,fences,heading,hr,html,lheading,list,newline,paragraph,table:noopTest,text:blockText},gfmTable=edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex(),blockGfm={...blockNormal,table:gfmTable,paragraph:edit(_paragraph).replace("hr",hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gfmTable).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex()},blockPedantic={...blockNormal,html:edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(_paragraph).replace("hr",hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",lheading).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape$2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,inlineCode=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br=/^( {2,}|\\)\n(?!\s*$)/,inlineText=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_punctuation="\\p{P}\\p{S}",punctuation=edit(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,_punctuation).getRegex(),blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,emStrongLDelim=edit(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,_punctuation).getRegex(),emStrongRDelimAst=edit("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,_punctuation).getRegex(),emStrongRDelimUnd=edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,_punctuation).getRegex(),anyPunctuation=edit(/\\([punct])/,"gu").replace(/punct/g,_punctuation).getRegex(),autolink=edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_inlineComment=edit(_comment).replace("(?:-->|$)","-->").getRegex(),tag=edit("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",_inlineComment).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_inlineLabel=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,link=edit(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",_inlineLabel).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),reflink=edit(/^!?\[(label)\]\[(ref)\]/).replace("label",_inlineLabel).replace("ref",_blockLabel).getRegex(),nolink=edit(/^!?\[(ref)\](?:\[\])?/).replace("ref",_blockLabel).getRegex(),reflinkSearch=edit("reflink|nolink(?!\\()","g").replace("reflink",reflink).replace("nolink",nolink).getRegex(),inlineNormal={_backpedal:noopTest,anyPunctuation,autolink,blockSkip,br,code:inlineCode,del:noopTest,emStrongLDelim,emStrongRDelimAst,emStrongRDelimUnd,escape:escape$2,link,nolink,punctuation,reflink,reflinkSearch,tag,text:inlineText,url:noopTest},inlinePedantic={...inlineNormal,link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",_inlineLabel).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_inlineLabel).getRegex()},inlineGfm={...inlineNormal,escape:edit(escape$2).replace("])","~|])").getRegex(),url:edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},inlineBreaks={...inlineGfm,br:edit(br).replace("{2,}","*").getRegex(),text:edit(inlineGfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},block={normal:blockNormal,gfm:blockGfm,pedantic:blockPedantic},inline={normal:inlineNormal,gfm:inlineGfm,breaks:inlineBreaks,pedantic:inlinePedantic};class _Lexer{constructor(te){Ye(this,"tokens");Ye(this,"options");Ye(this,"state");Ye(this,"tokenizer");Ye(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=te||_defaults,this.options.tokenizer=this.options.tokenizer||new _Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const re={block:block.normal,inline:inline.normal};this.options.pedantic?(re.block=block.pedantic,re.inline=inline.pedantic):this.options.gfm&&(re.block=block.gfm,this.options.breaks?re.inline=inline.breaks:re.inline=inline.gfm),this.tokenizer.rules=re}static get rules(){return{block,inline}}static lex(te,re){return new _Lexer(re).lex(te)}static lexInline(te,re){return new _Lexer(re).inlineTokens(te)}lex(te){te=te.replace(/\r\n|\r/g,`
`),this.blockTokens(te,this.tokens);for(let re=0;re<this.inlineQueue.length;re++){const ie=this.inlineQueue[re];this.inlineTokens(ie.src,ie.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(te,re=[],ie=!1){this.options.pedantic?te=te.replace(/\t/g," ").replace(/^ +$/gm,""):te=te.replace(/^( *)(\t+)/gm,(se,le,ce)=>le+" ".repeat(ce.length));let ne,ae,oe;for(;te;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(se=>(ne=se.call({lexer:this},te,re))?(te=te.substring(ne.raw.length),re.push(ne),!0):!1))){if(ne=this.tokenizer.space(te)){te=te.substring(ne.raw.length),ne.raw.length===1&&re.length>0?re[re.length-1].raw+=`
`:re.push(ne);continue}if(ne=this.tokenizer.code(te)){te=te.substring(ne.raw.length),ae=re[re.length-1],ae&&(ae.type==="paragraph"||ae.type==="text")?(ae.raw+=`
`+ne.raw,ae.text+=`
`+ne.text,this.inlineQueue[this.inlineQueue.length-1].src=ae.text):re.push(ne);continue}if(ne=this.tokenizer.fences(te)){te=te.substring(ne.raw.length),re.push(ne);continue}if(ne=this.tokenizer.heading(te)){te=te.substring(ne.raw.length),re.push(ne);continue}if(ne=this.tokenizer.hr(te)){te=te.substring(ne.raw.length),re.push(ne);continue}if(ne=this.tokenizer.blockquote(te)){te=te.substring(ne.raw.length),re.push(ne);continue}if(ne=this.tokenizer.list(te)){te=te.substring(ne.raw.length),re.push(ne);continue}if(ne=this.tokenizer.html(te)){te=te.substring(ne.raw.length),re.push(ne);continue}if(ne=this.tokenizer.def(te)){te=te.substring(ne.raw.length),ae=re[re.length-1],ae&&(ae.type==="paragraph"||ae.type==="text")?(ae.raw+=`
`+ne.raw,ae.text+=`
`+ne.raw,this.inlineQueue[this.inlineQueue.length-1].src=ae.text):this.tokens.links[ne.tag]||(this.tokens.links[ne.tag]={href:ne.href,title:ne.title});continue}if(ne=this.tokenizer.table(te)){te=te.substring(ne.raw.length),re.push(ne);continue}if(ne=this.tokenizer.lheading(te)){te=te.substring(ne.raw.length),re.push(ne);continue}if(oe=te,this.options.extensions&&this.options.extensions.startBlock){let se=1/0;const le=te.slice(1);let ce;this.options.extensions.startBlock.forEach(he=>{ce=he.call({lexer:this},le),typeof ce=="number"&&ce>=0&&(se=Math.min(se,ce))}),se<1/0&&se>=0&&(oe=te.substring(0,se+1))}if(this.state.top&&(ne=this.tokenizer.paragraph(oe))){ae=re[re.length-1],ie&&(ae==null?void 0:ae.type)==="paragraph"?(ae.raw+=`
`+ne.raw,ae.text+=`
`+ne.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ae.text):re.push(ne),ie=oe.length!==te.length,te=te.substring(ne.raw.length);continue}if(ne=this.tokenizer.text(te)){te=te.substring(ne.raw.length),ae=re[re.length-1],ae&&ae.type==="text"?(ae.raw+=`
`+ne.raw,ae.text+=`
`+ne.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ae.text):re.push(ne);continue}if(te){const se="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(se);break}else throw new Error(se)}}return this.state.top=!0,re}inline(te,re=[]){return this.inlineQueue.push({src:te,tokens:re}),re}inlineTokens(te,re=[]){let ie,ne,ae,oe=te,se,le,ce;if(this.tokens.links){const he=Object.keys(this.tokens.links);if(he.length>0)for(;(se=this.tokenizer.rules.inline.reflinkSearch.exec(oe))!=null;)he.includes(se[0].slice(se[0].lastIndexOf("[")+1,-1))&&(oe=oe.slice(0,se.index)+"["+"a".repeat(se[0].length-2)+"]"+oe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(se=this.tokenizer.rules.inline.blockSkip.exec(oe))!=null;)oe=oe.slice(0,se.index)+"["+"a".repeat(se[0].length-2)+"]"+oe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(se=this.tokenizer.rules.inline.anyPunctuation.exec(oe))!=null;)oe=oe.slice(0,se.index)+"++"+oe.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;te;)if(le||(ce=""),le=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(he=>(ie=he.call({lexer:this},te,re))?(te=te.substring(ie.raw.length),re.push(ie),!0):!1))){if(ie=this.tokenizer.escape(te)){te=te.substring(ie.raw.length),re.push(ie);continue}if(ie=this.tokenizer.tag(te)){te=te.substring(ie.raw.length),ne=re[re.length-1],ne&&ie.type==="text"&&ne.type==="text"?(ne.raw+=ie.raw,ne.text+=ie.text):re.push(ie);continue}if(ie=this.tokenizer.link(te)){te=te.substring(ie.raw.length),re.push(ie);continue}if(ie=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(ie.raw.length),ne=re[re.length-1],ne&&ie.type==="text"&&ne.type==="text"?(ne.raw+=ie.raw,ne.text+=ie.text):re.push(ie);continue}if(ie=this.tokenizer.emStrong(te,oe,ce)){te=te.substring(ie.raw.length),re.push(ie);continue}if(ie=this.tokenizer.codespan(te)){te=te.substring(ie.raw.length),re.push(ie);continue}if(ie=this.tokenizer.br(te)){te=te.substring(ie.raw.length),re.push(ie);continue}if(ie=this.tokenizer.del(te)){te=te.substring(ie.raw.length),re.push(ie);continue}if(ie=this.tokenizer.autolink(te)){te=te.substring(ie.raw.length),re.push(ie);continue}if(!this.state.inLink&&(ie=this.tokenizer.url(te))){te=te.substring(ie.raw.length),re.push(ie);continue}if(ae=te,this.options.extensions&&this.options.extensions.startInline){let he=1/0;const de=te.slice(1);let ue;this.options.extensions.startInline.forEach(fe=>{ue=fe.call({lexer:this},de),typeof ue=="number"&&ue>=0&&(he=Math.min(he,ue))}),he<1/0&&he>=0&&(ae=te.substring(0,he+1))}if(ie=this.tokenizer.inlineText(ae)){te=te.substring(ie.raw.length),ie.raw.slice(-1)!=="_"&&(ce=ie.raw.slice(-1)),le=!0,ne=re[re.length-1],ne&&ne.type==="text"?(ne.raw+=ie.raw,ne.text+=ie.text):re.push(ie);continue}if(te){const he="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(he);break}else throw new Error(he)}}return re}}class _Renderer{constructor(te){Ye(this,"options");Ye(this,"parser");this.options=te||_defaults}space(te){return""}code({text:te,lang:re,escaped:ie}){var oe;const ne=(oe=(re||"").match(/^\S*/))==null?void 0:oe[0],ae=te.replace(/\n$/,"")+`
`;return ne?'<pre><code class="language-'+escape$1(ne)+'">'+(ie?ae:escape$1(ae,!0))+`</code></pre>
`:"<pre><code>"+(ie?ae:escape$1(ae,!0))+`</code></pre>
`}blockquote({tokens:te}){return`<blockquote>
${this.parser.parse(te)}</blockquote>
`}html({text:te}){return te}heading({tokens:te,depth:re}){return`<h${re}>${this.parser.parseInline(te)}</h${re}>
`}hr(te){return`<hr>
`}list(te){const re=te.ordered,ie=te.start;let ne="";for(let se=0;se<te.items.length;se++){const le=te.items[se];ne+=this.listitem(le)}const ae=re?"ol":"ul",oe=re&&ie!==1?' start="'+ie+'"':"";return"<"+ae+oe+`>
`+ne+"</"+ae+`>
`}listitem(te){let re="";if(te.task){const ie=this.checkbox({checked:!!te.checked});te.loose?te.tokens.length>0&&te.tokens[0].type==="paragraph"?(te.tokens[0].text=ie+" "+te.tokens[0].text,te.tokens[0].tokens&&te.tokens[0].tokens.length>0&&te.tokens[0].tokens[0].type==="text"&&(te.tokens[0].tokens[0].text=ie+" "+te.tokens[0].tokens[0].text)):te.tokens.unshift({type:"text",raw:ie+" ",text:ie+" "}):re+=ie+" "}return re+=this.parser.parse(te.tokens,!!te.loose),`<li>${re}</li>
`}checkbox({checked:te}){return"<input "+(te?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:te}){return`<p>${this.parser.parseInline(te)}</p>
`}table(te){let re="",ie="";for(let ae=0;ae<te.header.length;ae++)ie+=this.tablecell(te.header[ae]);re+=this.tablerow({text:ie});let ne="";for(let ae=0;ae<te.rows.length;ae++){const oe=te.rows[ae];ie="";for(let se=0;se<oe.length;se++)ie+=this.tablecell(oe[se]);ne+=this.tablerow({text:ie})}return ne&&(ne=`<tbody>${ne}</tbody>`),`<table>
<thead>
`+re+`</thead>
`+ne+`</table>
`}tablerow({text:te}){return`<tr>
${te}</tr>
`}tablecell(te){const re=this.parser.parseInline(te.tokens),ie=te.header?"th":"td";return(te.align?`<${ie} align="${te.align}">`:`<${ie}>`)+re+`</${ie}>
`}strong({tokens:te}){return`<strong>${this.parser.parseInline(te)}</strong>`}em({tokens:te}){return`<em>${this.parser.parseInline(te)}</em>`}codespan({text:te}){return`<code>${te}</code>`}br(te){return"<br>"}del({tokens:te}){return`<del>${this.parser.parseInline(te)}</del>`}link({href:te,title:re,tokens:ie}){const ne=this.parser.parseInline(ie),ae=cleanUrl(te);if(ae===null)return ne;te=ae;let oe='<a href="'+te+'"';return re&&(oe+=' title="'+re+'"'),oe+=">"+ne+"</a>",oe}image({href:te,title:re,text:ie}){const ne=cleanUrl(te);if(ne===null)return ie;te=ne;let ae=`<img src="${te}" alt="${ie}"`;return re&&(ae+=` title="${re}"`),ae+=">",ae}text(te){return"tokens"in te&&te.tokens?this.parser.parseInline(te.tokens):te.text}}class _TextRenderer{strong({text:te}){return te}em({text:te}){return te}codespan({text:te}){return te}del({text:te}){return te}html({text:te}){return te}text({text:te}){return te}link({text:te}){return""+te}image({text:te}){return""+te}br(){return""}}class _Parser{constructor(te){Ye(this,"options");Ye(this,"renderer");Ye(this,"textRenderer");this.options=te||_defaults,this.options.renderer=this.options.renderer||new _Renderer,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _TextRenderer}static parse(te,re){return new _Parser(re).parse(te)}static parseInline(te,re){return new _Parser(re).parseInline(te)}parse(te,re=!0){let ie="";for(let ne=0;ne<te.length;ne++){const ae=te[ne];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ae.type]){const se=ae,le=this.options.extensions.renderers[se.type].call({parser:this},se);if(le!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(se.type)){ie+=le||"";continue}}const oe=ae;switch(oe.type){case"space":{ie+=this.renderer.space(oe);continue}case"hr":{ie+=this.renderer.hr(oe);continue}case"heading":{ie+=this.renderer.heading(oe);continue}case"code":{ie+=this.renderer.code(oe);continue}case"table":{ie+=this.renderer.table(oe);continue}case"blockquote":{ie+=this.renderer.blockquote(oe);continue}case"list":{ie+=this.renderer.list(oe);continue}case"html":{ie+=this.renderer.html(oe);continue}case"paragraph":{ie+=this.renderer.paragraph(oe);continue}case"text":{let se=oe,le=this.renderer.text(se);for(;ne+1<te.length&&te[ne+1].type==="text";)se=te[++ne],le+=`
`+this.renderer.text(se);re?ie+=this.renderer.paragraph({type:"paragraph",raw:le,text:le,tokens:[{type:"text",raw:le,text:le}]}):ie+=le;continue}default:{const se='Token with "'+oe.type+'" type was not found.';if(this.options.silent)return console.error(se),"";throw new Error(se)}}}return ie}parseInline(te,re){re=re||this.renderer;let ie="";for(let ne=0;ne<te.length;ne++){const ae=te[ne];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ae.type]){const se=this.options.extensions.renderers[ae.type].call({parser:this},ae);if(se!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(ae.type)){ie+=se||"";continue}}const oe=ae;switch(oe.type){case"escape":{ie+=re.text(oe);break}case"html":{ie+=re.html(oe);break}case"link":{ie+=re.link(oe);break}case"image":{ie+=re.image(oe);break}case"strong":{ie+=re.strong(oe);break}case"em":{ie+=re.em(oe);break}case"codespan":{ie+=re.codespan(oe);break}case"br":{ie+=re.br(oe);break}case"del":{ie+=re.del(oe);break}case"text":{ie+=re.text(oe);break}default:{const se='Token with "'+oe.type+'" type was not found.';if(this.options.silent)return console.error(se),"";throw new Error(se)}}}return ie}}class _Hooks{constructor(te){Ye(this,"options");this.options=te||_defaults}preprocess(te){return te}postprocess(te){return te}processAllTokens(te){return te}}Ye(_Hooks,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var gt,wr,Vt,Cr;class Marked{constructor(...te){xr(this,gt);Ye(this,"defaults",_getDefaults());Ye(this,"options",this.setOptions);Ye(this,"parse",$t(this,gt,Vt).call(this,_Lexer.lex,_Parser.parse));Ye(this,"parseInline",$t(this,gt,Vt).call(this,_Lexer.lexInline,_Parser.parseInline));Ye(this,"Parser",_Parser);Ye(this,"Renderer",_Renderer);Ye(this,"TextRenderer",_TextRenderer);Ye(this,"Lexer",_Lexer);Ye(this,"Tokenizer",_Tokenizer);Ye(this,"Hooks",_Hooks);this.use(...te)}walkTokens(te,re){var ne,ae;let ie=[];for(const oe of te)switch(ie=ie.concat(re.call(this,oe)),oe.type){case"table":{const se=oe;for(const le of se.header)ie=ie.concat(this.walkTokens(le.tokens,re));for(const le of se.rows)for(const ce of le)ie=ie.concat(this.walkTokens(ce.tokens,re));break}case"list":{const se=oe;ie=ie.concat(this.walkTokens(se.items,re));break}default:{const se=oe;(ae=(ne=this.defaults.extensions)==null?void 0:ne.childTokens)!=null&&ae[se.type]?this.defaults.extensions.childTokens[se.type].forEach(le=>{const ce=se[le].flat(1/0);ie=ie.concat(this.walkTokens(ce,re))}):se.tokens&&(ie=ie.concat(this.walkTokens(se.tokens,re)))}}return ie}use(...te){const re=this.defaults.extensions||{renderers:{},childTokens:{}};return te.forEach(ie=>{const ne={...ie};if(ne.async=this.defaults.async||ne.async||!1,ie.extensions&&(ie.extensions.forEach(ae=>{if(!ae.name)throw new Error("extension name required");if("renderer"in ae){const oe=re.renderers[ae.name];oe?re.renderers[ae.name]=function(...se){let le=ae.renderer.apply(this,se);return le===!1&&(le=oe.apply(this,se)),le}:re.renderers[ae.name]=ae.renderer}if("tokenizer"in ae){if(!ae.level||ae.level!=="block"&&ae.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const oe=re[ae.level];oe?oe.unshift(ae.tokenizer):re[ae.level]=[ae.tokenizer],ae.start&&(ae.level==="block"?re.startBlock?re.startBlock.push(ae.start):re.startBlock=[ae.start]:ae.level==="inline"&&(re.startInline?re.startInline.push(ae.start):re.startInline=[ae.start]))}"childTokens"in ae&&ae.childTokens&&(re.childTokens[ae.name]=ae.childTokens)}),ne.extensions=re),ie.renderer){const ae=this.defaults.renderer||new _Renderer(this.defaults);for(const oe in ie.renderer){if(!(oe in ae))throw new Error(`renderer '${oe}' does not exist`);if(["options","parser"].includes(oe))continue;const se=oe;let le=ie.renderer[se];ie.useNewRenderer||(le=$t(this,gt,wr).call(this,le,se,ae));const ce=ae[se];ae[se]=(...he)=>{let de=le.apply(ae,he);return de===!1&&(de=ce.apply(ae,he)),de||""}}ne.renderer=ae}if(ie.tokenizer){const ae=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const oe in ie.tokenizer){if(!(oe in ae))throw new Error(`tokenizer '${oe}' does not exist`);if(["options","rules","lexer"].includes(oe))continue;const se=oe,le=ie.tokenizer[se],ce=ae[se];ae[se]=(...he)=>{let de=le.apply(ae,he);return de===!1&&(de=ce.apply(ae,he)),de}}ne.tokenizer=ae}if(ie.hooks){const ae=this.defaults.hooks||new _Hooks;for(const oe in ie.hooks){if(!(oe in ae))throw new Error(`hook '${oe}' does not exist`);if(oe==="options")continue;const se=oe,le=ie.hooks[se],ce=ae[se];_Hooks.passThroughHooks.has(oe)?ae[se]=he=>{if(this.defaults.async)return Promise.resolve(le.call(ae,he)).then(ue=>ce.call(ae,ue));const de=le.call(ae,he);return ce.call(ae,de)}:ae[se]=(...he)=>{let de=le.apply(ae,he);return de===!1&&(de=ce.apply(ae,he)),de}}ne.hooks=ae}if(ie.walkTokens){const ae=this.defaults.walkTokens,oe=ie.walkTokens;ne.walkTokens=function(se){let le=[];return le.push(oe.call(this,se)),ae&&(le=le.concat(ae.call(this,se))),le}}this.defaults={...this.defaults,...ne}}),this}setOptions(te){return this.defaults={...this.defaults,...te},this}lexer(te,re){return _Lexer.lex(te,re??this.defaults)}parser(te,re){return _Parser.parse(te,re??this.defaults)}}gt=new WeakSet,wr=function(te,re,ie){switch(re){case"heading":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,ie.parser.parseInline(ne.tokens),ne.depth,unescape$1(ie.parser.parseInline(ne.tokens,ie.parser.textRenderer)))};case"code":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,ne.text,ne.lang,!!ne.escaped)};case"table":return function(ne){if(!ne.type||ne.type!==re)return te.apply(this,arguments);let ae="",oe="";for(let le=0;le<ne.header.length;le++)oe+=this.tablecell({text:ne.header[le].text,tokens:ne.header[le].tokens,header:!0,align:ne.align[le]});ae+=this.tablerow({text:oe});let se="";for(let le=0;le<ne.rows.length;le++){const ce=ne.rows[le];oe="";for(let he=0;he<ce.length;he++)oe+=this.tablecell({text:ce[he].text,tokens:ce[he].tokens,header:!1,align:ne.align[he]});se+=this.tablerow({text:oe})}return te.call(this,ae,se)};case"blockquote":return function(ne){if(!ne.type||ne.type!==re)return te.apply(this,arguments);const ae=this.parser.parse(ne.tokens);return te.call(this,ae)};case"list":return function(ne){if(!ne.type||ne.type!==re)return te.apply(this,arguments);const ae=ne.ordered,oe=ne.start,se=ne.loose;let le="";for(let ce=0;ce<ne.items.length;ce++){const he=ne.items[ce],de=he.checked,ue=he.task;let fe="";if(he.task){const pe=this.checkbox({checked:!!de});se?he.tokens.length>0&&he.tokens[0].type==="paragraph"?(he.tokens[0].text=pe+" "+he.tokens[0].text,he.tokens[0].tokens&&he.tokens[0].tokens.length>0&&he.tokens[0].tokens[0].type==="text"&&(he.tokens[0].tokens[0].text=pe+" "+he.tokens[0].tokens[0].text)):he.tokens.unshift({type:"text",text:pe+" "}):fe+=pe+" "}fe+=this.parser.parse(he.tokens,se),le+=this.listitem({type:"list_item",raw:fe,text:fe,task:ue,checked:!!de,loose:se,tokens:he.tokens})}return te.call(this,le,ae,oe)};case"html":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,ne.text,ne.block)};case"paragraph":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,this.parser.parseInline(ne.tokens))};case"escape":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,ne.text)};case"link":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,ne.href,ne.title,this.parser.parseInline(ne.tokens))};case"image":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,ne.href,ne.title,ne.text)};case"strong":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,this.parser.parseInline(ne.tokens))};case"em":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,this.parser.parseInline(ne.tokens))};case"codespan":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,ne.text)};case"del":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,this.parser.parseInline(ne.tokens))};case"text":return function(ne){return!ne.type||ne.type!==re?te.apply(this,arguments):te.call(this,ne.text)}}return te},Vt=function(te,re){return(ie,ne)=>{const ae={...ne},oe={...this.defaults,...ae};this.defaults.async===!0&&ae.async===!1&&(oe.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),oe.async=!0);const se=$t(this,gt,Cr).call(this,!!oe.silent,!!oe.async);if(typeof ie>"u"||ie===null)return se(new Error("marked(): input parameter is undefined or null"));if(typeof ie!="string")return se(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ie)+", string expected"));if(oe.hooks&&(oe.hooks.options=oe),oe.async)return Promise.resolve(oe.hooks?oe.hooks.preprocess(ie):ie).then(le=>te(le,oe)).then(le=>oe.hooks?oe.hooks.processAllTokens(le):le).then(le=>oe.walkTokens?Promise.all(this.walkTokens(le,oe.walkTokens)).then(()=>le):le).then(le=>re(le,oe)).then(le=>oe.hooks?oe.hooks.postprocess(le):le).catch(se);try{oe.hooks&&(ie=oe.hooks.preprocess(ie));let le=te(ie,oe);oe.hooks&&(le=oe.hooks.processAllTokens(le)),oe.walkTokens&&this.walkTokens(le,oe.walkTokens);let ce=re(le,oe);return oe.hooks&&(ce=oe.hooks.postprocess(ce)),ce}catch(le){return se(le)}}},Cr=function(te,re){return ie=>{if(ie.message+=`
Please report this to https://github.com/markedjs/marked.`,te){const ne="<p>An error occurred:</p><pre>"+escape$1(ie.message+"",!0)+"</pre>";return re?Promise.resolve(ne):ne}if(re)return Promise.reject(ie);throw ie}};const markedInstance=new Marked;function marked(ee,te){return markedInstance.parse(ee,te)}marked.options=marked.setOptions=function(ee){return markedInstance.setOptions(ee),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.getDefaults=_getDefaults;marked.defaults=_defaults;marked.use=function(...ee){return markedInstance.use(...ee),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.walkTokens=function(ee,te){return markedInstance.walkTokens(ee,te)};marked.parseInline=markedInstance.parseInline;marked.Parser=_Parser;marked.parser=_Parser.parse;marked.Renderer=_Renderer;marked.TextRenderer=_TextRenderer;marked.Lexer=_Lexer;marked.lexer=_Lexer.lex;marked.Tokenizer=_Tokenizer;marked.Hooks=_Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;_Parser.parse;_Lexer.lex;function dedent(ee){for(var te=[],re=1;re<arguments.length;re++)te[re-1]=arguments[re];var ie=Array.from(typeof ee=="string"?[ee]:ee);ie[ie.length-1]=ie[ie.length-1].replace(/\r?\n([\t ]*)$/,"");var ne=ie.reduce(function(se,le){var ce=le.match(/\n([\t ]+|(?!\s).)/g);return ce?se.concat(ce.map(function(he){var de,ue;return(ue=(de=he.match(/[\t ]/g))===null||de===void 0?void 0:de.length)!==null&&ue!==void 0?ue:0})):se},[]);if(ne.length){var ae=new RegExp(`
[ ]{`+Math.min.apply(Math,ne)+"}","g");ie=ie.map(function(se){return se.replace(ae,`
`)})}ie[0]=ie[0].replace(/^\r?\n/,"");var oe=ie[0];return te.forEach(function(se,le){var ce=oe.match(/(?:^|\n)( *)$/),he=ce?ce[1]:"",de=se;typeof se=="string"&&se.includes(`
`)&&(de=String(se).split(`
`).map(function(ue,fe){return fe===0?ue:""+he+ue}).join(`
`)),oe+=de+ie[le+1]}),oe}function preprocessMarkdown(ee,{markdownAutoWrap:te}){const ie=ee.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`),ne=dedent(ie);return te===!1?ne.replace(/ /g,"&nbsp;"):ne}__name(preprocessMarkdown,"preprocessMarkdown");function markdownToLines(ee,te={}){const re=preprocessMarkdown(ee,te),ie=marked.lexer(re),ne=[[]];let ae=0;function oe(se,le="normal"){se.type==="text"?se.text.split(`
`).forEach((he,de)=>{de!==0&&(ae++,ne.push([])),he.split(" ").forEach(ue=>{ue&&ne[ae].push({content:ue,type:le})})}):se.type==="strong"||se.type==="em"?se.tokens.forEach(ce=>{oe(ce,se.type)}):se.type==="html"&&ne[ae].push({content:se.text,type:"normal"})}return __name(oe,"processNode"),ie.forEach(se=>{var le;se.type==="paragraph"?(le=se.tokens)==null||le.forEach(ce=>{oe(ce)}):se.type==="html"&&ne[ae].push({content:se.text,type:"normal"})}),ne}__name(markdownToLines,"markdownToLines");function markdownToHTML(ee,{markdownAutoWrap:te}={}){const re=marked.lexer(ee);function ie(ne){var ae,oe,se;return ne.type==="text"?te===!1?ne.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):ne.text.replace(/\n */g,"<br/>"):ne.type==="strong"?`<strong>${(ae=ne.tokens)==null?void 0:ae.map(ie).join("")}</strong>`:ne.type==="em"?`<em>${(oe=ne.tokens)==null?void 0:oe.map(ie).join("")}</em>`:ne.type==="paragraph"?`<p>${(se=ne.tokens)==null?void 0:se.map(ie).join("")}</p>`:ne.type==="space"?"":ne.type==="html"?`${ne.text}`:`Unsupported markdown: ${ne.type}`}return __name(ie,"output"),re.map(ie).join("")}__name(markdownToHTML,"markdownToHTML");function splitTextToChars(ee){return Intl.Segmenter?[...new Intl.Segmenter().segment(ee)].map(te=>te.segment):[...ee]}__name(splitTextToChars,"splitTextToChars");function splitWordToFitWidth(ee,te){const re=splitTextToChars(te.content);return splitWordToFitWidthRecursion(ee,[],re,te.type)}__name(splitWordToFitWidth,"splitWordToFitWidth");function splitWordToFitWidthRecursion(ee,te,re,ie){if(re.length===0)return[{content:te.join(""),type:ie},{content:"",type:ie}];const[ne,...ae]=re,oe=[...te,ne];return ee([{content:oe.join(""),type:ie}])?splitWordToFitWidthRecursion(ee,oe,ae,ie):(te.length===0&&ne&&(te.push(ne),re.shift()),[{content:te.join(""),type:ie},{content:re.join(""),type:ie}])}__name(splitWordToFitWidthRecursion,"splitWordToFitWidthRecursion");function splitLineToFitWidth(ee,te){if(ee.some(({content:re})=>re.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return splitLineToFitWidthRecursion(ee,te)}__name(splitLineToFitWidth,"splitLineToFitWidth");function splitLineToFitWidthRecursion(ee,te,re=[],ie=[]){if(ee.length===0)return ie.length>0&&re.push(ie),re.length>0?re:[];let ne="";ee[0].content===" "&&(ne=" ",ee.shift());const ae=ee.shift()??{content:" ",type:"normal"},oe=[...ie];if(ne!==""&&oe.push({content:ne,type:"normal"}),oe.push(ae),te(oe))return splitLineToFitWidthRecursion(ee,te,re,oe);if(ie.length>0)re.push(ie),ee.unshift(ae);else if(ae.content){const[se,le]=splitWordToFitWidth(te,ae);re.push([se]),le.content&&ee.unshift(le)}return splitLineToFitWidthRecursion(ee,te,re)}__name(splitLineToFitWidthRecursion,"splitLineToFitWidthRecursion");function applyStyle$1(ee,te){te&&ee.attr("style",te)}__name(applyStyle$1,"applyStyle");async function addHtmlSpan(ee,te,re,ie,ne=!1){const ae=ee.append("foreignObject"),oe=ae.append("xhtml:div");let se=te.label;te.label&&hasKatex(te.label)&&(se=await renderKatex(te.label.replace(common_default.lineBreakRegex,`
`),getConfig2()));const le=te.isNode?"nodeLabel":"edgeLabel",ce=oe.append("span");ce.html(se),applyStyle$1(ce,te.labelStyle),ce.attr("class",`${le} ${ie}`),applyStyle$1(oe,te.labelStyle),oe.style("display","table-cell"),oe.style("white-space","nowrap"),oe.style("line-height","1.5"),oe.style("max-width",re+"px"),oe.style("text-align","center"),oe.attr("xmlns","http://www.w3.org/1999/xhtml"),ne&&oe.attr("class","labelBkg");let he=oe.node().getBoundingClientRect();return he.width===re&&(oe.style("display","table"),oe.style("white-space","break-spaces"),oe.style("width",re+"px"),he=oe.node().getBoundingClientRect()),ae.node()}__name(addHtmlSpan,"addHtmlSpan");function createTspan(ee,te,re){return ee.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",te*re-.1+"em").attr("dy",re+"em")}__name(createTspan,"createTspan");function computeWidthOfText(ee,te,re){const ie=ee.append("text"),ne=createTspan(ie,1,te);updateTextContentAndStyles(ne,re);const ae=ne.node().getComputedTextLength();return ie.remove(),ae}__name(computeWidthOfText,"computeWidthOfText");function computeDimensionOfText(ee,te,re){var oe;const ie=ee.append("text"),ne=createTspan(ie,1,te);updateTextContentAndStyles(ne,[{content:re,type:"normal"}]);const ae=(oe=ne.node())==null?void 0:oe.getBoundingClientRect();return ae&&ie.remove(),ae}__name(computeDimensionOfText,"computeDimensionOfText");function createFormattedText(ee,te,re,ie=!1){const ae=te.append("g"),oe=ae.insert("rect").attr("class","background").attr("style","stroke: none"),se=ae.append("text").attr("y","-10.1");let le=0;for(const ce of re){const he=__name(ue=>computeWidthOfText(ae,1.1,ue)<=ee,"checkWidth"),de=he(ce)?[ce]:splitLineToFitWidth(ce,he);for(const ue of de){const fe=createTspan(se,le,1.1);updateTextContentAndStyles(fe,ue),le++}}if(ie){const ce=se.node().getBBox(),he=2;return oe.attr("x",-he).attr("y",-he).attr("width",ce.width+2*he).attr("height",ce.height+2*he),ae.node()}else return se.node()}__name(createFormattedText,"createFormattedText");function updateTextContentAndStyles(ee,te){ee.text(""),te.forEach((re,ie)=>{const ne=ee.append("tspan").attr("font-style",re.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",re.type==="strong"?"bold":"normal");ie===0?ne.text(re.content):ne.text(" "+re.content)})}__name(updateTextContentAndStyles,"updateTextContentAndStyles");function replaceIconSubstring(ee){return ee.replace(/fa[bklrs]?:fa-[\w-]+/g,te=>`<i class='${te.replace(":"," ")}'></i>`)}__name(replaceIconSubstring,"replaceIconSubstring");var createText=__name(async(ee,te="",{style:re="",isTitle:ie=!1,classes:ne="",useHtmlLabels:ae=!0,isNode:oe=!0,width:se=200,addSvgBackground:le=!1}={},ce)=>{if(log.info("XYZ createText",te,re,ie,ne,ae,oe,"addSvgBackground: ",le),ae){const he=markdownToHTML(te,ce),de=replaceIconSubstring(decodeEntities(he)),ue=te.replace(/\\\\/g,"\\"),fe={isNode:oe,label:hasKatex(te)?ue:de,labelStyle:re.replace("fill:","color:")};return await addHtmlSpan(ee,fe,se,ne,le)}else{const he=te.replace(/<br\s*\/?>/g,"<br/>"),de=markdownToLines(he.replace("<br>","<br/>"),ce),ue=createFormattedText(se,ee,de,te?le:!1);if(oe){/stroke:/.exec(re)&&(re=re.replace("stroke:","lineColor:"));const fe=re.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");d3select(ue).attr("style",fe)}else{const fe=re.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");d3select(ue).select("rect").attr("style",fe.replace(/background:/g,"fill:"));const pe=re.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");d3select(ue).select("text").attr("style",pe)}return ue}},"createText");function t(ee,te,re){if(ee&&ee.length){const[ie,ne]=te,ae=Math.PI/180*re,oe=Math.cos(ae),se=Math.sin(ae);for(const le of ee){const[ce,he]=le;le[0]=(ce-ie)*oe-(he-ne)*se+ie,le[1]=(ce-ie)*se+(he-ne)*oe+ne}}}function e(ee,te){return ee[0]===te[0]&&ee[1]===te[1]}function s(ee,te,re,ie=1){const ne=re,ae=Math.max(te,.1),oe=ee[0]&&ee[0][0]&&typeof ee[0][0]=="number"?[ee]:ee,se=[0,0];if(ne)for(const ce of oe)t(ce,se,ne);const le=function(ce,he,de){const ue=[];for(const me of ce){const we=[...me];e(we[0],we[we.length-1])||we.push([we[0][0],we[0][1]]),we.length>2&&ue.push(we)}const fe=[];he=Math.max(he,.1);const pe=[];for(const me of ue)for(let we=0;we<me.length-1;we++){const xe=me[we],Te=me[we+1];if(xe[1]!==Te[1]){const ke=Math.min(xe[1],Te[1]);pe.push({ymin:ke,ymax:Math.max(xe[1],Te[1]),x:ke===xe[1]?xe[0]:Te[0],islope:(Te[0]-xe[0])/(Te[1]-xe[1])})}}if(pe.sort((me,we)=>me.ymin<we.ymin?-1:me.ymin>we.ymin?1:me.x<we.x?-1:me.x>we.x?1:me.ymax===we.ymax?0:(me.ymax-we.ymax)/Math.abs(me.ymax-we.ymax)),!pe.length)return fe;let ge=[],ye=pe[0].ymin,_e=0;for(;ge.length||pe.length;){if(pe.length){let me=-1;for(let we=0;we<pe.length&&!(pe[we].ymin>ye);we++)me=we;pe.splice(0,me+1).forEach(we=>{ge.push({s:ye,edge:we})})}if(ge=ge.filter(me=>!(me.edge.ymax<=ye)),ge.sort((me,we)=>me.edge.x===we.edge.x?0:(me.edge.x-we.edge.x)/Math.abs(me.edge.x-we.edge.x)),(de!==1||_e%he==0)&&ge.length>1)for(let me=0;me<ge.length;me+=2){const we=me+1;if(we>=ge.length)break;const xe=ge[me].edge,Te=ge[we].edge;fe.push([[Math.round(xe.x),ye],[Math.round(Te.x),ye]])}ye+=de,ge.forEach(me=>{me.edge.x=me.edge.x+de*me.edge.islope}),_e++}return fe}(oe,ae,ie);if(ne){for(const ce of oe)t(ce,se,-ne);(function(ce,he,de){const ue=[];ce.forEach(fe=>ue.push(...fe)),t(ue,he,de)})(le,se,-ne)}return le}function n(ee,te){var re;const ie=te.hachureAngle+90;let ne=te.hachureGap;ne<0&&(ne=4*te.strokeWidth),ne=Math.round(Math.max(ne,.1));let ae=1;return te.roughness>=1&&(((re=te.randomizer)===null||re===void 0?void 0:re.next())||Math.random())>.7&&(ae=ne),s(ee,ne,ie,ae||1)}class o{constructor(te){this.helper=te}fillPolygons(te,re){return this._fillPolygons(te,re)}_fillPolygons(te,re){const ie=n(te,re);return{type:"fillSketch",ops:this.renderLines(ie,re)}}renderLines(te,re){const ie=[];for(const ne of te)ie.push(...this.helper.doubleLineOps(ne[0][0],ne[0][1],ne[1][0],ne[1][1],re));return ie}}function a(ee){const te=ee[0],re=ee[1];return Math.sqrt(Math.pow(te[0]-re[0],2)+Math.pow(te[1]-re[1],2))}class h extends o{fillPolygons(te,re){let ie=re.hachureGap;ie<0&&(ie=4*re.strokeWidth),ie=Math.max(ie,.1);const ne=n(te,Object.assign({},re,{hachureGap:ie})),ae=Math.PI/180*re.hachureAngle,oe=[],se=.5*ie*Math.cos(ae),le=.5*ie*Math.sin(ae);for(const[ce,he]of ne)a([ce,he])&&oe.push([[ce[0]-se,ce[1]+le],[...he]],[[ce[0]+se,ce[1]-le],[...he]]);return{type:"fillSketch",ops:this.renderLines(oe,re)}}}class r extends o{fillPolygons(te,re){const ie=this._fillPolygons(te,re),ne=Object.assign({},re,{hachureAngle:re.hachureAngle+90}),ae=this._fillPolygons(te,ne);return ie.ops=ie.ops.concat(ae.ops),ie}}let i$1=class{constructor(te){this.helper=te}fillPolygons(te,re){const ie=n(te,re=Object.assign({},re,{hachureAngle:0}));return this.dotsOnLines(ie,re)}dotsOnLines(te,re){const ie=[];let ne=re.hachureGap;ne<0&&(ne=4*re.strokeWidth),ne=Math.max(ne,.1);let ae=re.fillWeight;ae<0&&(ae=re.strokeWidth/2);const oe=ne/4;for(const se of te){const le=a(se),ce=le/ne,he=Math.ceil(ce)-1,de=le-he*ne,ue=(se[0][0]+se[1][0])/2-ne/4,fe=Math.min(se[0][1],se[1][1]);for(let pe=0;pe<he;pe++){const ge=fe+de+pe*ne,ye=ue-oe+2*Math.random()*oe,_e=ge-oe+2*Math.random()*oe,me=this.helper.ellipse(ye,_e,ae,ae,re);ie.push(...me.ops)}}return{type:"fillSketch",ops:ie}}};class c{constructor(te){this.helper=te}fillPolygons(te,re){const ie=n(te,re);return{type:"fillSketch",ops:this.dashedLine(ie,re)}}dashedLine(te,re){const ie=re.dashOffset<0?re.hachureGap<0?4*re.strokeWidth:re.hachureGap:re.dashOffset,ne=re.dashGap<0?re.hachureGap<0?4*re.strokeWidth:re.hachureGap:re.dashGap,ae=[];return te.forEach(oe=>{const se=a(oe),le=Math.floor(se/(ie+ne)),ce=(se+ne-le*(ie+ne))/2;let he=oe[0],de=oe[1];he[0]>de[0]&&(he=oe[1],de=oe[0]);const ue=Math.atan((de[1]-he[1])/(de[0]-he[0]));for(let fe=0;fe<le;fe++){const pe=fe*(ie+ne),ge=pe+ie,ye=[he[0]+pe*Math.cos(ue)+ce*Math.cos(ue),he[1]+pe*Math.sin(ue)+ce*Math.sin(ue)],_e=[he[0]+ge*Math.cos(ue)+ce*Math.cos(ue),he[1]+ge*Math.sin(ue)+ce*Math.sin(ue)];ae.push(...this.helper.doubleLineOps(ye[0],ye[1],_e[0],_e[1],re))}}),ae}}class l{constructor(te){this.helper=te}fillPolygons(te,re){const ie=re.hachureGap<0?4*re.strokeWidth:re.hachureGap,ne=re.zigzagOffset<0?ie:re.zigzagOffset,ae=n(te,re=Object.assign({},re,{hachureGap:ie+ne}));return{type:"fillSketch",ops:this.zigzagLines(ae,ne,re)}}zigzagLines(te,re,ie){const ne=[];return te.forEach(ae=>{const oe=a(ae),se=Math.round(oe/(2*re));let le=ae[0],ce=ae[1];le[0]>ce[0]&&(le=ae[1],ce=ae[0]);const he=Math.atan((ce[1]-le[1])/(ce[0]-le[0]));for(let de=0;de<se;de++){const ue=2*de*re,fe=2*(de+1)*re,pe=Math.sqrt(2*Math.pow(re,2)),ge=[le[0]+ue*Math.cos(he),le[1]+ue*Math.sin(he)],ye=[le[0]+fe*Math.cos(he),le[1]+fe*Math.sin(he)],_e=[ge[0]+pe*Math.cos(he+Math.PI/4),ge[1]+pe*Math.sin(he+Math.PI/4)];ne.push(...this.helper.doubleLineOps(ge[0],ge[1],_e[0],_e[1],ie),...this.helper.doubleLineOps(_e[0],_e[1],ye[0],ye[1],ie))}}),ne}}const u={};class p{constructor(te){this.seed=te}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const f=0,d=1,g=2,M={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function k(ee,te){return ee.type===te}function b(ee){const te=[],re=function(oe){const se=new Array;for(;oe!=="";)if(oe.match(/^([ \t\r\n,]+)/))oe=oe.substr(RegExp.$1.length);else if(oe.match(/^([aAcChHlLmMqQsStTvVzZ])/))se[se.length]={type:f,text:RegExp.$1},oe=oe.substr(RegExp.$1.length);else{if(!oe.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];se[se.length]={type:d,text:`${parseFloat(RegExp.$1)}`},oe=oe.substr(RegExp.$1.length)}return se[se.length]={type:g,text:""},se}(ee);let ie="BOD",ne=0,ae=re[ne];for(;!k(ae,g);){let oe=0;const se=[];if(ie==="BOD"){if(ae.text!=="M"&&ae.text!=="m")return b("M0,0"+ee);ne++,oe=M[ae.text],ie=ae.text}else k(ae,d)?oe=M[ie]:(ne++,oe=M[ae.text],ie=ae.text);if(!(ne+oe<re.length))throw new Error("Path data ended short");for(let le=ne;le<ne+oe;le++){const ce=re[le];if(!k(ce,d))throw new Error("Param not a number: "+ie+","+ce.text);se[se.length]=+ce.text}if(typeof M[ie]!="number")throw new Error("Bad segment: "+ie);{const le={key:ie,data:se};te.push(le),ne+=oe,ae=re[ne],ie==="M"&&(ie="L"),ie==="m"&&(ie="l")}}return te}function y(ee){let te=0,re=0,ie=0,ne=0;const ae=[];for(const{key:oe,data:se}of ee)switch(oe){case"M":ae.push({key:"M",data:[...se]}),[te,re]=se,[ie,ne]=se;break;case"m":te+=se[0],re+=se[1],ae.push({key:"M",data:[te,re]}),ie=te,ne=re;break;case"L":ae.push({key:"L",data:[...se]}),[te,re]=se;break;case"l":te+=se[0],re+=se[1],ae.push({key:"L",data:[te,re]});break;case"C":ae.push({key:"C",data:[...se]}),te=se[4],re=se[5];break;case"c":{const le=se.map((ce,he)=>he%2?ce+re:ce+te);ae.push({key:"C",data:le}),te=le[4],re=le[5];break}case"Q":ae.push({key:"Q",data:[...se]}),te=se[2],re=se[3];break;case"q":{const le=se.map((ce,he)=>he%2?ce+re:ce+te);ae.push({key:"Q",data:le}),te=le[2],re=le[3];break}case"A":ae.push({key:"A",data:[...se]}),te=se[5],re=se[6];break;case"a":te+=se[5],re+=se[6],ae.push({key:"A",data:[se[0],se[1],se[2],se[3],se[4],te,re]});break;case"H":ae.push({key:"H",data:[...se]}),te=se[0];break;case"h":te+=se[0],ae.push({key:"H",data:[te]});break;case"V":ae.push({key:"V",data:[...se]}),re=se[0];break;case"v":re+=se[0],ae.push({key:"V",data:[re]});break;case"S":ae.push({key:"S",data:[...se]}),te=se[2],re=se[3];break;case"s":{const le=se.map((ce,he)=>he%2?ce+re:ce+te);ae.push({key:"S",data:le}),te=le[2],re=le[3];break}case"T":ae.push({key:"T",data:[...se]}),te=se[0],re=se[1];break;case"t":te+=se[0],re+=se[1],ae.push({key:"T",data:[te,re]});break;case"Z":case"z":ae.push({key:"Z",data:[]}),te=ie,re=ne}return ae}function m(ee){const te=[];let re="",ie=0,ne=0,ae=0,oe=0,se=0,le=0;for(const{key:ce,data:he}of ee){switch(ce){case"M":te.push({key:"M",data:[...he]}),[ie,ne]=he,[ae,oe]=he;break;case"C":te.push({key:"C",data:[...he]}),ie=he[4],ne=he[5],se=he[2],le=he[3];break;case"L":te.push({key:"L",data:[...he]}),[ie,ne]=he;break;case"H":ie=he[0],te.push({key:"L",data:[ie,ne]});break;case"V":ne=he[0],te.push({key:"L",data:[ie,ne]});break;case"S":{let de=0,ue=0;re==="C"||re==="S"?(de=ie+(ie-se),ue=ne+(ne-le)):(de=ie,ue=ne),te.push({key:"C",data:[de,ue,...he]}),se=he[0],le=he[1],ie=he[2],ne=he[3];break}case"T":{const[de,ue]=he;let fe=0,pe=0;re==="Q"||re==="T"?(fe=ie+(ie-se),pe=ne+(ne-le)):(fe=ie,pe=ne);const ge=ie+2*(fe-ie)/3,ye=ne+2*(pe-ne)/3,_e=de+2*(fe-de)/3,me=ue+2*(pe-ue)/3;te.push({key:"C",data:[ge,ye,_e,me,de,ue]}),se=fe,le=pe,ie=de,ne=ue;break}case"Q":{const[de,ue,fe,pe]=he,ge=ie+2*(de-ie)/3,ye=ne+2*(ue-ne)/3,_e=fe+2*(de-fe)/3,me=pe+2*(ue-pe)/3;te.push({key:"C",data:[ge,ye,_e,me,fe,pe]}),se=de,le=ue,ie=fe,ne=pe;break}case"A":{const de=Math.abs(he[0]),ue=Math.abs(he[1]),fe=he[2],pe=he[3],ge=he[4],ye=he[5],_e=he[6];de===0||ue===0?(te.push({key:"C",data:[ie,ne,ye,_e,ye,_e]}),ie=ye,ne=_e):(ie!==ye||ne!==_e)&&(x(ie,ne,ye,_e,de,ue,fe,pe,ge).forEach(function(me){te.push({key:"C",data:me})}),ie=ye,ne=_e);break}case"Z":te.push({key:"Z",data:[]}),ie=ae,ne=oe}re=ce}return te}function w(ee,te,re){return[ee*Math.cos(re)-te*Math.sin(re),ee*Math.sin(re)+te*Math.cos(re)]}function x(ee,te,re,ie,ne,ae,oe,se,le,ce){const he=(de=oe,Math.PI*de/180);var de;let ue=[],fe=0,pe=0,ge=0,ye=0;if(ce)[fe,pe,ge,ye]=ce;else{[ee,te]=w(ee,te,-he),[re,ie]=w(re,ie,-he);const ze=(ee-re)/2,Be=(te-ie)/2;let Le=ze*ze/(ne*ne)+Be*Be/(ae*ae);Le>1&&(Le=Math.sqrt(Le),ne*=Le,ae*=Le);const Ie=ne*ne,Me=ae*ae,Re=Ie*Me-Ie*Be*Be-Me*ze*ze,Fe=Ie*Be*Be+Me*ze*ze,Pe=(se===le?-1:1)*Math.sqrt(Math.abs(Re/Fe));ge=Pe*ne*Be/ae+(ee+re)/2,ye=Pe*-ae*ze/ne+(te+ie)/2,fe=Math.asin(parseFloat(((te-ye)/ae).toFixed(9))),pe=Math.asin(parseFloat(((ie-ye)/ae).toFixed(9))),ee<ge&&(fe=Math.PI-fe),re<ge&&(pe=Math.PI-pe),fe<0&&(fe=2*Math.PI+fe),pe<0&&(pe=2*Math.PI+pe),le&&fe>pe&&(fe-=2*Math.PI),!le&&pe>fe&&(pe-=2*Math.PI)}let _e=pe-fe;if(Math.abs(_e)>120*Math.PI/180){const ze=pe,Be=re,Le=ie;pe=le&&pe>fe?fe+120*Math.PI/180*1:fe+120*Math.PI/180*-1,ue=x(re=ge+ne*Math.cos(pe),ie=ye+ae*Math.sin(pe),Be,Le,ne,ae,oe,0,le,[pe,ze,ge,ye])}_e=pe-fe;const me=Math.cos(fe),we=Math.sin(fe),xe=Math.cos(pe),Te=Math.sin(pe),ke=Math.tan(_e/4),Ce=4/3*ne*ke,Ae=4/3*ae*ke,ve=[ee,te],Ee=[ee+Ce*we,te-Ae*me],Se=[re+Ce*Te,ie-Ae*xe],Ne=[re,ie];if(Ee[0]=2*ve[0]-Ee[0],Ee[1]=2*ve[1]-Ee[1],ce)return[Ee,Se,Ne].concat(ue);{ue=[Ee,Se,Ne].concat(ue);const ze=[];for(let Be=0;Be<ue.length;Be+=3){const Le=w(ue[Be][0],ue[Be][1],he),Ie=w(ue[Be+1][0],ue[Be+1][1],he),Me=w(ue[Be+2][0],ue[Be+2][1],he);ze.push([Le[0],Le[1],Ie[0],Ie[1],Me[0],Me[1]])}return ze}}const P={randOffset:function(ee,te){return G(ee,te)},randOffsetWithRange:function(ee,te,re){return E(ee,te,re)},ellipse:function(ee,te,re,ie,ne){const ae=T(re,ie,ne);return D(ee,te,ne,ae).opset},doubleLineOps:function(ee,te,re,ie,ne){return $(ee,te,re,ie,ne,!0)}};function v(ee,te,re,ie,ne){return{type:"path",ops:$(ee,te,re,ie,ne)}}function S(ee,te,re){const ie=(ee||[]).length;if(ie>2){const ne=[];for(let ae=0;ae<ie-1;ae++)ne.push(...$(ee[ae][0],ee[ae][1],ee[ae+1][0],ee[ae+1][1],re));return te&&ne.push(...$(ee[ie-1][0],ee[ie-1][1],ee[0][0],ee[0][1],re)),{type:"path",ops:ne}}return ie===2?v(ee[0][0],ee[0][1],ee[1][0],ee[1][1],re):{type:"path",ops:[]}}function O(ee,te,re,ie,ne){return function(ae,oe){return S(ae,!0,oe)}([[ee,te],[ee+re,te],[ee+re,te+ie],[ee,te+ie]],ne)}function L(ee,te){if(ee.length){const re=typeof ee[0][0]=="number"?[ee]:ee,ie=j(re[0],1*(1+.2*te.roughness),te),ne=te.disableMultiStroke?[]:j(re[0],1.5*(1+.22*te.roughness),z(te));for(let ae=1;ae<re.length;ae++){const oe=re[ae];if(oe.length){const se=j(oe,1*(1+.2*te.roughness),te),le=te.disableMultiStroke?[]:j(oe,1.5*(1+.22*te.roughness),z(te));for(const ce of se)ce.op!=="move"&&ie.push(ce);for(const ce of le)ce.op!=="move"&&ne.push(ce)}}return{type:"path",ops:ie.concat(ne)}}return{type:"path",ops:[]}}function T(ee,te,re){const ie=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(ee/2,2)+Math.pow(te/2,2))/2)),ne=Math.ceil(Math.max(re.curveStepCount,re.curveStepCount/Math.sqrt(200)*ie)),ae=2*Math.PI/ne;let oe=Math.abs(ee/2),se=Math.abs(te/2);const le=1-re.curveFitting;return oe+=G(oe*le,re),se+=G(se*le,re),{increment:ae,rx:oe,ry:se}}function D(ee,te,re,ie){const[ne,ae]=F(ie.increment,ee,te,ie.rx,ie.ry,1,ie.increment*E(.1,E(.4,1,re),re),re);let oe=q(ne,null,re);if(!re.disableMultiStroke&&re.roughness!==0){const[se]=F(ie.increment,ee,te,ie.rx,ie.ry,1.5,0,re),le=q(se,null,re);oe=oe.concat(le)}return{estimatedPoints:ae,opset:{type:"path",ops:oe}}}function A(ee,te,re,ie,ne,ae,oe,se,le){const ce=ee,he=te;let de=Math.abs(re/2),ue=Math.abs(ie/2);de+=G(.01*de,le),ue+=G(.01*ue,le);let fe=ne,pe=ae;for(;fe<0;)fe+=2*Math.PI,pe+=2*Math.PI;pe-fe>2*Math.PI&&(fe=0,pe=2*Math.PI);const ge=2*Math.PI/le.curveStepCount,ye=Math.min(ge/2,(pe-fe)/2),_e=V(ye,ce,he,de,ue,fe,pe,1,le);if(!le.disableMultiStroke){const me=V(ye,ce,he,de,ue,fe,pe,1.5,le);_e.push(...me)}return oe&&(se?_e.push(...$(ce,he,ce+de*Math.cos(fe),he+ue*Math.sin(fe),le),...$(ce,he,ce+de*Math.cos(pe),he+ue*Math.sin(pe),le)):_e.push({op:"lineTo",data:[ce,he]},{op:"lineTo",data:[ce+de*Math.cos(fe),he+ue*Math.sin(fe)]})),{type:"path",ops:_e}}function _(ee,te){const re=m(y(b(ee))),ie=[];let ne=[0,0],ae=[0,0];for(const{key:oe,data:se}of re)switch(oe){case"M":ae=[se[0],se[1]],ne=[se[0],se[1]];break;case"L":ie.push(...$(ae[0],ae[1],se[0],se[1],te)),ae=[se[0],se[1]];break;case"C":{const[le,ce,he,de,ue,fe]=se;ie.push(...Z(le,ce,he,de,ue,fe,ae,te)),ae=[ue,fe];break}case"Z":ie.push(...$(ae[0],ae[1],ne[0],ne[1],te)),ae=[ne[0],ne[1]]}return{type:"path",ops:ie}}function I(ee,te){const re=[];for(const ie of ee)if(ie.length){const ne=te.maxRandomnessOffset||0,ae=ie.length;if(ae>2){re.push({op:"move",data:[ie[0][0]+G(ne,te),ie[0][1]+G(ne,te)]});for(let oe=1;oe<ae;oe++)re.push({op:"lineTo",data:[ie[oe][0]+G(ne,te),ie[oe][1]+G(ne,te)]})}}return{type:"fillPath",ops:re}}function C(ee,te){return function(re,ie){let ne=re.fillStyle||"hachure";if(!u[ne])switch(ne){case"zigzag":u[ne]||(u[ne]=new h(ie));break;case"cross-hatch":u[ne]||(u[ne]=new r(ie));break;case"dots":u[ne]||(u[ne]=new i$1(ie));break;case"dashed":u[ne]||(u[ne]=new c(ie));break;case"zigzag-line":u[ne]||(u[ne]=new l(ie));break;default:ne="hachure",u[ne]||(u[ne]=new o(ie))}return u[ne]}(te,P).fillPolygons(ee,te)}function z(ee){const te=Object.assign({},ee);return te.randomizer=void 0,ee.seed&&(te.seed=ee.seed+1),te}function W(ee){return ee.randomizer||(ee.randomizer=new p(ee.seed||0)),ee.randomizer.next()}function E(ee,te,re,ie=1){return re.roughness*ie*(W(re)*(te-ee)+ee)}function G(ee,te,re=1){return E(-ee,ee,te,re)}function $(ee,te,re,ie,ne,ae=!1){const oe=ae?ne.disableMultiStrokeFill:ne.disableMultiStroke,se=R(ee,te,re,ie,ne,!0,!1);if(oe)return se;const le=R(ee,te,re,ie,ne,!0,!0);return se.concat(le)}function R(ee,te,re,ie,ne,ae,oe){const se=Math.pow(ee-re,2)+Math.pow(te-ie,2),le=Math.sqrt(se);let ce=1;ce=le<200?1:le>500?.4:-.0016668*le+1.233334;let he=ne.maxRandomnessOffset||0;he*he*100>se&&(he=le/10);const de=he/2,ue=.2+.2*W(ne);let fe=ne.bowing*ne.maxRandomnessOffset*(ie-te)/200,pe=ne.bowing*ne.maxRandomnessOffset*(ee-re)/200;fe=G(fe,ne,ce),pe=G(pe,ne,ce);const ge=[],ye=()=>G(de,ne,ce),_e=()=>G(he,ne,ce),me=ne.preserveVertices;return oe?ge.push({op:"move",data:[ee+(me?0:ye()),te+(me?0:ye())]}):ge.push({op:"move",data:[ee+(me?0:G(he,ne,ce)),te+(me?0:G(he,ne,ce))]}),oe?ge.push({op:"bcurveTo",data:[fe+ee+(re-ee)*ue+ye(),pe+te+(ie-te)*ue+ye(),fe+ee+2*(re-ee)*ue+ye(),pe+te+2*(ie-te)*ue+ye(),re+(me?0:ye()),ie+(me?0:ye())]}):ge.push({op:"bcurveTo",data:[fe+ee+(re-ee)*ue+_e(),pe+te+(ie-te)*ue+_e(),fe+ee+2*(re-ee)*ue+_e(),pe+te+2*(ie-te)*ue+_e(),re+(me?0:_e()),ie+(me?0:_e())]}),ge}function j(ee,te,re){if(!ee.length)return[];const ie=[];ie.push([ee[0][0]+G(te,re),ee[0][1]+G(te,re)]),ie.push([ee[0][0]+G(te,re),ee[0][1]+G(te,re)]);for(let ne=1;ne<ee.length;ne++)ie.push([ee[ne][0]+G(te,re),ee[ne][1]+G(te,re)]),ne===ee.length-1&&ie.push([ee[ne][0]+G(te,re),ee[ne][1]+G(te,re)]);return q(ie,null,re)}function q(ee,te,re){const ie=ee.length,ne=[];if(ie>3){const ae=[],oe=1-re.curveTightness;ne.push({op:"move",data:[ee[1][0],ee[1][1]]});for(let se=1;se+2<ie;se++){const le=ee[se];ae[0]=[le[0],le[1]],ae[1]=[le[0]+(oe*ee[se+1][0]-oe*ee[se-1][0])/6,le[1]+(oe*ee[se+1][1]-oe*ee[se-1][1])/6],ae[2]=[ee[se+1][0]+(oe*ee[se][0]-oe*ee[se+2][0])/6,ee[se+1][1]+(oe*ee[se][1]-oe*ee[se+2][1])/6],ae[3]=[ee[se+1][0],ee[se+1][1]],ne.push({op:"bcurveTo",data:[ae[1][0],ae[1][1],ae[2][0],ae[2][1],ae[3][0],ae[3][1]]})}}else ie===3?(ne.push({op:"move",data:[ee[1][0],ee[1][1]]}),ne.push({op:"bcurveTo",data:[ee[1][0],ee[1][1],ee[2][0],ee[2][1],ee[2][0],ee[2][1]]})):ie===2&&ne.push(...R(ee[0][0],ee[0][1],ee[1][0],ee[1][1],re,!0,!0));return ne}function F(ee,te,re,ie,ne,ae,oe,se){const le=[],ce=[];if(se.roughness===0){ee/=4,ce.push([te+ie*Math.cos(-ee),re+ne*Math.sin(-ee)]);for(let he=0;he<=2*Math.PI;he+=ee){const de=[te+ie*Math.cos(he),re+ne*Math.sin(he)];le.push(de),ce.push(de)}ce.push([te+ie*Math.cos(0),re+ne*Math.sin(0)]),ce.push([te+ie*Math.cos(ee),re+ne*Math.sin(ee)])}else{const he=G(.5,se)-Math.PI/2;ce.push([G(ae,se)+te+.9*ie*Math.cos(he-ee),G(ae,se)+re+.9*ne*Math.sin(he-ee)]);const de=2*Math.PI+he-.01;for(let ue=he;ue<de;ue+=ee){const fe=[G(ae,se)+te+ie*Math.cos(ue),G(ae,se)+re+ne*Math.sin(ue)];le.push(fe),ce.push(fe)}ce.push([G(ae,se)+te+ie*Math.cos(he+2*Math.PI+.5*oe),G(ae,se)+re+ne*Math.sin(he+2*Math.PI+.5*oe)]),ce.push([G(ae,se)+te+.98*ie*Math.cos(he+oe),G(ae,se)+re+.98*ne*Math.sin(he+oe)]),ce.push([G(ae,se)+te+.9*ie*Math.cos(he+.5*oe),G(ae,se)+re+.9*ne*Math.sin(he+.5*oe)])}return[ce,le]}function V(ee,te,re,ie,ne,ae,oe,se,le){const ce=ae+G(.1,le),he=[];he.push([G(se,le)+te+.9*ie*Math.cos(ce-ee),G(se,le)+re+.9*ne*Math.sin(ce-ee)]);for(let de=ce;de<=oe;de+=ee)he.push([G(se,le)+te+ie*Math.cos(de),G(se,le)+re+ne*Math.sin(de)]);return he.push([te+ie*Math.cos(oe),re+ne*Math.sin(oe)]),he.push([te+ie*Math.cos(oe),re+ne*Math.sin(oe)]),q(he,null,le)}function Z(ee,te,re,ie,ne,ae,oe,se){const le=[],ce=[se.maxRandomnessOffset||1,(se.maxRandomnessOffset||1)+.3];let he=[0,0];const de=se.disableMultiStroke?1:2,ue=se.preserveVertices;for(let fe=0;fe<de;fe++)fe===0?le.push({op:"move",data:[oe[0],oe[1]]}):le.push({op:"move",data:[oe[0]+(ue?0:G(ce[0],se)),oe[1]+(ue?0:G(ce[0],se))]}),he=ue?[ne,ae]:[ne+G(ce[fe],se),ae+G(ce[fe],se)],le.push({op:"bcurveTo",data:[ee+G(ce[fe],se),te+G(ce[fe],se),re+G(ce[fe],se),ie+G(ce[fe],se),he[0],he[1]]});return le}function Q(ee){return[...ee]}function H(ee,te=0){const re=ee.length;if(re<3)throw new Error("A curve must have at least three points.");const ie=[];if(re===3)ie.push(Q(ee[0]),Q(ee[1]),Q(ee[2]),Q(ee[2]));else{const ne=[];ne.push(ee[0],ee[0]);for(let se=1;se<ee.length;se++)ne.push(ee[se]),se===ee.length-1&&ne.push(ee[se]);const ae=[],oe=1-te;ie.push(Q(ne[0]));for(let se=1;se+2<ne.length;se++){const le=ne[se];ae[0]=[le[0],le[1]],ae[1]=[le[0]+(oe*ne[se+1][0]-oe*ne[se-1][0])/6,le[1]+(oe*ne[se+1][1]-oe*ne[se-1][1])/6],ae[2]=[ne[se+1][0]+(oe*ne[se][0]-oe*ne[se+2][0])/6,ne[se+1][1]+(oe*ne[se][1]-oe*ne[se+2][1])/6],ae[3]=[ne[se+1][0],ne[se+1][1]],ie.push(ae[1],ae[2],ae[3])}}return ie}function N(ee,te){return Math.pow(ee[0]-te[0],2)+Math.pow(ee[1]-te[1],2)}function B(ee,te,re){const ie=N(te,re);if(ie===0)return N(ee,te);let ne=((ee[0]-te[0])*(re[0]-te[0])+(ee[1]-te[1])*(re[1]-te[1]))/ie;return ne=Math.max(0,Math.min(1,ne)),N(ee,J(te,re,ne))}function J(ee,te,re){return[ee[0]+(te[0]-ee[0])*re,ee[1]+(te[1]-ee[1])*re]}function K(ee,te,re,ie){const ne=ie||[];if(function(se,le){const ce=se[le+0],he=se[le+1],de=se[le+2],ue=se[le+3];let fe=3*he[0]-2*ce[0]-ue[0];fe*=fe;let pe=3*he[1]-2*ce[1]-ue[1];pe*=pe;let ge=3*de[0]-2*ue[0]-ce[0];ge*=ge;let ye=3*de[1]-2*ue[1]-ce[1];return ye*=ye,fe<ge&&(fe=ge),pe<ye&&(pe=ye),fe+pe}(ee,te)<re){const se=ee[te+0];ne.length?(ae=ne[ne.length-1],oe=se,Math.sqrt(N(ae,oe))>1&&ne.push(se)):ne.push(se),ne.push(ee[te+3])}else{const le=ee[te+0],ce=ee[te+1],he=ee[te+2],de=ee[te+3],ue=J(le,ce,.5),fe=J(ce,he,.5),pe=J(he,de,.5),ge=J(ue,fe,.5),ye=J(fe,pe,.5),_e=J(ge,ye,.5);K([le,ue,ge,_e],0,re,ne),K([_e,ye,pe,de],0,re,ne)}var ae,oe;return ne}function U(ee,te){return X(ee,0,ee.length,te)}function X(ee,te,re,ie,ne){const ae=ne||[],oe=ee[te],se=ee[re-1];let le=0,ce=1;for(let he=te+1;he<re-1;++he){const de=B(ee[he],oe,se);de>le&&(le=de,ce=he)}return Math.sqrt(le)>ie?(X(ee,te,ce+1,ie,ae),X(ee,ce,re,ie,ae)):(ae.length||ae.push(oe),ae.push(se)),ae}function Y(ee,te=.15,re){const ie=[],ne=(ee.length-1)/3;for(let ae=0;ae<ne;ae++)K(ee,3*ae,te,ie);return re&&re>0?X(ie,0,ie.length,re):ie}const tt="none";class et{constructor(te){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=te||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(te){return te?Object.assign({},this.defaultOptions,te):this.defaultOptions}_d(te,re,ie){return{shape:te,sets:re||[],options:ie||this.defaultOptions}}line(te,re,ie,ne,ae){const oe=this._o(ae);return this._d("line",[v(te,re,ie,ne,oe)],oe)}rectangle(te,re,ie,ne,ae){const oe=this._o(ae),se=[],le=O(te,re,ie,ne,oe);if(oe.fill){const ce=[[te,re],[te+ie,re],[te+ie,re+ne],[te,re+ne]];oe.fillStyle==="solid"?se.push(I([ce],oe)):se.push(C([ce],oe))}return oe.stroke!==tt&&se.push(le),this._d("rectangle",se,oe)}ellipse(te,re,ie,ne,ae){const oe=this._o(ae),se=[],le=T(ie,ne,oe),ce=D(te,re,oe,le);if(oe.fill)if(oe.fillStyle==="solid"){const he=D(te,re,oe,le).opset;he.type="fillPath",se.push(he)}else se.push(C([ce.estimatedPoints],oe));return oe.stroke!==tt&&se.push(ce.opset),this._d("ellipse",se,oe)}circle(te,re,ie,ne){const ae=this.ellipse(te,re,ie,ie,ne);return ae.shape="circle",ae}linearPath(te,re){const ie=this._o(re);return this._d("linearPath",[S(te,!1,ie)],ie)}arc(te,re,ie,ne,ae,oe,se=!1,le){const ce=this._o(le),he=[],de=A(te,re,ie,ne,ae,oe,se,!0,ce);if(se&&ce.fill)if(ce.fillStyle==="solid"){const ue=Object.assign({},ce);ue.disableMultiStroke=!0;const fe=A(te,re,ie,ne,ae,oe,!0,!1,ue);fe.type="fillPath",he.push(fe)}else he.push(function(ue,fe,pe,ge,ye,_e,me){const we=ue,xe=fe;let Te=Math.abs(pe/2),ke=Math.abs(ge/2);Te+=G(.01*Te,me),ke+=G(.01*ke,me);let Ce=ye,Ae=_e;for(;Ce<0;)Ce+=2*Math.PI,Ae+=2*Math.PI;Ae-Ce>2*Math.PI&&(Ce=0,Ae=2*Math.PI);const ve=(Ae-Ce)/me.curveStepCount,Ee=[];for(let Se=Ce;Se<=Ae;Se+=ve)Ee.push([we+Te*Math.cos(Se),xe+ke*Math.sin(Se)]);return Ee.push([we+Te*Math.cos(Ae),xe+ke*Math.sin(Ae)]),Ee.push([we,xe]),C([Ee],me)}(te,re,ie,ne,ae,oe,ce));return ce.stroke!==tt&&he.push(de),this._d("arc",he,ce)}curve(te,re){const ie=this._o(re),ne=[],ae=L(te,ie);if(ie.fill&&ie.fill!==tt)if(ie.fillStyle==="solid"){const oe=L(te,Object.assign(Object.assign({},ie),{disableMultiStroke:!0,roughness:ie.roughness?ie.roughness+ie.fillShapeRoughnessGain:0}));ne.push({type:"fillPath",ops:this._mergedShape(oe.ops)})}else{const oe=[],se=te;if(se.length){const le=typeof se[0][0]=="number"?[se]:se;for(const ce of le)ce.length<3?oe.push(...ce):ce.length===3?oe.push(...Y(H([ce[0],ce[0],ce[1],ce[2]]),10,(1+ie.roughness)/2)):oe.push(...Y(H(ce),10,(1+ie.roughness)/2))}oe.length&&ne.push(C([oe],ie))}return ie.stroke!==tt&&ne.push(ae),this._d("curve",ne,ie)}polygon(te,re){const ie=this._o(re),ne=[],ae=S(te,!0,ie);return ie.fill&&(ie.fillStyle==="solid"?ne.push(I([te],ie)):ne.push(C([te],ie))),ie.stroke!==tt&&ne.push(ae),this._d("polygon",ne,ie)}path(te,re){const ie=this._o(re),ne=[];if(!te)return this._d("path",ne,ie);te=(te||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const ae=ie.fill&&ie.fill!=="transparent"&&ie.fill!==tt,oe=ie.stroke!==tt,se=!!(ie.simplification&&ie.simplification<1),le=function(he,de,ue){const fe=m(y(b(he))),pe=[];let ge=[],ye=[0,0],_e=[];const me=()=>{_e.length>=4&&ge.push(...Y(_e,de)),_e=[]},we=()=>{me(),ge.length&&(pe.push(ge),ge=[])};for(const{key:Te,data:ke}of fe)switch(Te){case"M":we(),ye=[ke[0],ke[1]],ge.push(ye);break;case"L":me(),ge.push([ke[0],ke[1]]);break;case"C":if(!_e.length){const Ce=ge.length?ge[ge.length-1]:ye;_e.push([Ce[0],Ce[1]])}_e.push([ke[0],ke[1]]),_e.push([ke[2],ke[3]]),_e.push([ke[4],ke[5]]);break;case"Z":me(),ge.push([ye[0],ye[1]])}if(we(),!ue)return pe;const xe=[];for(const Te of pe){const ke=U(Te,ue);ke.length&&xe.push(ke)}return xe}(te,1,se?4-4*(ie.simplification||1):(1+ie.roughness)/2),ce=_(te,ie);if(ae)if(ie.fillStyle==="solid")if(le.length===1){const he=_(te,Object.assign(Object.assign({},ie),{disableMultiStroke:!0,roughness:ie.roughness?ie.roughness+ie.fillShapeRoughnessGain:0}));ne.push({type:"fillPath",ops:this._mergedShape(he.ops)})}else ne.push(I(le,ie));else ne.push(C(le,ie));return oe&&(se?le.forEach(he=>{ne.push(S(he,!1,ie))}):ne.push(ce)),this._d("path",ne,ie)}opsToPath(te,re){let ie="";for(const ne of te.ops){const ae=typeof re=="number"&&re>=0?ne.data.map(oe=>+oe.toFixed(re)):ne.data;switch(ne.op){case"move":ie+=`M${ae[0]} ${ae[1]} `;break;case"bcurveTo":ie+=`C${ae[0]} ${ae[1]}, ${ae[2]} ${ae[3]}, ${ae[4]} ${ae[5]} `;break;case"lineTo":ie+=`L${ae[0]} ${ae[1]} `}}return ie.trim()}toPaths(te){const re=te.sets||[],ie=te.options||this.defaultOptions,ne=[];for(const ae of re){let oe=null;switch(ae.type){case"path":oe={d:this.opsToPath(ae),stroke:ie.stroke,strokeWidth:ie.strokeWidth,fill:tt};break;case"fillPath":oe={d:this.opsToPath(ae),stroke:tt,strokeWidth:0,fill:ie.fill||tt};break;case"fillSketch":oe=this.fillSketch(ae,ie)}oe&&ne.push(oe)}return ne}fillSketch(te,re){let ie=re.fillWeight;return ie<0&&(ie=re.strokeWidth/2),{d:this.opsToPath(te),stroke:re.fill||tt,strokeWidth:ie,fill:tt}}_mergedShape(te){return te.filter((re,ie)=>ie===0||re.op!=="move")}}class st{constructor(te,re){this.canvas=te,this.ctx=this.canvas.getContext("2d"),this.gen=new et(re)}draw(te){const re=te.sets||[],ie=te.options||this.getDefaultOptions(),ne=this.ctx,ae=te.options.fixedDecimalPlaceDigits;for(const oe of re)switch(oe.type){case"path":ne.save(),ne.strokeStyle=ie.stroke==="none"?"transparent":ie.stroke,ne.lineWidth=ie.strokeWidth,ie.strokeLineDash&&ne.setLineDash(ie.strokeLineDash),ie.strokeLineDashOffset&&(ne.lineDashOffset=ie.strokeLineDashOffset),this._drawToContext(ne,oe,ae),ne.restore();break;case"fillPath":{ne.save(),ne.fillStyle=ie.fill||"";const se=te.shape==="curve"||te.shape==="polygon"||te.shape==="path"?"evenodd":"nonzero";this._drawToContext(ne,oe,ae,se),ne.restore();break}case"fillSketch":this.fillSketch(ne,oe,ie)}}fillSketch(te,re,ie){let ne=ie.fillWeight;ne<0&&(ne=ie.strokeWidth/2),te.save(),ie.fillLineDash&&te.setLineDash(ie.fillLineDash),ie.fillLineDashOffset&&(te.lineDashOffset=ie.fillLineDashOffset),te.strokeStyle=ie.fill||"",te.lineWidth=ne,this._drawToContext(te,re,ie.fixedDecimalPlaceDigits),te.restore()}_drawToContext(te,re,ie,ne="nonzero"){te.beginPath();for(const ae of re.ops){const oe=typeof ie=="number"&&ie>=0?ae.data.map(se=>+se.toFixed(ie)):ae.data;switch(ae.op){case"move":te.moveTo(oe[0],oe[1]);break;case"bcurveTo":te.bezierCurveTo(oe[0],oe[1],oe[2],oe[3],oe[4],oe[5]);break;case"lineTo":te.lineTo(oe[0],oe[1])}}re.type==="fillPath"?te.fill(ne):te.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(te,re,ie,ne,ae){const oe=this.gen.line(te,re,ie,ne,ae);return this.draw(oe),oe}rectangle(te,re,ie,ne,ae){const oe=this.gen.rectangle(te,re,ie,ne,ae);return this.draw(oe),oe}ellipse(te,re,ie,ne,ae){const oe=this.gen.ellipse(te,re,ie,ne,ae);return this.draw(oe),oe}circle(te,re,ie,ne){const ae=this.gen.circle(te,re,ie,ne);return this.draw(ae),ae}linearPath(te,re){const ie=this.gen.linearPath(te,re);return this.draw(ie),ie}polygon(te,re){const ie=this.gen.polygon(te,re);return this.draw(ie),ie}arc(te,re,ie,ne,ae,oe,se=!1,le){const ce=this.gen.arc(te,re,ie,ne,ae,oe,se,le);return this.draw(ce),ce}curve(te,re){const ie=this.gen.curve(te,re);return this.draw(ie),ie}path(te,re){const ie=this.gen.path(te,re);return this.draw(ie),ie}}const nt="http://www.w3.org/2000/svg";class ot{constructor(te,re){this.svg=te,this.gen=new et(re)}draw(te){const re=te.sets||[],ie=te.options||this.getDefaultOptions(),ne=this.svg.ownerDocument||window.document,ae=ne.createElementNS(nt,"g"),oe=te.options.fixedDecimalPlaceDigits;for(const se of re){let le=null;switch(se.type){case"path":le=ne.createElementNS(nt,"path"),le.setAttribute("d",this.opsToPath(se,oe)),le.setAttribute("stroke",ie.stroke),le.setAttribute("stroke-width",ie.strokeWidth+""),le.setAttribute("fill","none"),ie.strokeLineDash&&le.setAttribute("stroke-dasharray",ie.strokeLineDash.join(" ").trim()),ie.strokeLineDashOffset&&le.setAttribute("stroke-dashoffset",`${ie.strokeLineDashOffset}`);break;case"fillPath":le=ne.createElementNS(nt,"path"),le.setAttribute("d",this.opsToPath(se,oe)),le.setAttribute("stroke","none"),le.setAttribute("stroke-width","0"),le.setAttribute("fill",ie.fill||""),te.shape!=="curve"&&te.shape!=="polygon"||le.setAttribute("fill-rule","evenodd");break;case"fillSketch":le=this.fillSketch(ne,se,ie)}le&&ae.appendChild(le)}return ae}fillSketch(te,re,ie){let ne=ie.fillWeight;ne<0&&(ne=ie.strokeWidth/2);const ae=te.createElementNS(nt,"path");return ae.setAttribute("d",this.opsToPath(re,ie.fixedDecimalPlaceDigits)),ae.setAttribute("stroke",ie.fill||""),ae.setAttribute("stroke-width",ne+""),ae.setAttribute("fill","none"),ie.fillLineDash&&ae.setAttribute("stroke-dasharray",ie.fillLineDash.join(" ").trim()),ie.fillLineDashOffset&&ae.setAttribute("stroke-dashoffset",`${ie.fillLineDashOffset}`),ae}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(te,re){return this.gen.opsToPath(te,re)}line(te,re,ie,ne,ae){const oe=this.gen.line(te,re,ie,ne,ae);return this.draw(oe)}rectangle(te,re,ie,ne,ae){const oe=this.gen.rectangle(te,re,ie,ne,ae);return this.draw(oe)}ellipse(te,re,ie,ne,ae){const oe=this.gen.ellipse(te,re,ie,ne,ae);return this.draw(oe)}circle(te,re,ie,ne){const ae=this.gen.circle(te,re,ie,ne);return this.draw(ae)}linearPath(te,re){const ie=this.gen.linearPath(te,re);return this.draw(ie)}polygon(te,re){const ie=this.gen.polygon(te,re);return this.draw(ie)}arc(te,re,ie,ne,ae,oe,se=!1,le){const ce=this.gen.arc(te,re,ie,ne,ae,oe,se,le);return this.draw(ce)}curve(te,re){const ie=this.gen.curve(te,re);return this.draw(ie)}path(te,re){const ie=this.gen.path(te,re);return this.draw(ie)}}var at={canvas:(ee,te)=>new st(ee,te),svg:(ee,te)=>new ot(ee,te),generator:ee=>new et(ee),newSeed:()=>et.newSeed()},intersectRect=__name((ee,te)=>{var re=ee.x,ie=ee.y,ne=te.x-re,ae=te.y-ie,oe=ee.width/2,se=ee.height/2,le,ce;return Math.abs(ae)*oe>Math.abs(ne)*se?(ae<0&&(se=-se),le=ae===0?0:se*ne/ae,ce=se):(ne<0&&(oe=-oe),le=oe,ce=ne===0?0:oe*ae/ne),{x:re+le,y:ie+ce}},"intersectRect"),intersect_rect_default=intersectRect;function applyStyle(ee,te){te&&ee.attr("style",te)}__name(applyStyle,"applyStyle");async function addHtmlLabel(ee){const te=d3select(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),re=te.append("xhtml:div");let ie=ee.label;ee.label&&hasKatex(ee.label)&&(ie=await renderKatex(ee.label.replace(common_default.lineBreakRegex,`
`),getConfig2()));const ne=ee.isNode?"nodeLabel":"edgeLabel";return re.html('<span class="'+ne+'" '+(ee.labelStyle?'style="'+ee.labelStyle+'"':"")+">"+ie+"</span>"),applyStyle(re,ee.labelStyle),re.style("display","inline-block"),re.style("padding-right","1px"),re.style("white-space","nowrap"),re.attr("xmlns","http://www.w3.org/1999/xhtml"),te.node()}__name(addHtmlLabel,"addHtmlLabel");var createLabel=__name(async(ee,te,re,ie)=>{let ne=ee||"";if(typeof ne=="object"&&(ne=ne[0]),evaluate(getConfig2().flowchart.htmlLabels)){ne=ne.replace(/\\n|\n/g,"<br />"),log.info("vertexText"+ne);const ae={isNode:ie,label:decodeEntities(ne).replace(/fa[blrs]?:fa-[\w-]+/g,se=>`<i class='${se.replace(":"," ")}'></i>`),labelStyle:te&&te.replace("fill:","color:")};return await addHtmlLabel(ae)}else{const ae=document.createElementNS("http://www.w3.org/2000/svg","text");ae.setAttribute("style",te.replace("color:","fill:"));let oe=[];typeof ne=="string"?oe=ne.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(ne)?oe=ne:oe=[];for(const se of oe){const le=document.createElementNS("http://www.w3.org/2000/svg","tspan");le.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),le.setAttribute("dy","1em"),le.setAttribute("x","0"),re?le.setAttribute("class","title-row"):le.setAttribute("class","row"),le.textContent=se.trim(),ae.appendChild(le)}return ae}},"createLabel"),createLabel_default=createLabel,createRoundedRectPathD=__name((ee,te,re,ie,ne)=>["M",ee+ne,te,"H",ee+re-ne,"A",ne,ne,0,0,1,ee+re,te+ne,"V",te+ie-ne,"A",ne,ne,0,0,1,ee+re-ne,te+ie,"H",ee+ne,"A",ne,ne,0,0,1,ee,te+ie-ne,"V",te+ne,"A",ne,ne,0,0,1,ee+ne,te,"Z"].join(" "),"createRoundedRectPathD"),solidStateFill=__name(ee=>{const{handDrawnSeed:te}=getConfig2();return{fill:ee,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:ee,seed:te}},"solidStateFill"),compileStyles=__name(ee=>{const te=styles2Map([...ee.cssCompiledStyles||[],...ee.cssStyles||[]]);return{stylesMap:te,stylesArray:[...te]}},"compileStyles"),styles2Map=__name(ee=>{const te=new Map;return ee.forEach(re=>{const[ie,ne]=re.split(":");te.set(ie.trim(),ne==null?void 0:ne.trim())}),te},"styles2Map"),styles2String=__name(ee=>{const{stylesArray:te}=compileStyles(ee),re=[],ie=[],ne=[],ae=[];return te.forEach(oe=>{const se=oe[0];se==="color"||se==="font-size"||se==="font-family"||se==="font-weight"||se==="font-style"||se==="text-decoration"||se==="text-align"||se==="text-transform"||se==="line-height"||se==="letter-spacing"||se==="word-spacing"||se==="text-shadow"||se==="text-overflow"||se==="white-space"||se==="word-wrap"||se==="word-break"||se==="overflow-wrap"||se==="hyphens"?re.push(oe.join(":")+" !important"):(ie.push(oe.join(":")+" !important"),se.includes("stroke")&&ne.push(oe.join(":")+" !important"),se==="fill"&&ae.push(oe.join(":")+" !important"))}),{labelStyles:re.join(";"),nodeStyles:ie.join(";"),stylesArray:te,borderStyles:ne,backgroundStyles:ae}},"styles2String"),userNodeOverrides=__name((ee,te)=>{const{themeVariables:re,handDrawnSeed:ie}=getConfig2(),{nodeBorder:ne,mainBkg:ae}=re,{stylesMap:oe}=compileStyles(ee);return Object.assign({roughness:.7,fill:oe.get("fill")||ae,fillStyle:"hachure",fillWeight:4,stroke:oe.get("stroke")||ne,seed:ie,strokeWidth:1.3},te)},"userNodeOverrides"),rect=__name(async(ee,te)=>{log.info("Creating subgraph rect for ",te.id,te);const re=getConfig2(),{themeVariables:ie,handDrawnSeed:ne}=re,{clusterBkg:ae,clusterBorder:oe}=ie,{labelStyles:se,nodeStyles:le,borderStyles:ce,backgroundStyles:he}=styles2String(te),de=ee.insert("g").attr("class","cluster "+te.cssClasses).attr("id",te.id).attr("data-look",te.look),ue=evaluate(re.flowchart.htmlLabels),fe=de.insert("g").attr("class","cluster-label "),pe=await createText(fe,te.label,{style:te.labelStyle,useHtmlLabels:ue,isNode:!0});let ge=pe.getBBox();if(evaluate(re.flowchart.htmlLabels)){const Ce=pe.children[0],Ae=d3select(pe);ge=Ce.getBoundingClientRect(),Ae.attr("width",ge.width),Ae.attr("height",ge.height)}const ye=te.width<=ge.width+te.padding?ge.width+te.padding:te.width;te.width<=ge.width+te.padding?te.diff=(ye-te.width)/2-te.padding:te.diff=-te.padding;const _e=te.height,me=te.x-ye/2,we=te.y-_e/2;log.trace("Data ",te,JSON.stringify(te));let xe;if(te.look==="handDrawn"){const Ce=at.svg(de),Ae=userNodeOverrides(te,{roughness:.7,fill:ae,stroke:oe,fillWeight:3,seed:ne}),ve=Ce.path(createRoundedRectPathD(me,we,ye,_e,0),Ae);xe=de.insert(()=>(log.debug("Rough node insert CXC",ve),ve),":first-child"),xe.select("path:nth-child(2)").attr("style",ce.join(";")),xe.select("path").attr("style",he.join(";").replace("fill","stroke"))}else xe=de.insert("rect",":first-child"),xe.attr("style",le).attr("rx",te.rx).attr("ry",te.ry).attr("x",me).attr("y",we).attr("width",ye).attr("height",_e);const{subGraphTitleTopMargin:Te}=getSubGraphTitleMargins(re);if(fe.attr("transform",`translate(${te.x-ge.width/2}, ${te.y-te.height/2+Te})`),se){const Ce=fe.select("span");Ce&&Ce.attr("style",se)}const ke=xe.node().getBBox();return te.offsetX=0,te.width=ke.width,te.height=ke.height,te.offsetY=ge.height-te.padding/2,te.intersect=function(Ce){return intersect_rect_default(te,Ce)},{cluster:de,labelBBox:ge}},"rect"),noteGroup=__name((ee,te)=>{const re=ee.insert("g").attr("class","note-cluster").attr("id",te.id),ie=re.insert("rect",":first-child"),ne=0*te.padding,ae=ne/2;ie.attr("rx",te.rx).attr("ry",te.ry).attr("x",te.x-te.width/2-ae).attr("y",te.y-te.height/2-ae).attr("width",te.width+ne).attr("height",te.height+ne).attr("fill","none");const oe=ie.node().getBBox();return te.width=oe.width,te.height=oe.height,te.intersect=function(se){return intersect_rect_default(te,se)},{cluster:re,labelBBox:{width:0,height:0}}},"noteGroup"),roundedWithTitle=__name(async(ee,te)=>{const re=getConfig2(),{themeVariables:ie,handDrawnSeed:ne}=re,{altBackground:ae,compositeBackground:oe,compositeTitleBackground:se,nodeBorder:le}=ie,ce=ee.insert("g").attr("class",te.cssClasses).attr("id",te.id).attr("data-id",te.id).attr("data-look",te.look),he=ce.insert("g",":first-child"),de=ce.insert("g").attr("class","cluster-label");let ue=ce.append("rect");const fe=de.node().appendChild(await createLabel_default(te.label,te.labelStyle,void 0,!0));let pe=fe.getBBox();if(evaluate(re.flowchart.htmlLabels)){const ve=fe.children[0],Ee=d3select(fe);pe=ve.getBoundingClientRect(),Ee.attr("width",pe.width),Ee.attr("height",pe.height)}const ge=0*te.padding,ye=ge/2,_e=(te.width<=pe.width+te.padding?pe.width+te.padding:te.width)+ge;te.width<=pe.width+te.padding?te.diff=(_e-te.width)/2-te.padding:te.diff=-te.padding;const me=te.height+ge,we=te.height+ge-pe.height-6,xe=te.x-_e/2,Te=te.y-me/2;te.width=_e;const ke=te.y-te.height/2-ye+pe.height+2;let Ce;if(te.look==="handDrawn"){const ve=te.cssClasses.includes("statediagram-cluster-alt"),Ee=at.svg(ce),Se=te.rx||te.ry?Ee.path(createRoundedRectPathD(xe,Te,_e,me,10),{roughness:.7,fill:se,fillStyle:"solid",stroke:le,seed:ne}):Ee.rectangle(xe,Te,_e,me,{seed:ne});Ce=ce.insert(()=>Se,":first-child");const Ne=Ee.rectangle(xe,ke,_e,we,{fill:ve?ae:oe,fillStyle:ve?"hachure":"solid",stroke:le,seed:ne});Ce=ce.insert(()=>Se,":first-child"),ue=ce.insert(()=>Ne)}else Ce=he.insert("rect",":first-child"),Ce.attr("class","outer").attr("x",xe).attr("y",Te).attr("width",_e).attr("height",me).attr("data-look",te.look),ue.attr("class","inner").attr("x",xe).attr("y",ke).attr("width",_e).attr("height",we);de.attr("transform",`translate(${te.x-pe.width/2}, ${Te+1-(evaluate(re.flowchart.htmlLabels)?0:3)})`);const Ae=Ce.node().getBBox();return te.height=Ae.height,te.offsetX=0,te.offsetY=pe.height-te.padding/2,te.labelBBox=pe,te.intersect=function(ve){return intersect_rect_default(te,ve)},{cluster:ce,labelBBox:pe}},"roundedWithTitle"),divider=__name((ee,te)=>{const re=getConfig2(),{themeVariables:ie,handDrawnSeed:ne}=re,{nodeBorder:ae}=ie,oe=ee.insert("g").attr("class",te.cssClasses).attr("id",te.id).attr("data-look",te.look),se=oe.insert("g",":first-child"),le=0*te.padding,ce=te.width+le;te.diff=-te.padding;const he=te.height+le,de=te.x-ce/2,ue=te.y-he/2;te.width=ce;let fe;if(te.look==="handDrawn"){const ye=at.svg(oe).rectangle(de,ue,ce,he,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:ae,seed:ne});fe=oe.insert(()=>ye,":first-child")}else fe=se.insert("rect",":first-child"),fe.attr("class","divider").attr("x",de).attr("y",ue).attr("width",ce).attr("height",he).attr("data-look",te.look);const pe=fe.node().getBBox();return te.height=pe.height,te.offsetX=0,te.offsetY=0,te.intersect=function(ge){return intersect_rect_default(te,ge)},{cluster:oe,labelBBox:{}}},"divider"),squareRect=rect,shapes={rect,squareRect,roundedWithTitle,noteGroup,divider},clusterElems=new Map,insertCluster=__name(async(ee,te)=>{const re=te.shape||"rect",ie=await shapes[re](ee,te);return clusterElems.set(te.id,ie),ie},"insertCluster"),clear=__name(()=>{clusterElems=new Map},"clear"),addEdgeMarkers=__name((ee,te,re,ie,ne)=>{te.arrowTypeStart&&addEdgeMarker(ee,"start",te.arrowTypeStart,re,ie,ne),te.arrowTypeEnd&&addEdgeMarker(ee,"end",te.arrowTypeEnd,re,ie,ne)},"addEdgeMarkers"),arrowTypesMap={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},addEdgeMarker=__name((ee,te,re,ie,ne,ae)=>{const oe=arrowTypesMap[re];if(!oe){log.warn(`Unknown arrow type: ${re}`);return}const se=te==="start"?"Start":"End";ee.attr(`marker-${te}`,`url(${ie}#${ne}_${ae}-${oe}${se})`)},"addEdgeMarker"),edgeLabels=new Map,terminalLabels=new Map,clear2=__name(()=>{edgeLabels.clear(),terminalLabels.clear()},"clear"),getLabelStyles=__name(ee=>ee?ee.reduce((re,ie)=>re+";"+ie,""):"","getLabelStyles"),insertEdgeLabel=__name(async(ee,te)=>{let re=evaluate(getConfig2().flowchart.htmlLabels);const ie=await createText(ee,te.label,{style:getLabelStyles(te.labelStyle),useHtmlLabels:re,addSvgBackground:!0,isNode:!1});log.info("abc82",te,te.labelType);const ne=ee.insert("g").attr("class","edgeLabel"),ae=ne.insert("g").attr("class","label");ae.node().appendChild(ie);let oe=ie.getBBox();if(re){const le=ie.children[0],ce=d3select(ie);oe=le.getBoundingClientRect(),ce.attr("width",oe.width),ce.attr("height",oe.height)}ae.attr("transform","translate("+-oe.width/2+", "+-oe.height/2+")"),edgeLabels.set(te.id,ne),te.width=oe.width,te.height=oe.height;let se;if(te.startLabelLeft){const le=await createLabel_default(te.startLabelLeft,getLabelStyles(te.labelStyle)),ce=ee.insert("g").attr("class","edgeTerminals"),he=ce.insert("g").attr("class","inner");se=he.node().appendChild(le);const de=le.getBBox();he.attr("transform","translate("+-de.width/2+", "+-de.height/2+")"),terminalLabels.get(te.id)||terminalLabels.set(te.id,{}),terminalLabels.get(te.id).startLeft=ce,setTerminalWidth(se,te.startLabelLeft)}if(te.startLabelRight){const le=await createLabel_default(te.startLabelRight,getLabelStyles(te.labelStyle)),ce=ee.insert("g").attr("class","edgeTerminals"),he=ce.insert("g").attr("class","inner");se=ce.node().appendChild(le),he.node().appendChild(le);const de=le.getBBox();he.attr("transform","translate("+-de.width/2+", "+-de.height/2+")"),terminalLabels.get(te.id)||terminalLabels.set(te.id,{}),terminalLabels.get(te.id).startRight=ce,setTerminalWidth(se,te.startLabelRight)}if(te.endLabelLeft){const le=await createLabel_default(te.endLabelLeft,getLabelStyles(te.labelStyle)),ce=ee.insert("g").attr("class","edgeTerminals"),he=ce.insert("g").attr("class","inner");se=he.node().appendChild(le);const de=le.getBBox();he.attr("transform","translate("+-de.width/2+", "+-de.height/2+")"),ce.node().appendChild(le),terminalLabels.get(te.id)||terminalLabels.set(te.id,{}),terminalLabels.get(te.id).endLeft=ce,setTerminalWidth(se,te.endLabelLeft)}if(te.endLabelRight){const le=await createLabel_default(te.endLabelRight,getLabelStyles(te.labelStyle)),ce=ee.insert("g").attr("class","edgeTerminals"),he=ce.insert("g").attr("class","inner");se=he.node().appendChild(le);const de=le.getBBox();he.attr("transform","translate("+-de.width/2+", "+-de.height/2+")"),ce.node().appendChild(le),terminalLabels.get(te.id)||terminalLabels.set(te.id,{}),terminalLabels.get(te.id).endRight=ce,setTerminalWidth(se,te.endLabelRight)}return ie},"insertEdgeLabel");function setTerminalWidth(ee,te){getConfig2().flowchart.htmlLabels&&ee&&(ee.style.width=te.length*9+"px",ee.style.height="12px")}__name(setTerminalWidth,"setTerminalWidth");var positionEdgeLabel=__name((ee,te)=>{log.debug("Moving label abc88 ",ee.id,ee.label,edgeLabels.get(ee.id),te);let re=te.updatedPath?te.updatedPath:te.originalPath;const ie=getConfig2(),{subGraphTitleTotalMargin:ne}=getSubGraphTitleMargins(ie);if(ee.label){const ae=edgeLabels.get(ee.id);let oe=ee.x,se=ee.y;if(re){const le=utils_default.calcLabelPosition(re);log.debug("Moving label "+ee.label+" from (",oe,",",se,") to (",le.x,",",le.y,") abc88"),te.updatedPath&&(oe=le.x,se=le.y)}ae.attr("transform",`translate(${oe}, ${se+ne/2})`)}if(ee.startLabelLeft){const ae=terminalLabels.get(ee.id).startLeft;let oe=ee.x,se=ee.y;if(re){const le=utils_default.calcTerminalLabelPosition(ee.arrowTypeStart?10:0,"start_left",re);oe=le.x,se=le.y}ae.attr("transform",`translate(${oe}, ${se})`)}if(ee.startLabelRight){const ae=terminalLabels.get(ee.id).startRight;let oe=ee.x,se=ee.y;if(re){const le=utils_default.calcTerminalLabelPosition(ee.arrowTypeStart?10:0,"start_right",re);oe=le.x,se=le.y}ae.attr("transform",`translate(${oe}, ${se})`)}if(ee.endLabelLeft){const ae=terminalLabels.get(ee.id).endLeft;let oe=ee.x,se=ee.y;if(re){const le=utils_default.calcTerminalLabelPosition(ee.arrowTypeEnd?10:0,"end_left",re);oe=le.x,se=le.y}ae.attr("transform",`translate(${oe}, ${se})`)}if(ee.endLabelRight){const ae=terminalLabels.get(ee.id).endRight;let oe=ee.x,se=ee.y;if(re){const le=utils_default.calcTerminalLabelPosition(ee.arrowTypeEnd?10:0,"end_right",re);oe=le.x,se=le.y}ae.attr("transform",`translate(${oe}, ${se})`)}},"positionEdgeLabel"),outsideNode=__name((ee,te)=>{const re=ee.x,ie=ee.y,ne=Math.abs(te.x-re),ae=Math.abs(te.y-ie),oe=ee.width/2,se=ee.height/2;return ne>=oe||ae>=se},"outsideNode"),intersection=__name((ee,te,re)=>{log.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(te)}
insidePoint : ${JSON.stringify(re)}
node : x:${ee.x} y:${ee.y} w:${ee.width} h:${ee.height}`);const ie=ee.x,ne=ee.y,ae=Math.abs(ie-re.x),oe=ee.width/2;let se=re.x<te.x?oe-ae:oe+ae;const le=ee.height/2,ce=Math.abs(te.y-re.y),he=Math.abs(te.x-re.x);if(Math.abs(ne-te.y)*oe>Math.abs(ie-te.x)*le){let de=re.y<te.y?te.y-le-ne:ne-le-te.y;se=he*de/ce;const ue={x:re.x<te.x?re.x+se:re.x-he+se,y:re.y<te.y?re.y+ce-de:re.y-ce+de};return se===0&&(ue.x=te.x,ue.y=te.y),he===0&&(ue.x=te.x),ce===0&&(ue.y=te.y),log.debug(`abc89 top/bottom calc, Q ${ce}, q ${de}, R ${he}, r ${se}`,ue),ue}else{re.x<te.x?se=te.x-oe-ie:se=ie-oe-te.x;let de=ce*se/he,ue=re.x<te.x?re.x+he-se:re.x-he+se,fe=re.y<te.y?re.y+de:re.y-de;return log.debug(`sides calc abc89, Q ${ce}, q ${de}, R ${he}, r ${se}`,{_x:ue,_y:fe}),se===0&&(ue=te.x,fe=te.y),he===0&&(ue=te.x),ce===0&&(fe=te.y),{x:ue,y:fe}}},"intersection"),cutPathAtIntersect=__name((ee,te)=>{log.warn("abc88 cutPathAtIntersect",ee,te);let re=[],ie=ee[0],ne=!1;return ee.forEach(ae=>{if(log.info("abc88 checking point",ae,te),!outsideNode(te,ae)&&!ne){const oe=intersection(te,ie,ae);log.debug("abc88 inside",ae,ie,oe),log.debug("abc88 intersection",oe,te);let se=!1;re.forEach(le=>{se=se||le.x===oe.x&&le.y===oe.y}),re.some(le=>le.x===oe.x&&le.y===oe.y)?log.warn("abc88 no intersect",oe,re):re.push(oe),ne=!0}else log.warn("abc88 outside",ae,ie),ie=ae,ne||re.push(ae)}),log.debug("returning points",re),re},"cutPathAtIntersect");function extractCornerPoints(ee){const te=[],re=[];for(let ie=1;ie<ee.length-1;ie++){const ne=ee[ie-1],ae=ee[ie],oe=ee[ie+1];(ne.x===ae.x&&ae.y===oe.y&&Math.abs(ae.x-oe.x)>5&&Math.abs(ae.y-ne.y)>5||ne.y===ae.y&&ae.x===oe.x&&Math.abs(ae.x-ne.x)>5&&Math.abs(ae.y-oe.y)>5)&&(te.push(ae),re.push(ie))}return{cornerPoints:te,cornerPointPositions:re}}__name(extractCornerPoints,"extractCornerPoints");var findAdjacentPoint=__name(function(ee,te,re){const ie=te.x-ee.x,ne=te.y-ee.y,ae=Math.sqrt(ie*ie+ne*ne),oe=re/ae;return{x:te.x-oe*ie,y:te.y-oe*ne}},"findAdjacentPoint"),fixCorners=__name(function(ee){const{cornerPointPositions:te}=extractCornerPoints(ee),re=[];for(let ie=0;ie<ee.length;ie++)if(te.includes(ie)){const ne=ee[ie-1],ae=ee[ie+1],oe=ee[ie],se=findAdjacentPoint(ne,oe,5),le=findAdjacentPoint(ae,oe,5),ce=le.x-se.x,he=le.y-se.y;re.push(se);const de=Math.sqrt(2)*2;let ue={x:oe.x,y:oe.y};if(Math.abs(ae.x-ne.x)>10&&Math.abs(ae.y-ne.y)>=10){log.debug("Corner point fixing",Math.abs(ae.x-ne.x),Math.abs(ae.y-ne.y));const fe=5;oe.x===se.x?ue={x:ce<0?se.x-fe+de:se.x+fe-de,y:he<0?se.y-de:se.y+de}:ue={x:ce<0?se.x-de:se.x+de,y:he<0?se.y-fe+de:se.y+fe-de}}else log.debug("Corner point skipping fixing",Math.abs(ae.x-ne.x),Math.abs(ae.y-ne.y));re.push(ue,le)}else re.push(ee[ie]);return re},"fixCorners"),insertEdge=__name(function(ee,te,re,ie,ne,ae,oe){const{handDrawnSeed:se}=getConfig2();let le=te.points,ce=!1;const he=ne;var de=ae;de.intersect&&he.intersect&&(le=le.slice(1,te.points.length-1),le.unshift(he.intersect(le[0])),log.debug("Last point APA12",te.start,"-->",te.end,le[le.length-1],de,de.intersect(le[le.length-1])),le.push(de.intersect(le[le.length-1]))),te.toCluster&&(log.info("to cluster abc88",re.get(te.toCluster)),le=cutPathAtIntersect(te.points,re.get(te.toCluster).node),ce=!0),te.fromCluster&&(log.debug("from cluster abc88",re.get(te.fromCluster),JSON.stringify(le,null,2)),le=cutPathAtIntersect(le.reverse(),re.get(te.fromCluster).node).reverse(),ce=!0);let ue=le.filter(Ae=>!Number.isNaN(Ae.y));ue=fixCorners(ue);let fe=ue[ue.length-1];if(ue.length>1){fe=ue[ue.length-1];const Ae=ue[ue.length-2],ve=(fe.x-Ae.x)/2,Ee=(fe.y-Ae.y)/2,Se={x:Ae.x+ve,y:Ae.y+Ee};ue.splice(-1,0,Se)}let pe=curveBasis;te.curve&&(pe=te.curve);const{x:ge,y:ye}=getLineFunctionsWithOffset(te),_e=line$1().x(ge).y(ye).curve(pe);let me;switch(te.thickness){case"normal":me="edge-thickness-normal";break;case"thick":me="edge-thickness-thick";break;case"invisible":me="edge-thickness-invisible";break;default:me="edge-thickness-normal"}switch(te.pattern){case"solid":me+=" edge-pattern-solid";break;case"dotted":me+=" edge-pattern-dotted";break;case"dashed":me+=" edge-pattern-dashed";break;default:me+=" edge-pattern-solid"}let we,xe=_e(ue);const Te=Array.isArray(te.style)?te.style:[te.style];if(te.look==="handDrawn"){const Ae=at.svg(ee);Object.assign([],ue);const ve=Ae.path(xe,{roughness:.3,seed:se});me+=" transition",we=d3select(ve).select("path").attr("id",te.id).attr("class"," "+me+(te.classes?" "+te.classes:"")).attr("style",Te?Te.reduce((Se,Ne)=>Se+";"+Ne,""):"");let Ee=we.attr("d");we.attr("d",Ee),ee.node().appendChild(we.node())}else we=ee.append("path").attr("d",xe).attr("id",te.id).attr("class"," "+me+(te.classes?" "+te.classes:"")).attr("style",Te?Te.reduce((Ae,ve)=>Ae+";"+ve,""):"");let ke="";(getConfig2().flowchart.arrowMarkerAbsolute||getConfig2().state.arrowMarkerAbsolute)&&(ke=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,ke=ke.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),log.info("arrowTypeStart",te.arrowTypeStart),log.info("arrowTypeEnd",te.arrowTypeEnd),addEdgeMarkers(we,te,ke,oe,ie);let Ce={};return ce&&(Ce.updatedPath=le),Ce.originalPath=te.points,Ce},"insertEdge"),insertMarkers=__name((ee,te,re,ie)=>{te.forEach(ne=>{markers[ne](ee,re,ie)})},"insertMarkers"),extension=__name((ee,te,re)=>{log.trace("Making markers for ",re),ee.append("defs").append("marker").attr("id",re+"_"+te+"-extensionStart").attr("class","marker extension "+te).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),ee.append("defs").append("marker").attr("id",re+"_"+te+"-extensionEnd").attr("class","marker extension "+te).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition=__name((ee,te,re)=>{ee.append("defs").append("marker").attr("id",re+"_"+te+"-compositionStart").attr("class","marker composition "+te).attr("refX",18).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"),ee.append("defs").append("marker").attr("id",re+"_"+te+"-compositionEnd").attr("class","marker composition "+te).attr("refX",1).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")},"composition"),aggregation=__name((ee,te,re)=>{ee.append("defs").append("marker").attr("id",re+"_"+te+"-aggregationStart").attr("class","marker aggregation "+te).attr("refX",18).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"),ee.append("defs").append("marker").attr("id",re+"_"+te+"-aggregationEnd").attr("class","marker aggregation "+te).attr("refX",1).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"),dependency=__name((ee,te,re)=>{ee.append("defs").append("marker").attr("id",re+"_"+te+"-dependencyStart").attr("class","marker dependency "+te).attr("refX",6).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"),ee.append("defs").append("marker").attr("id",re+"_"+te+"-dependencyEnd").attr("class","marker dependency "+te).attr("refX",13).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")},"dependency"),lollipop=__name((ee,te,re)=>{ee.append("defs").append("marker").attr("id",re+"_"+te+"-lollipopStart").attr("class","marker lollipop "+te).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),ee.append("defs").append("marker").attr("id",re+"_"+te+"-lollipopEnd").attr("class","marker lollipop "+te).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point=__name((ee,te,re)=>{ee.append("marker").attr("id",re+"_"+te+"-pointEnd").attr("class","marker "+te).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),ee.append("marker").attr("id",re+"_"+te+"-pointStart").attr("class","marker "+te).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle=__name((ee,te,re)=>{ee.append("marker").attr("id",re+"_"+te+"-circleEnd").attr("class","marker "+te).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"),ee.append("marker").attr("id",re+"_"+te+"-circleStart").attr("class","marker "+te).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")},"circle"),cross=__name((ee,te,re)=>{ee.append("marker").attr("id",re+"_"+te+"-crossEnd").attr("class","marker cross "+te).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"),ee.append("marker").attr("id",re+"_"+te+"-crossStart").attr("class","marker cross "+te).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")},"cross"),barb=__name((ee,te,re)=>{ee.append("defs").append("marker").attr("id",re+"_"+te+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),markers={extension,composition,aggregation,dependency,lollipop,point,circle,cross,barb},markers_default=insertMarkers,labelHelper=__name(async(ee,te,re)=>{let ie;const ne=te.useHtmlLabels||evaluate(getConfig2().flowchart.htmlLabels);re?ie=re:ie="node default";const ae=ee.insert("g").attr("class",ie).attr("id",te.domId||te.id),oe=ae.insert("g").attr("class","label").attr("style",te.labelStyle);let se;te.label===void 0?se="":se=typeof te.label=="string"?te.label:te.label[0];let le;le=await createText(oe,sanitizeText(decodeEntities(se),getConfig2()),{useHtmlLabels:ne,width:te.width||getConfig2().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:te.labelStyle});let ce=le.getBBox();const he=te.padding/2;if(evaluate(getConfig2().flowchart.htmlLabels)){const de=le.children[0],ue=d3select(le),fe=de.getElementsByTagName("img");if(fe){const pe=se.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...fe].map(ge=>new Promise(ye=>{function _e(){if(ge.style.display="flex",ge.style.flexDirection="column",pe){const me=getConfig2().fontSize?getConfig2().fontSize:window.getComputedStyle(document.body).fontSize,xe=parseInt(me,10)*5+"px";ge.style.minWidth=xe,ge.style.maxWidth=xe}else ge.style.width="100%";ye(ge)}__name(_e,"setupImage"),setTimeout(()=>{ge.complete&&_e()}),ge.addEventListener("error",_e),ge.addEventListener("load",_e)})))}ce=de.getBoundingClientRect(),ue.attr("width",ce.width),ue.attr("height",ce.height)}return ne?oe.attr("transform","translate("+-ce.width/2+", "+-ce.height/2+")"):oe.attr("transform","translate(0, "+-ce.height/2+")"),te.centerLabel&&oe.attr("transform","translate("+-ce.width/2+", "+-ce.height/2+")"),oe.insert("rect",":first-child"),{shapeSvg:ae,bbox:ce,halfPadding:he,label:oe}},"labelHelper"),updateNodeBounds=__name((ee,te)=>{const re=te.node().getBBox();ee.width=re.width,ee.height=re.height},"updateNodeBounds"),getNodeClasses=__name((ee,te)=>(ee.look==="handDrawn"?"rough-node":"node")+" "+ee.cssClasses+" "+(te||""),"getNodeClasses");function intersectNode(ee,te){return ee.intersect(te)}__name(intersectNode,"intersectNode");var intersect_node_default=intersectNode;function intersectEllipse(ee,te,re,ie){var ne=ee.x,ae=ee.y,oe=ne-ie.x,se=ae-ie.y,le=Math.sqrt(te*te*se*se+re*re*oe*oe),ce=Math.abs(te*re*oe/le);ie.x<ne&&(ce=-ce);var he=Math.abs(te*re*se/le);return ie.y<ae&&(he=-he),{x:ne+ce,y:ae+he}}__name(intersectEllipse,"intersectEllipse");var intersect_ellipse_default=intersectEllipse;function intersectCircle(ee,te,re){return intersect_ellipse_default(ee,te,te,re)}__name(intersectCircle,"intersectCircle");var intersect_circle_default=intersectCircle;function intersectLine(ee,te,re,ie){var ne,ae,oe,se,le,ce,he,de,ue,fe,pe,ge,ye,_e,me;if(ne=te.y-ee.y,oe=ee.x-te.x,le=te.x*ee.y-ee.x*te.y,ue=ne*re.x+oe*re.y+le,fe=ne*ie.x+oe*ie.y+le,!(ue!==0&&fe!==0&&sameSign(ue,fe))&&(ae=ie.y-re.y,se=re.x-ie.x,ce=ie.x*re.y-re.x*ie.y,he=ae*ee.x+se*ee.y+ce,de=ae*te.x+se*te.y+ce,!(he!==0&&de!==0&&sameSign(he,de))&&(pe=ne*se-ae*oe,pe!==0)))return ge=Math.abs(pe/2),ye=oe*ce-se*le,_e=ye<0?(ye-ge)/pe:(ye+ge)/pe,ye=ae*le-ne*ce,me=ye<0?(ye-ge)/pe:(ye+ge)/pe,{x:_e,y:me}}__name(intersectLine,"intersectLine");function sameSign(ee,te){return ee*te>0}__name(sameSign,"sameSign");var intersect_line_default=intersectLine;function intersectPolygon(ee,te,re){let ie=ee.x,ne=ee.y,ae=[],oe=Number.POSITIVE_INFINITY,se=Number.POSITIVE_INFINITY;typeof te.forEach=="function"?te.forEach(function(he){oe=Math.min(oe,he.x),se=Math.min(se,he.y)}):(oe=Math.min(oe,te.x),se=Math.min(se,te.y));let le=ie-ee.width/2-oe,ce=ne-ee.height/2-se;for(let he=0;he<te.length;he++){let de=te[he],ue=te[he<te.length-1?he+1:0],fe=intersect_line_default(ee,re,{x:le+de.x,y:ce+de.y},{x:le+ue.x,y:ce+ue.y});fe&&ae.push(fe)}return ae.length?(ae.length>1&&ae.sort(function(he,de){let ue=he.x-re.x,fe=he.y-re.y,pe=Math.sqrt(ue*ue+fe*fe),ge=de.x-re.x,ye=de.y-re.y,_e=Math.sqrt(ge*ge+ye*ye);return pe<_e?-1:pe===_e?0:1}),ae[0]):ee}__name(intersectPolygon,"intersectPolygon");var intersect_polygon_default=intersectPolygon,intersect_default={node:intersect_node_default,circle:intersect_circle_default,ellipse:intersect_ellipse_default,polygon:intersect_polygon_default,rect:intersect_rect_default},drawRect=__name(async(ee,te,re)=>{const{labelStyles:ie,nodeStyles:ne}=styles2String(te);te.labelStyle=ie;const{shapeSvg:ae,bbox:oe}=await labelHelper(ee,te,getNodeClasses(te)),se=Math.max(oe.width+re.labelPaddingX*2,(te==null?void 0:te.width)||0),le=Math.max(oe.height+re.labelPaddingY*2,(te==null?void 0:te.height)||0),ce=-se/2,he=-le/2;let de,{rx:ue,ry:fe}=te;const{cssStyles:pe}=te;if(re!=null&&re.rx&&re.ry&&(ue=re.rx,fe=re.ry),te.look==="handDrawn"){const ge=at.svg(ae),ye=userNodeOverrides(te,{}),_e=ue||fe?ge.path(createRoundedRectPathD(ce,he,se,le,ue||0),ye):ge.rectangle(ce,he,se,le,ye);de=ae.insert(()=>_e,":first-child"),de.attr("class","basic label-container").attr("style",pe)}else de=ae.insert("rect",":first-child"),de.attr("class","basic label-container").attr("style",ne).attr("rx",ue).attr("data-id","abc").attr("data-et","node").attr("ry",fe).attr("x",ce).attr("y",he).attr("width",se).attr("height",le);return updateNodeBounds(te,de),te.intersect=function(ge){return intersect_default.rect(te,ge)},ae},"drawRect"),state=__name(async(ee,te)=>drawRect(ee,te,{rx:5,ry:5,classes:"flowchart-node"}),"state"),roundedRect=__name(async(ee,te)=>{const re={rx:5,ry:5,classes:"",labelPaddingX:((te==null?void 0:te.padding)||0)*1,labelPaddingY:((te==null?void 0:te.padding)||0)*1};return drawRect(ee,te,re)},"roundedRect"),squareRect2=__name(async(ee,te)=>{const re={rx:0,ry:0,classes:"",labelPaddingX:((te==null?void 0:te.padding)||0)*2,labelPaddingY:((te==null?void 0:te.padding)||0)*1};return drawRect(ee,te,re)},"squareRect"),stateStart=__name((ee,te)=>{const{themeVariables:re}=getConfig2(),{lineColor:ie}=re,ne=ee.insert("g").attr("class","node default").attr("id",te.domId||te.id);let ae;if(te.look==="handDrawn"){const se=at.svg(ne).circle(0,0,14,solidStateFill(ie));ae=ne.insert(()=>se)}else ae=ne.insert("circle",":first-child");return ae.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),updateNodeBounds(te,ae),te.intersect=function(oe){return intersect_default.circle(te,7,oe)},ne},"stateStart"),stateEnd=__name((ee,te)=>{const{themeVariables:re}=getConfig2(),{lineColor:ie}=re,ne=ee.insert("g").attr("class","node default").attr("id",te.domId||te.id);let ae,oe;if(te.look==="handDrawn"){const se=at.svg(ne),le=se.circle(0,0,14,{...solidStateFill(ie),roughness:.5}),ce=se.circle(0,0,5,{...solidStateFill(ie),fillStyle:"solid"});ae=ne.insert(()=>le),oe=ne.insert(()=>ce)}else oe=ne.insert("circle",":first-child"),ae=ne.insert("circle",":first-child"),ae.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),oe.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10);return updateNodeBounds(te,ae),te.intersect=function(se){return intersect_default.circle(te,7,se)},ne},"stateEnd"),forkJoin=__name((ee,te,re)=>{const{themeVariables:ie}=getConfig2(),{lineColor:ne}=ie,ae=ee.insert("g").attr("class","node default").attr("id",te.domId||te.id);let oe=70,se=10;re==="LR"&&(oe=10,se=70);const le=-1*oe/2,ce=-1*se/2;let he;if(te.look==="handDrawn"){const ge=at.svg(ae).rectangle(le,ce,oe,se,solidStateFill(ne));he=ae.insert(()=>ge)}else he=ae.append("rect").attr("x",le).attr("y",ce).attr("width",oe).attr("height",se).attr("class","fork-join");updateNodeBounds(te,he);let de=0,ue=0,fe=10;return te.height&&(de=te.height),te.width&&(ue=te.width),te.padding&&(fe=te.padding),te.height=de+fe/2,te.width=ue+fe/2,te.intersect=function(pe){return intersect_default.rect(te,pe)},ae},"forkJoin"),choice=__name((ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{themeVariables:ne}=getConfig2(),{lineColor:ae}=ne,oe=ee.insert("g").attr("class","node default").attr("id",te.domId||te.id),se=28,le=[{x:0,y:se/2},{x:se/2,y:0},{x:0,y:-se/2},{x:-se/2,y:0}];let ce;if(te.look==="handDrawn"){const he=at.svg(oe),de=le.map(function(fe){return[fe.x,fe.y]}),ue=he.polygon(de,solidStateFill(ae));ce=oe.insert(()=>ue)}else ce=oe.insert("polygon",":first-child").attr("points",le.map(function(he){return he.x+","+he.y}).join(" "));return ce.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28).attr("style",ie),te.width=28,te.height=28,te.intersect=function(he){return intersect_default.circle(te,14,he)},oe},"choice"),note=__name(async(ee,te)=>{const{themeVariables:re,handDrawnSeed:ie}=getConfig2(),{noteBorderColor:ne,noteBkgColor:ae}=re;te.useHtmlLabels||(te.centerLabel=!0);const{shapeSvg:se,bbox:le}=await labelHelper(ee,te,"node "+te.cssClasses);log.info("Classes = ",te.cssClasses);const{cssStyles:ce}=te;let he;const de=le.width+te.padding,ue=le.height+te.padding,fe=-de/2,pe=-ue/2;if(te.look==="handDrawn"){const ye=at.svg(se).rectangle(fe,pe,de,ue,{roughness:.7,fill:ae,fillWeight:3,seed:ie,stroke:ne});he=se.insert(()=>ye,":first-child"),he.attr("class","basic label-container").attr("style",ce)}else he=se.insert("rect",":first-child"),he.attr("rx",te.rx).attr("ry",te.ry).attr("x",fe).attr("y",pe).attr("width",de).attr("height",ue);return updateNodeBounds(te,he),te.intersect=function(ge){return intersect_default.rect(te,ge)},se},"note"),stadium=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=ae.height+te.padding,se=ae.width+oe/4+te.padding;let le;const{cssStyles:ce}=te;if(te.look==="handDrawn"){const he=at.svg(ne),de=userNodeOverrides(te,{}),ue=createRoundedRectPathD(-se/2,-oe/2,se,oe,oe/2),fe=he.path(ue,de);le=ne.insert(()=>fe,":first-child"),le.attr("class","basic label-container").attr("style",ce)}else le=ne.insert("rect",":first-child"),le.attr("class","basic label-container").attr("style",ie).attr("rx",oe/2).attr("ry",oe/2).attr("x",-se/2).attr("y",-oe/2).attr("width",se).attr("height",oe);return updateNodeBounds(te,le),te.intersect=function(he){return intersect_default.rect(te,he)},ne},"stadium"),rectWithTitle=__name(async(ee,te)=>{var Ae,ve;const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;let ne;te.cssClasses?ne="node "+te.cssClasses:ne="node default";const ae=ee.insert("g").attr("class",ne).attr("id",te.domId||te.id),oe=ae.insert("g"),se=ae.insert("g").attr("class","label").attr("style",ie),le=te.description,ce=te.label,he=se.node().appendChild(await createLabel_default(ce,te.labelStyle,!0,!0));let de={width:0,height:0};if(evaluate((ve=(Ae=getConfig2())==null?void 0:Ae.flowchart)==null?void 0:ve.htmlLabels)){const Ee=he.children[0],Se=d3select(he);de=Ee.getBoundingClientRect(),Se.attr("width",de.width),Se.attr("height",de.height)}log.info("Text 2",le);const ue=le||[],fe=he.getBBox(),pe=se.node().appendChild(await createLabel_default(ue.join?ue.join("<br/>"):ue,te.labelStyle,!0,!0)),ge=pe.children[0],ye=d3select(pe);de=ge.getBoundingClientRect(),ye.attr("width",de.width),ye.attr("height",de.height);const _e=(te.padding||0)/2;d3select(pe).attr("transform","translate( "+(de.width>fe.width?0:(fe.width-de.width)/2)+", "+(fe.height+_e+5)+")"),d3select(he).attr("transform","translate( "+(de.width<fe.width?0:-(fe.width-de.width)/2)+", 0)"),de=se.node().getBBox(),se.attr("transform","translate("+-de.width/2+", "+(-de.height/2-_e+3)+")");const me=de.width+(te.padding||0),we=de.height+(te.padding||0),xe=-de.width/2-_e,Te=-de.height/2-_e;let ke,Ce;if(te.look==="handDrawn"){const Ee=at.svg(ae),Se=userNodeOverrides(te,{}),Ne=Ee.path(createRoundedRectPathD(xe,Te,me,we,te.rx||0),Se),ze=Ee.line(-de.width/2-_e,-de.height/2-_e+fe.height+_e,de.width/2+_e,-de.height/2-_e+fe.height+_e,Se);Ce=ae.insert(()=>(log.debug("Rough node insert CXC",Ne),ze),":first-child"),ke=ae.insert(()=>(log.debug("Rough node insert CXC",Ne),Ne),":first-child")}else ke=oe.insert("rect",":first-child"),Ce=oe.insert("line"),ke.attr("class","outer title-state").attr("style",ie).attr("x",-de.width/2-_e).attr("y",-de.height/2-_e).attr("width",de.width+(te.padding||0)).attr("height",de.height+(te.padding||0)),Ce.attr("class","divider").attr("x1",-de.width/2-_e).attr("x2",de.width/2+_e).attr("y1",-de.height/2-_e+fe.height+_e).attr("y2",-de.height/2-_e+fe.height+_e);return updateNodeBounds(te,ke),te.intersect=function(Ee){return intersect_default.rect(te,Ee)},ae},"rectWithTitle");function insertPolygonShape(ee,te,re,ie){return ee.insert("polygon",":first-child").attr("points",ie.map(function(ne){return ne.x+","+ne.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-te/2+","+re/2+")")}__name(insertPolygonShape,"insertPolygonShape");var subroutine=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=((te==null?void 0:te.padding)||0)/2,se=ae.width+te.padding,le=ae.height+te.padding,ce=-ae.width/2-oe,he=-ae.height/2-oe,de=[{x:0,y:0},{x:se,y:0},{x:se,y:-le},{x:0,y:-le},{x:0,y:0},{x:-8,y:0},{x:se+8,y:0},{x:se+8,y:-le},{x:-8,y:-le},{x:-8,y:0}];if(te.look==="handDrawn"){const ue=at.svg(ne),fe=userNodeOverrides(te,{}),pe=ue.rectangle(ce-8,he,se+16,le,fe),ge=ue.line(ce,he,ce,he+le,fe),ye=ue.line(ce+se,he,ce+se,he+le,fe);ne.insert(()=>ge,":first-child"),ne.insert(()=>ye,":first-child");const _e=ne.insert(()=>pe,":first-child"),{cssStyles:me}=te;_e.attr("class","basic label-container").attr("style",me),updateNodeBounds(te,_e)}else{const ue=insertPolygonShape(ne,se,le,de);ie&&ue.attr("style",ie),updateNodeBounds(te,ue)}return te.intersect=function(ue){return intersect_default.polygon(te,de,ue)},ne},"subroutine"),createCylinderPathD=__name((ee,te,re,ie,ne,ae)=>[`M${ee},${te+ae}`,`a${ne},${ae} 0,0,0 ${re},0`,`a${ne},${ae} 0,0,0 ${-re},0`,`l0,${ie}`,`a${ne},${ae} 0,0,0 ${re},0`,`l0,${-ie}`].join(" "),"createCylinderPathD"),createOuterCylinderPathD=__name((ee,te,re,ie,ne,ae)=>[`M${ee},${te+ae}`,`M${ee+re},${te+ae}`,`a${ne},${ae} 0,0,0 ${-re},0`,`l0,${ie}`,`a${ne},${ae} 0,0,0 ${re},0`,`l0,${-ie}`].join(" "),"createOuterCylinderPathD"),createInnerCylinderPathD=__name((ee,te,re,ie,ne,ae)=>[`M${ee-re/2},${-ie/2}`,`a${ne},${ae} 0,0,0 ${re},0`].join(" "),"createInnerCylinderPathD"),cylinder=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=ae.width+te.padding,se=oe/2,le=se/(2.5+oe/50),ce=ae.height+le+te.padding;let he;const{cssStyles:de}=te;if(te.look==="handDrawn"){const ue=at.svg(ne),fe=createOuterCylinderPathD(0,0,oe,ce,se,le),pe=createInnerCylinderPathD(0,le,oe,ce,se,le),ge=ue.path(fe,userNodeOverrides(te,{})),ye=ue.path(pe,userNodeOverrides(te,{fill:"none"}));he=ne.insert(()=>ye,":first-child"),he=ne.insert(()=>ge,":first-child"),he.attr("class","basic label-container"),de&&he.attr("style",de)}else{const ue=createCylinderPathD(0,0,oe,ce,se,le);he=ne.insert("path",":first-child").attr("d",ue).attr("class","basic label-container").attr("style",de).attr("style",ie)}return he.attr("label-offset-y",le),he.attr("transform",`translate(${-oe/2}, ${-(ce/2+le)})`),updateNodeBounds(te,he),te.intersect=function(ue){const fe=intersect_default.rect(te,ue),pe=fe.x-(te.x??0);if(se!=0&&(Math.abs(pe)<(te.width??0)/2||Math.abs(pe)==(te.width??0)/2&&Math.abs(fe.y-(te.y??0))>(te.height??0)/2-le)){let ge=le*le*(1-pe*pe/(se*se));ge>0&&(ge=Math.sqrt(ge)),ge=le-ge,ue.y-(te.y??0)>0&&(ge=-ge),fe.y+=ge}return fe},ne},"cylinder"),circle2=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae,halfPadding:oe}=await labelHelper(ee,te,getNodeClasses(te)),se=ae.width/2+oe;let le;const{cssStyles:ce}=te;if(te.look==="handDrawn"){const he=at.svg(ne),de=userNodeOverrides(te,{}),ue=he.circle(0,0,se*2,de);le=ne.insert(()=>ue,":first-child"),le.attr("class","basic label-container").attr("style",ce)}else le=ne.insert("circle",":first-child").attr("class","basic label-container").attr("style",ie).attr("r",se).attr("cx",0).attr("cy",0);return updateNodeBounds(te,le),te.intersect=function(he){return log.info("Circle intersect",te,se,he),intersect_default.circle(te,se,he)},ne},"circle"),doublecircle=__name(async(ee,te)=>{var ue,fe;const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae,halfPadding:oe}=await labelHelper(ee,te,getNodeClasses(te)),le=ae.width/2+oe+5,ce=ae.width/2+oe;let he;const{cssStyles:de}=te;if(te.look==="handDrawn"){const pe=at.svg(ne),ge=userNodeOverrides(te,{roughness:.2,strokeWidth:2.5}),ye=userNodeOverrides(te,{roughness:.2,strokeWidth:1.5}),_e=pe.circle(0,0,le*2,ge),me=pe.circle(0,0,ce*2,ye);he=ne.insert("g",":first-child"),he.attr("class",te.cssClasses).attr("style",de),(ue=he.node())==null||ue.appendChild(_e),(fe=he.node())==null||fe.appendChild(me)}else{he=ne.insert("g",":first-child");const pe=he.insert("circle",":first-child"),ge=he.insert("circle");he.attr("class","basic label-container").attr("style",ie),pe.attr("class","outer-circle").attr("style",ie).attr("r",le).attr("cx",0).attr("cy",0),ge.attr("class","inner-circle").attr("style",ie).attr("r",ce).attr("cx",0).attr("cy",0)}return updateNodeBounds(te,he),te.intersect=function(pe){return log.info("DoubleCircle intersect",te,le,pe),intersect_default.circle(te,le,pe)},ne},"doublecircle"),createPolygonPathD=__name((ee,te,re,ie)=>[`M${ee-ie/2},${te}`,`L${ee+re},${te}`,`L${ee+re},${te-ie}`,`L${ee-ie/2},${te-ie}`,`L${ee},${te-ie/2}`,"Z"].join(" "),"createPolygonPathD"),rect_left_inv_arrow=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=ae.width+te.padding,se=ae.height+te.padding,le=[{x:-se/2,y:0},{x:oe,y:0},{x:oe,y:-se},{x:-se/2,y:-se},{x:0,y:-se/2}];let ce;const{cssStyles:he}=te;if(te.look==="handDrawn"){const de=at.svg(ne),ue=userNodeOverrides(te,{}),fe=createPolygonPathD(0,0,oe,se),pe=de.path(fe,ue);ce=ne.insert(()=>pe,":first-child").attr("transform",`translate(${-oe/2}, ${se/2})`),he&&ce.attr("style",he)}else ce=insertPolygonShape(ne,oe,se,le);return ie&&ce.attr("style",ie),te.width=oe+se,te.height=se,updateNodeBounds(te,ce),te.intersect=function(de){return intersect_default.polygon(te,le,de)},ne},"rect_left_inv_arrow"),createDecisionBoxPathD=__name((ee,te,re)=>[`M${ee+re/2},${te}`,`L${ee+re},${te-re/2}`,`L${ee+re/2},${te-re}`,`L${ee},${te-re/2}`,"Z"].join(" "),"createDecisionBoxPathD"),question=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=ae.width+te.padding,se=ae.height+te.padding,le=oe+se,ce=[{x:le/2,y:0},{x:le,y:-le/2},{x:le/2,y:-le},{x:0,y:-le/2}];let he;const{cssStyles:de}=te;if(te.look==="handDrawn"){const ue=at.svg(ne),fe=userNodeOverrides(te,{}),pe=createDecisionBoxPathD(0,0,le),ge=ue.path(pe,fe);he=ne.insert(()=>ge,":first-child").attr("transform",`translate(${-le/2}, ${le/2})`),de&&he.attr("style",de)}else he=insertPolygonShape(ne,le,le,ce);return ie&&he.attr("style",ie),updateNodeBounds(te,he),te.intersect=function(ue){return log.debug(`APA12 Intersect called SPLIT
point:`,ue,`
node:
`,te,`
res:`,intersect_default.polygon(te,ce,ue)),intersect_default.polygon(te,ce,ue)},ne},"question"),createHexagonPathD=__name((ee,te,re,ie,ne)=>[`M${ee+ne},${te}`,`L${ee+re-ne},${te}`,`L${ee+re},${te-ie/2}`,`L${ee+re-ne},${te-ie}`,`L${ee+ne},${te-ie}`,`L${ee},${te-ie/2}`,"Z"].join(" "),"createHexagonPathD"),hexagon=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=4,se=ae.height+te.padding,le=se/oe,ce=ae.width+2*le+te.padding,he=[{x:le,y:0},{x:ce-le,y:0},{x:ce,y:-se/2},{x:ce-le,y:-se},{x:le,y:-se},{x:0,y:-se/2}];let de;const{cssStyles:ue}=te;if(te.look==="handDrawn"){const fe=at.svg(ne),pe=userNodeOverrides(te,{}),ge=createHexagonPathD(0,0,ce,se,le),ye=fe.path(ge,pe);de=ne.insert(()=>ye,":first-child").attr("transform",`translate(${-ce/2}, ${se/2})`),ue&&de.attr("style",ue)}else de=insertPolygonShape(ne,ce,se,he);return ie&&de.attr("style",ie),te.width=ce,te.height=se,updateNodeBounds(te,de),te.intersect=function(fe){return intersect_default.polygon(te,he,fe)},ne},"hexagon"),createLeanRightPathD=__name((ee,te,re,ie)=>[`M${ee-2*ie/6},${te}`,`L${ee+re-ie/6},${te}`,`L${ee+re+2*ie/6},${te-ie}`,`L${ee+ie/6},${te-ie}`,"Z"].join(" "),"createLeanRightPathD"),lean_right=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=ae.width+te.padding,se=ae.height+te.padding,le=[{x:-2*se/6,y:0},{x:oe-se/6,y:0},{x:oe+2*se/6,y:-se},{x:se/6,y:-se}];let ce;const{cssStyles:he}=te;if(te.look==="handDrawn"){const de=at.svg(ne),ue=userNodeOverrides(te,{}),fe=createLeanRightPathD(0,0,oe,se),pe=de.path(fe,ue);ce=ne.insert(()=>pe,":first-child").attr("transform",`translate(${-oe/2}, ${se/2})`),he&&ce.attr("style",he)}else ce=insertPolygonShape(ne,oe,se,le);return ie&&ce.attr("style",ie),te.width=oe,te.height=se,updateNodeBounds(te,ce),te.intersect=function(de){return intersect_default.polygon(te,le,de)},ne},"lean_right"),createLeanLeftPathD=__name((ee,te,re,ie)=>[`M${ee+2*ie/6},${te}`,`L${ee+re+ie/6},${te}`,`L${ee+re-2*ie/6},${te-ie}`,`L${ee-ie/6},${te-ie}`,"Z"].join(" "),"createLeanLeftPathD"),lean_left=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=ae.width+te.padding,se=ae.height+te.padding,le=[{x:2*se/6,y:0},{x:oe+se/6,y:0},{x:oe-2*se/6,y:-se},{x:-se/6,y:-se}];let ce;const{cssStyles:he}=te;if(te.look==="handDrawn"){const de=at.svg(ne),ue=userNodeOverrides(te,{}),fe=createLeanLeftPathD(0,0,oe,se),pe=de.path(fe,ue);ce=ne.insert(()=>pe,":first-child").attr("transform",`translate(${-oe/2}, ${se/2})`),he&&ce.attr("style",he)}else ce=insertPolygonShape(ne,oe,se,le);return ie&&ce.attr("style",ie),te.width=oe,te.height=se,updateNodeBounds(te,ce),te.intersect=function(de){return intersect_default.polygon(te,le,de)},ne},"lean_left"),createTrapezoidPathD=__name((ee,te,re,ie)=>[`M${ee-2*ie/6},${te}`,`L${ee+re+2*ie/6},${te}`,`L${ee+re-ie/6},${te-ie}`,`L${ee+ie/6},${te-ie}`,"Z"].join(" "),"createTrapezoidPathD"),trapezoid=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=ae.width+te.padding,se=ae.height+te.padding,le=[{x:-2*se/6,y:0},{x:oe+2*se/6,y:0},{x:oe-se/6,y:-se},{x:se/6,y:-se}];let ce;const{cssStyles:he}=te;if(te.look==="handDrawn"){const de=at.svg(ne),ue=userNodeOverrides(te,{}),fe=createTrapezoidPathD(0,0,oe,se),pe=de.path(fe,ue);ce=ne.insert(()=>pe,":first-child").attr("transform",`translate(${-oe/2}, ${se/2})`),he&&ce.attr("style",he)}else ce=insertPolygonShape(ne,oe,se,le);return ie&&ce.attr("style",ie),te.width=oe,te.height=se,updateNodeBounds(te,ce),te.intersect=function(de){return intersect_default.polygon(te,le,de)},ne},"trapezoid"),createInvertedTrapezoidPathD=__name((ee,te,re,ie)=>[`M${ee+ie/6},${te}`,`L${ee+re-ie/6},${te}`,`L${ee+re+2*ie/6},${te-ie}`,`L${ee-2*ie/6},${te-ie}`,"Z"].join(" "),"createInvertedTrapezoidPathD"),inv_trapezoid=__name(async(ee,te)=>{const{labelStyles:re,nodeStyles:ie}=styles2String(te);te.labelStyle=re;const{shapeSvg:ne,bbox:ae}=await labelHelper(ee,te,getNodeClasses(te)),oe=ae.width+te.padding,se=ae.height+te.padding,le=[{x:se/6,y:0},{x:oe-se/6,y:0},{x:oe+2*se/6,y:-se},{x:-2*se/6,y:-se}];let ce;const{cssStyles:he}=te;if(te.look==="handDrawn"){const de=at.svg(ne),ue=userNodeOverrides(te,{}),fe=createInvertedTrapezoidPathD(0,0,oe,se),pe=de.path(fe,ue);ce=ne.insert(()=>pe,":first-child").attr("transform",`translate(${-oe/2}, ${se/2})`),he&&ce.attr("style",he)}else ce=insertPolygonShape(ne,oe,se,le);return ie&&ce.attr("style",ie),te.width=oe,te.height=se,updateNodeBounds(te,ce),te.intersect=function(de){return intersect_default.polygon(te,le,de)},ne},"inv_trapezoid"),labelRect=__name(async(ee,te)=>{const{shapeSvg:re}=await labelHelper(ee,te,"label"),ie=re.insert("rect",":first-child");return ie.attr("width",.1).attr("height",.1),re.attr("class","label edgeLabel"),updateNodeBounds(te,ie),te.intersect=function(oe){return intersect_default.rect(te,oe)},re},"labelRect"),shapes2={state,stateStart,stateEnd,fork:forkJoin,join:forkJoin,choice,note,roundedRect,rectWithTitle,squareRect:squareRect2,stadium,subroutine,cylinder,circle:circle2,doublecircle,odd:rect_left_inv_arrow,diamond:question,hexagon,lean_right,lean_left,trapezoid,inv_trapezoid,labelRect},nodeElems=new Map,insertNode=__name(async(ee,te,re)=>{let ie,ne;if(te.shape==="rect"&&(te.rx&&te.ry?te.shape="roundedRect":te.shape="squareRect"),te.link){let ae;getConfig2().securityLevel==="sandbox"?ae="_top":te.linkTarget&&(ae=te.linkTarget||"_blank"),ie=ee.insert("svg:a").attr("xlink:href",te.link).attr("target",ae),ne=await shapes2[te.shape](ie,te,re)}else ne=await shapes2[te.shape](ee,te,re),ie=ne;return te.tooltip&&ne.attr("title",te.tooltip),nodeElems.set(te.id,ie),te.haveCallback&&nodeElems.get(te.id).attr("class",nodeElems.get(te.id).attr("class")+" clickable"),ie},"insertNode"),setNodeElem=__name((ee,te)=>{nodeElems.set(te.id,ee)},"setNodeElem"),clear3=__name(()=>{nodeElems.clear()},"clear"),positionNode=__name(ee=>{const te=nodeElems.get(ee.id);log.trace("Transforming node",ee.diff,ee,"translate("+(ee.x-ee.width/2-5)+", "+ee.width/2+")");const re=8,ie=ee.diff||0;return ee.clusterNode?te.attr("transform","translate("+(ee.x+ie-ee.width/2)+", "+(ee.y-ee.height/2-re)+")"):te.attr("transform","translate("+ee.x+", "+ee.y+")"),ie},"positionNode"),internalHelpers={common:common_default,getConfig,insertCluster,insertEdge,insertEdgeLabel,insertMarkers:markers_default,insertNode,interpolateToCurve,labelHelper,log,positionEdgeLabel},layoutAlgorithms={},registerLayoutLoaders=__name(ee=>{for(const te of ee)layoutAlgorithms[te.name]=te},"registerLayoutLoaders"),registerDefaultLayoutLoaders=__name(()=>{registerLayoutLoaders([{name:"dagre",loader:__name(async()=>await __vitePreload(()=>import("./dagre-CQ6OS2HX.VLdvIZ2v.js"),__vite__mapDeps([2,3,4,5,6,7,8]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");registerDefaultLayoutLoaders();var render$2=__name(async(ee,te)=>{if(!(ee.layoutAlgorithm in layoutAlgorithms))throw new Error(`Unknown layout algorithm: ${ee.layoutAlgorithm}`);const re=layoutAlgorithms[ee.layoutAlgorithm];return(await re.loader()).render(ee,te,internalHelpers,{algorithm:re.algorithm})},"render"),getRegisteredLayoutAlgorithm=__name((ee="",{fallback:te="dagre"}={})=>{if(ee in layoutAlgorithms)return ee;if(te in layoutAlgorithms)return log.warn(`Layout algorithm ${ee} is not registered. Using ${te} as fallback.`),te;throw new Error(`Both layout algorithms ${ee} and ${te} are not registered.`)},"getRegisteredLayoutAlgorithm"),version="11.0.2",selectSvgElement=__name(ee=>{var ne;const{securityLevel:te}=getConfig2();let re=d3select("body");if(te==="sandbox"){const oe=((ne=d3select(`#i${ee}`).node())==null?void 0:ne.contentDocument)??document;re=d3select(oe.body)}return re.select(`#${ee}`)},"selectSvgElement"),COMMENT$1="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode;function trim(ee){return ee.trim()}function replace(ee,te,re){return ee.replace(te,re)}function indexof(ee,te,re){return ee.indexOf(te,re)}function charat(ee,te){return ee.charCodeAt(te)|0}function substr(ee,te,re){return ee.slice(te,re)}function strlen(ee){return ee.length}function sizeof(ee){return ee.length}function append(ee,te){return te.push(ee),ee}var line=1,column=1,length=0,position=0,character=0,characters="";function node(ee,te,re,ie,ne,ae,oe,se){return{value:ee,root:te,parent:re,type:ie,props:ne,children:ae,line,column,length:oe,return:"",siblings:se}}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position<length?charat(characters,position++):0,column++,character===10&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice(ee,te){return substr(characters,ee,te)}function token(ee){switch(ee){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(ee){return line=column=1,length=strlen(characters=ee),position=0,[]}function dealloc(ee){return characters="",ee}function delimit(ee){return trim(slice(position-1,delimiter(ee===91?ee+2:ee===40?ee+1:ee)))}function whitespace(ee){for(;(character=peek())&&character<33;)next();return token(ee)>2||token(character)>3?"":" "}function escaping(ee,te){for(;--te&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(ee,caret()+(te<6&&peek()==32&&next()==32))}function delimiter(ee){for(;next();)switch(character){case ee:return position;case 34:case 39:ee!==34&&ee!==39&&delimiter(character);break;case 40:ee===41&&delimiter(ee);break;case 92:next();break}return position}function commenter(ee,te){for(;next()&&ee+character!==57;)if(ee+character===84&&peek()===47)break;return"/*"+slice(te,position-1)+"*"+from(ee===47?ee:next())}function identifier(ee){for(;!token(peek());)next();return slice(ee,position)}function compile(ee){return dealloc(parse$2("",null,null,null,[""],ee=alloc(ee),0,[0],ee))}function parse$2(ee,te,re,ie,ne,ae,oe,se,le){for(var ce=0,he=0,de=oe,ue=0,fe=0,pe=0,ge=1,ye=1,_e=1,me=0,we="",xe=ne,Te=ae,ke=ie,Ce=we;ye;)switch(pe=me,me=next()){case 40:if(pe!=108&&charat(Ce,de-1)==58){indexof(Ce+=replace(delimit(me),"&","&\f"),"&\f",abs(ce?se[ce-1]:0))!=-1&&(_e=-1);break}case 34:case 39:case 91:Ce+=delimit(me);break;case 9:case 10:case 13:case 32:Ce+=whitespace(pe);break;case 92:Ce+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),te,re,le),le),(token(pe||1)==5||token(peek()||1)==5)&&strlen(Ce)&&substr(Ce,-1,void 0)!==" "&&(Ce+=" ");break;default:Ce+="/"}break;case 123*ge:se[ce++]=strlen(Ce)*_e;case 125*ge:case 59:case 0:switch(me){case 0:case 125:ye=0;case 59+he:_e==-1&&(Ce=replace(Ce,/\f/g,"")),fe>0&&(strlen(Ce)-de||ge===0&&pe===47)&&append(fe>32?declaration(Ce+";",ie,re,de-1,le):declaration(replace(Ce," ","")+";",ie,re,de-2,le),le);break;case 59:Ce+=";";default:if(append(ke=ruleset(Ce,te,re,ce,he,ne,se,we,xe=[],Te=[],de,ae),ae),me===123)if(he===0)parse$2(Ce,te,ke,ke,xe,ae,de,se,Te);else switch(ue===99&&charat(Ce,3)===110?100:ue){case 100:case 108:case 109:case 115:parse$2(ee,ke,ke,ie&&append(ruleset(ee,ke,ke,0,0,ne,se,we,ne,xe=[],de,Te),Te),ne,Te,de,se,ie?xe:Te);break;default:parse$2(Ce,ke,ke,ke,[""],Te,0,se,Te)}}ce=he=fe=0,ge=_e=1,we=Ce="",de=oe;break;case 58:de=1+strlen(Ce),fe=pe;default:if(ge<1){if(me==123)--ge;else if(me==125&&ge++==0&&prev()==125)continue}switch(Ce+=from(me),me*ge){case 38:_e=he>0?1:(Ce+="\f",-1);break;case 44:se[ce++]=(strlen(Ce)-1)*_e,_e=1;break;case 64:peek()===45&&(Ce+=delimit(next())),ue=peek(),he=de=strlen(we=Ce+=identifier(caret())),me++;break;case 45:pe===45&&strlen(Ce)==2&&(ge=0)}}return ae}function ruleset(ee,te,re,ie,ne,ae,oe,se,le,ce,he,de){for(var ue=ne-1,fe=ne===0?ae:[""],pe=sizeof(fe),ge=0,ye=0,_e=0;ge<ie;++ge)for(var me=0,we=substr(ee,ue+1,ue=abs(ye=oe[ge])),xe=ee;me<pe;++me)(xe=trim(ye>0?fe[me]+" "+we:replace(we,/&\f/g,fe[me])))&&(le[_e++]=xe);return node(ee,te,re,ne===0?RULESET:se,le,ce,he,de)}function comment(ee,te,re,ie){return node(ee,te,re,COMMENT$1,from(char()),substr(ee,2,-2),0,ie)}function declaration(ee,te,re,ie,ne){return node(ee,te,re,DECLARATION,substr(ee,0,ie),substr(ee,ie+1,-1),ie,ne)}function serialize(ee,te){for(var re="",ie=0;ie<ee.length;ie++)re+=te(ee[ie],ie,ee,te)||"";return re}function stringify(ee,te,re,ie){switch(ee.type){case LAYER:if(ee.children.length)break;case IMPORT:case DECLARATION:return ee.return=ee.return||ee.value;case COMMENT$1:return"";case KEYFRAMES:return ee.return=ee.value+"{"+serialize(ee.children,ie)+"}";case RULESET:if(!strlen(ee.value=ee.props.join(",")))return""}return strlen(re=serialize(ee.children,ie))?ee.return=ee.value+"{"+re+"}":""}var id="c4",detector=__name(ee=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(ee),"detector"),loader=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./c4Diagram-ZHOUKFWV.CMYDrXTc.js");return{diagram:te}},__vite__mapDeps([9,10]),import.meta.url);return{id,diagram:ee}},"loader"),plugin={id,detector,loader},c4Detector_default=plugin,id2="flowchart",detector2=__name((ee,te)=>{var re,ie;return((re=te==null?void 0:te.flowchart)==null?void 0:re.defaultRenderer)==="dagre-wrapper"||((ie=te==null?void 0:te.flowchart)==null?void 0:ie.defaultRenderer)==="elk"?!1:/^\s*graph/.test(ee)},"detector"),loader2=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./flowDiagram-TGP4CI55.CK1FTbDV.js");return{diagram:te}},__vite__mapDeps([11,12,13,14]),import.meta.url);return{id:id2,diagram:ee}},"loader"),plugin2={id:id2,detector:detector2,loader:loader2},flowDetector_default=plugin2,id3="flowchart-v2",detector3=__name((ee,te)=>{var re,ie,ne;return((re=te==null?void 0:te.flowchart)==null?void 0:re.defaultRenderer)==="dagre-d3"||((ie=te==null?void 0:te.flowchart)==null?void 0:ie.defaultRenderer)==="elk"?!1:/^\s*graph/.test(ee)&&((ne=te==null?void 0:te.flowchart)==null?void 0:ne.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(ee)},"detector"),loader3=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./flowDiagram-TGP4CI55.CK1FTbDV.js");return{diagram:te}},__vite__mapDeps([11,12,13,14]),import.meta.url);return{id:id3,diagram:ee}},"loader"),plugin3={id:id3,detector:detector3,loader:loader3},flowDetector_v2_default=plugin3,id4="er",detector4=__name(ee=>/^\s*erDiagram/.test(ee),"detector"),loader4=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./erDiagram-762WSSOR.DCEd0AxH.js");return{diagram:te}},__vite__mapDeps([15,3,4,5,6]),import.meta.url);return{id:id4,diagram:ee}},"loader"),plugin4={id:id4,detector:detector4,loader:loader4},erDetector_default=plugin4,id5="gitGraph",detector5=__name(ee=>/^\s*gitGraph/.test(ee),"detector"),loader5=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./gitGraphDiagram-LGD5RUNZ.C306g6DN.js");return{diagram:te}},__vite__mapDeps([16,17,18,19,1,4,6,8]),import.meta.url);return{id:id5,diagram:ee}},"loader"),plugin5={id:id5,detector:detector5,loader:loader5},gitGraphDetector_default=plugin5,id6="gantt",detector6=__name(ee=>/^\s*gantt/.test(ee),"detector"),loader6=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./ganttDiagram-GAYIUD5S.BBAoyECC.js");return{diagram:te}},__vite__mapDeps([20,21,22]),import.meta.url);return{id:id6,diagram:ee}},"loader"),plugin6={id:id6,detector:detector6,loader:loader6},ganttDetector_default=plugin6,id7="info",detector7=__name(ee=>/^\s*info/.test(ee),"detector"),loader7=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./infoDiagram-GSXZ5C4N.B0PH93nI.js");return{diagram:te}},__vite__mapDeps([23,19,1,4,6,8]),import.meta.url);return{id:id7,diagram:ee}},"loader"),info={id:id7,detector:detector7,loader:loader7},id8="pie",detector8=__name(ee=>/^\s*pie/.test(ee),"detector"),loader8=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./pieDiagram-WEX7LNAG.ClS9n4MM.js");return{diagram:te}},__vite__mapDeps([24,17,19,1,4,6,8,25,26,22]),import.meta.url);return{id:id8,diagram:ee}},"loader"),pie={id:id8,detector:detector8,loader:loader8},id9="quadrantChart",detector9=__name(ee=>/^\s*quadrantChart/.test(ee),"detector"),loader9=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./quadrantDiagram-SRYJ5FP7.vGRhXkdR.js");return{diagram:te}},__vite__mapDeps([27,21,22]),import.meta.url);return{id:id9,diagram:ee}},"loader"),plugin7={id:id9,detector:detector9,loader:loader9},quadrantDetector_default=plugin7,id10="xychart",detector10=__name(ee=>/^\s*xychart-beta/.test(ee),"detector"),loader10=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./xychartDiagram-BZZU7QT5.ymDHOT10.js");return{diagram:te}},__vite__mapDeps([28,22,26,21]),import.meta.url);return{id:id10,diagram:ee}},"loader"),plugin8={id:id10,detector:detector10,loader:loader10},xychartDetector_default=plugin8,id11="requirement",detector11=__name(ee=>/^\s*requirement(Diagram)?/.test(ee),"detector"),loader11=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./requirementDiagram-V7TESSIR.DaIojSeB.js");return{diagram:te}},__vite__mapDeps([29,3,4,5,6]),import.meta.url);return{id:id11,diagram:ee}},"loader"),plugin9={id:id11,detector:detector11,loader:loader11},requirementDetector_default=plugin9,id12="sequence",detector12=__name(ee=>/^\s*sequenceDiagram/.test(ee),"detector"),loader12=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./sequenceDiagram-6SD7JOPP.CaKL0Twr.js");return{diagram:te}},__vite__mapDeps([30,10,18]),import.meta.url);return{id:id12,diagram:ee}},"loader"),plugin10={id:id12,detector:detector12,loader:loader12},sequenceDetector_default=plugin10,id13="class",detector13=__name((ee,te)=>{var re;return((re=te==null?void 0:te.class)==null?void 0:re.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(ee)},"detector"),loader13=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./classDiagram-MQQPYQM5.NcXMI_ZR.js");return{diagram:te}},__vite__mapDeps([31,32,3,4,5,6]),import.meta.url);return{id:id13,diagram:ee}},"loader"),plugin11={id:id13,detector:detector13,loader:loader13},classDetector_default=plugin11,id14="classDiagram",detector14=__name((ee,te)=>{var re;return/^\s*classDiagram/.test(ee)&&((re=te==null?void 0:te.class)==null?void 0:re.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(ee)},"detector"),loader14=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./classDiagram-v2-4S5WAI72.DfAlJAdL.js");return{diagram:te}},__vite__mapDeps([33,34,13,32,3,4,5,6,7,8]),import.meta.url);return{id:id14,diagram:ee}},"loader"),plugin12={id:id14,detector:detector14,loader:loader14},classDetector_V2_default=plugin12,id15="state",detector15=__name((ee,te)=>{var re;return((re=te==null?void 0:te.state)==null?void 0:re.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(ee)},"detector"),loader15=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./stateDiagram-N22R6T2Y.YHzsVoVt.js");return{diagram:te}},__vite__mapDeps([35,36,12,13,3,4,5,6]),import.meta.url);return{id:id15,diagram:ee}},"loader"),plugin13={id:id15,detector:detector15,loader:loader15},stateDetector_default=plugin13,id16="stateDiagram",detector16=__name((ee,te)=>{var re;return!!(/^\s*stateDiagram-v2/.test(ee)||/^\s*stateDiagram/.test(ee)&&((re=te==null?void 0:te.state)==null?void 0:re.defaultRenderer)==="dagre-wrapper")},"detector"),loader16=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./stateDiagram-v2-QXVA2PVL.Dy6xYaFw.js");return{diagram:te}},__vite__mapDeps([37,36,12,13]),import.meta.url);return{id:id16,diagram:ee}},"loader"),plugin14={id:id16,detector:detector16,loader:loader16},stateDetector_V2_default=plugin14,id17="journey",detector17=__name(ee=>/^\s*journey/.test(ee),"detector"),loader17=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./journeyDiagram-35ZZFJAM.BxiBLFMB.js");return{diagram:te}},__vite__mapDeps([38,10,25]),import.meta.url);return{id:id17,diagram:ee}},"loader"),plugin15={id:id17,detector:detector17,loader:loader17},journeyDetector_default=plugin15,draw=__name((ee,te,re)=>{log.debug(`rendering svg for syntax error
`);const ie=selectSvgElement(te),ne=ie.append("g");ie.attr("viewBox","0 0 2412 512"),configureSvgSize(ie,100,512,!0),ne.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"),ne.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"),ne.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"),ne.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"),ne.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"),ne.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"),ne.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),ne.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${re}`)},"draw"),renderer={draw},errorRenderer_default=renderer,diagram={db:{},renderer,parser:{parse:__name(()=>{},"parse")}},errorDiagram_default=diagram,id18="flowchart-elk",detector18=__name((ee,te={})=>{var re;return/^\s*flowchart-elk/.test(ee)||/^\s*flowchart|graph/.test(ee)&&((re=te==null?void 0:te.flowchart)==null?void 0:re.defaultRenderer)==="elk"?(te.layout="elk",!0):!1},"detector"),loader18=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./flowDiagram-TGP4CI55.CK1FTbDV.js");return{diagram:te}},__vite__mapDeps([11,12,13,14]),import.meta.url);return{id:id18,diagram:ee}},"loader"),plugin16={id:id18,detector:detector18,loader:loader18},detector_default=plugin16,id19="timeline",detector19=__name(ee=>/^\s*timeline/.test(ee),"detector"),loader19=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./timeline-definition-SFF34UE4.DU6yl4Re.js");return{diagram:te}},__vite__mapDeps([39,25]),import.meta.url);return{id:id19,diagram:ee}},"loader"),plugin17={id:id19,detector:detector19,loader:loader19},detector_default2=plugin17,id20="mindmap",detector20=__name(ee=>/^\s*mindmap/.test(ee),"detector"),loader20=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./mindmap-definition-6NGNQFMS.DPGwYIRH.js");return{diagram:te}},[],import.meta.url);return{id:id20,diagram:ee}},"loader"),plugin18={id:id20,detector:detector20,loader:loader20},detector_default3=plugin18,id21="sankey",detector21=__name(ee=>/^\s*sankey-beta/.test(ee),"detector"),loader21=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./sankeyDiagram-XVFEVEVI.BjBmXFwF.js");return{diagram:te}},__vite__mapDeps([40,26,22]),import.meta.url);return{id:id21,diagram:ee}},"loader"),plugin19={id:id21,detector:detector21,loader:loader21},sankeyDetector_default=plugin19,id22="packet",detector22=__name(ee=>/^\s*packet-beta/.test(ee),"detector"),loader22=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./diagram-KYCGQLJB.BT9Fkfmg.js");return{diagram:te}},__vite__mapDeps([41,17,19,1,4,6,8]),import.meta.url);return{id:id22,diagram:ee}},"loader"),packet={id:id22,detector:detector22,loader:loader22},id23="block",detector23=__name(ee=>/^\s*block-beta/.test(ee),"detector"),loader23=__name(async()=>{const{diagram:ee}=await __vitePreload(async()=>{const{diagram:te}=await import("./blockDiagram-V6UOASA5.BSZaBRqU.js");return{diagram:te}},__vite__mapDeps([42,34,13,8,4,3,14]),import.meta.url);return{id:id23,diagram:ee}},"loader"),plugin20={id:id23,detector:detector23,loader:loader23},blockDetector_default=plugin20,hasLoadedDiagrams=!1,addDiagrams=__name(()=>{hasLoadedDiagrams||(hasLoadedDiagrams=!0,registerDiagram("error",errorDiagram_default,ee=>ee.toLowerCase().trim()==="error"),registerDiagram("---",{db:{clear:__name(()=>{},"clear")},styles:{},renderer:{draw:__name(()=>{},"draw")},parser:{parse:__name(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:__name(()=>null,"init")},ee=>ee.toLowerCase().trimStart().startsWith("---")),registerLazyLoadedDiagrams(c4Detector_default,classDetector_V2_default,classDetector_default,erDetector_default,ganttDetector_default,info,pie,requirementDetector_default,sequenceDetector_default,detector_default,flowDetector_v2_default,flowDetector_default,detector_default3,detector_default2,gitGraphDetector_default,stateDetector_V2_default,stateDetector_default,journeyDetector_default,quadrantDetector_default,sankeyDetector_default,packet,xychartDetector_default,blockDetector_default))},"addDiagrams"),loadRegisteredDiagrams=__name(async()=>{log.debug("Loading registered diagrams");const te=(await Promise.allSettled(Object.entries(detectors).map(async([re,{detector:ie,loader:ne}])=>{if(ne)try{getDiagram(re)}catch{try{const{diagram:ae,id:oe}=await ne();registerDiagram(oe,ae,ie)}catch(ae){throw log.error(`Failed to load external diagram with key ${re}. Removing from detectors.`),delete detectors[re],ae}}}))).filter(re=>re.status==="rejected");if(te.length>0){log.error(`Failed to load ${te.length} external diagrams`);for(const re of te)log.error(re);throw new Error(`Failed to load ${te.length} external diagrams`)}},"loadRegisteredDiagrams"),bt,Diagram=(bt=class{constructor(te,re,ie,ne,ae){this.type=te,this.text=re,this.db=ie,this.parser=ne,this.renderer=ae}static async fromText(te,re={}){var ce,he;const ie=getConfig(),ne=detectType(te,ie);te=encodeEntities(te)+`
`;try{getDiagram(ne)}catch{const de=getDiagramLoader(ne);if(!de)throw new UnknownDiagramError(`Diagram ${ne} not found.`);const{id:ue,diagram:fe}=await de();registerDiagram(ue,fe)}const{db:ae,parser:oe,renderer:se,init:le}=getDiagram(ne);return oe.parser&&(oe.parser.yy=ae),(ce=ae.clear)==null||ce.call(ae),le==null||le(ie),re.title&&((he=ae.setDiagramTitle)==null||he.call(ae,re.title)),await oe.parse(te),new bt(ne,te,ae,oe,se)}async render(te,re){await this.renderer.draw(this.text,te,re,this)}getParser(){return this.parser}getType(){return this.type}},__name(bt,"Diagram"),bt),interactionFunctions=[],attachFunctions=__name(()=>{interactionFunctions.forEach(ee=>{ee()}),interactionFunctions=[]},"attachFunctions"),SVG_ROLE="graphics-document document";function setA11yDiagramInfo(ee,te){ee.attr("role",SVG_ROLE),te!==""&&ee.attr("aria-roledescription",te)}__name(setA11yDiagramInfo,"setA11yDiagramInfo");function addSVGa11yTitleDescription(ee,te,re,ie){if(ee.insert!==void 0){if(re){const ne=`chart-desc-${ie}`;ee.attr("aria-describedby",ne),ee.insert("desc",":first-child").attr("id",ne).text(re)}if(te){const ne=`chart-title-${ie}`;ee.attr("aria-labelledby",ne),ee.insert("title",":first-child").attr("id",ne).text(te)}}}__name(addSVGa11yTitleDescription,"addSVGa11yTitleDescription");var cleanupComments=__name(ee=>ee.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function isNothing(ee){return typeof ee>"u"||ee===null}__name(isNothing,"isNothing");function isObject(ee){return typeof ee=="object"&&ee!==null}__name(isObject,"isObject");function toArray(ee){return Array.isArray(ee)?ee:isNothing(ee)?[]:[ee]}__name(toArray,"toArray");function extend(ee,te){var re,ie,ne,ae;if(te)for(ae=Object.keys(te),re=0,ie=ae.length;re<ie;re+=1)ne=ae[re],ee[ne]=te[ne];return ee}__name(extend,"extend");function repeat(ee,te){var re="",ie;for(ie=0;ie<te;ie+=1)re+=ee;return re}__name(repeat,"repeat");function isNegativeZero(ee){return ee===0&&Number.NEGATIVE_INFINITY===1/ee}__name(isNegativeZero,"isNegativeZero");var isNothing_1=isNothing,isObject_1=isObject,toArray_1=toArray,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend,common$1={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(ee,te){var re="",ie=ee.reason||"(unknown reason)";return ee.mark?(ee.mark.name&&(re+='in "'+ee.mark.name+'" '),re+="("+(ee.mark.line+1)+":"+(ee.mark.column+1)+")",!te&&ee.mark.snippet&&(re+=`
`+ee.mark.snippet),ie+" "+re):ie}__name(formatError,"formatError");function YAMLException$1(ee,te){Error.call(this),this.name="YAMLException",this.reason=ee,this.mark=te,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}__name(YAMLException$1,"YAMLException$1");YAMLException$1.prototype=Object.create(Error.prototype);YAMLException$1.prototype.constructor=YAMLException$1;YAMLException$1.prototype.toString=__name(function ee(te){return this.name+": "+formatError(this,te)},"toString");var exception=YAMLException$1;function getLine(ee,te,re,ie,ne){var ae="",oe="",se=Math.floor(ne/2)-1;return ie-te>se&&(ae=" ... ",te=ie-se+ae.length),re-ie>se&&(oe=" ...",re=ie+se-oe.length),{str:ae+ee.slice(te,re).replace(/\t/g,"→")+oe,pos:ie-te+ae.length}}__name(getLine,"getLine");function padStart(ee,te){return common$1.repeat(" ",te-ee.length)+ee}__name(padStart,"padStart");function makeSnippet(ee,te){if(te=Object.create(te||null),!ee.buffer)return null;te.maxLength||(te.maxLength=79),typeof te.indent!="number"&&(te.indent=1),typeof te.linesBefore!="number"&&(te.linesBefore=3),typeof te.linesAfter!="number"&&(te.linesAfter=2);for(var re=/\r?\n|\r|\0/g,ie=[0],ne=[],ae,oe=-1;ae=re.exec(ee.buffer);)ne.push(ae.index),ie.push(ae.index+ae[0].length),ee.position<=ae.index&&oe<0&&(oe=ie.length-2);oe<0&&(oe=ie.length-1);var se="",le,ce,he=Math.min(ee.line+te.linesAfter,ne.length).toString().length,de=te.maxLength-(te.indent+he+3);for(le=1;le<=te.linesBefore&&!(oe-le<0);le++)ce=getLine(ee.buffer,ie[oe-le],ne[oe-le],ee.position-(ie[oe]-ie[oe-le]),de),se=common$1.repeat(" ",te.indent)+padStart((ee.line-le+1).toString(),he)+" | "+ce.str+`
`+se;for(ce=getLine(ee.buffer,ie[oe],ne[oe],ee.position,de),se+=common$1.repeat(" ",te.indent)+padStart((ee.line+1).toString(),he)+" | "+ce.str+`
`,se+=common$1.repeat("-",te.indent+he+3+ce.pos)+`^
`,le=1;le<=te.linesAfter&&!(oe+le>=ne.length);le++)ce=getLine(ee.buffer,ie[oe+le],ne[oe+le],ee.position-(ie[oe]-ie[oe+le]),de),se+=common$1.repeat(" ",te.indent)+padStart((ee.line+le+1).toString(),he)+" | "+ce.str+`
`;return se.replace(/\n$/,"")}__name(makeSnippet,"makeSnippet");var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(ee){var te={};return ee!==null&&Object.keys(ee).forEach(function(re){ee[re].forEach(function(ie){te[String(ie)]=re})}),te}__name(compileStyleAliases,"compileStyleAliases");function Type$1(ee,te){if(te=te||{},Object.keys(te).forEach(function(re){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(re)===-1)throw new exception('Unknown option "'+re+'" is met in definition of "'+ee+'" YAML type.')}),this.options=te,this.tag=ee,this.kind=te.kind||null,this.resolve=te.resolve||function(){return!0},this.construct=te.construct||function(re){return re},this.instanceOf=te.instanceOf||null,this.predicate=te.predicate||null,this.represent=te.represent||null,this.representName=te.representName||null,this.defaultStyle=te.defaultStyle||null,this.multi=te.multi||!1,this.styleAliases=compileStyleAliases(te.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+ee+'" YAML type.')}__name(Type$1,"Type$1");var type=Type$1;function compileList(ee,te){var re=[];return ee[te].forEach(function(ie){var ne=re.length;re.forEach(function(ae,oe){ae.tag===ie.tag&&ae.kind===ie.kind&&ae.multi===ie.multi&&(ne=oe)}),re[ne]=ie}),re}__name(compileList,"compileList");function compileMap(){var ee={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},te,re;function ie(ne){ne.multi?(ee.multi[ne.kind].push(ne),ee.multi.fallback.push(ne)):ee[ne.kind][ne.tag]=ee.fallback[ne.tag]=ne}for(__name(ie,"collectType"),te=0,re=arguments.length;te<re;te+=1)arguments[te].forEach(ie);return ee}__name(compileMap,"compileMap");function Schema$1(ee){return this.extend(ee)}__name(Schema$1,"Schema$1");Schema$1.prototype.extend=__name(function ee(te){var re=[],ie=[];if(te instanceof type)ie.push(te);else if(Array.isArray(te))ie=ie.concat(te);else if(te&&(Array.isArray(te.implicit)||Array.isArray(te.explicit)))te.implicit&&(re=re.concat(te.implicit)),te.explicit&&(ie=ie.concat(te.explicit));else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");re.forEach(function(ae){if(!(ae instanceof type))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(ae.loadKind&&ae.loadKind!=="scalar")throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(ae.multi)throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),ie.forEach(function(ae){if(!(ae instanceof type))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var ne=Object.create(Schema$1.prototype);return ne.implicit=(this.implicit||[]).concat(re),ne.explicit=(this.explicit||[]).concat(ie),ne.compiledImplicit=compileList(ne,"implicit"),ne.compiledExplicit=compileList(ne,"explicit"),ne.compiledTypeMap=compileMap(ne.compiledImplicit,ne.compiledExplicit),ne},"extend");var schema=Schema$1,str=new type("tag:yaml.org,2002:str",{kind:"scalar",construct:__name(function(ee){return ee!==null?ee:""},"construct")}),seq=new type("tag:yaml.org,2002:seq",{kind:"sequence",construct:__name(function(ee){return ee!==null?ee:[]},"construct")}),map=new type("tag:yaml.org,2002:map",{kind:"mapping",construct:__name(function(ee){return ee!==null?ee:{}},"construct")}),failsafe=new schema({explicit:[str,seq,map]});function resolveYamlNull(ee){if(ee===null)return!0;var te=ee.length;return te===1&&ee==="~"||te===4&&(ee==="null"||ee==="Null"||ee==="NULL")}__name(resolveYamlNull,"resolveYamlNull");function constructYamlNull(){return null}__name(constructYamlNull,"constructYamlNull");function isNull(ee){return ee===null}__name(isNull,"isNull");var _null=new type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:__name(function(){return"~"},"canonical"),lowercase:__name(function(){return"null"},"lowercase"),uppercase:__name(function(){return"NULL"},"uppercase"),camelcase:__name(function(){return"Null"},"camelcase"),empty:__name(function(){return""},"empty")},defaultStyle:"lowercase"});function resolveYamlBoolean(ee){if(ee===null)return!1;var te=ee.length;return te===4&&(ee==="true"||ee==="True"||ee==="TRUE")||te===5&&(ee==="false"||ee==="False"||ee==="FALSE")}__name(resolveYamlBoolean,"resolveYamlBoolean");function constructYamlBoolean(ee){return ee==="true"||ee==="True"||ee==="TRUE"}__name(constructYamlBoolean,"constructYamlBoolean");function isBoolean(ee){return Object.prototype.toString.call(ee)==="[object Boolean]"}__name(isBoolean,"isBoolean");var bool=new type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:__name(function(ee){return ee?"true":"false"},"lowercase"),uppercase:__name(function(ee){return ee?"TRUE":"FALSE"},"uppercase"),camelcase:__name(function(ee){return ee?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function isHexCode(ee){return 48<=ee&&ee<=57||65<=ee&&ee<=70||97<=ee&&ee<=102}__name(isHexCode,"isHexCode");function isOctCode(ee){return 48<=ee&&ee<=55}__name(isOctCode,"isOctCode");function isDecCode(ee){return 48<=ee&&ee<=57}__name(isDecCode,"isDecCode");function resolveYamlInteger(ee){if(ee===null)return!1;var te=ee.length,re=0,ie=!1,ne;if(!te)return!1;if(ne=ee[re],(ne==="-"||ne==="+")&&(ne=ee[++re]),ne==="0"){if(re+1===te)return!0;if(ne=ee[++re],ne==="b"){for(re++;re<te;re++)if(ne=ee[re],ne!=="_"){if(ne!=="0"&&ne!=="1")return!1;ie=!0}return ie&&ne!=="_"}if(ne==="x"){for(re++;re<te;re++)if(ne=ee[re],ne!=="_"){if(!isHexCode(ee.charCodeAt(re)))return!1;ie=!0}return ie&&ne!=="_"}if(ne==="o"){for(re++;re<te;re++)if(ne=ee[re],ne!=="_"){if(!isOctCode(ee.charCodeAt(re)))return!1;ie=!0}return ie&&ne!=="_"}}if(ne==="_")return!1;for(;re<te;re++)if(ne=ee[re],ne!=="_"){if(!isDecCode(ee.charCodeAt(re)))return!1;ie=!0}return!(!ie||ne==="_")}__name(resolveYamlInteger,"resolveYamlInteger");function constructYamlInteger(ee){var te=ee,re=1,ie;if(te.indexOf("_")!==-1&&(te=te.replace(/_/g,"")),ie=te[0],(ie==="-"||ie==="+")&&(ie==="-"&&(re=-1),te=te.slice(1),ie=te[0]),te==="0")return 0;if(ie==="0"){if(te[1]==="b")return re*parseInt(te.slice(2),2);if(te[1]==="x")return re*parseInt(te.slice(2),16);if(te[1]==="o")return re*parseInt(te.slice(2),8)}return re*parseInt(te,10)}__name(constructYamlInteger,"constructYamlInteger");function isInteger(ee){return Object.prototype.toString.call(ee)==="[object Number]"&&ee%1===0&&!common$1.isNegativeZero(ee)}__name(isInteger,"isInteger");var int=new type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:__name(function(ee){return ee>=0?"0b"+ee.toString(2):"-0b"+ee.toString(2).slice(1)},"binary"),octal:__name(function(ee){return ee>=0?"0o"+ee.toString(8):"-0o"+ee.toString(8).slice(1)},"octal"),decimal:__name(function(ee){return ee.toString(10)},"decimal"),hexadecimal:__name(function(ee){return ee>=0?"0x"+ee.toString(16).toUpperCase():"-0x"+ee.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(ee){return!(ee===null||!YAML_FLOAT_PATTERN.test(ee)||ee[ee.length-1]==="_")}__name(resolveYamlFloat,"resolveYamlFloat");function constructYamlFloat(ee){var te,re;return te=ee.replace(/_/g,"").toLowerCase(),re=te[0]==="-"?-1:1,"+-".indexOf(te[0])>=0&&(te=te.slice(1)),te===".inf"?re===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:te===".nan"?NaN:re*parseFloat(te,10)}__name(constructYamlFloat,"constructYamlFloat");var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(ee,te){var re;if(isNaN(ee))switch(te){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===ee)switch(te){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===ee)switch(te){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common$1.isNegativeZero(ee))return"-0.0";return re=ee.toString(10),SCIENTIFIC_WITHOUT_DOT.test(re)?re.replace("e",".e"):re}__name(representYamlFloat,"representYamlFloat");function isFloat(ee){return Object.prototype.toString.call(ee)==="[object Number]"&&(ee%1!==0||common$1.isNegativeZero(ee))}__name(isFloat,"isFloat");var float=new type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"}),json=failsafe.extend({implicit:[_null,bool,int,float]}),core=json,YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(ee){return ee===null?!1:YAML_DATE_REGEXP.exec(ee)!==null||YAML_TIMESTAMP_REGEXP.exec(ee)!==null}__name(resolveYamlTimestamp,"resolveYamlTimestamp");function constructYamlTimestamp(ee){var te,re,ie,ne,ae,oe,se,le=0,ce=null,he,de,ue;if(te=YAML_DATE_REGEXP.exec(ee),te===null&&(te=YAML_TIMESTAMP_REGEXP.exec(ee)),te===null)throw new Error("Date resolve error");if(re=+te[1],ie=+te[2]-1,ne=+te[3],!te[4])return new Date(Date.UTC(re,ie,ne));if(ae=+te[4],oe=+te[5],se=+te[6],te[7]){for(le=te[7].slice(0,3);le.length<3;)le+="0";le=+le}return te[9]&&(he=+te[10],de=+(te[11]||0),ce=(he*60+de)*6e4,te[9]==="-"&&(ce=-ce)),ue=new Date(Date.UTC(re,ie,ne,ae,oe,se,le)),ce&&ue.setTime(ue.getTime()-ce),ue}__name(constructYamlTimestamp,"constructYamlTimestamp");function representYamlTimestamp(ee){return ee.toISOString()}__name(representYamlTimestamp,"representYamlTimestamp");var timestamp=new type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(ee){return ee==="<<"||ee===null}__name(resolveYamlMerge,"resolveYamlMerge");var merge=new type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge}),BASE64_MAP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function resolveYamlBinary(ee){if(ee===null)return!1;var te,re,ie=0,ne=ee.length,ae=BASE64_MAP;for(re=0;re<ne;re++)if(te=ae.indexOf(ee.charAt(re)),!(te>64)){if(te<0)return!1;ie+=6}return ie%8===0}__name(resolveYamlBinary,"resolveYamlBinary");function constructYamlBinary(ee){var te,re,ie=ee.replace(/[\r\n=]/g,""),ne=ie.length,ae=BASE64_MAP,oe=0,se=[];for(te=0;te<ne;te++)te%4===0&&te&&(se.push(oe>>16&255),se.push(oe>>8&255),se.push(oe&255)),oe=oe<<6|ae.indexOf(ie.charAt(te));return re=ne%4*6,re===0?(se.push(oe>>16&255),se.push(oe>>8&255),se.push(oe&255)):re===18?(se.push(oe>>10&255),se.push(oe>>2&255)):re===12&&se.push(oe>>4&255),new Uint8Array(se)}__name(constructYamlBinary,"constructYamlBinary");function representYamlBinary(ee){var te="",re=0,ie,ne,ae=ee.length,oe=BASE64_MAP;for(ie=0;ie<ae;ie++)ie%3===0&&ie&&(te+=oe[re>>18&63],te+=oe[re>>12&63],te+=oe[re>>6&63],te+=oe[re&63]),re=(re<<8)+ee[ie];return ne=ae%3,ne===0?(te+=oe[re>>18&63],te+=oe[re>>12&63],te+=oe[re>>6&63],te+=oe[re&63]):ne===2?(te+=oe[re>>10&63],te+=oe[re>>4&63],te+=oe[re<<2&63],te+=oe[64]):ne===1&&(te+=oe[re>>2&63],te+=oe[re<<4&63],te+=oe[64],te+=oe[64]),te}__name(representYamlBinary,"representYamlBinary");function isBinary(ee){return Object.prototype.toString.call(ee)==="[object Uint8Array]"}__name(isBinary,"isBinary");var binary=new type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty$3=Object.prototype.hasOwnProperty,_toString$2=Object.prototype.toString;function resolveYamlOmap(ee){if(ee===null)return!0;var te=[],re,ie,ne,ae,oe,se=ee;for(re=0,ie=se.length;re<ie;re+=1){if(ne=se[re],oe=!1,_toString$2.call(ne)!=="[object Object]")return!1;for(ae in ne)if(_hasOwnProperty$3.call(ne,ae))if(!oe)oe=!0;else return!1;if(!oe)return!1;if(te.indexOf(ae)===-1)te.push(ae);else return!1}return!0}__name(resolveYamlOmap,"resolveYamlOmap");function constructYamlOmap(ee){return ee!==null?ee:[]}__name(constructYamlOmap,"constructYamlOmap");var omap=new type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString$1=Object.prototype.toString;function resolveYamlPairs(ee){if(ee===null)return!0;var te,re,ie,ne,ae,oe=ee;for(ae=new Array(oe.length),te=0,re=oe.length;te<re;te+=1){if(ie=oe[te],_toString$1.call(ie)!=="[object Object]"||(ne=Object.keys(ie),ne.length!==1))return!1;ae[te]=[ne[0],ie[ne[0]]]}return!0}__name(resolveYamlPairs,"resolveYamlPairs");function constructYamlPairs(ee){if(ee===null)return[];var te,re,ie,ne,ae,oe=ee;for(ae=new Array(oe.length),te=0,re=oe.length;te<re;te+=1)ie=oe[te],ne=Object.keys(ie),ae[te]=[ne[0],ie[ne[0]]];return ae}__name(constructYamlPairs,"constructYamlPairs");var pairs=new type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty$2=Object.prototype.hasOwnProperty;function resolveYamlSet(ee){if(ee===null)return!0;var te,re=ee;for(te in re)if(_hasOwnProperty$2.call(re,te)&&re[te]!==null)return!1;return!0}__name(resolveYamlSet,"resolveYamlSet");function constructYamlSet(ee){return ee!==null?ee:{}}__name(constructYamlSet,"constructYamlSet");var set=new type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet}),_default=core.extend({implicit:[timestamp,merge],explicit:[binary,omap,pairs,set]}),_hasOwnProperty$1=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(ee){return Object.prototype.toString.call(ee)}__name(_class,"_class");function is_EOL(ee){return ee===10||ee===13}__name(is_EOL,"is_EOL");function is_WHITE_SPACE(ee){return ee===9||ee===32}__name(is_WHITE_SPACE,"is_WHITE_SPACE");function is_WS_OR_EOL(ee){return ee===9||ee===32||ee===10||ee===13}__name(is_WS_OR_EOL,"is_WS_OR_EOL");function is_FLOW_INDICATOR(ee){return ee===44||ee===91||ee===93||ee===123||ee===125}__name(is_FLOW_INDICATOR,"is_FLOW_INDICATOR");function fromHexCode(ee){var te;return 48<=ee&&ee<=57?ee-48:(te=ee|32,97<=te&&te<=102?te-97+10:-1)}__name(fromHexCode,"fromHexCode");function escapedHexLen(ee){return ee===120?2:ee===117?4:ee===85?8:0}__name(escapedHexLen,"escapedHexLen");function fromDecimalCode(ee){return 48<=ee&&ee<=57?ee-48:-1}__name(fromDecimalCode,"fromDecimalCode");function simpleEscapeSequence(ee){return ee===48?"\0":ee===97?"\x07":ee===98?"\b":ee===116||ee===9?" ":ee===110?`
`:ee===118?"\v":ee===102?"\f":ee===114?"\r":ee===101?"\x1B":ee===32?" ":ee===34?'"':ee===47?"/":ee===92?"\\":ee===78?"…":ee===95?" ":ee===76?"\u2028":ee===80?"\u2029":""}__name(simpleEscapeSequence,"simpleEscapeSequence");function charFromCodepoint(ee){return ee<=65535?String.fromCharCode(ee):String.fromCharCode((ee-65536>>10)+55296,(ee-65536&1023)+56320)}__name(charFromCodepoint,"charFromCodepoint");var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);var i;function State$1(ee,te){this.input=ee,this.filename=te.filename||null,this.schema=te.schema||_default,this.onWarning=te.onWarning||null,this.legacy=te.legacy||!1,this.json=te.json||!1,this.listener=te.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=ee.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}__name(State$1,"State$1");function generateError(ee,te){var re={name:ee.filename,buffer:ee.input.slice(0,-1),position:ee.position,line:ee.line,column:ee.position-ee.lineStart};return re.snippet=snippet(re),new exception(te,re)}__name(generateError,"generateError");function throwError(ee,te){throw generateError(ee,te)}__name(throwError,"throwError");function throwWarning(ee,te){ee.onWarning&&ee.onWarning.call(null,generateError(ee,te))}__name(throwWarning,"throwWarning");var directiveHandlers={YAML:__name(function ee(te,re,ie){var ne,ae,oe;te.version!==null&&throwError(te,"duplication of %YAML directive"),ie.length!==1&&throwError(te,"YAML directive accepts exactly one argument"),ne=/^([0-9]+)\.([0-9]+)$/.exec(ie[0]),ne===null&&throwError(te,"ill-formed argument of the YAML directive"),ae=parseInt(ne[1],10),oe=parseInt(ne[2],10),ae!==1&&throwError(te,"unacceptable YAML version of the document"),te.version=ie[0],te.checkLineBreaks=oe<2,oe!==1&&oe!==2&&throwWarning(te,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:__name(function ee(te,re,ie){var ne,ae;ie.length!==2&&throwError(te,"TAG directive accepts exactly two arguments"),ne=ie[0],ae=ie[1],PATTERN_TAG_HANDLE.test(ne)||throwError(te,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty$1.call(te.tagMap,ne)&&throwError(te,'there is a previously declared suffix for "'+ne+'" tag handle'),PATTERN_TAG_URI.test(ae)||throwError(te,"ill-formed tag prefix (second argument) of the TAG directive");try{ae=decodeURIComponent(ae)}catch{throwError(te,"tag prefix is malformed: "+ae)}te.tagMap[ne]=ae},"handleTagDirective")};function captureSegment(ee,te,re,ie){var ne,ae,oe,se;if(te<re){if(se=ee.input.slice(te,re),ie)for(ne=0,ae=se.length;ne<ae;ne+=1)oe=se.charCodeAt(ne),oe===9||32<=oe&&oe<=1114111||throwError(ee,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(se)&&throwError(ee,"the stream contains non-printable characters");ee.result+=se}}__name(captureSegment,"captureSegment");function mergeMappings(ee,te,re,ie){var ne,ae,oe,se;for(common$1.isObject(re)||throwError(ee,"cannot merge mappings; the provided source object is unacceptable"),ne=Object.keys(re),oe=0,se=ne.length;oe<se;oe+=1)ae=ne[oe],_hasOwnProperty$1.call(te,ae)||(te[ae]=re[ae],ie[ae]=!0)}__name(mergeMappings,"mergeMappings");function storeMappingPair(ee,te,re,ie,ne,ae,oe,se,le){var ce,he;if(Array.isArray(ne))for(ne=Array.prototype.slice.call(ne),ce=0,he=ne.length;ce<he;ce+=1)Array.isArray(ne[ce])&&throwError(ee,"nested arrays are not supported inside keys"),typeof ne=="object"&&_class(ne[ce])==="[object Object]"&&(ne[ce]="[object Object]");if(typeof ne=="object"&&_class(ne)==="[object Object]"&&(ne="[object Object]"),ne=String(ne),te===null&&(te={}),ie==="tag:yaml.org,2002:merge")if(Array.isArray(ae))for(ce=0,he=ae.length;ce<he;ce+=1)mergeMappings(ee,te,ae[ce],re);else mergeMappings(ee,te,ae,re);else!ee.json&&!_hasOwnProperty$1.call(re,ne)&&_hasOwnProperty$1.call(te,ne)&&(ee.line=oe||ee.line,ee.lineStart=se||ee.lineStart,ee.position=le||ee.position,throwError(ee,"duplicated mapping key")),ne==="__proto__"?Object.defineProperty(te,ne,{configurable:!0,enumerable:!0,writable:!0,value:ae}):te[ne]=ae,delete re[ne];return te}__name(storeMappingPair,"storeMappingPair");function readLineBreak(ee){var te;te=ee.input.charCodeAt(ee.position),te===10?ee.position++:te===13?(ee.position++,ee.input.charCodeAt(ee.position)===10&&ee.position++):throwError(ee,"a line break is expected"),ee.line+=1,ee.lineStart=ee.position,ee.firstTabInLine=-1}__name(readLineBreak,"readLineBreak");function skipSeparationSpace(ee,te,re){for(var ie=0,ne=ee.input.charCodeAt(ee.position);ne!==0;){for(;is_WHITE_SPACE(ne);)ne===9&&ee.firstTabInLine===-1&&(ee.firstTabInLine=ee.position),ne=ee.input.charCodeAt(++ee.position);if(te&&ne===35)do ne=ee.input.charCodeAt(++ee.position);while(ne!==10&&ne!==13&&ne!==0);if(is_EOL(ne))for(readLineBreak(ee),ne=ee.input.charCodeAt(ee.position),ie++,ee.lineIndent=0;ne===32;)ee.lineIndent++,ne=ee.input.charCodeAt(++ee.position);else break}return re!==-1&&ie!==0&&ee.lineIndent<re&&throwWarning(ee,"deficient indentation"),ie}__name(skipSeparationSpace,"skipSeparationSpace");function testDocumentSeparator(ee){var te=ee.position,re;return re=ee.input.charCodeAt(te),!!((re===45||re===46)&&re===ee.input.charCodeAt(te+1)&&re===ee.input.charCodeAt(te+2)&&(te+=3,re=ee.input.charCodeAt(te),re===0||is_WS_OR_EOL(re)))}__name(testDocumentSeparator,"testDocumentSeparator");function writeFoldedLines(ee,te){te===1?ee.result+=" ":te>1&&(ee.result+=common$1.repeat(`
`,te-1))}__name(writeFoldedLines,"writeFoldedLines");function readPlainScalar(ee,te,re){var ie,ne,ae,oe,se,le,ce,he,de=ee.kind,ue=ee.result,fe;if(fe=ee.input.charCodeAt(ee.position),is_WS_OR_EOL(fe)||is_FLOW_INDICATOR(fe)||fe===35||fe===38||fe===42||fe===33||fe===124||fe===62||fe===39||fe===34||fe===37||fe===64||fe===96||(fe===63||fe===45)&&(ne=ee.input.charCodeAt(ee.position+1),is_WS_OR_EOL(ne)||re&&is_FLOW_INDICATOR(ne)))return!1;for(ee.kind="scalar",ee.result="",ae=oe=ee.position,se=!1;fe!==0;){if(fe===58){if(ne=ee.input.charCodeAt(ee.position+1),is_WS_OR_EOL(ne)||re&&is_FLOW_INDICATOR(ne))break}else if(fe===35){if(ie=ee.input.charCodeAt(ee.position-1),is_WS_OR_EOL(ie))break}else{if(ee.position===ee.lineStart&&testDocumentSeparator(ee)||re&&is_FLOW_INDICATOR(fe))break;if(is_EOL(fe))if(le=ee.line,ce=ee.lineStart,he=ee.lineIndent,skipSeparationSpace(ee,!1,-1),ee.lineIndent>=te){se=!0,fe=ee.input.charCodeAt(ee.position);continue}else{ee.position=oe,ee.line=le,ee.lineStart=ce,ee.lineIndent=he;break}}se&&(captureSegment(ee,ae,oe,!1),writeFoldedLines(ee,ee.line-le),ae=oe=ee.position,se=!1),is_WHITE_SPACE(fe)||(oe=ee.position+1),fe=ee.input.charCodeAt(++ee.position)}return captureSegment(ee,ae,oe,!1),ee.result?!0:(ee.kind=de,ee.result=ue,!1)}__name(readPlainScalar,"readPlainScalar");function readSingleQuotedScalar(ee,te){var re,ie,ne;if(re=ee.input.charCodeAt(ee.position),re!==39)return!1;for(ee.kind="scalar",ee.result="",ee.position++,ie=ne=ee.position;(re=ee.input.charCodeAt(ee.position))!==0;)if(re===39)if(captureSegment(ee,ie,ee.position,!0),re=ee.input.charCodeAt(++ee.position),re===39)ie=ee.position,ee.position++,ne=ee.position;else return!0;else is_EOL(re)?(captureSegment(ee,ie,ne,!0),writeFoldedLines(ee,skipSeparationSpace(ee,!1,te)),ie=ne=ee.position):ee.position===ee.lineStart&&testDocumentSeparator(ee)?throwError(ee,"unexpected end of the document within a single quoted scalar"):(ee.position++,ne=ee.position);throwError(ee,"unexpected end of the stream within a single quoted scalar")}__name(readSingleQuotedScalar,"readSingleQuotedScalar");function readDoubleQuotedScalar(ee,te){var re,ie,ne,ae,oe,se;if(se=ee.input.charCodeAt(ee.position),se!==34)return!1;for(ee.kind="scalar",ee.result="",ee.position++,re=ie=ee.position;(se=ee.input.charCodeAt(ee.position))!==0;){if(se===34)return captureSegment(ee,re,ee.position,!0),ee.position++,!0;if(se===92){if(captureSegment(ee,re,ee.position,!0),se=ee.input.charCodeAt(++ee.position),is_EOL(se))skipSeparationSpace(ee,!1,te);else if(se<256&&simpleEscapeCheck[se])ee.result+=simpleEscapeMap[se],ee.position++;else if((oe=escapedHexLen(se))>0){for(ne=oe,ae=0;ne>0;ne--)se=ee.input.charCodeAt(++ee.position),(oe=fromHexCode(se))>=0?ae=(ae<<4)+oe:throwError(ee,"expected hexadecimal character");ee.result+=charFromCodepoint(ae),ee.position++}else throwError(ee,"unknown escape sequence");re=ie=ee.position}else is_EOL(se)?(captureSegment(ee,re,ie,!0),writeFoldedLines(ee,skipSeparationSpace(ee,!1,te)),re=ie=ee.position):ee.position===ee.lineStart&&testDocumentSeparator(ee)?throwError(ee,"unexpected end of the document within a double quoted scalar"):(ee.position++,ie=ee.position)}throwError(ee,"unexpected end of the stream within a double quoted scalar")}__name(readDoubleQuotedScalar,"readDoubleQuotedScalar");function readFlowCollection(ee,te){var re=!0,ie,ne,ae,oe=ee.tag,se,le=ee.anchor,ce,he,de,ue,fe,pe=Object.create(null),ge,ye,_e,me;if(me=ee.input.charCodeAt(ee.position),me===91)he=93,fe=!1,se=[];else if(me===123)he=125,fe=!0,se={};else return!1;for(ee.anchor!==null&&(ee.anchorMap[ee.anchor]=se),me=ee.input.charCodeAt(++ee.position);me!==0;){if(skipSeparationSpace(ee,!0,te),me=ee.input.charCodeAt(ee.position),me===he)return ee.position++,ee.tag=oe,ee.anchor=le,ee.kind=fe?"mapping":"sequence",ee.result=se,!0;re?me===44&&throwError(ee,"expected the node content, but found ','"):throwError(ee,"missed comma between flow collection entries"),ye=ge=_e=null,de=ue=!1,me===63&&(ce=ee.input.charCodeAt(ee.position+1),is_WS_OR_EOL(ce)&&(de=ue=!0,ee.position++,skipSeparationSpace(ee,!0,te))),ie=ee.line,ne=ee.lineStart,ae=ee.position,composeNode(ee,te,CONTEXT_FLOW_IN,!1,!0),ye=ee.tag,ge=ee.result,skipSeparationSpace(ee,!0,te),me=ee.input.charCodeAt(ee.position),(ue||ee.line===ie)&&me===58&&(de=!0,me=ee.input.charCodeAt(++ee.position),skipSeparationSpace(ee,!0,te),composeNode(ee,te,CONTEXT_FLOW_IN,!1,!0),_e=ee.result),fe?storeMappingPair(ee,se,pe,ye,ge,_e,ie,ne,ae):de?se.push(storeMappingPair(ee,null,pe,ye,ge,_e,ie,ne,ae)):se.push(ge),skipSeparationSpace(ee,!0,te),me=ee.input.charCodeAt(ee.position),me===44?(re=!0,me=ee.input.charCodeAt(++ee.position)):re=!1}throwError(ee,"unexpected end of the stream within a flow collection")}__name(readFlowCollection,"readFlowCollection");function readBlockScalar(ee,te){var re,ie,ne=CHOMPING_CLIP,ae=!1,oe=!1,se=te,le=0,ce=!1,he,de;if(de=ee.input.charCodeAt(ee.position),de===124)ie=!1;else if(de===62)ie=!0;else return!1;for(ee.kind="scalar",ee.result="";de!==0;)if(de=ee.input.charCodeAt(++ee.position),de===43||de===45)CHOMPING_CLIP===ne?ne=de===43?CHOMPING_KEEP:CHOMPING_STRIP:throwError(ee,"repeat of a chomping mode identifier");else if((he=fromDecimalCode(de))>=0)he===0?throwError(ee,"bad explicit indentation width of a block scalar; it cannot be less than one"):oe?throwError(ee,"repeat of an indentation width identifier"):(se=te+he-1,oe=!0);else break;if(is_WHITE_SPACE(de)){do de=ee.input.charCodeAt(++ee.position);while(is_WHITE_SPACE(de));if(de===35)do de=ee.input.charCodeAt(++ee.position);while(!is_EOL(de)&&de!==0)}for(;de!==0;){for(readLineBreak(ee),ee.lineIndent=0,de=ee.input.charCodeAt(ee.position);(!oe||ee.lineIndent<se)&&de===32;)ee.lineIndent++,de=ee.input.charCodeAt(++ee.position);if(!oe&&ee.lineIndent>se&&(se=ee.lineIndent),is_EOL(de)){le++;continue}if(ee.lineIndent<se){ne===CHOMPING_KEEP?ee.result+=common$1.repeat(`
`,ae?1+le:le):ne===CHOMPING_CLIP&&ae&&(ee.result+=`
`);break}for(ie?is_WHITE_SPACE(de)?(ce=!0,ee.result+=common$1.repeat(`
`,ae?1+le:le)):ce?(ce=!1,ee.result+=common$1.repeat(`
`,le+1)):le===0?ae&&(ee.result+=" "):ee.result+=common$1.repeat(`
`,le):ee.result+=common$1.repeat(`
`,ae?1+le:le),ae=!0,oe=!0,le=0,re=ee.position;!is_EOL(de)&&de!==0;)de=ee.input.charCodeAt(++ee.position);captureSegment(ee,re,ee.position,!1)}return!0}__name(readBlockScalar,"readBlockScalar");function readBlockSequence(ee,te){var re,ie=ee.tag,ne=ee.anchor,ae=[],oe,se=!1,le;if(ee.firstTabInLine!==-1)return!1;for(ee.anchor!==null&&(ee.anchorMap[ee.anchor]=ae),le=ee.input.charCodeAt(ee.position);le!==0&&(ee.firstTabInLine!==-1&&(ee.position=ee.firstTabInLine,throwError(ee,"tab characters must not be used in indentation")),!(le!==45||(oe=ee.input.charCodeAt(ee.position+1),!is_WS_OR_EOL(oe))));){if(se=!0,ee.position++,skipSeparationSpace(ee,!0,-1)&&ee.lineIndent<=te){ae.push(null),le=ee.input.charCodeAt(ee.position);continue}if(re=ee.line,composeNode(ee,te,CONTEXT_BLOCK_IN,!1,!0),ae.push(ee.result),skipSeparationSpace(ee,!0,-1),le=ee.input.charCodeAt(ee.position),(ee.line===re||ee.lineIndent>te)&&le!==0)throwError(ee,"bad indentation of a sequence entry");else if(ee.lineIndent<te)break}return se?(ee.tag=ie,ee.anchor=ne,ee.kind="sequence",ee.result=ae,!0):!1}__name(readBlockSequence,"readBlockSequence");function readBlockMapping(ee,te,re){var ie,ne,ae,oe,se,le,ce=ee.tag,he=ee.anchor,de={},ue=Object.create(null),fe=null,pe=null,ge=null,ye=!1,_e=!1,me;if(ee.firstTabInLine!==-1)return!1;for(ee.anchor!==null&&(ee.anchorMap[ee.anchor]=de),me=ee.input.charCodeAt(ee.position);me!==0;){if(!ye&&ee.firstTabInLine!==-1&&(ee.position=ee.firstTabInLine,throwError(ee,"tab characters must not be used in indentation")),ie=ee.input.charCodeAt(ee.position+1),ae=ee.line,(me===63||me===58)&&is_WS_OR_EOL(ie))me===63?(ye&&(storeMappingPair(ee,de,ue,fe,pe,null,oe,se,le),fe=pe=ge=null),_e=!0,ye=!0,ne=!0):ye?(ye=!1,ne=!0):throwError(ee,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),ee.position+=1,me=ie;else{if(oe=ee.line,se=ee.lineStart,le=ee.position,!composeNode(ee,re,CONTEXT_FLOW_OUT,!1,!0))break;if(ee.line===ae){for(me=ee.input.charCodeAt(ee.position);is_WHITE_SPACE(me);)me=ee.input.charCodeAt(++ee.position);if(me===58)me=ee.input.charCodeAt(++ee.position),is_WS_OR_EOL(me)||throwError(ee,"a whitespace character is expected after the key-value separator within a block mapping"),ye&&(storeMappingPair(ee,de,ue,fe,pe,null,oe,se,le),fe=pe=ge=null),_e=!0,ye=!1,ne=!1,fe=ee.tag,pe=ee.result;else if(_e)throwError(ee,"can not read an implicit mapping pair; a colon is missed");else return ee.tag=ce,ee.anchor=he,!0}else if(_e)throwError(ee,"can not read a block mapping entry; a multiline key may not be an implicit key");else return ee.tag=ce,ee.anchor=he,!0}if((ee.line===ae||ee.lineIndent>te)&&(ye&&(oe=ee.line,se=ee.lineStart,le=ee.position),composeNode(ee,te,CONTEXT_BLOCK_OUT,!0,ne)&&(ye?pe=ee.result:ge=ee.result),ye||(storeMappingPair(ee,de,ue,fe,pe,ge,oe,se,le),fe=pe=ge=null),skipSeparationSpace(ee,!0,-1),me=ee.input.charCodeAt(ee.position)),(ee.line===ae||ee.lineIndent>te)&&me!==0)throwError(ee,"bad indentation of a mapping entry");else if(ee.lineIndent<te)break}return ye&&storeMappingPair(ee,de,ue,fe,pe,null,oe,se,le),_e&&(ee.tag=ce,ee.anchor=he,ee.kind="mapping",ee.result=de),_e}__name(readBlockMapping,"readBlockMapping");function readTagProperty(ee){var te,re=!1,ie=!1,ne,ae,oe;if(oe=ee.input.charCodeAt(ee.position),oe!==33)return!1;if(ee.tag!==null&&throwError(ee,"duplication of a tag property"),oe=ee.input.charCodeAt(++ee.position),oe===60?(re=!0,oe=ee.input.charCodeAt(++ee.position)):oe===33?(ie=!0,ne="!!",oe=ee.input.charCodeAt(++ee.position)):ne="!",te=ee.position,re){do oe=ee.input.charCodeAt(++ee.position);while(oe!==0&&oe!==62);ee.position<ee.length?(ae=ee.input.slice(te,ee.position),oe=ee.input.charCodeAt(++ee.position)):throwError(ee,"unexpected end of the stream within a verbatim tag")}else{for(;oe!==0&&!is_WS_OR_EOL(oe);)oe===33&&(ie?throwError(ee,"tag suffix cannot contain exclamation marks"):(ne=ee.input.slice(te-1,ee.position+1),PATTERN_TAG_HANDLE.test(ne)||throwError(ee,"named tag handle cannot contain such characters"),ie=!0,te=ee.position+1)),oe=ee.input.charCodeAt(++ee.position);ae=ee.input.slice(te,ee.position),PATTERN_FLOW_INDICATORS.test(ae)&&throwError(ee,"tag suffix cannot contain flow indicator characters")}ae&&!PATTERN_TAG_URI.test(ae)&&throwError(ee,"tag name cannot contain such characters: "+ae);try{ae=decodeURIComponent(ae)}catch{throwError(ee,"tag name is malformed: "+ae)}return re?ee.tag=ae:_hasOwnProperty$1.call(ee.tagMap,ne)?ee.tag=ee.tagMap[ne]+ae:ne==="!"?ee.tag="!"+ae:ne==="!!"?ee.tag="tag:yaml.org,2002:"+ae:throwError(ee,'undeclared tag handle "'+ne+'"'),!0}__name(readTagProperty,"readTagProperty");function readAnchorProperty(ee){var te,re;if(re=ee.input.charCodeAt(ee.position),re!==38)return!1;for(ee.anchor!==null&&throwError(ee,"duplication of an anchor property"),re=ee.input.charCodeAt(++ee.position),te=ee.position;re!==0&&!is_WS_OR_EOL(re)&&!is_FLOW_INDICATOR(re);)re=ee.input.charCodeAt(++ee.position);return ee.position===te&&throwError(ee,"name of an anchor node must contain at least one character"),ee.anchor=ee.input.slice(te,ee.position),!0}__name(readAnchorProperty,"readAnchorProperty");function readAlias(ee){var te,re,ie;if(ie=ee.input.charCodeAt(ee.position),ie!==42)return!1;for(ie=ee.input.charCodeAt(++ee.position),te=ee.position;ie!==0&&!is_WS_OR_EOL(ie)&&!is_FLOW_INDICATOR(ie);)ie=ee.input.charCodeAt(++ee.position);return ee.position===te&&throwError(ee,"name of an alias node must contain at least one character"),re=ee.input.slice(te,ee.position),_hasOwnProperty$1.call(ee.anchorMap,re)||throwError(ee,'unidentified alias "'+re+'"'),ee.result=ee.anchorMap[re],skipSeparationSpace(ee,!0,-1),!0}__name(readAlias,"readAlias");function composeNode(ee,te,re,ie,ne){var ae,oe,se,le=1,ce=!1,he=!1,de,ue,fe,pe,ge,ye;if(ee.listener!==null&&ee.listener("open",ee),ee.tag=null,ee.anchor=null,ee.kind=null,ee.result=null,ae=oe=se=CONTEXT_BLOCK_OUT===re||CONTEXT_BLOCK_IN===re,ie&&skipSeparationSpace(ee,!0,-1)&&(ce=!0,ee.lineIndent>te?le=1:ee.lineIndent===te?le=0:ee.lineIndent<te&&(le=-1)),le===1)for(;readTagProperty(ee)||readAnchorProperty(ee);)skipSeparationSpace(ee,!0,-1)?(ce=!0,se=ae,ee.lineIndent>te?le=1:ee.lineIndent===te?le=0:ee.lineIndent<te&&(le=-1)):se=!1;if(se&&(se=ce||ne),(le===1||CONTEXT_BLOCK_OUT===re)&&(CONTEXT_FLOW_IN===re||CONTEXT_FLOW_OUT===re?ge=te:ge=te+1,ye=ee.position-ee.lineStart,le===1?se&&(readBlockSequence(ee,ye)||readBlockMapping(ee,ye,ge))||readFlowCollection(ee,ge)?he=!0:(oe&&readBlockScalar(ee,ge)||readSingleQuotedScalar(ee,ge)||readDoubleQuotedScalar(ee,ge)?he=!0:readAlias(ee)?(he=!0,(ee.tag!==null||ee.anchor!==null)&&throwError(ee,"alias node should not have any properties")):readPlainScalar(ee,ge,CONTEXT_FLOW_IN===re)&&(he=!0,ee.tag===null&&(ee.tag="?")),ee.anchor!==null&&(ee.anchorMap[ee.anchor]=ee.result)):le===0&&(he=se&&readBlockSequence(ee,ye))),ee.tag===null)ee.anchor!==null&&(ee.anchorMap[ee.anchor]=ee.result);else if(ee.tag==="?"){for(ee.result!==null&&ee.kind!=="scalar"&&throwError(ee,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+ee.kind+'"'),de=0,ue=ee.implicitTypes.length;de<ue;de+=1)if(pe=ee.implicitTypes[de],pe.resolve(ee.result)){ee.result=pe.construct(ee.result),ee.tag=pe.tag,ee.anchor!==null&&(ee.anchorMap[ee.anchor]=ee.result);break}}else if(ee.tag!=="!"){if(_hasOwnProperty$1.call(ee.typeMap[ee.kind||"fallback"],ee.tag))pe=ee.typeMap[ee.kind||"fallback"][ee.tag];else for(pe=null,fe=ee.typeMap.multi[ee.kind||"fallback"],de=0,ue=fe.length;de<ue;de+=1)if(ee.tag.slice(0,fe[de].tag.length)===fe[de].tag){pe=fe[de];break}pe||throwError(ee,"unknown tag !<"+ee.tag+">"),ee.result!==null&&pe.kind!==ee.kind&&throwError(ee,"unacceptable node kind for !<"+ee.tag+'> tag; it should be "'+pe.kind+'", not "'+ee.kind+'"'),pe.resolve(ee.result,ee.tag)?(ee.result=pe.construct(ee.result,ee.tag),ee.anchor!==null&&(ee.anchorMap[ee.anchor]=ee.result)):throwError(ee,"cannot resolve a node with !<"+ee.tag+"> explicit tag")}return ee.listener!==null&&ee.listener("close",ee),ee.tag!==null||ee.anchor!==null||he}__name(composeNode,"composeNode");function readDocument(ee){var te=ee.position,re,ie,ne,ae=!1,oe;for(ee.version=null,ee.checkLineBreaks=ee.legacy,ee.tagMap=Object.create(null),ee.anchorMap=Object.create(null);(oe=ee.input.charCodeAt(ee.position))!==0&&(skipSeparationSpace(ee,!0,-1),oe=ee.input.charCodeAt(ee.position),!(ee.lineIndent>0||oe!==37));){for(ae=!0,oe=ee.input.charCodeAt(++ee.position),re=ee.position;oe!==0&&!is_WS_OR_EOL(oe);)oe=ee.input.charCodeAt(++ee.position);for(ie=ee.input.slice(re,ee.position),ne=[],ie.length<1&&throwError(ee,"directive name must not be less than one character in length");oe!==0;){for(;is_WHITE_SPACE(oe);)oe=ee.input.charCodeAt(++ee.position);if(oe===35){do oe=ee.input.charCodeAt(++ee.position);while(oe!==0&&!is_EOL(oe));break}if(is_EOL(oe))break;for(re=ee.position;oe!==0&&!is_WS_OR_EOL(oe);)oe=ee.input.charCodeAt(++ee.position);ne.push(ee.input.slice(re,ee.position))}oe!==0&&readLineBreak(ee),_hasOwnProperty$1.call(directiveHandlers,ie)?directiveHandlers[ie](ee,ie,ne):throwWarning(ee,'unknown document directive "'+ie+'"')}if(skipSeparationSpace(ee,!0,-1),ee.lineIndent===0&&ee.input.charCodeAt(ee.position)===45&&ee.input.charCodeAt(ee.position+1)===45&&ee.input.charCodeAt(ee.position+2)===45?(ee.position+=3,skipSeparationSpace(ee,!0,-1)):ae&&throwError(ee,"directives end mark is expected"),composeNode(ee,ee.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(ee,!0,-1),ee.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(ee.input.slice(te,ee.position))&&throwWarning(ee,"non-ASCII line breaks are interpreted as content"),ee.documents.push(ee.result),ee.position===ee.lineStart&&testDocumentSeparator(ee)){ee.input.charCodeAt(ee.position)===46&&(ee.position+=3,skipSeparationSpace(ee,!0,-1));return}if(ee.position<ee.length-1)throwError(ee,"end of the stream or a document separator is expected");else return}__name(readDocument,"readDocument");function loadDocuments(ee,te){ee=String(ee),te=te||{},ee.length!==0&&(ee.charCodeAt(ee.length-1)!==10&&ee.charCodeAt(ee.length-1)!==13&&(ee+=`
`),ee.charCodeAt(0)===65279&&(ee=ee.slice(1)));var re=new State$1(ee,te),ie=ee.indexOf("\0");for(ie!==-1&&(re.position=ie,throwError(re,"null byte is not allowed in input")),re.input+="\0";re.input.charCodeAt(re.position)===32;)re.lineIndent+=1,re.position+=1;for(;re.position<re.length-1;)readDocument(re);return re.documents}__name(loadDocuments,"loadDocuments");function loadAll$1(ee,te,re){te!==null&&typeof te=="object"&&typeof re>"u"&&(re=te,te=null);var ie=loadDocuments(ee,re);if(typeof te!="function")return ie;for(var ne=0,ae=ie.length;ne<ae;ne+=1)te(ie[ne])}__name(loadAll$1,"loadAll$1");function load$1(ee,te){var re=loadDocuments(ee,te);if(re.length!==0){if(re.length===1)return re[0];throw new exception("expected a single document in the stream, but found more")}}__name(load$1,"load$1");var loadAll_1=loadAll$1,load_1=load$1,loader24={loadAll:loadAll_1,load:load_1},_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_BOM=65279,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(ee,te){var re,ie,ne,ae,oe,se,le;if(te===null)return{};for(re={},ie=Object.keys(te),ne=0,ae=ie.length;ne<ae;ne+=1)oe=ie[ne],se=String(te[oe]),oe.slice(0,2)==="!!"&&(oe="tag:yaml.org,2002:"+oe.slice(2)),le=ee.compiledTypeMap.fallback[oe],le&&_hasOwnProperty.call(le.styleAliases,se)&&(se=le.styleAliases[se]),re[oe]=se;return re}__name(compileStyleMap,"compileStyleMap");function encodeHex(ee){var te,re,ie;if(te=ee.toString(16).toUpperCase(),ee<=255)re="x",ie=2;else if(ee<=65535)re="u",ie=4;else if(ee<=4294967295)re="U",ie=8;else throw new exception("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+re+common$1.repeat("0",ie-te.length)+te}__name(encodeHex,"encodeHex");var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(ee){this.schema=ee.schema||_default,this.indent=Math.max(1,ee.indent||2),this.noArrayIndent=ee.noArrayIndent||!1,this.skipInvalid=ee.skipInvalid||!1,this.flowLevel=common$1.isNothing(ee.flowLevel)?-1:ee.flowLevel,this.styleMap=compileStyleMap(this.schema,ee.styles||null),this.sortKeys=ee.sortKeys||!1,this.lineWidth=ee.lineWidth||80,this.noRefs=ee.noRefs||!1,this.noCompatMode=ee.noCompatMode||!1,this.condenseFlow=ee.condenseFlow||!1,this.quotingType=ee.quotingType==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE,this.forceQuotes=ee.forceQuotes||!1,this.replacer=typeof ee.replacer=="function"?ee.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}__name(State,"State");function indentString(ee,te){for(var re=common$1.repeat(" ",te),ie=0,ne=-1,ae="",oe,se=ee.length;ie<se;)ne=ee.indexOf(`
`,ie),ne===-1?(oe=ee.slice(ie),ie=se):(oe=ee.slice(ie,ne+1),ie=ne+1),oe.length&&oe!==`
`&&(ae+=re),ae+=oe;return ae}__name(indentString,"indentString");function generateNextLine(ee,te){return`
`+common$1.repeat(" ",ee.indent*te)}__name(generateNextLine,"generateNextLine");function testImplicitResolving(ee,te){var re,ie,ne;for(re=0,ie=ee.implicitTypes.length;re<ie;re+=1)if(ne=ee.implicitTypes[re],ne.resolve(te))return!0;return!1}__name(testImplicitResolving,"testImplicitResolving");function isWhitespace(ee){return ee===CHAR_SPACE||ee===CHAR_TAB}__name(isWhitespace,"isWhitespace");function isPrintable(ee){return 32<=ee&&ee<=126||161<=ee&&ee<=55295&&ee!==8232&&ee!==8233||57344<=ee&&ee<=65533&&ee!==CHAR_BOM||65536<=ee&&ee<=1114111}__name(isPrintable,"isPrintable");function isNsCharOrWhitespace(ee){return isPrintable(ee)&&ee!==CHAR_BOM&&ee!==CHAR_CARRIAGE_RETURN&&ee!==CHAR_LINE_FEED}__name(isNsCharOrWhitespace,"isNsCharOrWhitespace");function isPlainSafe(ee,te,re){var ie=isNsCharOrWhitespace(ee),ne=ie&&!isWhitespace(ee);return(re?ie:ie&&ee!==CHAR_COMMA&&ee!==CHAR_LEFT_SQUARE_BRACKET&&ee!==CHAR_RIGHT_SQUARE_BRACKET&&ee!==CHAR_LEFT_CURLY_BRACKET&&ee!==CHAR_RIGHT_CURLY_BRACKET)&&ee!==CHAR_SHARP&&!(te===CHAR_COLON&&!ne)||isNsCharOrWhitespace(te)&&!isWhitespace(te)&&ee===CHAR_SHARP||te===CHAR_COLON&&ne}__name(isPlainSafe,"isPlainSafe");function isPlainSafeFirst(ee){return isPrintable(ee)&&ee!==CHAR_BOM&&!isWhitespace(ee)&&ee!==CHAR_MINUS&&ee!==CHAR_QUESTION&&ee!==CHAR_COLON&&ee!==CHAR_COMMA&&ee!==CHAR_LEFT_SQUARE_BRACKET&&ee!==CHAR_RIGHT_SQUARE_BRACKET&&ee!==CHAR_LEFT_CURLY_BRACKET&&ee!==CHAR_RIGHT_CURLY_BRACKET&&ee!==CHAR_SHARP&&ee!==CHAR_AMPERSAND&&ee!==CHAR_ASTERISK&&ee!==CHAR_EXCLAMATION&&ee!==CHAR_VERTICAL_LINE&&ee!==CHAR_EQUALS&&ee!==CHAR_GREATER_THAN&&ee!==CHAR_SINGLE_QUOTE&&ee!==CHAR_DOUBLE_QUOTE&&ee!==CHAR_PERCENT&&ee!==CHAR_COMMERCIAL_AT&&ee!==CHAR_GRAVE_ACCENT}__name(isPlainSafeFirst,"isPlainSafeFirst");function isPlainSafeLast(ee){return!isWhitespace(ee)&&ee!==CHAR_COLON}__name(isPlainSafeLast,"isPlainSafeLast");function codePointAt(ee,te){var re=ee.charCodeAt(te),ie;return re>=55296&&re<=56319&&te+1<ee.length&&(ie=ee.charCodeAt(te+1),ie>=56320&&ie<=57343)?(re-55296)*1024+ie-56320+65536:re}__name(codePointAt,"codePointAt");function needIndentIndicator(ee){var te=/^\n* /;return te.test(ee)}__name(needIndentIndicator,"needIndentIndicator");var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(ee,te,re,ie,ne,ae,oe,se){var le,ce=0,he=null,de=!1,ue=!1,fe=ie!==-1,pe=-1,ge=isPlainSafeFirst(codePointAt(ee,0))&&isPlainSafeLast(codePointAt(ee,ee.length-1));if(te||oe)for(le=0;le<ee.length;ce>=65536?le+=2:le++){if(ce=codePointAt(ee,le),!isPrintable(ce))return STYLE_DOUBLE;ge=ge&&isPlainSafe(ce,he,se),he=ce}else{for(le=0;le<ee.length;ce>=65536?le+=2:le++){if(ce=codePointAt(ee,le),ce===CHAR_LINE_FEED)de=!0,fe&&(ue=ue||le-pe-1>ie&&ee[pe+1]!==" ",pe=le);else if(!isPrintable(ce))return STYLE_DOUBLE;ge=ge&&isPlainSafe(ce,he,se),he=ce}ue=ue||fe&&le-pe-1>ie&&ee[pe+1]!==" "}return!de&&!ue?ge&&!oe&&!ne(ee)?STYLE_PLAIN:ae===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:re>9&&needIndentIndicator(ee)?STYLE_DOUBLE:oe?ae===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:ue?STYLE_FOLDED:STYLE_LITERAL}__name(chooseScalarStyle,"chooseScalarStyle");function writeScalar(ee,te,re,ie,ne){ee.dump=function(){if(te.length===0)return ee.quotingType===QUOTING_TYPE_DOUBLE?'""':"''";if(!ee.noCompatMode&&(DEPRECATED_BOOLEANS_SYNTAX.indexOf(te)!==-1||DEPRECATED_BASE60_SYNTAX.test(te)))return ee.quotingType===QUOTING_TYPE_DOUBLE?'"'+te+'"':"'"+te+"'";var ae=ee.indent*Math.max(1,re),oe=ee.lineWidth===-1?-1:Math.max(Math.min(ee.lineWidth,40),ee.lineWidth-ae),se=ie||ee.flowLevel>-1&&re>=ee.flowLevel;function le(ce){return testImplicitResolving(ee,ce)}switch(__name(le,"testAmbiguity"),chooseScalarStyle(te,se,ee.indent,oe,le,ee.quotingType,ee.forceQuotes&&!ie,ne)){case STYLE_PLAIN:return te;case STYLE_SINGLE:return"'"+te.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(te,ee.indent)+dropEndingNewline(indentString(te,ae));case STYLE_FOLDED:return">"+blockHeader(te,ee.indent)+dropEndingNewline(indentString(foldString(te,oe),ae));case STYLE_DOUBLE:return'"'+escapeString(te)+'"';default:throw new exception("impossible error: invalid scalar style")}}()}__name(writeScalar,"writeScalar");function blockHeader(ee,te){var re=needIndentIndicator(ee)?String(te):"",ie=ee[ee.length-1]===`
`,ne=ie&&(ee[ee.length-2]===`
`||ee===`
`),ae=ne?"+":ie?"":"-";return re+ae+`
`}__name(blockHeader,"blockHeader");function dropEndingNewline(ee){return ee[ee.length-1]===`
`?ee.slice(0,-1):ee}__name(dropEndingNewline,"dropEndingNewline");function foldString(ee,te){for(var re=/(\n+)([^\n]*)/g,ie=function(){var ce=ee.indexOf(`
`);return ce=ce!==-1?ce:ee.length,re.lastIndex=ce,foldLine(ee.slice(0,ce),te)}(),ne=ee[0]===`
`||ee[0]===" ",ae,oe;oe=re.exec(ee);){var se=oe[1],le=oe[2];ae=le[0]===" ",ie+=se+(!ne&&!ae&&le!==""?`
`:"")+foldLine(le,te),ne=ae}return ie}__name(foldString,"foldString");function foldLine(ee,te){if(ee===""||ee[0]===" ")return ee;for(var re=/ [^ ]/g,ie,ne=0,ae,oe=0,se=0,le="";ie=re.exec(ee);)se=ie.index,se-ne>te&&(ae=oe>ne?oe:se,le+=`
`+ee.slice(ne,ae),ne=ae+1),oe=se;return le+=`
`,ee.length-ne>te&&oe>ne?le+=ee.slice(ne,oe)+`
`+ee.slice(oe+1):le+=ee.slice(ne),le.slice(1)}__name(foldLine,"foldLine");function escapeString(ee){for(var te="",re=0,ie,ne=0;ne<ee.length;re>=65536?ne+=2:ne++)re=codePointAt(ee,ne),ie=ESCAPE_SEQUENCES[re],!ie&&isPrintable(re)?(te+=ee[ne],re>=65536&&(te+=ee[ne+1])):te+=ie||encodeHex(re);return te}__name(escapeString,"escapeString");function writeFlowSequence(ee,te,re){var ie="",ne=ee.tag,ae,oe,se;for(ae=0,oe=re.length;ae<oe;ae+=1)se=re[ae],ee.replacer&&(se=ee.replacer.call(re,String(ae),se)),(writeNode(ee,te,se,!1,!1)||typeof se>"u"&&writeNode(ee,te,null,!1,!1))&&(ie!==""&&(ie+=","+(ee.condenseFlow?"":" ")),ie+=ee.dump);ee.tag=ne,ee.dump="["+ie+"]"}__name(writeFlowSequence,"writeFlowSequence");function writeBlockSequence(ee,te,re,ie){var ne="",ae=ee.tag,oe,se,le;for(oe=0,se=re.length;oe<se;oe+=1)le=re[oe],ee.replacer&&(le=ee.replacer.call(re,String(oe),le)),(writeNode(ee,te+1,le,!0,!0,!1,!0)||typeof le>"u"&&writeNode(ee,te+1,null,!0,!0,!1,!0))&&((!ie||ne!=="")&&(ne+=generateNextLine(ee,te)),ee.dump&&CHAR_LINE_FEED===ee.dump.charCodeAt(0)?ne+="-":ne+="- ",ne+=ee.dump);ee.tag=ae,ee.dump=ne||"[]"}__name(writeBlockSequence,"writeBlockSequence");function writeFlowMapping(ee,te,re){var ie="",ne=ee.tag,ae=Object.keys(re),oe,se,le,ce,he;for(oe=0,se=ae.length;oe<se;oe+=1)he="",ie!==""&&(he+=", "),ee.condenseFlow&&(he+='"'),le=ae[oe],ce=re[le],ee.replacer&&(ce=ee.replacer.call(re,le,ce)),writeNode(ee,te,le,!1,!1)&&(ee.dump.length>1024&&(he+="? "),he+=ee.dump+(ee.condenseFlow?'"':"")+":"+(ee.condenseFlow?"":" "),writeNode(ee,te,ce,!1,!1)&&(he+=ee.dump,ie+=he));ee.tag=ne,ee.dump="{"+ie+"}"}__name(writeFlowMapping,"writeFlowMapping");function writeBlockMapping(ee,te,re,ie){var ne="",ae=ee.tag,oe=Object.keys(re),se,le,ce,he,de,ue;if(ee.sortKeys===!0)oe.sort();else if(typeof ee.sortKeys=="function")oe.sort(ee.sortKeys);else if(ee.sortKeys)throw new exception("sortKeys must be a boolean or a function");for(se=0,le=oe.length;se<le;se+=1)ue="",(!ie||ne!=="")&&(ue+=generateNextLine(ee,te)),ce=oe[se],he=re[ce],ee.replacer&&(he=ee.replacer.call(re,ce,he)),writeNode(ee,te+1,ce,!0,!0,!0)&&(de=ee.tag!==null&&ee.tag!=="?"||ee.dump&&ee.dump.length>1024,de&&(ee.dump&&CHAR_LINE_FEED===ee.dump.charCodeAt(0)?ue+="?":ue+="? "),ue+=ee.dump,de&&(ue+=generateNextLine(ee,te)),writeNode(ee,te+1,he,!0,de)&&(ee.dump&&CHAR_LINE_FEED===ee.dump.charCodeAt(0)?ue+=":":ue+=": ",ue+=ee.dump,ne+=ue));ee.tag=ae,ee.dump=ne||"{}"}__name(writeBlockMapping,"writeBlockMapping");function detectType2(ee,te,re){var ie,ne,ae,oe,se,le;for(ne=re?ee.explicitTypes:ee.implicitTypes,ae=0,oe=ne.length;ae<oe;ae+=1)if(se=ne[ae],(se.instanceOf||se.predicate)&&(!se.instanceOf||typeof te=="object"&&te instanceof se.instanceOf)&&(!se.predicate||se.predicate(te))){if(re?se.multi&&se.representName?ee.tag=se.representName(te):ee.tag=se.tag:ee.tag="?",se.represent){if(le=ee.styleMap[se.tag]||se.defaultStyle,_toString.call(se.represent)==="[object Function]")ie=se.represent(te,le);else if(_hasOwnProperty.call(se.represent,le))ie=se.represent[le](te,le);else throw new exception("!<"+se.tag+'> tag resolver accepts not "'+le+'" style');ee.dump=ie}return!0}return!1}__name(detectType2,"detectType");function writeNode(ee,te,re,ie,ne,ae,oe){ee.tag=null,ee.dump=re,detectType2(ee,re,!1)||detectType2(ee,re,!0);var se=_toString.call(ee.dump),le=ie,ce;ie&&(ie=ee.flowLevel<0||ee.flowLevel>te);var he=se==="[object Object]"||se==="[object Array]",de,ue;if(he&&(de=ee.duplicates.indexOf(re),ue=de!==-1),(ee.tag!==null&&ee.tag!=="?"||ue||ee.indent!==2&&te>0)&&(ne=!1),ue&&ee.usedDuplicates[de])ee.dump="*ref_"+de;else{if(he&&ue&&!ee.usedDuplicates[de]&&(ee.usedDuplicates[de]=!0),se==="[object Object]")ie&&Object.keys(ee.dump).length!==0?(writeBlockMapping(ee,te,ee.dump,ne),ue&&(ee.dump="&ref_"+de+ee.dump)):(writeFlowMapping(ee,te,ee.dump),ue&&(ee.dump="&ref_"+de+" "+ee.dump));else if(se==="[object Array]")ie&&ee.dump.length!==0?(ee.noArrayIndent&&!oe&&te>0?writeBlockSequence(ee,te-1,ee.dump,ne):writeBlockSequence(ee,te,ee.dump,ne),ue&&(ee.dump="&ref_"+de+ee.dump)):(writeFlowSequence(ee,te,ee.dump),ue&&(ee.dump="&ref_"+de+" "+ee.dump));else if(se==="[object String]")ee.tag!=="?"&&writeScalar(ee,ee.dump,te,ae,le);else{if(se==="[object Undefined]")return!1;if(ee.skipInvalid)return!1;throw new exception("unacceptable kind of an object to dump "+se)}ee.tag!==null&&ee.tag!=="?"&&(ce=encodeURI(ee.tag[0]==="!"?ee.tag.slice(1):ee.tag).replace(/!/g,"%21"),ee.tag[0]==="!"?ce="!"+ce:ce.slice(0,18)==="tag:yaml.org,2002:"?ce="!!"+ce.slice(18):ce="!<"+ce+">",ee.dump=ce+" "+ee.dump)}return!0}__name(writeNode,"writeNode");function getDuplicateReferences(ee,te){var re=[],ie=[],ne,ae;for(inspectNode(ee,re,ie),ne=0,ae=ie.length;ne<ae;ne+=1)te.duplicates.push(re[ie[ne]]);te.usedDuplicates=new Array(ae)}__name(getDuplicateReferences,"getDuplicateReferences");function inspectNode(ee,te,re){var ie,ne,ae;if(ee!==null&&typeof ee=="object")if(ne=te.indexOf(ee),ne!==-1)re.indexOf(ne)===-1&&re.push(ne);else if(te.push(ee),Array.isArray(ee))for(ne=0,ae=ee.length;ne<ae;ne+=1)inspectNode(ee[ne],te,re);else for(ie=Object.keys(ee),ne=0,ae=ie.length;ne<ae;ne+=1)inspectNode(ee[ie[ne]],te,re)}__name(inspectNode,"inspectNode");function dump$1(ee,te){te=te||{};var re=new State(te);re.noRefs||getDuplicateReferences(ee,re);var ie=ee;return re.replacer&&(ie=re.replacer.call({"":ie},"",ie)),writeNode(re,0,ie,!0,!0)?re.dump+`
`:""}__name(dump$1,"dump$1");function renamed(ee,te){return function(){throw new Error("Function yaml."+ee+" is removed in js-yaml 4. Use yaml."+te+" instead, which is now safe by default.")}}__name(renamed,"renamed");var JSON_SCHEMA=json,load=loader24.load;function extractFrontMatter(ee){const te=ee.match(frontMatterRegex);if(!te)return{text:ee,metadata:{}};let re=load(te[1],{schema:JSON_SCHEMA})??{};re=typeof re=="object"&&!Array.isArray(re)?re:{};const ie={};return re.displayMode&&(ie.displayMode=re.displayMode.toString()),re.title&&(ie.title=re.title.toString()),re.config&&(ie.config=re.config),{text:ee.slice(te[0].length),metadata:ie}}__name(extractFrontMatter,"extractFrontMatter");var cleanupText=__name(ee=>ee.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(te,re,ie)=>"<"+re+ie.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),processFrontmatter=__name(ee=>{const{text:te,metadata:re}=extractFrontMatter(ee),{displayMode:ie,title:ne,config:ae={}}=re;return ie&&(ae.gantt||(ae.gantt={}),ae.gantt.displayMode=ie),{title:ne,config:ae,text:te}},"processFrontmatter"),processDirectives=__name(ee=>{const te=utils_default.detectInit(ee)??{},re=utils_default.detectDirective(ee,"wrap");return Array.isArray(re)?te.wrap=re.some(({type:ie})=>ie==="wrap"):(re==null?void 0:re.type)==="wrap"&&(te.wrap=!0),{text:removeDirectives(ee),directive:te}},"processDirectives");function preprocessDiagram(ee){const te=cleanupText(ee),re=processFrontmatter(te),ie=processDirectives(re.text),ne=cleanAndMerge(re.config,ie.directive);return ee=cleanupComments(ie.text),{code:ee,title:re.title,config:ne}}__name(preprocessDiagram,"preprocessDiagram");function toBase64(ee){const te=new TextEncoder().encode(ee),re=Array.from(te,ie=>String.fromCodePoint(ie)).join("");return btoa(re)}__name(toBase64,"toBase64");var MAX_TEXTLENGTH=5e4,MAX_TEXTLENGTH_EXCEEDED_MSG="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",SECURITY_LVL_SANDBOX="sandbox",SECURITY_LVL_LOOSE="loose",XMLNS_SVG_STD="http://www.w3.org/2000/svg",XMLNS_XLINK_STD="http://www.w3.org/1999/xlink",XMLNS_XHTML_STD="http://www.w3.org/1999/xhtml",IFRAME_WIDTH="100%",IFRAME_HEIGHT="100%",IFRAME_STYLES="border:0;margin:0;",IFRAME_BODY_STYLE="margin:0",IFRAME_SANDBOX_OPTS="allow-top-navigation-by-user-activation allow-popups",IFRAME_NOT_SUPPORTED_MSG='The "iframe" tag is not supported by your browser.',DOMPURIFY_TAGS=["foreignobject"],DOMPURIFY_ATTR=["dominant-baseline"];function processAndSetConfigs(ee){const te=preprocessDiagram(ee);return reset(),addDirective(te.config??{}),te}__name(processAndSetConfigs,"processAndSetConfigs");async function parse$1(ee,te){addDiagrams();try{const{code:re}=processAndSetConfigs(ee);return{diagramType:(await getDiagramFromText(re)).type}}catch(re){if(te!=null&&te.suppressErrors)return!1;throw re}}__name(parse$1,"parse");var cssImportantStyles=__name((ee,te,re=[])=>`
.${ee} ${te} { ${re.join(" !important; ")} !important; }`,"cssImportantStyles"),createCssStyles=__name((ee,te=new Map)=>{var ie;let re="";if(ee.themeCSS!==void 0&&(re+=`
${ee.themeCSS}`),ee.fontFamily!==void 0&&(re+=`
:root { --mermaid-font-family: ${ee.fontFamily}}`),ee.altFontFamily!==void 0&&(re+=`
:root { --mermaid-alt-font-family: ${ee.altFontFamily}}`),te instanceof Map){const se=ee.htmlLabels??((ie=ee.flowchart)==null?void 0:ie.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];te.forEach(le=>{isEmpty(le.styles)||se.forEach(ce=>{re+=cssImportantStyles(le.id,ce,le.styles)}),isEmpty(le.textStyles)||(re+=cssImportantStyles(le.id,"tspan",((le==null?void 0:le.textStyles)||[]).map(ce=>ce.replace("color","fill"))))})}return re},"createCssStyles"),createUserStyles=__name((ee,te,re,ie)=>{const ne=createCssStyles(ee,re),ae=styles_default(te,ne,ee.themeVariables);return serialize(compile(`${ie}{${ae}}`),stringify)},"createUserStyles"),cleanUpSvgCode=__name((ee="",te,re)=>{let ie=ee;return!re&&!te&&(ie=ie.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),ie=decodeEntities(ie),ie=ie.replace(/<br>/g,"<br/>"),ie},"cleanUpSvgCode"),putIntoIFrame=__name((ee="",te)=>{var ne,ae;const re=(ae=(ne=te==null?void 0:te.viewBox)==null?void 0:ne.baseVal)!=null&&ae.height?te.viewBox.baseVal.height+"px":IFRAME_HEIGHT,ie=toBase64(`<body style="${IFRAME_BODY_STYLE}">${ee}</body>`);return`<iframe style="width:${IFRAME_WIDTH};height:${re};${IFRAME_STYLES}" src="data:text/html;charset=UTF-8;base64,${ie}" sandbox="${IFRAME_SANDBOX_OPTS}">
${IFRAME_NOT_SUPPORTED_MSG}
</iframe>`},"putIntoIFrame"),appendDivSvgG=__name((ee,te,re,ie,ne)=>{const ae=ee.append("div");ae.attr("id",re),ie&&ae.attr("style",ie);const oe=ae.append("svg").attr("id",te).attr("width","100%").attr("xmlns",XMLNS_SVG_STD);return ne&&oe.attr("xmlns:xlink",ne),oe.append("g"),ee},"appendDivSvgG");function sandboxedIframe(ee,te){return ee.append("iframe").attr("id",te).attr("style","width: 100%; height: 100%;").attr("sandbox","")}__name(sandboxedIframe,"sandboxedIframe");var removeExistingElements=__name((ee,te,re,ie)=>{var ne,ae,oe;(ne=ee.getElementById(te))==null||ne.remove(),(ae=ee.getElementById(re))==null||ae.remove(),(oe=ee.getElementById(ie))==null||oe.remove()},"removeExistingElements"),render$1=__name(async function(ee,te,re){var Ne,ze,Be,Le,Ie,Me;addDiagrams();const ie=processAndSetConfigs(te);te=ie.code;const ne=getConfig();log.debug(ne),te.length>((ne==null?void 0:ne.maxTextSize)??MAX_TEXTLENGTH)&&(te=MAX_TEXTLENGTH_EXCEEDED_MSG);const ae="#"+ee,oe="i"+ee,se="#"+oe,le="d"+ee,ce="#"+le,he=__name(()=>{const Fe=d3select(ue?se:ce).node();Fe&&"remove"in Fe&&Fe.remove()},"removeTempElements");let de=d3select("body");const ue=ne.securityLevel===SECURITY_LVL_SANDBOX,fe=ne.securityLevel===SECURITY_LVL_LOOSE,pe=ne.fontFamily;if(re!==void 0){if(re&&(re.innerHTML=""),ue){const Re=sandboxedIframe(d3select(re),oe);de=d3select(Re.nodes()[0].contentDocument.body),de.node().style.margin=0}else de=d3select(re);appendDivSvgG(de,ee,le,`font-family: ${pe}`,XMLNS_XLINK_STD)}else{if(removeExistingElements(document,ee,le,oe),ue){const Re=sandboxedIframe(d3select("body"),oe);de=d3select(Re.nodes()[0].contentDocument.body),de.node().style.margin=0}else de=d3select("body");appendDivSvgG(de,ee,le)}let ge,ye;try{ge=await Diagram.fromText(te,{title:ie.title})}catch(Re){if(ne.suppressErrorRendering)throw he(),Re;ge=await Diagram.fromText("error"),ye=Re}const _e=de.select(ce).node(),me=ge.type,we=_e.firstChild,xe=we.firstChild,Te=(ze=(Ne=ge.renderer).getClasses)==null?void 0:ze.call(Ne,te,ge),ke=createUserStyles(ne,me,Te,ae),Ce=document.createElement("style");Ce.innerHTML=ke,we.insertBefore(Ce,xe);try{await ge.renderer.draw(te,ee,version,ge)}catch(Re){throw ne.suppressErrorRendering?he():errorRenderer_default.draw(te,ee,version),Re}const Ae=de.select(`${ce} svg`),ve=(Le=(Be=ge.db).getAccTitle)==null?void 0:Le.call(Be),Ee=(Me=(Ie=ge.db).getAccDescription)==null?void 0:Me.call(Ie);addA11yInfo(me,Ae,ve,Ee),de.select(`[id="${ee}"]`).selectAll("foreignobject > *").attr("xmlns",XMLNS_XHTML_STD);let Se=de.select(ce).node().innerHTML;if(log.debug("config.arrowMarkerAbsolute",ne.arrowMarkerAbsolute),Se=cleanUpSvgCode(Se,ue,evaluate(ne.arrowMarkerAbsolute)),ue){const Re=de.select(ce+" svg").node();Se=putIntoIFrame(Se,Re)}else fe||(Se=purify.sanitize(Se,{ADD_TAGS:DOMPURIFY_TAGS,ADD_ATTR:DOMPURIFY_ATTR}));if(attachFunctions(),ye)throw ye;return he(),{diagramType:me,svg:Se,bindFunctions:ge.db.bindFunctions}},"render");function initialize(ee={}){var ie;const te=assignWithDepth_default({},ee);te!=null&&te.fontFamily&&!((ie=te.themeVariables)!=null&&ie.fontFamily)&&(te.themeVariables||(te.themeVariables={}),te.themeVariables.fontFamily=te.fontFamily),saveConfigFromInitialize(te),te!=null&&te.theme&&te.theme in themes_default?te.themeVariables=themes_default[te.theme].getThemeVariables(te.themeVariables):te&&(te.themeVariables=themes_default.default.getThemeVariables(te.themeVariables));const re=typeof te=="object"?setSiteConfig(te):getSiteConfig();setLogLevel(re.logLevel),addDiagrams()}__name(initialize,"initialize");var getDiagramFromText=__name((ee,te={})=>{const{code:re}=preprocessDiagram(ee);return Diagram.fromText(re,te)},"getDiagramFromText");function addA11yInfo(ee,te,re,ie){setA11yDiagramInfo(te,ee),addSVGa11yTitleDescription(te,re,ie,te.attr("id"))}__name(addA11yInfo,"addA11yInfo");var mermaidAPI=Object.freeze({render:render$1,parse:parse$1,getDiagramFromText,initialize,getConfig,setConfig,getSiteConfig,updateSiteConfig,reset:__name(()=>{reset()},"reset"),globalReset:__name(()=>{reset(defaultConfig)},"globalReset"),defaultConfig});setLogLevel(getConfig().logLevel);reset(getConfig());var handleError=__name((ee,te,re)=>{log.warn(ee),isDetailedError(ee)?(re&&re(ee.str,ee.hash),te.push({...ee,message:ee.str,error:ee})):(re&&re(ee),ee instanceof Error&&te.push({str:ee.message,message:ee.message,hash:ee.name,error:ee}))},"handleError"),run=__name(async function(ee={querySelector:".mermaid"}){try{await runThrowsErrors(ee)}catch(te){if(isDetailedError(te)&&log.error(te.str),mermaid.parseError&&mermaid.parseError(te),!ee.suppressErrors)throw log.error("Use the suppressErrors option to suppress these errors"),te}},"run"),runThrowsErrors=__name(async function({postRenderCallback:ee,querySelector:te,nodes:re}={querySelector:".mermaid"}){const ie=mermaidAPI.getConfig();log.debug(`${ee?"":"No "}Callback function found`);let ne;if(re)ne=re;else if(te)ne=document.querySelectorAll(te);else throw new Error("Nodes and querySelector are both undefined");log.debug(`Found ${ne.length} diagrams`),(ie==null?void 0:ie.startOnLoad)!==void 0&&(log.debug("Start On Load: "+(ie==null?void 0:ie.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:ie==null?void 0:ie.startOnLoad}));const ae=new utils_default.InitIDGenerator(ie.deterministicIds,ie.deterministicIDSeed);let oe;const se=[];for(const le of Array.from(ne)){if(log.info("Rendering diagram: "+le.id),le.getAttribute("data-processed"))continue;le.setAttribute("data-processed","true");const ce=`mermaid-${ae.next()}`;oe=le.innerHTML,oe=dedent(utils_default.entityDecode(oe)).trim().replace(/<br\s*\/?>/gi,"<br/>");const he=utils_default.detectInit(oe);he&&log.debug("Detected early reinit: ",he);try{const{svg:de,bindFunctions:ue}=await render2(ce,oe,le);le.innerHTML=de,ee&&await ee(ce),ue&&ue(le)}catch(de){handleError(de,se,mermaid.parseError)}}if(se.length>0)throw se[0]},"runThrowsErrors"),initialize2=__name(function(ee){mermaidAPI.initialize(ee)},"initialize"),init$1=__name(async function(ee,te,re){log.warn("mermaid.init is deprecated. Please use run instead."),ee&&initialize2(ee);const ie={postRenderCallback:re,querySelector:".mermaid"};typeof te=="string"?ie.querySelector=te:te&&(te instanceof HTMLElement?ie.nodes=[te]:ie.nodes=te),await run(ie)},"init"),registerExternalDiagrams=__name(async(ee,{lazyLoad:te=!0}={})=>{addDiagrams(),registerLazyLoadedDiagrams(...ee),te===!1&&await loadRegisteredDiagrams()},"registerExternalDiagrams"),contentLoaded=__name(function(){if(mermaid.startOnLoad){const{startOnLoad:ee}=mermaidAPI.getConfig();ee&&mermaid.run().catch(te=>log.error("Mermaid failed to initialize",te))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",contentLoaded,!1);var setParseErrorHandler=__name(function(ee){mermaid.parseError=ee},"setParseErrorHandler"),executionQueue=[],executionQueueRunning=!1,executeQueue=__name(async()=>{if(!executionQueueRunning){for(executionQueueRunning=!0;executionQueue.length>0;){const ee=executionQueue.shift();if(ee)try{await ee()}catch(te){log.error("Error executing queue",te)}}executionQueueRunning=!1}},"executeQueue"),parse2=__name(async(ee,te)=>new Promise((re,ie)=>{const ne=__name(()=>new Promise((ae,oe)=>{mermaidAPI.parse(ee,te).then(se=>{ae(se),re(se)},se=>{var le;log.error("Error parsing",se),(le=mermaid.parseError)==null||le.call(mermaid,se),oe(se),ie(se)})}),"performCall");executionQueue.push(ne),executeQueue().catch(ie)}),"parse"),render2=__name((ee,te,re)=>new Promise((ie,ne)=>{const ae=__name(()=>new Promise((oe,se)=>{mermaidAPI.render(ee,te,re).then(le=>{oe(le),ie(le)},le=>{var ce;log.error("Error parsing",le),(ce=mermaid.parseError)==null||ce.call(mermaid,le),se(le),ne(le)})}),"performCall");executionQueue.push(ae),executeQueue().catch(ne)}),"render"),mermaid={startOnLoad:!0,mermaidAPI,parse:parse2,render:render2,init:init$1,run,registerExternalDiagrams,registerLayoutLoaders,initialize:initialize2,parseError:void 0,contentLoaded,setParseErrorHandler,detectType},mermaid_default=mermaid;/*! Check if previously processed *//*!
* Wait for document loaded before starting the execution
*//*! Bundled license information:
js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/mermaid_default.registerLayoutLoaders(layouts_default);const init=mermaid_default.registerExternalDiagrams([plugin$1]),render=async(ee,te,re)=>(await init,mermaid_default.initialize(ee),await mermaid_default.render(re,te)),parse=async ee=>await mermaid_default.parse(ee);/*! 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(ee){let te=ee.length;for(;--te>=0;)ee[te]=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(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(ee,te,re,ie,ne){this.static_tree=ee,this.extra_bits=te,this.extra_base=re,this.elems=ie,this.max_length=ne,this.has_stree=ee&&ee.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(ee,te){this.dyn_tree=ee,this.max_code=0,this.stat_desc=te}const d_code=ee=>ee<256?_dist_code[ee]:_dist_code[256+(ee>>>7)],put_short=(ee,te)=>{ee.pending_buf[ee.pending++]=te&255,ee.pending_buf[ee.pending++]=te>>>8&255},send_bits=(ee,te,re)=>{ee.bi_valid>Buf_size-re?(ee.bi_buf|=te<<ee.bi_valid&65535,put_short(ee,ee.bi_buf),ee.bi_buf=te>>Buf_size-ee.bi_valid,ee.bi_valid+=re-Buf_size):(ee.bi_buf|=te<<ee.bi_valid&65535,ee.bi_valid+=re)},send_code=(ee,te,re)=>{send_bits(ee,re[te*2],re[te*2+1])},bi_reverse=(ee,te)=>{let re=0;do re|=ee&1,ee>>>=1,re<<=1;while(--te>0);return re>>>1},bi_flush=ee=>{ee.bi_valid===16?(put_short(ee,ee.bi_buf),ee.bi_buf=0,ee.bi_valid=0):ee.bi_valid>=8&&(ee.pending_buf[ee.pending++]=ee.bi_buf&255,ee.bi_buf>>=8,ee.bi_valid-=8)},gen_bitlen=(ee,te)=>{const re=te.dyn_tree,ie=te.max_code,ne=te.stat_desc.static_tree,ae=te.stat_desc.has_stree,oe=te.stat_desc.extra_bits,se=te.stat_desc.extra_base,le=te.stat_desc.max_length;let ce,he,de,ue,fe,pe,ge=0;for(ue=0;ue<=MAX_BITS$1;ue++)ee.bl_count[ue]=0;for(re[ee.heap[ee.heap_max]*2+1]=0,ce=ee.heap_max+1;ce<HEAP_SIZE$1;ce++)he=ee.heap[ce],ue=re[re[he*2+1]*2+1]+1,ue>le&&(ue=le,ge++),re[he*2+1]=ue,!(he>ie)&&(ee.bl_count[ue]++,fe=0,he>=se&&(fe=oe[he-se]),pe=re[he*2],ee.opt_len+=pe*(ue+fe),ae&&(ee.static_len+=pe*(ne[he*2+1]+fe)));if(ge!==0){do{for(ue=le-1;ee.bl_count[ue]===0;)ue--;ee.bl_count[ue]--,ee.bl_count[ue+1]+=2,ee.bl_count[le]--,ge-=2}while(ge>0);for(ue=le;ue!==0;ue--)for(he=ee.bl_count[ue];he!==0;)de=ee.heap[--ce],!(de>ie)&&(re[de*2+1]!==ue&&(ee.opt_len+=(ue-re[de*2+1])*re[de*2],re[de*2+1]=ue),he--)}},gen_codes=(ee,te,re)=>{const ie=new Array(MAX_BITS$1+1);let ne=0,ae,oe;for(ae=1;ae<=MAX_BITS$1;ae++)ne=ne+re[ae-1]<<1,ie[ae]=ne;for(oe=0;oe<=te;oe++){let se=ee[oe*2+1];se!==0&&(ee[oe*2]=bi_reverse(ie[se]++,se))}},tr_static_init=()=>{let ee,te,re,ie,ne;const ae=new Array(MAX_BITS$1+1);for(re=0,ie=0;ie<LENGTH_CODES$1-1;ie++)for(base_length[ie]=re,ee=0;ee<1<<extra_lbits[ie];ee++)_length_code[re++]=ie;for(_length_code[re-1]=ie,ne=0,ie=0;ie<16;ie++)for(base_dist[ie]=ne,ee=0;ee<1<<extra_dbits[ie];ee++)_dist_code[ne++]=ie;for(ne>>=7;ie<D_CODES$1;ie++)for(base_dist[ie]=ne<<7,ee=0;ee<1<<extra_dbits[ie]-7;ee++)_dist_code[256+ne++]=ie;for(te=0;te<=MAX_BITS$1;te++)ae[te]=0;for(ee=0;ee<=143;)static_ltree[ee*2+1]=8,ee++,ae[8]++;for(;ee<=255;)static_ltree[ee*2+1]=9,ee++,ae[9]++;for(;ee<=279;)static_ltree[ee*2+1]=7,ee++,ae[7]++;for(;ee<=287;)static_ltree[ee*2+1]=8,ee++,ae[8]++;for(gen_codes(static_ltree,L_CODES$1+1,ae),ee=0;ee<D_CODES$1;ee++)static_dtree[ee*2+1]=5,static_dtree[ee*2]=bi_reverse(ee,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=ee=>{let te;for(te=0;te<L_CODES$1;te++)ee.dyn_ltree[te*2]=0;for(te=0;te<D_CODES$1;te++)ee.dyn_dtree[te*2]=0;for(te=0;te<BL_CODES$1;te++)ee.bl_tree[te*2]=0;ee.dyn_ltree[END_BLOCK*2]=1,ee.opt_len=ee.static_len=0,ee.sym_next=ee.matches=0},bi_windup=ee=>{ee.bi_valid>8?put_short(ee,ee.bi_buf):ee.bi_valid>0&&(ee.pending_buf[ee.pending++]=ee.bi_buf),ee.bi_buf=0,ee.bi_valid=0},smaller=(ee,te,re,ie)=>{const ne=te*2,ae=re*2;return ee[ne]<ee[ae]||ee[ne]===ee[ae]&&ie[te]<=ie[re]},pqdownheap=(ee,te,re)=>{const ie=ee.heap[re];let ne=re<<1;for(;ne<=ee.heap_len&&(ne<ee.heap_len&&smaller(te,ee.heap[ne+1],ee.heap[ne],ee.depth)&&ne++,!smaller(te,ie,ee.heap[ne],ee.depth));)ee.heap[re]=ee.heap[ne],re=ne,ne<<=1;ee.heap[re]=ie},compress_block=(ee,te,re)=>{let ie,ne,ae=0,oe,se;if(ee.sym_next!==0)do ie=ee.pending_buf[ee.sym_buf+ae++]&255,ie+=(ee.pending_buf[ee.sym_buf+ae++]&255)<<8,ne=ee.pending_buf[ee.sym_buf+ae++],ie===0?send_code(ee,ne,te):(oe=_length_code[ne],send_code(ee,oe+LITERALS$1+1,te),se=extra_lbits[oe],se!==0&&(ne-=base_length[oe],send_bits(ee,ne,se)),ie--,oe=d_code(ie),send_code(ee,oe,re),se=extra_dbits[oe],se!==0&&(ie-=base_dist[oe],send_bits(ee,ie,se)));while(ae<ee.sym_next);send_code(ee,END_BLOCK,te)},build_tree=(ee,te)=>{const re=te.dyn_tree,ie=te.stat_desc.static_tree,ne=te.stat_desc.has_stree,ae=te.stat_desc.elems;let oe,se,le=-1,ce;for(ee.heap_len=0,ee.heap_max=HEAP_SIZE$1,oe=0;oe<ae;oe++)re[oe*2]!==0?(ee.heap[++ee.heap_len]=le=oe,ee.depth[oe]=0):re[oe*2+1]=0;for(;ee.heap_len<2;)ce=ee.heap[++ee.heap_len]=le<2?++le:0,re[ce*2]=1,ee.depth[ce]=0,ee.opt_len--,ne&&(ee.static_len-=ie[ce*2+1]);for(te.max_code=le,oe=ee.heap_len>>1;oe>=1;oe--)pqdownheap(ee,re,oe);ce=ae;do oe=ee.heap[1],ee.heap[1]=ee.heap[ee.heap_len--],pqdownheap(ee,re,1),se=ee.heap[1],ee.heap[--ee.heap_max]=oe,ee.heap[--ee.heap_max]=se,re[ce*2]=re[oe*2]+re[se*2],ee.depth[ce]=(ee.depth[oe]>=ee.depth[se]?ee.depth[oe]:ee.depth[se])+1,re[oe*2+1]=re[se*2+1]=ce,ee.heap[1]=ce++,pqdownheap(ee,re,1);while(ee.heap_len>=2);ee.heap[--ee.heap_max]=ee.heap[1],gen_bitlen(ee,te),gen_codes(re,le,ee.bl_count)},scan_tree=(ee,te,re)=>{let ie,ne=-1,ae,oe=te[0*2+1],se=0,le=7,ce=4;for(oe===0&&(le=138,ce=3),te[(re+1)*2+1]=65535,ie=0;ie<=re;ie++)ae=oe,oe=te[(ie+1)*2+1],!(++se<le&&ae===oe)&&(se<ce?ee.bl_tree[ae*2]+=se:ae!==0?(ae!==ne&&ee.bl_tree[ae*2]++,ee.bl_tree[REP_3_6*2]++):se<=10?ee.bl_tree[REPZ_3_10*2]++:ee.bl_tree[REPZ_11_138*2]++,se=0,ne=ae,oe===0?(le=138,ce=3):ae===oe?(le=6,ce=3):(le=7,ce=4))},send_tree=(ee,te,re)=>{let ie,ne=-1,ae,oe=te[0*2+1],se=0,le=7,ce=4;for(oe===0&&(le=138,ce=3),ie=0;ie<=re;ie++)if(ae=oe,oe=te[(ie+1)*2+1],!(++se<le&&ae===oe)){if(se<ce)do send_code(ee,ae,ee.bl_tree);while(--se!==0);else ae!==0?(ae!==ne&&(send_code(ee,ae,ee.bl_tree),se--),send_code(ee,REP_3_6,ee.bl_tree),send_bits(ee,se-3,2)):se<=10?(send_code(ee,REPZ_3_10,ee.bl_tree),send_bits(ee,se-3,3)):(send_code(ee,REPZ_11_138,ee.bl_tree),send_bits(ee,se-11,7));se=0,ne=ae,oe===0?(le=138,ce=3):ae===oe?(le=6,ce=3):(le=7,ce=4)}},build_bl_tree=ee=>{let te;for(scan_tree(ee,ee.dyn_ltree,ee.l_desc.max_code),scan_tree(ee,ee.dyn_dtree,ee.d_desc.max_code),build_tree(ee,ee.bl_desc),te=BL_CODES$1-1;te>=3&&ee.bl_tree[bl_order[te]*2+1]===0;te--);return ee.opt_len+=3*(te+1)+5+5+4,te},send_all_trees=(ee,te,re,ie)=>{let ne;for(send_bits(ee,te-257,5),send_bits(ee,re-1,5),send_bits(ee,ie-4,4),ne=0;ne<ie;ne++)send_bits(ee,ee.bl_tree[bl_order[ne]*2+1],3);send_tree(ee,ee.dyn_ltree,te-1),send_tree(ee,ee.dyn_dtree,re-1)},detect_data_type=ee=>{let te=4093624447,re;for(re=0;re<=31;re++,te>>>=1)if(te&1&&ee.dyn_ltree[re*2]!==0)return Z_BINARY;if(ee.dyn_ltree[9*2]!==0||ee.dyn_ltree[10*2]!==0||ee.dyn_ltree[13*2]!==0)return Z_TEXT;for(re=32;re<LITERALS$1;re++)if(ee.dyn_ltree[re*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=ee=>{static_init_done||(tr_static_init(),static_init_done=!0),ee.l_desc=new TreeDesc(ee.dyn_ltree,static_l_desc),ee.d_desc=new TreeDesc(ee.dyn_dtree,static_d_desc),ee.bl_desc=new TreeDesc(ee.bl_tree,static_bl_desc),ee.bi_buf=0,ee.bi_valid=0,init_block(ee)},_tr_stored_block$1=(ee,te,re,ie)=>{send_bits(ee,(STORED_BLOCK<<1)+(ie?1:0),3),bi_windup(ee),put_short(ee,re),put_short(ee,~re),re&&ee.pending_buf.set(ee.window.subarray(te,te+re),ee.pending),ee.pending+=re},_tr_align$1=ee=>{send_bits(ee,STATIC_TREES<<1,3),send_code(ee,END_BLOCK,static_ltree),bi_flush(ee)},_tr_flush_block$1=(ee,te,re,ie)=>{let ne,ae,oe=0;ee.level>0?(ee.strm.data_type===Z_UNKNOWN$1&&(ee.strm.data_type=detect_data_type(ee)),build_tree(ee,ee.l_desc),build_tree(ee,ee.d_desc),oe=build_bl_tree(ee),ne=ee.opt_len+3+7>>>3,ae=ee.static_len+3+7>>>3,ae<=ne&&(ne=ae)):ne=ae=re+5,re+4<=ne&&te!==-1?_tr_stored_block$1(ee,te,re,ie):ee.strategy===Z_FIXED$1||ae===ne?(send_bits(ee,(STATIC_TREES<<1)+(ie?1:0),3),compress_block(ee,static_ltree,static_dtree)):(send_bits(ee,(DYN_TREES<<1)+(ie?1:0),3),send_all_trees(ee,ee.l_desc.max_code+1,ee.d_desc.max_code+1,oe+1),compress_block(ee,ee.dyn_ltree,ee.dyn_dtree)),init_block(ee),ie&&bi_windup(ee)},_tr_tally$1=(ee,te,re)=>(ee.pending_buf[ee.sym_buf+ee.sym_next++]=te,ee.pending_buf[ee.sym_buf+ee.sym_next++]=te>>8,ee.pending_buf[ee.sym_buf+ee.sym_next++]=re,te===0?ee.dyn_ltree[re*2]++:(ee.matches++,te--,ee.dyn_ltree[(_length_code[re]+LITERALS$1+1)*2]++,ee.dyn_dtree[d_code(te)*2]++),ee.sym_next===ee.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=(ee,te,re,ie)=>{let ne=ee&65535|0,ae=ee>>>16&65535|0,oe=0;for(;re!==0;){oe=re>2e3?2e3:re,re-=oe;do ne=ne+te[ie++]|0,ae=ae+ne|0;while(--oe);ne%=65521,ae%=65521}return ne|ae<<16|0};var adler32_1=adler32;const makeTable=()=>{let ee,te=[];for(var re=0;re<256;re++){ee=re;for(var ie=0;ie<8;ie++)ee=ee&1?3988292384^ee>>>1:ee>>>1;te[re]=ee}return te},crcTable=new Uint32Array(makeTable()),crc32=(ee,te,re,ie)=>{const ne=crcTable,ae=ie+re;ee^=-1;for(let oe=ie;oe<ae;oe++)ee=ee>>>8^ne[(ee^te[oe])&255];return ee^-1};var crc32_1=crc32,messages={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=(ee,te)=>(ee.msg=messages[te],te),rank=ee=>ee*2-(ee>4?9:0),zero=ee=>{let te=ee.length;for(;--te>=0;)ee[te]=0},slide_hash=ee=>{let te,re,ie,ne=ee.w_size;te=ee.hash_size,ie=te;do re=ee.head[--ie],ee.head[ie]=re>=ne?re-ne:0;while(--te);te=ne,ie=te;do re=ee.prev[--ie],ee.prev[ie]=re>=ne?re-ne:0;while(--te)};let HASH_ZLIB=(ee,te,re)=>(te<<ee.hash_shift^re)&ee.hash_mask,HASH=HASH_ZLIB;const flush_pending=ee=>{const te=ee.state;let re=te.pending;re>ee.avail_out&&(re=ee.avail_out),re!==0&&(ee.output.set(te.pending_buf.subarray(te.pending_out,te.pending_out+re),ee.next_out),ee.next_out+=re,te.pending_out+=re,ee.total_out+=re,ee.avail_out-=re,te.pending-=re,te.pending===0&&(te.pending_out=0))},flush_block_only=(ee,te)=>{_tr_flush_block(ee,ee.block_start>=0?ee.block_start:-1,ee.strstart-ee.block_start,te),ee.block_start=ee.strstart,flush_pending(ee.strm)},put_byte=(ee,te)=>{ee.pending_buf[ee.pending++]=te},putShortMSB=(ee,te)=>{ee.pending_buf[ee.pending++]=te>>>8&255,ee.pending_buf[ee.pending++]=te&255},read_buf=(ee,te,re,ie)=>{let ne=ee.avail_in;return ne>ie&&(ne=ie),ne===0?0:(ee.avail_in-=ne,te.set(ee.input.subarray(ee.next_in,ee.next_in+ne),re),ee.state.wrap===1?ee.adler=adler32_1(ee.adler,te,ne,re):ee.state.wrap===2&&(ee.adler=crc32_1(ee.adler,te,ne,re)),ee.next_in+=ne,ee.total_in+=ne,ne)},longest_match=(ee,te)=>{let re=ee.max_chain_length,ie=ee.strstart,ne,ae,oe=ee.prev_length,se=ee.nice_match;const le=ee.strstart>ee.w_size-MIN_LOOKAHEAD?ee.strstart-(ee.w_size-MIN_LOOKAHEAD):0,ce=ee.window,he=ee.w_mask,de=ee.prev,ue=ee.strstart+MAX_MATCH;let fe=ce[ie+oe-1],pe=ce[ie+oe];ee.prev_length>=ee.good_match&&(re>>=2),se>ee.lookahead&&(se=ee.lookahead);do if(ne=te,!(ce[ne+oe]!==pe||ce[ne+oe-1]!==fe||ce[ne]!==ce[ie]||ce[++ne]!==ce[ie+1])){ie+=2,ne++;do;while(ce[++ie]===ce[++ne]&&ce[++ie]===ce[++ne]&&ce[++ie]===ce[++ne]&&ce[++ie]===ce[++ne]&&ce[++ie]===ce[++ne]&&ce[++ie]===ce[++ne]&&ce[++ie]===ce[++ne]&&ce[++ie]===ce[++ne]&&ie<ue);if(ae=MAX_MATCH-(ue-ie),ie=ue-MAX_MATCH,ae>oe){if(ee.match_start=te,oe=ae,ae>=se)break;fe=ce[ie+oe-1],pe=ce[ie+oe]}}while((te=de[te&he])>le&&--re!==0);return oe<=ee.lookahead?oe:ee.lookahead},fill_window=ee=>{const te=ee.w_size;let re,ie,ne;do{if(ie=ee.window_size-ee.lookahead-ee.strstart,ee.strstart>=te+(te-MIN_LOOKAHEAD)&&(ee.window.set(ee.window.subarray(te,te+te-ie),0),ee.match_start-=te,ee.strstart-=te,ee.block_start-=te,ee.insert>ee.strstart&&(ee.insert=ee.strstart),slide_hash(ee),ie+=te),ee.strm.avail_in===0)break;if(re=read_buf(ee.strm,ee.window,ee.strstart+ee.lookahead,ie),ee.lookahead+=re,ee.lookahead+ee.insert>=MIN_MATCH)for(ne=ee.strstart-ee.insert,ee.ins_h=ee.window[ne],ee.ins_h=HASH(ee,ee.ins_h,ee.window[ne+1]);ee.insert&&(ee.ins_h=HASH(ee,ee.ins_h,ee.window[ne+MIN_MATCH-1]),ee.prev[ne&ee.w_mask]=ee.head[ee.ins_h],ee.head[ee.ins_h]=ne,ne++,ee.insert--,!(ee.lookahead+ee.insert<MIN_MATCH)););}while(ee.lookahead<MIN_LOOKAHEAD&&ee.strm.avail_in!==0)},deflate_stored=(ee,te)=>{let re=ee.pending_buf_size-5>ee.w_size?ee.w_size:ee.pending_buf_size-5,ie,ne,ae,oe=0,se=ee.strm.avail_in;do{if(ie=65535,ae=ee.bi_valid+42>>3,ee.strm.avail_out<ae||(ae=ee.strm.avail_out-ae,ne=ee.strstart-ee.block_start,ie>ne+ee.strm.avail_in&&(ie=ne+ee.strm.avail_in),ie>ae&&(ie=ae),ie<re&&(ie===0&&te!==Z_FINISH$3||te===Z_NO_FLUSH$2||ie!==ne+ee.strm.avail_in)))break;oe=te===Z_FINISH$3&&ie===ne+ee.strm.avail_in?1:0,_tr_stored_block(ee,0,0,oe),ee.pending_buf[ee.pending-4]=ie,ee.pending_buf[ee.pending-3]=ie>>8,ee.pending_buf[ee.pending-2]=~ie,ee.pending_buf[ee.pending-1]=~ie>>8,flush_pending(ee.strm),ne&&(ne>ie&&(ne=ie),ee.strm.output.set(ee.window.subarray(ee.block_start,ee.block_start+ne),ee.strm.next_out),ee.strm.next_out+=ne,ee.strm.avail_out-=ne,ee.strm.total_out+=ne,ee.block_start+=ne,ie-=ne),ie&&(read_buf(ee.strm,ee.strm.output,ee.strm.next_out,ie),ee.strm.next_out+=ie,ee.strm.avail_out-=ie,ee.strm.total_out+=ie)}while(oe===0);return se-=ee.strm.avail_in,se&&(se>=ee.w_size?(ee.matches=2,ee.window.set(ee.strm.input.subarray(ee.strm.next_in-ee.w_size,ee.strm.next_in),0),ee.strstart=ee.w_size,ee.insert=ee.strstart):(ee.window_size-ee.strstart<=se&&(ee.strstart-=ee.w_size,ee.window.set(ee.window.subarray(ee.w_size,ee.w_size+ee.strstart),0),ee.matches<2&&ee.matches++,ee.insert>ee.strstart&&(ee.insert=ee.strstart)),ee.window.set(ee.strm.input.subarray(ee.strm.next_in-se,ee.strm.next_in),ee.strstart),ee.strstart+=se,ee.insert+=se>ee.w_size-ee.insert?ee.w_size-ee.insert:se),ee.block_start=ee.strstart),ee.high_water<ee.strstart&&(ee.high_water=ee.strstart),oe?BS_FINISH_DONE:te!==Z_NO_FLUSH$2&&te!==Z_FINISH$3&&ee.strm.avail_in===0&&ee.strstart===ee.block_start?BS_BLOCK_DONE:(ae=ee.window_size-ee.strstart,ee.strm.avail_in>ae&&ee.block_start>=ee.w_size&&(ee.block_start-=ee.w_size,ee.strstart-=ee.w_size,ee.window.set(ee.window.subarray(ee.w_size,ee.w_size+ee.strstart),0),ee.matches<2&&ee.matches++,ae+=ee.w_size,ee.insert>ee.strstart&&(ee.insert=ee.strstart)),ae>ee.strm.avail_in&&(ae=ee.strm.avail_in),ae&&(read_buf(ee.strm,ee.window,ee.strstart,ae),ee.strstart+=ae,ee.insert+=ae>ee.w_size-ee.insert?ee.w_size-ee.insert:ae),ee.high_water<ee.strstart&&(ee.high_water=ee.strstart),ae=ee.bi_valid+42>>3,ae=ee.pending_buf_size-ae>65535?65535:ee.pending_buf_size-ae,re=ae>ee.w_size?ee.w_size:ae,ne=ee.strstart-ee.block_start,(ne>=re||(ne||te===Z_FINISH$3)&&te!==Z_NO_FLUSH$2&&ee.strm.avail_in===0&&ne<=ae)&&(ie=ne>ae?ae:ne,oe=te===Z_FINISH$3&&ee.strm.avail_in===0&&ie===ne?1:0,_tr_stored_block(ee,ee.block_start,ie,oe),ee.block_start+=ie,flush_pending(ee.strm)),oe?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(ee,te)=>{let re,ie;for(;;){if(ee.lookahead<MIN_LOOKAHEAD){if(fill_window(ee),ee.lookahead<MIN_LOOKAHEAD&&te===Z_NO_FLUSH$2)return BS_NEED_MORE;if(ee.lookahead===0)break}if(re=0,ee.lookahead>=MIN_MATCH&&(ee.ins_h=HASH(ee,ee.ins_h,ee.window[ee.strstart+MIN_MATCH-1]),re=ee.prev[ee.strstart&ee.w_mask]=ee.head[ee.ins_h],ee.head[ee.ins_h]=ee.strstart),re!==0&&ee.strstart-re<=ee.w_size-MIN_LOOKAHEAD&&(ee.match_length=longest_match(ee,re)),ee.match_length>=MIN_MATCH)if(ie=_tr_tally(ee,ee.strstart-ee.match_start,ee.match_length-MIN_MATCH),ee.lookahead-=ee.match_length,ee.match_length<=ee.max_lazy_match&&ee.lookahead>=MIN_MATCH){ee.match_length--;do ee.strstart++,ee.ins_h=HASH(ee,ee.ins_h,ee.window[ee.strstart+MIN_MATCH-1]),re=ee.prev[ee.strstart&ee.w_mask]=ee.head[ee.ins_h],ee.head[ee.ins_h]=ee.strstart;while(--ee.match_length!==0);ee.strstart++}else ee.strstart+=ee.match_length,ee.match_length=0,ee.ins_h=ee.window[ee.strstart],ee.ins_h=HASH(ee,ee.ins_h,ee.window[ee.strstart+1]);else ie=_tr_tally(ee,0,ee.window[ee.strstart]),ee.lookahead--,ee.strstart++;if(ie&&(flush_block_only(ee,!1),ee.strm.avail_out===0))return BS_NEED_MORE}return ee.insert=ee.strstart<MIN_MATCH-1?ee.strstart:MIN_MATCH-1,te===Z_FINISH$3?(flush_block_only(ee,!0),ee.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):ee.sym_next&&(flush_block_only(ee,!1),ee.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(ee,te)=>{let re,ie,ne;for(;;){if(ee.lookahead<MIN_LOOKAHEAD){if(fill_window(ee),ee.lookahead<MIN_LOOKAHEAD&&te===Z_NO_FLUSH$2)return BS_NEED_MORE;if(ee.lookahead===0)break}if(re=0,ee.lookahead>=MIN_MATCH&&(ee.ins_h=HASH(ee,ee.ins_h,ee.window[ee.strstart+MIN_MATCH-1]),re=ee.prev[ee.strstart&ee.w_mask]=ee.head[ee.ins_h],ee.head[ee.ins_h]=ee.strstart),ee.prev_length=ee.match_length,ee.prev_match=ee.match_start,ee.match_length=MIN_MATCH-1,re!==0&&ee.prev_length<ee.max_lazy_match&&ee.strstart-re<=ee.w_size-MIN_LOOKAHEAD&&(ee.match_length=longest_match(ee,re),ee.match_length<=5&&(ee.strategy===Z_FILTERED||ee.match_length===MIN_MATCH&&ee.strstart-ee.match_start>4096)&&(ee.match_length=MIN_MATCH-1)),ee.prev_length>=MIN_MATCH&&ee.match_length<=ee.prev_length){ne=ee.strstart+ee.lookahead-MIN_MATCH,ie=_tr_tally(ee,ee.strstart-1-ee.prev_match,ee.prev_length-MIN_MATCH),ee.lookahead-=ee.prev_length-1,ee.prev_length-=2;do++ee.strstart<=ne&&(ee.ins_h=HASH(ee,ee.ins_h,ee.window[ee.strstart+MIN_MATCH-1]),re=ee.prev[ee.strstart&ee.w_mask]=ee.head[ee.ins_h],ee.head[ee.ins_h]=ee.strstart);while(--ee.prev_length!==0);if(ee.match_available=0,ee.match_length=MIN_MATCH-1,ee.strstart++,ie&&(flush_block_only(ee,!1),ee.strm.avail_out===0))return BS_NEED_MORE}else if(ee.match_available){if(ie=_tr_tally(ee,0,ee.window[ee.strstart-1]),ie&&flush_block_only(ee,!1),ee.strstart++,ee.lookahead--,ee.strm.avail_out===0)return BS_NEED_MORE}else ee.match_available=1,ee.strstart++,ee.lookahead--}return ee.match_available&&(ie=_tr_tally(ee,0,ee.window[ee.strstart-1]),ee.match_available=0),ee.insert=ee.strstart<MIN_MATCH-1?ee.strstart:MIN_MATCH-1,te===Z_FINISH$3?(flush_block_only(ee,!0),ee.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):ee.sym_next&&(flush_block_only(ee,!1),ee.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(ee,te)=>{let re,ie,ne,ae;const oe=ee.window;for(;;){if(ee.lookahead<=MAX_MATCH){if(fill_window(ee),ee.lookahead<=MAX_MATCH&&te===Z_NO_FLUSH$2)return BS_NEED_MORE;if(ee.lookahead===0)break}if(ee.match_length=0,ee.lookahead>=MIN_MATCH&&ee.strstart>0&&(ne=ee.strstart-1,ie=oe[ne],ie===oe[++ne]&&ie===oe[++ne]&&ie===oe[++ne])){ae=ee.strstart+MAX_MATCH;do;while(ie===oe[++ne]&&ie===oe[++ne]&&ie===oe[++ne]&&ie===oe[++ne]&&ie===oe[++ne]&&ie===oe[++ne]&&ie===oe[++ne]&&ie===oe[++ne]&&ne<ae);ee.match_length=MAX_MATCH-(ae-ne),ee.match_length>ee.lookahead&&(ee.match_length=ee.lookahead)}if(ee.match_length>=MIN_MATCH?(re=_tr_tally(ee,1,ee.match_length-MIN_MATCH),ee.lookahead-=ee.match_length,ee.strstart+=ee.match_length,ee.match_length=0):(re=_tr_tally(ee,0,ee.window[ee.strstart]),ee.lookahead--,ee.strstart++),re&&(flush_block_only(ee,!1),ee.strm.avail_out===0))return BS_NEED_MORE}return ee.insert=0,te===Z_FINISH$3?(flush_block_only(ee,!0),ee.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):ee.sym_next&&(flush_block_only(ee,!1),ee.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(ee,te)=>{let re;for(;;){if(ee.lookahead===0&&(fill_window(ee),ee.lookahead===0)){if(te===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(ee.match_length=0,re=_tr_tally(ee,0,ee.window[ee.strstart]),ee.lookahead--,ee.strstart++,re&&(flush_block_only(ee,!1),ee.strm.avail_out===0))return BS_NEED_MORE}return ee.insert=0,te===Z_FINISH$3?(flush_block_only(ee,!0),ee.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):ee.sym_next&&(flush_block_only(ee,!1),ee.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(ee,te,re,ie,ne){this.good_length=ee,this.max_lazy=te,this.nice_length=re,this.max_chain=ie,this.func=ne}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=ee=>{ee.window_size=2*ee.w_size,zero(ee.head),ee.max_lazy_match=configuration_table[ee.level].max_lazy,ee.good_match=configuration_table[ee.level].good_length,ee.nice_match=configuration_table[ee.level].nice_length,ee.max_chain_length=configuration_table[ee.level].max_chain,ee.strstart=0,ee.block_start=0,ee.lookahead=0,ee.insert=0,ee.match_length=ee.prev_length=MIN_MATCH-1,ee.match_available=0,ee.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(this.dyn_ltree),zero(this.dyn_dtree),zero(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(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(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=ee=>{if(!ee)return 1;const te=ee.state;return!te||te.strm!==ee||te.status!==INIT_STATE&&te.status!==GZIP_STATE&&te.status!==EXTRA_STATE&&te.status!==NAME_STATE&&te.status!==COMMENT_STATE&&te.status!==HCRC_STATE&&te.status!==BUSY_STATE&&te.status!==FINISH_STATE?1:0},deflateResetKeep=ee=>{if(deflateStateCheck(ee))return err(ee,Z_STREAM_ERROR$2);ee.total_in=ee.total_out=0,ee.data_type=Z_UNKNOWN;const te=ee.state;return te.pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap===2?GZIP_STATE:te.wrap?INIT_STATE:BUSY_STATE,ee.adler=te.wrap===2?0:1,te.last_flush=-2,_tr_init(te),Z_OK$3},deflateReset=ee=>{const te=deflateResetKeep(ee);return te===Z_OK$3&&lm_init(ee.state),te},deflateSetHeader=(ee,te)=>deflateStateCheck(ee)||ee.state.wrap!==2?Z_STREAM_ERROR$2:(ee.state.gzhead=te,Z_OK$3),deflateInit2=(ee,te,re,ie,ne,ae)=>{if(!ee)return Z_STREAM_ERROR$2;let oe=1;if(te===Z_DEFAULT_COMPRESSION$1&&(te=6),ie<0?(oe=0,ie=-ie):ie>15&&(oe=2,ie-=16),ne<1||ne>MAX_MEM_LEVEL||re!==Z_DEFLATED$2||ie<8||ie>15||te<0||te>9||ae<0||ae>Z_FIXED||ie===8&&oe!==1)return err(ee,Z_STREAM_ERROR$2);ie===8&&(ie=9);const se=new DeflateState;return ee.state=se,se.strm=ee,se.status=INIT_STATE,se.wrap=oe,se.gzhead=null,se.w_bits=ie,se.w_size=1<<se.w_bits,se.w_mask=se.w_size-1,se.hash_bits=ne+7,se.hash_size=1<<se.hash_bits,se.hash_mask=se.hash_size-1,se.hash_shift=~~((se.hash_bits+MIN_MATCH-1)/MIN_MATCH),se.window=new Uint8Array(se.w_size*2),se.head=new Uint16Array(se.hash_size),se.prev=new Uint16Array(se.w_size),se.lit_bufsize=1<<ne+6,se.pending_buf_size=se.lit_bufsize*4,se.pending_buf=new Uint8Array(se.pending_buf_size),se.sym_buf=se.lit_bufsize,se.sym_end=(se.lit_bufsize-1)*3,se.level=te,se.strategy=ae,se.method=re,deflateReset(ee)},deflateInit=(ee,te)=>deflateInit2(ee,te,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(ee,te)=>{if(deflateStateCheck(ee)||te>Z_BLOCK$1||te<0)return ee?err(ee,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const re=ee.state;if(!ee.output||ee.avail_in!==0&&!ee.input||re.status===FINISH_STATE&&te!==Z_FINISH$3)return err(ee,ee.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const ie=re.last_flush;if(re.last_flush=te,re.pending!==0){if(flush_pending(ee),ee.avail_out===0)return re.last_flush=-1,Z_OK$3}else if(ee.avail_in===0&&rank(te)<=rank(ie)&&te!==Z_FINISH$3)return err(ee,Z_BUF_ERROR$1);if(re.status===FINISH_STATE&&ee.avail_in!==0)return err(ee,Z_BUF_ERROR$1);if(re.status===INIT_STATE&&re.wrap===0&&(re.status=BUSY_STATE),re.status===INIT_STATE){let ne=Z_DEFLATED$2+(re.w_bits-8<<4)<<8,ae=-1;if(re.strategy>=Z_HUFFMAN_ONLY||re.level<2?ae=0:re.level<6?ae=1:re.level===6?ae=2:ae=3,ne|=ae<<6,re.strstart!==0&&(ne|=PRESET_DICT),ne+=31-ne%31,putShortMSB(re,ne),re.strstart!==0&&(putShortMSB(re,ee.adler>>>16),putShortMSB(re,ee.adler&65535)),ee.adler=1,re.status=BUSY_STATE,flush_pending(ee),re.pending!==0)return re.last_flush=-1,Z_OK$3}if(re.status===GZIP_STATE){if(ee.adler=0,put_byte(re,31),put_byte(re,139),put_byte(re,8),re.gzhead)put_byte(re,(re.gzhead.text?1:0)+(re.gzhead.hcrc?2:0)+(re.gzhead.extra?4:0)+(re.gzhead.name?8:0)+(re.gzhead.comment?16:0)),put_byte(re,re.gzhead.time&255),put_byte(re,re.gzhead.time>>8&255),put_byte(re,re.gzhead.time>>16&255),put_byte(re,re.gzhead.time>>24&255),put_byte(re,re.level===9?2:re.strategy>=Z_HUFFMAN_ONLY||re.level<2?4:0),put_byte(re,re.gzhead.os&255),re.gzhead.extra&&re.gzhead.extra.length&&(put_byte(re,re.gzhead.extra.length&255),put_byte(re,re.gzhead.extra.length>>8&255)),re.gzhead.hcrc&&(ee.adler=crc32_1(ee.adler,re.pending_buf,re.pending,0)),re.gzindex=0,re.status=EXTRA_STATE;else if(put_byte(re,0),put_byte(re,0),put_byte(re,0),put_byte(re,0),put_byte(re,0),put_byte(re,re.level===9?2:re.strategy>=Z_HUFFMAN_ONLY||re.level<2?4:0),put_byte(re,OS_CODE),re.status=BUSY_STATE,flush_pending(ee),re.pending!==0)return re.last_flush=-1,Z_OK$3}if(re.status===EXTRA_STATE){if(re.gzhead.extra){let ne=re.pending,ae=(re.gzhead.extra.length&65535)-re.gzindex;for(;re.pending+ae>re.pending_buf_size;){let se=re.pending_buf_size-re.pending;if(re.pending_buf.set(re.gzhead.extra.subarray(re.gzindex,re.gzindex+se),re.pending),re.pending=re.pending_buf_size,re.gzhead.hcrc&&re.pending>ne&&(ee.adler=crc32_1(ee.adler,re.pending_buf,re.pending-ne,ne)),re.gzindex+=se,flush_pending(ee),re.pending!==0)return re.last_flush=-1,Z_OK$3;ne=0,ae-=se}let oe=new Uint8Array(re.gzhead.extra);re.pending_buf.set(oe.subarray(re.gzindex,re.gzindex+ae),re.pending),re.pending+=ae,re.gzhead.hcrc&&re.pending>ne&&(ee.adler=crc32_1(ee.adler,re.pending_buf,re.pending-ne,ne)),re.gzindex=0}re.status=NAME_STATE}if(re.status===NAME_STATE){if(re.gzhead.name){let ne=re.pending,ae;do{if(re.pending===re.pending_buf_size){if(re.gzhead.hcrc&&re.pending>ne&&(ee.adler=crc32_1(ee.adler,re.pending_buf,re.pending-ne,ne)),flush_pending(ee),re.pending!==0)return re.last_flush=-1,Z_OK$3;ne=0}re.gzindex<re.gzhead.name.length?ae=re.gzhead.name.charCodeAt(re.gzindex++)&255:ae=0,put_byte(re,ae)}while(ae!==0);re.gzhead.hcrc&&re.pending>ne&&(ee.adler=crc32_1(ee.adler,re.pending_buf,re.pending-ne,ne)),re.gzindex=0}re.status=COMMENT_STATE}if(re.status===COMMENT_STATE){if(re.gzhead.comment){let ne=re.pending,ae;do{if(re.pending===re.pending_buf_size){if(re.gzhead.hcrc&&re.pending>ne&&(ee.adler=crc32_1(ee.adler,re.pending_buf,re.pending-ne,ne)),flush_pending(ee),re.pending!==0)return re.last_flush=-1,Z_OK$3;ne=0}re.gzindex<re.gzhead.comment.length?ae=re.gzhead.comment.charCodeAt(re.gzindex++)&255:ae=0,put_byte(re,ae)}while(ae!==0);re.gzhead.hcrc&&re.pending>ne&&(ee.adler=crc32_1(ee.adler,re.pending_buf,re.pending-ne,ne))}re.status=HCRC_STATE}if(re.status===HCRC_STATE){if(re.gzhead.hcrc){if(re.pending+2>re.pending_buf_size&&(flush_pending(ee),re.pending!==0))return re.last_flush=-1,Z_OK$3;put_byte(re,ee.adler&255),put_byte(re,ee.adler>>8&255),ee.adler=0}if(re.status=BUSY_STATE,flush_pending(ee),re.pending!==0)return re.last_flush=-1,Z_OK$3}if(ee.avail_in!==0||re.lookahead!==0||te!==Z_NO_FLUSH$2&&re.status!==FINISH_STATE){let ne=re.level===0?deflate_stored(re,te):re.strategy===Z_HUFFMAN_ONLY?deflate_huff(re,te):re.strategy===Z_RLE?deflate_rle(re,te):configuration_table[re.level].func(re,te);if((ne===BS_FINISH_STARTED||ne===BS_FINISH_DONE)&&(re.status=FINISH_STATE),ne===BS_NEED_MORE||ne===BS_FINISH_STARTED)return ee.avail_out===0&&(re.last_flush=-1),Z_OK$3;if(ne===BS_BLOCK_DONE&&(te===Z_PARTIAL_FLUSH?_tr_align(re):te!==Z_BLOCK$1&&(_tr_stored_block(re,0,0,!1),te===Z_FULL_FLUSH$1&&(zero(re.head),re.lookahead===0&&(re.strstart=0,re.block_start=0,re.insert=0))),flush_pending(ee),ee.avail_out===0))return re.last_flush=-1,Z_OK$3}return te!==Z_FINISH$3?Z_OK$3:re.wrap<=0?Z_STREAM_END$3:(re.wrap===2?(put_byte(re,ee.adler&255),put_byte(re,ee.adler>>8&255),put_byte(re,ee.adler>>16&255),put_byte(re,ee.adler>>24&255),put_byte(re,ee.total_in&255),put_byte(re,ee.total_in>>8&255),put_byte(re,ee.total_in>>16&255),put_byte(re,ee.total_in>>24&255)):(putShortMSB(re,ee.adler>>>16),putShortMSB(re,ee.adler&65535)),flush_pending(ee),re.wrap>0&&(re.wrap=-re.wrap),re.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=ee=>{if(deflateStateCheck(ee))return Z_STREAM_ERROR$2;const te=ee.state.status;return ee.state=null,te===BUSY_STATE?err(ee,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(ee,te)=>{let re=te.length;if(deflateStateCheck(ee))return Z_STREAM_ERROR$2;const ie=ee.state,ne=ie.wrap;if(ne===2||ne===1&&ie.status!==INIT_STATE||ie.lookahead)return Z_STREAM_ERROR$2;if(ne===1&&(ee.adler=adler32_1(ee.adler,te,re,0)),ie.wrap=0,re>=ie.w_size){ne===0&&(zero(ie.head),ie.strstart=0,ie.block_start=0,ie.insert=0);let le=new Uint8Array(ie.w_size);le.set(te.subarray(re-ie.w_size,re),0),te=le,re=ie.w_size}const ae=ee.avail_in,oe=ee.next_in,se=ee.input;for(ee.avail_in=re,ee.next_in=0,ee.input=te,fill_window(ie);ie.lookahead>=MIN_MATCH;){let le=ie.strstart,ce=ie.lookahead-(MIN_MATCH-1);do ie.ins_h=HASH(ie,ie.ins_h,ie.window[le+MIN_MATCH-1]),ie.prev[le&ie.w_mask]=ie.head[ie.ins_h],ie.head[ie.ins_h]=le,le++;while(--ce);ie.strstart=le,ie.lookahead=MIN_MATCH-1,fill_window(ie)}return ie.strstart+=ie.lookahead,ie.block_start=ie.strstart,ie.insert=ie.lookahead,ie.lookahead=0,ie.match_length=ie.prev_length=MIN_MATCH-1,ie.match_available=0,ee.next_in=oe,ee.input=se,ee.avail_in=ae,ie.wrap=ne,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=(ee,te)=>Object.prototype.hasOwnProperty.call(ee,te);var assign=function(ee){const te=Array.prototype.slice.call(arguments,1);for(;te.length;){const re=te.shift();if(re){if(typeof re!="object")throw new TypeError(re+"must be non-object");for(const ie in re)_has(re,ie)&&(ee[ie]=re[ie])}}return ee},flattenChunks=ee=>{let te=0;for(let ie=0,ne=ee.length;ie<ne;ie++)te+=ee[ie].length;const re=new Uint8Array(te);for(let ie=0,ne=0,ae=ee.length;ie<ae;ie++){let oe=ee[ie];re.set(oe,ne),ne+=oe.length}return re},common={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(ee){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let ee=0;ee<256;ee++)_utf8len[ee]=ee>=252?6:ee>=248?5:ee>=240?4:ee>=224?3:ee>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=ee=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(ee);let te,re,ie,ne,ae,oe=ee.length,se=0;for(ne=0;ne<oe;ne++)re=ee.charCodeAt(ne),(re&64512)===55296&&ne+1<oe&&(ie=ee.charCodeAt(ne+1),(ie&64512)===56320&&(re=65536+(re-55296<<10)+(ie-56320),ne++)),se+=re<128?1:re<2048?2:re<65536?3:4;for(te=new Uint8Array(se),ae=0,ne=0;ae<se;ne++)re=ee.charCodeAt(ne),(re&64512)===55296&&ne+1<oe&&(ie=ee.charCodeAt(ne+1),(ie&64512)===56320&&(re=65536+(re-55296<<10)+(ie-56320),ne++)),re<128?te[ae++]=re:re<2048?(te[ae++]=192|re>>>6,te[ae++]=128|re&63):re<65536?(te[ae++]=224|re>>>12,te[ae++]=128|re>>>6&63,te[ae++]=128|re&63):(te[ae++]=240|re>>>18,te[ae++]=128|re>>>12&63,te[ae++]=128|re>>>6&63,te[ae++]=128|re&63);return te};const buf2binstring=(ee,te)=>{if(te<65534&&ee.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,ee.length===te?ee:ee.subarray(0,te));let re="";for(let ie=0;ie<te;ie++)re+=String.fromCharCode(ee[ie]);return re};var buf2string=(ee,te)=>{const re=te||ee.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(ee.subarray(0,te));let ie,ne;const ae=new Array(re*2);for(ne=0,ie=0;ie<re;){let oe=ee[ie++];if(oe<128){ae[ne++]=oe;continue}let se=_utf8len[oe];if(se>4){ae[ne++]=65533,ie+=se-1;continue}for(oe&=se===2?31:se===3?15:7;se>1&&ie<re;)oe=oe<<6|ee[ie++]&63,se--;if(se>1){ae[ne++]=65533;continue}oe<65536?ae[ne++]=oe:(oe-=65536,ae[ne++]=55296|oe>>10&1023,ae[ne++]=56320|oe&1023)}return buf2binstring(ae,ne)},utf8border=(ee,te)=>{te=te||ee.length,te>ee.length&&(te=ee.length);let re=te-1;for(;re>=0&&(ee[re]&192)===128;)re--;return re<0||re===0?te:re+_utf8len[ee[re]]>te?re:te},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(ee){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},ee||{});let te=this.options;te.raw&&te.windowBits>0?te.windowBits=-te.windowBits:te.gzip&&te.windowBits>0&&te.windowBits<16&&(te.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let re=deflate_1$2.deflateInit2(this.strm,te.level,te.method,te.windowBits,te.memLevel,te.strategy);if(re!==Z_OK$2)throw new Error(messages[re]);if(te.header&&deflate_1$2.deflateSetHeader(this.strm,te.header),te.dictionary){let ie;if(typeof te.dictionary=="string"?ie=strings.string2buf(te.dictionary):toString$1.call(te.dictionary)==="[object ArrayBuffer]"?ie=new Uint8Array(te.dictionary):ie=te.dictionary,re=deflate_1$2.deflateSetDictionary(this.strm,ie),re!==Z_OK$2)throw new Error(messages[re]);this._dict_set=!0}}Deflate$1.prototype.push=function(ee,te){const re=this.strm,ie=this.options.chunkSize;let ne,ae;if(this.ended)return!1;for(te===~~te?ae=te:ae=te===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof ee=="string"?re.input=strings.string2buf(ee):toString$1.call(ee)==="[object ArrayBuffer]"?re.input=new Uint8Array(ee):re.input=ee,re.next_in=0,re.avail_in=re.input.length;;){if(re.avail_out===0&&(re.output=new Uint8Array(ie),re.next_out=0,re.avail_out=ie),(ae===Z_SYNC_FLUSH||ae===Z_FULL_FLUSH)&&re.avail_out<=6){this.onData(re.output.subarray(0,re.next_out)),re.avail_out=0;continue}if(ne=deflate_1$2.deflate(re,ae),ne===Z_STREAM_END$2)return re.next_out>0&&this.onData(re.output.subarray(0,re.next_out)),ne=deflate_1$2.deflateEnd(this.strm),this.onEnd(ne),this.ended=!0,ne===Z_OK$2;if(re.avail_out===0){this.onData(re.output);continue}if(ae>0&&re.next_out>0){this.onData(re.output.subarray(0,re.next_out)),re.avail_out=0;continue}if(re.avail_in===0)break}return!0};Deflate$1.prototype.onData=function(ee){this.chunks.push(ee)};Deflate$1.prototype.onEnd=function(ee){ee===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=ee,this.msg=this.strm.msg};function deflate$1(ee,te){const re=new Deflate$1(te);if(re.push(ee,!0),re.err)throw re.msg||messages[re.err];return re.result}function deflateRaw$1(ee,te){return te=te||{},te.raw=!0,deflate$1(ee,te)}function gzip$1(ee,te){return te=te||{},te.gzip=!0,deflate$1(ee,te)}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 ee(te,re){let ie,ne,ae,oe,se,le,ce,he,de,ue,fe,pe,ge,ye,_e,me,we,xe,Te,ke,Ce,Ae,ve,Ee;const Se=te.state;ie=te.next_in,ve=te.input,ne=ie+(te.avail_in-5),ae=te.next_out,Ee=te.output,oe=ae-(re-te.avail_out),se=ae+(te.avail_out-257),le=Se.dmax,ce=Se.wsize,he=Se.whave,de=Se.wnext,ue=Se.window,fe=Se.hold,pe=Se.bits,ge=Se.lencode,ye=Se.distcode,_e=(1<<Se.lenbits)-1,me=(1<<Se.distbits)-1;e:do{pe<15&&(fe+=ve[ie++]<<pe,pe+=8,fe+=ve[ie++]<<pe,pe+=8),we=ge[fe&_e];t:for(;;){if(xe=we>>>24,fe>>>=xe,pe-=xe,xe=we>>>16&255,xe===0)Ee[ae++]=we&65535;else if(xe&16){Te=we&65535,xe&=15,xe&&(pe<xe&&(fe+=ve[ie++]<<pe,pe+=8),Te+=fe&(1<<xe)-1,fe>>>=xe,pe-=xe),pe<15&&(fe+=ve[ie++]<<pe,pe+=8,fe+=ve[ie++]<<pe,pe+=8),we=ye[fe&me];r:for(;;){if(xe=we>>>24,fe>>>=xe,pe-=xe,xe=we>>>16&255,xe&16){if(ke=we&65535,xe&=15,pe<xe&&(fe+=ve[ie++]<<pe,pe+=8,pe<xe&&(fe+=ve[ie++]<<pe,pe+=8)),ke+=fe&(1<<xe)-1,ke>le){te.msg="invalid distance too far back",Se.mode=BAD$1;break e}if(fe>>>=xe,pe-=xe,xe=ae-oe,ke>xe){if(xe=ke-xe,xe>he&&Se.sane){te.msg="invalid distance too far back",Se.mode=BAD$1;break e}if(Ce=0,Ae=ue,de===0){if(Ce+=ce-xe,xe<Te){Te-=xe;do Ee[ae++]=ue[Ce++];while(--xe);Ce=ae-ke,Ae=Ee}}else if(de<xe){if(Ce+=ce+de-xe,xe-=de,xe<Te){Te-=xe;do Ee[ae++]=ue[Ce++];while(--xe);if(Ce=0,de<Te){xe=de,Te-=xe;do Ee[ae++]=ue[Ce++];while(--xe);Ce=ae-ke,Ae=Ee}}}else if(Ce+=de-xe,xe<Te){Te-=xe;do Ee[ae++]=ue[Ce++];while(--xe);Ce=ae-ke,Ae=Ee}for(;Te>2;)Ee[ae++]=Ae[Ce++],Ee[ae++]=Ae[Ce++],Ee[ae++]=Ae[Ce++],Te-=3;Te&&(Ee[ae++]=Ae[Ce++],Te>1&&(Ee[ae++]=Ae[Ce++]))}else{Ce=ae-ke;do Ee[ae++]=Ee[Ce++],Ee[ae++]=Ee[Ce++],Ee[ae++]=Ee[Ce++],Te-=3;while(Te>2);Te&&(Ee[ae++]=Ee[Ce++],Te>1&&(Ee[ae++]=Ee[Ce++]))}}else if(xe&64){te.msg="invalid distance code",Se.mode=BAD$1;break e}else{we=ye[(we&65535)+(fe&(1<<xe)-1)];continue r}break}}else if(xe&64)if(xe&32){Se.mode=TYPE$1;break e}else{te.msg="invalid literal/length code",Se.mode=BAD$1;break e}else{we=ge[(we&65535)+(fe&(1<<xe)-1)];continue t}break}}while(ie<ne&&ae<se);Te=pe>>3,ie-=Te,pe-=Te<<3,fe&=(1<<pe)-1,te.next_in=ie,te.next_out=ae,te.avail_in=ie<ne?5+(ne-ie):5-(ie-ne),te.avail_out=ae<se?257+(se-ae):257-(ae-se),Se.hold=fe,Se.bits=pe};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=(ee,te,re,ie,ne,ae,oe,se)=>{const le=se.bits;let ce=0,he=0,de=0,ue=0,fe=0,pe=0,ge=0,ye=0,_e=0,me=0,we,xe,Te,ke,Ce,Ae=null,ve;const Ee=new Uint16Array(MAXBITS+1),Se=new Uint16Array(MAXBITS+1);let Ne=null,ze,Be,Le;for(ce=0;ce<=MAXBITS;ce++)Ee[ce]=0;for(he=0;he<ie;he++)Ee[te[re+he]]++;for(fe=le,ue=MAXBITS;ue>=1&&Ee[ue]===0;ue--);if(fe>ue&&(fe=ue),ue===0)return ne[ae++]=1<<24|64<<16|0,ne[ae++]=1<<24|64<<16|0,se.bits=1,0;for(de=1;de<ue&&Ee[de]===0;de++);for(fe<de&&(fe=de),ye=1,ce=1;ce<=MAXBITS;ce++)if(ye<<=1,ye-=Ee[ce],ye<0)return-1;if(ye>0&&(ee===CODES$1||ue!==1))return-1;for(Se[1]=0,ce=1;ce<MAXBITS;ce++)Se[ce+1]=Se[ce]+Ee[ce];for(he=0;he<ie;he++)te[re+he]!==0&&(oe[Se[te[re+he]]++]=he);if(ee===CODES$1?(Ae=Ne=oe,ve=20):ee===LENS$1?(Ae=lbase,Ne=lext,ve=257):(Ae=dbase,Ne=dext,ve=0),me=0,he=0,ce=de,Ce=ae,pe=fe,ge=0,Te=-1,_e=1<<fe,ke=_e-1,ee===LENS$1&&_e>ENOUGH_LENS$1||ee===DISTS$1&&_e>ENOUGH_DISTS$1)return 1;for(;;){ze=ce-ge,oe[he]+1<ve?(Be=0,Le=oe[he]):oe[he]>=ve?(Be=Ne[oe[he]-ve],Le=Ae[oe[he]-ve]):(Be=96,Le=0),we=1<<ce-ge,xe=1<<pe,de=xe;do xe-=we,ne[Ce+(me>>ge)+xe]=ze<<24|Be<<16|Le|0;while(xe!==0);for(we=1<<ce-1;me&we;)we>>=1;if(we!==0?(me&=we-1,me+=we):me=0,he++,--Ee[ce]===0){if(ce===ue)break;ce=te[re+oe[he]]}if(ce>fe&&(me&ke)!==Te){for(ge===0&&(ge=fe),Ce+=de,pe=ce-ge,ye=1<<pe;pe+ge<ue&&(ye-=Ee[pe+ge],!(ye<=0));)pe++,ye<<=1;if(_e+=1<<pe,ee===LENS$1&&_e>ENOUGH_LENS$1||ee===DISTS$1&&_e>ENOUGH_DISTS$1)return 1;Te=me&ke,ne[Te]=fe<<24|pe<<16|Ce-ae|0}}return me!==0&&(ne[Ce+me]=ce-ge<<24|64<<16|0),se.bits=fe,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=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=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=ee=>(ee>>>24&255)+(ee>>>8&65280)+((ee&65280)<<8)+((ee&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=ee=>{if(!ee)return 1;const te=ee.state;return!te||te.strm!==ee||te.mode<HEAD||te.mode>SYNC?1:0},inflateResetKeep=ee=>{if(inflateStateCheck(ee))return Z_STREAM_ERROR$1;const te=ee.state;return ee.total_in=ee.total_out=te.total=0,ee.msg="",te.wrap&&(ee.adler=te.wrap&1),te.mode=HEAD,te.last=0,te.havedict=0,te.flags=-1,te.dmax=32768,te.head=null,te.hold=0,te.bits=0,te.lencode=te.lendyn=new Int32Array(ENOUGH_LENS),te.distcode=te.distdyn=new Int32Array(ENOUGH_DISTS),te.sane=1,te.back=-1,Z_OK$1},inflateReset=ee=>{if(inflateStateCheck(ee))return Z_STREAM_ERROR$1;const te=ee.state;return te.wsize=0,te.whave=0,te.wnext=0,inflateResetKeep(ee)},inflateReset2=(ee,te)=>{let re;if(inflateStateCheck(ee))return Z_STREAM_ERROR$1;const ie=ee.state;return te<0?(re=0,te=-te):(re=(te>>4)+5,te<48&&(te&=15)),te&&(te<8||te>15)?Z_STREAM_ERROR$1:(ie.window!==null&&ie.wbits!==te&&(ie.window=null),ie.wrap=re,ie.wbits=te,inflateReset(ee))},inflateInit2=(ee,te)=>{if(!ee)return Z_STREAM_ERROR$1;const re=new InflateState;ee.state=re,re.strm=ee,re.window=null,re.mode=HEAD;const ie=inflateReset2(ee,te);return ie!==Z_OK$1&&(ee.state=null),ie},inflateInit=ee=>inflateInit2(ee,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=ee=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let te=0;for(;te<144;)ee.lens[te++]=8;for(;te<256;)ee.lens[te++]=9;for(;te<280;)ee.lens[te++]=7;for(;te<288;)ee.lens[te++]=8;for(inftrees(LENS,ee.lens,0,288,lenfix,0,ee.work,{bits:9}),te=0;te<32;)ee.lens[te++]=5;inftrees(DISTS,ee.lens,0,32,distfix,0,ee.work,{bits:5}),virgin=!1}ee.lencode=lenfix,ee.lenbits=9,ee.distcode=distfix,ee.distbits=5},updatewindow=(ee,te,re,ie)=>{let ne;const ae=ee.state;return ae.window===null&&(ae.wsize=1<<ae.wbits,ae.wnext=0,ae.whave=0,ae.window=new Uint8Array(ae.wsize)),ie>=ae.wsize?(ae.window.set(te.subarray(re-ae.wsize,re),0),ae.wnext=0,ae.whave=ae.wsize):(ne=ae.wsize-ae.wnext,ne>ie&&(ne=ie),ae.window.set(te.subarray(re-ie,re-ie+ne),ae.wnext),ie-=ne,ie?(ae.window.set(te.subarray(re-ie,re),0),ae.wnext=ie,ae.whave=ae.wsize):(ae.wnext+=ne,ae.wnext===ae.wsize&&(ae.wnext=0),ae.whave<ae.wsize&&(ae.whave+=ne))),0},inflate$2=(ee,te)=>{let re,ie,ne,ae,oe,se,le,ce,he,de,ue,fe,pe,ge,ye=0,_e,me,we,xe,Te,ke,Ce,Ae;const ve=new Uint8Array(4);let Ee,Se;const Ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(ee)||!ee.output||!ee.input&&ee.avail_in!==0)return Z_STREAM_ERROR$1;re=ee.state,re.mode===TYPE&&(re.mode=TYPEDO),oe=ee.next_out,ne=ee.output,le=ee.avail_out,ae=ee.next_in,ie=ee.input,se=ee.avail_in,ce=re.hold,he=re.bits,de=se,ue=le,Ae=Z_OK$1;e:for(;;)switch(re.mode){case HEAD:if(re.wrap===0){re.mode=TYPEDO;break}for(;he<16;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(re.wrap&2&&ce===35615){re.wbits===0&&(re.wbits=15),re.check=0,ve[0]=ce&255,ve[1]=ce>>>8&255,re.check=crc32_1(re.check,ve,2,0),ce=0,he=0,re.mode=FLAGS;break}if(re.head&&(re.head.done=!1),!(re.wrap&1)||(((ce&255)<<8)+(ce>>8))%31){ee.msg="incorrect header check",re.mode=BAD;break}if((ce&15)!==Z_DEFLATED){ee.msg="unknown compression method",re.mode=BAD;break}if(ce>>>=4,he-=4,Ce=(ce&15)+8,re.wbits===0&&(re.wbits=Ce),Ce>15||Ce>re.wbits){ee.msg="invalid window size",re.mode=BAD;break}re.dmax=1<<re.wbits,re.flags=0,ee.adler=re.check=1,re.mode=ce&512?DICTID:TYPE,ce=0,he=0;break;case FLAGS:for(;he<16;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(re.flags=ce,(re.flags&255)!==Z_DEFLATED){ee.msg="unknown compression method",re.mode=BAD;break}if(re.flags&57344){ee.msg="unknown header flags set",re.mode=BAD;break}re.head&&(re.head.text=ce>>8&1),re.flags&512&&re.wrap&4&&(ve[0]=ce&255,ve[1]=ce>>>8&255,re.check=crc32_1(re.check,ve,2,0)),ce=0,he=0,re.mode=TIME;case TIME:for(;he<32;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}re.head&&(re.head.time=ce),re.flags&512&&re.wrap&4&&(ve[0]=ce&255,ve[1]=ce>>>8&255,ve[2]=ce>>>16&255,ve[3]=ce>>>24&255,re.check=crc32_1(re.check,ve,4,0)),ce=0,he=0,re.mode=OS;case OS:for(;he<16;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}re.head&&(re.head.xflags=ce&255,re.head.os=ce>>8),re.flags&512&&re.wrap&4&&(ve[0]=ce&255,ve[1]=ce>>>8&255,re.check=crc32_1(re.check,ve,2,0)),ce=0,he=0,re.mode=EXLEN;case EXLEN:if(re.flags&1024){for(;he<16;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}re.length=ce,re.head&&(re.head.extra_len=ce),re.flags&512&&re.wrap&4&&(ve[0]=ce&255,ve[1]=ce>>>8&255,re.check=crc32_1(re.check,ve,2,0)),ce=0,he=0}else re.head&&(re.head.extra=null);re.mode=EXTRA;case EXTRA:if(re.flags&1024&&(fe=re.length,fe>se&&(fe=se),fe&&(re.head&&(Ce=re.head.extra_len-re.length,re.head.extra||(re.head.extra=new Uint8Array(re.head.extra_len)),re.head.extra.set(ie.subarray(ae,ae+fe),Ce)),re.flags&512&&re.wrap&4&&(re.check=crc32_1(re.check,ie,fe,ae)),se-=fe,ae+=fe,re.length-=fe),re.length))break e;re.length=0,re.mode=NAME;case NAME:if(re.flags&2048){if(se===0)break e;fe=0;do Ce=ie[ae+fe++],re.head&&Ce&&re.length<65536&&(re.head.name+=String.fromCharCode(Ce));while(Ce&&fe<se);if(re.flags&512&&re.wrap&4&&(re.check=crc32_1(re.check,ie,fe,ae)),se-=fe,ae+=fe,Ce)break e}else re.head&&(re.head.name=null);re.length=0,re.mode=COMMENT;case COMMENT:if(re.flags&4096){if(se===0)break e;fe=0;do Ce=ie[ae+fe++],re.head&&Ce&&re.length<65536&&(re.head.comment+=String.fromCharCode(Ce));while(Ce&&fe<se);if(re.flags&512&&re.wrap&4&&(re.check=crc32_1(re.check,ie,fe,ae)),se-=fe,ae+=fe,Ce)break e}else re.head&&(re.head.comment=null);re.mode=HCRC;case HCRC:if(re.flags&512){for(;he<16;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(re.wrap&4&&ce!==(re.check&65535)){ee.msg="header crc mismatch",re.mode=BAD;break}ce=0,he=0}re.head&&(re.head.hcrc=re.flags>>9&1,re.head.done=!0),ee.adler=re.check=0,re.mode=TYPE;break;case DICTID:for(;he<32;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}ee.adler=re.check=zswap32(ce),ce=0,he=0,re.mode=DICT;case DICT:if(re.havedict===0)return ee.next_out=oe,ee.avail_out=le,ee.next_in=ae,ee.avail_in=se,re.hold=ce,re.bits=he,Z_NEED_DICT$1;ee.adler=re.check=1,re.mode=TYPE;case TYPE:if(te===Z_BLOCK||te===Z_TREES)break e;case TYPEDO:if(re.last){ce>>>=he&7,he-=he&7,re.mode=CHECK;break}for(;he<3;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}switch(re.last=ce&1,ce>>>=1,he-=1,ce&3){case 0:re.mode=STORED;break;case 1:if(fixedtables(re),re.mode=LEN_,te===Z_TREES){ce>>>=2,he-=2;break e}break;case 2:re.mode=TABLE;break;case 3:ee.msg="invalid block type",re.mode=BAD}ce>>>=2,he-=2;break;case STORED:for(ce>>>=he&7,he-=he&7;he<32;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if((ce&65535)!==(ce>>>16^65535)){ee.msg="invalid stored block lengths",re.mode=BAD;break}if(re.length=ce&65535,ce=0,he=0,re.mode=COPY_,te===Z_TREES)break e;case COPY_:re.mode=COPY;case COPY:if(fe=re.length,fe){if(fe>se&&(fe=se),fe>le&&(fe=le),fe===0)break e;ne.set(ie.subarray(ae,ae+fe),oe),se-=fe,ae+=fe,le-=fe,oe+=fe,re.length-=fe;break}re.mode=TYPE;break;case TABLE:for(;he<14;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(re.nlen=(ce&31)+257,ce>>>=5,he-=5,re.ndist=(ce&31)+1,ce>>>=5,he-=5,re.ncode=(ce&15)+4,ce>>>=4,he-=4,re.nlen>286||re.ndist>30){ee.msg="too many length or distance symbols",re.mode=BAD;break}re.have=0,re.mode=LENLENS;case LENLENS:for(;re.have<re.ncode;){for(;he<3;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}re.lens[Ne[re.have++]]=ce&7,ce>>>=3,he-=3}for(;re.have<19;)re.lens[Ne[re.have++]]=0;if(re.lencode=re.lendyn,re.lenbits=7,Ee={bits:re.lenbits},Ae=inftrees(CODES,re.lens,0,19,re.lencode,0,re.work,Ee),re.lenbits=Ee.bits,Ae){ee.msg="invalid code lengths set",re.mode=BAD;break}re.have=0,re.mode=CODELENS;case CODELENS:for(;re.have<re.nlen+re.ndist;){for(;ye=re.lencode[ce&(1<<re.lenbits)-1],_e=ye>>>24,me=ye>>>16&255,we=ye&65535,!(_e<=he);){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(we<16)ce>>>=_e,he-=_e,re.lens[re.have++]=we;else{if(we===16){for(Se=_e+2;he<Se;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(ce>>>=_e,he-=_e,re.have===0){ee.msg="invalid bit length repeat",re.mode=BAD;break}Ce=re.lens[re.have-1],fe=3+(ce&3),ce>>>=2,he-=2}else if(we===17){for(Se=_e+3;he<Se;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}ce>>>=_e,he-=_e,Ce=0,fe=3+(ce&7),ce>>>=3,he-=3}else{for(Se=_e+7;he<Se;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}ce>>>=_e,he-=_e,Ce=0,fe=11+(ce&127),ce>>>=7,he-=7}if(re.have+fe>re.nlen+re.ndist){ee.msg="invalid bit length repeat",re.mode=BAD;break}for(;fe--;)re.lens[re.have++]=Ce}}if(re.mode===BAD)break;if(re.lens[256]===0){ee.msg="invalid code -- missing end-of-block",re.mode=BAD;break}if(re.lenbits=9,Ee={bits:re.lenbits},Ae=inftrees(LENS,re.lens,0,re.nlen,re.lencode,0,re.work,Ee),re.lenbits=Ee.bits,Ae){ee.msg="invalid literal/lengths set",re.mode=BAD;break}if(re.distbits=6,re.distcode=re.distdyn,Ee={bits:re.distbits},Ae=inftrees(DISTS,re.lens,re.nlen,re.ndist,re.distcode,0,re.work,Ee),re.distbits=Ee.bits,Ae){ee.msg="invalid distances set",re.mode=BAD;break}if(re.mode=LEN_,te===Z_TREES)break e;case LEN_:re.mode=LEN;case LEN:if(se>=6&&le>=258){ee.next_out=oe,ee.avail_out=le,ee.next_in=ae,ee.avail_in=se,re.hold=ce,re.bits=he,inffast(ee,ue),oe=ee.next_out,ne=ee.output,le=ee.avail_out,ae=ee.next_in,ie=ee.input,se=ee.avail_in,ce=re.hold,he=re.bits,re.mode===TYPE&&(re.back=-1);break}for(re.back=0;ye=re.lencode[ce&(1<<re.lenbits)-1],_e=ye>>>24,me=ye>>>16&255,we=ye&65535,!(_e<=he);){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(me&&!(me&240)){for(xe=_e,Te=me,ke=we;ye=re.lencode[ke+((ce&(1<<xe+Te)-1)>>xe)],_e=ye>>>24,me=ye>>>16&255,we=ye&65535,!(xe+_e<=he);){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}ce>>>=xe,he-=xe,re.back+=xe}if(ce>>>=_e,he-=_e,re.back+=_e,re.length=we,me===0){re.mode=LIT;break}if(me&32){re.back=-1,re.mode=TYPE;break}if(me&64){ee.msg="invalid literal/length code",re.mode=BAD;break}re.extra=me&15,re.mode=LENEXT;case LENEXT:if(re.extra){for(Se=re.extra;he<Se;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}re.length+=ce&(1<<re.extra)-1,ce>>>=re.extra,he-=re.extra,re.back+=re.extra}re.was=re.length,re.mode=DIST;case DIST:for(;ye=re.distcode[ce&(1<<re.distbits)-1],_e=ye>>>24,me=ye>>>16&255,we=ye&65535,!(_e<=he);){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(!(me&240)){for(xe=_e,Te=me,ke=we;ye=re.distcode[ke+((ce&(1<<xe+Te)-1)>>xe)],_e=ye>>>24,me=ye>>>16&255,we=ye&65535,!(xe+_e<=he);){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}ce>>>=xe,he-=xe,re.back+=xe}if(ce>>>=_e,he-=_e,re.back+=_e,me&64){ee.msg="invalid distance code",re.mode=BAD;break}re.offset=we,re.extra=me&15,re.mode=DISTEXT;case DISTEXT:if(re.extra){for(Se=re.extra;he<Se;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}re.offset+=ce&(1<<re.extra)-1,ce>>>=re.extra,he-=re.extra,re.back+=re.extra}if(re.offset>re.dmax){ee.msg="invalid distance too far back",re.mode=BAD;break}re.mode=MATCH;case MATCH:if(le===0)break e;if(fe=ue-le,re.offset>fe){if(fe=re.offset-fe,fe>re.whave&&re.sane){ee.msg="invalid distance too far back",re.mode=BAD;break}fe>re.wnext?(fe-=re.wnext,pe=re.wsize-fe):pe=re.wnext-fe,fe>re.length&&(fe=re.length),ge=re.window}else ge=ne,pe=oe-re.offset,fe=re.length;fe>le&&(fe=le),le-=fe,re.length-=fe;do ne[oe++]=ge[pe++];while(--fe);re.length===0&&(re.mode=LEN);break;case LIT:if(le===0)break e;ne[oe++]=re.length,le--,re.mode=LEN;break;case CHECK:if(re.wrap){for(;he<32;){if(se===0)break e;se--,ce|=ie[ae++]<<he,he+=8}if(ue-=le,ee.total_out+=ue,re.total+=ue,re.wrap&4&&ue&&(ee.adler=re.check=re.flags?crc32_1(re.check,ne,ue,oe-ue):adler32_1(re.check,ne,ue,oe-ue)),ue=le,re.wrap&4&&(re.flags?ce:zswap32(ce))!==re.check){ee.msg="incorrect data check",re.mode=BAD;break}ce=0,he=0}re.mode=LENGTH;case LENGTH:if(re.wrap&&re.flags){for(;he<32;){if(se===0)break e;se--,ce+=ie[ae++]<<he,he+=8}if(re.wrap&4&&ce!==(re.total&4294967295)){ee.msg="incorrect length check",re.mode=BAD;break}ce=0,he=0}re.mode=DONE;case DONE:Ae=Z_STREAM_END$1;break e;case BAD:Ae=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return ee.next_out=oe,ee.avail_out=le,ee.next_in=ae,ee.avail_in=se,re.hold=ce,re.bits=he,(re.wsize||ue!==ee.avail_out&&re.mode<BAD&&(re.mode<CHECK||te!==Z_FINISH$1))&&updatewindow(ee,ee.output,ee.next_out,ue-ee.avail_out),de-=ee.avail_in,ue-=ee.avail_out,ee.total_in+=de,ee.total_out+=ue,re.total+=ue,re.wrap&4&&ue&&(ee.adler=re.check=re.flags?crc32_1(re.check,ne,ue,ee.next_out-ue):adler32_1(re.check,ne,ue,ee.next_out-ue)),ee.data_type=re.bits+(re.last?64:0)+(re.mode===TYPE?128:0)+(re.mode===LEN_||re.mode===COPY_?256:0),(de===0&&ue===0||te===Z_FINISH$1)&&Ae===Z_OK$1&&(Ae=Z_BUF_ERROR),Ae},inflateEnd=ee=>{if(inflateStateCheck(ee))return Z_STREAM_ERROR$1;let te=ee.state;return te.window&&(te.window=null),ee.state=null,Z_OK$1},inflateGetHeader=(ee,te)=>{if(inflateStateCheck(ee))return Z_STREAM_ERROR$1;const re=ee.state;return re.wrap&2?(re.head=te,te.done=!1,Z_OK$1):Z_STREAM_ERROR$1},inflateSetDictionary=(ee,te)=>{const re=te.length;let ie,ne,ae;return inflateStateCheck(ee)||(ie=ee.state,ie.wrap!==0&&ie.mode!==DICT)?Z_STREAM_ERROR$1:ie.mode===DICT&&(ne=1,ne=adler32_1(ne,te,re,0),ne!==ie.check)?Z_DATA_ERROR$1:(ae=updatewindow(ee,te,re,re),ae?(ie.mode=MEM,Z_MEM_ERROR$1):(ie.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(ee){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},ee||{});const te=this.options;te.raw&&te.windowBits>=0&&te.windowBits<16&&(te.windowBits=-te.windowBits,te.windowBits===0&&(te.windowBits=-15)),te.windowBits>=0&&te.windowBits<16&&!(ee&&ee.windowBits)&&(te.windowBits+=32),te.windowBits>15&&te.windowBits<48&&(te.windowBits&15||(te.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let re=inflate_1$2.inflateInit2(this.strm,te.windowBits);if(re!==Z_OK)throw new Error(messages[re]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),te.dictionary&&(typeof te.dictionary=="string"?te.dictionary=strings.string2buf(te.dictionary):toString.call(te.dictionary)==="[object ArrayBuffer]"&&(te.dictionary=new Uint8Array(te.dictionary)),te.raw&&(re=inflate_1$2.inflateSetDictionary(this.strm,te.dictionary),re!==Z_OK)))throw new Error(messages[re])}Inflate$1.prototype.push=function(ee,te){const re=this.strm,ie=this.options.chunkSize,ne=this.options.dictionary;let ae,oe,se;if(this.ended)return!1;for(te===~~te?oe=te:oe=te===!0?Z_FINISH:Z_NO_FLUSH,toString.call(ee)==="[object ArrayBuffer]"?re.input=new Uint8Array(ee):re.input=ee,re.next_in=0,re.avail_in=re.input.length;;){for(re.avail_out===0&&(re.output=new Uint8Array(ie),re.next_out=0,re.avail_out=ie),ae=inflate_1$2.inflate(re,oe),ae===Z_NEED_DICT&&ne&&(ae=inflate_1$2.inflateSetDictionary(re,ne),ae===Z_OK?ae=inflate_1$2.inflate(re,oe):ae===Z_DATA_ERROR&&(ae=Z_NEED_DICT));re.avail_in>0&&ae===Z_STREAM_END&&re.state.wrap>0&&ee[re.next_in]!==0;)inflate_1$2.inflateReset(re),ae=inflate_1$2.inflate(re,oe);switch(ae){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(ae),this.ended=!0,!1}if(se=re.avail_out,re.next_out&&(re.avail_out===0||ae===Z_STREAM_END))if(this.options.to==="string"){let le=strings.utf8border(re.output,re.next_out),ce=re.next_out-le,he=strings.buf2string(re.output,le);re.next_out=ce,re.avail_out=ie-ce,ce&&re.output.set(re.output.subarray(le,le+ce),0),this.onData(he)}else this.onData(re.output.length===re.next_out?re.output:re.output.subarray(0,re.next_out));if(!(ae===Z_OK&&se===0)){if(ae===Z_STREAM_END)return ae=inflate_1$2.inflateEnd(this.strm),this.onEnd(ae),this.ended=!0,!0;if(re.avail_in===0)break}}return!0};Inflate$1.prototype.onData=function(ee){this.chunks.push(ee)};Inflate$1.prototype.onEnd=function(ee){ee===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=ee,this.msg=this.strm.msg};function inflate$1(ee,te){const re=new Inflate$1(te);if(re.push(ee),re.err)throw re.msg||messages[re.err];return re.result}function inflateRaw$1(ee,te){return te=te||{},te.raw=!0,inflate$1(ee,te)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var deflate_1=deflate,inflate_1=inflate;const _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=(ee=>{let te={};return ee.forEach((re,ie)=>te[re]=ie),te})(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):ee=>new Uint8Array(Array.prototype.slice.call(ee,0)),_mkUriSafe=ee=>ee.replace(/=/g,"").replace(/[+\/]/g,te=>te=="+"?"-":"_"),_tidyB64=ee=>ee.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=ee=>{let te,re,ie,ne,ae="";const oe=ee.length%3;for(let se=0;se<ee.length;){if((re=ee.charCodeAt(se++))>255||(ie=ee.charCodeAt(se++))>255||(ne=ee.charCodeAt(se++))>255)throw new TypeError("invalid character found");te=re<<16|ie<<8|ne,ae+=b64chs[te>>18&63]+b64chs[te>>12&63]+b64chs[te>>6&63]+b64chs[te&63]}return oe?ae.slice(0,oe-3)+"===".substring(oe):ae},_btoa=typeof btoa=="function"?ee=>btoa(ee):_hasBuffer?ee=>Buffer.from(ee,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?ee=>Buffer.from(ee).toString("base64"):ee=>{let re=[];for(let ie=0,ne=ee.length;ie<ne;ie+=4096)re.push(_fromCC.apply(null,ee.subarray(ie,ie+4096)));return _btoa(re.join(""))},fromUint8Array=(ee,te=!1)=>te?_mkUriSafe(_fromUint8Array(ee)):_fromUint8Array(ee),cb_utob=ee=>{if(ee.length<2){var te=ee.charCodeAt(0);return te<128?ee:te<2048?_fromCC(192|te>>>6)+_fromCC(128|te&63):_fromCC(224|te>>>12&15)+_fromCC(128|te>>>6&63)+_fromCC(128|te&63)}else{var te=65536+(ee.charCodeAt(0)-55296)*1024+(ee.charCodeAt(1)-56320);return _fromCC(240|te>>>18&7)+_fromCC(128|te>>>12&63)+_fromCC(128|te>>>6&63)+_fromCC(128|te&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=ee=>ee.replace(re_utob,cb_utob),_encode=_hasBuffer?ee=>Buffer.from(ee,"utf8").toString("base64"):_TE?ee=>_fromUint8Array(_TE.encode(ee)):ee=>_btoa(utob(ee)),encode=(ee,te=!1)=>te?_mkUriSafe(_encode(ee)):_encode(ee),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=ee=>{switch(ee.length){case 4:var te=(7&ee.charCodeAt(0))<<18|(63&ee.charCodeAt(1))<<12|(63&ee.charCodeAt(2))<<6|63&ee.charCodeAt(3),re=te-65536;return _fromCC((re>>>10)+55296)+_fromCC((re&1023)+56320);case 3:return _fromCC((15&ee.charCodeAt(0))<<12|(63&ee.charCodeAt(1))<<6|63&ee.charCodeAt(2));default:return _fromCC((31&ee.charCodeAt(0))<<6|63&ee.charCodeAt(1))}},btou=ee=>ee.replace(re_btou,cb_btou),atobPolyfill=ee=>{if(ee=ee.replace(/\s+/g,""),!b64re.test(ee))throw new TypeError("malformed base64.");ee+="==".slice(2-(ee.length&3));let te,re="",ie,ne;for(let ae=0;ae<ee.length;)te=b64tab[ee.charAt(ae++)]<<18|b64tab[ee.charAt(ae++)]<<12|(ie=b64tab[ee.charAt(ae++)])<<6|(ne=b64tab[ee.charAt(ae++)]),re+=ie===64?_fromCC(te>>16&255):ne===64?_fromCC(te>>16&255,te>>8&255):_fromCC(te>>16&255,te>>8&255,te&255);return re},_atob=typeof atob=="function"?ee=>atob(_tidyB64(ee)):_hasBuffer?ee=>Buffer.from(ee,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?ee=>_U8Afrom(Buffer.from(ee,"base64")):ee=>_U8Afrom(_atob(ee).split("").map(te=>te.charCodeAt(0))),toUint8Array=ee=>_toUint8Array(_unURI(ee)),_decode=_hasBuffer?ee=>Buffer.from(ee,"base64").toString("utf8"):_TD?ee=>_TD.decode(_toUint8Array(ee)):ee=>btou(_atob(ee)),_unURI=ee=>_tidyB64(ee.replace(/[-_]/g,te=>te=="-"?"+":"/")),decode=ee=>_decode(_unURI(ee)),base64Serde={serialize:ee=>encode(ee,!0),deserialize:ee=>decode(ee)},pakoSerde={serialize:ee=>{const te=new TextEncoder().encode(ee),re=deflate_1(te,{level:9});return fromUint8Array(re,!0)},deserialize:ee=>{const te=toUint8Array(ee);return inflate_1(te,{to:"string"})}},serdes={base64:base64Serde,pako:pakoSerde},serializeState=(ee,te="pako")=>{if(!(te in serdes))throw new Error(`Unknown serde type: ${te}`);const re=JSON.stringify(ee),ie=serdes[te].serialize(re);return`${te}:${ie}`},deserializeState=ee=>{let te,re;if(ee.includes(":")){let ne;if([ne,re]=ee.split(":"),ne in serdes)te=ne;else throw new Error(`Unknown serde type: ${ne}`)}else te="base64",re=ee;const ie=serdes[te].deserialize(re);return JSON.parse(ie)};var dist={},words={};(function(ee){var te=commonjsGlobal&&commonjsGlobal.__values||function(ie){var ne=typeof Symbol=="function"&&Symbol.iterator,ae=ne&&ie[ne],oe=0;if(ae)return ae.call(ie);if(ie&&typeof ie.length=="number")return{next:function(){return ie&&oe>=ie.length&&(ie=void 0),{value:ie&&ie[oe++],done:!ie}}};throw new TypeError(ne?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ee,"__esModule",{value:!0}),ee.getWordsByCategory=ee.wordList=void 0,ee.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:"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 re(ie,ne){var ae,oe;ne===void 0&&(ne=[]);var se=new Set(ne),le=[];try{for(var ce=te(ee.wordList[ie]),he=ce.next();!he.done;he=ce.next()){var de=he.value;(ne.length===0||de.categories.some(function(ue){return se.has(ue)}))&&le.push(de.word)}}catch(ue){ae={error:ue}}finally{try{he&&!he.done&&(oe=ce.return)&&oe.call(ce)}finally{if(ae)throw ae.error}}return le}ee.getWordsByCategory=re})(words);var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(ee){for(var te,re=1,ie=arguments.length;re<ie;re++){te=arguments[re];for(var ne in te)Object.prototype.hasOwnProperty.call(te,ne)&&(ee[ne]=te[ne])}return ee},__assign.apply(this,arguments)};Object.defineProperty(dist,"__esModule",{value:!0});dist.totalUniqueSlugs=generateSlug_1=dist.generateSlug=void 0;var words_1=words,DEFAULT_NUMBER_OF_WORDS=3;function generateSlug(ee,te){for(var re=ee||DEFAULT_NUMBER_OF_WORDS,ie={partsOfSpeech:getDefaultPartsOfSpeech(re),categories:{},format:"kebab"},ne=__assign(__assign({},ie),te),ae=[],oe=0;oe<re;oe++){var se=ne.partsOfSpeech[oe],le=words_1.getWordsByCategory(ne.partsOfSpeech[oe],ne.categories[se]),ce=le[Math.floor(Math.random()*le.length)];ae.push(ce)}return formatter(ae,ne.format)}var generateSlug_1=dist.generateSlug=generateSlug;function getDefaultPartsOfSpeech(ee){for(var te=[],re=0;re<ee-1;re++)te.push("adjective");return te.push("noun"),te}function formatter(ee,te){return te==="kebab"?ee.join("-").toLowerCase():te==="camel"?ee.map(function(re,ie){return ie===0?re.toLowerCase():re[0].toUpperCase()+re.slice(1).toLowerCase()}).join(""):te==="lower"?ee.join(" ").toLowerCase():te==="sentence"?ee.map(function(re,ie){return ie===0?re[0].toUpperCase()+re.slice(1).toLowerCase():re}).join(" "):ee.map(function(re){return re[0].toUpperCase()+re.slice(1).toLowerCase()}).join(" ")}function totalUniqueSlugs(ee,te){for(var re,ie,ne=words_1.getWordsByCategory("adjective",(re=te==null?void 0:te.categories)===null||re===void 0?void 0:re.adjective).length,ae=words_1.getWordsByCategory("noun",(ie=te==null?void 0:te.categories)===null||ie===void 0?void 0:ie.noun).length,oe={adjective:ne,noun:ae},se=ee||DEFAULT_NUMBER_OF_WORDS,le=(te==null?void 0:te.partsOfSpeech)||getDefaultPartsOfSpeech(se),ce=1,he=0;he<se;he++)ce*=oe[le[he]];return ce}dist.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 ee=0;ee<256;++ee)byteToHex.push((ee+256).toString(16).slice(1));function unsafeStringify(ee,te=0){return byteToHex[ee[te+0]]+byteToHex[ee[te+1]]+byteToHex[ee[te+2]]+byteToHex[ee[te+3]]+"-"+byteToHex[ee[te+4]]+byteToHex[ee[te+5]]+"-"+byteToHex[ee[te+6]]+byteToHex[ee[te+7]]+"-"+byteToHex[ee[te+8]]+byteToHex[ee[te+9]]+"-"+byteToHex[ee[te+10]]+byteToHex[ee[te+11]]+byteToHex[ee[te+12]]+byteToHex[ee[te+13]]+byteToHex[ee[te+14]]+byteToHex[ee[te+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(ee,te,re){if(native.randomUUID&&!te&&!ee)return native.randomUUID();ee=ee||{};const ie=ee.random||(ee.rng||rng)();return ie[6]=ie[6]&15|64,ie[8]=ie[8]&63|128,unsafeStringify(ie)}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],([ee,te,re,ie],ne)=>{switch(ee){case"auto":{ne(te);break}case"manual":{ne(re);break}case"loader":{ne(ie);break}default:ne(te)}}),addHistoryEntry=ee=>{const te={...ee,id:v4()};if(te.type==="loader"){loaderHistoryStore.update(re=>[te,...re]);return}te.name||(te.name=generateSlug_1(2)),te.type==="auto"&&autoHistoryStore.update(re=>(re.length>=MAX_AUTO_HISTORY_LENGTH&&(re=re.slice(0,MAX_AUTO_HISTORY_LENGTH-1)),[te,...re])),manualHistoryStore.update(re=>[te,...re]),logEvent("history",{action:"save"})},clearHistoryData=ee=>{(get_store_value(historyModeStore)==="auto"?autoHistoryStore:manualHistoryStore).update(te=>(get_store_value(historyModeStore)!=="loader"&&(te=te.filter(({id:re})=>ee&&re!=ee),logEvent("history",{action:"clear",type:ee?"single":"all"})),te))},getPreviousState=ee=>{const te=get_store_value(ee?autoHistoryStore:manualHistoryStore);return te.length>0?JSON.stringify(te[0].state):""},restoreHistory=ee=>{const te=ee.filter(ie=>validateEntry(ie)),re=ee.length-te.length;if(re>0&&(console.error(`${re} invalid history entries were removed.`),console.error(ee)),te.length>0){let ie=0;(te[0].type==="auto"?autoHistoryStore:manualHistoryStore).update(ne=>{const ae=new Set(ne.map(({id:le})=>le)),oe=te.filter(({id:le})=>!ae.has(le));ie=oe.length;const se=[...ne,...oe];return se.sort((le,ce)=>ce.time-le.time),se}),alert(`${ie} entries restored. ${re} invalid, ${te.length-ie} duplicates.`),logEvent("history",{action:"restore",success:ie,invalid:re,duplicates:te.length-ie})}else alert("No valid entries found.")},setIDs=ee=>{for(const te of ee)te.id||(te.id=v4());return ee},injectHistoryIDs=()=>{autoHistoryStore.update(setIDs),manualHistoryStore.update(setIDs)},validateEntry=ee=>ee.type&&ee.state&&ee.time&&!0,codeFileName="code.mmd",configFileName="config.json",isValidGist=ee=>codeFileName in ee,getFileContent=async ee=>ee.truncated?await fetchText(ee.raw_url):ee.content,getGistData=async ee=>{const te=ee.split("github.com").pop();if(!te)throw new Error("Invalid GitHub URL"+ee);const[re,ie,ne,ae]=te.split("/"),{html_url:oe,files:se,history:le}=await fetchJSON(`https://api.github.com/gists/${ne}${ae?"/"+ae:""}`);if(isValidGist(se)){const ce=await getFileContent(se[codeFileName]);let he="{}";configFileName in se&&(he=await getFileContent(se[configFileName]));const de=le[0];return{url:`${oe}/${de.version}`,code:ce,config:he,author:de.user.login,time:new Date(de.committed_at).getTime(),version:de.version.slice(-7)}}else throw new Error("Invalid gist provided")},getStateFromGist=(ee,te=ee.url)=>{const re={...defaultState,code:ee.code,loader:{type:"gist",config:{url:te}}};return ee.config&&(re.mermaid=ee.config),re},loadGistData=async ee=>{const te=ee.split("github.com").pop();if(!te)throw new Error("Invalid GitHub URL"+ee);const[re,ie,ne,ae]=te.split("/"),{history:oe}=await fetchJSON(`https://api.github.com/gists/${ne}${ae?"/"+ae:""}`),se=[];for(const he of oe)try{const de=await getGistData(he.url);se.push(de)}catch(de){console.error(de)}if(se.length===0)throw new Error("Invalid gist provided");se.reverse();const le=se.at(-1);if(!le)throw new Error("Invalid gist provided");const ce=getStateFromGist(le,ee);for(const he of se)addHistoryEntry({state:getStateFromGist(he),time:he.time,type:"loader",url:he.url,name:`${he.author} v${he.version}`});return ce},loaders={gist:loadGistData},loadDataFromUrl=async()=>{const ee=new URLSearchParams(window.location.search);let te=defaultState,re=!1;const ie=ee.get("code")??void 0,ne=ee.get("config")??void 0;let ae;const oe=ne?await fetchText(ne):defaultState.mermaid;if(ie&&(ae=await fetchText(ie),re=!0),ae){if(!ie)throw new Error("Code URL is not defined");te={code:ae,mermaid:oe,loader:{type:"files",config:{codeURL:ie,configURL:ne}}}}else for(const[se,le]of ee.entries())if(se in loaders)try{te=await loaders[se](le),re=!0;break}catch(ce){console.error(ce)}re&&updateCodeStore({...te,autoSync:!0,updateDiagram:!0})},migrations={injectHistoryIDs},migrationStore=persist(writable({version:-1}),localStorage(),"migrations"),applyMigrations=()=>{const{version:ee}=get_store_value(migrationStore),te=Object.entries(migrations);if(ee!==te.length-1){console.log(`Current migration version: v${ee}. Migrating to v${te.length-1}.`);for(let re=ee+1;re<te.length;re++){const[ie,ne]=te[re];console.log(`Applying migration ${re}: ${ie}.`),ne(),logEvent("migration",{key:ie}),migrationStore.set({version:re})}logEvent("migration",{status:"complete",from:ee,to:te.length-1})}},loadStateFromURL=()=>{loadState(window.location.hash.slice(1))},syncDiagram=()=>{updateCodeStore({updateDiagram:!0})},initHandler=async()=>{applyMigrations(),loadStateFromURL(),await initLoading("Loading Gist...",loadDataFromUrl().catch(console.error)),syncDiagram(),initURLSubscription(),await initAnalytics(),plausible==null||plausible.trackPageview({url:window.location.origin+window.location.pathname})},isMac=navigator.platform.toUpperCase().includes("MAC"),cmdKey=isMac?"Cmd":"Ctrl";let count=0;const errorDebug=(ee=1e3)=>{if(count+=1,count>ee){console.log(count,ee);debugger}},formatJSON=ee=>JSON.stringify(ee,void 0,2),fetchJSON=async ee=>(await fetch(ee)).json(),fetchText=async ee=>(await fetch(ee)).text(),defaultState={code:`flowchart 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:formatJSON({theme:"default"}),autoSync:!0,rough:!1,updateDiagram:!0},urlParseFailedState=`flowchart 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=(()=>{const ee=get_store_value(inputStateStore);return{...ee,serialized:serializeState(ee),errorMarkers:[],error:void 0,editorMode:ee.editorMode??"code"}})(),processState=async ee=>{const te={...ee,serialized:"",errorMarkers:[],error:void 0,editorMode:ee.editorMode??"code"};try{te.serialized=serializeState(ee),await parse(ee.code),JSON.parse(ee.mermaid)}catch(re){if(te.error=re,errorDebug(),console.error(re),"hash"in re)try{let ie=te.error.toString();const ne=extractErrorLineText(ie),ae=findMostRelevantLineNumber(ne,ee.code);let oe,se,le,ce;try{({first_line:oe,last_line:se,first_column:le,last_column:ce}=re.hash.loc)}catch{const de=findMostRelevantLineNumber(ie,ee.code);oe=de,se=de+1,le=0,ce=0}ae!==-1&&(ie=replaceLineNumberInErrorMessage(ie,ae)),te.error=new Error(ie);const he={severity:8,startLineNumber:ae,startColumn:le,endLineNumber:se+(ae-oe),endColumn:ce+(le===ce?0:5),message:ie||"Syntax error"};te.errorMarkers=[he]}catch(ie){console.error("Error without line helper",ie)}}return te},stateStore=derived([inputStateStore],([ee],te)=>{processState(ee).then(te)},currentState),loadState=ee=>{let te;console.log(`Loading '${ee}'`);try{te=deserializeState(ee);const re=typeof te.mermaid=="string"?JSON.parse(te.mermaid):te.mermaid;re.securityLevel&&re.securityLevel!=="strict"&&confirm(`Removing "securityLevel":"${re.securityLevel}" from the config for safety.
Click Cancel if you trust the source of this Diagram.`)&&delete re.securityLevel,te.mermaid=formatJSON(re)}catch(re){te=get_store_value(inputStateStore),ee&&(console.error("Init error",re),te.code=urlParseFailedState,te.mermaid=defaultState.mermaid)}updateCodeStore(te)},updateCodeStore=ee=>{inputStateStore.update(te=>({...te,...ee}))},updateCode=(ee,{updateDiagram:te=!1,resetPanZoom:re=!1}={})=>{errorDebug(),inputStateStore.update(ie=>(re&&(ie.pan=void 0,ie.zoom=void 0),{...ie,code:ee,updateDiagram:te}))},updateConfig=ee=>{inputStateStore.update(te=>({...te,mermaid:ee}))},toggleDarkTheme=ee=>{inputStateStore.update(te=>{const re=JSON.parse(te.mermaid);return(!re.theme||["dark","default"].includes(re.theme))&&(re.theme=ee?"dark":"default"),{...te,mermaid:formatJSON(re)}})},initURLSubscription=()=>{const ee=debounce(te=>{history.replaceState(void 0,"",`#${te}`)},250);stateStore.subscribe(({serialized:te})=>{ee(te)})},getStateString=()=>JSON.stringify(get_store_value(inputStateStore));export{generateId as $,getRegisteredLayoutAlgorithm as A,render$2 as B,rgba$1 as C,defaultConfig_default as D,cleanAndMerge as E,getConfig as F,random as G,setupGraphViewbox2 as H,selectSvgElement as I,version as J,getThemeVariables3 as K,line$1 as L,hasKatex as M,calculateMathMLDimensions as N,renderKatex as O,parseFontSize as P,curveBasis as Q,parseGenericTypes as R,setupGraphViewbox as S,getStylesFromArray as T,interpolateToCurve as U,curveLinear as V,getSubGraphTitleMargins as W,evaluate as X,createText as Y,ZERO_WIDTH_SPACE as Z,__name as _,logEvent as a,extend$1 as a$,lineBreakRegex as a0,__export as a1,commonDb_exports as a2,isDark as a3,lighten as a4,darken as a5,withPath as a6,halfPi as a7,epsilon as a8,tau as a9,positionEdgeLabel as aA,insertEdgeLabel as aB,baseRest as aC,isArrayLikeObject as aD,constant$3 as aE,isFunction as aF,isEmpty as aG,computeDimensionOfText as aH,loadingStateStore as aI,toggleDarkTheme as aJ,commonjsGlobal as aK,getDefaultExportFromCjs as aL,__name$1 as aM,array as aN,unsafeStringify as aO,toNumber as aP,isIterateeCall as aQ,keysIn as aR,eq as aS,isArrayLike as aT,isArray as aU,isSymbol as aV,identity$1 as aW,isObject$1 as aX,isIndex as aY,assignValue as aZ,define as a_,cos as aa,sin as ab,min as ac,abs$1 as ad,pi as ae,sqrt as af,atan2 as ag,constant as ah,asin as ai,acos as aj,max as ak,Utils as al,Color$1 as am,getLineFunctionsWithOffset as an,replaceIconSubstring as ao,decodeEntities as ap,markers_default as aq,clear3 as ar,clear2 as as,clear as at,updateNodeBounds as au,setNodeElem as av,insertNode as aw,positionNode as ax,insertCluster as ay,insertEdge as az,assignWithDepth_default as b,createAssigner as b$,Rgb as b0,Color as b1,rgbConvert as b2,nogamma as b3,hue as b4,dayjs2 as b5,constant$1 as b6,interpolateNumber as b7,color as b8,interpolateRgb as b9,copyArray as bA,isBuffer as bB,cloneBuffer as bC,initCloneObject as bD,Stack as bE,MapCache as bF,Uint8Array$1 as bG,isTypedArray as bH,isLength as bI,Set$1 as bJ,pakoSerde as bK,env as bL,encode as bM,purify as bN,errorDebug as bO,syncDiagram as bP,updateCode as bQ,updateConfig as bR,historyStore as bS,historyModeStore as bT,loaderHistoryStore as bU,restoreHistory as bV,getStateString as bW,getPreviousState as bX,addHistoryEntry as bY,clearHistoryData as bZ,plausible as b_,interpolateString as ba,debounce as bb,stateStore as bc,inputStateStore as bd,render as be,saveStatistics as bf,cmdKey as bg,updateCodeStore as bh,setToString as bi,overRest as bj,baseFor as bk,baseAssignValue as bl,baseUnary as bm,merge$1 as bn,Symbol$1 as bo,arrayLikeKeys as bp,baseKeys as bq,memoize as br,isArguments as bs,copyObject as bt,getPrototype as bu,cloneArrayBuffer as bv,cloneTypedArray as bw,isObjectLike as bx,getTag as by,nodeUtil as bz,getAccDescription as c,isPrototype as c0,baseGetTag as c1,setAccDescription as d,getConfig2 as e,common_default as f,getAccTitle as g,calculateTextHeight as h,initHandler as i,calculateTextWidth as j,sanitizeText as k,localStorage as l,d3select as m,log as n,configureSvgSize as o,persist as p,sanitizeUrl_1 as q,setConfig2 as r,setAccTitle as s,defaultConfig2 as t,setDiagramTitle as u,getDiagramTitle as v,wrapLabel as w,utils_default as x,clear$1 as y,getEdgeId as z};