import{w as writable,d as derived}from"./index.ed2598b6.js";import{_ as __vitePreload}from"./preload-helper.3c41be77.js";import{a1 as get_store_value}from"./index.2bb936cc.js";const defaultLoading={loading:!1},loadingStateStore=writable(defaultLoading),initLoading=async(t,e)=>{loadingStateStore.set({loading:!0,message:t});const r=await e;return loadingStateStore.set({loading:!1}),r};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function getAugmentedNamespace(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}),r}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 t(){}return t.throwErrorIfInNonNodeEnvironment=function(){if(!Module)throw new Error("Cannot intercept require in non-Node environment.")},t.interceptRequire=function(){this.isRequireIntercepted||(this.isRequireIntercepted=!0,this.throwErrorIfInNonNodeEnvironment(),t.originRequire=Module.prototype.require,Module.prototype.require=function(){var e=t.originRequire.apply(this,arguments),r=e.name;return t.requiredClasses[r]||(t.requiredClasses[r]=e),e})},t.stopInterceptRequire=function(){this.throwErrorIfInNonNodeEnvironment(),Module.prototype.require=t.originRequire,this.isRequireIntercepted=!1},t.isInterceptingRequire=function(){return this.isRequireIntercepted},t.getRequiredClasses=function(){return this.requiredClasses},t.clearRequiredClasses=function(){this.requiredClasses={}},t.registerClass=function(e){this.registeredClasses.push(e)},t.registerClasses=function(e){this.registeredClasses=this.registeredClasses.concat(e)},t.clearRegisteredClasses=function(){this.registeredClasses=[]},t.serialize=function(e,r){return r===void 0&&(r={}),JSON.stringify(serializer_1.getSerializeValueWithClassName(e,r))},t.deserialize=function(e,r,o){return r===void 0&&(r=[]),o===void 0&&(o={}),deserializer_1.deserializeFromParsedObj(JSON.parse(e),Object.values(this.requiredClasses).concat(this.registeredClasses).concat(r),o)},t.originRequire=null,t.isRequireIntercepted=!1,t.requiredClasses={},t.registeredClasses=[],t}();module.exports=ESSerializer},917:function(t,e){var r=this&&this.__spreadArrays||function(){for(var L=0,P=0,N=arguments.length;P{Object.defineProperty(e,"__esModule",{value:!0}),e.isClass=e.notObject=e.getValueFromToStringResult=void 0,e.notObject=function(r){return r===null||typeof r!="object"},e.getValueFromToStringResult=function(r){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN;default:return null}},e.isClass=function(r){if(function(o){return[Date].indexOf(o)>=0}(r))return!0;try{Reflect.construct(String,[],r)}catch{return!1}return!0}},810:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSerializeValueWithClassName=void 0;var o=r(917),n=r(821);function a(l,h){h===void 0&&(h={});var c=function(f){var u,m,w;return f===void 0?((u={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_UNDEFINED,u):typeof f!="number"||isFinite(f)?typeof f=="bigint"?((w={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_BIG_INT,w[o.TO_STRING_FIELD]=f.toString(),w):n.notObject(f)?f:o.ESSERIALIZER_NULL:((m={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_NOT_FINITE,m[o.TO_STRING_FIELD]=f.toString(),m)}(l);if(c!==o.ESSERIALIZER_NULL)return c;if(Array.isArray(l))return s(l);var d={};if(!function(f){var u=f.__proto__.constructor.name;return o.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED.includes(u)}(l)){if(h.ignoreProperties&&h.ignoreProperties.forEach(function(f){delete l[f]}),h.interceptProperties)for(var g in h.interceptProperties)l[g]=h.interceptProperties[g].call(l,l[g]);(function(f,u){for(var m in f)typeof f[m]!="function"&&(u[m]=a(f[m]))})(l,d)}return function(f,u){var m=f.__proto__.constructor.name;return m==="Object"&&(m=f.constructor.name),m!=="Object"&&(u[o.CLASS_NAME_FIELD]=m,m===o.BUILTIN_CLASS_ARRAYBUFFER||m===o.BUILTIN_CLASS_SHAREDARRAYBUFFER?u[o.ARRAY_FIELD]=s(Array.from(new Uint8Array(f))):m===o.BUILTIN_CLASS_BOOLEAN?u[o.BOOLEAN_FIELD]=f.valueOf():m===o.BUILTIN_CLASS_DATAVIEW?u[o.ARRAY_FIELD]=s(Array.from(new Uint8Array(f.buffer))):m===o.BUILTIN_CLASS_DATE?u[o.TIMESTAMP_FIELD]=f.getTime():m===o.BUILTIN_CLASS_INTL_LOCALE||m===o.BUILTIN_CLASS_REGEXP?u[o.TO_STRING_FIELD]=f.toString():m===o.BUILTIN_CLASS_SET?u[o.ARRAY_FIELD]=s(Array.from(f)):m===o.BUILTIN_CLASS_STRING?u[o.TO_STRING_FIELD]=f.toString():o.ALL_BUILTIN_ARRAYS.includes(m)?u[o.ARRAY_FIELD]=s(Array.from(f)):o.ALL_BUILTIN_ERRORS.includes(m)?function(w,E,b){w.name!=="Error"&&(E.name=w.name),w.message&&(E.message=w.message),w.stack&&(E.stack=w.stack),b===o.BUILTIN_CLASS_AGGREGATE_ERROR&&(E.errors=a(w.errors))}(f,u,m):o.ALL_BUILTIN_INTLS.includes(m)&&(u[o.OPTIONS_FIELD]=f.resolvedOptions())),u}(l,d)}function s(l){return l.map(function(h){return a(h)})}e.getSerializeValueWithClassName=a}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(e!==void 0)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.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=t=>{const e=typeof process<"u"&&!0;if(!alreadyWarnFor.includes(t)&&!e){let r=`Unable to find the ${t}. No data will be persisted.`;typeof window>"u"&&(r+=` Are you running on a server? Most of storages are not available while running on a server.`),console.warn(r),alreadyWarnFor.push(t)}},serialize$1=t=>ESSerializer.serialize(t),deserialize=t=>{if(t!=="undefined"){if(t!=null){try{return ESSerializer.deserialize(t)}catch{}try{return JSON.parse(t)}catch{}}return t}};function persist(t,e,r){const o=e.getValue(r);return o!==null&&t.set(o),"addListener"in e&&e.addListener(r,n=>{t.set(n)}),t.subscribe(n=>{e.setValue(r,n)}),{...t,delete(){e.deleteValue(r)}}}function getBrowserStorage(t,e=!1){const r=[],o=s=>{const l=s.key;if(s.storageArea===t)for(const{listener:h}of r.filter(({key:c})=>c===l))h(deserialize(s.newValue))},n=()=>{e&&typeof window<"u"&&window.addEventListener&&window.addEventListener("storage",o)},a=()=>{e&&typeof window<"u"&&window.removeEventListener&&window.removeEventListener("storage",o)};return{addListener(s,l){r.push({key:s,listener:l}),r.length===1&&n()},removeListener(s,l){const h=r.indexOf({key:s,listener:l});h!==-1&&r.splice(h,1),r.length===0&&a()},getValue(s){const l=t.getItem(s);return deserialize(l)},deleteValue(s){t.removeItem(s)},setValue(s,l){t.setItem(s,serialize$1(l))}}}function localStorage(t=!1){return typeof window<"u"&&window.localStorage?getBrowserStorage(window.localStorage,t):(warnStorageNotFound("window.localStorage"),noopStorage())}function noopStorage(){return{getValue(){return null},deleteValue(){},setValue(){}}}let analytics;const initAnalytics=async()=>{if(!analytics)try{const[{Analytics:t},{default:e}]=await Promise.all([__vitePreload(()=>import("./analytics.browser.es.c80ebc56.js"),[]),__vitePreload(()=>import("./plausible.fca54f1c.js").then(r=>r.p),[])]);analytics=t({app:"mermaid-live-editor",plugins:[e({domain:"mermaid.live",hashMode:!1,apiHost:"https://p.mermaid.live"})]})}catch(t){console.log(t),console.info("Analytics blocked ;)")}},detectType$1=t=>{const e=["classDiagram","erDiagram","flowChart","gantt","gitGraph","graph","journey","pie","stateDiagram","quadrantChart","mindmap"],r=t.replace(/^\s*%%.*\n/g,` `).trimStart().split(" ")[0].toLowerCase();return e.find(n=>r.includes(n.toLowerCase()))},countLines=t=>{var e;return(((e=t.match(/\n/g))==null?void 0:e.length)??0)+1},saveStatistics=t=>{const e=detectType$1(t);if(!e)return;const r=countLines(t),o=r<10?"0-10":r<25?"10-25":r<50?"25-50":r<100?"50-100":r<200?"100-200":r<500?"200-500":r<700?"500-700":r<1e3?"700-1000":r<1500?"1000-1500":"1500+";logEvent("render",{graphType:e,length:r,lengthBucket:o})},minutesToMilliSeconds=t=>t*6e4,defaultDelay=minutesToMilliSeconds(1),delaysPerEvent={render:minutesToMilliSeconds(5),panZoom:minutesToMilliSeconds(10),copyClipboard:defaultDelay,download:defaultDelay,copyMarkdown:defaultDelay,loadGist:defaultDelay,loadSampleDiagram:defaultDelay,renderDiagram:defaultDelay,history:defaultDelay,migration:defaultDelay,themeChange:defaultDelay},timeouts=new Map,logEvent=(t,e)=>{if(!analytics)return;const r=e?JSON.stringify({name:t,data:e}):t;timeouts.has(r)?clearTimeout(timeouts.get(r)):analytics.track(t,e),timeouts.set(r,window.setTimeout(()=>timeouts.delete(r),delaysPerEvent[t]))};/*! 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(t){let e=t.length;for(;--e>=0;)t[e]=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(t,e,r,o,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=o,this.max_length=n,this.has_stree=t&&t.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}const d_code=t=>t<256?_dist_code[t]:_dist_code[256+(t>>>7)],put_short=(t,e)=>{t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255},send_bits=(t,e,r)=>{t.bi_valid>Buf_size-r?(t.bi_buf|=e<>Buf_size-t.bi_valid,t.bi_valid+=r-Buf_size):(t.bi_buf|=e<{send_bits(t,r[e*2],r[e*2+1])},bi_reverse=(t,e)=>{let r=0;do r|=t&1,t>>>=1,r<<=1;while(--e>0);return r>>>1},bi_flush=t=>{t.bi_valid===16?(put_short(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},gen_bitlen=(t,e)=>{const r=e.dyn_tree,o=e.max_code,n=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,h=e.stat_desc.max_length;let c,d,g,f,u,m,w=0;for(f=0;f<=MAX_BITS$1;f++)t.bl_count[f]=0;for(r[t.heap[t.heap_max]*2+1]=0,c=t.heap_max+1;ch&&(f=h,w++),r[d*2+1]=f,!(d>o)&&(t.bl_count[f]++,u=0,d>=l&&(u=s[d-l]),m=r[d*2],t.opt_len+=m*(f+u),a&&(t.static_len+=m*(n[d*2+1]+u)));if(w!==0){do{for(f=h-1;t.bl_count[f]===0;)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[h]--,w-=2}while(w>0);for(f=h;f!==0;f--)for(d=t.bl_count[f];d!==0;)g=t.heap[--c],!(g>o)&&(r[g*2+1]!==f&&(t.opt_len+=(f-r[g*2+1])*r[g*2],r[g*2+1]=f),d--)}},gen_codes=(t,e,r)=>{const o=new Array(MAX_BITS$1+1);let n=0,a,s;for(a=1;a<=MAX_BITS$1;a++)n=n+r[a-1]<<1,o[a]=n;for(s=0;s<=e;s++){let l=t[s*2+1];l!==0&&(t[s*2]=bi_reverse(o[l]++,l))}},tr_static_init=()=>{let t,e,r,o,n;const a=new Array(MAX_BITS$1+1);for(r=0,o=0;o>=7;o{let e;for(e=0;e{t.bi_valid>8?put_short(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},smaller=(t,e,r,o)=>{const n=e*2,a=r*2;return t[n]{const o=t.heap[r];let n=r<<1;for(;n<=t.heap_len&&(n{let o,n,a=0,s,l;if(t.sym_next!==0)do o=t.pending_buf[t.sym_buf+a++]&255,o+=(t.pending_buf[t.sym_buf+a++]&255)<<8,n=t.pending_buf[t.sym_buf+a++],o===0?send_code(t,n,e):(s=_length_code[n],send_code(t,s+LITERALS$1+1,e),l=extra_lbits[s],l!==0&&(n-=base_length[s],send_bits(t,n,l)),o--,s=d_code(o),send_code(t,s,r),l=extra_dbits[s],l!==0&&(o-=base_dist[s],send_bits(t,o,l)));while(a{const r=e.dyn_tree,o=e.stat_desc.static_tree,n=e.stat_desc.has_stree,a=e.stat_desc.elems;let s,l,h=-1,c;for(t.heap_len=0,t.heap_max=HEAP_SIZE$1,s=0;s>1;s>=1;s--)pqdownheap(t,r,s);c=a;do s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],pqdownheap(t,r,1),l=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=l,r[c*2]=r[s*2]+r[l*2],t.depth[c]=(t.depth[s]>=t.depth[l]?t.depth[s]:t.depth[l])+1,r[s*2+1]=r[l*2+1]=c,t.heap[1]=c++,pqdownheap(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],gen_bitlen(t,e),gen_codes(r,h,t.bl_count)},scan_tree=(t,e,r)=>{let o,n=-1,a,s=e[0*2+1],l=0,h=7,c=4;for(s===0&&(h=138,c=3),e[(r+1)*2+1]=65535,o=0;o<=r;o++)a=s,s=e[(o+1)*2+1],!(++l{let o,n=-1,a,s=e[0*2+1],l=0,h=7,c=4;for(s===0&&(h=138,c=3),o=0;o<=r;o++)if(a=s,s=e[(o+1)*2+1],!(++l{let e;for(scan_tree(t,t.dyn_ltree,t.l_desc.max_code),scan_tree(t,t.dyn_dtree,t.d_desc.max_code),build_tree(t,t.bl_desc),e=BL_CODES$1-1;e>=3&&t.bl_tree[bl_order[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e},send_all_trees=(t,e,r,o)=>{let n;for(send_bits(t,e-257,5),send_bits(t,r-1,5),send_bits(t,o-4,4),n=0;n{let e=4093624447,r;for(r=0;r<=31;r++,e>>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return Z_BINARY;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return Z_TEXT;for(r=32;r{static_init_done||(tr_static_init(),static_init_done=!0),t.l_desc=new TreeDesc(t.dyn_ltree,static_l_desc),t.d_desc=new TreeDesc(t.dyn_dtree,static_d_desc),t.bl_desc=new TreeDesc(t.bl_tree,static_bl_desc),t.bi_buf=0,t.bi_valid=0,init_block(t)},_tr_stored_block$1=(t,e,r,o)=>{send_bits(t,(STORED_BLOCK<<1)+(o?1:0),3),bi_windup(t),put_short(t,r),put_short(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r},_tr_align$1=t=>{send_bits(t,STATIC_TREES<<1,3),send_code(t,END_BLOCK,static_ltree),bi_flush(t)},_tr_flush_block$1=(t,e,r,o)=>{let n,a,s=0;t.level>0?(t.strm.data_type===Z_UNKNOWN$1&&(t.strm.data_type=detect_data_type(t)),build_tree(t,t.l_desc),build_tree(t,t.d_desc),s=build_bl_tree(t),n=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&e!==-1?_tr_stored_block$1(t,e,r,o):t.strategy===Z_FIXED$1||a===n?(send_bits(t,(STATIC_TREES<<1)+(o?1:0),3),compress_block(t,static_ltree,static_dtree)):(send_bits(t,(DYN_TREES<<1)+(o?1:0),3),send_all_trees(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),compress_block(t,t.dyn_ltree,t.dyn_dtree)),init_block(t),o&&bi_windup(t)},_tr_tally$1=(t,e,r)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(_length_code[r]+LITERALS$1+1)*2]++,t.dyn_dtree[d_code(e)*2]++),t.sym_next===t.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=(t,e,r,o)=>{let n=t&65535|0,a=t>>>16&65535|0,s=0;for(;r!==0;){s=r>2e3?2e3:r,r-=s;do n=n+e[o++]|0,a=a+n|0;while(--s);n%=65521,a%=65521}return n|a<<16|0};var adler32_1=adler32;const makeTable=()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var o=0;o<8;o++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e},crcTable=new Uint32Array(makeTable()),crc32=(t,e,r,o)=>{const n=crcTable,a=o+r;t^=-1;for(let s=o;s>>8^n[(t^e[s])&255];return t^-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=(t,e)=>(t.msg=messages[e],e),rank=t=>t*2-(t>4?9:0),zero$2=t=>{let e=t.length;for(;--e>=0;)t[e]=0},slide_hash=t=>{let e,r,o,n=t.w_size;e=t.hash_size,o=e;do r=t.head[--o],t.head[o]=r>=n?r-n:0;while(--e);e=n,o=e;do r=t.prev[--o],t.prev[o]=r>=n?r-n:0;while(--e)};let HASH_ZLIB=(t,e,r)=>(e<{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))},flush_block_only=(t,e)=>{_tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,flush_pending(t.strm)},put_byte=(t,e)=>{t.pending_buf[t.pending++]=e},putShortMSB=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255},read_buf=(t,e,r,o)=>{let n=t.avail_in;return n>o&&(n=o),n===0?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),r),t.state.wrap===1?t.adler=adler32_1(t.adler,e,n,r):t.state.wrap===2&&(t.adler=crc32_1(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)},longest_match=(t,e)=>{let r=t.max_chain_length,o=t.strstart,n,a,s=t.prev_length,l=t.nice_match;const h=t.strstart>t.w_size-MIN_LOOKAHEAD?t.strstart-(t.w_size-MIN_LOOKAHEAD):0,c=t.window,d=t.w_mask,g=t.prev,f=t.strstart+MAX_MATCH;let u=c[o+s-1],m=c[o+s];t.prev_length>=t.good_match&&(r>>=2),l>t.lookahead&&(l=t.lookahead);do if(n=e,!(c[n+s]!==m||c[n+s-1]!==u||c[n]!==c[o]||c[++n]!==c[o+1])){o+=2,n++;do;while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&os){if(t.match_start=e,s=a,a>=l)break;u=c[o+s-1],m=c[o+s]}}while((e=g[e&d])>h&&--r!==0);return s<=t.lookahead?s:t.lookahead},fill_window=t=>{const e=t.w_size;let r,o,n;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-MIN_LOOKAHEAD)&&(t.window.set(t.window.subarray(e,e+e-o),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),slide_hash(t),o+=e),t.strm.avail_in===0)break;if(r=read_buf(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=MIN_MATCH)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=HASH(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=HASH(t,t.ins_h,t.window[n+MIN_MATCH-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert{let r=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o,n,a,s=0,l=t.strm.avail_in;do{if(o=65535,a=t.bi_valid+42>>3,t.strm.avail_outn+t.strm.avail_in&&(o=n+t.strm.avail_in),o>a&&(o=a),o>8,t.pending_buf[t.pending-2]=~o,t.pending_buf[t.pending-1]=~o>>8,flush_pending(t.strm),n&&(n>o&&(n=o),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,o-=n),o&&(read_buf(t.strm,t.strm.output,t.strm.next_out,o),t.strm.next_out+=o,t.strm.avail_out-=o,t.strm.total_out+=o)}while(s===0);return l-=t.strm.avail_in,l&&(l>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=l&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-l,t.strm.next_in),t.strstart),t.strstart+=l,t.insert+=l>t.w_size-t.insert?t.w_size-t.insert:l),t.block_start=t.strstart),t.high_watera&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,a+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),a>t.strm.avail_in&&(a=t.strm.avail_in),a&&(read_buf(t.strm,t.window,t.strstart,a),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.high_water>3,a=t.pending_buf_size-a>65535?65535:t.pending_buf_size-a,r=a>t.w_size?t.w_size:a,n=t.strstart-t.block_start,(n>=r||(n||e===Z_FINISH$3)&&e!==Z_NO_FLUSH$2&&t.strm.avail_in===0&&n<=a)&&(o=n>a?a:n,s=e===Z_FINISH$3&&t.strm.avail_in===0&&o===n?1:0,_tr_stored_block(t,t.block_start,o,s),t.block_start+=o,flush_pending(t.strm)),s?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(t,e)=>{let r,o;for(;;){if(t.lookahead=MIN_MATCH&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),r!==0&&t.strstart-r<=t.w_size-MIN_LOOKAHEAD&&(t.match_length=longest_match(t,r)),t.match_length>=MIN_MATCH)if(o=_tr_tally(t,t.strstart-t.match_start,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=MIN_MATCH){t.match_length--;do t.strstart++,t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+1]);else o=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(o&&(flush_block_only(t,!1),t.strm.avail_out===0))return BS_NEED_MORE}return t.insert=t.strstart{let r,o,n;for(;;){if(t.lookahead=MIN_MATCH&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=MIN_MATCH-1,r!==0&&t.prev_length4096)&&(t.match_length=MIN_MATCH-1)),t.prev_length>=MIN_MATCH&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-MIN_MATCH,o=_tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-MIN_MATCH),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=MIN_MATCH-1,t.strstart++,o&&(flush_block_only(t,!1),t.strm.avail_out===0))return BS_NEED_MORE}else if(t.match_available){if(o=_tr_tally(t,0,t.window[t.strstart-1]),o&&flush_block_only(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return BS_NEED_MORE}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(o=_tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart{let r,o,n,a;const s=t.window;for(;;){if(t.lookahead<=MAX_MATCH){if(fill_window(t),t.lookahead<=MAX_MATCH&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=MIN_MATCH&&t.strstart>0&&(n=t.strstart-1,o=s[n],o===s[++n]&&o===s[++n]&&o===s[++n])){a=t.strstart+MAX_MATCH;do;while(o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=MIN_MATCH?(r=_tr_tally(t,1,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(flush_block_only(t,!1),t.strm.avail_out===0))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH$3?(flush_block_only(t,!0),t.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),t.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(t,e)=>{let r;for(;;){if(t.lookahead===0&&(fill_window(t),t.lookahead===0)){if(e===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(t.match_length=0,r=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(flush_block_only(t,!1),t.strm.avail_out===0))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH$3?(flush_block_only(t,!0),t.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),t.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(t,e,r,o,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=o,this.func=n}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=t=>{t.window_size=2*t.w_size,zero$2(t.head),t.max_lazy_match=configuration_table[t.level].max_lazy,t.good_match=configuration_table[t.level].good_length,t.nice_match=configuration_table[t.level].nice_length,t.max_chain_length=configuration_table[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=MIN_MATCH-1,t.match_available=0,t.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$2(this.dyn_ltree),zero$2(this.dyn_dtree),zero$2(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$2(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero$2(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=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==INIT_STATE&&e.status!==GZIP_STATE&&e.status!==EXTRA_STATE&&e.status!==NAME_STATE&&e.status!==COMMENT_STATE&&e.status!==HCRC_STATE&&e.status!==BUSY_STATE&&e.status!==FINISH_STATE?1:0},deflateResetKeep=t=>{if(deflateStateCheck(t))return err(t,Z_STREAM_ERROR$2);t.total_in=t.total_out=0,t.data_type=Z_UNKNOWN;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?GZIP_STATE:e.wrap?INIT_STATE:BUSY_STATE,t.adler=e.wrap===2?0:1,e.last_flush=-2,_tr_init(e),Z_OK$3},deflateReset=t=>{const e=deflateResetKeep(t);return e===Z_OK$3&&lm_init(t.state),e},deflateSetHeader=(t,e)=>deflateStateCheck(t)||t.state.wrap!==2?Z_STREAM_ERROR$2:(t.state.gzhead=e,Z_OK$3),deflateInit2=(t,e,r,o,n,a)=>{if(!t)return Z_STREAM_ERROR$2;let s=1;if(e===Z_DEFAULT_COMPRESSION$1&&(e=6),o<0?(s=0,o=-o):o>15&&(s=2,o-=16),n<1||n>MAX_MEM_LEVEL||r!==Z_DEFLATED$2||o<8||o>15||e<0||e>9||a<0||a>Z_FIXED||o===8&&s!==1)return err(t,Z_STREAM_ERROR$2);o===8&&(o=9);const l=new DeflateState;return t.state=l,l.strm=t,l.status=INIT_STATE,l.wrap=s,l.gzhead=null,l.w_bits=o,l.w_size=1<deflateInit2(t,e,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(t,e)=>{if(deflateStateCheck(t)||e>Z_BLOCK$1||e<0)return t?err(t,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const r=t.state;if(!t.output||t.avail_in!==0&&!t.input||r.status===FINISH_STATE&&e!==Z_FINISH$3)return err(t,t.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const o=r.last_flush;if(r.last_flush=e,r.pending!==0){if(flush_pending(t),t.avail_out===0)return r.last_flush=-1,Z_OK$3}else if(t.avail_in===0&&rank(e)<=rank(o)&&e!==Z_FINISH$3)return err(t,Z_BUF_ERROR$1);if(r.status===FINISH_STATE&&t.avail_in!==0)return err(t,Z_BUF_ERROR$1);if(r.status===INIT_STATE&&r.wrap===0&&(r.status=BUSY_STATE),r.status===INIT_STATE){let n=Z_DEFLATED$2+(r.w_bits-8<<4)<<8,a=-1;if(r.strategy>=Z_HUFFMAN_ONLY||r.level<2?a=0:r.level<6?a=1:r.level===6?a=2:a=3,n|=a<<6,r.strstart!==0&&(n|=PRESET_DICT),n+=31-n%31,putShortMSB(r,n),r.strstart!==0&&(putShortMSB(r,t.adler>>>16),putShortMSB(r,t.adler&65535)),t.adler=1,r.status=BUSY_STATE,flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(r.status===GZIP_STATE){if(t.adler=0,put_byte(r,31),put_byte(r,139),put_byte(r,8),r.gzhead)put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),put_byte(r,r.gzhead.time&255),put_byte(r,r.gzhead.time>>8&255),put_byte(r,r.gzhead.time>>16&255),put_byte(r,r.gzhead.time>>24&255),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(put_byte(r,r.gzhead.extra.length&255),put_byte(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=EXTRA_STATE;else if(put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,OS_CODE),r.status=BUSY_STATE,flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(r.status===EXTRA_STATE){if(r.gzhead.extra){let n=r.pending,a=(r.gzhead.extra.length&65535)-r.gzindex;for(;r.pending+a>r.pending_buf_size;){let l=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+l),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex+=l,flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0,a-=l}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+a),r.pending),r.pending+=a,r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=NAME_STATE}if(r.status===NAME_STATE){if(r.gzhead.name){let n=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0}r.gzindexn&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=COMMENT_STATE}if(r.status===COMMENT_STATE){if(r.gzhead.comment){let n=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0}r.gzindexn&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n))}r.status=HCRC_STATE}if(r.status===HCRC_STATE){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(flush_pending(t),r.pending!==0))return r.last_flush=-1,Z_OK$3;put_byte(r,t.adler&255),put_byte(r,t.adler>>8&255),t.adler=0}if(r.status=BUSY_STATE,flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(t.avail_in!==0||r.lookahead!==0||e!==Z_NO_FLUSH$2&&r.status!==FINISH_STATE){let n=r.level===0?deflate_stored(r,e):r.strategy===Z_HUFFMAN_ONLY?deflate_huff(r,e):r.strategy===Z_RLE?deflate_rle(r,e):configuration_table[r.level].func(r,e);if((n===BS_FINISH_STARTED||n===BS_FINISH_DONE)&&(r.status=FINISH_STATE),n===BS_NEED_MORE||n===BS_FINISH_STARTED)return t.avail_out===0&&(r.last_flush=-1),Z_OK$3;if(n===BS_BLOCK_DONE&&(e===Z_PARTIAL_FLUSH?_tr_align(r):e!==Z_BLOCK$1&&(_tr_stored_block(r,0,0,!1),e===Z_FULL_FLUSH$1&&(zero$2(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),flush_pending(t),t.avail_out===0))return r.last_flush=-1,Z_OK$3}return e!==Z_FINISH$3?Z_OK$3:r.wrap<=0?Z_STREAM_END$3:(r.wrap===2?(put_byte(r,t.adler&255),put_byte(r,t.adler>>8&255),put_byte(r,t.adler>>16&255),put_byte(r,t.adler>>24&255),put_byte(r,t.total_in&255),put_byte(r,t.total_in>>8&255),put_byte(r,t.total_in>>16&255),put_byte(r,t.total_in>>24&255)):(putShortMSB(r,t.adler>>>16),putShortMSB(r,t.adler&65535)),flush_pending(t),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=t=>{if(deflateStateCheck(t))return Z_STREAM_ERROR$2;const e=t.state.status;return t.state=null,e===BUSY_STATE?err(t,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(t,e)=>{let r=e.length;if(deflateStateCheck(t))return Z_STREAM_ERROR$2;const o=t.state,n=o.wrap;if(n===2||n===1&&o.status!==INIT_STATE||o.lookahead)return Z_STREAM_ERROR$2;if(n===1&&(t.adler=adler32_1(t.adler,e,r,0)),o.wrap=0,r>=o.w_size){n===0&&(zero$2(o.head),o.strstart=0,o.block_start=0,o.insert=0);let h=new Uint8Array(o.w_size);h.set(e.subarray(r-o.w_size,r),0),e=h,r=o.w_size}const a=t.avail_in,s=t.next_in,l=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,fill_window(o);o.lookahead>=MIN_MATCH;){let h=o.strstart,c=o.lookahead-(MIN_MATCH-1);do o.ins_h=HASH(o,o.ins_h,o.window[h+MIN_MATCH-1]),o.prev[h&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=h,h++;while(--c);o.strstart=h,o.lookahead=MIN_MATCH-1,fill_window(o)}return o.strstart+=o.lookahead,o.block_start=o.strstart,o.insert=o.lookahead,o.lookahead=0,o.match_length=o.prev_length=MIN_MATCH-1,o.match_available=0,t.next_in=s,t.input=l,t.avail_in=a,o.wrap=n,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=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const o in r)_has(r,o)&&(t[o]=r[o])}}return t},flattenChunks=t=>{let e=0;for(let o=0,n=t.length;o=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,r,o,n,a,s=t.length,l=0;for(n=0;n>>6,e[a++]=128|r&63):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|r&63):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|r&63);return e};const buf2binstring=(t,e)=>{if(e<65534&&t.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let o=0;o{const r=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let o,n;const a=new Array(r*2);for(n=0,o=0;o4){a[n++]=65533,o+=l-1;continue}for(s&=l===2?31:l===3?15:7;l>1&&o1){a[n++]=65533;continue}s<65536?a[n++]=s:(s-=65536,a[n++]=55296|s>>10&1023,a[n++]=56320|s&1023)}return buf2binstring(a,n)},utf8border=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let r=e-1;for(;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+_utf8len[t[r]]>e?r:e},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(t){this.options=common$2.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=deflate_1$2.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Z_OK$2)throw new Error(messages[r]);if(e.header&&deflate_1$2.deflateSetHeader(this.strm,e.header),e.dictionary){let o;if(typeof e.dictionary=="string"?o=strings.string2buf(e.dictionary):toString$1.call(e.dictionary)==="[object ArrayBuffer]"?o=new Uint8Array(e.dictionary):o=e.dictionary,r=deflate_1$2.deflateSetDictionary(this.strm,o),r!==Z_OK$2)throw new Error(messages[r]);this._dict_set=!0}}Deflate$1.prototype.push=function(t,e){const r=this.strm,o=this.options.chunkSize;let n,a;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof t=="string"?r.input=strings.string2buf(t):toString$1.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(a===Z_SYNC_FLUSH||a===Z_FULL_FLUSH)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(n=deflate_1$2.deflate(r,a),n===Z_STREAM_END$2)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=deflate_1$2.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Z_OK$2;if(r.avail_out===0){this.onData(r.output);continue}if(a>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0};Deflate$1.prototype.onData=function(t){this.chunks.push(t)};Deflate$1.prototype.onEnd=function(t){t===Z_OK$2&&(this.result=common$2.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function deflate$1(t,e){const r=new Deflate$1(e);if(r.push(t,!0),r.err)throw r.msg||messages[r.err];return r.result}function deflateRaw$1(t,e){return e=e||{},e.raw=!0,deflate$1(t,e)}function gzip$1(t,e){return e=e||{},e.gzip=!0,deflate$1(t,e)}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 t(e,r){let o,n,a,s,l,h,c,d,g,f,u,m,w,E,b,y,T,C,I,z,v,D,S,x;const F=e.state;o=e.next_in,S=e.input,n=o+(e.avail_in-5),a=e.next_out,x=e.output,s=a-(r-e.avail_out),l=a+(e.avail_out-257),h=F.dmax,c=F.wsize,d=F.whave,g=F.wnext,f=F.window,u=F.hold,m=F.bits,w=F.lencode,E=F.distcode,b=(1<>>24,u>>>=C,m-=C,C=T>>>16&255,C===0)x[a++]=T&65535;else if(C&16){I=T&65535,C&=15,C&&(m>>=C,m-=C),m<15&&(u+=S[o++]<>>24,u>>>=C,m-=C,C=T>>>16&255,C&16){if(z=T&65535,C&=15,mh){e.msg="invalid distance too far back",F.mode=BAD$1;break t}if(u>>>=C,m-=C,C=a-s,z>C){if(C=z-C,C>d&&F.sane){e.msg="invalid distance too far back",F.mode=BAD$1;break t}if(v=0,D=f,g===0){if(v+=c-C,C2;)x[a++]=D[v++],x[a++]=D[v++],x[a++]=D[v++],I-=3;I&&(x[a++]=D[v++],I>1&&(x[a++]=D[v++]))}else{v=a-z;do x[a++]=x[v++],x[a++]=x[v++],x[a++]=x[v++],I-=3;while(I>2);I&&(x[a++]=x[v++],I>1&&(x[a++]=x[v++]))}}else if(C&64){e.msg="invalid distance code",F.mode=BAD$1;break t}else{T=E[(T&65535)+(u&(1<>3,o-=I,m-=I<<3,u&=(1<{const h=l.bits;let c=0,d=0,g=0,f=0,u=0,m=0,w=0,E=0,b=0,y=0,T,C,I,z,v,D=null,S;const x=new Uint16Array(MAXBITS+1),F=new Uint16Array(MAXBITS+1);let U=null,B,k,$;for(c=0;c<=MAXBITS;c++)x[c]=0;for(d=0;d=1&&x[f]===0;f--);if(u>f&&(u=f),f===0)return n[a++]=1<<24|64<<16|0,n[a++]=1<<24|64<<16|0,l.bits=1,0;for(g=1;g0&&(t===CODES$1||f!==1))return-1;for(F[1]=0,c=1;cENOUGH_LENS$1||t===DISTS$1&&b>ENOUGH_DISTS$1)return 1;for(;;){B=c-w,s[d]+1=S?(k=U[s[d]-S],$=D[s[d]-S]):(k=32+64,$=0),T=1<>w)+C]=B<<24|k<<16|$|0;while(C!==0);for(T=1<>=1;if(T!==0?(y&=T-1,y+=T):y=0,d++,--x[c]===0){if(c===f)break;c=e[r+s[d]]}if(c>u&&(y&z)!==I){for(w===0&&(w=u),v+=g,m=c-w,E=1<ENOUGH_LENS$1||t===DISTS$1&&b>ENOUGH_DISTS$1)return 1;I=y&z,n[I]=u<<24|m<<16|v-a|0}}return y!==0&&(n[v+y]=c-w<<24|64<<16|0),l.bits=u,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT$1=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE$2=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&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=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.modeSYNC?1:0},inflateResetKeep=t=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=HEAD,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(ENOUGH_LENS),e.distcode=e.distdyn=new Int32Array(ENOUGH_DISTS),e.sane=1,e.back=-1,Z_OK$1},inflateReset=t=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,inflateResetKeep(t)},inflateReset2=(t,e)=>{let r;if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const o=t.state;return e<0?(r=0,e=-e):(r=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Z_STREAM_ERROR$1:(o.window!==null&&o.wbits!==e&&(o.window=null),o.wrap=r,o.wbits=e,inflateReset(t))},inflateInit2=(t,e)=>{if(!t)return Z_STREAM_ERROR$1;const r=new InflateState;t.state=r,r.strm=t,r.window=null,r.mode=HEAD;const o=inflateReset2(t,e);return o!==Z_OK$1&&(t.state=null),o},inflateInit=t=>inflateInit2(t,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=t=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(inftrees(LENS,t.lens,0,288,lenfix,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;inftrees(DISTS,t.lens,0,32,distfix,0,t.work,{bits:5}),virgin=!1}t.lencode=lenfix,t.lenbits=9,t.distcode=distfix,t.distbits=5},updatewindow=(t,e,r,o)=>{let n;const a=t.state;return a.window===null&&(a.wsize=1<=a.wsize?(a.window.set(e.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>o&&(n=o),a.window.set(e.subarray(r-o,r-o+n),a.wnext),o-=n,o?(a.window.set(e.subarray(r-o,r),0),a.wnext=o,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave{let r,o,n,a,s,l,h,c,d,g,f,u,m,w,E=0,b,y,T,C,I,z,v,D;const S=new Uint8Array(4);let x,F;const U=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(t)||!t.output||!t.input&&t.avail_in!==0)return Z_STREAM_ERROR$1;r=t.state,r.mode===TYPE$2&&(r.mode=TYPEDO),s=t.next_out,n=t.output,h=t.avail_out,a=t.next_in,o=t.input,l=t.avail_in,c=r.hold,d=r.bits,g=l,f=h,D=Z_OK$1;t:for(;;)switch(r.mode){case HEAD:if(r.wrap===0){r.mode=TYPEDO;break}for(;d<16;){if(l===0)break t;l--,c+=o[a++]<>>8&255,r.check=crc32_1(r.check,S,2,0),c=0,d=0,r.mode=FLAGS;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=BAD;break}if((c&15)!==Z_DEFLATED){t.msg="unknown compression method",r.mode=BAD;break}if(c>>>=4,d-=4,v=(c&15)+8,r.wbits===0&&(r.wbits=v),v>15||v>r.wbits){t.msg="invalid window size",r.mode=BAD;break}r.dmax=1<>8&1),r.flags&512&&r.wrap&4&&(S[0]=c&255,S[1]=c>>>8&255,r.check=crc32_1(r.check,S,2,0)),c=0,d=0,r.mode=TIME;case TIME:for(;d<32;){if(l===0)break t;l--,c+=o[a++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,r.check=crc32_1(r.check,S,4,0)),c=0,d=0,r.mode=OS;case OS:for(;d<16;){if(l===0)break t;l--,c+=o[a++]<>8),r.flags&512&&r.wrap&4&&(S[0]=c&255,S[1]=c>>>8&255,r.check=crc32_1(r.check,S,2,0)),c=0,d=0,r.mode=EXLEN;case EXLEN:if(r.flags&1024){for(;d<16;){if(l===0)break t;l--,c+=o[a++]<>>8&255,r.check=crc32_1(r.check,S,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(r.flags&1024&&(u=r.length,u>l&&(u=l),u&&(r.head&&(v=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(o.subarray(a,a+u),v)),r.flags&512&&r.wrap&4&&(r.check=crc32_1(r.check,o,u,a)),l-=u,a+=u,r.length-=u),r.length))break t;r.length=0,r.mode=NAME;case NAME:if(r.flags&2048){if(l===0)break t;u=0;do v=o[a+u++],r.head&&v&&r.length<65536&&(r.head.name+=String.fromCharCode(v));while(v&&u>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=TYPE$2;break;case DICTID:for(;d<32;){if(l===0)break t;l--,c+=o[a++]<>>=d&7,d-=d&7,r.mode=CHECK;break}for(;d<3;){if(l===0)break t;l--,c+=o[a++]<>>=1,d-=1,c&3){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,e===Z_TREES){c>>>=2,d-=2;break t}break;case 2:r.mode=TABLE;break;case 3:t.msg="invalid block type",r.mode=BAD}c>>>=2,d-=2;break;case STORED:for(c>>>=d&7,d-=d&7;d<32;){if(l===0)break t;l--,c+=o[a++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=c&65535,c=0,d=0,r.mode=COPY_,e===Z_TREES)break t;case COPY_:r.mode=COPY;case COPY:if(u=r.length,u){if(u>l&&(u=l),u>h&&(u=h),u===0)break t;n.set(o.subarray(a,a+u),s),l-=u,a+=u,h-=u,s+=u,r.length-=u;break}r.mode=TYPE$2;break;case TABLE:for(;d<14;){if(l===0)break t;l--,c+=o[a++]<>>=5,d-=5,r.ndist=(c&31)+1,c>>>=5,d-=5,r.ncode=(c&15)+4,c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,x={bits:r.lenbits},D=inftrees(CODES,r.lens,0,19,r.lencode,0,r.work,x),r.lenbits=x.bits,D){t.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have>>24,y=E>>>16&255,T=E&65535,!(b<=d);){if(l===0)break t;l--,c+=o[a++]<>>=b,d-=b,r.lens[r.have++]=T;else{if(T===16){for(F=b+2;d>>=b,d-=b,r.have===0){t.msg="invalid bit length repeat",r.mode=BAD;break}v=r.lens[r.have-1],u=3+(c&3),c>>>=2,d-=2}else if(T===17){for(F=b+3;d>>=b,d-=b,v=0,u=3+(c&7),c>>>=3,d-=3}else{for(F=b+7;d>>=b,d-=b,v=0,u=11+(c&127),c>>>=7,d-=7}if(r.have+u>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=BAD;break}for(;u--;)r.lens[r.have++]=v}}if(r.mode===BAD)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,x={bits:r.lenbits},D=inftrees(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,x),r.lenbits=x.bits,D){t.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,x={bits:r.distbits},D=inftrees(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,x),r.distbits=x.bits,D){t.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,e===Z_TREES)break t;case LEN_:r.mode=LEN;case LEN:if(l>=6&&h>=258){t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=l,r.hold=c,r.bits=d,inffast(t,f),s=t.next_out,n=t.output,h=t.avail_out,a=t.next_in,o=t.input,l=t.avail_in,c=r.hold,d=r.bits,r.mode===TYPE$2&&(r.back=-1);break}for(r.back=0;E=r.lencode[c&(1<>>24,y=E>>>16&255,T=E&65535,!(b<=d);){if(l===0)break t;l--,c+=o[a++]<>C)],b=E>>>24,y=E>>>16&255,T=E&65535,!(C+b<=d);){if(l===0)break t;l--,c+=o[a++]<>>=C,d-=C,r.back+=C}if(c>>>=b,d-=b,r.back+=b,r.length=T,y===0){r.mode=LIT;break}if(y&32){r.back=-1,r.mode=TYPE$2;break}if(y&64){t.msg="invalid literal/length code",r.mode=BAD;break}r.extra=y&15,r.mode=LENEXT;case LENEXT:if(r.extra){for(F=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;E=r.distcode[c&(1<>>24,y=E>>>16&255,T=E&65535,!(b<=d);){if(l===0)break t;l--,c+=o[a++]<>C)],b=E>>>24,y=E>>>16&255,T=E&65535,!(C+b<=d);){if(l===0)break t;l--,c+=o[a++]<>>=C,d-=C,r.back+=C}if(c>>>=b,d-=b,r.back+=b,y&64){t.msg="invalid distance code",r.mode=BAD;break}r.offset=T,r.extra=y&15,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(F=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(h===0)break t;if(u=f-h,r.offset>u){if(u=r.offset-u,u>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=BAD;break}u>r.wnext?(u-=r.wnext,m=r.wsize-u):m=r.wnext-u,u>r.length&&(u=r.length),w=r.window}else w=n,m=s-r.offset,u=r.length;u>h&&(u=h),h-=u,r.length-=u;do n[s++]=w[m++];while(--u);r.length===0&&(r.mode=LEN);break;case LIT:if(h===0)break t;n[s++]=r.length,h--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;d<32;){if(l===0)break t;l--,c|=o[a++]<{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;let e=t.state;return e.window&&(e.window=null),t.state=null,Z_OK$1},inflateGetHeader=(t,e)=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const r=t.state;return r.wrap&2?(r.head=e,e.done=!1,Z_OK$1):Z_STREAM_ERROR$1},inflateSetDictionary=(t,e)=>{const r=e.length;let o,n,a;return inflateStateCheck(t)||(o=t.state,o.wrap!==0&&o.mode!==DICT)?Z_STREAM_ERROR$1:o.mode===DICT&&(n=1,n=adler32_1(n,e,r,0),n!==o.check)?Z_DATA_ERROR$1:(a=updatewindow(t,e,r,r),a?(o.mode=MEM,Z_MEM_ERROR$1):(o.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(t){this.options=common$2.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=inflate_1$2.inflateInit2(this.strm,e.windowBits);if(r!==Z_OK)throw new Error(messages[r]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=strings.string2buf(e.dictionary):toString.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=inflate_1$2.inflateSetDictionary(this.strm,e.dictionary),r!==Z_OK)))throw new Error(messages[r])}Inflate$1.prototype.push=function(t,e){const r=this.strm,o=this.options.chunkSize,n=this.options.dictionary;let a,s,l;if(this.ended)return!1;for(e===~~e?s=e:s=e===!0?Z_FINISH:Z_NO_FLUSH,toString.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),a=inflate_1$2.inflate(r,s),a===Z_NEED_DICT&&n&&(a=inflate_1$2.inflateSetDictionary(r,n),a===Z_OK?a=inflate_1$2.inflate(r,s):a===Z_DATA_ERROR&&(a=Z_NEED_DICT));r.avail_in>0&&a===Z_STREAM_END&&r.state.wrap>0&&t[r.next_in]!==0;)inflate_1$2.inflateReset(r),a=inflate_1$2.inflate(r,s);switch(a){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(a),this.ended=!0,!1}if(l=r.avail_out,r.next_out&&(r.avail_out===0||a===Z_STREAM_END))if(this.options.to==="string"){let h=strings.utf8border(r.output,r.next_out),c=r.next_out-h,d=strings.buf2string(r.output,h);r.next_out=c,r.avail_out=o-c,c&&r.output.set(r.output.subarray(h,h+c),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(a===Z_OK&&l===0)){if(a===Z_STREAM_END)return a=inflate_1$2.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};Inflate$1.prototype.onData=function(t){this.chunks.push(t)};Inflate$1.prototype.onEnd=function(t){t===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common$2.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function inflate$1(t,e){const r=new Inflate$1(e);if(r.push(t),r.err)throw r.msg||messages[r.err];return r.result}function inflateRaw$1(t,e){return e=e||{},e.raw=!0,inflate$1(t,e)}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 _hasatob=typeof atob=="function",_hasbtoa=typeof btoa=="function",_hasBuffer=typeof Buffer=="function",_TD=typeof TextDecoder=="function"?new TextDecoder:void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(t=>{let e={};return t.forEach((r,o)=>e[r]=o),e})(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):t=>new Uint8Array(Array.prototype.slice.call(t,0)),_mkUriSafe=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),_tidyB64=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=t=>{let e,r,o,n,a="";const s=t.length%3;for(let l=0;l255||(o=t.charCodeAt(l++))>255||(n=t.charCodeAt(l++))>255)throw new TypeError("invalid character found");e=r<<16|o<<8|n,a+=b64chs[e>>18&63]+b64chs[e>>12&63]+b64chs[e>>6&63]+b64chs[e&63]}return s?a.slice(0,s-3)+"===".substring(s):a},_btoa=_hasbtoa?t=>btoa(t):_hasBuffer?t=>Buffer.from(t,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let o=0,n=t.length;oe?_mkUriSafe(_fromUint8Array(t)):_fromUint8Array(t),cb_utob=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?_fromCC(192|e>>>6)+_fromCC(128|e&63):_fromCC(224|e>>>12&15)+_fromCC(128|e>>>6&63)+_fromCC(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return _fromCC(240|e>>>18&7)+_fromCC(128|e>>>12&63)+_fromCC(128|e>>>6&63)+_fromCC(128|e&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=t=>t.replace(re_utob,cb_utob),_encode=_hasBuffer?t=>Buffer.from(t,"utf8").toString("base64"):_TE?t=>_fromUint8Array(_TE.encode(t)):t=>_btoa(utob(t)),encode=(t,e=!1)=>e?_mkUriSafe(_encode(t)):_encode(t),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return _fromCC((r>>>10)+55296)+_fromCC((r&1023)+56320);case 3:return _fromCC((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return _fromCC((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},btou=t=>t.replace(re_btou,cb_btou),atobPolyfill=t=>{if(t=t.replace(/\s+/g,""),!b64re.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",o,n;for(let a=0;a>16&255):n===64?_fromCC(e>>16&255,e>>8&255):_fromCC(e>>16&255,e>>8&255,e&255);return r},_atob=_hasatob?t=>atob(_tidyB64(t)):_hasBuffer?t=>Buffer.from(t,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?t=>_U8Afrom(Buffer.from(t,"base64")):t=>_U8Afrom(_atob(t).split("").map(e=>e.charCodeAt(0))),toUint8Array=t=>_toUint8Array(_unURI(t)),_decode=_hasBuffer?t=>Buffer.from(t,"base64").toString("utf8"):_TD?t=>_TD.decode(_toUint8Array(t)):t=>btou(_atob(t)),_unURI=t=>_tidyB64(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),decode=t=>_decode(_unURI(t)),base64Serde={serialize:t=>encode(t,!0),deserialize:t=>decode(t)},pakoSerde={serialize:t=>{const e=new TextEncoder().encode(t),r=deflate_1(e,{level:9});return fromUint8Array(r,!0)},deserialize:t=>{const e=toUint8Array(t);return inflate_1(e,{to:"string"})}},serdes={base64:base64Serde,pako:pakoSerde},serializeState=(t,e="pako")=>{if(!(e in serdes))throw new Error(`Unknown serde type: ${e}`);const r=JSON.stringify(t),o=serdes[e].serialize(r);return`${e}:${o}`},deserializeState=t=>{let e,r;if(t.includes(":")){let n;if([n,r]=t.split(":"),n in serdes)e=n;else throw new Error(`Unknown serde type: ${n}`)}else e="base64",r=t;const o=serdes[e].deserialize(r);return JSON.parse(o)};var dist$1={},words={};(function(t){var e=commonjsGlobal&&commonjsGlobal.__values||function(o){var n=typeof Symbol=="function"&&Symbol.iterator,a=n&&o[n],s=0;if(a)return a.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&s>=o.length&&(o=void 0),{value:o&&o[s++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.getWordsByCategory=t.wordList=void 0,t.wordList={noun:[{word:"accountant",categories:["profession"]},{word:"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 r(o,n){var a,s;n===void 0&&(n=[]);var l=new Set(n),h=[];try{for(var c=e(t.wordList[o]),d=c.next();!d.done;d=c.next()){var g=d.value;(n.length===0||g.categories.some(function(f){return l.has(f)}))&&h.push(g.word)}}catch(f){a={error:f}}finally{try{d&&!d.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}return h}t.getWordsByCategory=r})(words);var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(t){for(var e,r=1,o=arguments.length;r{switch(t){case"auto":{n(e);break}case"manual":{n(r);break}case"loader":{n(o);break}default:n(e)}}),addHistoryEntry=t=>{const e={...t,id:v4()};if(e.type==="loader"){loaderHistoryStore.update(r=>[e,...r]);return}e.name||(e.name=generateSlug_1(2)),e.type==="auto"?autoHistoryStore.update(r=>(r.length>=MAX_AUTO_HISTORY_LENGTH&&(r=r.slice(0,MAX_AUTO_HISTORY_LENGTH-1)),[e,...r])):e.type==="manual"&&(manualHistoryStore.update(r=>[e,...r]),logEvent("history",{action:"save"}))},clearHistoryData=t=>{(get_store_value(historyModeStore)==="auto"?autoHistoryStore:manualHistoryStore).update(e=>(get_store_value(historyModeStore)!=="loader"&&(e=e.filter(({id:r})=>t&&r!=t),logEvent("history",{action:"clear",type:t?"single":"all"})),e))},getPreviousState=t=>{const e=get_store_value(t?autoHistoryStore:manualHistoryStore);return e.length>0?JSON.stringify(e[0].state):""},restoreHistory=t=>{const e=t.filter(o=>validateEntry(o)),r=t.length-e.length;if(r>0&&(console.error(`${r} invalid history entries were removed.`),console.error(t)),e.length>0){let o=0;(e[0].type==="auto"?autoHistoryStore:manualHistoryStore).update(n=>{const a=new Set(n.map(({id:h})=>h)),s=e.filter(({id:h})=>!a.has(h));o=s.length;const l=[...n,...s];return l.sort((h,c)=>c.time-h.time),l}),alert(`${o} entries restored. ${r} invalid, ${e.length-o} duplicates.`),logEvent("history",{action:"restore",success:o,invalid:r,duplicates:e.length-o})}else alert("No valid entries found.")},setIDs=t=>{for(const e of t)e.id||(e.id=v4());return t},injectHistoryIDs=()=>{autoHistoryStore.update(setIDs),manualHistoryStore.update(setIDs)},validateEntry=t=>t.type&&t.state&&t.time&&!0,codeFileName="code.mmd",configFileName="config.json",isValidGist=t=>codeFileName in t,getFileContent=async t=>t.truncated?await fetchText(t.raw_url):t.content,getGistData=async t=>{const e=t.split("github.com").pop();if(!e)throw new Error("Invalid GitHub URL"+t);const[r,o,n,a]=e.split("/"),{html_url:s,files:l,history:h}=await fetchJSON(`https://api.github.com/gists/${n}${a?"/"+a:""}`);if(isValidGist(l)){const c=await getFileContent(l[codeFileName]);let d="{}";configFileName in l&&(d=await getFileContent(l[configFileName]));const g=h[0];return{url:`${s}/${g.version}`,code:c,config:d,author:g.user.login,time:new Date(g.committed_at).getTime(),version:g.version.slice(-7)}}else throw new Error("Invalid gist provided")},getStateFromGist=(t,e=t.url)=>{const r={...defaultState,code:t.code,loader:{type:"gist",config:{url:e}}};return t.config&&(r.mermaid=t.config),r},loadGistData=async t=>{const e=t.split("github.com").pop();if(!e)throw new Error("Invalid GitHub URL"+t);const[r,o,n,a]=e.split("/"),{history:s}=await fetchJSON(`https://api.github.com/gists/${n}${a?"/"+a:""}`),l=[];for(const d of s){const g=await getGistData(d.url).catch();g&&l.push(g)}if(l.length===0)throw new Error("Invalid gist provided");l.reverse();const h=l.slice(-1).pop();if(!h)throw new Error("Invalid gist provided");const c=getStateFromGist(h,t);for(const d of l)addHistoryEntry({state:getStateFromGist(d),time:d.time,type:"loader",url:d.url,name:`${d.author} v${d.version}`});return c},loaders={gist:loadGistData},loadDataFromUrl=async()=>{const t=new URLSearchParams(window.location.search);let e=defaultState,r=!1;const o=t.get("code")??void 0,n=t.get("config")??void 0;let a;const s=n?await fetchText(n):defaultState.mermaid;if(o&&(a=await fetchText(o),r=!0),a){if(!o)throw new Error("Code URL is not defined");e={code:a,mermaid:s,loader:{type:"files",config:{codeURL:o,configURL:n}}}}else for(const[l,h]of t.entries())if(l in loaders)try{e=await loaders[l](h),r=!0;break}catch(c){console.error(c)}r&&updateCodeStore({...e,autoSync:!0,updateDiagram:!0})},migrations={injectHistoryIDs},migrationStore=persist(writable({version:-1}),localStorage(),"migrations"),applyMigrations=()=>{const{version:t}=get_store_value(migrationStore),e=Object.entries(migrations);if(t!==e.length-1){console.log(`Current migration version: v${t}. Migrating to v${e.length-1}.`);for(let r=t+1;r{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(),await(analytics==null?void 0:analytics.page())},isMac=navigator.platform.toUpperCase().includes("MAC"),cmdKey=isMac?"Cmd":"Ctrl";let count=0;const errorDebug=(t=100)=>{if(count+=1,count>t){console.log(count,t);debugger}},formatJSON=t=>JSON.stringify(t,void 0,2),fetchJSON=async t=>(await fetch(t)).json(),fetchText=async t=>(await fetch(t)).text();function dedent(t){for(var e=[],r=1;r=k?B:""+Array(k+1-O.length).join($)+B},C={s:T,z:function(B){var k=-B.utcOffset(),$=Math.abs(k),O=Math.floor($/60),L=$%60;return(k<=0?"+":"-")+T(O,2,"0")+":"+T(L,2,"0")},m:function B(k,$){if(k.date()<$.date())return-B($,k);var O=12*($.year()-k.year())+($.month()-k.month()),L=k.clone().add(O,g),P=$-L<0,N=k.clone().add(O+(P?-1:1),g);return+(-(O+($-L)/(P?L-N:N-L))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:g,y:u,w:d,d:c,D:m,h,m:l,s,ms:a,Q:f}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},I="en",z={};z[I]=y;var v=function(B){return B instanceof F},D=function B(k,$,O){var L;if(!k)return I;if(typeof k=="string"){var P=k.toLowerCase();z[P]&&(L=P),$&&(z[P]=$,L=P);var N=k.split("-");if(!L&&N.length>1)return B(N[0])}else{var q=k.name;z[q]=k,L=q}return!O&&L&&(I=L),L||!O&&I},S=function(B,k){if(v(B))return B.clone();var $=typeof k=="object"?k:{};return $.date=B,$.args=arguments,new F($)},x=C;x.l=D,x.i=v,x.w=function(B,k){return S(B,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var F=function(){function B($){this.$L=D($.locale,null,!0),this.parse($)}var k=B.prototype;return k.parse=function($){this.$d=function(O){var L=O.date,P=O.utc;if(L===null)return new Date(NaN);if(x.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var N=L.match(E);if(N){var q=N[2]-1||0,H=(N[7]||"0").substring(0,3);return P?new Date(Date.UTC(N[1],q,N[3]||1,N[4]||0,N[5]||0,N[6]||0,H)):new Date(N[1],q,N[3]||1,N[4]||0,N[5]||0,N[6]||0,H)}}return new Date(L)}($),this.$x=$.x||{},this.init()},k.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},k.$utils=function(){return x},k.isValid=function(){return this.$d.toString()!==w},k.isSame=function($,O){var L=S($);return this.startOf(O)<=L&&L<=this.endOf(O)},k.isAfter=function($,O){return S($)-1}function decodeHtmlCharacters(t){return t.replace(htmlEntitiesRegex,function(e,r){return String.fromCharCode(r)})}function sanitizeUrl(t){var e=decodeHtmlCharacters(t||"").replace(htmlCtrlEntityRegex,"").replace(ctrlCharactersRegex,"").trim();if(!e)return"about:blank";if(isRelativeUrlWithoutProtocol(e))return e;var r=e.match(urlSchemeRegex);if(!r)return e;var o=r[0];return invalidProtocolRegex.test(o)?"about:blank":e}sanitizeUrl_1=dist.sanitizeUrl=sanitizeUrl;var noop$1={value:()=>{}};function dispatch(){for(var t=0,e=arguments.length,r={},o;t=0&&(o=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(t,e){var r=this._,o=parseTypenames$1(t+"",r),n,a=-1,s=o.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),o=0,n,a;o=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),namespaces.hasOwnProperty(e)?{space:namespaces[e],local:t}:t}function creatorInherit(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===xhtml&&e.documentElement.namespaceURI===xhtml?e.createElement(t):e.createElementNS(r,t)}}function creatorFixed(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function creator(t){var e=namespace(t);return(e.local?creatorFixed:creatorInherit)(e)}function none(){}function selector(t){return t==null?none:function(){return this.querySelector(t)}}function selection_select(t){typeof t!="function"&&(t=selector(t));for(var e=this._groups,r=e.length,o=new Array(r),n=0;n=T&&(T=y+1);!(I=E[T])&&++T=0;)(s=o[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function selection_sort(t){t||(t=ascending);function e(g,f){return g&&f?t(g.__data__,f.__data__):!g-!f}for(var r=this._groups,o=r.length,n=new Array(o),a=0;ae?1:t>=e?0:NaN}function selection_call(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?styleRemove$1:typeof e=="function"?styleFunction$1:styleConstant$1)(t,e,r??"")):styleValue(this.node(),t)}function styleValue(t,e){return t.style.getPropertyValue(e)||defaultView(t).getComputedStyle(t,null).getPropertyValue(e)}function propertyRemove(t){return function(){delete this[t]}}function propertyConstant(t,e){return function(){this[t]=e}}function propertyFunction(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function selection_property(t,e){return arguments.length>1?this.each((e==null?propertyRemove:typeof e=="function"?propertyFunction:propertyConstant)(t,e)):this.node()[t]}function classArray(t){return t.trim().split(/^|\s+/)}function classList(t){return t.classList||new ClassList(t)}function ClassList(t){this._node=t,this._names=classArray(t.getAttribute("class")||"")}ClassList.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function classedAdd(t,e){for(var r=classList(t),o=-1,n=e.length;++o=0&&(r=e.slice(o+1),e=e.slice(0,o)),{type:e,name:r}})}function onRemove(t){return function(){var e=this.__on;if(e){for(var r=0,o=-1,n=e.length,a;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?rgba$2(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?rgba$2(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=reRgbInteger.exec(t))?new Rgb(e[1],e[2],e[3],1):(e=reRgbPercent.exec(t))?new Rgb(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=reRgbaInteger.exec(t))?rgba$2(e[1],e[2],e[3],e[4]):(e=reRgbaPercent.exec(t))?rgba$2(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=reHslPercent.exec(t))?hsla(e[1],e[2]/100,e[3]/100,1):(e=reHslaPercent.exec(t))?hsla(e[1],e[2]/100,e[3]/100,e[4]):named.hasOwnProperty(t)?rgbn(named[t]):t==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(t){return new Rgb(t>>16&255,t>>8&255,t&255,1)}function rgba$2(t,e,r,o){return o<=0&&(t=e=r=NaN),new Rgb(t,e,r,o)}function rgbConvert(t){return t instanceof Color$2||(t=color(t)),t?(t=t.rgb(),new Rgb(t.r,t.g,t.b,t.opacity)):new Rgb}function rgb(t,e,r,o){return arguments.length===1?rgbConvert(t):new Rgb(t,e,r,o??1)}function Rgb(t,e,r,o){this.r=+t,this.g=+e,this.b=+r,this.opacity=+o}define(Rgb,rgb,extend$1(Color$2,{brighter(t){return t=t==null?brighter:Math.pow(brighter,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?darker:Math.pow(darker,t),new Rgb(this.r*t,this.g*t,this.b*t,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 t=clampa(this.opacity);return`${t===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${t===1?")":`, ${t})`}`}function clampa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function clampi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hex(t){return t=clampi(t),(t<16?"0":"")+t.toString(16)}function hsla(t,e,r,o){return o<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Hsl(t,e,r,o)}function hslConvert(t){if(t instanceof Hsl)return new Hsl(t.h,t.s,t.l,t.opacity);if(t instanceof Color$2||(t=color(t)),!t)return new Hsl;if(t instanceof Hsl)return t;t=t.rgb();var e=t.r/255,r=t.g/255,o=t.b/255,n=Math.min(e,r,o),a=Math.max(e,r,o),s=NaN,l=a-n,h=(a+n)/2;return l?(e===a?s=(r-o)/l+(r0&&h<1?0:s,new Hsl(s,l,h,t.opacity)}function hsl(t,e,r,o){return arguments.length===1?hslConvert(t):new Hsl(t,e,r,o??1)}function Hsl(t,e,r,o){this.h=+t,this.s=+e,this.l=+r,this.opacity=+o}define(Hsl,hsl,extend$1(Color$2,{brighter(t){return t=t==null?brighter:Math.pow(brighter,t),new Hsl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?darker:Math.pow(darker,t),new Hsl(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*e,n=2*r-o;return new Rgb(hsl2rgb(t>=240?t-240:t+120,n,o),hsl2rgb(t,n,o),hsl2rgb(t<120?t+240:t-120,n,o),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 t=clampa(this.opacity);return`${t===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function clamph(t){return t=(t||0)%360,t<0?t+360:t}function clampt(t){return Math.max(0,Math.min(1,t||0))}function hsl2rgb(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const constant=t=>()=>t;function linear(t,e){return function(r){return t+r*e}}function exponential(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(o){return Math.pow(t+o*e,r)}}function hue(t,e){var r=e-t;return r?linear(t,r>180||r<-180?r-360*Math.round(r/360):r):constant(isNaN(t)?e:t)}function gamma(t){return(t=+t)==1?nogamma:function(e,r){return r-e?exponential(e,r,t):constant(isNaN(e)?r:e)}}function nogamma(t,e){var r=e-t;return r?linear(t,r):constant(isNaN(t)?e:t)}const interpolateRgb=function t(e){var r=gamma(e);function o(n,a){var s=r((n=rgb(n)).r,(a=rgb(a)).r),l=r(n.g,a.g),h=r(n.b,a.b),c=nogamma(n.opacity,a.opacity);return function(d){return n.r=s(d),n.g=l(d),n.b=h(d),n.opacity=c(d),n+""}}return o.gamma=t,o}(1);function interpolateNumber(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero(t){return function(){return t}}function one(t){return function(e){return t(e)+""}}function interpolateString(t,e){var r=reA.lastIndex=reB.lastIndex=0,o,n,a,s=-1,l=[],h=[];for(t=t+"",e=e+"";(o=reA.exec(t))&&(n=reB.exec(e));)(a=n.index)>r&&(a=e.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(o=o[0])===(n=n[0])?l[s]?l[s]+=n:l[++s]=n:(l[++s]=null,h.push({i:s,x:interpolateNumber(o,n)})),r=reB.lastIndex;return r180?d+=360:d-c>180&&(c+=360),f.push({i:g.push(n(g)+"rotate(",null,o)-2,x:interpolateNumber(c,d)})):d&&g.push(n(g)+"rotate("+d+o)}function l(c,d,g,f){c!==d?f.push({i:g.push(n(g)+"skewX(",null,o)-2,x:interpolateNumber(c,d)}):d&&g.push(n(g)+"skewX("+d+o)}function h(c,d,g,f,u,m){if(c!==g||d!==f){var w=u.push(n(u)+"scale(",null,",",null,")");m.push({i:w-4,x:interpolateNumber(c,g)},{i:w-2,x:interpolateNumber(d,f)})}else(g!==1||f!==1)&&u.push(n(u)+"scale("+g+","+f+")")}return function(c,d){var g=[],f=[];return c=t(c),d=t(d),a(c.translateX,c.translateY,d.translateX,d.translateY,g,f),s(c.rotate,d.rotate,g,f),l(c.skewX,d.skewX,g,f),h(c.scaleX,c.scaleY,d.scaleX,d.scaleY,g,f),c=d=null,function(u){for(var m=-1,w=f.length,E;++m=0&&t._call.call(void 0,e),t=t._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var t=clock.now(),e=t-clockLast;e>pokeDelay&&(clockSkew-=e,clockLast=t)}function nap(){for(var t,e=taskHead,r,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:taskHead=r);taskTail=t,sleep(o)}function sleep(t){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var e=t-clockNow;e>24?(t<1/0&&(timeout$1=setTimeout(wake,t-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function timeout(t,e,r){var o=new Timer;return e=e==null?0:+e,o.restart(n=>{o.stop(),t(n+e)},e,r),o}var emptyOn=dispatch("start","end","cancel","interrupt"),emptyTween=[],CREATED=0,SCHEDULED=1,STARTING=2,STARTED=3,RUNNING=4,ENDING=5,ENDED=6;function schedule(t,e,r,o,n,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;create$1(t,r,{name:e,index:o,group:n,on:emptyOn,tween:emptyTween,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:CREATED})}function init$1(t,e){var r=get(t,e);if(r.state>CREATED)throw new Error("too late; already scheduled");return r}function set$1(t,e){var r=get(t,e);if(r.state>STARTED)throw new Error("too late; already running");return r}function get(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function create$1(t,e,r){var o=t.__transition,n;o[e]=r,r.timer=timer(a,0,r.time);function a(c){r.state=SCHEDULED,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var d,g,f,u;if(r.state!==SCHEDULED)return h();for(d in o)if(u=o[d],u.name===r.name){if(u.state===STARTED)return timeout(s);u.state===RUNNING?(u.state=ENDED,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[d]):+dSTARTING&&o.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function onFunction(t,e,r){var o,n,a=start(e)?init$1:set$1;return function(){var s=a(this,t),l=s.on;l!==o&&(n=(o=l).copy()).on(e,r),s.on=n}}function transition_on(t,e){var r=this._id;return arguments.length<2?get(this.node(),r).on.on(t):this.each(onFunction(r,t,e))}function removeFunction(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(t){var e=this._name,r=this._id;typeof t!="function"&&(t=selector(t));for(var o=this._groups,n=o.length,a=new Array(n),s=0;s1?0:t<-1?pi:Math.acos(t)}function asin(t){return t>=1?halfPi:t<=-1?-halfPi:Math.asin(t)}function Linear(t){this._context=t}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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function curveLinear(t){return new Linear(t)}class Bump{constructor(e,r){this._context=e,this._x=r}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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function bumpX(t){return new Bump(t,!0)}function bumpY(t){return new Bump(t,!1)}function noop(){}function point$3(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Basis(t){this._context=t}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$3(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$3(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function curveBasis(t){return new Basis(t)}function BasisClosed(t){this._context=t}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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:point$3(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function curveBasisClosed(t){return new BasisClosed(t)}function BasisOpen(t){this._context=t}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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,o=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,o):this._context.moveTo(r,o);break;case 3:this._point=4;default:point$3(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function curveBasisOpen(t){return new BasisOpen(t)}function Bundle(t,e){this._basis=new Basis(t),this._beta=e}Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var o=t[0],n=e[0],a=t[r]-o,s=e[r]-n,l=-1,h;++l<=r;)h=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+h*a),this._beta*e[l]+(1-this._beta)*(n+h*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const curveBundle=function t(e){function r(o){return e===1?new Basis(o):new Bundle(o,e)}return r.beta=function(o){return t(+o)},r}(.85);function point$2(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Cardinal(t,e){this._context=t,this._k=(1-e)/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$2(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:point$2(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCardinal=function t(e){function r(o){return new Cardinal(o,e)}return r.tension=function(o){return t(+o)},r}(0);function CardinalClosed(t,e){this._context=t,this._k=(1-e)/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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:point$2(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCardinalClosed=function t(e){function r(o){return new CardinalClosed(o,e)}return r.tension=function(o){return t(+o)},r}(0);function CardinalOpen(t,e){this._context=t,this._k=(1-e)/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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$2(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCardinalOpen=function t(e){function r(o){return new CardinalOpen(o,e)}return r.tension=function(o){return t(+o)},r}(0);function point$1(t,e,r){var o=t._x1,n=t._y1,a=t._x2,s=t._y2;if(t._l01_a>epsilon){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);o=(o*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,n=(n*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>epsilon){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/d,s=(s*c+t._y1*t._l23_2a-r*t._l12_2a)/d}t._context.bezierCurveTo(o,n,a,s,t._x2,t._y2)}function CatmullRom(t,e){this._context=t,this._alpha=e}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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,o=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:point$1(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCatmullRom=function t(e){function r(o){return e?new CatmullRom(o,e):new Cardinal(o,0)}return r.alpha=function(o){return t(+o)},r}(.5);function CatmullRomClosed(t,e){this._context=t,this._alpha=e}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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,o=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:point$1(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCatmullRomClosed=function t(e){function r(o){return e?new CatmullRomClosed(o,e):new CardinalClosed(o,0)}return r.alpha=function(o){return t(+o)},r}(.5);function CatmullRomOpen(t,e){this._context=t,this._alpha=e}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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,o=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,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$1(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCatmullRomOpen=function t(e){function r(o){return e?new CatmullRomOpen(o,e):new CardinalOpen(o,0)}return r.alpha=function(o){return t(+o)},r}(.5);function LinearClosed(t){this._context=t}LinearClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function curveLinearClosed(t){return new LinearClosed(t)}function sign(t){return t<0?-1:1}function slope3(t,e,r){var o=t._x1-t._x0,n=e-t._x1,a=(t._y1-t._y0)/(o||n<0&&-0),s=(r-t._y1)/(n||o<0&&-0),l=(a*n+s*o)/(o+n);return(sign(a)+sign(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function slope2(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function point(t,e,r){var o=t._x0,n=t._y0,a=t._x1,s=t._y1,l=(a-o)/3;t._context.bezierCurveTo(o+l,n+l*e,a-l,s-l*r,a,s)}function MonotoneX(t){this._context=t}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(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(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,point(this,slope2(this,r=slope3(this,t,e)),r);break;default:point(this,this._t0,r=slope3(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function MonotoneY(t){this._context=new ReflectContext(t)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(t,e){MonotoneX.prototype.point.call(this,e,t)};function ReflectContext(t){this._context=t}ReflectContext.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,o,n,a){this._context.bezierCurveTo(e,t,o,r,a,n)}};function monotoneX(t){return new MonotoneX(t)}function monotoneY(t){return new MonotoneY(t)}function Natural(t){this._context=t}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var o=controlPoints(t),n=controlPoints(e),a=0,s=1;s=0;--e)n[e]=(s[e]-n[e+1])/a[e];for(a[r-1]=(t[r]+n[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function curveStep(t){return new Step(t,.5)}function stepBefore(t){return new Step(t,0)}function stepAfter(t){return new Step(t,1)}function Transform(t,e,r){this.k=t,this.x=e,this.y=r}Transform.prototype={constructor:Transform,scale:function(t){return t===1?this:new Transform(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Transform(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Transform.prototype;/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries,setPrototypeOf,isFrozen,getPrototypeOf,getOwnPropertyDescriptor}=Object;let{freeze,seal,create}=Object,{apply,construct}=typeof Reflect<"u"&&Reflect;apply||(apply=function(e,r,o){return e.apply(r,o)});freeze||(freeze=function(e){return e});seal||(seal=function(e){return e});construct||(construct=function(e,r){return new e(...r)});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),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(t){return function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n/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);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});const getGlobal=()=>typeof window>"u"?null:window,_createTrustedTypesPolicy=function t(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(o=r.getAttribute(n));const a="dompurify"+(o?"#"+o:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function createDOMPurify(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const e=M=>createDOMPurify(M);if(e.version="3.0.5",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;const r=t.document,o=r.currentScript;let{document:n}=t;const{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:h,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:g,DOMParser:f,trustedTypes:u}=t,m=h.prototype,w=lookupGetter(m,"cloneNode"),E=lookupGetter(m,"nextSibling"),b=lookupGetter(m,"childNodes"),y=lookupGetter(m,"parentNode");if(typeof s=="function"){const M=n.createElement("template");M.content&&M.content.ownerDocument&&(n=M.content.ownerDocument)}let T,C="";const{implementation:I,createNodeIterator:z,createDocumentFragment:v,getElementsByTagName:D}=n,{importNode:S}=r;let x={};e.isSupported=typeof entries=="function"&&typeof y=="function"&&I&&I.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:U,TMPLIT_EXPR:B,DATA_ATTR:k,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:L}=EXPRESSIONS;let{IS_ALLOWED_URI:P}=EXPRESSIONS,N=null;const q=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let H=null;const Y=addToSet({},[...html,...svg,...mathMl,...xml]);let j=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,et=null,it=!0,nt=!0,rt=!1,K=!0,J=!1,Q=!1,lt=!1,St=!1,dt=!1,mt=!1,yt=!1,Bt=!0,Rt=!1;const Gt="user-content-";let xt=!0,pt=!1,ut={},ft=null;const Ot=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 Nt=null;const Ft=addToSet({},["audio","video","img","source","image","track"]);let Et=null;const Dt=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bt="http://www.w3.org/1998/Math/MathML",Ct="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xhtml";let gt=at,vt=!1,At=null;const Vt=addToSet({},[bt,Ct,at],stringToString);let ct;const Xt=["application/xhtml+xml","text/html"],Kt="text/html";let V,_t=null;const Jt=n.createElement("form"),Mt=function(p){return p instanceof RegExp||p instanceof Function},kt=function(p){if(!(_t&&_t===p)){if((!p||typeof p!="object")&&(p={}),p=clone(p),ct=Xt.indexOf(p.PARSER_MEDIA_TYPE)===-1?ct=Kt:ct=p.PARSER_MEDIA_TYPE,V=ct==="application/xhtml+xml"?stringToString:stringToLowerCase,N="ALLOWED_TAGS"in p?addToSet({},p.ALLOWED_TAGS,V):q,H="ALLOWED_ATTR"in p?addToSet({},p.ALLOWED_ATTR,V):Y,At="ALLOWED_NAMESPACES"in p?addToSet({},p.ALLOWED_NAMESPACES,stringToString):Vt,Et="ADD_URI_SAFE_ATTR"in p?addToSet(clone(Dt),p.ADD_URI_SAFE_ATTR,V):Dt,Nt="ADD_DATA_URI_TAGS"in p?addToSet(clone(Ft),p.ADD_DATA_URI_TAGS,V):Ft,ft="FORBID_CONTENTS"in p?addToSet({},p.FORBID_CONTENTS,V):Ot,G="FORBID_TAGS"in p?addToSet({},p.FORBID_TAGS,V):{},et="FORBID_ATTR"in p?addToSet({},p.FORBID_ATTR,V):{},ut="USE_PROFILES"in p?p.USE_PROFILES:!1,it=p.ALLOW_ARIA_ATTR!==!1,nt=p.ALLOW_DATA_ATTR!==!1,rt=p.ALLOW_UNKNOWN_PROTOCOLS||!1,K=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=p.SAFE_FOR_TEMPLATES||!1,Q=p.WHOLE_DOCUMENT||!1,dt=p.RETURN_DOM||!1,mt=p.RETURN_DOM_FRAGMENT||!1,yt=p.RETURN_TRUSTED_TYPE||!1,St=p.FORCE_BODY||!1,Bt=p.SANITIZE_DOM!==!1,Rt=p.SANITIZE_NAMED_PROPS||!1,xt=p.KEEP_CONTENT!==!1,pt=p.IN_PLACE||!1,P=p.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,gt=p.NAMESPACE||at,j=p.CUSTOM_ELEMENT_HANDLING||{},p.CUSTOM_ELEMENT_HANDLING&&Mt(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=p.CUSTOM_ELEMENT_HANDLING.tagNameCheck),p.CUSTOM_ELEMENT_HANDLING&&Mt(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&(nt=!1),mt&&(dt=!0),ut&&(N=addToSet({},[...text]),H=[],ut.html===!0&&(addToSet(N,html$1),addToSet(H,html)),ut.svg===!0&&(addToSet(N,svg$1),addToSet(H,svg),addToSet(H,xml)),ut.svgFilters===!0&&(addToSet(N,svgFilters),addToSet(H,svg),addToSet(H,xml)),ut.mathMl===!0&&(addToSet(N,mathMl$1),addToSet(H,mathMl),addToSet(H,xml))),p.ADD_TAGS&&(N===q&&(N=clone(N)),addToSet(N,p.ADD_TAGS,V)),p.ADD_ATTR&&(H===Y&&(H=clone(H)),addToSet(H,p.ADD_ATTR,V)),p.ADD_URI_SAFE_ATTR&&addToSet(Et,p.ADD_URI_SAFE_ATTR,V),p.FORBID_CONTENTS&&(ft===Ot&&(ft=clone(ft)),addToSet(ft,p.FORBID_CONTENTS,V)),xt&&(N["#text"]=!0),Q&&addToSet(N,["html","head","body"]),N.table&&(addToSet(N,["tbody"]),delete G.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=p.TRUSTED_TYPES_POLICY,C=T.createHTML("")}else T===void 0&&(T=_createTrustedTypesPolicy(u,o)),T!==null&&typeof C=="string"&&(C=T.createHTML(""));freeze&&freeze(p),_t=p}},Pt=addToSet({},["mi","mo","mn","ms","mtext"]),zt=addToSet({},["foreignobject","desc","title","annotation-xml"]),Qt=addToSet({},["title","style","font","a","script"]),Tt=addToSet({},svg$1);addToSet(Tt,svgFilters),addToSet(Tt,svgDisallowed);const $t=addToSet({},mathMl$1);addToSet($t,mathMlDisallowed);const te=function(p){let A=y(p);(!A||!A.tagName)&&(A={namespaceURI:gt,tagName:"template"});const R=stringToLowerCase(p.tagName),W=stringToLowerCase(A.tagName);return At[p.namespaceURI]?p.namespaceURI===Ct?A.namespaceURI===at?R==="svg":A.namespaceURI===bt?R==="svg"&&(W==="annotation-xml"||Pt[W]):!!Tt[R]:p.namespaceURI===bt?A.namespaceURI===at?R==="math":A.namespaceURI===Ct?R==="math"&&zt[W]:!!$t[R]:p.namespaceURI===at?A.namespaceURI===Ct&&!zt[W]||A.namespaceURI===bt&&!Pt[W]?!1:!$t[R]&&(Qt[R]||!Tt[R]):!!(ct==="application/xhtml+xml"&&At[p.namespaceURI]):!1},ht=function(p){arrayPush(e.removed,{element:p});try{p.parentNode.removeChild(p)}catch{p.remove()}},Lt=function(p,A){try{arrayPush(e.removed,{attribute:A.getAttributeNode(p),from:A})}catch{arrayPush(e.removed,{attribute:null,from:A})}if(A.removeAttribute(p),p==="is"&&!H[p])if(dt||mt)try{ht(A)}catch{}else try{A.setAttribute(p,"")}catch{}},Ut=function(p){let A,R;if(St)p=""+p;else{const tt=stringMatch(p,/^[\r\n\t ]+/);R=tt&&tt[0]}ct==="application/xhtml+xml"&>===at&&(p=''+p+"");const W=T?T.createHTML(p):p;if(gt===at)try{A=new f().parseFromString(W,ct)}catch{}if(!A||!A.documentElement){A=I.createDocument(gt,"template",null);try{A.documentElement.innerHTML=vt?C:W}catch{}}const X=A.body||A.documentElement;return p&&R&&X.insertBefore(n.createTextNode(R),X.childNodes[0]||null),gt===at?D.call(A,Q?"html":"body")[0]:Q?A.documentElement:X},Ht=function(p){return z.call(p.ownerDocument||p,p,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},ee=function(p){return p instanceof g&&(typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||!(p.attributes instanceof d)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function")},wt=function(p){return typeof l=="object"?p instanceof l:p&&typeof p=="object"&&typeof p.nodeType=="number"&&typeof p.nodeName=="string"},st=function(p,A,R){x[p]&&arrayForEach(x[p],W=>{W.call(e,A,R,_t)})},jt=function(p){let A;if(st("beforeSanitizeElements",p,null),ee(p))return ht(p),!0;const R=V(p.nodeName);if(st("uponSanitizeElement",p,{tagName:R,allowedTags:N}),p.hasChildNodes()&&!wt(p.firstElementChild)&&(!wt(p.content)||!wt(p.content.firstElementChild))&®ExpTest(/<[/\w]/g,p.innerHTML)&®ExpTest(/<[/\w]/g,p.textContent))return ht(p),!0;if(!N[R]||G[R]){if(!G[R]&&Wt(R)&&(j.tagNameCheck instanceof RegExp&®ExpTest(j.tagNameCheck,R)||j.tagNameCheck instanceof Function&&j.tagNameCheck(R)))return!1;if(xt&&!ft[R]){const W=y(p)||p.parentNode,X=b(p)||p.childNodes;if(X&&W){const tt=X.length;for(let Z=tt-1;Z>=0;--Z)W.insertBefore(w(X[Z],!0),E(p))}}return ht(p),!0}return p instanceof h&&!te(p)||(R==="noscript"||R==="noembed"||R==="noframes")&®ExpTest(/<\/no(script|embed|frames)/i,p.innerHTML)?(ht(p),!0):(J&&p.nodeType===3&&(A=p.textContent,A=stringReplace(A,F," "),A=stringReplace(A,U," "),A=stringReplace(A,B," "),p.textContent!==A&&(arrayPush(e.removed,{element:p.cloneNode()}),p.textContent=A)),st("afterSanitizeElements",p,null),!1)},qt=function(p,A,R){if(Bt&&(A==="id"||A==="name")&&(R in n||R in Jt))return!1;if(!(nt&&!et[A]&®ExpTest(k,A))){if(!(it&®ExpTest($,A))){if(!H[A]||et[A]){if(!(Wt(p)&&(j.tagNameCheck instanceof RegExp&®ExpTest(j.tagNameCheck,p)||j.tagNameCheck instanceof Function&&j.tagNameCheck(p))&&(j.attributeNameCheck instanceof RegExp&®ExpTest(j.attributeNameCheck,A)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(A))||A==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&®ExpTest(j.tagNameCheck,R)||j.tagNameCheck instanceof Function&&j.tagNameCheck(R))))return!1}else if(!Et[A]){if(!regExpTest(P,stringReplace(R,L,""))){if(!((A==="src"||A==="xlink:href"||A==="href")&&p!=="script"&&stringIndexOf(R,"data:")===0&&Nt[p])){if(!(rt&&!regExpTest(O,stringReplace(R,L,"")))){if(R)return!1}}}}}}return!0},Wt=function(p){return p.indexOf("-")>0},Yt=function(p){let A,R,W,X;st("beforeSanitizeAttributes",p,null);const{attributes:tt}=p;if(!tt)return;const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(X=tt.length;X--;){A=tt[X];const{name:ot,namespaceURI:It}=A;if(R=ot==="value"?A.value:stringTrim(A.value),W=V(ot),Z.attrName=W,Z.attrValue=R,Z.keepAttr=!0,Z.forceKeepAttr=void 0,st("uponSanitizeAttribute",p,Z),R=Z.attrValue,Z.forceKeepAttr||(Lt(ot,p),!Z.keepAttr))continue;if(!K&®ExpTest(/\/>/i,R)){Lt(ot,p);continue}J&&(R=stringReplace(R,F," "),R=stringReplace(R,U," "),R=stringReplace(R,B," "));const Zt=V(p.nodeName);if(qt(Zt,W,R)){if(Rt&&(W==="id"||W==="name")&&(Lt(ot,p),R=Gt+R),T&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!It)switch(u.getAttributeType(Zt,W)){case"TrustedHTML":{R=T.createHTML(R);break}case"TrustedScriptURL":{R=T.createScriptURL(R);break}}try{It?p.setAttributeNS(It,ot,R):p.setAttribute(ot,R),arrayPop(e.removed)}catch{}}}st("afterSanitizeAttributes",p,null)},ie=function M(p){let A;const R=Ht(p);for(st("beforeSanitizeShadowDOM",p,null);A=R.nextNode();)st("uponSanitizeShadowNode",A,null),!jt(A)&&(A.content instanceof a&&M(A.content),Yt(A));st("afterSanitizeShadowDOM",p,null)};return e.sanitize=function(M){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A,R,W,X;if(vt=!M,vt&&(M=""),typeof M!="string"&&!wt(M))if(typeof M.toString=="function"){if(M=M.toString(),typeof M!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!e.isSupported)return M;if(lt||kt(p),e.removed=[],typeof M=="string"&&(pt=!1),pt){if(M.nodeName){const ot=V(M.nodeName);if(!N[ot]||G[ot])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(M instanceof l)A=Ut(""),R=A.ownerDocument.importNode(M,!0),R.nodeType===1&&R.nodeName==="BODY"||R.nodeName==="HTML"?A=R:A.appendChild(R);else{if(!dt&&!J&&!Q&&M.indexOf("<")===-1)return T&&yt?T.createHTML(M):M;if(A=Ut(M),!A)return dt?null:yt?C:""}A&&St&&ht(A.firstChild);const tt=Ht(pt?M:A);for(;W=tt.nextNode();)jt(W)||(W.content instanceof a&&ie(W.content),Yt(W));if(pt)return M;if(dt){if(mt)for(X=v.call(A.ownerDocument);A.firstChild;)X.appendChild(A.firstChild);else X=A;return(H.shadowroot||H.shadowrootmode)&&(X=S.call(r,X,!0)),X}let Z=Q?A.outerHTML:A.innerHTML;return Q&&N["!doctype"]&&A.ownerDocument&&A.ownerDocument.doctype&&A.ownerDocument.doctype.name&®ExpTest(DOCTYPE_NAME,A.ownerDocument.doctype.name)&&(Z=" `+Z),J&&(Z=stringReplace(Z,F," "),Z=stringReplace(Z,U," "),Z=stringReplace(Z,B," ")),T&&yt?T.createHTML(Z):Z},e.setConfig=function(M){kt(M),lt=!0},e.clearConfig=function(){_t=null,lt=!1},e.isValidAttribute=function(M,p,A){_t||kt({});const R=V(M),W=V(p);return qt(R,W,A)},e.addHook=function(M,p){typeof p=="function"&&(x[M]=x[M]||[],arrayPush(x[M],p))},e.removeHook=function(M){if(x[M])return arrayPop(x[M])},e.removeHooks=function(M){x[M]&&(x[M]=[])},e.removeAllHooks=function(){x={}},e}var purify=createDOMPurify();const Channel={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},o)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(o){case"r":return Channel.hue2rgb(a,n,t+1/3)*255;case"g":return Channel.hue2rgb(a,n,t)*255;case"b":return Channel.hue2rgb(a,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},o)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),a=Math.min(t,e,r),s=(n+a)/2;if(o==="l")return s*100;if(n===a)return 0;const l=n-a,h=s>.5?l/(2-n-a):l/(n+a);if(o==="s")return h*100;switch(n){case t:return((e-r)/l+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},lang=Lang,Unit={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},unit=Unit,Utils={channel,lang,unit},_=Utils,DEC2HEX={};for(let t=0;t<=255;t++)DEC2HEX[t]=_.unit.dec2hex(t);const TYPE={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=TYPE.ALL}is(e){return this.type===e}}const Type$2=Type;class Channels{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Type$2}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=TYPE.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:o,l:n}=e;r===void 0&&(e.h=_.channel.rgb2hsl(e,"h")),o===void 0&&(e.s=_.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=_.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:o,b:n}=e;r===void 0&&(e.r=_.channel.hsl2rgb(e,"r")),o===void 0&&(e.g=_.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=_.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(TYPE.HSL)&&r!==void 0?r:(this._ensureHSL(),_.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(TYPE.HSL)&&r!==void 0?r:(this._ensureHSL(),_.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(TYPE.HSL)&&r!==void 0?r:(this._ensureHSL(),_.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(TYPE.RGB)&&r!==void 0?r:(this._ensureRGB(),_.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(TYPE.RGB)&&r!==void 0?r:(this._ensureRGB(),_.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(TYPE.RGB)&&r!==void 0?r:(this._ensureRGB(),_.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(TYPE.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(TYPE.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(TYPE.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(TYPE.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(TYPE.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(TYPE.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Channels$1=Channels,channels=new Channels$1({r:0,g:0,b:0,a:0},"transparent"),ChannelsReusable=channels,Hex={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Hex.re);if(!e)return;const r=e[1],o=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,l=s?1:17,h=s?8:4,c=a?0:-1,d=s?255:15;return ChannelsReusable.set({r:(o>>h*(c+3)&d)*l,g:(o>>h*(c+2)&d)*l,b:(o>>h*(c+1)&d)*l,a:a?(o&d)*l/255:1},t)},stringify:t=>{const{r:e,g:r,b:o,a:n}=t;return n<1?`#${DEC2HEX[Math.round(e)]}${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(o)]}${DEC2HEX[Math.round(n*255)]}`:`#${DEC2HEX[Math.round(e)]}${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(o)]}`}},Hex$1=Hex,HSL={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(HSL.hueRe);if(e){const[,r,o]=e;switch(o){case"grad":return _.channel.clamp.h(parseFloat(r)*.9);case"rad":return _.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return _.channel.clamp.h(parseFloat(r)*360)}}return _.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(HSL.re);if(!r)return;const[,o,n,a,s,l]=r;return ChannelsReusable.set({h:HSL._hue2deg(o),s:_.channel.clamp.s(parseFloat(n)),l:_.channel.clamp.l(parseFloat(a)),a:s?_.channel.clamp.a(l?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:r,l:o,a:n}=t;return n<1?`hsla(${_.lang.round(e)}, ${_.lang.round(r)}%, ${_.lang.round(o)}%, ${n})`:`hsl(${_.lang.round(e)}, ${_.lang.round(r)}%, ${_.lang.round(o)}%)`}},HSL$1=HSL,Keyword={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=Keyword.colors[t];if(e)return Hex$1.parse(e)},stringify:t=>{const e=Hex$1.stringify(t);for(const r in Keyword.colors)if(Keyword.colors[r]===e)return r}},Keyword$1=Keyword,RGB={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(RGB.re);if(!r)return;const[,o,n,a,s,l,h,c,d]=r;return ChannelsReusable.set({r:_.channel.clamp.r(n?parseFloat(o)*2.55:parseFloat(o)),g:_.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:_.channel.clamp.b(h?parseFloat(l)*2.55:parseFloat(l)),a:c?_.channel.clamp.a(d?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:r,b:o,a:n}=t;return n<1?`rgba(${_.lang.round(e)}, ${_.lang.round(r)}, ${_.lang.round(o)}, ${_.lang.round(n)})`:`rgb(${_.lang.round(e)}, ${_.lang.round(r)}, ${_.lang.round(o)})`}},RGB$1=RGB,Color={format:{keyword:Keyword$1,hex:Hex$1,rgb:RGB$1,rgba:RGB$1,hsl:HSL$1,hsla:HSL$1},parse:t=>{if(typeof t!="string")return t;const e=Hex$1.parse(t)||RGB$1.parse(t)||HSL$1.parse(t)||Keyword$1.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(TYPE.HSL)||t.data.r===void 0?HSL$1.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?RGB$1.stringify(t):Hex$1.stringify(t)},Color$1=Color,change=(t,e)=>{const r=Color$1.parse(t);for(const o in e)r[o]=_.channel.clamp[o](e[o]);return Color$1.stringify(r)},change$1=change,rgba=(t,e,r=0,o=1)=>{if(typeof t!="number")return change$1(t,{a:e});const n=ChannelsReusable.set({r:_.channel.clamp.r(t),g:_.channel.clamp.g(e),b:_.channel.clamp.b(r),a:_.channel.clamp.a(o)});return Color$1.stringify(n)},rgba$1=rgba,luminance=t=>{const{r:e,g:r,b:o}=Color$1.parse(t),n=.2126*_.channel.toLinear(e)+.7152*_.channel.toLinear(r)+.0722*_.channel.toLinear(o);return _.lang.round(n)},luminance$1=luminance,isLight=t=>luminance$1(t)>=.5,isLight$1=isLight,isDark=t=>!isLight$1(t),isDark$1=isDark,adjustChannel=(t,e,r)=>{const o=Color$1.parse(t),n=o[e],a=_.channel.clamp[e](n+r);return n!==a&&(o[e]=a),Color$1.stringify(o)},adjustChannel$1=adjustChannel,lighten=(t,e)=>adjustChannel$1(t,"l",e),lighten$1=lighten,darken=(t,e)=>adjustChannel$1(t,"l",-e),darken$1=darken,adjust=(t,e)=>{const r=Color$1.parse(t),o={};for(const n in e)e[n]&&(o[n]=r[n]+e[n]);return change$1(t,o)},adjust$1=adjust,mix=(t,e,r=50)=>{const{r:o,g:n,b:a,a:s}=Color$1.parse(t),{r:l,g:h,b:c,a:d}=Color$1.parse(e),g=r/100,f=g*2-1,u=s-d,w=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,E=1-w,b=o*w+l*E,y=n*w+h*E,T=a*w+c*E,C=s*g+d*(1-g);return rgba$1(b,y,T,C)},mix$1=mix,invert=(t,e=100)=>{const r=Color$1.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,mix$1(r,t,e)},invert$1=invert;var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;const freeGlobal$1=freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal$1||freeSelf||Function("return this")();const root$1=root;var Symbol$1=root$1.Symbol;const Symbol$2=Symbol$1;var objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty,nativeObjectToString$1=objectProto$8.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag(t){var e=hasOwnProperty$6.call(t,symToStringTag$1),r=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var o=!0}catch{}var n=nativeObjectToString$1.call(t);return o&&(e?t[symToStringTag$1]=r:delete t[symToStringTag$1]),n}var objectProto$7=Object.prototype,nativeObjectToString=objectProto$7.toString;function objectToString(t){return nativeObjectToString.call(t)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$2?Symbol$2.toStringTag:void 0;function baseGetTag(t){return t==null?t===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?getRawTag(t):objectToString(t)}function isObject$1(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(t){if(!isObject$1(t))return!1;var e=baseGetTag(t);return e==funcTag$1||e==genTag||e==asyncTag||e==proxyTag}var coreJsData=root$1["__core-js_shared__"];const coreJsData$1=coreJsData;var maskSrcKey=function(){var t=/[^.]+$/.exec(coreJsData$1&&coreJsData$1.keys&&coreJsData$1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function isMasked(t){return!!maskSrcKey&&maskSrcKey in t}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(t){if(t!=null){try{return funcToString$1.call(t)}catch{}try{return t+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$6=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$5=objectProto$6.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$5).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(t){if(!isObject$1(t)||isMasked(t))return!1;var e=isFunction(t)?reIsNative:reIsHostCtor;return e.test(toSource(t))}function getValue(t,e){return t==null?void 0:t[e]}function getNative(t,e){var r=getValue(t,e);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");const nativeCreate$1=nativeCreate;function hashClear(){this.__data__=nativeCreate$1?nativeCreate$1(null):{},this.size=0}function hashDelete(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$5=Object.prototype,hasOwnProperty$4=objectProto$5.hasOwnProperty;function hashGet(t){var e=this.__data__;if(nativeCreate$1){var r=e[t];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$4.call(e,t)?e[t]:void 0}var objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function hashHas(t){var e=this.__data__;return nativeCreate$1?e[t]!==void 0:hasOwnProperty$3.call(e,t)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nativeCreate$1&&e===void 0?HASH_UNDEFINED:e,this}function Hash(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}function listCacheSet(t,e){var r=this.__data__,o=assocIndexOf(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}function ListCache(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position2||token(character)>3?"":" "}function escaping(t,e){for(;--e&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(t,caret()+(e<6&&peek()==32&&next()==32))}function delimiter(t){for(;next();)switch(character){case t:return position;case 34:case 39:t!==34&&t!==39&&delimiter(character);break;case 40:t===41&&delimiter(t);break;case 92:next();break}return position}function commenter(t,e){for(;next()&&t+character!==47+10;)if(t+character===42+42&&peek()===47)break;return"/*"+slice(e,position-1)+"*"+from(t===47?t:next())}function identifier(t){for(;!token(peek());)next();return slice(t,position)}function compile(t){return dealloc(parse$3("",null,null,null,[""],t=alloc(t),0,[0],t))}function parse$3(t,e,r,o,n,a,s,l,h){for(var c=0,d=0,g=s,f=0,u=0,m=0,w=1,E=1,b=1,y=0,T="",C=n,I=a,z=o,v=T;E;)switch(m=y,y=next()){case 40:if(m!=108&&charat(v,g-1)==58){indexof(v+=replace(delimit(y),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:v+=delimit(y);break;case 9:case 10:case 13:case 32:v+=whitespace(m);break;case 92:v+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),e,r),h);break;default:v+="/"}break;case 123*w:l[c++]=strlen(v)*b;case 125*w:case 59:case 0:switch(y){case 0:case 125:E=0;case 59+d:b==-1&&(v=replace(v,/\f/g,"")),u>0&&strlen(v)-g&&append(u>32?declaration(v+";",o,r,g-1):declaration(replace(v," ","")+";",o,r,g-2),h);break;case 59:v+=";";default:if(append(z=ruleset(v,e,r,c,d,n,l,T,C=[],I=[],g),a),y===123)if(d===0)parse$3(v,e,z,z,C,a,g,l,I);else switch(f===99&&charat(v,3)===110?100:f){case 100:case 108:case 109:case 115:parse$3(t,z,z,o&&append(ruleset(t,z,z,0,0,n,l,T,n,C=[],g),I),n,I,g,l,o?C:I);break;default:parse$3(v,z,z,z,[""],I,0,l,I)}}c=d=u=0,w=b=1,T=v="",g=s;break;case 58:g=1+strlen(v),u=m;default:if(w<1){if(y==123)--w;else if(y==125&&w++==0&&prev()==125)continue}switch(v+=from(y),y*w){case 38:b=d>0?1:(v+="\f",-1);break;case 44:l[c++]=(strlen(v)-1)*b,b=1;break;case 64:peek()===45&&(v+=delimit(next())),f=peek(),d=g=strlen(T=v+=identifier(caret())),y++;break;case 45:m===45&&strlen(v)==2&&(w=0)}}return a}function ruleset(t,e,r,o,n,a,s,l,h,c,d){for(var g=n-1,f=n===0?a:[""],u=sizeof(f),m=0,w=0,E=0;m0?f[b]+" "+y:replace(y,/&\f/g,f[b])))&&(h[E++]=T);return node(t,e,r,n===0?RULESET:l,h,c,d)}function comment(t,e,r){return node(t,e,r,COMMENT,from(char()),substr(t,2,-2),0)}function declaration(t,e,r,o){return node(t,e,r,DECLARATION,substr(t,0,o),substr(t,o+1,-1),o)}function serialize(t,e){for(var r="",o=sizeof(t),n=0;n-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function stubFalse(){return!1}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,Buffer$1=moduleExports$1?root$1.Buffer:void 0,nativeIsBuffer=Buffer$1?Buffer$1.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse;const isBuffer$1=isBuffer;var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[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]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag$1]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;function baseIsTypedArray(t){return isObjectLike(t)&&isLength(t.length)&&!!typedArrayTags[baseGetTag(t)]}function baseUnary(t){return function(e){return t(e)}}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal$1.process,nodeUtil=function(){try{var t=freeModule&&freeModule.require&&freeModule.require("util").types;return t||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}();const nodeUtil$1=nodeUtil;var nodeIsTypedArray=nodeUtil$1&&nodeUtil$1.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;const isTypedArray$1=isTypedArray;var mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(t){if(t==null)return!0;if(isArrayLike(t)&&(isArray$1(t)||typeof t=="string"||typeof t.splice=="function"||isBuffer$1(t)||isTypedArray$1(t)||isArguments$1(t)))return!t.length;var e=getTag$1(t);if(e==mapTag||e==setTag)return!t.size;if(isPrototype(t))return!baseKeys(t).length;for(var r in t)if(hasOwnProperty.call(t,r))return!1;return!0}const LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},log$1={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},setLogLevel$1=function(t="fatal"){let e=LEVELS.fatal;typeof t=="string"?(t=t.toLowerCase(),t in LEVELS&&(e=LEVELS[t])):typeof t=="number"&&(e=t),log$1.trace=()=>{},log$1.debug=()=>{},log$1.info=()=>{},log$1.warn=()=>{},log$1.error=()=>{},log$1.fatal=()=>{},e<=LEVELS.fatal&&(log$1.fatal=console.error?console.error.bind(console,format("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",format("FATAL"))),e<=LEVELS.error&&(log$1.error=console.error?console.error.bind(console,format("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",format("ERROR"))),e<=LEVELS.warn&&(log$1.warn=console.warn?console.warn.bind(console,format("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",format("WARN"))),e<=LEVELS.info&&(log$1.info=console.info?console.info.bind(console,format("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",format("INFO"))),e<=LEVELS.debug&&(log$1.debug=console.debug?console.debug.bind(console,format("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("DEBUG"))),e<=LEVELS.trace&&(log$1.trace=console.debug?console.debug.bind(console,format("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("TRACE")))},format=t=>`%c${dayjs().format("ss.SSS")} : ${t} : `,lineBreakRegex=//gi,getRows=t=>t?breakToPlaceholder(t).replace(/\\n/g,"#br#").split("#br#"):[""],removeScript=t=>purify.sanitize(t),sanitizeMore=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const o=e.securityLevel;o==="antiscript"||o==="strict"?t=removeScript(t):o!=="loose"&&(t=breakToPlaceholder(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=placeholderToBreak(t))}return t},sanitizeText$2=(t,e)=>t&&(e.dompurifyConfig?t=purify.sanitize(sanitizeMore(t,e),e.dompurifyConfig).toString():t=purify.sanitize(sanitizeMore(t,e),{FORBID_TAGS:["style"]}).toString(),t),sanitizeTextOrArray=(t,e)=>typeof t=="string"?sanitizeText$2(t,e):t.flat().map(r=>sanitizeText$2(r,e)),hasBreaks=t=>lineBreakRegex.test(t),splitBreaks=t=>t.split(lineBreakRegex),placeholderToBreak=t=>t.replace(/#br#/g,"
"),breakToPlaceholder=t=>t.replace(lineBreakRegex,"#br#"),getUrl=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),getMax=function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},getMin=function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},parseGenericTypes=function(t){let e=t;if(t.split("~").length-1>=2){let r=e;do e=r,r=e.replace(/~([^\s,:;]+)~/,"<$1>");while(r!=e);return parseGenericTypes(r)}else return e},common$1={getRows,sanitizeText:sanitizeText$2,sanitizeTextOrArray,hasBreaks,splitBreaks,lineBreakRegex,removeScript,getUrl,evaluate,getMax,getMin},mkBorder=(t,e)=>e?adjust$1(t,{s:-40,l:10}):adjust$1(t,{s:-40,l:-10}),oldAttributeBackgroundColorOdd="#ffffff",oldAttributeBackgroundColorEven="#f2f2f2";let Theme$4=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust$1(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust$1(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert$1(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert$1(this.tertiaryColor),this.lineColor=this.lineColor||invert$1(this.background),this.arrowheadColor=this.arrowheadColor||invert$1(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$1(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||darken$1(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert$1(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||lighten$1(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$1(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$1(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$1(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$1(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$1(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$1(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust$1(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$1(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$1(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}};const getThemeVariables$4=t=>{const e=new Theme$4;return e.calculate(t),e};let Theme$3=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten$1(this.primaryColor,16),this.tertiaryColor=adjust$1(this.primaryColor,{h:-160}),this.primaryBorderColor=invert$1(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten$1(invert$1("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=rgba$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$1("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=darken$1(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(){this.secondBkg=lighten$1(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=lighten$1(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=lighten$1(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust$1(this.primaryColor,{h:64}),this.fillType3=adjust$1(this.secondaryColor,{h:64}),this.fillType4=adjust$1(this.primaryColor,{h:-64}),this.fillType5=adjust$1(this.secondaryColor,{h:-64}),this.fillType6=adjust$1(this.primaryColor,{h:128}),this.fillType7=adjust$1(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$1(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$1(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$1(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$1(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$1(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$1(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$1(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$1(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$1(this.primaryColor,{h:330});for(let e=0;e{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}};const getThemeVariables$3=t=>{const e=new Theme$3;return e.calculate(t),e};let Theme$2=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=adjust$1(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=adjust$1(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=rgba$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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$1(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$1(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$1(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$1(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$1(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$1(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$1(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$1(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$1(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken$1(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken$1(this.tertiaryColor,40);for(let e=0;e{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}};const getThemeVariables$2=t=>{const e=new Theme$2;return e.calculate(t),e};let Theme$1=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$1("#cde498",10),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.primaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=darken$1(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$1(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$1(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$1(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$1(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$1(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$1(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$1(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$1(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$1(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken$1(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken$1(this.tertiaryColor,40);for(let e=0;e{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}};const getThemeVariables$1=t=>{const e=new Theme$1;return e.calculate(t),e};class Theme5{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=lighten$1(this.contrast,55),this.background="#ffffff",this.tertiaryColor=adjust$1(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=lighten$1(this.contrast,55),this.border2=this.contrast,this.actorBorder=lighten$1(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.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 e=0;e{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}}const getThemeVariables=t=>{const e=new Theme5;return e.calculate(t),e},theme={base:{getThemeVariables:getThemeVariables$4},dark:{getThemeVariables:getThemeVariables$3},default:{getThemeVariables:getThemeVariables$2},forest:{getThemeVariables:getThemeVariables$1},neutral:{getThemeVariables}},defaultConfigJson={flowchart:{useMaxWidth:!0,titleTopMargin:25,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},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,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"},theme:"default",maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,fontSize:16},config={...defaultConfigJson,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:theme.default.getThemeVariables(),sequence:{...defaultConfigJson.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...defaultConfigJson.gantt,tickInterval:void 0,useWidth:void 0},c4:{...defaultConfigJson.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...defaultConfigJson.pie,useWidth:void 0},requirement:{...defaultConfigJson.requirement,useWidth:void 0},gitGraph:{...defaultConfigJson.gitGraph,useMaxWidth:!1},sankey:{...defaultConfigJson.sankey,useMaxWidth:!1}},keyify=(t,e="")=>Object.keys(t).reduce((r,o)=>Array.isArray(t[o])?r:typeof t[o]=="object"&&t[o]!==null?[...r,e+o,...keyify(t[o],"")]:[...r,e+o],[]),configKeys=keyify(config,""),defaultConfig$1=config;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(t){return typeof t>"u"||t===null}function isObject(t){return typeof t=="object"&&t!==null}function toArray(t){return Array.isArray(t)?t:isNothing(t)?[]:[t]}function extend(t,e){var r,o,n,a;if(e)for(a=Object.keys(e),r=0,o=a.length;rl&&(a=" ... ",e=o-l+a.length),r-o>l&&(s=" ...",r=o+l-s.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:o-e+a.length}}function padStart(t,e){return common.repeat(" ",e-t.length)+t}function makeSnippet(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,o=[0],n=[],a,s=-1;a=r.exec(t.buffer);)n.push(a.index),o.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var l="",h,c,d=Math.min(t.line+e.linesAfter,n.length).toString().length,g=e.maxLength-(e.indent+d+3);for(h=1;h<=e.linesBefore&&!(s-h<0);h++)c=getLine(t.buffer,o[s-h],n[s-h],t.position-(o[s]-o[s-h]),g),l=common.repeat(" ",e.indent)+padStart((t.line-h+1).toString(),d)+" | "+c.str+` `+l;for(c=getLine(t.buffer,o[s],n[s],t.position,g),l+=common.repeat(" ",e.indent)+padStart((t.line+1).toString(),d)+" | "+c.str+` `,l+=common.repeat("-",e.indent+d+3+c.pos)+`^ `,h=1;h<=e.linesAfter&&!(s+h>=n.length);h++)c=getLine(t.buffer,o[s+h],n[s+h],t.position-(o[s]-o[s+h]),g),l+=common.repeat(" ",e.indent)+padStart((t.line+h+1).toString(),d)+" | "+c.str+` `;return l.replace(/\n$/,"")}var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function Type$1(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(r)===-1)throw new exception('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=compileStyleAliases(e.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var type=Type$1;function compileList(t,e){var r=[];return t[e].forEach(function(o){var n=r.length;r.forEach(function(a,s){a.tag===o.tag&&a.kind===o.kind&&a.multi===o.multi&&(n=s)}),r[n]=o}),r}function compileMap(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function o(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},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(t){return!(t===null||!YAML_FLOAT_PATTERN.test(t)||t[t.length-1]==="_")}function constructYamlFloat(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(t))return"-0.0";return r=t.toString(10),SCIENTIFIC_WITHOUT_DOT.test(r)?r.replace("e",".e"):r}function isFloat(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||common.isNegativeZero(t))}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(t){return t===null?!1:YAML_DATE_REGEXP.exec(t)!==null||YAML_TIMESTAMP_REGEXP.exec(t)!==null}function constructYamlTimestamp(t){var e,r,o,n,a,s,l,h=0,c=null,d,g,f;if(e=YAML_DATE_REGEXP.exec(t),e===null&&(e=YAML_TIMESTAMP_REGEXP.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],o=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,o,n));if(a=+e[4],s=+e[5],l=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(d=+e[10],g=+(e[11]||0),c=(d*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,o,n,a,s,l,h)),c&&f.setTime(f.getTime()-c),f}function representYamlTimestamp(t){return t.toISOString()}var timestamp=new type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(t){return t==="<<"||t===null}var merge=new type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge}),BASE64_MAP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function resolveYamlBinary(t){if(t===null)return!1;var e,r,o=0,n=t.length,a=BASE64_MAP;for(r=0;r64)){if(e<0)return!1;o+=6}return o%8===0}function constructYamlBinary(t){var e,r,o=t.replace(/[\r\n=]/g,""),n=o.length,a=BASE64_MAP,s=0,l=[];for(e=0;e>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|a.indexOf(o.charAt(e));return r=n%4*6,r===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):r===18?(l.push(s>>10&255),l.push(s>>2&255)):r===12&&l.push(s>>4&255),new Uint8Array(l)}function representYamlBinary(t){var e="",r=0,o,n,a=t.length,s=BASE64_MAP;for(o=0;o>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[o];return n=a%3,n===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):n===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):n===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}function isBinary(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}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(t){if(t===null)return!0;var e=[],r,o,n,a,s,l=t;for(r=0,o=l.length;r>10)+55296,(t-65536&1023)+56320)}var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(var i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);function State$1(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||_default,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=snippet(r),new exception(e,r)}function throwError(t,e){throw generateError(t,e)}function throwWarning(t,e){t.onWarning&&t.onWarning.call(null,generateError(t,e))}var directiveHandlers={YAML:function t(e,r,o){var n,a,s;e.version!==null&&throwError(e,"duplication of %YAML directive"),o.length!==1&&throwError(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),n===null&&throwError(e,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&throwError(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&throwWarning(e,"unsupported YAML version of the document")},TAG:function t(e,r,o){var n,a;o.length!==2&&throwError(e,"TAG directive accepts exactly two arguments"),n=o[0],a=o[1],PATTERN_TAG_HANDLE.test(n)||throwError(e,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty$1.call(e.tagMap,n)&&throwError(e,'there is a previously declared suffix for "'+n+'" tag handle'),PATTERN_TAG_URI.test(a)||throwError(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{throwError(e,"tag prefix is malformed: "+a)}e.tagMap[n]=a}};function captureSegment(t,e,r,o){var n,a,s,l;if(e1&&(t.result+=common.repeat(` `,e-1))}function readPlainScalar(t,e,r){var o,n,a,s,l,h,c,d,g=t.kind,f=t.result,u;if(u=t.input.charCodeAt(t.position),is_WS_OR_EOL(u)||is_FLOW_INDICATOR(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(n=t.input.charCodeAt(t.position+1),is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,l=!1;u!==0;){if(u===58){if(n=t.input.charCodeAt(t.position+1),is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n))break}else if(u===35){if(o=t.input.charCodeAt(t.position-1),is_WS_OR_EOL(o))break}else{if(t.position===t.lineStart&&testDocumentSeparator(t)||r&&is_FLOW_INDICATOR(u))break;if(is_EOL(u))if(h=t.line,c=t.lineStart,d=t.lineIndent,skipSeparationSpace(t,!1,-1),t.lineIndent>=e){l=!0,u=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=h,t.lineStart=c,t.lineIndent=d;break}}l&&(captureSegment(t,a,s,!1),writeFoldedLines(t,t.line-h),a=s=t.position,l=!1),is_WHITE_SPACE(u)||(s=t.position+1),u=t.input.charCodeAt(++t.position)}return captureSegment(t,a,s,!1),t.result?!0:(t.kind=g,t.result=f,!1)}function readSingleQuotedScalar(t,e){var r,o,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(captureSegment(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,n=t.position;else return!0;else is_EOL(r)?(captureSegment(t,o,n,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,e)),o=n=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);throwError(t,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(t,e){var r,o,n,a,s,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return captureSegment(t,r,t.position,!0),t.position++,!0;if(l===92){if(captureSegment(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),is_EOL(l))skipSeparationSpace(t,!1,e);else if(l<256&&simpleEscapeCheck[l])t.result+=simpleEscapeMap[l],t.position++;else if((s=escapedHexLen(l))>0){for(n=s,a=0;n>0;n--)l=t.input.charCodeAt(++t.position),(s=fromHexCode(l))>=0?a=(a<<4)+s:throwError(t,"expected hexadecimal character");t.result+=charFromCodepoint(a),t.position++}else throwError(t,"unknown escape sequence");r=o=t.position}else is_EOL(l)?(captureSegment(t,r,o,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,e)),r=o=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}throwError(t,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(t,e){var r=!0,o,n,a,s=t.tag,l,h=t.anchor,c,d,g,f,u,m=Object.create(null),w,E,b,y;if(y=t.input.charCodeAt(t.position),y===91)d=93,u=!1,l=[];else if(y===123)d=125,u=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),y=t.input.charCodeAt(++t.position);y!==0;){if(skipSeparationSpace(t,!0,e),y=t.input.charCodeAt(t.position),y===d)return t.position++,t.tag=s,t.anchor=h,t.kind=u?"mapping":"sequence",t.result=l,!0;r?y===44&&throwError(t,"expected the node content, but found ','"):throwError(t,"missed comma between flow collection entries"),E=w=b=null,g=f=!1,y===63&&(c=t.input.charCodeAt(t.position+1),is_WS_OR_EOL(c)&&(g=f=!0,t.position++,skipSeparationSpace(t,!0,e))),o=t.line,n=t.lineStart,a=t.position,composeNode(t,e,CONTEXT_FLOW_IN,!1,!0),E=t.tag,w=t.result,skipSeparationSpace(t,!0,e),y=t.input.charCodeAt(t.position),(f||t.line===o)&&y===58&&(g=!0,y=t.input.charCodeAt(++t.position),skipSeparationSpace(t,!0,e),composeNode(t,e,CONTEXT_FLOW_IN,!1,!0),b=t.result),u?storeMappingPair(t,l,m,E,w,b,o,n,a):g?l.push(storeMappingPair(t,null,m,E,w,b,o,n,a)):l.push(w),skipSeparationSpace(t,!0,e),y=t.input.charCodeAt(t.position),y===44?(r=!0,y=t.input.charCodeAt(++t.position)):r=!1}throwError(t,"unexpected end of the stream within a flow collection")}function readBlockScalar(t,e){var r,o,n=CHOMPING_CLIP,a=!1,s=!1,l=e,h=0,c=!1,d,g;if(g=t.input.charCodeAt(t.position),g===124)o=!1;else if(g===62)o=!0;else return!1;for(t.kind="scalar",t.result="";g!==0;)if(g=t.input.charCodeAt(++t.position),g===43||g===45)CHOMPING_CLIP===n?n=g===43?CHOMPING_KEEP:CHOMPING_STRIP:throwError(t,"repeat of a chomping mode identifier");else if((d=fromDecimalCode(g))>=0)d===0?throwError(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?throwError(t,"repeat of an indentation width identifier"):(l=e+d-1,s=!0);else break;if(is_WHITE_SPACE(g)){do g=t.input.charCodeAt(++t.position);while(is_WHITE_SPACE(g));if(g===35)do g=t.input.charCodeAt(++t.position);while(!is_EOL(g)&&g!==0)}for(;g!==0;){for(readLineBreak(t),t.lineIndent=0,g=t.input.charCodeAt(t.position);(!s||t.lineIndentl&&(l=t.lineIndent),is_EOL(g)){h++;continue}if(t.lineIndente)&&h!==0)throwError(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(E&&(s=t.line,l=t.lineStart,h=t.position),composeNode(t,e,CONTEXT_BLOCK_OUT,!0,n)&&(E?m=t.result:w=t.result),E||(storeMappingPair(t,g,f,u,m,w,s,l,h),u=m=w=null),skipSeparationSpace(t,!0,-1),y=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&y!==0)throwError(t,"bad indentation of a mapping entry");else if(t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),g=0,f=t.implicitTypes.length;g"),t.result!==null&&m.kind!==t.kind&&throwError(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):throwError(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}function readDocument(t){var e=t.position,r,o,n,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(skipSeparationSpace(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!is_WS_OR_EOL(s);)s=t.input.charCodeAt(++t.position);for(o=t.input.slice(r,t.position),n=[],o.length<1&&throwError(t,"directive name must not be less than one character in length");s!==0;){for(;is_WHITE_SPACE(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!is_EOL(s));break}if(is_EOL(s))break;for(r=t.position;s!==0&&!is_WS_OR_EOL(s);)s=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}s!==0&&readLineBreak(t),_hasOwnProperty$1.call(directiveHandlers,o)?directiveHandlers[o](t,o,n):throwWarning(t,'unknown document directive "'+o+'"')}if(skipSeparationSpace(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,skipSeparationSpace(t,!0,-1)):a&&throwError(t,"directives end mark is expected"),composeNode(t,t.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(t,!0,-1),t.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(t.input.slice(e,t.position))&&throwWarning(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&testDocumentSeparator(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,skipSeparationSpace(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var o=loadDocuments(t,r);if(typeof e!="function")return o;for(var n=0,a=o.length;nassignWithDepth(t,a,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||o<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=assignWithDepth(t[a],e[a],{depth:o-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},assignWithDepth$1=assignWithDepth,defaultConfig=Object.freeze(defaultConfig$1);let siteConfig=assignWithDepth$1({},defaultConfig),configFromInitialize,directives=[],currentConfig=assignWithDepth$1({},defaultConfig);const updateCurrentConfig=(t,e)=>{let r=assignWithDepth$1({},t),o={};for(const n of e)sanitize(n),o=assignWithDepth$1(o,n);if(r=assignWithDepth$1(r,o),o.theme&&o.theme in theme){const n=assignWithDepth$1({},configFromInitialize),a=assignWithDepth$1(n.themeVariables||{},o.themeVariables);r.theme&&r.theme in theme&&(r.themeVariables=theme[r.theme].getThemeVariables(a))}return currentConfig=r,checkConfig(currentConfig),currentConfig},setSiteConfig=t=>(siteConfig=assignWithDepth$1({},defaultConfig),siteConfig=assignWithDepth$1(siteConfig,t),t.theme&&theme[t.theme]&&(siteConfig.themeVariables=theme[t.theme].getThemeVariables(t.themeVariables)),updateCurrentConfig(siteConfig,directives),siteConfig),saveConfigFromInitialize=t=>{configFromInitialize=assignWithDepth$1({},t)},updateSiteConfig=t=>(siteConfig=assignWithDepth$1(siteConfig,t),updateCurrentConfig(siteConfig,directives),siteConfig),getSiteConfig=()=>assignWithDepth$1({},siteConfig),setConfig=t=>(checkConfig(t),assignWithDepth$1(currentConfig,t),getConfig$1()),getConfig$1=()=>assignWithDepth$1({},currentConfig),sanitize=t=>{["secure",...siteConfig.secure??[]].forEach(e=>{t[e]!==void 0&&(log$1.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.indexOf("__")===0&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&sanitize(t[e])})},addDirective=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),directives.push(t),updateCurrentConfig(siteConfig,directives)},reset=(t=siteConfig)=>{directives=[],updateCurrentConfig(t,directives)},ConfigWarning={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},issuedWarnings={},issueWarning=t=>{issuedWarnings[t]||(log$1.warn(ConfigWarning[t]),issuedWarnings[t]=!0)},checkConfig=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&issueWarning("LAZY_LOAD_DEPRECATED")},d3Attrs=function(t,e){for(let r of e)t.attr(r[0],r[1])},calculateSvgSizeAttrs=function(t,e,r){let o=new Map;return r?(o.set("width","100%"),o.set("style",`max-width: ${e}px;`)):(o.set("height",t),o.set("width",e)),o},configureSvgSize=function(t,e,r,o){const n=calculateSvgSizeAttrs(e,r,o);d3Attrs(t,n)},setupGraphViewbox$1=function(t,e,r,o){const n=e.node().getBBox(),a=n.width,s=n.height;log$1.info(`SVG bounds: ${a}x${s}`,n);let l=0,h=0;log$1.info(`Graph bounds: ${l}x${h}`,t),l=a+r*2,h=s+r*2,log$1.info(`Calculated bounds: ${l}x${h}`),configureSvgSize(e,h,l,o);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},themes={},getStyles$1=(t,e,r)=>{let o="";return t in themes&&themes[t]?o=themes[t](r):log$1.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: 2px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } ${o} ${e} `},addStylesForDiagram=(t,e)=>{e!==void 0&&(themes[t]=e)},getStyles$2=getStyles$1;let title="",diagramTitle="",description="";const sanitizeText$1=t=>sanitizeText$2(t,getConfig$1()),clear=function(){title="",description="",diagramTitle=""},setAccTitle=function(t){title=sanitizeText$1(t).replace(/^\s+/g,"")},getAccTitle=function(){return title||diagramTitle},setAccDescription=function(t){description=sanitizeText$1(t).replace(/\n\s+/g,` `)},getAccDescription=function(){return description},setDiagramTitle=function(t){diagramTitle=sanitizeText$1(t)},getDiagramTitle=function(){return diagramTitle},commonDb={getAccTitle,setAccTitle,getDiagramTitle,setDiagramTitle,getAccDescription,setAccDescription,clear},commonDb$1=Object.freeze(Object.defineProperty({__proto__:null,clear,default:commonDb,getAccDescription,getAccTitle,getDiagramTitle,setAccDescription,setAccTitle,setDiagramTitle},Symbol.toStringTag,{value:"Module"}));let currentDirective={};const parseDirective$1=function(t,e,r,o){log$1.debug("parseDirective is being called",e,r,o);try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":currentDirective={};break;case"type_directive":if(!currentDirective)throw new Error("currentDirective is undefined");currentDirective.type=e.toLowerCase();break;case"arg_directive":if(!currentDirective)throw new Error("currentDirective is undefined");currentDirective.args=JSON.parse(e);break;case"close_directive":handleDirective(t,currentDirective,o),currentDirective=void 0;break}}catch(n){log$1.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),log$1.error(n.message)}},handleDirective=function(t,e,r){switch(log$1.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(o=>{e.args[o]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[o],delete e.args[o])}),log$1.info("sanitize in handleDirective",e.args),directiveSanitizer(e.args),log$1.info("sanitize in handleDirective (done)",e.args),addDirective(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":log$1.warn("themeCss encountered");break;default:log$1.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},log=log$1,setLogLevel=setLogLevel$1,getConfig=getConfig$1,sanitizeText=t=>sanitizeText$2(t,getConfig()),setupGraphViewbox=setupGraphViewbox$1,getCommonDb=()=>commonDb$1,parseDirective=(t,e,r,o)=>parseDirective$1(t,e,r,o),diagrams={},registerDiagram=(t,e,r)=>{if(diagrams[t])throw new Error(`Diagram ${t} already registered.`);diagrams[t]=e,r&&addDetector(t,r),addStylesForDiagram(t,e.styles),e.injectUtils&&e.injectUtils(log,setLogLevel,getConfig,sanitizeText,setupGraphViewbox,getCommonDb(),parseDirective)},getDiagram=t=>{if(t in diagrams)return diagrams[t];throw new Error(`Diagram ${t} not found.`)};class UnknownDiagramError extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}}const directive$1=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,anyComment=/\s*%%.*\n/gm,detectors={},detectType=function(t,e){t=t.replace(frontMatterRegex,"").replace(directive$1,"").replace(anyComment,` `);for(const[r,{detector:o}]of Object.entries(detectors))if(o(t,e))return r;throw new UnknownDiagramError(`No diagram type detected matching given configuration for text: ${t}`)},registerLazyLoadedDiagrams=(...t)=>{for(const{id:e,detector:r,loader:o}of t)addDetector(e,r,o)},loadRegisteredDiagrams=async()=>{log$1.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(detectors).map(async([r,{detector:o,loader:n}])=>{if(n)try{getDiagram(r)}catch{try{const{diagram:s,id:l}=await n();registerDiagram(l,s,o)}catch(s){throw log$1.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete detectors[r],s}}}))).filter(r=>r.status==="rejected");if(e.length>0){log$1.error(`Failed to load ${e.length} external diagrams`);for(const r of e)log$1.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},addDetector=(t,e,r)=>{detectors[t]?log$1.error(`Detector with key ${t} already exists`):detectors[t]={detector:e,loader:r},log$1.debug(`Detector with key ${t} added${r?" with loader":""}`)},getDiagramLoader=t=>detectors[t].loader,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},directive=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,directiveWithoutOpen=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,detectInit=function(t,e){const r=detectDirective(t,/(?:init\b)|(?:initialize\b)/);let o={};if(Array.isArray(r)){const n=r.map(a=>a.args);directiveSanitizer(n),o=assignWithDepth$1(o,[...n])}else o=r.args;if(o){let n=detectType(t,e);["config"].forEach(a=>{o[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),o[n]=o[a],delete o[a])})}return o},detectDirective=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),log$1.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let o;const n=[];for(;(o=directive.exec(t))!==null;)if(o.index===directive.lastIndex&&directive.lastIndex++,o&&!e||e&&o[1]&&o[1].match(e)||e&&o[2]&&o[2].match(e)){const a=o[1]?o[1]:o[2],s=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;n.push({type:a,args:s})}return n.length===0&&n.push({type:t,args:null}),n.length===1?n[0]:n}catch(r){return log$1.error(`ERROR: ${r.message} - Unable to parse directive ${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},isSubstringInArray=function(t,e){for(const[r,o]of e.entries())if(o.match(t))return r;return-1};function interpolateToCurve(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return d3CurveTypes[r]||e}function formatUrl(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?sanitizeUrl_1(r):r}const runFunc=(t,...e)=>{const r=t.split("."),o=r.length-1,n=r[o];let a=window;for(let s=0;s{r+=distance(a,e),e=a});let o=r/2,n;return e=void 0,t.forEach(a=>{if(e&&!n){const s=distance(a,e);if(s=1&&(n={x:a.x,y:a.y}),l>0&&l<1&&(n={x:(1-l)*e.x+l*a.x,y:(1-l)*e.y+l*a.y})}}e=a}),n}function calcLabelPosition(t){return t.length===1?t[0]:traverseEdge(t)}const calcCardinalityPosition=(t,e,r)=>{let o;log$1.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let a=25,s;o=void 0,e.forEach(d=>{if(o&&!s){const g=distance(d,o);if(g=1&&(s={x:d.x,y:d.y}),f>0&&f<1&&(s={x:(1-f)*o.x+f*d.x,y:(1-f)*o.y+f*d.y})}}o=d});const l=t?10:5,h=Math.atan2(e[0].y-s.y,e[0].x-s.x),c={x:0,y:0};return c.x=Math.sin(h)*l+(e[0].x+s.x)/2,c.y=-Math.cos(h)*l+(e[0].y+s.y)/2,c};function calcTerminalLabelPosition(t,e,r){let o=JSON.parse(JSON.stringify(r)),n;log$1.info("our points",o),e!=="start_left"&&e!=="start_right"&&(o=o.reverse()),o.forEach(g=>{n=g});let s=25+t,l;n=void 0,o.forEach(g=>{if(n&&!l){const f=distance(g,n);if(f=1&&(l={x:g.x,y:g.y}),u>0&&u<1&&(l={x:(1-u)*n.x+u*g.x,y:(1-u)*n.y+u*g.y})}}n=g});const h=10+t*.5,c=Math.atan2(o[0].y-l.y,o[0].x-l.x),d={x:0,y:0};return d.x=Math.sin(c)*h+(o[0].x+l.x)/2,d.y=-Math.cos(c)*h+(o[0].y+l.y)/2,e==="start_left"&&(d.x=Math.sin(c+Math.PI)*h+(o[0].x+l.x)/2,d.y=-Math.cos(c+Math.PI)*h+(o[0].y+l.y)/2),e==="end_right"&&(d.x=Math.sin(c-Math.PI)*h+(o[0].x+l.x)/2-5,d.y=-Math.cos(c-Math.PI)*h+(o[0].y+l.y)/2-5),e==="end_left"&&(d.x=Math.sin(c)*h+(o[0].x+l.x)/2-5,d.y=-Math.cos(c)*h+(o[0].y+l.y)/2-5),d}function getStylesFromArray(t){let e="",r="";for(const o of t)o!==void 0&&(o.startsWith("color:")||o.startsWith("text-align:")?r=r+o+";":e=e+o+";");return{style:e,labelStyle:r}}let cnt=0;const generateId=()=>(cnt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt);function makeid(t){let e="";const r="0123456789abcdef",o=r.length;for(let n=0;nmakeid(t.length),getTextObj=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},drawSimpleText=function(t,e){const r=e.text.replace(common$1.lineBreakRegex," "),[,o]=parseFontSize(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",o),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),n},wrapLabel=memoize((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),common$1.lineBreakRegex.test(t)))return t;const o=t.split(" "),n=[];let a="";return o.forEach((s,l)=>{const h=calculateTextWidth(`${s} `,r),c=calculateTextWidth(a,r);if(h>e){const{hyphenatedStrings:f,remainingWord:u}=breakString(s,e,"-",r);n.push(a,...f),a=u}else c+h>=e?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");l+1===o.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),breakString=memoize((t,e,r="-",o)=>{o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},o);const n=[...t],a=[];let s="";return n.forEach((l,h)=>{const c=`${s}${l}`;if(calculateTextWidth(c,o)>=e){const g=h+1,f=n.length===g,u=`${c}${r}`;a.push(f?c:u),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",o)=>`${t}${e}${r}${o.fontSize}${o.fontWeight}${o.fontFamily}`);function calculateTextHeight(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),calculateTextDimensions(t,e).height}function calculateTextWidth(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),calculateTextDimensions(t,e).width}const calculateTextDimensions=memoize((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:o,fontWeight:n}=e;if(!t)return{width:0,height:0};const[,a]=parseFontSize(r),s=["sans-serif",o],l=t.split(common$1.lineBreakRegex),h=[],c=select("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const d=c.append("svg");for(const f of s){let u=0;const m={width:0,height:0,lineHeight:0};for(const w of l){const E=getTextObj();E.text=w||ZERO_WIDTH_SPACE;const b=drawSimpleText(d,E).style("font-size",a).style("font-weight",n).style("font-family",f),y=(b._groups||b)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,y.width)),u=Math.round(y.height),m.height+=u,m.lineHeight=Math.round(Math.max(m.lineHeight,u))}h.push(m)}d.remove();const g=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[g]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),initIdGenerator=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let decoder;const entityDecode=function(t){return decoder=decoder||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),decoder.innerHTML=t,unescape(decoder.textContent)},directiveSanitizer=t=>{if(log$1.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>directiveSanitizer(e)):Object.keys(t).forEach(e=>{log$1.debug("Checking key",e),e.startsWith("__")&&(log$1.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(log$1.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(log$1.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(log$1.debug("sanitizing themeCss option"),t[e]=sanitizeCss(t[e])),e.includes("fontFamily")&&(log$1.debug("sanitizing fontFamily option"),t[e]=sanitizeCss(t[e])),e.includes("altFontFamily")&&(log$1.debug("sanitizing altFontFamily option"),t[e]=sanitizeCss(t[e])),configKeys.includes(e)?typeof t[e]=="object"&&(log$1.debug("sanitize deleting object",e),directiveSanitizer(t[e])):(log$1.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const r of e){const o=t.themeVariables[r];o&&o.match&&!o.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}log$1.debug("After sanitization",t)},sanitizeCss=t=>{let e=0,r=0;for(const o of t){if(e{if(!o)return;const n=t.node().getBBox();t.append("text").text(o).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},parseFontSize=t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},utils={assignWithDepth:assignWithDepth$1,wrapLabel,calculateTextHeight,calculateTextWidth,calculateTextDimensions,detectInit,detectDirective,isSubstringInArray,interpolateToCurve,calcLabelPosition,calcCardinalityPosition,calcTerminalLabelPosition,formatUrl,getStylesFromArray,generateId,random,runFunc,entityDecode,initIdGenerator,directiveSanitizer,sanitizeCss,insertTitle,parseFontSize},version="10.3.0",id$j="c4",detector$j=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),loader$j=async()=>{const{diagram:t}=await __vitePreload(()=>import("./c4Diagram-36d27044.91c8e071.js"),["_app/immutable/chunks/c4Diagram-36d27044.91c8e071.js","_app/immutable/chunks/svgDrawCommon-f26cad39.4d5cb890.js"]);return{id:id$j,diagram:t}},plugin$i={id:id$j,detector:detector$j,loader:loader$j},c4=plugin$i,id$i="flowchart",detector$i=(t,e)=>{var r,o;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((o=e==null?void 0:e.flowchart)==null?void 0:o.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},loader$i=async()=>{const{diagram:t}=await __vitePreload(()=>import("./flowDiagram-698c8d5d.731636ea.js"),["_app/immutable/chunks/flowDiagram-698c8d5d.731636ea.js","_app/immutable/chunks/flowDb-8f9fc471.1d31edc8.js","_app/immutable/chunks/layout.0895040f.js","_app/immutable/chunks/styles-ff678862.35d0c4a9.js","_app/immutable/chunks/index-4c4adb72.23813916.js","_app/immutable/chunks/edges-b00f0ec2.ed71b263.js","_app/immutable/chunks/createText-285e50b4.4a567590.js","_app/immutable/chunks/svgDraw-5d8a058e.8eda9a74.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$i,diagram:t}},plugin$h={id:id$i,detector:detector$i,loader:loader$i},flowchart=plugin$h,id$h="flowchart-v2",detector$h=(t,e)=>{var r,o,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((o=e==null?void 0:e.flowchart)==null?void 0:o.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},loader$h=async()=>{const{diagram:t}=await __vitePreload(()=>import("./flowDiagram-v2-d6437390.56fd53fb.js"),["_app/immutable/chunks/flowDiagram-v2-d6437390.56fd53fb.js","_app/immutable/chunks/flowDb-8f9fc471.1d31edc8.js","_app/immutable/chunks/styles-ff678862.35d0c4a9.js","_app/immutable/chunks/layout.0895040f.js","_app/immutable/chunks/index-4c4adb72.23813916.js","_app/immutable/chunks/edges-b00f0ec2.ed71b263.js","_app/immutable/chunks/createText-285e50b4.4a567590.js","_app/immutable/chunks/svgDraw-5d8a058e.8eda9a74.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$h,diagram:t}},plugin$g={id:id$h,detector:detector$h,loader:loader$h},flowchartV2=plugin$g,id$g="er",detector$g=t=>/^\s*erDiagram/.test(t),loader$g=async()=>{const{diagram:t}=await __vitePreload(()=>import("./erDiagram-0ccc0425.e9dfa9b4.js"),["_app/immutable/chunks/erDiagram-0ccc0425.e9dfa9b4.js","_app/immutable/chunks/layout.0895040f.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$g,diagram:t}},plugin$f={id:id$g,detector:detector$g,loader:loader$g},er=plugin$f,id$f="gitGraph",detector$f=t=>/^\s*gitGraph/.test(t),loader$f=async()=>{const{diagram:t}=await __vitePreload(()=>import("./gitGraphDiagram-a13ae597.a454aac5.js"),[]);return{id:id$f,diagram:t}},plugin$e={id:id$f,detector:detector$f,loader:loader$f},git=plugin$e,id$e="gantt",detector$e=t=>/^\s*gantt/.test(t),loader$e=async()=>{const{diagram:t}=await __vitePreload(()=>import("./ganttDiagram-60845bff.b6366345.js"),["_app/immutable/chunks/ganttDiagram-60845bff.b6366345.js","_app/immutable/chunks/linear.dfcb232a.js","_app/immutable/chunks/init.77b53fdd.js"]);return{id:id$e,diagram:t}},plugin$d={id:id$e,detector:detector$e,loader:loader$e},gantt=plugin$d,id$d="info",detector$d=t=>/^\s*info/.test(t),loader$d=async()=>{const{diagram:t}=await __vitePreload(()=>import("./infoDiagram-c976a9ed.bfb128bc.js"),[]);return{id:id$d,diagram:t}},info={id:id$d,detector:detector$d,loader:loader$d},id$c="pie",detector$c=t=>/^\s*pie/.test(t),loader$c=async()=>{const{diagram:t}=await __vitePreload(()=>import("./pieDiagram-5efcb91d.da225db9.js"),["_app/immutable/chunks/pieDiagram-5efcb91d.da225db9.js","_app/immutable/chunks/ordinal.b935e931.js","_app/immutable/chunks/init.77b53fdd.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js","_app/immutable/chunks/arc.748ad56e.js"]);return{id:id$c,diagram:t}},plugin$c={id:id$c,detector:detector$c,loader:loader$c},pie=plugin$c,id$b="quadrantChart",detector$b=t=>/^\s*quadrantChart/.test(t),loader$b=async()=>{const{diagram:t}=await __vitePreload(()=>import("./quadrantDiagram-559115c7.05c7cea5.js"),["_app/immutable/chunks/quadrantDiagram-559115c7.05c7cea5.js","_app/immutable/chunks/linear.dfcb232a.js","_app/immutable/chunks/init.77b53fdd.js"]);return{id:id$b,diagram:t}},plugin$b={id:id$b,detector:detector$b,loader:loader$b},quadrantChart=plugin$b,id$a="requirement",detector$a=t=>/^\s*requirement(Diagram)?/.test(t),loader$a=async()=>{const{diagram:t}=await __vitePreload(()=>import("./requirementDiagram-b2d6a344.c4a0449d.js"),["_app/immutable/chunks/requirementDiagram-b2d6a344.c4a0449d.js","_app/immutable/chunks/layout.0895040f.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$a,diagram:t}},plugin$a={id:id$a,detector:detector$a,loader:loader$a},requirement=plugin$a,id$9="sequence",detector$9=t=>/^\s*sequenceDiagram/.test(t),loader$9=async()=>{const{diagram:t}=await __vitePreload(()=>import("./sequenceDiagram-583eee82.d9b7c52a.js"),["_app/immutable/chunks/sequenceDiagram-583eee82.d9b7c52a.js","_app/immutable/chunks/svgDrawCommon-f26cad39.4d5cb890.js"]);return{id:id$9,diagram:t}},plugin$9={id:id$9,detector:detector$9,loader:loader$9},sequence=plugin$9,id$8="class",detector$8=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},loader$8=async()=>{const{diagram:t}=await __vitePreload(()=>import("./classDiagram-5e843ae7.1de7517f.js"),["_app/immutable/chunks/classDiagram-5e843ae7.1de7517f.js","_app/immutable/chunks/styles-88ad4441.5725c076.js","_app/immutable/chunks/layout.0895040f.js","_app/immutable/chunks/svgDraw-5d8a058e.8eda9a74.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$8,diagram:t}},plugin$8={id:id$8,detector:detector$8,loader:loader$8},classDiagram=plugin$8,id$7="classDiagram",detector$7=(t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},loader$7=async()=>{const{diagram:t}=await __vitePreload(()=>import("./classDiagram-v2-8c3b3e6a.20325222.js"),["_app/immutable/chunks/classDiagram-v2-8c3b3e6a.20325222.js","_app/immutable/chunks/styles-88ad4441.5725c076.js","_app/immutable/chunks/layout.0895040f.js","_app/immutable/chunks/index-4c4adb72.23813916.js","_app/immutable/chunks/edges-b00f0ec2.ed71b263.js","_app/immutable/chunks/createText-285e50b4.4a567590.js","_app/immutable/chunks/svgDraw-5d8a058e.8eda9a74.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$7,diagram:t}},plugin$7={id:id$7,detector:detector$7,loader:loader$7},classDiagramV2=plugin$7,id$6="state",detector$6=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},loader$6=async()=>{const{diagram:t}=await __vitePreload(()=>import("./stateDiagram-b1c07dc6.122d8650.js"),["_app/immutable/chunks/stateDiagram-b1c07dc6.122d8650.js","_app/immutable/chunks/styles-f626f8de.d505f4e5.js","_app/immutable/chunks/layout.0895040f.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$6,diagram:t}},plugin$6={id:id$6,detector:detector$6,loader:loader$6},state=plugin$6,id$5="stateDiagram",detector$5=(t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},loader$5=async()=>{const{diagram:t}=await __vitePreload(()=>import("./stateDiagram-v2-7c93469e.bda4dd94.js"),["_app/immutable/chunks/stateDiagram-v2-7c93469e.bda4dd94.js","_app/immutable/chunks/styles-f626f8de.d505f4e5.js","_app/immutable/chunks/layout.0895040f.js","_app/immutable/chunks/index-4c4adb72.23813916.js","_app/immutable/chunks/edges-b00f0ec2.ed71b263.js","_app/immutable/chunks/createText-285e50b4.4a567590.js","_app/immutable/chunks/svgDraw-5d8a058e.8eda9a74.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$5,diagram:t}},plugin$5={id:id$5,detector:detector$5,loader:loader$5},stateV2=plugin$5,id$4="journey",detector$4=t=>/^\s*journey/.test(t),loader$4=async()=>{const{diagram:t}=await __vitePreload(()=>import("./journeyDiagram-5120ee2f.1280fc1a.js"),["_app/immutable/chunks/journeyDiagram-5120ee2f.1280fc1a.js","_app/immutable/chunks/svgDrawCommon-f26cad39.4d5cb890.js","_app/immutable/chunks/arc.748ad56e.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$4,diagram:t}},plugin$4={id:id$4,detector:detector$4,loader:loader$4},journey=plugin$4,getStyles=()=>"",styles=getStyles,setConf=function(){},draw=(t,e,r)=>{try{log$1.debug(`Renering svg for syntax error `);const o=select("#"+e),n=o.append("g");n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),o.attr("height",100),o.attr("width",500),o.attr("viewBox","768 0 912 512")}catch(o){log$1.error("Error while rendering info diagram"),log$1.error(getErrorMessage(o))}},errorRenderer={setConf,draw},diagram={db:{clear:()=>{}},styles,renderer:errorRenderer,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},errorDiagram=diagram,id$3="flowchart-elk",detector$3=(t,e)=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},loader$3=async()=>{const{diagram:t}=await __vitePreload(()=>import("./flowchart-elk-definition-6f4e6aa0.1bf76338.js"),["_app/immutable/chunks/flowchart-elk-definition-6f4e6aa0.1bf76338.js","_app/immutable/chunks/flowDb-8f9fc471.1d31edc8.js","_app/immutable/chunks/edges-b00f0ec2.ed71b263.js","_app/immutable/chunks/createText-285e50b4.4a567590.js","_app/immutable/chunks/svgDraw-5d8a058e.8eda9a74.js","_app/immutable/chunks/line.c1440caf.js","_app/immutable/chunks/array.9f3ba611.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$3,diagram:t}},plugin$3={id:id$3,detector:detector$3,loader:loader$3},flowchartElk=plugin$3,id$2="timeline",detector$2=t=>/^\s*timeline/.test(t),loader$2=async()=>{const{diagram:t}=await __vitePreload(()=>import("./timeline-definition-491ea63c.9362f2af.js"),["_app/immutable/chunks/timeline-definition-491ea63c.9362f2af.js","_app/immutable/chunks/arc.748ad56e.js","_app/immutable/chunks/constant.6af51708.js"]);return{id:id$2,diagram:t}},plugin$2={id:id$2,detector:detector$2,loader:loader$2},timeline=plugin$2,id$1="mindmap",detector$1=t=>/^\s*mindmap/.test(t),loader$1=async()=>{const{diagram:t}=await __vitePreload(()=>import("./mindmap-definition-0ab67801.94d811b0.js"),["_app/immutable/chunks/mindmap-definition-0ab67801.94d811b0.js","_app/immutable/chunks/createText-285e50b4.4a567590.js"]);return{id:id$1,diagram:t}},plugin$1={id:id$1,detector:detector$1,loader:loader$1},mindmap=plugin$1,id="sankey",detector=t=>/^\s*sankey-beta/.test(t),loader=async()=>{const{diagram:t}=await __vitePreload(()=>import("./sankeyDiagram-e679478d.e3a1bbb4.js"),["_app/immutable/chunks/sankeyDiagram-e679478d.e3a1bbb4.js","_app/immutable/chunks/ordinal.b935e931.js","_app/immutable/chunks/init.77b53fdd.js"]);return{id,diagram:t}},plugin={id,detector,loader},sankey=plugin;let hasLoadedDiagrams=!1;const addDiagrams=()=>{hasLoadedDiagrams||(hasLoadedDiagrams=!0,registerDiagram("error",errorDiagram,t=>t.toLowerCase().trim()==="error"),registerDiagram("---",{db:{clear:()=>{}},styles:{},renderer:{},parser:{parser:{yy:{}},parse:()=>{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")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),registerLazyLoadedDiagrams(c4,classDiagramV2,classDiagram,er,gantt,info,pie,requirement,sequence,flowchartElk,flowchartV2,flowchart,mindmap,timeline,git,stateV2,state,journey,quadrantChart,sankey))},cleanupComments=t=>t.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm,"");class Diagram{constructor(e){var r,o;this.text=e,this.type="graph",this.text+=` `;const n=getConfig$1();try{this.type=detectType(e,n)}catch(l){this.type="error",this.detectError=l}const a=getDiagram(this.type);log$1.debug("Type "+this.type),this.db=a.db,(o=(r=this.db).clear)==null||o.call(r),this.renderer=a.renderer,this.parser=a.parser;const s=this.parser.parse.bind(this.parser);this.parser.parse=l=>s(cleanupComments(extractFrontMatter(l,this.db))),this.parser.parser.yy=this.db,a.init&&(a.init(n),log$1.info("Initialized diagram "+this.type,n)),this.parse()}parse(){var e,r;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}}const getDiagramFromText=async t=>{const e=detectType(t,getConfig$1());try{getDiagram(e)}catch{const o=getDiagramLoader(e);if(!o)throw new UnknownDiagramError(`Diagram ${e} not found.`);const{id:n,diagram:a}=await o();registerDiagram(n,a)}return new Diagram(t)};let interactionFunctions=[];const addFunction=t=>{interactionFunctions.push(t)},attachFunctions=()=>{interactionFunctions.forEach(t=>{t()}),interactionFunctions=[]},SVG_ROLE="graphics-document document";function setA11yDiagramInfo(t,e){t.attr("role",SVG_ROLE),e!==""&&t.attr("aria-roledescription",e)}function addSVGa11yTitleDescription(t,e,r,o){if(t.insert!==void 0){if(r){const n=`chart-desc-${o}`;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n=`chart-title-${o}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}const CLASSDEF_DIAGRAMS=["graph","flowchart","flowchart-v2","flowchart-elk","stateDiagram","stateDiagram-v2"],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"];async function parse$1(t,e){addDiagrams();try{(await getDiagramFromText(t)).parse()}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}const encodeEntities=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const o=r.substring(1,r.length-1);return/^\+?\d+$/.test(o)?"fl°°"+o+"¶ß":"fl°"+o+"¶ß"}),e},decodeEntities=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},cssImportantStyles=(t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,createCssStyles=(t,e,r={})=>{var o;let n="";if(t.themeCSS!==void 0&&(n+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(n+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!isEmpty(r)&&CLASSDEF_DIAGRAMS.includes(e)){const h=t.htmlLabels||((o=t.flowchart)==null?void 0:o.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const c in r){const d=r[c];isEmpty(d.styles)||h.forEach(g=>{n+=cssImportantStyles(d.id,g,d.styles)}),isEmpty(d.textStyles)||(n+=cssImportantStyles(d.id,"tspan",d.textStyles))}}return n},createUserStyles=(t,e,r,o)=>{const n=createCssStyles(t,e,r),a=getStyles$2(e,n,t.themeVariables);return serialize(compile(`${o}{${a}}`),stringify)},cleanUpSvgCode=(t="",e,r)=>{let o=t;return!r&&!e&&(o=o.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),o=decodeEntities(o),o=o.replace(/
/g,"
"),o},putIntoIFrame=(t="",e)=>{const r=e?e.viewBox.baseVal.height+"px":IFRAME_HEIGHT,o=btoa(''+t+"");return``},appendDivSvgG=(t,e,r,o,n)=>{const a=t.append("div");a.attr("id",r),o&&a.attr("style",o);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",XMLNS_SVG_STD);return n&&s.attr("xmlns:xlink",n),s.append("g"),t};function sandboxedIframe(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const removeExistingElements=(t,e,r,o)=>{var n,a,s;(n=t.getElementById(e))==null||n.remove(),(a=t.getElementById(r))==null||a.remove(),(s=t.getElementById(o))==null||s.remove()},render$1=async function(t,e,r){var o,n,a,s;addDiagrams(),reset();const l=utils.detectInit(e);l&&(directiveSanitizer(l),addDirective(l));const h=getConfig$1();log$1.debug(h),e.length>((h==null?void 0:h.maxTextSize)??MAX_TEXTLENGTH)&&(e=MAX_TEXTLENGTH_EXCEEDED_MSG),e=e.replace(/\r\n?/g,` `),e=e.replace(/<(\w+)([^>]*)>/g,(L,P,N)=>"<"+P+N.replace(/="([^"]*)"/g,"='$1'")+">");const c="#"+t,d="i"+t,g="#"+d,f="d"+t,u="#"+f;let m=select("body");const w=h.securityLevel===SECURITY_LVL_SANDBOX,E=h.securityLevel===SECURITY_LVL_LOOSE,b=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),w){const L=sandboxedIframe(select(r),d);m=select(L.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=select(r);appendDivSvgG(m,t,f,`font-family: ${b}`,XMLNS_XLINK_STD)}else{if(removeExistingElements(document,t,f,d),w){const L=sandboxedIframe(select("body"),d);m=select(L.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=select("body");appendDivSvgG(m,t,f)}e=encodeEntities(e);let y,T;try{y=await getDiagramFromText(e)}catch(L){y=new Diagram("error"),T=L}const C=m.select(u).node(),I=y.type,z=C.firstChild,v=z.firstChild,D=CLASSDEF_DIAGRAMS.includes(I)?y.renderer.getClasses(e,y):{},S=createUserStyles(h,I,D,c),x=document.createElement("style");x.innerHTML=S,z.insertBefore(x,v);try{await y.renderer.draw(e,t,version,y)}catch(L){throw errorRenderer.draw(e,t,version),L}const F=m.select(`${u} svg`),U=(n=(o=y.db).getAccTitle)==null?void 0:n.call(o),B=(s=(a=y.db).getAccDescription)==null?void 0:s.call(a);addA11yInfo(I,F,U,B),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",XMLNS_XHTML_STD);let k=m.select(u).node().innerHTML;if(log$1.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),k=cleanUpSvgCode(k,w,evaluate(h.arrowMarkerAbsolute)),w){const L=m.select(u+" svg").node();k=putIntoIFrame(k,L)}else E||(k=purify.sanitize(k,{ADD_TAGS:DOMPURIFY_TAGS,ADD_ATTR:DOMPURIFY_ATTR}));if(attachFunctions(),T)throw T;const O=select(w?g:u).node();return O&&"remove"in O&&O.remove(),{svg:k,bindFunctions:y.db.bindFunctions}};function initialize$1(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),saveConfigFromInitialize(t),t!=null&&t.theme&&t.theme in theme?t.themeVariables=theme[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=theme.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?setSiteConfig(t):getSiteConfig();setLogLevel$1(r.logLevel),addDiagrams()}function addA11yInfo(t,e,r,o){setA11yDiagramInfo(e,t),addSVGa11yTitleDescription(e,r,o,e.attr("id"))}const mermaidAPI=Object.freeze({render:render$1,parse:parse$1,parseDirective:parseDirective$1,getDiagramFromText,initialize:initialize$1,getConfig:getConfig$1,setConfig,getSiteConfig,updateSiteConfig,reset:()=>{reset()},globalReset:()=>{reset(defaultConfig)},defaultConfig});setLogLevel$1(getConfig$1().logLevel);reset(getConfig$1());const handleError=(t,e,r)=>{log$1.warn(t),isDetailedError(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},run=async function(t={querySelector:".mermaid"}){try{await runThrowsErrors(t)}catch(e){if(isDetailedError(e)&&log$1.error(e.str),mermaid.parseError&&mermaid.parseError(e),!t.suppressErrors)throw log$1.error("Use the suppressErrors option to suppress these errors"),e}},runThrowsErrors=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const o=mermaidAPI.getConfig();log$1.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else if(e)n=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");log$1.debug(`Found ${n.length} diagrams`),(o==null?void 0:o.startOnLoad)!==void 0&&(log$1.debug("Start On Load: "+(o==null?void 0:o.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:o==null?void 0:o.startOnLoad}));const a=new utils.initIdGenerator(o.deterministicIds,o.deterministicIDSeed);let s;const l=[];for(const h of Array.from(n)){log$1.info("Rendering diagram: "+h.id);/*! Check if previously processed */if(h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=h.innerHTML,s=dedent(utils.entityDecode(s)).trim().replace(//gi,"
");const d=utils.detectInit(s);d&&log$1.debug("Detected early reinit: ",d);try{const{svg:g,bindFunctions:f}=await render$2(c,s,h);h.innerHTML=g,t&&await t(c),f&&f(h)}catch(g){handleError(g,l,mermaid.parseError)}}if(l.length>0)throw l[0]},initialize=function(t){mermaidAPI.initialize(t)},init=async function(t,e,r){log$1.warn("mermaid.init is deprecated. Please use run instead."),t&&initialize(t);const o={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?o.querySelector=e:e&&(e instanceof HTMLElement?o.nodes=[e]:o.nodes=e),await run(o)},registerExternalDiagrams=async(t,{lazyLoad:e=!0}={})=>{registerLazyLoadedDiagrams(...t),e===!1&&await loadRegisteredDiagrams()},contentLoaded=function(){if(mermaid.startOnLoad){const{startOnLoad:t}=mermaidAPI.getConfig();t&&mermaid.run().catch(e=>log$1.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*! * Wait for document loaded before starting the execution */window.addEventListener("load",contentLoaded,!1)}const setParseErrorHandler=function(t){mermaid.parseError=t},executionQueue=[];let executionQueueRunning=!1;const executeQueue=async()=>{if(!executionQueueRunning){for(executionQueueRunning=!0;executionQueue.length>0;){const t=executionQueue.shift();if(t)try{await t()}catch(e){log$1.error("Error executing queue",e)}}executionQueueRunning=!1}},parse$2=async(t,e)=>new Promise((r,o)=>{const n=()=>new Promise((a,s)=>{mermaidAPI.parse(t,e).then(l=>{a(l),r(l)},l=>{var h;log$1.error("Error parsing",l),(h=mermaid.parseError)==null||h.call(mermaid,l),s(l),o(l)})});executionQueue.push(n),executeQueue().catch(o)}),render$2=(t,e,r)=>new Promise((o,n)=>{const a=()=>new Promise((s,l)=>{mermaidAPI.render(t,e,r).then(h=>{s(h),o(h)},h=>{var c;log$1.error("Error parsing",h),(c=mermaid.parseError)==null||c.call(mermaid,h),l(h),n(h)})});executionQueue.push(a),executeQueue().catch(n)}),mermaid={startOnLoad:!0,mermaidAPI,parse:parse$2,render:render$2,init,run,registerExternalDiagrams,initialize,parseError:void 0,contentLoaded,setParseErrorHandler,detectType},render=async(t,e,r)=>(mermaid.initialize(t),await mermaid.render(r,e)),parse=async t=>await mermaid.parse(t),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,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.
Including the broken link in the issue
will speed up the fix.) C -->|No| E{Did someone
send you this link?} E -->|Yes| F[Ask them to send
you the complete link] E -->|No| G{Did you copy
the complete URL?} G --> |Yes| D G --> |"No :("| H(Try using the Timeline tab in History
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 t=get_store_value(inputStateStore);return{...t,serialized:serializeState(t),errorMarkers:[],error:void 0,editorMode:t.editorMode??"code"}})(),processState=async t=>{const e={...t,serialized:"",errorMarkers:[],error:void 0,editorMode:t.editorMode??"code"};try{e.serialized=serializeState(t),await parse(t.code),JSON.parse(t.mermaid)}catch(r){if(e.error=r,errorDebug(),console.error(r),"hash"in r)try{const{loc:{first_line:o,last_line:n,first_column:a,last_column:s}}=r.hash,l={severity:8,startLineNumber:o,startColumn:a,endLineNumber:n,endColumn:s+1,message:r.str};e.errorMarkers=[l]}catch(o){console.error("Error without line helper",o)}}return e},stateStore=derived([inputStateStore],([t],e)=>{processState(t).then(e)},currentState),loadState=t=>{let e;console.log(`Loading '${t}'`);try{e=deserializeState(t);const r=typeof e.mermaid=="string"?JSON.parse(e.mermaid):e.mermaid;r.securityLevel&&r.securityLevel!=="strict"&&confirm(`Removing "securityLevel":"${r.securityLevel}" from the config for safety. Click Cancel if you trust the source of this Diagram.`)&&delete r.securityLevel,e.mermaid=formatJSON(r)}catch(r){e=get_store_value(inputStateStore),t&&(console.error("Init error",r),e.code=urlParseFailedState,e.mermaid=defaultState.mermaid)}updateCodeStore(e)},updateCodeStore=t=>{inputStateStore.update(e=>({...e,...t}))};let prompted=!1;const updateCode=(t,{updateDiagram:e=!1,resetPanZoom:r=!1}={})=>{const o=countLines(t);if(saveStatistics(t),errorDebug(),o>50&&!prompted&&get_store_value(stateStore).autoSync){const n=confirm(`Long diagram detected. Turn off Auto Sync? Use ${cmdKey} + Enter or click the sync logo to manually sync.`);prompted=!0,n&&updateCodeStore({autoSync:!1})}inputStateStore.update(n=>(r&&(n.pan=void 0,n.zoom=void 0),{...n,code:t,updateDiagram:e}))},updateConfig=t=>{inputStateStore.update(e=>({...e,mermaid:t}))},toggleDarkTheme=t=>{inputStateStore.update(e=>{const r=JSON.parse(e.mermaid);return(!r.theme||["dark","default"].includes(r.theme))&&(r.theme=t?"dark":"default"),{...e,mermaid:formatJSON(r)}})};let urlDebounce;const initURLSubscription=()=>{stateStore.subscribe(({serialized:t})=>{clearTimeout(urlDebounce),urlDebounce=window.setTimeout(()=>{history.replaceState(void 0,"",`#${t}`)},250)})},getStateString=()=>JSON.stringify(get_store_value(inputStateStore));export{root$2 as $,persist as A,localStorage as B,render as C,getAugmentedNamespace as D,setAccTitle as E,getAccTitle as F,getAccDescription as G,setAccDescription as H,getConfig$1 as I,sanitizeText$2 as J,mermaidAPI as K,assignWithDepth$1 as L,calculateTextWidth as M,select as N,log$1 as O,configureSvgSize as P,wrapLabel as Q,common$1 as R,calculateTextHeight as S,sanitizeUrl_1 as T,curveLinear as U,getStylesFromArray as V,evaluate as W,interpolateToCurve as X,setupGraphViewbox$1 as Y,setConfig as Z,Selection$1 as _,syncDiagram as a,isDark$1 as a$,array as a0,_ as a1,Color$1 as a2,isFunction as a3,utils as a4,rgba$1 as a5,unsafeStringify as a6,setDiagramTitle as a7,getDiagramTitle as a8,clear as a9,Symbol$2 as aA,isArray$1 as aB,isObject$1 as aC,getNative as aD,eq as aE,isArrayLike as aF,isArguments$1 as aG,isBuffer$1 as aH,isTypedArray$1 as aI,baseKeys as aJ,isPrototype as aK,memoize as aL,overArg as aM,ListCache as aN,Map$2 as aO,MapCache as aP,root$1 as aQ,getTag$1 as aR,nodeUtil$1 as aS,baseUnary as aT,isLength as aU,Set$2 as aV,isEmpty as aW,defaultConfig as aX,decodeEntities as aY,commonDb$1 as aZ,parseDirective$1 as a_,curveBasis as aa,parseGenericTypes as ab,getConfig as ac,setupGraphViewbox as ad,random as ae,define as af,extend$1 as ag,Rgb as ah,Color$2 as ai,rgbConvert as aj,nogamma as ak,hue as al,tau as am,parseFontSize as an,getThemeVariables$2 as ao,defaultConfig$1 as ap,constant as aq,interpolateNumber as ar,color as as,interpolateRgb as at,interpolateString as au,addFunction as av,ZERO_WIDTH_SPACE as aw,generateId as ax,isObjectLike as ay,baseGetTag as az,logEvent as b,lighten$1 as b0,darken$1 as b1,halfPi as b2,epsilon as b3,cos as b4,sin as b5,sqrt as b6,min as b7,abs$1 as b8,pi as b9,atan2 as ba,asin as bb,acos as bc,max as bd,dedent as be,updateConfig as c,analytics as d,errorDebug as e,dayjs as f,encode as g,commonjsGlobal as h,initHandler as i,getDefaultExportFromCjs as j,inputStateStore as k,loadingStateStore as l,historyStore as m,historyModeStore as n,loaderHistoryStore as o,pakoSerde as p,getStateString as q,restoreHistory as r,stateStore as s,toggleDarkTheme as t,updateCode as u,getPreviousState as v,addHistoryEntry as w,clearHistoryData as x,updateCodeStore as y,cmdKey as z};