`);let i=O?P(e):e;if(Xe===Ye)try{t=new u().parseFromString(i,at)}catch{}if(!t||!t.documentElement){t=R.createDocument(Xe,`template`,null);try{t.documentElement.innerHTML=Ze?k:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Xe===Ye?ne.call(t,De?`html`:`body`)[0]:De?t.documentElement:a},Pt=function(e){let t=C?C(e):e.ownerDocument;return ee.call(t||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ft=function(e){return e=rx(e,ie,` `),e=rx(e,ae,` `),e=rx(e,oe,` `),e},It=function(e){var t;Lt(e);let n=(t=e.querySelectorAll)==null?void 0:t.call(e,`template`);n&&Qb(n,e=>{zt(e.content)&&It(e.content)})},Lt=function(e){e.normalize();let t=C?C(e):e.ownerDocument,n=ee.call(t||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Ft(r.data),r=n.nextNode()},Rt=function(e){let t=S?S(e):null;return typeof t!=`string`||st(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==b(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==x(e)||e.childNodes!==_(e)},zt=function(e){if(!x||typeof e!=`object`||!e)return!1;try{return x(e)===lx.documentFragment}catch{return!1}},Bt=function(e){if(!x||typeof e!=`object`||!e)return!1;try{return typeof x(e)==`number`}catch{return!1}};function Vt(e,n,r){e.length!==0&&Qb(e,e=>{e.call(t,n,r,ct)})}let Ht=function(e,t){return!!(Ee&&e.hasChildNodes()&&!Bt(e.firstElementChild)&&ox(B6t,e.textContent)&&ox(B6t,e.innerHTML)||Ee&&W6t[t]&&w(e)===lx.element&&D(e)===Ye&&(Bt(e.firstElementChild)||typeof e.textContent==`string`&&ox(B6t,e.textContent))||e.nodeType===lx.processingInstruction||Ee&&e.nodeType===lx.comment&&ox(V6t,e.data))},Ut=function(e,t){return e instanceof RegExp?ox(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Wt=function(e,t,n){if(!ve[t]&&Xt(t)&&Ut(_e.tagNameCheck,t))return!1;if(Le&&!Ve[t]&&!Ve[nx(t)]){let t=v(e),r=_(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?p(r[a],!0):r[a];t.insertBefore(i,g(e))}}}return vt(e),!0},Gt=function(e,t,n,r){return e.length===0?t:t===n||t===r?qb(t):t},Kt=function(e,t){return e===t||v(e)!==null?!1:(Re&&wt(e),!0)},qt=function(e,n){if(At(e),Vt(re.beforeSanitizeElements,e,null),Kt(e,n))return!0;if(Rt(e))return vt(e),!0;let r=st(T(e));if(pe=Gt(re.uponSanitizeElement,pe,me,B),Vt(re.uponSanitizeElement,e,{tagName:r,allowedTags:pe}),Kt(e,n))return!0;if(Ht(e,r))return vt(e),!0;if(ve[r]||!(be.tagCheck instanceof Function&&be.tagCheck(r))&&!pe[r]){let t=Wt(e,r,n);return t===!1&&(Vt(re.afterSanitizeElements,e,null),Kt(e,n))?!0:t}if(w(e)===lx.element&&!_t(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&ox(H6t,e.innerHTML))return vt(e),!0;if(Te&&e.nodeType===lx.text){let n=Ft(e.textContent);e.textContent!==n&&($b(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Vt(re.afterSanitizeElements,e,null),Kt(e,n)},Jt=function(e,t,r){if(ye[t]||jt(t,e)||Pe&&(t===`id`||t===`name`)&&(r in n||r in lt))return!1;let i=he[t]||be.attributeCheck instanceof Function&&be.attributeCheck(t,e);return Se&&ox(se,t)||xe&&ox(ce,t)?!0:i?Ge[t]||ox(fe,rx(r,ue,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&m6t(r,`data:`)===0&&Ue[e]||Ce&&!ox(le,rx(r,ue,``))?!0:!r:Xt(e)&&Ut(_e.tagNameCheck,e)&&Ut(_e.attributeNameCheck,t,e)||t===`is`&&_e.allowCustomizedBuiltInElements&&Ut(_e.tagNameCheck,r)},Yt=Kb({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Xt=function(e){return!Yt[nx(e)]&&ox(de,e)},Zt=function(e,t,n,r){if(O&&typeof d==`object`&&typeof d.getAttributeType==`function`&&!n)switch(d.getAttributeType(e,t)){case`TrustedHTML`:return P(r);case`TrustedScriptURL`:return F(r)}return r},Qt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Rt(e)||(vt(e),!1)}catch{return xt(t,e),!1}},$t=function(e,t){return Ee&&ox(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t)?!0:nx(e)===`attributename`&&p6t(t,`href`)!==null},en=function(e,n){if(Vt(re.beforeSanitizeAttributes,e,null),Kt(e,n))return;let r=e.attributes;if(!r||Rt(e))return;he=Gt(re.uponSanitizeAttribute,he,ge,ke);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:he,forceKeepAttr:void 0},a=r.length,o=st(e.nodeName);for(;a--;){let n=r[a],s=n.name,l=n.namespaceURI,u=n.value,d=st(s),f=u,p=s===`value`?f:h6t(f),m=!1;i.attrName=d,i.attrValue=p,i.keepAttr=!0,i.forceKeepAttr=void 0,Vt(re.uponSanitizeAttribute,e,i),p=i.attrValue,Fe&&(d===`id`||d===`name`)&&m6t(p,Ie)!==0&&(xt(s,e,n),p=Ie+p,m=!0),$t(s,p)?xt(s,e,n):i.forceKeepAttr||(i.keepAttr?!we&&ox(U6t,p)?xt(s,e,n):(Te&&(p=Ft(p)),Jt(o,d,p)?(p=Zt(o,d,l,p),p!==f&&Qt(e,s,l,p)&&m&&s6t(t.removed)):xt(s,e,n)):xt(s,e,n))}Vt(re.afterSanitizeAttributes,e,null),Kt(e,n)},tn=function(e){let t=null,n=Pt(e);for(Vt(re.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Vt(re.uponSanitizeShadowNode,t,null),qt(t,e),en(t,e),zt(t.content)&&tn(t.content),w(t)===lx.element){let e=y(t);zt(e)&&(nn(e),tn(e))}Te&&Lt(e),Vt(re.afterSanitizeShadowDOM,e,null)},nn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){tn(e.shadow);continue}let n=e.node,r=w(n)===lx.element,i=_(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=S?S(n):null;if(typeof e==`string`&&st(e)===`template`){let e=n.content;zt(e)&&t.push({node:e,shadow:null})}}if(r){let e=y(n);zt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ze=!e,Ze&&(e=`\x3C!-->`),typeof e!=`string`&&!Bt(e)&&(e=J3t(e),typeof e!=`string`))throw sx(`dirty is not a string, aborting`);if(!t.isSupported)return e;Oe?(pe=B,he=ke):dt(n),(re.uponSanitizeElement.length>0||re.uponSanitizeAttribute.length>0)&&(pe=qb(pe)),re.uponSanitizeAttribute.length>0&&(he=qb(he)),t.removed=[];let l=Re&&typeof e!=`string`&&Bt(e),u=[],d=ze;if(l){Mt(e);let t=T(e);if(typeof t==`string`){let n=st(t);if(!pe[n]||ve[n])throw bt(e),sx(`root node is forbidden and cannot be sanitized in-place`)}if(Rt(e))throw bt(e),sx(`root node is clobbered and cannot be sanitized in-place`);u=Tt(e),ze=u6t()}else if(Bt(e))i=Nt(`\x3C!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===lx.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),nn(i);else{if(!je&&!Te&&!De&&e.indexOf(`<`)===-1)return O&&Ne?P(e):e;if(i=Nt(e),!i)return je?null:Ne?k:``}i&&Ae&&vt(i.firstChild);let f=l?e:i;try{l&&nn(e);let t=Pt(f);for(;o=t.nextNode();)qt(o,f),en(o,f),zt(o.content)&&tn(o.content);l&&Ot(e,u)}catch(t){throw l&&(bt(e),Dt(e,u)),t}finally{ze=d}if(l){if(Dt(e,u))throw sx(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Te&&It(e),e}if(je){if(Te&&It(i),Me)for(s=te.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(he.shadowroot||he.shadowrootmode)&&(s=z.call(r,s,!0)),s}let p=De?i.outerHTML:i.innerHTML;return De&&pe[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ox(R6t,i.ownerDocument.doctype.name)&&(p=` `+p),Te&&(p=Ft(p)),O&&Ne?P(p):p},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(e),Oe=!0,B=pe,ke=he},t.clearConfig=function(){ct=null,Oe=!1,B=null,ke=null,O=A,k=``},t.isValidAttribute=function(e,t,n){ct||dt({});let r=st(e),i=st(t);return typeof n==`string`&&($t(t,n)||!we&&ox(U6t,n))?!1:Jt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&ix(re,e)&&$b(re[e],t)},t.removeHook=function(e,t){if(ix(re,e)){if(t!==void 0){let n=o6t(re[e],t);return n===-1?void 0:l6t(re[e],n,1)[0]}return s6t(re[e])}},t.removeHooks=function(e){ix(re,e)&&(re[e]=[])},t.removeAllHooks=function(){re=q6t()},t}var Q3t,$3t,e6t,t6t,n6t,Yb,Xb,Zb,r6t,i6t,a6t,Qb,o6t,s6t,$b,c6t,l6t,ex,u6t,d6t,tx,nx,f6t,p6t,rx,m6t,h6t,g6t,_6t,v6t,y6t,ix,ax,ox,sx,b6t,x6t,S6t,C6t,w6t,T6t,E6t,D6t,O6t,k6t,cx,A6t,j6t,M6t,N6t,P6t,F6t,I6t,L6t,R6t,z6t,B6t,V6t,H6t,U6t,lx,W6t,G6t,K6t,q6t,ux,J6t,dx,fx=o((()=>{G3t.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},G3t.prototype.next=function(e){return this._invoke(`next`,e)},G3t.prototype.throw=function(e){return this._invoke(`throw`,e)},G3t.prototype.return=function(e){return this._invoke(`return`,e)},Q3t=Object.entries,$3t=Object.setPrototypeOf,e6t=Object.isFrozen,t6t=Object.getPrototypeOf,n6t=Object.getOwnPropertyDescriptor,Yb=Object.freeze,Xb=Object.seal,Zb=Object.create,r6t=typeof Reflect<`u`&&Reflect,i6t=r6t.apply,a6t=r6t.construct,Yb||(Yb=function(e){return e}),Xb||(Xb=function(e){return e}),i6t||(i6t=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)}),a6t||(a6t=function(e){return new e(...[...arguments].slice(1))}),Qb=Gb(Array.prototype.forEach),Array.prototype.indexOf,o6t=Gb(Array.prototype.lastIndexOf),s6t=Gb(Array.prototype.pop),$b=Gb(Array.prototype.push),c6t=Gb(Array.prototype.slice),l6t=Gb(Array.prototype.splice),ex=Array.isArray,u6t=K3t(Set),d6t=Gb(Set.prototype.add),tx=Gb(Set.prototype.has),nx=Gb(String.prototype.toLowerCase),f6t=Gb(String.prototype.toString),p6t=Gb(String.prototype.match),rx=Gb(String.prototype.replace),m6t=Gb(String.prototype.indexOf),h6t=Gb(String.prototype.trim),g6t=Gb(Number.prototype.toString),_6t=Gb(Boolean.prototype.toString),v6t=typeof BigInt>`u`?null:Gb(BigInt.prototype.toString),y6t=typeof Symbol>`u`?null:Gb(Symbol.prototype.toString),ix=Gb(Object.prototype.hasOwnProperty),ax=Gb(Object.prototype.toString),ox=Gb(RegExp.prototype.test),sx=K3t(TypeError),b6t=Yb(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),x6t=Yb(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),S6t=Yb([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),C6t=Yb([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),w6t=Yb(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),T6t=Yb([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),E6t=Yb([`#text`]),D6t=Yb(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),O6t=Yb(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),k6t=Yb(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),cx=Yb([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),A6t=Xb(/{{[\w\W]*|^[\w\W]*}}/g),j6t=Xb(/<%[\w\W]*|^[\w\W]*%>/g),M6t=Xb(/\${[\w\W]*/g),N6t=Xb(/^data-[\-\w.\u00B7-\uFFFF]+$/),P6t=Xb(/^aria-[\-\w]+$/),F6t=Xb(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),I6t=Xb(/^(?:\w+script|data):/i),L6t=Xb(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),R6t=Xb(/^html$/i),z6t=Xb(/^[a-z][.\w]*(-[.\w]+)+$/i),B6t=Xb(/<[/\w!]/g),V6t=Xb(/<[/\w]/g),H6t=Xb(/<\/no(script|embed|frames)/i),U6t=Xb(/\/>/i),lx={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},W6t=Yb(Kb({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),G6t=function(){return typeof window>`u`?null:window},K6t=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},q6t=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ux=function(e,t,n,r){return ix(e,t)&&ex(e[t])?Kb(r.base?qb(r.base):{},e[t],r.transform):n},J6t=function(e,t,n){let r=ix(e,t)?e[t]:void 0;return r&&typeof r==`object`?qb(r):n()},dx=Z3t()})),Y6t=l({Svg:()=>X6t});function X6t({content:e,width:t,height:n,className:r,cssClass:i,...a}){let o=(0,Z6t.useMemo)(()=>dx.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0}}),[e]),s={};return t&&(s.width=t),n&&(s.height=n),(0,Q6t.jsx)(`div`,{...Ne(a),style:Object.keys(s).length>0?s:void 0,className:xn(r,i),dangerouslySetInnerHTML:{__html:o}})}var Z6t,Q6t,$6t=o((()=>{Pe(),Z6t=d(p(),1),fx(),Sn(),Q6t=Ie()}));function e8t(e,t,n,r,i){if(r==null&&i==null)return e;if(r!=null&&i!=null)throw Error(`Pie aggregation options are mutually exclusive`);if(r!=null&&(typeof r!=`number`||!Number.isFinite(r)||r<0||r>1))throw Error(`Pie aggregateBelow must be a finite fraction from 0 to 1`);if(i!=null&&(!Array.isArray(i)||i.some(e=>typeof e!=`string`)))throw Error(`Pie aggregateExcept must resolve to a list of labels`);if(t===n)throw Error(`Pie aggregation requires different dataKey and nameKey`);let a=0;for(let n of e){let e=n[t];if(typeof e!=`number`||!Number.isFinite(e)||e<0)throw Error(`Pie aggregation requires finite non-negative numeric values`);a+=e}if(!Number.isFinite(a))throw Error(`Pie aggregation requires a finite total`);if(r!=null&&a===0)return e;let o=new Set(i),s=e=>r==null?o.has(e[n]):Number(e[t])/a>=r;if(e.every(s))return e;let l=[],u=0,d=e.find(e=>e[n]===`Other`);for(let r of e)s(r)&&r[n]!==`Other`?l.push(r):u+=r[t];return[...l,{...d,[n]:`Other`,[t]:u}]}var t8t=o((()=>{}));function n8t(e){return typeof e==`string`&&r8t.includes(e)}var r8t,i8t=o((()=>{r8t=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`)}));function a8t(e){return typeof e==`string`&&c8t.has(e)}function o8t(e){return typeof e==`string`&&e.startsWith(`data-`)}function px(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(a8t(n)||o8t(n))&&(t[n]=e[n]);return t}function mx(e){if(e==null)return null;if((0,s8t.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return px(t)}return typeof e==`object`&&!Array.isArray(e)?px(e):null}var s8t,c8t,hx=o((()=>{s8t=d(p()),c8t=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`))}));function gx(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(a8t(n)||o8t(n)||n8t(n))&&(t[n]=e[n]);return t}function l8t(e){return e==null?null:(0,u8t.isValidElement)(e)?gx(e.props):typeof e==`object`&&!Array.isArray(e)?gx(e):null}var u8t,_x=o((()=>{u8t=d(p()),i8t(),hx()}));function d8t(){return d8t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{m8t=d(p()),h8t=d(p()),ze(),_x(),g8t=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`],_8t=(0,h8t.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,l=e.title,u=e.desc,d=f8t(e,g8t),f=a||{width:r,height:i,x:0,y:0},p=Re(`recharts-surface`,o);return m8t.createElement(`svg`,d8t({},gx(d),{className:p,width:r,height:i,style:s,viewBox:`${f.x} ${f.y} ${f.width} ${f.height}`,ref:t}),m8t.createElement(`title`,null,l),m8t.createElement(`desc`,null,u),n)})}));function y8t(){return y8t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{S8t=d(p()),ze(),_x(),C8t=[`children`,`className`],vx=S8t.forwardRef((e,t)=>{var n=e.children,r=e.className,i=b8t(e,C8t),a=Re(`recharts-layer`,r);return S8t.createElement(`g`,y8t({className:a},gx(i),{ref:t}),n)})}));function w8t(e){return e===`__proto__`}var T8t=o((()=>{}));function E8t(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:D8t.test(e);default:return!1}}var D8t,O8t=o((()=>{D8t=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/}));function k8t(e){var t;return typeof e==`string`||typeof e==`symbol`?e:Object.is(e==null||(t=e.valueOf)==null?void 0:t.call(e),-0)?`-0`:String(e)}var A8t=o((()=>{}));function j8t(e){return typeof e==`symbol`||e instanceof Symbol}var M8t=o((()=>{}));function N8t(e){return e==null?``:P8t(e)}function P8t(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(P8t).join(`,`);if(j8t(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}var F8t=o((()=>{M8t()}));function I8t(e){if(Array.isArray(e))return e.map(k8t);if(typeof e==`symbol`)return[e];e=N8t(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,l=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r{A8t(),F8t()}));function bx(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(w8t(t))return n;let r=e[t];return r===void 0?E8t(t)&&!Object.hasOwn(e,t)?bx(e,I8t(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=k8t(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return R8t(e,t,n);if(t=Object.is(t==null?void 0:t.valueOf(),-0)?`-0`:String(t),w8t(t))return n;let r=e[t];return r===void 0?n:r}}}function R8t(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e{T8t(),O8t(),A8t(),L8t()})),xx=o((()=>{z8t()}));function Sx(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:B8t),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function Cx(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+Sx(i)+n},``)}var B8t,wx=o((()=>{B8t=4}));function Tx(e,t,n){return jx(e)&&jx(t)?Sx(e+n*(t-e)):t}function V8t(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):bx(e,t))===n)}function Ex(e){return e!=null}function Dx(){}var Ox,kx,Ax,jx,Mx,H8t,Nx,Px,U8t,W8t,Fx,Ix,Lx=o((()=>{xx(),wx(),Ox=e=>e===0?0:e>0?1:-1,kx=e=>typeof e==`number`&&e!=+e,Ax=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,jx=e=>(typeof e==`number`||e instanceof Number)&&!kx(e),Mx=e=>jx(e)||typeof e==`string`,H8t=0,Nx=e=>{var t=++H8t;return`${e||``}${t}`},Px=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!jx(e)&&typeof e!=`string`)return n;var i;if(Ax(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return kx(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},U8t=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r{for(var t=e.length,n=0,r=0,i=0,a=0,o=1/0,s=-1/0,l=0,u=0,d=0;de==null,Ix=e=>Fx(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`}));function G8t(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var K8t=o((()=>{}));function q8t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rx(e){for(var t=1;t{Lx(),K8t(),Q8t=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=G8t(t),l=s.x,u=s.y,d=s.height,f=s.upperWidth,p=s.lowerWidth,m=l,h=l+(f-p)/2,g=(m+h)/2,_=(f+p)/2,v=m+f/2,y=d>=0?1:-1,b=y*i,x=y>0?`end`:`start`,S=y>0?`start`:`end`,C=f>=0?1:-1,w=C*i,T=C>0?`end`:`start`,E=C>0?`start`:`end`,D=a;if(n===`top`){var O={x:m+f/2,y:u-b,horizontalAnchor:`middle`,verticalAnchor:x};return o&&D&&(O.height=Math.max(u-D.y,0),O.width=f),O}if(n===`bottom`){var k={x:h+p/2,y:u+d+b,horizontalAnchor:`middle`,verticalAnchor:S};return o&&D&&(k.height=Math.max(D.y+D.height-(u+d),0),k.width=p),k}if(n===`left`){var A={x:g-w,y:u+d/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&D&&(A.width=Math.max(A.x-D.x,0),A.height=d),A}if(n===`right`){var j={x:g+_+w,y:u+d/2,horizontalAnchor:E,verticalAnchor:`middle`};return o&&D&&(j.width=Math.max(D.x+D.width-j.x,0),j.height=d),j}var M=o&&D?{width:_,height:d}:{};return n===`insideLeft`?Rx({x:g+w,y:u+d/2,horizontalAnchor:E,verticalAnchor:`middle`},M):n===`insideRight`?Rx({x:g+_-w,y:u+d/2,horizontalAnchor:T,verticalAnchor:`middle`},M):n===`insideTop`?Rx({x:m+f/2,y:u+b,horizontalAnchor:`middle`,verticalAnchor:S},M):n===`insideBottom`?Rx({x:h+p/2,y:u+d-b,horizontalAnchor:`middle`,verticalAnchor:x},M):n===`insideTopLeft`?Rx({x:m+w,y:u+b,horizontalAnchor:E,verticalAnchor:S},M):n===`insideTopRight`?Rx({x:m+f-w,y:u+b,horizontalAnchor:T,verticalAnchor:S},M):n===`insideBottomLeft`?Rx({x:h+w,y:u+d-b,horizontalAnchor:E,verticalAnchor:x},M):n===`insideBottomRight`?Rx({x:h+p-w,y:u+d-b,horizontalAnchor:T,verticalAnchor:x},M):n&&typeof n==`object`&&(jx(n.x)||Ax(n.x))&&(jx(n.y)||Ax(n.y))?Rx({x:l+Px(n.x,_),y:u+Px(n.y,d),horizontalAnchor:`end`,verticalAnchor:`end`},M):Rx({x:v,y:u+d/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},M)},$8t=[`top`,`left`,`right`,`bottom`]})),t5t,n5t,r5t,i5t=o((()=>{t5t=d(p()),n5t=(0,t5t.createContext)(null),r5t=()=>(0,t5t.useContext)(n5t)}));function zx(e){return function(){return e}}var Bx=o((()=>{}));function a5t(e){return e>1?0:e<-1?Gx:Math.acos(e)}function o5t(e){return e>=1?Kx:e<=-1?-Kx:Math.asin(e)}var s5t,Vx,Hx,c5t,l5t,Ux,Wx,Gx,Kx,qx,Jx=o((()=>{s5t=Math.abs,Vx=Math.atan2,Hx=Math.cos,c5t=Math.max,l5t=Math.min,Ux=Math.sin,Wx=Math.sqrt,Gx=Math.PI,Kx=Gx/2,qx=2*Gx}));function u5t(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return u5t;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t{f5t=Math.PI,p5t=2*f5t,Yx=1e-6,m5t=p5t-Yx,h5t=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?u5t:d5t(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,l=r-t,u=a-e,d=o-t,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(f>Yx){if(!(Math.abs(d*s-l*u)>Yx)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let p=n-a,m=r-o,h=s*s+l*l,g=p*p+m*m,_=Math.sqrt(h),v=Math.sqrt(f),y=i*Math.tan((f5t-Math.acos((h+f-g)/(2*_*v)))/2),b=y/v,x=y/_;Math.abs(b-1)>Yx&&this._append`L${e+b*u},${t+b*d}`,this._append`A${i},${i},0,0,${+(d*p>u*m)},${this._x1=e+x*s},${this._y1=t+x*l}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),l=e+o,u=t+s,d=1^a,f=a?r-i:i-r;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Yx||Math.abs(this._y1-u)>Yx)&&this._append`L${l},${u}`,n&&(f<0&&(f=f%p5t+p5t),f>m5t?this._append`A${n},${n},0,1,${d},${e-o},${t-s}A${n},${n},0,1,${d},${this._x1=l},${this._y1=u}`:f>Yx&&this._append`A${n},${n},0,${+(f>=f5t)},${d},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}},h5t.prototype})),_5t=o((()=>{g5t()}));function v5t(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new h5t(t)}var Xx=o((()=>{_5t()}));function y5t(e){return e.innerRadius}function b5t(e){return e.outerRadius}function x5t(e){return e.startAngle}function S5t(e){return e.endAngle}function C5t(e){return e&&e.padAngle}function w5t(e,t,n,r,i,a,o,s){var l=n-e,u=r-t,d=o-i,f=s-a,p=f*l-d*u;if(!(p*p<1e-12))return p=(d*(t-a)-f*(e-i))/p,[e+p*l,t+p*u]}function T5t(e,t,n,r,i,a,o){var s=e-n,l=t-r,u=(o?a:-a)/Wx(s*s+l*l),d=u*l,f=-u*s,p=e+d,m=t+f,h=n+d,g=r+f,_=(p+h)/2,v=(m+g)/2,y=h-p,b=g-m,x=y*y+b*b,S=i-a,C=p*g-h*m,w=(b<0?-1:1)*Wx(c5t(0,S*S*x-C*C)),T=(C*b-y*w)/x,E=(-C*y-b*w)/x,D=(C*b+y*w)/x,O=(-C*y+b*w)/x,k=T-_,A=E-v,j=D-_,M=O-v;return k*k+A*A>j*j+M*M&&(T=D,E=O),{cx:T,cy:E,x01:-d,y01:-f,x11:T*(i/S-1),y11:E*(i/S-1)}}function Zx(){var e=y5t,t=b5t,n=zx(0),r=null,i=x5t,a=S5t,o=C5t,s=null,l=v5t(u);function u(){var u,d,f=+e.apply(this,arguments),p=+t.apply(this,arguments),m=i.apply(this,arguments)-Kx,h=a.apply(this,arguments)-Kx,g=s5t(h-m),_=h>m;if(s||(s=u=l()),p1e-12))s.moveTo(0,0);else if(g>qx-1e-12)s.moveTo(p*Hx(m),p*Ux(m)),s.arc(0,0,p,m,h,!_),f>1e-12&&(s.moveTo(f*Hx(h),f*Ux(h)),s.arc(0,0,f,h,m,_));else{var v=m,y=h,b=m,x=h,S=g,C=g,w=o.apply(this,arguments)/2,T=w>1e-12&&(r?+r.apply(this,arguments):Wx(f*f+p*p)),E=l5t(s5t(p-f)/2,+n.apply(this,arguments)),D=E,O=E,k,A;if(T>1e-12){var j=o5t(T/f*Ux(w)),M=o5t(T/p*Ux(w));(S-=j*2)>1e-12?(j*=_?1:-1,b+=j,x-=j):(S=0,b=x=(m+h)/2),(C-=M*2)>1e-12?(M*=_?1:-1,v+=M,y-=M):(C=0,v=y=(m+h)/2)}var N=p*Hx(v),P=p*Ux(v),F=f*Hx(x),I=f*Ux(x);if(E>1e-12){var L=p*Hx(y),R=p*Ux(y),ee=f*Hx(b),te=f*Ux(b),ne;if(g1e-12?O>1e-12?(k=T5t(ee,te,N,P,p,O,_),A=T5t(L,R,F,I,p,O,_),s.moveTo(k.cx+k.x01,k.cy+k.y01),O1e-12)||!(S>1e-12)?s.lineTo(F,I):D>1e-12?(k=T5t(F,I,L,R,f,-D,_),A=T5t(N,P,ee,te,f,-D,_),s.lineTo(k.cx+k.x01,k.cy+k.y01),D{Bx(),Jx(),Xx()}));function D5t(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}var Qx=o((()=>{Array.prototype.slice}));function O5t(e){this._context=e}function $x(e){return new O5t(e)}var k5t=o((()=>{O5t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}}));function A5t(e){return e[0]}function j5t(e){return e[1]}var M5t=o((()=>{}));function eS(e,t){var n=zx(!0),r=null,i=$x,a=null,o=v5t(s);e=typeof e==`function`?e:e===void 0?A5t:zx(e),t=typeof t==`function`?t:t===void 0?j5t:zx(t);function s(s){var l,u=(s=D5t(s)).length,d,f=!1,p;for(r??(a=i(p=o())),l=0;l<=u;++l)!(l{Qx(),Bx(),k5t(),Xx(),M5t()}));function P5t(e,t,n){var r=null,i=zx(!0),a=null,o=$x,s=null,l=v5t(u);e=typeof e==`function`?e:e===void 0?A5t:zx(+e),t=typeof t==`function`?t:zx(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?j5t:zx(+n);function u(u){var d,f,p,m=(u=D5t(u)).length,h,g=!1,_,v=Array(m),y=Array(m);for(a??(s=o(_=l())),d=0;d<=m;++d){if(!(d=f;--p)s.point(v[p],y[p]);s.lineEnd(),s.areaEnd()}}g&&(v[d]=+e(h,d,u),y[d]=+t(h,d,u),s.point(r?+r(h,d,u):v[d],n?+n(h,d,u):y[d]))}if(_)return s=null,_+``||null}function d(){return eS().defined(i).curve(o).context(a)}return u.x=function(t){return arguments.length?(e=typeof t==`function`?t:zx(+t),r=null,u):e},u.x0=function(t){return arguments.length?(e=typeof t==`function`?t:zx(+t),u):e},u.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:zx(+e),u):r},u.y=function(e){return arguments.length?(t=typeof e==`function`?e:zx(+e),n=null,u):t},u.y0=function(e){return arguments.length?(t=typeof e==`function`?e:zx(+e),u):t},u.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:zx(+e),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(e){return arguments.length?(i=typeof e==`function`?e:zx(!!e),u):i},u.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),u):o},u.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),u):a},u}var F5t=o((()=>{Qx(),Bx(),k5t(),N5t(),Xx(),M5t()}));function I5t(e,t){return te?1:t>=e?0:NaN}var L5t=o((()=>{}));function R5t(e){return e}var z5t=o((()=>{}));function B5t(){var e=R5t,t=I5t,n=null,r=zx(0),i=zx(qx),a=zx(0);function o(o){var s,l=(o=D5t(o)).length,u,d,f=0,p=Array(l),m=Array(l),h=+r.apply(this,arguments),g=Math.min(qx,Math.max(-qx,i.apply(this,arguments)-h)),_,v=Math.min(Math.abs(g)/l,a.apply(this,arguments)),y=v*(g<0?-1:1),b;for(s=0;s0&&(f+=b);for(t==null?n!=null&&p.sort(function(e,t){return n(o[e],o[t])}):p.sort(function(e,n){return t(m[e],m[n])}),s=0,d=f?(g-l*y)/f:0;s0?b*d:0)+y,m[u]={data:o[u],index:s,value:b,startAngle:h,endAngle:_,padAngle:v};return m}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:zx(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:zx(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:zx(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:zx(+e),o):a},o}var V5t=o((()=>{Qx(),Bx(),L5t(),z5t(),Jx()}));function H5t(e){return new W5t(e,!0)}function U5t(e){return new W5t(e,!1)}var W5t,G5t=o((()=>{W5t=class{constructor(e,t){this._context=e,this._x=t}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,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}})),K5t,q5t=o((()=>{Jx(),K5t={draw(e,t){let n=Wx(t/Gx);e.moveTo(n,0),e.arc(0,0,n,0,qx)}}})),J5t,Y5t=o((()=>{Jx(),J5t={draw(e,t){let n=Wx(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}}})),X5t,Z5t,Q5t,$5t=o((()=>{Jx(),X5t=Wx(1/3),Z5t=X5t*2,Q5t={draw(e,t){let n=Wx(t/Z5t),r=n*X5t;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}}})),e7t,t7t=o((()=>{Jx(),e7t={draw(e,t){let n=Wx(t),r=-n/2;e.rect(r,r,n,n)}}})),n7t,r7t,i7t,a7t,o7t,s7t=o((()=>{Jx(),n7t=.8908130915292852,r7t=Ux(Gx/10)/Ux(7*Gx/10),i7t=Ux(qx/10)*r7t,a7t=-Hx(qx/10)*r7t,o7t={draw(e,t){let n=Wx(t*n7t),r=i7t*n,i=a7t*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=qx*t/5,o=Hx(a),s=Ux(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}}})),c7t,l7t,u7t=o((()=>{Jx(),c7t=Wx(3),l7t={draw(e,t){let n=-Wx(t/(c7t*3));e.moveTo(0,n*2),e.lineTo(-c7t*n,-n),e.lineTo(c7t*n,-n),e.closePath()}}})),tS,nS,d7t,f7t,p7t,m7t=o((()=>{Jx(),tS=-.5,nS=Wx(3)/2,d7t=1/Wx(12),f7t=(d7t/2+1)*3,p7t={draw(e,t){let n=Wx(t/f7t),r=n/2,i=n*d7t,a=r,o=n*d7t+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(tS*r-nS*i,nS*r+tS*i),e.lineTo(tS*a-nS*o,nS*a+tS*o),e.lineTo(tS*s-nS*l,nS*s+tS*l),e.lineTo(tS*r+nS*i,tS*i-nS*r),e.lineTo(tS*a+nS*o,tS*o-nS*a),e.lineTo(tS*s+nS*l,tS*l-nS*s),e.closePath()}}}));function h7t(e,t){let n=null,r=v5t(i);e=typeof e==`function`?e:zx(e||K5t),t=typeof t==`function`?t:zx(t===void 0?64:+t);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:zx(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:zx(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}var g7t=o((()=>{Bx(),Xx(),q5t()}));function rS(){}var _7t=o((()=>{}));function v7t(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function y7t(e){this._context=e}function iS(e){return new y7t(e)}var b7t=o((()=>{y7t.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:v7t(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:v7t(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function x7t(e){this._context=e}function S7t(e){return new x7t(e)}var C7t=o((()=>{_7t(),b7t(),x7t.prototype={areaStart:rS,areaEnd:rS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:v7t(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function w7t(e){this._context=e}function T7t(e){return new w7t(e)}var E7t=o((()=>{b7t(),w7t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:v7t(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function D7t(e,t){this._basis=new y7t(e),this._beta=t}var O7t,k7t=o((()=>{b7t(),D7t.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*a),this._beta*t[s]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}},O7t=(function e(t){function n(e){return t===1?new y7t(e):new D7t(e,t)}return n.beta=function(t){return e(+t)},n})(.85)}));function A7t(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function j7t(e,t){this._context=e,this._k=(1-t)/6}var M7t,N7t=o((()=>{j7t.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:A7t(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:A7t(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},M7t=(function e(t){function n(e){return new j7t(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function P7t(e,t){this._context=e,this._k=(1-t)/6}var F7t,I7t=o((()=>{_7t(),N7t(),P7t.prototype={areaStart:rS,areaEnd:rS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:A7t(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},F7t=(function e(t){function n(e){return new P7t(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function L7t(e,t){this._context=e,this._k=(1-t)/6}var R7t,z7t=o((()=>{N7t(),L7t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A7t(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},R7t=(function e(t){function n(e){return new L7t(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function B7t(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/d,o=(o*u+e._y1*e._l23_2a-n*e._l12_2a)/d}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function V7t(e,t){this._context=e,this._alpha=t}var H7t,U7t=o((()=>{Jx(),N7t(),V7t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:B7t(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},H7t=(function e(t){function n(e){return t?new V7t(e,t):new j7t(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function W7t(e,t){this._context=e,this._alpha=t}var G7t,K7t=o((()=>{I7t(),_7t(),U7t(),W7t.prototype={areaStart:rS,areaEnd:rS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:B7t(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},G7t=(function e(t){function n(e){return t?new W7t(e,t):new P7t(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function q7t(e,t){this._context=e,this._alpha=t}var J7t,Y7t=o((()=>{z7t(),U7t(),q7t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:B7t(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},J7t=(function e(t){function n(e){return t?new q7t(e,t):new L7t(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function X7t(e){this._context=e}function Z7t(e){return new X7t(e)}var Q7t=o((()=>{_7t(),X7t.prototype={areaStart:rS,areaEnd:rS,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}}));function $7t(e){return e<0?-1:1}function e9t(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return($7t(a)+$7t(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function t9t(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function n9t(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function r9t(e){this._context=e}function i9t(e){this._context=new a9t(e)}function a9t(e){this._context=e}function o9t(e){return new r9t(e)}function s9t(e){return new i9t(e)}var c9t=o((()=>{r9t.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:n9t(this,this._t0,t9t(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,n9t(this,t9t(this,n=e9t(this,e,t)),n);break;default:n9t(this,this._t0,n=e9t(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(i9t.prototype=Object.create(r9t.prototype)).point=function(e,t){r9t.prototype.point.call(this,t,e)},a9t.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}}}));function l9t(e){this._context=e}function u9t(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t{l9t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=u9t(e),i=u9t(t),a=0,o=1;o{p9t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}}}));function aS(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n{}));function v9t(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}var y9t=o((()=>{}));function b9t(e,t){return e[t]}function x9t(e){let t=[];return t.key=e,t}function S9t(){var e=zx([]),t=v9t,n=aS,r=b9t;function i(i){var a=Array.from(e.apply(this,arguments),x9t),o,s=a.length,l=-1,u;for(let e of i)for(o=0,++l;o{Qx(),Bx(),oS(),y9t()}));function w9t(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i{oS()}));function E9t(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n{oS()}));function O9t(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r{oS()})),A9t=o((()=>{E5t(),F5t(),N5t(),V5t(),k5t(),Qx(),Bx(),G5t(),Xx(),g7t(),Jx(),q5t(),Y5t(),$5t(),t7t(),s7t(),u7t(),m7t(),C7t(),E7t(),b7t(),k7t(),I7t(),z7t(),N7t(),K7t(),Y7t(),U7t(),Q7t(),c9t(),f9t(),_9t(),C9t(),T9t(),oS(),D9t(),k9t(),y9t()})),j9t=o((()=>{A9t()}));function M9t(){return M9t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{B9t=d(p()),j9t(),ze(),Lx(),_x(),V9t=[`type`,`size`,`sizeType`],H9t={symbolCircle:K5t,symbolCross:J5t,symbolDiamond:Q5t,symbolSquare:e7t,symbolStar:o7t,symbolTriangle:l7t,symbolWye:p7t},U9t=Math.PI/180,W9t=e=>H9t[`symbol${Ix(e)}`]||K5t,G9t=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*U9t;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},K9t=(e,t)=>{H9t[`symbol${Ix(e)}`]=t},sS=e=>{var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=P9t(P9t({},R9t(e,V9t)),{},{type:n,size:i,sizeType:o}),l=`circle`;typeof n==`string`&&(l=n);var u=()=>{var e=W9t(l),t=h7t().type(e).size(G9t(i,o,l))();if(t!==null)return t},d=s.className,f=s.cx,p=s.cy,m=gx(s);return jx(f)&&jx(p)&&jx(i)?B9t.createElement(`path`,M9t({},m,{className:Re(`recharts-symbols`,d),transform:`translate(${f}, ${p})`,d:u()})):null},sS.registerSymbol=K9t})),J9t,Y9t,X9t,Z9t,cS,Q9t,lS=o((()=>{J9t=d(p()),i8t(),Y9t=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,X9t=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,J9t.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{n8t(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},Z9t=(e,t,n)=>r=>(e(t,n,r),null),cS=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];n8t(i)&&typeof a==`function`&&(r||(r={}),r[i]=Z9t(a,t,n))}),r},Q9t=e=>Array.isArray(e)&&e.length>0}));function $9t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function een(e){for(var t=1;t(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}var dS=o((()=>{}));function ien(){return ien=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var f=t.formatter||i,p=Re({"recharts-legend-item":!0,[`legend-item-${r}`]:!0,inactive:t.inactive});if(t.type===`none`)return null;var m=typeof s==`object`?oen({},s):{};m.color=t.inactive?a:m.color||t.color,m.whiteSpace??(m.whiteSpace=`normal`),m.overflowWrap??(m.overflowWrap=`break-word`);var h=f?f(t.value,t,r):t.value;return fS.createElement(`li`,ien({className:p,style:u,key:`legend-item-${r}`},cS(e,t,r)),fS.createElement(_8t,{width:n,height:n,viewBox:l,style:d,"aria-label":t.value==null?`legend icon`:`${t.value} legend icon`},fS.createElement(den,{data:t,iconType:o,inactiveColor:a})),fS.createElement(`span`,{className:`recharts-legend-item-text`,style:m},h))})}var fS,pS,pen,men,hen=o((()=>{fS=d(p()),ze(),v8t(),q9t(),lS(),dS(),pS=32,pen={align:`center`,iconSize:14,inactiveColor:`#ccc`,layout:`horizontal`,verticalAlign:`middle`,labelStyle:{}},men=e=>{var t=uS(e,pen),n=t.payload,r=t.layout,i=t.align;if(!n||!n.length)return null;var a={padding:0,margin:0,textAlign:r===`horizontal`?i:`left`};return fS.createElement(`ul`,{className:`recharts-default-legend`,style:a},fS.createElement(fen,ien({},t,{payload:n})))}}));function gen(e,t){let n=new Map;for(let r=0;r{}));function ven(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}var yen=o((()=>{}));function ben(e){return e}var xen=o((()=>{}));function Sen(e){return Number.isSafeInteger(e)&&e>=0}var Cen=o((()=>{}));function mS(e){return e!=null&&typeof e!=`function`&&Sen(e.length)}var hS=o((()=>{Cen()}));function wen(e){return function(t){return bx(t,e)}}var Ten=o((()=>{z8t()}));function gS(e){return e==null||typeof e!=`object`&&typeof e!=`function`}var _S=o((()=>{}));function Een(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var Den=o((()=>{}));function Oen(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var ken=o((()=>{}));function vS(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var yS=o((()=>{})),Aen,bS,xS,SS,jen,Men,Nen,Pen,Fen,Ien,Len,Ren,CS,zen,Ben,Ven,Hen,Uen,Wen,Gen,Ken,qen,Jen,Yen,Xen,Zen,Qen=o((()=>{Aen=`[object RegExp]`,bS=`[object String]`,xS=`[object Number]`,SS=`[object Boolean]`,jen=`[object Arguments]`,Men=`[object Symbol]`,Nen=`[object Date]`,Pen=`[object Map]`,Fen=`[object Set]`,Ien=`[object Array]`,Len=`[object Function]`,Ren=`[object ArrayBuffer]`,CS=`[object Object]`,zen=`[object Error]`,Ben=`[object DataView]`,Ven=`[object Uint8Array]`,Hen=`[object Uint8ClampedArray]`,Uen=`[object Uint16Array]`,Wen=`[object Uint32Array]`,Gen=`[object BigUint64Array]`,Ken=`[object Int8Array]`,qen=`[object Int16Array]`,Jen=`[object Int32Array]`,Yen=`[object BigInt64Array]`,Xen=`[object Float32Array]`,Zen=`[object Float64Array]`})),$en,etn=o((()=>{$en=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()}));function wS(e){return $en.Buffer!==void 0&&$en.Buffer.isBuffer(e)}var TS=o((()=>{etn()}));function ttn(e,t){return ES(e,void 0,e,new Map,t)}function ES(e,t,n,r=new Map,i=void 0){let a=i==null?void 0:i(e,t,n,r);if(a!==void 0)return a;if(gS(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a{_S(),Den(),ken(),yS(),Qen(),TS()}));function itn(e){return ES(e,void 0,e,new Map,void 0)}var atn=o((()=>{rtn()}));function otn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}var stn=o((()=>{}));function ctn(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}var ltn=o((()=>{}));function utn(e,t,n){return typeof n==`function`?dtn(e,t,function e(t,r,i,a,o,s){let l=n(t,r,i,a,o,s);return l===void 0?dtn(t,r,e,s,!1):!!l},new Map,!0):utn(e,t,()=>void 0)}function dtn(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return ftn(e,t,n,r,i);case`function`:return Object.keys(t).length>0?dtn(e,{...t},n,r,i):otn(e,t);default:return ctn(e)&&i?typeof t!=`string`||t===``:otn(e,t)}}function ftn(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return mtn(e,t,n,r);if(t instanceof Map)return ptn(e,t,n,r);if(t instanceof Set)return htn(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)gS(e)&&(e=Object(e));else{let t=vS(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r!=null&&r.has(t))return r.get(t)===e;r==null||r.set(t,e);try{for(let i=0;i{_S(),yS(),stn(),ltn()}));function _tn(e,t){return utn(e,t,()=>void 0)}var vtn=o((()=>{gtn()}));function ytn(e){return e=itn(e),t=>_tn(t,e)}var btn=o((()=>{atn(),vtn()}));function xtn(e,t){return ttn(e,(n,r,i,a)=>{let o=t==null?void 0:t(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(vS(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),DS(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case xS:case bS:case SS:{let t=new e.constructor(e==null?void 0:e.valueOf());return DS(t,e),t}case jen:{let t={};return DS(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}var Stn=o((()=>{yS(),Qen(),rtn()}));function Ctn(e){return xtn(e)}var wtn=o((()=>{Stn()}));function Ttn(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e{Etn=/^(?:0|[1-9]\d*)$/}));function Otn(e){return typeof e==`object`&&!!e&&vS(e)===`[object Arguments]`}var ktn=o((()=>{yS()}));function Atn(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&E8t(t)&&!(t in Object(e))?I8t(t):[t],n.length===0)return!1;let r=e;for(let e=0;e{O8t(),A8t(),L8t(),Dtn(),ktn()}));function Mtn(e,t){switch(typeof e){case`object`:Object.is(e==null?void 0:e.valueOf(),-0)&&(e=`-0`);break;case`number`:e=k8t(e)}return t=Ctn(t),function(n){let r=bx(n,e);return r===void 0?Atn(n,e):t===void 0?r===void 0:_tn(r,t)}}var Ntn=o((()=>{A8t(),z8t(),vtn(),wtn(),jtn()}));function Ptn(e){if(e==null)return ben;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?Mtn(e[0],e[1]):ytn(e);default:return wen(e)}}var Ftn=o((()=>{xen(),Ten(),btn(),Ntn()}));function Itn(e){return e===0?0:e}var Ltn=o((()=>{}));function Rtn(e,t=ben){return mS(e)?gen(Array.from(e),ven(Ptn(t),1)).map(Itn):[]}var ztn=o((()=>{_en(),yen(),xen(),hS(),Ftn(),Ltn()})),Btn=o((()=>{ztn()}));function Vtn(e,t,n){return t===!0?Rtn(e,n):typeof t==`function`?Rtn(e,t):e}var Htn=o((()=>{Btn()})),Utn,Wtn,Gtn=o((()=>{Utn=d(p()),Wtn=(0,Utn.createContext)(null)}));function OS(e){var t=(0,qtn.useContext)(Wtn),n=(0,qtn.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:AS,[t,e]);return(0,Ktn.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Ytn,t?t.store.getState:AS,t?t.store.getState:AS,n,Xtn)}var Ktn,qtn,Jtn,kS,AS,Ytn,Xtn,jS=o((()=>{Ktn=tMt(),qtn=d(p()),Gtn(),Jtn=e=>e,kS=()=>{var e=(0,qtn.useContext)(Wtn);return e?e.store.dispatch:Jtn},AS=()=>{},Ytn=()=>AS,Xtn=(e,t)=>e===t}));function Ztn(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Qtn(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}function $tn(e){let t=Array.isArray(e[0])?e[0]:e;return Qtn(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function enn(e,t){let n=[],{length:r}=e;for(let i=0;i{n=tnn(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function inn(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Ztn(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:l=[],argsMemoize:u=rnn,argsMemoizeOptions:d=[]}={...n,...a},f=ann(l),p=ann(d),m=$tn(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=u(function(){r++;let e=enn(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var ann,onn,snn,cnn,lnn,unn,MS,NS=o((()=>{ann=e=>Array.isArray(e)?e:[e],onn=class{constructor(e){this.value=e}deref(){return this.value}},snn=()=>typeof WeakRef>`u`?onn:WeakRef,cnn=snn(),lnn=0,unn=1,MS=inn(rnn)}));function dnn(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a{}));function pnn(e,t,n){return ctn(n)&&(typeof t==`number`&&mS(n)&&Ttn(t)&&t{stn(),hS(),ltn(),Dtn()}));function hnn(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var gnn,_nn=o((()=>{gnn=(e,t,n)=>{if(e!==t){let r=hnn(e),i=hnn(t);if(r===i&&r===0){if(et)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0}}));function vnn(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||j8t(e)?!0:typeof e==`string`&&(bnn.test(e)||!ynn.test(e))||t!=null&&Object.hasOwn(t,e)}var ynn,bnn,xnn=o((()=>{M8t(),ynn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bnn=/^\w*$/}));function Snn(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=mS(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||vnn(e)?e:{key:e,path:I8t(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;re.original)}var Cnn=o((()=>{hS(),L8t(),_nn(),xnn()}));function wnn(e,...t){let n=t.length;return n>1&&pnn(e,t[0],t[1])?t=[]:n>2&&pnn(t[0],t[1],t[2])&&(t=[t[0]]),Snn(e,dnn(t),[`asc`])}var Tnn=o((()=>{fnn(),mnn(),Cnn()})),Enn=o((()=>{Tnn()})),Dnn,Onn,knn,Ann,jnn=o((()=>{NS(),Enn(),Dnn=e=>e.legend.settings,Onn=e=>e.legend.size,knn=e=>e.legend.payload,Ann=MS([knn,Dnn],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?wnn(r,n):r})}));function Mnn(){return OS(Ann)}var Nnn=o((()=>{jS(),jnn()}));function Pnn(e,t){return znn(e)||Rnn(e,t)||Inn(e,t)||Fnn()}function Fnn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Inn(e,t){if(e){if(typeof e==`string`)return Lnn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lnn(e,t):void 0}}function Lnn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nFS||Math.abs(e.left-t.left)>FS||Math.abs(e.top-t.top)>FS||Math.abs(e.width-t.width)>FS}function Vnn(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function Hnn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=Pnn((0,PS.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,PS.useRef)(null),a=(0,PS.useRef)(n);a.current=n;var o=(0,PS.useCallback)(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=Vnn(e);if(Bnn(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=Vnn(e);Bnn(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,PS.useEffect)(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}var PS,FS,Unn=o((()=>{PS=d(p()),FS=1}));function IS(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function Wnn(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Gnn(e,t,n){if(typeof e!=`function`)throw Error(IS(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(IS(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(IS(1));return n(Gnn)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,l=!1;function u(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function d(){if(l)throw Error(IS(3));return i}function f(e){if(typeof e!=`function`)throw Error(IS(4));if(l)throw Error(IS(5));let t=!0;u();let n=s++;return o.set(n,e),function(){if(t){if(l)throw Error(IS(6));t=!1,u(),o.delete(n),a=null}}}function p(e){if(!Wnn(e))throw Error(IS(7));if(e.type===void 0)throw Error(IS(8));if(typeof e.type!=`string`)throw Error(IS(17));if(l)throw Error(IS(9));try{l=!0,i=r(i,e)}finally{l=!1}return(a=o).forEach(e=>{e()}),e}function m(e){if(typeof e!=`function`)throw Error(IS(10));r=e,p({type:LS.REPLACE})}function h(){let e=f;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(IS(11));function n(){let e=t;e.next&&e.next(d())}return n(),{unsubscribe:e(n)}},[Znn](){return this}}}return p({type:LS.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[Znn]:h}}function Knn(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:LS.INIT})===void 0)throw Error(IS(12));if(n(void 0,{type:LS.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(IS(13))})}function qnn(e){let t=Object.keys(e),n={};for(let r=0;re:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Ynn(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(IS(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=Jnn(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function Xnn(e){return Wnn(e)&&`type`in e&&typeof e.type==`string`}var Znn,Qnn,LS,$nn=o((()=>{Znn=typeof Symbol==`function`&&Symbol.observable||`@@observable`,Qnn=()=>Math.random().toString(36).substring(7).split(``).join(`.`),LS={INIT:`@@redux/INIT${Qnn()}`,REPLACE:`@@redux/REPLACE${Qnn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qnn()}`}}));function RS(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}function zS(e){var t;return e?ern(e)||$S(e)||!!e[jrn]||!!((t=e[KS])!=null&&t[jrn])||eC(e)||tC(e):!1}function ern(e){if(!e||!Lrn(e))return!1;let t=GS(e);if(t===null||t===WS[qS])return!0;let n=WS.hasOwnProperty.call(t,KS)&&t[KS];if(n===Object)return!0;if(!nC(n))return!1;let r=Prn.get(n);return r===void 0&&(r=Function.toString.call(n),Prn.set(n,r)),r===Nrn}function trn(e,t,n=!0){BS(e)===0?(n?Reflect.ownKeys(e):WS.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function BS(e){let t=e[US];return t?t.type_:$S(e)?1:eC(e)?2:tC(e)?3:0}function nrn(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function rrn(e){let t=+e;return Number.isInteger(t)&&String(t)===e}function irn(e,t){if(eC(e))return new Map(e);if(tC(e))return new Set(e);if($S(e))return Array[qS].slice.call(e);let n=ern(e);if(t===!0||t===`class_only`&&!n){let t=WS.getOwnPropertyDescriptors(e);delete t[US];let n=Reflect.ownKeys(t);for(let r=0;r1&&WS.defineProperties(e,{set:iC,add:iC,clear:iC,delete:iC}),WS.freeze(e),t&&trn(e,(e,t)=>{arn(t,!0)},!1)),e}function orn(){RS(2)}function srn(e){return e===null||!Lrn(e)||WS.isFrozen(e)}function VS(e){let t=Hrn[e];return t||RS(0,e),t}function crn(e,t){t&&(e.patchPlugin_=VS(Brn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function lrn(e){urn(e),e.drafts_.forEach(drn),e.drafts_=null}function urn(e){e===oC&&(oC=e.parent_)}function drn(e){let t=e[US];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function frn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[US].modified_&&(lrn(t),RS(4)),zS(e)&&(e=prn(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[US].base_,e,t)}else e=prn(t,n);return mrn(t,e,!0),lrn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Arn?void 0:e}function prn(e,t){if(srn(t))return t;let n=t[US];if(!n)return brn(t,e.handledSet_,e);if(!sC(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);vrn(n,e)}return n.copy_}function mrn(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&arn(t,n)}function hrn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}function grn(e,t,n,r){let i=rC(e),a=e.type_;if(r!==void 0&&Irn(i,r,a)===t){QS(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;trn(i,(e,n)=>{if(ZS(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??qrn;for(let e of o)QS(i,e,n,a)}function _rn(e,t,n){e.callbacks_.push(function(r){var i;let a=t;if(!a||!sC(a,r))return;(i=r.mapSetPlugin_)==null||i.fixSetContents(a);let o=zrn(a);grn(e,a.draft_??a,o,n),vrn(a,r)})}function vrn(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}hrn(e)}}function yrn(e,t,n){let{scope_:r}=e;if(ZS(n)){let i=n[US];sC(i,r)&&i.callbacks_.push(function(){Drn(e),grn(e,n,zrn(i),t)})}else zS(n)&&e.callbacks_.push(function(){let i=rC(e);e.type_===3?i.has(n)&&brn(n,r.handledSet_,r):Irn(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&brn(Irn(e.copy_,t,e.type_),r.handledSet_,r)})}function brn(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||ZS(e)||t.has(e)||!zS(e)||srn(e)||(t.add(e),trn(e,(r,i)=>{if(ZS(i)){let t=i[US];sC(t,n)&&(QS(e,r,zrn(t),e.type_),hrn(t))}else zS(i)&&brn(i,t,n)})),e}function xrn(e,t){let n=$S(e),r={type_:+!!n,scope_:t?t.scope_:Wrn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=cC;n&&(i=[r],a=lC);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}function Srn(e,t){let n=e[US];return(n?rC(n):e)[t]}function Crn(e,t,n){var r;return e.type_!==1||!e.allIndicesReassigned_||(r=e.assigned_)!=null&&r.get(t)||!zS(n)||n[US]?!1:e.baseRefs_.has(n)}function wrn(e,t,n){var r;let i=Trn(t,n);return i?XS in i?i[XS]:(r=i.get)==null?void 0:r.call(e.draft_):void 0}function Trn(e,t){if(!(t in e))return;let n=GS(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=GS(n)}}function Ern(e){e.modified_||(e.modified_=!0,e.parent_&&Ern(e.parent_))}function Drn(e){e.copy_||(e.assigned_=new Map,e.copy_=irn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Orn(e,t,n,r){let[i,a]=eC(t)?VS(aC).proxyMap_(t,n):tC(t)?VS(aC).proxySet_(t,n):xrn(t,n);return((n==null?void 0:n.scope_)??Wrn()).drafts_.push(i),a.callbacks_=(n==null?void 0:n.callbacks_)??[],a.key_=r,n&&r!==void 0?_rn(n,a,r):a.callbacks_.push(function(e){var t;(t=e.mapSetPlugin_)==null||t.fixSetContents(a);let{patchPlugin_:n}=e;a.modified_&&n&&n.generatePatches_(a,[],e)}),i}function HS(e){return ZS(e)||RS(10,e),krn(e)}function krn(e){if(!zS(e)||srn(e))return e;let t=e[US],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=irn(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=irn(e,!0);return trn(n,(e,t)=>{QS(n,e,krn(t))},r),t&&(t.finalized_=!1),n}var Arn,jrn,US,WS,GS,KS,qS,Mrn,JS,YS,XS,ZS,Nrn,Prn,Frn,Irn,QS,$S,eC,tC,Lrn,nC,Rrn,rC,zrn,iC,aC,Brn,Vrn,Hrn,Urn,oC,Wrn,Grn,Krn,sC,qrn,cC,lC,Jrn,Yrn,Xrn,Zrn,uC,dC=o((()=>{Arn=Symbol.for(`immer-nothing`),jrn=Symbol.for(`immer-draftable`),US=Symbol.for(`immer-state`),WS=Object,GS=WS.getPrototypeOf,KS=`constructor`,qS=`prototype`,Mrn=`configurable`,JS=`enumerable`,YS=`writable`,XS=`value`,ZS=e=>!!e&&!!e[US],Nrn=WS[qS][KS].toString(),Prn=new WeakMap,Frn=(e,t,n=BS(e))=>n===2?e.has(t):WS[qS].hasOwnProperty.call(e,t),Irn=(e,t,n=BS(e))=>n===2?e.get(t):e[t],QS=(e,t,n,r=BS(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n},$S=Array.isArray,eC=e=>e instanceof Map,tC=e=>e instanceof Set,Lrn=e=>typeof e==`object`,nC=e=>typeof e==`function`,Rrn=e=>typeof e==`boolean`,rC=e=>e.copy_||e.base_,zrn=e=>e.modified_?e.copy_:e.base_,iC={[XS]:orn},aC=`MapSet`,Brn=`Patches`,Vrn=`ArrayMethods`,Hrn={},Urn=e=>!!Hrn[e],Wrn=()=>oC,Grn=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Urn(aC)?VS(aC):void 0,arrayMethodsPlugin_:Urn(Vrn)?VS(Vrn):void 0}),Krn=e=>oC=Grn(oC,e),sC=(e,t)=>e.scope_===t,qrn=[],cC={get(e,t){if(t===US)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=rC(e);if(!Frn(i,t,e.type_))return wrn(e,i,t);let a=i[t];if(e.finalized_||!zS(a)||r&&e.operationMethod&&n!=null&&n.isMutatingArrayMethod(e.operationMethod)&&rrn(t))return a;if(a===Srn(e.base_,t)||Crn(e,t,a)){Drn(e);let n=e.type_===1?+t:t,r=Orn(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in rC(e)},ownKeys(e){return Reflect.ownKeys(rC(e))},set(e,t,n){let r=Trn(rC(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Srn(rC(e),t),i=r==null?void 0:r[US];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(nrn(n,r)&&(n!==void 0||Frn(e.base_,t,e.type_)))return!0;Drn(e),Ern(e)}return e.copy_[t]===n&&(n!==void 0||Frn(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),yrn(e,t,n)),!0},deleteProperty(e,t){return Drn(e),Srn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ern(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=rC(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[YS]:!0,[Mrn]:e.type_!==1||t!==`length`,[JS]:r[JS],[XS]:n[t]}},defineProperty(){RS(11)},getPrototypeOf(e){return GS(e.base_)},setPrototypeOf(){RS(12)}},lC={};for(let e in cC){let t=cC[e];lC[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}lC.deleteProperty=function(e,t){return lC.set.call(this,e,t,void 0)},lC.set=function(e,t,n){return cC.set.call(this,e[0],t,n,e[0])},Jrn=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(nC(e)&&!nC(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}nC(t)||RS(6),n!==void 0&&!nC(n)&&RS(7);let r;if(zS(e)){let i=Krn(this),a=Orn(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?lrn(i):urn(i)}return crn(i,n),frn(r,i)}if(!e||!Lrn(e)){if(r=t(e),r===void 0&&(r=e),r===Arn&&(r=void 0),this.autoFreeze_&&arn(r,!0),n){let t=[],i=[];VS(Brn).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}RS(1,e)},this.produceWithPatches=(e,t)=>{if(nC(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Rrn(e==null?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Rrn(e==null?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Rrn(e==null?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){zS(e)||RS(8),ZS(e)&&(e=HS(e));let t=Krn(this),n=Orn(t,e,void 0);return n[US].isManual_=!0,urn(t),n}finishDraft(e,t){let n=e&&e[US];(!n||!n.isManual_)&&RS(9);let{scope_:r}=n;return crn(r,t),frn(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=VS(Brn).applyPatches_;return ZS(e)?r(e,t):this.produce(e,e=>r(e,t))}},Yrn=globalThis.Iterator,Yrn==null||Yrn.from,Xrn=new Jrn,Zrn=Xrn.produce,uC=e=>e}));function Qrn(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var $rn,ein,tin=o((()=>{$rn=Qrn(),ein=Qrn}));function fC(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(mC(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Xnn(t)&&t.type===e,n}function nin(e){return zS(e)?Zrn(e,()=>{}):e}function pC(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function rin(e){return typeof e==`boolean`}function iin(e){let t=bin(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},l;if(typeof n==`function`)l=n;else if(Wnn(n))l=qnn(n);else throw Error(mC(1));let u;u=typeof r==`function`?r(t):t();let d=Jnn;i&&(d=vin({trace:!1,...typeof i==`object`&&i}));let f=Ynn(...u),p=Tin(f),m=typeof s==`function`?s(p):p(),h=d(...m);return Gnn(l,o,h)}function ain(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(mC(28));if(r in t)throw Error(mC(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function oin(e){return typeof e==`function`}function sin(e,t){let[n,r,i]=ain(t),a;if(oin(e))a=()=>nin(e());else{let t=nin(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(ZS(e)){let r=n(e,t);return r===void 0?e:r}if(zS(e))return Zrn(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(mC(9))}return r}}return e},e)}return o.getInitialState=a,o}function cin(e,t){return`${e}/${t}`}function lin({creators:e}={}){var t;let n=e==null||(t=e.asyncThunk)==null?void 0:t[Oin];return function(e){let{name:t,reducerPath:r=t}=e;if(!t)throw Error(mC(11));let i=(typeof e.reducers==`function`?e.reducers(din()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(mC(12));if(n in o.sliceCaseReducersByType)throw Error(mC(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:cin(t,r),createNotation:typeof e.reducers==`function`};pin(a)?hin(o,a,s,n):fin(o,a,s)});function l(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?ain(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return sin(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let u=e=>e,d=new Map,f=new WeakMap,p;function m(e,t){return p||(p=l()),p(e,t)}function h(){return p||(p=l()),p.getInitialState()}function g(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=pC(f,r,h)),i}function i(t=u){return pC(pC(d,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=uin(a,t,()=>pC(f,t,h),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let _={name:t,reducer:m,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:h,...g(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:m},n),{..._,...g(i,!0)}}};return _}}function uin(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}function din(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function fin({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!min(r))throw Error(mC(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?fC(e,o):fC(e))}function pin(e){return e._reducerDefinitionType===`asyncThunk`}function min(e){return e._reducerDefinitionType===`reducerWithPrepare`}function hin({type:e,reducerName:t},n,r,i){if(!i)throw Error(mC(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:u,options:d}=n,f=i(e,a,d);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:o||gin,pending:s||gin,rejected:l||gin,settled:u||gin})}function gin(){}function _in(e,t){let n=bC;return new Promise((r,i)=>{let a=()=>i(new yC(e.reason));e.aborted?a():(n=Lin(e,a),t.finally(()=>n()).then(r,i))}).finally(()=>{n=bC})}function mC(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var vin,yin,bin,xin,hC,Sin,Cin,win,Tin,Ein,Din,Oin,gC,kin,Ain,jin,_C,Min,Nin,vC,Pin,yC,Fin,bC,Iin,Lin,xC,Rin,SC,zin,CC,Bin,wC,Vin,Hin,Uin,Win,Gin,Kin,qin,Jin,Yin,Xin,Zin,Qin,TC,EC=o((()=>{$nn(),dC(),tin(),D(),$nn(),vin=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?Jnn:Jnn.apply(null,arguments)},typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,yin=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}},bin=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new yin;return t&&(rin(t)?a.push($rn):a.push(ein(t.extraArgument))),a},xin=`RTK_autoBatch`,hC=()=>e=>({payload:e,meta:{[xin]:!0}}),Sin=e=>t=>{setTimeout(t,e)},Cin=(e,t)=>n=>{let r=!1,i,a,o=()=>{r||(r=!0,cancelAnimationFrame(i),clearTimeout(a),n())};i=e(o),a=setTimeout(o,t)},win=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,l=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?Cin(window.requestAnimationFrame,100):Sin(10):e.type===`callback`?e.queueNotification:Sin(e.timeout),u=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{var t;return i=!(e!=null&&(t=e.meta)!=null&&t[xin]),a=!i,a&&(o||(o=!0,l(u))),r.dispatch(e)}finally{i=!0}}})},Tin=e=>function(t){let{autoBatch:n=!0}=t??{},r=new yin(e);return n&&r.push(win(typeof n==`object`?n:void 0)),r},Ein=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,Din=(e=21)=>{let t=``,n=e;for(;n--;)t+=Ein[Math.random()*64|0];return t},Oin=Symbol.for(`rtk-slice-createasyncthunk`),gC=lin(),kin=`task`,Ain=`listener`,jin=`completed`,_C=`cancelled`,Min=`task-${_C}`,Nin=`task-${jin}`,vC=`${Ain}-${_C}`,Pin=`${Ain}-${jin}`,yC=class{constructor(e){E(this,`code`,void 0),E(this,`name`,`TaskAbortError`),E(this,`message`,void 0),this.code=e,this.message=`${kin} ${_C} (reason: ${e})`}},Fin=(e,t)=>{if(typeof e!=`function`)throw TypeError(mC(32))},bC=()=>{},Iin=(e,t=bC)=>(e.catch(t),e),Lin=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),xC=e=>{if(e.aborted)throw new yC(e.reason)},Rin=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof yC?`cancelled`:`rejected`,error:e}}finally{t==null||t()}},SC=e=>t=>Iin(_in(e,t).then(t=>(xC(e),t))),zin=e=>{let t=SC(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:CC}=Object,Bin={},wC=`listenerMiddleware`,Vin=(e,t)=>{let n=t=>Lin(e,()=>t.abort(e.reason));return(r,i)=>{Fin(r,`taskExecutor`);let a=new AbortController;n(a);let o=Rin(async()=>{xC(e),xC(a.signal);let t=await r({pause:SC(a.signal),delay:zin(a.signal),signal:a.signal});return xC(a.signal),t},()=>a.abort(Nin));return i!=null&&i.autoJoin&&t.push(o.catch(bC)),{result:SC(e)(o),cancel(){a.abort(Min)}}}},Hin=(e,t)=>{let n=async(n,r)=>{xC(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await _in(t,Promise.race(a));return xC(t),e}finally{i()}};return((e,t)=>Iin(n(e,t)))},Uin=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=fC(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(mC(21));return Fin(a,`options.listener`),{predicate:i,type:t,effect:a}},Win=CC(e=>{let{type:t,predicate:n,effect:r}=Uin(e);return{id:Din(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(mC(22))}}},{withTypes:()=>Win}),Gin=(e,t)=>{let{type:n,effect:r,predicate:i}=Uin(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},Kin=e=>{e.pending.forEach(e=>{e.abort(vC)})},qin=(e,t)=>()=>{for(let e of t.keys())Kin(e);e.clear()},Jin=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Yin=CC(fC(`${wC}/add`),{withTypes:()=>Yin}),Xin=fC(`${wC}/removeAll`),Zin=CC(fC(`${wC}/remove`),{withTypes:()=>Zin}),Qin=(...e)=>{console.error(`${wC}/error`,...e)},TC=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Qin}=e;Fin(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t!=null&&t.cancelActive&&Kin(e)}),l=(e=>{let n=Gin(t,e)??Win(e);return s(n)});CC(l,{withTypes:()=>l});let u=e=>{let n=Gin(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Kin(n)),!!n};CC(u,{withTypes:()=>u});let d=async(e,n,s,u)=>{let d=new AbortController,f=Hin(l,d.signal),p=[];try{e.pending.add(d),r(e),await Promise.resolve(e.effect(n,CC({},s,{getOriginalState:u,condition:(e,t)=>f(e,t).then(Boolean),take:f,delay:zin(d.signal),pause:SC(d.signal),extra:a,signal:d.signal,fork:Vin(d.signal,p),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==d&&(e.abort(vC),n.delete(e))})},cancel:()=>{d.abort(vC),e.pending.delete(d)},throwIfCancelled:()=>{xC(d.signal)}})))}catch(e){e instanceof yC||Jin(o,e,{raisedBy:`effect`})}finally{await Promise.all(p),d.abort(Pin),i(e),e.pending.delete(d)}},f=qin(t,n);return{middleware:e=>n=>r=>{if(!Xnn(r))return n(r);if(Yin.match(r))return l(r.payload);if(Xin.match(r)){f();return}if(Zin.match(r))return u(r.payload);let i=e.getState(),a=()=>{if(i===Bin)throw Error(mC(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,Jin(o,e,{raisedBy:`predicate`})}s&&d(t,r,e,a)}}}finally{i=Bin}return s},startListening:l,stopListening:u,clearListeners:f}}})),$in,DC,ean,tan,nan,ran,ian,aan=o((()=>{EC(),$in=gC({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),DC=$in.actions,ean=DC.setMargin,tan=DC.setLayout,nan=DC.setChartSize,ran=DC.setScale,ian=$in.reducer}));function oan(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}var san=o((()=>{}));function OC(e){return Number.isFinite(e)}function kC(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}var AC=o((()=>{}));function can(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jC(e){for(var t=1;t{Enn(),xx(),j9t(),Lx(),san(),AC(),e5t(),man=(e,t,n)=>{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,l=t.position,u=t.offset,d=u===void 0?0:u;if(l!=null){if(Z8t(l)){if(l===`top`&&jx(e.top))return jC(jC({},e),{},{top:e.top+(i||0)+d});if(l===`bottom`&&jx(e.bottom))return jC(jC({},e),{},{bottom:e.bottom+(i||0)+d});if(l===`left`&&jx(e.left))return jC(jC({},e),{},{left:e.left+(r||0)+d});if(l===`right`&&jx(e.right))return jC(jC({},e),{},{right:e.right+(r||0)+d})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&jx(e[a]))return jC(jC({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&jx(e[o]))return jC(jC({},e),{},{[o]:e[o]+(i||0)})}return e},FC=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,han=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},gan=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,l=e.isCategorical,u=e.categoricalDomain,d=e.tickCount,f=e.ticks,p=e.niceTicks,m=e.axisType;if(!o)return null;var h=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,g=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/h:0;return g=m===`angleAxis`&&a&&a.length>=2?Ox(a[0]-a[1])*2*g:g,t&&(f||p)?(f||p||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return OC(i)?{coordinate:i+g,value:e,offset:g,index:t}:null}).filter(Ex):l&&u?u.map((e,t)=>{var n=o.map(e);return OC(n)?{coordinate:n+g,value:e,index:t,offset:g}:null}).filter(Ex):o.ticks&&!n&&d!=null?o.ticks(d).map((e,t)=>{var n=o.map(e);return OC(n)?{coordinate:n+g,value:e,index:t,offset:g}:null}).filter(Ex):o.domain().map((e,t)=>{var n=o.map(e);return OC(n)?{coordinate:n+g,value:r?r[e]:e,index:t,offset:g}:null}).filter(Ex)},_an=(e,t)=>{if(!t||t.length!==2||!jx(t[0])||!jx(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!jx(e[0])||e[0]r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])==null?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i=0?(u[0]=a,a+=p,u[1]=a):(u[0]=o,o+=p,u[1]=o)}}}},yan=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])==null?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i=0?(l[0]=a,a+=u,l[1]=a):(l[0]=0,l[1]=0)}}}},ban={sign:van,expand:w9t,none:aS,silhouette:E9t,wiggle:O9t,positive:yan},xan=(e,t,n)=>{var r=ban[n]??aS,i=S9t().keys(t).value((e,t)=>Number(MC(e,t,0))).order(v9t).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=MC(e[i],t[r],0);Array.isArray(a)&&a.length===2&&jx(a[0])&&jx(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i},IC=e=>{var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=MC(a,t.dataKey,t.scale.domain()[o]);if(Fx(s))return null;var l=t.scale.map(s);return jx(l)?l-i/2+r:null},San=e=>{var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},Can=e=>{var t=e.flat(2).filter(jx);return[Math.min(...t),Math.max(...t)]},wan=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Tan=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return wan(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=Can(oan(r,t,n));return!OC(i[0])||!OC(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},Ean=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Dan=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,LC=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=wnn(t,e=>e.coordinate),a=[],o=0,s=1,l=i.length;sp&&(m=Math.min(h,m));return m===1/0?0:m}return n?void 0:0},Oan=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},kan=(e,t)=>t===`centric`?e.angle:e.radius})),zC,BC,Aan,jan,VC=o((()=>{zC=e=>e.layout.width,BC=e=>e.layout.height,Aan=e=>e.layout.scale,jan=e=>e.layout.margin})),HC,UC,Man=o((()=>{NS(),HC=MS(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),UC=MS(e=>e.cartesianAxis.yAxis,e=>Object.values(e))})),Nan,Pan,WC=o((()=>{Nan=`data-recharts-item-index`,Pan=`data-recharts-item-id`}));function Fan(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ian(e){for(var t=1;tt.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Van(e){return UC(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Han(e){return HC(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function Uan(e){return HC(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var Wan,GC,Gan,KC,qC=o((()=>{NS(),jnn(),RC(),VC(),Man(),WC(),Wan=e=>e.brush.height,GC=MS([zC,BC,jan,Wan,Ban,Van,Han,Uan,Dnn,Onn],(e,t,n,r,i,a,o,s,l,u)=>{var d={left:(n.left||0)+i,right:(n.right||0)+a},f=Ian(Ian({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),d),p=f.bottom;f.bottom+=r,f=man(f,l,u);var m=e-f.left-f.right,h=t-f.top-f.bottom;return Ian(Ian({brushBottom:p},f),{},{width:Math.max(m,0),height:Math.max(h,0)})}),Gan=MS(GC,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),KC=MS(zC,BC,(e,t)=>({x:0,y:0,width:e,height:t}))})),Kan,qan,JC,YC=o((()=>{p(),Kan=d(p()),qan=(0,Kan.createContext)(null),JC=()=>(0,Kan.useContext)(qan)!=null})),XC,ZC,Jan=o((()=>{NS(),qC(),VC(),Lx(),XC=e=>e.brush,ZC=MS([XC,GC,jan],(e,t,n)=>({height:e.height,x:jx(e.x)?e.x:t.left,y:jx(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:jx(e.width)?e.width:t.width}))}));function Yan(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),l=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},u=()=>{s&&l(),m()},d=null,f=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,u()},t)},p=()=>{d!==null&&(clearTimeout(d),d=null)},m=()=>{p(),i=void 0,a=null},h=()=>{l()},g=function(...e){if(n!=null&&n.aborted)return;i=this,a=e;let t=d==null;f(),o&&t&&l()};return g.schedule=f,g.cancel=m,g.flush=h,n==null||n.addEventListener(`abort`,m,{once:!0}),g}var Xan=o((()=>{}));function Zan(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,l=null,u=Yan(function(...t){s=e.apply(this,t),l=null},t,{edges:o}),d=function(...t){return a!=null&&(l===null&&(l=Date.now()),Date.now()-l>=a)?((r||i)&&(s=e.apply(this,t)),l=Date.now(),u.cancel(),u.schedule(),s):(u.apply(this,t),s)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),s),d}var Qan=o((()=>{Xan()}));function $an(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return Zan(e,t,{leading:r,maxWait:t,trailing:i})}var eon=o((()=>{Qan()})),ton=o((()=>{eon()})),QC,non=o((()=>{QC=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e)){if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}}}}));function ron(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=$C.width,a=$C.height):i===void 0?i=r&&r>0?void 0:$C.width:a===void 0&&(a=r&&r>0?void 0:$C.height),{width:i,height:a}}var $C,ion,aon,oon,son,con,lon,uon=o((()=>{Lx(),$C={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},ion=(e,t,n)=>{var r=n.width,i=r===void 0?$C.width:r,a=n.height,o=a===void 0?$C.height:a,s=n.aspect,l=n.maxHeight,u=Ax(i)?e:Number(i),d=Ax(o)?t:Number(o);return s&&s>0&&(u?d=u/s:d&&(u=d*s),l&&d!=null&&d>l&&(d=l)),{calculatedWidth:u,calculatedHeight:d}},aon={width:0,height:0,overflow:`visible`},oon={width:0,overflowX:`visible`},son={height:0,overflowY:`visible`},con={},lon=e=>{var t=e.width,n=e.height,r=Ax(t),i=Ax(n);return r&&i?aon:r?oon:i?son:con}}));function don(){return don=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n({width:n,height:r}),[n,r]);return Ton(i)?ew.createElement(Oon.Provider,{value:i},t):null}var ew,tw,Don,Oon,nw,kon,Aon,jon=o((()=>{ze(),ew=d(p()),tw=d(p()),ton(),Lx(),non(),uon(),AC(),Don=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`],Oon=(0,tw.createContext)($C.initialDimension),nw=()=>(0,tw.useContext)(Oon),kon=(0,tw.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?$C.initialDimension:r,a=e.width,o=e.height,s=e.minWidth,l=s===void 0?$C.minWidth:s,u=e.minHeight,d=e.maxHeight,f=e.children,p=e.debounce,m=p===void 0?$C.debounce:p,h=e.id,g=e.className,_=e.onResize,v=e.style,y=v===void 0?{}:v,b=Con(e,Don),x=(0,tw.useRef)(null),S=(0,tw.useRef)();S.current=_,(0,tw.useImperativeHandle)(t,()=>x.current);var C=_on((0,tw.useState)({containerWidth:i.width,containerHeight:i.height}),2),w=C[0],T=C[1],E=(0,tw.useCallback)((e,t)=>{T(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,tw.useEffect)(()=>{if(x.current==null||typeof ResizeObserver>`u`)return Dx;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;E(i,a),(t=S.current)==null||t.call(S,i,a)}};m>0&&(e=$an(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,i=n.height;return E(r,i),t.observe(x.current),()=>{t.disconnect()}},[E,m]);var D=w.containerWidth,O=w.containerHeight;QC(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var k=ion(D,O,{width:a,height:o,aspect:n,maxHeight:d}),A=k.calculatedWidth,j=k.calculatedHeight;return QC(D<0||O<0||A!=null&&A>0||j!=null&&j>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,A,j,a,o,l,u,n),ew.createElement(`div`,don({id:h?`${h}`:void 0,className:Re(`recharts-responsive-container`,g),style:pon(pon({},y),{},{width:a,height:o,minWidth:l,minHeight:u,maxHeight:d}),ref:x},b),ew.createElement(`div`,{style:lon({width:a,height:o})},ew.createElement(Eon,{width:A,height:j},f)))}),Aon=(0,tw.forwardRef)((e,t)=>{var n=nw();if(kC(n.width)&&kC(n.height))return e.children;var r=ron({width:e.width,height:e.height,aspect:e.aspect}),i=r.width,a=r.height,o=ion(void 0,void 0,{width:i,height:a,aspect:e.aspect,maxHeight:e.maxHeight}),s=o.calculatedWidth,l=o.calculatedHeight;return jx(s)&&jx(l)?ew.createElement(Eon,{width:s,height:l},e.children):ew.createElement(kon,don({},e,{width:i,height:a,ref:t}))})})),Mon,rw,Non,Pon,iw,aw,Fon,ow,sw,cw,lw,uw,Ion,dw,fw=o((()=>{Mon=d(p()),jS(),aan(),qC(),VC(),YC(),Jan(),jon(),AC(),rw=()=>{var e,t=JC(),n=OS(Gan),r=OS(ZC),i=(e=OS(XC))==null?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},Non={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Pon=()=>OS(GC)??Non,iw=()=>OS(zC),aw=()=>OS(BC),Fon=()=>OS(e=>e.layout.margin),ow=e=>e.layout.layoutType,sw=()=>OS(ow),cw=()=>{var e=sw();if(e===`horizontal`||e===`vertical`)return e},lw=e=>{var t=e.layout.layoutType;if(t===`centric`||t===`radial`)return t},uw=()=>OS(lw),Ion=()=>sw()!==void 0,dw=e=>{var t=kS(),n=JC(),r=e.width,i=e.height,a=nw(),o=r,s=i;return a&&(o=a.width>0?a.width:r,s=a.height>0?a.height:i),(0,Mon.useEffect)(()=>{!n&&kC(o)&&kC(s)&&t(nan({width:o,height:s}))},[t,n,o,s]),null}})),Lon,pw,Ron,zon,Bon,Von,Hon,Uon,Won=o((()=>{EC(),dC(),Lon=gC({name:`legend`,initialState:{settings:{layout:`horizontal`,align:`center`,verticalAlign:`bottom`,itemSorter:`value`,position:void 0,offset:0},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter,e.settings.position=t.payload.position,e.settings.offset=t.payload.offset},addLegendPayload:{reducer(e,t){e.payload.push(uC(t.payload))},prepare:hC()},replaceLegendPayload:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=HS(e).payload.indexOf(uC(r));a>-1&&(e.payload[a]=uC(i))},prepare:hC()},removeLegendPayload:{reducer(e,t){var n=HS(e).payload.indexOf(uC(t.payload));n>-1&&e.payload.splice(n,1)},prepare:hC()}}}),pw=Lon.actions,Ron=pw.setLegendSize,zon=pw.setLegendSettings,Bon=pw.addLegendPayload,Von=pw.replaceLegendPayload,Hon=pw.removeLegendPayload,Uon=Lon.reducer})),Gon=s((e=>{var t=p();t.useSyncExternalStore,t.useRef,t.useEffect,t.useMemo,t.useDebugValue})),Kon=s(((e,t)=>{t.exports=Gon()}));function qon(e){e()}function Jon(){let e=null,t=null;return{clear(){e=null,t=null},notify(){qon(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){let t=[],n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0,i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){r&&e!==null&&(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}function Yon(e,t){let n,r=esn,i=0,a=!1;function o(e){d();let t=r.subscribe(e),n=!1;return()=>{n||(n=!0,t(),f())}}function s(){r.notify()}function l(){h.onStateChange&&h.onStateChange()}function u(){return a}function d(){i++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=Jon())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=esn)}function p(){a||(a=!0,d())}function m(){a&&(a=!1,f())}let h={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:u,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return h}function Xon(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function Zon(e,t){if(Xon(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r{let e=Yon(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}},[i,r]),o=mw.useMemo(()=>i.getState(),[i]);osn(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);let s=n||lsn;return mw.createElement(s.Provider,{value:a},t)}var mw,esn,tsn,nsn,rsn,isn,asn,osn,ssn,csn,lsn,usn,dsn=o((()=>{mw=d(p(),1),Kon(),esn={notify(){},get:()=>[]},tsn=()=>typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,nsn=tsn(),rsn=()=>typeof navigator<`u`&&navigator.product===`ReactNative`,isn=rsn(),asn=()=>nsn||isn?mw.useLayoutEffect:mw.useEffect,osn=asn(),ssn=Symbol.for(`react-redux-context`),csn=typeof globalThis<`u`?globalThis:{},lsn=Qon(),usn=$on}));function fsn(e,t){return e==null&&t==null?!0:typeof e==`number`&&typeof t==`number`?e===t||e!==e&&t!==t:e===t}function hw(e,t){for(var n of new Set([...Object.keys(e),...Object.keys(t)]))if(psn.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Zon(e[n],t[n]))return!1}else if(!fsn(e[n],t[n]))return!1;return!0}var psn,gw=o((()=>{dsn(),psn=new Set([`axisLine`,`tickLine`,`activeBar`,`activeDot`,`activeLabel`,`activeShape`,`allowEscapeViewBox`,`background`,`cursor`,`dot`,`label`,`line`,`margin`,`padding`,`position`,`shape`,`style`,`tick`,`wrapperStyle`,`radius`,`throttledEvents`])})),msn,hsn=o((()=>{NS(),VC(),msn=MS([zC,BC,jan],(e,t,n)=>({x:n.left||0,y:n.top||0,width:Math.max(e-(n.left||0)-(n.right||0),0),height:Math.max(t-(n.top||0)-(n.bottom||0),0)}))}));function gsn(e,t){return e===`start`&&t===`start`?``:`translate(${e===`inherit`?`0`:{start:`0`,middle:`-50%`,end:`-100%`}[e]}, ${{start:`0`,middle:`-50%`,end:`-100%`}[t]??`0`})`}var _sn=o((()=>{}));function vsn(){return vsn=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{s(zon({align:t,layout:n,verticalAlign:r,itemSorter:i,position:a,offset:o}))},[s,t,n,r,i,a,o]),null}function Rsn(e){var t=e.width,n=e.height,r=kS();return(0,Vsn.useLayoutEffect)(()=>{r(Ron({width:t,height:n}))},[r,t,n]),(0,Vsn.useLayoutEffect)(()=>()=>{r(Ron({width:0,height:0}))},[r]),null}function zsn(e,t,n,r){return e===`vertical`&&t!=null?{height:t}:e===`horizontal`?{width:n||r}:null}function Bsn(e){var t=uS(e,Wsn),n=e.layout&&e.layout!==`auto`?e.layout:Nsn(t.position),r=Mnn(),i=r5t(),a=Fon(),o=OS(e=>Psn(e,t.position)),s=t.width,l=t.height,u=t.wrapperStyle,d=t.portal,f=d==null&&(t.position==null||Z8t(t.position)),p=ysn(Hnn([r]),2),m=p[0],h=p[1],g=iw(),_=aw();if(g==null||_==null||t.position!=null&&o==null)return null;var v=zsn(n,l,s,g-((a==null?void 0:a.left)||0)-((a==null?void 0:a.right)||0)),y=t.position==null?null:Q8t({viewBox:o??{x:0,y:0,width:g,height:_},position:t.position,offset:t.offset??0}),b=Fsn(t.position,t.offset??0,m),x=n===`vertical`?((o==null?void 0:o.width)??0)/2:(o==null?void 0:o.width)??0,S=n===`horizontal`?((o==null?void 0:o.height)??0)/2:(o==null?void 0:o.height)??0,C=y?{width:`max-content`,height:`max-content`,maxWidth:x,maxHeight:S,overflowY:`auto`,top:y.y+(b.top??0),left:y.x+(b.left??0),transform:gsn(y.horizontalAnchor,y.verticalAnchor)}:Isn(u,t,a,g,_,m),w=d?u:_w(_w({position:`absolute`,width:(v==null?void 0:v.width)||s||`auto`,height:(v==null?void 0:v.height)||l||`auto`},C),u),T=d??i;if(T==null||r==null)return null;var E=vw.createElement(`div`,{className:`recharts-legend-wrapper`,style:w,ref:h},vw.createElement(Lsn,{layout:n,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter,position:t.position,offset:t.offset}),f&&vw.createElement(Rsn,m),vw.createElement(Msn,vsn({},t,{layout:n},v,{margin:a,chartWidth:g,chartHeight:_,contextPayload:r})));return(0,Hsn.createPortal)(E,T)}var vw,Vsn,Hsn,Usn,Wsn,Gsn,Ksn=o((()=>{vw=d(p()),Vsn=d(p()),Hsn=d(_()),e5t(),i5t(),hen(),Htn(),Nnn(),Unn(),fw(),Won(),jS(),dS(),gw(),hsn(),_sn(),qC(),Usn=[`contextPayload`],Wsn={align:`center`,iconSize:14,inactiveColor:`#ccc`,itemSorter:`value`,labelStyle:{},layout:`auto`,verticalAlign:`bottom`,offset:0},Gsn=vw.memo(Bsn,hw),Gsn.displayName=`Legend`}));function qsn(){return qsn=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{bw=d(p()),Enn(),ze(),Lx(),xw={separator:` : `,contentStyle:{margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},itemStyle:{display:`block`,paddingTop:4,paddingBottom:4,color:`#000`},labelStyle:{},accessibilityLayer:!1},ocn=e=>{var t=e.separator,n=t===void 0?xw.separator:t,r=e.contentStyle,i=e.itemStyle,a=e.labelStyle,o=a===void 0?xw.labelStyle:a,s=e.payload,l=e.formatter,u=e.itemSorter,d=e.wrapperClassName,f=e.labelClassName,p=e.label,m=e.labelFormatter,h=e.accessibilityLayer,g=h===void 0?xw.accessibilityLayer:h,_=()=>{if(s&&s.length){var e={padding:0,margin:0},t=acn(s,u).map((e,t)=>{if(!e||e.type===`none`)return null;var r=e.formatter||l||icn,a=e.value,o=e.name,u=a,d=o;if(r){var f=r(a,o,e,t,s);if(Array.isArray(f)){var p=Qsn(f,2);u=p[0],d=p[1]}else if(f!=null)u=f;else return null}var m=yw(yw({},xw.itemStyle),{},{color:e.color||xw.itemStyle.color},i);return bw.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:m},Mx(d)?bw.createElement(`span`,{className:`recharts-tooltip-item-name`},d):null,Mx(d)?bw.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,bw.createElement(`span`,{className:`recharts-tooltip-item-value`},u),bw.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return bw.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},v=yw(yw({},xw.contentStyle),r),y=yw({margin:0},o),b=!Fx(p),x=b?p:``,S=Re(`recharts-default-tooltip`,d),C=Re(`recharts-tooltip-label`,f);b&&m&&s!=null&&(x=m(p,s));var w=g?{role:`status`,"aria-live":`assertive`}:{};return bw.createElement(`div`,qsn({className:S,style:v},w),bw.createElement(`p`,{className:C,style:y},bw.isValidElement(x)?x:`${x}`),_())}}));function ccn(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Re(Sw,{[`${Sw}-right`]:jx(n)&&t&&jx(t.x)&&n>=t.x,[`${Sw}-left`]:jx(n)&&t&&jx(t.x)&&n=t.y,[`${Sw}-top`]:jx(r)&&t&&jx(t.y)&&r0?i:0),f=n[r]+i;if(t[r])return o[r]?d:f;var p=l[r];return p==null?0:o[r]?Math.max(dp+u?Math.max(d,p):Math.max(f,p)}function ucn(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function dcn(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTop,i=e.offsetLeft,a=e.position,o=e.reverseDirection,s=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,d,f,p;return s&&s.height>0&&s.width>0&&n?(f=lcn({allowEscapeViewBox:t,coordinate:n,key:`x`,offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:u,viewBoxDimension:u.width}),p=lcn({allowEscapeViewBox:t,coordinate:n,key:`y`,offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:u,viewBoxDimension:u.height}),d=ucn({translateX:f,translateY:p,useTranslate3d:l})):d=fcn,{cssProperties:d,cssClasses:ccn({translateX:f,translateY:p,coordinate:n})}}var Sw,fcn,pcn=o((()=>{ze(),Lx(),Sw=`recharts-tooltip-wrapper`,fcn={visibility:`hidden`}})),mcn,Cw,ww=o((()=>{mcn=()=>!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout),Cw={devToolsEnabled:!0,isSsr:mcn()}}));function hcn(e,t){return bcn(e)||ycn(e,t)||_cn(e,t)||gcn()}function gcn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _cn(e,t){if(e){if(typeof e==`string`)return vcn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vcn(e,t):void 0}}function vcn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nCw.isSsr||!window.matchMedia?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches),2),t=e[0],n=e[1];return(0,Scn.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia(`(prefers-reduced-motion: reduce)`),t=()=>{n(e.matches)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}},[]),t}var Scn,Ccn=o((()=>{Scn=d(p()),ww()}));function wcn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tw(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),2),s=o[0],l=o[1];Ew.useEffect(()=>{var t=t=>{if(t.key===`Escape`){var n,r;l({dismissed:!0,dismissedAtCoordinate:{x:((n=e.coordinate)==null?void 0:n.x)??0,y:((r=e.coordinate)==null?void 0:r.y)??0}})}};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[(t=e.coordinate)==null?void 0:t.x,(n=e.coordinate)==null?void 0:n.y]),s.dismissed&&((((r=e.coordinate)==null?void 0:r.x)??0)!==s.dismissedAtCoordinate.x||(((i=e.coordinate)==null?void 0:i.y)??0)!==s.dismissedAtCoordinate.y)&&l(Tw(Tw({},s),{},{dismissed:!1}));var u=dcn({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset==`number`?e.offset:e.offset.x,offsetTop:typeof e.offset==`number`?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:e.lastBoundingBox,useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),d=u.cssClasses,f=u.cssProperties,p=Tw(Tw({},e.hasPortalFromProps?{}:Tw(Tw({transition:Pcn({prefersReducedMotion:a,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:`none`,position:`absolute`,top:0,left:0})),{},{visibility:!s.dismissed&&e.active&&e.hasPayload?`visible`:`hidden`},e.wrapperStyle);return Ew.createElement(`div`,{xmlns:`http://www.w3.org/1999/xhtml`,tabIndex:-1,className:d,style:p,ref:e.innerRef},e.children)}var Ew,Icn,Lcn=o((()=>{Ew=d(p()),pcn(),Ccn(),Icn=Ew.memo(Fcn)})),Rcn,zcn=o((()=>{jS(),Rcn=()=>OS(e=>e.rootProps.accessibilityLayer)??!0}));function Bcn(){return Bcn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{Kcn=d(p()),j9t(),ze(),lS(),Lx(),AC(),hx(),fw(),qcn={curveBasisClosed:S7t,curveBasisOpen:T7t,curveBasis:iS,curveBumpX:H5t,curveBumpY:U5t,curveLinearClosed:Z7t,curveLinear:$x,curveMonotoneX:o9t,curveMonotoneY:s9t,curveNatural:d9t,curveStep:m9t,curveStepAfter:g9t,curveStepBefore:h9t},Dw=e=>OC(e.x)&&OC(e.y),Jcn=e=>e.base!=null&&Dw(e.base)&&Dw(e),Ow=e=>e.x,kw=e=>e.y,Ycn=(e,t)=>{if(typeof e==`function`)return e;var n=`curve${Ix(e)}`;if((n===`curveMonotone`||n===`curveBump`)&&t){var r=qcn[`${n}${t===`vertical`?`Y`:`X`}`];if(r)return r}return qcn[n]||$x},Xcn={connectNulls:!1,type:`linear`},Zcn=e=>{var t=e.type,n=t===void 0?Xcn.type:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,l=s===void 0?Xcn.connectNulls:s,u=Ycn(n,o),d=l?i.filter(Dw):i;if(Array.isArray(a)){var f,p=i.map((e,t)=>Hcn(Hcn({},e),{},{base:a[t]}));return f=o===`vertical`?P5t().y(kw).x1(Ow).x0(e=>e.base.x):P5t().x(Ow).y1(kw).y0(e=>e.base.y),f.defined(Jcn).curve(u)(l?p.filter(Jcn):p)}return(o===`vertical`&&jx(a)?P5t().y(kw).x1(Ow).x0(a):jx(a)?P5t().x(Ow).y1(kw).y0(a):eS().x(Ow).y(kw)).defined(Dw).curve(u)(d)},Aw=e=>{var t=e.className,n=e.points,r=e.path,i=e.pathRef,a=sw();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?Zcn(o):r;return Kcn.createElement(`path`,Bcn({},px(e),X9t(e),{className:Re(`recharts-curve`,t),d:s===null?void 0:s,ref:i}))}}));function Qcn(){return Qcn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{oln=d(p()),ze(),Lx(),_x(),sln=[`x`,`y`,`top`,`left`,`width`,`height`,`className`],cln=(e,t,n,r,i,a)=>`M${e},${i}v${r}M${a},${t}h${n}`,lln=e=>{var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,l=s===void 0?0:s,u=e.width,d=u===void 0?0:u,f=e.height,p=f===void 0?0:f,m=e.className,h=iln(e,sln),g=eln({x:n,y:i,top:o,left:l,width:d,height:p},h);return!jx(n)||!jx(i)||!jx(d)||!jx(p)||!jx(o)||!jx(l)?null:oln.createElement(`path`,Qcn({},gx(g),{className:Re(`recharts-cross`,m),d:cln(n,i,d,p,o,l)}))}}));function dln(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}var fln=o((()=>{})),pln,mln,hln,gln,_ln,vln,yln,bln,xln,Sln,Cln=o((()=>{pln=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],mln=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),hln=(e,t)=>n=>mln(pln(e,t),n),gln=(e,t)=>n=>mln([...pln(e,t).map((e,t)=>e*t).slice(1),0],n),_ln=e=>{var t,n=e.split(`(`);if(n.length!==2||n[0]!==`cubic-bezier`)return null;var r=(t=n[1])==null||(t=t.split(`)`)[0])==null?void 0:t.split(`,`);if(r==null||r.length!==4)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},vln=function(){var e=[...arguments];if(e.length===1)switch(e[0]){case`linear`:return[0,0,1,1];case`ease`:return[.25,.1,.25,1];case`ease-in`:return[.42,0,1,1];case`ease-out`:return[.42,0,.58,1];case`ease-in-out`:return[0,0,.58,1];default:var t=_ln(e[0]);if(t)return t}return e.length===4?e:[0,0,1,1]},yln=(e,t,n,r)=>{var i=hln(e,n),a=hln(t,r),o=gln(e,n),s=e=>e>1?1:e<0?0:e,l=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var l=i(n)-t,u=o(n);if(Math.abs(l-t)<1e-4||u<1e-4)return a(n);n=s(n-l/u)}return a(n)};return l.isStepper=!1,l},bln=function(){return yln(...vln(...arguments))},xln=function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?16.67:a,s=1,l=[0],u=0,d=0,f=1e4,p=0;p{if(e<=0)return 0;if(e>=1)return s;var t=e*g,n=Math.floor(t),r=t-n;return(l[n]??0)+((l[n+1]??0)-(l[n]??0))*r}},Sln=e=>{if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return bln(e);case`spring`:return xln();default:if(e.split(`(`)[0]===`cubic-bezier`)return bln(e)}return typeof e==`function`?e:null}})),wln,Tln=o((()=>{wln=(e,t,n)=>{var r,i=a=>{var o=t.tick(a);if(t.getState()===`active`){if(n(t.getInterpolated()),t.getProgress()===1){t.complete(),r=void 0;return}r=e.setTimeout(i,o)}else r=e.setTimeout(i,o)};return r=e.setTimeout(i,0),()=>{var e;return(e=r)==null?void 0:e()}}}));function Eln(e){var t=(0,Dln.useContext)(Oln);return(0,Dln.useMemo)(()=>e??t,[e,t])}var Dln,Oln,kln=o((()=>{Dln=d(p()),Tln(),Oln=(0,Dln.createContext)(wln),Oln.Provider}));function Aln(e,t,n){return(t=jln(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jln(e){var t=Mln(e,`string`);return typeof t==`symbol`?t:t+``}function Mln(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nln(e){return Math.max(0,e)}var Pln,Fln,Iln,Lln,Rln,zln,Bln=o((()=>{Lx(),Pln=`init`,Fln=`pending`,Iln=`active`,Lln=`completed`,Rln=class{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(e){var t;Aln(this,`state`,Pln),this.animationId=e.animationId,this.onAnimationEnd=e.onAnimationEnd,this.animationDuration=Nln(e.animationDuration),this.animationBegin=Nln(e.animationBegin),this.progress=0,this.from=e.from,this.to=e.to,this.easing=e.easing,(t=e.onAnimationStart)==null||t.call(e)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(e){if(this.getState()===Pln)return this.state=Fln,this.beginStartedTime=e,this.animationBegin;if(this.getState()===Fln){if(this.beginStartedTime==null)throw Error();var t=e-this.beginStartedTime;return t>=this.animationBegin?(this.state=Iln,this.animationStartedTime=e,this.nextAnimationUpdate(0)):Nln(this.animationBegin-t)}if(this.getState()===Iln){if(this.animationStartedTime==null)throw Error();var n=e-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(e){this.progress=Math.min(1,Math.max(0,e))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state===`active`){var e;(e=this.onAnimationEnd)==null||e.call(this)}this.state=Lln}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}},zln=class extends Rln{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(Tx(this.getFrom(),this.getTo(),this.getProgress()))}}})),Vln,Hln=o((()=>{Vln=class{setTimeout(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),r=null,i=a=>{a-n>=t?e(a):r=requestAnimationFrame(i)};return r=requestAnimationFrame(i),()=>{r!=null&&cancelAnimationFrame(r)}}}}));function Uln(e,t){return Jln(e)||qln(e,t)||Gln(e,t)||Wln()}function Wln(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gln(e,t){if(e){if(typeof e==`string`)return Kln(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kln(e,t):void 0}}function Kln(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{p||_(Mw)},[p]),(0,Xln.useEffect)(()=>{var e=Sln(o);return!p||!i||e==null?Dx:m(new Vln,new zln({animationId:n,easing:e,animationDuration:a,animationBegin:s,onAnimationStart:u,onAnimationEnd:l,from:Qln,to:Mw}),_)},[m,n,p,i,a,o,s,u,l]),d(Number(g))}var Xln,Zln,Qln,Mw,$ln=o((()=>{Xln=d(p()),Lx(),dS(),Cln(),kln(),ww(),Ccn(),Bln(),Hln(),Zln={begin:0,duration:1e3,easing:`ease`,isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Qln=0,Mw=1}));function eun(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`animation-`,n=(0,tun.useRef)(Nx(t)),r=(0,tun.useRef)(e);return r.current!==e&&(n.current=Nx(t),r.current=e),n.current}var tun,nun=o((()=>{tun=d(p()),Lx()})),run,iun,aun=o((()=>{run=e=>e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),iun=(e,t,n)=>e.map(e=>`${run(e)} ${t}ms ${n}`).join(`,`)}));function oun(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sun(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{Fw=d(p()),Iw=d(p()),ze(),dS(),$ln(),Lx(),nun(),aun(),_x(),wx(),yun=[`radius`],bun=[`radius`],jun=(e,t,n,r,i)=>{var a=Sx(n),o=Sx(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),l=o>=0?1:-1,u=a>=0?1:-1,d=+(o>=0&&a>=0||o<0&&a<0),f;if(s>0&&Array.isArray(i)){for(var p=[0,0,0,0],m=0,h=4;ms?s:g}f=Cx(xun||(xun=Pw([`M`,`,`,``])),e,t+l*p[0]),p[0]>0&&(f+=Cx(Sun||(Sun=Pw([`A `,`,`,`,0,0,`,`,`,`,`,``])),p[0],p[0],d,e+u*p[0],t)),f+=Cx(Cun||(Cun=Pw([`L `,`,`,``])),e+n-u*p[1],t),p[1]>0&&(f+=Cx(wun||(wun=Pw([`A `,`,`,`,0,0,`,`, `,`,`,``])),p[1],p[1],d,e+n,t+l*p[1])),f+=Cx(Tun||(Tun=Pw([`L `,`,`,``])),e+n,t+r-l*p[2]),p[2]>0&&(f+=Cx(Eun||(Eun=Pw([`A `,`,`,`,0,0,`,`, `,`,`,``])),p[2],p[2],d,e+n-u*p[2],t+r)),f+=Cx(Dun||(Dun=Pw([`L `,`,`,``])),e+u*p[3],t+r),p[3]>0&&(f+=Cx(Oun||(Oun=Pw([`A `,`,`,`,0,0,`,`, `,`,`,``])),p[3],p[3],d,e,t+r-l*p[3])),f+=`Z`}else if(s>0&&i===+i&&i>0){var _=Math.min(s,i);f=Cx(kun||(kun=Pw(`M .,. A .,.,0,0,.,.,. L .,. A .,.,0,0,.,.,. L .,. A .,.,0,0,.,.,. L .,. A .,.,0,0,.,.,. Z`.split(`.`))),e,t+l*_,_,_,d,e+u*_,t,e+n-u*_,t,_,_,d,e+n,t+l*_,e+n,t+r-l*_,_,_,d,e+n-u*_,t+r,e+u*_,t+r,_,_,d,e,t+r-l*_)}else f=Cx(Aun||(Aun=Pw([`M `,`,`,` h `,` v `,` h `,` Z`])),e,t,n,r,-n);return f},Mun={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},Lw=e=>{var t=uS(e,Mun),n=(0,Iw.useRef)(null),r=pun((0,Iw.useState)(-1),2),i=r[0],a=r[1];(0,Iw.useEffect)(()=>{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,l=t.width,u=t.height,d=t.radius,f=t.className,p=t.animationEasing,m=t.animationDuration,h=t.animationBegin,g=t.isAnimationActive,_=t.isUpdateAnimationActive,v=(0,Iw.useRef)(l),y=(0,Iw.useRef)(u),b=(0,Iw.useRef)(o),x=(0,Iw.useRef)(s),S=eun((0,Iw.useMemo)(()=>({x:o,y:s,width:l,height:u,radius:d}),[o,s,l,u,d]),`rectangle-`);if(o!==+o||s!==+s||l!==+l||u!==+u||l===0||u===0)return null;var C=Re(`recharts-rectangle`,f);if(!_){var w=gx(t);w.radius;var T=dun(w,yun);return Fw.createElement(`path`,Nw({},T,{x:Sx(o),y:Sx(s),width:Sx(l),height:Sx(u),radius:typeof d==`number`?d:void 0,className:C,d:jun(o,s,l,u,d)}))}var E=v.current,D=y.current,O=b.current,k=x.current,A=`0px ${i===-1?1:i}px`,j=`${i}px ${i}px`,M=iun([`strokeDasharray`],m,typeof p==`string`?p:Mun.animationEasing);return Fw.createElement(Yln,{animationId:S,key:S,canBegin:i>0,duration:m,easing:p,isActive:_,begin:h},e=>{var r=Tx(E,l,e),i=Tx(D,u,e),a=Tx(O,o,e),f=Tx(k,s,e);n.current&&(v.current=r,y.current=i,b.current=a,x.current=f);var p=g?e>0?{transition:M,strokeDasharray:j}:{strokeDasharray:A}:{strokeDasharray:j},m=gx(t);m.radius;var h=dun(m,bun);return Fw.createElement(`path`,Nw({},h,{radius:typeof d==`number`?d:void 0,className:C,d:jun(a,f,r,i,d),ref:n,style:sun(sun({},p),t.style)}))})}}));function Pun(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fun(e){for(var t=1;t{Rw=Math.PI/180,zw=e=>e*Math.PI/180,zun=e=>e*180/Math.PI,Bw=(e,t,n,r)=>({x:e+Math.cos(-Rw*r)*n,y:t+Math.sin(-Rw*r)*n}),Bun=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},Vun=(e,t)=>{var n=e.x,r=e.y,i=t.x,a=t.y;return Math.sqrt((n-i)**2+(r-a)**2)},Hun=(e,t)=>{var n=e.x,r=e.y,i=t.cx,a=t.cy,o=Vun({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(n-i)/o,l=Math.acos(s);return r>a&&(l=2*Math.PI-l),{radius:o,angle:zun(l),angleInRadian:l}},Uun=e=>{var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},Wun=(e,t)=>{var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360);return e+Math.min(i,a)*360},Gun=(e,t)=>{var n=e.relativeX,r=e.relativeY,i=Hun({x:n,y:r},t),a=i.radius,o=i.angle,s=t.innerRadius,l=t.outerRadius;if(al||a===0)return null;var u=Uun(t),d=u.startAngle,f=u.endAngle,p=o,m;if(d<=f){for(;p>f;)p-=360;for(;p=d&&p<=f}else{for(;p>d;)p-=360;for(;p=f&&p<=d}return m?Fun(Fun({},t),{},{radius:a,angle:Wun(p,t)}):null}}));function Kun(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[Bw(t,n,r,i),Bw(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}var qun=o((()=>{Vw()}));function Jun(){return Jun=Object.assign?Object.assign.bind():function(e){for(var t=1;t{Yun=d(p()),ze(),Vw(),Lx(),dS(),_x(),wx(),rdn=(e,t)=>Ox(t-e)*Math.min(Math.abs(t-e),359.999),Uw=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,l=e.cornerIsExternal,u=s*(o?1:-1)+r,d=Math.asin(s/u)/Rw,f=l?i:i+a*d,p=Bw(t,n,u,f),m=Bw(t,n,r,f),h=l?i-a*d:i;return{center:p,circleTangency:m,lineTangency:Bw(t,n,u*Math.cos(d*Rw),h),theta:d}},idn=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=rdn(a,o),l=a+s,u=Bw(t,n,i,a),d=Bw(t,n,i,l),f=Cx(Xun||(Xun=Hw([`M `,`,`,` A `,`,`,`,0, `,`,`,`, `,`,`,` `])),u.x,u.y,i,i,+(Math.abs(s)>180),+(a>l),d.x,d.y);if(r>0){var p=Bw(t,n,r,a),m=Bw(t,n,r,l);f+=Cx(Zun||(Zun=Hw([`L `,`,`,` A `,`,`,`,0, `,`,`,`, `,`,`,` Z`])),m.x,m.y,r,r,+(Math.abs(s)>180),+(a<=l),p.x,p.y)}else f+=Cx(Qun||(Qun=Hw([`L `,`,`,` Z`])),t,n);return f},adn=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,u=e.endAngle,d=Ox(u-l),f=Uw({cx:t,cy:n,radius:i,angle:l,sign:d,cornerRadius:a,cornerIsExternal:s}),p=f.circleTangency,m=f.lineTangency,h=f.theta,g=Uw({cx:t,cy:n,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:s}),_=g.circleTangency,v=g.lineTangency,y=g.theta,b=s?Math.abs(l-u):Math.abs(l-u)-h-y;if(b<0)return o?Cx($un||($un=Hw([`M `,`,`,` a`,`,`,`,0,0,1,`,`,0 a`,`,`,`,0,0,1,`,`,0 `])),m.x,m.y,a,a,a*2,a,a,-a*2):idn({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:u});var x=Cx(edn||(edn=Hw([`M `,`,`,` A`,`,`,`,0,0,`,`,`,`,`,` A`,`,`,`,0,`,`,`,`,`,`,`,` A`,`,`,`,0,0,`,`,`,`,`,` `])),m.x,m.y,a,a,+(d<0),p.x,p.y,i,i,+(b>180),+(d<0),_.x,_.y,a,a,+(d<0),v.x,v.y);if(r>0){var S=Uw({cx:t,cy:n,radius:r,angle:l,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),C=S.circleTangency,w=S.lineTangency,T=S.theta,E=Uw({cx:t,cy:n,radius:r,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),D=E.circleTangency,O=E.lineTangency,k=E.theta,A=s?Math.abs(l-u):Math.abs(l-u)-T-k;if(A<0&&a===0)return`${x}L${t},${n}Z`;x+=Cx(tdn||(tdn=Hw([`L`,`,`,` A`,`,`,`,0,0,`,`,`,`,`,` A`,`,`,`,0,`,`,`,`,`,`,`,` A`,`,`,`,0,0,`,`,`,`,`,`Z`])),O.x,O.y,a,a,+(d<0),D.x,D.y,r,r,+(A>180),+(d>0),C.x,C.y,a,a,+(d<0),w.x,w.y)}else x+=Cx(ndn||(ndn=Hw([`L`,`,`,`Z`])),t,n);return x},odn={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},sdn=e=>{var t=uS(e,odn),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=t.className;if(a0&&Math.abs(u-d)<360?adn({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(h,m/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:u,endAngle:d}):idn({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d});return Yun.createElement(`path`,Jun({},gx(t),{className:p,d:g}))}}));function ldn(e,t,n){if(e===`horizontal`)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e===`vertical`)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(Y9t(t)){if(e===`centric`){var r=t.cx,i=t.cy,a=t.innerRadius,o=t.outerRadius,s=t.angle,l=Bw(r,i,a,s),u=Bw(r,i,o,s);return[{x:l.x,y:l.y},{x:u.x,y:u.y}]}return Kun(t)}}var udn=o((()=>{Vw(),lS(),qun()}));function ddn(e){return j8t(e)?NaN:Number(e)}var fdn=o((()=>{M8t()}));function pdn(e){return e?(e=ddn(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}var mdn=o((()=>{fdn()}));function hdn(e,t,n){n&&typeof n!=`number`&&pnn(e,t,n)&&(t=n=void 0),e=pdn(e),t===void 0?(t=e,e=0):t=pdn(t),n=n===void 0?e{mdn(),mnn()})),_dn=o((()=>{gdn()})),Ww,Gw,Kw,vdn,ydn,bdn,xdn,qw=o((()=>{NS(),Ww=e=>e.chartData,Gw=MS([Ww],e=>{var t=e.chartData==null?0:e.chartData.length-1;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Kw=(e,t,n,r)=>r?Gw(e):Ww(e),vdn=(e,t,n)=>n?Gw(e):Ww(e),ydn=MS([Kw],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)}),bdn=MS([Gw],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)}),xdn=MS([Ww],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)})}));function Sdn(e,t){return Ddn(e)||Edn(e,t)||wdn(e,t)||Cdn()}function Cdn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wdn(e,t){if(e){if(typeof e==`string`)return Tdn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tdn(e,t):void 0}}function Tdn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{RC(),Lx(),AC()})),Mdn=s(((e,t,n)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,l=Math.floor,u=Math.pow,d=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,f,p=1e7,m=7,h=9007199254740991,g=l(h/m),_={};_.absoluteValue=_.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},_.comparedTo=_.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=re.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},_.decimalPlaces=_.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*m;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},_.dividedBy=_.div=function(e){return x(this,new this.constructor(e))},_.dividedToIntegerBy=_.idiv=function(e){var t=this,n=t.constructor;return O(x(t,new n(e),0,1),n.precision)},_.equals=_.eq=function(e){return!this.cmp(e)},_.exponent=function(){return C(this)},_.greaterThan=_.gt=function(e){return this.cmp(e)>0},_.greaterThanOrEqualTo=_.gte=function(e){return this.cmp(e)>=0},_.isInteger=_.isint=function(){return this.e>this.d.length-2},_.isNegative=_.isneg=function(){return this.s<0},_.isPositive=_.ispos=function(){return this.s>0},_.isZero=function(){return this.s===0},_.lessThan=_.lt=function(e){return this.cmp(e)<0},_.lessThanOrEqualTo=_.lte=function(e){return this.cmp(e)<1},_.logarithm=_.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(f))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(f)?new r(0):(i=!1,t=x(E(n,s),E(e,s),s),i=!0,O(t,o))},_.minus=_.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?k(t,e):v(t,(e.s=-e.s,e))},_.modulo=_.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=x(n,e,0,1).times(e),i=!0,n.minus(t)):O(new r(n),o)},_.naturalExponential=_.exp=function(){return S(this)},_.naturalLogarithm=_.ln=function(){return E(this)},_.negated=_.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},_.plus=_.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?v(t,e):k(t,(e.s=-e.s,e))},_.precision=_.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=C(i)+1,r=i.d.length-1,n=r*m+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},_.squareRoot=_.sqrt=function(){var e,t,n,r,o,s,u,d=this,f=d.constructor;if(d.s<1){if(!d.s)return new f(0);throw Error(a+`NaN`)}for(e=C(d),i=!1,o=Math.sqrt(+d),o==0||o==1/0?(t=b(d.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=l((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new f(t)):r=new f(o.toString()),n=f.precision,o=u=n+3;;)if(s=r,r=s.plus(x(d,s,u+2)).times(.5),b(s.d).slice(0,u)===(t=b(r.d)).slice(0,u)){if(t=t.slice(u-3,u+1),o==u&&t==`4999`){if(O(s,n+1,0),s.times(s).eq(d)){r=s;break}}else if(t!=`9999`)break;u+=4}return i=!0,O(r,n)},_.times=_.mul=function(e){var t,n,r,a,o,s,l,u,d,f=this,m=f.constructor,h=f.d,g=(e=new m(e)).d;if(!f.s||!e.s)return new m(0);for(e.s*=f.s,n=f.e+e.e,u=h.length,d=g.length,u=0;){for(t=0,a=u+r;a>r;)l=o[a]+g[r]*h[a-r-1]+t,o[a--]=l%p|0,t=l/p|0;o[a]=(o[a]+t)%p|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?O(e,m.precision):e},_.toDecimalPlaces=_.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(y(e,0,n),t===void 0?t=i.rounding:y(t,0,8),O(r,e+C(r)+1,t))},_.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=A(i,!0):(y(e,0,n),t===void 0?t=a.rounding:y(t,0,8),i=O(new a(i),e+1,t),r=A(i,!0,e+1)),r},_.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?A(a):(y(e,0,n),t===void 0?t=o.rounding:y(t,0,8),i=O(new o(a),e+C(a)+1,t),r=A(i.abs(),!1,e+C(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},_.toInteger=_.toint=function(){var e=this,t=e.constructor;return O(new t(e),C(e)+1,t.rounding)},_.toNumber=function(){return+this},_.toPower=_.pow=function(e){var t,n,r,o,s,u,d=this,p=d.constructor,g=12,_=+(e=new p(e));if(!e.s)return new p(f);if(d=new p(d),!d.s){if(e.s<1)throw Error(a+`Infinity`);return d}if(d.eq(f))return d;if(r=p.precision,e.eq(f))return O(d,r);if(t=e.e,n=e.d.length-1,u=t>=n,s=d.s,!u){if(s<0)throw Error(a+`NaN`)}else if((n=_<0?-_:_)<=h){for(o=new p(f),t=Math.ceil(r/m+4),i=!1;n%2&&(o=o.times(d),j(o.d,t)),n=l(n/2),n!==0;)d=d.times(d),j(d.d,t);return i=!0,e.s<0?new p(f).div(o):O(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,d.s=1,i=!1,o=e.times(E(d,r+g)),i=!0,o=S(o),o.s=s,o},_.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=C(a),i=A(a,r<=o.toExpNeg||r>=o.toExpPos)):(y(e,1,n),t===void 0?t=o.rounding:y(t,0,8),a=O(new o(a),e,t),r=C(a),i=A(a,e<=r||r<=o.toExpNeg,e)),i},_.toSignificantDigits=_.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(y(e,1,n),t===void 0?t=i.rounding:y(t,0,8)),O(new i(r),e,t)},_.toString=_.valueOf=_.val=_.toJSON=function(){var e=this,t=C(e),n=e.constructor;return A(e,t<=n.toExpNeg||t>=n.toExpPos)};function v(e,t){var n,r,a,o,s,l,u,d,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),i?O(t,h):t;if(u=e.d,d=t.d,s=e.e,a=t.e,u=u.slice(),o=s-a,o){for(o<0?(r=u,o=-o,l=d.length):(r=d,a=s,l=u.length),s=Math.ceil(h/m),l=s>l?s+1:l+1,o>l&&(o=l,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(l=u.length,o=d.length,l-o<0&&(o=l,r=d,d=u,u=r),n=0;o;)n=(u[--o]=u[o]+d[o]+n)/p|0,u[o]%=p;for(n&&(u.unshift(n),++a),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=a,i?O(t,h):t}function y(e,t,n){if(e!==~~e||en)throw Error(o+e)}function b(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;tr?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]1;)e.shift()}return function(r,i,o,s){var l,u,d,f,h,g,_,v,y,b,x,S,w,T,E,D,k,A,j=r.constructor,M=r.s==i.s?1:-1,N=r.d,P=i.d;if(!r.s)return new j(r);if(!i.s)throw Error(a+`Division by zero`);for(u=r.e-i.e,k=P.length,E=N.length,_=new j(M),v=_.d=[],d=0;P[d]==(N[d]||0);)++d;if(P[d]>(N[d]||0)&&--u,S=o==null?o=j.precision:s?o+(C(r)-C(i))+1:o,S<0)return new j(0);if(S=S/m+2|0,d=0,k==1)for(f=0,P=P[0],S++;(d1&&(P=e(P,f),N=e(N,f),k=P.length,E=N.length),T=k,y=N.slice(0,k),b=y.length;b=p/2&&++D;do f=0,l=t(P,y,k,b),l<0?(x=y[0],k!=b&&(x=x*p+(y[1]||0)),f=x/D|0,f>1?(f>=p&&(f=p-1),h=e(P,f),g=h.length,b=y.length,l=t(h,y,g,b),l==1&&(f--,n(h,k16)throw Error(s+C(e));if(!e.s)return new h(f);for(t==null?(i=!1,d=g):d=t,l=new h(.03125);e.abs().gte(.1);)e=e.times(l),m+=5;for(r=Math.log(u(2,m))/Math.LN10*2+5|0,d+=r,n=a=o=new h(f),h.precision=d;;){if(a=O(a.times(e),d),n=n.times(++p),l=o.plus(x(a,n,d)),b(l.d).slice(0,d)===b(o.d).slice(0,d)){for(;m--;)o=O(o.times(o),d);return h.precision=g,t==null?(i=!0,O(o,g)):o}o=l}}function C(e){for(var t=e.e*m,n=e.d[0];n>=10;n/=10)t++;return t}function w(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return O(new e(e.LN10),t)}function T(e){for(var t=``;e--;)t+=`0`;return t}function E(e,t){var n,r,o,s,l,u,d,p,m,h=1,g=10,_=e,v=_.d,y=_.constructor,S=y.precision;if(_.s<1)throw Error(a+(_.s?`NaN`:`-Infinity`));if(_.eq(f))return new y(0);if(t==null?(i=!1,p=S):p=t,_.eq(10))return t??(i=!0),w(y,p);if(p+=g,y.precision=p,n=b(v),r=n.charAt(0),s=C(_),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)_=_.times(e),n=b(_.d),r=n.charAt(0),h++;s=C(_),r>1?(_=new y(`0.`+n),s++):_=new y(r+`.`+n.slice(1))}else return d=w(y,p+2,S).times(s+``),_=E(new y(r+`.`+n.slice(1)),p-g).plus(d),y.precision=S,t==null?(i=!0,O(_,S)):_;for(u=l=_=x(_.minus(f),_.plus(f),p),m=O(_.times(_),p),o=3;;){if(l=O(l.times(m),p),d=u.plus(x(l,new y(o),p)),b(d.d).slice(0,p)===b(u.d).slice(0,p))return u=u.times(2),s!==0&&(u=u.plus(w(y,p+2,S).times(s+``))),u=x(u,new y(h),p),y.precision=S,t==null?(i=!0,O(u,S)):u;u=d,o+=2}}function D(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=l(n/m),e.d=[],r=(n+1)%m,n<0&&(r+=m),rg||e.e<-g))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function O(e,t,n){var r,a,o,d,f,h,_,v,y=e.d;for(d=1,o=y[0];o>=10;o/=10)d++;if(r=t-d,r<0)r+=m,a=t,_=y[v=0];else{if(v=Math.ceil((r+1)/m),o=y.length,v>=o)return e;for(_=o=y[v],d=1;o>=10;o/=10)d++;r%=m,a=r-m+d}if(n!==void 0&&(o=u(10,d-a-1),f=_/o%10|0,h=t<0||y[v+1]!==void 0||_%o,h=n<4?(f||h)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||h||n==6&&(r>0?a>0?_/u(10,d-a):0:y[v-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return h?(o=C(e),y.length=1,t=t-o-1,y[0]=u(10,(m-t%m)%m),e.e=l(-t/m)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(r==0?(y.length=v,o=1,v--):(y.length=v+1,o=u(10,m-r),y[v]=a>0?(_/u(10,d-a)%u(10,a)|0)*o:0),h)for(;;)if(v==0){(y[0]+=o)==p&&(y[0]=1,++e.e);break}else{if(y[v]+=o,y[v]!=p)break;y[v--]=0,o=1}for(r=y.length;y[--r]===0;)y.pop();if(i&&(e.e>g||e.e<-g))throw Error(s+C(e));return e}function k(e,t){var n,r,a,o,s,l,u,d,f,h,g=e.constructor,_=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),i?O(t,_):t;if(u=e.d,h=t.d,r=t.e,d=e.e,u=u.slice(),s=d-r,s){for(f=s<0,f?(n=u,s=-s,l=h.length):(n=h,r=d,l=u.length),a=Math.max(Math.ceil(_/m),l)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=u.length,l=h.length,f=a0;--a)u[l++]=0;for(a=h.length;a>s;){if(u[--a]0?a=a.charAt(0)+`.`+a.slice(1)+T(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+T(-i-1)+a,n&&(r=n-o)>0&&(a+=T(r))):i>=o?(a+=T(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+T(r))):((r=i+1)0&&(i+1===o&&(a+=`.`),a+=T(r))),e.s<0?`-`+a:a}function j(e,t){if(e.length>t)return e.length=t,!0}function M(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;else{if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return D(t,e.toString())}if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,d.test(e))D(t,e);else throw Error(o+e)}}if(i.prototype=_,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=M,i.config=i.set=N,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i)}if((i=e[r=`LN10`])!==void 0){if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i)}return this}r=M(r),r.default=r.Decimal=r,f=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||(e=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)()),e.Decimal=r)})(n)}));function Ndn(e){return e===0?1:Math.floor(new Fdn.default(e).abs().log(10).toNumber())+1}function Pdn(e,t,n){for(var r=new Fdn.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var Fdn,Idn=o((()=>{Fdn=d(Mdn())}));function Yw(e,t){return Vdn(e)||Bdn(e,t)||Rdn(e,t)||Ldn()}function Ldn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rdn(e,t){if(e){if(typeof e==`string`)return zdn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zdn(e,t):void 0}}function zdn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{Xw=d(Mdn()),Idn(),Hdn=e=>{var t=Yw(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]},Zw=(e,t,n)=>{if(e.lte(0))return new Xw.default(0);var r=Ndn(e.toNumber()),i=new Xw.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new Xw.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?new Xw.default(s.toNumber()):new Xw.default(Math.ceil(s.toNumber()))},Udn=(e,t,n)=>{if(e.lte(0))return new Xw.default(0);var r=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new Xw.default(i).abs().log(10).toNumber()),o=new Xw.default(10).pow(a),s=e.div(o).toNumber(),l=r.findIndex(e=>e>=s-1e-10);if(l===-1&&(o=o.mul(10),l=0),l+=n,l>=r.length){var u=Math.floor(l/r.length);l%=r.length,o=o.mul(new Xw.default(10).pow(u))}var d=r[l]??1,f=new Xw.default(d).mul(o);return t?f:new Xw.default(Math.ceil(f.toNumber()))},Wdn=(e,t,n)=>{var r=new Xw.default(1),i=new Xw.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Xw.default(10).pow(Ndn(e)-1),i=new Xw.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Xw.default(Math.floor(e)))}else e===0?i=new Xw.default(Math.floor((t-1)/2)):n||(i=new Xw.default(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],l=0;l4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Zw;if(!Number.isFinite((t-e)/(n-1)))return{step:new Xw.default(0),tickMin:new Xw.default(0),tickMax:new Xw.default(0)};var o=a(new Xw.default(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new Xw.default(0):(s=new Xw.default(e).add(t).div(2),s=s.sub(new Xw.default(s).mod(o)));var l=Math.ceil(s.sub(e).div(o).toNumber()),u=Math.ceil(new Xw.default(t).sub(s).div(o).toNumber()),d=l+u+1;return d>n?Gdn(e,t,n,r,i+1,a):(d0?u+(n-d):u,l=t>0?l:l+(n-d)),{step:o,tickMin:s.sub(new Xw.default(l).mul(o)),tickMax:s.add(new Xw.default(u).mul(o))})},Kdn=function(e){var t=Yw(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=Math.max(i,2),l=Yw(Hdn([n,r]),2),u=l[0],d=l[1];if(u===-1/0||d===1/0){var f=d===1/0?[u,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),d];return n>r?f.reverse():f}if(u===d)return Wdn(u,i,a);var p=Gdn(u,d,s,a,0,o===`snap125`?Udn:Zw),m=p.step,h=p.tickMin,g=p.tickMax,_=Pdn(h,g.add(new Xw.default(.1).mul(m)),m);return n>r?_.reverse():_},qdn=function(e,t){var n=Yw(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=Yw(Hdn([r,i]),2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var d=o===`snap125`?Udn:Zw,f=Math.max(t,2),p=d(new Xw.default(u).sub(l).div(f-1),a,0),m=[...Pdn(new Xw.default(l),new Xw.default(u),p),u];if(a===!1){m=m.map(e=>Math.round(e));var h=m.length-1;h>0&&m[h]===m[h-1]&&(m=m.slice(0,h))}return r>i?m.reverse():m}})),Ydn=o((()=>{Jdn()})),Qw,Xdn,$w,Zdn,eT,tT,nT,rT,Qdn,iT,$dn,aT=o((()=>{Qw=e=>e.rootProps.maxBarSize,Xdn=e=>e.rootProps.barGap,$w=e=>e.rootProps.barCategoryGap,Zdn=e=>e.rootProps.barSize,eT=e=>e.rootProps.stackOffset,tT=e=>e.rootProps.reverseStackOrder,nT=e=>e.options.chartName,rT=e=>e.rootProps.syncId,Qdn=e=>e.rootProps.syncMethod,iT=e=>e.options.eventEmitter,$dn=e=>e.rootProps.baseValue})),oT,sT=o((()=>{oT={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3}})),cT,efn=o((()=>{sT(),cT={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:`polygon`,cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:`auto`,orientation:`outer`,reversed:!1,scale:`auto`,tick:!0,tickLine:!0,tickSize:8,type:`auto`,zIndex:oT.axis}})),lT,tfn=o((()=>{sT(),lT={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:`auto`,label:!1,orientation:`right`,radiusAxisId:0,reversed:!1,scale:`auto`,stroke:`#ccc`,tick:!0,tickCount:5,tickLine:!0,type:`auto`,zIndex:oT.axis}})),uT,nfn=o((()=>{uT=(e,t)=>{if(e&&t)return e!=null&&e.reversed?[t[1],t[0]]:t}}));function dT(e,t,n){if(n!==`auto`)return n;if(e!=null)return FC(e,t)?`category`:`number`}var fT=o((()=>{RC()}));function rfn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pT(e){for(var t=1;t{NS(),VC(),qC(),Vw(),Lx(),efn(),tfn(),nfn(),fw(),fT(),sfn={allowDataOverflow:cT.allowDataOverflow,allowDecimals:cT.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:cT.angleAxisId,includeHidden:!1,name:void 0,reversed:cT.reversed,scale:cT.scale,tick:cT.tick,tickCount:void 0,ticks:void 0,type:cT.type,unit:void 0,niceTicks:`auto`},cfn={allowDataOverflow:lT.allowDataOverflow,allowDecimals:lT.allowDecimals,allowDuplicatedCategory:lT.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:lT.radiusAxisId,includeHidden:lT.includeHidden,name:void 0,reversed:lT.reversed,scale:lT.scale,tick:lT.tick,tickCount:lT.tickCount,ticks:void 0,type:lT.type,unit:void 0,niceTicks:`auto`},lfn=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},mT=MS([lfn,lw],(e,t)=>{if(e!=null)return e;var n=dT(t,`angleAxis`,sfn.type)??`category`;return pT(pT({},sfn),{},{type:n})}),ufn=(e,t)=>e.polarAxis.radiusAxis[t],hT=MS([ufn,lw],(e,t)=>{if(e!=null)return e;var n=dT(t,`radiusAxis`,cfn.type)??`category`;return pT(pT({},cfn),{},{type:n})}),gT=e=>e.polarOptions,dfn=MS([zC,BC,GC],Bun),ffn=MS([gT,dfn],(e,t)=>{if(e!=null)return Px(e.innerRadius,t,0)}),pfn=MS([gT,dfn],(e,t)=>{if(e!=null)return Px(e.outerRadius,t,t*.8)}),mfn=e=>e==null?[0,0]:[e.startAngle,e.endAngle],hfn=MS([gT],mfn),gfn=MS([mT,hfn],uT),_fn=MS([dfn,ffn,pfn],(e,t,n)=>{if(e!=null&&t!=null&&n!=null)return[t,n]}),vfn=MS([hT,_fn],uT),_T=MS([ow,gT,ffn,pfn,zC,BC],(e,t,n,r,i,a)=>{if(!(e!==`centric`&&e!==`radial`||t==null||n==null||r==null)){var o=t.cx,s=t.cy,l=t.startAngle,u=t.endAngle;return{cx:Px(o,i,i/2),cy:Px(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:u,clockWise:!1}}})})),yT,yfn=o((()=>{yT=(e,t)=>t})),bT,bfn=o((()=>{bT=(e,t,n)=>n}));function xfn(e){return e==null?void 0:e.id}var Sfn=o((()=>{}));function Cfn(e,t,n){var r=t.chartData,i=r===void 0?[]:r,a=n.allowDuplicatedCategory,o=n.dataKey,s=new Map;return e.forEach(e=>{var t=e.data??i;if(t!=null&&t.length!==0){var n=xfn(e);t.forEach((t,r)=>{var i=o==null||a?r:String(MC(t,o,null)),l=MC(t,e.dataKey,0),u=s.has(i)?s.get(i):{};Object.assign(u,{[n]:l}),s.set(i,u)})}}),Array.from(s.values())}var wfn=o((()=>{Sfn(),RC()}));function xT(e){return`stackId`in e&&e.stackId!=null&&e.dataKey!=null}var Tfn=o((()=>{})),ST,Efn=o((()=>{ST=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1]}));function Dfn(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Ofn(e,t){if(e.length===t.length){for(var n=0;n{})),CT,Afn=o((()=>{fw(),CT=e=>{var t=ow(e);return t===`horizontal`?`xAxis`:t===`vertical`?`yAxis`:t===`centric`?`angleAxis`:`radiusAxis`}})),wT,jfn=o((()=>{wT=e=>e.tooltip.settings.axisId}));function Mfn(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(r!=null){if(e.bandwidth&&n!=null&&n.position){var i=e.bandwidth();switch(n.position){case`middle`:r+=i/2;break;case`end`:r+=i}}return r}}}}}var Nfn=o((()=>{})),Pfn,Ffn=o((()=>{jdn(),AC(),Pfn=(e,t)=>{if(t!=null)switch(e){case`linear`:if(!Jw(t)){for(var n,r,i=0;ir)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t;default:return t}}}));function TT(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}var Ifn=o((()=>{}));function Lfn(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}var Rfn=o((()=>{}));function zfn(e){let t,n,r;e.length===2?(t=e===TT||e===Lfn?e:Bfn,n=e,r=e):(t=TT,n=(t,n)=>TT(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<0?i=t+1:a=t}while(i>>1;n(e[t],r)<=0?i=t+1:a=t}while(in&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function Bfn(){return 0}var Vfn=o((()=>{Ifn(),Rfn()}));function Hfn(e){return e===null?NaN:+e}function*Ufn(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var Wfn=o((()=>{})),Gfn,ET,Kfn=o((()=>{Ifn(),Vfn(),Wfn(),Gfn=zfn(TT),ET=Gfn.right,Gfn.left,zfn(Hfn).center}));function qfn({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function Jfn({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Yfn({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Xfn(e){return typeof e==`object`&&e?e.valueOf():e}var Zfn,Qfn=o((()=>{Zfn=class extends Map{constructor(e,t=Xfn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(qfn(this,e))}has(e){return super.has(qfn(this,e))}set(e,t){return super.set(Jfn(this,e),t)}delete(e){return super.delete(Yfn(this,e))}}}));function $fn(e=TT){if(e===TT)return epn;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function epn(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et))}var tpn=o((()=>{Ifn()}));function npn(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=opn?10:a>=spn?5:a>=cpn?2:1,s,l,u;return i<0?(u=10**-i/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=10**i*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];let r=t=i))return[];let s=a-i+1,l=Array(s);if(r){if(o<0)for(let e=0;e{opn=Math.sqrt(50),spn=Math.sqrt(10),cpn=Math.sqrt(2)}));function upn(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}var dpn=o((()=>{}));function fpn(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}var ppn=o((()=>{}));function mpn(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?epn:$fn(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1),d=Math.max(n,Math.floor(t-o*l/a+u)),f=Math.min(r,Math.floor(t+(a-o)*l/a+u));mpn(e,t,d,f,i)}let a=e[t],o=n,s=r;for(DT(e,n,t),i(e[r],a)>0&&DT(e,n,r);o0;)--s}i(e[n],a)===0?DT(e,n,s):(++s,DT(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function DT(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}var hpn=o((()=>{tpn()}));function gpn(e,t,n){if(e=Float64Array.from(Ufn(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return fpn(e);if(t>=1)return upn(e);var r,i=(r-1)*t,a=Math.floor(i),o=upn(mpn(e,a).subarray(0,a+1));return o+(fpn(e.subarray(a+1))-o)*(i-a)}}function _pn(e,t,n=Hfn){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}var vpn=o((()=>{dpn(),ppn(),hpn(),Wfn()}));function ypn(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r{})),OT=o((()=>{Kfn(),Ifn(),Vfn(),Rfn(),Qfn(),tpn(),lpn(),vpn(),dpn(),ppn(),hpn(),bpn()}));function kT(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function AT(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t)}return this}var jT=o((()=>{}));function MT(){var e=new Zfn,t=[],n=[],r=xpn;function i(i){let a=e.get(i);if(a===void 0){if(r!==xpn)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Zfn;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return MT(t,n).unknown(r)},kT.apply(i,arguments),i}var xpn,Spn=o((()=>{OT(),jT(),xpn=Symbol(`implicit`)}));function NT(){var e=MT().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,l=0,u=0,d=.5;delete e.unknown;function f(){var e=t().length,f=i{OT(),jT(),Spn()}));function PT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Epn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}var Dpn=o((()=>{}));function FT(){}function Opn(){return this.rgb().formatHex()}function kpn(){return this.rgb().formatHex8()}function Apn(){return zpn(this).formatHsl()}function jpn(){return this.rgb().formatRgb()}function IT(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Upn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Mpn(t):n===3?new RT(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?LT(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?LT(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Wpn.exec(e))?new RT(t[1],t[2],t[3],1):(t=Gpn.exec(e))?new RT(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kpn.exec(e))?LT(t[1],t[2],t[3],t[4]):(t=qpn.exec(e))?LT(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Jpn.exec(e))?Rpn(t[1],t[2]/100,t[3]/100,1):(t=Ypn.exec(e))?Rpn(t[1],t[2]/100,t[3]/100,t[4]):Xpn.hasOwnProperty(e)?Mpn(Xpn[e]):e===`transparent`?new RT(NaN,NaN,NaN,0):null}function Mpn(e){return new RT(e>>16&255,e>>8&255,e&255,1)}function LT(e,t,n,r){return r<=0&&(e=t=n=NaN),new RT(e,t,n,r)}function Npn(e){return e instanceof FT||(e=IT(e)),e?(e=e.rgb(),new RT(e.r,e.g,e.b,e.opacity)):new RT}function Ppn(e,t,n,r){return arguments.length===1?Npn(e):new RT(e,t,n,r??1)}function RT(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Fpn(){return`#${VT(this.r)}${VT(this.g)}${VT(this.b)}`}function Ipn(){return`#${VT(this.r)}${VT(this.g)}${VT(this.b)}${VT((isNaN(this.opacity)?1:this.opacity)*255)}`}function Lpn(){let e=zT(this.opacity);return`${e===1?`rgb(`:`rgba(`}${BT(this.r)}, ${BT(this.g)}, ${BT(this.b)}${e===1?`)`:`, ${e})`}`}function zT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function BT(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function VT(e){return e=BT(e),(e<16?`0`:``)+e.toString(16)}function Rpn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new HT(e,t,n,r)}function zpn(e){if(e instanceof HT)return new HT(e.h,e.s,e.l,e.opacity);if(e instanceof FT||(e=IT(e)),!e)return new HT;if(e instanceof HT)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(n-r)/s+(n0&&l<1?0:o,new HT(o,s,l,e.opacity)}function Bpn(e,t,n,r){return arguments.length===1?zpn(e):new HT(e,t,n,r??1)}function HT(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Vpn(e){return e=(e||0)%360,e<0?e+360:e}function UT(e){return Math.max(0,Math.min(1,e||0))}function Hpn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var WT,GT,KT,qT,JT,Upn,Wpn,Gpn,Kpn,qpn,Jpn,Ypn,Xpn,Zpn=o((()=>{Dpn(),WT=.7,GT=1/WT,KT=`\\s*([+-]?\\d+)\\s*`,qT=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,JT=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Upn=/^#([0-9a-f]{3,8})$/,Wpn=RegExp(`^rgb\\(${KT},${KT},${KT}\\)$`),Gpn=RegExp(`^rgb\\(${JT},${JT},${JT}\\)$`),Kpn=RegExp(`^rgba\\(${KT},${KT},${KT},${qT}\\)$`),qpn=RegExp(`^rgba\\(${JT},${JT},${JT},${qT}\\)$`),Jpn=RegExp(`^hsl\\(${qT},${JT},${JT}\\)$`),Ypn=RegExp(`^hsla\\(${qT},${JT},${JT},${qT}\\)$`),Xpn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},PT(FT,IT,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Opn,formatHex:Opn,formatHex8:kpn,formatHsl:Apn,formatRgb:jpn,toString:jpn}),PT(RT,Ppn,Epn(FT,{brighter(e){return e=e==null?GT:GT**+e,new RT(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?WT:WT**+e,new RT(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new RT(BT(this.r),BT(this.g),BT(this.b),zT(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:Fpn,formatHex:Fpn,formatHex8:Ipn,formatRgb:Lpn,toString:Lpn})),PT(HT,Bpn,Epn(FT,{brighter(e){return e=e==null?GT:GT**+e,new HT(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?WT:WT**+e,new HT(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new RT(Hpn(e>=240?e-240:e+120,i,r),Hpn(e,i,r),Hpn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new HT(Vpn(this.h),UT(this.s),UT(this.l),zT(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(){let e=zT(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Vpn(this.h)}, ${UT(this.s)*100}%, ${UT(this.l)*100}%${e===1?`)`:`, ${e})`}`}}))})),Qpn,$pn,emn=o((()=>{Qpn=Math.PI/180,$pn=180/Math.PI}));function tmn(e){if(e instanceof YT)return new YT(e.l,e.a,e.b,e.opacity);if(e instanceof XT)return lmn(e);e instanceof RT||(e=Npn(e));var t=omn(e.r),n=omn(e.g),r=omn(e.b),i=rmn((.2225045*t+.7168786*n+.0606169*r)/dmn),a,o;return t===n&&n===r?a=o=i:(a=rmn((.4360747*t+.3850649*n+.1430804*r)/umn),o=rmn((.0139322*t+.0971045*n+.7141733*r)/fmn)),new YT(116*i-16,500*(a-i),200*(i-o),e.opacity)}function nmn(e,t,n,r){return arguments.length===1?tmn(e):new YT(e,t,n,r??1)}function YT(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function rmn(e){return e>hmn?e**(1/3):e/mmn+pmn}function imn(e){return e>QT?e*e*e:mmn*(e-pmn)}function amn(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function omn(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function smn(e){if(e instanceof XT)return new XT(e.h,e.c,e.l,e.opacity);if(e instanceof YT||(e=tmn(e)),e.a===0&&e.b===0)return new XT(NaN,0{Dpn(),Zpn(),emn(),ZT=18,umn=.96422,dmn=1,fmn=.82521,pmn=4/29,QT=6/29,mmn=3*QT*QT,hmn=QT*QT*QT,PT(YT,nmn,Epn(FT,{brighter(e){return new YT(this.l+ZT*(e??1),this.a,this.b,this.opacity)},darker(e){return new YT(this.l-ZT*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=umn*imn(t),e=dmn*imn(e),n=fmn*imn(n),new RT(amn(3.1338561*t-1.6168667*e-.4906146*n),amn(-.9787684*t+1.9161415*e+.033454*n),amn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),PT(XT,cmn,Epn(FT,{brighter(e){return new XT(this.h,this.c,this.l+ZT*(e??1),this.opacity)},darker(e){return new XT(this.h,this.c,this.l-ZT*(e??1),this.opacity)},rgb(){return lmn(this).rgb()}}))})),$T=o((()=>{Zpn(),gmn(),Dpn(),emn()})),_mn=o((()=>{})),vmn=o((()=>{_mn()})),eE,ymn=o((()=>{eE=e=>()=>e}));function bmn(e,t){return function(n){return e+n*t}}function xmn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Smn(e,t){var n=t-e;return n?bmn(e,n>180||n<-180?n-360*Math.round(n/360):n):eE(isNaN(e)?t:e)}function Cmn(e){return(e=+e)==1?tE:function(t,n){return n-t?xmn(t,n,e):eE(isNaN(t)?n:t)}}function tE(e,t){var n=t-e;return n?bmn(e,n):eE(isNaN(e)?t:e)}var wmn=o((()=>{ymn()})),nE,Tmn=o((()=>{$T(),_mn(),vmn(),wmn(),nE=(function e(t){var n=Cmn(t);function r(e,t){var r=n((e=Ppn(e)).r,(t=Ppn(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=tE(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1)}));function Emn(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i{}));function kmn(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o{cE()}));function jmn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}var Mmn=o((()=>{}));function rE(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var iE=o((()=>{}));function Nmn(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=sE(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var Pmn=o((()=>{cE()}));function Fmn(e){return function(){return e}}function Imn(e){return function(t){return e(t)+``}}function Lmn(e,t){var n=aE.lastIndex=oE.lastIndex=0,r,i,a,o=-1,s=[],l=[];for(e+=``,t+=``;(r=aE.exec(e))&&(i=oE.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:rE(r,i)})),n=oE.lastIndex;return n{iE(),aE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oE=new RegExp(aE.source,`g`)}));function sE(e,t){var n=typeof t,r;return t==null||n===`boolean`?eE(t):(n===`number`?rE:n===`string`?(r=IT(t))?(t=r,nE):Lmn:t instanceof IT?nE:t instanceof Date?jmn:Dmn(t)?Emn:Array.isArray(t)?kmn:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Nmn:rE)(e,t)}var cE=o((()=>{$T(),Tmn(),Amn(),Mmn(),iE(),Pmn(),Rmn(),ymn(),Omn()}));function zmn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Bmn=o((()=>{}));function Vmn(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r{Hmn=180/Math.PI,Umn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}}));function Gmn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Umn:Vmn(t.a,t.b,t.c,t.d,t.e,t.f)}function Kmn(e){return e==null||(lE||(lE=document.createElementNS(`http://www.w3.org/2000/svg`,`g`)),lE.setAttribute(`transform`,e),!(e=lE.transform.baseVal.consolidate()))?Umn:(e=e.matrix,Vmn(e.a,e.b,e.c,e.d,e.e,e.f))}var lE,qmn=o((()=>{Wmn()}));function Jmn(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var l=o.push(`translate(`,null,t,null,n);s.push({i:l-4,x:rE(e,i)},{i:l-2,x:rE(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:rE(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:rE(e,t)})}function l(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:rE(e,n)},{i:s-2,x:rE(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),l(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t{iE(),qmn(),Ymn=Jmn(Gmn,`px, `,`px)`,`deg)`),Xmn=Jmn(Kmn,`, `,`)`,`)`)}));function Qmn(e){return function(t,n){var r=e((t=cmn(t)).h,(n=cmn(n)).h),i=tE(t.c,n.c),a=tE(t.l,n.l),o=tE(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=a(e),t.opacity=o(e),t+``}}}var $mn,ehn=o((()=>{$T(),wmn(),$mn=Qmn(Smn)}));function thn(e,t){t===void 0&&(t=e,e=sE);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n{cE()})),uE=o((()=>{cE(),Amn(),_mn(),vmn(),Mmn(),wmn(),iE(),Omn(),Pmn(),Bmn(),Rmn(),Zmn(),Tmn(),$T(),ehn(),nhn()}));function rhn(e){return function(){return e}}var ihn=o((()=>{}));function dE(e){return+e}var ahn=o((()=>{}));function fE(e){return e}function ohn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:rhn(isNaN(t)?NaN:.5)}function shn(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function chn(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?lhn:chn,l=u=null,f}function f(i){return i==null||isNaN(i=+i)?a:(l||(l=s(e.map(r),t,n)))(r(o(i)))}return f.invert=function(n){return o(i((u||(u=s(t,e.map(r),rE)))(n)))},f.domain=function(t){return arguments.length?(e=Array.from(t,dE),d()):e.slice()},f.range=function(e){return arguments.length?(t=Array.from(e),d()):t.slice()},f.rangeRound=function(e){return t=Array.from(e),n=zmn,d()},f.clamp=function(e){return arguments.length?(o=e?!0:fE,d()):o!==fE},f.interpolate=function(e){return arguments.length?(n=e,d()):n},f.unknown=function(e){return arguments.length?(a=e,f):a},function(e,t){return r=e,i=t,d()}}function dhn(){return uhn()(fE,fE)}var fhn,mE=o((()=>{OT(),uE(),ihn(),ahn(),fhn=[0,1]}));function phn(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function mhn(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}var hhn=o((()=>{}));function hE(e){return e=mhn(Math.abs(e)),e?e[1]:NaN}var ghn=o((()=>{hhn()}));function _hn(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}var vhn=o((()=>{}));function yhn(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var bhn=o((()=>{}));function gE(e){if(!(t=Shn.exec(e)))throw Error(`invalid format: `+e);var t;return new xhn({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function xhn(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}var Shn,Chn=o((()=>{Shn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,gE.prototype=xhn.prototype,xhn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type}}));function whn(e){out:for(var t=e.length,n=1,r=-1,i;n0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var Thn=o((()=>{}));function Ehn(e,t){var n=mhn(e,t);if(!n)return Dhn=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Dhn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+mhn(e,Math.max(0,t+a-1))[0]}var Dhn,Ohn=o((()=>{hhn()}));function khn(e,t){var n=mhn(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var Ahn=o((()=>{hhn()})),jhn,Mhn=o((()=>{hhn(),Ohn(),Ahn(),jhn={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:phn,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>khn(e*100,t),r:khn,s:Ehn,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}}));function Nhn(e){return e}var Phn=o((()=>{}));function Fhn(e){var t=e.grouping===void 0||e.thousands===void 0?Nhn:_hn(Ihn.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Nhn:yhn(Ihn.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,l=e.nan===void 0?`NaN`:e.nan+``;function u(e,u){e=gE(e);var d=e.fill,f=e.align,p=e.sign,m=e.symbol,h=e.zero,g=e.width,_=e.comma,v=e.precision,y=e.trim,b=e.type;b===`n`?(_=!0,b=`g`):jhn[b]||(v===void 0&&(v=12),y=!0,b=`g`),(h||d===`0`&&f===`=`)&&(h=!0,d=`0`,f=`=`);var x=(u&&u.prefix!==void 0?u.prefix:``)+(m===`$`?n:m===`#`&&/[boxX]/.test(b)?`0`+b.toLowerCase():``),S=(m===`$`?r:/[%p]/.test(b)?o:``)+(u&&u.suffix!==void 0?u.suffix:``),C=jhn[b],w=/[defgprs%]/.test(b);v=v===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function T(e){var n=x,r=S,o,u,m;if(b===`c`)r=C(e)+r,e=``;else{e=+e;var T=e<0||1/e<0;if(e=isNaN(e)?l:C(Math.abs(e),v),y&&(e=whn(e)),T&&+e==0&&p!==`+`&&(T=!1),n=(T?p===`(`?p:s:p===`-`||p===`(`?``:p)+n,r=(b===`s`&&!isNaN(e)&&Dhn!==void 0?Lhn[8+Dhn/3]:``)+r+(T&&p===`(`?`)`:``),w){for(o=-1,u=e.length;++om||m>57){r=(m===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}_&&!h&&(e=t(e,1/0));var E=n.length+e.length+r.length,D=E>1)+n+e+r+D.slice(E);break;default:e=D+n+e+r}return a(e)}return T.toString=function(){return e+``},T}function d(e,t){var n=Math.max(-8,Math.min(8,Math.floor(hE(t)/3)))*3,r=10**-n,i=u((e=gE(e),e.type=`f`,e),{suffix:Lhn[8+n/3]});return function(e){return i(r*e)}}return{format:u,formatPrefix:d}}var Ihn,Lhn,Rhn=o((()=>{ghn(),vhn(),bhn(),Chn(),Thn(),Mhn(),Ohn(),Phn(),Ihn=Array.prototype.map,Lhn=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`]}));function zhn(e){return Bhn=Fhn(e),_E=Bhn.format,Vhn=Bhn.formatPrefix,Bhn}var Bhn,_E,Vhn,Hhn=o((()=>{Rhn(),zhn({thousands:`,`,grouping:[3],currency:[`$`,``]})}));function Uhn(e){return Math.max(0,-hE(Math.abs(e)))}var Whn=o((()=>{ghn()}));function Ghn(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(hE(t)/3)))*3-hE(Math.abs(e)))}var Khn=o((()=>{ghn()}));function qhn(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hE(t)-hE(e))+1}var Jhn=o((()=>{ghn()})),Yhn=o((()=>{Hhn(),Rhn(),Chn(),Whn(),Khn(),Jhn()}));function Xhn(e,t,n,r){var i=apn(e,t,n),a;switch(r=gE(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Ghn(i,o))&&(r.precision=a),Vhn(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=qhn(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Uhn(i))&&(r.precision=a-(r.type===`%`)*2)}return _E(r)}var Zhn=o((()=>{OT(),Yhn()}));function vE(e){var t=e.domain;return e.ticks=function(e){var n=t();return rpn(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Xhn(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,u,d=10;for(s0;){if(u=ipn(o,s,n),u===l)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function yE(){var e=dhn();return e.copy=function(){return pE(e,yE())},kT.apply(e,arguments),vE(e)}var bE=o((()=>{OT(),mE(),jT(),Zhn()}));function Qhn(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,dE),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Qhn(e).unknown(t)},e=arguments.length?Array.from(e,dE):[0,1],vE(n)}var $hn=o((()=>{bE(),ahn()}));function egn(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a{}));function ngn(e){return Math.log(e)}function rgn(e){return Math.exp(e)}function ign(e){return-Math.log(-e)}function agn(e){return-Math.exp(-e)}function ogn(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function sgn(e){return e===10?ogn:e===Math.E?Math.exp:t=>e**+t}function cgn(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function lgn(e){return(t,n)=>-e(-t,n)}function ugn(e){let t=e(ngn,rgn),n=t.domain,r=10,i,a;function o(){return i=cgn(r),a=sgn(r),n()[0]<0?(i=lgn(i),a=lgn(a),e(ign,agn)):e(ngn,rgn),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],l=s0){for(;u<=d;++u)for(f=1;fs)break;h.push(p)}}else for(;u<=d;++u)for(f=r-1;f>=1;--f)if(p=u>0?f/a(-u):f*a(u),!(ps)break;h.push(p)}h.length*2{if(e??(e=10),n??(n=r===10?`s`:`,`),typeof n!=`function`&&(!(r%1)&&(n=gE(n)).precision==null&&(n.trim=!0),n=_E(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*rn(egn(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function dgn(){let e=ugn(uhn()).domain([1,10]);return e.copy=()=>pE(e,dgn()).base(e.base()),kT.apply(e,arguments),e}var fgn=o((()=>{OT(),Yhn(),tgn(),mE(),jT()}));function pgn(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function mgn(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function hgn(e){var t=1,n=e(pgn(t),mgn(t));return n.constant=function(n){return arguments.length?e(pgn(t=+n),mgn(t)):t},vE(n)}function ggn(){var e=hgn(uhn());return e.copy=function(){return pE(e,ggn()).constant(e.constant())},kT.apply(e,arguments)}var _gn=o((()=>{bE(),mE(),jT()}));function vgn(e){return function(t){return t<0?-((-t)**+e):t**+e}}function ygn(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bgn(e){return e<0?-e*e:e*e}function xgn(e){var t=e(fE,fE),n=1;function r(){return n===1?e(fE,fE):n===.5?e(ygn,bgn):e(vgn(n),vgn(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},vE(t)}function Sgn(){var e=xgn(uhn());return e.copy=function(){return pE(e,Sgn()).exponent(e.exponent())},kT.apply(e,arguments),e}function Cgn(){return Sgn.apply(null,arguments).exponent(.5)}var wgn=o((()=>{bE(),mE(),jT()}));function Tgn(e){return Math.sign(e)*e*e}function Egn(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Dgn(){var e=dhn(),t=[0,1],n=!1,r;function i(t){var i=Egn(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(Tgn(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,dE)).map(Tgn)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Dgn(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},kT.apply(i,arguments),vE(i)}var Ogn=o((()=>{mE(),jT(),bE(),ahn()}));function kgn(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r0?n[i-1]:e[0],i{OT(),jT()}));function jgn(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[ET(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return jgn().domain([e,t]).range(i).unknown(a)},kT.apply(vE(o),arguments)}var Mgn=o((()=>{OT(),bE(),jT()}));function Ngn(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[ET(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return Ngn().domain(e).range(t).unknown(n)},kT.apply(i,arguments)}var Pgn=o((()=>{OT(),jT()}));function xE(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(sxE(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(Fgn.setTime(+t),Ign.setTime(+r),e(Fgn),e(Ign),Math.floor(n(Fgn,Ign))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Fgn,Ign,SE=o((()=>{Fgn=new Date,Ign=new Date})),CE,Lgn=o((()=>{SE(),CE=xE(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e),CE.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?xE(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):CE),CE.range})),wE,TE,EE,DE,Rgn,zgn,Bgn,OE=o((()=>{wE=1e3,TE=wE*60,EE=TE*60,DE=EE*24,Rgn=DE*7,zgn=DE*30,Bgn=DE*365})),kE,Vgn=o((()=>{SE(),OE(),kE=xE(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*wE)},(e,t)=>(t-e)/wE,e=>e.getUTCSeconds()),kE.range})),AE,Hgn,Ugn=o((()=>{SE(),OE(),AE=xE(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wE)},(e,t)=>{e.setTime(+e+t*TE)},(e,t)=>(t-e)/TE,e=>e.getMinutes()),AE.range,Hgn=xE(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*TE)},(e,t)=>(t-e)/TE,e=>e.getUTCMinutes()),Hgn.range})),jE,Wgn,Ggn=o((()=>{SE(),OE(),jE=xE(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wE-e.getMinutes()*TE)},(e,t)=>{e.setTime(+e+t*EE)},(e,t)=>(t-e)/EE,e=>e.getHours()),jE.range,Wgn=xE(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*EE)},(e,t)=>(t-e)/EE,e=>e.getUTCHours()),Wgn.range})),ME,NE,Kgn,qgn=o((()=>{SE(),OE(),ME=xE(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*TE)/DE,e=>e.getDate()-1),ME.range,NE=xE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/DE,e=>e.getUTCDate()-1),NE.range,Kgn=xE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/DE,e=>Math.floor(e/DE)),Kgn.range}));function PE(e){return xE(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*TE)/Rgn)}function FE(e){return xE(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Rgn)}var IE,LE,Jgn,Ygn,RE,Xgn,Zgn,zE,BE,Qgn,$gn,VE,e_n,t_n,n_n=o((()=>{SE(),OE(),IE=PE(0),LE=PE(1),Jgn=PE(2),Ygn=PE(3),RE=PE(4),Xgn=PE(5),Zgn=PE(6),IE.range,LE.range,Jgn.range,Ygn.range,RE.range,Xgn.range,Zgn.range,zE=FE(0),BE=FE(1),Qgn=FE(2),$gn=FE(3),VE=FE(4),e_n=FE(5),t_n=FE(6),zE.range,BE.range,Qgn.range,$gn.range,VE.range,e_n.range,t_n.range})),HE,r_n,i_n=o((()=>{SE(),HE=xE(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),HE.range,r_n=xE(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),r_n.range})),UE,WE,a_n=o((()=>{SE(),UE=xE(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()),UE.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:xE(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),UE.range,WE=xE(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear()),WE.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:xE(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),WE.range}));function o_n(e,t,n,r,i,a){let o=[[kE,1,wE],[kE,5,5*wE],[kE,15,15*wE],[kE,30,30*wE],[a,1,TE],[a,5,5*TE],[a,15,15*TE],[a,30,30*TE],[i,1,EE],[i,3,3*EE],[i,6,6*EE],[i,12,12*EE],[r,1,DE],[r,2,2*DE],[n,1,Rgn],[t,1,zgn],[t,3,3*zgn],[e,1,Bgn]];function s(e,t,n){let r=te).right(o,i);if(a===o.length)return e.every(apn(t/Bgn,n/Bgn,r));if(a===0)return CE.every(Math.max(apn(t,n,r),1));let[s,l]=o[i/o[a-1][2]{OT(),OE(),Lgn(),Vgn(),Ugn(),Ggn(),qgn(),n_n(),i_n(),a_n(),[s_n,c_n]=o_n(WE,r_n,zE,Kgn,Wgn,Hgn),[l_n,u_n]=o_n(UE,HE,IE,ME,jE,AE)})),f_n=o((()=>{SE(),Lgn(),Vgn(),Ugn(),Ggn(),qgn(),n_n(),i_n(),a_n(),d_n()}));function p_n(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function m_n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function GE(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function h_n(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=qE(i),d=JE(i),f=qE(a),p=JE(a),m=qE(o),h=JE(o),g=qE(s),_=JE(s),v=qE(l),y=JE(l),b={a:P,A:F,b:I,B:L,c:null,d:L_n,e:L_n,f:H_n,g:$_n,G:tvn,H:R_n,I:z_n,j:B_n,L:V_n,m:U_n,M:W_n,p:R,q:ee,Q:wvn,s:Tvn,S:G_n,u:K_n,U:q_n,V:Y_n,w:X_n,W:Z_n,x:null,X:null,y:Q_n,Y:evn,Z:nvn,"%":Cvn},x={a:te,A:ne,b:z,B:re,c:null,d:rvn,e:rvn,f:cvn,g:yvn,G:xvn,H:ivn,I:avn,j:ovn,L:svn,m:lvn,M:uvn,p:ie,q:ae,Q:wvn,s:Tvn,S:dvn,u:fvn,U:pvn,V:hvn,w:gvn,W:_vn,x:null,X:null,y:vvn,Y:bvn,Z:Svn,"%":Cvn},S={a:D,A:O,b:k,B:A,c:j,d:D_n,e:D_n,f:N_n,g:C_n,G:S_n,H:k_n,I:k_n,j:O_n,L:M_n,m:E_n,M:A_n,p:E,q:T_n,Q:F_n,s:I_n,S:j_n,u:v_n,U:y_n,V:b_n,w:__n,W:x_n,x:M,X:N,y:C_n,Y:S_n,Z:w_n,"%":P_n};b.x=C(n,b),b.X=C(r,b),b.c=C(t,b),x.x=C(n,x),x.X=C(r,x),x.c=C(t,x);function C(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,l,u;for(n instanceof Date||(n=new Date(+n));++i53)return null;`w`in r||(r.w=1),`Z`in r?(a=m_n(GE(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?BE.ceil(a):BE(a),a=NE.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=p_n(GE(r.y,0,1)),o=a.getDay(),a=o>4||o===0?LE.ceil(a):LE(a),a=ME.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?m_n(GE(r.y,0,1)).getUTCDay():p_n(GE(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,m_n(r)):p_n(r)}}function T(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,l;i=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),l=S[s in Evn?t.charAt(i++):s],!l||(r=l(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function E(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=d.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=_.get(r[0].toLowerCase()),n+r[0].length):-1}function j(e,n,r){return T(e,t,n,r)}function M(e,t,r){return T(e,n,t,r)}function N(e,t,n){return T(e,r,t,n)}function P(e){return o[e.getDay()]}function F(e){return a[e.getDay()]}function I(e){return l[e.getMonth()]}function L(e){return s[e.getMonth()]}function R(e){return i[+(e.getHours()>=12)]}function ee(e){return 1+~~(e.getMonth()/3)}function te(e){return o[e.getUTCDay()]}function ne(e){return a[e.getUTCDay()]}function z(e){return l[e.getUTCMonth()]}function re(e){return s[e.getUTCMonth()]}function ie(e){return i[+(e.getUTCHours()>=12)]}function ae(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=C(e+=``,b);return t.toString=function(){return e},t},parse:function(e){var t=w(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=C(e+=``,x);return t.toString=function(){return e},t},utcParse:function(e){var t=w(e+=``,!0);return t.toString=function(){return e},t}}}function KE(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a[e.toLowerCase(),t]))}function __n(e,t,n){var r=YE.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function v_n(e,t,n){var r=YE.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function y_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function b_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function x_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function S_n(e,t,n){var r=YE.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function C_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function w_n(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function T_n(e,t,n){var r=YE.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function E_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function D_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function O_n(e,t,n){var r=YE.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function k_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function A_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function j_n(e,t,n){var r=YE.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function M_n(e,t,n){var r=YE.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function N_n(e,t,n){var r=YE.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function P_n(e,t,n){var r=Dvn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function F_n(e,t,n){var r=YE.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function I_n(e,t,n){var r=YE.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function L_n(e,t){return KE(e.getDate(),t,2)}function R_n(e,t){return KE(e.getHours(),t,2)}function z_n(e,t){return KE(e.getHours()%12||12,t,2)}function B_n(e,t){return KE(1+ME.count(UE(e),e),t,3)}function V_n(e,t){return KE(e.getMilliseconds(),t,3)}function H_n(e,t){return V_n(e,t)+`000`}function U_n(e,t){return KE(e.getMonth()+1,t,2)}function W_n(e,t){return KE(e.getMinutes(),t,2)}function G_n(e,t){return KE(e.getSeconds(),t,2)}function K_n(e){var t=e.getDay();return t===0?7:t}function q_n(e,t){return KE(IE.count(UE(e)-1,e),t,2)}function J_n(e){var t=e.getDay();return t>=4||t===0?RE(e):RE.ceil(e)}function Y_n(e,t){return e=J_n(e),KE(RE.count(UE(e),e)+(UE(e).getDay()===4),t,2)}function X_n(e){return e.getDay()}function Z_n(e,t){return KE(LE.count(UE(e)-1,e),t,2)}function Q_n(e,t){return KE(e.getFullYear()%100,t,2)}function $_n(e,t){return e=J_n(e),KE(e.getFullYear()%100,t,2)}function evn(e,t){return KE(e.getFullYear()%1e4,t,4)}function tvn(e,t){var n=e.getDay();return e=n>=4||n===0?RE(e):RE.ceil(e),KE(e.getFullYear()%1e4,t,4)}function nvn(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+KE(t/60|0,`0`,2)+KE(t%60,`0`,2)}function rvn(e,t){return KE(e.getUTCDate(),t,2)}function ivn(e,t){return KE(e.getUTCHours(),t,2)}function avn(e,t){return KE(e.getUTCHours()%12||12,t,2)}function ovn(e,t){return KE(1+NE.count(WE(e),e),t,3)}function svn(e,t){return KE(e.getUTCMilliseconds(),t,3)}function cvn(e,t){return svn(e,t)+`000`}function lvn(e,t){return KE(e.getUTCMonth()+1,t,2)}function uvn(e,t){return KE(e.getUTCMinutes(),t,2)}function dvn(e,t){return KE(e.getUTCSeconds(),t,2)}function fvn(e){var t=e.getUTCDay();return t===0?7:t}function pvn(e,t){return KE(zE.count(WE(e)-1,e),t,2)}function mvn(e){var t=e.getUTCDay();return t>=4||t===0?VE(e):VE.ceil(e)}function hvn(e,t){return e=mvn(e),KE(VE.count(WE(e),e)+(WE(e).getUTCDay()===4),t,2)}function gvn(e){return e.getUTCDay()}function _vn(e,t){return KE(BE.count(WE(e)-1,e),t,2)}function vvn(e,t){return KE(e.getUTCFullYear()%100,t,2)}function yvn(e,t){return e=mvn(e),KE(e.getUTCFullYear()%100,t,2)}function bvn(e,t){return KE(e.getUTCFullYear()%1e4,t,4)}function xvn(e,t){var n=e.getUTCDay();return e=n>=4||n===0?VE(e):VE.ceil(e),KE(e.getUTCFullYear()%1e4,t,4)}function Svn(){return`+0000`}function Cvn(){return`%`}function wvn(e){return+e}function Tvn(e){return Math.floor(e/1e3)}var Evn,YE,Dvn,Ovn,kvn=o((()=>{f_n(),Evn={"-":``,_:` `,0:`0`},YE=/^\s*\d+/,Dvn=/^%/,Ovn=/[\\^$*+?|[\]().{}]/g}));function Avn(e){return XE=h_n(e),jvn=XE.format,Mvn=XE.parse,Nvn=XE.utcFormat,Pvn=XE.utcParse,XE}var XE,jvn,Mvn,Nvn,Pvn,Fvn=o((()=>{kvn(),Avn({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]})})),Ivn=o((()=>{Fvn(),kvn()}));function Lvn(e){return new Date(e)}function Rvn(e){return e instanceof Date?+e:+new Date(+e)}function zvn(e,t,n,r,i,a,o,s,l,u){var d=dhn(),f=d.invert,p=d.domain,m=u(`.%L`),h=u(`:%S`),g=u(`%I:%M`),_=u(`%I %p`),v=u(`%a %d`),y=u(`%b %d`),b=u(`%B`),x=u(`%Y`);function S(e){return(l(e){f_n(),Ivn(),mE(),jT(),tgn()}));function Hvn(){return kT.apply(zvn(s_n,c_n,WE,r_n,zE,NE,Wgn,Hgn,kE,Nvn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}var Uvn=o((()=>{f_n(),Ivn(),Vvn(),jT()}));function Wvn(){var e=0,t=1,n,r,i,a,o=fE,s=!1,l;function u(e){return e==null||isNaN(e=+e)?l:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}u.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(e){return arguments.length?(s=!!e,u):s},u.interpolator=function(e){return arguments.length?(o=e,u):o};function d(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),u):[o(0),o(1)]}}return u.range=d(sE),u.rangeRound=d(zmn),u.unknown=function(e){return arguments.length?(l=e,u):l},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),u}}function ZE(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Gvn(){var e=vE(Wvn()(fE));return e.copy=function(){return ZE(e,Gvn())},AT.apply(e,arguments)}function Kvn(){var e=ugn(Wvn()).domain([1,10]);return e.copy=function(){return ZE(e,Kvn()).base(e.base())},AT.apply(e,arguments)}function qvn(){var e=hgn(Wvn());return e.copy=function(){return ZE(e,qvn()).constant(e.constant())},AT.apply(e,arguments)}function Jvn(){var e=xgn(Wvn());return e.copy=function(){return ZE(e,Jvn()).exponent(e.exponent())},AT.apply(e,arguments)}function Yvn(){return Jvn.apply(null,arguments).exponent(.5)}var Xvn=o((()=>{uE(),mE(),jT(),bE(),fgn(),_gn(),wgn()}));function Zvn(){var e=[],t=fE;function n(n){if(n!=null&&!isNaN(n=+n))return t((ET(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(TT),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>gpn(e,r/t))},n.copy=function(){return Zvn(t).domain(e)},AT.apply(n,arguments)}var Qvn=o((()=>{OT(),mE(),jT()}));function $vn(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,u=fE,d,f=!1,p;function m(e){return isNaN(e=+e)?p:(e=.5+((e=+d(e))-a)*(r*e{uE(),mE(),jT(),bE(),fgn(),Xvn(),_gn(),wgn()})),oyn=o((()=>{Tpn(),$hn(),bE(),fgn(),_gn(),Spn(),wgn(),Ogn(),Agn(),Mgn(),Pgn(),Vvn(),Uvn(),Xvn(),Qvn(),ayn(),Zhn()})),syn=l({scaleBand:()=>NT,scaleDiverging:()=>eyn,scaleDivergingLog:()=>tyn,scaleDivergingPow:()=>ryn,scaleDivergingSqrt:()=>iyn,scaleDivergingSymlog:()=>nyn,scaleIdentity:()=>Qhn,scaleImplicit:()=>xpn,scaleLinear:()=>yE,scaleLog:()=>dgn,scaleOrdinal:()=>MT,scalePoint:()=>wpn,scalePow:()=>Sgn,scaleQuantile:()=>kgn,scaleQuantize:()=>jgn,scaleRadial:()=>Dgn,scaleSequential:()=>Gvn,scaleSequentialLog:()=>Kvn,scaleSequentialPow:()=>Jvn,scaleSequentialQuantile:()=>Zvn,scaleSequentialSqrt:()=>Yvn,scaleSequentialSymlog:()=>qvn,scaleSqrt:()=>Cgn,scaleSymlog:()=>ggn,scaleThreshold:()=>Ngn,scaleTime:()=>Bvn,scaleUtc:()=>Hvn,tickFormat:()=>Xhn}),cyn=o((()=>{oyn()}));function lyn(e){var t=syn;if(e in t&&typeof t[e]==`function`)return t[e]();var n=`scale${Ix(e)}`;if(n in t&&typeof t[n]==`function`)return t[n]()}function uyn(e,t,n){if(typeof e==`function`)return e.copy().domain(t).range(n);if(e!=null){var r=lyn(e);if(r!=null)return r.domain(t).range(n),r}}function dyn(e,t,n,r){if(n!=null&&r!=null)return typeof e.scale==`function`?uyn(e.scale,n,r):uyn(t,n,r)}var fyn=o((()=>{cyn(),Lx()}));function pyn(e){return`scale${Ix(e)}`}function myn(e){return pyn(e)in syn}var hyn,gyn=o((()=>{cyn(),Lx(),hyn=(e,t,n)=>{if(e!=null){var r=e.scale,i=e.type;if(r===`auto`)return i===`category`&&n&&(n.indexOf(`LineChart`)>=0||n.indexOf(`AreaChart`)>=0||n.indexOf(`ComposedChart`)>=0&&!t)?`point`:i===`category`?`band`:`linear`;if(typeof r==`string`)return myn(r)?r:`point`}}}));function _yn(e,t){for(var n=0,r=e.length,i=e[0]t)?n=a+1:r=a}return n}function vyn(e,t){if(e){var n=t??e.domain(),r=n.map(t=>e(t)??0),i=e.range();if(!(n.length===0||i.length<2))return e=>{var t=_yn(r,e);if(t<=0)return n[0];if(t>=n.length)return n[n.length-1];var i=r[t-1]??0,a=r[t]??0;return Math.abs(e-i)<=Math.abs(e-a)?n[t-1]:n[t]}}}var yyn=o((()=>{}));function byn(e){if(e!=null)return`invert`in e&&typeof e.invert==`function`?e.invert.bind(e):vyn(e,void 0)}var xyn=o((()=>{yyn()}));function Syn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Cyn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{switch(e){case`xAxis`:return`xAxisId`in n&&n.xAxisId===t;case`yAxis`:return`yAxisId`in n&&n.yAxisId===t;case`zAxis`:return`zAxisId`in n&&n.zAxisId===t;case`angleAxis`:return`angleAxisId`in n&&n.angleAxisId===t;case`radiusAxis`:return`radiusAxisId`in n&&n.radiusAxisId===t;default:return!1}}}function QE(e){if(Mx(e)||e instanceof Date){var t=Number(e);if(OC(t))return t}}function Pyn(e){if(Array.isArray(e)){var t=[QE(e[0]),QE(e[1])];return Jw(t)?t:void 0}var n=QE(e);if(n!=null)return[n,n]}function $E(e){return e.map(QE).filter(Ex)}function Fyn(e,t){var n=QE(e),r=QE(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}function Iyn(e,t){switch(e){case`xAxis`:return t.direction===`x`;case`yAxis`:return t.direction===`y`;default:return!1}}function Lyn(e,t,n){if(!n||!n.length)return[];var r;if(typeof t==`number`&&!kx(t))r=t;else if(Array.isArray(t)){var i=$E(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:$E(n.flatMap(t=>{var n=MC(e,t.dataKey),i,a;if(Array.isArray(n)){var o=Dyn(n,2);i=o[0],a=o[1]}else i=a=n;if(OC(i)&&OC(a))return[r-i,r+a]}))}function Ryn(e){var t=e.value;if(Mx(t)||t instanceof Date)return t}function zyn(e){var t;if(e.x!=null)return $E([e.x]);var n=(t=e.segment)==null?void 0:t.map(e=>e.x);return n==null||n.length===0?[]:$E(n)}function Byn(e){var t;if(e.y!=null)return $E([e.y]);var n=(t=e.segment)==null?void 0:t.map(e=>e.y);return n==null||n.length===0?[]:$E(n)}function Vyn(e,t){return e.idt.id)}var Hyn,eD,Uyn,tD,nD,Wyn,rD,iD,Gyn,aD,Kyn,oD,qyn,sD,Jyn,cD,lD,Yyn,Xyn,Zyn,uD,Qyn,$yn,dD,fD,ebn,tbn,pD,nbn,mD,hD,rbn,gD,_D,ibn,abn,obn,sbn,cbn,lbn,vD,ubn,yD,dbn,fbn,pbn,mbn,bD,hbn,gbn,_bn,vbn,ybn,bbn,xbn,Sbn,Cbn,wbn,Tbn,Ebn,Dbn,Obn,kbn,Abn,jbn,Mbn,Nbn,xD,Pbn,Fbn,SD,Ibn,Lbn,Rbn,zbn,Bbn,Vbn,Hbn,Ubn,Wbn,CD,Gbn,Kbn,wD,TD,ED,DD,OD,kD,qbn,Jbn,Ybn,Xbn,Zbn,Qbn,$bn,exn,txn,nxn,rxn,ixn,axn,oxn,sxn,cxn,AD,lxn,uxn,dxn,fxn,jD,MD,pxn,mxn,hxn,gxn,_xn,ND=o((()=>{NS(),_dn(),fw(),RC(),qw(),jdn(),Lx(),AC(),Ydn(),VC(),Man(),qC(),Jan(),aT(),vT(),yfn(),bfn(),nfn(),WC(),Sfn(),wfn(),Tfn(),Efn(),kfn(),Afn(),jfn(),Nfn(),Ffn(),fyn(),gyn(),yyn(),xyn(),Hyn=[0,`auto`],eD={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`bottom`,padding:{left:0,right:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`category`,unit:void 0,niceTicks:`auto`},Uyn=(e,t)=>e.cartesianAxis.xAxis[t],tD=(e,t)=>Uyn(e,t)??eD,nD={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Hyn,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`left`,padding:{top:0,bottom:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`number`,unit:void 0,niceTicks:`auto`,width:60},Wyn=(e,t)=>e.cartesianAxis.yAxis[t],rD=(e,t)=>Wyn(e,t)??nD,iD={domain:[0,`auto`],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:``,range:[64,64],scale:`auto`,type:`number`,unit:``},Gyn=(e,t)=>e.cartesianAxis.zAxis[t]??iD,aD=(e,t,n)=>{switch(t){case`xAxis`:return tD(e,n);case`yAxis`:return rD(e,n);case`zAxis`:return Gyn(e,n);case`angleAxis`:return mT(e,n);case`radiusAxis`:return hT(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},Kyn=(e,t,n)=>{switch(t){case`xAxis`:return tD(e,n);case`yAxis`:return rD(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},oD=(e,t,n)=>{switch(t){case`xAxis`:return tD(e,n);case`yAxis`:return rD(e,n);case`angleAxis`:return mT(e,n);case`radiusAxis`:return hT(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},qyn=e=>e.graphicalItems.cartesianItems.some(e=>e.type===`bar`)||e.graphicalItems.polarItems.some(e=>e.type===`radialBar`),sD=e=>e.graphicalItems.cartesianItems,Jyn=MS([yT,bT],Nyn),cD=(e,t,n)=>e.filter(n).filter(e=>(t==null?void 0:t.includeHidden)===!0||!e.hide),lD=MS([sD,aD,Jyn],cD,{memoizeOptions:{resultEqualityCheck:Dfn}}),Yyn=MS([lD],e=>e.filter(e=>e.type===`area`||e.type===`bar`).filter(xT)),Xyn=e=>e.filter(e=>!(`stackId`in e)||e.stackId===void 0),Zyn=MS([lD],Xyn),uD=e=>e.map(e=>e.data).filter(Boolean).flat(1),Qyn=MS([lD],e=>e.some(e=>!e.data)),$yn=MS([lD],uD,{memoizeOptions:{resultEqualityCheck:Dfn}}),dD=(e,t)=>{var n=t.chartData,r=n===void 0?[]:n,i=t.dataStartIndex,a=t.dataEndIndex;return e.length>0?e:r.slice(i,a+1)},fD=MS([$yn,Kw],dD),ebn=(e,t,n)=>(t==null?void 0:t.dataKey)==null?n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:MC(e,t)}))):e.map(e=>({value:e})):e.map(e=>({value:MC(e,t.dataKey)})),tbn=(e,t,n,r,i,a)=>{var o=r.chartData,s=o===void 0?[]:o,l=r.dataStartIndex,u=r.dataEndIndex,d=ebn(e,t,n);return i&&(t==null?void 0:t.dataKey)!=null&&a.length>0?[...s.slice(l,u+1).map(e=>({value:MC(e,t.dataKey)})).filter(e=>e.value!=null),...d]:d},pD=MS([fD,aD,lD,Kw,Qyn,$yn],tbn),nbn=MS([pD],e=>e==null?void 0:e.map(e=>e.value).sort(Fyn)),mD=e=>oD(e,CT(e),wT(e)),hD=MS([mD],e=>e==null?void 0:e.dataKey),rbn=MS([Yyn,Kw,mD],Cfn),gD=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(t.stackId==null)return e;var n=e[t.stackId];return n??(n=[]),n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var i=Dyn(t,2),a=i[0],o=i[1],s=r?[...o].reverse():o,l=s.map(xfn);return[a,{stackedData:xan(e,l,n),graphicalItems:s}]}))},_D=MS([rbn,Yyn,eT,tT],gD),ibn=(e,t,n,r)=>{var i=t.dataStartIndex,a=t.dataEndIndex;if(r==null&&n!==`zAxis`)return Tan(e,i,a)},abn=MS([aD],e=>e.allowDataOverflow),obn=e=>{if(e==null||!(`domain`in e))return Hyn;if(e.domain!=null)return e.domain;if(`ticks`in e&&e.ticks!=null){if(e.type===`number`){var t=$E(e.ticks);return[Math.min(...t),Math.max(...t)]}if(e.type===`category`)return e.ticks.map(String)}return(e==null?void 0:e.domain)??Hyn},sbn=MS([aD],obn),cbn=MS([sbn,abn],kdn),lbn=MS([_D,Ww,yT,cbn],ibn,{memoizeOptions:{resultEqualityCheck:ST}}),vD=e=>e.errorBars,ubn=(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>Iyn(n,e)),yD=function(){var e=[...arguments].filter(Boolean);if(e.length!==0){var t=e.flat();return[Math.min(...t),Math.max(...t)]}},dbn=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],o,s;if(n.length>0&&n.forEach(e=>{var n,l=e.data==null?a:[...e.data],u=(n=r[e.id])==null?void 0:n.filter(e=>Iyn(i,e));l.forEach(n=>{var r=MC(n,t.dataKey??e.dataKey),i=Lyn(n,r,u);if(i.length>=2){var a=Math.min(...i),l=Math.max(...i);(o==null||as)&&(s=l)}var d=Pyn(r);d!=null&&(o=o==null?d[0]:Math.min(o,d[0]),s=s==null?d[1]:Math.max(s,d[1]))})}),(t==null?void 0:t.dataKey)!=null&&n.length===0&&e.forEach(e=>{var n=Pyn(MC(e,t.dataKey));n!=null&&(o=o==null?n[0]:Math.min(o,n[0]),s=s==null?n[1]:Math.max(s,n[1]))}),OC(o)&&OC(s))return[o,s]},fbn=MS([fD,aD,Zyn,vD,yT,ydn],dbn,{memoizeOptions:{resultEqualityCheck:ST}}),pbn=(e,t,n)=>{var r=e.map(Ryn).filter(e=>e!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&U8t(r))?hdn(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},mbn=e=>e.referenceElements.dots,bD=(e,t,n)=>e.filter(e=>e.ifOverflow===`extendDomain`).filter(e=>t===`xAxis`?e.xAxisId===n:e.yAxisId===n),hbn=MS([mbn,yT,bT],bD),gbn=e=>e.referenceElements.areas,_bn=MS([gbn,yT,bT],bD),vbn=e=>e.referenceElements.lines,ybn=MS([vbn,yT,bT],bD),bbn=(e,t)=>{if(e!=null){var n=$E(e.map(e=>t===`xAxis`?e.x:e.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},xbn=MS(hbn,yT,bbn),Sbn=(e,t)=>{if(e!=null){var n=$E(e.flatMap(e=>[t===`xAxis`?e.x1:e.y1,t===`xAxis`?e.x2:e.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Cbn=MS([_bn,yT],Sbn),wbn=(e,t)=>{if(e!=null){var n=e.flatMap(e=>t===`xAxis`?zyn(e):Byn(e));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Tbn=MS([ybn,yT],wbn),Ebn=MS(xbn,Tbn,Cbn,(e,t,n)=>yD(e,n,t)),Dbn=(e,t,n,r,i,a,o,s,l)=>{if(n!=null)return n;var u=o===`vertical`&&s===`xAxis`||o===`horizontal`&&s===`yAxis`?yD(r,a,i):yD(a,i),d=Adn(t,u,e.allowDataOverflow);return d==null&&e.allowDataOverflow&&u==null&&l!=null?l:d},Obn=e=>{if(e!=null&&e.type===`number`&&`ticks`in e&&e.ticks!=null){var t=$E(e.ticks);if(t.length!==0)return[Math.min(...t),Math.max(...t)]}},kbn=MS([aD],Obn,{memoizeOptions:{resultEqualityCheck:ST}}),Abn=MS([aD,sbn,cbn,lbn,fbn,Ebn,ow,yT,kbn],Dbn,{memoizeOptions:{resultEqualityCheck:ST}}),jbn=[0,1],Mbn=(e,t,n,r,i,a,o)=>{if(e!=null&&n!=null&&n.length!==0||o!==void 0){var s=e.dataKey,l=e.type,u=FC(t,a);return u&&s==null?hdn(0,(n==null?void 0:n.length)??0):l===`category`?pbn(r,e,u):i===`expand`&&!u?jbn:o}},Nbn=MS([aD,ow,fD,pD,eT,yT,Abn],Mbn),xD=MS([aD,qyn,nT],hyn),Pbn=(e,t,n)=>{var r=t.niceTicks;if(r!==`none`){var i=obn(t),a=Array.isArray(i)&&(i[0]===`auto`||i[1]===`auto`);if((r===`snap125`||r===`adaptive`)&&t!=null&&t.tickCount&&Jw(e)){if(a)return Kdn(e,t.tickCount,t.allowDecimals,r);if(t.type===`number`)return qdn(e,t.tickCount,t.allowDecimals,r)}if(r===`auto`&&n===`linear`&&t!=null&&t.tickCount){if(a&&Jw(e))return Kdn(e,t.tickCount,t.allowDecimals,`adaptive`);if(t.type===`number`&&Jw(e))return qdn(e,t.tickCount,t.allowDecimals,`adaptive`)}}},Fbn=MS([Nbn,oD,xD],Pbn),SD=(e,t,n,r)=>{if(r!==`angleAxis`&&(e==null?void 0:e.type)===`number`&&Jw(t)&&Array.isArray(n)&&n.length>0){var i=t[0],a=n[0]??0,o=t[1],s=n[n.length-1]??0;return[Math.min(i,a),Math.max(o,s)]}return t},Ibn=MS([aD,Nbn,Fbn,yT],SD),Lbn=MS(pD,aD,(e,t)=>{if(t&&t.type===`number`){var n=1/0,r=Array.from($E(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;si,(e,t,n,r,i)=>{if(!OC(e))return 0;var a=t===`vertical`?r.height:r.width;if(i===`gap`)return e*a/2;if(i===`no-gap`){var o=Px(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),zbn=(e,t,n)=>{var r=tD(e,t);return r==null||typeof r.padding!=`string`?0:Rbn(e,`xAxis`,t,n,r.padding)},Bbn=(e,t,n)=>{var r=rD(e,t);return r==null||typeof r.padding!=`string`?0:Rbn(e,`yAxis`,t,n,r.padding)},Vbn=MS(tD,zbn,(e,t)=>{if(e==null)return{left:0,right:0};var n=e.padding;return typeof n==`string`?{left:t,right:t}:{left:(n.left??0)+t,right:(n.right??0)+t}}),Hbn=MS(rD,Bbn,(e,t)=>{if(e==null)return{top:0,bottom:0};var n=e.padding;return typeof n==`string`?{top:t,bottom:t}:{top:(n.top??0)+t,bottom:(n.bottom??0)+t}}),Ubn=MS([GC,Vbn,ZC,XC,(e,t,n)=>n],(e,t,n,r,i)=>{var a=r.padding;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),Wbn=MS([GC,ow,Hbn,ZC,XC,(e,t,n)=>n],(e,t,n,r,i,a)=>{var o=i.padding;return a?[r.height-o.bottom,o.top]:t===`horizontal`?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),CD=(e,t,n,r)=>{var i;switch(t){case`xAxis`:return Ubn(e,n,r);case`yAxis`:return Wbn(e,n,r);case`zAxis`:return(i=Gyn(e,n))==null?void 0:i.range;case`angleAxis`:return hfn(e);case`radiusAxis`:return _fn(e,n);default:return}},Gbn=MS([aD,CD],uT),Kbn=MS([xD,Ibn],Pfn),wD=MS([aD,xD,Kbn,Gbn],dyn),TD=(e,t,n,r)=>{if(n!=null&&n.dataKey!=null){var i=n.type,a=n.scale;if(FC(e,r)&&(i===`number`||a!==`auto`))return t.map(e=>e.value)}},ED=MS([ow,pD,oD,yT],TD),DD=MS([wD],Mfn),MS([wD],byn),MS([wD,nbn],vyn),MS([lD,vD,yT],ubn),OD=(e,t)=>t,kD=(e,t,n)=>n,qbn=MS(HC,OD,kD,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(Vyn)),Jbn=MS(UC,OD,kD,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(Vyn)),Ybn=(e,t)=>{var n=typeof t.height==`number`?t.height:30;return{width:e.width,height:n}},Xbn=(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height}),Zbn=MS(GC,tD,Ybn),Qbn=(e,t,n)=>{switch(t){case`top`:return e.top;case`bottom`:return n-e.bottom;default:return 0}},$bn=(e,t,n)=>{switch(t){case`left`:return e.left;case`right`:return n-e.right;default:return 0}},exn=MS(BC,GC,qbn,OD,kD,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=Ybn(t,n);o??(o=Qbn(t,r,e));var l=r===`top`&&!i||r===`bottom`&&i;a[n.id]=o-Number(l)*s.height,o+=(l?-1:1)*s.height}),a}),txn=MS(zC,GC,Jbn,OD,kD,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=Xbn(t,n);o??(o=$bn(t,r,e));var l=r===`left`&&!i||r===`right`&&i;a[n.id]=o-Number(l)*s.width,o+=(l?-1:1)*s.width}),a}),nxn=(e,t)=>{var n=tD(e,t);if(n!=null)return exn(e,n.orientation,n.mirror)},rxn=MS([GC,tD,nxn,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n==null?void 0:n[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),ixn=(e,t)=>{var n=rD(e,t);if(n!=null)return txn(e,n.orientation,n.mirror)},axn=MS([GC,rD,ixn,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n==null?void 0:n[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),oxn=MS(GC,rD,(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height})),sxn=(e,t,n)=>{switch(t){case`xAxis`:return Zbn(e,n).width;case`yAxis`:return oxn(e,n).height;default:return}},cxn=(e,t,n,r)=>{if(n!=null){var i=n.allowDuplicatedCategory,a=n.type,o=n.dataKey,s=FC(e,r),l=t.map(e=>e.value),u=l.filter(e=>e!=null);if(o&&s&&a===`category`&&i&&U8t(u))return l}},AD=MS([ow,pD,aD,yT],cxn),lxn=MS([ow,Kyn,xD,DD,AD,ED,CD,Fbn,yT],(e,t,n,r,i,a,o,s,l)=>{if(t!=null){var u=FC(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:a,duplicateDomain:i,isCategorical:u,niceTicks:s,range:o,realScaleType:n,scale:r}}}),uxn=(e,t,n,r,i,a,o,s,l)=>{if(t!=null&&r!=null){var u=FC(e,l),d=t.type,f=t.ticks,p=t.tickCount,m=n===`scaleBand`&&typeof r.bandwidth==`function`?r.bandwidth()/2:2,h=d===`category`&&r.bandwidth?r.bandwidth()/m:0;h=l===`angleAxis`&&a!=null&&a.length>=2?Ox(a[0]-a[1])*2*h:h;var g=f||i;return g?g.map((e,t)=>{var n=o?o.indexOf(e):e,i=r.map(n);return OC(i)?{index:t,coordinate:i+h,value:e,offset:h}:null}).filter(Ex):u&&s?s.map((e,t)=>{var n=r.map(e);return OC(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Ex):r.ticks?r.ticks(p).map((e,t)=>{var n=r.map(e);return OC(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Ex):r.domain().map((e,t)=>{var n=r.map(e);return OC(n)?{coordinate:n+h,value:o?o[e]:e,index:t,offset:h}:null}).filter(Ex)}},dxn=MS([ow,oD,xD,DD,Fbn,CD,AD,ED,yT],uxn),fxn=(e,t,n,r,i,a,o)=>{if(t!=null&&n!=null&&r!=null&&r[0]!==r[1]){var s=FC(e,o),l=t.tickCount,u=0;return u=o===`angleAxis`&&(r==null?void 0:r.length)>=2?Ox(r[0]-r[1])*2*u:u,s&&a?a.map((e,t)=>{var r=n.map(e);return OC(r)?{coordinate:r+u,value:e,index:t,offset:u}:null}).filter(Ex):n.ticks?n.ticks(l).map((e,t)=>{var r=n.map(e);return OC(r)?{coordinate:r+u,value:e,index:t,offset:u}:null}).filter(Ex):n.domain().map((e,t)=>{var r=n.map(e);return OC(r)?{coordinate:r+u,value:i?i[e]:e,index:t,offset:u}:null}).filter(Ex)}},jD=MS([ow,oD,DD,CD,AD,ED,yT],fxn),MD=MS(aD,DD,(e,t)=>{if(e!=null&&t!=null)return Cyn(Cyn({},e),{},{scale:t})}),pxn=MS([aD,xD,Nbn,Gbn],dyn),mxn=MS([pxn],Mfn),hxn=MS((e,t,n)=>Gyn(e,n),mxn,(e,t)=>{if(e!=null&&t!=null)return Cyn(Cyn({},e),{},{scale:t})}),gxn=MS([ow,HC,UC],(e,t,n)=>{switch(e){case`horizontal`:return t.some(e=>e.reversed)?`right-to-left`:`left-to-right`;case`vertical`:return n.some(e=>e.reversed)?`bottom-to-top`:`top-to-bottom`;case`centric`:case`radial`:return`left-to-right`;default:return}}),_xn=(e,t,n)=>{var r;return(r=e.renderedTicks[t])==null?void 0:r[n]},MS([_xn],e=>{if(e&&e.length!==0)return t=>{var n,r=1/0,i=e[0];for(var a of e){var o=Math.abs(a.coordinate-t);oPD(t,e))}var bxn,xxn,FD=o((()=>{jS(),bxn=e=>e.options.defaultTooltipEventType,xxn=e=>e.options.validateTooltipEventTypes})),Sxn,Cxn=o((()=>{Lx(),Sxn=(e,t)=>{var n,r=Number(t);if(!(kx(r)||t==null))return r>=0?e==null||(n=e[r])==null?void 0:n.value:void 0}})),wxn,Txn=o((()=>{wxn=e=>e.tooltip.settings})),ID,Exn,Dxn,LD,Oxn,kxn,Axn,jxn,Mxn,Nxn,Pxn,Fxn,Ixn,Lxn,RD,zD,Rxn,BD=o((()=>{EC(),dC(),ID={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Exn={itemInteraction:{click:ID,hover:ID},axisInteraction:{click:ID,hover:ID},keyboardInteraction:ID,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:`hover`,axisId:0,active:!1,defaultIndex:void 0}},Dxn=gC({name:`tooltip`,initialState:Exn,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(uC(t.payload))},prepare:hC()},replaceTooltipEntrySettings:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=HS(e).tooltipItemPayloads.indexOf(uC(r));a>-1&&(e.tooltipItemPayloads[a]=uC(i))},prepare:hC()},removeTooltipEntrySettings:{reducer(e,t){var n=HS(e).tooltipItemPayloads.indexOf(uC(t.payload));n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:hC()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),LD=Dxn.actions,Oxn=LD.addTooltipEntrySettings,kxn=LD.replaceTooltipEntrySettings,Axn=LD.removeTooltipEntrySettings,jxn=LD.setTooltipSettingsState,Mxn=LD.setActiveMouseOverItemIndex,Nxn=LD.mouseLeaveItem,Pxn=LD.mouseLeaveChart,Fxn=LD.setActiveClickItemIndex,Ixn=LD.setMouseOverAxisIndex,Lxn=LD.setMouseClickAxisIndex,RD=LD.setSyncInteraction,zD=LD.setKeyboardInteraction,Rxn=Dxn.reducer}));function zxn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bxn(e){for(var t=1;t{BD(),Kxn=(e,t,n,r)=>{if(t==null)return ID;var i=Wxn(e,t,n);if(i==null)return ID;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(Gxn(i)){if(a)return Bxn(Bxn({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Bxn(Bxn({},ID),{},{coordinate:i.coordinate})}}));function Jxn(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function Yxn(e,t){var n=Jxn(e),r=t[0],i=t[1];return n!==void 0&&n>=Math.min(r,i)&&n<=Math.max(r,i)}function Xxn(e,t,n){if(n==null||t==null)return!0;var r=MC(e,t);return r==null||!Jw(n)||Yxn(r,n)}var VD,Zxn=o((()=>{AC(),RC(),jdn(),VD=(e,t,n,r)=>{var i=e==null?void 0:e.index;if(i==null)return null;var a=Number(i);if(!OC(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var l=Math.max(o,Math.min(a,s)),u=t[l];return u==null||Xxn(u,n,r)?String(l):null}})),Qxn,$xn=o((()=>{Qxn=(e,t,n,r,i,a,o)=>{if(a!=null){var s=o[0],l=s==null?void 0:s.getPosition(a);if(l!=null)return l;var u=i==null?void 0:i[Number(a)];if(u)switch(n){case`horizontal`:return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}}})),eSn,tSn=o((()=>{eSn=(e,t,n,r)=>{if(t===`axis`)return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i=n===`hover`?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId;if(e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a==null?[]:[a]}return e.tooltipItemPayloads.filter(e=>{var t;return((t=e.settings)==null?void 0:t.graphicalItemId)===i})}})),nSn,rSn=o((()=>{nSn=e=>e.options.tooltipPayloadSearcher})),HD,iSn=o((()=>{HD=e=>e.tooltip}));function aSn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oSn(e){for(var t=1;te(t)}function pSn(e){if(typeof e==`string`)return e}function mSn(e){if(typeof e==`object`&&e)return{name:`name`in e?uSn(e.name):void 0,unit:`unit`in e?dSn(e.unit):void 0,dataKey:`dataKey`in e?fSn(e.dataKey):void 0,payload:`payload`in e?e.payload:void 0,color:`color`in e?pSn(e.color):void 0,fill:`fill`in e?pSn(e.fill):void 0}}function hSn(e,t){return e??t}var gSn,_Sn=o((()=>{Lx(),RC(),san(),gSn=(e,t,n,r,i,a,o)=>{if(t!=null&&a!=null){var s=n.chartData,l=n.computedData,u=n.dataStartIndex,d=n.dataEndIndex;return e.reduce((e,n)=>{var f=n.dataDefinedOnItem,p=n.settings,m=hSn(f,s),h=Array.isArray(m)?oan(m,u,d):m,g=(p==null?void 0:p.dataKey)??r,_=p==null?void 0:p.nameKey,v;return r&&Array.isArray(h)&&!Array.isArray(h[0])&&o===`axis`?(v=V8t(h,r,i),v??(v=a(h,t,l,_))):v=a(h,t,l,_),Array.isArray(v)?v.forEach(t=>{var n=mSn(t),r=n==null?void 0:n.name,i=n==null?void 0:n.dataKey,a=n==null?void 0:n.payload,o=oSn(oSn({},p),{},{name:r,unit:n==null?void 0:n.unit,color:(n==null?void 0:n.color)??(p==null?void 0:p.color),fill:(n==null?void 0:n.fill)??(p==null?void 0:p.fill)});e.push(pan({tooltipEntrySettings:o,dataKey:i,payload:a,value:MC(a,i),name:r==null?void 0:String(r)}))}):e.push(pan({tooltipEntrySettings:p,dataKey:g,payload:v,value:MC(v,g),name:MC(v,_)??(p==null?void 0:p.name)})),e},[])}}})),vSn,ySn,bSn,UD,xSn,SSn,CSn,WD,wSn,TSn,ESn,DSn,OSn,kSn,ASn,jSn,MSn,NSn,PSn,FSn,ISn,LSn,RSn,zSn,BSn,VSn,GD,HSn,USn,WSn,GSn,KSn,qSn,JSn,YSn,XSn,KD,ZSn,QSn,$Sn,qD,JD,eCn,tCn,nCn,rCn,iCn,aCn,oCn,sCn,cCn,YD=o((()=>{NS(),ND(),fw(),RC(),qw(),aT(),Lx(),nfn(),FD(),Cxn(),Txn(),qxn(),Zxn(),$xn(),VC(),qC(),tSn(),rSn(),iSn(),_Sn(),jfn(),Afn(),wfn(),Tfn(),jdn(),Efn(),kfn(),Nfn(),AC(),gyn(),fyn(),vSn=MS([mD,qyn,nT],hyn),ySn=MS([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),bSn=MS([CT,wT],Nyn),UD=MS([ySn,mD,bSn],cD,{memoizeOptions:{resultEqualityCheck:Dfn}}),xSn=MS([UD],e=>e.filter(xT)),SSn=MS([UD],uD,{memoizeOptions:{resultEqualityCheck:Dfn}}),CSn=MS([UD],e=>e.some(e=>!e.data)),WD=MS([SSn,Ww],dD),wSn=MS([xSn,Ww,mD],Cfn),TSn=MS([WD,mD,UD,Ww,CSn,SSn],tbn),ESn=MS([mD],obn),DSn=MS([mD],e=>e.allowDataOverflow),OSn=MS([ESn,DSn],kdn),kSn=MS([UD],e=>e.filter(xT)),ASn=MS([wSn,kSn,eT,tT],gD),jSn=MS([ASn,Ww,CT,OSn],ibn),MSn=MS([UD],Xyn),NSn=MS([WD,mD,MSn,vD,CT,xdn],dbn,{memoizeOptions:{resultEqualityCheck:ST}}),PSn=MS([mbn,CT,wT],bD),FSn=MS([PSn,CT],bbn),ISn=MS([gbn,CT,wT],bD),LSn=MS([ISn,CT],Sbn),RSn=MS([vbn,CT,wT],bD),zSn=MS([RSn,CT],wbn),BSn=MS([FSn,zSn,LSn],yD),VSn=MS([mD,ESn,OSn,jSn,NSn,BSn,ow,CT],Dbn),GD=MS([mD,ow,WD,TSn,eT,CT,VSn],Mbn),HSn=MS([GD,mD,vSn],Pbn),USn=MS([mD,GD,HSn,CT],SD),WSn=e=>{var t=CT(e),n=wT(e);return CD(e,t,n,!1)},GSn=MS([mD,WSn],uT),KSn=MS([mD,vSn,USn,GSn],dyn),qSn=MS([KSn],Mfn),JSn=MS([ow,TSn,mD,CT],cxn),YSn=MS([ow,TSn,mD,CT],TD),XSn=(e,t,n,r,i,a,o,s)=>{if(t){var l=t.type,u=FC(e,s);if(r){var d=n===`scaleBand`&&r.bandwidth?r.bandwidth()/2:2,f=l===`category`&&r.bandwidth?r.bandwidth()/d:0;return f=s===`angleAxis`&&i!=null&&(i==null?void 0:i.length)>=2?Ox(i[0]-i[1])*2*f:f,u&&o?o.map((e,t)=>{var n=r.map(e);return OC(n)?{coordinate:n+f,value:e,index:t,offset:f}:null}).filter(Ex):r.domain().map((e,t)=>{var n=r.map(e);return OC(n)?{coordinate:n+f,value:a?a[e]:e,index:t,offset:f}:null}).filter(Ex)}}},KD=MS([ow,mD,vSn,qSn,WSn,JSn,YSn,CT],XSn),ZSn=MS([bxn,xxn,wxn],(e,t,n)=>vxn(n.shared,e,t)),QSn=e=>e.tooltip.settings.trigger,$Sn=e=>e.tooltip.settings.defaultIndex,qD=MS([HD,ZSn,QSn,$Sn],Kxn),JD=MS([qD,WD,hD,GD],VD),eCn=MS([KD,JD],Sxn),tCn=MS([qD],e=>{if(e)return e.dataKey}),nCn=MS([qD],e=>{if(e)return e.graphicalItemId}),rCn=MS([HD,ZSn,QSn,$Sn],eSn),iCn=MS([zC,BC,ow,GC,KD,$Sn,rCn],Qxn),aCn=MS([qD,iCn],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),oCn=MS([qD],e=>(e==null?void 0:e.active)??!1),sCn=MS([rCn,JD,Ww,hD,eCn,nSn,ZSn],gSn),cCn=MS([sCn],e=>{if(e!=null){var t=e.map(e=>e.payload).filter(e=>e!=null);return Array.from(new Set(t))}})}));function lCn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uCn(e){for(var t=1;t{jS(),RC(),ND(),YD(),mCn=()=>OS(mD),hCn=()=>{var e=mCn(),t=OS(KD),n=OS(qSn);return LC(!e||!n?void 0:uCn(uCn({},e),{},{scale:n}),t)}}));function _Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XD(e){for(var t=1;t=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var SCn,CCn,wCn,TCn=o((()=>{Vw(),Lx(),SCn=(e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if(e===`horizontal`)return{x:i.coordinate,y:r.relativeY};if(e===`vertical`)return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}},CCn=(e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if(e===`centric`){var a=i.coordinate,o=r.radius;return XD(XD(XD({},r),Bw(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,l=r.angle;return XD(XD(XD({},r),Bw(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}},wCn=(e,t,n,r,i)=>{var a=(t==null?void 0:t.length)??0;if(a<=1||e==null)return 0;if(r===`angleAxis`&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var o=i[1]-i[0],s=(t,n,r)=>[e,e+o,e-o].some(e=>(r?e>=t:e>t)&&e<=n),l=0;l0?(u=n[l-1])==null?void 0:u.coordinate:(d=n[a-1])==null?void 0:d.coordinate,g=(f=n[l])==null?void 0:f.coordinate,_=l>=a-1?(p=n[0])==null?void 0:p.coordinate:(m=n[l+1])==null?void 0:m.coordinate,v=void 0;if(h!=null&&g!=null&&_!=null){if(Ox(g-h)!==Ox(_-g)){var y=[];if(Ox(_-g)===Ox(i[1]-i[0])){v=_;var b=g+i[1]-i[0];y[0]=Math.min(b,(b+h)/2),y[1]=Math.max(b,(b+h)/2)}else{v=h;var x=_+i[1]-i[0];y[0]=Math.min(g,(x+g)/2),y[1]=Math.max(g,(x+g)/2)}var S=[Math.min(g,(v+g)/2),Math.max(g,(v+g)/2)];if(s(S[0],S[1],!1)||s(y[0],y[1],!0)){var C;return(C=n[l])==null?void 0:C.index}}else{var w=Math.min(h,_),T=Math.max(h,_);if(s((w+g)/2,(T+g)/2,!1)){var E;return(E=n[l])==null?void 0:E.index}}}}else if(t)for(var D=0;D(O.coordinate+A.coordinate)/2||D>0&&D(O.coordinate+A.coordinate)/2&&e<=(O.coordinate+k.coordinate)/2)return O.index}}return-1}})),ECn,DCn,OCn,kCn,ACn,jCn,MCn,NCn,PCn,ZD,FCn,ICn,LCn,RCn,zCn,BCn,VCn,QD=o((()=>{NS(),Enn(),jS(),RC(),qw(),YD(),ND(),aT(),fw(),qC(),VC(),Cxn(),qxn(),Zxn(),$xn(),tSn(),rSn(),iSn(),_Sn(),TCn(),Vw(),ECn=()=>OS(nT),DCn=(e,t)=>t,OCn=(e,t,n)=>n,kCn=(e,t,n,r)=>r,ACn=MS(KD,e=>wnn(e,e=>e.coordinate)),jCn=MS([HD,DCn,OCn,kCn],Kxn),MCn=MS([jCn,WD,hD,GD],VD),NCn=(e,t,n)=>{if(t!=null){var r=HD(e);return t===`axis`?n===`hover`?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n===`hover`?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},PCn=MS([HD,DCn,OCn,kCn],eSn),ZD=MS([zC,BC,ow,GC,KD,kCn,PCn],Qxn),FCn=MS([jCn,ZD],(e,t)=>e.coordinate??t),ICn=MS([KD,MCn],Sxn),LCn=MS([PCn,MCn,Ww,hD,ICn,nSn,DCn],gSn),RCn=MS([jCn,MCn],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),zCn=(e,t,n,r,i,a,o)=>{if(e&&n&&r&&i&&xCn(e,o)){var s=Oan(e,t),l=wCn(s,a,i,n,r),u=SCn(t,i,l,e);return{activeIndex:String(l),activeCoordinate:u}}},BCn=(e,t,n,r,i,a,o)=>{if(e&&r&&i&&a&&n){var s=Gun(e,n);if(s){var l=kan(s,t),u=wCn(l,o,a,r,i),d=CCn(t,a,u,s);return{activeIndex:String(u),activeCoordinate:d}}}},VCn=(e,t,n,r,i,a,o,s)=>{if(e&&t&&r&&i&&a)return t===`horizontal`||t===`vertical`?zCn(e,t,r,i,a,o,s):BCn(e,t,n,r,i,a,o)}})),HCn,UCn,WCn=o((()=>{NS(),kfn(),sT(),HCn=MS(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),UCn=MS(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(oT));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:Ofn}})}));function GCn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KCn(e){for(var t=1;t{EC(),dC(),sT(),ZCn={zIndexMap:Object.values(oT).reduce((e,t)=>KCn(KCn({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},QCn=new Set(Object.values(oT)),$Cn=gC({name:`zIndex`,initialState:ZCn,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:hC()},unregisterZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(--e.zIndexMap[n].consumers,e.zIndexMap[n].consumers<=0&&!XCn(n)&&delete e.zIndexMap[n])},prepare:hC()},registerZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload,r=n.zIndex,i=n.element,a=n.isPanorama;e.zIndexMap[r]?a?e.zIndexMap[r].panoramaElement=uC(i):e.zIndexMap[r].element=uC(i):e.zIndexMap[r]={consumers:0,element:a?void 0:uC(i),panoramaElement:a?uC(i):void 0}},prepare:hC()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:hC()}}}),$D=$Cn.actions,ewn=$D.registerZIndexPortal,twn=$D.unregisterZIndexPortal,nwn=$D.registerZIndexPortalElement,rwn=$D.unregisterZIndexPortalElement,iwn=$Cn.reducer}));function eO(e){var t=e.zIndex,n=e.children,r=Ion()&&t!==void 0&&t!==0,i=JC(),a=(0,tO.useRef)(void 0),o=(0,tO.useRef)(new Set),s=kS(),l=OS(e=>HCn(e,t,i));if((0,tO.useLayoutEffect)(()=>{if(!r){var e=o.current;e.forEach(e=>{s(twn({zIndex:e}))}),e.clear(),a.current=void 0}else if(o.current.has(t)||(s(ewn({zIndex:t})),o.current.add(t)),l){a.current=l;var n=o.current;n.forEach(e=>{e!==t&&(s(twn({zIndex:e})),n.delete(e))})}},[s,t,r,l]),(0,tO.useLayoutEffect)(()=>{var e=o.current;return()=>{e.forEach(e=>{s(twn({zIndex:e}))}),e.clear()}},[s]),!r)return n;var u=l??a.current;return u?(0,own.createPortal)(n,u):null}var tO,own,nO=o((()=>{tO=d(p()),own=d(_()),jS(),WCn(),awn(),fw(),YC()}));function swn(){return swn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{iO=d(p()),aO=d(p()),ze(),lS(),jw(),uln(),fln(),Nun(),qun(),cdn(),udn(),fw(),gCn(),QD(),hx(),nO(),sT()})),gwn,_wn,vwn,ywn=o((()=>{gwn=d(p()),_wn=(0,gwn.createContext)(null),vwn=()=>(0,gwn.useContext)(_wn)})),bwn=s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function l(){this._events=new i,this._eventsCount=0}l.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},l.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{xwn=d(bwn(),1),Swn=xwn.default})),oO,sO,wwn,Twn=o((()=>{Cwn(),oO=new Swn,sO=`recharts.syncEvent.tooltip`,wwn=`recharts.syncEvent.brush`})),cO,Ewn,Dwn,Own,lO=o((()=>{EC(),Lx(),cO=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!kx(n))return e[n]}},Ewn=gC({name:`options`,initialState:{chartName:``,tooltipPayloadSearcher:()=>void 0,eventEmitter:void 0,defaultTooltipEventType:`axis`},reducers:{createEventEmitter:e=>{e.eventEmitter??(e.eventEmitter=Symbol(`rechartsEventEmitter`))}}}),Dwn=Ewn.reducer,Own=Ewn.actions.createEventEmitter}));function kwn(e){return e.tooltip.syncInteraction}var Awn=o((()=>{})),jwn,Mwn,uO,Nwn,Pwn,Fwn,dO=o((()=>{EC(),dC(),jwn={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},Mwn=gC({name:`chartData`,initialState:jwn,reducers:{setChartData(e,t){e.chartData=uC(t.payload),t.payload==null?(e.dataStartIndex=0,e.dataEndIndex=0):t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var n=t.payload,r=n.startIndex,i=n.endIndex;r!=null&&(e.dataStartIndex=r),i!=null&&(e.dataEndIndex=i)}}}),uO=Mwn.actions,Nwn=uO.setChartData,Pwn=uO.setDataStartEndIndexes,uO.setComputedData,Fwn=Mwn.reducer}));function Iwn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fO(e){for(var t=1;te.rootProps.className);(0,pO.useEffect)(()=>{if(e==null)return Dx;var s=(s,l,u)=>{if(t!==u&&e===s){if(l.payload.active===!1)n(RD({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));else if(r===`index`){var d;if(o&&l!=null&&(d=l.payload)!=null&&d.coordinate&&l.payload.sourceViewBox){var f=l.payload.coordinate,p=f.x,m=f.y,h=Bwn(f,Kwn),g=l.payload.sourceViewBox,_=g.x,v=g.y,y=g.width,b=g.height,x=fO(fO({},h),{},{x:o.x+(y?(p-_)/y:0)*o.width,y:o.y+(b?(m-v)/b:0)*o.height});n(fO(fO({},l),{},{payload:fO(fO({},l.payload),{},{coordinate:x})}))}else n(l)}else if(i!=null){var S;typeof r==`function`?S=i[r(i,{activeTooltipIndex:l.payload.index==null?void 0:Number(l.payload.index),isTooltipActive:l.payload.active,activeIndex:l.payload.index==null?void 0:Number(l.payload.index),activeLabel:l.payload.label,activeDataKey:l.payload.dataKey,activeCoordinate:l.payload.coordinate})]:r===`value`&&(S=i.find(e=>String(e.value)===l.payload.label));var C=l.payload.coordinate;if(C==null||o==null)n(RD({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));else if(S==null)n(RD({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:void 0}));else{var w=C.x,T=C.y,E=Math.min(w,o.x+o.width),D=Math.min(T,o.y+o.height),O={x:a===`horizontal`?S.coordinate:E,y:a===`horizontal`?D:S.coordinate};n(RD({active:l.payload.active,coordinate:O,dataKey:l.payload.dataKey,index:String(S.index),label:l.payload.label,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:l.payload.graphicalItemId}))}}}};return oO.on(sO,s),()=>{oO.off(sO,s)}},[s,n,t,e,r,i,a,o])}function Uwn(){var e=OS(rT),t=OS(iT),n=kS();(0,pO.useEffect)(()=>{if(e==null)return Dx;var r=(r,i,a)=>{t!==a&&e===r&&n(Pwn(i))};return oO.on(wwn,r),()=>{oO.off(wwn,r)}},[n,t,e])}function Wwn(){var e=kS();(0,pO.useEffect)(()=>{e(Own())},[e]),Hwn(),Uwn()}function Gwn(e,t,n,r,i,a){var o=OS(n=>NCn(n,e,t)),s=OS(nCn),l=OS(iT),u=OS(rT),d=OS(Qdn),f=OS(kwn),p=(f==null?void 0:f.sourceViewBox)!=null,m=rw();(0,pO.useEffect)(()=>{if(!p&&u!=null&&l!=null){var e=RD({active:a,coordinate:n,dataKey:o,index:i,label:typeof r==`number`?String(r):r,sourceViewBox:m,graphicalItemId:s});oO.emit(sO,u,e,l)}},[p,n,o,s,i,r,l,u,d,a,m])}var pO,Kwn,qwn=o((()=>{pO=d(p()),jS(),aT(),Twn(),lO(),BD(),QD(),YD(),Awn(),fw(),dO(),Lx(),Kwn=[`x`,`y`]}));function Jwn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ywn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{S(jxn({shared:_,trigger:v,axisId:x,active:n,defaultIndex:C}))},[S,_,v,x,n,C]);var w=rw(),T=Rcn(),E=yxn(_),D=OS(e=>RCn(e,E,v,C))??{},O=D.activeIndex,k=D.isActive,A=OS(e=>LCn(e,E,v,C)),j=OS(e=>ICn(e,E,v,C)),M=OS(e=>FCn(e,E,v,C)),N=A,P=vwn(),F=n??k??!1,I=$wn(Hnn([N,F]),2),L=I[0],R=I[1],ee=E===`axis`?j:void 0;Gwn(E,v,M,ee,O,F);var te=b??P;if(te==null||w==null||E==null)return null;var ne=N??uTn;F||(ne=uTn),s&&ne.length&&(ne=Vtn(ne.filter(e=>e.value!=null&&(e.hide!==!0||t.includeHidden)),d,aTn));var z=ne.length>0,re=Ywn(Ywn({},t),{},{payload:ne,label:ee,active:F,activeIndex:O,coordinate:M,accessibilityLayer:T}),ie=mO.createElement(Icn,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:l,active:F,coordinate:M,hasPayload:z,offset:u,position:f,reverseDirection:p,useTranslate3d:m,viewBox:w,wrapperStyle:h,lastBoundingBox:L,innerRef:R,hasPortalFromProps:!!b},oTn(o,re));return mO.createElement(mO.Fragment,null,(0,lTn.createPortal)(ie,te),F&&mO.createElement(mwn,{cursor:g,tooltipEventType:E,coordinate:M,payload:ne,index:O}))}var mO,cTn,lTn,uTn,dTn,fTn=o((()=>{mO=d(p()),cTn=d(p()),lTn=d(_()),scn(),Lcn(),Htn(),fw(),zcn(),Unn(),hwn(),QD(),ywn(),jS(),BD(),qwn(),FD(),dS(),uTn=[],dTn={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:`auto`,itemSorter:`name`,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,wrapperStyle:{}}})),hO,gO=o((()=>{hO=e=>null,hO.displayName=`Cell`}));function pTn(e,t,n){return(t=mTn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mTn(e){var t=hTn(e,`string`);return typeof t==`symbol`?t:t+``}function hTn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var gTn,_Tn=o((()=>{gTn=class{constructor(e){pTn(this,`cache`,new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}}));function vTn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yTn(e){for(var t=1;t{ww(),_Tn(),wTn=yTn({},{cacheSize:2e3,enableCache:!0}),TTn=new gTn(wTn.cacheSize),ETn={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},DTn=`recharts_measurement_span`,OTn=(e,t)=>{try{var n=document.getElementById(DTn);n||(n=document.createElement(`span`),n.setAttribute(`id`,DTn),n.setAttribute(`aria-hidden`,`true`),document.body.appendChild(n)),Object.assign(n.style,ETn,t),n.textContent=`${e}`;var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},_O=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||Cw.isSsr)return{width:0,height:0};if(!wTn.enableCache)return OTn(e,t);var n=CTn(e,t),r=TTn.get(n);if(r)return r;var i=OTn(e,t);return TTn.set(n,i),i}}));function vO(e,t){return PTn(e)||NTn(e,t)||jTn(e,t)||ATn()}function ATn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jTn(e,t){if(e){if(typeof e==`string`)return MTn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?MTn(e,t):void 0}}function MTn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{Lx(),KTn=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qTn=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,JTn=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,YTn=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,XTn={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},ZTn=[`cm`,`mm`,`pt`,`pc`,`in`,`Q`,`px`],yO=`NaN`,bO=class e{static parse(t){var n=vO(YTn.exec(t)??[],3),r=n[1],i=n[2];return r==null?e.NaN:new e(parseFloat(r),i??``)}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,kx(e)&&(this.unit=``),t!==``&&!JTn.test(t)&&(this.num=NaN,this.unit=``),RTn(t)&&(this.num=zTn(e,t),this.unit=`px`)}add(t){return this.unit===t.unit?new e(this.num+t.num,this.unit):new e(NaN,``)}subtract(t){return this.unit===t.unit?new e(this.num-t.num,this.unit):new e(NaN,``)}multiply(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num/t.num,this.unit||t.unit)}toString(){return`${this.num}${this.unit}`}isNaN(){return kx(this.num)}},GTn=bO,FTn(bO,`NaN`,new GTn(NaN,``)),QTn=/\(([^()]*)\)/}));function eEn(){return eEn=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{dEn=d(p()),fEn=d(p()),ze(),Lx(),ww(),kTn(),$Tn(),_x(),dS(),AC(),pEn=[`x`,`y`,`lineHeight`,`capHeight`,`fill`,`scaleToFit`,`textAnchor`,`verticalAnchor`],mEn=[`dx`,`dy`,`angle`,`className`,`breakAll`],hEn=/[ \f\n\r\t\v\u2028\u2029]+/,gEn=e=>{var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return Fx(t)||(i=n?t.toString().split(``):t.toString().split(hEn)),{wordsWithComputedWidth:i.map(e=>({word:e,width:_O(e,r).width})),spaceWidth:n?0:_O(`\xA0`,r).width}}catch{return null}},_En=(e,t,n,r)=>e.reduce((e,i)=>{var a=i.word,o=i.width,s=e[e.length-1];if(s&&o!=null&&(t==null||r||s.width+o+ne.reduce((e,t)=>e.width>t.width?e:t),yEn=`…`,bEn=(e,t,n,r,i,a,o,s)=>{var l=gEn({breakAll:n,style:r,children:e.slice(0,t)+yEn});if(!l)return[!1,[]];var u=_En(l.wordsWithComputedWidth,a,o,s);return[u.length>i||vEn(u).width>Number(a),u]},xEn=(e,t,n,r,i)=>{var a=e.maxLines,o=e.children,s=e.style,l=e.breakAll,u=jx(a),d=String(o),f=_En(t,r,n,i);if(!u||i||!(f.length>a||vEn(f).width>Number(r)))return f;for(var p=0,m=d.length-1,h=0,g;p<=m&&h<=d.length-1;){var _=Math.floor((p+m)/2),v=rEn(bEn(d,_-1,l,s,a,r,n,i),2),y=v[0],b=v[1],x=rEn(bEn(d,_,l,s,a,r,n,i),1)[0];if(!y&&!x&&(p=_+1),y&&x&&(m=_-1),!y&&x){g=b;break}h++}return g||f},SEn=e=>[{words:Fx(e)?[]:e.toString().split(hEn),width:void 0}],CEn=e=>{var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!Cw.isSsr){var s,l,u=gEn({breakAll:a,children:r,style:i});if(u){var d=u.wordsWithComputedWidth,f=u.spaceWidth;s=d,l=f}else return SEn(r);return xEn({breakAll:a,children:r,maxLines:o,style:i},s,l,t,!!n)}return SEn(r)},wEn=`#808080`,TEn={angle:0,breakAll:!1,capHeight:`0.71em`,fill:wEn,lineHeight:`1em`,scaleToFit:!1,textAnchor:`start`,verticalAnchor:`end`,x:0,y:0},xO=(0,fEn.forwardRef)((e,t)=>{var n=uS(e,TEn),r=n.x,i=n.y,a=n.lineHeight,o=n.capHeight,s=n.fill,l=n.scaleToFit,u=n.textAnchor,d=n.verticalAnchor,f=tEn(n,pEn),p=(0,fEn.useMemo)(()=>CEn({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:l,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,l,f.style,f.width]),m=f.dx,h=f.dy,g=f.angle,_=f.className,v=f.breakAll,y=tEn(f,mEn);if(!Mx(r)||!Mx(i)||p.length===0)return null;var b=Number(r)+(jx(m)?m:0),x=Number(i)+(jx(h)?h:0);if(!OC(b)||!OC(x))return null;var S;switch(d){case`start`:S=WTn(`calc(${o})`);break;case`middle`:S=WTn(`calc(${(p.length-1)/2} * -${a} + (${o} / 2))`);break;default:S=WTn(`calc(${p.length-1} * -${a})`)}var C=[],w=p[0];if(l&&w!=null){var T=w.width,E=f.width;C.push(`scale(${jx(E)&&jx(T)?E/T:1})`)}return g&&C.push(`rotate(${g}, ${b}, ${x})`),C.length&&(y.transform=C.join(` `)),dEn.createElement(`text`,eEn({},gx(y),{ref:t,x:b,y:x,className:Re(`recharts-text`,_),textAnchor:u,fill:s.includes(`url`)?wEn:s}),p.map((e,t)=>{var n=e.words.join(v?``:` `);return dEn.createElement(`tspan`,{x:b,dy:t===0?S:a,key:`${n}-${t}`},n)}))}),xO.displayName=`Text`}));function EEn(e,t){if(e==null)return{};var n,r,i=DEn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r{EO=d(p()),DO=d(p()),ze(),SO(),Lx(),Vw(),fw(),jS(),vT(),dS(),_x(),nO(),sT(),e5t(),K8t(),PEn=[`labelRef`],FEn=[`content`],IEn=(0,DO.createContext)(null),LEn=e=>{var t=e.x,n=e.y,r=e.upperWidth,i=e.lowerWidth,a=e.width,o=e.height,s=e.children,l=(0,DO.useMemo)(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:a,height:o}),[t,n,r,i,a,o]);return EO.createElement(IEn.Provider,{value:l},s)},REn=()=>{var e=(0,DO.useContext)(IEn),t=rw();return e||(t?G8t(t):void 0)},zEn=(0,DO.createContext)(null),BEn=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=e.clockWise,l=e.children,u=(0,DO.useMemo)(()=>({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:a,endAngle:o,clockWise:s}),[t,n,r,i,a,o,s]);return EO.createElement(zEn.Provider,{value:u},l)},VEn=()=>{var e=(0,DO.useContext)(zEn),t=OS(_T);return e||t},HEn=e=>{var t=e.value,n=e.formatter,r=Fx(e.children)?t:e.children;return typeof n==`function`?n(r):r},OO=e=>e!=null&&typeof e==`function`,UEn=(e,t)=>Ox(t-e)*Math.min(Math.abs(t-e),360),WEn=(e,t,n,r,i)=>{var a=e.offset,o=e.className,s=i.cx,l=i.cy,u=i.innerRadius,d=i.outerRadius,f=i.startAngle,p=i.endAngle,m=i.clockWise,h=(u+d)/2,g=UEn(f,p),_=g>=0?1:-1,v,y;switch(t){case`insideStart`:v=f+_*a,y=m;break;case`insideEnd`:v=p-_*a,y=!m;break;case`end`:v=p+_*a,y=m;break;default:throw Error(`Unsupported position ${t}`)}y=g<=0?y:!y;var b=Bw(s,l,h,v),x=Bw(s,l,h,v+(y?1:-1)*359),S=`M${b.x},${b.y} A${h},${h},0,1,${+!y}, ${x.x},${x.y}`,C=Fx(e.id)?Nx(`recharts-radial-line-`):e.id;return EO.createElement(`text`,wO({},r,{dominantBaseline:`central`,className:Re(`recharts-radial-bar-label`,o)}),EO.createElement(`defs`,null,EO.createElement(`path`,{id:C,d:S})),EO.createElement(`textPath`,{xlinkHref:`#${C}`},n))},GEn=(e,t,n)=>{var r=e.cx,i=e.cy,a=e.innerRadius,o=e.outerRadius,s=(e.startAngle+e.endAngle)/2;if(n===`outside`){var l=Bw(r,i,o+t,s),u=l.x;return{x:u,y:l.y,textAnchor:u>=r?`start`:`end`,verticalAnchor:`middle`}}if(n===`center`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`middle`};if(n===`centerTop`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`start`};if(n===`centerBottom`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`end`};var d=(a+o)/2,f=Bw(r,i,d,s);return{x:f.x,y:f.y,textAnchor:`middle`,verticalAnchor:`middle`}},kO=e=>e!=null&&`cx`in e&&jx(e.cx),KEn={angle:0,offset:5,zIndex:oT.label,position:`middle`,textBreakAll:!1},TO.displayName=`Label`,qEn=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?EO.createElement(TO,wO({key:`label-implicit`},r)):Mx(e)?EO.createElement(TO,wO({key:`label-implicit`,value:e},r)):(0,DO.isValidElement)(e)?e.type===TO?(0,DO.cloneElement)(e,CO({key:`label-implicit`},r)):EO.createElement(TO,wO({key:`label-implicit`,content:e},r)):OO(e)?EO.createElement(TO,wO({key:`label-implicit`,content:e},r)):e&&typeof e==`object`?EO.createElement(TO,wO({},e,{key:`label-implicit`},r)):null}}));function jO(){return jO=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var s=Fx(i)?n(e,t):MC(e.payload,i),u=Fx(a)?{}:{id:`${a}-${t}`};return PO.createElement(TO,jO({key:`label-${t}`},gx(e),l,u,{fill:r.fill??e.fill,parentViewBox:e.parentViewBox,value:s,textBreakAll:o,viewBox:e.viewBox,index:t,zIndex:0}))})))}function NO(e){var t=e.label;return t?t===!0?PO.createElement(MO,{key:`labelList-implicit`}):PO.isValidElement(t)||OO(t)?PO.createElement(MO,{key:`labelList-implicit`,content:t}):typeof t==`object`?PO.createElement(MO,jO({key:`labelList-implicit`},t,{type:String(t.type)})):null:null}var PO,FO,QEn,$En,eDn,tDn,IO,nDn,rDn,LO=o((()=>{PO=d(p()),FO=d(p()),AO(),yx(),RC(),Lx(),_x(),nO(),sT(),SO(),QEn=[`valueAccessor`],$En=[`dataKey`,`clockWise`,`id`,`textBreakAll`,`zIndex`],eDn=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(uEn(t))return t},tDn=(0,FO.createContext)(void 0),IO=tDn.Provider,nDn=(0,FO.createContext)(void 0),rDn=nDn.Provider,MO.displayName=`LabelList`}));function RO(){return RO=Object.assign?Object.assign.bind():function(e){for(var t=1;t{zO=d(p()),ze(),_x(),wx(),sDn=[`points`,`className`,`baseLinePoints`,`connectNulls`],lDn=e=>e!=null&&e.x===+e.x&&e.y===+e.y,uDn=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[[]];e.forEach(e=>{var n=t[t.length-1];lDn(e)?n&&n.push(e):n&&n.length>0&&t.push([])});var n=e[0],r=t[t.length-1];lDn(n)&&r&&r.push(n);var i=t[t.length-1];return i&&i.length<=0&&(t=t.slice(0,-1)),t},BO=(e,t)=>{var n=uDn(e);t&&(n=[n.reduce((e,t)=>[...e,...t],[])]);var r=n.map(e=>e.reduce((e,t,n)=>Cx(cDn||(cDn=oDn([``,``,``,`,`,``])),e,n===0?`M`:`L`,t.x,t.y),``)).join(``);return n.length===1?`${r}Z`:r},dDn=(e,t,n)=>{var r=BO(e,n);return`${r.slice(-1)===`Z`?r.slice(0,-1):r}L${BO(Array.from(t).reverse(),n).slice(1)}`},fDn=e=>{var t=e.points,n=e.className,r=e.baseLinePoints,i=e.connectNulls,a=iDn(e,sDn);if(!t||!t.length)return null;var o=Re(`recharts-polygon`,n);if(r&&r.length){var s=a.stroke&&a.stroke!==`none`,l=dDn(t,r,i);return zO.createElement(`g`,{className:o},zO.createElement(`path`,RO({},gx(a),{fill:l.slice(-1)===`Z`?a.fill:`none`,stroke:`none`,d:l})),s?zO.createElement(`path`,RO({},gx(a),{fill:`none`,d:BO(t,i)})):null,s?zO.createElement(`path`,RO({},gx(a),{fill:`none`,d:BO(r,i)})):null)}var u=BO(t,i);return zO.createElement(`path`,RO({},gx(a),{fill:u.slice(-1)===`Z`?a.fill:`none`,className:o,d:u}))}}));function mDn(){return mDn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{hDn=d(p()),ze(),lS(),hx(),Lx(),VO=e=>{var t=e.cx,n=e.cy,r=e.r,i=e.className,a=Re(`recharts-dot`,i);return jx(t)&&jx(n)&&jx(r)?hDn.createElement(`circle`,mDn({},px(e),X9t(e),{className:a,cx:t,cy:n,r})):null}})),UO,gDn,WO,_Dn,GO,vDn,yDn,bDn,xDn,SDn,CDn,wDn,TDn,KO=o((()=>{NS(),qw(),ND(),fw(),RC(),yfn(),bfn(),aT(),Ffn(),UO=e=>e.graphicalItems.polarItems,gDn=MS([yT,bT],Nyn),WO=MS([UO,aD,gDn],cD),_Dn=MS([WO],uD),GO=MS([_Dn,Gw],dD),vDn=MS([GO,aD,WO],ebn),MS([GO,aD,WO],(e,t,n)=>n.length>0?e.flatMap(e=>n.flatMap(n=>({value:MC(e,t.dataKey??n.dataKey),errorDomain:[]}))).filter(Boolean):(t==null?void 0:t.dataKey)==null?e.map(e=>({value:e,errorDomain:[]})):e.map(e=>({value:MC(e,t.dataKey),errorDomain:[]}))),yDn=()=>void 0,bDn=MS([GO,aD,WO,vD,yT,bdn],dbn),xDn=MS([aD,sbn,cbn,yDn,bDn,yDn,ow,yT],Dbn),SDn=MS([aD,ow,GO,vDn,eT,yT,xDn],Mbn),CDn=MS([SDn,oD,xD],Pbn),wDn=MS([aD,SDn,CDn,yT],SD),TDn=MS([xD,wDn],Pfn)})),qO,JO,EDn,YO,DDn,XO,ODn,kDn,ZO=o((()=>{NS(),ND(),vT(),fw(),KO(),yfn(),Nfn(),fyn(),qO=(e,t,n)=>{switch(t){case`angleAxis`:return mT(e,n);case`radiusAxis`:return hT(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},JO=(e,t,n)=>{switch(t){case`angleAxis`:return gfn(e,n);case`radiusAxis`:return vfn(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},EDn=MS([qO,xD,TDn,JO],dyn),YO=MS([EDn],Mfn),DDn=MS([ow,vDn,oD,yT],TD),XO=MS([ow,qO,xD,YO,CDn,JO,AD,DDn,yT],uxn),ODn=MS([XO],e=>{if(e){var t=new Map;return e.forEach(e=>{var n=(e.coordinate+360)%360;t.has(n)||t.set(n,e)}),Array.from(t.values())}}),kDn=MS([ow,qO,YO,JO,AD,DDn,yT],fxn)})),ADn,jDn,MDn,NDn,PDn=o((()=>{NS(),ZO(),ADn=(e,t)=>XO(e,`angleAxis`,t,!1),jDn=MS([ADn],e=>{if(e)return e.map(e=>e.coordinate)}),MDn=(e,t)=>XO(e,`radiusAxis`,t,!1),NDn=MS([MDn],e=>{if(e)return e.map(e=>e.coordinate)})}));function FDn(e,t){if(e==null)return{};var n,r,i=IDn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r{ze(),$O=d(p()),Vw(),jS(),PDn(),vT(),hx(),nO(),sT(),dS(),HDn=[`gridType`,`radialLines`,`angleAxisId`,`radiusAxisId`,`cx`,`cy`,`innerRadius`,`outerRadius`,`polarAngles`,`polarRadius`,`zIndex`],UDn=(e,t,n,r)=>{var i=``;return r.forEach((r,a)=>{var o=Bw(t,n,e,r);i+=a?`L ${o.x},${o.y}`:`M ${o.x},${o.y}`}),i+=`Z`,i},WDn=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.polarAngles,o=e.radialLines;if(!a||!a.length||!o)return null;var s=RDn({},px(e));return $O.createElement(`g`,{className:`recharts-polar-grid-angle`},a.map(e=>{var a=Bw(t,n,r,e),o=Bw(t,n,i,e);return $O.createElement(`line`,QO({key:`line-${e}`},s,{x1:a.x,y1:a.y,x2:o.x,y2:o.y}))}))},GDn=e=>{var t=e.cx,n=e.cy,r=e.radius,i=RDn({},px(e));return $O.createElement(`circle`,QO({},i,{className:Re(`recharts-polar-grid-concentric-circle`,e.className),cx:t,cy:n,r}))},KDn=e=>{var t=e.radius,n=RDn({},px(e));return $O.createElement(`path`,QO({},n,{className:Re(`recharts-polar-grid-concentric-polygon`,e.className),d:UDn(t,e.cx,e.cy,e.polarAngles)}))},qDn=e=>{var t=e.polarRadius,n=e.gridType;if(!t||!t.length)return null;var r=Math.max(...t),i=e.fill&&e.fill!==`none`;return $O.createElement(`g`,{className:`recharts-polar-grid-concentric`},i&&n===`circle`&&$O.createElement(GDn,QO({},e,{radius:r})),i&&n!==`circle`&&$O.createElement(KDn,QO({},e,{radius:r})),t.map((t,r)=>{var i=r;return n===`circle`?$O.createElement(GDn,QO({key:i},e,{fill:`none`,radius:t})):$O.createElement(KDn,QO({key:i},e,{fill:`none`,radius:t}))}))},JDn={angleAxisId:0,radiusAxisId:0,gridType:`polygon`,radialLines:!0,zIndex:oT.grid,stroke:`#ccc`,strokeWidth:1,fill:`none`},YDn=e=>{var t=uS(e,JDn),n=t.gridType,r=t.radialLines,i=t.angleAxisId,a=t.radiusAxisId,o=t.cx,s=t.cy,l=t.innerRadius,u=t.outerRadius,d=t.polarAngles,f=t.polarRadius,p=t.zIndex,m=FDn(t,HDn),h=OS(_T),g=OS(e=>jDn(e,i)),_=OS(e=>NDn(e,a)),v=Array.isArray(d)?d:g,y=Array.isArray(f)?f:_;if(v==null||y==null)return null;var b=RDn({cx:(h==null?void 0:h.cx)??o??0,cy:(h==null?void 0:h.cy)??s??0,innerRadius:(h==null?void 0:h.innerRadius)??l??0,outerRadius:(h==null?void 0:h.outerRadius)??u??0,polarAngles:v,polarRadius:y,zIndex:p},m);return b.outerRadius<=0?null:$O.createElement(eO,{zIndex:b.zIndex},$O.createElement(`g`,{className:`recharts-polar-grid`},$O.createElement(qDn,QO({gridType:n,radialLines:r},b,{polarAngles:v,polarRadius:y})),$O.createElement(WDn,QO({gridType:n,radialLines:r},b,{polarAngles:v,polarRadius:y}))))},YDn.displayName=`PolarGrid`}));function ZDn(e){return Array.isArray(e)?e:Array.from(e)}var QDn=o((()=>{})),$Dn,ek,eOn,tOn,nOn,rOn=o((()=>{EC(),dC(),$Dn=gC({name:`polarAxis`,initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=uC(t.payload)},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=uC(t.payload)},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),ek=$Dn.actions,ek.addRadiusAxis,ek.removeRadiusAxis,eOn=ek.addAngleAxis,tOn=ek.removeAngleAxis,nOn=$Dn.reducer}));function iOn(e){return e&&typeof e==`object`&&`className`in e&&typeof e.className==`string`?e.className:``}var aOn=o((()=>{}));function tk(){return tk=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.children;var t=e.type,r=uOn(e,hOn),i=dT(n,`angleAxis`,t);if(i!=null)return nk(nk({},r),{},{type:i})},[e,n]),i=r===OS(e=>mT(e,r==null?void 0:r.id));return(0,mOn.useEffect)(()=>r==null?Dx:(t(eOn(r)),()=>{t(tOn(r))}),[t,r]),i?e.children:null}function pOn(e){var t=uS(e,cT);return rk.createElement(fOn,{id:t.angleAxisId,scale:t.scale,type:t.type,dataKey:t.dataKey,unit:void 0,name:t.name,allowDuplicatedCategory:!1,allowDataOverflow:!1,reversed:t.reversed,includeHidden:!1,allowDecimals:t.allowDecimals,tickCount:t.tickCount,niceTicks:t.niceTicks??`auto`,ticks:t.ticks,tick:t.tick,domain:t.domain},rk.createElement(EOn,t))}var rk,mOn,hOn,gOn,_On,vOn,yOn,bOn,xOn,SOn,COn,wOn,TOn,EOn,DOn=o((()=>{rk=d(p()),mOn=d(p()),ze(),yx(),HO(),pDn(),SO(),lS(),Vw(),rOn(),jS(),ZO(),vT(),efn(),YC(),hx(),dS(),nO(),fw(),Lx(),fT(),aOn(),hOn=[`children`,`type`],gOn=[`ref`],_On=1e-5,vOn=Math.cos(zw(45)),yOn=`angleAxis`,bOn=(e,t)=>{var n=t.cx,r=t.cy,i=t.radius,a=t.orientation,o=t.tickSize||8,s=Bw(n,r,i,e.coordinate),l=Bw(n,r,i+(a===`inner`?-1:1)*o,e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}},xOn=(e,t)=>{var n=Math.cos(zw(-e.coordinate));return n>_On?t===`outer`?`start`:`end`:n<-_On?t===`outer`?`end`:`start`:`middle`},SOn=e=>{var t=Math.cos(zw(-e.coordinate)),n=Math.sin(zw(-e.coordinate));return Math.abs(t)<=vOn?n>0?`start`:`end`:`middle`},COn=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.axisLineType,a=e.axisLine,o=e.ticks;if(!a)return null;var s=nk(nk({},px(e)),{},{fill:`none`},px(a));if(i===`circle`)return rk.createElement(VO,tk({className:`recharts-polar-angle-axis-line`},s,{cx:t,cy:n,r}));var l=o.map(e=>Bw(t,n,r,e.coordinate));return rk.createElement(fDn,tk({className:`recharts-polar-angle-axis-line`},s,{points:l}))},wOn=e=>{var t=e.tick,n=e.tickProps,r=e.value;return t?rk.isValidElement(t)?rk.cloneElement(t,n):typeof t==`function`?t(n):rk.createElement(xO,tk({},n,{className:`recharts-polar-angle-axis-tick-value`}),r):null},TOn=e=>{var t=e.tick,n=e.tickLine,r=e.tickFormatter,i=e.stroke,a=e.ticks,o=px(e);o.ref;var s=uOn(o,gOn),l=mx(t),u=nk(nk({},s),{},{fill:`none`},px(n)),d=a.map((a,o)=>{var d=bOn(a,e),f=xOn(a,e.orientation),p=SOn(a),m=nk(nk(nk({},s),{},{textAnchor:f,verticalAnchor:p,stroke:`none`,fill:i},l),{},{index:o,payload:a,x:d.x2,y:d.y2});return rk.createElement(vx,tk({className:Re(`recharts-polar-angle-axis-tick`,iOn(t)),key:`tick-${a.coordinate}`},cS(e,a,o)),n&&rk.createElement(`line`,tk({className:`recharts-polar-angle-axis-tick-line`},u,d)),rk.createElement(wOn,{tick:t,tickProps:m,value:r?r(a.value,o):a.value}))});return rk.createElement(vx,{className:`recharts-polar-angle-axis-ticks`},d)},EOn=e=>{var t=e.angleAxisId,n=OS(_T),r=OS(e=>YO(e,`angleAxis`,t)),i=JC(),a=OS(e=>ODn(e,`angleAxis`,t,i));if(n==null||!a||!a.length||r==null)return null;var o=nk(nk(nk({},e),{},{scale:r},n),{},{radius:n.outerRadius,ticks:a});return rk.createElement(eO,{zIndex:o.zIndex},rk.createElement(vx,{className:Re(`recharts-polar-angle-axis`,yOn,o.className)},rk.createElement(COn,o),rk.createElement(TOn,o)))},pOn.displayName=`PolarAngleAxis`}));function OOn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kOn(e){for(var t=1;t{NS(),IAn(),qw(),qC(),RC(),KO(),NOn=(e,t)=>t,POn=MS([UO,NOn],(e,t)=>e.filter(e=>e.type===`pie`).find(e=>e.id===t)),FOn=[],IOn=(e,t,n)=>(n==null?void 0:n.length)===0?FOn:n,LOn=MS([Gw,POn,IOn],(e,t,n)=>{var r=e.chartData;if(t!=null){var i=(t==null?void 0:t.data)!=null&&t.data.length>0?t.data:r;if((!i||!i.length)&&n!=null&&(i=n.map(e=>kOn(kOn({},t.presentationProps),e.props))),i!=null)return i}}),ROn=MS([LOn,POn,IOn],(e,t,n)=>{if(e!=null&&t!=null)return e.map((e,r)=>{var i,a=MC(e,t.nameKey,t.name),o=n!=null&&(i=n[r])!=null&&(i=i.props)!=null&&i.fill?n[r].props.fill:typeof e==`object`&&e&&`fill`in e?e.fill:t.fill;return{value:PC(a,t.dataKey),dataKey:t.dataKey,color:o,payload:e,type:t.legendType}})}),zOn=MS([LOn,POn,IOn,GC],(e,t,n,r)=>{if(t!=null&&e!=null)return gAn({offset:r,pieSettings:t,displayedData:e,cells:n})})})),VOn=s((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),l=Symbol.for(`react.server_context`),u=Symbol.for(`react.forward_ref`),d=Symbol.for(`react.suspense`),f=Symbol.for(`react.suspense_list`),p=Symbol.for(`react.memo`),m=Symbol.for(`react.lazy`);function h(e){if(typeof e==`object`&&e){var h=e.$$typeof;switch(h){case t:switch(e=e.type,e){case r:case a:case i:case d:case f:return e;default:switch(e=e&&e.$$typeof,e){case l:case s:case u:case m:case p:case o:return e;default:return h}}case n:return h}}}e.isFragment=function(e){return h(e)===r}})),HOn=s(((e,t)=>{t.exports=VOn()}));function ik(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>GOn(e)):[GOn(t)],JOn(e).forEach(e=>{var t=bx(e,`type.displayName`)||bx(e,`type.name`);t&&r.indexOf(t)!==-1&&n.push(e)}),n}var UOn,WOn,GOn,KOn,qOn,JOn,YOn,ak=o((()=>{xx(),UOn=d(p()),WOn=HOn(),Lx(),GOn=e=>typeof e==`string`?e:e?e.displayName||e.name||`Component`:``,KOn=null,qOn=null,JOn=e=>{if(e===KOn&&Array.isArray(qOn))return qOn;var t=[];return UOn.Children.forEach(e,e=>{Fx(e)||((0,WOn.isFragment)(e)?t=t.concat(JOn(e.props.children)):t.push(e))}),qOn=t,KOn=e,t},YOn=e=>e&&typeof e==`object`&&`clipDot`in e?!!e.clipDot:!0}));function XOn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZOn(e){for(var t=1;t{sk=d(p()),okn=d(p()),yx()})),lk,uk,dk,fk=o((()=>{jS(),BD(),lk=(e,t,n)=>{var r=kS();return(i,a)=>o=>{e==null||e(i,a,o),r(Mxn({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},uk=e=>{var t=kS();return(n,r)=>i=>{e==null||e(n,r,i),t(Nxn())}},dk=(e,t,n)=>{var r=kS();return(i,a)=>o=>{e==null||e(i,a,o),r(Fxn({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}}}));function pk(e){var t=e.tooltipEntrySettings,n=kS(),r=JC(),i=(0,skn.useRef)(null);return(0,skn.useLayoutEffect)(()=>{r||(i.current===null?n(Oxn(t)):i.current!==t&&n(kxn({prev:i.current,next:t})),i.current=t)},[t,n,r]),(0,skn.useLayoutEffect)(()=>()=>{i.current&&(n(Axn(i.current)),i.current=null)},[n]),null}var skn,mk=o((()=>{skn=d(p()),jS(),BD(),YC()}));function ckn(e){var t=e.legendPayload,n=kS(),r=JC(),i=(0,hk.useRef)(null);return(0,hk.useLayoutEffect)(()=>{r||(i.current===null?n(Bon(t)):i.current!==t&&n(Von({prev:i.current,next:t})),i.current=t)},[n,r,t]),(0,hk.useLayoutEffect)(()=>()=>{i.current&&(n(Hon(i.current)),i.current=null)},[n]),null}function lkn(e){var t=e.legendPayload,n=kS(),r=OS(ow),i=(0,hk.useRef)(null);return(0,hk.useLayoutEffect)(()=>{(r===`centric`||r===`radial`)&&(i.current===null?n(Bon(t)):i.current!==t&&n(Von({prev:i.current,next:t})),i.current=t)},[n,r,t]),(0,hk.useLayoutEffect)(()=>()=>{i.current&&(n(Hon(i.current)),i.current=null)},[n]),null}var hk,gk=o((()=>{hk=d(p()),YC(),fw(),jS(),Won()}));function ukn(e,t){return hkn(e)||mkn(e,t)||fkn(e,t)||dkn()}function dkn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fkn(e,t){if(e){if(typeof e==`string`)return pkn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pkn(e,t):void 0}}function pkn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=[];for(var i of n)r.push({status:`removed`,prev:i});for(var a=0;ae[Math.floor(r*n)]),t)}function vkn(e,t){return gkn(t.map((t,n)=>e[n]),t)}function ykn(e,t){for(var n=new Map,r=0;r{var a=n(e,t);if(a!=null){var o=r.get(a);if(o!==void 0)return i.add(a),o}}),o=[];for(var s of r){var l=ukn(s,2),u=l[0],d=l[1];i.has(u)||o.push(d)}return gkn(a,t,o)}function xkn(e,t,n){return t==null?null:e==null?t.map(e=>({status:`added`,next:e})):n===`index`?_kn(e,t):n===`append`?vkn(e,t):bkn(e,t,n)}var _k,vk,yk=o((()=>{_k=`index`,vk=`append`}));function Skn(e,t){var n=(0,bk.useRef)(e),r=(0,bk.useRef)(t.current),i=(0,bk.useRef)(!0);n.current!==e&&(n.current=e,r.current=t.current,i.current=!1);var a=(0,bk.useCallback)(function(e,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;n===0?i.current=!0:(n===1&&(r.current=e),n>0&&i.current&&a&&(t.current=e))},[t]);return{startValue:r.current,syncStepValue:a}}var bk,Ckn=o((()=>{bk=d(p())}));function wkn(e,t){return kkn(e)||Okn(e,t)||Ekn(e,t)||Tkn()}function Tkn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ekn(e,t){if(e){if(typeof e==`string`)return Dkn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dkn(e,t):void 0}}function Dkn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{typeof e==`function`&&e(),i(!0)},[e]),handleAnimationEnd:(0,jkn.useCallback)(()=>{typeof t==`function`&&t(),i(!1)},[t])}}function Sk(e){var t=e.animationInput,n=e.animationIdPrefix,r=e.items,i=e.previousItemsRef,a=e.isAnimationActive,o=e.animationBegin,s=e.animationDuration,l=e.animationEasing,u=e.onAnimationStart,d=e.onAnimationEnd,f=e.animationInterpolateFn,p=e.animationMatchBy,m=e.shouldUpdatePreviousRef,h=e.children,g=e.layout,_=eun(t,n),v=Skn(_,i),y=v.startValue??null,b=xkn(y,r,p??_k);return Akn.createElement(Yln,{animationId:_,begin:o,duration:s,isActive:a,easing:l,onAnimationEnd:d,onAnimationStart:u,key:_},e=>{var t=y==null,n=r==null?r:f(b,e,g),i=m?m(e):e>0;return v.syncStepValue(n,e,i),n==null?null:h(n,e,t)})}var Akn,jkn,Ck=o((()=>{Akn=d(p()),jkn=d(p()),$ln(),nun(),yk(),Ckn()}));function Mkn(e,t){return Lkn(e)||Ikn(e,t)||Pkn(e,t)||Nkn()}function Nkn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pkn(e,t){if(e){if(typeof e==`string`)return Fkn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fkn(e,t):void 0}}function Fkn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{Rkn=d(p()),Lx(),zkn=()=>Mkn(Rkn.useState(()=>Nx(`uid-`)),1)[0],Bkn=Rkn.useId??zkn}));function Hkn(e,t){var n=Bkn();return t||(e?`${e}-${n}`:n)}var Ukn=o((()=>{Vkn()})),Wkn,Gkn,Kkn,wk,Tk=o((()=>{Wkn=d(p()),Gkn=d(p()),Ukn(),Kkn=(0,Gkn.createContext)(void 0),wk=e=>{var t=e.id,n=e.type,r=e.children,i=Hkn(`recharts-${n}`,t);return Wkn.createElement(Kkn.Provider,{value:i},r(i))}})),qkn,Ek,Jkn,Ykn,Xkn,Zkn,Qkn,$kn,eAn,tAn=o((()=>{EC(),dC(),qkn=gC({name:`graphicalItems`,initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(uC(t.payload))},prepare:hC()},replaceCartesianGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=HS(e).cartesianItems.indexOf(uC(r));a>-1&&(e.cartesianItems[a]=uC(i))},prepare:hC()},removeCartesianGraphicalItem:{reducer(e,t){var n=HS(e).cartesianItems.indexOf(uC(t.payload));n>-1&&e.cartesianItems.splice(n,1)},prepare:hC()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(uC(t.payload))},prepare:hC()},removePolarGraphicalItem:{reducer(e,t){var n=HS(e).polarItems.indexOf(uC(t.payload));n>-1&&e.polarItems.splice(n,1)},prepare:hC()},replacePolarGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=HS(e).polarItems.indexOf(uC(r));a>-1&&(e.polarItems[a]=uC(i))},prepare:hC()}}}),Ek=qkn.actions,Jkn=Ek.addCartesianGraphicalItem,Ykn=Ek.replaceCartesianGraphicalItem,Xkn=Ek.removeCartesianGraphicalItem,Zkn=Ek.addPolarGraphicalItem,Qkn=Ek.removePolarGraphicalItem,$kn=Ek.replacePolarGraphicalItem,eAn=qkn.reducer})),Dk,nAn,Ok,rAn,iAn,kk=o((()=>{Dk=d(p()),jS(),tAn(),nAn=e=>{var t=kS(),n=(0,Dk.useRef)(null);return(0,Dk.useLayoutEffect)(()=>{n.current===null?t(Jkn(e)):n.current!==e&&t(Ykn({prev:n.current,next:e})),n.current=e},[t,e]),(0,Dk.useLayoutEffect)(()=>()=>{n.current&&(t(Xkn(n.current)),n.current=null)},[t]),null},Ok=(0,Dk.memo)(nAn),rAn=e=>{var t=kS(),n=(0,Dk.useRef)(null);return(0,Dk.useLayoutEffect)(()=>{n.current===null?t(Zkn(e)):n.current!==e&&t($kn({prev:n.current,next:e})),n.current=e},[t,e]),(0,Dk.useLayoutEffect)(()=>()=>{n.current&&(t(Qkn(n.current)),n.current=null)},[t]),null},iAn=(0,Dk.memo)(rAn)}));function Ak(){return Ak=Object.assign?Object.assign.bind():function(e){for(var t=1;tik(e.children,hO),[e.children]),n=OS(n=>ROn(n,e.id,t));return n==null?null:Mk.createElement(lkn,{legendPayload:n})}function fAn(e){if(e!=null&&typeof e!=`boolean`&&typeof e!=`function`){if(Mk.isValidElement(e)){var t,n=(t=e.props)==null?void 0:t.fill;return typeof n==`string`?n:void 0}var r=e.fill;return typeof r==`string`?r:void 0}}function pAn(e){var t=e.sectors,n=e.props,r=e.showLabels,i=n.label,a=n.labelLine,o=n.dataKey;if(!r||!i||!t)return null;var s=px(n),l=mx(i),u=mx(a),d=typeof i==`object`&&`offsetRadius`in i&&typeof i.offsetRadius==`number`&&i.offsetRadius||20,f=t.map((e,t)=>{var n=(e.startAngle+e.endAngle)/2,r=Bw(e.cx,e.cy,e.outerRadius+d,n),f=jk(jk(jk(jk({},s),e),{},{stroke:`none`},l),{},{index:t,textAnchor:DAn(r.x,e.cx)},r),p=jk(jk(jk(jk({},s),e),{},{fill:`none`,stroke:e.fill},u),{},{index:t,points:[Bw(e.cx,e.cy,e.outerRadius,n),r],key:`line`});return Mk.createElement(eO,{zIndex:oT.label,key:`label-${e.startAngle}-${e.endAngle}-${e.midAngle}-${t}`},Mk.createElement(vx,null,a&&jAn(a,p),MAn(i,f,MC(e,o))))});return Mk.createElement(vx,{className:`recharts-pie-labels`},f)}function mAn(e){var t=e.sectors,n=e.props,r=e.showLabels,i=n.label;return typeof i==`object`&&i&&`position`in i?Mk.createElement(NO,{label:i}):Mk.createElement(pAn,{sectors:t,props:n,showLabels:r})}function hAn(e){var t=e.sectors,n=e.activeShape,r=e.inactiveShape,i=e.allOtherPieProps,a=e.shape,o=e.id,s=e.animationElapsedTime,l=e.isAnimating,u=e.isEntrance,d=OS(JD),f=OS(tCn),p=OS(nCn),m=i.onMouseEnter,h=i.onClick,g=i.onMouseLeave,_=aAn(i,SAn),v=lk(m,i.dataKey,o),y=uk(g),b=dk(h,i.dataKey,o);return t==null||t.length===0?null:Mk.createElement(Mk.Fragment,null,t.map((e,m)=>{if((e==null?void 0:e.startAngle)===0&&(e==null?void 0:e.endAngle)===0&&t.length!==1)return null;var h=p==null||p===o,g=String(m)===d&&(f==null||i.dataKey===f)&&h,x=n&&g?n:d?r:null,S=jk(jk({},e),{},{stroke:e.stroke,tabIndex:-1,index:m,isActive:g,animationElapsedTime:s,isAnimating:l,isEntrance:u,[Nan]:m,[Pan]:o});return Mk.createElement(vx,Ak({key:`sector-${e==null?void 0:e.startAngle}-${e==null?void 0:e.endAngle}-${e.midAngle}-${m}`,tabIndex:-1,className:`recharts-pie-sector`},cS(_,e,m),{onMouseEnter:v(e,m),onMouseLeave:y(e,m),onClick:b(e,m)}),Mk.createElement(ok,{option:x??a,DefaultShape:TAn,shapeProps:S}))}))}function gAn(e){var t=e.pieSettings,n=e.displayedData,r=e.cells,i=e.offset,a=t.cornerRadius,o=t.startAngle,s=t.endAngle,l=t.dataKey,u=t.nameKey,d=t.tooltipType,f=Math.abs(t.minAngle),p=AAn(o,s),m=Math.abs(p),h=n.length<=1?0:t.paddingAngle??0,g=n.filter(e=>MC(e,l,0)!==0).length,_=(m>=360?g:g-1)*h,v=n.reduce((e,t)=>{var n=MC(t,l,0);return e+(jx(n)?n:0)},0),y=f>0&&v>0&&n.some(e=>{var t=MC(e,l,0),n=(jx(t)?t:0)/v;return t!==0&&n*m0){var S;x=n.map((e,n)=>{var s=MC(e,l,0),f=MC(e,u,n),m=kAn(t,i,e),g=(jx(s)?s:0)/v,_,x=jk(jk({},e),r&&r[n]&&r[n].props),C=x!=null&&`fill`in x&&typeof x.fill==`string`?x.fill:t.fill;_=n?S.endAngle+Ox(p)*h*(s===0?0:1):o;var w=_+Ox(p)*((s===0?0:y)+g*b),T=(_+w)/2,E=(m.innerRadius+m.outerRadius)/2,D=[{name:f,value:s,payload:x,dataKey:l,type:d,color:C,fill:C,graphicalItemId:t.id}],O=Bw(m.cx,m.cy,E,T);return S=jk(jk(jk(jk({},t.presentationProps),{},{percent:g,cornerRadius:typeof a==`string`?parseFloat(a):a,name:f,tooltipPayload:D,midAngle:T,middleRadius:E,tooltipPosition:O},x),m),{},{value:s,dataKey:l,startAngle:_,endAngle:w,payload:x,paddingAngle:s===0?0:Ox(p)*h}),S})}return x}function _An(e){var t=e.showLabels,n=e.sectors,r=e.children,i=(0,Nk.useMemo)(()=>!t||!n?[]:n.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})),[n,t]);return Mk.createElement(rDn,{value:t?i:void 0},r)}function vAn(e){var t=e.props,n=e.previousSectorsRef,r=e.id,i=t.sectors,a=t.activeShape,o=t.inactiveShape,s=t.animationInterpolateFn,l=xk(t.onAnimationStart,t.onAnimationEnd),u=l.isAnimating,d=l.handleAnimationStart,f=l.handleAnimationEnd,p=uw();if(p==null)return null;var m=i[0];return Mk.createElement(_An,{showLabels:!u,sectors:i},Mk.createElement(Sk,{animationInput:t,animationIdPrefix:`recharts-pie-`,items:i,previousItemsRef:n,isAnimationActive:t.isAnimationActive,animationBegin:t.animationBegin,animationDuration:t.animationDuration,animationEasing:t.animationEasing,onAnimationStart:d,onAnimationEnd:f,animationInterpolateFn:s,animationMatchBy:t.animationMatchBy,layout:p},(e,n,i)=>Mk.createElement(vx,null,Mk.createElement(hAn,{sectors:e,activeShape:a,inactiveShape:o,allOtherPieProps:t,shape:t.shape,id:r,animationElapsedTime:n,isAnimating:u||n<1,isEntrance:i}))),Mk.createElement(mAn,{showLabels:!u,sectors:i,props:t}),Mk.createElement(BEn,{cx:(m==null?void 0:m.cx)??0,cy:(m==null?void 0:m.cy)??0,innerRadius:(m==null?void 0:m.innerRadius)??0,outerRadius:(m==null?void 0:m.outerRadius)??0,startAngle:t.startAngle,endAngle:t.endAngle,clockWise:!1},t.children))}function yAn(e){var t=e.id,n=aAn(e,CAn),r=e.hide,i=e.className,a=e.rootTabIndex,o=(0,Nk.useMemo)(()=>ik(e.children,hO),[e.children]),s=OS(e=>zOn(e,t,o)),l=(0,Nk.useRef)(null),u=Re(`recharts-pie`,i);return r||s==null?(l.current=null,Mk.createElement(vx,{tabIndex:a,className:u})):Mk.createElement(eO,{zIndex:e.zIndex},Mk.createElement(EAn,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:s,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,formatter:e.formatter,id:t,activeShape:e.activeShape}),Mk.createElement(vx,{tabIndex:a,className:u},Mk.createElement(vAn,{props:jk(jk({},n),{},{sectors:s}),previousSectorsRef:l,id:t})))}function bAn(e){var t=uS(e,PAn),n=t.id,r=aAn(t,wAn),i=px(r);return Mk.createElement(wk,{id:n,type:`pie`},e=>Mk.createElement(Mk.Fragment,null,Mk.createElement(iAn,{type:`pie`,id:e,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),Mk.createElement(dAn,Ak({},r,{id:e})),Mk.createElement(yAn,Ak({},r,{id:e}))))}var Mk,Nk,xAn,SAn,CAn,wAn,TAn,EAn,DAn,OAn,kAn,AAn,jAn,MAn,NAn,PAn,FAn,IAn=o((()=>{Mk=d(p()),Nk=d(p()),xx(),ze(),BOn(),jS(),yx(),jw(),cdn(),SO(),gO(),ak(),Vw(),Lx(),RC(),lS(),ck(),fk(),mk(),YD(),gk(),WC(),Ck(),yk(),dS(),Tk(),kk(),hx(),LO(),AO(),nO(),sT(),aOn(),fw(),xAn=[`key`],SAn=[`onMouseEnter`,`onClick`,`onMouseLeave`],CAn=[`id`],wAn=[`id`],TAn=sdn,EAn=Mk.memo(e=>{var t=e.dataKey,n=e.nameKey,r=e.sectors,i=e.stroke,a=e.strokeWidth,o=e.fill,s=e.name,l=e.hide,u=e.tooltipType,d=e.formatter,f=e.id,p=e.activeShape,m=fAn(p),h={dataDefinedOnItem:r.map(e=>{var t=e.tooltipPayload;return m==null||t==null?t:t.map(e=>jk(jk({},e),{},{color:m,fill:m}))}),getPosition:e=>{var t;return(t=r[Number(e)])==null?void 0:t.tooltipPosition},settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:n,name:PC(s,t),hide:l,type:u,color:o,unit:``,formatter:d,graphicalItemId:f}};return Mk.createElement(pk,{tooltipEntrySettings:h})}),DAn=(e,t)=>e>t?`start`:ePx(typeof t==`function`?t(e):t,n,n*.8),kAn=(e,t,n)=>{var r=t.top,i=t.left,a=t.width,o=t.height,s=Bun(a,o);return{cx:i+Px(e.cx,a,a/2),cy:r+Px(e.cy,o,o/2),innerRadius:Px(e.innerRadius,s,0),outerRadius:OAn(n,e.outerRadius,s),maxRadius:e.maxRadius||Math.sqrt(a*a+o*o)/2}},AAn=(e,t)=>Ox(t-e)*Math.min(Math.abs(t-e),360),jAn=(e,t)=>{if(Mk.isValidElement(e))return Mk.cloneElement(e,t);if(typeof e==`function`)return e(t);var n=Re(`recharts-pie-label-line`,typeof e==`boolean`?``:e.className);t.key;var r=aAn(t,xAn);return Mk.createElement(Aw,Ak({},r,{type:`linear`,className:n}))},MAn=(e,t,n)=>{if(Mk.isValidElement(e))return Mk.cloneElement(e,t);var r=n;if(typeof e==`function`&&(r=e(t),Mk.isValidElement(r)))return r;var i=Re(`recharts-pie-label-text`,iOn(e));return Mk.createElement(xO,Ak({},t,{alignmentBaseline:`middle`,className:i}),r)},NAn=(e,t)=>{if(e==null)return[];var n=[],r=e.find(e=>e.status!==`removed`),i=r?r.next.startAngle:0;return e.forEach((e,r)=>{if(e.status!==`removed`){var a=r>0?bx(e.next,`paddingAngle`,0):0;if(e.status===`matched`){var o=Tx(e.prev.endAngle-e.prev.startAngle,e.next.endAngle-e.next.startAngle,t),s=jk(jk({},e.next),{},{startAngle:i+a,endAngle:i+o+a});n.push(s),i=s.endAngle}else{var l=Tx(0,e.next.endAngle-e.next.startAngle,t),u=jk(jk({},e.next),{},{startAngle:i+a,endAngle:i+l+a});n.push(u),i=u.endAngle}}}),n},PAn={animationBegin:400,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:NAn,animationMatchBy:vk,cx:`50%`,cy:`50%`,dataKey:`value`,endAngle:360,fill:`#808080`,hide:!1,innerRadius:0,isAnimationActive:`auto`,label:!1,labelLine:!0,legendType:`rect`,minAngle:0,nameKey:`name`,outerRadius:`80%`,paddingAngle:0,rootTabIndex:0,shape:TAn,startAngle:0,stroke:`#fff`,zIndex:oT.area},FAn=bAn,FAn.displayName=`Pie`}));function LAn(e){return e[e.length-1]}var RAn=o((()=>{}));function zAn(e){if(mS(e)&&e.length!==0)return LAn(ZDn(e))}var BAn=o((()=>{RAn(),QDn(),hS()})),VAn=o((()=>{BAn()}));function HAn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UAn(e){for(var t=1;t{var s=UAn(UAn(UAn({r:3},o),p),{},{index:r,cx:e.x??void 0,cy:e.y??void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return Pk.createElement(XAn,{key:`dot-${r}`,option:n,dotProps:s,className:i})}),h={};return s&&l!=null&&(h.clipPath=`url(#clipPath-${f?``:`dots-`}${l})`),Pk.createElement(eO,{zIndex:d},Pk.createElement(vx,qAn({className:r},h),m))}var Pk,$An,ejn,tjn=o((()=>{Pk=d(p()),$An=d(p()),ze(),HO(),yx(),ak(),_x(),nO(),sT(),ejn=[`points`]}));function njn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rjn(e){for(var t=1;t{EC(),dC(),sjn=gC({name:`cartesianAxis`,initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=uC(t.payload)},prepare:hC()},replaceXAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.xAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.xAxis[r.id],e.xAxis[i.id]=uC(i))},prepare:hC()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:hC()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=uC(t.payload)},prepare:hC()},replaceYAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.yAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.yAxis[r.id],e.yAxis[i.id]=uC(i))},prepare:hC()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:hC()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=uC(t.payload)},prepare:hC()},replaceZAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.zAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.zAxis[r.id],e.zAxis[i.id]=uC(i))},prepare:hC()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:hC()},updateYAxisWidth(e,t){var n=t.payload,r=n.id,i=n.width,a=e.yAxis[r];if(a){var o=a.widthHistory||[];if(o.length===3&&o[0]===o[2]&&i===o[1]&&i!==a.width&&Math.abs(i-(o[0]??0))<=1)return;var s=[...o,i].slice(-3);e.yAxis[r]=rjn(rjn({},a),{},{width:i,widthHistory:s})}},updateXAxisHeight(e,t){var n=t.payload,r=n.id,i=n.height,a=e.xAxis[r];if(a){var o=a.heightHistory||[];if(o.length===3&&o[0]===o[2]&&i===o[1]&&i!==a.height&&Math.abs(i-(o[0]??0))<=1)return;var s=[...o,i].slice(-3);e.xAxis[r]=rjn(rjn({},a),{},{height:i,heightHistory:s})}}}}),Fk=sjn.actions,cjn=Fk.addXAxis,ljn=Fk.replaceXAxis,ujn=Fk.removeXAxis,djn=Fk.addYAxis,fjn=Fk.replaceYAxis,pjn=Fk.removeYAxis,mjn=Fk.addZAxis,hjn=Fk.replaceZAxis,gjn=Fk.removeZAxis,_jn=Fk.updateYAxisWidth,vjn=Fk.updateXAxisHeight,yjn=sjn.reducer})),bjn,xjn=o((()=>{NS(),qC(),bjn=MS([GC],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right}))})),Sjn,Cjn=o((()=>{NS(),xjn(),VC(),Sjn=MS([bjn,zC,BC],(e,t,n)=>{if(e&&t!=null&&n!=null)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}})})),Lk,wjn,Rk=o((()=>{jS(),YD(),Cjn(),Lk=()=>OS(Sjn),wjn=()=>OS(cCn)}));function Tjn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ejn(e){for(var t=1;tu.includes(e.payload));return Fx(d)?null:zk.createElement(eO,{zIndex:s},zk.createElement(Mjn,{point:d,childIndex:Number(l),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var zk,jjn,Mjn,Njn=o((()=>{zk=d(p()),jjn=d(p()),lS(),HO(),yx(),jS(),YD(),Rk(),Lx(),hx(),nO(),sT(),Mjn=e=>{var t=e.point,n=e.childIndex,r=e.mainColor,i=e.activeDot,a=e.dataKey,o=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var s=Ejn(Ejn(Ejn({},{index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??`none`,strokeWidth:2,stroke:`#fff`,payload:t.payload,value:t.value}),mx(i)),X9t(i)),l=(0,jjn.isValidElement)(i)?(0,jjn.cloneElement)(i,s):typeof i==`function`?i(s):zk.createElement(VO,s);return zk.createElement(vx,{className:`recharts-active-dot`,clipPath:o},l)}}));function Pjn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fjn(e){for(var t=1;t{NS(),xMn(),ZO(),vT(),qw(),fw(),RC(),KO(),zjn=(e,t)=>YO(e,`radiusAxis`,t),Bjn=MS([zjn],e=>{if(e!=null)return{scale:e}}),Vjn=MS([hT,zjn],(e,t)=>{if(e!=null&&t!=null)return Fjn(Fjn({},e),{},{scale:t})}),Hjn=(e,t,n,r)=>XO(e,`radiusAxis`,t,r),Ujn=(e,t,n)=>mT(e,n),Wjn=(e,t,n)=>YO(e,`angleAxis`,n),Gjn=MS([Ujn,Wjn],(e,t)=>{if(e!=null&&t!=null)return Fjn(Fjn({},e),{},{scale:t})}),Kjn=(e,t,n,r)=>XO(e,`angleAxis`,n,r),qjn=MS([Ujn,Wjn,_T],(e,t,n)=>{if(n!=null&&t!=null)return{scale:t,type:e.type,dataKey:e.dataKey,cx:n.cx,cy:n.cy}}),Jjn=(e,t,n,r,i)=>i,Yjn=MS([ow,Vjn,Hjn,Gjn,Kjn],(e,t,n,r,i)=>FC(e,`radiusAxis`)?LC(t,n,!1):LC(r,i,!1)),Xjn=MS([UO,Jjn],(e,t)=>{if(e!=null){var n=e.find(e=>e.type===`radar`&&t===e.id);return n==null?void 0:n.dataKey}}),Zjn=MS([Bjn,qjn,Gw,Xjn,Yjn],(e,t,n,r,i)=>{var a=n.chartData,o=n.dataStartIndex,s=n.dataEndIndex;if(e!=null&&t!=null&&a!=null&&i!=null&&r!=null)return sMn({radiusAxis:e,angleAxis:t,displayedData:a.slice(o,s+1),dataKey:r,bandSize:i})})}));function Bk(){return Bk=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var a=MC(e,n.dataKey,r),f=MC(e,i),p=(n.scale.map(a)??0)+d,m=Array.isArray(f)?zAn(f):f,h=Fx(m)?0:t.scale.map(m)??0;Array.isArray(f)&&f.length>=2&&(l=!0),u.push(Vk(Vk({},Bw(o,s,h,p)),{},{name:a,value:f,cx:o,cy:s,radius:h,angle:p,payload:e}))});var f=[];return l&&u.forEach(e=>{if(Array.isArray(e.value)){var n=e.value[0],r=Fx(n)?0:t.scale.map(n)??0;f.push(Vk(Vk({},e),{},{radius:r},Bw(o,s,r,e.angle)))}else f.push(e)}),{points:u,isRange:l,baseLinePoints:f}}function cMn(e){var t=e.showLabels,n=e.points,r=e.children,i=n.map(e=>{var t={x:e.x,y:e.y,width:0,lowerWidth:0,upperWidth:0,height:0};return Vk(Vk({},t),{},{value:e.value??``,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return Hk.createElement(IO,{value:t?i:void 0},r)}function lMn(e){var t=e.points,n=e.baseLinePoints,r=e.props;if(t==null)return null;var i=r.shape,a=r.isRange,o=r.connectNulls,s=Hk.isValidElement(i)?Hk.cloneElement(i,Vk(Vk({},r),{},{points:t})):typeof i==`function`?i(Vk(Vk({},r),{},{points:t})):Hk.createElement(fDn,Bk({},gx(r),{onMouseEnter:e=>{var t=r.onMouseEnter;t&&t(r,e)},onMouseLeave:e=>{var t=r.onMouseLeave;t&&t(r,e)},points:t,baseLinePoints:a?n:void 0,connectNulls:o}));return Hk.createElement(vx,{className:`recharts-radar-polygon`},s,Hk.createElement(oMn,{props:r,points:t}))}function uMn(e){var t=e.props,n=e.previousPointsRef,r=e.previousBaseLinePointsRef,i=t.points,a=t.baseLinePoints,o=t.isAnimationActive,s=t.animationBegin,l=t.animationDuration,u=t.animationEasing,d=t.animationMatchBy,f=t.animationInterpolateFn,p=t.onAnimationStart,m=t.onAnimationEnd,h=Skn(t,r),g=h.startValue,_=xkn(g??null,a,d),v=xk(p,m),y=v.isAnimating,b=v.handleAnimationStart,x=v.handleAnimationEnd,S=uw();return S==null?null:Hk.createElement(cMn,{showLabels:!y,points:i},Hk.createElement(Sk,{animationInput:t,animationIdPrefix:`recharts-radar-`,items:i,previousItemsRef:n,isAnimationActive:o,animationBegin:s,animationDuration:l,animationEasing:u,onAnimationStart:b,onAnimationEnd:x,animationInterpolateFn:f,animationMatchBy:d,layout:S},(e,n)=>{var r=n===1?a:f(_,n,S);return h.syncStepValue(r,n),Hk.createElement(lMn,{points:e,baseLinePoints:r,props:t})}),Hk.createElement(NO,{label:t.label}),t.children)}function dMn(e){var t=(0,hMn.useRef)(void 0),n=(0,hMn.useRef)(void 0);return Hk.createElement(uMn,{props:e,previousPointsRef:t,previousBaseLinePointsRef:n})}function fMn(e){var t=e.hide,n=e.className,r=e.points;if(t)return null;var i=Re(`recharts-radar`,n);return Hk.createElement(eO,{zIndex:e.zIndex},Hk.createElement(vx,{className:i},Hk.createElement(dMn,e)),Hk.createElement(Ajn,{points:r,mainColor:aMn(e.stroke,e.fill),itemDataKey:e.dataKey,activeDot:e.activeDot}))}function pMn(e){var t=JC(),n=OS(n=>Zjn(n,e.radiusAxisId,e.angleAxisId,t,e.id));return(n==null?void 0:n.points)==null?null:Hk.createElement(fMn,Bk({},e,{points:n==null?void 0:n.points,baseLinePoints:n==null?void 0:n.baseLinePoints,isRange:n==null?void 0:n.isRange}))}function mMn(e){var t=uS(e,bMn);return Hk.createElement(wk,{id:t.id,type:`radar`},e=>Hk.createElement(Hk.Fragment,null,Hk.createElement(iAn,{type:`radar`,id:e,data:void 0,dataKey:t.dataKey,hide:t.hide,angleAxisId:t.angleAxisId,radiusAxisId:t.radiusAxisId}),Hk.createElement(lkn,{legendPayload:_Mn(t)}),Hk.createElement(vMn,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,tooltipType:t.tooltipType,id:e}),Hk.createElement(pMn,Bk({},t,{id:e}))))}var Hk,hMn,gMn,_Mn,vMn,yMn,bMn,xMn=o((()=>{Hk=d(p()),hMn=d(p()),VAn(),ze(),Lx(),Vw(),RC(),pDn(),yx(),LO(),tjn(),Njn(),mk(),Qjn(),jS(),YC(),gk(),Tk(),kk(),hx(),Ck(),yk(),Ckn(),_x(),dS(),nO(),sT(),fw(),gMn=[`id`],_Mn=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:aMn(r,i),value:PC(n,t),payload:e}]},vMn=Hk.memo(e=>{var t=e.dataKey,n=e.stroke,r=e.strokeWidth,i=e.fill,a=e.name,o=e.hide,s=e.tooltipType,l=e.id,u={dataDefinedOnItem:void 0,getPosition:Dx,settings:{stroke:n,strokeWidth:r,fill:i,nameKey:void 0,dataKey:t,name:PC(a,t),hide:o,type:s,color:aMn(n,i),unit:``,graphicalItemId:l}};return Hk.createElement(pk,{tooltipEntrySettings:u})}),yMn=(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`removed`?[]:e.status===`matched`?[Vk(Vk({},e.next),{},{x:Tx(e.prev.x,e.next.x,t),y:Tx(e.prev.y,e.next.y,t)})]:[Vk(Vk({},e.next),{},{x:Tx(e.next.cx,e.next.x,t),y:Tx(e.next.cy,e.next.y,t)})]),bMn={activeDot:!0,angleAxisId:0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:_k,animationInterpolateFn:yMn,dot:!1,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`rect`,radiusAxisId:0,zIndex:oT.area},mMn.displayName=`Radar`}));function SMn(e,t){if(e==null)return{};var n,r,i=CMn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r{EMn=d(p()),cdn(),ck(),DMn=[`option`],OMn=sdn}));function AMn(e,t){return FMn(e)||PMn(e,t)||MMn(e,t)||jMn()}function jMn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MMn(e,t){if(e){if(typeof e==`string`)return NMn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?NMn(e,t):void 0}}function NMn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{Tfn(),Lx(),IMn=(e,t,n)=>{var r=n??e;if(!Fx(r))return Px(r,t,0)},LMn=(e,t,n)=>{var r={},i=e.filter(xT),a=e.filter(e=>e.stackId==null),o=i.reduce((e,t)=>{var n=e[t.stackId];return n??(n=[]),n.push(t),e[t.stackId]=n,e},r),s=Object.entries(o).map(e=>{var r,i=AMn(e,2),a=i[0],o=i[1];return{stackId:a,dataKeys:o.map(e=>e.dataKey),barSize:IMn(t,n,(r=o[0])==null?void 0:r.barSize)}}),l=a.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>e!=null),barSize:IMn(t,n,e.barSize)}));return[...s,...l]}}));function zMn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BMn(e){for(var t=1;te+(t.barSize||0),0);p+=(o-1)*s,p>=n&&(p-=(o-1)*s,s=0),p>=n&&f>0&&(d=!0,f*=.9,p=o*f);var m={offset:Math.round((n-p)/2)-s,size:0};l=r.reduce((e,t)=>{var n={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:m.offset+m.size+s,size:d?f:t.barSize??0}},r=[...e,n];return m=n.position,r},u)}else{var h=Px(t,n,0,!0);n-2*h-(o-1)*s<=0&&(s=0);var g=(n-2*h-(o-1)*s)/o;g>1&&(g=Math.round(g));var _=OC(i)?Math.min(g,i):g;l=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:h+o*(g-_)/2+(_+s)*n,size:_}}],u)}return l}}var GMn,KMn=o((()=>{Lx(),AC(),GMn=(e,t,n,r,i,a,o)=>{var s=Fx(o)?t:o,l=WMn(n,r,i===a?a:i,e,s);return i!==a&&l!=null&&(l=l.map(e=>BMn(BMn({},e),{},{position:BMn(BMn({},e.position),{},{offset:e.position.offset-i/2})}))),l}})),qMn,JMn=o((()=>{Sfn(),qMn=(e,t)=>{var n=xfn(t);if(e&&n!=null&&t!=null){var r=t.stackId;if(r!=null){var i=e[r];if(i){var a=i.stackedData;if(a)return a.find(e=>e.key===n)}}}}})),YMn,XMn=o((()=>{YMn=(e,t)=>{if(e!=null&&t!=null){var n=e.find(e=>e.stackId===t.stackId&&t.dataKey!=null&&e.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}}));function ZMn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QMn(e){for(var t=1;t{NS(),tPn(),qw(),ZO(),ND(),vT(),fw(),RC(),aT(),KO(),Lx(),wfn(),Tfn(),RMn(),KMn(),JMn(),XMn(),nNn=(e,t)=>hT(e,t),rNn=(e,t)=>YO(e,`radiusAxis`,t),Uk=MS([nNn,rNn],(e,t)=>{if(e!=null&&t!=null)return QMn(QMn({},e),{},{scale:t})}),iNn=(e,t)=>kDn(e,`radiusAxis`,t,!1),aNn=(e,t,n)=>mT(e,n),oNn=(e,t,n)=>YO(e,`angleAxis`,n),Wk=MS([aNn,oNn],(e,t)=>{if(e!=null&&t!=null)return QMn(QMn({},e),{},{scale:t})}),sNn=(e,t,n)=>XO(e,`angleAxis`,n,!1),cNn=(e,t,n,r)=>r,lNn=MS([UO,cNn],(e,t)=>{if(e.some(e=>e.type===`radialBar`&&t.dataKey===e.dataKey&&t.stackId===e.stackId))return t}),uNn=MS([ow,Uk,iNn,Wk,sNn],(e,t,n,r,i)=>FC(e,`radiusAxis`)?LC(t,n,!1):LC(r,i,!1)),dNn=MS([Wk,Uk,ow],(e,t,n)=>{var r=n===`radial`?e:t;if(r!=null&&r.scale!=null)return San({numericAxis:r})}),fNn=(e,t,n,r,i)=>i,pNn=(e,t,n,r,i)=>n,mNn=(e,t,n,r,i)=>t,hNn=(e,t,n,r,i)=>r.maxBarSize,gNn=e=>e.type===`radialBar`,_Nn=MS([ow,UO,pNn,mNn],(e,t,n,r)=>t.filter(t=>e===`centric`?t.angleAxisId===n:t.radiusAxisId===r).filter(e=>e.hide===!1).filter(gNn)),vNn=()=>void 0,yNn=MS([_Nn,Zdn,vNn],LMn),bNn=MS([ow,Qw,Wk,sNn,Uk,iNn,hNn],(e,t,n,r,i,a,o)=>{var s=Fx(o)?t:o;return e===`centric`?LC(n,r,!0)??s??0:LC(i,a,!0)??s??0}),xNn=MS([yNn,Qw,Xdn,$w,bNn,uNn,hNn],GMn),SNn=MS([xNn,lNn],YMn),CNn=MS([WO],e=>e.filter(gNn).filter(xT)),wNn=MS([CNn,Gw,mD],Cfn),TNn=MS([wNn,CNn,eT,tT],gD),ENn=(e,t,n)=>ow(e)===`centric`?TNn(e,`radiusAxis`,t):TNn(e,`angleAxis`,n),DNn=MS([ENn,lNn],qMn),ONn=MS([Wk,sNn,Uk,iNn,Ww,lNn,uNn,ow,dNn,_T,fNn,SNn,DNn],(e,t,n,r,i,a,o,s,l,u,d,f,p)=>{var m=i.chartData,h=i.dataStartIndex,g=i.dataEndIndex;if(a==null||n==null||e==null||m==null||o==null||f==null||s!==`centric`&&s!==`radial`||r==null||u==null)return[];var _=a.dataKey,v=a.minPointSize,y=u.cx,b=u.cy,x=u.startAngle,S=u.endAngle;return GNn({angleAxis:e,angleAxisTicks:t,bandSize:o,baseValue:l,cells:d,cx:y,cy:b,dataKey:_,dataStartIndex:h,displayedData:m.slice(h,g+1),endAngle:S,layout:s,minPointSize:v,pos:f,radiusAxis:n,radiusAxisTicks:r,stackedData:p,stackedDomain:p?(s===`centric`?n:e).scale.domain():null,startAngle:x})}),kNn=MS([Gw,(e,t)=>t],(e,t)=>{var n=e.chartData,r=e.dataStartIndex,i=e.dataEndIndex;if(n==null)return[];var a=n.slice(r,i+1);return a.length===0?[]:a.map(e=>({type:t,value:e.name,color:e.fill,payload:e}))})}));function jNn(e,t){return e&&typeof e==`object`&&`zIndex`in e&&typeof e.zIndex==`number`&&OC(e.zIndex)?e.zIndex:t}var MNn=o((()=>{AC()}));function Gk(){return Gk=Object.assign?Object.assign.bind():function(e){for(var t=1;t({value:e.value,payload:e.payload,parentViewBox:void 0,clockWise:!1,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill}));return qk.createElement(rDn,{value:t?i:void 0},r)}function BNn(e){var t=e.sectors,n=e.allOtherRadialBarProps,r=e.showLabels,i=e.animationElapsedTime,a=e.isAnimating,o=e.isEntrance,s=n.shape,l=n.activeShape,u=n.cornerRadius,d=n.id,f=LNn(n,JNn),p=px(f),m=OS(JD),h=n.onMouseEnter,g=n.onClick,_=n.onMouseLeave,v=LNn(n,YNn),y=lk(h,n.dataKey,d),b=uk(_),x=dk(g,n.dataKey,d);return t==null?null:qk.createElement(zNn,{showLabels:r,sectors:t},t.map((e,t)=>{var n=!!(l&&m===String(t)),r=y(e,t),d=b(e,t),h=x(e,t),g=Kk(Kk(Kk(Kk({},p),{},{cornerRadius:wMn(u)},e),cS(v,e,t)),{},{onMouseEnter:r,onMouseLeave:d,onClick:h,className:`recharts-radial-bar-sector ${e.className}`,forceCornerRadius:f.forceCornerRadius,cornerIsExternal:f.cornerIsExternal,animationElapsedTime:i,isAnimating:a,isEntrance:o,isActive:n,option:n&&l!=null?l:s,index:t});return n?qk.createElement(eO,{zIndex:oT.activeBar,key:`sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}`},qk.createElement(TMn,g)):qk.createElement(TMn,Gk({key:`sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}`},g))}),qk.createElement(NO,{label:n.label}),n.children)}function VNn(e){var t=e.props,n=e.previousSectorsRef,r=t.sectors,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,l=t.onAnimationStart,u=t.onAnimationEnd,d=xk(l,u),f=d.isAnimating,p=d.handleAnimationStart,m=d.handleAnimationEnd,h=uw();return h==null?null:qk.createElement(Sk,{animationInput:t,animationIdPrefix:`recharts-radialbar-`,items:r,previousItemsRef:n,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s,onAnimationStart:p,onAnimationEnd:m,animationInterpolateFn:t.animationInterpolateFn,animationMatchBy:t.animationMatchBy,layout:h},(e,n,r)=>qk.createElement(BNn,{sectors:e,allOtherRadialBarProps:t,showLabels:!f,animationElapsedTime:n,isAnimating:f||n<1,isEntrance:r}))}function HNn(e){var t=(0,qNn.useRef)(null);return qk.createElement(VNn,{props:e,previousSectorsRef:t})}function UNn(e){var t=OS(t=>kNn(t,e.legendType));return qk.createElement(lkn,{legendPayload:t??[]})}function WNn(e){var t=qk.useMemo(()=>ik(e.children,hO),[e.children]),n=qk.useMemo(()=>({data:void 0,hide:!1,id:e.id,dataKey:e.dataKey,minPointSize:e.minPointSize,stackId:fan(e.stackId),maxBarSize:e.maxBarSize,barSize:e.barSize,type:`radialBar`,angleAxisId:e.angleAxisId,radiusAxisId:e.radiusAxisId}),[e.id,e.dataKey,e.minPointSize,e.stackId,e.maxBarSize,e.barSize,e.angleAxisId,e.radiusAxisId]),r=OS(r=>ONn(r,e.radiusAxisId,e.angleAxisId,n,t))??ZNn;return qk.createElement(qk.Fragment,null,qk.createElement($Nn,{dataKey:e.dataKey,sectors:r,stroke:e.stroke,strokeWidth:e.strokeWidth,name:e.name,hide:e.hide,fill:e.fill,tooltipType:e.tooltipType,formatter:e.formatter,id:e.id}),qk.createElement(ePn,Gk({},e,{sectors:r})))}function GNn(e){var t=e.displayedData,n=e.stackedData,r=e.dataStartIndex,i=e.stackedDomain,a=e.dataKey,o=e.baseValue,s=e.layout,l=e.radiusAxis,u=e.radiusAxisTicks,d=e.bandSize,f=e.pos,p=e.angleAxis,m=e.minPointSize,h=e.cx,g=e.cy,_=e.angleAxisTicks,v=e.cells,y=e.startAngle,b=e.endAngle;return _==null||u==null?ZNn:(t??[]).map((e,t)=>{var x,S,C,w,T,E;if(n?x=_an(n[r+t],i):(x=MC(e,a),Array.isArray(x)||(x=[o,x])),s===`radial`){if(w=p.scale.map(x[0])??y,T=p.scale.map(x[1])??b,S=IC({axis:l,ticks:u,bandSize:d,offset:f.offset,entry:e,index:t}),S!=null&&T!=null&&w!=null){C=S+f.size;var D=T-w;if(Math.abs(m)>0&&Math.abs(D)0&&Math.abs(k)qk.createElement(qk.Fragment,null,qk.createElement(iAn,{type:`radialBar`,id:e,data:void 0,dataKey:t.dataKey,hide:t.hide??Jk.hide,angleAxisId:t.angleAxisId??Jk.angleAxisId,radiusAxisId:t.radiusAxisId??Jk.radiusAxisId,stackId:fan(t.stackId),barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize}),qk.createElement(UNn,t),qk.createElement(WNn,Gk({},t,{id:e}))))}var qk,qNn,JNn,YNn,XNn,ZNn,QNn,$Nn,ePn,Jk,tPn=o((()=>{qk=d(p()),qNn=d(p()),ze(),kMn(),yx(),ak(),LO(),gO(),Lx(),RC(),lS(),fk(),mk(),ANn(),jS(),YD(),gk(),Ck(),yk(),Tk(),kk(),hx(),dS(),nO(),sT(),MNn(),fw(),JNn=[`shape`,`activeShape`,`cornerRadius`,`id`],YNn=[`onMouseEnter`,`onClick`,`onMouseLeave`],XNn=[`value`,`background`],ZNn=[],QNn=(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`removed`?[]:e.status===`matched`?[Kk(Kk({},e.next),{},{startAngle:Tx(e.prev.startAngle,e.next.startAngle,t),endAngle:Tx(e.prev.endAngle,e.next.endAngle,t)})]:[Kk(Kk({},e.next),{},{endAngle:Tx(e.next.startAngle,e.next.endAngle,t)})]),$Nn=qk.memo(e=>{var t=e.dataKey,n=e.sectors,r=e.stroke,i=e.strokeWidth,a=e.name,o=e.hide,s=e.fill,l=e.tooltipType,u=e.formatter,d={dataDefinedOnItem:n,getPosition:Dx,settings:{graphicalItemId:e.id,stroke:r,strokeWidth:i,fill:s,nameKey:void 0,dataKey:t,name:PC(a,t),hide:o,type:l,color:s,unit:``,formatter:u}};return qk.createElement(pk,{tooltipEntrySettings:d})}),ePn=class extends qNn.PureComponent{renderBackground(e){if(e==null)return null;var t=this.props.cornerRadius,n=mx(this.props.background);return qk.createElement(eO,{zIndex:jNn(this.props.background,oT.barBackground)},e.map((e,r)=>{e.value;var i=e.background,a=LNn(e,XNn);if(!i)return null;var o=Kk(Kk(Kk(Kk(Kk({cornerRadius:wMn(t)},a),{},{fill:`#eee`},i),n),cS(this.props,e,r)),{},{index:r,className:Re(`recharts-radial-bar-background-sector`,String(n==null?void 0:n.className)),option:i,isActive:!1});return qk.createElement(TMn,Gk({key:`background-${a.cx}-${a.cy}-${a.innerRadius}-${a.outerRadius}-${a.startAngle}-${a.endAngle}-${r}`},o))}))}render(){var e=this.props,t=e.hide,n=e.sectors,r=e.className,i=e.background;if(t)return null;var a=Re(`recharts-area`,r);return qk.createElement(eO,{zIndex:this.props.zIndex},qk.createElement(vx,{className:a},i&&qk.createElement(vx,{className:`recharts-radial-bar-background`},this.renderBackground(n)),qk.createElement(vx,{className:`recharts-radial-bar-sectors`},qk.createElement(HNn,this.props))))}},Jk={angleAxisId:0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:vk,animationInterpolateFn:QNn,background:!1,cornerIsExternal:!1,cornerRadius:0,forceCornerRadius:!1,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`rect`,minPointSize:0,radiusAxisId:0,shape:OMn,zIndex:oT.bar},KNn.displayName=`RadialBar`})),nPn,rPn,iPn=o((()=>{nPn=d(p()),dO(),jS(),YC(),rPn=e=>{var t=e.chartData,n=kS(),r=JC();return(0,nPn.useEffect)(()=>r?()=>{}:(n(Nwn(t)),()=>{n(Nwn(void 0))}),[t,n,r]),null}})),aPn,oPn,sPn,cPn=o((()=>{EC(),aPn={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},oPn=gC({name:`brush`,initialState:aPn,reducers:{setBrushSettings(e,t){return t.payload==null?aPn:t.payload}}}),oPn.actions.setBrushSettings,sPn=oPn.reducer}));function lPn(e){return(e%180+180)%180}var uPn,dPn=o((()=>{uPn=function(e){var t=e.width,n=e.height,r=lPn(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)*Math.PI/180,i=Math.atan(n/t),a=r>i&&r{EC(),dC(),fPn={dots:[],areas:[],lines:[]},pPn=gC({name:`referenceElements`,initialState:fPn,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=HS(e).dots.findIndex(e=>e===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=HS(e).areas.findIndex(e=>e===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(uC(t.payload))},removeLine:(e,t)=>{var n=HS(e).lines.findIndex(e=>e===t.payload);n!==-1&&e.lines.splice(n,1)}}}),Yk=pPn.actions,Yk.addDot,Yk.removeDot,Yk.addArea,Yk.removeArea,Yk.addLine,Yk.removeLine,mPn=pPn.reducer}));function gPn(e,t){return xPn(e)||bPn(e,t)||vPn(e,t)||_Pn()}function _Pn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vPn(e,t){if(e){if(typeof e==`string`)return yPn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yPn(e,t):void 0}}function yPn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{Xk=d(p()),SPn=d(p()),Lx(),Rk(),CPn=(0,SPn.createContext)(void 0),wPn=e=>{var t=e.children,n=gPn((0,SPn.useState)(`${Nx(`recharts`)}-clip`),1)[0],r=Lk();if(r==null)return null;var i=r.x,a=r.y,o=r.width,s=r.height;return Xk.createElement(CPn.Provider,{value:n},Xk.createElement(`defs`,null,Xk.createElement(`clipPath`,{id:n},Xk.createElement(`rect`,{x:i,y:a,height:s,width:o}))),t)}}));function EPn(){}var DPn=o((()=>{}));function OPn(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:Object.prototype.toString.call(e)===`[object Object]`}var kPn=o((()=>{}));function APn(e,t,n){return Zk(e,t,void 0,void 0,void 0,void 0,n)}function Zk(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return Qk(e,t,a,o)}return Qk(e,t,a,o)}function Qk(e,t,n,r){if(Object.is(e,t))return!0;let i=vS(e),a=vS(t);if(i===`[object Arguments]`&&(i=CS),a===`[object Arguments]`&&(a=CS),i!==a)return!1;switch(i){case bS:return e.toString()===t.toString();case xS:return otn(e.valueOf(),t.valueOf());case SS:case Nen:case Men:return Object.is(e.valueOf(),t.valueOf());case Aen:return e.source===t.source&&e.flags===t.flags;case Len:return e===t}n=n??new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case Pen:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!Zk(a,t.get(i),i,e,t,n,r))return!1;return!0;case Fen:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;oZk(s,i,void 0,e,t,n,r));if(l===-1)return!1;a.splice(l,1)}return!0}case Ien:case Ven:case Hen:case Uen:case Wen:case Gen:case Ken:case qen:case Jen:case Yen:case Xen:case Zen:if(wS(e)!==wS(t)||e.length!==t.length)return!1;for(let i=0;i{ken(),yS(),Qen(),TS(),kPn(),stn()}));function MPn(e,t){return APn(e,t,EPn)}var NPn=o((()=>{DPn(),jPn()})),PPn=o((()=>{NPn()}));function FPn(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r{}));function LPn(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return uPn(r,n)}function RPn(e,t,n){var r=n===`width`,i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function $k(e,t,n,r,i){if(e*te*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function zPn(e,t){return FPn(e,t+1)}var BPn=o((()=>{dPn(),IPn()}));function VPn(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,u=1,d=o,f=function(){var t=r==null?void 0:r[l];if(t===void 0)return{v:FPn(r,u)};var a=l,f,p=()=>(f===void 0&&(f=n(t,a)),f),m=t.coordinate,h=l===0||$k(e,m,p,d,s);h||(l=0,d=o,u+=1),h&&(d=m+e*(p()/2+i),l+=u)},p;u<=a.length;)if(p=f(),p)return p.v;return[]}function HPn(e,t,n,r,i){var a=(r||[]).slice().length;if(a===0)return[];for(var o=t.start,s=t.end,l=1;l<=a;l++){for(var u=(a-1)%l,d=o,f=!0,p=function(){var t=r[h];if(t==null)return 0;var a=h,o,l=()=>(o===void 0&&(o=n(t,a)),o),p=t.coordinate,m=h===u||$k(e,p,l,d,s);if(!m)return f=!1,1;m&&(d=p+e*(l()/2+i))},m,h=u;h{BPn(),IPn()}));function WPn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eA(e){for(var t=1;t(d===void 0&&(d=n(r,t)),d);if(t===o-1){var p=e*(u.coordinate+e*f()/2-l);a[t]=u=eA(eA({},u),{},{tickCoord:p>0?u.coordinate-p*e:u.coordinate})}else a[t]=u=eA(eA({},u),{},{tickCoord:u.coordinate});u.tickCoord!=null&&$k(e,u.tickCoord,f,s,l)&&(l=u.tickCoord-e*(f()/2+i),a[t]=eA(eA({},u),{},{isShow:!0}))},d=o-1;d>=0;d--)if(u(d))continue;return a}function YPn(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var d=r[s-1];if(d!=null){var f=n(d,s-1),p=e*(d.coordinate+e*f/2-u);o[s-1]=d=eA(eA({},d),{},{tickCoord:p>0?d.coordinate-p*e:d.coordinate}),d.tickCoord!=null&&$k(e,d.tickCoord,()=>f,l,u)&&(u=d.tickCoord-e*(f/2+i),o[s-1]=eA(eA({},d),{},{isShow:!0}))}}for(var m=a?s-1:s,h=function(t){var r=o[t];if(r==null)return 1;var a=r,s,d=()=>(s===void 0&&(s=n(r,t)),s);if(t===0){var f=e*(a.coordinate-e*d()/2-l);o[t]=a=eA(eA({},a),{},{tickCoord:f<0?a.coordinate-f*e:a.coordinate})}else o[t]=a=eA(eA({},a),{},{tickCoord:a.coordinate});a.tickCoord!=null&&$k(e,a.tickCoord,d,l,u)&&(l=a.tickCoord+e*(d()/2+i),o[t]=eA(eA({},a),{},{isShow:!0}))},g=0;g{var i=typeof u==`function`?u(e.value,r):e.value;return m===`width`?LPn(_O(i,{fontSize:t,letterSpacing:n}),h,f):_O(i,{fontSize:t,letterSpacing:n})[m]},_=i[0],v=i[1],y=i.length>=2&&_!=null&&v!=null?Ox(v.coordinate-_.coordinate):1,b=RPn(a,y,m);return l===`equidistantPreserveStart`?VPn(y,b,g,i,o):l===`equidistantPreserveEnd`?HPn(y,b,g,i,o):(p=l===`preserveStart`||l===`preserveStartEnd`?YPn(y,b,g,i,o,l===`preserveStartEnd`):JPn(y,b,g,i,o),p.filter(e=>e.isShow))}var ZPn=o((()=>{Lx(),kTn(),ww(),BPn(),UPn()})),QPn,$Pn=o((()=>{QPn=e=>{var t=e.ticks,n=e.label,r=e.labelGapWithTick,i=r===void 0?5:r,a=e.tickSize,o=a===void 0?0:a,s=e.tickMargin,l=s===void 0?0:s,u=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>u&&(u=t.width)}});var d=n?n.getBoundingClientRect().width:0,f=o+l,p=u+f+d+(n?i:0);return Math.round(p)}return 0}})),eFn,tFn=o((()=>{eFn=e=>{var t=e.ticks,n=e.label,r=e.labelGapWithTick,i=r===void 0?5:r,a=e.tickSize,o=a===void 0?0:a,s=e.tickMargin,l=s===void 0?0:s,u=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.height>u&&(u=t.height)}});var d=n?n.getBoundingClientRect().height:0,f=o+l,p=u+f+d+(n?i:0);return Math.round(p)}return 0}})),nFn,rFn,iFn,aFn,oFn,sFn,cFn=o((()=>{EC(),dC(),nFn={xAxis:{},yAxis:{}},rFn=gC({name:`renderedTicks`,initialState:nFn,reducers:{setRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,i=n.axisId,a=n.ticks;e[r][i]=uC(a)},removeRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,i=n.axisId;delete e[r][i]}}}),iFn=rFn.actions,aFn=iFn.setRenderedTicks,oFn=iFn.removeRenderedTicks,sFn=rFn.reducer}));function lFn(e,t){return mFn(e)||pFn(e,t)||dFn(e,t)||uFn()}function uFn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dFn(e,t){if(e){if(typeof e==`string`)return fFn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fFn(e,t):void 0}}function fFn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{if(r!=null&&n!=null){var e=t.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index})),o=a.current;o!=null&&o.axisId===r&&o.axisType===n&&MPn(o.ticks,e)||(a.current={ticks:e,axisId:r,axisType:n},i(aFn({ticks:e,axisId:r,axisType:n})))}},[i,t,r,n]),(0,iA.useEffect)(()=>r==null||n==null?Dx:()=>{i(oFn({axisId:r,axisType:n}))},[i,r,n]),null}var rA,iA,DFn,aA,OFn,kFn,AFn,jFn=o((()=>{rA=d(p()),iA=d(p()),xx(),PPn(),ze(),yx(),SO(),AO(),Lx(),lS(),ZPn(),hx(),$Pn(),tFn(),dS(),nO(),sT(),aOn(),cFn(),jS(),DFn=[`axisLine`,`width`,`height`,`className`,`hide`,`ticks`,`axisType`,`axisId`],aA={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:`bottom`,ticks:[],stroke:`#666`,tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:`preserveEnd`,zIndex:oT.axis},OFn=(0,iA.forwardRef)((e,t)=>{var n=e.ticks,r=n===void 0?[]:n,i=e.tick,a=e.tickLine,o=e.stroke,s=e.tickFormatter,l=e.unit,u=e.padding,d=e.tickTextProps,f=e.orientation,p=e.mirror,m=e.x,h=e.y,g=e.width,_=e.height,v=e.tickSize,y=e.tickMargin,b=e.fontSize,x=e.letterSpacing,S=e.getTicksConfig,C=e.events,w=e.axisType,T=e.axisId,E=XPn(nA(nA({},S),{},{ticks:r}),b,x),D=px(S),O=mx(i),k=lEn(D.textAnchor)?D.textAnchor:CFn(f,p),A=wFn(f,p),j={};typeof a==`object`&&(j=a);var M=nA(nA({},D),{},{fill:`none`},j),N=E.map(e=>nA({entry:e},SFn(e,m,h,g,_,f,v,p,y))),P=N.map(e=>{var t=e.entry,n=e.line;return rA.createElement(vx,{className:`recharts-cartesian-axis-tick`,key:`tick-${t.value}-${t.coordinate}-${t.tickCoord}`},a&&rA.createElement(`line`,tA({},M,n,{className:Re(`recharts-cartesian-axis-tick-line`,bx(a,`className`))})))}),F=N.map((e,t)=>{var n=e.entry,r=e.tick,a=nA(nA({},nA(nA(nA(nA({verticalAnchor:A},D),{},{textAnchor:k,stroke:`none`,fill:o},r),{},{index:t,payload:n,visibleTicksCount:E.length,tickFormatter:s,padding:u},d),{},{angle:(d==null?void 0:d.angle)??D.angle??0})),O);return rA.createElement(vx,tA({className:`recharts-cartesian-axis-tick-label`,key:`tick-label-${n.value}-${n.coordinate}-${n.tickCoord}`},cS(C,n,t)),i&&rA.createElement(TFn,{option:i,tickProps:a,value:`${typeof s==`function`?s(n.value,t):n.value}${l||``}`}))});return rA.createElement(`g`,{className:`recharts-cartesian-axis-ticks recharts-${w}-ticks`},rA.createElement(EFn,{ticks:E,axisId:T,axisType:w}),F.length>0&&rA.createElement(eO,{zIndex:oT.label},rA.createElement(`g`,{className:`recharts-cartesian-axis-tick-labels recharts-${w}-tick-labels`,ref:t},F)),P.length>0&&rA.createElement(`g`,{className:`recharts-cartesian-axis-tick-lines recharts-${w}-tick-lines`},P))}),kFn=(0,iA.forwardRef)((e,t)=>{var n=e.axisLine,r=e.width,i=e.height,a=e.className,o=e.hide,s=e.ticks,l=e.axisType,u=e.axisId,d=hFn(e,DFn),f=lFn((0,iA.useState)(``),2),p=f[0],m=f[1],h=lFn((0,iA.useState)(``),2),g=h[0],_=h[1],v=(0,iA.useRef)(null);(0,iA.useImperativeHandle)(t,()=>({getCalculatedWidth:()=>{var t;return QPn({ticks:v.current,label:(t=e.labelRef)==null?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})},getCalculatedHeight:()=>{var t;return eFn({ticks:v.current,label:(t=e.labelRef)==null?void 0:t.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var y=(0,iA.useCallback)(e=>{if(e){var t=e.getElementsByClassName(`recharts-cartesian-axis-tick-value`);v.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),i=r.fontSize,a=r.letterSpacing;(i!==p||a!==g)&&(m(i),_(a))}}},[p,g]);return o||r!=null&&r<=0||i!=null&&i<=0?null:rA.createElement(eO,{zIndex:e.zIndex},rA.createElement(vx,{className:Re(`recharts-cartesian-axis`,a)},rA.createElement(xFn,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:px(e)}),rA.createElement(OFn,{ref:y,axisType:l,events:d,fontSize:p,getTicksConfig:e,height:e.height,letterSpacing:g,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:u}),rA.createElement(LEn,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},rA.createElement(NEn,{label:e.label,labelRef:e.labelRef}),e.children)))}),AFn=rA.forwardRef((e,t)=>{var n=uS(e,aA);return rA.createElement(kFn,tA({},n,{ref:t}))}),AFn.displayName=`CartesianAxis`})),MFn,NFn=o((()=>{MFn={grid:{stroke:`#ccc`,fill:`none`}}})),PFn,FFn,IFn,LFn=o((()=>{PFn=d(p()),NFn(),FFn=(0,PFn.createContext)(MFn),FFn.Provider,IFn=()=>(0,PFn.useContext)(FFn)}));function RFn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oA(e){for(var t=1;t{var a=oA(oA({},o),{},{x1:t,y1:e,x2:t+n,y2:e,key:`line-${r}`,index:r});return lA.createElement(WFn,{key:`line-${r}`,option:i,lineItemProps:a})});return lA.createElement(`g`,{className:`recharts-cartesian-grid-horizontal`},s)}function KFn(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0||r,a=e.verticalPoints;if(!i||!a||!a.length)return null;e.xAxisId,e.yAxisId;var o=HFn(e,QFn),s=a.map((e,r)=>{var a=oA(oA({},o),{},{x1:e,y1:t,x2:e,y2:t+n,key:`line-${r}`,index:r});return lA.createElement(WFn,{option:i,lineItemProps:a,key:`line-${r}`})});return lA.createElement(`g`,{className:`recharts-cartesian-grid-vertical`},s)}function qFn(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal;if(!(l===void 0||l)||!t||!t.length||s==null)return null;var u=s.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==u[0]&&u.unshift(0);var d=u.map((e,s)=>{var l=u[s+1],d=l==null?i+o-e:l-e;if(d<=0)return null;var f=s%t.length;return lA.createElement(`rect`,{key:`react-${s}`,y:e,x:r,height:d,width:a,stroke:`none`,fill:t[f],fillOpacity:n,className:`recharts-cartesian-grid-bg`})});return lA.createElement(`g`,{className:`recharts-cartesian-gridstripes-horizontal`},d)}function JFn(e){var t=e.vertical,n=t===void 0||t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(e=>Math.round(e+a-a)).sort((e,t)=>e-t);a!==d[0]&&d.unshift(0);var f=d.map((e,t)=>{var n=d[t+1],u=n==null?a+s-e:n-e;if(u<=0)return null;var f=t%r.length;return lA.createElement(`rect`,{key:`react-${t}`,x:e,y:o,width:u,height:l,stroke:`none`,fill:r[f],fillOpacity:i,className:`recharts-cartesian-grid-bg`})});return lA.createElement(`g`,{className:`recharts-cartesian-gridstripes-vertical`},f)}function cA(e){var t=iw(),n=aw(),r=Pon(),i=oA(oA({},uS(e,nIn)),{},{x:jx(e.x)?e.x:r.left,y:jx(e.y)?e.y:r.top,width:jx(e.width)?e.width:r.width,height:jx(e.height)?e.height:r.height}),a=i.xAxisId,o=i.yAxisId,s=i.x,l=i.y,u=i.width,d=i.height,f=i.syncWithTicks,p=i.horizontalValues,m=i.verticalValues,h=JC(),g=OS(e=>lxn(e,`xAxis`,a,h)),_=OS(e=>lxn(e,`yAxis`,o,h)),v=IFn(),y={stroke:i.stroke??v.grid.stroke,strokeWidth:i.strokeWidth??v.grid.strokeWidth,strokeOpacity:i.strokeOpacity??v.grid.strokeOpacity,strokeDasharray:i.strokeDasharray??v.grid.strokeDasharray};if(!kC(u)||!kC(d)||!jx(s)||!jx(l))return null;var b=i.verticalCoordinatesGenerator||eIn,x=i.horizontalCoordinatesGenerator||tIn,S=i.horizontalPoints,C=i.verticalPoints;if((!S||!S.length)&&typeof x==`function`){var w=p&&p.length,T=x({yAxis:_?oA(oA({},_),{},{ticks:w?p:_.ticks}):void 0,width:t??u,height:n??d,offset:r},w?!0:f);QC(Array.isArray(T),`horizontalCoordinatesGenerator should return Array but instead it returned [${typeof T}]`),Array.isArray(T)&&(S=T)}if((!C||!C.length)&&typeof b==`function`){var E=m&&m.length,D=b({xAxis:g?oA(oA({},g),{},{ticks:E?m:g.ticks}):void 0,width:t??u,height:n??d,offset:r},E?!0:f);QC(Array.isArray(D),`verticalCoordinatesGenerator should return Array but instead it returned [${typeof D}]`),Array.isArray(D)&&(C=D)}return lA.createElement(eO,{zIndex:i.zIndex},lA.createElement(`g`,{className:`recharts-cartesian-grid`},lA.createElement($Fn,{fill:i.fill??v.grid.fill,fillOpacity:i.fillOpacity??v.grid.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),lA.createElement(qFn,sA({},i,{horizontalPoints:S})),lA.createElement(JFn,sA({},i,{verticalPoints:C})),lA.createElement(GFn,sA({},i,y,{offset:r,horizontalPoints:S,xAxis:g,yAxis:_})),lA.createElement(KFn,sA({},i,y,{offset:r,verticalPoints:C,xAxis:g,yAxis:_}))))}var lA,YFn,XFn,ZFn,QFn,$Fn,eIn,tIn,nIn,rIn=o((()=>{lA=d(p()),non(),Lx(),RC(),ZPn(),jFn(),fw(),ND(),jS(),YC(),dS(),hx(),AC(),nO(),sT(),LFn(),YFn=[`x1`,`y1`,`x2`,`y2`,`key`],XFn=[`offset`],ZFn=[`xAxisId`,`yAxisId`],QFn=[`xAxisId`,`yAxisId`],$Fn=e=>{var t=e.fill;if(!t||t===`none`)return null;var n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.ry;return lA.createElement(`rect`,{x:r,y:i,ry:s,width:a,height:o,stroke:`none`,fill:t,fillOpacity:n,className:`recharts-cartesian-grid-bg`})},eIn=(e,t)=>{var n=e.xAxis,r=e.width,i=e.height,a=e.offset;return han(XPn(oA(oA(oA({},aA),n),{},{ticks:gan(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},tIn=(e,t)=>{var n=e.yAxis,r=e.width,i=e.height,a=e.offset;return han(XPn(oA(oA(oA({},aA),n),{},{ticks:gan(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},nIn={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:oT.grid},cA.displayName=`CartesianGrid`}));function iIn(){return iIn=Object.assign?Object.assign.bind():function(e){for(var t=1;te+t,0);if(!i)return cIn(t,e);for(var a=Math.floor(e/i),o=e%i,s=[],l=0,u=0;lo){s=[...r.slice(0,l),o-u];break}}var p=s.length%2==0?[0,t]:[t];return[...uIn(r,a),...s,...p].map(e=>`${e}px`).join(`, `)}function fIn(e,t,n){return e?dIn(n,t,`${e}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):cIn(t,n)}function pIn(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,r=e.connectNulls,i=aIn(e,hIn),a=r??!1,o;if(t!=null){var s=i.pathRef;o=fIn(n,sIn((s==null?void 0:s.current)??null),t)}else n!=null&&(o=String(n));return mIn.createElement(Aw,iIn({},i,{connectNulls:a,strokeDasharray:o}))}var mIn,hIn,gIn=o((()=>{mIn=d(p()),jw(),hIn=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`visibleLength`,`strokeDasharray`,`connectNulls`]}));function _In(e){var t=(0,uA.useRef)(0),n=(0,uA.useRef)(0),r=(0,uA.useRef)(!1),i=(0,uA.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,uA.useCallback)((e,i)=>{if(r.current)return null;var a=Math.min(Sx(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,a),a>=i)?(r.current=!0,null):a},[])}var uA,vIn=o((()=>{uA=d(p()),wx()})),yIn,bIn,xIn,SIn=o((()=>{EC(),yIn=gC({name:`errorBars`,initialState:{},reducers:{addErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.errorBar;e[r]||(e[r]=[]),e[r].push(i)},replaceErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.prev,a=n.next;e[r]&&(e[r]=e[r].map(e=>e.dataKey===i.dataKey&&e.direction===i.direction?a:e))},removeErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.errorBar;e[r]&&(e[r]=e[r].filter(e=>e.dataKey!==i.dataKey||e.direction!==i.direction))}}}),bIn=yIn.actions,bIn.addErrorBar,bIn.replaceErrorBar,bIn.removeErrorBar,xIn=yIn.reducer}));function CIn(e,t){if(e==null)return{};var n,r,i=wIn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r{EIn=d(p()),DIn=d(p()),OIn=[`children`],kIn=(0,DIn.createContext)({data:[],xAxisId:`xAxis-0`,yAxisId:`yAxis-0`,dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0})}));function dA(e,t){var n=OS(t=>tD(t,e)),r=OS(e=>rD(e,t)),i=(n==null?void 0:n.allowDataOverflow)??eD.allowDataOverflow,a=(r==null?void 0:r.allowDataOverflow)??nD.allowDataOverflow;return{needClip:i||a,needClipX:i,needClipY:a}}function jIn(e){var t=e.xAxisId,n=e.yAxisId,r=e.clipPathId,i=Lk(),a=dA(t,n),o=a.needClipX,s=a.needClipY,l=a.needClip,u=OS(e=>Ubn(e,t,!1)),d=OS(e=>Wbn(e,n,!1));if(!l||!i)return null;var f=i.x,p=i.y,m=i.width,h=i.height,g=o&&u?Math.min(u[0],u[1]):f-m/2,_=s&&d?Math.min(d[0],d[1]):p-h/2,v=o&&u?Math.abs(u[1]-u[0]):m*2,y=s&&d?Math.abs(d[1]-d[0]):h*2;return MIn.createElement(`clipPath`,{id:`clipPath-${r}`},MIn.createElement(`rect`,{x:g,y:_,width:v,height:y}))}var MIn,NIn=o((()=>{MIn=d(p()),jS(),ND(),Rk()}));function PIn(e){return e.type===`line`}var FIn,IIn,LIn,RIn,zIn,BIn,VIn,HIn,UIn=o((()=>{NS(),yLn(),qw(),fw(),ND(),RC(),FIn=(e,t,n,r)=>MD(e,`xAxis`,t,r),IIn=(e,t,n,r)=>jD(e,`xAxis`,t,r),LIn=(e,t,n,r)=>MD(e,`yAxis`,n,r),RIn=(e,t,n,r)=>jD(e,`yAxis`,n,r),zIn=MS([ow,FIn,LIn,IIn,RIn],(e,t,n,r,i)=>FC(e,`xAxis`)?LC(t,r,!1):LC(n,i,!1)),BIn=(e,t,n,r,i)=>i,VIn=MS([sD,BIn],(e,t)=>e.filter(PIn).find(e=>e.id===t)),HIn=MS([ow,FIn,LIn,IIn,RIn,VIn,zIn,Kw],(e,t,n,r,i,a,o,s)=>{var l=s.chartData,u=s.dataStartIndex,d=s.dataEndIndex;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var f=a.dataKey,p=a.data,m=p!=null&&p.length>0?p:l==null?void 0:l.slice(u,d+1);if(m!=null)return sLn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:f,bandSize:o,displayedData:m})}})}));function WIn(e){var t=mx(e),n=3,r=2;if(t!=null){var i=t.r,a=t.strokeWidth,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(s)||s<0)&&(s=r),{r:o,strokeWidth:s}}return{r:n,strokeWidth:r}}var GIn=o((()=>{hx()}));function KIn(){return KIn=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?t/n:0}function tLn(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,a=r.dataKey,o=r.needClip;r.id;var s=px(qIn(r,lLn));return pA.createElement(QAn,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:s,needClip:o,clipPathId:t})}function nLn(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,mA.useMemo)(()=>r==null?void 0:r.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return fA(fA({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return pA.createElement(IO,{value:t?i:void 0},n)}function rLn(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,a=e.animationElapsedTime,o=e.isAnimating,s=e.isEntrance,l=e.visibleLength,u=i.type,d=i.layout,f=i.connectNulls,p=i.needClip,m=i.shape,h=i.strokeDasharray,g=fA(fA({},gx(qIn(i,uLn))),{},{fill:`none`,className:`recharts-line-curve`,clipPath:p?`url(#clipPath-${t})`:void 0,points:r,type:u,layout:d,connectNulls:f,strokeDasharray:h??i.strokeDasharray,pathRef:n,animationElapsedTime:a,isAnimating:o,isEntrance:i.animateNewValues?s:!1,visibleLength:l});return pA.createElement(pA.Fragment,null,(r==null?void 0:r.length)>1&&pA.createElement(ok,{option:m,DefaultShape:pLn.shape,shapeProps:g}),pA.createElement(tLn,{points:r,clipPathId:t,props:i}))}function iLn(e){var t=e.clipPathId,n=e.props,r=e.pathRef,i=e.previousPointsRef,a=n.points,o=n.isAnimationActive,s=n.animationBegin,l=n.animationDuration,u=n.animationEasing,d=n.animationMatchBy,f=n.animationInterpolateFn,p=n.layout,m=$In(r.current),h=xk(n.onAnimationStart,n.onAnimationEnd),g=h.isAnimating,_=h.handleAnimationStart,v=h.handleAnimationEnd,y=!g,b=_In(a),x=(0,mA.useCallback)(e=>e>0&&m>0,[m]);return pA.createElement(nLn,{points:a,showLabels:y},n.children,pA.createElement(Sk,{animationInput:a,animationIdPrefix:`recharts-line-`,items:a,previousItemsRef:i,isAnimationActive:o,animationBegin:s,animationDuration:l,animationEasing:u,onAnimationStart:_,onAnimationEnd:v,animationInterpolateFn:f,animationMatchBy:d,shouldUpdatePreviousRef:x,layout:p},(e,i,a)=>{var o=g||i<1,s=o?b(i,m):null;return pA.createElement(rLn,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:o,isEntrance:a,visibleLength:s})}),pA.createElement(NO,{label:n.label}))}function aLn(e){var t=e.clipPathId,n=e.props,r=(0,mA.useRef)(null),i=(0,mA.useRef)(null);return pA.createElement(iLn,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}function oLn(e){var t=uS(e,pLn),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.connectNulls,l=t.dot,u=t.hide,d=t.isAnimationActive,f=t.label,p=t.legendType,m=t.xAxisId,h=t.yAxisId,g=t.id,_=qIn(t,dLn),v=dA(m,h).needClip,y=Lk(),b=sw(),x=JC(),S=OS(e=>HIn(e,m,h,x,g));if(b!==`horizontal`&&b!==`vertical`||S==null||y==null)return null;var C=y.height,w=y.width,T=y.x,E=y.y;return pA.createElement(_Ln,KIn({},_,{id:g,connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:d,hide:u,label:f,legendType:p,xAxisId:m,yAxisId:h,points:S,layout:b,height:C,width:w,left:T,top:E,needClip:v}))}function sLn(e){var t=e.layout,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize;return e.displayedData.map((e,l)=>{var u=MC(e,o);if(t===`horizontal`)return{x:NC({axis:n,ticks:i,bandSize:s,entry:e,index:l}),y:(Fx(u)?null:r.scale.map(u))??null,value:u,payload:e};var d=Fx(u)?null:n.scale.map(u),f=NC({axis:r,ticks:a,bandSize:s,entry:e,index:l});return d==null||f==null?null:{x:d,y:f,value:u,payload:e}}).filter(Boolean)}function cLn(e){var t=uS(e,pLn),n=JC();return pA.createElement(wk,{id:t.id,type:`line`},e=>pA.createElement(pA.Fragment,null,pA.createElement(ckn,{legendPayload:mLn(t)}),pA.createElement(hLn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),pA.createElement(Ok,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),pA.createElement(oLn,KIn({},t,{id:e}))))}var pA,mA,lLn,uLn,dLn,fLn,pLn,mLn,hLn,gLn,_Ln,vLn,yLn=o((()=>{pA=d(p()),mA=d(p()),ze(),yx(),gIn(),vIn(),LO(),tjn(),Lx(),ak(),RC(),Njn(),mk(),AIn(),NIn(),fw(),YC(),UIn(),jS(),gk(),Ck(),yk(),dS(),Rk(),Tk(),kk(),hx(),_x(),GIn(),ck(),nO(),sT(),gw(),lLn=[`id`],uLn=[`type`,`layout`,`connectNulls`,`needClip`,`shape`,`strokeDasharray`],dLn=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`],fLn=(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(e=>e.status===`removed`?[]:[e.next]);var n=eLn(e),r=[];for(var i of e)if(i.status===`matched`)r.push(fA(fA({},i.next),{},{x:Tx(i.prev.x,i.next.x,t),y:Tx(i.prev.y,i.next.y,t)}));else if(i.status===`added`){if(i.next.x!=null){var a=i.next.x-n;r.push(fA(fA({},i.next),{},{x:Tx(a,i.next.x,t),y:i.next.y}))}else r.push(i.next)}else if(i.status===`removed`&&i.prev.x!=null){var o=i.prev.x+n;r.push(fA(fA({},i.prev),{},{x:Tx(i.prev.x,o,t),y:i.prev.y}))}return r},pLn={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:fLn,animationMatchBy:_k,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,shape:pIn,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:oT.line,type:`linear`},mLn=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:PC(n,t),payload:e}]},hLn=pA.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,l=e.unit,u=e.formatter,d=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:Dx,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:PC(o,t),hide:s,type:d,color:r,unit:l,formatter:u,graphicalItemId:f}};return pA.createElement(pk,{tooltipEntrySettings:p})}),gLn=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:MC(e.payload,t)}),_Ln=class extends mA.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxisId,o=e.yAxisId,s=e.top,l=e.left,u=e.width,d=e.height,f=e.id,p=e.needClip,m=e.zIndex;if(t)return null;var h=Re(`recharts-line`,i),g=f,_=WIn(n),v=_.r,y=_.strokeWidth,b=YOn(n),x=v*2+y,S=p?`url(#clipPath-${b?``:`dots-`}${g})`:void 0;return pA.createElement(eO,{zIndex:m},pA.createElement(vx,{className:h},p&&pA.createElement(`defs`,null,pA.createElement(jIn,{clipPathId:g,xAxisId:a,yAxisId:o}),!b&&pA.createElement(`clipPath`,{id:`clipPath-dots-${g}`},pA.createElement(`rect`,{x:l-x/2,y:s-x/2,width:u+x,height:d+x}))),pA.createElement(TIn,{xAxisId:a,yAxisId:o,data:r,dataPointFormatter:gLn,errorBarOffset:0},pA.createElement(aLn,{props:this.props,clipPathId:g}))),pA.createElement(Ajn,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:S}))}},vLn=pA.memo(cLn,hw),vLn.displayName=`Line`}));function hA(e,t){var n;return((n=e.graphicalItems.cartesianItems.find(e=>e.id===t))==null?void 0:n.xAxisId)??0}function gA(e,t){var n;return((n=e.graphicalItems.cartesianItems.find(e=>e.id===t))==null?void 0:n.yAxisId)??0}var bLn=o((()=>{Ik()})),xLn,SLn,CLn,wLn,TLn,ELn,_A,DLn,OLn,kLn,ALn,jLn,MLn,NLn=o((()=>{NS(),pRn(),ND(),fw(),qw(),RC(),Lx(),Sfn(),aT(),bLn(),xLn=(e,t,n)=>MD(e,`xAxis`,hA(e,t),n),SLn=(e,t,n)=>jD(e,`xAxis`,hA(e,t),n),CLn=(e,t,n)=>MD(e,`yAxis`,gA(e,t),n),wLn=(e,t,n)=>jD(e,`yAxis`,gA(e,t),n),TLn=MS([ow,xLn,CLn,SLn,wLn],(e,t,n,r,i)=>FC(e,`xAxis`)?LC(t,r,!1):LC(n,i,!1)),ELn=(e,t)=>t,_A=MS([sD,ELn],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),DLn=e=>{var t=ow(e);return FC(t,`xAxis`)?`yAxis`:`xAxis`},OLn=(e,t)=>DLn(e)===`yAxis`?gA(e,t):hA(e,t),kLn=(e,t,n)=>_D(e,DLn(e),OLn(e,t),n),ALn=MS([_A,kLn],(e,t)=>{var n;if(e!=null&&t!=null){var r=e.stackId,i=xfn(e);if(r!=null&&i!=null){var a=(n=t[r])==null?void 0:n.stackedData,o=a==null?void 0:a.find(e=>e.key===i);if(o!=null)return o.map(e=>[e[0],e[1]])}}}),jLn=MS([_A,kLn],(e,t)=>{if(e!=null&&e.stackId!=null&&t!=null){var n=t[e.stackId];if(n!=null)return n.graphicalItems.map(e=>e.dataKey).filter(Ex)}}),MLn=MS([ow,xLn,CLn,SLn,wLn,ALn,vdn,TLn,_A,$dn,jLn],(e,t,n,r,i,a,o,s,l,u,d)=>{var f=o.chartData,p=o.dataStartIndex,m=o.dataEndIndex;if(!(l==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var h=l.data,g=h&&h.length>0?h:f==null?void 0:f.slice(p,m+1);if(g!=null)return nRn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:p,areaSettings:l,stackedData:a,displayedData:g,chartBaseValue:u,bandSize:s,stackDataKeys:d})}})}));function vA(){return vA=Object.assign?Object.assign.bind():function(e){for(var t=1;te.y||0));return jx(i)?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(...i.map(e=>e.y||0),d)),jx(d)?yA.createElement(`rect`,{x:se.x||0));return jx(i)?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(...i.map(e=>e.x||0),d)),jx(d)?yA.createElement(`rect`,{x:0,y:s{yA=d(p()),Lx(),jw(),AC(),yx(),hx(),Vkn(),BLn=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],VLn=[`id`,`baseLine`]}));function bA(){return bA=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return xA(xA({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return CA.createElement(IO,{value:t?r:void 0},n)}function ZLn(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,s=e.isAnimating,l=e.isEntrance,u=a.layout,d=a.type,f=a.stroke,p=a.connectNulls,m=a.isRange,h=a.shape,g=a.id,_=ULn(a,iRn),v=xA(xA({},gx(_)),{},{id:g,points:t,connectNulls:p,type:d,baseLine:n,layout:u,stroke:f,isRange:m,animationElapsedTime:o,isAnimating:s,isEntrance:l});return CA.createElement(CA.Fragment,null,(t==null?void 0:t.length)>1&&CA.createElement(vx,{clipPath:r?`url(#clipPath-${i})`:void 0},CA.createElement(ok,{option:h,DefaultShape:sRn.shape,shapeProps:v})),CA.createElement(YLn,{points:t,props:_,clipPathId:i}))}function QLn(e,t,n){return jx(e)?Tx(jx(t)?t:void 0,e,n):Fx(e)||kx(e)?Tx(jx(t)?t:void 0,0,n):e}function $Ln(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,l=r.isAnimationActive,u=r.animationBegin,d=r.animationDuration,f=r.animationEasing,p=r.animationMatchBy,m=r.animationInterpolateFn,h=(0,wA.useMemo)(()=>({points:o,baseLine:s}),[o,s]),g=Skn(h,a),_=cw(),v=xk(r.onAnimationStart,r.onAnimationEnd),y=v.isAnimating,b=v.handleAnimationStart,x=v.handleAnimationEnd,S=g.startValue;if(_==null)return null;var C=Array.isArray(s)&&Array.isArray(S)?xkn(S,s,p):Array.isArray(s)?xkn(null,s,p):null;return CA.createElement(Sk,{animationInput:h,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:f,onAnimationStart:b,onAnimationEnd:x,animationInterpolateFn:m,animationMatchBy:p,layout:_},(e,i,a)=>{var l=i===1?s:Array.isArray(s)?m(C,i,_):a?s:QLn(s,S,i);return g.syncStepValue(l,i),CA.createElement(XLn,{showLabels:!y,points:o},r.children,CA.createElement(ZLn,{points:e,baseLine:l,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:y||i<1,isEntrance:a}),CA.createElement(NO,{label:r.label}))})}function eRn(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=(0,wA.useRef)(null),a=(0,wA.useRef)();return CA.createElement($Ln,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}function tRn(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,l=e.fillOpacity,u=e.hide,d=e.isAnimationActive,f=e.legendType,p=e.stroke,m=e.xAxisId,h=e.yAxisId,g=ULn(e,aRn),_=sw(),v=ECn(),y=dA(m,h).needClip,b=JC(),x=OS(t=>MLn(t,e.id,b))??{},S=x.points,C=x.isRange,w=x.baseLine,T=Lk();if(_!==`horizontal`&&_!==`vertical`||T==null||v!==`AreaChart`&&v!==`ComposedChart`)return null;var E=T.height,D=T.width,O=T.x,k=T.y;return!S||!S.length?null:CA.createElement(uRn,bA({},g,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:w,connectNulls:a,dot:o,fill:s,fillOpacity:l,height:E,hide:u,layout:_,isAnimationActive:d,isRange:C,legendType:f,needClip:y,points:S,stroke:p,width:D,left:O,top:k,xAxisId:m,yAxisId:h}))}function nRn(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,l=e.xAxis,u=e.yAxis,d=e.displayedData,f=e.dataStartIndex,p=e.xAxisTicks,m=e.yAxisTicks,h=e.bandSize,g=e.stackDataKeys,_=a&&a.length,v=dRn(o,s,r,l,u),y=o===`horizontal`,b=!1,x=d.map((e,t)=>{var r,o;if(_)o=a[f+t];else{var s=MC(e,i);Array.isArray(s)?(o=s,b=!0):o=[v,s]}var d=((r=o)==null?void 0:r[1])??null,x=MC(e,i),S=_&&x==null&&g!=null&&g.length>0&&g.every(t=>MC(e,t)==null),C=d==null||_&&!n&&x==null||S;return y?{x:NC({axis:l,ticks:p,bandSize:h,entry:e,index:t}),y:C?null:u.scale.map(d)??null,value:o,payload:e}:{x:C?null:l.scale.map(d)??null,y:NC({axis:u,ticks:m,bandSize:h,entry:e,index:t}),value:o,payload:e}});return{points:x,baseLine:(_||b?x.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return y?{x:e.x,y:t!=null&&e.y!=null?u.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:l.scale.map(t)??null,y:e.y,payload:e.payload}}):y?u.scale.map(v):l.scale.map(v))??0,isRange:b}}function rRn(e){var t=uS(e,sRn),n=JC();return CA.createElement(wk,{id:t.id,type:`area`},e=>CA.createElement(CA.Fragment,null,CA.createElement(ckn,{legendPayload:cRn(t)}),CA.createElement(lRn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),CA.createElement(Ok,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:fan(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),CA.createElement(tRn,bA({},t,{id:e}))))}var CA,wA,iRn,aRn,oRn,sRn,cRn,lRn,uRn,dRn,fRn,pRn=o((()=>{CA=d(p()),wA=d(p()),ze(),yx(),LO(),tjn(),Lx(),RC(),ak(),Njn(),mk(),NIn(),NLn(),YC(),fw(),QD(),gk(),jS(),Ck(),yk(),Ckn(),dS(),Rk(),Tk(),kk(),hx(),GIn(),_x(),ck(),nO(),sT(),gw(),HLn(),iRn=[`id`],aRn=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`],oRn=(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[xA(xA({},e.next),{},{x:Tx(e.prev.x,e.next.x,t),y:Tx(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),sRn={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:_k,animationInterpolateFn:oRn,connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:zLn,xAxisId:0,yAxisId:0,zIndex:oT.area},cRn=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:SA(r,i),value:PC(n,t),payload:e}]},lRn=CA.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,l=e.unit,u=e.formatter,d=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:Dx,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:PC(o,t),hide:s,type:d,color:SA(r,a),unit:l,formatter:u,graphicalItemId:f}};return CA.createElement(pk,{tooltipEntrySettings:p})}),uRn=class extends wA.PureComponent{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.needClip,l=e.xAxisId,u=e.yAxisId,d=e.width,f=e.height,p=e.id,m=e.baseLine,h=e.zIndex;if(t)return null;var g=Re(`recharts-area`,i),_=p,v=WIn(n),y=v.r,b=v.strokeWidth,x=YOn(n),S=y*2+b,C=s?`url(#clipPath-${x?``:`dots-`}${_})`:void 0;return CA.createElement(eO,{zIndex:h},CA.createElement(vx,{className:g},s&&CA.createElement(`defs`,null,CA.createElement(jIn,{clipPathId:_,xAxisId:l,yAxisId:u}),!x&&CA.createElement(`clipPath`,{id:`clipPath-dots-${_}`},CA.createElement(`rect`,{x:o-S/2,y:a-S/2,width:d+S,height:f+S}))),CA.createElement(eRn,{needClip:s,clipPathId:_,props:this.props})),CA.createElement(Ajn,{points:r,mainColor:SA(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:C}),this.props.isRange&&Array.isArray(m)&&CA.createElement(Ajn,{points:m,mainColor:SA(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:C}))}},dRn=(e,t,n,r,i)=>{var a=n??t;if(jx(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var l=Math.max(s[0],s[1]),u=Math.min(s[0],s[1]);return a===`dataMin`?u:a===`dataMax`||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]},fRn=CA.memo(rRn,hw),fRn.displayName=`Area`}));function mRn(e,t){if(!e)throw Error(hRn)}var hRn,gRn=o((()=>{hRn=`Invariant failed`}));function _Rn(e,t){if(e==null)return{};var n,r,i=vRn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r{bRn=d(p()),gRn(),Nun(),ck(),Lx(),xRn=[`option`],TA=Lw,SRn=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,r)=>{if(jx(e))return e;var i=jx(n)||Fx(n);return i?e(n,r):(!i&&mRn(!1,`minPointSize callback function received a value with type of ${typeof n}. Currently only numbers or null/undefined are supported.`),t)}}})),wRn,TRn,EA,ERn,DRn,ORn,kRn,ARn,jRn,MRn,NRn,PRn,FRn,IRn,LRn,RRn,zRn,BRn,VRn,HRn=o((()=>{NS(),ND(),Lx(),RC(),Mzn(),fw(),qw(),qC(),aT(),RMn(),KMn(),JMn(),bLn(),XMn(),wRn=(e,t,n)=>n,TRn=(e,t)=>t,EA=MS([sD,TRn],(e,t)=>e.filter(e=>e.type===`bar`).find(e=>e.id===t)),ERn=MS([EA],e=>e==null?void 0:e.maxBarSize),DRn=(e,t,n,r)=>r,ORn=MS([ow,sD,hA,gA,wRn],(e,t,n,r,i)=>t.filter(t=>e===`horizontal`?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===i).filter(e=>e.hide===!1).filter(e=>e.type===`bar`)),kRn=(e,t,n)=>{var r=ow(e),i=hA(e,t),a=gA(e,t);if(i!=null&&a!=null)return r===`horizontal`?_D(e,`yAxis`,a,n):_D(e,`xAxis`,i,n)},ARn=(e,t)=>{var n=ow(e),r=hA(e,t),i=gA(e,t);if(r!=null&&i!=null)return n===`horizontal`?sxn(e,`xAxis`,r):sxn(e,`yAxis`,i)},jRn=MS([ORn,Zdn,ARn],LMn),MRn=(e,t,n)=>{var r=EA(e,t);if(r==null)return 0;var i=hA(e,t),a=gA(e,t);if(i==null||a==null)return 0;var o=ow(e),s=Qw(e),l=r.maxBarSize,u=Fx(l)?s:l,d,f;return o===`horizontal`?(d=MD(e,`xAxis`,i,n),f=jD(e,`xAxis`,i,n)):(d=MD(e,`yAxis`,a,n),f=jD(e,`yAxis`,a,n)),LC(d,f,!0)??u??0},NRn=(e,t,n)=>{var r=ow(e),i=hA(e,t),a=gA(e,t);if(i!=null&&a!=null){var o,s;return r===`horizontal`?(o=MD(e,`xAxis`,i,n),s=jD(e,`xAxis`,i,n)):(o=MD(e,`yAxis`,a,n),s=jD(e,`yAxis`,a,n)),LC(o,s)}},PRn=MS([jRn,Qw,Xdn,$w,MRn,NRn,ERn],GMn),FRn=(e,t,n)=>{var r=hA(e,t);if(r!=null)return MD(e,`xAxis`,r,n)},IRn=(e,t,n)=>{var r=gA(e,t);if(r!=null)return MD(e,`yAxis`,r,n)},LRn=(e,t,n)=>{var r=hA(e,t);if(r!=null)return jD(e,`xAxis`,r,n)},RRn=(e,t,n)=>{var r=gA(e,t);if(r!=null)return jD(e,`yAxis`,r,n)},zRn=MS([PRn,EA],YMn),BRn=MS([kRn,EA],qMn),VRn=MS([GC,KC,FRn,IRn,LRn,RRn,zRn,ow,vdn,NRn,BRn,EA,DRn],(e,t,n,r,i,a,o,s,l,u,d,f,p)=>{var m=l.chartData,h=l.dataStartIndex,g=l.dataEndIndex;if(!(f==null||o==null||t==null||s!==`horizontal`&&s!==`vertical`||n==null||r==null||i==null||a==null||u==null)){var _=f.data,v=_!=null&&_.length>0?_:m==null?void 0:m.slice(h,g+1);if(v!=null)return yzn({layout:s,barSettings:f,pos:o,parentViewBox:t,bandSize:u,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,stackedData:d,displayedData:v,offset:e,cells:p,dataStartIndex:h})}})}));function URn(){return URn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{KRn=d(p()),DA=d(p()),RC(),yx(),qRn=[`index`],JRn=(0,DA.createContext)(void 0),YRn=e=>{var t=(0,DA.useContext)(JRn);if(t!=null)return t.stackId;if(e!=null)return fan(e)},XRn=(e,t)=>`recharts-bar-stack-clip-path-${e}-${t}`,ZRn=e=>{var t=(0,DA.useContext)(JRn);if(t!=null){var n=t.stackId;return`url(#${XRn(n,e)})`}},QRn=e=>{var t=e.index,n=WRn(e,qRn),r=ZRn(t);return KRn.createElement(vx,URn({className:`recharts-bar-stack-layer`,clipPath:r},n))}}));function ezn(e,t){return azn(e)||izn(e,t)||nzn(e,t)||tzn()}function tzn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nzn(e,t){if(e){if(typeof e==`string`)return rzn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rzn(e,t):void 0}}function rzn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{e.value;var a=e.background;e.tooltipPosition;var o=AA(e,Szn);if(!a)return null;var s=d(e,e.originalDataIndex),l=f(e,e.originalDataIndex),h=p(e,e.originalDataIndex),g=kA(kA(kA(kA(kA({option:i,isActive:String(e.originalDataIndex)===t},o),{},{fill:`#eee`},a),m),cS(u,e,n)),{},{onMouseEnter:s,onMouseLeave:l,onClick:h,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return jA.createElement(yRn,OA({key:`background-bar-${n}`},g))}))}function fzn(e){var t=e.showLabels,n=e.children,r=e.rects,i=r==null?void 0:r.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return kA(kA({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return jA.createElement(IO,{value:t?i:void 0},n)}function pzn(e){var t=e.shape,n=e.activeBar,r=e.baseProps,i=e.entry,a=e.index,o=e.dataKey,s=OS(JD),l=OS(tCn),u=n&&String(i.originalDataIndex)===s&&(l==null||o===l),d=s!=null&&(String(i.originalDataIndex)!==s||l!=null&&o!==l),f=ezn((0,MA.useState)(!1),2),p=f[0],m=f[1],h=ezn((0,MA.useState)(!1),2),g=h[0],_=h[1];(0,MA.useEffect)(()=>{var e;return u?(m(!0),e=requestAnimationFrame(()=>{_(!0)})):(_(!1),d&&m(!1)),()=>{cancelAnimationFrame(e)}},[u,d]);var v=(0,MA.useCallback)(()=>{u||m(!1)},[u]),y=u&&g,b=u||p,x=u?n===!0?t:n:t,S=jA.createElement(yRn,OA({},r,{name:String(r.name)},i,{isActive:y,option:x,index:a,dataKey:o,animationElapsedTime:e.animationElapsedTime,isAnimating:e.isAnimating,isEntrance:e.isEntrance,onTransitionEnd:v}));return b?jA.createElement(eO,{zIndex:oT.activeBar},jA.createElement(QRn,{index:i.originalDataIndex},S)):S}function mzn(e){var t=e.shape,n=e.baseProps,r=e.entry,i=e.index,a=e.dataKey;return jA.createElement(yRn,OA({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:a,animationElapsedTime:e.animationElapsedTime,isAnimating:e.isAnimating,isEntrance:e.isEntrance}))}function hzn(e){var t=e.data,n=e.props,r=e.animationElapsedTime,i=e.isAnimating,a=e.isEntrance,o=px(n)??{},s=o.id,l=AA(o,Czn),u=n.shape,d=n.dataKey,f=n.activeBar,p=n.onMouseEnter,m=n.onClick,h=n.onMouseLeave,g=AA(n,wzn),_=lk(p,d,s),v=uk(h),y=dk(m,d,s);return t?jA.createElement(jA.Fragment,null,t.map((e,t)=>jA.createElement(QRn,OA({index:e.originalDataIndex,key:`rectangle-${e==null?void 0:e.x}-${e==null?void 0:e.y}-${e==null?void 0:e.value}-${t}`,className:`recharts-bar-rectangle`},cS(g,e,t),{onMouseEnter:_(e,e.originalDataIndex),onMouseLeave:v(e,e.originalDataIndex),onClick:y(e,e.originalDataIndex)}),f?jA.createElement(pzn,{shape:u,activeBar:f,baseProps:l,entry:e,index:t,dataKey:d,animationElapsedTime:r,isAnimating:i,isEntrance:a}):jA.createElement(mzn,{shape:u,baseProps:l,entry:e,index:t,dataKey:d,animationElapsedTime:r,isAnimating:i,isEntrance:a})))):null}function gzn(e){var t=e.props,n=e.previousRectanglesRef,r=t.data,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,l=t.animationInterpolateFn,u=t.layout,d=xk(t.onAnimationStart,t.onAnimationEnd),f=d.isAnimating,p=d.handleAnimationStart,m=d.handleAnimationEnd;return jA.createElement(fzn,{showLabels:!f,rects:r},jA.createElement(Sk,{animationInput:r,animationIdPrefix:`recharts-bar-`,items:r,previousItemsRef:n,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s,onAnimationStart:p,onAnimationEnd:m,animationInterpolateFn:l,animationMatchBy:t.animationMatchBy,layout:u},(e,n,r)=>jA.createElement(vx,null,jA.createElement(hzn,{props:t,data:e,animationElapsedTime:n,isAnimating:f||n<1,isEntrance:r}))),jA.createElement(NO,{label:t.label}),t.children)}function _zn(e){var t=(0,MA.useRef)(null);return jA.createElement(gzn,{previousRectanglesRef:t,props:e})}function vzn(e){var t=e.xAxisId,n=e.yAxisId,r=e.hide,i=e.legendType,a=e.minPointSize,o=e.activeBar,s=e.animationBegin,l=e.animationDuration,u=e.animationEasing,d=e.isAnimationActive,f=dA(t,n).needClip,p=sw(),m=JC(),h=ik(e.children,hO),g=OS(t=>VRn(t,e.id,m,h));if(p!==`vertical`&&p!==`horizontal`)return null;var _,v=g==null?void 0:g[0];return _=v==null||v.height==null||v.width==null?0:p===`vertical`?v.height/2:v.width/2,jA.createElement(TIn,{xAxisId:t,yAxisId:n,data:g,dataPointFormatter:kzn,errorBarOffset:_},jA.createElement(Azn,OA({},e,{layout:p,needClip:f,data:g,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:l,animationEasing:u,isAnimationActive:d})))}function yzn(e){var t=e.layout,n=e.barSettings,r=n.dataKey,i=n.minPointSize,a=n.hasCustomShape,o=e.pos,s=e.bandSize,l=e.xAxis,u=e.yAxis,d=e.xAxisTicks,f=e.yAxisTicks,p=e.stackedData,m=e.displayedData,h=e.offset,g=e.cells,_=e.parentViewBox,v=e.dataStartIndex,y=t===`horizontal`?u:l,b=p?y.scale.domain():null,x=San({numericAxis:y}),S=y.scale.map(x);return m.map((e,n)=>{var m,y,C,w,T,E;if(p){var D=p[n+v];if(D==null)return null;m=_an(D,b)}else m=MC(e,r),Array.isArray(m)||(m=[x,m]);var O=SRn(i,Ozn)(m[1],n);if(t===`horizontal`){var k=u.scale.map(m[0]),A=u.scale.map(m[1]);if(k==null||A==null)return null;y=IC({axis:l,ticks:d,bandSize:s,offset:o.offset,entry:e,index:n}),C=A??k??void 0,w=o.size;var j=k-A;if(T=kx(j)?0:j,E={x:y,y:h.top,width:w,height:h.height},Math.abs(O)>0&&Math.abs(T)0&&Math.abs(w)jA.createElement(jA.Fragment,null,jA.createElement(ckn,{legendPayload:Tzn(t)}),jA.createElement(Ezn,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),jA.createElement(Ok,{type:`bar`,id:e,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null&&t.shape!==TA}),jA.createElement(eO,{zIndex:t.zIndex},jA.createElement(vzn,OA({},t,{id:e})))))}var jA,MA,xzn,Szn,Czn,wzn,Tzn,Ezn,Dzn,Ozn,kzn,Azn,jzn,NA,Mzn=o((()=>{jA=d(p()),MA=d(p()),ze(),yx(),gO(),LO(),Lx(),ak(),RC(),lS(),CRn(),fk(),mk(),AIn(),NIn(),fw(),HRn(),jS(),YC(),YD(),gk(),dS(),Tk(),kk(),hx(),Ck(),yk(),nO(),sT(),MNn(),gw(),$Rn(),xzn=[`onMouseEnter`,`onMouseLeave`,`onClick`],Szn=[`value`,`background`,`tooltipPosition`],Czn=[`id`],wzn=[`onMouseEnter`,`onClick`,`onMouseLeave`],Tzn=e=>{var t=e.dataKey,n=e.name,r=e.fill,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:PC(n,t),payload:e}]},Ezn=jA.memo(e=>{var t=e.dataKey,n=e.stroke,r=e.strokeWidth,i=e.fill,a=e.name,o=e.hide,s=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:void 0,getPosition:Dx,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:PC(a,t),hide:o,type:u,color:i,unit:s,formatter:l,graphicalItemId:d}};return jA.createElement(pk,{tooltipEntrySettings:f})}),Dzn=(e,t,n)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>{if(e.status===`removed`)return n===`horizontal`?[kA(kA({},e.prev),{},{height:Tx(e.prev.height,0,t),y:Tx(e.prev.y,e.prev.y+e.prev.height,t)})]:[kA(kA({},e.prev),{},{width:Tx(e.prev.width,0,t)})];if(e.status===`matched`)return[kA(kA({},e.next),{},{x:Tx(e.prev.x,e.next.x,t),y:Tx(e.prev.y,e.next.y,t),width:Tx(e.prev.width,e.next.width,t),height:Tx(e.prev.height,e.next.height,t)})];var r=e.next;return n===`horizontal`?[kA(kA({},r),{},{height:Tx(0,r.height,t),y:Tx(r.stackedBarStart,r.y,t)})]:[kA(kA({},r),{},{width:Tx(0,r.width,t),x:Tx(r.stackedBarStart,r.x,t)})]}),Ozn=0,kzn=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:MC(e,t)}},Azn=class extends MA.PureComponent{render(){var e=this.props,t=e.hide,n=e.data,r=e.dataKey,i=e.className,a=e.xAxisId,o=e.yAxisId,s=e.needClip,l=e.background,u=e.id;if(t||n==null)return null;var d=Re(`recharts-bar`,i),f=u;return jA.createElement(vx,{className:d,id:u},s&&jA.createElement(`defs`,null,jA.createElement(jIn,{clipPathId:f,xAxisId:a,yAxisId:o})),jA.createElement(vx,{className:`recharts-bar-rectangles`,clipPath:s?`url(#clipPath-${f})`:void 0},jA.createElement(dzn,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),jA.createElement(_zn,this.props)))}},jzn={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:`ease`,animationInterpolateFn:Dzn,animationMatchBy:vk,background:!1,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`rect`,minPointSize:Ozn,shape:TA,xAxisId:0,yAxisId:0,zIndex:oT.bar},NA=jA.memo(bzn,hw),NA.displayName=`Bar`}));function Nzn(){return Nzn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{PA=d(p()),q9t(),ck(),Rzn=[`option`]})),Bzn,Vzn,Hzn,Uzn,Wzn,Gzn,Kzn,qzn,Jzn,Yzn,Xzn=o((()=>{NS(),xBn(),qw(),ND(),Bzn=(e,t,n,r,i,a,o)=>MD(e,`xAxis`,t,o),Vzn=(e,t,n,r,i,a,o)=>jD(e,`xAxis`,t,o),Hzn=(e,t,n,r,i,a,o)=>MD(e,`yAxis`,n,o),Uzn=(e,t,n,r,i,a,o)=>jD(e,`yAxis`,n,o),Wzn=(e,t,n,r)=>hxn(e,`zAxis`,r,!1),Gzn=(e,t,n,r,i)=>i,Kzn=(e,t,n,r,i,a)=>a,qzn=(e,t,n,r,i,a,o)=>Kw(e,void 0,void 0,o),Jzn=MS([sD,Gzn],(e,t)=>e.filter(e=>e.type===`scatter`).find(e=>e.id===t)),Yzn=MS([qzn,Bzn,Vzn,Hzn,Uzn,Wzn,Jzn,Kzn],(e,t,n,r,i,a,o,s)=>{var l=e.chartData,u=e.dataStartIndex,d=e.dataEndIndex;if(o!=null){var f=(o==null?void 0:o.data)!=null&&o.data.length>0?o.data:l==null?void 0:l.slice(u,d+1);if(f!=null&&t!=null&&r!=null&&n!=null&&i!=null&&(n==null?void 0:n.length)!==0&&(i==null?void 0:i.length)!==0)return cBn({displayedData:f,xAxis:t,yAxis:r,zAxis:a,scatterSettings:o,xAxisTicks:n,yAxisTicks:i,cells:s})}})}));function Zzn(e,t){if(e==null)return{};var n,r,i=Qzn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r({x:e.cx??null,y:e.cy??null}));else if(i===`fitting`){var d=W8t(t),f=d.xmin,p=d.xmax,m=d.a,h=d.b,g=e=>m*e+h;l=[{x:f,y:g(f)},{x:p,y:g(p)}]}var _=IA(IA(IA({},o),{},{fill:`none`,stroke:o&&o.fill},s),{},{points:l});return u=LA.isValidElement(r)?LA.cloneElement(r,_):typeof r==`function`?r(_):LA.createElement(Aw,FA({},_,{type:a})),LA.createElement(vx,{className:`recharts-scatter-line`,key:`recharts-scatter-line`},u)}function iBn(e){var t=e.showLabels,n=e.points,r=e.children,i=rw(),a=(0,RA.useMemo)(()=>n==null?void 0:n.map(e=>{var t={x:e.x??0,y:e.y??0,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width};return IA(IA({},t),{},{value:void 0,payload:e.payload,viewBox:t,parentViewBox:i,fill:void 0})}),[i,n]);return LA.createElement(IO,{value:t?a:void 0},r)}function aBn(e){var t=e.entry,n=e.index,r=e.shape,i=e.activeShape,a=e.baseProps,o=e.id,s=e.restOfAllOtherProps,l=e.animationElapsedTime,u=e.isAnimating,d=e.isEntrance,f=e.onMouseEnterFromContext,p=e.onMouseLeaveFromContext,m=e.onClickFromContext,h=i!=null&&i!==!1,g=OS((0,RA.useMemo)(()=>{var e=String(n);return t=>h&&JD(t)===e},[h,n]))??!1,_=g&&i!=null&&i!==!1?i:r,v=IA(IA(IA({},a),t),{},{isActive:g,index:n,animationElapsedTime:l,isAnimating:u,isEntrance:d,[Pan]:String(o)});return LA.createElement(eO,{zIndex:g?oT.activeDot:void 0},LA.createElement(vx,FA({className:`recharts-scatter-symbol`},cS(s,t,n),{onMouseEnter:f(t,n),onMouseLeave:p(t,n),onClick:m(t,n)}),LA.createElement(Lzn,FA({option:_},v))))}function oBn(e){var t=e.points,n=e.allOtherScatterProps,r=e.animationElapsedTime,i=e.isAnimating,a=e.isEntrance,o=n.shape,s=n.activeShape,l=n.dataKey,u=n.id,d=Zzn(n,fBn),f=n.onMouseEnter,p=n.onClick,m=n.onMouseLeave,h=Zzn(n,pBn),g=lk(f,l,u),_=uk(m),v=dk(p,l,u);if(!Q9t(t))return null;var y=px(d);return LA.createElement(LA.Fragment,null,LA.createElement(rBn,{points:t,props:d}),t.map((e,t)=>LA.createElement(aBn,{key:`symbol-${e==null?void 0:e.cx}-${e==null?void 0:e.cy}-${e==null?void 0:e.size}-${t}`,entry:e,index:t,shape:o,activeShape:s,baseProps:y,id:u,restOfAllOtherProps:h,animationElapsedTime:r,isAnimating:i,isEntrance:a,onMouseEnterFromContext:g,onMouseLeaveFromContext:_,onClickFromContext:v})))}function sBn(e){var t=e.previousPointsRef,n=e.props,r=n.points,i=n.isAnimationActive,a=n.animationBegin,o=n.animationDuration,s=n.animationEasing,l=n.animationInterpolateFn,u=xk(),d=u.isAnimating,f=u.handleAnimationStart,p=u.handleAnimationEnd,m=cw();return m==null?null:LA.createElement(iBn,{showLabels:!d,points:r},LA.createElement(Sk,{animationInput:n,animationIdPrefix:`recharts-scatter-`,items:r,previousItemsRef:t,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s,onAnimationStart:f,onAnimationEnd:p,animationInterpolateFn:l,animationMatchBy:n.animationMatchBy,layout:m},(e,t,r)=>LA.createElement(vx,null,LA.createElement(oBn,{points:e,allOtherScatterProps:n,showLabels:!d,animationElapsedTime:t,isAnimating:d||t<1,isEntrance:r}))),n.children,LA.createElement(NO,{label:n.label}))}function cBn(e){var t=e.displayedData,n=e.xAxis,r=e.yAxis,i=e.zAxis,a=e.scatterSettings,o=e.xAxisTicks,s=e.yAxisTicks,l=e.cells,u=Fx(n.dataKey)?a.dataKey:n.dataKey,d=Fx(r.dataKey)?a.dataKey:r.dataKey,f=i&&i.dataKey,p=i?i.range:iD.range,m=p&&p[0],h=n.scale.bandwidth?n.scale.bandwidth():0,g=r.scale.bandwidth?r.scale.bandwidth():0;return t.map((e,t)=>{var p=MC(e,u),_=MC(e,d),v=!Fx(f)&&MC(e,f)||`-`,y=[{name:Fx(n.dataKey)?a.name:n.name||String(n.dataKey),unit:n.unit||``,value:p,payload:e,dataKey:u,type:a.tooltipType,graphicalItemId:a.id},{name:Fx(r.dataKey)?a.name:r.name||String(r.dataKey),unit:r.unit||``,value:_,payload:e,dataKey:d,type:a.tooltipType,graphicalItemId:a.id}];v!==`-`&&i!=null&&y.push({name:i.name||i.dataKey,unit:i.unit||``,value:v,payload:e,dataKey:f,type:a.tooltipType,graphicalItemId:a.id});var b=NC({axis:n,ticks:o,bandSize:h,entry:e,index:t,dataKey:u}),x=NC({axis:r,ticks:s,bandSize:g,entry:e,index:t,dataKey:d}),S=v!==`-`&&i!=null?i.scale.map(v):m,C=S==null?0:Math.sqrt(Math.max(S,0)/Math.PI);return IA(IA({},e),{},{cx:b,cy:x,x:b==null?void 0:b-C,y:x==null?void 0:x-C,width:2*C,height:2*C,size:S,node:{x:p,y:_,z:v},tooltipPayload:y,tooltipPosition:{x:b,y:x},payload:e},l&&l[t]&&l[t].props)})}function lBn(e){var t=e.hide,n=e.points,r=e.className,i=e.needClip,a=e.xAxisId,o=e.yAxisId,s=e.id,l=(0,RA.useRef)(null);if(t)return null;var u=Re(`recharts-scatter`,r),d=s;return LA.createElement(eO,{zIndex:e.zIndex},LA.createElement(vx,{className:u,clipPath:i?`url(#clipPath-${d})`:void 0,id:s},i&&LA.createElement(`defs`,null,LA.createElement(jIn,{clipPathId:d,xAxisId:a,yAxisId:o})),LA.createElement(TIn,{xAxisId:a,yAxisId:o,data:n,dataPointFormatter:vBn,errorBarOffset:0},LA.createElement(vx,{key:`recharts-scatter-symbols`},LA.createElement(sBn,{props:e,previousPointsRef:l})))))}function uBn(e){var t=uS(e,yBn),n=t.animationBegin,r=t.animationDuration,i=t.animationEasing,a=t.hide,o=t.isAnimationActive,s=t.legendType,l=t.lineJointType,u=t.lineType,d=t.shape,f=t.xAxisId,p=t.yAxisId,m=t.zAxisId,h=Zzn(t,mBn),g=dA(f,p).needClip,_=(0,RA.useMemo)(()=>ik(e.children,hO),[e.children]),v=JC(),y=OS(t=>Yzn(t,f,p,m,e.id,_,v));return g==null||y==null?null:LA.createElement(LA.Fragment,null,LA.createElement(gBn,{dataKey:e.dataKey,points:y,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,formatter:e.formatter,tooltipType:e.tooltipType,id:e.id}),LA.createElement(lBn,FA({},h,{xAxisId:f,yAxisId:p,zAxisId:m,lineType:u,lineJointType:l,legendType:s,shape:d,hide:a,isAnimationActive:o,animationBegin:n,animationDuration:r,animationEasing:i,points:y,needClip:g})))}function dBn(e){var t=uS(e,yBn),n=JC();return LA.createElement(wk,{id:t.id,type:`scatter`},e=>LA.createElement(LA.Fragment,null,LA.createElement(ckn,{legendPayload:hBn(t)}),LA.createElement(Ok,{type:`scatter`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:n}),LA.createElement(uBn,FA({},t,{id:e}))))}var LA,RA,fBn,pBn,mBn,hBn,gBn,_Bn,vBn,yBn,bBn,xBn=o((()=>{LA=d(p()),RA=d(p()),ze(),yx(),LO(),ak(),jw(),gO(),Lx(),RC(),lS(),zzn(),fk(),mk(),AIn(),NIn(),Xzn(),jS(),ND(),YC(),YD(),gk(),WC(),dS(),Tk(),kk(),hx(),fw(),Ck(),yk(),nO(),sT(),gw(),fBn=[`id`],pBn=[`onMouseEnter`,`onClick`,`onMouseLeave`],mBn=[`animationBegin`,`animationDuration`,`animationEasing`,`hide`,`isAnimationActive`,`legendType`,`lineJointType`,`lineType`,`shape`,`xAxisId`,`yAxisId`,`zAxisId`],hBn=e=>{var t=e.dataKey,n=e.name,r=e.fill,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:PC(n,t),payload:e}]},gBn=LA.memo(e=>{var t=e.dataKey,n=e.points,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n==null?void 0:n.map(e=>e.tooltipPayload),getPosition:e=>{var t;return n==null||(t=n[Number(e)])==null?void 0:t.tooltipPosition},settings:{stroke:r,strokeWidth:i,fill:a,nameKey:void 0,dataKey:t,name:PC(o,t),hide:s,type:u,color:a,unit:``,formatter:l,graphicalItemId:d}};return LA.createElement(pk,{tooltipEntrySettings:f})}),_Bn=(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`removed`?[]:e.status===`matched`?[IA(IA({},e.next),{},{cx:e.next.cx==null?void 0:Tx(e.prev.cx,e.next.cx,t),cy:e.next.cy==null?void 0:Tx(e.prev.cy,e.next.cy,t),size:Tx(e.prev.size,e.next.size,t)})]:[IA(IA({},e.next),{},{size:Tx(0,e.next.size,t)})]),vBn=(e,t,n)=>({x:e.cx,y:e.cy,value:Number(n===`x`?e.node.x:e.node.y),errorVal:MC(e,t)}),yBn={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:`circle`,lineType:`joint`,lineJointType:`linear`,shape:`circle`,hide:!1,isAnimationActive:`auto`,animationBegin:0,animationDuration:400,animationEasing:`linear`,animationMatchBy:vk,animationInterpolateFn:_Bn,zIndex:oT.scatter},bBn=LA.memo(dBn,hw),bBn.displayName=`Scatter`}));function SBn(e,t){if(e==null)return{};var n,r,i=CBn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r{gw(),EBn=[`domain`,`range`],DBn=[`domain`,`range`]}));function kBn(){return kBn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(o!=null)return jBn(jBn({},a),{},{type:o})},[a,o]);return(0,BA.useLayoutEffect)(()=>{s!=null&&(n.current===null?t(cjn(s)):n.current!==s&&t(ljn({prev:n.current,next:s})),n.current=s)},[s,t]),(0,BA.useLayoutEffect)(()=>()=>{n.current&&(t(ujn(n.current)),n.current=null)},[t]),null}var zA,BA,RBn,zBn,BBn,VBn,HBn,UBn,VA,WBn=o((()=>{zA=d(p()),BA=d(p()),ze(),jFn(),jS(),Ik(),ND(),qC(),YC(),AO(),dS(),OBn(),fw(),fT(),RBn=[`type`],zBn=[`dangerouslySetInnerHTML`,`ticks`,`scale`],BBn=[`id`,`scale`],VBn=e=>{var t=e.xAxisId,n=e.className,r=e.height,i=e.label,a=(0,BA.useRef)(null),o=(0,BA.useRef)(null),s=OS(KC),l=JC(),u=kS(),d=`xAxis`,f=OS(e=>dxn(e,d,t,l)),p=OS(e=>Zbn(e,t)),m=OS(e=>rxn(e,t)),h=OS(e=>Uyn(e,t));if((0,BA.useLayoutEffect)(()=>{if(!(r!==`auto`||!p||OO(i)||(0,BA.isValidElement)(i)||h==null)){var e=a.current;if(e){var n=e.getCalculatedHeight();Math.round(p.height)!==Math.round(n)&&u(vjn({id:t,height:n}))}}},[f,p,u,i,t,r,h]),p==null||m==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var g=FBn(e,zBn);h.id,h.scale;var _=FBn(h,BBn);return zA.createElement(AFn,kBn({},g,_,{ref:a,labelRef:o,x:m.x,y:m.y,width:p.width,height:p.height,className:Re(`recharts-${d} ${d}`,n),viewBox:s,ticks:f,axisType:d,axisId:t}))},HBn={allowDataOverflow:eD.allowDataOverflow,allowDecimals:eD.allowDecimals,allowDuplicatedCategory:eD.allowDuplicatedCategory,angle:eD.angle,axisLine:aA.axisLine,height:eD.height,hide:!1,includeHidden:eD.includeHidden,interval:eD.interval,label:!1,minTickGap:eD.minTickGap,mirror:eD.mirror,orientation:eD.orientation,padding:eD.padding,reversed:eD.reversed,scale:eD.scale,tick:eD.tick,tickCount:eD.tickCount,tickLine:aA.tickLine,tickSize:aA.tickSize,type:eD.type,niceTicks:eD.niceTicks,xAxisId:0},UBn=e=>{var t=uS(e,HBn);return zA.createElement(zA.Fragment,null,zA.createElement(LBn,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),zA.createElement(VBn,t))},VA=zA.memo(UBn,TBn),VA.displayName=`XAxis`}));function GBn(){return GBn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(o!=null)return qBn(qBn({},a),{},{type:o})},[o,a]);return(0,UA.useLayoutEffect)(()=>{s!=null&&(n.current===null?t(djn(s)):n.current!==s&&t(fjn({prev:n.current,next:s})),n.current=s)},[s,t]),(0,UA.useLayoutEffect)(()=>()=>{n.current&&(t(pjn(n.current)),n.current=null)},[t]),null}function eVn(e){var t=e.yAxisId,n=e.className,r=e.width,i=e.label,a=(0,UA.useRef)(null),o=(0,UA.useRef)(null),s=OS(KC),l=JC(),u=kS(),d=`yAxis`,f=OS(e=>oxn(e,t)),p=OS(e=>axn(e,t)),m=OS(e=>dxn(e,d,t,l)),h=OS(e=>Wyn(e,t));if((0,UA.useLayoutEffect)(()=>{if(!(r!==`auto`||!f||OO(i)||(0,UA.isValidElement)(i)||h==null)){var e=a.current;if(e){var n=e.getCalculatedWidth();Math.round(f.width)!==Math.round(n)&&u(_jn({id:t,width:n}))}}},[m,f,u,i,t,r,h]),f==null||p==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var g=ZBn(e,nVn);h.id,h.scale;var _=ZBn(h,rVn);return HA.createElement(AFn,GBn({},g,_,{ref:a,labelRef:o,x:p.x,y:p.y,tickTextProps:r===`auto`?{width:void 0}:{width:r},width:f.width,height:f.height,className:Re(`recharts-${d} ${d}`,n),viewBox:s,ticks:m,axisType:d,axisId:t}))}var HA,UA,tVn,nVn,rVn,iVn,aVn,WA,oVn=o((()=>{HA=d(p()),UA=d(p()),ze(),jFn(),Ik(),jS(),ND(),qC(),YC(),AO(),dS(),OBn(),fw(),fT(),tVn=[`type`],nVn=[`dangerouslySetInnerHTML`,`ticks`,`scale`],rVn=[`id`,`scale`],iVn={allowDataOverflow:nD.allowDataOverflow,allowDecimals:nD.allowDecimals,allowDuplicatedCategory:nD.allowDuplicatedCategory,angle:nD.angle,axisLine:aA.axisLine,hide:!1,includeHidden:nD.includeHidden,interval:nD.interval,label:!1,minTickGap:nD.minTickGap,mirror:nD.mirror,orientation:nD.orientation,padding:nD.padding,reversed:nD.reversed,scale:nD.scale,tick:nD.tick,tickCount:nD.tickCount,tickLine:aA.tickLine,tickSize:aA.tickSize,type:nD.type,niceTicks:nD.niceTicks,width:nD.width,yAxisId:0},aVn=e=>{var t=uS(e,iVn);return HA.createElement(HA.Fragment,null,HA.createElement($Bn,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),HA.createElement(eVn,t))},WA=HA.memo(aVn,TBn),WA.displayName=`YAxis`}));function sVn(e){var t=kS(),n=(0,GA.useRef)(null);return(0,GA.useLayoutEffect)(()=>{n.current===null?t(mjn(e)):n.current!==e&&t(hjn({prev:n.current,next:e})),n.current=e},[e,t]),(0,GA.useLayoutEffect)(()=>()=>{n.current&&(t(gjn(n.current)),n.current=null)},[t]),null}function cVn(e){var t=uS(e,uVn);return lVn.createElement(sVn,{domain:t.domain,id:t.zAxisId,dataKey:t.dataKey,name:t.name,unit:t.unit,range:t.range,scale:t.scale,type:t.type,allowDuplicatedCategory:iD.allowDuplicatedCategory,allowDataOverflow:iD.allowDataOverflow,reversed:iD.reversed,includeHidden:iD.includeHidden})}var lVn,GA,uVn,dVn=o((()=>{lVn=d(p()),GA=d(p()),Ik(),jS(),ND(),dS(),uVn={zAxisId:0,range:iD.range,scale:iD.scale,type:iD.type},cVn.displayName=`ZAxis`})),fVn,KA,pVn=o((()=>{NS(),fw(),YD(),qC(),QD(),vT(),Afn(),fVn=(e,t)=>t,KA=MS([fVn,ow,_T,CT,GSn,KD,ACn,GC],VCn)}));function mVn(e){return`getBBox`in e.currentTarget&&typeof e.currentTarget.getBBox==`function`}function hVn(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(mVn(e)){var i=e.currentTarget.getBBox();n=i.width>0?t.width/i.width:1,r=i.height>0?t.height/i.height:1}else{var a=e.currentTarget;n=a.offsetWidth>0?t.width/a.offsetWidth:1,r=a.offsetHeight>0?t.height/a.offsetHeight:1}var o=(e,i)=>({relativeX:Math.round((e-t.left)/n),relativeY:Math.round((i-t.top)/r)});return`touches`in e?Array.from(e.touches).map(e=>o(e.clientX,e.clientY)):o(e.clientX,e.clientY)}var gVn=o((()=>{})),_Vn,vVn,qA,yVn,JA,YA,XA,bVn=o((()=>{EC(),BD(),pVn(),FD(),gVn(),_Vn=fC(`mouseClick`),vVn=TC(),vVn.startListening({actionCreator:_Vn,effect:(e,t)=>{var n=e.payload,r=KA(t.getState(),hVn(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(Lxn({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}}),qA=fC(`mouseMove`),yVn=TC(),JA=null,YA=null,XA=null,yVn.startListening({actionCreator:qA,effect:(e,t)=>{var n=e.payload,r=t.getState().eventSettings,i=r.throttleDelay,a=r.throttledEvents,o=a===`all`||(a==null?void 0:a.includes(`mousemove`));JA!==null&&(cancelAnimationFrame(JA),JA=null),YA!==null&&(typeof i!=`number`||!o)&&(clearTimeout(YA),YA=null),XA=hVn(n);var s=()=>{var e=t.getState(),n=PD(e,e.tooltip.settings.shared);if(!XA)JA=null,YA=null;else{if(n===`axis`){var r=KA(e,XA);(r==null?void 0:r.activeIndex)==null?t.dispatch(Pxn()):t.dispatch(Ixn({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}JA=null,YA=null}};o?i===`raf`?JA=requestAnimationFrame(s):typeof i==`number`&&YA===null&&(YA=setTimeout(s,i)):s()}})}));function xVn(e,t){return t instanceof HTMLElement?`HTMLElement <${t.tagName} class="${t.className}">`:t===window?`global.window`:e===`children`&&typeof t==`object`&&t?`<>`:t}var SVn=o((()=>{})),CVn,wVn,TVn,EVn,DVn=o((()=>{EC(),CVn={accessibilityLayer:!0,barCategoryGap:`10%`,barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:`none`,syncId:void 0,syncMethod:`index`,baseValue:void 0,reverseStackOrder:!1},wVn=gC({name:`rootProps`,initialState:CVn,reducers:{updateOptions:(e,t)=>{e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=t.payload.barGap??CVn.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),TVn=wVn.reducer,EVn=wVn.actions.updateOptions})),OVn,kVn,AVn,jVn=o((()=>{EC(),OVn=gC({name:`polarOptions`,initialState:null,reducers:{updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),kVn=OVn.actions.updatePolarOptions,AVn=OVn.reducer})),MVn,NVn,PVn,ZA,QA,$A,ej,FVn=o((()=>{EC(),BD(),YD(),QD(),ND(),Zxn(),FD(),MVn=fC(`keyDown`),NVn=fC(`focus`),PVn=fC(`blur`),ZA=TC(),QA=null,$A=null,ej=null,ZA.startListening({actionCreator:MVn,effect:(e,t)=>{ej=e.payload,QA!==null&&(cancelAnimationFrame(QA),QA=null);var n=t.getState().eventSettings,r=n.throttleDelay,i=n.throttledEvents,a=i===`all`||i.includes(`keydown`);$A!==null&&(typeof r!=`number`||!a)&&(clearTimeout($A),$A=null);var o=()=>{try{var e=t.getState();if(e.rootProps.accessibilityLayer===!1)return;var n=e.tooltip.keyboardInteraction,r=ej;if(r!==`ArrowRight`&&r!==`ArrowLeft`&&r!==`Enter`)return;var i=VD(n,WD(e),hD(e),GD(e)),a=i==null?-1:Number(i),o=!Number.isFinite(a)||a<0,s=KD(e),l=WD(e),u=PD(e,e.tooltip.settings.shared);if(r===`Enter`){if(o)return;var d=ZD(e,u,`hover`,String(n.index));t.dispatch(zD({active:!n.active,activeIndex:n.index,activeCoordinate:d}));return}var f=gxn(e)===`left-to-right`?1:-1,p=r===`ArrowRight`?1:-1,m;if(o){var h=hD(e),g=GD(e),_=p*f,v=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(m=-1,_>0){for(var y=0;y=0;b--)if(VD(v(b),l,h,g)!=null){m=b;break}if(m<0)return}else{m=a+p*f;var x=(s==null?void 0:s.length)||l.length;if(x===0||m>=x||m<0)return}var S=ZD(e,u,`hover`,String(m));t.dispatch(zD({active:!0,activeIndex:m.toString(),activeCoordinate:S}))}finally{QA=null,$A=null}};a?r===`raf`?QA=requestAnimationFrame(o):typeof r==`number`&&$A===null&&(o(),ej=null,$A=setTimeout(()=>{ej?o():($A=null,QA=null)},r)):o()}}),ZA.startListening({actionCreator:NVn,effect:(e,t)=>{var n=t.getState();if(n.rootProps.accessibilityLayer!==!1){var r=n.tooltip.keyboardInteraction;if(!r.active&&r.index==null){var i=`0`,a=PD(n,n.tooltip.settings.shared),o=ZD(n,a,`hover`,String(i));t.dispatch(zD({active:!0,activeIndex:i,activeCoordinate:o}))}}}}),ZA.startListening({actionCreator:PVn,effect:(e,t)=>{var n=t.getState();if(n.rootProps.accessibilityLayer!==!1){var r=n.tooltip.keyboardInteraction;r.active&&t.dispatch(zD({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}})}));function IVn(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(e,n)=>{if(n===`currentTarget`)return t;var r=Reflect.get(e,n);return typeof r==`function`?r.bind(e):r}})}var LVn=o((()=>{})),tj,RVn,nj,rj,ij,zVn=o((()=>{EC(),YD(),LVn(),tj=fC(`externalEvent`),RVn=TC(),nj=new Map,rj=new Map,ij=new Map,RVn.startListening({actionCreator:tj,effect:(e,t)=>{var n=e.payload,r=n.handler,i=n.reactEvent;if(r!=null){var a=i.type,o=IVn(i);ij.set(a,{handler:r,reactEvent:o});var s=nj.get(a);s!==void 0&&(cancelAnimationFrame(s),nj.delete(a));var l=t.getState().eventSettings,u=l.throttleDelay,d=l.throttledEvents,f=d===`all`||(d==null?void 0:d.includes(a)),p=rj.get(a);p!==void 0&&(typeof u!=`number`||!f)&&(clearTimeout(p),rj.delete(a));var m=()=>{var e=ij.get(a);try{if(!e)return;var n=e.handler,r=e.reactEvent,i=t.getState(),o={activeCoordinate:aCn(i),activeDataKey:tCn(i),activeIndex:JD(i),activeLabel:eCn(i),activeTooltipIndex:JD(i),isTooltipActive:oCn(i)};n&&n(o,r)}finally{nj.delete(a),rj.delete(a),ij.delete(a)}};if(!f)m();else if(u===`raf`){var h=requestAnimationFrame(m);nj.set(a,h)}else if(typeof u==`number`){if(!rj.has(a)){m();var g=setTimeout(m,u);rj.set(a,g)}}else m()}}})})),BVn,VVn,HVn=o((()=>{NS(),iSn(),BVn=MS([HD],e=>e.tooltipItemPayloads),VVn=MS([BVn,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(e=>e.settings.graphicalItemId===n);if(r!=null){var i=r.getPosition;if(i!=null)return i(t)}}})})),UVn,WVn,aj,oj,GVn,sj,KVn=o((()=>{EC(),BD(),pVn(),gVn(),FD(),WC(),HVn(),YD(),LVn(),UVn=fC(`touchMove`),WVn=TC(),aj=null,oj=null,GVn=null,sj=null,WVn.startListening({actionCreator:UVn,effect:(e,t)=>{var n=e.payload;if(n.touches!=null&&n.touches.length!==0){sj=IVn(n);var r=t.getState().eventSettings,i=r.throttleDelay,a=r.throttledEvents,o=a===`all`||a.includes(`touchmove`);aj!==null&&(cancelAnimationFrame(aj),aj=null),oj!==null&&(typeof i!=`number`||!o)&&(clearTimeout(oj),oj=null),GVn=Array.from(n.touches).map(e=>hVn({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(sj!=null){var e=t.getState(),n=PD(e,e.tooltip.settings.shared);if(n===`axis`){var r,i=(r=GVn)==null?void 0:r[0];if(i==null){aj=null,oj=null;return}var a=KA(e,i);(a==null?void 0:a.activeIndex)!=null&&t.dispatch(Ixn({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(n===`item`){var o=sj.touches[0];if(document.elementFromPoint==null||o==null)return;var s=document.elementFromPoint(o.clientX,o.clientY);if(!s||!s.getAttribute)return;var l=s.getAttribute(Nan),u=s.getAttribute(`data-recharts-item-id`)??void 0,d=UD(e).find(e=>e.id===u);if(l==null||d==null||u==null)return;var f=d.dataKey,p=VVn(e,l,u);t.dispatch(Mxn({activeDataKey:f,activeIndex:l,activeCoordinate:p,activeGraphicalItemId:u}))}aj=null,oj=null}};o?i===`raf`?aj=requestAnimationFrame(s):typeof i==`number`&&oj===null&&(s(),sj=null,oj=setTimeout(()=>{sj?s():(oj=null,aj=null)},i)):s()}}})})),cj,qVn,JVn,YVn,lj=o((()=>{EC(),dC(),cj={throttleDelay:`raf`,throttledEvents:[`mousemove`,`touchmove`,`pointermove`,`scroll`,`wheel`]},qVn=gC({name:`eventSettings`,initialState:cj,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=uC(t.payload.throttledEvents))}}}),JVn=qVn.actions.setEventSettings,YVn=qVn.reducer})),XVn,ZVn,QVn=o((()=>{EC(),lO(),BD(),dO(),aan(),bVn(),SVn(),Ik(),tAn(),hPn(),cPn(),Won(),DVn(),rOn(),jVn(),FVn(),zVn(),KVn(),SIn(),ww(),awn(),lj(),cFn(),XVn=qnn({brush:sPn,cartesianAxis:yjn,chartData:Fwn,errorBars:xIn,eventSettings:YVn,graphicalItems:eAn,layout:ian,legend:Uon,options:Dwn,polarAxis:nOn,polarOptions:AVn,referenceElements:mPn,renderedTicks:sFn,rootProps:TVn,tooltip:Rxn,zIndex:iwn}),ZVn=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`Chart`;return iin({reducer:XVn,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:![`commonjs`,`es6`,`production`].includes(`es6`)}).concat([vVn.middleware,yVn.middleware,ZA.middleware,RVn.middleware,WVn.middleware]),enhancers:e=>{var t=e;return typeof e==`function`&&(t=e()),t.concat(win({type:`raf`}))},devTools:Cw.devToolsEnabled&&{serialize:{replacer:xVn},name:`recharts-${t}`}})}}));function $Vn(e){var t=e.preloadedState,n=e.children,r=e.reduxStoreName,i=JC(),a=(0,tHn.useRef)(null);if(i)return n;a.current??(a.current=ZVn(t,r));var o=Wtn;return eHn.createElement(usn,{context:o,store:a.current},n)}var eHn,tHn,nHn=o((()=>{eHn=d(p()),tHn=d(p()),dsn(),QVn(),YC(),Gtn()}));function rHn(e){var t=e.layout,n=e.margin,r=kS(),i=JC();return(0,iHn.useEffect)(()=>{i||(r(tan(t)),r(ean(n)))},[r,i,t,n]),null}var iHn,aHn,oHn=o((()=>{iHn=d(p()),YC(),aan(),jS(),gw(),aHn=(0,iHn.memo)(rHn,hw)}));function sHn(e){var t=kS();return(0,cHn.useEffect)(()=>{t(EVn(e))},[t,e]),null}var cHn,lHn=o((()=>{cHn=d(p()),DVn(),jS()})),uHn,dHn,fHn,pHn=o((()=>{uHn=d(p()),jS(),lj(),gw(),dHn=e=>{var t=kS();return(0,uHn.useEffect)(()=>{t(JVn(e))},[t,e]),null},fHn=(0,uHn.memo)(dHn,hw)}));function mHn(e){var t=e.zIndex,n=e.isPanorama,r=(0,gHn.useRef)(null),i=kS();return(0,gHn.useLayoutEffect)(()=>(r.current&&i(nwn({zIndex:t,element:r.current,isPanorama:n})),()=>{i(rwn({zIndex:t,isPanorama:n}))}),[i,t,n]),uj.createElement(`g`,{tabIndex:-1,ref:r,className:`recharts-zIndex-layer_${t}`})}function hHn(e){var t=e.children,n=e.isPanorama,r=OS(UCn);if(!r||r.length===0)return t;var i=r.filter(e=>e<0),a=r.filter(e=>e>0);return uj.createElement(uj.Fragment,null,i.map(e=>uj.createElement(mHn,{key:e,zIndex:e,isPanorama:n})),t,a.map(e=>uj.createElement(mHn,{key:e,zIndex:e,isPanorama:n})))}var uj,gHn,_Hn=o((()=>{uj=d(p()),gHn=d(p()),jS(),awn(),WCn()}));function vHn(e,t){if(e==null)return{};var n,r,i=yHn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r{fj=d(p()),bHn=d(p()),fw(),zcn(),YC(),v8t(),jS(),Jan(),AC(),_Hn(),xHn=[`children`],SHn={width:`100%`,height:`100%`,display:`block`},CHn=(0,bHn.forwardRef)((e,t)=>{var n=iw(),r=aw(),i=Rcn();if(!kC(n)||!kC(r))return null;var a=e.children,o=e.otherAttributes,s=e.title,l=e.desc,u,d;return o!=null&&(u=typeof o.tabIndex==`number`?o.tabIndex:i?0:void 0,d=typeof o.role==`string`?o.role:i?`application`:void 0),fj.createElement(_8t,dj({},o,{title:s,desc:l,role:d,tabIndex:u,width:n,height:r,style:SHn,ref:t}),a)}),wHn=e=>{var t=e.children,n=OS(ZC);if(!n)return null;var r=n.width,i=n.height,a=n.y,o=n.x;return fj.createElement(_8t,{width:r,height:i,x:o,y:a},t)},THn=(0,bHn.forwardRef)((e,t)=>{var n=e.children,r=vHn(e,xHn);return JC()?fj.createElement(wHn,null,fj.createElement(hHn,{isPanorama:!0},n)):fj.createElement(CHn,dj({ref:t},r),fj.createElement(hHn,{isPanorama:!1},n))})}));function DHn(e,t){return MHn(e)||jHn(e,t)||kHn(e,t)||OHn()}function OHn(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kHn(e,t){if(e){if(typeof e==`string`)return AHn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AHn(e,t):void 0}}function AHn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{if(n!=null){var t=n.getBoundingClientRect().width/n.offsetWidth;OC(t)&&t!==i&&e(ran(t))}},[n,e,i]),r}var PHn,FHn=o((()=>{PHn=d(p()),jS(),VC(),aan(),AC()}));function IHn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LHn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{gj=d(p()),_j=d(p()),ze(),BD(),jS(),bVn(),qwn(),FVn(),FHn(),zVn(),KVn(),ywn(),i5t(),fw(),jon(),qHn=()=>(Wwn(),null),JHn=(0,_j.forwardRef)((e,t)=>{var n,r,i=(0,_j.useRef)(null),a=mj((0,_j.useState)({containerWidth:hj((n=e.style)==null?void 0:n.width),containerHeight:hj((r=e.style)==null?void 0:r.height)}),2),o=a[0],s=a[1],l=(0,_j.useCallback)((e,t)=>{s(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),u=(0,_j.useCallback)(e=>{if(typeof t==`function`&&t(e),i.current!=null&&(i.current.disconnect(),i.current=null),e!=null&&typeof ResizeObserver<`u`){var n=e.getBoundingClientRect(),r=n.width,a=n.height;l(r,a);var o=new ResizeObserver(e=>{var t=e[0];if(t!=null){var n=t.contentRect,r=n.width,i=n.height;l(r,i)}});o.observe(e),i.current=o}},[t,l]);return(0,_j.useEffect)(()=>()=>{var e=i.current;e!=null&&e.disconnect()},[l]),gj.createElement(gj.Fragment,null,gj.createElement(dw,{width:o.containerWidth,height:o.containerHeight}),gj.createElement(`div`,pj({ref:u},e)))}),YHn=(0,_j.forwardRef)((e,t)=>{var n=e.width,r=e.height,i=mj((0,_j.useState)({containerWidth:hj(n),containerHeight:hj(r)}),2),a=i[0],o=i[1],s=(0,_j.useCallback)((e,t)=>{o(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),l=(0,_j.useCallback)(e=>{if(typeof t==`function`&&t(e),e!=null){var n=e.getBoundingClientRect(),r=n.width,i=n.height;s(r,i)}},[t,s]);return gj.createElement(gj.Fragment,null,gj.createElement(dw,{width:a.containerWidth,height:a.containerHeight}),gj.createElement(`div`,pj({ref:l},e)))}),XHn=(0,_j.forwardRef)((e,t)=>{var n=e.width,r=e.height;return gj.createElement(gj.Fragment,null,gj.createElement(dw,{width:n,height:r}),gj.createElement(`div`,pj({ref:t},e)))}),ZHn=(0,_j.forwardRef)((e,t)=>{var n=e.width,r=e.height;return typeof n==`string`||typeof r==`string`?gj.createElement(YHn,pj({},e,{ref:t})):typeof n==`number`&&typeof r==`number`?gj.createElement(XHn,pj({},e,{width:n,height:r,ref:t})):gj.createElement(gj.Fragment,null,gj.createElement(dw,{width:n,height:r}),gj.createElement(`div`,pj({ref:t},e)))}),QHn=(0,_j.forwardRef)((e,t)=>{var n=e.children,r=e.className,i=e.height,a=e.onClick,o=e.onContextMenu,s=e.onDoubleClick,l=e.onMouseDown,u=e.onMouseEnter,d=e.onMouseLeave,f=e.onMouseMove,p=e.onMouseUp,m=e.onTouchEnd,h=e.onTouchMove,g=e.onTouchStart,_=e.style,v=e.width,y=e.responsive,b=e.dispatchTouchEvents,x=b===void 0||b,S=(0,_j.useRef)(null),C=kS(),w=mj((0,_j.useState)(null),2),T=w[0],E=w[1],D=mj((0,_j.useState)(null),2),O=D[0],k=D[1],A=NHn(),j=nw(),M=(j==null?void 0:j.width)>0?j.width:v,N=(j==null?void 0:j.height)>0?j.height:i,P=(0,_j.useCallback)(e=>{A(e),typeof t==`function`&&t(e),E(e),k(e),e!=null&&(S.current=e)},[A,t,E,k]),F=(0,_j.useCallback)(e=>{C(_Vn(e)),C(tj({handler:a,reactEvent:e}))},[C,a]),I=(0,_j.useCallback)(e=>{C(qA(e)),C(tj({handler:u,reactEvent:e}))},[C,u]),L=(0,_j.useCallback)(e=>{C(Pxn()),C(tj({handler:d,reactEvent:e}))},[C,d]),R=(0,_j.useCallback)(e=>{C(qA(e)),C(tj({handler:f,reactEvent:e}))},[C,f]),ee=(0,_j.useCallback)(()=>{C(NVn())},[C]),te=(0,_j.useCallback)(()=>{C(PVn())},[C]),ne=(0,_j.useCallback)(e=>{C(MVn(e.key))},[C]),z=(0,_j.useCallback)(e=>{C(tj({handler:o,reactEvent:e}))},[C,o]),re=(0,_j.useCallback)(e=>{C(tj({handler:s,reactEvent:e}))},[C,s]),ie=(0,_j.useCallback)(e=>{C(tj({handler:l,reactEvent:e}))},[C,l]),ae=(0,_j.useCallback)(e=>{C(tj({handler:p,reactEvent:e}))},[C,p]),oe=(0,_j.useCallback)(e=>{C(tj({handler:g,reactEvent:e}))},[C,g]),se=(0,_j.useCallback)(e=>{x&&C(UVn(e)),C(tj({handler:h,reactEvent:e}))},[C,x,h]),ce=(0,_j.useCallback)(e=>{C(tj({handler:m,reactEvent:e}))},[C,m]),le=KHn(y);return gj.createElement(_wn.Provider,{value:T},gj.createElement(n5t.Provider,{value:O},gj.createElement(le,{width:M??(_==null?void 0:_.width),height:N??(_==null?void 0:_.height),className:Re(`recharts-wrapper`,r),style:LHn({position:`relative`,cursor:`default`,width:M,height:N},_),onClick:F,onContextMenu:z,onDoubleClick:re,onFocus:ee,onBlur:te,onKeyDown:ne,onMouseDown:ie,onMouseEnter:I,onMouseLeave:L,onMouseMove:R,onMouseUp:ae,onTouchEnd:ce,onTouchMove:se,onTouchStart:oe,ref:P},gj.createElement(qHn,null),n)))})}));function eUn(e,t){if(e==null)return{};var n,r,i=tUn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r{vj=d(p()),nUn=d(p()),EHn(),$Hn(),TPn(),hx(),fw(),rUn=[`width`,`height`,`responsive`,`children`,`className`,`style`,`compact`,`title`,`desc`],iUn=(0,nUn.forwardRef)((e,t)=>{var n=e.width,r=e.height,i=e.responsive,a=e.children,o=e.className,s=e.style,l=e.compact,u=e.title,d=e.desc,f=px(eUn(e,rUn));return l?vj.createElement(vj.Fragment,null,vj.createElement(dw,{width:n,height:r}),vj.createElement(THn,{otherAttributes:f,title:u,desc:d},a)):vj.createElement(QHn,{className:o,style:s,width:n,height:r,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},vj.createElement(THn,{otherAttributes:f,title:u,desc:d,ref:t},vj.createElement(wPn,null,a)))})}));function oUn(){return oUn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{yj=d(p()),fUn=d(p()),nHn(),iPn(),oHn(),lHn(),pHn(),aUn(),dS(),lj(),pUn={top:5,right:5,bottom:5,left:5},mUn=cUn({accessibilityLayer:!0,barCategoryGap:`10%`,barGap:4,layout:`horizontal`,margin:pUn,responsive:!1,reverseStackOrder:!1,stackOffset:`none`,syncMethod:`index`},cj),bj=(0,fUn.forwardRef)(function(e,t){var n=uS(e.categoricalChartProps,mUn),r=e.chartName,i=e.defaultTooltipEventType,a=e.validateTooltipEventTypes,o=e.tooltipPayloadSearcher,s=e.categoricalChartProps,l={chartName:r,defaultTooltipEventType:i,validateTooltipEventTypes:a,tooltipPayloadSearcher:o,eventEmitter:void 0};return yj.createElement($Vn,{preloadedState:{options:l},reduxStoreName:s.id??r},yj.createElement(rPn,{chartData:s.data}),yj.createElement(aHn,{layout:n.layout,margin:n.margin}),yj.createElement(fHn,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),yj.createElement(sHn,{baseValue:n.baseValue,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),yj.createElement(iUn,oUn({},n,{ref:t})))})})),hUn,gUn,_Un,vUn,yUn=o((()=>{hUn=d(p()),gUn=d(p()),lO(),xj(),_Un=[`axis`],vUn=(0,gUn.forwardRef)((e,t)=>hUn.createElement(bj,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:_Un,tooltipPayloadSearcher:cO,categoricalChartProps:e,ref:t}))})),bUn,xUn,SUn,CUn,wUn=o((()=>{bUn=d(p()),xUn=d(p()),lO(),xj(),SUn=[`axis`,`item`],CUn=(0,xUn.forwardRef)((e,t)=>bUn.createElement(bj,{chartName:`BarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:SUn,tooltipPayloadSearcher:cO,categoricalChartProps:e,ref:t}))}));function TUn(e){var t=kS();return(0,EUn.useEffect)(()=>{t(kVn(e))},[t,e]),null}var EUn,DUn=o((()=>{EUn=d(p()),jS(),jVn()}));function OUn(){return OUn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{IUn=d(p()),Sj=d(p()),nHn(),iPn(),oHn(),lHn(),pHn(),DUn(),aUn(),dS(),lj(),LUn=[`layout`],RUn={top:5,right:5,bottom:5,left:5},Cj=MUn({accessibilityLayer:!0,stackOffset:`none`,barCategoryGap:`10%`,barGap:4,margin:RUn,reverseStackOrder:!1,syncMethod:`index`,layout:`radial`,responsive:!1,cx:`50%`,cy:`50%`,innerRadius:0,outerRadius:`80%`},cj),wj=(0,IUn.forwardRef)(function(e,t){var n=uS(e.categoricalChartProps,Cj),r=n.layout,i=kUn(n,LUn),a=e.chartName,o={chartName:a,defaultTooltipEventType:e.defaultTooltipEventType,validateTooltipEventTypes:e.validateTooltipEventTypes,tooltipPayloadSearcher:e.tooltipPayloadSearcher,eventEmitter:void 0};return Sj.createElement($Vn,{preloadedState:{options:o},reduxStoreName:n.id??a},Sj.createElement(rPn,{chartData:n.data}),Sj.createElement(aHn,{layout:r,margin:n.margin}),Sj.createElement(fHn,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),Sj.createElement(sHn,{baseValue:void 0,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),Sj.createElement(TUn,{cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius}),Sj.createElement(iUn,OUn({},i,{ref:t})))})}));function BUn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VUn(e){for(var t=1;t{GUn=d(p()),KUn=d(p()),lO(),zUn(),dS(),qUn=[`item`],JUn=VUn(VUn({},Cj),{},{layout:`centric`,startAngle:0,endAngle:360}),YUn=(0,KUn.forwardRef)((e,t)=>{var n=uS(e,JUn);return GUn.createElement(wj,{chartName:`PieChart`,defaultTooltipEventType:`item`,validateTooltipEventTypes:qUn,tooltipPayloadSearcher:cO,categoricalChartProps:n,ref:t})})}));function ZUn(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){var t;let n=e[Symbol.toStringTag];return n==null||!((t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&t.writable)?!1:e.toString()===`[object ${n}]`}let n=e;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}var QUn=o((()=>{}));function $Un(e){return Array.isArray(e)}var eWn=o((()=>{}));function tWn(e){let t=e==null?void 0:e.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}var nWn=o((()=>{}));function Tj(e){return Een(e)}var Ej=o((()=>{Den()}));function rWn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iWn(e){for(var t=1;t{cWn=d(p()),lWn=d(p()),lO(),dS(),zUn(),uWn=[`axis`],dWn=iWn(iWn({},Cj),{},{layout:`centric`,startAngle:90,endAngle:-270}),fWn=(0,lWn.forwardRef)((e,t)=>{var n=uS(e,dWn);return cWn.createElement(wj,{chartName:`RadarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:uWn,tooltipPayloadSearcher:cO,categoricalChartProps:n,ref:t})})})),mWn,hWn,gWn,_Wn,vWn=o((()=>{mWn=d(p()),hWn=d(p()),lO(),xj(),gWn=[`item`],_Wn=(0,hWn.forwardRef)((e,t)=>mWn.createElement(bj,{chartName:`ScatterChart`,defaultTooltipEventType:`item`,validateTooltipEventTypes:gWn,tooltipPayloadSearcher:cO,categoricalChartProps:e,ref:t}))})),yWn,bWn,xWn,SWn,CWn=o((()=>{yWn=d(p()),bWn=d(p()),lO(),xj(),xWn=[`axis`],SWn=(0,bWn.forwardRef)((e,t)=>yWn.createElement(bj,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:xWn,tooltipPayloadSearcher:cO,categoricalChartProps:e,ref:t}))}));function wWn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TWn(e){for(var t=1;t{kWn=d(p()),AWn=d(p()),lO(),dS(),zUn(),jWn=[`axis`,`item`],MWn=TWn(TWn({},Cj),{},{layout:`radial`,startAngle:0,endAngle:360}),NWn=(0,AWn.forwardRef)((e,t)=>{var n=uS(e,MWn);return kWn.createElement(wj,{chartName:`RadialBarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:jWn,tooltipPayloadSearcher:cO,categoricalChartProps:n,ref:t})})})),FWn,IWn,LWn,RWn,zWn=o((()=>{FWn=d(p()),IWn=d(p()),lO(),xj(),LWn=[`axis`],RWn=(0,IWn.forwardRef)((e,t)=>FWn.createElement(bj,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:LWn,tooltipPayloadSearcher:cO,categoricalChartProps:e,ref:t}))})),BWn=o((()=>{v8t(),yx(),Ksn(),hen(),fTn(),scn(),jon(),gO(),SO(),AO(),LO(),non(),cdn(),jw(),Nun(),pDn(),HO(),uln(),q9t(),XDn(),Ftn(),ze(),Vw(),lS(),rOn(),jS(),ZO(),vT(),tfn(),hx(),nO(),fw(),Lx(),fT(),DOn(),IAn(),xMn(),tPn(),cyn(),_dn(),RC(),iPn(),dO(),cPn(),YC(),Jan(),qwn(),dPn(),hPn(),ND(),TPn(),_x(),sT(),jFn(),rIn(),yLn(),pRn(),Mzn(),$Rn(),xBn(),WBn(),oVn(),dVn(),AIn(),Rk(),kln(),aun(),ww(),Ccn(),Bln(),Hln(),yUn(),wUn(),XUn(),O8t(),Stn(),hS(),ktn(),L8t(),z8t(),TS(),Ej(),mdn(),xx(),WC(),kTn(),ywn(),$Hn(),BD(),mk(),nHn(),pHn(),Tk(),lj(),pWn(),vWn(),CWn(),PWn(),zWn(),QD(),$ln(),nun(),wx(),ck(),fk(),NS(),qC(),qw(),ak(),Ck(),yk(),lO(),xj(),HLn(),gIn(),Jdn(),LFn(),NFn()}));function VWn(){let e=Dj.useContext(GWn);if(!e)throw Error(`useChart must be used within a `);return e}function HWn(){return(0,Oj.jsx)(`style`,{dangerouslySetInnerHTML:{__html:KWn}})}function UWn(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}var Dj,Oj,WWn,GWn,kj,KWn,qWn,Aj,jj,Mj,Nj,JWn=o((()=>{Dj=d(p(),1),BWn(),Sn(),Oj=Ie(),WWn={light:``,dark:`.dark`},GWn=Dj.createContext(null),kj=Dj.forwardRef(({id:e,className:t,children:n,config:r,...i},a)=>{let o=Dj.useId(),s=`chart-${e||o.replace(/:/g,``)}`;return Dj.useEffect(()=>{let e=requestAnimationFrame(()=>{window.dispatchEvent(new Event(`resize`))});return()=>cancelAnimationFrame(e)},[]),(0,Oj.jsx)(GWn.Provider,{value:{config:r},children:(0,Oj.jsxs)(`div`,{"data-chart":s,ref:a,className:xn(`flex w-full min-w-0 aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-layer]:outline-none [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none`,t),...i,children:[(0,Oj.jsx)(HWn,{}),(0,Oj.jsx)(qWn,{id:s,config:r}),(0,Oj.jsx)(Aon,{children:n})]})})}),kj.displayName=`Chart`,KWn=[`[data-chart] .recharts-cartesian-grid line[stroke='#ccc'] { stroke: color-mix(in oklch, var(--color-border) 50%, transparent); }`,`[data-chart] .recharts-dot[stroke='#fff'] { stroke: transparent; }`,`[data-chart] .recharts-polar-grid [stroke='#ccc'] { stroke: var(--color-border); }`,`[data-chart] .recharts-reference-line [stroke='#ccc'] { stroke: var(--color-border); }`,`[data-chart] .recharts-sector[stroke='#fff'] { stroke: transparent; }`].join(` `),qWn=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme||e.color);return n.length?(0,Oj.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(WWn).map(([t,r])=>` ${r} [data-chart=${e}] { ${n.map(([e,n])=>{var r;let i=((r=n.theme)==null?void 0:r[t])||n.color;return i?` --color-${e}: ${i};`:null}).join(` `)} } `).join(` `)}}):null},Aj=sTn,jj=Dj.forwardRef(({active:e,payload:t,className:n,indicator:r=`dot`,hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:l,formatter:u,color:d,nameKey:f,labelKey:p,valueFormatter:m},h)=>{let{config:g}=VWn(),_=Dj.useMemo(()=>{var e;if(i||!(t!=null&&t.length))return null;let[n]=t,r=`${p||(n==null?void 0:n.dataKey)||(n==null?void 0:n.name)||`value`}`,a=UWn(g,n,r),u=!p&&typeof o==`string`?((e=g[o])==null?void 0:e.label)||o:a==null?void 0:a.label;return s?(0,Oj.jsx)(`div`,{className:xn(`font-medium`,l),children:s(u,t)}):u?(0,Oj.jsx)(`div`,{className:xn(`font-medium`,l),children:u}):null},[o,s,t,i,l,g,p]);if(!e||!(t!=null&&t.length))return null;let v=t.length===1&&r!==`dot`;return(0,Oj.jsxs)(`div`,{ref:h,className:xn(`grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl`,n),children:[v?null:_,(0,Oj.jsx)(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let n=`${f||e.name||e.dataKey||`value`}`,i=UWn(g,e,n),o=d||e.payload.fill||e.color;return(0,Oj.jsx)(`div`,{className:xn(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground`,r===`dot`&&`items-center`),children:u&&(e==null?void 0:e.value)!==void 0&&e.name?u(e.value,e.name,e,t,e.payload):(0,Oj.jsxs)(Oj.Fragment,{children:[i!=null&&i.icon?(0,Oj.jsx)(i.icon,{}):!a&&(0,Oj.jsx)(`div`,{className:xn(`shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]`,{"h-2.5 w-2.5":r===`dot`,"w-1":r===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":r===`dashed`,"my-0.5":v&&r===`dashed`}),style:{"--color-bg":o,"--color-border":o}}),(0,Oj.jsxs)(`div`,{className:xn(`flex flex-1 justify-between gap-3 leading-none`,v?`items-end`:`items-center`),children:[(0,Oj.jsxs)(`div`,{className:`grid gap-1.5`,children:[v?_:null,(0,Oj.jsx)(`span`,{className:`text-muted-foreground`,children:(i==null?void 0:i.label)||e.name})]}),e.value!=null&&(0,Oj.jsx)(`span`,{className:`font-mono font-medium tabular-nums text-foreground`,children:m?m(e.value):e.value.toLocaleString()})]})]})},`${e.dataKey??e.name??t}`)})})]})}),jj.displayName=`ChartTooltip`,Mj=Gsn,Nj=Dj.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r=`bottom`,nameKey:i},a)=>{let{config:o}=VWn();return n!=null&&n.length?(0,Oj.jsx)(`div`,{ref:a,className:xn(`flex flex-wrap items-center justify-center gap-4`,r===`top`?`pb-3`:`pt-3`,e),children:n.filter(e=>e.type!==`none`).map(e=>{let n=`${i||e.dataKey||`value`}`,r=UWn(o,e,n);return(0,Oj.jsxs)(`div`,{className:xn(`flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground`),children:[r!=null&&r.icon&&!t?(0,Oj.jsx)(r.icon,{}):(0,Oj.jsx)(`div`,{className:`h-2 w-2 shrink-0 rounded-[2px]`,style:{backgroundColor:e.color}}),r==null?void 0:r.label]},e.value)})}):null}),Nj.displayName=`ChartLegend`}));function YWn(e,t,n,r){let i=Math.min(...e),a=Math.max(...e)-i||1,o=r/2,s=n*.7-o,l=o;return e.map((n,r)=>`${e.length===1?t/2:r/(e.length-1)*t},${l+s*(1-(n-i)/a)}`).join(` `)}function XWn(e,t,n,r){let i=Math.min(...e),a=Math.max(...e)-i||1,o=r/2,s=n*.7-o,l=o,u=[];for(let n=0;n0){let t=l+s*(1-(e[n-1]-i)/a);u.push(`${r},${t}`)}u.push(`${r},${o}`)}return u.join(` `)}function ZWn(e,t,n,r){if(e.length<2){let i=t/2,a=e[0],o=e[0]-a||1,s=r/2;return`M ${i},${s+(n*.7-s)*(1-(e[0]-a)/o)}`}let i=Math.min(...e),a=Math.max(...e)-i||1,o=r/2,s=n*.7-o,l=o,u=e.map((n,r)=>r/(e.length-1)*t),d=e.map(e=>l+s*(1-(e-i)/a)),f=`M ${u[0]},${d[0]}`;for(let t=0;t{let o=(e-n)/i*39;return(0,Pj.jsx)(`rect`,{x:t*(a+1),y:40-o,width:a,height:o,fill:`currentColor`,opacity:.7,rx:.5,className:r},t)})})}let m=a===`smooth`,h=a===`step`,g=m?ZWn(e,100,40,o):``,_=m?``:h?XWn(e,100,40,o):YWn(e,100,40,o),v=m?`${g} L 100,40 L 0,40 Z`:``,y=i&&!m?`${_} 100,40 0,40`:``,b={fill:`none`,stroke:`currentColor`,strokeWidth:o,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`,className:xn(`pf-sparkline-line`,r)};return(0,Pj.jsxs)(`svg`,{...Ne(d),className:xn(`pf-sparkline w-full`,f,l,u),viewBox:`0 0 100 40`,preserveAspectRatio:`none`,style:{height:t},children:[i&&(0,Pj.jsxs)(Pj.Fragment,{children:[(0,Pj.jsx)(`defs`,{children:(0,Pj.jsxs)(`linearGradient`,{id:p,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,Pj.jsx)(`stop`,{offset:`0%`,className:`pf-sparkline-fill-stop-start`}),(0,Pj.jsx)(`stop`,{offset:`100%`,className:`pf-sparkline-fill-stop-end`})]})}),m?(0,Pj.jsx)(`path`,{d:v,fill:`url(#${p})`,stroke:`none`}):(0,Pj.jsx)(`polygon`,{points:y,fill:`url(#${p})`})]}),m?(0,Pj.jsx)(`path`,{d:g,...b}):(0,Pj.jsx)(`polyline`,{points:_,...b})]})}var Pj,$Wn,eGn,tGn=o((()=>{Pe(),Sn(),Pj=Ie(),$Wn={default:`pf-sparkline-variant-default`,success:`pf-sparkline-variant-success`,warning:`pf-sparkline-variant-warning`,destructive:`pf-sparkline-variant-destructive`,info:`pf-sparkline-variant-info`,muted:`pf-sparkline-variant-muted`},eGn=0}));function nGn(e){if(e&&e!==`auto`)return t=>{let n=My(`{{ _v | ${e} }}`,{_v:t});return n==null?``:String(n)}}function rGn(e,t,n){let r=0;return e.map(e=>{let i=n?!!e[n]:!1,a=Number(e[t]??0),o=i?0:r,s=i?a:r+a;return r=s,{...e,__base:Math.min(o,s),__value:Math.abs(s-o),__end:s,__category:i?`total`:a>=0?`increase`:`decrease`}})}function iGn({rows:e,showConnectors:t,...n}){let r=Lk();if(n.x==null||n.y==null||n.width==null||n.height==null||n.index==null)return null;let i=e[n.index];if(!i)return null;let a=i.__category===`decrease`||i.__category===`total`&&i.__end<0,o=n.y+(a?n.height:0);return(0,Fj.jsxs)(`g`,{children:[(0,Fj.jsx)(Lw,{...n}),t&&r&&n.indexe.__category))),C={};for(let e of S)C[e]={label:oGn[e],color:x[e]};let w=nGn(g);return(0,Fj.jsx)(`div`,{id:v,className:_,children:(0,Fj.jsx)(kj,{config:C,style:{height:i,aspectRatio:`auto`},children:(0,Fj.jsxs)(RWn,{...Ne(y),data:b,children:[m&&(0,Fj.jsx)(cA,{vertical:!1}),(0,Fj.jsx)(VA,{dataKey:n,tickLine:!1,axisLine:!1,tickMargin:8}),h&&(0,Fj.jsx)(WA,{tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:w}),f&&(0,Fj.jsx)(Aj,{content:(0,Fj.jsx)(jj,{hideIndicator:!0,formatter:(e,n,r)=>{let i=r.payload,a=i.__category===`total`?i.__end:Number(i[t]),o=i.__category===`increase`?`+`:``,s=w?w(a):a.toLocaleString();return(0,Fj.jsxs)(`div`,{className:`pf-waterfall-tooltip-row`,children:[(0,Fj.jsx)(`span`,{className:`pf-waterfall-tooltip-label`,children:oGn[i.__category]}),(0,Fj.jsxs)(`span`,{className:`pf-waterfall-tooltip-value`,children:[o,s]})]})}})}),d&&(0,Fj.jsx)(Mj,{content:()=>(0,Fj.jsx)(Nj,{payload:S.map(e=>({value:e,dataKey:e,color:x[e],type:`square`}))})}),(0,Fj.jsx)(NA,{dataKey:`__base`,stackId:`wf`,fill:`transparent`,isAnimationActive:!1,legendType:`none`,tooltipType:`none`}),(0,Fj.jsx)(NA,{dataKey:`__value`,stackId:`wf`,radius:l,shape:(0,Fj.jsx)(iGn,{rows:b,showConnectors:u}),isAnimationActive:p,children:b.map((e,t)=>(0,Fj.jsx)(hO,{fill:x[e.__category]},t))})]})})})}var Fj,oGn,sGn=o((()=>{Pe(),BWn(),JWn(),Py(),Fj=Ie(),oGn={increase:`Increase`,decrease:`Decrease`,total:`Total`}})),cGn=l({PrefabAreaChart:()=>pGn,PrefabBarChart:()=>dGn,PrefabLineChart:()=>fGn,PrefabPieChart:()=>mGn,PrefabRadarChart:()=>hGn,PrefabRadialChart:()=>gGn,PrefabScatterChart:()=>_Gn,PrefabSparkline:()=>QWn,PrefabWaterfallChart:()=>aGn});function Ij(e){if(e&&e!==`auto`)return t=>{let n=My(`{{ _v | ${e} }}`,{_v:t});return n==null?``:String(n)}}function Lj(e){let t={};for(let n=0;n(0,zj.jsx)(NA,{isAnimationActive:f,dataKey:e.dataKey,fill:`var(--color-${e.dataKey})`,radius:l,stackId:o?`stack`:void 0},e.dataKey))]})})}function fGn({data:e=[],series:t,xAxis:n,xAxisLabel:r,yAxisLabel:i,height:a=300,curve:o=`linear`,showDots:s=!1,showLegend:l=!1,showTooltip:u=!0,animate:d=!0,showGrid:f=!0,showYAxis:p=!0,valueFormat:m=`auto`,className:h,...g}){if(typeof e==`string`||typeof t==`string`||!Array.isArray(t))return null;let _=Lj(t),v=Ij(m),y=n?r:void 0,b=lGn(y,p?i:void 0);return(0,zj.jsx)(kj,{config:_,className:h,style:{height:a,aspectRatio:`auto`},children:(0,zj.jsxs)(vUn,{...Ne(g),data:e,margin:b,children:[f&&(0,zj.jsx)(cA,{vertical:!1}),n&&(0,zj.jsx)(VA,{dataKey:n,tickLine:!1,axisLine:!1,tickMargin:8,...Rj(r,`bottom`)}),p&&(0,zj.jsx)(WA,{tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:v,...Rj(i,`left`)}),u&&(0,zj.jsx)(Aj,{content:(0,zj.jsx)(jj,{valueFormatter:v})}),l&&(0,zj.jsx)(Mj,{...y?yGn:{},content:(0,zj.jsx)(Nj,{})}),t.map(e=>(0,zj.jsx)(vLn,{isAnimationActive:d,dataKey:e.dataKey,type:bGn[o]??o,stroke:`var(--color-${e.dataKey})`,strokeWidth:2,dot:s},e.dataKey))]})})}function pGn({data:e=[],series:t,xAxis:n,height:r=300,stacked:i=!1,curve:a=`linear`,showDots:o=!1,showLegend:s=!1,showTooltip:l=!0,animate:u=!0,showGrid:d=!0,showYAxis:f=!0,valueFormat:p=`auto`,className:m,...h}){if(typeof e==`string`)return null;let g=Lj(t),_=Ij(p);return(0,zj.jsx)(kj,{config:g,className:m,style:{height:r,aspectRatio:`auto`},children:(0,zj.jsxs)(SWn,{...Ne(h),data:e,children:[d&&(0,zj.jsx)(cA,{vertical:!1}),n&&(0,zj.jsx)(VA,{dataKey:n,tickLine:!1,axisLine:!1,tickMargin:8}),f&&(0,zj.jsx)(WA,{tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:_}),l&&(0,zj.jsx)(Aj,{content:(0,zj.jsx)(jj,{valueFormatter:_})}),s&&(0,zj.jsx)(Mj,{content:(0,zj.jsx)(Nj,{})}),t.map(e=>(0,zj.jsx)(fRn,{isAnimationActive:u,dataKey:e.dataKey,type:bGn[a]??a,fill:`var(--color-${e.dataKey})`,stroke:`var(--color-${e.dataKey})`,fillOpacity:.4,dot:o,stackId:i?`stack`:void 0},e.dataKey))]})})}function mGn({data:e=[],dataKey:t,nameKey:n,aggregateBelow:r,aggregateExcept:i,height:a=300,innerRadius:o=0,showLabel:s=!1,paddingAngle:l=0,showLegend:u=!1,showTooltip:d=!0,animate:f=!0,valueFormat:p=`auto`,className:m,...h}){if(typeof e==`string`)return null;let g;try{g=e8t(e,t,n,r,i)}catch(e){return(0,zj.jsx)(`div`,{role:`alert`,children:e instanceof Error?e.message:String(e)})}let _=uGn(g,n),v=Ij(p),y=g.map((e,t)=>({...e,fill:Bj[t%Bj.length]})),b=s?`60%`:`80%`,x=o>0?`${Math.round(o/100*(s?60:80))}%`:0,S=u?Number(a)-36:a;return(0,zj.jsxs)(`div`,{className:m,children:[(0,zj.jsx)(kj,{config:_,style:{height:S,aspectRatio:`auto`},children:(0,zj.jsxs)(YUn,{...Ne(h),children:[d&&(0,zj.jsx)(Aj,{content:(0,zj.jsx)(jj,{nameKey:n,valueFormatter:v})}),(0,zj.jsx)(FAn,{isAnimationActive:f,data:y,dataKey:t,nameKey:n,innerRadius:x,outerRadius:b,label:s,paddingAngle:l})]})}),u&&(0,zj.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`center`,gap:`12px`,paddingTop:`8px`,fontSize:`12px`},children:y.map((e,t)=>(0,zj.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,zj.jsx)(`div`,{style:{width:`8px`,height:`8px`,borderRadius:`2px`,backgroundColor:e.fill,flexShrink:0}}),String(e[n]??``)]},t))})]})}function hGn({data:e=[],series:t,axisKey:n,height:r=300,filled:i=!0,showDots:a=!1,showLegend:o=!1,showTooltip:s=!0,animate:l=!0,showGrid:u=!0,className:d,...f}){if(typeof e==`string`)return null;let p=Lj(t);return(0,zj.jsx)(kj,{config:p,className:d,style:{height:r,aspectRatio:`auto`},children:(0,zj.jsxs)(fWn,{...Ne(f),data:e,children:[u&&(0,zj.jsx)(YDn,{}),n&&(0,zj.jsx)(pOn,{dataKey:n}),s&&(0,zj.jsx)(Aj,{content:(0,zj.jsx)(jj,{})}),o&&(0,zj.jsx)(Mj,{content:(0,zj.jsx)(Nj,{})}),t.map(e=>(0,zj.jsx)(mMn,{isAnimationActive:l,dataKey:e.dataKey,fill:`var(--color-${e.dataKey})`,fillOpacity:i?.3:0,stroke:`var(--color-${e.dataKey})`,strokeWidth:2,dot:a},e.dataKey))]})})}function gGn({data:e=[],dataKey:t,nameKey:n,height:r=300,innerRadius:i=30,startAngle:a=180,endAngle:o=0,showLegend:s=!1,showTooltip:l=!0,animate:u=!0,valueFormat:d=`auto`,className:f,...p}){if(typeof e==`string`)return null;let m=uGn(e,n),h=Ij(d),g=e.map((e,t)=>({...e,fill:Bj[t%Bj.length]}));return(0,zj.jsx)(kj,{config:m,className:f,style:{height:r,aspectRatio:`auto`},children:(0,zj.jsxs)(NWn,{...Ne(p),data:g,innerRadius:i,startAngle:a,endAngle:o,children:[l&&(0,zj.jsx)(Aj,{content:(0,zj.jsx)(jj,{nameKey:n,valueFormatter:h})}),s&&(0,zj.jsx)(Mj,{content:(0,zj.jsx)(Nj,{nameKey:n})}),(0,zj.jsx)(KNn,{isAnimationActive:u,dataKey:t})]})})}function _Gn({data:e=[],series:t,xAxis:n,yAxis:r,zAxis:i,height:a=300,showLegend:o=!1,showTooltip:s=!0,animate:l=!0,showGrid:u=!0,className:d,...f}){if(typeof e==`string`)return null;let p=(0,vGn.useMemo)(()=>e,[JSON.stringify(e)]),m=Lj(t);return(0,zj.jsx)(kj,{config:m,className:d,style:{height:a,aspectRatio:`auto`},children:(0,zj.jsxs)(_Wn,{...Ne(f),data:p,children:[u&&(0,zj.jsx)(cA,{}),(0,zj.jsx)(VA,{dataKey:n,type:`number`,name:n,tickLine:!1,axisLine:!1,tickMargin:8}),(0,zj.jsx)(WA,{dataKey:r,type:`number`,name:r,tickLine:!1,axisLine:!1,tickMargin:8}),i&&(0,zj.jsx)(cVn,{dataKey:i,type:`number`,name:i,range:[40,400]}),s&&(0,zj.jsx)(Aj,{content:(0,zj.jsx)(jj,{})}),o&&(0,zj.jsx)(Mj,{content:(0,zj.jsx)(Nj,{})}),t.map(e=>(0,zj.jsx)(bBn,{isAnimationActive:l,name:e.label??e.dataKey,data:t.length===1?p:p.filter(t=>t._series===e.dataKey),fill:`var(--color-${e.dataKey})`},e.dataKey))]})})}var vGn,zj,yGn,Bj,bGn,xGn=o((()=>{vGn=d(p(),1),t8t(),BWn(),JWn(),Py(),Pe(),zj=Ie(),tGn(),sGn(),yGn={verticalAlign:`bottom`,wrapperStyle:{paddingTop:20}},Bj=[`var(--color-chart-1)`,`var(--color-chart-2)`,`var(--color-chart-3)`,`var(--color-chart-4)`,`var(--color-chart-5)`],bGn={linear:`linear`,smooth:`monotone`,step:`step`}})),SGn=s(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=``,s=e=>!!e.scope,l=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},u=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=l(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=``}},d=(e={})=>{let t={children:[]};return Object.assign(t,e),t},f=class e{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=d({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},p=class extends f{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function m(e){return e?typeof e==`string`?e:e.source:null}function h(e){return v(`(?=`,e,`)`)}function g(e){return v(`(?:`,e,`)*`)}function _(e){return v(`(?:`,e,`)?`)}function v(...e){return e.map(e=>m(e)).join(``)}function y(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function b(...e){return`(`+(y(e).capture?``:`?:`)+e.map(e=>m(e)).join(`|`)+`)`}function x(e){return RegExp(e.toString()+`|`).exec(``).length-1}function S(e,t){let n=e&&e.exec(t);return n&&n.index===0}var C=new RegExp(b(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function w(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=m(e),i=``;for(;r.length>0;){let e=C.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],(e[0]===`(`||/^\(\?[<']/.test(e[0]))&&n++)}return i}).map(e=>`(${e})`).join(t)}var T=/\b\B/,E=`[a-zA-Z]\\w*`,D=`[a-zA-Z_]\\w*`,O=`\\b\\d+(\\.\\d+)?`,k=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,A=`\\b(0b[01]+)`,j=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,M=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=v(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},N={begin:`\\\\[\\s\\S]`,relevance:0},P={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[N]},F={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[N]},I={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},L=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=b(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:v(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},R=L(`//`,`$`),ee=L(`/\\*`,`\\*/`),te=L(`#`,`$`),ne=Object.freeze({__proto__:null,APOS_STRING_MODE:P,BACKSLASH_ESCAPE:N,BINARY_NUMBER_MODE:{scope:`number`,begin:A,relevance:0},BINARY_NUMBER_RE:A,COMMENT:L,C_BLOCK_COMMENT_MODE:ee,C_LINE_COMMENT_MODE:R,C_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},C_NUMBER_RE:k,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:te,IDENT_RE:E,MATCH_NOTHING_RE:T,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:O,relevance:0},NUMBER_RE:O,PHRASAL_WORDS_MODE:I,QUOTE_STRING_MODE:F,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[N,{begin:/\[/,end:/\]/,relevance:0,contains:[N]}]},RE_STARTERS_RE:j,SHEBANG:M,TITLE_MODE:{scope:`title`,begin:E,relevance:0},UNDERSCORE_IDENT_RE:D,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:D,relevance:0}});function z(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function re(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function ie(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=z,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ae(e,t){Array.isArray(e.illegal)&&(e.illegal=b(...e.illegal))}function oe(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function se(e,t){e.relevance===void 0&&(e.relevance=1)}var ce=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=v(n.beforeMatch,h(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},le=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],ue=`keyword`;function de(e,t,n=ue){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,de(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,fe(n[0],n[1])]})}}function fe(e,t){return t?Number(t):+!pe(e)}function pe(e){return le.includes(e.toLowerCase())}var me={},he=e=>{console.error(e)},ge=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_e=(e,t)=>{me[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),me[`${e}/${t}`]=!0)},ve=Error();function ye(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=x(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function be(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw he(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),ve;if(typeof e.beginScope!=`object`||e.beginScope===null)throw he(`beginScope must be object`),ve;ye(e,e.begin,{key:`beginScope`}),e.begin=w(e.begin,{joinWith:``})}}function xe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw he(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),ve;if(typeof e.endScope!=`object`||e.endScope===null)throw he(`endScope must be object`),ve;ye(e,e.end,{key:`endScope`}),e.end=w(e.end,{joinWith:``})}}function Se(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ce(e){Se(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),be(e),xe(e)}function we(e){function t(t,n){return new RegExp(m(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=x(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(w(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[re,oe,Ce,ce].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[ie,ae,se].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s=s||/\w+/,n.keywords&&(n.keywords=de(n.keywords,e.case_insensitive)),a.keywordPatternRe=t(s,!0),r&&(n.begin||(n.begin=/\B|\b/),a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=m(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||(n.contains=[]),n.contains=[].concat(...n.contains.map(function(e){return Ee(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function Te(e){return e?e.endsWithParent||Te(e.starts):!1}function Ee(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Te(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var De=`11.12.0`,Oe=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},B=i,ke=a,Ae=Symbol(`nomatch`),je=7,Me=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,l={disableAutodetect:!0,name:`Plain text`,contains:[]},u={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:p};function d(e){return u.noHighlightRe.test(e)}function f(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=u.languageDetectRe.exec(t);if(n){let t=P(n[1]);return t||(ge(s.replace(`{}`,n[1])),ge(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>d(e)||P(e))}function m(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(_e(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),_e(`10.7.0`,`Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};te(`before:highlight`,a);let o=a.result?a.result:y(a.language,a.code,n);return o.code=a.code,te(`after:highlight`,o),o}function y(e,n,i,a){let l=Object.create(null);function d(e,t){return e.keywords[t]}function f(){if(!j.keywords){N.addText(F);return}let e=0;j.keywordPatternRe.lastIndex=0;let t=j.keywordPatternRe.exec(F),n=``;for(;t;){n+=F.substring(e,t.index);let r=O.case_insensitive?t[0].toLowerCase():t[0],i=d(j,r);if(i){let[e,a]=i;if(N.addText(n),n=``,l[r]=(l[r]||0)+1,l[r]<=je&&(I+=a),e.startsWith(`_`))n+=t[0];else{let n=O.classNameAliases[e]||e;h(t[0],n)}}else n+=t[0];e=j.keywordPatternRe.lastIndex,t=j.keywordPatternRe.exec(F)}n+=F.substring(e),N.addText(n)}function p(){if(F===``)return;let e=null;if(typeof j.subLanguage==`string`){if(!t[j.subLanguage]){N.addText(F);return}e=y(j.subLanguage,F,!0,M[j.subLanguage]),M[j.subLanguage]=e._top}else e=C(F,j.subLanguage.length?j.subLanguage:null);j.relevance>0&&(I+=e.relevance),N.__addSublanguage(e._emitter,e.language)}function m(){j.subLanguage==null?f():p(),F=``}function h(e,t){e!==``&&(N.startScope(t),N.addText(e),N.endScope())}function g(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=O.classNameAliases[e[n]]||e[n],i=t[n];r?h(i,r):(F=i,f(),F=``),n++}}function _(e,t){return e.scope&&typeof e.scope==`string`&&N.openNode(O.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(h(F,O.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),F=``):e.beginScope._multi&&(g(e.beginScope,t),F=``)),j=Object.create(e,{parent:{value:j}}),j}function v(e,t,n){let i=S(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return v(e.parent,t,n)}function b(e){return j.matcher.regexIndex===0?(F+=e[0],1):(ee=!0,0)}function x(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?F+=t:(n.excludeBegin&&(F+=t),m(),!n.returnBegin&&!n.excludeBegin&&(F=t)),_(n,e),n.returnBegin?0:t.length}function w(e){let t=e[0],r=n.substring(e.index),i=v(j,e,r);if(!i)return Ae;let a=j;j.endScope&&j.endScope._wrap?(m(),h(t,j.endScope._wrap)):j.endScope&&j.endScope._multi?(m(),g(j.endScope,e)):a.skip?F+=t:(a.returnEnd||a.excludeEnd||(F+=t),m(),a.excludeEnd&&(F=t));do j.scope&&N.closeNode(),!j.skip&&!j.subLanguage&&(I+=j.relevance),j=j.parent;while(j!==i.parent);return i.starts&&_(i.starts,e),a.returnEnd?0:t.length}function T(){let e=[];for(let t=j;t!==O;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>N.openNode(e))}let E={};function D(t,r){let a=r&&r[0];if(F+=t,a==null)return m(),0;if(E.type===`begin`&&r.type===`end`&&E.index===r.index&&a===``){if(F+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=E.rule,t}return 1}if(E=r,r.type===`begin`)return x(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(j.scope||``)+`"`);throw e.mode=j,e}if(r.type===`end`){let e=w(r);if(e!==Ae)return e}if(r.type===`illegal`&&a===``)return r.index===n.length||(F+=` `),1;if(R>1e5&&R>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return F+=a,a.length}let O=P(e);if(!O)throw he(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let k=we(O),A=``,j=a||k,M={},N=new u.__emitter(u);T();let F=``,I=0,L=0,R=0,ee=!1;try{if(O.__emitTokens)O.__emitTokens(n,N);else{for(j.matcher.considerAll();;){R++,ee?ee=!1:j.matcher.considerAll(),j.matcher.lastIndex=L;let e=j.matcher.exec(n);if(!e)break;let t=D(n.substring(L,e.index),e);L=e.index+t}D(n.substring(L))}return N.finalize(),A=N.toHTML(),{language:e,value:A,relevance:I,illegal:!1,_emitter:N,_top:j}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:B(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:L,context:n.slice(L-100,L+100),mode:t.mode,resultSoFar:A},_emitter:N};if(o)return{language:e,value:B(n),illegal:!1,relevance:0,errorRaised:t,_emitter:N,_top:j};throw t}}function x(e){let t={value:B(e),illegal:!1,relevance:0,_top:l,_emitter:new u.__emitter(u)};return t._emitter.addText(e),t}function C(e,n){n=n||u.languages||Object.keys(t);let r=x(e),i=n.filter(P).filter(I).map(t=>y(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(P(e.language).supersetOf===t.language)return 1;if(P(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function w(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function T(e){let t=null,n=f(e);if(d(n))return;if(te(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(u.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),u.throwUnescapedHTML))throw new Oe(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?m(r,{language:n,ignoreIllegals:!0}):C(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,w(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),te(`after:highlightElement`,{el:e,result:i,text:r})}function E(e){u=ke(u,e)}let D=()=>{A(),_e(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function O(){A(),_e(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let k=!1;function A(){function e(){A()}document.readyState===`loading`?(k||window.addEventListener(`DOMContentLoaded`,e,!1),k=!0):document.querySelectorAll(u.cssSelector).forEach(T)}function j(n,r){let i=null;try{i=r(e)}catch(e){if(he(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)he(e);else throw e;i=l}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&F(i.aliases,{languageName:n})}function M(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function N(){return Object.keys(t)}function P(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function F(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function I(e){let t=P(e);return t&&!t.disableAutodetect}function L(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function R(e){L(e),a.push(e)}function ee(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function te(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function z(e){return _e(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),_e(`10.7.0`,`Please use highlightElement now.`),T(e)}Object.assign(e,{highlight:m,highlightAuto:C,highlightAll:A,highlightElement:T,highlightBlock:z,configure:E,initHighlighting:D,initHighlightingOnLoad:O,registerLanguage:j,unregisterLanguage:M,listLanguages:N,getLanguage:P,registerAliases:F,autoDetection:I,inherit:ke,addPlugin:R,removePlugin:ee}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=De,e.regex={concat:v,lookahead:h,either:b,optional:_,anyNumberOfTimes:g};for(let e in ne)typeof ne[e]==`object`&&n(ne[e]);return Object.assign(e,ne),e},Ne=Me({});Ne.newInstance=()=>Me({}),t.exports=Ne,Ne.HighlightJS=Ne,Ne.default=Ne})),CGn,Vj,wGn=o((()=>{CGn=d(SGn()),Vj=CGn.default}));function TGn(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.lazy.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.aiter.all.anext.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozendict.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.sentinel.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},l={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},u=`[0-9](_?[0-9])*`,d=`(\\b(${u}))?\\.(${u})|\\b(${u})\\.`,f=`\\b|${r.join(`|`)}`,p={className:`number`,relevance:0,variants:[{begin:`(\\b(${u})|(${d}))[eE][+-]?(${u})[jJ]?(?=${f})`},{begin:`(${d})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${f})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${f})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${f})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${f})`},{begin:`\\b(${u})[jJ](?=${f})`}]},m={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},h={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,p,l,e.HASH_COMMENT_MODE]}]};return o.contains=[l,p,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,p,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},l,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[h]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[p,h,l]}]}}var EGn=o((()=>{}));function DGn(e){let t=e.regex,n=(e,{after:t})=>{let n=``,end:``},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:OGn,keyword:kGn,literal:AGn,built_in:FGn,"variable.language":PGn},l=`[0-9](_?[0-9])*`,u=`\\.(${l})`,d=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,f={className:`number`,variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},p={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},m={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:`xml`}},h={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:`css`}},g={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:`graphql`}},_={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},v={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,g,_,{match:/\$\d+/},f];p.contains=y.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(y)});let b=[].concat(v,p.contains),x=b.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(b)}]),S={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:x},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...jGn,...MGn]}},T={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},E={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[S],illegal:/%/},D={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function O(e){return t.concat(`(?!`,e.join(`|`),`)`)}let k={match:t.concat(/\b/,O([...NGn,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},j={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},S]},M=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,N={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[S]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:w},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,g,_,v,{match:/\$\d+/},f,w,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},N,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[v,e.REGEXP_MODE,{className:`function`,begin:M,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},E,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[S,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},A,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[S]},k,D,C,j,{match:/\$[(.]/}]}}var OGn,kGn,AGn,jGn,MGn,NGn,PGn,FGn,IGn=o((()=>{OGn=`[A-Za-z$_][0-9A-Za-z$_]*`,kGn=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),AGn=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],jGn=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),MGn=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],NGn=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],PGn=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`self`,`global`],FGn=[].concat(NGn,jGn,MGn)}));function LGn(e){let t=e.regex,n=(e,{after:t})=>{let n=``,end:``},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:Hj,keyword:zGn,literal:BGn,built_in:GGn,"variable.language":WGn},l=`[0-9](_?[0-9])*`,u=`\\.(${l})`,d=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,f={className:`number`,variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},p={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},m={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:`xml`}},h={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:`css`}},g={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:`graphql`}},_={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},v={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,g,_,{match:/\$\d+/},f];p.contains=y.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(y)});let b=[].concat(v,p.contains),x=b.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(b)}]),S={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:x},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...VGn,...HGn]}},T={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},E={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[S],illegal:/%/},D={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function O(e){return t.concat(`(?!`,e.join(`|`),`)`)}let k={match:t.concat(/\b/,O([...UGn,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},j={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},S]},M=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,N={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[S]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:w},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),T,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,g,_,v,{match:/\$\d+/},f,w,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},N,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[v,e.REGEXP_MODE,{className:`function`,begin:M,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},E,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[S,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},A,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[S]},k,D,C,j,{match:/\$[(.]/}]}}function RGn(e){let t=e.regex,n=LGn(e),r=Hj,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},l={$pattern:Hj,keyword:zGn.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:BGn,built_in:GGn.concat(i),"variable.language":WGn},u={className:`meta`,begin:`@`+r},d=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,l),n.exports.PARAMS_CONTAINS.push(u);let f=n.contains.find(e=>e.scope===`attr`),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([u,a,o,p]),d(n,`shebang`,e.SHEBANG()),d(n,`use_strict`,s);let m=n.contains.find(e=>e.label===`func.def`);return m.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}var Hj,zGn,BGn,VGn,HGn,UGn,WGn,GGn,KGn=o((()=>{Hj=`[A-Za-z$_][0-9A-Za-z$_]*`,zGn=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),BGn=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],VGn=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),HGn=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],UGn=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],WGn=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`self`,`global`],GGn=[].concat(UGn,VGn,HGn)}));function qGn(e){let t={className:`attr`,begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`,`json5`],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,JGn,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var JGn,YGn=o((()=>{JGn={scope:`number`,match:`([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity`,relevance:0}}));function XGn(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let l={match:/\\"/},u={className:`string`,begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},p=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),m={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},h=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],g=[`true`,`false`],_={match:/(\/[a-z._-]+)+/},v=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],y=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],b=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),x=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:h,literal:g,built_in:[...v,...y,`set`,`shopt`,...b,...x]},contains:[p,e.SHEBANG(),m,f,a,o,_,s,l,u,d,n]}}var ZGn=o((()=>{}));function QGn(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),l=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],u=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),d=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),f=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],p=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],m=d,h=[...u,...l].filter(e=>!d.includes(e)),g={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},_={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:t.concat(/\b/,t.either(...m),/\s*\(/),relevance:0,keywords:{built_in:m}};function y(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let b={scope:`keyword`,match:y(p),relevance:0};function x(e,{exceptions:t,when:n}={}){let r=n;return t=t||[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:x(h,{when:e=>e.length<3}),literal:a,type:s,built_in:f},contains:[{scope:`type`,match:y(o)},b,v,g,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,_]}}var $Gn=o((()=>{}));function eKn(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),l=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin://,relevance:10,contains:[a,l,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin://,contains:[a,o,l,s]}]}]},e.COMMENT(/\x3C!--/,/-->/,{relevance:10}),{begin://,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/)/,end:/>/,keywords:{name:`style`},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:`css`}},{className:`tag`,begin:/)/,end:/>/,keywords:{name:`script`},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:`javascript`}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:u}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var tKn=o((()=>{}));function nKn(e){let t=e.regex,n=rKn(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+cKn.join(`|`)+`)`},{begin:`:(:)?(`+lKn.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+uKn.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:sKn.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+oKn.join(`|`)+`)\\b`}]}}var rKn,iKn,aKn,oKn,sKn,cKn,lKn,uKn,dKn=o((()=>{rKn=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),iKn=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),aKn=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),oKn=[...iKn,...aKn],sKn=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),cKn=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),lKn=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),uKn=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.corner-bottom-left-shape.corner-bottom-right-shape.corner-shape.corner-top-left-shape.corner-top-right-shape.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse()}));function fKn(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},u={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},d={begin:/\{/,end:/\}/,contains:[u],illegal:`\\n`,relevance:0},f={begin:`\\[`,end:`\\]`,contains:[u],illegal:`\\n`,relevance:0},p=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},l,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},d,f,a,o],m=[...p];return m.pop(),m.push(s),u.contains=m,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:p}}var pKn=o((()=>{}));function mKn(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},l={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(l,{contains:[]}),f=e.inherit(u,{contains:[]});l.contains.push(f),u.contains.push(d);let p=[n,s];return[l,u,d,f].forEach(e=>{e.contains=e.contains.concat(p)}),p=p.concat(l,u),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:p},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:p}]}]},n,a,r,l,u,{className:`quote`,begin:`^>\\s+`,contains:p,end:`$`},i,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}var hKn=o((()=>{})),Uj=o((()=>{}));function gKn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var _Kn=o((()=>{}));function vKn(e,t){return((t||xKn).jsx?bKn:yKn).test(e)}var yKn,bKn,xKn,SKn=o((()=>{yKn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bKn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xKn={}})),CKn=o((()=>{SKn()}));function wKn(e){return typeof e==`object`?e.type===`text`&&TKn(e.value):TKn(e)}function TKn(e){return e.replace(EKn,``)===``}var EKn,DKn=o((()=>{EKn=/[ \t\n\f\r]/g})),OKn=o((()=>{DKn()})),Wj,kKn=o((()=>{Wj=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}},Wj.prototype.normal={},Wj.prototype.property={},Wj.prototype.space=void 0}));function AKn(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Wj(n,r,t)}var jKn=o((()=>{kKn()}));function MKn(e){return e.toLowerCase()}var NKn=o((()=>{})),Gj,PKn=o((()=>{Gj=class{constructor(e,t){this.attribute=t,this.property=e}},Gj.prototype.attribute=``,Gj.prototype.booleanish=!1,Gj.prototype.boolean=!1,Gj.prototype.commaOrSpaceSeparated=!1,Gj.prototype.commaSeparated=!1,Gj.prototype.defined=!1,Gj.prototype.mustUseProperty=!1,Gj.prototype.number=!1,Gj.prototype.overloadedBoolean=!1,Gj.prototype.property=``,Gj.prototype.spaceSeparated=!1,Gj.prototype.space=void 0})),FKn=l({boolean:()=>qj,booleanish:()=>Jj,commaOrSpaceSeparated:()=>$j,commaSeparated:()=>Qj,number:()=>Xj,overloadedBoolean:()=>Yj,spaceSeparated:()=>Zj});function Kj(){return 2**++IKn}var IKn,qj,Jj,Yj,Xj,Zj,Qj,$j,eM=o((()=>{IKn=0,qj=Kj(),Jj=Kj(),Yj=Kj(),Xj=Kj(),Zj=Kj(),Qj=Kj(),$j=Kj()}));function LKn(e,t,n){n&&(e[t]=n)}var tM,nM,RKn=o((()=>{PKn(),eM(),tM=Object.keys(FKn),nM=class extends Gj{constructor(e,t,n,r){let i=-1;if(super(e,t),LKn(this,`space`,r),typeof n==`number`)for(;++i{NKn(),RKn(),kKn()})),zKn,BKn=o((()=>{iM(),eM(),zKn=rM({properties:{ariaActiveDescendant:null,ariaAtomic:Jj,ariaAutoComplete:null,ariaBusy:Jj,ariaChecked:Jj,ariaColCount:Xj,ariaColIndex:Xj,ariaColSpan:Xj,ariaControls:Zj,ariaCurrent:null,ariaDescribedBy:Zj,ariaDetails:null,ariaDisabled:Jj,ariaDropEffect:Zj,ariaErrorMessage:null,ariaExpanded:Jj,ariaFlowTo:Zj,ariaGrabbed:Jj,ariaHasPopup:null,ariaHidden:Jj,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Zj,ariaLevel:Xj,ariaLive:null,ariaModal:Jj,ariaMultiLine:Jj,ariaMultiSelectable:Jj,ariaOrientation:null,ariaOwns:Zj,ariaPlaceholder:null,ariaPosInSet:Xj,ariaPressed:Jj,ariaReadOnly:Jj,ariaRelevant:null,ariaRequired:Jj,ariaRoleDescription:Zj,ariaRowCount:Xj,ariaRowIndex:Xj,ariaRowSpan:Xj,ariaSelected:Jj,ariaSetSize:Xj,ariaSort:null,ariaValueMax:Xj,ariaValueMin:Xj,ariaValueNow:Xj,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}})}));function VKn(e,t){return t in e?e[t]:t}var HKn=o((()=>{}));function UKn(e,t){return VKn(e,t.toLowerCase())}var WKn=o((()=>{HKn()})),GKn,KKn=o((()=>{WKn(),iM(),eM(),GKn=rM({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Qj,acceptCharset:Zj,accessKey:Zj,action:null,allow:null,allowFullScreen:qj,allowPaymentRequest:qj,allowUserMedia:qj,alt:null,as:null,async:qj,autoCapitalize:null,autoComplete:Zj,autoFocus:qj,autoPlay:qj,blocking:Zj,capture:null,charSet:null,checked:qj,cite:null,className:Zj,cols:Xj,colSpan:null,content:null,contentEditable:Jj,controls:qj,controlsList:Zj,coords:Xj|Qj,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qj,defer:qj,dir:null,dirName:null,disabled:qj,download:Yj,draggable:Jj,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qj,formTarget:null,headers:Zj,height:Xj,hidden:Yj,high:Xj,href:null,hrefLang:null,htmlFor:Zj,httpEquiv:Zj,id:null,imageSizes:null,imageSrcSet:null,inert:qj,inputMode:null,integrity:null,is:null,isMap:qj,itemId:null,itemProp:Zj,itemRef:Zj,itemScope:qj,itemType:Zj,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qj,low:Xj,manifest:null,max:null,maxLength:Xj,media:null,method:null,min:null,minLength:Xj,multiple:qj,muted:qj,name:null,nonce:null,noModule:qj,noValidate:qj,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qj,optimum:Xj,pattern:null,ping:Zj,placeholder:null,playsInline:qj,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qj,referrerPolicy:null,rel:Zj,required:qj,reversed:qj,rows:Xj,rowSpan:Xj,sandbox:Zj,scope:null,scoped:qj,seamless:qj,selected:qj,shadowRootClonable:qj,shadowRootDelegatesFocus:qj,shadowRootMode:null,shape:null,size:Xj,sizes:null,slot:null,span:Xj,spellCheck:Jj,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Xj,step:null,style:null,tabIndex:Xj,target:null,title:null,translate:null,type:null,typeMustMatch:qj,useMap:null,value:Jj,width:Xj,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Zj,axis:null,background:null,bgColor:null,border:Xj,borderColor:null,bottomMargin:Xj,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qj,declare:qj,event:null,face:null,frame:null,frameBorder:null,hSpace:Xj,leftMargin:Xj,link:null,longDesc:null,lowSrc:null,marginHeight:Xj,marginWidth:Xj,noResize:qj,noHref:qj,noShade:qj,noWrap:qj,object:null,profile:null,prompt:null,rev:null,rightMargin:Xj,rules:null,scheme:null,scrolling:Jj,standby:null,summary:null,text:null,topMargin:Xj,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Xj,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qj,disableRemotePlayback:qj,prefix:null,property:null,results:Xj,security:null,unselectable:null},space:`html`,transform:UKn})})),qKn,JKn=o((()=>{HKn(),iM(),eM(),qKn=rM({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:$j,accentHeight:Xj,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Xj,amplitude:Xj,arabicForm:null,ascent:Xj,attributeName:null,attributeType:null,azimuth:Xj,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Xj,by:null,calcMode:null,capHeight:Xj,className:Zj,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Xj,diffuseConstant:Xj,direction:null,display:null,dur:null,divisor:Xj,dominantBaseline:null,download:qj,dx:null,dy:null,edgeMode:null,editable:null,elevation:Xj,enableBackground:null,end:null,event:null,exponent:Xj,externalResourcesRequired:null,fill:null,fillOpacity:Xj,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Qj,g2:Qj,glyphName:Qj,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Xj,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Xj,horizOriginX:Xj,horizOriginY:Xj,id:null,ideographic:Xj,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Xj,k:Xj,k1:Xj,k2:Xj,k3:Xj,k4:Xj,kernelMatrix:$j,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Xj,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Xj,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Xj,overlineThickness:Xj,paintOrder:null,panose1:null,path:null,pathLength:Xj,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Zj,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Xj,pointsAtY:Xj,pointsAtZ:Xj,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$j,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$j,rev:$j,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$j,requiredFeatures:$j,requiredFonts:$j,requiredFormats:$j,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Xj,specularExponent:Xj,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Xj,strikethroughThickness:Xj,string:null,stroke:null,strokeDashArray:$j,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Xj,strokeOpacity:Xj,strokeWidth:null,style:null,surfaceScale:Xj,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$j,tabIndex:Xj,tableValues:null,target:null,targetX:Xj,targetY:Xj,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$j,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Xj,underlineThickness:Xj,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Xj,values:null,vAlphabetic:Xj,vMathematical:Xj,vectorEffect:null,vHanging:Xj,vIdeographic:Xj,version:null,vertAdvY:Xj,vertOriginX:Xj,vertOriginY:Xj,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Xj,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:VKn})})),YKn,XKn=o((()=>{iM(),YKn=rM({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}})})),ZKn,QKn=o((()=>{iM(),WKn(),ZKn=rM({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:UKn})})),$Kn,eqn=o((()=>{iM(),$Kn=rM({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}})})),tqn,nqn=o((()=>{tqn={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`}}));function rqn(e,t){let n=MKn(t),r=t,i=Gj;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&cqn.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(sqn,aqn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!sqn.test(e)){let n=e.replace(oqn,iqn);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=nM}return new i(r,t)}function iqn(e){return`-`+e.toLowerCase()}function aqn(e){return e.charAt(1).toUpperCase()}var oqn,sqn,cqn,lqn=o((()=>{RKn(),PKn(),NKn(),oqn=/[A-Z]/g,sqn=/-[a-z]/g,cqn=/^data[-\w.:]+$/i})),uqn,aM,dqn=o((()=>{jKn(),BKn(),KKn(),JKn(),XKn(),QKn(),eqn(),nqn(),lqn(),uqn=AKn([zKn,GKn,YKn,ZKn,$Kn],`html`),aM=AKn([zKn,qKn,YKn,ZKn,$Kn],`svg`)}));function fqn(e){return e.join(` `).trim()}var pqn=o((()=>{})),mqn=s(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g;function d(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t=t||{};var u=1,d=1;function p(e){var t=e.match(r);t&&(u+=t.length);var n=e.lastIndexOf(` `);d=~n?e.length-n:d+e.length}function m(){var e={line:u,column:d};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=t.source}h.prototype.content=e;function g(n){var r=Error(t.source+`:`+u+`:`+d+`: `+n);if(r.reason=n,r.filename=t.source,r.line=u,r.column=d,r.source=e,!t.silent)throw r}function _(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function v(){_(i)}function y(e){var t;for(e=e||[];t=b();)t!==!1&&e.push(t);return e}function b(){var t=m();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return g(`End of comment missing`);var r=e.slice(2,n-2);return d+=2,p(r),e=e.slice(n),d+=2,t({type:`comment`,comment:r})}}function x(){var e=m(),t=_(a);if(t){if(b(),!_(o))return g(`property missing ':'`);var r=_(s),i=e({type:`declaration`,property:f(t[0].replace(n,``)),value:r?f(r[0].replace(n,``)):``});return _(l),i}}function S(){var e=[];y(e);for(var t;t=x();)t!==!1&&(e.push(t),y(e));return e}return v(),S()}function f(e){return e?e.replace(u,``):``}t.exports=d})),hqn=s(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(mqn());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n=n||{},n[r]=i)}),n}})),gqn=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},l=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,l):e.replace(i,l),e.replace(n,s))}})),_qn=s(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(hqn()),i=gqn();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a}));function vqn(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function yqn(e){let t=oM(e),n=bqn(e);if(t&&n)return{start:t,end:n}}var bqn,oM,xqn=o((()=>{bqn=vqn(`end`),oM=vqn(`start`)})),Sqn=o((()=>{xqn()}));function sM(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?wqn(e.position):`start`in e||`end`in e?wqn(e):`line`in e||`column`in e?Cqn(e):``}function Cqn(e){return Tqn(e&&e.line)+`:`+Tqn(e&&e.column)}function wqn(e){return Cqn(e&&e.start)+`-`+Cqn(e&&e.end)}function Tqn(e){return e&&typeof e==`number`?e:1}var Eqn=o((()=>{})),Dqn=o((()=>{Eqn()})),cM,Oqn=o((()=>{Dqn(),cM=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=sM(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}},cM.prototype.file=``,cM.prototype.name=``,cM.prototype.reason=``,cM.prototype.message=``,cM.prototype.stack=``,cM.prototype.column=void 0,cM.prototype.line=void 0,cM.prototype.ancestors=void 0,cM.prototype.cause=void 0,cM.prototype.fatal=void 0,cM.prototype.place=void 0,cM.prototype.ruleId=void 0,cM.prototype.source=void 0})),kqn=o((()=>{Oqn()}));function Aqn(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Vqn(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Bqn(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?aM:uqn,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=jqn(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function jqn(e,t,n){if(t.type===`element`)return Mqn(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Nqn(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Fqn(e,t,n);if(t.type===`mdxjsEsm`)return Pqn(e,t);if(t.type===`root`)return Iqn(e,t,n);if(t.type===`text`)return Lqn(e,t)}function Mqn(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=aM,e.schema=i),e.ancestors.push(t);let a=qqn(e,t.tagName,!1),o=Hqn(e,t),s=Wqn(e,t);return eJn.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!wKn(e)})),Rqn(e,o,a,t),zqn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Nqn(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}lM(e,t.position)}function Pqn(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);lM(e,t.position)}function Fqn(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=aM,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:qqn(e,t.name,!0),o=Uqn(e,t),s=Wqn(e,t);return Rqn(e,o,a,t),zqn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Iqn(e,t,n){let r={};return zqn(r,Wqn(e,t)),e.create(t,e.Fragment,r,n)}function Lqn(e,t){return t.value}function Rqn(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zqn(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Bqn(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Vqn(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=oM(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Hqn(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&uM.call(t.properties,i)){let a=Gqn(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&tJn.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||(n.style={});t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Uqn(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else lM(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else lM(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Wqn(e,t){let n=[],r=-1,i=e.passKeys?new Map:Qqn;for(;++r{_Kn(),Uj(),CKn(),OKn(),dqn(),pqn(),Zqn=d(_qn(),1),Sqn(),kqn(),uM={}.hasOwnProperty,Qqn=new Map,$qn=/[A-Z]/g,eJn=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),tJn=new Set([`td`,`th`]),nJn=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`})),iJn=o((()=>{rJn()})),dM,aJn=o((()=>{dM={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]}})),oJn=o((()=>{aJn()}));function sJn(e,t){let n=t||dJn;return cJn(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function cJn(e,t,n){if(uJn(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return lJn(e.children,t,n)}return Array.isArray(e)?lJn(e,t,n):``}function lJn(e,t,n){let r=[],i=-1;for(;++i{dJn={}})),pJn=o((()=>{fJn()}));function mJn(e){let t=`&`+e+`;`;hJn.innerHTML=t;let n=hJn.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var hJn,fM=o((()=>{hJn=document.createElement(`i`)}));function pM(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(pM(e,e.length,0,t),e):t}var hM=o((()=>{}));function gJn(e){let t={},n=-1;for(;++n{hM(),yJn={}.hasOwnProperty}));function xJn(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var SJn=o((()=>{}));function gM(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var _M=o((()=>{}));function vM(e){return e!==null&&(e<32||e===127)}function yM(e){return e!==null&&e<-2}function bM(e){return e!==null&&(e<0||e===32)}function xM(e){return e===-2||e===-1||e===32}function SM(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var CM,wM,CJn,TM,wJn,TJn,EM,DM,OM=o((()=>{CM=SM(/[A-Za-z]/),wM=SM(/[\dA-Za-z]/),CJn=SM(/[#-'*+\--9=?A-Z^-~]/),TM=SM(/\d/),wJn=SM(/[\dA-Fa-f]/),TJn=SM(/[!-/:-@[-`{-~]/),EM=SM(/\p{P}|\p{S}/u),DM=SM(/\s/)}));function kM(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=``),i&&(n+=i,i=0)}return t.join(``)+e.slice(r)}var AM=o((()=>{OM()}));function jM(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return xM(r)?(e.enter(n),s(r)):t(r)}function s(r){return xM(r)&&a++{OM()}));function EJn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),jM(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return yM(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var DJn,OJn=o((()=>{MM(),OM(),DJn={tokenize:EJn}}));function kJn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(ro))return;let n=t.events.length,a=n,s,l;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){l=t.events[a][1].end;break}s=!0}for(v(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function AJn(e,t,n){return jM(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var jJn,MJn,NJn=o((()=>{MM(),OM(),hM(),jJn={tokenize:kJn},MJn={tokenize:AJn}}));function NM(e){if(e===null||bM(e)||DM(e))return 1;if(EM(e))return 2}var PJn=o((()=>{OM()}));function FJn(e,t,n){let r=[],i=-1;for(;++i{}));function LJn(e,t){let n=-1,r,i,a,o,s,l,u,d;for(;++n1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let f={...e[r][1].end},p={...e[n][1].start};zJn(f,-l),zJn(p,l),o={type:l>1?`strongSequence`:`emphasisSequence`,start:f,end:{...e[r][1].end}},s={type:l>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:p},a={type:l>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=mM(u,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),u=mM(u,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),u=mM(u,FJn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=mM(u,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=mM(u,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):d=0,pM(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n{hM(),PJn(),IJn(),BJn={name:`attention`,resolveAll:LJn,tokenize:RJn}}));function HJn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return CM(t)?(e.consume(t),o):t===64?n(t):u(t)}function o(e){return e===43||e===45||e===46||wM(e)?(r=1,s(e)):u(e)}function s(t){return t===58?(e.consume(t),r=0,l):(t===43||t===45||t===46||wM(t))&&r++<32?(e.consume(t),s):(r=0,u(t))}function l(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||vM(r)?n(r):(e.consume(r),l)}function u(t){return t===64?(e.consume(t),d):CJn(t)?(e.consume(t),u):n(t)}function d(e){return wM(e)?f(e):n(e)}function f(n){return n===46?(e.consume(n),r=0,d):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):p(n)}function p(t){if((t===45||wM(t))&&r++<63){let n=t===45?p:f;return e.consume(t),n}return n(t)}}var UJn,WJn=o((()=>{OM(),UJn={name:`autolink`,tokenize:HJn}}));function GJn(e,t,n){return r;function r(t){return xM(t)?jM(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||yM(e)?t(e):n(e)}}var PM,KJn=o((()=>{MM(),OM(),PM={partial:!0,tokenize:GJn}}));function qJn(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||(e.enter(`blockQuote`,{_container:!0}),n.open=!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return xM(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function JJn(e,t,n){let r=this;return i;function i(t){return xM(t)?jM(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(XJn,t,n)(r)}}function YJn(e){e.exit(`blockQuote`)}var XJn,ZJn=o((()=>{MM(),OM(),XJn={continuation:{tokenize:JJn},exit:YJn,name:`blockQuote`,tokenize:qJn}}));function QJn(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return TJn(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var $Jn,eYn=o((()=>{OM(),$Jn={name:`characterEscape`,tokenize:QJn}}));function tYn(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),l}function l(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),u):(e.enter(`characterReferenceValue`),a=31,o=wM,d(t))}function u(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=wJn,d):(e.enter(`characterReferenceValue`),a=7,o=TM,d(t))}function d(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===wM&&!mJn(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++{fM(),OM(),nYn={name:`characterReference`,tokenize:tYn}}));function iYn(e,t,n){let r=this,i={partial:!0,tokenize:S},a=0,o=0,s;return l;function l(e){return u(e)}function u(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),d(t)}function d(t){return t===s?(o++,e.consume(t),d):o<3?n(t):(e.exit(`codeFencedFenceSequence`),xM(t)?jM(e,f,`whitespace`)(t):f(t))}function f(n){return n===null||yM(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(oYn,g,x)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===null||yM(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),f(t)):xM(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),jM(e,m,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),p)}function m(t){return t===null||yM(t)?f(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),h(t))}function h(t){return t===null||yM(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),f(t)):t===96&&t===s?n(t):(e.consume(t),h)}function g(t){return e.attempt(i,x,_)(t)}function _(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),v}function v(t){return a>0&&xM(t)?jM(e,y,`linePrefix`,a+1)(t):y(t)}function y(t){return t===null||yM(t)?e.check(oYn,g,x)(t):(e.enter(`codeFlowValue`),b(t))}function b(t){return t===null||yM(t)?(e.exit(`codeFlowValue`),y(t)):(e.consume(t),b)}function x(n){return e.exit(`codeFenced`),t(n)}function S(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l}function l(t){return e.enter(`codeFencedFence`),xM(t)?jM(e,u,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):u(t)}function u(t){return t===s?(e.enter(`codeFencedFenceSequence`),d(t)):n(t)}function d(t){return t===s?(i++,e.consume(t),d):i>=o?(e.exit(`codeFencedFenceSequence`),xM(t)?jM(e,f,`whitespace`)(t):f(t)):n(t)}function f(r){return r===null||yM(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function aYn(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var oYn,sYn,cYn=o((()=>{MM(),OM(),oYn={partial:!0,tokenize:aYn},sYn={concrete:!0,name:`codeFenced`,tokenize:iYn}}));function lYn(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),jM(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?l(t):yM(t)?e.attempt(fYn,o,l)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||yM(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function l(n){return e.exit(`codeIndented`),t(n)}}function uYn(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):yM(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):jM(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):yM(e)?i(e):n(e)}}var dYn,fYn,pYn=o((()=>{MM(),OM(),dYn={name:`codeIndented`,tokenize:lYn},fYn={partial:!0,tokenize:uYn}}));function mYn(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r{OM(),_Yn={name:`codeText`,previous:hYn,resolve:mYn,tokenize:gYn}}));function FM(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n{yYn=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&FM(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),FM(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),FM(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e{hM(),bYn()}));function wYn(e){return xYn(e),e}function TYn(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):yM(t)?e.check(OYn,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function EYn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),jM(e,a,`linePrefix`)}function a(i){if(i===null||yM(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}var DYn,OYn,kYn=o((()=>{MM(),OM(),CYn(),DYn={resolve:wYn,tokenize:TYn},OYn={partial:!0,tokenize:EYn}}));function AYn(e,t,n,r,i,a,o,s,l){let u=l||1/0,d=0;return f;function f(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),p):t===null||t===32||t===41||vM(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),g(t))}function p(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),m(n))}function m(t){return t===62?(e.exit(`chunkString`),e.exit(s),p(t)):t===null||t===60||yM(t)?n(t):(e.consume(t),t===92?h:m)}function h(t){return t===60||t===62||t===92?(e.consume(t),m):m(t)}function g(i){return!d&&(i===null||i===41||bM(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):d{OM()}));function MYn(e,t,n,r,i,a){let o=this,s=0,l;return u;function u(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),d}function d(u){return s>999||u===null||u===91||u===93&&!l||u===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(u):u===93?(e.exit(a),e.enter(i),e.consume(u),e.exit(i),e.exit(r),t):yM(u)?(e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),d):(e.enter(`chunkString`,{contentType:`string`}),f(u))}function f(t){return t===null||t===91||t===93||yM(t)||s++>999?(e.exit(`chunkString`),d(t)):(e.consume(t),l||(l=!xM(t)),t===92?p:f)}function p(t){return t===91||t===92||t===93?(e.consume(t),s++,f):f(t)}}var NYn=o((()=>{OM()}));function PYn(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,l):n(t)}function l(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),u(n))}function u(t){return t===o?(e.exit(a),l(o)):t===null?n(t):yM(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),jM(e,u,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),d(t))}function d(t){return t===o||t===null||yM(t)?(e.exit(`chunkString`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===o||t===92?(e.consume(t),d):d(t)}}var FYn=o((()=>{MM(),OM()}));function IM(e,t){let n;return r;function r(i){return yM(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):xM(i)?jM(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var IYn=o((()=>{MM(),OM()}));function LYn(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return MYn.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=gM(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),l):n(t)}function l(t){return bM(t)?IM(e,u)(t):u(t)}function u(t){return AYn(e,d,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function d(t){return e.attempt(BYn,f,f)(t)}function f(t){return xM(t)?jM(e,p,`whitespace`)(t):p(t)}function p(a){return a===null||yM(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function RYn(e,t,n){return r;function r(t){return bM(t)?IM(e,i)(t):n(t)}function i(t){return PYn(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return xM(t)?jM(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||yM(e)?t(e):n(e)}}var zYn,BYn,VYn=o((()=>{jYn(),NYn(),MM(),FYn(),IYn(),OM(),_M(),zYn={name:`definition`,tokenize:LYn},BYn={partial:!0,tokenize:RYn}}));function HYn(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return yM(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var UYn,WYn=o((()=>{OM(),UYn={name:`hardBreakEscape`,tokenize:HYn}}));function GYn(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},pM(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function KYn(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||bM(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),l(n)):n===null||yM(n)?(e.exit(`atxHeading`),t(n)):xM(n)?jM(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),u(n))}function l(t){return t===35?(e.consume(t),l):(e.exit(`atxHeadingSequence`),s(t))}function u(t){return t===null||t===35||bM(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),u)}}var qYn,JYn=o((()=>{MM(),OM(),hM(),qYn={name:`headingAtx`,resolve:GYn,tokenize:KYn}})),YYn,XYn,ZYn=o((()=>{YYn=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),XYn=[`pre`,`script`,`style`,`textarea`]}));function QYn(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $Yn(e,t,n){let r=this,i,a,o,s,l;return u;function u(e){return d(e)}function d(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),f}function f(s){return s===33?(e.consume(s),p):s===47?(e.consume(s),a=!0,g):s===63?(e.consume(s),i=3,r.interrupt?t:L):CM(s)?(e.consume(s),o=String.fromCharCode(s),_):n(s)}function p(a){return a===45?(e.consume(a),i=2,m):a===91?(e.consume(a),i=5,s=0,h):CM(a)?(e.consume(a),i=4,r.interrupt?t:L):n(a)}function m(i){return i===45?(e.consume(i),r.interrupt?t:L):n(i)}function h(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:k:h):n(i)}function g(t){return CM(t)?(e.consume(t),o=String.fromCharCode(t),_):n(t)}function _(s){if(s===null||s===47||s===62||bM(s)){let l=s===47,u=o.toLowerCase();return!l&&!a&&XYn.includes(u)?(i=1,r.interrupt?t(s):k(s)):YYn.includes(o.toLowerCase())?(i=6,l?(e.consume(s),v):r.interrupt?t(s):k(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?y(s):b(s))}return s===45||wM(s)?(e.consume(s),o+=String.fromCharCode(s),_):n(s)}function v(i){return i===62?(e.consume(i),r.interrupt?t:k):n(i)}function y(t){return xM(t)?(e.consume(t),y):D(t)}function b(t){return t===47?(e.consume(t),D):t===58||t===95||CM(t)?(e.consume(t),x):xM(t)?(e.consume(t),b):D(t)}function x(t){return t===45||t===46||t===58||t===95||wM(t)?(e.consume(t),x):S(t)}function S(t){return t===61?(e.consume(t),C):xM(t)?(e.consume(t),S):b(t)}function C(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),l=t,w):xM(t)?(e.consume(t),C):T(t)}function w(t){return t===l?(e.consume(t),l=null,E):t===null||yM(t)?n(t):(e.consume(t),w)}function T(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||bM(t)?S(t):(e.consume(t),T)}function E(e){return e===47||e===62||xM(e)?b(e):n(e)}function D(t){return t===62?(e.consume(t),O):n(t)}function O(t){return t===null||yM(t)?k(t):xM(t)?(e.consume(t),O):n(t)}function k(t){return t===45&&i===2?(e.consume(t),N):t===60&&i===1?(e.consume(t),P):t===62&&i===4?(e.consume(t),R):t===63&&i===3?(e.consume(t),L):t===93&&i===5?(e.consume(t),I):yM(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(rXn,ee,A)(t)):t===null||yM(t)?(e.exit(`htmlFlowData`),A(t)):(e.consume(t),k)}function A(t){return e.check(iXn,j,ee)(t)}function j(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),M}function M(t){return t===null||yM(t)?A(t):(e.enter(`htmlFlowData`),k(t))}function N(t){return t===45?(e.consume(t),L):k(t)}function P(t){return t===47?(e.consume(t),o=``,F):k(t)}function F(t){if(t===62){let n=o.toLowerCase();return XYn.includes(n)?(e.consume(t),R):k(t)}return CM(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),F):k(t)}function I(t){return t===93?(e.consume(t),L):k(t)}function L(t){return t===62?(e.consume(t),R):t===45&&i===2?(e.consume(t),L):k(t)}function R(t){return t===null||yM(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),R)}function ee(n){return e.exit(`htmlFlow`),t(n)}}function eXn(e,t,n){let r=this;return i;function i(t){return yM(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function tXn(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(PM,t,n)}}var nXn,rXn,iXn,aXn=o((()=>{OM(),ZYn(),KJn(),nXn={concrete:!0,name:`htmlFlow`,resolveTo:QYn,tokenize:$Yn},rXn={partial:!0,tokenize:tXn},iXn={partial:!0,tokenize:eXn}}));function oXn(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),l}function l(t){return t===33?(e.consume(t),u):t===47?(e.consume(t),S):t===63?(e.consume(t),b):CM(t)?(e.consume(t),T):n(t)}function u(t){return t===45?(e.consume(t),d):t===91?(e.consume(t),a=0,h):CM(t)?(e.consume(t),y):n(t)}function d(t){return t===45?(e.consume(t),m):n(t)}function f(t){return t===null?n(t):t===45?(e.consume(t),p):yM(t)?(o=f,P(t)):(e.consume(t),f)}function p(t){return t===45?(e.consume(t),m):f(t)}function m(e){return e===62?N(e):e===45?p(e):f(e)}function h(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?g:h):n(t)}function g(t){return t===null?n(t):t===93?(e.consume(t),_):yM(t)?(o=g,P(t)):(e.consume(t),g)}function _(t){return t===93?(e.consume(t),v):g(t)}function v(t){return t===62?N(t):t===93?(e.consume(t),v):g(t)}function y(t){return t===null||t===62?N(t):yM(t)?(o=y,P(t)):(e.consume(t),y)}function b(t){return t===null?n(t):t===63?(e.consume(t),x):yM(t)?(o=b,P(t)):(e.consume(t),b)}function x(e){return e===62?N(e):b(e)}function S(t){return CM(t)?(e.consume(t),C):n(t)}function C(t){return t===45||wM(t)?(e.consume(t),C):w(t)}function w(t){return yM(t)?(o=w,P(t)):xM(t)?(e.consume(t),w):N(t)}function T(t){return t===45||wM(t)?(e.consume(t),T):t===47||t===62||bM(t)?E(t):n(t)}function E(t){return t===47?(e.consume(t),N):t===58||t===95||CM(t)?(e.consume(t),D):yM(t)?(o=E,P(t)):xM(t)?(e.consume(t),E):N(t)}function D(t){return t===45||t===46||t===58||t===95||wM(t)?(e.consume(t),D):O(t)}function O(t){return t===61?(e.consume(t),k):yM(t)?(o=O,P(t)):xM(t)?(e.consume(t),O):E(t)}function k(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,A):yM(t)?(o=k,P(t)):xM(t)?(e.consume(t),k):(e.consume(t),j)}function A(t){return t===i?(e.consume(t),i=void 0,M):t===null?n(t):yM(t)?(o=A,P(t)):(e.consume(t),A)}function j(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||bM(t)?E(t):(e.consume(t),j)}function M(e){return e===47||e===62||bM(e)?E(e):n(e)}function N(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function P(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),F}function F(t){return xM(t)?jM(e,I,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):I(t)}function I(t){return e.enter(`htmlTextData`),o(t)}}var sXn,cXn=o((()=>{MM(),OM(),sXn={name:`htmlText`,tokenize:oXn}}));function lXn(e){let t=-1,n=[];for(;++t{jYn(),NYn(),FYn(),IYn(),OM(),hM(),_M(),IJn(),hXn={name:`labelEnd`,resolveAll:lXn,resolveTo:uXn,tokenize:dXn},gXn={tokenize:fXn},_Xn={tokenize:pXn},vXn={tokenize:mXn}}));function bXn(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var xXn,SXn=o((()=>{yXn(),xXn={name:`labelStartImage`,resolveAll:hXn.resolveAll,tokenize:bXn}}));function CXn(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var wXn,TXn=o((()=>{yXn(),wXn={name:`labelStartLink`,resolveAll:hXn.resolveAll,tokenize:CXn}}));function EXn(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),jM(e,t,`linePrefix`)}}var DXn,OXn=o((()=>{MM(),DXn={name:`lineEnding`,tokenize:EXn}}));function kXn(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),l(a)):r>=3&&(a===null||yM(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function l(t){return t===i?(e.consume(t),r++,l):(e.exit(`thematicBreakSequence`),xM(t)?jM(e,s,`whitespace`)(t):s(t))}}var LM,AXn=o((()=>{MM(),OM(),LM={name:`thematicBreak`,tokenize:kXn}}));function jXn(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:TM(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(LM,n,u)(t):u(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),l(t)}return n(t)}function l(t){return TM(t)&&++o<10?(e.consume(t),l):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),u(t)):n(t)}function u(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(PM,r.interrupt?n:d,e.attempt(IXn,p,f))}function d(e){return r.containerState.initialBlankLine=!0,a++,p(e)}function f(t){return xM(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),p):n(t)}function p(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function MXn(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(PM,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,jM(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!xM(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(LXn,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,jM(e,e.attempt(RM,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function NXn(e,t,n){let r=this;return jM(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function PXn(e){e.exit(this.containerState.type)}function FXn(e,t,n){let r=this;return jM(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!xM(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var RM,IXn,LXn,RXn=o((()=>{MM(),OM(),KJn(),AXn(),RM={continuation:{tokenize:MXn},exit:PXn,name:`list`,tokenize:jXn},IXn={partial:!0,tokenize:FXn},LXn={partial:!0,tokenize:NXn}}));function zXn(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function BXn(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),xM(t)?jM(e,l,`lineSuffix`)(t):l(t))}function l(r){return r===null||yM(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var VXn,HXn=o((()=>{MM(),OM(),VXn={name:`setextUnderline`,resolveTo:zXn,tokenize:BXn}})),UXn=o((()=>{VJn(),WJn(),KJn(),ZJn(),eYn(),rYn(),cYn(),pYn(),vYn(),kYn(),VYn(),WYn(),JYn(),aXn(),cXn(),yXn(),SXn(),TXn(),OXn(),RXn(),HXn(),AXn()}));function WXn(e){let t=this,n=e.attempt(PM,r,e.attempt(this.parser.constructs.flowInitial,i,jM(e,e.attempt(this.parser.constructs.flow,i,e.attempt(DYn,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var GXn,KXn=o((()=>{UXn(),MM(),GXn={tokenize:WXn}}));function qXn(e){return{resolveAll:JXn(e===`text`?YXn:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return l(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return l(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function l(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i{XXn={resolveAll:JXn()},ZXn=qXn(`string`),QXn=qXn(`text`)})),eZn=l({attentionMarkers:()=>cZn,contentInitial:()=>nZn,disable:()=>lZn,document:()=>tZn,flow:()=>iZn,flowInitial:()=>rZn,insideSpan:()=>sZn,string:()=>aZn,text:()=>oZn}),tZn,nZn,rZn,iZn,aZn,oZn,sZn,cZn,lZn,uZn=o((()=>{UXn(),$Xn(),tZn={42:RM,43:RM,45:RM,48:RM,49:RM,50:RM,51:RM,52:RM,53:RM,54:RM,55:RM,56:RM,57:RM,62:XJn},nZn={91:zYn},rZn={[-2]:dYn,[-1]:dYn,32:dYn},iZn={35:qYn,42:LM,45:[VXn,LM],60:nXn,61:VXn,95:LM,96:sYn,126:sYn},aZn={38:nYn,92:$Jn},oZn={[-5]:DXn,[-4]:DXn,[-3]:DXn,33:xXn,38:nYn,42:BJn,60:[UJn,sXn],91:wXn,92:[UYn,$Jn],93:hXn,95:BJn,96:_Yn},sZn={null:[BJn,XXn]},cZn={null:[42,95]},lZn={null:[]}}));function dZn(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],l={attempt:w(S),check:w(C),consume:y,enter:b,exit:x,interrupt:w(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:h,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:f},d=t.tokenize.call(u,l);return t.resolveAll&&a.push(t),u;function f(e){return o=mM(o,e),_(),o[o.length-1]===null?(T(t,0),u.events=FJn(a,u.events,u),u.events):[]}function p(e,t){return pZn(m(e),t)}function m(e){return fZn(o,e)}function h(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function g(e){i[e.line]=e.column,D()}function _(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function pZn(e,t){let n=-1,r=[],i;for(;++n{OM(),hM(),IJn()}));function hZn(e){let t={constructs:gJn([eZn,...(e||{}).extensions||[]]),content:n(DJn),defined:[],document:n(jJn),flow:n(GXn),lazy:{},string:n(ZXn),text:n(QXn)};return t;function n(e){return n;function n(n){return dZn(t,e,n)}}}var gZn=o((()=>{bJn(),OJn(),NJn(),KXn(),$Xn(),uZn(),mZn()}));function _Zn(e){for(;!xYn(e););return e}var vZn=o((()=>{CYn()}));function yZn(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],l,u,d,f,p;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t=``,n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d{bZn=/[\0\t\n\r]/g})),SZn=o((()=>{fM(),bJn(),AM(),gZn(),vZn(),xZn()}));function CZn(e){return e.replace(TZn,wZn)}function wZn(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return xJn(n.slice(t?2:1),t?16:10)}return mJn(n)||e}var TZn,EZn=o((()=>{fM(),SJn(),TZn=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi}));function DZn(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),OZn(n)(_Zn(hZn(n).document().write(yZn()(e,t,!0))))}function OZn(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ge),autolinkProtocol:E,autolinkEmail:E,atxHeading:a(fe),blockQuote:a(se),characterEscape:E,characterReference:E,codeFenced:a(ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ce,o),codeText:a(le,o),codeTextData:E,data:E,codeFlowValue:E,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:E,htmlText:a(me,o),htmlTextData:E,image:a(he),label:o,link:a(ge),listItem:a(ve),listItemValue:p,listOrdered:a(_e,f),listUnordered:a(_e),paragraph:a(ye),reference:te,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(be),thematicBreak:a(Se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:re,characterReference:ie,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ne,resourceDestinationString:L,resourceTitleString:R,resource:ee,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};kZn(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:d,data:n},l=[],f=-1;for(;++f0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||jZn).call(a,void 0,e[0])}for(r.position={start:zM(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:zM(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},f=-1;++f{pJn(),SZn(),SJn(),EZn(),_M(),fM(),Dqn(),MZn={}.hasOwnProperty})),PZn=o((()=>{NZn()}));function FZn(e){let t=this;t.parser=n;function n(n){return DZn(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}var IZn=o((()=>{PZn()})),LZn=o((()=>{IZn()}));function RZn(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}var zZn=o((()=>{}));function BZn(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:` `}]}var VZn=o((()=>{}));function HZn(e,t){let n=t.value?t.value+` `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}var UZn=o((()=>{}));function WZn(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var GZn=o((()=>{}));function KZn(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var qZn=o((()=>{}));function JZn(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=kM(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let l={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,l);let u={type:`element`,tagName:`sup`,properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}var YZn=o((()=>{AM()}));function XZn(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var ZZn=o((()=>{}));function QZn(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}var $Zn=o((()=>{}));function eQn(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}var tQn=o((()=>{}));function nQn(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eQn(e,t);let i={src:kM(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}var rQn=o((()=>{AM(),tQn()}));function iQn(e,t){let n={src:kM(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}var aQn=o((()=>{AM()}));function oQn(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}var sQn=o((()=>{}));function cQn(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eQn(e,t);let i={href:kM(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var lQn=o((()=>{AM(),tQn()}));function uQn(e,t){let n={href:kM(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}var dQn=o((()=>{AM()}));function fQn(e,t,n){let r=e.all(t),i=n?pQn(n):mQn(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}var hQn=o((()=>{}));function gQn(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i{}));function vQn(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var yQn=o((()=>{}));function bQn(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}var xQn=o((()=>{}));function SQn(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var CQn=o((()=>{}));function wQn(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=oM(t.children[1]),o=bqn(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}var TQn=o((()=>{Sqn()}));function EQn(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,l=[];for(;++s{}));function OQn(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var kQn=o((()=>{}));function AQn(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(jQn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(jQn(t.slice(i),i>0,!1)),a.join(``)}function jQn(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===MQn||t===NQn;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===MQn||t===NQn;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}var MQn,NQn,PQn=o((()=>{MQn=9,NQn=32}));function FQn(e,t){let n={type:`text`,value:AQn(String(t.value))};return e.patch(t,n),e.applyData(t,n)}var IQn=o((()=>{PQn()}));function LQn(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var RQn=o((()=>{}));function zQn(){}var BQn,VQn=o((()=>{zZn(),VZn(),UZn(),GZn(),qZn(),YZn(),ZZn(),$Zn(),rQn(),aQn(),sQn(),lQn(),dQn(),hQn(),_Qn(),yQn(),xQn(),CQn(),TQn(),DQn(),kQn(),IQn(),RQn(),BQn={blockquote:RZn,break:BZn,code:HZn,delete:WZn,emphasis:KZn,footnoteReference:JZn,heading:XZn,html:QZn,imageReference:nQn,image:iQn,inlineCode:oQn,linkReference:cQn,link:uQn,listItem:fQn,list:gQn,paragraph:vQn,root:bQn,strong:SQn,table:wQn,tableCell:OQn,tableRow:EQn,text:FQn,thematicBreak:LQn,toml:zQn,yaml:zQn,definition:zQn,footnoteDefinition:zQn}})),HQn=o((()=>{})),UQn,WQn,GQn,KQn=o((()=>{HQn(),UQn=typeof self==`object`?self:globalThis,WQn=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new UQn[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new UQn[a](o),i)};return r},GQn=e=>WQn(new Map,e)(0)})),BM,qQn,JQn,VM,HM,YQn,XQn,ZQn=o((()=>{HQn(),BM=``,{toString:qQn}={},{keys:JQn}=Object,VM=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=qQn.call(e).slice(8,-1);switch(n){case`Array`:return[1,BM];case`Object`:return[2,BM];case`Date`:return[3,BM];case`RegExp`:return[4,BM];case`Map`:return[5,BM];case`Set`:return[6,BM];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},HM=([e,t])=>e===0&&(t===`function`||t===`symbol`),YQn=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=VM(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],l=i([o,n],r);for(let t of JQn(r))(e||!HM(VM(r[t])))&&n.push([a(t),a(r[t])]);return l}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(HM(VM(n))||HM(VM(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!HM(VM(n)))&&t.push(a(n));return n}}let{message:l}=r;return i([o,{name:s,message:l}],r)};return a},XQn=(e,{json:t,lossy:n}={})=>{let r=[];return YQn(!(t||n),!!t,new Map,r)(e),r}})),UM,QQn=o((()=>{KQn(),ZQn(),UM=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?GQn(XQn(e,t)):structuredClone(e):(e,t)=>GQn(XQn(e,t))}));function $Qn(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function e$n(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function t$n(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||$Qn,r=e.options.footnoteBackLabel||e$n,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],l=-1;for(;++l0&&f.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(l,d);typeof e==`string`&&(e={type:`text`,value:e}),f.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+u+(d>1?`-`+d:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(l,d),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let m=a[a.length-1];if(m&&m.type===`element`&&m.tagName===`p`){let e=m.children[m.children.length-1];e&&e.type===`text`?e.value+=` `:m.children.push({type:`text`,value:` `}),m.children.push(...f)}else a.push(...f);let h={type:`element`,tagName:`li`,properties:{id:t+`fn-`+u},children:e.wrap(a,!0)};e.patch(i,h),s.push(h)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...UM(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` `}]}}var n$n=o((()=>{QQn(),AM()}));function r$n(e){let t=[],n=-1;for(;++n{WM=(function(e){if(e==null)return s$n;if(typeof e==`function`)return o$n(e);if(typeof e==`object`)return Array.isArray(e)?r$n(e):i$n(e);if(typeof e==`string`)return a$n(e);throw Error(`Expected function, string, or object as test`)})})),u$n=o((()=>{l$n()}));function d$n(e){return e}var f$n=o((()=>{}));function p$n(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=WM(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,l){let u=e&&typeof e==`object`?e:{};if(typeof u.type==`string`){let t=typeof u.tagName==`string`?u.tagName:typeof u.name==`string`?u.name:void 0;Object.defineProperty(d,"name",{value:`node (`+d$n(e.type+(t?`<`+t+`>`:``))+`)`})}return d;function d(){let u=h$n,d,f,p;if((!t||a(e,i,l[l.length-1]||void 0))&&(u=m$n(n(e,l)),u[0]===!1))return u;if(`children`in e&&e.children){let t=e;if(t.children&&u[0]!==`skip`)for(f=(r?t.children.length:-1)+o,p=l.concat(t);f>-1&&f{u$n(),f$n(),h$n=[]})),_$n=o((()=>{g$n()}));function v$n(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),p$n(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var y$n=o((()=>{_$n()})),b$n=o((()=>{y$n()}));function x$n(e,t){let n=t||O$n,r=new Map,i=new Map,a={all:s,applyData:C$n,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...BQn,...n.handlers},one:o,options:n,patch:S$n,wrap:T$n};return v$n(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(D$n.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=UM(n);return r.children=a.all(e),r}return UM(e)}return(a.options.unknownHandler||w$n)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r0&&n.push({type:`text`,value:` `}),n}function E$n(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}var D$n,O$n,k$n=o((()=>{QQn(),b$n(),Sqn(),VQn(),D$n={}.hasOwnProperty,O$n={}}));function A$n(e,t){let n=x$n(e,t),r=n.one(e,void 0),i=t$n(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` `},i)),a}var j$n=o((()=>{Uj(),n$n(),k$n()})),M$n=o((()=>{VQn(),j$n(),n$n()}));function N$n(e,t){return e&&`run`in e?async function(n,r){let i=A$n(n,{file:r,...t});await e.run(i,r)}:function(n,r){return A$n(n,{file:r,...e||t})}}var P$n=o((()=>{M$n()})),F$n=o((()=>{M$n(),P$n()}));function I$n(e){if(e)throw e}var L$n=o((()=>{})),R$n=s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},l=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,d,f=arguments[0],p=1,m=arguments.length,h=!1;for(typeof f==`boolean`&&(h=f,f=arguments[1]||{},p=2),(f==null||typeof f!=`object`&&typeof f!=`function`)&&(f={});p{}));function V$n(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],l=-1;if(a)r(a);else{for(;++lt.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var U$n=o((()=>{})),W$n=o((()=>{U$n()}));function G$n(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);GM(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function K$n(e){if(GM(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function q$n(e){GM(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function J$n(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function X$n(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o2){if(l=n.lastIndexOf(`/`),l!==n.length-1){l<0?(n=``,r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function GM(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var KM,Z$n=o((()=>{KM={basename:G$n,dirname:K$n,extname:q$n,join:J$n,sep:`/`}}));function Q$n(){return`/`}var $$n,e1n=o((()=>{$$n={cwd:Q$n}}));function t1n(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}var n1n=o((()=>{}));function r1n(e){if(typeof e==`string`)e=new URL(e);else if(!t1n(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return i1n(e)}function i1n(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n{n1n()}));function o1n(e,t){if(e&&e.includes(KM.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+KM.sep+"`")}function s1n(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function c1n(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function l1n(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var u1n,d1n,f1n=o((()=>{kqn(),Z$n(),e1n(),a1n(),u1n=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],d1n=class{constructor(e){let t;t=e?t1n(e)?{path:e}:typeof e==`string`||l1n(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:$$n.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n{f1n()})),m1n,h1n=o((()=>{m1n=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r})}));function g1n(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function _1n(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function v1n(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function y1n(e){if(!z$n(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function b1n(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function x1n(e){return S1n(e)?e:new d1n(e)}function S1n(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function C1n(e){return typeof e==`string`||w1n(e)}function w1n(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var T1n,E1n,D1n,O1n,k1n=o((()=>{L$n(),T1n=d(R$n(),1),Uj(),B$n(),W$n(),p1n(),h1n(),E1n={}.hasOwnProperty,D1n=class e extends m1n{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=V$n()}copy(){let t=new e,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];z$n(o)&&z$n(r)&&(r=(0,T1n.default)(!0,o,r)),n[i]=[e,r,...a]}}}},O1n=new D1n().freeze()})),A1n=o((()=>{k1n()}));function j1n(e){let t=M1n(e),n=N1n(e);return P1n(t.runSync(t.parse(n),n),e)}function M1n(e){let t=e.rehypePlugins||L1n,n=e.remarkPlugins||L1n,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...R1n}:R1n;return O1n().use(FZn).use(n).use(N$n,r).use(t)}function N1n(e){let t=e.children||``,n=new d1n;return typeof t==`string`?n.value=t:``+t,n}function P1n(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||F1n;for(let e of B1n)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return v$n(e,u),Aqn(e,{Fragment:I1n.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I1n.jsx,jsxs:I1n.jsxs,passKeys:!0,passNode:!0});function u(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in dM)if(Object.hasOwn(dM,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=dM[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=l(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function F1n(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||z1n.test(e.slice(0,t))?e:``}var I1n,L1n,R1n,z1n,B1n,V1n=o((()=>{Uj(),iJn(),oJn(),I1n=Ie(),p(),LZn(),F$n(),A1n(),b$n(),p1n(),L1n=[],R1n={allowDangerousHtml:!0},z1n=/^(https?|ircs?|mailto|xmpp)$/i,B1n=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}]})),H1n=o((()=>{V1n()}));function U1n(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var W1n=o((()=>{}));function G1n(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var K1n=o((()=>{}));function q1n(e,t,n){let r=WM((n||{}).ignore||[]),i=J1n(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&d.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?d.push(...a):a&&d.push(a),s=n+f[0].length,u=!0),!r.global)break;f=r.exec(e.value)}return u?(s{K1n(),_$n(),u$n()})),Q1n=o((()=>{Z1n()}));function $1n(){return{transforms:[s0n],enter:{literalAutolink:t0n,literalAutolinkEmail:n0n,literalAutolinkHttp:n0n,literalAutolinkWww:n0n},exit:{literalAutolink:o0n,literalAutolinkEmail:a0n,literalAutolinkHttp:r0n,literalAutolinkWww:i0n}}}function e0n(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:p0n,notInConstruct:m0n},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:p0n,notInConstruct:m0n},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:p0n,notInConstruct:m0n}]}}function t0n(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function n0n(e){this.config.enter.autolinkProtocol.call(this,e)}function r0n(e){this.config.exit.autolinkProtocol.call(this,e)}function i0n(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function a0n(e){this.config.exit.autolinkEmail.call(this,e)}function o0n(e){this.exit(e)}function s0n(e){q1n(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,c0n],[RegExp(`(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)`,`gu`),l0n]],{ignore:[`link`,`linkReference`]})}function c0n(e,t,n,r,i){let a=``;if(!f0n(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!u0n(n)))return!1;let o=d0n(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function l0n(e,t,n,r){return!f0n(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function u0n(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function d0n(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=U1n(e,`(`),a=U1n(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function f0n(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||DM(n)||EM(n))&&(!t||n!==47)}var p0n,m0n,h0n=o((()=>{W1n(),Uj(),OM(),Q1n(),p0n=`phrasing`,m0n=[`autolink`,`link`,`image`,`label`]})),g0n=o((()=>{h0n()}));function _0n(){this.buffer()}function v0n(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function y0n(){this.buffer()}function b0n(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function x0n(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gM(this.sliceSerialize(e)).toLowerCase(),n.label=t}function S0n(e){this.exit(e)}function C0n(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gM(this.sliceSerialize(e)).toLowerCase(),n.label=t}function w0n(e){this.exit(e)}function T0n(){return`[`}function E0n(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function D0n(){return{enter:{gfmFootnoteCallString:_0n,gfmFootnoteCall:v0n,gfmFootnoteDefinitionLabelString:y0n,gfmFootnoteDefinition:b0n},exit:{gfmFootnoteCallString:x0n,gfmFootnoteCall:S0n,gfmFootnoteDefinitionLabelString:C0n,gfmFootnoteDefinition:w0n}}}function O0n(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:E0n},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),l=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),l(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?A0n:k0n))),s(),o}}function k0n(e,t,n){return t===0?e:A0n(e,t,n)}function A0n(e,t,n){return(n?``:` `)+e}var j0n=o((()=>{Uj(),_M(),E0n.peek=T0n})),M0n=o((()=>{j0n()}));function N0n(){return{canContainEols:[`delete`],enter:{strikethrough:F0n},exit:{strikethrough:I0n}}}function P0n(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:z0n}],handlers:{delete:L0n}}}function F0n(e){this.enter({type:`delete`,children:[]},e)}function I0n(e){this.exit(e)}function L0n(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function R0n(){return`~`}var z0n,B0n=o((()=>{z0n=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],L0n.peek=R0n})),V0n=o((()=>{B0n()}));function H0n(e){return e.length}function U0n(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||H0n,a=[],o=[],s=[],l=[],u=0,d=-1;for(;++du&&(u=e[d].length);++al[a])&&(l[a]=e)}t.push(o)}o[d]=t,s[d]=r}let f=-1;if(typeof r==`object`&&`length`in r)for(;++fl[f]&&(l[f]=i),m[f]=i),p[f]=o}o.splice(1,0,p),s.splice(1,0,m),d=-1;let h=[];for(;++d{}));function q0n(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),J0n);return i(),o}function J0n(e,t,n){return`>`+(n?``:` `)+e}var Y0n=o((()=>{}));function X0n(e,t){return Z0n(e,t.inConstruct,!0)&&!Z0n(e,t.notInConstruct,!1)}function Z0n(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r{}));function $0n(e,t,n,r){let i=-1;for(;++i{Q0n()}));function t2n(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}var n2n=o((()=>{}));function r2n(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}var i2n=o((()=>{}));function a2n(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}var o2n=o((()=>{}));function s2n(e,t,n,r){let i=a2n(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(r2n(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,c2n);return e(),t}let s=n.createTracker(r),l=i.repeat(Math.max(t2n(a,i)+1,3)),u=n.enter(`codeFenced`),d=s.move(l);if(e.lang){let t=n.enter(`codeFencedLang${o}`);d+=s.move(n.safe(e.lang,{before:d,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);d+=s.move(` `),d+=s.move(n.safe(e.meta,{before:d,after:` `,encode:["`"],...s.current()})),t()}return d+=s.move(` `),a&&(d+=s.move(a+` `)),d+=s.move(l),u(),d}function c2n(e,t,n){return(n?``:` `)+e}var l2n=o((()=>{n2n(),i2n(),o2n()}));function u2n(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}var d2n=o((()=>{}));function f2n(e,t,n,r){let i=u2n(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),l=n.createTracker(r),u=l.move(`[`);return u+=l.move(n.safe(n.associationId(e),{before:u,after:`]`,...l.current()})),u+=l.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),u+=l.move(`<`),u+=l.move(n.safe(e.url,{before:u,after:`>`,...l.current()})),u+=l.move(`>`)):(s=n.enter(`destinationRaw`),u+=l.move(n.safe(e.url,{before:u,after:e.title?` `:` `,...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),u+=l.move(` `+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),o(),u}var p2n=o((()=>{d2n()}));function m2n(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}var h2n=o((()=>{}));function qM(e){return`&#x`+e.toString(16).toUpperCase()+`;`}var g2n=o((()=>{}));function _2n(e,t,n){let r=NM(e),i=NM(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var v2n=o((()=>{PJn()}));function y2n(e,t,n,r){let i=m2n(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),l=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),u=l.charCodeAt(0),d=_2n(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=qM(u)+l.slice(1));let f=l.charCodeAt(l.length-1),p=_2n(r.after.charCodeAt(0),f,i);p.inside&&(l=l.slice(0,-1)+qM(f));let m=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},s+l+m}function b2n(e,t,n){return n.options.emphasis||`*`}var x2n=o((()=>{h2n(),g2n(),v2n(),y2n.peek=b2n}));function S2n(e,t){let n=!1;return v$n(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&sJn(e)&&(t.options.setext||n))}var C2n=o((()=>{b$n(),pJn()}));function w2n(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(S2n(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` `,after:` `});return r(),t(),o+` `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),l=n.enter(`phrasing`);a.move(o+` `);let u=n.containerPhrasing(e,{before:`# `,after:` `,...a.current()});return/^[\t ]/.test(u)&&(u=qM(u.charCodeAt(0))+u.slice(1)),u=u?o+` `+u:o,n.options.closeAtx&&(u+=` `+o),l(),s(),u}var T2n=o((()=>{g2n(),C2n()}));function E2n(e){return e.value||``}function D2n(){return`<`}var O2n=o((()=>{E2n.peek=D2n}));function k2n(e,t,n,r){let i=u2n(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),l=n.createTracker(r),u=l.move(`![`);return u+=l.move(n.safe(e.alt,{before:u,after:`]`,...l.current()})),u+=l.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),u+=l.move(`<`),u+=l.move(n.safe(e.url,{before:u,after:`>`,...l.current()})),u+=l.move(`>`)):(s=n.enter(`destinationRaw`),u+=l.move(n.safe(e.url,{before:u,after:e.title?` `:`)`,...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),u+=l.move(` `+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(`)`),o(),u}function A2n(){return`!`}var j2n=o((()=>{d2n(),k2n.peek=A2n}));function M2n(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),l=s.move(`![`),u=n.safe(e.alt,{before:l,after:`]`,...s.current()});l+=s.move(u+`][`),o();let d=n.stack;n.stack=[],o=n.enter(`reference`);let f=n.safe(n.associationId(e),{before:l,after:`]`,...s.current()});return o(),n.stack=d,a(),i===`full`||!u||u!==f?l+=s.move(f+`]`):i===`shortcut`?l=l.slice(0,-1):l+=s.move(`]`),l}function N2n(){return`!`}var P2n=o((()=>{M2n.peek=N2n}));function F2n(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a{F2n.peek=I2n}));function R2n(e,t){let n=sJn(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}var z2n=o((()=>{pJn()}));function B2n(e,t,n,r){let i=u2n(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,l;if(R2n(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),l=n.enter(`label`);let u=o.move(`[`);return u+=o.move(n.containerPhrasing(e,{before:u,after:`](`,...o.current()})),u+=o.move(`](`),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter(`destinationLiteral`),u+=o.move(`<`),u+=o.move(n.safe(e.url,{before:u,after:`>`,...o.current()})),u+=o.move(`>`)):(l=n.enter(`destinationRaw`),u+=o.move(n.safe(e.url,{before:u,after:e.title?` `:`)`,...o.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=o.move(` `+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(`)`),s(),u}function V2n(e,t,n){return R2n(e,n)?`<`:`[`}var H2n=o((()=>{d2n(),z2n(),B2n.peek=V2n}));function U2n(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),l=s.move(`[`),u=n.containerPhrasing(e,{before:l,after:`]`,...s.current()});l+=s.move(u+`][`),o();let d=n.stack;n.stack=[],o=n.enter(`reference`);let f=n.safe(n.associationId(e),{before:l,after:`]`,...s.current()});return o(),n.stack=d,a(),i===`full`||!u||u!==f?l+=s.move(f+`]`):i===`shortcut`?l=l.slice(0,-1):l+=s.move(`]`),l}function W2n(){return`[`}var G2n=o((()=>{U2n.peek=W2n}));function K2n(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var q2n=o((()=>{}));function J2n(e){let t=K2n(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}var Y2n=o((()=>{q2n()}));function X2n(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}var Z2n=o((()=>{}));function Q2n(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}var $2n=o((()=>{}));function e4n(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?X2n(n):K2n(n),s=e.ordered?o===`.`?`)`:`.`:J2n(n),l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Q2n(n)===o&&t){let t=-1;for(;++t{q2n(),Y2n(),Z2n(),$2n()}));function n4n(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var r4n=o((()=>{}));function i4n(e,t,n,r){let i=n4n(n),a=n.bulletCurrent||K2n(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let l=n.enter(`listItem`),u=n.indentLines(n.containerFlow(e,s.current()),d);return l(),u;function d(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}var a4n=o((()=>{q2n(),r4n()}));function o4n(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var s4n=o((()=>{})),c4n,l4n=o((()=>{u$n(),c4n=WM([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`])})),u4n=o((()=>{l4n()}));function d4n(e,t,n,r){return(e.children.some(function(e){return c4n(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}var f4n=o((()=>{u4n()}));function p4n(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}var m4n=o((()=>{}));function h4n(e,t,n,r){let i=p4n(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),l=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),u=l.charCodeAt(0),d=_2n(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=qM(u)+l.slice(1));let f=l.charCodeAt(l.length-1),p=_2n(r.after.charCodeAt(0),f,i);p.inside&&(l=l.slice(0,-1)+qM(f));let m=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},s+l+m}function g4n(e,t,n){return n.options.strong||`*`}var _4n=o((()=>{m4n(),g2n(),v2n(),h4n.peek=g4n}));function v4n(e,t,n,r){return n.safe(e.value,r)}var y4n=o((()=>{}));function b4n(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}var x4n=o((()=>{}));function S4n(e,t,n){let r=(Q2n(n)+(n.options.ruleSpaces?` `:``)).repeat(b4n(n));return n.options.ruleSpaces?r.slice(0,-1):r}var C4n=o((()=>{x4n(),$2n()})),w4n,T4n=o((()=>{Y0n(),e2n(),l2n(),p2n(),x2n(),T2n(),O2n(),j2n(),P2n(),L2n(),H2n(),G2n(),t4n(),a4n(),s4n(),f4n(),_4n(),y4n(),C4n(),w4n={blockquote:q0n,break:$0n,code:s2n,definition:f2n,emphasis:y2n,hardBreak:$0n,heading:w2n,html:E2n,image:k2n,imageReference:M2n,inlineCode:F2n,link:B2n,linkReference:U2n,list:e4n,listItem:i4n,paragraph:o4n,root:d4n,strong:h4n,text:v4n,thematicBreak:S4n}})),E4n=o((()=>{T4n(),C2n(),EZn()}));function D4n(){return{enter:{table:O4n,tableData:M4n,tableHeader:M4n,tableRow:A4n},exit:{codeText:N4n,table:k4n,tableData:j4n,tableHeader:j4n,tableRow:j4n}}}function O4n(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function k4n(e){this.exit(e),this.data.inTable=void 0}function A4n(e){this.enter({type:`tableRow`,children:[]},e)}function j4n(e){this.exit(e)}function M4n(e){this.enter({type:`tableCell`,children:[]},e)}function N4n(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,P4n));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function P4n(e,t){return t===`|`?t:e}function F4n(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:p,table:o,tableCell:l,tableRow:s}};function o(e,t,n,r){return u(d(e,n,r),e.align)}function s(e,t,n,r){let i=u([f(e,n,r)]);return i.slice(0,i.indexOf(` `))}function l(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function u(e,t){return U0n(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i{Uj(),K0n(),E4n()})),L4n=o((()=>{I4n()}));function R4n(){return{exit:{taskListCheckValueChecked:B4n,taskListCheckValueUnchecked:B4n,paragraph:V4n}}}function z4n(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:H4n}}}function B4n(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function V4n(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i{Uj(),E4n()})),W4n=o((()=>{U4n()}));function G4n(){return[$1n(),D0n(),N0n(),D4n(),R4n()]}function K4n(e){return{extensions:[e0n(),O0n(e),P0n(),F4n(e),z4n()]}}var q4n=o((()=>{g0n(),M0n(),V0n(),L4n(),W4n()})),J4n=o((()=>{q4n()}));function Y4n(){return{text:YM}}function X4n(e,t,n){let r=this,i,a;return o;function o(t){return!s3n(t)||!o3n.call(r,r.previous)||c3n(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return s3n(t)?(e.consume(t),s):t===64?(e.consume(t),l):n(t)}function l(t){return t===46?e.check(p3n,d,u)(t):t===45||t===95||wM(t)?(a=!0,e.consume(t),l):d(t)}function u(t){return e.consume(t),i=!0,l}function d(o){return a&&i&&CM(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Z4n(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!i3n.call(r,r.previous)||c3n(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(l3n,e.attempt(u3n,e.attempt(d3n,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Q4n(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&a3n.call(r,r.previous)&&!c3n(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(CM(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),l}return n(t)}function l(t){return t===47?(e.consume(t),a?u:(a=!0,l)):n(t)}function u(t){return t===null||vM(t)||bM(t)||DM(t)||EM(t)?n(t):e.attempt(u3n,e.attempt(d3n,d),n)(t)}function d(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function $4n(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function e3n(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(f3n,l,s)(t):t===null||bM(t)||DM(t)||t!==45&&EM(t)?l(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function l(e){return i||r||!a?n(e):t(e)}}function t3n(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var l3n,u3n,d3n,f3n,p3n,m3n,h3n,JM,YM,XM,g3n=o((()=>{for(OM(),l3n={tokenize:$4n,partial:!0},u3n={tokenize:e3n,partial:!0},d3n={tokenize:t3n,partial:!0},f3n={tokenize:n3n,partial:!0},p3n={tokenize:r3n,partial:!0},m3n={name:`wwwAutolink`,tokenize:Z4n,previous:i3n},h3n={name:`protocolAutolink`,tokenize:Q4n,previous:a3n},JM={name:`emailAutolink`,tokenize:X4n,previous:o3n},YM={},XM=48;XM<123;)YM[XM]=JM,XM++,XM===58?XM=65:XM===91&&(XM=97);YM[43]=JM,YM[45]=JM,YM[46]=JM,YM[95]=JM,YM[72]=[JM,h3n],YM[104]=[JM,h3n],YM[87]=[JM,m3n],YM[119]=[JM,m3n]})),_3n=o((()=>{g3n(),AM()}));function v3n(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:S3n,continuation:{tokenize:C3n},exit:w3n}},text:{91:{name:`gfmFootnoteCall`,tokenize:x3n},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:y3n,resolveTo:b3n}}}}function y3n(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=gM(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function b3n(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function x3n(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(s){if(a>999||s===93&&!o||s===null||s===91||bM(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(gM(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return bM(s)||(o=!0),a++,e.consume(s),s===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),a++,u):u(t)}}function S3n(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return l;function l(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),u}function u(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,d):n(t)}function d(t){if(o>999||t===93&&!s||t===null||t===91||bM(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=gM(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),p}return bM(t)||(s=!0),o++,e.consume(t),t===92?f:d}function f(t){return t===91||t===92||t===93?(e.consume(t),o++,d):d(t)}function p(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),jM(e,m,`gfmFootnoteDefinitionWhitespace`)):n(t)}function m(e){return t(e)}}function C3n(e,t,n){return e.check(PM,t,e.attempt(E3n,t,n))}function w3n(e){e.exit(`gfmFootnoteDefinition`)}function T3n(e,t,n){let r=this;return jM(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}var E3n,D3n=o((()=>{UXn(),MM(),OM(),_M(),E3n={tokenize:T3n,partial:!0}})),O3n=o((()=>{D3n(),AM()}));function k3n(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,l);if(o<2&&!t)return r(a);let u=e.exit(`strikethroughSequenceTemporary`),d=NM(a);return u._open=!d||d===2&&!!s,u._close=!s||s===2&&!!d,n(a)}}}var A3n=o((()=>{hM(),PJn(),IJn()})),j3n=o((()=>{A3n()}));function M3n(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i{N3n=class{constructor(){this.map=[]}add(e,t,n){M3n(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}}));function F3n(e,t){let n=!1,r=[];for(;t{}));function L3n(){return{flow:{null:{name:`table`,tokenize:R3n,resolveAll:z3n}}}}function R3n(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?C:l;return a===C&&r.parser.lazy[r.now().line]?n(e):a(e)}function l(t){return e.enter(`tableHead`),e.enter(`tableRow`),u(t)}function u(e){return e===124||(o=!0,a+=1),d(e)}function d(t){return t===null?n(t):yM(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),m):n(t):xM(t)?jM(e,d,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,d):(e.enter(`data`),f(t)))}function f(t){return t===null||t===124||bM(t)?(e.exit(`data`),d(t)):(e.consume(t),t===92?p:f)}function p(t){return t===92||t===124?(e.consume(t),f):f(t)}function m(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,xM(t)?jM(e,h,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):h(t))}function h(t){return t===45||t===58?_(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),g):S(t)}function g(t){return xM(t)?jM(e,_,`whitespace`)(t):_(t)}function _(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),v):t===45?(a+=1,v(t)):t===null||yM(t)?x(t):S(t)}function v(t){return t===45?(e.enter(`tableDelimiterFiller`),y(t)):S(t)}function y(t){return t===45?(e.consume(t),y):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),b):(e.exit(`tableDelimiterFiller`),b(t))}function b(t){return xM(t)?jM(e,x,`whitespace`)(t):x(t)}function x(n){return n===124?h(n):n===null||yM(n)?!o||i!==a?S(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):S(n)}function S(e){return n(e)}function C(t){return e.enter(`tableRow`),w(t)}function w(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),w):n===null||yM(n)?(e.exit(`tableRow`),t(n)):xM(n)?jM(e,w,`whitespace`)(n):(e.enter(`data`),T(n))}function T(t){return t===null||t===124||bM(t)?(e.exit(`data`),w(t)):(e.consume(t),t===92?E:T)}function E(t){return t===92||t===124?(e.consume(t),T):T(t)}}function z3n(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,d,f,p=new N3n;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},ZM(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function V3n(e,t,n,r,i){let a=[],o=ZM(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function ZM(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var H3n=o((()=>{MM(),OM(),P3n(),I3n()})),U3n=o((()=>{H3n()}));function W3n(){return{text:{91:q3n}}}function G3n(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return bM(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return yM(r)?t(r):xM(r)?e.check({tokenize:K3n},t,n)(r):n(r)}}function K3n(e,t,n){return jM(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}var q3n,J3n=o((()=>{MM(),OM(),q3n={name:`tasklistCheck`,tokenize:G3n}})),Y3n=o((()=>{J3n()}));function X3n(e){return gJn([Y4n(),v3n(),k3n(e),L3n(),W3n()])}var Z3n=o((()=>{bJn(),_3n(),O3n(),j3n(),U3n(),Y3n()}));function Q3n(e){let t=this,n=e||$3n,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(X3n(n)),a.push(G4n()),o.push(K4n(n))}var $3n,e6n=o((()=>{J4n(),Z3n(),$3n={}})),t6n=o((()=>{e6n()})),n6n=l({Code:()=>i6n,Markdown:()=>a6n});function r6n(e,t){return t&&Vj.getLanguage(t)?Vj.highlight(e,{language:t}).value:Vj.highlightAuto(e).value}function i6n({code:e,content:t,language:n,className:r,cssClass:i,...a}){let o=e??t??``,s=(0,o6n.useMemo)(()=>r6n(o,n),[o,n]);return(0,QM.jsx)(`pre`,{...Ne(a),className:xn(`rounded-md bg-muted p-4 text-sm overflow-x-auto font-mono`,r,i),children:(0,QM.jsx)(`code`,{className:n?`language-${n}`:void 0,dangerouslySetInnerHTML:{__html:s}})})}function a6n({content:e,text:t,className:n,cssClass:r,...i}){let a=e??t??``;return(0,QM.jsx)(`div`,{...Ne(i),className:xn(`max-w-none`,n,r),children:(0,QM.jsx)(j1n,{remarkPlugins:[Q3n],components:{h1:({children:e})=>(0,QM.jsx)(`h1`,{className:`scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl mb-4`,children:e}),h2:({children:e})=>(0,QM.jsx)(`h2`,{className:`scroll-m-20 border-b border-border pb-2 text-3xl font-semibold tracking-tight first:mt-0 mt-8 mb-4`,children:e}),h3:({children:e})=>(0,QM.jsx)(`h3`,{className:`scroll-m-20 text-2xl font-semibold tracking-tight mt-6 mb-3`,children:e}),h4:({children:e})=>(0,QM.jsx)(`h4`,{className:`scroll-m-20 text-xl font-semibold tracking-tight mt-4 mb-2`,children:e}),p:({children:e})=>(0,QM.jsx)(`p`,{className:`leading-7 [&:not(:first-child)]:mt-4`,children:e}),blockquote:({children:e})=>(0,QM.jsx)(`blockquote`,{className:`mt-6 border-l-2 border-border pl-6 italic text-muted-foreground`,children:e}),ul:({children:e})=>(0,QM.jsx)(`ul`,{className:`my-4 ml-6 list-disc [&>li]:mt-2`,children:e}),ol:({children:e})=>(0,QM.jsx)(`ol`,{className:`my-4 ml-6 list-decimal [&>li]:mt-2`,children:e}),code:({children:e,className:t})=>{if(t){let n=t.replace(`language-`,``),r=r6n(String(e).replace(/\n$/,``),n);return(0,QM.jsx)(`pre`,{className:`rounded-md bg-muted p-4 text-sm overflow-x-auto my-4 font-mono`,children:(0,QM.jsx)(`code`,{dangerouslySetInnerHTML:{__html:r}})})}return(0,QM.jsx)(`code`,{className:`pf-code relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-medium`,children:e})},pre:({children:e})=>(0,QM.jsx)(QM.Fragment,{children:e}),table:({children:e})=>(0,QM.jsx)(`div`,{className:`my-6 w-full overflow-y-auto`,children:(0,QM.jsx)(`table`,{className:`w-full`,children:e})}),th:({children:e})=>(0,QM.jsx)(`th`,{className:`border border-border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right`,children:e}),td:({children:e})=>(0,QM.jsx)(`td`,{className:`border border-border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right`,children:e}),hr:()=>(0,QM.jsx)(`hr`,{className:`my-6`}),a:({href:e,children:t})=>(0,QM.jsx)(`a`,{href:e,className:`font-medium text-primary underline underline-offset-4`,target:`_blank`,rel:`noopener noreferrer`,children:t})},children:a})})}var o6n,QM,s6n=o((()=>{Pe(),o6n=d(p(),1),wGn(),EGn(),IGn(),KGn(),YGn(),ZGn(),$Gn(),tKn(),dKn(),pKn(),hKn(),H1n(),t6n(),Sn(),QM=Ie(),Vj.registerLanguage(`python`,TGn),Vj.registerLanguage(`javascript`,DGn),Vj.registerLanguage(`js`,DGn),Vj.registerLanguage(`typescript`,RGn),Vj.registerLanguage(`ts`,RGn),Vj.registerLanguage(`json`,qGn),Vj.registerLanguage(`bash`,XGn),Vj.registerLanguage(`sh`,XGn),Vj.registerLanguage(`shell`,XGn),Vj.registerLanguage(`sql`,QGn),Vj.registerLanguage(`html`,eKn),Vj.registerLanguage(`xml`,eKn),Vj.registerLanguage(`css`,nKn),Vj.registerLanguage(`yaml`,fKn),Vj.registerLanguage(`yml`,fKn),Vj.registerLanguage(`markdown`,mKn),Vj.registerLanguage(`md`,mKn)}));function c6n(e){return Object.prototype.toString.call(e)===`[object Object]`}function l6n(e){return c6n(e)||Array.isArray(e)}function u6n(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function d6n(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!l6n(r)||!l6n(i)?r===i:d6n(r,i)})}function f6n(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function p6n(e,t){if(e.length!==t.length)return!1;let n=f6n(e),r=f6n(t);return n.every((e,t)=>{let n=r[t];return d6n(e,n)})}var m6n=o((()=>{}));function h6n(e){return typeof e==`number`}function g6n(e){return typeof e==`string`}function _6n(e){return typeof e==`boolean`}function v6n(e){return Object.prototype.toString.call(e)===`[object Object]`}function $M(e){return Math.abs(e)}function y6n(e){return Math.sign(e)}function eN(e,t){return $M(e-t)}function b6n(e,t){return e===0||t===0||$M(e)<=$M(t)?0:$M(eN($M(e),$M(t))/e)}function x6n(e){return Math.round(e*100)/100}function tN(e){return iN(e).map(Number)}function nN(e){return e[rN(e)]}function rN(e){return Math.max(0,e.length-1)}function S6n(e,t){return t===rN(e)}function C6n(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function iN(e){return Object.keys(e)}function w6n(e,t){return[e,t].reduce((e,t)=>(iN(t).forEach(n=>{let r=e[n],i=t[n];e[n]=v6n(r)&&v6n(i)?w6n(r,i):i}),e),{})}function T6n(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function E6n(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return g6n(e)?n[e](r):e(t,r,i)}return{measure:o}}function aN(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function D6n(e,t,n,r){let i=aN(),a=1e3/60,o=null,s=0,l=0;function u(){i.add(e,`visibilitychange`,()=>{e.hidden&&h()})}function d(){m(),i.clear()}function f(e){if(!l)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),l&&(l=t.requestAnimationFrame(f))}function p(){l||(l=t.requestAnimationFrame(f))}function m(){t.cancelAnimationFrame(l),o=null,s=0,l=0}function h(){o=null,s=0}return{init:u,destroy:d,start:p,stop:m,update:n,render:r}}function O6n(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=d(),l=f();function u(e){let{height:t,width:n}=e;return r?t:n}function d(){return r?`top`:n?`right`:`left`}function f(){return r?`bottom`:n?`left`:`right`}function p(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:l,measureSize:u,direction:p}}function oN(e=0,t=0){let n=$M(e-t);function r(t){return tt}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function k6n(e,t,n){let{constrain:r}=oN(0,e),i=e+1,a=o(t);function o(e){return n?$M((i+e)%i):r(e)}function s(){return a}function l(e){return a=o(e),f}function u(e){return d().set(s()+e)}function d(){return k6n(e,s(),n)}let f={get:s,set:l,add:u,clone:d};return f}function A6n(e,t,n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y){let{cross:b,direction:x}=e,S=[`INPUT`,`SELECT`,`TEXTAREA`],C={passive:!1},w=aN(),T=aN(),E=oN(50,225).constrain(m.measure(20)),D={mouse:300,touch:400},O={mouse:500,touch:600},k=h?43:25,A=!1,j=0,M=0,N=!1,P=!1,F=!1,I=!1;function L(e){if(!y)return;function n(t){(_6n(y)||y(e,t))&&re(t)}let r=t;w.add(r,`dragstart`,e=>e.preventDefault(),C).add(r,`touchmove`,()=>void 0,C).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,ae).add(r,`contextmenu`,ae).add(r,`click`,oe,!0)}function R(){w.clear(),T.clear()}function ee(){let e=I?n:t;T.add(e,`touchmove`,ie,C).add(e,`touchend`,ae).add(e,`mousemove`,ie,C).add(e,`mouseup`,ae)}function te(e){let t=e.nodeName||``;return S.includes(t)}function ne(){return(h?O:D)[I?`mouse`:`touch`]}function z(e,t){let n=f.add(y6n(e)*-1),r=d.byDistance(e,!h).distance;return h||$M(e)=2,!(t&&e.button!==0)&&(te(e.target)||(N=!0,a.pointerDown(e),u.useFriction(0).useDuration(0),i.set(o),ee(),j=a.readPoint(e),M=a.readPoint(e,b),p.emit(`pointerDown`)))}function ie(e){if(!T6n(e,r)&&e.touches.length>=2)return ae(e);let t=a.readPoint(e),n=a.readPoint(e,b),o=eN(t,j),l=eN(n,M);if(!P&&!I&&(!e.cancelable||(P=o>l,!P)))return ae(e);let d=a.pointerMove(e);o>g&&(F=!0),u.useFriction(.3).useDuration(.75),s.start(),i.add(x(d)),e.preventDefault()}function ae(e){let t=d.byDistance(0,!1).index!==f.get(),n=a.pointerUp(e)*ne(),r=z(x(n),t),i=b6n(n,r),o=k-10*i,s=v+i/50;P=!1,N=!1,T.clear(),u.useDuration(o).useFriction(s),l.distance(r,!h),I=!1,p.emit(`pointerUp`)}function oe(e){F&&(e.stopPropagation(),e.preventDefault(),F=!1)}function se(){return N}return{init:L,destroy:R,pointerDown:se}}function j6n(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(T6n(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function l(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,l=t/o;return o&&!s&&$M(l)>.1?l:0}return{pointerDown:o,pointerMove:s,pointerUp:l,readPoint:a}}function M6n(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function N6n(e){function t(t){return t/100*e}return{measure:t}}function P6n(e,t,n,r,i,a,o){let s=[e].concat(r),l,u,d=[],f=!1;function p(e){return i.measureSize(o.measure(e))}function m(i){if(!a)return;u=p(e),d=r.map(p);function o(n){for(let a of n){if(f)return;let n=a.target===e,o=r.indexOf(a.target),s=n?u:d[o];if($M(p(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}l=new ResizeObserver(e=>{(_6n(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>l.observe(e))})}function h(){f=!0,l&&l.disconnect()}return{init:m,destroy:h}}function F6n(e,t,n,r,i,a){let o=0,s=0,l=i,u=a,d=e.get(),f=0;function p(){let t=r.get()-e.get(),i=!l,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/l,o*=u,d+=o,e.add(o),a=d-f),s=y6n(a),f=d,S}function m(){return $M(r.get()-t.get())<.001}function h(){return l}function g(){return s}function _(){return o}function v(){return b(i)}function y(){return x(a)}function b(e){return l=e,S}function x(e){return u=e,S}let S={direction:g,duration:h,velocity:_,seek:p,settled:m,useBaseFriction:y,useBaseDuration:v,useFriction:x,useDuration:b};return S}function I6n(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=oN(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(i){if(!u())return;let l=$M(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),d=n.get()-t.get(),f=s.constrain(l/o);n.subtract(d*f),!i&&$M(d){let{min:r,max:i}=a,o=a.constrain(e),s=!t,l=S6n(n,t);return s?i:l||u(r,o)?r:u(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function p(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:l}=s;return o.slice(n,l)}return{snapsContained:l,scrollContainLimit:s}}function R6n(e,t,n){let r=t[0];return{limit:oN(n?r-e:nN(t),r)}}function z6n(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=oN(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1&&a(n.get())}function l(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:l}}function B6n(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function V6n(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,l=f().map(t.measure),u=p(),d=m();function f(){return s(r).map(e=>nN(e)[o]-e[0][a]).map($M)}function p(){return r.map(e=>n[a]-e[a]).map(e=>-$M(e))}function m(){return s(u).map(e=>e[0]).map((e,t)=>e+l[t])}return{snaps:u,snapsAligned:d}}function H6n(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:l}=r,u=d();function d(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,l).map((e,t,n)=>{let r=!t,i=S6n(n,t);return r?C6n(nN(n[0])+1):i?C6n(rN(a)-nN(n)[0]+1,nN(n)[0]):e})}return{slideRegistry:u}}function U6n(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function l(e){return e.concat().sort((e,t)=>$M(e)-$M(t))[0]}function u(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:d(e-r,0),index:t})).sort((e,t)=>$M(e.diff)-$M(t.diff))[0];return{index:i,distance:r}}function d(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return l(i);let a=i.filter(e=>y6n(e)===r);return a.length?l(a):nN(i)-n}function f(e,n){return{index:e,distance:d(t[e]-i.get(),n)}}function p(n,r){let o=i.get()+n,{index:s,distance:l}=u(o),f=!e&&a(o);return!r||f?{index:s,distance:n}:{index:s,distance:n+d(t[s]-l,0)}}return{byDistance:p,byIndex:f,shortcut:d}}function W6n(e,t,n,r,i,a,o){function s(i){let s=i.distance,l=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function l(e,t){s(i.byDistance(e,t))}function u(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:l,index:u}}function G6n(e,t,n,r,i,a,o,s){let l={passive:!0,capture:!0},u=0;function d(d){if(!s)return;function p(t){if(new Date().getTime()-u>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));h6n(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,f,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(_6n(s)||s(d,e))&&p(t)},l)})}function f(e){e.code===`Tab`&&(u=new Date().getTime())}return{init:d}}function sN(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return h6n(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function K6n(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function l(t){if(a)return;let o=x6n(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function u(e){a=!e}function d(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:d,to:l,toggleActive:u}}function q6n(e,t,n,r,i,a,o,s,l){let u=.5,d=tN(i),f=tN(i).reverse(),p=v().concat(y());function m(e,t){return e.reduce((e,t)=>e-i[t],t)}function h(e,t){return e.reduce((e,n)=>m(e,t)>0?e.concat([n]):e,[])}function g(e){return a.map((n,i)=>({start:n-r[i]+u+e,end:n+t-u+e}))}function _(t,r,i){let a=g(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,u=i?`end`:`start`,d=a[t][u];return{index:t,loopPoint:d,slideLocation:sN(-1),translate:K6n(e,l[t]),target:()=>s.get()>d?r:o}})}function v(){let e=o[0];return _(h(f,e),n,!1)}function y(){let e=t-o[0]-1;return _(h(d,e),-n,!0)}function b(){return p.every(({index:e})=>m(d.filter(t=>t!==e),t)<=.1)}function x(){p.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function S(){p.forEach(e=>e.translate.clear())}return{canLoop:b,clear:S,loop:x,loopPoints:p}}function J6n(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(_6n(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Y6n(e,t,n,r){let i={},a=null,o=null,s,l=!1;function u(){s=new IntersectionObserver(e=>{l||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function d(){s&&s.disconnect(),l=!0}function f(e){return iN(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function p(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=f(e);return e&&(a=t),e||(o=t),t}return{init:u,destroy:d,get:p}}function X6n(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:l}=e,u=n[0]&&i,d=h(),f=g(),p=n.map(o),m=_();function h(){if(!u)return 0;let e=n[0];return $M(t[s]-e[s])}function g(){if(!u)return 0;let e=a.getComputedStyle(nN(r));return parseFloat(e.getPropertyValue(`margin-${l}`))}function _(){return n.map((e,t,n)=>{let r=!t,i=S6n(n,t);return r?p[t]+d:i?p[t]+f:n[t+1][s]-e[s]}).map($M)}return{slideSizes:p,slideSizesWithGaps:m,startGap:d,endGap:f}}function Z6n(e,t,n,r,i,a,o,s,l){let{startEdge:u,endEdge:d,direction:f}=e,p=h6n(n);function m(e,t){return tN(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function h(e){return e.length?tN(e).reduce((n,p,m)=>{let h=nN(n)||0,g=h===0,_=p===rN(e),v=i[u]-a[h][u],y=i[u]-a[p][d],b=!r&&g?f(o):0,x=$M(y-(!r&&_?f(s):0)-(v+b));return m&&x>t+l&&n.push(p),_&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function g(e){return p?m(e,n):h(e)}return{groupSlides:g}}function Q6n(e,t,n,r,i,a,o){let{align:s,axis:l,direction:u,startIndex:d,loop:f,duration:p,dragFree:m,dragThreshold:h,inViewThreshold:g,slidesToScroll:_,skipSnaps:v,containScroll:y,watchResize:b,watchSlides:x,watchDrag:S,watchFocus:C}=a,w=M6n(),T=w.measure(t),E=n.map(w.measure),D=O6n(l,u),O=D.measureSize(T),k=N6n(O),A=E6n(s,O),j=!f&&!!y,{slideSizes:M,slideSizesWithGaps:N,startGap:P,endGap:F}=X6n(D,T,E,n,f||!!y,i),I=Z6n(D,O,_,f,T,E,P,F,2),{snaps:L,snapsAligned:R}=V6n(D,A,T,E,I),ee=-nN(L)+nN(N),{snapsContained:te,scrollContainLimit:ne}=L6n(O,ee,R,y,2),z=j?te:R,{limit:re}=R6n(ee,z,f),ie=k6n(rN(z),d,f),ae=ie.clone(),oe=tN(n),se=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},ce=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:l,eventHandler:u,scrollBounds:d,options:{loop:f}},p)=>{let m=e.settled(),h=!d.shouldConstrain(),g=f?m:m&&h,_=g&&!s.pointerDown();_&&l.stop();let v=n.get()*p+i.get()*(1-p);r.set(v),f&&(a.loop(e.direction()),o.loop()),t.to(r.get()),_&&u.emit(`settle`),g||u.emit(`scroll`)},le=D6n(r,i,()=>se(we),e=>ce(we,e)),ue=.68,de=z[ie.get()],fe=sN(de),pe=sN(de),me=sN(de),he=sN(de),ge=F6n(fe,me,pe,he,p,ue),_e=U6n(f,z,ee,re,he),ve=W6n(le,ie,ae,ge,_e,he,o),ye=B6n(re),be=aN(),xe=Y6n(t,n,o,g),{slideRegistry:Se}=H6n(j,y,z,ne,I,oe),Ce=G6n(e,n,Se,ve,ge,be,o,C),we={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:T,slideRects:E,animation:le,axis:D,dragHandler:A6n(D,e,r,i,he,j6n(D,i),fe,le,ve,ge,_e,ie,o,k,m,h,v,ue,S),eventStore:be,percentOfView:k,index:ie,indexPrevious:ae,limit:re,location:fe,offsetLocation:me,previousLocation:pe,options:a,resizeHandler:P6n(t,o,i,n,D,b,w),scrollBody:ge,scrollBounds:I6n(re,me,he,ge,k),scrollLooper:z6n(ee,re,me,[fe,me,pe,he]),scrollProgress:ye,scrollSnapList:z.map(ye.get),scrollSnaps:z,scrollTarget:_e,scrollTo:ve,slideLooper:q6n(D,O,ee,M,N,L,z,me,n),slideFocus:Ce,slidesHandler:J6n(t,o,x),slidesInView:xe,slideIndexes:oe,slideRegistry:Se,slidesToScroll:I,target:he,translate:K6n(D,t)};return we}function $6n(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),l}function a(t,n){return e[t]=r(t).concat([n]),l}function o(t,n){return e[t]=r(t).filter(e=>e!==n),l}function s(){e={}}let l={init:n,emit:i,off:o,on:a,clear:s};return l}function e8n(e){function t(e,t){return w6n(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,iN(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>iN(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function t8n(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function n8n(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=e8n(i),o=t8n(a),s=aN(),l=$6n(),{mergeOptions:u,optionsAtMedia:d,optionsMediaQueries:f}=a,{on:p,off:m,emit:h}=l,g=O,_=!1,v,y=u(r8n,n8n.globalOptions),b=u(y),x=[],S,C,w;function T(){let{container:t,slides:n}=b;C=(g6n(t)?e.querySelector(t):t)||e.children[0];let r=g6n(n)?C.querySelectorAll(n):n;w=[].slice.call(r||C.children)}function E(t){let n=Q6n(e,C,w,r,i,t,l);return t.loop&&!n.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):n}function D(e,t){_||(y=u(y,e),b=d(y),x=t||x,T(),v=E(b),f([y,...x.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,O)),b.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(se),v.eventHandler.init(se),v.resizeHandler.init(se),v.slidesHandler.init(se),v.options.loop&&v.slideLooper.loop(),C.offsetParent&&w.length&&v.dragHandler.init(se),S=o.init(se,x)))}function O(e,t){let n=R();k(),D(u({startIndex:n},e),t),l.emit(`reInit`)}function k(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),o.destroy(),s.clear()}function A(){_||(_=!0,s.clear(),k(),l.emit(`destroy`),l.clear())}function j(e,t,n){b.active&&!_&&(v.scrollBody.useBaseFriction().useDuration(t===!0?0:b.duration),v.scrollTo.index(e,n||0))}function M(e){j(v.index.add(1).get(),e,-1)}function N(e){j(v.index.add(-1).get(),e,1)}function P(){return v.index.add(1).get()!==R()}function F(){return v.index.add(-1).get()!==R()}function I(){return v.scrollSnapList}function L(){return v.scrollProgress.get(v.offsetLocation.get())}function R(){return v.index.get()}function ee(){return v.indexPrevious.get()}function te(){return v.slidesInView.get()}function ne(){return v.slidesInView.get(!1)}function z(){return S}function re(){return v}function ie(){return e}function ae(){return C}function oe(){return w}let se={canScrollNext:P,canScrollPrev:F,containerNode:ae,internalEngine:re,destroy:A,off:m,on:p,emit:h,plugins:z,previousScrollSnap:ee,reInit:g,rootNode:ie,scrollNext:M,scrollPrev:N,scrollProgress:L,scrollSnapList:I,scrollTo:j,selectedScrollSnap:R,slideNodes:oe,slidesInView:te,slidesNotInView:ne};return D(t,n),setTimeout(()=>l.emit(`init`),0),se}var r8n,i8n=o((()=>{r8n={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0},n8n.globalOptions=void 0}));function a8n(e={},t=[]){let n=(0,cN.useRef)(e),r=(0,cN.useRef)(t),[i,a]=(0,cN.useState)(),[o,s]=(0,cN.useState)(),l=(0,cN.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,cN.useEffect)(()=>{d6n(n.current,e)||(n.current=e,l())},[e,l]),(0,cN.useEffect)(()=>{p6n(r.current,t)||(r.current=t,l())},[t,l]),(0,cN.useEffect)(()=>{if(u6n()&&o){n8n.globalOptions=a8n.globalOptions;let e=n8n(o,n.current,r.current);return a(e),()=>e.destroy()}a(void 0)},[o,a]),[s,i]}var cN,o8n=o((()=>{cN=d(p()),m6n(),i8n(),a8n.globalOptions=void 0}));function s8n(e,t){let n=e.scrollSnapList();return typeof t==`number`?n.map(()=>t):t(n,e)}function c8n(e,t){let n=e.rootNode();return t&&t(n)||n}function l8n(e={}){let t,n,r,i,a=null,o=0,s=!1,l=!1,u=!1,d=!1;function f(a,o){n=a;let{mergeOptions:s,optionsAtMedia:l}=o;if(t=l(s(s(u8n,l8n.globalOptions),e)),n.scrollSnapList().length<=1)return;d=t.jump,r=!1,i=s8n(n,t.delay);let{eventStore:u,ownerDocument:f}=n.internalEngine(),p=!!n.internalEngine().options.watchDrag,m=c8n(n,t.rootNode);u.add(f,`visibilitychange`,v),p&&n.on(`pointerDown`,b),p&&!t.stopOnInteraction&&n.on(`pointerUp`,x),t.stopOnMouseEnter&&u.add(m,`mouseenter`,S),t.stopOnMouseEnter&&!t.stopOnInteraction&&u.add(m,`mouseleave`,C),t.stopOnFocusIn&&n.on(`slideFocusStart`,_),t.stopOnFocusIn&&!t.stopOnInteraction&&u.add(n.containerNode(),`focusout`,g),t.playOnInit&&g()}function p(){n.off(`pointerDown`,b).off(`pointerUp`,x).off(`slideFocusStart`,_),_(),r=!0,s=!1}function m(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=e.setTimeout(O,i[n.selectedScrollSnap()]),a=new Date().getTime(),n.emit(`autoplay:timerset`)}function h(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=0,a=null,n.emit(`autoplay:timerstopped`)}function g(){r||(y()?u=!0:(s||n.emit(`autoplay:play`),m(),s=!0))}function _(){r||(s&&n.emit(`autoplay:stop`),h(),s=!1)}function v(){if(y())return u=s,_();u&&g()}function y(){let{ownerDocument:e}=n.internalEngine();return e.visibilityState===`hidden`}function b(){l||_()}function x(){l||g()}function S(){l=!0,_()}function C(){l=!1,g()}function w(e){e!==void 0&&(d=e),g()}function T(){s&&_()}function E(){s&&g()}function D(){return s}function O(){let{index:e}=n.internalEngine(),r=e.clone().add(1).get(),i=n.scrollSnapList().length-1,a=t.stopOnLastSnap&&r===i;if(n.canScrollNext()?n.scrollNext(d):n.scrollTo(0,d),n.emit(`autoplay:select`),a)return _();g()}function k(){return a?i[n.selectedScrollSnap()]-(new Date().getTime()-a):null}return{name:`autoplay`,options:e,init:f,destroy:p,play:w,stop:T,reset:E,isPlaying:D,timeUntilNext:k}}var u8n,d8n=o((()=>{u8n={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null},l8n.globalOptions=void 0}));function f8n(e,t){let n=e.rootNode();return t&&t(n)||n}function p8n(e={}){let t,n,r,i,a=0,o=!1,s=!1,l;function u(a,o){n=a;let{mergeOptions:s,optionsAtMedia:u}=o;if(t=u(s(s(m8n,p8n.globalOptions),e)),n.scrollSnapList().length<=1)return;i=t.startDelay,r=!1,l=n.internalEngine().scrollBody;let{eventStore:d}=n.internalEngine(),m=!!n.internalEngine().options.watchDrag,y=f8n(n,t.rootNode);m&&n.on(`pointerDown`,h),m&&!t.stopOnInteraction&&n.on(`pointerUp`,g),t.stopOnMouseEnter&&d.add(y,`mouseenter`,_),t.stopOnMouseEnter&&!t.stopOnInteraction&&d.add(y,`mouseleave`,v),t.stopOnFocusIn&&n.on(`slideFocusStart`,p),t.stopOnFocusIn&&!t.stopOnInteraction&&d.add(n.containerNode(),`focusout`,f),t.playOnInit&&f()}function d(){n.off(`pointerDown`,h).off(`pointerUp`,g).off(`slideFocusStart`,p).off(`settle`,y),p(),r=!0,o=!1}function f(){if(r||o)return;n.emit(`autoScroll:play`);let e=n.internalEngine(),{ownerWindow:t}=e;a=t.setTimeout(()=>{e.scrollBody=m(e),e.animation.start()},i),o=!0}function p(){if(r||!o)return;n.emit(`autoScroll:stop`);let e=n.internalEngine(),{ownerWindow:t}=e;e.scrollBody=l,t.clearTimeout(a),a=0,o=!1}function m(e){let{location:r,previousLocation:i,offsetLocation:a,target:o,scrollTarget:s,index:l,indexPrevious:u,limit:{reachedMin:d,reachedMax:f,constrain:m},options:{loop:h}}=e,g=t.direction===`forward`?-1:1,_=()=>w,v=0,y=0,b=r.get(),x=0,S=!1;function C(){let e=0;i.set(r),v=g*t.speed,b+=v,r.add(v),o.set(r),e=b-x,y=Math.sign(e),x=b;let _=s.byDistance(0,!1).index;l.get()!==_&&(u.set(l.get()),l.set(_),n.emit(`select`));let C=t.direction===`forward`?d(a.get()):f(a.get());if(!h&&C){S=!0;let e=m(r.get());r.set(e),o.set(r),p()}return w}let w={direction:()=>y,duration:()=>-1,velocity:()=>v,settled:()=>S,seek:C,useBaseFriction:_,useBaseDuration:_,useFriction:_,useDuration:_};return w}function h(){s||p()}function g(){s||b()}function _(){s=!0,p()}function v(){s=!1,f()}function y(){n.off(`settle`,y),f()}function b(){n.on(`settle`,y)}function x(e){e!==void 0&&(i=e),f()}function S(){o&&p()}function C(){o&&(p(),b())}function w(){return o}return{name:`autoScroll`,options:e,init:u,destroy:d,play:x,stop:S,reset:C,isPlaying:w}}var m8n,h8n=o((()=>{m8n={direction:`forward`,speed:2,startDelay:1e3,active:!0,breakpoints:{},playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,rootNode:null},p8n.globalOptions=void 0}));function g8n(e,t,n){return Math.min(Math.max(e,t),n)}function _8n(e){return typeof e==`number`&&!isNaN(e)}function v8n(e={}){let t,n=[],r,i=0,a=0,o=0,s=!1,l,u;function d(e){t=e;let i=t.selectedScrollSnap(),{scrollBody:a,containerRect:o,axis:d}=t.internalEngine();r=g8n(d.measureSize(o)*.75,200,500),s=!1,n=t.scrollSnapList().map((e,t)=>+(t===i)),l=a.settled,u=t.scrollProgress,a.settled=T,t.scrollProgress=E,t.on(`select`,g).on(`slideFocus`,p).on(`pointerDown`,h).on(`pointerUp`,m),v(),p()}function f(){let{scrollBody:e}=t.internalEngine();e.settled=l,t.scrollProgress=u,t.off(`select`,g).off(`slideFocus`,p).off(`pointerDown`,h).off(`pointerUp`,m),t.slideNodes().forEach(e=>{let t=e.style;t.opacity=``,t.transform=``,t.pointerEvents=``,e.getAttribute(`style`)||e.removeAttribute(`style`)})}function p(){b(t.selectedScrollSnap(),1)}function m(){s=!1}function h(){s=!1,i=0,a=0}function g(){let e=t.internalEngine().scrollBody.duration();a=+!e,s=!0,e||p()}function _(e){let{axis:n}=t.internalEngine();return`translate${n.scroll.toUpperCase()}(${n.direction(e)}px)`}function v(){let{translate:e,slideLooper:n}=t.internalEngine();e.clear(),e.toggleActive(!1),n.loopPoints.forEach(({translate:e})=>{e.clear(),e.toggleActive(!1)})}function y(e){let{scrollSnaps:r,location:i,target:a}=t.internalEngine();!_8n(e)||n[e]<.5||(i.set(r[e]),a.set(i))}function b(e,r){t.scrollSnapList().forEach((i,a)=>{let o=Math.abs(r),l=n[a],u=a===e,d=g8n(u?l+o:l-o,0,1);n[a]=d;let f=u&&s,p=t.previousScrollSnap();f&&(n[p]=1-d),u&&S(e,d),x(a)})}function x(e){let r=t.internalEngine().slideRegistry[e],{scrollSnaps:i,containerRect:a}=t.internalEngine(),o=n[e];r.forEach(n=>{let r=t.slideNodes()[n].style,s=parseFloat(o.toFixed(2)),l=s>0,u=_(l?i[e]:a.width+2);l&&(r.transform=u),r.opacity=s.toString(),r.pointerEvents=o>.5?`auto`:`none`,l||(r.transform=u)})}function S(e,n){let{index:r,dragHandler:a,scrollSnaps:s}=t.internalEngine(),l=a.pointerDown(),u=1/(s.length-1),d=e,f=l?t.selectedScrollSnap():t.previousScrollSnap();if(l&&d===f){let e=Math.sign(i)*-1;d=f,f=r.clone().set(f).add(e).get()}o=f*u+(d-f)*u*n}function C(){let{dragHandler:e,index:n,scrollBody:r}=t.internalEngine(),a=t.selectedScrollSnap();if(!e.pointerDown())return a;let o=Math.sign(r.velocity()),s=Math.sign(i),l=n.clone().set(a).add(o*-1).get();return!o||!s?null:s===o?l:a}function w(e){let{dragHandler:t,scrollBody:o}=e.internalEngine(),s=t.pointerDown(),l=o.velocity(),u=o.duration(),d=C(),f=!_8n(d);if(s){if(!l)return;i+=l,a=Math.abs(l/r),y(d)}if(!s){if(!u||f)return;a+=(1-n[d])/u,a*=.68}f||b(d,a)}function T(){let{target:e,location:r}=t.internalEngine(),i=e.get()-r.get(),a=Math.abs(i)>=1,o=C(),s=!_8n(o);return w(t),s||a?!1:n[o]>.999}function E(){return o}return{name:`fade`,options:e,init:d,destroy:f}}var y8n=o((()=>{v8n.globalOptions=void 0}));function b8n(e,t,n){return n===`fade`?1:e===void 0?t?null:1:e}function x8n(e,t,n){return t===`fade`&&n===1?0:e}function S8n(e){return e==null||e<=1?0:Math.ceil(e)-1}function C8n(e,t,n){if(e!=null)return t==null||t<=0?e:e*t+S8n(t)*n}function w8n(e,t,n){return(e-S8n(t)*n)/t}function T8n({loop:e,continuous:t,visibleCount:n,childCount:r}){if(!e||t||n==null||n<=1||r<=0)return 1;let i=Math.ceil(n)+1;return r>=i?1:Math.ceil(i/r)}var E8n=o((()=>{})),D8n=l({PrefabCarousel:()=>k8n});function O8n(e,t){let[n,r]=(0,lN.useState)(void 0);return[(0,lN.useCallback)(n=>{if(!n||!e||t!=null)return;let i=n.firstElementChild;i&&i.offsetHeight>0?r(i.offsetHeight):requestAnimationFrame(()=>{let e=n.firstElementChild;e&&e.offsetHeight>0&&r(e.offsetHeight)})},[e,t]),t??n]}function k8n({visible:e,gap:t=0,height:n,direction:r=`left`,loop:i=!0,autoAdvance:a=0,continuous:o=!1,speed:s=2,effect:l=`slide`,dimInactive:u=!1,showControls:d=!0,controlsPosition:f=`outside`,showDots:p=!1,pauseOnHover:m=!0,align:h=`start`,slidesToScroll:g=1,drag:_=!0,className:v,cssClass:y,children:b,...x}){let S=r===`up`||r===`down`,C=b8n(e,o,l),w=lN.Children.toArray(b).filter(e=>e!=null&&e!==``),[T,E]=O8n(S,n),D=!S||E!=null,O=C!=null&&C>0?C:null,k=x8n(t,l,O),A=S?n??C8n(E,O,k):void 0,j=k>0?k/2:0,M=O==null?void 0:S&&A!=null?`${w8n(A,O,k)}px`:`${100/O}%`,N=w;if(i&&o)N=[...w,...w.map((e,t)=>lN.cloneElement(e,{key:`dup1-${t}`})),...w.map((e,t)=>lN.cloneElement(e,{key:`dup2-${t}`}))];else if(i&&O!=null&&O>1&&w.length>0){let e=T8n({loop:i,continuous:o,visibleCount:O,childCount:w.length});e>1&&(N=Array.from({length:e},(e,t)=>w.map((e,n)=>lN.cloneElement(e,{key:`loopdup-${t}-${n}`}))).flat())}let P=w.length;return D?(0,uN.jsx)(A8n,{...Ne(x),isVertical:S,viewportHeight:A,validChildren:N,realSlideCount:P,slideBasis:M,effectiveGap:k,halfGap:j,loop:i,align:h,slidesToScroll:g,continuous:o,drag:_,effect:l,autoAdvance:a,speed:s,direction:r,pauseOnHover:m,dimInactive:u,showControls:d,controlsPosition:f,showDots:p,className:v,cssClass:y}):(0,uN.jsx)(`div`,{...Ne(x),ref:T,className:xn(v,y),style:{overflow:`hidden`,height:0,position:`relative`},children:w[0]})}function A8n({isVertical:e,viewportHeight:t,validChildren:n,realSlideCount:r,slideBasis:i,effectiveGap:a,halfGap:o,loop:s,align:l,slidesToScroll:u,continuous:d,drag:f,effect:p,autoAdvance:m,speed:h,direction:g,pauseOnHover:_,dimInactive:v,showControls:y,controlsPosition:b,showDots:x,className:S,cssClass:C,...w}){let T={axis:e?`y`:`x`,loop:s,align:l,slidesToScroll:u,dragFree:d,watchDrag:f},E=[];p===`fade`&&E.push(v8n()),d?E.push(p8n({speed:h,direction:g===`right`||g===`down`?`backward`:`forward`,playOnInit:!0,stopOnMouseEnter:_,stopOnInteraction:!1})):m>0&&E.push(l8n({delay:m,playOnInit:!0,stopOnMouseEnter:_,stopOnInteraction:!1}));let[D,O]=a8n(T,E);(0,lN.useEffect)(()=>{if(!O)return;let t=window;t.__emblaDebug||(t.__emblaDebug=[]),t.__emblaDebug.push(O),console.log(`[Carousel] init axis=`+(e?`y`:`x`)+` snaps=`+O.scrollSnapList().length+` canNext=`+O.canScrollNext()+` canPrev=`+O.canScrollPrev()+` slides=`+O.slideNodes().length)},[O]);let[k,A]=(0,lN.useState)(!1),[j,M]=(0,lN.useState)(!1),[N,P]=(0,lN.useState)(0),[F,I]=(0,lN.useState)(0),[L,R]=(0,lN.useState)([]),ee=(0,lN.useCallback)(()=>O==null?void 0:O.scrollPrev(),[O]),te=(0,lN.useCallback)(()=>O==null?void 0:O.scrollNext(),[O]),ne=(0,lN.useCallback)(e=>O==null?void 0:O.scrollTo(e),[O]),z=(0,lN.useCallback)(()=>{if(!O)return;A(O.canScrollPrev()),M(O.canScrollNext());let e=O.selectedScrollSnap();P(r>0?e%r:e)},[O,r]),re=(0,lN.useCallback)(e=>{let t=e.scrollProgress(),n=e.scrollSnapList().map(e=>{let n=Math.abs(t-e);return Math.max(.3,1-n*2)});R(n)},[]);(0,lN.useEffect)(()=>{if(O)return I(r),z(),O.on(`select`,z),O.on(`reInit`,z),v&&(re(O),O.on(`scroll`,re),O.on(`reInit`,re)),()=>{O.off(`select`,z),O.off(`reInit`,z),v&&(O.off(`scroll`,re),O.off(`reInit`,re))}},[O,z,v,re,r]);let ie=e?vp:gp,ae=e?hp:_p,oe=y&&!d,se=b===`outside`,ce=b===`gutter`,le=x&&F>1,ue=le&&e&&!ce,de=le&&!e&&!ce,fe=ce&&(oe||le)?44:20,pe=e&&ce&&(oe||le),me=!e&&ce&&(oe||le),he={zIndex:10,display:`flex`,alignItems:`center`,justifyContent:`center`,width:32,height:32,borderRadius:`50%`,border:`1px solid var(--border, #e5e7eb)`,background:`var(--background, #fff)`,boxShadow:`0 1px 3px rgba(0,0,0,.1)`,cursor:`pointer`,transition:`opacity 150ms`},ge={position:`relative`,...oe&&se?e?{paddingTop:40,paddingBottom:40}:{paddingLeft:40,paddingRight:40}:{},...e&&(ue||pe)?{paddingRight:fe}:{}},_e=se?e?{top:0,left:`50%`,transform:`translateX(-50%)`}:{left:0,top:`50%`,transform:`translateY(-50%)`}:e?{top:8,right:8}:{left:8,top:`50%`,transform:`translateY(-50%)`},ve=se?e?{bottom:0,left:`50%`,transform:`translateX(-50%)`}:{right:0,top:`50%`,transform:`translateY(-50%)`}:e?{bottom:8,right:8}:{right:8,top:`50%`,transform:`translateY(-50%)`};return(0,uN.jsxs)(`div`,{...Ne(w),className:xn(S,C),style:{position:`relative`},children:[(0,uN.jsxs)(`div`,{style:ge,children:[(0,uN.jsx)(`div`,{ref:D,style:{overflow:`hidden`,...e&&t!=null?{height:t}:{}},children:(0,uN.jsx)(`div`,{style:{display:`flex`,flexDirection:e?`column`:`row`,...e&&t!=null?{height:t}:{},touchAction:e?`pan-x pinch-zoom`:`pan-y pinch-zoom`,...a>0?e?{marginTop:-a}:{marginLeft:-o,marginRight:-o}:{},...p===`fade`?{position:`relative`}:{}},children:n.map((t,n)=>(0,uN.jsx)(`div`,{role:`group`,"aria-roledescription":`slide`,style:{flexShrink:0,flexGrow:0,...e?{minHeight:0,boxSizing:`content-box`}:{minWidth:0},...i==null?{}:{flexBasis:i},...a>0?e?{paddingTop:a}:{paddingLeft:o,paddingRight:o}:{},...v&&L[n]!=null?{opacity:L[n],transition:`opacity 300ms ease`}:{}},children:t},n))})}),oe&&!ce&&(0,uN.jsxs)(uN.Fragment,{children:[(0,uN.jsx)(`button`,{onClick:ee,disabled:!s&&!k,style:{...he,position:`absolute`,opacity:!s&&!k?0:1,..._e},children:(0,uN.jsx)(ie,{style:{width:16,height:16}})}),(0,uN.jsx)(`button`,{onClick:te,disabled:!s&&!j,style:{...he,position:`absolute`,opacity:!s&&!j?0:1,...ve},children:(0,uN.jsx)(ae,{style:{width:16,height:16}})})]}),ue&&(0,uN.jsx)(`div`,{style:{position:`absolute`,top:`50%`,right:0,transform:`translateY(-50%)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:6},children:Array.from({length:F},(e,t)=>(0,uN.jsx)(`button`,{onClick:()=>ne(t),style:{width:8,height:8,borderRadius:`50%`,border:`none`,cursor:`pointer`,transition:`opacity 150ms`,background:`var(--foreground, #000)`,opacity:t===N?1:.2}},t))}),pe&&(0,uN.jsxs)(`div`,{style:{position:`absolute`,top:`50%`,right:0,transform:`translateY(-50%)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:8,width:fe},children:[oe&&(0,uN.jsx)(`button`,{onClick:ee,disabled:!s&&!k,style:{...he,opacity:!s&&!k?0:1},children:(0,uN.jsx)(ie,{style:{width:16,height:16}})}),le&&Array.from({length:F},(e,t)=>(0,uN.jsx)(`button`,{onClick:()=>ne(t),style:{width:8,height:8,borderRadius:`50%`,border:`none`,cursor:`pointer`,transition:`opacity 150ms`,background:`var(--foreground, #000)`,opacity:t===N?1:.2}},t)),oe&&(0,uN.jsx)(`button`,{onClick:te,disabled:!s&&!j,style:{...he,opacity:!s&&!j?0:1},children:(0,uN.jsx)(ae,{style:{width:16,height:16}})})]})]}),de&&(0,uN.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:6,marginTop:12},children:Array.from({length:F},(e,t)=>(0,uN.jsx)(`button`,{onClick:()=>ne(t),style:{width:8,height:8,borderRadius:`50%`,border:`none`,cursor:`pointer`,transition:`opacity 150ms`,background:`var(--foreground, #000)`,opacity:t===N?1:.2}},t))}),me&&(0,uN.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,marginTop:12},children:[oe&&(0,uN.jsx)(`button`,{onClick:ee,disabled:!s&&!k,style:{...he,opacity:!s&&!k?0:1},children:(0,uN.jsx)(ie,{style:{width:16,height:16}})}),le&&(0,uN.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,gap:6},children:Array.from({length:F},(e,t)=>(0,uN.jsx)(`button`,{onClick:()=>ne(t),style:{width:8,height:8,borderRadius:`50%`,border:`none`,cursor:`pointer`,transition:`opacity 150ms`,background:`var(--foreground, #000)`,opacity:t===N?1:.2}},t))}),oe&&(0,uN.jsx)(`button`,{onClick:te,disabled:!s&&!j,style:{...he,opacity:!s&&!j?0:1},children:(0,uN.jsx)(ae,{style:{width:16,height:16}})})]})]})}var lN,uN,j8n=o((()=>{lN=d(p(),1),o8n(),d8n(),h8n(),y8n(),Sn(),Pe(),E8n(),yp(),uN=Ie()})),M8n,U,dN,fN=o((()=>{M8n=Object.defineProperty,U=(e,t)=>M8n(e,`name`,{value:t,configurable:!0}),dN=(e,t)=>{for(var n in t)M8n(e,n,{get:t[n],enumerable:!0})}})),N8n=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(n,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,l=`week`,u=`month`,d=`quarter`,f=`year`,p=`date`,m=`Invalid Date`,h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+v(r,2,`0`)+`:`+v(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;x[s]=t,i=s}return!r&&i&&(b=i),i||!r&&b},T=function(e,t){if(C(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new D(n)},E=y;E.l=w,E.i=C,E.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function _(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var v=_.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return this.$d.toString()!==m},v.isSame=function(e,t){var n=T(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return T(e){fN(),P8n=d(N8n(),1),pN={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},W={trace:U((...e)=>{},`trace`),debug:U((...e)=>{},`debug`),info:U((...e)=>{},`info`),warn:U((...e)=>{},`warn`),error:U((...e)=>{},`error`),fatal:U((...e)=>{},`fatal`)},F8n=U(function(e=`fatal`){let t=pN.fatal;typeof e==`string`?e.toLowerCase()in pN&&(t=pN[e]):typeof e==`number`&&(t=e),W.trace=()=>{},W.debug=()=>{},W.info=()=>{},W.warn=()=>{},W.error=()=>{},W.fatal=()=>{},t<=pN.fatal&&(W.fatal=console.error?console.error.bind(console,mN(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,mN(`FATAL`))),t<=pN.error&&(W.error=console.error?console.error.bind(console,mN(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,mN(`ERROR`))),t<=pN.warn&&(W.warn=console.warn?console.warn.bind(console,mN(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,mN(`WARN`))),t<=pN.info&&(W.info=console.info?console.info.bind(console,mN(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,mN(`INFO`))),t<=pN.debug&&(W.debug=console.debug?console.debug.bind(console,mN(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,mN(`DEBUG`))),t<=pN.trace&&(W.trace=console.debug?console.debug.bind(console,mN(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,mN(`TRACE`)))},`setLogLevel`),mN=U(e=>`%c${(0,P8n.default)().format(`ss.SSS`)} : ${e} : `,`format`)})),gN,I8n=o((()=>{gN={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return gN.hue2rgb(a,i,e+1/3)*255;case`g`:return gN.hue2rgb(a,i,e)*255;case`b`:return gN.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,l=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return l*100;switch(i){case e:return((t-n)/s+(t{L8n={clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10}})),z8n,B8n=o((()=>{z8n={dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}})),_N,vN=o((()=>{I8n(),R8n(),B8n(),_N={channel:gN,lang:L8n,unit:z8n}})),yN,bN,V8n=o((()=>{vN(),yN={};for(let e=0;e<=255;e++)yN[e]=_N.unit.dec2hex(e);bN={ALL:0,RGB:1,HSL:2}})),H8n,U8n=o((()=>{V8n(),H8n=class{constructor(){this.type=bN.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=bN.ALL}is(e){return this.type===e}}})),W8n,G8n=o((()=>{vN(),U8n(),V8n(),W8n=class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new H8n}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=bN.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=_N.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=_N.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=_N.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=_N.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=_N.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=_N.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(bN.HSL)&&t!==void 0?t:(this._ensureHSL(),_N.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(bN.HSL)&&t!==void 0?t:(this._ensureHSL(),_N.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(bN.HSL)&&t!==void 0?t:(this._ensureHSL(),_N.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(bN.RGB)&&t!==void 0?t:(this._ensureRGB(),_N.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(bN.RGB)&&t!==void 0?t:(this._ensureRGB(),_N.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(bN.RGB)&&t!==void 0?t:(this._ensureRGB(),_N.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(bN.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(bN.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(bN.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(bN.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(bN.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(bN.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}})),xN,K8n=o((()=>{G8n(),xN=new W8n({r:0,g:0,b:0,a:0},`transparent`)})),SN,q8n=o((()=>{K8n(),V8n(),SN={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(SN.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,l=o?8:4,u=a?0:-1,d=o?255:15;return xN.set({r:(r>>l*(u+3)&d)*s,g:(r>>l*(u+2)&d)*s,b:(r>>l*(u+1)&d)*s,a:a?(r&d)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${yN[Math.round(t)]}${yN[Math.round(n)]}${yN[Math.round(r)]}${yN[Math.round(i*255)]}`:`#${yN[Math.round(t)]}${yN[Math.round(n)]}${yN[Math.round(r)]}`}}})),CN,J8n=o((()=>{vN(),K8n(),CN={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(CN.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return _N.channel.clamp.h(parseFloat(e)*.9);case`rad`:return _N.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return _N.channel.clamp.h(parseFloat(e)*360)}}return _N.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(CN.re);if(!n)return;let[,r,i,a,o,s]=n;return xN.set({h:CN._hue2deg(r),s:_N.channel.clamp.s(parseFloat(i)),l:_N.channel.clamp.l(parseFloat(a)),a:o?_N.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${_N.lang.round(t)}, ${_N.lang.round(n)}%, ${_N.lang.round(r)}%, ${i})`:`hsl(${_N.lang.round(t)}, ${_N.lang.round(n)}%, ${_N.lang.round(r)}%)`}}})),wN,Y8n=o((()=>{q8n(),wN={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=wN.colors[e];if(t)return SN.parse(t)},stringify:e=>{let t=SN.stringify(e);for(let e in wN.colors)if(wN.colors[e]===t)return e}}})),TN,X8n=o((()=>{vN(),K8n(),TN={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(TN.re);if(!n)return;let[,r,i,a,o,s,l,u,d]=n;return xN.set({r:_N.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:_N.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:_N.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:u?_N.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${_N.lang.round(t)}, ${_N.lang.round(n)}, ${_N.lang.round(r)}, ${_N.lang.round(i)})`:`rgb(${_N.lang.round(t)}, ${_N.lang.round(n)}, ${_N.lang.round(r)})`}}})),EN,DN=o((()=>{q8n(),J8n(),Y8n(),X8n(),V8n(),EN={format:{keyword:wN,hex:SN,rgb:TN,rgba:TN,hsl:CN,hsla:CN},parse:e=>{if(typeof e!=`string`)return e;let t=SN.parse(e)||TN.parse(e)||CN.parse(e)||wN.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(bN.HSL)||e.data.r===void 0?CN.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?TN.stringify(e):SN.stringify(e)}})),Z8n,Q8n=o((()=>{vN(),DN(),Z8n=(e,t)=>{let n=EN.parse(e);for(let e in t)n[e]=_N.channel.clamp[e](t[e]);return EN.stringify(n)}})),ON,$8n=o((()=>{vN(),K8n(),DN(),Q8n(),ON=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return Z8n(e,{a:t});let i=xN.set({r:_N.channel.clamp.r(e),g:_N.channel.clamp.g(t),b:_N.channel.clamp.b(n),a:_N.channel.clamp.a(r)});return EN.stringify(i)}})),e5n,t5n=o((()=>{vN(),DN(),e5n=(e,t)=>_N.lang.round(EN.parse(e)[t])})),n5n,r5n=o((()=>{vN(),DN(),n5n=e=>{let{r:t,g:n,b:r}=EN.parse(e),i=.2126*_N.channel.toLinear(t)+.7152*_N.channel.toLinear(n)+.0722*_N.channel.toLinear(r);return _N.lang.round(i)}})),i5n,a5n=o((()=>{r5n(),i5n=e=>n5n(e)>=.5})),kN,o5n=o((()=>{a5n(),kN=e=>!i5n(e)})),s5n,c5n=o((()=>{vN(),DN(),s5n=(e,t,n)=>{let r=EN.parse(e),i=r[t],a=_N.channel.clamp[t](i+n);return i!==a&&(r[t]=a),EN.stringify(r)}})),AN,l5n=o((()=>{c5n(),AN=(e,t)=>s5n(e,`l`,t)})),jN,u5n=o((()=>{c5n(),jN=(e,t)=>s5n(e,`l`,-t)})),d5n,f5n=o((()=>{c5n(),d5n=(e,t)=>s5n(e,`a`,-t)})),G,p5n=o((()=>{DN(),Q8n(),G=(e,t)=>{let n=EN.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return Z8n(e,r)}})),m5n,h5n=o((()=>{DN(),$8n(),m5n=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=EN.parse(e),{r:s,g:l,b:u,a:d}=EN.parse(t),f=n/100,p=f*2-1,m=o-d,h=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,g=1-h,_=r*h+s*g,v=i*h+l*g,y=a*h+u*g,b=o*f+d*(1-f);return ON(_,v,y,b)}})),MN,g5n=o((()=>{DN(),h5n(),MN=(e,t=100)=>{let n=EN.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,m5n(n,e,t)}})),_5n=o((()=>{$8n(),t5n(),o5n(),l5n(),u5n(),f5n(),p5n(),g5n()})),NN=o((()=>{_5n()})),v5n=l({ParseError:()=>BN,SETTINGS_SCHEMA:()=>UN,__defineFunction:()=>FN,__defineMacro:()=>q,__defineSymbol:()=>K,__domTree:()=>tnr,__parse:()=>Ztr,__renderToDomTree:()=>DF,__renderToHTMLTree:()=>$tr,__setFontMetrics:()=>D5n,default:()=>nnr,render:()=>Ytr,renderToString:()=>Xtr,version:()=>enr});function y5n(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function b5n(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:y5n(Array.isArray(e.type)?e.type[0]:e.type)}function x5n(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?b5n(r):a?a(i):i}function S5n(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}function C5n(e){for(var t=0;t=eP[t]&&e<=eP[t+1])return!0;return!1}function w5n(e){return`toText`in e}function T5n(e){if(e instanceof lP)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function E5n(e){if(e instanceof sP)return e;throw Error(`Expected span but got `+String(e)+`.`)}function D5n(e,t){fP[e]=t}function O5n(e,t,n){if(!fP[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=fP[t][r];if(!i&&e[0]in L7n&&(r=L7n[e[0]].charCodeAt(0),i=fP[t][r]),!i&&n===`text`&&C5n(r)&&(i=fP[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function k5n(e){var t=e>=5?0:e>=3?1:2;if(!R7n[t]){var n=R7n[t]={cssEmPerMu:I7n.quad[t]/18};for(var r of Object.keys(I7n))n[r]=I7n[r][t]}return R7n[t]}function K(e,t,n,r,i,a){pP[e][i]={font:t,group:n,replace:r},a&&r&&(pP[e][r]=pP[e][i])}function PN(e){var t=e.strict,n=e.errorCode,r=e.errorMsg,i=e.token,a=e.report,o=t;if(typeof t==`function`){if(a)o=t(n,r,i);else try{o=t(n,r,i)}catch{o=`error`}}switch(o){case!0:case`error`:if(a)throw new BN(`LaTeX-incompatible input and strict mode is set to 'error': `+(r+` [`+n+`]`),i);return!0;case!1:case`ignore`:if(!a)return!1;break;default:if(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(r+` [`+n+`]`)),!a)return!1}}function FN(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a0&&(a.push(A5n(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(A5n(o,t));var u;n?(u=A5n($P(n,t,!0),t),u.classes=[`katex-tag`],a.push(u)):i&&a.push(i);var d=zP([`katex-html`],a);if(d.setAttribute(`aria-hidden`,`true`),u){var f=u.children[0];f.style.height=aP(d.height+d.depth),d.depth&&(f.style.verticalAlign=aP(-d.depth))}return d}function M5n(e){return new rP(e)}function N5n(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof rF&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof rF&&n.text===`,`}return!1}function P5n(e,t,n,r,i){var a=aF(e,n),o=a.length===1&&a[0]instanceof nF&&N9n.has(a[0].type)?a[0]:new nF(`mrow`,a),s=new nF(`annotation`,[new rF(t)]);s.setAttribute(`encoding`,`application/x-tex`);var l=new nF(`semantics`,[o,s]),u=new nF(`math`,[l]);return u.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&u.setAttribute(`display`,`block`),zP([i?`katex`:`katex-mathml`],[u])}function F5n(e){return Z9n.has(e)}function LN(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function I5n(e){var t=L5n(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function L5n(e){return e.type===`atom`||Q9n.has(e.type)?e:null}function R5n(e,t,n){var r=``;for(var i of e.body)if(i.type===`textord`)r+=i.text;else if(n&&i.type===`spacing`&&i.text===` `)r+=` `;else throw new BN(t,e);return r}function z5n(e,t){var n=$P(e.body,t,!0);return zP([e.mclass],n,t)}function B5n(e,t){var n,r=aF(e.body,t);return e.mclass===`minner`?n=new nF(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new nF(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new nF(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}function V5n(e,t,n){var r=rer[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function H5n(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new BN(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;aAV`.includes(u))for(var f=0;f<2;f++){for(var p=!0,m=l+1;mAV=|." after @`,o[l])}var h={type:`styling`,body:[V5n(u,d,e)],mode:`math`,style:`display`,resetFont:!0};r.push(h),s=ier()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}function U5n(e){return`isMiddle`in e}function W5n(e,t){var n=L5n(e);if(n&&zer.has(n.text))return n;throw n?new BN(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new BN(`Invalid delimiter type '`+e.type+`'`,e)}function G5n(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}function RN(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l1||!d)&&!Array.isArray(y==null?void 0:y[y.length-1])&&!(l&&(y==null?void 0:y[y.length-1])===!0)&&g.pop(),v.length{for(BN=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var l=s.slice(i,a).replace(/[^]/g,`$&̲`),u=i>15?`…`+s.slice(i-15,i):s.slice(0,i),d=a+15e.replace(Z5n,`-$1`).toLowerCase(),$5n={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},e7n=/[&><"']/g,VN=e=>String(e).replace(e7n,e=>$5n[e]),t7n=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?t7n(e.body[0]):e:e.type===`font`?t7n(e.body):e,n7n=new Set([`mathord`,`textord`,`atom`]),HN=e=>n7n.has(t7n(e).type),r7n=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},UN={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format `},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color `,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro `,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness `,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size `,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand `,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}},i7n=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t of Object.keys(UN)){var n=UN[t];n&&x5n(this,t,e,n)}}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=r7n(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},WN=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return QN[o7n[this.id]]}sub(){return QN[s7n[this.id]]}fracNum(){return QN[c7n[this.id]]}fracDen(){return QN[l7n[this.id]]}cramp(){return QN[u7n[this.id]]}text(){return QN[d7n[this.id]]}isTight(){return this.size>=2}},a7n=0,GN=1,KN=2,qN=3,JN=4,YN=5,XN=6,ZN=7,QN=[new WN(a7n,0,!1),new WN(GN,0,!0),new WN(KN,1,!1),new WN(qN,1,!0),new WN(JN,2,!1),new WN(YN,2,!0),new WN(XN,3,!1),new WN(ZN,3,!0)],o7n=[JN,YN,JN,YN,XN,ZN,XN,ZN],s7n=[YN,YN,YN,YN,ZN,ZN,ZN,ZN],c7n=[KN,qN,JN,YN,XN,ZN,XN,ZN],l7n=[qN,qN,YN,YN,ZN,ZN,ZN,ZN],u7n=[GN,GN,qN,qN,YN,YN,ZN,ZN],d7n=[a7n,GN,KN,qN,KN,qN,KN,qN],$N={DISPLAY:QN[a7n],TEXT:QN[KN],SCRIPT:QN[JN],SCRIPTSCRIPT:QN[XN]},f7n=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}],eP=[],f7n.forEach(e=>e.blocks.forEach(e=>eP.push(...e))),tP=e=>e+` `+e,nP=80,p7n=function(e,t){return`M95,`+(622+e+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+e/2.075+` -`+e+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+e)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},m7n=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+e/2.084+` -`+e+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+e)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},h7n=function(e,t){return`M983 `+(10+e+t)+` l`+e/3.13+` -`+e+` c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},g7n=function(e,t){return`M424,`+(2398+e+t)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+e)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+` h400000v`+(40+e)+`h-400000z`},_7n=function(e,t){return`M473,`+(2713+e+t)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},v7n=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},y7n=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+` H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},b7n=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=p7n(t,nP);break;case`sqrtSize1`:r=m7n(t,nP);break;case`sqrtSize2`:r=h7n(t,nP);break;case`sqrtSize3`:r=g7n(t,nP);break;case`sqrtSize4`:r=_7n(t,nP);break;case`sqrtTall`:r=y7n(t,nP,n)}return r},x7n=function(e,t){switch(e){case`⎜`:return tP(`M291 0 H417 V`+t+` H291z`);case`∣`:return tP(`M145 0 H188 V`+t+` H145z`);case`∥`:return tP(`M145 0 H188 V`+t+` H145z`)+tP(`M367 0 H410 V`+t+` H367z`);case`⎟`:return tP(`M457 0 H583 V`+t+` H457z`);case`⎢`:return tP(`M319 0 H403 V`+t+` H319z`);case`⎥`:return tP(`M263 0 H347 V`+t+` H263z`);case`⎪`:return tP(`M384 0 H504 V`+t+` H384z`);case`⏐`:return tP(`M312 0 H355 V`+t+` H312z`);case`‖`:return tP(`M257 0 H300 V`+t+` H257z`)+tP(`M478 0 H521 V`+t+` H478z`);default:return``}},S7n={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:tP(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:tP(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:tP(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:tP(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:tP(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:tP(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:tP(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:tP(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},C7n=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}},rP=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t{if(w5n(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},w7n={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},T7n={ex:!0,em:!0,mu:!0},E7n=function(e){return typeof e!=`string`&&(e=e.unit),e in w7n||e in T7n||e===`ex`},iP=function(e,t){var n;if(e.unit in w7n)n=w7n[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new BN(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},aP=function(e){return+e.toFixed(4)+`em`},oP=function(e){return e.filter(e=>e).join(` `)},D7n=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=Q5n(n)+`:`+r+`;`)}return t},O7n=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},k7n=function(e){var t=document.createElement(e);t.className=oP(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r/=\x00-\x1f]/,j7n=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+VN(oP(this.classes))+`"`);var n=D7n(this.style);n&&(t+=` style="`+VN(n)+`"`);for(var r of Object.keys(this.attributes)){if(A7n.test(r))throw new BN(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+VN(this.attributes[r])+`"`}t+=`>`;for(var i=0;i`,t},sP=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,O7n.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return k7n.call(this,`span`)}toMarkup(){return j7n.call(this,`span`)}},cP=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,O7n.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return k7n.call(this,`a`)}toMarkup(){return j7n.call(this,`a`)}},M7n=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=``+VN(this.alt)+``,e}},N7n={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},lP=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=S5n(this.text.charCodeAt(0));l&&this.classes.push(l+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=N7n[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=aP(this.italic)),this.classes.length>0&&(t=t||document.createElement(`span`),t.className=oP(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`0&&(n+=`margin-right:`+aP(this.italic)+`;`),n+=D7n(this.style),n&&(e=!0,t+=` style="`+VN(n)+`"`);var r=VN(this.text);return e?(t+=`>`,t+=r,t+=``,t):r}},uP=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n`;for(var n=0;n`,e}},dP=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,S7n[this.pathName]),e}toMarkup(){return this.alternate?``:``}},P7n=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=``,e}},F7n=e=>e instanceof sP||e instanceof cP||e instanceof rP,fP={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},I7n={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},L7n={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`},R7n={},pP={math:{},text:{}},J=`math`,mP=`text`,Y=`main`,hP=`ams`,gP=`accent-token`,_P=`bin`,vP=`close`,yP=`inner`,bP=`mathord`,xP=`op-token`,SP=`open`,CP=`punct`,wP=`rel`,TP=`spacing`,EP=`textord`,K(J,Y,wP,`≡`,`\\equiv`,!0),K(J,Y,wP,`≺`,`\\prec`,!0),K(J,Y,wP,`≻`,`\\succ`,!0),K(J,Y,wP,`∼`,`\\sim`,!0),K(J,Y,wP,`⊥`,`\\perp`),K(J,Y,wP,`⪯`,`\\preceq`,!0),K(J,Y,wP,`⪰`,`\\succeq`,!0),K(J,Y,wP,`≃`,`\\simeq`,!0),K(J,Y,wP,`∣`,`\\mid`,!0),K(J,Y,wP,`≪`,`\\ll`,!0),K(J,Y,wP,`≫`,`\\gg`,!0),K(J,Y,wP,`≍`,`\\asymp`,!0),K(J,Y,wP,`∥`,`\\parallel`),K(J,Y,wP,`⋈`,`\\bowtie`,!0),K(J,Y,wP,`⌣`,`\\smile`,!0),K(J,Y,wP,`⊑`,`\\sqsubseteq`,!0),K(J,Y,wP,`⊒`,`\\sqsupseteq`,!0),K(J,Y,wP,`≐`,`\\doteq`,!0),K(J,Y,wP,`⌢`,`\\frown`,!0),K(J,Y,wP,`∋`,`\\ni`,!0),K(J,Y,wP,`∝`,`\\propto`,!0),K(J,Y,wP,`⊢`,`\\vdash`,!0),K(J,Y,wP,`⊣`,`\\dashv`,!0),K(J,Y,wP,`∋`,`\\owns`),K(J,Y,CP,`.`,`\\ldotp`),K(J,Y,CP,`⋅`,`\\cdotp`),K(J,Y,CP,`⋅`,`·`),K(mP,Y,EP,`⋅`,`·`),K(J,Y,EP,`#`,`\\#`),K(mP,Y,EP,`#`,`\\#`),K(J,Y,EP,`&`,`\\&`),K(mP,Y,EP,`&`,`\\&`),K(J,Y,EP,`ℵ`,`\\aleph`,!0),K(J,Y,EP,`∀`,`\\forall`,!0),K(J,Y,EP,`ℏ`,`\\hbar`,!0),K(J,Y,EP,`∃`,`\\exists`,!0),K(J,Y,EP,`∇`,`\\nabla`,!0),K(J,Y,EP,`♭`,`\\flat`,!0),K(J,Y,EP,`ℓ`,`\\ell`,!0),K(J,Y,EP,`♮`,`\\natural`,!0),K(J,Y,EP,`♣`,`\\clubsuit`,!0),K(J,Y,EP,`℘`,`\\wp`,!0),K(J,Y,EP,`♯`,`\\sharp`,!0),K(J,Y,EP,`♢`,`\\diamondsuit`,!0),K(J,Y,EP,`ℜ`,`\\Re`,!0),K(J,Y,EP,`♡`,`\\heartsuit`,!0),K(J,Y,EP,`ℑ`,`\\Im`,!0),K(J,Y,EP,`♠`,`\\spadesuit`,!0),K(J,Y,EP,`§`,`\\S`,!0),K(mP,Y,EP,`§`,`\\S`),K(J,Y,EP,`¶`,`\\P`,!0),K(mP,Y,EP,`¶`,`\\P`),K(J,Y,EP,`†`,`\\dag`),K(mP,Y,EP,`†`,`\\dag`),K(mP,Y,EP,`†`,`\\textdagger`),K(J,Y,EP,`‡`,`\\ddag`),K(mP,Y,EP,`‡`,`\\ddag`),K(mP,Y,EP,`‡`,`\\textdaggerdbl`),K(J,Y,vP,`⎱`,`\\rmoustache`,!0),K(J,Y,SP,`⎰`,`\\lmoustache`,!0),K(J,Y,vP,`⟯`,`\\rgroup`,!0),K(J,Y,SP,`⟮`,`\\lgroup`,!0),K(J,Y,_P,`∓`,`\\mp`,!0),K(J,Y,_P,`⊖`,`\\ominus`,!0),K(J,Y,_P,`⊎`,`\\uplus`,!0),K(J,Y,_P,`⊓`,`\\sqcap`,!0),K(J,Y,_P,`∗`,`\\ast`),K(J,Y,_P,`⊔`,`\\sqcup`,!0),K(J,Y,_P,`◯`,`\\bigcirc`,!0),K(J,Y,_P,`∙`,`\\bullet`,!0),K(J,Y,_P,`‡`,`\\ddagger`),K(J,Y,_P,`≀`,`\\wr`,!0),K(J,Y,_P,`⨿`,`\\amalg`),K(J,Y,_P,`&`,`\\And`),K(J,Y,wP,`⟵`,`\\longleftarrow`,!0),K(J,Y,wP,`⇐`,`\\Leftarrow`,!0),K(J,Y,wP,`⟸`,`\\Longleftarrow`,!0),K(J,Y,wP,`⟶`,`\\longrightarrow`,!0),K(J,Y,wP,`⇒`,`\\Rightarrow`,!0),K(J,Y,wP,`⟹`,`\\Longrightarrow`,!0),K(J,Y,wP,`↔`,`\\leftrightarrow`,!0),K(J,Y,wP,`⟷`,`\\longleftrightarrow`,!0),K(J,Y,wP,`⇔`,`\\Leftrightarrow`,!0),K(J,Y,wP,`⟺`,`\\Longleftrightarrow`,!0),K(J,Y,wP,`↦`,`\\mapsto`,!0),K(J,Y,wP,`⟼`,`\\longmapsto`,!0),K(J,Y,wP,`↗`,`\\nearrow`,!0),K(J,Y,wP,`↩`,`\\hookleftarrow`,!0),K(J,Y,wP,`↪`,`\\hookrightarrow`,!0),K(J,Y,wP,`↘`,`\\searrow`,!0),K(J,Y,wP,`↼`,`\\leftharpoonup`,!0),K(J,Y,wP,`⇀`,`\\rightharpoonup`,!0),K(J,Y,wP,`↙`,`\\swarrow`,!0),K(J,Y,wP,`↽`,`\\leftharpoondown`,!0),K(J,Y,wP,`⇁`,`\\rightharpoondown`,!0),K(J,Y,wP,`↖`,`\\nwarrow`,!0),K(J,Y,wP,`⇌`,`\\rightleftharpoons`,!0),K(J,hP,wP,`≮`,`\\nless`,!0),K(J,hP,wP,``,`\\@nleqslant`),K(J,hP,wP,``,`\\@nleqq`),K(J,hP,wP,`⪇`,`\\lneq`,!0),K(J,hP,wP,`≨`,`\\lneqq`,!0),K(J,hP,wP,``,`\\@lvertneqq`),K(J,hP,wP,`⋦`,`\\lnsim`,!0),K(J,hP,wP,`⪉`,`\\lnapprox`,!0),K(J,hP,wP,`⊀`,`\\nprec`,!0),K(J,hP,wP,`⋠`,`\\npreceq`,!0),K(J,hP,wP,`⋨`,`\\precnsim`,!0),K(J,hP,wP,`⪹`,`\\precnapprox`,!0),K(J,hP,wP,`≁`,`\\nsim`,!0),K(J,hP,wP,``,`\\@nshortmid`),K(J,hP,wP,`∤`,`\\nmid`,!0),K(J,hP,wP,`⊬`,`\\nvdash`,!0),K(J,hP,wP,`⊭`,`\\nvDash`,!0),K(J,hP,wP,`⋪`,`\\ntriangleleft`),K(J,hP,wP,`⋬`,`\\ntrianglelefteq`,!0),K(J,hP,wP,`⊊`,`\\subsetneq`,!0),K(J,hP,wP,``,`\\@varsubsetneq`),K(J,hP,wP,`⫋`,`\\subsetneqq`,!0),K(J,hP,wP,``,`\\@varsubsetneqq`),K(J,hP,wP,`≯`,`\\ngtr`,!0),K(J,hP,wP,``,`\\@ngeqslant`),K(J,hP,wP,``,`\\@ngeqq`),K(J,hP,wP,`⪈`,`\\gneq`,!0),K(J,hP,wP,`≩`,`\\gneqq`,!0),K(J,hP,wP,``,`\\@gvertneqq`),K(J,hP,wP,`⋧`,`\\gnsim`,!0),K(J,hP,wP,`⪊`,`\\gnapprox`,!0),K(J,hP,wP,`⊁`,`\\nsucc`,!0),K(J,hP,wP,`⋡`,`\\nsucceq`,!0),K(J,hP,wP,`⋩`,`\\succnsim`,!0),K(J,hP,wP,`⪺`,`\\succnapprox`,!0),K(J,hP,wP,`≆`,`\\ncong`,!0),K(J,hP,wP,``,`\\@nshortparallel`),K(J,hP,wP,`∦`,`\\nparallel`,!0),K(J,hP,wP,`⊯`,`\\nVDash`,!0),K(J,hP,wP,`⋫`,`\\ntriangleright`),K(J,hP,wP,`⋭`,`\\ntrianglerighteq`,!0),K(J,hP,wP,``,`\\@nsupseteqq`),K(J,hP,wP,`⊋`,`\\supsetneq`,!0),K(J,hP,wP,``,`\\@varsupsetneq`),K(J,hP,wP,`⫌`,`\\supsetneqq`,!0),K(J,hP,wP,``,`\\@varsupsetneqq`),K(J,hP,wP,`⊮`,`\\nVdash`,!0),K(J,hP,wP,`⪵`,`\\precneqq`,!0),K(J,hP,wP,`⪶`,`\\succneqq`,!0),K(J,hP,wP,``,`\\@nsubseteqq`),K(J,hP,_P,`⊴`,`\\unlhd`),K(J,hP,_P,`⊵`,`\\unrhd`),K(J,hP,wP,`↚`,`\\nleftarrow`,!0),K(J,hP,wP,`↛`,`\\nrightarrow`,!0),K(J,hP,wP,`⇍`,`\\nLeftarrow`,!0),K(J,hP,wP,`⇏`,`\\nRightarrow`,!0),K(J,hP,wP,`↮`,`\\nleftrightarrow`,!0),K(J,hP,wP,`⇎`,`\\nLeftrightarrow`,!0),K(J,hP,wP,`△`,`\\vartriangle`),K(J,hP,EP,`ℏ`,`\\hslash`),K(J,hP,EP,`▽`,`\\triangledown`),K(J,hP,EP,`◊`,`\\lozenge`),K(J,hP,EP,`Ⓢ`,`\\circledS`),K(J,hP,EP,`®`,`\\circledR`),K(mP,hP,EP,`®`,`\\circledR`),K(J,hP,EP,`∡`,`\\measuredangle`,!0),K(J,hP,EP,`∄`,`\\nexists`),K(J,hP,EP,`℧`,`\\mho`),K(J,hP,EP,`Ⅎ`,`\\Finv`,!0),K(J,hP,EP,`⅁`,`\\Game`,!0),K(J,hP,EP,`‵`,`\\backprime`),K(J,hP,EP,`▲`,`\\blacktriangle`),K(J,hP,EP,`▼`,`\\blacktriangledown`),K(J,hP,EP,`■`,`\\blacksquare`),K(J,hP,EP,`⧫`,`\\blacklozenge`),K(J,hP,EP,`★`,`\\bigstar`),K(J,hP,EP,`∢`,`\\sphericalangle`,!0),K(J,hP,EP,`∁`,`\\complement`,!0),K(J,hP,EP,`ð`,`\\eth`,!0),K(mP,Y,EP,`ð`,`ð`),K(J,hP,EP,`╱`,`\\diagup`),K(J,hP,EP,`╲`,`\\diagdown`),K(J,hP,EP,`□`,`\\square`),K(J,hP,EP,`□`,`\\Box`),K(J,hP,EP,`◊`,`\\Diamond`),K(J,hP,EP,`¥`,`\\yen`,!0),K(mP,hP,EP,`¥`,`\\yen`,!0),K(J,hP,EP,`✓`,`\\checkmark`,!0),K(mP,hP,EP,`✓`,`\\checkmark`),K(J,hP,EP,`ℶ`,`\\beth`,!0),K(J,hP,EP,`ℸ`,`\\daleth`,!0),K(J,hP,EP,`ℷ`,`\\gimel`,!0),K(J,hP,EP,`ϝ`,`\\digamma`,!0),K(J,hP,EP,`ϰ`,`\\varkappa`),K(J,hP,SP,`┌`,`\\@ulcorner`,!0),K(J,hP,vP,`┐`,`\\@urcorner`,!0),K(J,hP,SP,`└`,`\\@llcorner`,!0),K(J,hP,vP,`┘`,`\\@lrcorner`,!0),K(J,hP,wP,`≦`,`\\leqq`,!0),K(J,hP,wP,`⩽`,`\\leqslant`,!0),K(J,hP,wP,`⪕`,`\\eqslantless`,!0),K(J,hP,wP,`≲`,`\\lesssim`,!0),K(J,hP,wP,`⪅`,`\\lessapprox`,!0),K(J,hP,wP,`≊`,`\\approxeq`,!0),K(J,hP,_P,`⋖`,`\\lessdot`),K(J,hP,wP,`⋘`,`\\lll`,!0),K(J,hP,wP,`≶`,`\\lessgtr`,!0),K(J,hP,wP,`⋚`,`\\lesseqgtr`,!0),K(J,hP,wP,`⪋`,`\\lesseqqgtr`,!0),K(J,hP,wP,`≑`,`\\doteqdot`),K(J,hP,wP,`≓`,`\\risingdotseq`,!0),K(J,hP,wP,`≒`,`\\fallingdotseq`,!0),K(J,hP,wP,`∽`,`\\backsim`,!0),K(J,hP,wP,`⋍`,`\\backsimeq`,!0),K(J,hP,wP,`⫅`,`\\subseteqq`,!0),K(J,hP,wP,`⋐`,`\\Subset`,!0),K(J,hP,wP,`⊏`,`\\sqsubset`,!0),K(J,hP,wP,`≼`,`\\preccurlyeq`,!0),K(J,hP,wP,`⋞`,`\\curlyeqprec`,!0),K(J,hP,wP,`≾`,`\\precsim`,!0),K(J,hP,wP,`⪷`,`\\precapprox`,!0),K(J,hP,wP,`⊲`,`\\vartriangleleft`),K(J,hP,wP,`⊴`,`\\trianglelefteq`),K(J,hP,wP,`⊨`,`\\vDash`,!0),K(J,hP,wP,`⊪`,`\\Vvdash`,!0),K(J,hP,wP,`⌣`,`\\smallsmile`),K(J,hP,wP,`⌢`,`\\smallfrown`),K(J,hP,wP,`≏`,`\\bumpeq`,!0),K(J,hP,wP,`≎`,`\\Bumpeq`,!0),K(J,hP,wP,`≧`,`\\geqq`,!0),K(J,hP,wP,`⩾`,`\\geqslant`,!0),K(J,hP,wP,`⪖`,`\\eqslantgtr`,!0),K(J,hP,wP,`≳`,`\\gtrsim`,!0),K(J,hP,wP,`⪆`,`\\gtrapprox`,!0),K(J,hP,_P,`⋗`,`\\gtrdot`),K(J,hP,wP,`⋙`,`\\ggg`,!0),K(J,hP,wP,`≷`,`\\gtrless`,!0),K(J,hP,wP,`⋛`,`\\gtreqless`,!0),K(J,hP,wP,`⪌`,`\\gtreqqless`,!0),K(J,hP,wP,`≖`,`\\eqcirc`,!0),K(J,hP,wP,`≗`,`\\circeq`,!0),K(J,hP,wP,`≜`,`\\triangleq`,!0),K(J,hP,wP,`∼`,`\\thicksim`),K(J,hP,wP,`≈`,`\\thickapprox`),K(J,hP,wP,`⫆`,`\\supseteqq`,!0),K(J,hP,wP,`⋑`,`\\Supset`,!0),K(J,hP,wP,`⊐`,`\\sqsupset`,!0),K(J,hP,wP,`≽`,`\\succcurlyeq`,!0),K(J,hP,wP,`⋟`,`\\curlyeqsucc`,!0),K(J,hP,wP,`≿`,`\\succsim`,!0),K(J,hP,wP,`⪸`,`\\succapprox`,!0),K(J,hP,wP,`⊳`,`\\vartriangleright`),K(J,hP,wP,`⊵`,`\\trianglerighteq`),K(J,hP,wP,`⊩`,`\\Vdash`,!0),K(J,hP,wP,`∣`,`\\shortmid`),K(J,hP,wP,`∥`,`\\shortparallel`),K(J,hP,wP,`≬`,`\\between`,!0),K(J,hP,wP,`⋔`,`\\pitchfork`,!0),K(J,hP,wP,`∝`,`\\varpropto`),K(J,hP,wP,`◀`,`\\blacktriangleleft`),K(J,hP,wP,`∴`,`\\therefore`,!0),K(J,hP,wP,`∍`,`\\backepsilon`),K(J,hP,wP,`▶`,`\\blacktriangleright`),K(J,hP,wP,`∵`,`\\because`,!0),K(J,hP,wP,`⋘`,`\\llless`),K(J,hP,wP,`⋙`,`\\gggtr`),K(J,hP,_P,`⊲`,`\\lhd`),K(J,hP,_P,`⊳`,`\\rhd`),K(J,hP,wP,`≂`,`\\eqsim`,!0),K(J,Y,wP,`⋈`,`\\Join`),K(J,hP,wP,`≑`,`\\Doteq`,!0),K(J,hP,_P,`∔`,`\\dotplus`,!0),K(J,hP,_P,`∖`,`\\smallsetminus`),K(J,hP,_P,`⋒`,`\\Cap`,!0),K(J,hP,_P,`⋓`,`\\Cup`,!0),K(J,hP,_P,`⩞`,`\\doublebarwedge`,!0),K(J,hP,_P,`⊟`,`\\boxminus`,!0),K(J,hP,_P,`⊞`,`\\boxplus`,!0),K(J,hP,_P,`⋇`,`\\divideontimes`,!0),K(J,hP,_P,`⋉`,`\\ltimes`,!0),K(J,hP,_P,`⋊`,`\\rtimes`,!0),K(J,hP,_P,`⋋`,`\\leftthreetimes`,!0),K(J,hP,_P,`⋌`,`\\rightthreetimes`,!0),K(J,hP,_P,`⋏`,`\\curlywedge`,!0),K(J,hP,_P,`⋎`,`\\curlyvee`,!0),K(J,hP,_P,`⊝`,`\\circleddash`,!0),K(J,hP,_P,`⊛`,`\\circledast`,!0),K(J,hP,_P,`⋅`,`\\centerdot`),K(J,hP,_P,`⊺`,`\\intercal`,!0),K(J,hP,_P,`⋒`,`\\doublecap`),K(J,hP,_P,`⋓`,`\\doublecup`),K(J,hP,_P,`⊠`,`\\boxtimes`,!0),K(J,hP,wP,`⇢`,`\\dashrightarrow`,!0),K(J,hP,wP,`⇠`,`\\dashleftarrow`,!0),K(J,hP,wP,`⇇`,`\\leftleftarrows`,!0),K(J,hP,wP,`⇆`,`\\leftrightarrows`,!0),K(J,hP,wP,`⇚`,`\\Lleftarrow`,!0),K(J,hP,wP,`↞`,`\\twoheadleftarrow`,!0),K(J,hP,wP,`↢`,`\\leftarrowtail`,!0),K(J,hP,wP,`↫`,`\\looparrowleft`,!0),K(J,hP,wP,`⇋`,`\\leftrightharpoons`,!0),K(J,hP,wP,`↶`,`\\curvearrowleft`,!0),K(J,hP,wP,`↺`,`\\circlearrowleft`,!0),K(J,hP,wP,`↰`,`\\Lsh`,!0),K(J,hP,wP,`⇈`,`\\upuparrows`,!0),K(J,hP,wP,`↿`,`\\upharpoonleft`,!0),K(J,hP,wP,`⇃`,`\\downharpoonleft`,!0),K(J,Y,wP,`⊶`,`\\origof`,!0),K(J,Y,wP,`⊷`,`\\imageof`,!0),K(J,hP,wP,`⊸`,`\\multimap`,!0),K(J,hP,wP,`↭`,`\\leftrightsquigarrow`,!0),K(J,hP,wP,`⇉`,`\\rightrightarrows`,!0),K(J,hP,wP,`⇄`,`\\rightleftarrows`,!0),K(J,hP,wP,`↠`,`\\twoheadrightarrow`,!0),K(J,hP,wP,`↣`,`\\rightarrowtail`,!0),K(J,hP,wP,`↬`,`\\looparrowright`,!0),K(J,hP,wP,`↷`,`\\curvearrowright`,!0),K(J,hP,wP,`↻`,`\\circlearrowright`,!0),K(J,hP,wP,`↱`,`\\Rsh`,!0),K(J,hP,wP,`⇊`,`\\downdownarrows`,!0),K(J,hP,wP,`↾`,`\\upharpoonright`,!0),K(J,hP,wP,`⇂`,`\\downharpoonright`,!0),K(J,hP,wP,`⇝`,`\\rightsquigarrow`,!0),K(J,hP,wP,`⇝`,`\\leadsto`),K(J,hP,wP,`⇛`,`\\Rrightarrow`,!0),K(J,hP,wP,`↾`,`\\restriction`),K(J,Y,EP,`‘`,"`"),K(J,Y,EP,`$`,`\\$`),K(mP,Y,EP,`$`,`\\$`),K(mP,Y,EP,`$`,`\\textdollar`),K(J,Y,EP,`%`,`\\%`),K(mP,Y,EP,`%`,`\\%`),K(J,Y,EP,`_`,`\\_`),K(mP,Y,EP,`_`,`\\_`),K(mP,Y,EP,`_`,`\\textunderscore`),K(J,Y,EP,`∠`,`\\angle`,!0),K(J,Y,EP,`∞`,`\\infty`,!0),K(J,Y,EP,`′`,`\\prime`),K(J,Y,EP,`△`,`\\triangle`),K(J,Y,EP,`Γ`,`\\Gamma`,!0),K(J,Y,EP,`Δ`,`\\Delta`,!0),K(J,Y,EP,`Θ`,`\\Theta`,!0),K(J,Y,EP,`Λ`,`\\Lambda`,!0),K(J,Y,EP,`Ξ`,`\\Xi`,!0),K(J,Y,EP,`Π`,`\\Pi`,!0),K(J,Y,EP,`Σ`,`\\Sigma`,!0),K(J,Y,EP,`Υ`,`\\Upsilon`,!0),K(J,Y,EP,`Φ`,`\\Phi`,!0),K(J,Y,EP,`Ψ`,`\\Psi`,!0),K(J,Y,EP,`Ω`,`\\Omega`,!0),K(J,Y,EP,`A`,`Α`),K(J,Y,EP,`B`,`Β`),K(J,Y,EP,`E`,`Ε`),K(J,Y,EP,`Z`,`Ζ`),K(J,Y,EP,`H`,`Η`),K(J,Y,EP,`I`,`Ι`),K(J,Y,EP,`K`,`Κ`),K(J,Y,EP,`M`,`Μ`),K(J,Y,EP,`N`,`Ν`),K(J,Y,EP,`O`,`Ο`),K(J,Y,EP,`P`,`Ρ`),K(J,Y,EP,`T`,`Τ`),K(J,Y,EP,`X`,`Χ`),K(J,Y,EP,`¬`,`\\neg`,!0),K(J,Y,EP,`¬`,`\\lnot`),K(J,Y,EP,`⊤`,`\\top`),K(J,Y,EP,`⊥`,`\\bot`),K(J,Y,EP,`∅`,`\\emptyset`),K(J,hP,EP,`∅`,`\\varnothing`),K(J,Y,bP,`α`,`\\alpha`,!0),K(J,Y,bP,`β`,`\\beta`,!0),K(J,Y,bP,`γ`,`\\gamma`,!0),K(J,Y,bP,`δ`,`\\delta`,!0),K(J,Y,bP,`ϵ`,`\\epsilon`,!0),K(J,Y,bP,`ζ`,`\\zeta`,!0),K(J,Y,bP,`η`,`\\eta`,!0),K(J,Y,bP,`θ`,`\\theta`,!0),K(J,Y,bP,`ι`,`\\iota`,!0),K(J,Y,bP,`κ`,`\\kappa`,!0),K(J,Y,bP,`λ`,`\\lambda`,!0),K(J,Y,bP,`μ`,`\\mu`,!0),K(J,Y,bP,`ν`,`\\nu`,!0),K(J,Y,bP,`ξ`,`\\xi`,!0),K(J,Y,bP,`ο`,`\\omicron`,!0),K(J,Y,bP,`π`,`\\pi`,!0),K(J,Y,bP,`ρ`,`\\rho`,!0),K(J,Y,bP,`σ`,`\\sigma`,!0),K(J,Y,bP,`τ`,`\\tau`,!0),K(J,Y,bP,`υ`,`\\upsilon`,!0),K(J,Y,bP,`ϕ`,`\\phi`,!0),K(J,Y,bP,`χ`,`\\chi`,!0),K(J,Y,bP,`ψ`,`\\psi`,!0),K(J,Y,bP,`ω`,`\\omega`,!0),K(J,Y,bP,`ε`,`\\varepsilon`,!0),K(J,Y,bP,`ϑ`,`\\vartheta`,!0),K(J,Y,bP,`ϖ`,`\\varpi`,!0),K(J,Y,bP,`ϱ`,`\\varrho`,!0),K(J,Y,bP,`ς`,`\\varsigma`,!0),K(J,Y,bP,`φ`,`\\varphi`,!0),K(J,Y,_P,`∗`,`*`,!0),K(J,Y,_P,`+`,`+`),K(J,Y,_P,`−`,`-`,!0),K(J,Y,_P,`⋅`,`\\cdot`,!0),K(J,Y,_P,`∘`,`\\circ`,!0),K(J,Y,_P,`÷`,`\\div`,!0),K(J,Y,_P,`±`,`\\pm`,!0),K(J,Y,_P,`×`,`\\times`,!0),K(J,Y,_P,`∩`,`\\cap`,!0),K(J,Y,_P,`∪`,`\\cup`,!0),K(J,Y,_P,`∖`,`\\setminus`,!0),K(J,Y,_P,`∧`,`\\land`),K(J,Y,_P,`∨`,`\\lor`),K(J,Y,_P,`∧`,`\\wedge`,!0),K(J,Y,_P,`∨`,`\\vee`,!0),K(J,Y,EP,`√`,`\\surd`),K(J,Y,SP,`⟨`,`\\langle`,!0),K(J,Y,SP,`∣`,`\\lvert`),K(J,Y,SP,`∥`,`\\lVert`),K(J,Y,vP,`?`,`?`),K(J,Y,vP,`!`,`!`),K(J,Y,vP,`⟩`,`\\rangle`,!0),K(J,Y,vP,`∣`,`\\rvert`),K(J,Y,vP,`∥`,`\\rVert`),K(J,Y,wP,`=`,`=`),K(J,Y,wP,`:`,`:`),K(J,Y,wP,`≈`,`\\approx`,!0),K(J,Y,wP,`≅`,`\\cong`,!0),K(J,Y,wP,`≥`,`\\ge`),K(J,Y,wP,`≥`,`\\geq`,!0),K(J,Y,wP,`←`,`\\gets`),K(J,Y,wP,`>`,`\\gt`,!0),K(J,Y,wP,`∈`,`\\in`,!0),K(J,Y,wP,``,`\\@not`),K(J,Y,wP,`⊂`,`\\subset`,!0),K(J,Y,wP,`⊃`,`\\supset`,!0),K(J,Y,wP,`⊆`,`\\subseteq`,!0),K(J,Y,wP,`⊇`,`\\supseteq`,!0),K(J,hP,wP,`⊈`,`\\nsubseteq`,!0),K(J,hP,wP,`⊉`,`\\nsupseteq`,!0),K(J,Y,wP,`⊨`,`\\models`),K(J,Y,wP,`←`,`\\leftarrow`,!0),K(J,Y,wP,`≤`,`\\le`),K(J,Y,wP,`≤`,`\\leq`,!0),K(J,Y,wP,`<`,`\\lt`,!0),K(J,Y,wP,`→`,`\\rightarrow`,!0),K(J,Y,wP,`→`,`\\to`),K(J,hP,wP,`≱`,`\\ngeq`,!0),K(J,hP,wP,`≰`,`\\nleq`,!0),K(J,Y,TP,`\xA0`,`\\ `),K(J,Y,TP,`\xA0`,`\\space`),K(J,Y,TP,`\xA0`,`\\nobreakspace`),K(mP,Y,TP,`\xA0`,`\\ `),K(mP,Y,TP,`\xA0`,` `),K(mP,Y,TP,`\xA0`,`\\space`),K(mP,Y,TP,`\xA0`,`\\nobreakspace`),K(J,Y,TP,``,`\\nobreak`),K(J,Y,TP,``,`\\allowbreak`),K(J,Y,CP,`,`,`,`),K(J,Y,CP,`;`,`;`),K(J,hP,_P,`⊼`,`\\barwedge`,!0),K(J,hP,_P,`⊻`,`\\veebar`,!0),K(J,Y,_P,`⊙`,`\\odot`,!0),K(J,Y,_P,`⊕`,`\\oplus`,!0),K(J,Y,_P,`⊗`,`\\otimes`,!0),K(J,Y,EP,`∂`,`\\partial`,!0),K(J,Y,_P,`⊘`,`\\oslash`,!0),K(J,hP,_P,`⊚`,`\\circledcirc`,!0),K(J,hP,_P,`⊡`,`\\boxdot`,!0),K(J,Y,_P,`△`,`\\bigtriangleup`),K(J,Y,_P,`▽`,`\\bigtriangledown`),K(J,Y,_P,`†`,`\\dagger`),K(J,Y,_P,`⋄`,`\\diamond`),K(J,Y,_P,`⋆`,`\\star`),K(J,Y,_P,`◃`,`\\triangleleft`),K(J,Y,_P,`▹`,`\\triangleright`),K(J,Y,SP,`{`,`\\{`),K(mP,Y,EP,`{`,`\\{`),K(mP,Y,EP,`{`,`\\textbraceleft`),K(J,Y,vP,`}`,`\\}`),K(mP,Y,EP,`}`,`\\}`),K(mP,Y,EP,`}`,`\\textbraceright`),K(J,Y,SP,`{`,`\\lbrace`),K(J,Y,vP,`}`,`\\rbrace`),K(J,Y,SP,`[`,`\\lbrack`,!0),K(mP,Y,EP,`[`,`\\lbrack`,!0),K(J,Y,vP,`]`,`\\rbrack`,!0),K(mP,Y,EP,`]`,`\\rbrack`,!0),K(J,Y,SP,`(`,`\\lparen`,!0),K(J,Y,vP,`)`,`\\rparen`,!0),K(mP,Y,EP,`<`,`\\textless`,!0),K(mP,Y,EP,`>`,`\\textgreater`,!0),K(J,Y,SP,`⌊`,`\\lfloor`,!0),K(J,Y,vP,`⌋`,`\\rfloor`,!0),K(J,Y,SP,`⌈`,`\\lceil`,!0),K(J,Y,vP,`⌉`,`\\rceil`,!0),K(J,Y,EP,`\\`,`\\backslash`),K(J,Y,EP,`∣`,`|`),K(J,Y,EP,`∣`,`\\vert`),K(mP,Y,EP,`|`,`\\textbar`,!0),K(J,Y,EP,`∥`,`\\|`),K(J,Y,EP,`∥`,`\\Vert`),K(mP,Y,EP,`∥`,`\\textbardbl`),K(mP,Y,EP,`~`,`\\textasciitilde`),K(mP,Y,EP,`\\`,`\\textbackslash`),K(mP,Y,EP,`^`,`\\textasciicircum`),K(J,Y,wP,`↑`,`\\uparrow`,!0),K(J,Y,wP,`⇑`,`\\Uparrow`,!0),K(J,Y,wP,`↓`,`\\downarrow`,!0),K(J,Y,wP,`⇓`,`\\Downarrow`,!0),K(J,Y,wP,`↕`,`\\updownarrow`,!0),K(J,Y,wP,`⇕`,`\\Updownarrow`,!0),K(J,Y,xP,`∐`,`\\coprod`),K(J,Y,xP,`⋁`,`\\bigvee`),K(J,Y,xP,`⋀`,`\\bigwedge`),K(J,Y,xP,`⨄`,`\\biguplus`),K(J,Y,xP,`⋂`,`\\bigcap`),K(J,Y,xP,`⋃`,`\\bigcup`),K(J,Y,xP,`∫`,`\\int`),K(J,Y,xP,`∫`,`\\intop`),K(J,Y,xP,`∬`,`\\iint`),K(J,Y,xP,`∭`,`\\iiint`),K(J,Y,xP,`∏`,`\\prod`),K(J,Y,xP,`∑`,`\\sum`),K(J,Y,xP,`⨂`,`\\bigotimes`),K(J,Y,xP,`⨁`,`\\bigoplus`),K(J,Y,xP,`⨀`,`\\bigodot`),K(J,Y,xP,`∮`,`\\oint`),K(J,Y,xP,`∯`,`\\oiint`),K(J,Y,xP,`∰`,`\\oiiint`),K(J,Y,xP,`⨆`,`\\bigsqcup`),K(J,Y,xP,`∫`,`\\smallint`),K(mP,Y,yP,`…`,`\\textellipsis`),K(J,Y,yP,`…`,`\\mathellipsis`),K(mP,Y,yP,`…`,`\\ldots`,!0),K(J,Y,yP,`…`,`\\ldots`,!0),K(J,Y,yP,`⋯`,`\\@cdots`,!0),K(J,Y,yP,`⋱`,`\\ddots`,!0),K(J,Y,EP,`⋮`,`\\varvdots`),K(mP,Y,EP,`⋮`,`\\varvdots`),K(J,Y,gP,`ˊ`,`\\acute`),K(J,Y,gP,`ˋ`,`\\grave`),K(J,Y,gP,`¨`,`\\ddot`),K(J,Y,gP,`~`,`\\tilde`),K(J,Y,gP,`ˉ`,`\\bar`),K(J,Y,gP,`˘`,`\\breve`),K(J,Y,gP,`ˇ`,`\\check`),K(J,Y,gP,`^`,`\\hat`),K(J,Y,gP,`⃗`,`\\vec`),K(J,Y,gP,`˙`,`\\dot`),K(J,Y,gP,`˚`,`\\mathring`),K(J,Y,bP,``,`\\@imath`),K(J,Y,bP,``,`\\@jmath`),K(J,Y,EP,`ı`,`ı`),K(J,Y,EP,`ȷ`,`ȷ`),K(mP,Y,EP,`ı`,`\\i`,!0),K(mP,Y,EP,`ȷ`,`\\j`,!0),K(mP,Y,EP,`ß`,`\\ss`,!0),K(mP,Y,EP,`æ`,`\\ae`,!0),K(mP,Y,EP,`œ`,`\\oe`,!0),K(mP,Y,EP,`ø`,`\\o`,!0),K(mP,Y,EP,`Æ`,`\\AE`,!0),K(mP,Y,EP,`Œ`,`\\OE`,!0),K(mP,Y,EP,`Ø`,`\\O`,!0),K(mP,Y,gP,`ˊ`,`\\'`),K(mP,Y,gP,`ˋ`,"\\`"),K(mP,Y,gP,`ˆ`,`\\^`),K(mP,Y,gP,`˜`,`\\~`),K(mP,Y,gP,`ˉ`,`\\=`),K(mP,Y,gP,`˘`,`\\u`),K(mP,Y,gP,`˙`,`\\.`),K(mP,Y,gP,`¸`,`\\c`),K(mP,Y,gP,`˚`,`\\r`),K(mP,Y,gP,`ˇ`,`\\v`),K(mP,Y,gP,`¨`,`\\"`),K(mP,Y,gP,`˝`,`\\H`),K(mP,Y,gP,`◯`,`\\textcircled`),z7n={"--":!0,"---":!0,"``":!0,"''":!0},K(mP,Y,EP,`–`,`--`,!0),K(mP,Y,EP,`–`,`\\textendash`),K(mP,Y,EP,`—`,`---`,!0),K(mP,Y,EP,`—`,`\\textemdash`),K(mP,Y,EP,`‘`,"`",!0),K(mP,Y,EP,`‘`,`\\textquoteleft`),K(mP,Y,EP,`’`,`'`,!0),K(mP,Y,EP,`’`,`\\textquoteright`),K(mP,Y,EP,`“`,"``",!0),K(mP,Y,EP,`“`,`\\textquotedblleft`),K(mP,Y,EP,`”`,`''`,!0),K(mP,Y,EP,`”`,`\\textquotedblright`),K(J,Y,EP,`°`,`\\degree`,!0),K(mP,Y,EP,`°`,`\\degree`),K(mP,Y,EP,`°`,`\\textdegree`,!0),K(J,Y,EP,`£`,`\\pounds`),K(J,Y,EP,`£`,`\\mathsterling`,!0),K(mP,Y,EP,`£`,`\\pounds`),K(mP,Y,EP,`£`,`\\textsterling`,!0),K(J,hP,EP,`✠`,`\\maltese`),K(mP,hP,EP,`✠`,`\\maltese`),B7n=`0123456789/@."`,V7n=0;V7n{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return o9n[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return s9n[Math.floor((r-120782)/10)];if(r===120485||r===120486)return o9n[0];if(120486{if(oP(e.classes)!==oP(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},f9n=e=>{for(var t=0;tt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},zP=function(e,t,n,r){var i=new sP(e,t,n,r);return p9n(i),i},BP=(e,t,n,r)=>new sP(e,t,n,r),VP=function(e,t,n){var r=zP([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=aP(r.height),r.maxFontSize=1,r},m9n=function(e,t,n,r){var i=new cP(e,t,n,r);return p9n(i),i},HP=function(e){var t=new rP(e);return p9n(t),t},UP=function(e,t){return e instanceof rP?zP([],[e],t):e},h9n=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a{var n=zP([`mspace`],[],t),r=iP(e,t);return n.style.marginRight=aP(r),n},GP=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},_9n={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},v9n={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},y9n=function(e,t){var n=v9n[e],r=n[0],i=n[1],a=n[2],o=new dP(r),s=BP([`katex-overlay`],[new uP([o],{width:aP(i),height:aP(a),style:`width:`+aP(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`})],t);return s.height=a,s.style.height=aP(a),s.style.width=aP(i),s},KP={number:3,unit:`mu`},qP={number:4,unit:`mu`},JP={number:5,unit:`mu`},b9n={mord:{mop:KP,mbin:qP,mrel:JP,minner:KP},mop:{mord:KP,mop:KP,mrel:JP,minner:KP},mbin:{mord:qP,mop:qP,mopen:qP,minner:qP},mrel:{mord:JP,mop:JP,mopen:JP,minner:JP},mopen:{},mclose:{mop:KP,mbin:qP,mrel:JP,minner:KP},mpunct:{mord:KP,mop:KP,mrel:JP,mopen:KP,mclose:KP,mpunct:KP,minner:KP},minner:{mord:KP,mop:KP,mbin:qP,mrel:JP,mopen:KP,mpunct:KP,minner:KP}},x9n={mord:{mop:KP},mop:{mord:KP,mop:KP},mbin:{},mrel:{},mopen:{},mclose:{mop:KP},mpunct:{},minner:{mop:KP}},S9n={},YP={},XP={},ZP=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},QP=function(e){return e.type===`ordgroup`?e.body:[e]},C9n=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),w9n=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),T9n={display:$N.DISPLAY,text:$N.TEXT,script:$N.SCRIPT,scriptscript:$N.SCRIPTSCRIPT},E9n={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},$P=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a{var n=t.classes[0],r=e.classes[0];n===`mbin`&&w9n.has(r)?t.classes[0]=`mord`:r===`mbin`&&C9n.has(n)&&(e.classes[0]=`mord`)},{node:d},f,p),D9n(i,(e,t)=>{var n,r,i=A9n(t),a=A9n(e),o=i&&a?e.hasClass(`mtight`)?(n=x9n[i])==null?void 0:n[a]:(r=b9n[i])==null?void 0:r[a]:null;if(o)return g9n(o,l)},{node:d},f,p),i},D9n=function(e,t,n,r,i){r&&e.push(r);for(var a=0;an=>{e.splice(t+1,0,n),a++})(a)}}r&&e.pop()},O9n=function(e){return e instanceof rP||e instanceof cP||e instanceof sP&&e.hasClass(`enclosing`)?e:null},k9n=function(e,t){var n=O9n(e);if(n){var r=n.children;if(r.length){if(t===`right`)return k9n(r[r.length-1],`right`);if(t===`left`)return k9n(r[0],`left`)}}return e},A9n=function(e,t){return e?(t&&(e=k9n(e,t)),E9n[e.classes[0]]||null):null},eF=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return zP(t.concat(n))},tF=function(e,t,n){if(!e)return zP();if(YP[e.type]){var r=YP[e.type](e,t);if(n&&t.size!==n.size){r=zP(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new BN(`Got group of unknown type: '`+e.type+`'`)},nF=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=oP(this.classes));for(var i=0;i0&&(e+=` class ="`+VN(oP(this.classes))+`"`),e+=`>`;for(var i=0;i`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},rF=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return VN(this.toText())}toText(){return this.text}},j9n=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,aP(this.width)),e}toMarkup(){return this.character?``+this.character+``:``}toText(){return this.character?this.character:` `}},M9n=new Set([`\\imath`,`\\jmath`]),N9n=new Set([`mrow`,`mtable`]),iF=function(e,t,n){var r,i;return pP[t][e]&&pP[t][e].replace&&e.charCodeAt(0)!==55349&&(!Object.prototype.hasOwnProperty.call(z7n,e)||(n==null||(r=n.fontFamily)==null?void 0:r.slice(4,6))!==`tt`&&(n==null||(i=n.font)==null?void 0:i.slice(4,6))!==`tt`)&&(e=pP[t][e].replace),new rF(e)},P9n=function(e){return e.length===1?e[0]:new nF(`mrow`,e)},F9n={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},I9n=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=F9n[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(M9n.has(a))return null;if(pP[r][a]){var o=pP[r][a].replace;o&&(a=o)}var s=_9n[n].fontName;return O5n(a,s,r)?_9n[n].variant:null},aF=function(e,t,n){if(e.length===1){var r=sF(e[0],t);return n&&r instanceof nF&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o=1&&(a.type===`mn`||N5n(a))){var l=s.children[0];l instanceof nF&&l.type===`mn`&&(l.children=[...a.children,...l.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var u=a.children[0];if(u instanceof rF&&u.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var d=s.children[0];d instanceof rF&&d.text.length>0&&(d.text=d.text.slice(0,1)+`̸`+d.text.slice(1),i.pop())}}}i.push(s),a=s}return i},oF=function(e,t,n){return P9n(aF(e,t,n))},sF=function(e,t){if(!e)return new nF(`mrow`);if(XP[e.type])return XP[e.type](e,t);throw new BN(`Got group of unknown type: '`+e.type+`'`)},L9n=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],R9n=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],z9n=function(e,t){return t.size<2?e:L9n[e-1][t.size-1]},B9n=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.strict=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=R9n[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this.strict=t.strict,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness,strict:this.strict};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:z9n(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:R9n[e-1]})}havingBaseStyle(t){t=t||this.style.text();var n=z9n(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=k5n(this.size)),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}},B9n.BASESIZE=6,V9n=e=>new B9n({style:e.displayMode?$N.DISPLAY:$N.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness,strict:e.strict}),H9n=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=zP(n,[e])}return e},U9n=function(e,t,n){var r=V9n(n),i;return n.output===`mathml`?P5n(e,t,r,n.displayMode,!0):(i=n.output===`html`?zP([`katex`],[j5n(e,r)]):zP([`katex`],[P5n(e,t,r,n.displayMode,!1),j5n(e,r)]),H9n(i,n))},W9n=function(e,t){return H9n(zP([`katex`],[j5n(e,V9n(t))]),t)},G9n={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},cF=function(e){var t=new nF(`mo`,[new rF(G9n[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},K9n={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},q9n=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),lF=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(q9n.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var l=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][l],a=[0,239,300,360,420][l],s=[0,.24,.3,.3,.36,.42][l],o=r+l):(n=[0,600,1033,2339,2340][l],a=[0,260,286,306,312][l],s=[0,.26,.286,.3,.306,.34][l],o=`tilde`+l)}var u=new dP(o);return{span:BP([],[new uP([u],{width:`100%`,height:aP(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var d=[],f=K9n[r];if(!f)throw Error(`No SVG data for "`+r+`".`);var p=f[0],m=f[1],h=f[2],g=h/1e3,_=p.length,v,y;if(_===1){if(f.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);v=[`hide-tail`],y=[f[3]]}else if(_===2)v=[`halfarrow-left`,`halfarrow-right`],y=[`xMinYMin`,`xMaxYMin`];else if(_===3)v=[`brace-left`,`brace-center`,`brace-right`],y=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support `+_+` children.`);for(var b=0;b<_;b++){var x=new dP(p[b]),S=new uP([x],{width:`400em`,height:aP(g),viewBox:`0 0 `+n+` `+h,preserveAspectRatio:y[b]+` slice`}),C=BP([v[b]],[S],t);if(_===1)return{span:C,minWidth:m,height:g};C.style.height=aP(g),d.push(C)}return{span:zP([`katex-stretchy`],d,t),minWidth:m,height:g}}var r=n(),i=r.span,a=r.minWidth,o=r.height;return i.height=o,i.style.height=aP(o),a>0&&(i.style.minWidth=aP(a)),i},J9n=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=zP([`katex-stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new P7n({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&l.push(new P7n({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=BP([],[new uP(l,{width:`100%`,height:aP(o)})],i)}return a.height=o,a.style.height=aP(o),a},Y9n=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],X9n=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],Z9n=new Set(Y9n),Q9n=new Set(X9n),$9n=e=>{if(e instanceof lP)return e;if(F7n(e)&&e.children.length===1)return $9n(e.children[0])},eer=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=LN(e.base,`accent`),n=r.base,e.base=n,i=E5n(tF(e,t)),e.base=r):(r=LN(e,`accent`),n=r.base);var a=tF(n,t.havingCrampedStyle()),o=r.isShifty&&HN(n),s=0;if(o){var l;s=((l=$9n(a))==null?void 0:l.skew)??0}var u=r.label===`\\c`,d=u?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),f;if(r.isStretchy)f=lF(r,t),f=WP({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:f,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+aP(2*s)+`)`,marginLeft:aP(2*s)}:void 0}]});else{var p,m;r.label===`\\vec`?(p=y9n(`vec`,t),m=v9n.vec[1]):(p=RP({type:`textord`,mode:r.mode,text:r.label},t),p=T5n(p),p.italic=0,m=p.width,u&&(d+=p.depth)),f=zP([`accent-body`],[p]);var h=r.label===`\\textcircled`;h&&(f.classes.push(`accent-full`),d=a.height);var g=s;h||(g-=m/2),f.style.left=aP(g),r.label===`\\textcircled`&&(f.style.top=`.2em`),f=WP({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-d},{type:`elem`,elem:f}]})}var _=zP([`mord`,`katex-accent`],[f],t);return i?(i.children[0]=_,i.height=Math.max(_.height,i.height),i.classes[0]=`mord`,i):_},ter=(e,t)=>{var n=e.isStretchy?cF(e.label):new nF(`mo`,[iF(e.label,e.mode)]),r=new nF(`mover`,[sF(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},ner=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`)),FN({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],numArgs:1,handler:(e,t)=>{var n=ZP(t[0]),r=!ner.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:eer,mathmlBuilder:ter}),FN({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(PN({strict:e.parser.settings.strict,errorCode:`mathVsTextAccents`,errorMsg:`LaTeX's accent `+e.funcName+` works only in text mode`,report:!0}),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),FN({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=tF(e.base,t),r=lF(e,t),i=e.label===`\\utilde`?.12:0;return zP([`mord`,`accentunder`],[WP({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=cF(e.label),r=new nF(`munder`,[sF(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),uF=e=>{var t=new nF(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t},FN({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=UP(tF(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=UP(tF(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=lF(e,t),l=-t.fontMetrics().axisHeight+.5*s.height,u=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(u-=i.depth);var d;if(o){var f=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;d=WP({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:u},{type:`elem`,elem:s,shift:l,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:f}]})}else d=WP({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:u},{type:`elem`,elem:s,shift:l,wrapperClasses:[`svg-align`]}]});return zP([`mrel`,`x-arrow`],[d],t)},mathmlBuilder(e,t){var n=cF(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=uF(sF(e.body,t));if(e.below){var a=uF(sF(e.below,t));r=new nF(`munderover`,[n,a,i])}else r=new nF(`mover`,[n,i])}else if(e.below){var o=uF(sF(e.below,t));r=new nF(`munder`,[n,o])}else r=uF(),r=new nF(`mover`,[n,r]);return r}}),FN({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:QP(i),isCharacterBox:HN(i)}},htmlBuilder:z5n,mathmlBuilder:B5n}),dF=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`},FN({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:dF(t[0]),body:QP(t[1]),isCharacterBox:HN(t[1])}}}),FN({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var n=e.parser,r=e.funcName,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:dF(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:QP(i)},l=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[l],isCharacterBox:HN(l)}}}),FN({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:dF(t[0]),body:QP(t[0])}},htmlBuilder(e,t){var n=$P(e.body,t,!0),r=zP([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=aF(e.body,t),r=new nF(`mstyle`,n);return r.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),r}}),rer={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},ier=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),aer=e=>e.type===`textord`&&e.text===`@`,oer=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t,FN({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=UP(tF(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=aP(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new nF(`mrow`,[sF(e.label,t)]);return n=new nF(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new nF(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),FN({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){var n=UP(tF(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new nF(`mrow`,[sF(e.fragment,t)])}}),FN({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=R5n(LN(t[0],`ordgroup`),`\\@char has non-numeric argument`),i=parseInt(r),a;if(isNaN(i))throw new BN(`\\@char has non-numeric argument `+r);if(i<0||i>1114111)throw new BN(`\\@char with invalid code point `+r);return i<=65535?a=String.fromCharCode(i):(i-=65536,a=String.fromCharCode((i>>10)+55296,(i&1023)+56320)),{type:`textord`,mode:n.mode,text:a}}}),ser=(e,t)=>HP($P(e.body,t.withColor(e.color),!1)),cer=(e,t)=>{var n=aF(e.body,t.withColor(e.color)),r=new nF(`mstyle`,n);return r.setAttribute(`mathcolor`,e.color),r},FN({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var n=e.parser,r=LN(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:QP(i)}},htmlBuilder:ser,mathmlBuilder:cer}),FN({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var n=e.parser,r=e.breakOnTokenText,i=LN(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),FN({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=t.gullet.future().text===`[`?t.parseSizeGroup(!0):null,r=!t.settings.displayMode||!PN({strict:t.settings.strict,errorCode:`newLineInDisplayMode`,errorMsg:`In LaTeX, \\\\ or \\newline does nothing in display mode`,report:!1});return{type:`cr`,mode:t.mode,newLine:r,size:n&&LN(n,`size`).value}},htmlBuilder(e,t){var n=zP([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=aP(iP(e.size,t)))),n},mathmlBuilder(e,t){var n=new nF(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,aP(iP(e.size,t)))),n}}),ler={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},uer=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new BN(`Expected a control sequence`,e);return t},der=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},fer=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)},FN({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(ler[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=ler[r.text]),LN(t.parseFunction(),`internal`);throw new BN(`Invalid token after macro prefix`,r)}}),FN({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new BN(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new BN(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new BN(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new BN(`Expected a macro definition`);else s[a].push(r.text);var l=t.gullet.consumeArg().tokens;return o&&l.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:s},n===ler[n]),{type:`internal`,mode:t.mode}}}),FN({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=uer(t.gullet.popToken());return t.gullet.consumeSpaces(),fer(t,r,der(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),FN({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=uer(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return fer(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}}),fF=function(e,t,n){var r=O5n(pP.math[e]&&pP.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},per=function(e,t,n,r){var i=n.havingBaseStyle(t),a=zP(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},mer=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=aP(i),e.height-=i,e.depth+=i},her=function(e,t,n,r,i,a){var o=per(LP(e,`Main-Regular`,i,r),t,r,a);return n&&mer(o,r,t),o},ger=function(e,t,n,r){return LP(e,`Size`+t+`-Regular`,n,r)},_er=function(e,t,n,r,i,a){var o=ger(e,t,i,r),s=per(zP([`delimsizing`,`size`+t],[o],r),$N.TEXT,r,a);return n&&mer(s,r,$N.TEXT),s},ver=function(e,t,n,r){return{type:`elem`,elem:zP([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[zP([],[LP(e,t,n,r)])])}},pF=function(e,t,n){var r=fP[`Size4-Regular`][e.charCodeAt(0)]?fP[`Size4-Regular`][e.charCodeAt(0)][4]:fP[`Size1-Regular`][e.charCodeAt(0)][4],i=new dP(`inner`,x7n(e,Math.round(1e3*t))),a=BP([],[new uP([i],{width:aP(r),height:aP(t),style:`width:`+aP(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return a.height=t,a.style.height=aP(t),a.style.width=aP(r),{type:`elem`,elem:a}},yer=.008,mF={type:`kern`,size:-1*yer},ber=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),xer=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),Ser=function(e,t,n,r,i,a){var o,s,l,u,d=``,f=0;o=l=u=e,s=null;var p=`Size1-Regular`;e===`\\uparrow`?l=u=`⏐`:e===`\\Uparrow`?l=u=`‖`:e===`\\downarrow`?o=l=`⏐`:e===`\\Downarrow`?o=l=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,l=`⏐`,u=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,l=`‖`,u=`\\Downarrow`):ber.has(e)?(l=`∣`,d=`vert`,f=333):xer.has(e)?(l=`∥`,d=`doublevert`,f=556):e===`[`||e===`\\lbrack`?(o=`⎡`,l=`⎢`,u=`⎣`,p=`Size4-Regular`,d=`lbrack`,f=667):e===`]`||e===`\\rbrack`?(o=`⎤`,l=`⎥`,u=`⎦`,p=`Size4-Regular`,d=`rbrack`,f=667):e===`\\lfloor`||e===`⌊`?(l=o=`⎢`,u=`⎣`,p=`Size4-Regular`,d=`lfloor`,f=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,l=u=`⎢`,p=`Size4-Regular`,d=`lceil`,f=667):e===`\\rfloor`||e===`⌋`?(l=o=`⎥`,u=`⎦`,p=`Size4-Regular`,d=`rfloor`,f=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,l=u=`⎥`,p=`Size4-Regular`,d=`rceil`,f=667):e===`(`||e===`\\lparen`?(o=`⎛`,l=`⎜`,u=`⎝`,p=`Size4-Regular`,d=`lparen`,f=875):e===`)`||e===`\\rparen`?(o=`⎞`,l=`⎟`,u=`⎠`,p=`Size4-Regular`,d=`rparen`,f=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,u=`⎩`,l=`⎪`,p=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,u=`⎭`,l=`⎪`,p=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,u=`⎩`,l=`⎪`,p=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,u=`⎭`,l=`⎪`,p=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,u=`⎭`,l=`⎪`,p=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,u=`⎩`,l=`⎪`,p=`Size4-Regular`);var m=fF(o,p,i),h=m.height+m.depth,g=fF(l,p,i),_=g.height+g.depth,v=fF(u,p,i),y=v.height+v.depth,b=0,x=1;if(s!==null){var S=fF(s,p,i);b=S.height+S.depth,x=2}var C=h+y+b,w=C+Math.max(0,Math.ceil((t-C)/(x*_)))*x*_,T=r.fontMetrics().axisHeight;n&&(T*=r.sizeMultiplier);var E=w/2-T,D=[];if(d.length>0){var O=w-h-y,k=Math.round(w*1e3),A=C7n(d,Math.round(O*1e3)),j=new dP(d,A),M=aP(f/1e3),N=aP(k/1e3),P=BP([],[new uP([j],{width:M,height:N,viewBox:`0 0 `+f+` `+k})],r);P.height=k/1e3,P.style.width=M,P.style.height=N,D.push({type:`elem`,elem:P})}else{if(D.push(ver(u,p,i,r)),D.push(mF),s===null){var F=w-h-y+2*yer;D.push(pF(l,F,r))}else{var I=(w-h-y-b)/2+2*yer;D.push(pF(l,I,r)),D.push(mF),D.push(ver(s,p,i,r)),D.push(mF),D.push(pF(l,I,r))}D.push(mF),D.push(ver(o,p,i,r))}var L=r.havingBaseStyle($N.TEXT);return per(zP([`delimsizing`,`mult`],[WP({positionType:`bottom`,positionData:E,children:D})],L),$N.TEXT,r,a)},Cer=80,wer=.08,Ter=function(e,t,n,r,i){var a=b7n(e,r,n),o=new dP(e,a);return BP([`hide-tail`],[new uP([o],{width:`400em`,height:aP(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Eer=function(e,t){var n=t.havingBaseSizing(),r=Fer(`\\surd`,e*n.sizeMultiplier,Ner,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,l,u,d;return r.type===`small`?(u=1e3+1e3*a+Cer,e<1?i=1:e<1.4&&(i=.7),s=(1+a+wer)/i,l=(1+a)/i,o=Ter(`sqrtMain`,s,u,a,t),o.style.minWidth=`0.853em`,d=.833/i):r.type===`large`?(u=(1e3+Cer)*hF[r.size],l=(hF[r.size]+a)/i,s=(hF[r.size]+a+wer)/i,o=Ter(`sqrtSize`+r.size,s,u,a,t),o.style.minWidth=`1.02em`,d=1/i):(s=e+a+wer,l=e+a,u=Math.floor(1e3*e+a)+Cer,o=Ter(`sqrtTall`,s,u,a,t),o.style.minWidth=`0.742em`,d=1.056),o.height=l,o.style.height=aP(s),{span:o,advanceWidth:d,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Der=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),Oer=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),ker=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),hF=[0,1.2,1.8,2.4,3],Aer=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),Der.has(e)||ker.has(e))return _er(e,t,!1,n,r,i);if(Oer.has(e))return Ser(e,hF[t],!1,n,r,i);throw new BN(`Illegal delimiter: '`+e+`'`)},jer=[{type:`small`,style:$N.SCRIPTSCRIPT},{type:`small`,style:$N.SCRIPT},{type:`small`,style:$N.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Mer=[{type:`small`,style:$N.SCRIPTSCRIPT},{type:`small`,style:$N.SCRIPT},{type:`small`,style:$N.TEXT},{type:`stack`}],Ner=[{type:`small`,style:$N.SCRIPTSCRIPT},{type:`small`,style:$N.SCRIPT},{type:`small`,style:$N.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Per=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},Fer=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return a}return n[n.length-1]},Ier=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=ker.has(e)?jer:Der.has(e)?Ner:Mer,s=Fer(e,t,o,r);return s.type===`small`?her(e,s.style,n,r,i,a):s.type===`large`?_er(e,s.size,n,r,i,a):Ser(e,t,n,r,i,a)},Ler=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,l=5/r.fontMetrics().ptPerEm,u=Math.max(t-o,n+o);return Ier(e,Math.max(u/500*s,2*u-l),!0,r,i,a)},Rer={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},zer=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`)),FN({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=W5n(ZP(t[0]),e);return{type:`delimsizing`,mode:e.parser.mode,size:Rer[e.funcName].size,mclass:Rer[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?zP([e.mclass]):Aer(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(iF(e.delim,e.mode));var n=new nF(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=aP(hF[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}}),FN({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new BN(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:W5n(t[0],e).text,color:n}}}),FN({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=W5n(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=LN(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{G5n(e);for(var n=$P(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o{G5n(e);var n=aF(e.body,t);if(e.left!==`.`){var r=new nF(`mo`,[iF(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new nF(`mo`,[iF(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return P9n(n)}}),FN({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=W5n(t[0],e);if(!e.parser.leftrightDepth)throw new BN(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=eF(t,[]):(n=Aer(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim===`\\vert`||e.delim===`|`?iF(`|`,`text`):iF(e.delim,e.mode),r=new nF(`mo`,[n]);return r.setAttribute(`fence`,`true`),r.setAttribute(`lspace`,`0.05em`),r.setAttribute(`rspace`,`0.05em`),r}}),Ber=(e,t)=>{var n=UP(tF(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=HN(e.body);if(r===`sout`)a=zP([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var l=iP({number:.6,unit:`pt`},t),u=iP({number:.35,unit:`ex`},t),d=t.havingBaseSizing();i/=d.sizeMultiplier;var f=n.height+n.depth+l+u;n.style.paddingLeft=aP(f/2+l);var p=Math.floor(1e3*f*i),m=v7n(p);a=BP([`hide-tail`],[new uP([new dP(`phase`,m)],{width:`400em`,height:aP(p/1e3),viewBox:`0 0 400000 `+p,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=aP(f),o=n.depth+l+u}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var h,g,_=0;/box/.test(r)?(_=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),h=t.fontMetrics().fboxsep+(r===`colorbox`?0:_),g=h):r===`angl`?(_=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),h=4*_,g=Math.max(0,.25-n.depth)):(h=s?.2:0,g=h),a=J9n(n,r,h,g,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=aP(_)):r===`angl`&&_!==.049&&(a.style.borderTopWidth=aP(_),a.style.borderRightWidth=aP(_)),o=n.depth+g,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var v;if(e.backgroundColor)v=WP({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var y=/cancel|phase/.test(r)?[`svg-align`]:[];v=WP({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:y}]})}return/cancel/.test(r)&&(v.height=n.height,v.depth=n.depth),/cancel/.test(r)&&!s?zP([`mord`,`cancel-lap`],[v],t):zP([`mord`],[v],t)},Ver=(e,t)=>{var n,r=new nF(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[sF(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+aP(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r},FN({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=LN(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:Ber,mathmlBuilder:Ver}),FN({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=LN(t[0],`color-token`).color,o=LN(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),FN({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),FN({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),FN({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName;n.mode===`math`&&PN({strict:n.settings.strict,errorCode:`mathVsSout`,errorMsg:`LaTeX's \\sout works only in text mode`,report:!0});var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),FN({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}}),Her={},Uer={},gF=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},_F=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,gF.range(this,t))}},vF=e=>{if(!e.parser.settings.displayMode)throw new BN(`{`+e.envName+`} can be used only in display mode.`)},Wer=new Set([`gather`,`gather*`]),yF=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),l=[],u=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,f=5*d;e.colSeparationType&&e.colSeparationType===`small`&&(f=.2778*(t.havingStyle($N.SCRIPT).sizeMultiplier/t.sizeMultiplier));var p=e.colSeparationType===`CD`?iP({number:3,unit:`ex`},t):12*d,m=3*d,h=e.arraystretch*p,g=.7*h,_=.3*h,v=0;function y(e){for(var t=0;t0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(y(a[0]),n=0;n0&&(E+=_,Se))for(n=0;n=o)){var ie=void 0;if(r>0||e.hskipBeforeAndAfter){var ae;ie=((ae=R)==null?void 0:ae.pregap)??f,ie!==0&&(A=zP([`arraycolsep`],[]),A.style.width=aP(ie),k.push(A))}var oe=[];for(n=0;n0){for(var me=VP(`katex-hline`,t,u),he=VP(`katex-hdashline`,t,u),ge=[{type:`elem`,elem:pe,shift:0}];l.length>0;){var _e=l.pop(),ve=_e.pos-D;_e.isDashed?ge.push({type:`elem`,elem:he,shift:ve}):ge.push({type:`elem`,elem:me,shift:ve})}pe=WP({positionType:`individualShift`,children:ge})}if(M.length===0)return zP([`mord`],[pe],t);var ye=zP([`katex-tag`],[WP({positionType:`individualShift`,children:M})],t);return HP([pe,ye])},Ger={c:`center `,l:`left `,r:`right `},bF=function(e,t){for(var n=[],r=new nF(`mtd`,[],[`mtr-glue`]),i=new nF(`mtd`,[],[`mml-eqn-num`]),a=0;a0){var m=e.cols,h=``,g=!1,_=0,v=m.length;m[0].type===`separator`&&(f+=`top `,_=1),m[m.length-1].type===`separator`&&(f+=`bottom `,--v);for(var y=_;y0?`left `:``,f+=T[T.length-1].length>0?`right `:``;for(var E=1;E0&&d&&(m=1),n[f]={type:`align`,align:p,pregap:m,postgap:0}}return i.colSeparationType=d?`align`:`alignat`,i},RN({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(L5n(t[0])?[t[0]]:LN(t[0],`ordgroup`).body).map(function(e){var t=I5n(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new BN(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return zN(e.parser,r,J5n(e.envName))},htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new BN(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=zN(e.parser,r,J5n(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=zN(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(L5n(t[0])?[t[0]]:LN(t[0],`ordgroup`).body).map(function(e){var t=I5n(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new BN(`Unknown column alignment: `+t,e)});if(n.length>1)throw new BN(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=zN(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new BN(`{subarray} can contain only one column`);return i},htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=zN(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},J5n(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:Ker,htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Wer.has(e.envName)&&vF(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:q5n(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return zN(e.parser,t,`display`)},htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:Ker,htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){vF(e);var t={autoTag:q5n(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return zN(e.parser,t,`display`)},htmlBuilder:yF,mathmlBuilder:bF}),RN({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return vF(e),H5n(e.parser)},htmlBuilder:yF,mathmlBuilder:bF}),q(`\\nonumber`,`\\gdef\\@eqnsw{0}`),q(`\\notag`,`\\nonumber`),FN({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new BN(e.funcName+` valid only within array environment`)}}),qer=Her,FN({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var n=e.parser,r=e.funcName,i=t[0];if(i.type!==`ordgroup`)throw new BN(`Invalid environment name`,i);var a=R5n(i,`Environment name should contain only text characters and spaces`,!0);if(r===`\\begin`){if(!Object.prototype.hasOwnProperty.call(qer,a))throw new BN(`No such environment: `+a,i);var o=qer[a],s=n.parseArguments(`\\begin{`+a+`}`,o),l=s.args,u=s.optArgs,d={mode:n.mode,envName:a,parser:n},f=o.handler(d,l,u);n.expect(`\\end`,!1);var p=n.nextToken,m=LN(n.parseFunction(),`environment`);if(m.name!==a)throw new BN(`Mismatch: \\begin{`+a+`} matched by \\end{`+m.name+`}`,p);return f}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}}),Jer=(e,t)=>{var n=e.font,r=t.withFont(n);return tF(e.body,r)},Yer=(e,t)=>{var n=e.font,r=t.withFont(n);return sF(e.body,r)},Xer={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`},FN({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=ZP(t[0]),a=r in Xer?Xer[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:Jer,mathmlBuilder:Yer}),FN({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:dF(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:HN(r)}}}),FN({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}}),Zer=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=tF(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*p:7*p,g=t.fontMetrics().denom1):(f>0?(m=t.fontMetrics().num2,h=p):(m=t.fontMetrics().num3,h=3*p),g=t.fontMetrics().denom2);var _;if(d){var v=t.fontMetrics().axisHeight;m-o.depth-(v+.5*f){var n=new nF(`mfrac`,[sF(e.numer,t),sF(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=iP(e.barSize,t);n.setAttribute(`linethickness`,aP(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new nF(`mo`,[new rF(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new nF(`mo`,[new rF(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return P9n(i)}return n},$er=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e,FN({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,l=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,l=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,l=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,l=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var u=r===`\\cfrac`,d=null;return u||r.startsWith(`\\d`)?d=`display`:r.startsWith(`\\t`)&&(d=`text`),$er({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:u,hasBarLine:o,leftDelim:s,rightDelim:l,barSize:null},d)},htmlBuilder:Zer,mathmlBuilder:Qer}),FN({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}}),etr=[`display`,`text`,`script`,`scriptscript`],ttr=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t},FN({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var n=e.parser,r=t[4],i=t[5],a=ZP(t[0]),o=a.type===`atom`&&a.family===`open`?ttr(a.text):null,s=ZP(t[1]),l=s.type===`atom`&&s.family===`close`?ttr(s.text):null,u=LN(t[2],`size`),d,f=null;u.isBlank?d=!0:(f=u.value,d=f.number>0);var p=null,m=t[3];if(m.type===`ordgroup`){if(m.body.length>0){var h=LN(m.body[0],`textord`);p=etr[Number(h.text)]}}else m=LN(m,`textord`),p=etr[Number(m.text)];return $er({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:d,barSize:f,leftDelim:o,rightDelim:l},p)}}),FN({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:LN(t[0],`size`).value,token:r}}}),FN({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],i=LN(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));var a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}}),ntr=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?tF(e.sup,t.havingStyle(n.sup()),t):tF(e.sub,t.havingStyle(n.sub()),t),i=LN(e.base,`horizBrace`)):i=LN(e,`horizBrace`);var a=tF(i.base,t.havingBaseStyle($N.DISPLAY)),o=lF(i,t),s=i.isOver?WP({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):WP({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var l=zP([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?WP({positionType:`firstBaseline`,children:[{type:`elem`,elem:l},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):WP({positionType:`bottom`,positionData:l.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:l}]})}return zP([`minner`,i.isOver?`mover`:`munder`],[s],t)},rtr=(e,t)=>{var n=cF(e.label);return new nF(e.isOver?`mover`:`munder`,[sF(e.base,t),n])},FN({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:ntr,mathmlBuilder:rtr}),FN({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],i=LN(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:QP(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=$P(e.body,t,!1);return m9n(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=oF(e.body,t);return n instanceof nF||(n=new nF(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),FN({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=LN(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a{var n=e.parser,r=e.funcName;e.token;var i=LN(t[0],`raw`).string,a=t[1];n.settings.strict&&PN({strict:n.settings.strict,errorCode:`htmlExtension`,errorMsg:`HTML extension is disabled on strict mode`,report:!0});var o,s={};switch(r){case`\\htmlClass`:s.class=i,o={command:`\\htmlClass`,class:i};break;case`\\htmlId`:s.id=i,o={command:`\\htmlId`,id:i};break;case`\\htmlStyle`:s.style=i,o={command:`\\htmlStyle`,style:i};break;case`\\htmlData`:for(var l=`{,}`,u=[],d=``,f=0;f{var n=$P(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=zP(r,n,t);for(var a of Object.entries(e.attributes)){var o=a[0],s=a[1];o!==`class`&&i.setAttribute(o,s)}return i},mathmlBuilder:(e,t)=>oF(e.body,t)}),FN({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:QP(t[0]),mathml:QP(t[1])}),htmlBuilder:(e,t)=>HP($P(e.html,t,!1)),mathmlBuilder:(e,t)=>oF(e.mathml,t)}),xF=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new BN(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!E7n(n))throw new BN(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n},FN({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var l=LN(n[0],`raw`).string.split(`,`),u=0;u{var n=iP(e.height,t),r=0;e.totalheight.number>0&&(r=iP(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=iP(e.width,t));var a={height:aP(n+r)};i>0&&(a.width=aP(i)),r>0&&(a.verticalAlign=aP(-r));var o=new M7n(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new nF(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=iP(e.height,t),i=0;if(e.totalheight.number>0&&(i=iP(e.totalheight,t)-r,n.setAttribute(`valign`,aP(-i))),n.setAttribute(`height`,aP(r+i)),e.width.number>0){var a=iP(e.width,t);n.setAttribute(`width`,aP(a))}return n.setAttribute(`src`,e.src),n}}),FN({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=LN(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||PN({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`),report:!0}),n.mode!==`math`&&PN({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` works only in math mode`,report:!0})):o&&PN({strict:n.settings.strict,errorCode:`mathVsTextUnits`,errorMsg:`LaTeX's `+r+` doesn't support mu units`,report:!0})}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return g9n(e.dimension,t)},mathmlBuilder(e,t){var n=iP(e.dimension,t);return new j9n(n)}}),FN({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=zP([],[tF(e.body,t)]),n=zP([`katex-inner`],[n],t)):n=zP([`katex-inner`],[tF(e.body,t)]);var r=zP([`katex-fix`],[]),i=zP([e.alignment],[n,r],t),a=zP([`katex-strut`]);return a.style.height=aP(i.height+i.depth),i.depth&&(a.style.verticalAlign=aP(-i.depth)),i.children.unshift(a),i=zP([`katex-thinbox`],[i],t),zP([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new nF(`mpadded`,[sF(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),FN({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),FN({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new BN(`Mismatched `+e.funcName)}}),itr=(e,t)=>{switch(t.style.size){case $N.DISPLAY.size:return e.display;case $N.TEXT.size:return e.text;case $N.SCRIPT.size:return e.script;case $N.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},FN({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:QP(t[0]),text:QP(t[1]),script:QP(t[2]),scriptscript:QP(t[3])}),htmlBuilder:(e,t)=>HP($P(itr(e,t),t,!1)),mathmlBuilder:(e,t)=>oF(itr(e,t),t)}),atr=(e,t,n,r,i,a,o)=>{e=zP([],[e]);var s=n&&HN(n),l,u;if(t){var d=tF(t,r.havingStyle(i.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var f=tF(n,r.havingStyle(i.sub()),r);l={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var p;if(u&&l)p=WP({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:l.elem,marginLeft:aP(-a)},{type:`kern`,size:l.kern},{type:`elem`,elem:e},{type:`kern`,size:u.kern},{type:`elem`,elem:u.elem,marginLeft:aP(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(l)p=WP({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:l.elem,marginLeft:aP(-a)},{type:`kern`,size:l.kern},{type:`elem`,elem:e}]});else if(u)p=WP({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:u.kern},{type:`elem`,elem:u.elem,marginLeft:aP(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var m=[p];if(l&&a!==0&&!s){var h=zP([`mspace`],[],r);h.style.marginRight=aP(a),m.unshift(h)}return zP([`mop`,`op-limits`],m,r)},otr=new Set([`\\smallint`]),str=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=LN(e.base,`op`),i=!0):a=LN(e,`op`);var o=t.style,s=!1;o.size===$N.DISPLAY.size&&a.symbol&&!otr.has(a.name)&&(s=!0);var l,u;if(a.symbol){var d=s?`Size2-Regular`:`Size1-Regular`,f=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(f=a.name.slice(1),a.name=f===`oiint`?`\\iint`:`\\iiint`),l=LP(a.name,d,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),u=l.italic,f.length>0){var p=y9n(f+`Size`+(s?`2`:`1`),t);l=WP({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:0},{type:`elem`,elem:p,shift:s?.08:0}]}),a.name=`\\`+f,l.classes.unshift(`mop`),l.italic=u}}else if(a.body){var m=$P(a.body,t,!0);m.length===1&&m[0]instanceof lP?(l=m[0],l.classes[0]=`mop`):l=zP([`mop`],m,t)}else{for(var h=[],g=1;g{var n;if(e.symbol)n=new nF(`mo`,[iF(e.name,e.mode)]),otr.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new nF(`mo`,aF(e.body,t));else{n=new nF(`mi`,[new rF(e.name.slice(1))]);var r=new nF(`mo`,[iF(`⁡`,`text`)]);n=e.parentIsSupSub?new nF(`mrow`,[n,r]):M5n([n,r])}return n},ltr={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`},FN({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var n=e.parser,r=e.funcName;return r.length===1&&(r=ltr[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:str,mathmlBuilder:ctr}),FN({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:QP(r)}}}),utr={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`},FN({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),FN({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),FN({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var t=e.parser,n=e.funcName;return n.length===1&&(n=utr[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}}),dtr=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=LN(e.base,`operatorname`),i=!0):a=LN(e,`operatorname`);var o;if(a.body.length>0){for(var s=$P(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),l=0;l{for(var n=aF(e.body,t.withFont(`mathrm`)),r=!0,i=0;ie.toText()).join(``);n=[new rF(s)]}var l=new nF(`mi`,n);l.setAttribute(`mathvariant`,`normal`);var u=new nF(`mo`,[iF(`⁡`,`text`)]);return e.parentIsSupSub?new nF(`mrow`,[l,u]):M5n([l,u])},FN({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:QP(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:dtr,mathmlBuilder:ftr}),q(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),IN({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?HP($P(e.body,t,!1)):zP([`mord`],$P(e.body,t,!0),t)},mathmlBuilder(e,t){return oF(e.body,t,!0)}}),FN({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=tF(e.body,t.havingCrampedStyle()),r=VP(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return zP([`mord`,`katex-overline`],[WP({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new nF(`mo`,[new rF(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new nF(`mover`,[sF(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),FN({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:QP(r)}},htmlBuilder:(e,t)=>HP($P(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>{var n=aF(e.body,t);return new nF(`mphantom`,n)}}),q(`\\hphantom`,`\\smash{\\phantom{#1}}`),FN({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>zP([`mord`,`rlap`],[zP([`katex-inner`],[tF(e.body,t.withPhantom())]),zP([`katex-fix`],[])],t),mathmlBuilder:(e,t)=>{var n=aF(QP(e.body),t),r=new nF(`mphantom`,n),i=new nF(`mpadded`,[r]);return i.setAttribute(`width`,`0px`),i}}),FN({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var n=e.parser,r=LN(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=tF(e.body,t);return WP({positionType:`shift`,positionData:-iP(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new nF(`mpadded`,[sF(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),ptr=(e,t)=>({type:`reflectbox`,mode:e.parser.mode,body:t[0]}),FN({type:`reflectbox`,names:[`\\reflectbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler:ptr,htmlBuilder(e,t){return zP([`mord`,`reflectbox`],[tF(e.body,t)],t)},mathmlBuilder(e,t){return sF(e.body,t)}}),FN({type:`reflectbox`,names:[`\\mathreflectbox`],numArgs:1,argTypes:[`math`],handler:ptr}),FN({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),FN({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var r=e.parser,i=n[0],a=LN(t[0],`size`),o=LN(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&LN(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=zP([`mord`,`katex-rule`],[],t),r=iP(e.width,t),i=iP(e.height,t),a=e.shift?iP(e.shift,t):0;return n.style.borderRightWidth=aP(r),n.style.borderTopWidth=aP(i),n.style.bottom=aP(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=iP(e.width,t),r=iP(e.height,t),i=e.shift?iP(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new nF(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,aP(n)),o.setAttribute(`height`,aP(r));var s=new nF(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,aP(i)):(s.setAttribute(`height`,aP(i)),s.setAttribute(`depth`,aP(-i))),s.setAttribute(`voffset`,aP(i)),s}}),mtr=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`],htr=(e,t)=>{var n=t.havingSize(e.size);return Y5n(e.body,n,t)},FN({type:`sizing`,names:mtr,numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:mtr.indexOf(r)+1,body:a}},htmlBuilder:htr,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=aF(e.body,n),i=new nF(`mstyle`,r);return i.setAttribute(`mathsize`,aP(n.sizeMultiplier)),i}}),FN({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,i=!1,a=!1,o=n[0]&&LN(n[0],`ordgroup`);if(o)for(var s,l=0;l{var n=zP([],[tF(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return zP([`mord`,`katex-smash`],[n],t);if(n.children)for(var r=0;r{var n=new nF(`mpadded`,[sF(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),FN({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=tF(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=UP(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<$N.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,o=Eer(n.height+n.depth+a+r,t),s=o.span,l=o.ruleWidth,u=o.advanceWidth,d=s.height-l;d>n.height+n.depth+a&&(a=(a+d-n.height-n.depth)/2);var f=s.height-n.height-a-l;n.style.paddingLeft=aP(u);var p=WP({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+f)},{type:`elem`,elem:s},{type:`kern`,size:l}]});if(e.index){var m=t.havingStyle($N.SCRIPTSCRIPT),h=tF(e.index,m,t);return zP([`mord`,`sqrt`],[zP([`katex-root`],[WP({positionType:`shift`,positionData:-(.6*(p.height-p.depth)),children:[{type:`elem`,elem:h}]})]),p],t)}return zP([`mord`,`sqrt`],[p],t)},mathmlBuilder(e,t){var n=e.body,r=e.index;return r?new nF(`mroot`,[sF(n,t),sF(r,t)]):new nF(`msqrt`,[sF(n,t)])}}),SF={display:$N.DISPLAY,text:$N.TEXT,script:$N.SCRIPT,scriptscript:$N.SCRIPTSCRIPT},FN({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!X5n(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=SF[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),Y5n(e.body,r,t)},mathmlBuilder(e,t){var n=SF[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=aF(e.body,r),a=new nF(`mstyle`,i),o={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return a.setAttribute(`scriptlevel`,o[0]),a.setAttribute(`displaystyle`,o[1]),a}}),gtr=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===$N.DISPLAY.size||n.alwaysHandleSupSub)?str:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===$N.DISPLAY.size||n.limits)?dtr:null:n.type===`accent`?HN(n.base)?eer:null:n.type===`horizBrace`&&!e.sub===n.isOver?ntr:null:null},IN({type:`supsub`,htmlBuilder(e,t){var n=gtr(e,t);if(n)return n(e,t);var r=e.base,i=e.sup,a=e.sub,o=tF(r,t),s,l,u=t.fontMetrics(),d=0,f=0,p=r&&HN(r);if(i){var m=t.havingStyle(t.style.sup());s=tF(i,m,t),p||(d=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(a){var h=t.havingStyle(t.style.sub());l=tF(a,h,t),p||(f=o.depth+h.fontMetrics().subDrop*h.sizeMultiplier/t.sizeMultiplier)}var g=t.style===$N.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2,_=t.sizeMultiplier,v=aP(.5/u.ptPerEm/_),y=null;if(l){var b=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof lP||b)&&(y=aP(-(o.italic??0)))}var x;if(s&&l){d=Math.max(d,g,s.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var S=4*u.defaultRuleThickness;if(d-s.depth-(l.height-f)0&&(d+=C,f-=C)}x=WP({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:f,marginRight:v,marginLeft:y},{type:`elem`,elem:s,shift:-d,marginRight:v}]})}else if(l)f=Math.max(f,u.sub1,l.height-.8*u.xHeight),x=WP({positionType:`shift`,positionData:f,children:[{type:`elem`,elem:l,marginLeft:y,marginRight:v}]});else if(s)d=Math.max(d,g,s.depth+.25*u.xHeight),x=WP({positionType:`shift`,positionData:-d,children:[{type:`elem`,elem:s,marginRight:v}]});else throw Error(`supsub must have either sup or sub.`);return zP([A9n(o,`right`)||`mord`],[o,zP([`msupsub`],[x])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[sF(e.base,t)];e.sub&&a.push(sF(e.sub,t)),e.sup&&a.push(sF(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===$N.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===$N.DISPLAY)?`mover`:`msup`}else if(e.sup){var l=e.base;o=l&&l.type===`op`&&l.limits&&t.style===$N.DISPLAY||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(t.style===$N.DISPLAY||l.limits)?`munderover`:`msubsup`}else{var u=e.base;o=u&&u.type===`op`&&u.limits&&(t.style===$N.DISPLAY||u.alwaysHandleSupSub)||u&&u.type===`operatorname`&&u.alwaysHandleSupSub&&(u.limits||t.style===$N.DISPLAY)?`munder`:`msub`}return new nF(o,a)}}),IN({type:`atom`,htmlBuilder(e,t){return l9n(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new nF(`mo`,[iF(e.text,e.mode)]);if(e.family===`bin`){var r=I9n(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}}),_tr={mi:`italic`,mn:`normal`,mtext:`normal`},IN({type:`mathord`,htmlBuilder(e,t){return RP(e,t)},mathmlBuilder(e,t){var n=new nF(`mi`,[iF(e.text,e.mode,t)]),r=I9n(e,t)||`italic`;return r!==_tr[n.type]&&n.setAttribute(`mathvariant`,r),n}}),IN({type:`textord`,htmlBuilder(e,t){return RP(e,t)},mathmlBuilder(e,t){var n=iF(e.text,e.mode,t),r=I9n(e,t)||`normal`,i=e.mode===`text`?new nF(`mtext`,[n]):/[0-9]/.test(e.text)?new nF(`mn`,[n]):e.text===`\\prime`?new nF(`mo`,[n]):new nF(`mi`,[n]);return r!==_tr[i.type]&&i.setAttribute(`mathvariant`,r),i}}),vtr=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),ytr=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]),IN({type:`spacing`,htmlBuilder(e,t){var n=ytr.get(e.text),r=vtr.get(e.text);if(n){var i=n.className||``;if(e.mode===`text`){var a=RP(e,t);return a.classes.push(i),a}return zP([`mspace`,i],[l9n(e.text,e.mode,t)],t)}if(r)return zP([`mspace`,r],[],t);throw new BN(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(ytr.has(e.text))n=new nF(`mtext`,[new rF(`\xA0`)]);else if(vtr.has(e.text))return new nF(`mspace`);else throw new BN(`Unknown type of space "`+e.text+`"`);return n}}),btr=()=>{var e=new nF(`mtd`,[]);return e.setAttribute(`width`,`50%`),e},IN({type:`tag`,mathmlBuilder(e,t){var n=new nF(`mtable`,[new nF(`mtr`,[btr(),new nF(`mtd`,[oF(e.body,t)]),btr(),new nF(`mtd`,[oF(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}}),xtr={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},Str={"\\textbf":`textbf`,"\\textmd":`textmd`},Ctr={"\\textit":`textit`,"\\textup":`textup`},wtr=(e,t)=>{var n=e.font;return n?xtr[n]?t.withTextFontFamily(xtr[n]):Str[n]?t.withTextFontWeight(Str[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(Ctr[n]):t},FN({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:QP(i),font:r}},htmlBuilder(e,t){var n=wtr(e,t);return zP([`mord`,`text`],$P(e.body,n,!0),n)},mathmlBuilder(e,t){var n=wtr(e,t);return oF(e.body,n)}}),FN({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=tF(e.body,t),r=VP(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return zP([`mord`,`katex-underline`],[WP({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new nF(`mo`,[new rF(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new nF(`munder`,[sF(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),FN({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=tF(e.body,t),r=t.fontMetrics().axisHeight;return WP({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new nF(`mpadded`,[sF(e.body,t)],[`vcenter`]);return new nF(`mrow`,[n])}}),FN({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new BN(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=Ttr(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?`␣`:`\xA0`),CF=S9n,Etr=`[ \r ]`,Dtr=`\\\\[a-zA-Z@]+`,Otr=`\\\\[^\ud800-\udfff]`,ktr=`(`+Dtr+`)`+Etr+`*`,Atr=`\\\\( |[ \r ]+ ?)[ \r ]*`,wF=`[̀-ͯ]`,jtr=RegExp(wF+`+$`),Mtr=`(`+Etr+`+)|`+(Atr+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(wF+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(wF+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+ktr)+(`|`+Otr+`)`),Ntr=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Mtr,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new _F(`EOF`,new gF(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new BN(`Unexpected character: '`+e[t]+`'`,new _F(e[t],new gF(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(` `,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,PN({strict:this.settings.strict,errorCode:`commentAtEnd`,errorMsg:`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`,report:!0})):this.tokenRegex.lastIndex=i+1,this.lex()}return new _F(r,new gF(this,t,this.tokenRegex.lastIndex))}},Ptr=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new BN(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},Ftr=Uer,q(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),q(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),q(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),q(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),q(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),q(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),q(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),Itr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},q(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new BN("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=Itr[t.text],r==null||r>=n)throw new BN(`Invalid base-`+n+` digit `+t.text);for(var i;(i=Itr[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new BN(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new BN(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new BN(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var l=``,u=e.expandNextToken();u.text!==`]`&&u.text!==`EOF`;)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new BN(`Invalid number of arguments: `+l);s=parseInt(l),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``},q(`\\newcommand`,e=>TF(e,!1,!0,!1)),q(`\\renewcommand`,e=>TF(e,!0,!1,!1)),q(`\\providecommand`,e=>TF(e,!0,!0,!0)),q(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),q(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),q(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),CF[n],pP.math[n],pP.text[n]),``}),q(`\\bgroup`,`{`),q(`\\egroup`,`}`),q(`~`,`\\nobreakspace`),q(`\\lq`,"`"),q(`\\rq`,`'`),q(`\\aa`,`\\r a`),q(`\\AA`,`\\r A`),q(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),q(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),q(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),q(`ℬ`,`\\mathscr{B}`),q(`ℰ`,`\\mathscr{E}`),q(`ℱ`,`\\mathscr{F}`),q(`ℋ`,`\\mathscr{H}`),q(`ℐ`,`\\mathscr{I}`),q(`ℒ`,`\\mathscr{L}`),q(`ℳ`,`\\mathscr{M}`),q(`ℛ`,`\\mathscr{R}`),q(`ℭ`,`\\mathfrak{C}`),q(`ℌ`,`\\mathfrak{H}`),q(`ℨ`,`\\mathfrak{Z}`),q(`\\Bbbk`,`\\Bbb{k}`),q(`\\llap`,`\\mathllap{\\textrm{#1}}`),q(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),q(`\\clap`,`\\mathclap{\\textrm{#1}}`),q(`\\mathstrut`,`\\vphantom{(}`),q(`\\underbar`,`\\underline{\\text{#1}}`),q(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),q(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),q(`\\ne`,`\\neq`),q(`≠`,`\\neq`),q(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),q(`∉`,`\\notin`),q(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),q(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),q(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),q(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),q(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),q(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),q(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),q(`⟂`,`\\perp`),q(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),q(`∌`,`\\notni`),q(`⌜`,`\\ulcorner`),q(`⌝`,`\\urcorner`),q(`⌞`,`\\llcorner`),q(`⌟`,`\\lrcorner`),q(`©`,`\\copyright`),q(`®`,`\\textregistered`),q(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),q(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),q(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),q(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),q(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),q(`⋮`,`\\vdots`),q(`\\varGamma`,`\\mathit{\\Gamma}`),q(`\\varDelta`,`\\mathit{\\Delta}`),q(`\\varTheta`,`\\mathit{\\Theta}`),q(`\\varLambda`,`\\mathit{\\Lambda}`),q(`\\varXi`,`\\mathit{\\Xi}`),q(`\\varPi`,`\\mathit{\\Pi}`),q(`\\varSigma`,`\\mathit{\\Sigma}`),q(`\\varUpsilon`,`\\mathit{\\Upsilon}`),q(`\\varPhi`,`\\mathit{\\Phi}`),q(`\\varPsi`,`\\mathit{\\Psi}`),q(`\\varOmega`,`\\mathit{\\Omega}`),q(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),q(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),q(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),q(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),q(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),q(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),q(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),q(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`),Ltr={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Rtr=new Set([`bin`,`rel`]),q(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in Ltr?t=Ltr[n]:(n.slice(0,4)===`\\not`||n in pP.math&&Rtr.has(pP.math[n].group))&&(t=`\\dotsb`),t}),ztr={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0},q(`\\dotso`,function(e){return e.future().text in ztr?`\\ldots\\,`:`\\ldots`}),q(`\\dotsc`,function(e){var t=e.future().text;return t in ztr&&t!==`,`?`\\ldots\\,`:`\\ldots`}),q(`\\cdots`,function(e){return e.future().text in ztr?`\\@cdots\\,`:`\\@cdots`}),q(`\\dotsb`,`\\cdots`),q(`\\dotsm`,`\\cdots`),q(`\\dotsi`,`\\!\\cdots`),q(`\\dotsx`,`\\ldots\\,`),q(`\\DOTSI`,`\\relax`),q(`\\DOTSB`,`\\relax`),q(`\\DOTSX`,`\\relax`),q(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),q(`\\,`,`\\tmspace+{3mu}{.1667em}`),q(`\\thinspace`,`\\,`),q(`\\>`,`\\mskip{4mu}`),q(`\\:`,`\\tmspace+{4mu}{.2222em}`),q(`\\medspace`,`\\:`),q(`\\;`,`\\tmspace+{5mu}{.2777em}`),q(`\\thickspace`,`\\;`),q(`\\!`,`\\tmspace-{3mu}{.1667em}`),q(`\\negthinspace`,`\\!`),q(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),q(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),q(`\\enspace`,`\\kern.5em `),q(`\\enskip`,`\\hskip.5em\\relax`),q(`\\quad`,`\\hskip1em\\relax`),q(`\\qquad`,`\\hskip2em\\relax`),q(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),q(`\\tag@paren`,`\\tag@literal{({#1})}`),q(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new BN(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),q(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),q(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),q(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),q(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),q(`\\newline`,`\\\\\\relax`),q(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`),Btr=aP(fP[`Main-Regular`][84][1]-.7*fP[`Main-Regular`][65][1]),q(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Btr+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),q(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Btr+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),q(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),q(`\\@hspace`,`\\hskip #1\\relax`),q(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),q(`\\ordinarycolon`,`:`),q(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),q(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),q(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),q(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),q(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),q(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),q(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),q(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),q(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),q(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),q(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),q(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),q(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),q(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),q(`∷`,`\\dblcolon`),q(`∹`,`\\eqcolon`),q(`≔`,`\\coloneqq`),q(`≕`,`\\eqqcolon`),q(`⩴`,`\\Coloneqq`),q(`\\ratio`,`\\vcentcolon`),q(`\\coloncolon`,`\\dblcolon`),q(`\\colonequals`,`\\coloneqq`),q(`\\coloncolonequals`,`\\Coloneqq`),q(`\\equalscolon`,`\\eqqcolon`),q(`\\equalscoloncolon`,`\\Eqqcolon`),q(`\\colonminus`,`\\coloneq`),q(`\\coloncolonminus`,`\\Coloneq`),q(`\\minuscolon`,`\\eqcolon`),q(`\\minuscoloncolon`,`\\Eqcolon`),q(`\\coloncolonapprox`,`\\Colonapprox`),q(`\\coloncolonsim`,`\\Colonsim`),q(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),q(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),q(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),q(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),q(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),q(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),q(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),q(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),q(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),q(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),q(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),q(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),q(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),q(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),q(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),q(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),q(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),q(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),q(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),q(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),q(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),q(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),q(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),q(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),q(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),q(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),q(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),q(`\\imath`,`\\html@mathml{\\@imath}{ı}`),q(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),q(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),q(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),q(`⟦`,`\\llbracket`),q(`⟧`,`\\rrbracket`),q(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),q(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),q(`↤`,`\\mapsfrom`),q(`\\mapsfrom`,"\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"),q(`⦃`,`\\lBrace`),q(`⦄`,`\\rBrace`),q(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),q(`⦵`,`\\minuso`),q(`\\darr`,`\\downarrow`),q(`\\dArr`,`\\Downarrow`),q(`\\Darr`,`\\Downarrow`),q(`\\lang`,`\\langle`),q(`\\rang`,`\\rangle`),q(`\\uarr`,`\\uparrow`),q(`\\uArr`,`\\Uparrow`),q(`\\Uarr`,`\\Uparrow`),q(`\\N`,`\\mathbb{N}`),q(`\\R`,`\\mathbb{R}`),q(`\\Z`,`\\mathbb{Z}`),q(`\\alef`,`\\aleph`),q(`\\alefsym`,`\\aleph`),q(`\\Alpha`,`\\mathrm{A}`),q(`\\Beta`,`\\mathrm{B}`),q(`\\bull`,`\\bullet`),q(`\\Chi`,`\\mathrm{X}`),q(`\\clubs`,`\\clubsuit`),q(`\\cnums`,`\\mathbb{C}`),q(`\\Complex`,`\\mathbb{C}`),q(`\\Dagger`,`\\ddagger`),q(`\\diamonds`,`\\diamondsuit`),q(`\\empty`,`\\emptyset`),q(`\\Epsilon`,`\\mathrm{E}`),q(`\\Eta`,`\\mathrm{H}`),q(`\\exist`,`\\exists`),q(`\\harr`,`\\leftrightarrow`),q(`\\hArr`,`\\Leftrightarrow`),q(`\\Harr`,`\\Leftrightarrow`),q(`\\hearts`,`\\heartsuit`),q(`\\image`,`\\Im`),q(`\\infin`,`\\infty`),q(`\\Iota`,`\\mathrm{I}`),q(`\\isin`,`\\in`),q(`\\Kappa`,`\\mathrm{K}`),q(`\\larr`,`\\leftarrow`),q(`\\lArr`,`\\Leftarrow`),q(`\\Larr`,`\\Leftarrow`),q(`\\lrarr`,`\\leftrightarrow`),q(`\\lrArr`,`\\Leftrightarrow`),q(`\\Lrarr`,`\\Leftrightarrow`),q(`\\Mu`,`\\mathrm{M}`),q(`\\natnums`,`\\mathbb{N}`),q(`\\Nu`,`\\mathrm{N}`),q(`\\Omicron`,`\\mathrm{O}`),q(`\\plusmn`,`\\pm`),q(`\\rarr`,`\\rightarrow`),q(`\\rArr`,`\\Rightarrow`),q(`\\Rarr`,`\\Rightarrow`),q(`\\real`,`\\Re`),q(`\\reals`,`\\mathbb{R}`),q(`\\Reals`,`\\mathbb{R}`),q(`\\Rho`,`\\mathrm{P}`),q(`\\sdot`,`\\cdot`),q(`\\sect`,`\\S`),q(`\\spades`,`\\spadesuit`),q(`\\sub`,`\\subset`),q(`\\sube`,`\\subseteq`),q(`\\supe`,`\\supseteq`),q(`\\Tau`,`\\mathrm{T}`),q(`\\thetasym`,`\\vartheta`),q(`\\weierp`,`\\wp`),q(`\\Zeta`,`\\mathrm{Z}`),q(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),q(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),q(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),q(`\\bra`,`\\mathinner{\\langle{#1}|}`),q(`\\ket`,`\\mathinner{|{#1}\\rangle}`),q(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),q(`\\Bra`,`\\left\\langle#1\\right|`),q(`\\Ket`,`\\left|#1\\right\\rangle`),Vtr=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,l(!1)),i.length&&t.macros.set(`\\|`,l(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...a,...u,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}},q(`\\bra@ket`,Vtr(!1)),q(`\\bra@set`,Vtr(!0)),q(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),q(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),q(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),q(`\\angln`,`{\\angl n}`),q(`\\blue`,`\\textcolor{##6495ed}{#1}`),q(`\\orange`,`\\textcolor{##ffa500}{#1}`),q(`\\pink`,`\\textcolor{##ff00af}{#1}`),q(`\\red`,`\\textcolor{##df0030}{#1}`),q(`\\green`,`\\textcolor{##28ae7b}{#1}`),q(`\\gray`,`\\textcolor{gray}{#1}`),q(`\\purple`,`\\textcolor{##9d38bd}{#1}`),q(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),q(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),q(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),q(`\\blueD`,`\\textcolor{##11accd}{#1}`),q(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),q(`\\tealA`,`\\textcolor{##94fff5}{#1}`),q(`\\tealB`,`\\textcolor{##26edd5}{#1}`),q(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),q(`\\tealD`,`\\textcolor{##01a995}{#1}`),q(`\\tealE`,`\\textcolor{##208170}{#1}`),q(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),q(`\\greenB`,`\\textcolor{##8af281}{#1}`),q(`\\greenC`,`\\textcolor{##74cf70}{#1}`),q(`\\greenD`,`\\textcolor{##1fab54}{#1}`),q(`\\greenE`,`\\textcolor{##0d923f}{#1}`),q(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),q(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),q(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),q(`\\goldD`,`\\textcolor{##e07d10}{#1}`),q(`\\goldE`,`\\textcolor{##a75a05}{#1}`),q(`\\redA`,`\\textcolor{##fca9a9}{#1}`),q(`\\redB`,`\\textcolor{##ff8482}{#1}`),q(`\\redC`,`\\textcolor{##f9685d}{#1}`),q(`\\redD`,`\\textcolor{##e84d39}{#1}`),q(`\\redE`,`\\textcolor{##bc2612}{#1}`),q(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),q(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),q(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),q(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),q(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),q(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),q(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),q(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),q(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),q(`\\purpleE`,`\\textcolor{##543b78}{#1}`),q(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),q(`\\mintB`,`\\textcolor{##edf2df}{#1}`),q(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),q(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),q(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),q(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),q(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),q(`\\grayE`,`\\textcolor{##babec2}{#1}`),q(`\\grayF`,`\\textcolor{##888d93}{#1}`),q(`\\grayG`,`\\textcolor{##626569}{#1}`),q(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),q(`\\grayI`,`\\textcolor{##21242c}{#1}`),q(`\\kaBlue`,`\\textcolor{##314453}{#1}`),q(`\\kaGreen`,`\\textcolor{##71B307}{#1}`),Htr={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Utr=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ptr(Ftr,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Ntr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new _F(`EOF`,n.loc)),this.pushTokens(r),new _F(``,gF.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new BN(`Extra }`,i)}else if(i.text===`EOF`)throw new BN(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new BN(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;rthis.settings.maxExpand)throw new BN(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new BN(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new BN(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new BN(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new _F(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new Ntr(r,this.settings),s=[],l=o.lex();l.text!==`EOF`;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(CF,e)||Object.prototype.hasOwnProperty.call(pP.math,e)||Object.prototype.hasOwnProperty.call(pP.text,e)||Object.prototype.hasOwnProperty.call(Htr,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(CF,e)&&!CF[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},Wtr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,EF=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Gtr={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},Ktr={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},qtr=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new Utr(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new BN(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new _F(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&CF[i.text]&&CF[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r=128)this.settings.strict&&(C5n(t.charCodeAt(0))?this.mode===`math`&&PN({strict:this.settings.strict,errorCode:`unicodeTextInMathMode`,errorMsg:`Unicode text character "`+t[0]+`" used in math mode`,report:!0,token:e}):PN({strict:this.settings.strict,errorCode:`unknownSymbol`,errorMsg:`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),report:!0,token:e})),a={type:`textord`,mode:`text`,loc:gF.range(e),text:t};else return null;if(this.consume(),i)for(var l=0;l{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),dx.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}function anr(e){return[...e.cssRules].map(e=>e.cssText).join(` `)}var onr,snr,cnr,lnr,unr,dnr,fnr,pnr,mnr,hnr,gnr,_nr,vnr,ynr,OF,kF,AF,jF,bnr,xnr,Snr,Cnr,wnr,MF,Tnr,Enr,Dnr,Onr,knr,Anr,jnr,Mnr,Nnr,Pnr,Fnr,Inr,Lnr,Rnr,znr,NF,PF,Bnr,Vnr,Hnr,FF,Unr,Wnr,IF,Gnr,LF,RF,zF,BF,VF,HF,UF,Knr,qnr,Jnr,Ynr,Xnr,WF,Znr,Qnr,GF,$nr,err,trr,nrr,rrr,KF,irr,qF,arr,orr,JF,YF,XF,srr,crr,ZF,lrr,urr,drr,frr,QF,prr,mrr,hrr,grr,_rr,$F,vrr,yrr,eI,tI,brr,xrr,Srr,nI,rI,iI,Crr,aI,oI,wrr,Trr,sI,cI,lI,Err,Drr,Orr,krr,Arr,jrr,Mrr,Nrr,uI,dI,fI,pI,mI,hI,gI,Prr,Frr,_I,Irr,Lrr,Rrr,zrr,Brr,vI,yI,Vrr,Hrr,bI=o((()=>{hN(),fN(),NN(),fx(),xp(),ynr=U((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>ynr(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=ynr(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),OF=ynr,kF=`#ffffff`,AF=`#f2f2f2`,jF=U((e,t)=>t?G(e,{s:-40,l:10}):G(e,{s:-40,l:-10}),`mkBorder`),bnr=(onr=class{constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te,ne,z,re,ie,ae,oe,se,ce,le,ue;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jF(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jF(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||MN(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||MN(this.tertiaryColor),this.lineColor=this.lineColor||MN(this.background),this.arrowheadColor=this.arrowheadColor||MN(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?jN(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||jN(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||MN(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||AN(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.vertLineColor=this.vertLineColor||`navy`,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.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||jN(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||jN(this.mainBkg,10)):(this.rowOdd=this.rowOdd||AN(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||AN(this.mainBkg,5)),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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(onr,`Theme`),onr),xnr=U(e=>{let t=new bnr;return t.calculate(e),t},`getThemeVariables`),Snr=(snr=class{constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=AN(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=MN(this.background),this.secondaryBorderColor=jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jF(this.tertiaryColor,this.darkMode),this.primaryTextColor=MN(this.primaryColor),this.secondaryTextColor=MN(this.secondaryColor),this.tertiaryTextColor=MN(this.tertiaryColor),this.lineColor=MN(this.background),this.textColor=MN(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=AN(MN(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=ON(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.radius=5,this.strokeWidth=1,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.clusterBkg=`#302F3D`,this.sectionBkgColor=jN(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=jN(this.sectionBkgColor,10),this.taskBorderColor=ON(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=ON(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.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||AN(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||jN(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te,ne,z,re,ie,ae,oe,se,ce,le,ue;this.secondBkg=AN(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=AN(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=AN(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=MN(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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=G(this.primaryColor,{h:64}),this.fillType3=G(this.secondaryColor,{h:64}),this.fillType4=G(this.primaryColor,{h:-64}),this.fillType5=G(this.secondaryColor,{h:-64}),this.fillType6=G(this.primaryColor,{h:128}),this.fillType7=G(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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330});for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(snr,`Theme`),snr),Cnr=U(e=>{let t=new Snr;return t.calculate(e),t},`getThemeVariables`),wnr=(cnr=class{constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=G(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jF(this.tertiaryColor,this.darkMode),this.primaryTextColor=MN(this.primaryColor),this.secondaryTextColor=MN(this.secondaryColor),this.tertiaryTextColor=MN(this.tertiaryColor),this.lineColor=MN(this.background),this.textColor=MN(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=jF(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,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.vertLineColor=`calculated`,this.sectionBkgColor=ON(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.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te,ne,z,re,ie,ae,oe,se,ce,le,ue;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||jN(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||jN(this.tertiaryColor,40);for(let e=0;e{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(cnr,`Theme`),cnr),MF=U(e=>{let t=new wnr;return t.calculate(e),t},`getThemeVariables`),Tnr=(lnr=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=AN(`#cde498`,10),this.primaryBorderColor=jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jF(this.tertiaryColor,this.darkMode),this.primaryTextColor=MN(this.primaryColor),this.secondaryTextColor=MN(this.secondaryColor),this.tertiaryTextColor=MN(this.primaryColor),this.lineColor=MN(this.background),this.textColor=MN(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te,ne,z,re,ie,ae,oe,se,ce,le,ue;this.actorBorder=jN(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||jN(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||jN(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(lnr,`Theme`),lnr),Enr=U(e=>{let t=new Tnr;return t.calculate(e),t},`getThemeVariables`),Dnr=(unr=class{constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=AN(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jF(this.tertiaryColor,this.darkMode),this.primaryTextColor=MN(this.primaryColor),this.secondaryTextColor=MN(this.secondaryColor),this.tertiaryTextColor=MN(this.tertiaryColor),this.lineColor=MN(this.background),this.textColor=MN(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.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||AN(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te,ne,z,re,ie,ae,oe,se,ce,le,ue;this.secondBkg=AN(this.contrast,55),this.border2=this.contrast,this.actorBorder=AN(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(unr,`Theme`),unr),Onr=U(e=>{let t=new Dnr;return t.calculate(e),t},`getThemeVariables`),knr=(dnr=class{constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=jF(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jF(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jF(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||MN(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||MN(this.tertiaryColor),this.lineColor=this.lineColor||MN(this.background),this.arrowheadColor=this.arrowheadColor||MN(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?jN(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||jN(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||MN(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let p=`#ECECFE`,m=`#E9E9F1`,h=G(p,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||h,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||m,this.sectionBkgColor2=this.sectionBkgColor2||p,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||p,this.activeTaskBorderColor=this.activeTaskBorderColor||p,this.activeTaskBkgColor=this.activeTaskBkgColor||AN(p,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||`#f0f0f0`,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||p,this.cScale1=this.cScale1||m,this.cScale2=this.cScale2||h,this.cScale3=this.cScale3||G(p,{h:30}),this.cScale4=this.cScale4||G(p,{h:60}),this.cScale5=this.cScale5||G(p,{h:90}),this.cScale6=this.cScale6||G(p,{h:120}),this.cScale7=this.cScale7||G(p,{h:150}),this.cScale8=this.cScale8||G(p,{h:210,l:150}),this.cScale9=this.cScale9||G(p,{h:270}),this.cScale10=this.cScale10||G(p,{h:300}),this.cScale11=this.cScale11||G(p,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(dnr,`Theme`),dnr),Anr=U(e=>{let t=new knr;return t.calculate(e),t},`getThemeVariables`),jnr=(fnr=class{constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=AN(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=MN(this.background),this.secondaryBorderColor=jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jF(this.tertiaryColor,this.darkMode),this.primaryTextColor=MN(this.primaryColor),this.secondaryTextColor=MN(this.secondaryColor),this.tertiaryTextColor=MN(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=AN(MN(`#323D47`),10),this.border1=`#ccc`,this.border2=ON(255,255,255,.25),this.arrowheadColor=MN(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jF(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jF(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||MN(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||MN(this.tertiaryColor),this.lineColor=this.lineColor||MN(this.background),this.arrowheadColor=this.arrowheadColor||MN(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.border1,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?jN(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||jN(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||MN(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||AN(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||`#f0f0f0`,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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(fnr,`Theme`),fnr),Mnr=U(e=>{let t=new jnr;return t.calculate(e),t},`getThemeVariables`),Nnr=(pnr=class{constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=jF(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jF(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jF(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||MN(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||MN(this.tertiaryColor),this.lineColor=this.lineColor||MN(this.background),this.arrowheadColor=this.arrowheadColor||MN(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?jN(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||jN(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||MN(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let p=`#ECECFE`,m=`#E9E9F1`,h=G(p,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||h,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||m,this.sectionBkgColor2=this.sectionBkgColor2||p,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||p,this.activeTaskBorderColor=this.activeTaskBorderColor||p,this.activeTaskBkgColor=this.activeTaskBkgColor||AN(p,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(pnr,`Theme`),pnr),Pnr=U(e=>{let t=new Nnr;return t.calculate(e),t},`getThemeVariables`),Fnr=(mnr=class{constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=AN(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=MN(this.background),this.secondaryBorderColor=jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jF(this.tertiaryColor,this.darkMode),this.primaryTextColor=MN(this.primaryColor),this.secondaryTextColor=MN(this.secondaryColor),this.tertiaryTextColor=MN(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=AN(MN(`#323D47`),10),this.border1=`#ccc`,this.border2=ON(255,255,255,.25),this.arrowheadColor=MN(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jF(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jF(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||MN(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||MN(this.tertiaryColor),this.lineColor=this.lineColor||MN(this.background),this.arrowheadColor=this.arrowheadColor||MN(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.border1,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?jN(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||jN(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||MN(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||AN(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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.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||G(this.primaryColor,{h:30}),this.cScale4=this.cScale4||G(this.primaryColor,{h:60}),this.cScale5=this.cScale5||G(this.primaryColor,{h:90}),this.cScale6=this.cScale6||G(this.primaryColor,{h:120}),this.cScale7=this.cScale7||G(this.primaryColor,{h:150}),this.cScale8=this.cScale8||G(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||G(this.primaryColor,{h:270}),this.cScale10=this.cScale10||G(this.primaryColor,{h:300}),this.cScale11=this.cScale11||G(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(mnr,`Theme`),mnr),Inr=U(e=>{let t=new Fnr;return t.calculate(e),t},`getThemeVariables`),Lnr=(hnr=class{constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=jF(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jF(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jF(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||MN(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||MN(this.tertiaryColor),this.lineColor=this.lineColor||MN(this.background),this.arrowheadColor=this.arrowheadColor||MN(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?jN(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||jN(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||MN(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let p=`#ECECFE`,m=`#E9E9F1`,h=G(p,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||h,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||m,this.sectionBkgColor2=this.sectionBkgColor2||p,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||p,this.activeTaskBorderColor=this.activeTaskBorderColor||p,this.activeTaskBkgColor=this.activeTaskBkgColor||AN(p,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||`#f0f0f0`,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||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(hnr,`Theme`),hnr),Rnr=U(e=>{let t=new Lnr;return t.calculate(e),t},`getThemeVariables`),znr=(gnr=class{constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=AN(this.primaryColor,16),this.tertiaryColor=G(this.primaryColor,{h:-160}),this.primaryBorderColor=MN(this.background),this.secondaryBorderColor=jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jF(this.tertiaryColor,this.darkMode),this.primaryTextColor=MN(this.primaryColor),this.secondaryTextColor=MN(this.secondaryColor),this.tertiaryTextColor=MN(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=AN(MN(`#323D47`),10),this.border1=`#ccc`,this.border2=ON(255,255,255,.25),this.arrowheadColor=MN(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){var e,t,n,r,i,a,o,s,l,u,d,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||G(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||G(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jF(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jF(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jF(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jF(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||MN(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||MN(this.tertiaryColor),this.lineColor=this.lineColor||MN(this.background),this.arrowheadColor=this.arrowheadColor||MN(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.border1,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?jN(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||jN(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||MN(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,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||AN(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||`#f0f0f0`,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||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},U(gnr,`Theme`),gnr),NF={base:{getThemeVariables:xnr},dark:{getThemeVariables:Cnr},default:{getThemeVariables:MF},forest:{getThemeVariables:Enr},neutral:{getThemeVariables:Onr},neo:{getThemeVariables:Anr},"neo-dark":{getThemeVariables:Mnr},redux:{getThemeVariables:Pnr},"redux-dark":{getThemeVariables:Inr},"redux-color":{getThemeVariables:Rnr},"redux-dark-color":{getThemeVariables:U(e=>{let t=new znr;return t.calculate(e),t},`getThemeVariables`)}},PF={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},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,maxLabelWidth:360,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`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},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,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Bnr={...PF,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:NF.default.getThemeVariables(),sequence:{...PF.sequence,messageFont:U(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:U(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:U(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...PF.gantt,tickInterval:void 0,useWidth:void 0},c4:{...PF.c4,useWidth:void 0,personFont:U(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...PF.flowchart,inheritDir:!1},external_personFont:U(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:U(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:U(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:U(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:U(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:U(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:U(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:U(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:U(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:U(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:U(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:U(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:U(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:U(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:U(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:U(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:U(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:U(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:U(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:U(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:U(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...PF.pie,useWidth:984},xyChart:{...PF.xyChart,useWidth:void 0},requirement:{...PF.requirement,useWidth:void 0},packet:{...PF.packet},eventmodeling:{...PF.eventmodeling},treeView:{...PF.treeView,useWidth:void 0},radar:{...PF.radar},railroad:{...PF.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...PF.ishikawa},sankey:{...PF.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...PF.venn},cynefin:{...PF.cynefin}},Vnr=U((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...Vnr(e[r],``)]:[...n,t+r],[]),`keyify`),Hnr=new Set(Vnr(Bnr,``)),FF=Bnr,Unr={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Wnr=U((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(W.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),IF=U(e=>{if(W.debug(`sanitizeDirective called with`,e),typeof e==`object`&&e){if(Array.isArray(e))e.forEach(e=>IF(e));else{for(let t of Object.keys(e))if(W.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!Hnr.has(t)||e[t]==null)W.debug(`sanitize deleting key: `,t),delete e[t];else if(typeof e[t]==`object`){let n=Unr[t];n?Wnr(e[t],n):(W.debug(`sanitizing object`,t),IF(e[t]))}else for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(W.debug(`sanitizing css option`,t),e[t]=Gnr(e[t]));if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n!=null&&n.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}W.debug(`After sanitization`,e)}}},`sanitizeDirective`),Gnr=U(e=>{let t=0,n=0;for(let r of e){if(t!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),zF=OF({},LF),VF=[],HF=OF({},LF),UF=U((e,t)=>{let n=OF({},e),r={};for(let e of t)Znr(e),r=OF(r,e);if(n=OF(n,r),r.theme&&r.theme in NF){let e=OF(OF({},BF).themeVariables||{},r.themeVariables);n.theme&&n.theme in NF&&(n.themeVariables=NF[n.theme].getThemeVariables(e))}return HF=n,nrr(HF),HF},`updateCurrentConfig`),Knr=U(e=>(zF=OF({},LF),zF=OF(zF,e),e.theme&&NF[e.theme]&&(zF.themeVariables=NF[e.theme].getThemeVariables(e.themeVariables)),UF(zF,VF),zF),`setSiteConfig`),qnr=U(e=>{BF=OF({},e)},`saveConfigFromInitialize`),Jnr=U(e=>(zF=OF(zF,e),UF(zF,VF),zF),`updateSiteConfig`),Ynr=U(()=>OF({},zF),`getSiteConfig`),Xnr=U(e=>(UF(HF,[e]),WF()),`setConfig`),WF=U(()=>OF({},HF),`getConfig`),Znr=U(e=>{e&&([`secure`,...zF.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(W.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&Znr(e[t])}))},`sanitize`),Qnr=U(e=>{var t;IF(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),VF.push(e),UF(zF,VF)},`addDirective`),GF=U((e=zF)=>{VF=[],UF(e,VF)},`reset`),$nr={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},err={},trr=U(e=>{err[e]||(W.warn($nr[e]),err[e]=!0)},`issueWarning`),nrr=U(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&trr(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),rrr=U(()=>{let e={};BF&&(e=OF(e,BF));for(let t of VF)e=OF(e,t);return e},`getUserDefinedConfig`),KF=U(e=>{var t,n;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&trr(`FLOWCHART_HTML_LABELS_DEPRECATED`),RF(e.htmlLabels??((n=e.flowchart)==null?void 0:n.htmlLabels)??!0)},`getEffectiveHtmlLabels`),irr=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,qF=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,arr=/\s*%%.*\n/gm,orr=(_nr=class extends Error{constructor(e){super(e),this.name=`UnknownDiagramError`}},U(_nr,`UnknownDiagramError`),_nr),JF={},YF=U(function(e,t){e=e.replace(irr,``).replace(qF,``).replace(arr,` `);for(let[n,{detector:r}]of Object.entries(JF))if(r(e,t))return n;throw new orr(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),XF=U((...e)=>{for(let{id:t,detector:n,loader:r}of e)srr(t,n,r)},`registerLazyLoadedDiagrams`),srr=U((e,t,n)=>{JF[e]&&W.warn(`Detector with key ${e} already exists. Overwriting.`),JF[e]={detector:t,loader:n},W.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),crr=U(e=>JF[e].loader,`getDiagramLoader`),ZF=//gi,lrr=U(e=>e?_rr(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),urr=(()=>{let e=!1;return()=>{e||(inr(),e=!0)}})(),U(inr,`setupDompurifyHooks`),drr=U(e=>(urr(),dx.sanitize(e)),`removeScript`),frr=U((e,t)=>{if(KF(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=drr(e):n!==`loose`&&(e=_rr(e),e=e.replace(//g,`>`),e=e.replace(/=/g,`=`),e=grr(e))}return e},`sanitizeMore`),QF=U((e,t)=>e&&(e=t.dompurifyConfig?dx.sanitize(frr(e,t),t.dompurifyConfig).toString():dx.sanitize(frr(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),prr=U((e,t)=>typeof e==`string`?QF(e,t):e.flat().map(e=>QF(e,t)),`sanitizeTextOrArray`),mrr=U(e=>ZF.test(e),`hasBreaks`),hrr=U(e=>e.split(ZF),`splitBreaks`),grr=U(e=>e.replace(/#br#/g,`
`),`placeholderToBreak`),_rr=U(e=>e.replace(ZF,`#br#`),`breakToPlaceholder`),$F=U(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),vrr=U(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),yrr=U(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),eI=U(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e0&&e+1Math.max(0,e.split(t).length-1),`countOccurrence`),brr=U((e,t)=>{let n=tI(e,`~`),r=tI(t,`~`);return n===1&&r===1},`shouldCombineSets`),xrr=U(e=>{let t=tI(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),Srr=U(()=>window.MathMLElement!==void 0,`isMathMLSupported`),nI=/\$\$(.*?)\$\$/g,rI=U(e=>{var t;return(((t=e.match(nI))==null?void 0:t.length)??0)>0},`hasKatex`),iI=U(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await aI(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`;let r=document.querySelector(`body`);r==null||r.insertAdjacentElement(`beforeend`,n);let i={width:n.clientWidth,height:n.clientHeight};return n.remove(),i},`calculateMathMLDimensions`),Crr=U(async(e,t)=>{if(!rI(e))return e;if(!(Srr()||t.legacyMathML||t.forceLegacyMathML))return e.replace(nI,`MathML is unsupported in this environment.`);{let{default:n}=await bp(async()=>{let{default:e}=await Promise.resolve().then(()=>(rnr(),v5n));return{default:e}},void 0,import.meta.url),r=t.forceLegacyMathML||!Srr()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(ZF).map(e=>rI(e)?`
${e}
`:`
${e}
`).join(``).replace(nI,(e,t)=>n.renderToString(t,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g,` `).replace(//g,``))}},`renderKatexUnsanitized`),aI=U(async(e,t)=>QF(await Crr(e,t),t),`renderKatexSanitized`),oI={getRows:lrr,sanitizeText:QF,sanitizeTextOrArray:prr,hasBreaks:mrr,splitBreaks:hrr,lineBreakRegex:ZF,removeScript:drr,getUrl:$F,evaluate:RF,getMax:vrr,getMin:yrr},wrr=U(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),Trr=U(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),sI=U(function(e,t,n,r){wrr(e,Trr(t,n,r))},`configureSvgSize`),cI=U(function(e,t,n,r){let i=t.node().getBBox(),a=i.width,o=i.height;W.info(`SVG bounds: ${a}x${o}`,i);let s=0,l=0;W.info(`Graph bounds: ${s}x${l}`,e),s=a+n*2,l=o+n*2,W.info(`Calculated bounds: ${s}x${l}`),sI(t,l,s,r);let u=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr(`viewBox`,u)},`setupGraphViewbox`),lI={},U(anr,`cssStyleSheetToString`),Err=U((e,t,n,r)=>{let i=``;return e in lI&&lI[e]?i=lI[e]({...n,svgId:r}):W.warn(`No theme found for ${e}`),`& { font-family: ${n.fontFamily}; font-size: ${n.fontSize}; fill: ${n.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${n.errorBkgColor}; } & .error-text { fill: ${n.errorTextColor}; stroke: ${n.errorTextColor}; } & .edge-thickness-normal { stroke-width: ${n.strokeWidth??1}px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${n.lineColor}; stroke: ${n.lineColor}; } & .marker.cross { stroke: ${n.lineColor}; } & svg { font-family: ${n.fontFamily}; font-size: ${n.fontSize}; } & p { margin: 0 } ${i} .node .neo-node { stroke: ${n.nodeBorder}; } [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; } [data-look="neo"].swimlane.cluster rect { filter: none; } [data-look="neo"].node path { stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; stroke-width: ${n.strokeWidth??1}px; } [data-look="neo"].node .outer-path { filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; } [data-look="neo"].node .neo-line path { stroke: ${n.nodeBorder}; filter: none; } [data-look="neo"].node circle{ stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; } [data-look="neo"].node circle .state-start{ fill: #000000; } [data-look="neo"].icon-shape .icon { fill: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; } [data-look="neo"].icon-shape .icon-neo path { stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; } ${t} `},`getStyles`),Drr=U((e,t)=>{t!==void 0&&(lI[e]=t)},`addStylesForDiagram`),Orr=Err,krr={},dN(krr,{clear:()=>uI,getAccDescription:()=>mI,getAccTitle:()=>fI,getDiagramTitle:()=>gI,setAccDescription:()=>pI,setAccTitle:()=>dI,setDiagramTitle:()=>hI}),Arr=``,jrr=``,Mrr=``,Nrr=U(e=>QF(e,WF()),`sanitizeText`),uI=U(()=>{Arr=``,Mrr=``,jrr=``},`clear`),dI=U(e=>{Arr=Nrr(e).replace(/^\s+/g,``)},`setAccTitle`),fI=U(()=>Arr,`getAccTitle`),pI=U(e=>{Mrr=Nrr(e).replace(/\n\s+/g,` `)},`setAccDescription`),mI=U(()=>Mrr,`getAccDescription`),hI=U(e=>{jrr=Nrr(e)},`setDiagramTitle`),gI=U(()=>jrr,`getDiagramTitle`),Prr=W,Frr=F8n,_I=WF,Irr=Xnr,Lrr=LF,Rrr=U(e=>QF(e,_I()),`sanitizeText`),zrr=cI,Brr=U(()=>krr,`getCommonDb`),vI={},yI=U((e,t,n)=>{var r;vI[e]&&Prr.warn(`Diagram with id ${e} already registered. Overwriting.`),vI[e]=t,n&&srr(e,n),Drr(e,t.styles),(r=t.injectUtils)==null||r.call(t,Prr,Frr,_I,Rrr,zrr,Brr(),()=>{})},`registerDiagram`),Vrr=U(e=>{if(e in vI)return vI[e];throw new Hrr(e)},`getDiagram`),Hrr=(vnr=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},U(vnr,`DiagramNotFoundError`),vnr)}));function Urr(e){return e}var Wrr=o((()=>{}));function Grr(e){return`translate(`+e+`,0)`}function Krr(e){return`translate(0,`+e+`)`}function qrr(e){return t=>+e(t)}function Jrr(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Yrr(){return!this.__axis}function Xrr(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,l=typeof window<`u`&&window.devicePixelRatio>1?0:.5,u=e===xI||e===SI?-1:1,d=e===SI||e===$rr?`x`:`y`,f=e===xI||e===eir?Grr:Krr;function p(p){var m=r??(t.ticks?t.ticks.apply(t,n):t.domain()),h=i??(t.tickFormat?t.tickFormat.apply(t,n):Urr),g=Math.max(a,0)+s,_=t.range(),v=+_[0]+l,y=+_[_.length-1]+l,b=(t.bandwidth?Jrr:qrr)(t.copy(),l),x=p.selection?p.selection():p,S=x.selectAll(`.domain`).data([null]),C=x.selectAll(`.tick`).data(m,t).order(),w=C.exit(),T=C.enter().append(`g`).attr(`class`,`tick`),E=C.select(`line`),D=C.select(`text`);S=S.merge(S.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),C=C.merge(T),E=E.merge(T.append(`line`).attr(`stroke`,`currentColor`).attr(d+`2`,u*a)),D=D.merge(T.append(`text`).attr(`fill`,`currentColor`).attr(d,u*g).attr(`dy`,e===xI?`0em`:e===eir?`0.71em`:`0.32em`)),p!==x&&(S=S.transition(p),C=C.transition(p),E=E.transition(p),D=D.transition(p),w=w.transition(p).attr(`opacity`,tir).attr(`transform`,function(e){return isFinite(e=b(e))?f(e+l):this.getAttribute(`transform`)}),T.attr(`opacity`,tir).attr(`transform`,function(e){var t=this.parentNode.__axis;return f((t&&isFinite(t=t(e))?t:b(e))+l)})),w.remove(),S.attr(`d`,e===SI||e===$rr?o?`M`+u*o+`,`+v+`H`+l+`V`+y+`H`+u*o:`M`+l+`,`+v+`V`+y:o?`M`+v+`,`+u*o+`V`+l+`H`+y+`V`+u*o:`M`+v+`,`+l+`H`+y),C.attr(`opacity`,1).attr(`transform`,function(e){return f(b(e)+l)}),E.attr(d+`2`,u*a),D.attr(d,u*g).text(h),x.filter(Yrr).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===$rr?`start`:e===SI?`end`:`middle`),x.each(function(){this.__axis=b})}return p.scale=function(e){return arguments.length?(t=e,p):t},p.ticks=function(){return n=Array.from(arguments),p},p.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),p):n.slice()},p.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),p):r&&r.slice()},p.tickFormat=function(e){return arguments.length?(i=e,p):i},p.tickSize=function(e){return arguments.length?(a=o=+e,p):a},p.tickSizeInner=function(e){return arguments.length?(a=+e,p):a},p.tickSizeOuter=function(e){return arguments.length?(o=+e,p):o},p.tickPadding=function(e){return arguments.length?(s=+e,p):s},p.offset=function(e){return arguments.length?(l=+e,p):l},p}function Zrr(e){return Xrr(xI,e)}function Qrr(e){return Xrr(eir,e)}var xI,$rr,eir,SI,tir,nir=o((()=>{Wrr(),xI=1,$rr=2,eir=3,SI=4,tir=1e-6})),rir=o((()=>{nir()}));function iir(){for(var e=0,t=arguments.length,n={},r;e=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}function sir(e,t){for(var n=0,r=e.length,i;n{lir={value:()=>{}},air.prototype=iir.prototype={constructor:air,on:function(e,t){var n=this._,r=oir(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var n=Array(i),r=0,i,a;r{uir()})),fir,pir,mir=o((()=>{fir=`http://www.w3.org/1999/xhtml`,pir={svg:`http://www.w3.org/2000/svg`,xhtml:fir,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`}}));function hir(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),pir.hasOwnProperty(t)?{space:pir[t],local:e}:e}var gir=o((()=>{mir()}));function _ir(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function vir(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function yir(e){var t=hir(e);return(t.local?vir:_ir)(t)}var bir=o((()=>{gir(),mir()}));function xir(){}function Sir(e){return e==null?xir:function(){return this.querySelector(e)}}var Cir=o((()=>{}));function wir(e){typeof e!=`function`&&(e=Sir(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i{EI(),Cir()}));function Eir(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var Dir=o((()=>{}));function Oir(){return[]}function kir(e){return e==null?Oir:function(){return this.querySelectorAll(e)}}var Air=o((()=>{}));function jir(e){return function(){return Eir(e.apply(this,arguments))}}function Mir(e){e=typeof e==`function`?jir(e):kir(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a{EI(),Dir(),Air()}));function Pir(e){return function(){return this.matches(e)}}function Fir(e){return function(t){return t.matches(e)}}var Iir=o((()=>{}));function Lir(e){return function(){return Bir.call(this.children,e)}}function Rir(){return this.firstElementChild}function zir(e){return this.select(e==null?Rir:Lir(typeof e==`function`?e:Fir(e)))}var Bir,Vir=o((()=>{Iir(),Bir=Array.prototype.find}));function Hir(){return Array.from(this.children)}function Uir(e){return function(){return Gir.call(this.children,e)}}function Wir(e){return this.selectAll(e==null?Hir:Uir(typeof e==`function`?e:Fir(e)))}var Gir,Kir=o((()=>{Iir(),Gir=Array.prototype.filter}));function qir(e){typeof e!=`function`&&(e=Pir(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i{EI(),Iir()}));function Yir(e){return Array(e.length)}var Xir=o((()=>{}));function Zir(){return new wI(this._enter||this._groups.map(Yir),this._parents)}function Qir(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var $ir=o((()=>{Xir(),EI(),Qir.prototype={constructor:Qir,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}}));function ear(e){return function(){return e}}var tar=o((()=>{}));function nar(e,t,n,r,i,a){for(var o=0,s,l=t.length,u=a.length;o=y&&(y=v+1);!(x=_[y])&&++y{EI(),$ir(),tar()}));function car(){return new wI(this._exit||this._groups.map(Yir),this._parents)}var lar=o((()=>{Xir(),EI()}));function uar(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&(r=r.selection())):r=r.append(e+``),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}var dar=o((()=>{}));function far(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),l=0;l{EI()}));function mar(){for(var e=this._groups,t=-1,n=e.length;++t=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}var har=o((()=>{}));function gar(e){e||(e=_ar);function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;at?1:e>=t?0:NaN}var yar=o((()=>{EI()}));function bar(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var xar=o((()=>{}));function Sar(){return Array.from(this)}var Car=o((()=>{}));function war(){for(var e=this._groups,t=0,n=e.length;t{}));function Ear(){let e=0;for(let t of this)++e;return e}var Dar=o((()=>{}));function Oar(){return!this.node()}var kar=o((()=>{}));function Aar(e){for(var t=this._groups,n=0,r=t.length;n{}));function Mar(e){return function(){this.removeAttribute(e)}}function Nar(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Par(e,t){return function(){this.setAttribute(e,t)}}function Far(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Iar(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Lar(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Rar(e,t){var n=hir(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Nar:Mar:typeof t==`function`?n.local?Lar:Iar:n.local?Far:Par)(n,t))}var zar=o((()=>{gir()}));function Bar(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Var=o((()=>{}));function Har(e){return function(){this.style.removeProperty(e)}}function Uar(e,t,n){return function(){this.style.setProperty(e,t,n)}}function War(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Gar(e,t,n){return arguments.length>1?this.each((t==null?Har:typeof t==`function`?War:Uar)(e,t,n??``)):CI(this.node(),e)}function CI(e,t){return e.style.getPropertyValue(t)||Bar(e).getComputedStyle(e,null).getPropertyValue(t)}var Kar=o((()=>{Var()}));function qar(e){return function(){delete this[e]}}function Jar(e,t){return function(){this[e]=t}}function Yar(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Xar(e,t){return arguments.length>1?this.each((t==null?qar:typeof t==`function`?Yar:Jar)(e,t)):this.node()[e]}var Zar=o((()=>{}));function Qar(e){return e.trim().split(/^|\s+/)}function $ar(e){return e.classList||new eor(e)}function eor(e){this._node=e,this._names=Qar(e.getAttribute(`class`)||``)}function tor(e,t){for(var n=$ar(e),r=-1,i=t.length;++r{eor.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}}}));function cor(){this.textContent=``}function lor(e){return function(){this.textContent=e}}function uor(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function dor(e){return arguments.length?this.each(e==null?cor:(typeof e==`function`?uor:lor)(e)):this.node().textContent}var por=o((()=>{}));function mor(){this.innerHTML=``}function hor(e){return function(){this.innerHTML=e}}function gor(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function _or(e){return arguments.length?this.each(e==null?mor:(typeof e==`function`?gor:hor)(e)):this.node().innerHTML}var vor=o((()=>{}));function yor(){this.nextSibling&&this.parentNode.appendChild(this)}function bor(){return this.each(yor)}var xor=o((()=>{}));function Sor(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Cor(){return this.each(Sor)}var wor=o((()=>{}));function Tor(e){var t=typeof e==`function`?e:yir(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var Eor=o((()=>{bir()}));function Dor(){return null}function Oor(e,t){var n=typeof e==`function`?e:yir(e),r=t==null?Dor:typeof t==`function`?t:Sir(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}var kor=o((()=>{bir(),Cir()}));function Aor(){var e=this.parentNode;e&&e.removeChild(this)}function jor(){return this.each(Aor)}var Mor=o((()=>{}));function Nor(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Por(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function For(e){return this.select(e?Por:Nor)}var Ior=o((()=>{}));function Lor(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}var Ror=o((()=>{}));function zor(e){return function(t){e.call(this,t,this.__data__)}}function Bor(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Vor(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n{}));function Gor(e,t,n){var r=Bar(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Kor(e,t){return function(){return Gor(this,e,t)}}function qor(e,t){return function(){return Gor(this,e,t.apply(this,arguments))}}function Jor(e,t){return this.each((typeof t==`function`?qor:Kor)(e,t))}var Yor=o((()=>{Var()}));function*Xor(){for(var e=this._groups,t=0,n=e.length;t{}));function wI(e,t){this._groups=e,this._parents=t}function TI(){return new wI([[document.documentElement]],$or)}function Qor(){return this}var $or,EI=o((()=>{Tir(),Nir(),Vir(),Kir(),Jir(),sar(),$ir(),lar(),dar(),par(),har(),yar(),xar(),Car(),Tar(),Dar(),kar(),jar(),zar(),Kar(),Zar(),sor(),por(),vor(),xor(),wor(),Eor(),kor(),Mor(),Ior(),Ror(),Wor(),Yor(),Zor(),$or=[null],wI.prototype=TI.prototype={constructor:wI,select:wir,selectAll:Mir,selectChild:zir,selectChildren:Wir,filter:qir,data:aar,enter:Zir,exit:car,join:uar,merge:far,selection:Qor,order:mar,sort:gar,call:bar,nodes:Sar,node:war,size:Ear,empty:Oar,each:Aar,attr:Rar,style:Gar,property:Xar,classed:oor,text:dor,html:_or,raise:bor,lower:Cor,append:Tor,insert:Oor,remove:jor,clone:For,datum:Lor,on:Uor,dispatch:Jor,[Symbol.iterator]:Xor}}));function DI(e){return typeof e==`string`?new wI([[document.querySelector(e)]],[document.documentElement]):new wI([[e]],$or)}var esr=o((()=>{EI()})),OI=o((()=>{bir(),esr(),Iir(),gir(),mir(),Dir(),EI(),Cir(),Air(),Kar(),Var()})),tsr=o((()=>{dir(),OI()}));function nsr(){return PI||(psr(rsr),PI=II.now()+FI)}function rsr(){PI=0}function isr(){this._call=this._time=this._next=null}function asr(e,t,n){var r=new isr;return r.restart(e,t,n),r}function osr(){nsr(),++kI;for(var e=fsr,t;e;)(t=PI-e._time)>=0&&e._call.call(void 0,t),e=e._next;--kI}function ssr(){PI=(NI=II.now())+FI,kI=AI=0;try{osr()}finally{kI=0,lsr(),PI=0}}function csr(){var e=II.now(),t=e-NI;t>dsr&&(FI-=t,NI=e)}function lsr(){for(var e,t=fsr,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:fsr=n);MI=e,usr(r)}function usr(e){kI||(AI&&(AI=clearTimeout(AI)),e-PI>24?(e<1/0&&(AI=setTimeout(ssr,e-II.now()-FI)),jI&&(jI=clearInterval(jI))):(jI||(NI=II.now(),jI=setInterval(csr,dsr)),kI=1,psr(ssr)))}var kI,AI,jI,dsr,fsr,MI,NI,PI,FI,II,psr,msr=o((()=>{kI=0,AI=0,jI=0,dsr=1e3,NI=0,PI=0,FI=0,II=typeof performance==`object`&&performance.now?performance:Date,psr=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},isr.prototype=asr.prototype={constructor:isr,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?nsr():+n)+(t==null?0:+t),!this._next&&MI!==this&&(MI?MI._next=this:fsr=this,MI=this),this._call=e,this._time=n,usr()},stop:function(){this._call&&(this._call=null,this._time=1/0,usr())}}}));function hsr(e,t,n){var r=new isr;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var gsr=o((()=>{msr()})),LI=o((()=>{msr(),gsr()}));function RI(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;vsr(e,n,{name:t,index:r,group:i,on:ysr,tween:bsr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function _sr(e,t){var n=BI(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function zI(e,t){var n=BI(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function BI(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function vsr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=asr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var u,d,f,p;if(n.state!==1)return l();for(u in r)if(p=r[u],p.name===n.name){if(p.state===3)return hsr(o);p.state===4?(p.state=6,p.timer.stop(),p.on.call(`interrupt`,e,e.__data__,p.index,p.group),delete r[u]):+u{dir(),LI(),ysr=iir(`start`,`end`,`cancel`,`interrupt`),bsr=[]}));function xsr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n)(r=n[o]).name===t?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]):a=!1;a&&delete e.__transition}}var Ssr=o((()=>{VI()}));function Csr(e){return this.each(function(){xsr(this,e)})}var wsr=o((()=>{Ssr()}));function Tsr(e,t){var n,r;return function(){var i=zI(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o{VI()}));function ksr(e,t){var n;return(typeof t==`number`?rE:t instanceof IT?nE:(n=IT(t))?(t=n,nE):Lmn)(e,t)}var Asr=o((()=>{$T(),uE()}));function jsr(e){return function(){this.removeAttribute(e)}}function Msr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Nsr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Psr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Fsr(e,t,n){var r,i,a;return function(){var o,s=n(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+``,o===l?null:o===r&&l===i?a:(i=l,a=t(r=o,s)))}}function Isr(e,t,n){var r,i,a;return function(){var o,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+``,o===l?null:o===r&&l===i?a:(i=l,a=t(r=o,s)))}}function Lsr(e,t){var n=hir(e),r=n===`transform`?Xmn:ksr;return this.attrTween(e,typeof t==`function`?(n.local?Isr:Fsr)(n,r,Osr(this,`attr.`+e,t)):t==null?(n.local?Msr:jsr)(n):(n.local?Psr:Nsr)(n,r,t))}var Rsr=o((()=>{uE(),OI(),HI(),Asr()}));function zsr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Bsr(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Vsr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Bsr(e,i)),n}return i._value=t,i}function Hsr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&zsr(e,i)),n}return i._value=t,i}function Usr(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=hir(e);return this.tween(n,(r.local?Vsr:Hsr)(r,t))}var Wsr=o((()=>{OI()}));function Gsr(e,t){return function(){_sr(this,e).delay=+t.apply(this,arguments)}}function Ksr(e,t){return t=+t,function(){_sr(this,e).delay=t}}function qsr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Gsr:Ksr)(t,e)):BI(this.node(),t).delay}var Jsr=o((()=>{VI()}));function Ysr(e,t){return function(){zI(this,e).duration=+t.apply(this,arguments)}}function Xsr(e,t){return t=+t,function(){zI(this,e).duration=t}}function Zsr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Ysr:Xsr)(t,e)):BI(this.node(),t).duration}var Qsr=o((()=>{VI()}));function $sr(e,t){if(typeof t!=`function`)throw Error();return function(){zI(this,e).ease=t}}function ecr(e){var t=this._id;return arguments.length?this.each($sr(t,e)):BI(this.node(),t).ease}var tcr=o((()=>{VI()}));function ncr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();zI(this,e).ease=n}}function rcr(e){if(typeof e!=`function`)throw Error();return this.each(ncr(this._id,e))}var icr=o((()=>{VI()}));function acr(e){typeof e!=`function`&&(e=Pir(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i{OI(),GI()}));function scr(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s{GI()}));function lcr(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function ucr(e,t,n){var r,i,a=lcr(t)?_sr:zI;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function dcr(e,t){var n=this._id;return arguments.length<2?BI(this.node(),n).on.on(e):this.each(ucr(n,e,t))}var fcr=o((()=>{VI()}));function pcr(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function mcr(){return this.on(`end.remove`,pcr(this._id))}var hcr=o((()=>{}));function gcr(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Sir(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o{OI(),GI(),VI()}));function vcr(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=kir(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s{OI(),GI(),VI()}));function bcr(){return new xcr(this._groups,this._parents)}var xcr,Scr=o((()=>{OI(),xcr=TI.prototype.constructor}));function Ccr(e,t){var n,r,i;return function(){var a=CI(this,e),o=(this.style.removeProperty(e),CI(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function wcr(e){return function(){this.style.removeProperty(e)}}function Tcr(e,t,n){var r,i=n+``,a;return function(){var o=CI(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ecr(e,t,n){var r,i,a;return function(){var o=CI(this,e),s=n(this),l=s+``;return s??(l=s=(this.style.removeProperty(e),CI(this,e))),o===l?null:o===r&&l===i?a:(i=l,a=t(r=o,s))}}function Dcr(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var l=zI(this,e),u=l.on,d=l.value[a]==null?s||(s=wcr(t)):void 0;(u!==n||i!==d)&&(r=(n=u).copy()).on(o,i=d),l.on=r}}function Ocr(e,t,n){var r=(e+=``)==`transform`?Ymn:ksr;return t==null?this.styleTween(e,Ccr(e,r)).on(`end.style.`+e,wcr(e)):typeof t==`function`?this.styleTween(e,Ecr(e,r,Osr(this,`style.`+e,t))).each(Dcr(this._id,e)):this.styleTween(e,Tcr(e,r,t),n).on(`end.style.`+e,null)}var kcr=o((()=>{uE(),OI(),VI(),HI(),Asr()}));function Acr(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function jcr(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Acr(e,a,n)),r}return a._value=t,a}function Mcr(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,jcr(e,t,n??``))}var Ncr=o((()=>{}));function Pcr(e){return function(){this.textContent=e}}function Fcr(e){return function(){var t=e(this);this.textContent=t??``}}function Icr(e){return this.tween(`text`,typeof e==`function`?Fcr(Osr(this,`text`,e)):Pcr(e==null?``:e+``))}var Lcr=o((()=>{HI()}));function Rcr(e){return function(t){this.textContent=e.call(this,t)}}function zcr(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Rcr(r)),t}return r._value=e,r}function Bcr(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,zcr(e))}var Vcr=o((()=>{}));function Hcr(){for(var e=this._name,t=this._id,n=Kcr(),r=this._groups,i=r.length,a=0;a{GI(),VI()}));function Wcr(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},l={value:function(){--i===0&&a()}};n.each(function(){var n=zI(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t}),i===0&&a()})}var Gcr=o((()=>{VI()}));function UI(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Kcr(){return++qcr}var qcr,WI,GI=o((()=>{OI(),Rsr(),Wsr(),Jsr(),Qsr(),tcr(),icr(),ocr(),ccr(),fcr(),hcr(),_cr(),ycr(),Scr(),kcr(),Ncr(),Lcr(),Vcr(),Ucr(),HI(),Gcr(),qcr=0,WI=TI.prototype,UI.prototype={constructor:UI,select:gcr,selectAll:vcr,selectChild:WI.selectChild,selectChildren:WI.selectChildren,filter:acr,merge:scr,selection:bcr,transition:Hcr,call:WI.call,nodes:WI.nodes,node:WI.node,size:WI.size,empty:WI.empty,each:WI.each,on:dcr,attr:Lsr,attrTween:Usr,style:Ocr,styleTween:Mcr,text:Icr,textTween:Bcr,remove:mcr,tween:Dsr,delay:qsr,duration:Zsr,ease:ecr,easeVarying:rcr,end:Wcr,[Symbol.iterator]:WI[Symbol.iterator]}}));function Jcr(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ycr=o((()=>{})),Xcr=o((()=>{Ycr()}));function Zcr(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Qcr(e){var t,n;e instanceof UI?(t=e._id,e=e._name):(t=Kcr(),(n=$cr).time=nsr(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a{GI(),VI(),Xcr(),LI(),$cr={time:null,delay:0,duration:250,ease:Jcr}})),tlr=o((()=>{OI(),wsr(),elr(),TI.prototype.interrupt=Csr,TI.prototype.transition=Qcr})),nlr=o((()=>{tlr(),GI(),VI(),Ssr()}));function rlr(e){return{type:e}}var ilr,alr,olr,slr=o((()=>{nlr(),{abs:ilr,max:alr,min:olr}=Math,[`w`,`e`].map(rlr),[`n`,`s`].map(rlr),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(rlr)})),clr=o((()=>{slr()})),llr=o((()=>{_5t()})),ulr=o((()=>{OT()})),dlr=o((()=>{})),flr=o((()=>{})),plr=o((()=>{flr()})),mlr=o((()=>{})),hlr=o((()=>{mlr(),dir(),LI()})),glr=o((()=>{OT()}));function _lr(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function vlr(){return this.eachAfter(_lr)}var ylr=o((()=>{}));function blr(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}var xlr=o((()=>{}));function Slr(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}var Clr=o((()=>{}));function wlr(e,t){for(var n=this,r=[n],i=[],a,o,s,l=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o{}));function Elr(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}var Dlr=o((()=>{}));function Olr(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}var klr=o((()=>{}));function Alr(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var jlr=o((()=>{}));function Mlr(e){for(var t=this,n=Nlr(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Nlr(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}var Plr=o((()=>{}));function Flr(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Ilr=o((()=>{}));function Llr(){return Array.from(this)}var Rlr=o((()=>{}));function zlr(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var Blr=o((()=>{}));function Vlr(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}var Hlr=o((()=>{}));function*Ulr(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i{}));function Glr(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Jlr)):t===void 0&&(t=qlr);for(var n=new KI(e),r,i=[n],a,o,s,l;r=i.pop();)if((o=t(r.data))&&(l=(o=Array.from(o)).length))for(r.children=o,s=l-1;s>=0;--s)i.push(a=o[s]=new KI(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(Xlr)}function Klr(){return Glr(this).eachBefore(Ylr)}function qlr(e){return e.children}function Jlr(e){return Array.isArray(e)?e[1]:null}function Ylr(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Xlr(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function KI(e){this.data=e,this.depth=this.height=0,this.parent=null}var Zlr=o((()=>{ylr(),xlr(),Clr(),Tlr(),Dlr(),klr(),jlr(),Plr(),Ilr(),Rlr(),Blr(),Hlr(),Wlr(),KI.prototype=Glr.prototype={constructor:KI,count:vlr,each:blr,eachAfter:wlr,eachBefore:Slr,find:Elr,sum:Olr,sort:Alr,path:Mlr,ancestors:Flr,descendants:Llr,leaves:zlr,links:Vlr,copy:Klr,[Symbol.iterator]:Ulr}}));function Qlr(e){if(typeof e!=`function`)throw Error();return e}var $lr=o((()=>{}));function qI(){return 0}function JI(e){return function(){return e}}var eur=o((()=>{}));function tur(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var nur=o((()=>{}));function rur(e,t,n,r,i){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(r-t)/e.value;++s{}));function aur(e,t,n,r,i){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(i-n)/e.value;++s{}));function sur(e,t,n,r,i,a){for(var o=[],s=t.children,l,u,d=0,f=0,p=s.length,m,h,g=t.value,_,v,y,b,x,S,C;dy&&(y=u),C=_*_*S,b=Math.max(y/C,C/v),b>x){_-=u;break}x=b}o.push(l={value:_,dice:m{iur(),our(),cur=(1+Math.sqrt(5))/2,lur=(function e(t){function n(e,n,r,i,a){sur(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(cur)}));function dur(){var e=lur,t=!1,n=1,r=1,i=[0],a=qI,o=qI,s=qI,l=qI,u=qI;function d(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(f),i=[0],t&&e.eachBefore(tur),e}function f(t){var n=i[t.depth],r=t.x0+n,d=t.y0+n,f=t.x1-n,p=t.y1-n;f{nur(),uur(),$lr(),eur()})),pur=o((()=>{Zlr(),eur(),nur(),iur(),fur(),our(),uur()})),mur=o((()=>{})),hur=o((()=>{}));function gur(e){for(var t=e.length/6|0,n=Array(t),r=0;r{})),vur,yur=o((()=>{_ur(),vur=gur(`4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab`)})),bur=o((()=>{_ur(),yur(),uE(),$T()}));function YI(e,t,n){this.k=e,this.x=t,this.y=n}var xur=o((()=>{YI.prototype={constructor:YI,scale:function(e){return e===1?this:new YI(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new YI(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}},new YI(1,0,0),YI.prototype})),Sur=o((()=>{nlr(),xur()})),Cur=o((()=>{Sur(),xur()})),XI=o((()=>{OT(),rir(),clr(),llr(),$T(),ulr(),dlr(),dir(),tsr(),flr(),Xcr(),plr(),hlr(),Yhn(),glr(),pur(),uE(),_5t(),mur(),mlr(),hur(),oyn(),bur(),OI(),A9t(),f_n(),Ivn(),LI(),nlr(),Cur()})),ZI,QI=o((()=>{bI(),fN(),XI(),ZI=U(e=>{let{securityLevel:t}=_I(),n=DI(`body`);if(t===`sandbox`){var r;n=DI((((r=DI(`#i${e}`).node())==null?void 0:r.contentDocument)??document).body)}return n.select(`#${e}`)},`selectSvgElement`)})),wur,Tur,$I,Eur,eL,tL,nL,Dur,rL=o((()=>{bI(),fN(),wur=U(e=>{let{handDrawnSeed:t}=_I();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},`solidStateFill`),Tur=U(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),$I=U(e=>{let t=Eur([...e.cssCompiledStyles||[],...e.cssStyles||[],...Tur(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),Eur=U(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r==null?void 0:r.trim())}),t},`styles2Map`),eL=U(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),tL=U(e=>{let{stylesArray:t}=$I(e),n=[],r=[],i=[],a=[];return t.forEach(e=>{let t=e[0];eL(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&i.push(e.join(`:`)+` !important`),t===`fill`&&a.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:i,backgroundStyles:a}},`styles2String`),nL=U((e,t)=>{var n;let{themeVariables:r,handDrawnSeed:i}=_I(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:s}=$I(e);return Object.assign({roughness:.7,fill:s.get(`fill`)||o,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:s.get(`stroke`)||a,seed:i,strokeWidth:((n=s.get(`stroke-width`))==null?void 0:n.replace(`px`,``))||1.3,fillLineDash:[0,0],strokeLineDash:Dur(s.get(`stroke-dasharray`))},t)},`userNodeOverrides`),Dur=U(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`)})),Our,iL,kur,Aur,jur=o((()=>{Our=Object.freeze({left:0,top:0,width:16,height:16}),iL=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),kur=Object.freeze({...Our,...iL}),Aur=Object.freeze({...kur,body:``,hidden:!1})})),Mur,Nur,Pur=o((()=>{jur(),Mur=Object.freeze({width:null,height:null}),Nur=Object.freeze({...Mur,...iL})})),Fur,aL,Iur=o((()=>{Fur=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!aL(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!aL(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!aL(e,n)?null:e}return null},aL=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1}));function Lur(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}var Rur=o((()=>{}));function zur(e,t){let n=Lur(e,t);for(let r in Aur)r in iL?r in e&&!(r in n)&&(n[r]=iL[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}var Bur=o((()=>{jur(),Rur()}));function Vur(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}var Hur=o((()=>{}));function Uur(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=zur(r[e]||i[e],a)}return o(t),n.forEach(o),zur(e,a)}function Wur(e,t){if(e.icons[t])return Uur(e,t,[]);let n=Vur(e,[t])[t];return n?Uur(e,t,n):null}var Gur=o((()=>{Bur(),Hur()}));function Kur(e,t,n){if(t===1)return e;if(n=n||100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(qur);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Jur.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}var qur,Jur,Yur=o((()=>{qur=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Jur=/^-?[0-9.]*[0-9]+[0-9.]*$/g}));function Xur(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(``,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function Zur(e,t){return e?``+e+``+t:t}function Qur(e,t,n){let r=Xur(e);return Zur(r.defs,t+r.content+n)}var $ur=o((()=>{}));function edr(e,t){let n={...kur,...e},r={...Nur,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=Qur(a,``,``))});let o=r.width,s=r.height,l=i.width,u=i.height,d,f;o===null?(f=s===null?`1em`:s===`auto`?u:s,d=Kur(f,l/u)):(d=o===`auto`?l:o,f=s===null?Kur(d,u/l):s===`auto`?u:s);let p={},m=(e,t)=>{tdr(t)||(p[e]=t.toString())};m(`width`,d),m(`height`,f);let h=[i.left,i.top,l,u];return p.viewBox=h.join(` `),{attributes:p,viewBox:h,body:a}}var tdr,ndr=o((()=>{jur(),Pur(),Yur(),$ur(),tdr=e=>e===`unset`||e===`undefined`||e===`none`}));function rdr(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=odr.get(e)||0;return odr.set(e,t+1),t?`${e}${t}`:e}function idr(e){let t=[],n;for(;n=adr.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=rdr(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var adr,odr,sdr=o((()=>{adr=/\sid="(\S+)"/g,odr=new Map}));function cdr(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return``+e+``}var ldr=o((()=>{})),udr=o((()=>{Iur(),Gur(),ndr(),sdr(),ldr()})),ddr,oL,fdr,sL,pdr,mdr,cL,lL=o((()=>{bI(),hN(),fN(),udr(),ddr={body:`?`,height:80,width:80},oL=new Map,fdr=new Map,sL=U(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(W.debug(`Registering icon pack:`,t.name),`loader`in t)fdr.set(t.name,t.loader);else if(`icons`in t)oL.set(t.name,t.icons);else throw W.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),pdr=U(async(e,t)=>{let n=Fur(e,!0,t!==void 0);if(!n)throw Error(`Invalid icon name: ${e}`);let r=n.prefix||t;if(!r)throw Error(`Icon name must contain a prefix: ${e}`);let i=oL.get(r);if(!i){let e=fdr.get(r);if(!e)throw Error(`Icon set not found: ${n.prefix}`);try{i={...await e(),prefix:r},oL.set(r,i)}catch(e){throw W.error(e),Error(`Failed to load icon set: ${n.prefix}`)}}let a=Wur(i,n.name);if(!a)throw Error(`Icon not found: ${e}`);return a},`getRegisteredIconData`),mdr=U(async e=>{try{return await pdr(e),!0}catch{return!1}},`isIconAvailable`),cL=U(async(e,t,n)=>{let r;try{r=await pdr(e,t==null?void 0:t.fallbackPrefix)}catch(e){W.error(e),r=ddr}let i=edr(r,t),a=cdr(idr(i.body),{...i.attributes,...n});return QF(a,WF())},`getIconSVG`)})),hdr=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`})),uL=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=o;var t=hdr();function n(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}function r(e){return e.replace(t.ctrlCharactersRegex,``).replace(t.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){return URL.canParse(e)}function a(e){try{return decodeURIComponent(e)}catch{return e}}function o(e){if(!e)return t.BLANK_URL;var o,s=a(e.trim());do s=r(s).replace(t.htmlCtrlEntityRegex,``).replace(t.ctrlCharactersRegex,``).replace(t.whitespaceEscapeCharsRegex,``).trim(),s=a(s),o=s.match(t.ctrlCharactersRegex)||s.match(t.htmlEntitiesRegex)||s.match(t.htmlCtrlEntityRegex)||s.match(t.whitespaceEscapeCharsRegex);while(o&&o.length>0);var l=s;if(!l)return t.BLANK_URL;if(n(l))return l;var u=l.trimStart(),d=u.match(t.urlSchemeRegex);if(!d)return l;var f=d[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(f))return t.BLANK_URL;var p=u.replace(/\\/g,`/`);if(f===`mailto:`||f.includes(`://`))return p;if(f===`http:`||f===`https:`){if(!i(p))return t.BLANK_URL;var m=new URL(p);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return p}}));function gdr(e){return typeof e==`object`&&!!e}var _dr=o((()=>{}));function vdr(e){return gdr(e)&&mS(e)}var ydr=o((()=>{hS(),_dr()}));function dL(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(dL.Cache||Map),n}var bdr=o((()=>{dL.Cache=Map}));function xdr(e){if(gS(e))return e;let t=vS(e);if(!Sdr(e))return{};if($Un(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(Tj(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?Tdr(r,e):Cdr(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return Cdr(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Edr(n,e),Cdr(n,e),wdr(n,e),n}function Sdr(e){switch(vS(e)){case jen:case Ien:case Ren:case Ben:case SS:case Nen:case Xen:case Zen:case Ken:case qen:case Jen:case Pen:case xS:case CS:case Aen:case Fen:case bS:case Men:case Ven:case Hen:case Uen:case Wen:return!0;default:return!1}}function Cdr(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function wdr(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}function Edr(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var Ddr=o((()=>{_S(),yS(),Qen(),eWn(),Ej()}));function Odr(e){if(gS(e))return e;if(Array.isArray(e)||Een(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}var kdr=o((()=>{_S(),Den()}));function Adr(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e{_S(),kdr(),ken(),TS(),T8t(),QUn(),wtn(),ktn(),_dr(),ydr(),Ej()}));function Ndr(e,...t){return Adr(e,...t,EPn)}var Pdr=o((()=>{DPn(),Mdr()}));function Fdr(e){if(e==null)return!0;if(mS(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!wS(e)&&!Tj(e)&&!Otn(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return tWn(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var Idr=o((()=>{TS(),hS(),ktn(),nWn(),Ej()})),Ldr=o((()=>{bdr(),Ddr(),Pdr(),Idr()}));function Rdr(e,t){return e?Xdr[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}function zdr(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,Jdr.sanitizeUrl)(n)}function Bdr(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Vdr(e){let t,n=0;return e.forEach(e=>{n+=Bdr(e,t),t=e}),gL(e,n/2)}function Hdr(e){return e.length===1?e[0]:Vdr(e)}function Udr(e,t,n){let r=structuredClone(n);W.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=gL(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),s={x:0,y:0};return t===`start_left`?(s.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(s.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(s.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(s.x=Math.sin(o)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2),s}function Wdr(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}function Gdr(e){let t=``;for(let n=0;nMath.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}var Jdr,Ydr,Xdr,Zdr,Qdr,$dr,efr,tfr,nfr,rfr,gL,ifr,afr,ofr,sfr,cfr,lfr,_L,ufr,vL,dfr,yL,ffr,pfr,bL,xL,mfr,SL,CL,wL=o((()=>{bI(),hN(),fN(),Jdr=uL(),XI(),Ldr(),Xdr={curveBasis:iS,curveBasisClosed:S7t,curveBasisOpen:T7t,curveBumpX:H5t,curveBumpY:U5t,curveBundle:O7t,curveCardinalClosed:F7t,curveCardinalOpen:R7t,curveCardinal:M7t,curveCatmullRomClosed:G7t,curveCatmullRomOpen:J7t,curveCatmullRom:H7t,curveLinear:$x,curveLinearClosed:Z7t,curveMonotoneX:o9t,curveMonotoneY:s9t,curveNatural:d9t,curveStep:m9t,curveStepAfter:g9t,curveStepBefore:h9t},Zdr=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Qdr=U(function(e,t){let n=$dr(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);IF(e),r=OF(r,[...e])}else r=n.args;if(!r)return;let i=YF(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),$dr=U(function(e,t=null){try{let i=RegExp(`[%]{2}(?![{]${Zdr.source})(?=[}][%]{2}).* `,`ig`);e=e.trim().replace(i,``).replace(/'/gm,`"`),W.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let a,o=[];for(;(a=qF.exec(e))!==null;){var n,r;if(a.index===qF.lastIndex&&qF.lastIndex++,a&&!t||t&&(n=a[1])!=null&&n.match(t)||t&&(r=a[2])!=null&&r.match(t)){let e=a[1]?a[1]:a[2],t=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:e,args:t})}}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(n){return W.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),efr=U(function(e){return e.replace(qF,``)},`removeDirectives`),tfr=U(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`),U(Rdr,`interpolateToCurve`),U(zdr,`formatUrl`),nfr=U((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t{let n=10**t;return Math.round(e*n)/n},`roundNumber`),gL=U((e,t)=>{let n,r=t;for(let t of e){if(n){let e=Bdr(t,n);if(e===0)return n;if(e=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:rfr((1-i)*n.x+i*t.x,5),y:rfr((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),ifr=U((e,t,n)=>{W.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=gL(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`),U(Udr,`calcTerminalLabelPosition`),U(Wdr,`getStylesFromArray`),afr=0,ofr=U(()=>(afr++,`id-`+Math.random().toString(36).substr(2,12)+`-`+afr),`generateId`),U(Gdr,`makeRandomHex`),sfr=U(e=>Gdr(e.length),`random`),cfr=U(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),lfr=U(function(e,t){let n=t.text.replace(oI.lineBreakRegex,` `),[,r]=bL(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),_L=dL((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`
`},n),oI.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=pL(`${e} `,n),l=pL(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=ufr(e,t,`-`,n);i.push(a,...r),a=o}else l+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),ufr=dL((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let l=`${o}${e}`;if(pL(l,r)>=t){let e=s+1,t=i.length===e,r=`${l}${n}`;a.push(t?l:r),o=``}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`),U(fL,`calculateTextHeight`),U(pL,`calculateTextWidth`),vL=dL((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=bL(n),o=[`sans-serif`,r],s=e.split(oI.lineBreakRegex),l=[],u=DI(`body`);if(!u.remove)return{width:0,height:0,lineHeight:0};let d=u.append(`svg`);for(let e of o){let t=0,n={width:0,height:0,lineHeight:0};for(let r of s){let o=cfr();o.text=r||`​`;let s=lfr(d,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),l=(s._groups||s)[0][0].getBBox();if(l.width===0&&l.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,l.width)),t=Math.round(l.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}l.push(n)}return d.remove(),l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),dfr=(Ydr=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}},U(Ydr,`InitIDGenerator`),Ydr),ffr=U(function(e){return yL=yL||document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),yL.innerHTML=e,unescape(yL.textContent)},`entityDecode`),U(Kdr,`isDetailedError`),pfr=U((e,t,n,r)=>{var i;if(!r)return;let a=(i=e.node())==null?void 0:i.getBBox();a&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,a.x+a.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),bL=U(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`),U(mL,`cleanAndMerge`),xL={assignWithDepth:OF,wrapLabel:_L,calculateTextHeight:fL,calculateTextWidth:pL,calculateTextDimensions:vL,cleanAndMerge:mL,detectInit:Qdr,detectDirective:$dr,isSubstringInArray:tfr,interpolateToCurve:Rdr,calcLabelPosition:Hdr,calcCardinalityPosition:ifr,calcTerminalLabelPosition:Udr,formatUrl:zdr,getStylesFromArray:Wdr,generateId:ofr,random:sfr,runFunc:nfr,entityDecode:ffr,insertTitle:pfr,isLabelCoordinateInPath:qdr,parseFontSize:bL,InitIDGenerator:dfr},mfr=U(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),SL=U(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),CL=U((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`),U(hL,`handleUndefinedAttr`),U(qdr,`isLabelCoordinateInPath`)})),hfr=s(((e,t,n)=>{(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r){if(r.message,e.catch)e.catch(r);else throw r}}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var l=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return l}):typeof t==`object`&&(t.exports=l)})(typeof window<`u`?window:n===void 0?globalThis:n)})),gfr=s(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,l){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){l(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()}));function _fr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function vfr(e){AL=e}function TL(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(ML.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}function EL(e,t){if(t){if(ML.escapeTest.test(e))return e.replace(ML.escapeReplace,Cpr)}else if(ML.escapeTestNoEncode.test(e))return e.replace(ML.escapeReplaceNoEncode,Cpr);return e}function yfr(e){try{e=encodeURI(e).replace(ML.percentDecode,`%`)}catch{return null}return e}function bfr(e,t){var n;let r=e.replace(ML.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(ML.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((n=r.at(-1))!=null&&n.trim())&&r.pop(),t){if(r.length>t)r.splice(t);else for(;r.length0?-2:-1}function Sfr(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let l={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function Cfr(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` `)}function OL(e,t){return WL.parse(e,t)}var kL,AL,jL,wfr,ML,Tfr,Efr,Dfr,NL,Ofr,kfr,Afr,jfr,Mfr,Nfr,Pfr,Ffr,Ifr,Lfr,PL,Rfr,zfr,Bfr,Vfr,Hfr,Ufr,Wfr,Gfr,Kfr,qfr,Jfr,FL,Yfr,Xfr,Zfr,Qfr,$fr,epr,tpr,npr,rpr,ipr,apr,opr,spr,cpr,lpr,upr,dpr,fpr,IL,ppr,mpr,hpr,gpr,_pr,vpr,ypr,bpr,xpr,LL,RL,Spr,Cpr,zL,BL,VL,wpr,HL,UL,Tpr,WL,Epr=o((()=>{D(),AL=_fr(),jL={exec:()=>null},wfr=(()=>{try{return!!RegExp(`(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Tfr=/^(?:[ \t]*(?:\n|$))+/,Efr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Dfr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,NL=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ofr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kfr=/(?:[*+-]|\d{1,9}[.)])/,Afr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jfr=TL(Afr).replace(/bull/g,kfr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Mfr=TL(Afr).replace(/bull/g,kfr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Nfr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pfr=/^[^\n]+/,Ffr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ifr=TL(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Ffr).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Lfr=TL(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kfr).getRegex(),PL=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Rfr=/\x3C!--(?:-?>|[\s\S]*?(?:-->|$))/,zfr=TL(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Rfr).replace(`tag`,PL).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Bfr=TL(Nfr).replace(`hr`,NL).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,PL).getRegex(),Vfr={blockquote:TL(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Bfr).getRegex(),code:Efr,def:Ifr,fences:Dfr,heading:Ofr,hr:NL,html:zfr,lheading:jfr,list:Lfr,newline:Tfr,paragraph:Bfr,table:jL,text:Pfr},Hfr=TL(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,NL).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,PL).getRegex(),Ufr={...Vfr,lheading:Mfr,table:Hfr,paragraph:TL(Nfr).replace(`hr`,NL).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Hfr).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,PL).getRegex()},Wfr={...Vfr,html:TL(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Rfr).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:jL,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:TL(Nfr).replace(`hr`,NL).replace(`heading`,` *#{1,6} *[^ ]`).replace(`lheading`,jfr).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Gfr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kfr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qfr=/^( {2,}|\\)\n(?!\s*$)/,Jfr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,wfr?"(?`+)[^`]+\k(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),npr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,rpr=TL(npr,`u`).replace(/punct/g,FL).getRegex(),ipr=TL(npr,`u`).replace(/punct/g,Qfr).getRegex(),apr=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,opr=TL(apr,`gu`).replace(/notPunctSpace/g,Xfr).replace(/punctSpace/g,Yfr).replace(/punct/g,FL).getRegex(),spr=TL(apr,`gu`).replace(/notPunctSpace/g,epr).replace(/punctSpace/g,$fr).replace(/punct/g,Qfr).getRegex(),cpr=TL(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Xfr).replace(/punctSpace/g,Yfr).replace(/punct/g,FL).getRegex(),lpr=TL(/\\(punct)/,`gu`).replace(/punct/g,FL).getRegex(),upr=TL(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),dpr=TL(Rfr).replace(`(?:-->|$)`,`-->`).getRegex(),fpr=TL(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,dpr).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),IL=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ppr=TL(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,IL).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mpr=TL(/^!?\[(label)\]\[(ref)\]/).replace(`label`,IL).replace(`ref`,Ffr).getRegex(),hpr=TL(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ffr).getRegex(),gpr=TL(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,mpr).replace(`nolink`,hpr).getRegex(),_pr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vpr={_backpedal:jL,anyPunctuation:lpr,autolink:upr,blockSkip:tpr,br:qfr,code:Kfr,del:jL,emStrongLDelim:rpr,emStrongRDelimAst:opr,emStrongRDelimUnd:cpr,escape:Gfr,link:ppr,nolink:hpr,punctuation:Zfr,reflink:mpr,reflinkSearch:gpr,tag:fpr,text:Jfr,url:jL},ypr={...vpr,link:TL(/^!?\[(label)\]\((.*?)\)/).replace(`label`,IL).getRegex(),reflink:TL(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,IL).getRegex()},bpr={...vpr,emStrongRDelimAst:spr,emStrongLDelim:ipr,url:TL(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,_pr).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:TL(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},Cpr=e=>Spr[e],zL=class{constructor(e){E(this,`options`,void 0),E(this,`rules`,void 0),E(this,`lexer`,void 0),this.options=e||AL}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:DL(e,` `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Cfr(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=DL(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:DL(t[0],` `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=DL(t[0],` `).split(` `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),u=e.split(` `,1)[0],d=!l.trim(),f=0;if(this.options.pedantic?(f=2,s=l.trimStart()):d?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,s=l.slice(f),f+=t[1].length),d&&this.rules.other.blankLine.test(u)&&(r+=u+` `,e=e.substring(u.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(f),n=this.rules.other.hrRegex(f),i=this.rules.other.fencesBeginRegex(f),a=this.rules.other.headingBeginRegex(f),o=this.rules.other.htmlBeginRegex(f);for(;e;){let p=e.split(` `,1)[0],m;if(u=p,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting,` `),m=u):m=u.replace(this.rules.other.tabCharGlobal,` `),i.test(u)||a.test(u)||o.test(u)||t.test(u)||n.test(u))break;if(m.search(this.rules.other.nonSpaceChar)>=f||!u.trim())s+=` `+m.slice(f);else{if(d||l.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(l)||a.test(l)||n.test(l))break;s+=` `+u}!d&&!u.trim()&&(d=!0),r+=p+` `,e=e.substring(p.length+1),l=m.slice(f)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let p=null,m;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(m=p[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!p,checked:m,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;ee.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=DL(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=xfr(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Sfr(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Sfr(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,l=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);(r=l.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=l.slice(1,-1);return{type:`em`,raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let u=l.slice(2,-2);return{type:`strong`,raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if(t[2]===`@`)e=t[0],r=`mailto:`+e;else{var n;let i;do i=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??``;while(i!==t[0]);e=t[0],r=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:r,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},BL=class e{constructor(e){E(this,`tokens`,void 0),E(this,`options`,void 0),E(this,`state`,void 0),E(this,`tokenizer`,void 0),E(this,`inlineQueue`,void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||AL,this.options.tokenizer=this.options.tokenizer||new zL,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:ML,block:LL.normal,inline:RL.normal};this.options.pedantic?(t.block=LL.pedantic,t.inline=RL.pedantic):this.options.gfm&&(t.block=LL.gfm,t.inline=this.options.breaks?RL.breaks:RL.gfm),this.tokenizer.rules=t}static get rules(){return{block:LL,inline:RL}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(ML.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let e=0;e(a=n.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let n=t.at(-1);a.raw.length===1&&n!==void 0?n.raw+=` `:t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let n=t.at(-1);(n==null?void 0:n.type)===`paragraph`||(n==null?void 0:n.type)===`text`?(n.raw+=(n.raw.endsWith(` `)?``:` `)+a.raw,n.text+=` `+a.text,this.inlineQueue.at(-1).src=n.text):t.push(a);continue}if((a=this.tokenizer.fences(e))||(a=this.tokenizer.heading(e))||(a=this.tokenizer.hr(e))||(a=this.tokenizer.blockquote(e))||(a=this.tokenizer.list(e))||(a=this.tokenizer.html(e))){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let n=t.at(-1);(n==null?void 0:n.type)===`paragraph`||(n==null?void 0:n.type)===`text`?(n.raw+=(n.raw.endsWith(` `)?``:` `)+a.raw,n.text+=` `+a.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if((a=this.tokenizer.table(e))||(a=this.tokenizer.lheading(e))){e=e.substring(a.raw.length),t.push(a);continue}let o=e;if((i=this.options.extensions)!=null&&i.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(a=this.tokenizer.paragraph(o))){let r=t.at(-1);n&&(r==null?void 0:r.type)===`paragraph`?(r.raw+=(r.raw.endsWith(` `)?``:` `)+a.raw,r.text+=` `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a),n=o.length!==e.length,e=e.substring(a.raw.length)}else if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let n=t.at(-1);(n==null?void 0:n.type)===`text`?(n.raw+=(n.raw.endsWith(` `)?``:` `)+a.raw,n.text+=` `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a)}else if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var n;let r=e,i=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)e.includes(i[0].slice(i[0].lastIndexOf(`[`)+1,-1))&&(r=r.slice(0,i.index)+`[`+`a`.repeat(i[0].length-2)+`]`+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+`++`+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+`[`+`a`.repeat(i[0].length-a-2)+`]`+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((n=this.options.hooks)==null||(n=n.emStrongMask)==null?void 0:n.call({lexer:this},r))??r;let o=!1,s=``;for(;e;){var l,u;o||(s=``),o=!1;let n;if((l=this.options.extensions)!=null&&(l=l.inline)!=null&&l.some(r=>(n=r.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))continue;if((n=this.tokenizer.escape(e))||(n=this.tokenizer.tag(e))||(n=this.tokenizer.link(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);n.type===`text`&&(r==null?void 0:r.type)===`text`?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if((n=this.tokenizer.emStrong(e,r,s))||(n=this.tokenizer.codespan(e))||(n=this.tokenizer.br(e))||(n=this.tokenizer.del(e))||(n=this.tokenizer.autolink(e))||!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let i=e;if((u=this.options.extensions)!=null&&u.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i)){e=e.substring(n.raw.length),n.raw.slice(-1)!==`_`&&(s=n.raw.slice(-1)),o=!0;let r=t.at(-1);(r==null?void 0:r.type)===`text`?(r.raw+=n.raw,r.text+=n.text):t.push(n)}else if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},VL=class{constructor(e){E(this,`options`,void 0),E(this,`parser`,void 0),this.options=e||AL}space(e){return``}code({text:e,lang:t,escaped:n}){var r;let i=(r=(t||``).match(ML.notSpaceStart))==null?void 0:r[0],a=e.replace(ML.endingNewline,``)+` `;return i?`
`+(n?a:EL(a,!0))+`
`:`
`+(n?a:EL(a,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t `+r+` `}listitem(e){let t=``;if(e.task){var n;let r=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)===`paragraph`?(e.tokens[0].text=r+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=r+` `+EL(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:r+` `,text:r+` `,escaped:!0}):t+=r+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • `}checkbox({checked:e}){return``}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `}table(e){let t=``,n=``;for(let t=0;t${r}`),` `+t+` `+r+`
    `}tablerow({text:e}){return` ${e} `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${EL(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=yfr(e);if(i===null)return r;e=i;let a=`
    `+r+``,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=yfr(e);if(i===null)return EL(n);e=i;let a=`${n}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:EL(e.text)}},wpr=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},HL=class e{constructor(e){E(this,`options`,void 0),E(this,`renderer`,void 0),E(this,`textRenderer`,void 0),this.options=e||AL,this.options.renderer=this.options.renderer||new VL,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wpr}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let i=0;i{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new VL(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new zL(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new UL;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=UL.passThroughHooks.has(n)?e=>{if(this.defaults.async&&UL.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return BL.lex(e,t??this.defaults)}parser(e,t){return HL.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?BL.lex:BL.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?HL.parse:HL.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?BL.lex:BL.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?HL.parse:HL.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+EL(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},WL=new Tpr,OL.options=OL.setOptions=function(e){return WL.setOptions(e),OL.defaults=WL.defaults,vfr(OL.defaults),OL},OL.getDefaults=_fr,OL.defaults=AL,OL.use=function(...e){return WL.use(...e),OL.defaults=WL.defaults,vfr(OL.defaults),OL},OL.walkTokens=function(e,t){return WL.walkTokens(e,t)},OL.parseInline=WL.parseInline,OL.Parser=HL,OL.parser=HL.parse,OL.Renderer=VL,OL.TextRenderer=wpr,OL.Lexer=BL,OL.lexer=BL.lex,OL.Tokenizer=zL,OL.Hooks=UL,OL.parse=OL,OL.options,OL.setOptions,OL.use,OL.walkTokens,OL.parseInline,HL.parse,BL.lex}));function Dpr(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){var t;return((t=e.match(/[\t ]/g))==null?void 0:t.length)??0})):e},[]);if(r.length){var i=RegExp(` [ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,` `)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(` `)&&(o=String(e).split(` `).map(function(e,t){return t===0?e:``+i+e}).join(` `)),a+=o+n[t+1]}),a}var Opr=o((()=>{}));function kpr(e,{markdownAutoWrap:t}){return Dpr(e.replace(//g,` `).replace(/\n{2,}/g,` `))}function Apr(e){return e.split(/\\n|\n|/gi).map(e=>{var t;return((t=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:t.map(e=>({content:e,type:`normal`})))??[]})}function jpr(e,t={}){let n=kpr(e,t),r=OL.lexer(n),i=[[]],a=0;function o(e,t=`normal`){e.type===`text`?e.text.split(` `).forEach((e,n)=>{n!==0&&(a++,i.push([])),e.split(` `).forEach(e=>{e=e.replace(/'/g,`'`),e&&i[a].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{o(t,e.type)}):e.type===`html`&&i[a].push({content:e.text,type:`normal`})}return U(o,`processNode`),r.forEach(e=>{if(e.type===`paragraph`){var t;(t=e.tokens)==null||t.forEach(e=>{o(e)})}else e.type===`html`?i[a].push({content:e.text,type:`normal`}):i[a].push({content:e.raw,type:`normal`})}),i}function Mpr(e){return e?`

    ${e.replace(/\\n|\n/g,`
    `)}

    `:``}function Npr(e,{markdownAutoWrap:t}={}){let n=OL.lexer(e);function r(e){if(e.type===`text`)return t===!1?e.text.replace(/\n */g,`
    `).replace(/ /g,` `):e.text.replace(/\n */g,`
    `);if(e.type===`strong`){var n;return`${(n=e.tokens)==null?void 0:n.map(r).join(``)}`}if(e.type===`em`){var i;return`${(i=e.tokens)==null?void 0:i.map(r).join(``)}`}if(e.type===`paragraph`){var a;return`

    ${(a=e.tokens)==null?void 0:a.map(r).join(``)}

    `}return e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(W.warn(`Unsupported markdown: ${e.type}`),e.raw)}return U(r,`output`),n.map(r).join(``)}function Ppr(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}function Fpr(e,t){return Ipr(e,[],Ppr(t.content),t.type)}function Ipr(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?Ipr(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}function Lpr(e,t){if(e.some(({content:e})=>e.includes(` `)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return Rpr(e,t)}function Rpr(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return Rpr(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=Fpr(t,a);n.push([r]),i.content&&e.unshift(i)}return Rpr(e,t,n)}function zpr(e,t){t&&e.attr(`style`,t)}async function Bpr(e,t,n,r,i=!1,a=WF()){let o=e.append(`foreignObject`);o.attr(`width`,`${Math.min(10*n,rmr)}px`),o.attr(`height`,`${Math.min(10*n,rmr)}px`);let s=o.append(`xhtml:div`),l=rI(t.label)?await aI(t.label.replace(oI.lineBreakRegex,` `),a):QF(t.label,a),u=t.isNode?`nodeLabel`:`edgeLabel`,d=s.append(`span`);return d.html(l),zpr(d,t.labelStyle),d.attr(`class`,`${u} ${r}`),zpr(s,t.labelStyle),s.style(`display`,`table-cell`),s.style(`white-space`,`nowrap`),s.style(`line-height`,`1.5`),n!==1/0&&(s.style(`max-width`,n+`px`),s.style(`text-align`,`center`)),s.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),i&&s.attr(`class`,`labelBkg`),(await KL.measure(()=>s.node().getBoundingClientRect())).width===n&&(s.style(`display`,`table`),s.style(`white-space`,`break-spaces`),s.style(`width`,n+`px`)),o.node()}function Vpr(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}function Hpr(e,t,n){let r=e.append(`text`),i=Vpr(r,1,t);Kpr(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}function Upr(e,t,n){var r;let i=e.append(`text`),a=Vpr(i,1,t);Kpr(a,[{content:n,type:`normal`}]);let o=(r=a.node())==null?void 0:r.getBoundingClientRect();return o&&i.remove(),o}function Wpr(e,t,n,r=!1,i=!1){let a=1.1,o=t.append(`g`),s=o.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=o.append(`text`).attr(`y`,`-10.1`);i&&l.attr(`text-anchor`,`middle`);let u=0;for(let t of n){let n=U(t=>Hpr(o,a,t)<=e,`checkWidth`),r=n(t)?[t]:Lpr(t,n);for(let e of r)Kpr(Vpr(l,u,a,i),e),u++}if(r){let e=l.node().getBBox();return s.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),o.node()}return l.node()}function Gpr(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}function Kpr(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(Gpr(t.content)):r.text(` `+Gpr(t.content))})}async function qpr(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,i)=>(n.push((async()=>{let n=`${r}:${i}`;return await mdr(n)?await cL(n,void 0,{class:`label-icon`}):``})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}var Jpr,Ypr,Xpr,Zpr,Qpr,GL,$pr,emr,tmr,nmr,KL,rmr,qL,JL=o((()=>{lL(),wL(),bI(),hN(),fN(),Jpr=d(hfr(),1),Ypr=d(gfr(),1),XI(),Epr(),Opr(),Qpr=typeof performance<`u`&&typeof performance.now==`function`,GL=U(()=>Qpr?performance.now():0,`now`),$pr=`🧜 `,emr=`Mermaid render`,tmr=`Mermaid`,nmr={parse:`tertiary`,prepare:`secondary`,measure:`primary`,layout:`primary-dark`,layoutCore:`error`,draw:`primary-light`,paint:`secondary-dark`,serialize:`tertiary-dark`,render:`primary-light`},Xpr=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();let n=GL();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(GL()-n)}}async tick(e,t){if(!this.enabled)return t();let n=GL();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(GL()-n)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();let e=this.roots.at(-1),t=this.runLabel??(e==null?void 0:e.name);return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;let t={name:e,start:GL(),duration:-1,children:[]},n=this.stack.at(-1);if(n?n.children.push(t):this.roots.push(t),this.stack.push(t),Qpr&&typeof performance.mark==`function`)try{performance.mark(`${$pr}${e} \u25B6`)}catch{}}end(){if(!this.enabled)return;let e=this.stack.pop();if(!e)return;let t=GL();if(e.duration=t-e.start,Qpr&&typeof performance.measure==`function`)try{performance.measure(`${$pr}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:`track-entry`,track:emr,trackGroup:tmr,color:nmr[e.name]??`primary`,tooltipText:`${e.name} \u2014 ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}finally{this.end()}}report(){var e;return((e=this.records.at(-1))==null?void 0:e.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(e=this.report(),t){if(!e)return;let n=e.duration,r=t&&t!==e.name?`${e.name} [${t}]`:e.name,i=[`ms % phase`],a=U((e,t)=>{let r=` `.repeat(t),o=e.duration.toFixed(1).padStart(8),s=n>0?`${(e.duration/n*100).toFixed(0).padStart(3)}%`:` -`;i.push(`${o} ${s} ${r}${e.name}`);for(let n of e.children)a(n,t+1);if(e.children.length>0){let t=e.children.reduce((e,t)=>e+t.duration,0),n=e.duration-t;if(n>.5){let e=n.toFixed(1).padStart(8);i.push(`${e} ${r} (self)`)}}},`walk`);a(e,0);let o=Object.keys(this.buckets);if(o.length>0){i.push(`—— buckets (summed) ——`);for(let e of o)i.push(`${this.buckets[e].toFixed(1).padStart(8)} ${e}`)}console.log(`${$pr}mermaid render profile \xB7 ${r} ${i.join(` `)}`)}},U(Xpr,`Profiler`),(Zpr=globalThis).injected??(Zpr.injected={includeLargeFeatures:!0,profiling:!1,version:`0.0.0`}),KL=Jpr.default.extend({raf(e){typeof queueMicrotask==`function`?queueMicrotask(e):setTimeout(e,0)}}).extend(Ypr.default),U(kpr,`preprocessMarkdown`),U(Apr,`nonMarkdownToLines`),U(jpr,`markdownToLines`),U(Mpr,`nonMarkdownToHTML`),U(Npr,`markdownToHTML`),U(Ppr,`splitTextToChars`),U(Fpr,`splitWordToFitWidth`),U(Ipr,`splitWordToFitWidthRecursion`),U(Lpr,`splitLineToFitWidth`),U(Rpr,`splitLineToFitWidthRecursion`),U(zpr,`applyStyle`),rmr=16384,U(Bpr,`addHtmlSpan`),U(Vpr,`createTspan`),U(Hpr,`computeWidthOfText`),U(Upr,`computeDimensionOfText`),U(Wpr,`createFormattedText`),U(Gpr,`decodeHTMLEntities`),U(Kpr,`updateTextContentAndStyles`),U(qpr,`replaceIconSubstring`),qL=U(async(e,t=``,{style:n=``,isTitle:r=!1,classes:i=``,useHtmlLabels:a=!0,markdown:o=!0,isNode:s=!0,width:l=200,addSvgBackground:u=!1}={},d)=>{if(W.debug(`XYZ createText`,t,n,r,i,a,s,`addSvgBackground: `,u),a){let r=o?Npr(t,d):Mpr(t),a=await qpr(SL(r),d),f=t.replace(/\\\\/g,`\\`);return await Bpr(e,{isNode:s,label:rI(t)?f:a,labelStyle:n.replace(`fill:`,`color:`)},l,i,u,d)}{let i=SL(t.replace(//g,`
    `)),a=Wpr(l,e,o?jpr(i.replace(`
    `,`
    `),d):Apr(i),t?u:!1,!s);if(s){/stroke:/.exec(n)&&(n=n.replace(`stroke:`,`lineColor:`));let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);DI(a).attr(`style`,e)}else{let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);DI(a).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);DI(a).select(`text`).attr(`style`,t)}return r?DI(a).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):DI(a).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),a}},`createText`)}));function imr(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function amr(e,t){return e[0]===t[0]&&e[1]===t[1]}function omr(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)imr(e,s,i);let l=function(e,t,n){let r=[];for(let t of e){let e=[...t];amr(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;te.ymint.ymin?1:e.xt.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],s=a[0].ymin,l=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;ts);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=s))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||l%t==0)&&o.length>1)for(let e=0;e=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),l++}return i}(o,a,r);if(i){for(let e of o)imr(e,s,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),imr(r,t,n)})(l,s,-i)}return l}function YL(e,t){var n;let r=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return t.roughness>=1&&(((n=t.randomizer)==null?void 0:n.next())||Math.random())>.7&&(a=i),omr(e,i,r,a||1)}function smr(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}function cmr(e,t){return e.type===t}function lmr(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:Gmr,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:Kmr,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:qmr,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!cmr(a,qmr);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return lmr(`M0,0`+e);i++,o=rR[a.text],r=a.text}else cmr(a,Kmr)?o=rR[r]:(i++,o=rR[a.text],r=a.text);if(!(i+or%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function dmr(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,l=0;for(let{key:u,data:d}of e){switch(u){case`M`:t.push({key:`M`,data:[...d]}),[r,i]=d,[a,o]=d;break;case`C`:t.push({key:`C`,data:[...d]}),r=d[4],i=d[5],s=d[2],l=d[3];break;case`L`:t.push({key:`L`,data:[...d]}),[r,i]=d;break;case`H`:r=d[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=d[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-l)):(e=r,a=i),t.push({key:`C`,data:[e,a,...d]}),s=d[0],l=d[1],r=d[2],i=d[3];break}case`T`:{let[e,a]=d,o=0,u=0;n===`Q`||n===`T`?(o=r+(r-s),u=i+(i-l)):(o=r,u=i);let f=r+2*(o-r)/3,p=i+2*(u-i)/3,m=e+2*(o-e)/3,h=a+2*(u-a)/3;t.push({key:`C`,data:[f,p,m,h,e,a]}),s=o,l=u,r=e,i=a;break}case`Q`:{let[e,n,a,o]=d,u=r+2*(e-r)/3,f=i+2*(n-i)/3,p=a+2*(e-a)/3,m=o+2*(n-o)/3;t.push({key:`C`,data:[u,f,p,m,a,o]}),s=e,l=n,r=a,i=o;break}case`A`:{let e=Math.abs(d[0]),n=Math.abs(d[1]),a=d[2],o=d[3],s=d[4],l=d[5],u=d[6];e===0||n===0?(t.push({key:`C`,data:[r,i,l,u,l,u]}),r=l,i=u):(r!==l||i!==u)&&(fmr(r,i,l,u,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=l,i=u);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=u}return t}function XL(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function fmr(e,t,n,r,i,a,o,s,l,u){let d=(f=o,Math.PI*f/180);var f;let p=[],m=0,h=0,g=0,_=0;if(u)[m,h,g,_]=u;else{[e,t]=XL(e,t,-d),[n,r]=XL(n,r,-d);let o=(e-n)/2,u=(t-r)/2,f=o*o/(i*i)+u*u/(a*a);f>1&&(f=Math.sqrt(f),i*=f,a*=f);let p=i*i,v=a*a,y=p*v-p*u*u-v*o*o,b=p*u*u+v*o*o,x=(s===l?-1:1)*Math.sqrt(Math.abs(y/b));g=x*i*u/a+(e+n)/2,_=x*-a*o/i+(t+r)/2,m=Math.asin(parseFloat(((t-_)/a).toFixed(9))),h=Math.asin(parseFloat(((r-_)/a).toFixed(9))),eh&&(m-=2*Math.PI),!l&&h>m&&(h-=2*Math.PI)}let v=h-m;if(Math.abs(v)>120*Math.PI/180){let e=h,t=n,s=r;h=l&&h>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=fmr(n=g+i*Math.cos(h),r=_+a*Math.sin(h),t,s,i,a,o,0,l,[h,e,g,_])}v=h-m;let y=Math.cos(m),b=Math.sin(m),x=Math.cos(h),S=Math.sin(h),C=Math.tan(v/4),w=4/3*i*C,T=4/3*a*C,E=[e,t],D=[e+w*b,t-T*y],O=[n+w*S,r-T*x],k=[n,r];if(D[0]=2*E[0]-D[0],D[1]=2*E[1]-D[1],u)return[D,O,k].concat(p);{p=[D,O,k].concat(p);let e=[];for(let t=0;t2){let i=[];for(let t=0;t2*Math.PI&&(m=0,h=2*Math.PI);let g=2*Math.PI/l.curveStepCount,_=Math.min(g/2,(h-m)/2),v=kmr(_,u,d,f,p,m,h,1,l);if(!l.disableMultiStroke){let e=kmr(_,u,d,f,p,m,h,1.5,l);v.push(...e)}return o&&(s?v.push(...$L(u,d,u+f*Math.cos(m),d+p*Math.sin(m),l),...$L(u,d,u+f*Math.cos(h),d+p*Math.sin(h),l)):v.push({op:`lineTo`,data:[u,d]},{op:`lineTo`,data:[u+f*Math.cos(m),d+p*Math.sin(m)]})),{type:`path`,ops:v}}function bmr(e,t){let n=dmr(umr(lmr(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...$L(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,l,u]=o;r.push(...Amr(e,n,i,s,l,u,a,t)),a=[l,u];break}case`Z`:r.push(...$L(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function xmr(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+QL(e,t),r[0][1]+QL(e,t)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let d=i.maxRandomnessOffset||0;d*d*100>s&&(d=l/10);let f=d/2,p=.2+.2*Cmr(i),m=i.bowing*i.maxRandomnessOffset*(r-t)/200,h=i.bowing*i.maxRandomnessOffset*(e-n)/200;m=QL(m,i,u),h=QL(h,i,u);let g=[],_=()=>QL(f,i,u),v=()=>QL(d,i,u),y=i.preserveVertices;return a&&(o?g.push({op:`move`,data:[e+(y?0:_()),t+(y?0:_())]}):g.push({op:`move`,data:[e+(y?0:QL(d,i,u)),t+(y?0:QL(d,i,u))]})),o?g.push({op:`bcurveTo`,data:[m+e+(n-e)*p+_(),h+t+(r-t)*p+_(),m+e+2*(n-e)*p+_(),h+t+2*(r-t)*p+_(),n+(y?0:_()),r+(y?0:_())]}):g.push({op:`bcurveTo`,data:[m+e+(n-e)*p+v(),h+t+(r-t)*p+v(),m+e+2*(n-e)*p+v(),h+t+2*(r-t)*p+v(),n+(y?0:v()),r+(y?0:v())]}),g}function Emr(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+QL(t,n),e[0][1]+QL(t,n)]),r.push([e[0][0]+QL(t,n),e[0][1]+QL(t,n)]);for(let i=1;i3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+21&&i.push(n)):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],l=e[t+3],u=tR(a,o,r),d=tR(o,s,r),f=tR(s,l,r),p=tR(u,d,r),m=tR(d,f,r),h=tR(p,m,r);Pmr([a,u,p,h],0,n,i),Pmr([h,m,f,l],0,n,i)}var a,o;return i}function Fmr(e,t){return Imr(e,0,e.length,t)}function Imr(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],l=0,u=1;for(let r=t+1;rl&&(l=t,u=r)}return Math.sqrt(l)>r?(Imr(e,t,u+1,r,a),Imr(e,u,n,r,a)):(a.length||a.push(o),a.push(s)),a}function Lmr(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n0?Imr(r,0,r.length,n):r}var Rmr,zmr,Bmr,Vmr,Hmr,Umr,nR,Wmr,Gmr,Kmr,qmr,rR,Jmr,iR,aR,Ymr,oR,Xmr,sR,cR=o((()=>{Rmr=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=YL(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}},zmr=class extends Rmr{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=YL(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)smr([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},Bmr=class extends Rmr{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},Vmr=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=YL(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=smr(o),s=e/r,l=Math.ceil(s)-1,u=e-l*r,d=(o[0][0]+o[1][0])/2-r/4,f=Math.min(o[0][1],o[1][1]);for(let e=0;e{let a=smr(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,l=e[0],u=e[1];l[0]>u[0]&&(l=e[1],u=e[0]);let d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let e=0;e{let i=smr(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let l=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e2*Math.PI&&(f=0,p=2*Math.PI);let m=(p-f)/o.curveStepCount,h=[];for(let e=f;e<=p;e+=m)h.push([s+u*Math.cos(e),l+d*Math.sin(e)]);return h.push([s+u*Math.cos(p),l+d*Math.sin(p)]),h.push([s,l]),ZL([h],o)}(e,t,n,r,i,a,l))}return l.stroke!==iR&&u.push(d),this._d(`arc`,u,l)}curve(e,t){let n=this._o(t),r=[],i=gmr(e,n);if(n.fill&&n.fill!==iR){if(n.fillStyle===`solid`){let t=gmr(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...Lmr(jmr([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...Lmr(jmr(r),10,(1+n.roughness)/2))}t.length&&r.push(ZL([t],n))}}return n.stroke!==iR&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=mmr(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(xmr([e],n)):r.push(ZL([e],n))),n.stroke!==iR&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==iR,a=n.stroke!==iR,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=dmr(umr(lmr(e))),i=[],a=[],o=[0,0],s=[],l=()=>{s.length>=4&&a.push(...Lmr(s,t)),s=[]},u=()=>{l(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:u(),o=[t[0],t[1]],a.push(o);break;case`L`:l(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:l(),a.push([o[0],o[1]])}if(u(),!n)return i;let d=[];for(let e of i){let t=Fmr(e,n);t.length&&d.push(t)}return d}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),l=bmr(e,n);if(i){if(n.fillStyle===`solid`){if(s.length===1){let t=bmr(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(xmr(s,n))}else r.push(ZL(s,n))}return a&&(o?s.forEach((e=>{r.push(mmr(e,!1,n))})):r.push(l)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:iR};break;case`fillPath`:t={d:this.opsToPath(e),stroke:iR,strokeWidth:0,fill:n.fill||iR};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||iR,strokeWidth:n,fill:iR}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},Ymr=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new aR(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let l=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(l),l}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},oR=`http://www.w3.org/2000/svg`,Xmr=class{constructor(e,t){this.svg=e,this.gen=new aR(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(oR,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(oR,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(oR,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(oR,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let l=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(l)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},sR={canvas:(e,t)=>new Ymr(e,t),svg:(e,t)=>new Xmr(e,t),generator:e=>new aR(e),newSeed:()=>aR.newSeed()}}));async function Zmr(e){let t=e.getElementsByTagName(`img`);if(!t||t.length===0)return;let n=!Qmr(e);await Promise.all([...t].map(e=>new Promise(t=>{function r(){if(e.style.display=`flex`,e.style.flexDirection=`column`,n){let t=_I().fontSize?_I().fontSize:window.getComputedStyle(document.body).fontSize,[n=FF.fontSize]=bL(t),r=n*5+`px`;e.style.minWidth=r,e.style.maxWidth=r}else e.style.width=`100%`;t(e)}U(r,`setupImage`),setTimeout(()=>{e.complete&&r()}),e.addEventListener(`error`,r),e.addEventListener(`load`,r)})))}function Qmr(e){if(e.nodeType===jgr){var t;return((t=e.textContent)==null?void 0:t.trim())!==``}return e.nodeType!==Agr||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(Qmr)}function lR(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}function uR(e,t,n,r,i,a){let o=[],s=n-e,l=r-t,u=s/a,d=2*Math.PI/u,f=t+l/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=f+i*Math.sin(d*(n-e));o.push({x:n,y:r})}return o}function dR(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),o=U((e,t)=>(e==null?void 0:e.getAttribute(t))??void 0,`getAttr`);if(i){let e={fill:o(i,`fill`),"fill-opacity":o(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:o(a,`stroke`),"stroke-width":o(a,`stroke-width`)??`1`,"stroke-opacity":o(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return s.appendChild(n),s}function ehr(e,t){return e.intersect(t)}function thr(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,l=Math.sqrt(t*t*s*s+n*n*o*o),u=Math.abs(t*n*o/l);r.x0}function ahr(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let l=r-e.width/2-o,u=i-e.height/2-s;for(let r=0;r1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,l=Math.sqrt(o*o+s*s);return au,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,hL(o)),SR(t,d),t.intersect=function(e){return W.info(`Circle intersect`,t,1,e),DR.circle(t,1,e)},a}function shr(e,t,n,r,i,a,o){let s=(e+n)/2,l=(t+r)/2,u=Math.atan2(r-t,n-e),d=(n-e)/2,f=(r-t)/2,p=d/i,m=f/a,h=Math.sqrt(p**2+m**2);if(h>1)throw Error(`The given radii are too small to create an arc between the points.`);let g=Math.sqrt(1-h**2),_=s+g*a*Math.sin(u)*(o?-1:1),v=l-g*i*Math.cos(u)*(o?-1:1),y=Math.atan2((t-v)/a,(e-_)/i),b=Math.atan2((r-v)/a,(n-_)/i)-y;o&&b<0&&(b+=2*Math.PI),!o&&b>0&&(b-=2*Math.PI);let x=[];for(let e=0;e<20;e++){let t=y+e/19*b,n=_+i*Math.cos(t),r=v+a*Math.sin(t);x.push({x:n,y:r})}return x}function chr(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}async function lhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=U(e=>e+o,`calcTotalHeight`),l=U(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await xR(e,t,CR(t)),f=s(t!=null&&t.height?t==null?void 0:t.height:d.height),[p,m]=l(f),h=chr(f,p,m),g=(t!=null&&t.width?t==null?void 0:t.width:d.width)+a*2+h-h,_=f,{cssStyles:v}=t,y=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...shr(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...shr(g/2,_/2,g/2,-_/2,p,m,!0)],b=sR.svg(u),x=nL(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=lR(y),C=b.path(S,x),w=u.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${p/2}, 0)`),SR(t,w),t.intersect=function(e){return DR.polygon(t,y,e)},u}async function uhr(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=tL(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await xR(e,t,CR(t)),l=(n==null?void 0:n.nodeBorder)??(n==null?void 0:n.lineColor)??`currentColor`,u=t.padding??12,d=Math.max(o.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(o.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=t,y=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){var b;let e=sR.svg(a).path(_,nL(t,{}));(b=y.node())==null||b.appendChild(e),v&&y.attr(`style`,v)}else y.append(`path`).attr(`d`,_).attr(`style`,i);y.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),SR(t,y);let x=m+(h-m)/2;s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${x-o.height/2-(o.y-(o.top??0))})`);let S=U((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),C=[...S(d/2,m,-1),...S(g/2,h,1).reverse()];return t.intersect=function(e){return DR.polygon(t,C,e)},a}async function dhr(e,t){let{themeVariables:n}=_I(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=tL(t),{shapeSvg:o,bbox:s}=await xR(e,t,CR(t)),l=t.padding??8,u=s.height,d=Math.max(s.width+l*2,Hgr,(t==null?void 0:t.width)??0),f=Math.max(u+Vgr+Bgr+l*2,(t==null?void 0:t.height)??0),p=-d/2,m=-f/2,h=-(Vgr+Bgr)/2,g=o.select(`.label`);g&&(t.useHtmlLabels??KF(_I())?g.attr(`transform`,`translate(${-s.width/2}, ${-s.height/2+h})`):g.attr(`transform`,`translate(0, ${-s.height/2+h})`));let _;if(t.look===`handDrawn`){let e=sR.svg(o),n=nL(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(TR(p,m,d,f,Ugr),n);_=o.insert(()=>a,`:first-child`),_.attr(`class`,`basic label-container collapsed-group`).attr(`style`,hL(t.cssStyles))}else _=o.insert(`rect`,`:first-child`),_.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,Ugr).attr(`ry`,Ugr).attr(`x`,p).attr(`y`,m).attr(`width`,d).attr(`height`,f).attr(`fill`,r).attr(`stroke`,i);let v=m+l+u+Vgr;o.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,p+8).attr(`y1`,v).attr(`x2`,p+d-8).attr(`y2`,v).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let y=v+Bgr/2;for(let e=-1;e<=1;e++)o.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,y).attr(`r`,2.5).attr(`fill`,i);return SR(t,_),t.calcIntersect=function(e,t){return DR.rect(e,t)},t.intersect=function(e){return DR.rect(t,e)},o}function fR(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}async function fhr(e,t){let n=t,{shapeSvg:r,bbox:i}=await xR(e,n,CR(n)),a=n.padding??0,o=i.height+2*a,s=o/2,l=i.width+2*s+a,u=n.width??0,d=n.positioned&&(n.widthInColumns??1)>1&&u>l?u:l,f=Ygr(n.directions??[],i,n,d),p=fR(r,d,o,f);return p.attr(`style`,n.style??null),SR(n,p),n.intersect=function(e){return DR.polygon(n,f,e)},r}async function phr(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=tL(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await xR(e,t,CR(t)),l=(n==null?void 0:n.nodeBorder)??(n==null?void 0:n.lineColor)??`currentColor`,u=t.padding??12,d=Math.max(o.width+u*2,t.width??0,90),f=Math.max(o.height+u*2+18,t.height??0),p=-f/2,{cssStyles:m}=t,h=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){var g;let e=sR.svg(a).path(TR(-d/2,p,d,f,12),nL(t,{}));(g=h.node())==null||g.appendChild(e),m&&h.attr(`style`,m)}else h.append(`rect`).attr(`x`,-d/2).attr(`y`,p).attr(`width`,d).attr(`height`,f).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);h.append(`line`).attr(`x1`,-d/2).attr(`y1`,p+18).attr(`x2`,d/2).attr(`y2`,p+18).attr(`style`,`stroke:${l};stroke-width:1px`);for(let e=0;e<3;e++)h.append(`circle`).attr(`cx`,-d/2+12+e*9).attr(`cy`,p+9).attr(`r`,2.5).attr(`style`,`fill:${l};stroke:none`);h.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-d/2+44).attr(`y`,p+4).attr(`width`,Math.max(d-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),SR(t,h);let _=p+18+(f-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${_-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return DR.rect(t,e)},a}async function mhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=((t==null?void 0:t.width)??l.width)+(t.look===`neo`?a*2:a+OR),d=((t==null?void 0:t.height)??l.height)+(t.look===`neo`?o*2:o),f=u,p=-d,m=[{x:0+OR,y:p},{x:f,y:p},{x:f,y:0},{x:0,y:0},{x:0,y:p+OR},{x:0+OR,y:p}],h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=sR.svg(s),n=nL(t,{}),r=lR(m),i=e.path(r,n);h=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${d/2})`),g&&h.attr(`style`,g)}else h=fR(s,u,d,m);return r&&h.attr(`style`,r),SR(t,h),t.intersect=function(e){return DR.polygon(t,m,e)},s}function hhr(e,t){let{nodeStyles:n}=tL(t);t.label=``;let r=e.insert(`g`).attr(`class`,CR(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=sR.svg(r),l=nL(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=lR(o),d=s.path(u,l),f=r.insert(()=>d,`:first-child`);return i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return DR.polygon(t,o,e)},r}async function ghr(e,t,n){let{labelStyles:r,nodeStyles:i}=tL(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s}=await xR(e,t,CR(t)),l=(n==null?void 0:n.padding)??s,u=t.look===`neo`?o.width/2+32:o.width/2+l,d,{cssStyles:f}=t;if(t.look===`handDrawn`){let e=sR.svg(a),n=nL(t,{}),r=e.circle(0,0,u*2,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,hL(f))}else d=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return SR(t,d),t.calcIntersect=function(e,t){let n=e.width/2;return DR.circle(e,n,t)},t.intersect=function(e){return W.info(`Circle intersect`,t,u,e),DR.circle(t,u,e)},a}async function _hr(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await xR(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,l=n.positioned?n.width??0:i.width+s,u=n.positioned?n.height??0:i.height+s,d=n.positioned?-l/2:-i.width/2-a,f=n.positioned?-u/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u),SR(n,o),n.intersect=function(e){return DR.rect(n,e)},r}async function vhr(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=tL(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await xR(e,t,CR(t)),l=(n==null?void 0:n.nodeBorder)??(n==null?void 0:n.lineColor)??`currentColor`,u=t.padding??12,d=Math.max(o.width+u*2,t.width??0,90),f=Math.max(o.height+u*2+20,t.height??0),p=-f/2,{cssStyles:m}=t,h=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){var g;let e=sR.svg(a).path(TR(-d/2,p,d,f,12),nL(t,{}));(g=h.node())==null||g.appendChild(e),m&&h.attr(`style`,m)}else h.append(`rect`).attr(`x`,-d/2).attr(`y`,p).attr(`width`,d).attr(`height`,f).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);h.append(`text`).attr(`x`,-d/2+12).attr(`y`,p+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(`>_`),SR(t,h);let _=p+20+(f-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${_-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return DR.rect(t,e)},a}function yhr(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y} M ${i.x},${i.y} L ${o.x},${o.y}`}function bhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,CR(t)).attr(`id`,t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,s=sR.svg(i),l=nL(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=s.circle(0,0,a*2,l),d=yhr(a),f=s.path(d,l),p=i.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),SR(t,p),t.intersect=function(e){return W.info(`crossedCircle intersect`,t,{radius:a,point:e}),DR.circle(t,a,e)},i}function pR(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;ix,`:first-child`).attr(`stroke-opacity`,0),S.insert(()=>y,`:first-child`),S.attr(`class`,`text`),p&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(${f}, 0)`),o.attr(`transform`,`translate(${-u/2+f-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),SR(t,S),t.intersect=function(e){return DR.polygon(t,h,e)},i}function mR(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;ix,`:first-child`).attr(`stroke-opacity`,0),S.insert(()=>y,`:first-child`),S.attr(`class`,`text`),p&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-f}, 0)`),o.attr(`transform`,`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),SR(t,S),t.intersect=function(e){return DR.polygon(t,h,e)},i}function hR(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;iw,`:first-child`).attr(`stroke-opacity`,0),T.insert(()=>b,`:first-child`),T.insert(()=>S,`:first-child`),T.attr(`class`,`text`),p&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(${f-f/4}, 0)`),o.attr(`transform`,`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),SR(t,T),t.intersect=function(e){return DR.polygon(t,g,e)},i}async function whr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=Math.max(20,(l.width+a*2)*1.25,(t==null?void 0:t.width)??0),d=Math.max(5,l.height+o*2,(t==null?void 0:t.height)??0),f=d/2,{cssStyles:p}=t,m=sR.svg(s),h=nL(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=u,_=d,v=g-f,y=_/4,b=[{x:v,y:0},{x:y,y:0},{x:0,y:_/2},{x:y,y:_},{x:v,y:_},...dR(-v,-_/2,f,50,270,90)],x=lR(b),S=m.path(x,h),C=s.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&C.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&C.selectChildren(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-u/2}, ${-d/2})`),SR(t,C),t.intersect=function(e){return DR.polygon(t,b,e)},s}async function Thr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await xR(e,t,CR(t)),s=t.padding??20,l=Math.max(a.width+s*2,t.width??0,100),u=Math.min(Math.max(l*.23,16),56),d=u*.27,f=Math.max(a.height+s*2,t.height?t.height-(2*u-d):0),p=Math.min(l*.177,f*.45),m=f+2*u-d,h=-m/2,g=h+2*u-d,_=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:v}=t;if(t.look===`handDrawn`){let e=sR.svg(i),n=nL(t,{}),r=e.path(TR(-l/2,g,l,f,p),n),a=e.circle(0,h+u,u*2,n);_.insert(()=>a,`:first-child`),_.insert(()=>r,`:first-child`),v&&_.attr(`style`,v)}else _.append(`rect`).attr(`x`,-l/2).attr(`y`,g).attr(`width`,l).attr(`height`,f).attr(`rx`,p).attr(`ry`,p).attr(`style`,r),_.append(`circle`).attr(`cx`,0).attr(`cy`,h+u).attr(`r`,u).attr(`style`,r);SR(t,_);let y=g+f/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`);let b=h+u,x=Math.asin(Math.min(1,(g-b)/u))*180/Math.PI,S=[...dR(0,-b,u,24,180+x,-x),...dR(-(-l/2+p),-(g+p),p,12,90,0),...dR(-(-l/2+p),-(m/2-p),p,12,360,270),...dR(-(l/2-p),-(m/2-p),p,12,270,180),...dR(-(l/2-p),-(g+p),p,12,180,90)];return t.intersect=function(e){return DR.polygon(t,S,e)},i}async function Ehr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.widtho,`:first-child`),g=l.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=Xgr(0,0,f,h,p,m);g=l.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,hL(_)).attr(`style`,r)}return g.attr(`label-offset-y`,m),g.attr(`transform`,`translate(${-f/2}, ${-(h/2+m)})`),SR(t,g),d.attr(`transform`,`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(e){let n=DR.rect(t,e),r=n.x-(t.x??0);if(p!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-m)){let i=m*m*(1-r*r/(p*p));i>0&&(i=Math.sqrt(i)),i=m-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},l}async function gR(e,t,n){let{labelStyles:r,nodeStyles:i}=tL(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await xR(e,t,CR(t)),s=Math.max(o.width+n.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+n.labelPaddingY*2,(t==null?void 0:t.height)||0),u=-s/2,d=-l/2,f,{rx:p,ry:m}=t,{cssStyles:h}=t;if(n!=null&&n.rx&&n.ry&&(p=n.rx,m=n.ry),t.look===`handDrawn`){let e=sR.svg(a),n=nL(t,{}),r=p||m?e.path(TR(u,d,s,l,p||0),n):e.rectangle(u,d,s,l,n);f=a.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,hL(h))}else f=a.insert(`rect`,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,hL(p)).attr(`ry`,hL(m)).attr(`x`,u).attr(`y`,d).attr(`width`,s).attr(`height`,l);return SR(t,f,t.look===`handDrawn`?void 0:{width:s,height:l}),t.calcIntersect=function(e,t){return DR.rect(e,t)},t.intersect=function(e){return DR.rect(t,e)},a}async function Dhr(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,l=await gR(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=sR.svg(l),n=nL(t,{}),r=l.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return l;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return l;return l.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),l.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),l}let u=l.select(`.basic.label-container`),d=(Number(u.attr(`width`))||o)??0,f=(Number(u.attr(`height`))||s)??0;return d>0&&f>0&&u.attr(`stroke-dasharray`,`${d} ${f}`),l}async function Ohr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:l}=await xR(e,t,CR(t)),u=s.width+i,d=s.height+a,f=d*.2,p=-u/2,m=-d/2-f/2,{cssStyles:h}=t,g=sR.svg(o),_=nL(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=o.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),l.attr(`transform`,`translate(${p+(t.padding??0)/2-(s.x-(s.left??0))}, ${m+f+(t.padding??0)/2-(s.y-(s.top??0))})`),SR(t,b),t.intersect=function(e){return DR.rect(t,e)},o}async function khr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t),i=t.look===`neo`?12:5;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),d=u-i,f,{cssStyles:p}=t;if(t.look===`handDrawn`){var m,h;let e=sR.svg(s),n=nL(t,{roughness:.2,strokeWidth:2.5}),r=nL(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,n),a=e.circle(0,0,d*2,r);f=s.insert(`g`,`:first-child`),f.attr(`class`,hL(t.cssClasses)).attr(`style`,hL(p)),(m=f.node())==null||m.appendChild(i),(h=f.node())==null||h.appendChild(a)}else{f=s.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,r),e.attr(`class`,`outer-circle`).attr(`style`,r).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,r).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return SR(t,f),t.intersect=function(e){return W.info(`DoubleCircle intersect`,t,u,e),DR.circle(t,u,e)},s}function Ahr(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=tL(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,CR(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=sR.svg(a),{nodeBorder:l}=n,u=nL(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=s.circle(0,0,14,u),f=a.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),o&&o.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),SR(t,f),t.intersect=function(e){return W.info(`filledCircle intersect`,t,{radius:7,point:e}),DR.circle(t,7,e)},a}async function jhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.heightv,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,SR(t,y),l.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-d/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(e){return W.info(`Triangle intersect`,t,p,e),DR.polygon(t,p,e)},o}async function Mhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await xR(e,t,CR(t)),s=t.padding??12,l=Math.max(a.width+s*2,t.width??0,90),u=a.height+s*2,d=Math.max(Math.min(u*.16,14),8),f=Math.max(u+d,t.height??0),p=f-d,m=Math.max(l*.38,28),h=-f/2,g=[{x:-l/2,y:h},{x:-l/2+m,y:h},{x:-l/2+m,y:h+d},{x:l/2,y:h+d},{x:l/2,y:f/2},{x:-l/2,y:f/2}],_=[`M${g[0].x},${g[0].y}`,...g.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:v}=t,y;if(t.look===`handDrawn`){let e=sR.svg(i).path(_,nL(t,{}));y=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),v&&y.attr(`style`,v)}else y=i.insert(`path`,`:first-child`).attr(`d`,_).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?SR(t,y):SR(t,y,{width:l,height:f});let b=h+d+p/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return DR.polygon(t,g,e)},i}function Nhr(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=tL(t);t.label=``;let o=e.insert(`g`).attr(`class`,CR(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,l=Math.max(70,(t==null?void 0:t.width)??0),u=Math.max(10,(t==null?void 0:t.height)??0);n===`LR`&&(l=Math.max(10,(t==null?void 0:t.width)??0),u=Math.max(70,(t==null?void 0:t.height)??0));let d=-1*l/2,f=-1*u/2,p=sR.svg(o),m=nL(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=p.rectangle(d,f,l,u,m),g=o.insert(()=>h,`:first-child`);s&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,a),SR(t,g);let _=(r==null?void 0:r.padding)??0;return t.width&&t.height&&(t.width+=_/2||0,t.height+=_/2||0),t.intersect=function(e){return DR.rect(t,e)},o}async function Phr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10),t.width=((t==null?void 0:t.width)??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:o,bbox:s}=await xR(e,t,CR(t)),l=(t!=null&&t.width?t==null?void 0:t.width:Math.max(15,s.width))+i*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(10,s.height))+a*2,d=u/2,{cssStyles:f}=t,p=sR.svg(o),m=nL(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...dR(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=lR(h),_=p.path(g,m),v=o.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),SR(t,v),t.intersect=function(e){return W.info(`Pill intersect`,t,{radius:d,point:e}),DR.polygon(t,h,e)},o}async function Fhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=((t==null?void 0:t.width)??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:l,bbox:u}=await xR(e,t,CR(t)),d=(t!=null&&t.height?t==null?void 0:t.height:u.height)+o,f=d/i,p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*f+s,m=[{x:f,y:0},{x:p-f,y:0},{x:p,y:-d/2},{x:p-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}],h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=sR.svg(l),n=nL(t,{}),r=r_r(0,0,p,d,f),i=e.path(r,n);h=l.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-p/2}, ${d/2})`),g&&h.attr(`style`,g)}else h=fR(l,p,d,m);return r&&h.attr(`style`,r),t.width=p,t.height=d,SR(t,h),t.intersect=function(e){return DR.polygon(t,m,e)},l}async function Ihr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await xR(e,t,CR(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,l=sR.svg(i),u=nL(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],f=lR(d),p=l.path(f,u),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),s&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-a/2}, ${-o/2})`),SR(t,m),t.intersect=function(e){return W.info(`Pill intersect`,t,{points:d}),DR.polygon(t,d,e)},i}async function Lhr(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=tL(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=r==null?void 0:r.wrappingWidth;t.width=Math.max(s,l??0);let{shapeSvg:u,bbox:d,label:f}=await xR(e,t,`icon-shape default`),p=t.pos===`t`,m=s,h=s,{nodeBorder:g}=n,{stylesMap:_}=$I(t),v=-h/2,y=-m/2,b=t.label?8:0,x=sR.svg(u),S=nL(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(v,y,h,m,S),w=Math.max(h,d.width),T=m+d.height+b,E=x.rectangle(-w/2,-T/2,w,T,{...S,fill:`transparent`,stroke:`none`}),D=u.insert(()=>C,`:first-child`),O=u.insert(()=>E);if(t.icon){let e=u.append(`g`);e.html(`${await cL(t.icon,{height:s,width:s,fallbackPrefix:``})}`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+b/2-i/2-o:-d.height/2-b/2-i/2-o})`),e.attr(`style`,`color: ${_.get(`stroke`)??g};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-T/2:T/2-d.height})`),D.attr(`transform`,`translate(0,${p?d.height/2+b/2:-d.height/2-b/2})`),SR(t,O),t.intersect=function(e){if(W.info(`iconSquare intersect`,t,e),!t.label)return DR.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=p?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+b},{x:n+h/2,y:r-i/2+d.height+b},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+d.height+b},{x:n-d.width/2,y:r-i/2+d.height+b}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+d.width/2,y:r-i/2+m},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],DR.polygon(t,a,e)},u}async function Rhr(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=tL(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=r==null?void 0:r.wrappingWidth;t.width=Math.max(s,l??0);let{shapeSvg:u,bbox:d,label:f}=await xR(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:g}=n,{stylesMap:_}=$I(t),v=sR.svg(u),y=nL(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`),y.stroke=_.get(`fill`)??g;let b=u.append(`g`);t.icon&&b.html(`${await cL(t.icon,{height:s,width:s,fallbackPrefix:``})}`);let x=b.node().getBBox(),S=x.width,C=x.height,w=x.x,T=x.y,E=Math.max(S,C)*Math.SQRT2+40,D=v.circle(0,0,E,y),O=Math.max(E,d.width),k=E+d.height+p,A=v.rectangle(-O/2,-k/2,O,k,{...y,fill:`transparent`,stroke:`none`}),j=u.insert(()=>D,`:first-child`),M=u.insert(()=>A);return b.attr(`transform`,`translate(${-S/2-w},${m?d.height/2+p/2-C/2-T:-d.height/2-p/2-C/2-T})`),b.attr(`style`,`color: ${_.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-k/2:k/2-d.height})`),j.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),SR(t,M),t.intersect=function(e){return W.info(`iconSquare intersect`,t,e),DR.rect(t,e)},u}async function zhr(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=tL(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=r==null?void 0:r.wrappingWidth;t.width=Math.max(s,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await xR(e,t,`icon-shape default`),m=t.pos===`t`,h=s+f*2,g=s+f*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=$I(t),b=-g/2,x=-h/2,S=t.label?8:0,C=sR.svg(u),w=nL(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=y.get(`fill`)??v;let T=C.path(TR(b,x,g,h,5),w),E=Math.max(g,d.width),D=h+d.height+S,O=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),k=u.insert(()=>T,`:first-child`).attr(`class`,`icon-shape2`),A=u.insert(()=>O);if(t.icon){let e=u.append(`g`);e.html(`${await cL(t.icon,{height:s,width:s,fallbackPrefix:``})}`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+S/2-i/2-o:-d.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-D/2:D/2-d.height})`),k.attr(`transform`,`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),SR(t,A),t.intersect=function(e){if(W.info(`iconSquare intersect`,t,e),!t.label)return DR.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+S},{x:n+g/2,y:r-i/2+d.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+d.height+S},{x:n-d.width/2,y:r-i/2+d.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],DR.polygon(t,a,e)},u}async function Bhr(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=tL(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=r==null?void 0:r.wrappingWidth;t.width=Math.max(s,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await xR(e,t,`icon-shape default`),m=t.pos===`t`,h=s+f*2,g=s+f*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=$I(t),b=-g/2,x=-h/2,S=t.label?8:0,C=sR.svg(u),w=nL(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=y.get(`fill`)??v;let T=C.path(TR(b,x,g,h,.1),w),E=Math.max(g,d.width),D=h+d.height+S,O=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),k=u.insert(()=>T,`:first-child`),A=u.insert(()=>O);if(t.icon){let e=u.append(`g`);e.html(`${await cL(t.icon,{height:s,width:s,fallbackPrefix:``})}`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+S/2-i/2-o:-d.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-D/2:D/2-d.height})`),k.attr(`transform`,`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),SR(t,A),t.intersect=function(e){if(W.info(`iconSquare intersect`,t,e),!t.label)return DR.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+S},{x:n+g/2,y:r-i/2+d.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+d.height+S},{x:n-d.width/2,y:r-i/2+d.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],DR.polygon(t,a,e)},u}async function Vhr(e,t,{config:{flowchart:n}}){let r=new Image;r.src=(t==null?void 0:t.img)??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),a=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/a;let{labelStyles:o}=tL(t);t.labelStyle=o;let s=n==null?void 0:n.wrappingWidth;t.defaultWidth=n==null?void 0:n.wrappingWidth;let l=Math.max(t.label?s??0:0,(t==null?void 0:t.assetWidth)??i),u=t.constraint===`on`&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(u,s??0);let{shapeSvg:f,bbox:p,label:m}=await xR(e,t,`image-shape default`),h=t.pos===`t`,g=-u/2,_=-d/2,v=t.label?8:0,y=sR.svg(f),b=nL(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=y.rectangle(g,_,u,d,b),S=Math.max(u,p.width),C=d+p.height+v,w=y.rectangle(-S/2,-C/2,S,C,{...b,fill:`none`,stroke:`none`}),T=f.insert(()=>x,`:first-child`),E=f.insert(()=>w);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?C/2-d:-C/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),T.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),SR(t,E),t.intersect=function(e){if(W.info(`iconSquare intersect`,t,e),!t.label)return DR.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=h?[{x:n-p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2+p.height+v},{x:n+u/2,y:r-i/2+p.height+v},{x:n+u/2,y:r+i/2},{x:n-u/2,y:r+i/2},{x:n-u/2,y:r-i/2+p.height+v},{x:n-p.width/2,y:r-i/2+p.height+v}]:[{x:n-u/2,y:r-i/2},{x:n+u/2,y:r-i/2},{x:n+u/2,y:r-i/2+d},{x:n+p.width/2,y:r-i/2+d},{x:n+p.width/2/2,y:r+i/2},{x:n-p.width/2,y:r+i/2},{x:n-p.width/2,y:r-i/2+d},{x:n-u/2,y:r-i/2+d}],DR.polygon(t,a,e)},f}async function Hhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=Math.max(l.height+a*2,t.height??0),d=Math.max(l.width+o*2,(t.width??0)-u),f=[{x:0,y:0},{x:d,y:0},{x:d+3*u/6,y:-u},{x:-3*u/6,y:-u}],p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=sR.svg(s),n=nL(t,{}),r=lR(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-d/2}, ${u/2})`),m&&p.attr(`style`,m)}else p=fR(s,d,u,f);return r&&p.attr(`style`,r),t.width=d,t.height=u,SR(t,p),t.intersect=function(e){return DR.polygon(t,f,e)},s}async function Uhr(e,t){let{shapeSvg:n,bbox:r,label:i}=await xR(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),SR(t,a),t.intersect=function(e){return DR.rect(t,e)},n}async function Whr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=Math.max(l.height+a,t.height??0),d=Math.max(l.width+o,(t.width??0)-u),f=[{x:0,y:0},{x:d+3*u/6,y:0},{x:d,y:-u},{x:-(3*u)/6,y:-u}],p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=sR.svg(s),n=nL(t,{}),r=lR(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-d/2}, ${u/2})`),m&&p.attr(`style`,m)}else p=fR(s,d,u,f);return r&&p.attr(`style`,r),t.width=d,t.height=u,SR(t,p),t.intersect=function(e){return DR.polygon(t,f,e)},s}async function Ghr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=Math.max(l.height+a,t.height??0),d=Math.max(l.width+o,(t.width??0)-u),f=[{x:-3*u/6,y:0},{x:d,y:0},{x:d+3*u/6,y:-u},{x:0,y:-u}],p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=sR.svg(s),n=nL(t,{}),r=lR(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-d/2}, ${u/2})`),m&&p.attr(`style`,m)}else p=fR(s,d,u,f);return r&&p.attr(`style`,r),t.width=d,t.height=u,SR(t,p),t.intersect=function(e){return DR.polygon(t,f,e)},s}function Khr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,CR(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.height)??0),l=[{x:o,y:0},{x:0,y:s+7/2},{x:o-14,y:s+7/2},{x:0,y:2*s},{x:o,y:s-7/2},{x:14,y:s-7/2}],u=sR.svg(i),d=nL(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=lR(l),p=u.path(f,d),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),a&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,a),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${o/2},${-s})`),SR(t,m),t.intersect=function(e){return W.info(`lightningBolt intersect`,t,e),DR.polygon(t,l,e)},i}async function qhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.widtho,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=i_r(0,0,d,m,f,p,h);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,hL(_)).attr(`style`,r)}return g.attr(`label-offset-y`,p),g.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),SR(t,g),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(e){let n=DR.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}async function Jhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:l,label:u}=await xR(e,t,CR(t)),d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+p,{cssStyles:h}=t,g=sR.svg(s),_=nL(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:-d/2-d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:m/2},...uR(-d/2-d/2*.1,m/2,d/2+d/2*.1,m/2,p,.8),{x:d/2+d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:-m/2},{x:-d/2,y:-m/2},{x:-d/2,y:m/2*1.1},{x:-d/2,y:-m/2}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),b.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)+d/2*.1/2-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),SR(t,b),t.intersect=function(e){return DR.polygon(t,v,e)},s}async function Yhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*s,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*s,10));let{shapeSvg:l,bbox:u,label:d}=await xR(e,t,CR(t)),f=(t!=null&&t.width?t==null?void 0:t.width:u.width)+a*2+2*s,p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+o*2+2*s,m=f-2*s,h=p-2*s,g=-m/2,_=-h/2,{cssStyles:v}=t,y=sR.svg(l),b=nL(t,{}),x=[{x:g-s,y:_+s},{x:g-s,y:_+h+s},{x:g+m-s,y:_+h+s},{x:g+m-s,y:_+h},{x:g+m,y:_+h},{x:g+m,y:_+h-s},{x:g+m+s,y:_+h-s},{x:g+m+s,y:_-s},{x:g+s,y:_-s},{x:g+s,y:_},{x:g,y:_},{x:g,y:_+s}],S=[{x:g,y:_+s},{x:g+m-s,y:_+s},{x:g+m-s,y:_+h},{x:g+m,y:_+h},{x:g+m,y:_},{x:g,y:_}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let C=lR(x),w=y.path(C,b),T=lR(S),E=y.path(T,b);t.look!==`handDrawn`&&(w=$mr(w),E=$mr(E));let D=l.insert(`g`,`:first-child`);return D.insert(()=>w),D.insert(()=>E),D.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),d.attr(`transform`,`translate(${-(u.width/2)-s-(u.x-(u.left??0))}, ${-(u.height/2)+s-(u.y-(u.top??0))})`),SR(t,D),t.intersect=function(e){return DR.polygon(t,x,e)},l}async function Xhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await xR(e,t,CR(t)),s=t.padding??0,l=t.look===`neo`?16:s,u=t.look===`neo`?12:s,d=!0;(t.width||t.height)&&(d=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-u*3);let f=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+u*3,m=t.look===`neo`?p/4:p/8,h=p+(d?m/2:-m/2),g=-f/2,_=-h/2,{cssStyles:v}=t,y=uR(g-10,_+h+10,g+f-10,_+h+10,m,.8),b=y==null?void 0:y[y.length-1],x=[{x:g-10,y:_+10},{x:g-10,y:_+h+10},...y,{x:g+f-10,y:b.y-10},{x:g+f,y:b.y-10},{x:g+f,y:b.y-20},{x:g+f+10,y:b.y-20},{x:g+f+10,y:_-10},{x:g+10,y:_-10},{x:g+10,y:_},{x:g,y:_},{x:g,y:_+10}],S=[{x:g,y:_+10},{x:g+f-10,y:_+10},{x:g+f-10,y:b.y-10},{x:g+f,y:b.y-10},{x:g+f,y:_},{x:g,y:_}],C=sR.svg(i),w=nL(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=lR(x),E=C.path(T,w),D=lR(S),O=C.path(D,w),k=i.insert(()=>E,`:first-child`);return k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),k.attr(`transform`,`translate(0,${-m/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-m/2-(a.y-(a.top??0))})`),SR(t,k),t.intersect=function(e){return DR.polygon(t,x,e)},i}async function Zhr(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=tL(t);t.labelStyle=r,t.useHtmlLabels||KF(WF())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await xR(e,t,CR(t)),l=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),u=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-l/2,f=-u/2,{cssStyles:p}=t,m=sR.svg(a),h=nL(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=m.rectangle(d,f,l,u,h),_=a.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),p&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,p),i&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),SR(t,_),t.intersect=function(e){return DR.rect(t,e)},a}async function Qhr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await xR(e,t,CR(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=sR.svg(i),n=nL(t,{}),r=l_r(0,0,o),a=e.path(r,n);u=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),d&&u.attr(`style`,d)}else u=fR(i,o,o,l),u.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&u.attr(`style`,r),SR(t,u),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=DR.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}async function $hr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:l,label:u}=await xR(e,t,CR(t)),d=l.width+(t.look===`neo`?a*2:a),f=Math.max(l.height+(t.look===`neo`?o*2:o),t.height??0),p=f/4,m=-Math.max(d,(t.width??0)-p)/2,h=-f/2,g=h/2,_=[{x:m+g,y:h},{x:m,y:0},{x:m+g,y:-h},{x:-m,y:-h},{x:-m,y:h}],{cssStyles:v}=t,y=sR.svg(s),b=nL(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=lR(_),S=y.path(x,b),C=s.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-g/2},0)`),u.attr(`transform`,`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),SR(t,C),t.intersect=function(e){return DR.polygon(t,_,e)},s}async function egr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i;i=t.cssClasses?`node `+t.cssClasses:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),o=a.insert(`g`),s=a.insert(`g`).attr(`class`,`label`).attr(`style`,r),l=t.description,u=t.label,d=await ER(s,u,t.labelStyle,!0,!0),f={width:0,height:0};if(KF(_I())){let e=d.children[0],t=DI(d);f=e.getBoundingClientRect(),t.attr(`width`,f.width),t.attr(`height`,f.height)}W.info(`Text 2`,l);let p=l||[],m=d.getBBox(),h=await ER(s,Array.isArray(p)?p.join(`
    `):p,t.labelStyle,!0,!0),g=h.children[0],_=DI(h);f=g.getBoundingClientRect(),_.attr(`width`,f.width),_.attr(`height`,f.height);let v=(t.padding||0)/2;DI(h).attr(`transform`,`translate( `+(f.width>m.width?0:(m.width-f.width)/2)+`, `+(m.height+v+5)+`)`),DI(d).attr(`transform`,`translate( `+(f.width(W.debug(`Rough node insert CXC`,r),i),`:first-child`),C=a.insert(()=>(W.debug(`Rough node insert CXC`,r),r),`:first-child`)}else C=o.insert(`rect`,`:first-child`),w=o.insert(`line`),C.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-f.width/2-v).attr(`y`,-f.height/2-v).attr(`width`,f.width+(t.padding||0)).attr(`height`,f.height+(t.padding||0)),w.attr(`class`,`divider`).attr(`x1`,-f.width/2-v).attr(`x2`,f.width/2+v).attr(`y1`,-f.height/2-v+m.height+v).attr(`y2`,-f.height/2-v+m.height+v);return SR(t,C),t.intersect=function(e){return DR.rect(t,e)},a}async function tgr(e,t,{config:{themeVariables:n}}){let r=(n==null?void 0:n.radius)??5;return gR(e,t,{rx:r,ry:r,classes:``,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1})}async function ngr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:l}=await xR(e,t,CR(t)),u=((t==null?void 0:t.width)??s.width)+i*2+(t.look===`neo`?kR:kR*2),d=((t==null?void 0:t.height)??s.height)+a*2,f=u-kR,p=d,m=kR-u/2,h=-d/2,{cssStyles:g}=t,_=sR.svg(o),v=nL(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m+f,y:h},{x:m+f,y:h+p},{x:m-kR,y:h+p},{x:m-kR,y:h},{x:m,y:h},{x:m,y:h+p}],b=_.polygon(y.map(e=>[e.x,e.y]),v),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`).attr(`style`,hL(g)),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),l.attr(`transform`,`translate(${kR/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),SR(t,x),t.intersect=function(e){return DR.rect(t,e)},o}async function rgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));let{shapeSvg:s,bbox:l,label:u}=await xR(e,t,CR(t)),d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,f=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=d,m=f/1.5,h=-p/2,g=-m/2,{cssStyles:_}=t,v=sR.svg(s),y=nL(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:h,y:g},{x:h,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g-m/2}],x=lR(b),S=v.path(x,y),C=s.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&C.selectChildren(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&C.selectChildren(`path`).attr(`style`,r),C.attr(`transform`,`translate(0, ${m/4})`),u.attr(`transform`,`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-m/4+(t.padding??0)-(l.y-(l.top??0))})`),SR(t,C),t.intersect=function(e){return DR.polygon(t,b,e)},s}async function igr(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return gR(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}async function agr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=l.height+(t.look===`neo`?o*2:o),d=l.width+u/4+(t.look===`neo`?a*2:a),f=u/2,{cssStyles:p}=t,m=sR.svg(s),h=nL(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-d/2+f,y:-u/2},{x:d/2-f,y:-u/2},...dR(-d/2+f,0,f,50,90,270),{x:d/2-f,y:u/2},...dR(d/2-f,0,f,50,270,450)],_=lR(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),SR(t,y),t.intersect=function(e){return DR.polygon(t,g,e)},s}async function ogr(e,t){return gR(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}function sgr(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=tL(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:l,nodeShadow:u}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let d=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),f=sR.svg(d),p=nL(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),h=s??l,g=(t.width??0)*5/14,_=f.circle(0,0,g,{...p,fill:h,stroke:h,strokeWidth:2,fillStyle:`solid`}),v=d.insert(()=>m,`:first-child`);if(v.insert(()=>_),t.look!==`handDrawn`&&v.attr(`class`,`outer-path`),a&&v.selectAll(`path`).attr(`style`,a),i&&v.selectAll(`path`).attr(`style`,i),t.width<25&&u&&t.look!==`handDrawn`){var y;let t=((y=e.node())==null||(y=y.ownerSVGElement)==null?void 0:y.id)??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;v.attr(`style`,`filter:url(#${n})`)}return SR(t,v),t.intersect=function(e){return DR.circle(t,(t.width??0)/2,e)},d}function cgr(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=sR.svg(a).circle(0,0,t.width,wur(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){var s;let t=((s=e.node())==null||(s=s.ownerSVGElement)==null?void 0:s.id)??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return SR(t,o),t.intersect=function(e){return DR.circle(t,(t.width??7)/2,e)},a}async function lgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=(t==null?void 0:t.padding)??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=Math.max(l.width+2*AR+a,t.width??0),d=Math.max(l.height+o,t.height??0),f=u-2*AR,p=d,m=-u/2,h=-d/2,g=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look===`handDrawn`){let e=sR.svg(s),n=nL(t,{}),r=e.rectangle(m,h,f+16,p,n),i=e.line(m+AR,h,m+AR,h+p,n),a=e.line(m+AR+f,h,m+AR+f,h+p,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:l}=t;o.attr(`class`,`basic label-container`).attr(`style`,hL(l)),SR(t,o)}else{let e=fR(s,f,p,g);r&&e.attr(`style`,r),SR(t,e)}return t.intersect=function(e){return DR.polygon(t,g,e)},s}async function ugr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-u_r*(t.height+o*2),10));let{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,d=u_r*u,f=u_r*u,p=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+d-d,m=u,h=-p/2,g=-m/2,{cssStyles:_}=t,v=sR.svg(s),y=nL(t,{}),b=[{x:h-d/2,y:g},{x:h+p+d/2,y:g},{x:h+p+d/2,y:g+m},{x:h-d/2,y:g+m}],x=[{x:h+p-d/2,y:g+m},{x:h+p+d/2,y:g+m},{x:h+p+d/2,y:g+m-f}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=lR(b),C=v.path(S,y),w=lR(x),T=v.path(w,{...y,fillStyle:`solid`}),E=s.insert(()=>T,`:first-child`);return E.insert(()=>C,`:first-child`),E.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),SR(t,E),t.intersect=function(e){return DR.polygon(t,b,e)},s}async function dgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await xR(e,t,CR(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=l/8,d=.2*s,f=.2*l,p=l+u,{cssStyles:m}=t,h=sR.svg(i),g=nL(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-s/2-s/2*.1,y:p/2},...uR(-s/2-s/2*.1,p/2,s/2+s/2*.1,p/2,u,.8),{x:s/2+s/2*.1,y:-p/2},{x:-s/2-s/2*.1,y:-p/2}],v=-s/2+s/2*.1,y=-p/2-f*.4,b=[{x:v+s-d,y:(y+l)*1.3},{x:v+s,y:y+l-f},{x:v+s,y:(y+l)*.9},...uR(v+s,(y+l)*1.25,v+s-d,(y+l)*1.3,-l*.02,.5)],x=lR(_),S=h.path(x,g),C=lR(b),w=h.path(C,{...g,fillStyle:`solid`}),T=i.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(0,${-u/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-u/2-(a.y-(a.top??0))})`),SR(t,T),t.intersect=function(e){return DR.polygon(t,_,e)},i}async function fgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await xR(e,t,CR(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,u=-s/2,d=i.insert(`rect`,`:first-child`);return d.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,l).attr(`y`,u).attr(`width`,o).attr(`height`,s),SR(t,d),t.intersect=function(e){return DR.rect(t,e)},i}async function pgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2,o=t.height??0;if(t.height&&(t.height-=a,t.heighta,`:first-child`),g=s.insert(()=>i,`:first-child`),g.attr(`class`,`basic label-container`),h&&g.attr(`style`,h)}else{let e=d_r(0,0,m,d,p,f);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,hL(h)).attr(`style`,r),g.attr(`class`,`basic label-container outer-path`),h&&g.selectAll(`path`).attr(`style`,h),r&&g.selectAll(`path`).attr(`style`,r)}return g.attr(`label-offset-x`,p),g.attr(`transform`,`translate(${-m/2}, ${d/2} )`),u.attr(`transform`,`translate(${-(l.width/2)-p-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),SR(t,g),t.intersect=function(e){let n=DR.rect(t,e),r=n.y-(t.y??0);if(f!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-p)){let i=p*p*(1-r*r/(f*f));i!=0&&(i=Math.sqrt(Math.abs(i))),i=p-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},s}async function mgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=Math.max(l.height+a,t.height??0),d=Math.max(l.width+o,(t.width??0)-u),f=[{x:-3*u/6,y:0},{x:d+3*u/6,y:0},{x:d,y:-u},{x:0,y:-u}],p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=sR.svg(s),n=nL(t,{}),r=lR(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-d/2}, ${u/2})`),m&&p.attr(`style`,m)}else p=fR(s,d,u,f);return r&&p.attr(`style`,r),t.width=d,t.height=u,SR(t,p),t.intersect=function(e){return DR.polygon(t,f,e)},s}async function hgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,{cssStyles:f}=t,p=sR.svg(s),m=nL(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2*.8,y:-d/2},{x:u/2*.8,y:-d/2},{x:u/2,y:-d/2*.6},{x:u/2,y:d/2},{x:-u/2,y:d/2},{x:-u/2,y:-d/2*.6}],g=lR(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),SR(t,v),t.intersect=function(e){return DR.polygon(t,h,e)},s}async function ggr(e,t){var n;let{labelStyles:r,nodeStyles:i}=tL(t);t.labelStyle=r;let a=t.padding??0,o=t.look===`neo`?a*2:a;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-o)/2,t.width<__r&&(t.width=__r),t.height=(t==null?void 0:t.height)??0,t.heightb,`:first-child`).attr(`transform`,`translate(${-p/2}, ${p/2})`).attr(`class`,`outer-path`);return g&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,g),i&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),t.width=f,t.height=p,SR(t,x),u.attr(`transform`,`translate(${-l.width/2-(l.x-(l.left??0))}, ${p/2-(l.height+(t.padding??0)/(d?2:1)-(l.y-(l.top??0)))})`),t.intersect=function(e){return W.info(`Triangle intersect`,t,h,e),DR.polygon(t,h,e)},s}async function _gr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:l,bbox:u,label:d}=await xR(e,t,CR(t)),f=(t!=null&&t.width?t==null?void 0:t.width:u.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+(o??0)*2,m=t.look===`neo`?p/4:p/8,h=p+(s?m:-m),{cssStyles:g}=t,_=14-f,v=_>0?_/2:0,y=sR.svg(l),b=nL(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:-f/2-v,y:h/2},...uR(-f/2-v,h/2,f/2+v,h/2,m,.8),{x:f/2+v,y:-h/2},{x:-f/2-v,y:-h/2}],S=lR(x),C=y.path(S,b),w=l.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(0,${-m/2})`),d.attr(`transform`,`translate(${-f/2+(t.padding??0)-(u.x-(u.left??0))},${-p/2+(t.padding??0)-m-(u.y-(u.top??0))})`),SR(t,w),t.intersect=function(e){return DR.polygon(t,x,e)},l}async function vgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:l}=await xR(e,t,CR(t)),u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,f=d/8,p=d+f*2,{cssStyles:m}=t,h=sR.svg(s),g=nL(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2,y:p/2},...uR(-u/2,p/2,u/2,p/2,f,1),{x:u/2,y:-p/2},...uR(u/2,-p/2,-u/2,-p/2,f,-1)],v=lR(_),y=h.path(v,g),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),SR(t,b),t.intersect=function(e){return DR.polygon(t,_,e)},s}async function ygr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-i*2-jR,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-jR,10));let{shapeSvg:o,bbox:s,label:l}=await xR(e,t,CR(t)),u=(t!=null&&t.width?t==null?void 0:t.width:s.width)+i*2+jR,d=(t!=null&&t.height?t==null?void 0:t.height:s.height)+a*2+jR,f=u-jR,p=d-jR,m=-f/2,h=-p/2,{cssStyles:g}=t,_=sR.svg(o),v=nL(t,{}),y=[{x:m-jR,y:h-jR},{x:m-jR,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-jR}],b=`M${m-jR},${h-jR} L${m+f},${h-jR} L${m+f},${h+p} L${m-jR},${h+p} L${m-jR},${h-jR} M${m-jR},${h} L${m+f},${h} M${m},${h-jR} L${m},${h+p}`;t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=_.path(b,v),S=o.insert(()=>x,`:first-child`);return S.attr(`transform`,`translate(${jR/2}, ${jR/2})`),S.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),l.attr(`transform`,`translate(${-(s.width/2)+jR/2-(s.x-(s.left??0))}, ${-(s.height/2)+jR/2-(s.y-(s.top??0))})`),SR(t,S),t.intersect=function(e){return DR.polygon(t,y,e)},o}async function bgr(e,t){var n,r;let i=t;i.alias&&(t.label=i.alias);let{theme:a,themeVariables:o}=WF(),{rowEven:s,rowOdd:l,nodeBorder:u,borderColorArray:d}=o;if(t.look===`handDrawn`){let{themeVariables:n}=WF(),{background:r}=n;await bgr(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let f=WF();t.useHtmlLabels=f.htmlLabels;let p=((n=f.er)==null?void 0:n.diagramPadding)??10,m=((r=f.er)==null?void 0:r.entityPadding)??6,{cssStyles:h}=t,{labelStyles:g,nodeStyles:_}=tL(t);if(i.attributes.length===0&&t.label){let n={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5,classes:``};pL(t.label,f)+n.labelPaddingX*20){let e=x.width+p*2-(T+E+D+O);T+=e/j,E+=e/j,D>0&&(D+=e/j),O>0&&(O+=e/j)}let N=T+E+D+O,P=sR.svg(b),F=nL(t,{});t.look!==`handDrawn`&&(F.roughness=0,F.fillStyle=`solid`);let I=0;w.length>0&&(I=w.reduce((e,t)=>e+((t==null?void 0:t.rowHeight)??0),0));let L=Math.max(M.width+p*2,(t==null?void 0:t.width)||0,N),R=Math.max((I??0)+x.height,(t==null?void 0:t.height)||0),ee=-L/2,te=-R/2;if(b.selectAll(`g:not(:first-child)`).each((e,t,n)=>{let r=DI(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]),r.attr(`class`).includes(`attribute-name`)?a+=T:r.attr(`class`).includes(`attribute-keys`)?a+=T+E:r.attr(`class`).includes(`attribute-comment`)&&(a+=T+E+D))}r.attr(`transform`,`translate(${ee+p/2+a}, ${o+te+x.height+m/2})`)}),b.select(`.name`).attr(`transform`,`translate(`+-x.width/2+`, `+(te+m/2)+`)`),a!=null&&v_r.has(a)){let e=i.colorIndex??0;b.attr(`data-color-id`,`color-${e%d.length}`)}let ne=P.rectangle(ee,te,L,R,F),z=b.insert(()=>ne,`:first-child`).attr(`class`,`outer-path`).attr(`style`,h.join(``));C.push(0);for(let[e,t]of w.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=P.rectangle(ee,x.height+te+(t==null?void 0:t.yOffset),L,t==null?void 0:t.rowHeight,{...F,fill:n?s:l,stroke:u});b.insert(()=>r,`g.label`).attr(`style`,h.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let re=1e-4,ie=vR(ee,x.height+te,L+ee,x.height+te,re),ae=P.polygon(ie.map(e=>[e.x,e.y]),F);if(b.insert(()=>ae).attr(`class`,`divider`),ie=vR(T+ee,x.height+te,T+ee,R+te,re),ae=P.polygon(ie.map(e=>[e.x,e.y]),F),b.insert(()=>ae).attr(`class`,`divider`),k){let e=T+E+ee;ie=vR(e,x.height+te,e,R+te,re),ae=P.polygon(ie.map(e=>[e.x,e.y]),F),b.insert(()=>ae).attr(`class`,`divider`)}if(A){let e=T+E+D+ee;ie=vR(e,x.height+te,e,R+te,re),ae=P.polygon(ie.map(e=>[e.x,e.y]),F),b.insert(()=>ae).attr(`class`,`divider`)}for(let e of C){let t=x.height+te+e;ie=vR(ee,t,L+ee,t,re),ae=P.polygon(ie.map(e=>[e.x,e.y]),F),b.insert(()=>ae).attr(`class`,`divider`)}if(SR(t,z),_&&t.look!==`handDrawn`){if(a!=null&&y_r.has(a))b.selectAll(`path`).attr(`style`,_);else{var oe;let e=_.split(`;`),t=e==null||(oe=e.filter(e=>e.includes(`stroke`)))==null?void 0:oe.map(e=>`${e}`).join(`; `);b.selectAll(`path`).attr(`style`,t??``),b.selectAll(`.row-rect-even path`).attr(`style`,_)}}return t.intersect=function(e){return DR.rect(t,e)},b}async function _R(e,t,n,r=0,i=0,a=[],o=``){let s=e.insert(`g`).attr(`class`,`label ${a.join(` `)}`).attr(`transform`,`translate(${r}, ${i})`).attr(`style`,o);t!==eI(t)&&(t=eI(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let l=s.node().appendChild(await qL(s,t,{width:pL(t,n)+100,style:o,useHtmlLabels:n.htmlLabels},n));if(t.includes(`<`)||t.includes(`>`)){let e=l.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let u=l.getBBox();if(RF(n.htmlLabels)){let e=l.children[0];e.style.textAlign=`start`;let t=DI(l);u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}return u}function vR(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}async function xgr(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,CR(t)).attr(`id`,t.domId||t.id),s=null,l=null,u=null,d=null,f=0,p=0,m=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await yR(s,{text:`\xAB${e}\xBB`},0),f=s.node().getBBox().height}l=o.insert(`g`).attr(`class`,`label-group text`),await yR(l,t,0,[`font-weight: bolder`]);let h=l.node().getBBox();p=h.height,u=o.insert(`g`).attr(`class`,`members-group text`);let g=0;for(let e of t.members){let t=await yR(u,e,g,[e.parseClassifier()]);g+=t+a}m=u.node().getBBox().height,m<=0&&(m=i/2),d=o.insert(`g`).attr(`class`,`methods-group text`);let _=0;for(let e of t.methods){let t=await yR(d,e,_,[e.parseClassifier()]);_+=t+a}let v=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return l.attr(`transform`,`translate(${-h.width/2}, ${f})`),v=o.node().getBBox(),u.attr(`transform`,`translate(0, ${f+p+i*2})`),v=o.node().getBBox(),d.attr(`transform`,`translate(0, ${f+p+(m?m+i*4:i*2)})`),v=o.node().getBBox(),{shapeSvg:o,bbox:v}}async function yR(e,t,n,r=[]){let i=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.join(`; `)),a=WF(),o=`useHtmlLabels`in t?t.useHtmlLabels:RF(a.htmlLabels)??!0,s=``;s=`text`in t?t.text:t.label,!o&&s.startsWith(`\\`)&&(s=s.substring(1)),rI(s)&&(o=!0);let l=await qL(i,Rrr(SL(s)),{width:pL(s,a)+50,classes:`markdown-node-label`,useHtmlLabels:o},a),u,d=1;if(o){let e=l.children[0],t=DI(l);d=e.innerHTML.split(`
    `).length,e.innerHTML.includes(``)&&(d+=e.innerHTML.split(``).length-1),await Zmr(e),u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}else{r.includes(`font-weight: bolder`)&&DI(l).selectAll(`tspan`).attr(`font-weight`,``),d=l.children.length;let e=l.children[0];(l.textContent===``||l.textContent.includes(`>`))&&(e.textContent=s[0]+s.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),s[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),u=l.getBBox()}return i.attr(`transform`,`translate(0,`+(-u.height/(2*d)+n)+`)`),u.height}async function Sgr(e,t){var n,r;let i=_I(),{themeVariables:a}=i,{useGradient:o}=a,s=i.class.padding??12,l=s,u=t.useHtmlLabels??RF(i.htmlLabels)??!0,d=t;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];let{shapeSvg:f,bbox:p}=await xgr(e,t,i,u,l),{labelStyles:m,nodeStyles:h}=tL(t);t.labelStyle=m,t.cssStyles=d.styles||``;let g=((n=d.styles)==null?void 0:n.join(`;`))||h||``;t.cssStyles||(t.cssStyles=g.replaceAll(`!important`,``).split(`;`));let _=d.members.length===0&&d.methods.length===0&&!((r=i.class)!=null&&r.hideEmptyMembersBox),v=sR.svg(f),y=nL(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=Math.max(t.width??0,p.width),x=Math.max(t.height??0,p.height),S=(t.height??0)>p.height;d.members.length===0&&d.methods.length===0?x+=l:d.members.length>0&&d.methods.length===0&&(x+=l*2);let C=-b/2,w=-x/2,T=_?s*2:d.members.length===0&&d.methods.length===0?-s:0;S&&(T=s*2);let E=v.rectangle(C-s,w-s-(_?s:d.members.length===0&&d.methods.length===0?-s/2:0),b+2*s,x+2*s+T,y),D=f.insert(()=>E,`:first-child`);D.attr(`class`,`basic label-container outer-path`);let O=D.node().getBBox(),k=f.select(`.annotation-group`).node().getBBox().height-(_?s/2:0)||0,A=f.select(`.label-group`).node().getBBox().height-(_?s/2:0)||0,j=f.select(`.members-group`).node().getBBox().height-(_?s/2:0)||0,M=(k+A+w+s-(w-s-(_?s:d.members.length===0&&d.methods.length===0?-s/2:0)))/2;if(f.selectAll(`.text`).each((e,t,n)=>{var r;let a=DI(n[t]),o=a.attr(`transform`),p=0;if(o){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);e&&(p=parseFloat(e[2]))}let m=p+w+s-(_?s:d.members.length===0&&d.methods.length===0?-s/2:0);if(a.attr(`class`).includes(`methods-group`)){let e=Math.max(j,l/2);m=S?Math.max(M,k+A+e+w+l*2+s)+l*2:k+A+e+w+l*4+s}d.members.length===0&&d.methods.length===0&&(r=i.class)!=null&&r.hideEmptyMembersBox&&(m=d.annotations.length>0?p-l:p),u||(m-=4);let h=C;if(a.attr(`class`).includes(`label-group`)||a.attr(`class`).includes(`annotation-group`)){var g;h=-((g=a.node())==null?void 0:g.getBBox().width)/2||0,f.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(h=0)})}a.attr(`transform`,`translate(${h}, ${m})`)}),d.members.length>0||d.methods.length>0||_){let e=k+A+w+s,n=v.line(O.x,e,O.x+O.width,e+.001,y);f.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,g)}if(_||d.members.length>0||d.methods.length>0){let e=k+A+j+w+l*2+s,n=v.line(O.x,S?Math.max(M,e):e,O.x+O.width,(S?Math.max(M,e):e)+.001,y);f.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,g)}if(d.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,g),D.select(`:nth-child(2)`).attr(`style`,g),f.selectAll(`.divider`).select(`path`).attr(`style`,g),t.labelStyle?f.selectAll(`span`).attr(`style`,t.labelStyle):f.selectAll(`span`).attr(`style`,g),!u){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(g);if(t){let e=t[0].replace(`color`,`fill`);f.selectAll(`tspan`).attr(`style`,e)}else if(m){let t=e.exec(m);if(t){let e=t[0].replace(`color`,`fill`);f.selectAll(`tspan`).attr(`style`,e)}}}return SR(t,D),t.intersect=function(e){return DR.rect(t,e)},f}async function Cgr(e,t){var n,r;let{labelStyles:i,nodeStyles:a}=tL(t);t.labelStyle=i;let o=t,s=t,l=`verifyMethod`in t,u=CR(t),d=_I(),{themeVariables:f}=d,{borderColorArray:p,requirementEdgeLabelBackground:m}=f,h=d.layout===`elk`?`start`:`center`,g=e.insert(`g`).attr(`class`,u).attr(`id`,t.domId??t.id),_;_=l?await bR(g,`<<${o.type}>>`,0,t.labelStyle):await bR(g,`<<Element>>`,0,t.labelStyle);let v=_,y=await bR(g,o.name,v,t.labelStyle+`; font-weight: bold;`);if(v+=y+20,l){let e=await bR(g,`${o.requirementId?`ID: ${o.requirementId}`:``}`,v,t.labelStyle,h);v+=e;let n=await bR(g,`${o.text?`Text: ${o.text}`:``}`,v,t.labelStyle,h);v+=n;let r=await bR(g,`${o.risk?`Risk: ${o.risk}`:``}`,v,t.labelStyle,h);v+=r,await bR(g,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:``}`,v,t.labelStyle,h)}else{let e=await bR(g,`${s.type?`Type: ${s.type}`:``}`,v,t.labelStyle,h);v+=e,await bR(g,`${s.docRef?`Doc Ref: ${s.docRef}`:``}`,v,t.labelStyle,h)}let b=(((n=g.node())==null?void 0:n.getBBox().width)??200)+20,x=(((r=g.node())==null?void 0:r.getBBox().height)??200)+20,S=-b/2,C=-x/2,w=sR.svg(g),T=nL(t,{});t.look!==`handDrawn`&&(T.roughness=0,T.fillStyle=`solid`);let E=w.rectangle(S,C,b,x,T),D=g.insert(()=>E,`:first-child`);if(D.attr(`class`,`basic label-container outer-path`).attr(`style`,a),p!=null&&p.length){let e=t.colorIndex??0;g.attr(`data-color-id`,`color-${e%p.length}`)}if(g.selectAll(`.label`).each((e,t,n)=>{let r=DI(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]))}let s=o-x/2,l=S+10;(t===0||t===1)&&(l=a),r.attr(`transform`,`translate(${l}, ${s+20})`)}),v>_+y+20){let e=C+_+y+20,n;if(t.look===`neo`){let t=.001,r=[[S,e],[S+b,e],[S+b,e+t],[S,e+t]];n=w.polygon(r,T)}else n=w.line(S,e,S+b,e,T);g.insert(()=>n).attr(`class`,`divider`)}return SR(t,D),t.intersect=function(e){return DR.rect(t,e)},a&&t.look!==`handDrawn`&&(m||p!=null&&p.length)&&g.selectAll(`path`).attr(`style`,a),g}async function bR(e,t,n,r=``,i=`center`){if(t===``)return 0;let a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r),o=_I(),s=o.htmlLabels??!0,l=await qL(a,Rrr(SL(t)),{width:pL(t,o)+50,classes:`markdown-node-label`,useHtmlLabels:s,style:r},o),u;if(s){let e=l.children[0],t=DI(l);i===`start`&&DI(e).style(`text-align`,`left`),u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}else{let e=l.children[0];for(let t of e.children)r&&t.setAttribute(`style`,r);if(i===`start`){e.setAttribute(`text-anchor`,`start`);for(let t of e.children)t.setAttribute(`text-anchor`,`start`)}u=l.getBBox(),u.height+=6}return a.attr(`transform`,`translate(${-u.width/2},${-u.height/2+n})`),u.height}async function wgr(e,t,{config:n}){var r;let{labelStyles:i,nodeStyles:a}=tL(t);t.labelStyle=i||``;let o=t.width;t.width=(t.width??200)-10;let{shapeSvg:s,bbox:l,label:u}=await xR(e,t,CR(t)),d=t.padding||10,f=``,p;if(`ticket`in t&&t.ticket&&n!=null&&(r=n.kanban)!=null&&r.ticketBaseUrl){var m;f=n==null||(m=n.kanban)==null?void 0:m.ticketBaseUrl.replace(`#TICKET#`,t.ticket),p=s.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,f).attr(`target`,`_blank`)}let h={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,_;p?{label:g,bbox:_}=await Fgr(p,`ticket`in t&&t.ticket||``,h):{label:g,bbox:_}=await Fgr(s,`ticket`in t&&t.ticket||``,h);let{label:v,bbox:y}=await Fgr(s,`assigned`in t&&t.assigned||``,h);t.width=o;let b=(t==null?void 0:t.width)||0,x=Math.max(_.height,y.height)/2,S=Math.max(l.height+20,(t==null?void 0:t.height)||0)+x,C=-b/2,w=-S/2;u.attr(`transform`,`translate(`+(d-b/2)+`, `+(-x-l.height/2)+`)`),g.attr(`transform`,`translate(`+(d-b/2)+`, `+(-x+l.height/2)+`)`),v.attr(`transform`,`translate(`+(d+b/2-y.width-20)+`, `+(-x+l.height/2)+`)`);let T,{rx:E,ry:D}=t,{cssStyles:O}=t;if(t.look===`handDrawn`){let e=sR.svg(s),n=nL(t,{}),r=E||D?e.path(TR(C,w,b,S,E||0),n):e.rectangle(C,w,b,S,n);T=s.insert(()=>r,`:first-child`),T.attr(`class`,`basic label-container`).attr(`style`,O||null)}else{T=s.insert(`rect`,`:first-child`),T.attr(`class`,`basic label-container __APA__`).attr(`style`,a).attr(`rx`,E??5).attr(`ry`,D??5).attr(`x`,C).attr(`y`,w).attr(`width`,b).attr(`height`,S);let e=`priority`in t&&t.priority;if(e){let t=s.append(`line`),n=C+2,r=w+Math.floor((E??0)/2),i=w+S-Math.floor((E??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,b_r(e))}}return SR(t,T),t.height=S,t.intersect=function(e){return DR.rect(t,e)},s}async function Tgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await xR(e,t,CR(t)),l=a.width+10*o,u=a.height+8*o,d=.15*l,{cssStyles:f}=t,p=a.width+20,m=a.height+20,h=Math.max(l,p),g=Math.max(u,m);s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`);let _,v=`M0 0 a${d},${d} 1 0,0 ${h*.25},${-1*g*.1} a${d},${d} 1 0,0 ${h*.25},0 a${d},${d} 1 0,0 ${h*.25},0 a${d},${d} 1 0,0 ${h*.25},${g*.1} a${d},${d} 1 0,0 ${h*.15},${g*.33} a${d*.8},${d*.8} 1 0,0 0,${g*.34} a${d},${d} 1 0,0 ${-1*h*.15},${g*.33} a${d},${d} 1 0,0 ${-1*h*.25},${g*.15} a${d},${d} 1 0,0 ${-1*h*.25},0 a${d},${d} 1 0,0 ${-1*h*.25},0 a${d},${d} 1 0,0 ${-1*h*.25},${-1*g*.15} a${d},${d} 1 0,0 ${-1*h*.1},${-1*g*.33} a${d*.8},${d*.8} 1 0,0 0,${-1*g*.34} a${d},${d} 1 0,0 ${h*.1},${-1*g*.33} H0 V0 Z`;if(t.look===`handDrawn`){let e=sR.svg(i),n=nL(t,{}),r=e.path(v,n);_=i.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,hL(f))}else _=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,v);return _.attr(`transform`,`translate(${-h/2}, ${-g/2})`),SR(t,_),t.calcIntersect=function(e,t){return DR.rect(e,t)},t.intersect=function(e){return W.info(`Bang intersect`,t,e),DR.rect(t,e)},i}async function Egr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await xR(e,t,CR(t)),l=a.width+2*o,u=a.height+2*o,d=.15*l,f=.25*l,p=.35*l,m=.2*l,{cssStyles:h}=t,g,_=`M0 0 a${d},${d} 0 0,1 ${l*.25},${-1*l*.1} a${p},${p} 1 0,1 ${l*.4},${-1*l*.1} a${f},${f} 1 0,1 ${l*.35},${l*.2} a${d},${d} 1 0,1 ${l*.15},${u*.35} a${m},${m} 1 0,1 ${-1*l*.15},${u*.65} a${f},${d} 1 0,1 ${-1*l*.25},${l*.15} a${p},${p} 1 0,1 ${-1*l*.5},0 a${d},${d} 1 0,1 ${-1*l*.25},${-1*l*.15} a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35} a${m},${m} 1 0,1 ${l*.1},${-1*u*.65} H0 V0 Z`;if(t.look===`handDrawn`){let e=sR.svg(i),n=nL(t,{}),r=e.path(_,n);g=i.insert(()=>r,`:first-child`),g.attr(`class`,`basic label-container`).attr(`style`,hL(h))}else g=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,_);return s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),g.attr(`transform`,`translate(${-l/2}, ${-u/2})`),SR(t,g),t.calcIntersect=function(e,t){return DR.rect(e,t)},t.intersect=function(e){return W.info(`Cloud intersect`,t,e),DR.rect(t,e)},i}async function Dgr(e,t){let{labelStyles:n,nodeStyles:r}=tL(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await xR(e,t,CR(t)),l=a.width+8*o,u=a.height+2*o,d=t.look===`neo`?` M${-l/2} ${u/2-5} v${-u+10} q0,-5 5,-5 h${l-10} q5,0 5,5 v${u-5} H${-l/2} Z `:` M${-l/2} ${u/2-5} v${-u+10} q0,-5 5,-5 h${l-10} q5,0 5,5 v${u-10} q0,5 -5,5 h${-(l-10)} q-5,0 -5,-5 Z `;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let f=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,d);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-l/2).attr(`y1`,u/2).attr(`x2`,l/2).attr(`y2`,u/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),SR(t,f),t.calcIntersect=function(e,t){return DR.rect(e,t)},t.intersect=function(e){return DR.rect(t,e)},i}async function Ogr(e,t){return ghr(e,t,{padding:t.padding??0})}function kgr(e){return e in S_r}var Agr,jgr,Mgr,Ngr,Pgr,xR,Fgr,SR,CR,wR,TR,ER,Igr,Lgr,Rgr,zgr,DR,Bgr,Vgr,Hgr,Ugr,Wgr,Ggr,Kgr,qgr,Jgr,Ygr,OR,Xgr,Zgr,Qgr,$gr,e_r,t_r,n_r,r_r,i_r,a_r,o_r,s_r,c_r,l_r,kR,AR,u_r,d_r,f_r,p_r,m_r,h_r,g_r,__r,jR,v_r,y_r,b_r,x_r,S_r,MR=o((()=>{rL(),JL(),lL(),wL(),bI(),hN(),fN(),XI(),cR(),Agr=1,jgr=3,U(Zmr,`configureLabelImages`),U(Qmr,`hasTextBesidesImages`),Mgr=3,Ngr=32,Pgr=U(async(e,t,n)=>{var r,i,a;let o=_I(),s=e.insert(`g`).attr(`class`,n??`node default`).attr(`id`,t.domId||t.id),l=s.insert(`g`).attr(`class`,`label`).attr(`style`,hL(t.labelStyle)),u=[{text:typeof t.label==`string`?t.label:((r=t.label)==null?void 0:r[0])??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),d=t.width?Math.max(t.width-2*(t.padding??0),Ngr):((i=_I().flowchart)==null?void 0:i.wrappingWidth)??200,f=((a=o.c4)==null?void 0:a.wrap)??!0?d:1/0,p=await Promise.all(u.map(async e=>{let n=l.append(`g`).attr(`class`,e.cssClass),r=await qL(n,QF(SL(e.text??``),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:f,style:t.labelStyle},o);return DI(r).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),DI(r).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:n,box:n.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),h=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${h-t.y})`),h+=t.height+Mgr;let g=p.length>0?h-Mgr:0;return l.insert(`rect`,`:first-child`),l.attr(`transform`,`translate(${-m/2}, ${-g/2})`),{shapeSvg:s,bbox:l.node().getBBox(),halfPadding:(t.padding??0)/2,label:l}},`c4LabelHelper`),xR=U(async(e,t,n)=>{var r,i;if(t.stereotype!==void 0)return Pgr(e,t,n);let a,o=t.useHtmlLabels||RF((r=_I())==null?void 0:r.htmlLabels);a=n||`node default`;let s=e.insert(`g`).attr(`class`,a).attr(`id`,t.domId||t.id),l=s.insert(`g`).attr(`class`,`label`).attr(`style`,hL(t.labelStyle)),u;u=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let d=!!t.icon||!!t.img,f=t.labelType===`markdown`,p=await qL(l,QF(SL(u),_I()),{useHtmlLabels:o,width:t.width||t.wrappingWidth||((i=_I().flowchart)==null?void 0:i.wrappingWidth),classes:f?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:d,markdown:f},_I()),m=((t==null?void 0:t.padding)??0)/2,h;if(o){let e=p.children[0],t=DI(p);await Zmr(e),h=await KL.measure(()=>e.getBoundingClientRect()),t.attr(`width`,h.width),t.attr(`height`,h.height)}else h=await KL.measure(()=>p.getBBox());return o?l.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):l.attr(`transform`,`translate(0, `+-h.height/2+`)`),t.centerLabel&&l.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:s,bbox:h,halfPadding:m,label:l}},`labelHelper`),Fgr=U(async(e,t,n)=>{var r;let i=n.useHtmlLabels??KF(_I()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),o=await qL(a,QF(SL(t),_I()),{useHtmlLabels:i,width:n.width||((r=_I())==null||(r=r.flowchart)==null?void 0:r.wrappingWidth),style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),s=n.padding/2,l;if(KF(_I())){let e=o.children[0],t=DI(o);l=await KL.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await KL.measure(()=>o.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),n.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:s,label:a}},`insertLabel`),SR=U((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),CR=U((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`),U(lR,`createPathFromPoints`),U(uR,`generateFullSineWavePoints`),U(dR,`generateCirclePoints`),U($mr,`mergePaths`),wR=U((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,l,u;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),l=a===0?0:s*i/a,u=s):(i<0&&(o=-o),l=o,u=i===0?0:o*a/i),{x:n+l,y:r+u}},`intersectRect`),TR=U((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),ER=U(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=_I(),s=KF(o);return await qL(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),U(ehr,`intersectNode`),Igr=ehr,U(thr,`intersectEllipse`),Lgr=thr,U(nhr,`intersectCircle`),Rgr=nhr,U(rhr,`intersectLine`),U(ihr,`sameSign`),zgr=rhr,U(ahr,`intersectPolygon`),DR={node:Igr,circle:Rgr,ellipse:Lgr,polygon:ahr,rect:wR},U(ohr,`anchor`),U(shr,`generateArcPoints`),U(chr,`calculateArcSagitta`),U(lhr,`bowTieRect`),U(uhr,`bucket`),Bgr=20,Vgr=8,Hgr=80,Ugr=8,U(dhr,`collapsedGroup`),U(fR,`insertPolygonShape`),Wgr=[`right`,`left`,`up`,`down`],Ggr=`point`,Kgr=U(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),qgr=U(e=>Wgr.filter(t=>e.has(t)).join(`|`)||Ggr,`getDirectionKey`),Jgr={"right|left|up|down":U(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":U(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":U(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":U(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":U(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":U(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":U(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":U(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":U(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":U(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":U(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:U(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:U(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:U(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:U(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[Ggr]:()=>[{x:0,y:0}]},Ygr=U((e,t,n,r)=>{let i=Kgr(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,l=r??t.width+2*s+2*a;return(Jgr[qgr(i)]??Jgr[Ggr])({height:o,midpoint:s,padding:a,width:l})},`getArrowPoints`),U(fhr,`block_arrow`),U(phr,`browser`),OR=12,U(mhr,`card`),U(hhr,`choice`),U(ghr,`circle`),U(_hr,`composite`),U(vhr,`consoleWindow`),U(yhr,`createLine`),U(bhr,`crossedCircle`),U(pR,`generateCirclePoints`),U(xhr,`curlyBraceLeft`),U(mR,`generateCirclePoints`),U(Shr,`curlyBraceRight`),U(hR,`generateCirclePoints`),U(Chr,`curlyBraces`),U(whr,`curvedTrapezoid`),U(Thr,`person`),Xgr=U((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Zgr=U((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),Qgr=U((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),$gr=8,e_r=8,U(Ehr,`cylinder`),U(gR,`drawRect`),U(Dhr,`datastore`),U(Ohr,`dividedRectangle`),U(khr,`doublecircle`),U(Ahr,`filledCircle`),t_r=10,n_r=10,U(jhr,`flippedTriangle`),U(Mhr,`folder`),U(Nhr,`forkJoin`),U(Phr,`halfRoundedRectangle`),r_r=U((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`),U(Fhr,`hexagon`),U(Ihr,`hourglass`),U(Lhr,`icon`),U(Rhr,`iconCircle`),U(zhr,`iconRounded`),U(Bhr,`iconSquare`),U(Vhr,`imageSquare`),U(Hhr,`inv_trapezoid`),U(Uhr,`labelRect`),U(Whr,`lean_left`),U(Ghr,`lean_right`),U(Khr,`lightningBolt`),i_r=U((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),a_r=U((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),o_r=U((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),s_r=10,c_r=10,U(qhr,`linedCylinder`),U(Jhr,`linedWaveEdgedRect`),U(Yhr,`multiRect`),U(Xhr,`multiWaveEdgedRectangle`),U(Zhr,`note`),l_r=U((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`),U(Qhr,`question`),U($hr,`rect_left_inv_arrow`),U(egr,`rectWithTitle`),U(tgr,`roundedRect`),kR=8,U(ngr,`shadedProcess`),U(rgr,`slopedRect`),U(igr,`squareRect`),U(agr,`stadium`),U(ogr,`state`),U(sgr,`stateEnd`),U(cgr,`stateStart`),AR=8,U(lgr,`subroutine`),u_r=.2,U(ugr,`taggedRect`),U(dgr,`taggedWaveEdgedRectangle`),U(fgr,`text`),d_r=U((e,t,n,r,i,a)=>`M${e},${t} a${i},${a} 0,0,1 0,${-r} l${n},0 a${i},${a} 0,0,1 0,${r} M${n},${-r} a${i},${a} 0,0,0 0,${r} l${-n},0`,`createCylinderPathD`),f_r=U((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),p_r=U((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),m_r=5,h_r=10,U(pgr,`tiltedCylinder`),U(mgr,`trapezoid`),U(hgr,`trapezoidalPentagon`),g_r=10,__r=10,U(ggr,`triangle`),U(_gr,`waveEdgedRectangle`),U(vgr,`waveRectangle`),jR=10,U(ygr,`windowPane`),v_r=new Set([`redux-color`,`redux-dark-color`]),y_r=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),U(bgr,`erBox`),U(_R,`addText`),U(vR,`lineToPolygon`),U(xgr,`textHelper`),U(yR,`addText`),U(Sgr,`classBox`),U(Cgr,`requirementBox`),U(bR,`addText`),b_r=U(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`),U(wgr,`kanbanItem`),U(Tgr,`bang`),U(Egr,`cloud`),U(Dgr,`defaultMindmapNode`),U(Ogr,`mindmapCircle`),x_r=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:igr},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:tgr},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:agr},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:lgr},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Ehr},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:Dhr},{semanticName:`Folder`,name:`Folder`,shortName:`folder`,description:`Folder or directory`,aliases:[`directory`],handler:Mhr},{semanticName:`Bucket`,name:`Bucket`,shortName:`bucket`,description:`Object storage bucket`,handler:uhr},{semanticName:`Console`,name:`Console (terminal window)`,shortName:`console`,description:`Terminal or console window`,handler:vhr},{semanticName:`Browser`,name:`Browser`,shortName:`browser`,description:`Browser window`,handler:phr},{semanticName:`Person`,name:`Person`,shortName:`person`,description:`Person (circular head above a rounded body)`,handler:Thr},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:ghr},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Tgr},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:Egr},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:Qhr},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Fhr},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:Ghr},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:Whr},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:mgr},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:Hhr},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:khr},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:fgr},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:mhr},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:ngr},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:cgr},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:sgr},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Nhr},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Ihr},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:xhr},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:Shr},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:Chr},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Khr},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:_gr},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Phr},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:pgr},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:qhr},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:whr},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Ohr},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:ggr},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:ygr},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Ahr},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:hgr},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:jhr},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:rgr},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:Xhr},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:Yhr},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:lhr},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:bhr},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:dgr},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:ugr},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:vgr},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:$hr},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:Jhr}],S_r=U(()=>{let e=[...Object.entries({state:ogr,choice:hhr,note:Zhr,composite:_hr,rectWithTitle:egr,labelRect:Uhr,block_arrow:fhr,collapsedGroup:dhr,iconSquare:Bhr,iconCircle:Rhr,icon:Lhr,iconRounded:zhr,imageSquare:Vhr,anchor:ohr,kanbanItem:wgr,mindmapCircle:Ogr,defaultMindmapNode:Dgr,classBox:Sgr,erBox:bgr,requirementBox:Cgr}),...x_r.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)(),U(kgr,`isValidShape`)}));async function NR(e,t,n){let r,i;t.shape===`rect`&&(t.shape=t.rx&&t.ry?`roundedRect`:`squareRect`);let a=t.shape?S_r[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,hL(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),FR.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}var PR,FR,C_r,w_r,IR,LR=o((()=>{MR(),wL(),hN(),fN(),PR=U(({flowchart:e})=>{var t,n;let r=(e==null||(t=e.subGraphTitleMargin)==null?void 0:t.top)??0,i=(e==null||(n=e.subGraphTitleMargin)==null?void 0:n.bottom)??0;return{subGraphTitleTopMargin:r,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:r+i}},`getSubGraphTitleMargins`),FR=new Map,U(NR,`insertNode`),C_r=U((e,t)=>{FR.set(t.id,e)},`setNodeElem`),w_r=U(()=>{FR.clear()},`clear`),IR=U(e=>{let t=FR.get(e.id);W.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let n=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+n-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),n},`positionNode`)})),T_r,E_r,D_r,O_r,RR,k_r,zR=o((()=>{LR(),MR(),rL(),JL(),bI(),hN(),fN(),XI(),cR(),T_r=U(async(e,t)=>{let n=_I(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,s=o,{labelStyles:l,nodeStyles:u,borderStyles:d,backgroundStyles:f}=tL(t),p=e.insert(`g`).attr(`class`,`cluster swimlane `+(t.cssClasses||``)).attr(`id`,t.id).attr(`data-id`,t.id).attr(`data-et`,`cluster`).attr(`data-look`,t.look),m=RF(n.flowchart.htmlLabels),h=t.direction===`LR`,g=p.insert(`g`).attr(`class`,`cluster-label swimlane-label`),_=await qL(g,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}),v=_.getBBox();if(m){let e=_.children[0],t=DI(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=t.padding??0,b=t.width<=v.width+y?v.width+y:t.width;t.diff=t.width<=v.width+y?(b-t.width)/2-y:-y;let x=t.height,S=t.y-x/2,C=t.y+x/2,w=t.x-b/2,T=t.swimlaneContentTop===void 0?S+x/3:t.swimlaneContentTop,E=h?4:0,D=v.height+2*E,O,k;if(h){let e=Math.max(D,v.height+2*E),n=w+e,r=Math.max(0,b-e);if(t.look===`handDrawn`){let o=sR.svg(p),l=nL(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),u=nL(t,{roughness:.7,fill:`none`,stroke:s,seed:i}),m=o.rectangle(w,S,e,x,l);O=p.insert(()=>m,`:first-child`);let h=o.rectangle(n,S,r,x,u);k=p.insert(()=>h,`:first-child`),O.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),O.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else O=p.insert(`rect`,`:first-child`),k=p.insert(`rect`,`:first-child`),O.attr(`class`,`swimlane-title`).attr(`style`,u).attr(`x`,w).attr(`y`,S).attr(`width`,e).attr(`height`,x).attr(`fill`,a).attr(`stroke`,s),k.attr(`class`,`swimlane-body`).attr(`style`,u).attr(`x`,n).attr(`y`,S).attr(`width`,r).attr(`height`,x).attr(`fill`,`none`).attr(`stroke`,s);let o=w+e/2,l=t.y;g.attr(`transform`,`translate(${o}, ${l}) rotate(-90) translate(${-v.width/2}, ${-v.height/2})`)}else{let e=Math.max(0,T-S),n=Math.min(D,e),r=S+n,o=Math.max(0,C-r),l=t.x-b/2;if(t.look===`handDrawn`){let e=sR.svg(p),u=nL(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),m=nL(t,{roughness:.7,fill:`none`,stroke:s,seed:i}),h=e.rectangle(l,S,b,n,u);O=p.insert(()=>h,`:first-child`);let g=e.rectangle(l,r,b,o,m);k=p.insert(()=>g,`:first-child`),O.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),O.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else O=p.insert(`rect`,`:first-child`),k=p.insert(`rect`,`:first-child`),O.attr(`class`,`swimlane-title`).attr(`style`,u).attr(`x`,l).attr(`y`,S).attr(`width`,b).attr(`height`,n).attr(`fill`,a).attr(`stroke`,s),k.attr(`class`,`swimlane-body`).attr(`style`,u).attr(`x`,l).attr(`y`,r).attr(`width`,b).attr(`height`,o).attr(`fill`,`none`).attr(`stroke`,s);let m=t.x-v.width/2,h=S+(n-v.height)/2;g.attr(`transform`,`translate(${m}, ${h})`)}if(W.trace(`Swimlane data `,t,JSON.stringify(t)),l){let e=g.select(`span`);e&&e.attr(`style`,l)}return t.offsetX=0,t.width=b,t.height=x,t.offsetY=v.height-y/2,t.intersect=function(e){return wR(t,e)},{cluster:p,labelBBox:v}},`swimlane`),E_r=U(async(e,t)=>{W.info(`Creating subgraph rect for `,t.id,t);let n=_I(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:l,borderStyles:u,backgroundStyles:d}=tL(t),f=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=KF(n),m=f.insert(`g`).attr(`class`,`cluster-label `),h;h=t.labelType===`markdown`?await qL(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):await ER(m,t.label,t.labelStyle||``,!1,!0);let g=h.getBBox();if(KF(n)){let e=h.children[0],t=DI(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.diff=t.width<=g.width+t.padding?(_-t.width)/2-t.padding:-t.padding;let v=t.height,y=t.x-_/2,b=t.y-v/2;W.trace(`Data `,t,JSON.stringify(t));let x;if(t.look===`handDrawn`){let e=sR.svg(f),n=nL(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),r=e.path(TR(y,b,_,v,0),n);x=f.insert(()=>(W.debug(`Rough node insert CXC`,r),r),`:first-child`),x.select(`path:nth-child(2)`).attr(`style`,u.join(`;`)),x.select(`path`).attr(`style`,d.join(`;`).replace(`fill`,`stroke`))}else x=f.insert(`rect`,`:first-child`),x.attr(`style`,l).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,y).attr(`y`,b).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:S}=PR(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let C=x.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return wR(t,e)},{cluster:f,labelBBox:g}},`rect`),D_r={rect:E_r,squareRect:E_r,roundedWithTitle:U(async(e,t)=>{let n=_I(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=r,u=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),d=u.insert(`g`,`:first-child`),f=u.insert(`g`).attr(`class`,`cluster-label`),p=u.append(`rect`),m=await ER(f,t.label,t.labelStyle,void 0,!0),h=m.getBBox();if(KF(n)){let e=m.children[0],t=DI(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}let g=0*t.padding,_=g/2,v=(t.width<=h.width+t.padding?h.width+t.padding:t.width)+g;t.diff=t.width<=h.width+t.padding?(v-t.width)/2-t.padding:-t.padding;let y=t.height+g,b=t.height+g-h.height-6,x=t.x-v/2,S=t.y-y/2;t.width=v;let C=t.y-t.height/2-_+h.height+2,w;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=sR.svg(u),r=t.rx||t.ry?n.path(TR(x,S,v,y,10),{roughness:.7,fill:s,fillStyle:`solid`,stroke:l,seed:i}):n.rectangle(x,S,v,y,{seed:i});w=u.insert(()=>r,`:first-child`);let d=n.rectangle(x,C,v,b,{fill:e?a:o,fillStyle:e?`hachure`:`solid`,stroke:l,seed:i});w=u.insert(()=>r,`:first-child`),p=u.insert(()=>d)}else w=d.insert(`rect`,`:first-child`),w.attr(`class`,`outer`).attr(`x`,x).attr(`y`,S).attr(`width`,v).attr(`height`,y).attr(`data-look`,t.look),p.attr(`class`,`inner`).attr(`x`,x).attr(`y`,C).attr(`width`,v).attr(`height`,b);return f.attr(`transform`,`translate(${t.x-h.width/2}, ${S+1-(KF(n)?0:3)})`),t.height=w.node().getBBox().height,t.offsetX=0,t.offsetY=h.height-t.padding/2,t.labelBBox=h,t.intersect=function(e){return wR(t,e)},{cluster:u,labelBBox:h}},`roundedWithTitle`),noteGroup:U((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return wR(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:U((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=_I(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,l=t.width+s;t.diff=-t.padding;let u=t.height+s,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=sR.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return wR(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:U(async(e,t)=>{W.info(`Creating subgraph rect for `,t.id,t);let n=_I(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:l,borderStyles:u,backgroundStyles:d}=tL(t),f=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=KF(n),m=f.insert(`g`).attr(`class`,`cluster-label `),h=await qL(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),g=h.getBBox();if(KF(n)){let e=h.children[0],t=DI(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.diff=t.width<=g.width+t.padding?(_-t.width)/2-t.padding:-t.padding;let v=t.height,y=t.x-_/2,b=t.y-v/2;W.trace(`Data `,t,JSON.stringify(t));let x;if(t.look===`handDrawn`){let e=sR.svg(f),n=nL(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:i}),r=e.path(TR(y,b,_,v,t.rx),n);x=f.insert(()=>(W.debug(`Rough node insert CXC`,r),r),`:first-child`),x.select(`path:nth-child(2)`).attr(`style`,u.join(`;`)),x.select(`path`).attr(`style`,d.join(`;`).replace(`fill`,`stroke`))}else x=f.insert(`rect`,`:first-child`),x.attr(`style`,l).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,y).attr(`y`,b).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:S}=PR(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let C=x.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return wR(t,e)},{cluster:f,labelBBox:g}},`kanbanSection`),swimlane:T_r},O_r=new Map,RR=U(async(e,t)=>{let n=await D_r[t.shape||`rect`](e,t);return O_r.set(t.id,n),n},`insertCluster`),k_r=U(()=>{O_r=new Map},`clear`)}));function BR(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=WR(e),t=WR(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}function VR(e,t){KF(_I())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}function A_r(e){let t=[],n=[];for(let r=1;r5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}function j_r(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a({...e}));if(e.length>=2&&UR[t.arrowTypeStart]){let r=UR[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=M_r(i,a),s=r*Math.cos(o),l=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+l}let r=e.length;if(r>=2&&UR[t.arrowTypeEnd]){let i=UR[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=M_r(o,a),l=i*Math.cos(s),u=i*Math.sin(s);n[r-1].x=a.x-l,n[r-1].y=a.y-u}return n}var HR,UR,P_r,WR,F_r,I_r,L_r,R_r,z_r,B_r,GR,KR,V_r,H_r,qR,JR,U_r,W_r,G_r,K_r,q_r,J_r,Y_r,X_r,YR,Z_r,Q_r,$_r,XR=o((()=>{LR(),MR(),rL(),JL(),wL(),bI(),hN(),fN(),XI(),cR(),HR=U((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),UR={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},P_r={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5},U(BR,`calculateDeltaAndAngle`),WR=U(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),F_r=U(e=>({x:U(function(t,n,r){let i=0,a=WR(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(UR,e.arrowTypeEnd)){let{angle:t,deltaX:n}=BR(r[r.length-1],r[r.length-2]);i=UR[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(WR(t).x-WR(r[r.length-1]).x),s=Math.abs(WR(t).y-WR(r[r.length-1]).y),l=Math.abs(WR(t).x-WR(r[0]).x),u=Math.abs(WR(t).y-WR(r[0]).y),d=UR[e.arrowTypeStart],f=UR[e.arrowTypeEnd];if(o0&&s0&&u=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(UR,e.arrowTypeEnd)){let{angle:t,deltaY:n}=BR(r[r.length-1],r[r.length-2]);i=UR[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(WR(t).y-WR(r[r.length-1]).y),s=Math.abs(WR(t).x-WR(r[r.length-1]).x),l=Math.abs(WR(t).y-WR(r[0]).y),u=Math.abs(WR(t).x-WR(r[0]).x),d=UR[e.arrowTypeStart],f=UR[e.arrowTypeEnd];if(o0&&s0&&u{t.arrowTypeStart&&z_r(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&z_r(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),L_r={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},R_r=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],z_r=U((e,t,n,r,i,a,o=!1,s)=>{if(!n||n===`none`)return;let l=L_r[n],u=l&&R_r.includes(l.type);if(!l){W.warn(`Unknown arrow type: ${n}`);return}let d=`${i}_${a}-${l.type}${t===`start`?`Start`:`End`}${o&&u?`-margin`:``}`;if(s&&s.trim()!==``){let n=`${d}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(d);if(e){var f;let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),l.fill&&e.setAttribute(`fill`,s)}),(f=e.parentNode)==null||f.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${d})`)},`addEdgeMarker`),B_r=U(e=>{var t;return typeof e==`string`?e:(t=_I())==null||(t=t.flowchart)==null?void 0:t.curve},`resolveEdgeCurveType`),GR=new Map,KR=new Map,V_r=U(()=>{GR.clear(),KR.clear()},`clear`),H_r=U(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),qR=U(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),JR=U(async(e,t)=>{let n=_I(),r=KF(n),{labelStyles:i}=tL(t);t.labelStyle=i;let a=e.insert(`g`).attr(`class`,`edgeLabel`),o=a.insert(`g`).attr(`class`,`label`).attr(`data-id`,t.id),s=t.labelType===`markdown`,l=await qL(e,t.label,{style:qR(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},n);o.node().appendChild(l),W.info(`abc82`,t,t.labelType);let u,d;if(r){let e=l.children[0],t=DI(l);u=await KL.measure(()=>e.getBoundingClientRect()),d=u,t.attr(`width`,u.width),t.attr(`height`,u.height)}else{let e=DI(l).select(`text`).node();await KL.measure(()=>{u=l.getBBox(),d=e&&typeof e.getBBox==`function`?e.getBBox():u})}o.attr(`transform`,HR(d,r)),GR.set(t.id,a),t.width=u.width,t.height=u.height;let f;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await ER(i,t.startLabelLeft,qR(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=DI(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,HR(o,r)),KR.get(t.id)||KR.set(t.id,{}),KR.get(t.id).startLeft=n,VR(f,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await ER(i,t.startLabelRight,qR(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=DI(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,HR(o,r)),KR.get(t.id)||KR.set(t.id,{}),KR.get(t.id).startRight=n,VR(f,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await ER(n,t.endLabelLeft,qR(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=DI(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,HR(o,r)),KR.get(t.id)||KR.set(t.id,{}),KR.get(t.id).endLeft=n,VR(f,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await ER(n,t.endLabelRight,qR(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=DI(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,HR(o,r)),KR.get(t.id)||KR.set(t.id,{}),KR.get(t.id).endRight=n,VR(f,t.endLabelRight)}return l},`insertEdgeLabel`),U(VR,`setTerminalWidth`),U_r=U((e,t)=>{W.debug(`Moving label abc88 `,e.id,e.label,GR.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath,r=_I(),{subGraphTitleTotalMargin:i}=PR(r);if(e.label){let r=GR.get(e.id),a=e.x,o=e.y;if(n){let r=xL.calcLabelPosition(n);W.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t.updatedPath&&(a=r.x,o=r.y)}r.attr(`transform`,`translate(${a}, ${o+i/2})`)}if(e.startLabelLeft){let t=KR.get(e.id).startLeft,r=e.x,i=e.y;if(n){let t=xL.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=KR.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=xL.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=KR.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=xL.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=KR.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=xL.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}},`positionEdgeLabel`),W_r=U((e,t)=>{var n;if(!(e!=null&&e.isLabelEdge)||!(e!=null&&(n=e.id)!=null&&n.endsWith(`-to-label`))||!Array.isArray(t)||t.length!==2)return t;let[r,i]=t,a=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return a<.001||o<.001?t:o>=a?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},`orthogonalizeToLabelClippedPoints`),G_r=U((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),K_r=U((e,t,n)=>{W.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(n)} node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.xMath.abs(r-t.x)*l){let e=n.y{W.warn(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(W.info(`abc88 checking point`,e,t),!G_r(t,e)&&!i){let a=K_r(t,r,e);W.debug(`abc88 inside`,e,r,a),W.debug(`abc88 intersection`,a,t);let o=!1;n.forEach(e=>{o=o||e.x===a.x&&e.y===a.y}),n.some(e=>e.x===a.x&&e.y===a.y)?W.warn(`abc88 no intersect`,a,n):n.push(a),i=!0}else W.warn(`abc88 outside`,e,r),r=e,i||n.push(e)}),W.debug(`returning points`,n),n},`cutPathAtIntersect`),U(A_r,`extractCornerPoints`),J_r=U(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),Y_r=U(function(e){let{cornerPointPositions:t}=A_r(e),n=[];for(let r=0;r10&&Math.abs(i.y-t.y)>=10?(W.debug(`Corner point fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),f=a.x===o.x?{x:l<0?o.x-5+d:o.x+5-d,y:u<0?o.y-d:o.y+d}:{x:l<0?o.x-d:o.x+d,y:u<0?o.y-5+d:o.y+5-d}):W.debug(`Corner point skipping fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),n.push(f,s)}else n.push(e[r]);return n},`fixCorners`),X_r=U((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(Number.isFinite(i)?Math.max(0,i):0).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),YR=U(function(e,t,n,r,i,a,o,s=!1){if(!o)throw Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:l,layout:u}=_I(),d=t.points,f=!1,p=i;var m=a;let h=[];for(let e in t.cssCompiledStyles)eL(e)||h.push(t.cssCompiledStyles[e]);if(u===`swimlane`){if(m.intersect&&p.intersect&&Array.isArray(d)&&d.length>=2){if(d.length===2)d=[p.intersect(d[0]),m.intersect(d[1])];else{let e=d.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(d[d.length-1].x-n.x)!Number.isNaN(e.y)),v=B_r(t.curve);v!==`rounded`&&(_=Y_r(_));let y=$x;switch(v){case`linear`:y=$x;break;case`basis`:y=iS;break;case`cardinal`:y=M7t;break;case`bumpX`:y=H5t;break;case`bumpY`:y=U5t;break;case`catmullRom`:y=H7t;break;case`monotoneX`:y=o9t;break;case`monotoneY`:y=s9t;break;case`natural`:y=d9t;break;case`step`:y=m9t;break;case`stepAfter`:y=g9t;break;case`stepBefore`:y=h9t;break;case`rounded`:y=$x;break;default:y=iS}let{x:b,y:x}=F_r(t),S=eS().x(b).y(x).curve(y),C;switch(t.thickness){case`normal`:C=`edge-thickness-normal`;break;case`thick`:C=`edge-thickness-thick`;break;case`invisible`:C=`edge-thickness-invisible`;break;default:C=`edge-thickness-normal`}switch(t.pattern){case`solid`:C+=` edge-pattern-solid`;break;case`dotted`:C+=` edge-pattern-dotted`;break;case`dashed`:C+=` edge-pattern-dashed`;break;default:C+=` edge-pattern-solid`}let w,T=v===`rounded`?j_r(N_r(_,t),5):S(_),E=Array.isArray(t.style)?t.style:[t.style],D=E.find(e=>e==null?void 0:e.startsWith(`stroke:`)),O=``;t.animate&&(O=`edge-animation-fast`),t.animation&&(O=`edge-animation-`+t.animation);let k=!1;if(t.look===`handDrawn`){let n=sR.svg(e);Object.assign([],_);let r=n.path(T,{roughness:.3,seed:l});C+=` transition`,w=DI(r).select(`path`).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+C+(t.classes?` `+t.classes:``)+(O?` `+O:``)).attr(`style`,E?E.reduce((e,t)=>e+`;`+t,``):``);let i=w.attr(`d`);w.attr(`d`,i),e.node().appendChild(w.node())}else{var A;let n=h.join(`;`),r=E?E.reduce((e,t)=>e+t+`;`,``):``,i=(n?n+`;`+r+`;`:r)+`;`+(E?E.reduce((e,t)=>e+`;`+t,``):``);w=e.append(`path`).attr(`d`,T).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+C+(t.classes?` `+t.classes:``)+(O?` `+O:``)).attr(`style`,i),D=(A=i.match(/stroke:([^;]+)/))==null?void 0:A[1],k=t.animate===!0||!!t.animation||n.includes(`animation`);let a=w.node(),s=typeof a.getTotalLength==`function`?a.getTotalLength():0,l=P_r[t.arrowTypeStart]||0,u=P_r[t.arrowTypeEnd]||0;if(t.look===`neo`&&!k){let e=`stroke-dasharray: ${t.pattern===`dotted`||t.pattern===`dashed`?X_r(s,l,u):`0 ${l} ${s-l-u} ${u}`}; stroke-dashoffset: 0;`;w.attr(`style`,e+w.attr(`style`))}}w.attr(`data-edge`,!0),w.attr(`data-et`,`edge`),w.attr(`data-id`,t.id),w.attr(`data-points`,g),w.attr(`data-look`,hL(t.look)),t.showPoints&&_.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let j=``;(_I().flowchart.arrowMarkerAbsolute||_I().state.arrowMarkerAbsolute)&&(j=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),W.info(`arrowTypeStart`,t.arrowTypeStart),W.info(`arrowTypeEnd`,t.arrowTypeEnd);let M=!k&&(t==null?void 0:t.look)===`neo`;I_r(w,t,j,o,r,M,D);let N=Math.floor(d.length/2),P=d[N];xL.isLabelCoordinateInPath(P,w.attr(`d`))||(f=!0);let F={};return f&&(F.updatedPath=d),F.originalPath=t.points,F},`insertEdge`),U(j_r,`generateRoundedPath`),U(M_r,`calculateDeltaAndAngle`),U(N_r,`applyMarkerOffsetsToPoints`),Z_r=U((e,t,n,r)=>{t.forEach(t=>{Q_r[t](e,n,r)})},`insertMarkers`),Q_r={extension:U((e,t,n)=>{W.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,n+`_`+t+`-extensionStart-margin`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd-margin`).attr(`class`,`marker extension `+t).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:U((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:U((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:U((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:U((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:U((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:U((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:U((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:U((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:U((e,t,n)=>{let{themeVariables:r}=WF(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${i}`)},`barbNeo`),only_one:U((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:U((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:U((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:U((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:U((e,t,n)=>{let{themeVariables:r}=WF(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${i}`)},`only_one_neo`),zero_or_one_neo:U((e,t,n)=>{let{themeVariables:r}=WF(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:U((e,t,n)=>{let{themeVariables:r}=WF(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:U((e,t,n)=>{let{themeVariables:r}=WF(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:U((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0 L20,10 M20,10 L0,20`)},`requirement_arrow`),requirement_contains:U((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:U((e,t,n)=>{let{themeVariables:r}=WF(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${i}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0 L20,10 M20,10 L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:U((e,t,n)=>{let{themeVariables:r}=WF(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},$_r=Z_r})),evr,tvr=o((()=>{evr=typeof global==`object`&&global&&global.Object===Object&&global})),nvr,ZR,QR=o((()=>{tvr(),nvr=typeof self==`object`&&self&&self.Object===Object&&self,ZR=evr||nvr||Function(`return this`)()})),$R,ez=o((()=>{QR(),$R=ZR.Symbol}));function rvr(e){var t=avr.call(e,tz),n=e[tz];try{e[tz]=void 0;var r=!0}catch{}var i=ovr.call(e);return r&&(t?e[tz]=n:delete e[tz]),i}var ivr,avr,ovr,tz,svr=o((()=>{ez(),ivr=Object.prototype,avr=ivr.hasOwnProperty,ovr=ivr.toString,tz=$R?$R.toStringTag:void 0}));function cvr(e){return lvr.call(e)}var lvr,uvr=o((()=>{lvr=Object.prototype.toString}));function nz(e){return e==null?e===void 0?fvr:dvr:pvr&&pvr in Object(e)?rvr(e):cvr(e)}var dvr,fvr,pvr,rz=o((()=>{ez(),svr(),uvr(),dvr=`[object Null]`,fvr=`[object Undefined]`,pvr=$R?$R.toStringTag:void 0}));function iz(e){return typeof e==`object`&&!!e}var az=o((()=>{}));function oz(e){return typeof e==`symbol`||iz(e)&&nz(e)==mvr}var mvr,sz=o((()=>{rz(),az(),mvr=`[object Symbol]`}));function cz(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n{})),uz,dz=o((()=>{uz=Array.isArray}));function hvr(e){if(typeof e==`string`)return e;if(uz(e))return cz(e,hvr)+``;if(oz(e))return vvr?vvr.call(e):``;var t=e+``;return t==`0`&&1/e==-gvr?`-0`:t}var gvr,_vr,vvr,yvr=o((()=>{ez(),lz(),dz(),sz(),gvr=1/0,_vr=$R?$R.prototype:void 0,vvr=_vr?_vr.toString:void 0}));function bvr(e){for(var t=e.length;t--&&xvr.test(e.charAt(t)););return t}var xvr,Svr=o((()=>{xvr=/\s/}));function Cvr(e){return e&&e.slice(0,bvr(e)+1).replace(wvr,``)}var wvr,Tvr=o((()=>{Svr(),wvr=/^\s+/}));function fz(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var pz=o((()=>{}));function Evr(e){if(typeof e==`number`)return e;if(oz(e))return Dvr;if(fz(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=fz(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Cvr(e);var n=kvr.test(e);return n||Avr.test(e)?jvr(e.slice(2),n?2:8):Ovr.test(e)?Dvr:+e}var Dvr,Ovr,kvr,Avr,jvr,Mvr=o((()=>{Tvr(),pz(),sz(),Dvr=NaN,Ovr=/^[-+]0x[0-9a-f]+$/i,kvr=/^0b[01]+$/i,Avr=/^0o[0-7]+$/i,jvr=parseInt}));function Nvr(e){return e?(e=Evr(e),e===Pvr||e===-Pvr?(e<0?-1:1)*Fvr:e===e?e:0):e===0?e:0}var Pvr,Fvr,Ivr=o((()=>{Mvr(),Pvr=1/0,Fvr=17976931348623157e292}));function Lvr(e){var t=Nvr(e),n=t%1;return t===t?n?t-n:t:0}var Rvr=o((()=>{Ivr()}));function mz(e){return e}var hz=o((()=>{}));function gz(e){if(!fz(e))return!1;var t=nz(e);return t==Bvr||t==Vvr||t==zvr||t==Hvr}var zvr,Bvr,Vvr,Hvr,_z=o((()=>{rz(),pz(),zvr=`[object AsyncFunction]`,Bvr=`[object Function]`,Vvr=`[object GeneratorFunction]`,Hvr=`[object Proxy]`})),vz,Uvr=o((()=>{QR(),vz=ZR[`__core-js_shared__`]}));function Wvr(e){return!!Gvr&&Gvr in e}var Gvr,Kvr=o((()=>{Uvr(),Gvr=function(){var e=/[^.]+$/.exec(vz&&vz.keys&&vz.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}()}));function yz(e){if(e!=null){try{return qvr.call(e)}catch{}try{return e+``}catch{}}return``}var qvr,Jvr=o((()=>{qvr=Function.prototype.toString}));function Yvr(e){return!fz(e)||Wvr(e)?!1:(gz(e)?nyr:Zvr).test(yz(e))}var Xvr,Zvr,Qvr,$vr,eyr,tyr,nyr,ryr=o((()=>{_z(),Kvr(),pz(),Jvr(),Xvr=/[\\^$.*+?()[\]{}|]/g,Zvr=/^\[object .+?Constructor\]$/,Qvr=Function.prototype,$vr=Object.prototype,eyr=Qvr.toString,tyr=$vr.hasOwnProperty,nyr=RegExp(`^`+eyr.call(tyr).replace(Xvr,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`)}));function iyr(e,t){return e==null?void 0:e[t]}var ayr=o((()=>{}));function bz(e,t){var n=iyr(e,t);return Yvr(n)?n:void 0}var xz=o((()=>{ryr(),ayr()})),Sz,oyr=o((()=>{xz(),QR(),Sz=bz(ZR,`WeakMap`)})),syr,cyr,lyr=o((()=>{pz(),syr=Object.create,cyr=function(){function e(){}return function(t){if(!fz(t))return{};if(syr)return syr(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()}));function uyr(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var dyr=o((()=>{}));function fyr(){}var pyr=o((()=>{}));function myr(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{}));function gyr(e){var t=0,n=0;return function(){var r=yyr(),i=vyr-(r-n);if(n=r,i>0){if(++t>=_yr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var _yr,vyr,yyr,byr=o((()=>{_yr=800,vyr=16,yyr=Date.now}));function Cz(e){return function(){return e}}var xyr=o((()=>{})),wz,Syr=o((()=>{xz(),wz=function(){try{var e=bz(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Cyr,wyr=o((()=>{xyr(),Syr(),hz(),Cyr=wz?function(e,t){return wz(e,`toString`,{configurable:!0,enumerable:!1,value:Cz(t),writable:!0})}:mz})),Tyr,Eyr=o((()=>{wyr(),byr(),Tyr=gyr(Cyr)}));function Dyr(e,t){for(var n=-1,r=e==null?0:e.length;++n{}));function kyr(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a{}));function jyr(e){return e!==e}var Myr=o((()=>{}));function Nyr(e,t,n){for(var r=n-1,i=e.length;++r{}));function Fyr(e,t,n){return t===t?Nyr(e,t,n):kyr(e,jyr,n)}var Iyr=o((()=>{Ayr(),Myr(),Pyr()}));function Lyr(e,t){return!!(e!=null&&e.length)&&Fyr(e,t,0)>-1}var Ryr=o((()=>{Iyr()}));function Tz(e,t){var n=typeof e;return t=t??zyr,!!t&&(n==`number`||n!=`symbol`&&Byr.test(e))&&e>-1&&e%1==0&&e{zyr=9007199254740991,Byr=/^(?:0|[1-9]\d*)$/}));function Dz(e,t,n){t==`__proto__`&&wz?wz(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Oz=o((()=>{Syr()}));function kz(e,t){return e===t||e!==e&&t!==t}var Az=o((()=>{}));function jz(e,t,n){var r=e[t];(!(Vyr.call(e,t)&&kz(r,n))||n===void 0&&!(t in e))&&Dz(e,t,n)}var Vyr,Mz=o((()=>{Oz(),Az(),Vyr=Object.prototype.hasOwnProperty}));function Nz(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a{Mz(),Oz()}));function Hyr(e,t,n){return t=Uyr(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Uyr(r.length-t,0),o=Array(a);++i{dyr(),Uyr=Math.max}));function Fz(e,t){return Tyr(Hyr(e,t,mz),e+``)}var Iz=o((()=>{hz(),Wyr(),Eyr()}));function Gyr(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Kyr}var Kyr,Lz=o((()=>{Kyr=9007199254740991}));function Rz(e){return e!=null&&Gyr(e.length)&&!gz(e)}var zz=o((()=>{_z(),Lz()}));function Bz(e,t,n){if(!fz(n))return!1;var r=typeof t;return(r==`number`?Rz(n)&&Tz(t,n.length):r==`string`&&t in n)?kz(n[t],e):!1}var Vz=o((()=>{Az(),zz(),Ez(),pz()}));function qyr(e){return Fz(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Bz(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r{Iz(),Vz()}));function Hz(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Yyr)}var Yyr,Uz=o((()=>{Yyr=Object.prototype}));function Xyr(e,t){for(var n=-1,r=Array(e);++n{}));function Qyr(e){return iz(e)&&nz(e)==$yr}var $yr,ebr=o((()=>{rz(),az(),$yr=`[object Arguments]`})),tbr,nbr,rbr,Wz,Gz=o((()=>{ebr(),az(),tbr=Object.prototype,nbr=tbr.hasOwnProperty,rbr=tbr.propertyIsEnumerable,Wz=Qyr(function(){return arguments}())?Qyr:function(e){return iz(e)&&nbr.call(e,`callee`)&&!rbr.call(e,`callee`)}}));function ibr(){return!1}var abr=o((()=>{})),obr,sbr,cbr,Kz,qz=o((()=>{QR(),abr(),obr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,sbr=obr&&typeof module==`object`&&module&&!module.nodeType&&module,cbr=sbr&&sbr.exports===obr?ZR.Buffer:void 0,Kz=(cbr?cbr.isBuffer:void 0)||ibr}));function lbr(e){return iz(e)&&Gyr(e.length)&&!!Jz[nz(e)]}var ubr,dbr,fbr,pbr,mbr,hbr,gbr,_br,vbr,ybr,bbr,xbr,Sbr,Cbr,wbr,Tbr,Ebr,Dbr,Obr,kbr,Abr,jbr,Mbr,Nbr,Jz,Pbr=o((()=>{rz(),Lz(),az(),ubr=`[object Arguments]`,dbr=`[object Array]`,fbr=`[object Boolean]`,pbr=`[object Date]`,mbr=`[object Error]`,hbr=`[object Function]`,gbr=`[object Map]`,_br=`[object Number]`,vbr=`[object Object]`,ybr=`[object RegExp]`,bbr=`[object Set]`,xbr=`[object String]`,Sbr=`[object WeakMap]`,Cbr=`[object ArrayBuffer]`,wbr=`[object DataView]`,Tbr=`[object Float32Array]`,Ebr=`[object Float64Array]`,Dbr=`[object Int8Array]`,Obr=`[object Int16Array]`,kbr=`[object Int32Array]`,Abr=`[object Uint8Array]`,jbr=`[object Uint8ClampedArray]`,Mbr=`[object Uint16Array]`,Nbr=`[object Uint32Array]`,Jz={},Jz[Tbr]=Jz[Ebr]=Jz[Dbr]=Jz[Obr]=Jz[kbr]=Jz[Abr]=Jz[jbr]=Jz[Mbr]=Jz[Nbr]=!0,Jz[ubr]=Jz[dbr]=Jz[Cbr]=Jz[fbr]=Jz[wbr]=Jz[pbr]=Jz[mbr]=Jz[hbr]=Jz[gbr]=Jz[_br]=Jz[vbr]=Jz[ybr]=Jz[bbr]=Jz[xbr]=Jz[Sbr]=!1}));function Yz(e){return function(t){return e(t)}}var Xz=o((()=>{})),Fbr,Zz,Qz,$z,eB=o((()=>{tvr(),Fbr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Zz=Fbr&&typeof module==`object`&&module&&!module.nodeType&&module,Qz=Zz&&Zz.exports===Fbr&&evr.process,$z=function(){try{return Zz&&Zz.require&&Zz.require(`util`).types||Qz&&Qz.binding&&Qz.binding(`util`)}catch{}}()})),Ibr,tB,nB=o((()=>{Pbr(),Xz(),eB(),Ibr=$z&&$z.isTypedArray,tB=Ibr?Yz(Ibr):lbr}));function Lbr(e,t){var n=uz(e),r=!n&&Wz(e),i=!n&&!r&&Kz(e),a=!n&&!r&&!i&&tB(e),o=n||r||i||a,s=o?Xyr(e.length,String):[],l=s.length;for(var u in e)(t||Rbr.call(e,u))&&!(o&&(u==`length`||i&&(u==`offset`||u==`parent`)||a&&(u==`buffer`||u==`byteLength`||u==`byteOffset`)||Tz(u,l)))&&s.push(u);return s}var Rbr,zbr=o((()=>{Zyr(),Gz(),dz(),qz(),Ez(),nB(),Rbr=Object.prototype.hasOwnProperty}));function Bbr(e,t){return function(n){return e(t(n))}}var Vbr=o((()=>{})),Hbr,Ubr=o((()=>{Vbr(),Hbr=Bbr(Object.keys,Object)}));function Wbr(e){if(!Hz(e))return Hbr(e);var t=[];for(var n in Object(e))Gbr.call(e,n)&&n!=`constructor`&&t.push(n);return t}var Gbr,Kbr=o((()=>{Uz(),Ubr(),Gbr=Object.prototype.hasOwnProperty}));function rB(e){return Rz(e)?Lbr(e):Wbr(e)}var iB=o((()=>{zbr(),Kbr(),zz()}));function qbr(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Jbr=o((()=>{}));function Ybr(e){if(!fz(e))return qbr(e);var t=Hz(e),n=[];for(var r in e)(r!=`constructor`||!t&&Xbr.call(e,r))&&n.push(r);return n}var Xbr,Zbr=o((()=>{pz(),Uz(),Jbr(),Xbr=Object.prototype.hasOwnProperty}));function aB(e){return Rz(e)?Lbr(e,!0):Ybr(e)}var oB=o((()=>{zbr(),Zbr(),zz()}));function Qbr(e,t){if(uz(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||oz(e)?!0:exr.test(e)||!$br.test(e)||t!=null&&e in Object(t)}var $br,exr,txr=o((()=>{dz(),sz(),$br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,exr=/^\w*$/})),sB,cB=o((()=>{xz(),sB=bz(Object,`create`)}));function nxr(){this.__data__=sB?sB(null):{},this.size=0}var rxr=o((()=>{cB()}));function ixr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var axr=o((()=>{}));function oxr(e){var t=this.__data__;if(sB){var n=t[e];return n===sxr?void 0:n}return cxr.call(t,e)?t[e]:void 0}var sxr,cxr,lxr=o((()=>{cB(),sxr=`__lodash_hash_undefined__`,cxr=Object.prototype.hasOwnProperty}));function uxr(e){var t=this.__data__;return sB?t[e]!==void 0:dxr.call(t,e)}var dxr,fxr=o((()=>{cB(),dxr=Object.prototype.hasOwnProperty}));function pxr(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=sB&&t===void 0?mxr:t,this}var mxr,hxr=o((()=>{cB(),mxr=`__lodash_hash_undefined__`}));function lB(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{rxr(),axr(),lxr(),fxr(),hxr(),lB.prototype.clear=nxr,lB.prototype.delete=ixr,lB.prototype.get=oxr,lB.prototype.has=uxr,lB.prototype.set=pxr}));function _xr(){this.__data__=[],this.size=0}var vxr=o((()=>{}));function uB(e,t){for(var n=e.length;n--;)if(kz(e[n][0],t))return n;return-1}var dB=o((()=>{Az()}));function yxr(e){var t=this.__data__,n=uB(t,e);return n<0?!1:(n==t.length-1?t.pop():bxr.call(t,n,1),--this.size,!0)}var bxr,xxr=o((()=>{dB(),bxr=Array.prototype.splice}));function Sxr(e){var t=this.__data__,n=uB(t,e);return n<0?void 0:t[n][1]}var Cxr=o((()=>{dB()}));function wxr(e){return uB(this.__data__,e)>-1}var Txr=o((()=>{dB()}));function Exr(e,t){var n=this.__data__,r=uB(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Dxr=o((()=>{dB()}));function fB(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{vxr(),xxr(),Cxr(),Txr(),Dxr(),fB.prototype.clear=_xr,fB.prototype.delete=yxr,fB.prototype.get=Sxr,fB.prototype.has=wxr,fB.prototype.set=Exr})),mB,Oxr=o((()=>{xz(),QR(),mB=bz(ZR,`Map`)}));function kxr(){this.size=0,this.__data__={hash:new lB,map:new(mB||fB),string:new lB}}var Axr=o((()=>{gxr(),pB(),Oxr()}));function jxr(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var Mxr=o((()=>{}));function hB(e,t){var n=e.__data__;return jxr(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var gB=o((()=>{Mxr()}));function Nxr(e){var t=hB(this,e).delete(e);return this.size-=+!!t,t}var Pxr=o((()=>{gB()}));function Fxr(e){return hB(this,e).get(e)}var Ixr=o((()=>{gB()}));function Lxr(e){return hB(this,e).has(e)}var Rxr=o((()=>{gB()}));function zxr(e,t){var n=hB(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Bxr=o((()=>{gB()}));function _B(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{Axr(),Pxr(),Ixr(),Rxr(),Bxr(),_B.prototype.clear=kxr,_B.prototype.delete=Nxr,_B.prototype.get=Fxr,_B.prototype.has=Lxr,_B.prototype.set=zxr}));function Hxr(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Uxr);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Hxr.Cache||_B),n}var Uxr,Wxr=o((()=>{Vxr(),Uxr=`Expected a function`,Hxr.Cache=_B}));function Gxr(e){var t=Hxr(e,function(e){return n.size===Kxr&&n.clear(),e}),n=t.cache;return t}var Kxr,qxr=o((()=>{Wxr(),Kxr=500})),Jxr,Yxr,Xxr,Zxr=o((()=>{qxr(),Jxr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yxr=/\\(\\)?/g,Xxr=Gxr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Jxr,function(e,n,r,i){t.push(r?i.replace(Yxr,`$1`):n||e)}),t})}));function Qxr(e){return e==null?``:hvr(e)}var $xr=o((()=>{yvr()}));function vB(e,t){return uz(e)?e:Qbr(e,t)?[e]:Xxr(Qxr(e))}var yB=o((()=>{dz(),txr(),Zxr(),$xr()}));function bB(e){if(typeof e==`string`||oz(e))return e;var t=e+``;return t==`0`&&1/e==-eSr?`-0`:t}var eSr,xB=o((()=>{sz(),eSr=1/0}));function SB(e,t){t=vB(t,e);for(var n=0,r=t.length;e!=null&&n{yB(),xB()}));function tSr(e,t,n){var r=e==null?void 0:SB(e,t);return r===void 0?n:r}var nSr=o((()=>{CB()}));function rSr(e,t){for(var n=-1,r=t.length,i=e.length;++n{}));function iSr(e){return uz(e)||Wz(e)||!!(aSr&&e&&e[aSr])}var aSr,oSr=o((()=>{ez(),Gz(),dz(),aSr=$R?$R.isConcatSpreadable:void 0}));function TB(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=iSr),i||(i=[]);++a0&&n(s)?t>1?TB(s,t-1,n,r,i):rSr(i,s):r||(i[i.length]=s)}return i}var EB=o((()=>{wB(),oSr()}));function DB(e){return e!=null&&e.length?TB(e,1):[]}var sSr=o((()=>{EB()}));function cSr(e){return Tyr(Hyr(e,void 0,DB),e+``)}var lSr=o((()=>{sSr(),Wyr(),Eyr()})),OB,kB=o((()=>{Vbr(),OB=Bbr(Object.getPrototypeOf,Object)}));function uSr(e){if(!iz(e)||nz(e)!=dSr)return!1;var t=OB(e);if(t===null)return!0;var n=hSr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&mSr.call(n)==gSr}var dSr,fSr,pSr,mSr,hSr,gSr,_Sr=o((()=>{rz(),kB(),az(),dSr=`[object Object]`,fSr=Function.prototype,pSr=Object.prototype,mSr=fSr.toString,hSr=pSr.hasOwnProperty,gSr=mSr.call(Object)})),vSr=o((()=>{}));function ySr(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i{}));function xSr(){this.__data__=new fB,this.size=0}var SSr=o((()=>{pB()}));function CSr(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var wSr=o((()=>{}));function TSr(e){return this.__data__.get(e)}var ESr=o((()=>{}));function DSr(e){return this.__data__.has(e)}var OSr=o((()=>{}));function kSr(e,t){var n=this.__data__;if(n instanceof fB){var r=n.__data__;if(!mB||r.length{pB(),Oxr(),Vxr(),ASr=200}));function AB(e){var t=this.__data__=new fB(e);this.size=t.size}var jB=o((()=>{pB(),SSr(),wSr(),ESr(),OSr(),jSr(),AB.prototype.clear=xSr,AB.prototype.delete=CSr,AB.prototype.get=TSr,AB.prototype.has=DSr,AB.prototype.set=kSr}));function MSr(e,t){return e&&Nz(t,rB(t),e)}var NSr=o((()=>{Pz(),iB()}));function PSr(e,t){return e&&Nz(t,aB(t),e)}var FSr=o((()=>{Pz(),oB()}));function ISr(e,t){if(t)return e.slice();var n=e.length,r=BSr?BSr(n):new e.constructor(n);return e.copy(r),r}var LSr,RSr,zSr,BSr,VSr=o((()=>{QR(),LSr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,RSr=LSr&&typeof module==`object`&&module&&!module.nodeType&&module,zSr=RSr&&RSr.exports===LSr?ZR.Buffer:void 0,BSr=zSr?zSr.allocUnsafe:void 0}));function HSr(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n{}));function WSr(){return[]}var GSr=o((()=>{})),KSr,qSr,MB,JSr=o((()=>{USr(),GSr(),KSr=Object.prototype.propertyIsEnumerable,qSr=Object.getOwnPropertySymbols,MB=qSr?function(e){return e==null?[]:(e=Object(e),HSr(qSr(e),function(t){return KSr.call(e,t)}))}:WSr}));function YSr(e,t){return Nz(e,MB(e),t)}var XSr=o((()=>{Pz(),JSr()})),ZSr,QSr=o((()=>{wB(),kB(),JSr(),GSr(),ZSr=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)rSr(t,MB(e)),e=OB(e);return t}:WSr}));function $Sr(e,t){return Nz(e,ZSr(e),t)}var eCr=o((()=>{Pz(),QSr()}));function tCr(e,t,n){var r=t(e);return uz(e)?r:rSr(r,n(e))}var nCr=o((()=>{wB(),dz()}));function rCr(e){return tCr(e,rB,MB)}var iCr=o((()=>{nCr(),JSr(),iB()}));function aCr(e){return tCr(e,aB,ZSr)}var oCr=o((()=>{nCr(),QSr(),oB()})),NB,sCr=o((()=>{xz(),QR(),NB=bz(ZR,`DataView`)})),PB,cCr=o((()=>{xz(),QR(),PB=bz(ZR,`Promise`)})),FB,lCr=o((()=>{xz(),QR(),FB=bz(ZR,`Set`)})),uCr,dCr,fCr,pCr,mCr,hCr,gCr,_Cr,vCr,yCr,bCr,IB,LB,RB=o((()=>{sCr(),Oxr(),cCr(),lCr(),oyr(),rz(),Jvr(),uCr=`[object Map]`,dCr=`[object Object]`,fCr=`[object Promise]`,pCr=`[object Set]`,mCr=`[object WeakMap]`,hCr=`[object DataView]`,gCr=yz(NB),_Cr=yz(mB),vCr=yz(PB),yCr=yz(FB),bCr=yz(Sz),IB=nz,(NB&&IB(new NB(new ArrayBuffer(1)))!=hCr||mB&&IB(new mB)!=uCr||PB&&IB(PB.resolve())!=fCr||FB&&IB(new FB)!=pCr||Sz&&IB(new Sz)!=mCr)&&(IB=function(e){var t=nz(e),n=t==dCr?e.constructor:void 0,r=n?yz(n):``;if(r)switch(r){case gCr:return hCr;case _Cr:return uCr;case vCr:return fCr;case yCr:return pCr;case bCr:return mCr}return t}),LB=IB}));function xCr(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&SCr.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var SCr,CCr=o((()=>{SCr=Object.prototype.hasOwnProperty})),zB,wCr=o((()=>{QR(),zB=ZR.Uint8Array}));function TCr(e){var t=new e.constructor(e.byteLength);return new zB(t).set(new zB(e)),t}var ECr=o((()=>{wCr()}));function DCr(e,t){var n=t?TCr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var OCr=o((()=>{ECr()}));function kCr(e){var t=new e.constructor(e.source,ACr.exec(e));return t.lastIndex=e.lastIndex,t}var ACr,jCr=o((()=>{ACr=/\w*$/}));function MCr(e){return PCr?Object(PCr.call(e)):{}}var NCr,PCr,FCr=o((()=>{ez(),NCr=$R?$R.prototype:void 0,PCr=NCr?NCr.valueOf:void 0}));function ICr(e,t){var n=t?TCr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var LCr=o((()=>{ECr()}));function RCr(e,t,n){var r=e.constructor;switch(t){case qCr:return TCr(e);case zCr:case BCr:return new r(+e);case JCr:return DCr(e,n);case YCr:case XCr:case ZCr:case QCr:case $Cr:case ewr:case twr:case nwr:case rwr:return ICr(e,n);case VCr:return new r;case HCr:case GCr:return new r(e);case UCr:return kCr(e);case WCr:return new r;case KCr:return MCr(e)}}var zCr,BCr,VCr,HCr,UCr,WCr,GCr,KCr,qCr,JCr,YCr,XCr,ZCr,QCr,$Cr,ewr,twr,nwr,rwr,iwr=o((()=>{ECr(),OCr(),jCr(),FCr(),LCr(),zCr=`[object Boolean]`,BCr=`[object Date]`,VCr=`[object Map]`,HCr=`[object Number]`,UCr=`[object RegExp]`,WCr=`[object Set]`,GCr=`[object String]`,KCr=`[object Symbol]`,qCr=`[object ArrayBuffer]`,JCr=`[object DataView]`,YCr=`[object Float32Array]`,XCr=`[object Float64Array]`,ZCr=`[object Int8Array]`,QCr=`[object Int16Array]`,$Cr=`[object Int32Array]`,ewr=`[object Uint8Array]`,twr=`[object Uint8ClampedArray]`,nwr=`[object Uint16Array]`,rwr=`[object Uint32Array]`}));function awr(e){return typeof e.constructor==`function`&&!Hz(e)?cyr(OB(e)):{}}var owr=o((()=>{lyr(),kB(),Uz()}));function swr(e){return iz(e)&&LB(e)==cwr}var cwr,lwr=o((()=>{RB(),az(),cwr=`[object Map]`})),uwr,dwr,fwr=o((()=>{lwr(),Xz(),eB(),uwr=$z&&$z.isMap,dwr=uwr?Yz(uwr):swr}));function pwr(e){return iz(e)&&LB(e)==mwr}var mwr,hwr=o((()=>{RB(),az(),mwr=`[object Set]`})),gwr,_wr,vwr=o((()=>{hwr(),Xz(),eB(),gwr=$z&&$z.isSet,_wr=gwr?Yz(gwr):pwr}));function BB(e,t,n,r,i,a){var o,s=t&ywr,l=t&bwr,u=t&xwr;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!fz(e))return e;var d=uz(e);if(d){if(o=xCr(e),!s)return myr(e,o)}else{var f=LB(e),p=f==Dwr||f==Owr;if(Kz(e))return ISr(e,s);if(f==jwr||f==Swr||p&&!i){if(o=l||p?{}:awr(e),!s)return l?$Sr(e,PSr(o,e)):YSr(e,MSr(o,e))}else{if(!VB[f])return i?e:{};o=RCr(e,f,s)}}a||(a=new AB);var m=a.get(e);if(m)return m;a.set(e,o),_wr(e)?e.forEach(function(r){o.add(BB(r,t,n,r,e,a))}):dwr(e)&&e.forEach(function(r,i){o.set(i,BB(r,t,n,i,e,a))});var h=d?void 0:(u?l?aCr:rCr:l?aB:rB)(e);return Dyr(h||e,function(r,i){h&&(i=r,r=e[i]),jz(o,i,BB(r,t,n,i,e,a))}),o}var ywr,bwr,xwr,Swr,Cwr,wwr,Twr,Ewr,Dwr,Owr,kwr,Awr,jwr,Mwr,Nwr,Pwr,Fwr,Iwr,Lwr,Rwr,zwr,Bwr,Vwr,Hwr,Uwr,Wwr,Gwr,Kwr,qwr,VB,Jwr=o((()=>{jB(),Oyr(),Mz(),NSr(),FSr(),VSr(),hyr(),XSr(),eCr(),iCr(),oCr(),RB(),CCr(),iwr(),owr(),dz(),qz(),fwr(),pz(),vwr(),iB(),oB(),ywr=1,bwr=2,xwr=4,Swr=`[object Arguments]`,Cwr=`[object Array]`,wwr=`[object Boolean]`,Twr=`[object Date]`,Ewr=`[object Error]`,Dwr=`[object Function]`,Owr=`[object GeneratorFunction]`,kwr=`[object Map]`,Awr=`[object Number]`,jwr=`[object Object]`,Mwr=`[object RegExp]`,Nwr=`[object Set]`,Pwr=`[object String]`,Fwr=`[object Symbol]`,Iwr=`[object WeakMap]`,Lwr=`[object ArrayBuffer]`,Rwr=`[object DataView]`,zwr=`[object Float32Array]`,Bwr=`[object Float64Array]`,Vwr=`[object Int8Array]`,Hwr=`[object Int16Array]`,Uwr=`[object Int32Array]`,Wwr=`[object Uint8Array]`,Gwr=`[object Uint8ClampedArray]`,Kwr=`[object Uint16Array]`,qwr=`[object Uint32Array]`,VB={},VB[Swr]=VB[Cwr]=VB[Lwr]=VB[Rwr]=VB[wwr]=VB[Twr]=VB[zwr]=VB[Bwr]=VB[Vwr]=VB[Hwr]=VB[Uwr]=VB[kwr]=VB[Awr]=VB[jwr]=VB[Mwr]=VB[Nwr]=VB[Pwr]=VB[Fwr]=VB[Wwr]=VB[Gwr]=VB[Kwr]=VB[qwr]=!0,VB[Ewr]=VB[Dwr]=VB[Iwr]=!1}));function Ywr(e){return BB(e,Xwr|Zwr)}var Xwr,Zwr,Qwr=o((()=>{Jwr(),Xwr=1,Zwr=4}));function $wr(e){return this.__data__.set(e,eTr),this}var eTr,tTr=o((()=>{eTr=`__lodash_hash_undefined__`}));function nTr(e){return this.__data__.has(e)}var rTr=o((()=>{}));function HB(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _B;++t{Vxr(),tTr(),rTr(),HB.prototype.add=HB.prototype.push=$wr,HB.prototype.has=nTr}));function aTr(e,t){for(var n=-1,r=e==null?0:e.length;++n{}));function sTr(e,t){return e.has(t)}var cTr=o((()=>{}));function lTr(e,t,n,r,i,a){var o=n&uTr,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=n&dTr?new HB:void 0;for(a.set(e,t),a.set(t,e);++f{iTr(),oTr(),cTr(),uTr=1,dTr=2}));function pTr(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var mTr=o((()=>{}));function hTr(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var UB=o((()=>{}));function gTr(e,t,n,r,i,a,o){switch(n){case kTr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case OTr:return!(e.byteLength!=t.byteLength||!a(new zB(e),new zB(t)));case yTr:case bTr:case CTr:return kz(+e,+t);case xTr:return e.name==t.name&&e.message==t.message;case wTr:case ETr:return e==t+``;case STr:var s=pTr;case TTr:var l=r&_Tr;if(s||(s=hTr),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=vTr,o.set(e,t);var d=lTr(s(e),s(t),r,i,a,o);return o.delete(e),d;case DTr:if(WB)return WB.call(e)==WB.call(t)}return!1}var _Tr,vTr,yTr,bTr,xTr,STr,CTr,wTr,TTr,ETr,DTr,OTr,kTr,ATr,WB,jTr=o((()=>{ez(),wCr(),Az(),fTr(),mTr(),UB(),_Tr=1,vTr=2,yTr=`[object Boolean]`,bTr=`[object Date]`,xTr=`[object Error]`,STr=`[object Map]`,CTr=`[object Number]`,wTr=`[object RegExp]`,TTr=`[object Set]`,ETr=`[object String]`,DTr=`[object Symbol]`,OTr=`[object ArrayBuffer]`,kTr=`[object DataView]`,ATr=$R?$R.prototype:void 0,WB=ATr?ATr.valueOf:void 0}));function MTr(e,t,n,r,i,a){var o=n&NTr,s=rCr(e),l=s.length;if(l!=rCr(t).length&&!o)return!1;for(var u=l;u--;){var d=s[u];if(!(o?d in t:PTr.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var h=o;++u{iCr(),NTr=1,PTr=Object.prototype.hasOwnProperty}));function ITr(e,t,n,r,i,a){var o=uz(e),s=uz(t),l=o?zTr:LB(e),u=s?zTr:LB(t);l=l==RTr?GB:l,u=u==RTr?GB:u;var d=l==GB,f=u==GB,p=l==u;if(p&&Kz(e)){if(!Kz(t))return!1;o=!0,d=!1}if(p&&!d)return a||(a=new AB),o||tB(e)?lTr(e,t,n,r,i,a):gTr(e,t,l,n,r,i,a);if(!(n<r)){var m=d&&BTr.call(e,`__wrapped__`),h=f&&BTr.call(t,`__wrapped__`);if(m||h){var g=m?e.value():e,_=h?t.value():t;return a||(a=new AB),i(g,_,n,r,a)}}return p?(a||(a=new AB),MTr(e,t,n,r,i,a)):!1}var LTr,RTr,zTr,GB,BTr,VTr=o((()=>{jB(),fTr(),jTr(),FTr(),RB(),dz(),qz(),nB(),LTr=1,RTr=`[object Arguments]`,zTr=`[object Array]`,GB=`[object Object]`,BTr=Object.prototype.hasOwnProperty}));function HTr(e,t,n,r,i){return e===t?!0:e==null||t==null||!iz(e)&&!iz(t)?e!==e&&t!==t:ITr(e,t,n,r,HTr,i)}var UTr=o((()=>{VTr(),az()}));function WTr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i{jB(),UTr(),GTr=1,KTr=2}));function JTr(e){return e===e&&!fz(e)}var YTr=o((()=>{pz()}));function XTr(e){for(var t=rB(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,JTr(i)]}return t}var ZTr=o((()=>{YTr(),iB()}));function QTr(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}var $Tr=o((()=>{}));function eEr(e){var t=XTr(e);return t.length==1&&t[0][2]?QTr(t[0][0],t[0][1]):function(n){return n===e||WTr(n,e,t)}}var tEr=o((()=>{qTr(),ZTr(),$Tr()}));function nEr(e,t){return e!=null&&t in Object(e)}var rEr=o((()=>{}));function iEr(e,t,n){t=vB(t,e);for(var r=-1,i=t.length,a=!1;++r{yB(),Gz(),dz(),Ez(),Lz(),xB()}));function oEr(e,t){return e!=null&&iEr(e,t,nEr)}var sEr=o((()=>{rEr(),aEr()}));function cEr(e,t){return Qbr(e)&&JTr(t)?QTr(bB(e),t):function(n){var r=tSr(n,e);return r===void 0&&r===t?oEr(n,e):HTr(t,r,lEr|uEr)}}var lEr,uEr,dEr=o((()=>{UTr(),nSr(),sEr(),txr(),YTr(),$Tr(),xB(),lEr=1,uEr=2}));function fEr(e){return function(t){return t==null?void 0:t[e]}}var pEr=o((()=>{}));function mEr(e){return function(t){return SB(t,e)}}var hEr=o((()=>{CB()}));function gEr(e){return Qbr(e)?fEr(bB(e)):mEr(e)}var _Er=o((()=>{pEr(),hEr(),txr(),xB()}));function KB(e){return typeof e==`function`?e:e==null?mz:typeof e==`object`?uz(e)?cEr(e[0],e[1]):eEr(e):gEr(e)}var qB=o((()=>{tEr(),dEr(),hz(),dz(),_Er()}));function vEr(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var yEr=o((()=>{})),JB,bEr=o((()=>{yEr(),JB=vEr()}));function xEr(e,t){return e&&JB(e,t,rB)}var YB=o((()=>{bEr(),iB()}));function SEr(e,t){return function(n,r){if(n==null)return n;if(!Rz(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a{zz()})),XB,ZB=o((()=>{YB(),CEr(),XB=SEr(xEr)})),wEr,TEr=o((()=>{QR(),wEr=function(){return ZR.Date.now()}})),EEr,DEr,OEr,kEr=o((()=>{Iz(),Az(),Vz(),oB(),EEr=Object.prototype,DEr=EEr.hasOwnProperty,OEr=Fz(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&Bz(t[0],t[1],i)&&(r=1);++n{Oz(),Az()}));function MEr(e){return iz(e)&&Rz(e)}var NEr=o((()=>{zz(),az()}));function PEr(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var FEr=o((()=>{}));function IEr(e){return Nz(e,aB(e))}var LEr=o((()=>{Pz(),oB()}));function REr(e,t,n,r,i,a,o){var s=PEr(e,n),l=PEr(t,n),u=o.get(l);if(u)AEr(e,n,u);else{var d=a?a(s,l,n+``,e,t,o):void 0,f=d===void 0;if(f){var p=uz(l),m=!p&&Kz(l),h=!p&&!m&&tB(l);d=l,p||m||h?uz(s)?d=s:MEr(s)?d=myr(s):m?(f=!1,d=ISr(l,!0)):h?(f=!1,d=ICr(l,!0)):d=[]:uSr(l)||Wz(l)?(d=s,Wz(s)?d=IEr(s):(!fz(s)||gz(s))&&(d=awr(l))):f=!1}f&&(o.set(l,d),i(d,l,r,a,o),o.delete(l)),AEr(e,n,d)}}var zEr=o((()=>{jEr(),VSr(),LCr(),hyr(),owr(),Gz(),dz(),NEr(),qz(),_z(),pz(),_Sr(),nB(),FEr(),LEr()}));function BEr(e,t,n,r,i){e!==t&&JB(t,function(a,o){if(i||(i=new AB),fz(a))REr(e,t,o,n,BEr,r,i);else{var s=r?r(PEr(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),AEr(e,o,s)}},aB)}var VEr=o((()=>{jB(),jEr(),bEr(),zEr(),pz(),oB(),FEr()}));function HEr(e,t,n){for(var r=-1,i=e==null?0:e.length;++r{}));function QB(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var WEr=o((()=>{}));function GEr(e){return typeof e==`function`?e:mz}var $B=o((()=>{hz()}));function eV(e,t){return(uz(e)?Dyr:XB)(e,GEr(t))}var KEr=o((()=>{Oyr(),ZB(),$B(),dz()})),qEr=o((()=>{KEr()}));function JEr(e,t){var n=[];return XB(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}var YEr=o((()=>{ZB()}));function tV(e,t){return(uz(e)?HSr:JEr)(e,KB(t,3))}var XEr=o((()=>{USr(),YEr(),qB(),dz()}));function ZEr(e){return function(t,n,r){var i=Object(t);if(!Rz(t)){var a=KB(n,3);t=rB(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var QEr=o((()=>{qB(),zz(),iB()}));function $Er(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Lvr(n);return i<0&&(i=eDr(r+i,0)),kyr(e,KB(t,3),i)}var eDr,tDr=o((()=>{Ayr(),qB(),Rvr(),eDr=Math.max})),nV,nDr=o((()=>{QEr(),tDr(),nV=ZEr($Er)}));function rDr(e,t){var n=-1,r=Rz(e)?Array(e.length):[];return XB(e,function(e,i,a){r[++n]=t(e,i,a)}),r}var iDr=o((()=>{ZB(),zz()}));function rV(e,t){return(uz(e)?cz:rDr)(e,KB(t,3))}var aDr=o((()=>{lz(),qB(),iDr(),dz()}));function oDr(e,t){return e==null?e:JB(e,GEr(t),aB)}var sDr=o((()=>{bEr(),$B(),oB()}));function cDr(e,t){return e&&xEr(e,GEr(t))}var lDr=o((()=>{YB(),$B()}));function uDr(e,t){return e>t}var dDr=o((()=>{}));function fDr(e,t){return e!=null&&pDr.call(e,t)}var pDr,mDr=o((()=>{pDr=Object.prototype.hasOwnProperty}));function hDr(e,t){return e!=null&&iEr(e,t,fDr)}var gDr=o((()=>{mDr(),aEr()})),_Dr=o((()=>{rz(),dz(),az()}));function vDr(e,t){return cz(t,function(t){return e[t]})}var yDr=o((()=>{lz()}));function iV(e){return e==null?[]:vDr(e,rB(e))}var bDr=o((()=>{yDr(),iB()}));function xDr(e){if(e==null)return!0;if(Rz(e)&&(uz(e)||typeof e==`string`||typeof e.splice==`function`||Kz(e)||tB(e)||Wz(e)))return!e.length;var t=LB(e);if(t==SDr||t==CDr)return!e.size;if(Hz(e))return!Wbr(e).length;for(var n in e)if(wDr.call(e,n))return!1;return!0}var SDr,CDr,wDr,TDr=o((()=>{Kbr(),RB(),Gz(),dz(),zz(),qz(),Uz(),nB(),SDr=`[object Map]`,CDr=`[object Set]`,wDr=Object.prototype.hasOwnProperty}));function aV(e){return e===void 0}var EDr=o((()=>{}));function DDr(e,t){return e{}));function oV(e,t){var n={};return t=KB(t,3),xEr(e,function(e,r,i){Dz(n,r,t(e,r,i))}),n}var kDr=o((()=>{Oz(),YB(),qB()}));function ADr(e,t,n){for(var r=-1,i=e.length;++r{sz()}));function cV(e){return e&&e.length?ADr(e,mz,uDr):void 0}var jDr=o((()=>{sV(),dDr(),hz()})),lV,MDr=o((()=>{VEr(),Jyr(),lV=qyr(function(e,t,n){BEr(e,t,n)})}));function uV(e){return e&&e.length?ADr(e,mz,DDr):void 0}var NDr=o((()=>{sV(),ODr(),hz()}));function PDr(e,t){return e&&e.length?ADr(e,KB(t,2),DDr):void 0}var FDr=o((()=>{sV(),qB(),ODr()}));function IDr(e,t,n,r){if(!fz(e))return e;t=vB(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i{Mz(),yB(),Ez(),pz(),xB()}));function RDr(e,t,n){for(var r=-1,i=t.length,a={};++r{CB(),LDr(),yB()}));function BDr(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var VDr=o((()=>{}));function HDr(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=oz(e),o=t!==void 0,s=t===null,l=t===t,u=oz(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e{sz()}));function WDr(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r=s?l:l*(n[r]==`desc`?-1:1)}return e.index-t.index}var GDr=o((()=>{UDr()}));function KDr(e,t,n){t=t.length?cz(t,function(e){return uz(e)?function(t){return SB(t,e.length===1?e[0]:e)}:e}):[mz];var r=-1;return t=cz(t,Yz(KB)),BDr(rDr(e,function(e,n,i){return{criteria:cz(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return WDr(e,t,n)})}var qDr=o((()=>{lz(),CB(),qB(),iDr(),VDr(),Xz(),GDr(),hz(),dz()})),JDr=o((()=>{pEr()})),YDr,XDr,ZDr,QDr,dV,fV,$Dr,eOr,tOr,nOr,rOr,iOr,aOr,oOr,sOr,cOr,lOr=o((()=>{YDr=`\\ud800-\\udfff`,XDr=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,ZDr=`\\ufe0e\\ufe0f`,QDr=`[`+YDr+`]`,dV=`[`+XDr+`]`,fV=`\\ud83c[\\udffb-\\udfff]`,$Dr=`(?:`+dV+`|`+fV+`)`,eOr=`[^`+YDr+`]`,tOr=`(?:\\ud83c[\\udde6-\\uddff]){2}`,nOr=`[\\ud800-\\udbff][\\udc00-\\udfff]`,rOr=`\\u200d`,iOr=$Dr+`?`,aOr=`[`+ZDr+`]?`,oOr=`(?:`+rOr+`(?:`+[eOr,tOr,nOr].join(`|`)+`)`+aOr+iOr+`)*`,sOr=aOr+iOr+oOr,cOr=`(?:`+[eOr+dV+`?`,dV,tOr,nOr,QDr].join(`|`)+`)`,RegExp(fV+`(?=`+fV+`)|`+cOr+sOr,`g`)})),uOr=o((()=>{JDr(),vSr(),lOr()}));function dOr(e,t){return RDr(e,t,function(t,n){return oEr(e,n)})}var fOr=o((()=>{zDr(),sEr()})),pV,pOr=o((()=>{fOr(),lSr(),pV=cSr(function(e,t){return e==null?{}:dOr(e,t)})}));function mOr(e,t,n,r){for(var i=-1,a=gOr(hOr((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var hOr,gOr,_Or=o((()=>{hOr=Math.ceil,gOr=Math.max}));function vOr(e){return function(t,n,r){return r&&typeof r!=`number`&&Bz(t,n,r)&&(n=r=void 0),t=Nvr(t),n===void 0?(n=t,t=0):n=Nvr(n),r=r===void 0?t{_Or(),Vz(),Ivr()})),mV,bOr=o((()=>{yOr(),mV=vOr()}));function xOr(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}var SOr=o((()=>{}));function hV(e,t,n){var r=uz(e)?ySr:xOr,i=arguments.length<3;return r(e,KB(t,4),n,i,XB)}var COr=o((()=>{bSr(),ZB(),qB(),SOr(),dz()})),wOr=o((()=>{Kbr(),RB(),zz(),_Dr(),uOr()})),gV,TOr=o((()=>{EB(),qDr(),Iz(),Vz(),gV=Fz(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Bz(e,t[0],t[1])?t=[]:n>2&&Bz(t[0],t[1],t[2])&&(t=[t[0]]),KDr(e,TB(t,1),[])})})),EOr,DOr=o((()=>{lCr(),pyr(),UB(),EOr=FB&&1/hTr(new FB([,-0]))[1]==1/0?function(e){return new FB(e)}:fyr}));function OOr(e,t,n){var r=-1,i=Lyr,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=HEr;else if(a>=kOr){var u=t?null:EOr(e);if(u)return hTr(u);o=!1,i=sTr,l=new HB}else l=t?[]:s;outer:for(;++r{iTr(),Ryr(),UEr(),cTr(),DOr(),UB(),kOr=200})),jOr,MOr=o((()=>{EB(),Iz(),AOr(),NEr(),jOr=Fz(function(e){return OOr(TB(e,1,MEr,!0))})}));function NOr(e){var t=++POr;return Qxr(e)+t}var POr,FOr=o((()=>{$xr(),POr=0}));function IOr(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r{}));function ROr(e,t){return IOr(e||[],t||[],jz)}var zOr=o((()=>{Mz(),LOr()})),_V=o((()=>{sz(),yvr(),Rvr(),hz(),oyr(),lyr(),pz(),QR(),dyr(),pyr(),dz(),az(),hyr(),byr(),Eyr(),Oyr(),Ryr(),Ez(),Mz(),Pz(),Jyr(),zz(),Uz(),iB(),oB(),nSr(),lSr(),Iz(),rz(),_Sr(),Oz(),xB(),$xr(),vSr(),bSr(),Mvr(),Vz(),Jwr(),Qwr(),wB(),EB(),lz(),qB(),xyr(),ZB(),NSr(),TEr(),kEr(),VEr(),iTr(),UEr(),Xz(),cTr(),NEr(),WEr(),qEr(),yEr(),CEr(),$B(),RB(),mTr(),Az(),XEr(),nDr(),tDr(),YB(),QEr(),Ayr(),aDr(),sSr(),KEr(),sDr(),lDr(),USr(),_z(),dDr(),gDr(),sEr(),Ivr(),Iyr(),_Dr(),bDr(),yB(),CB(),Gz(),eB(),qz(),TDr(),UTr(),Lz(),fwr(),qTr(),ZTr(),ryr(),Uvr(),abr(),vwr(),nB(),EDr(),Myr(),ODr(),kDr(),tEr(),dEr(),jDr(),sV(),Wxr(),MDr(),NDr(),FDr(),ez(),UB(),oCr(),zDr(),qDr(),oTr(),uOr(),pOr(),_Er(),UDr(),bOr(),yOr(),COr(),SOr(),YEr(),LDr(),wOr(),TOr(),GSr(),yDr(),Zyr(),Zxr(),LEr(),kB(),Tvr(),Svr(),MOr(),AOr(),FOr(),pEr(),zOr(),LOr()}));function BOr(e,t){e[t]?e[t]++:e[t]=1}function VOr(e,t){--e[t]||delete e[t]}function vV(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+GOr+a+GOr+(aV(r)?WOr:r)}function HOr(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function UOr(e,t){return vV(e,t.v,t.w,t.name)}var WOr,yV,GOr,bV,KOr=o((()=>{_V(),WOr=`\0`,yV=`\0`,GOr=``,bV=class{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,`directed`)||e.directed,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Cz(void 0),this._defaultEdgeLabelFn=Cz(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[yV]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return gz(e)||(e=Cz(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return rB(this._nodes)}sources(){var e=this;return tV(this.nodes(),function(t){return xDr(e._in[t])})}sinks(){var e=this;return tV(this.nodes(),function(t){return xDr(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return eV(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=yV,this._children[e]={},this._children[yV][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],eV(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),eV(rB(this._in[e]),t),delete this._in[e],delete this._preds[e],eV(rB(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(aV(t))t=yV;else{t+=``;for(var n=t;!aV(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==yV)return t}}children(e){if(aV(e)&&(e=yV),this._isCompound){var t=this._children[e];if(t)return rB(t)}else if(e===yV)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return rB(t)}successors(e){var t=this._sucs[e];if(t)return rB(t)}neighbors(e){var t=this.predecessors(e);if(t)return jOr(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;eV(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),eV(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&eV(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return gz(e)||(e=Cz(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return iV(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return hV(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,aV(n)||(n=``+n);var o=vV(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!aV(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=HOr(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,BOr(this._preds[t],e),BOr(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?UOr(this._isDirected,arguments[0]):vV(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?UOr(this._isDirected,arguments[0]):vV(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?UOr(this._isDirected,arguments[0]):vV(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],VOr(this._preds[t],e),VOr(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=iV(n);return t?tV(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=iV(n);return t?tV(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},bV.prototype._nodeCount=0,bV.prototype._edgeCount=0})),xV=o((()=>{KOr()})),qOr=l({captureNodeSizes:()=>QOr,shouldCaptureSizes:()=>YOr});function JOr(){if(typeof globalThis<`u`)return globalThis}function YOr(){var e;return!!((e=JOr())!=null&&e.mermaidCaptureSizes)}function XOr(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}function ZOr(e,t){let n=JOr();if(!n)return;let r=t.node(),i=(r&&`ownerSVGElement`in r?r.ownerSVGElement:null)??r,a=(i==null?void 0:i.id)??`(unknown)`;n.mermaidCapturedSizes??(n.mermaidCapturedSizes=[]);let o={svgId:a,sizes:e};n.mermaidCapturedSizes.push(o),n.mermaidLastCapturedSizes=o}function QOr(e,t){let n=[];for(let e of t.nodes)e.isGroup||n.push({id:e.id,width:e.width??0,height:e.height??0});n.length!==0&&ZOr({metadata:{captureVersion:$Or,capturedAt:new Date().toISOString(),capturedFrom:XOr()},nodes:n},e)}var $Or,ekr=o((()=>{fN(),$Or=1,U(JOr,`getCaptureGlobal`),U(YOr,`shouldCaptureSizes`),U(XOr,`capturedFromLocation`),U(ZOr,`emitCapturedSizes`),U(QOr,`captureNodeSizes`)}));function tkr(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}async function nkr(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await xR(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}async function rkr(e,t,n){var r;let i=await NR(e,t,n),a=((r=i.node())==null?void 0:r.getBBox())??{width:0,height:0};return t.width=a.width,t.height=a.height,i}async function ikr(e,t){let n=new bV({multigraph:!0,compound:!0}),r=[...t.edges],i=_I(),a=tkr(e),{edgeLabels:o,nodes:s}=a,l=new Map,u=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)u&&await nkr(s,e),n.setNode(e.id,{...e});else{if(u){let t=await rkr(s,e,{config:i,dir:e.dir});l.set(e.id,t)}n.setNode(e.id,{...e})}}));for(let e of r)u&&H_r(e)&&await JR(o,e),n.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await bp(async()=>{let{captureNodeSizes:e}=await Promise.resolve().then(()=>(ekr(),qOr));return{captureNodeSizes:e}},void 0,import.meta.url);n(e,t)}return{graph:n,groups:a,nodeElements:l}}function SV({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:r,afterPaint:i,paintOptions:a}){let o=t??okr;return U(async function(t,s,l,u){let d=s.select(`g`);((l==null?void 0:l.insertMarkers)??$_r)(d,t.markers,t.type,t.diagramId),akr();let f={element:d,helpers:l,options:u};f.preparedLayout=await(e==null?void 0:e(t,f));let p=await o(t,f),m=await n(t,f),h={...f,measure:p};r?await r(t,h,m):await skr(t,h,a),await(i==null?void 0:i(t,h,m))},`render`)}function akr(){w_r(),V_r(),k_r(),_kr()}async function okr(e,{element:t}){return await ikr(t,e)}async function skr(e,t,n={}){var r;let{measure:i}=t,{groups:a}=i;for(let i of((r=n.getNodes)==null?void 0:r.call(n,e,t))??e.nodes){var o;(o=n.skipNode)!=null&&o.call(n,i,t)||await ckr(a,i,t,n)}let s=ukr(e.nodes);for(let r of e.edges)dkr(r,n)||await fkr(a,r,s,e,n,t)}async function ckr(e,t,n,r){t.clusterNode?IR(t):lkr(t,n,r)?await RR(e.clusters,t):IR(t)}function lkr(e,t,n){var r;return e.isGroup===!0&&(((r=n.isCluster)==null?void 0:r.call(n,e,t))??!0)}function ukr(e){let t=new Map;for(let n of e)n!=null&&n.id&&t.set(n.id,n);return t}function dkr(e,t){var n;return e.isLayoutOnly||!!((n=t.skipEdge)!=null&&n.call(t,e))}async function fkr(e,t,n,r,i,a){let o=YR(e.edgePaths,{...t},i.clusterDb??new Map,r.type,pkr(t.start,t,n,a,i),pkr(t.end,t,n,a,i),r.diagramId,mkr(t,i));H_r(t)&&(GR.has(t.id)||await JR(e.edgeLabels,t),hkr(t,o))}function pkr(e,t,n,r,i){var a;return((a=i.getEdgeNode)==null?void 0:a.call(i,e,t,r))??(e?n.get(e)??{}:{})}function mkr(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}function hkr(e,t){let n=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),r=WF(),{subGraphTitleTotalMargin:i}=PR({flowchart:r.flowchart??{}});if(e.label){let r=GR.get(e.id),a=e.x,o=e.y;if(n){let r=xL.calcLabelPosition(n);W.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t!=null&&t.updatedPath&&(a=r.x,o=r.y)}r.attr(`transform`,`translate(${a}, ${o+i/2})`)}if(e!=null&&e.startLabelLeft){let t=KR.get(e.id).startLeft,r=e==null?void 0:e.x,i=e==null?void 0:e.y;if(n){let t=xL.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=KR.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=xL.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=KR.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=xL.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=KR.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=xL.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}var CV,wV,gkr,_kr,TV,vkr,ykr,bkr,xkr,EV,Skr,Ckr,wkr,Tkr,DV,Ekr,Dkr,Okr=o((()=>{zR(),XR(),LR(),MR(),wL(),bI(),hN(),fN(),xV(),xp(),U(tkr,`createLayoutElementGroups`),U(nkr,`measureGroupLabel`),U(rkr,`insertMeasuredNode`),U(ikr,`createGraphWithElements`),CV=new Map,wV=new Map,gkr=new Map,_kr=U(()=>{wV.clear(),gkr.clear(),CV.clear()},`clear`),TV=U((e,t)=>{let n=wV.get(t)||[];return W.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),vkr=U((e,t)=>{let n=wV.get(t)||[];return W.info(`Descendants of `,t,` is `,n),W.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||TV(e.v,t)||TV(e.w,t)||n.includes(e.w):(W.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),ykr=U((e,t,n,r)=>{W.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),W.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)ykr(i,t,n,r);else{let a=t.node(i);W.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(W.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(W.debug(`Setting parent`,i,e),n.setParent(i,e)):(W.info(`In copy `,e,`root`,r,`data`,t.node(e),r),W.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);W.debug(`Copying Edges`,o),o.forEach(i=>{W.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);W.info(`Edge data`,a,r);try{vkr(i,r)?(W.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),W.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):W.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){W.error(e)}})}W.debug(`Removing node`,i),t.removeNode(i)})},`copy`),bkr=U((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)gkr.set(i,e),r=[...r,...bkr(i,t)];return r},`extractDescendants`),xkr=U((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),EV=U((e,t,n)=>{let r=t.children(e);if(W.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=EV(e,t,n),a=xkr(t,n,r);if(r){if(a.length>0)i=r;else return r}}return i},`findNonClusterChild`),Skr=U(e=>!CV.has(e)||!CV.get(e).externalConnections?e:CV.has(e)?CV.get(e).id:e,`getAnchorId`),Ckr=U((e,t)=>{if(!e||t>10)W.debug(`Opting out, no graph `);else{W.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(W.debug(`Cluster identified`,t,` Replacement id in edges: `,EV(t,e,t)),wV.set(t,bkr(t,e)),CV.set(t,{id:EV(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(W.debug(`Cluster identified`,t,wV),r.forEach(e=>{TV(e.v,t)^TV(e.w,t)&&(W.debug(`Edge: `,e,` leaves cluster `,t),W.debug(`Descendants of XXX `,t,`: `,wV.get(t)),CV.get(t).externalConnections=!0)})):W.debug(`Not a cluster `,t,wV)});for(let t of CV.keys()){var n;let r=CV.get(t).id,i=e.parent(r);i!==t&&CV.has(i)&&!CV.get(i).externalConnections&&(CV.get(t).id=i);let a=e.edges().some(e=>e.v===t);if(r&&(n=CV.get(t))!=null&&n.externalConnections&&a&&Ekr(e,r,t)){let n=Dkr(e,t,e.parent(r));n&&(CV.get(t).id=n)}}e.edges().forEach(function(t){let n=e.edge(t);W.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),W.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(W.debug(`Fix XXX`,CV,`ids:`,t.v,t.w,`Translating: `,CV.get(t.v),` --- `,CV.get(t.w)),CV.get(t.v)||CV.get(t.w)){if(W.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=Skr(t.v),i=Skr(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);CV.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);CV.get(r).externalConnections=!0,n.toCluster=t.w}W.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),wkr(e,0),W.trace(CV)}},`adjustClustersAndEdges`),wkr=U((e,t)=>{if(t>10){W.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r=r||n.length>0}if(!r)W.debug(`Done, no node has children`,e.nodes());else{W.debug(`Nodes = `,n,t);for(let r of n)if(W.debug(`Extracting node`,r,CV,CV.has(r)&&!CV.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!CV.has(r))W.debug(`Not a cluster`,r,t);else if(!CV.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){var i;W.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;(i=CV.get(r))!=null&&(i=i.clusterData)!=null&&i.dir&&(n=CV.get(r).clusterData.dir,W.debug(`Fixing dir`,CV.get(r).clusterData.dir,n));let a=new bV({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});ykr(r,e,a,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:CV.get(r).clusterData,label:CV.get(r).label,graph:a})}else W.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!CV.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),W.debug(CV);n=e.nodes(),W.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);W.debug(` Now next level`,r,n),n!=null&&n.clusterNode&&wkr(n.graph,t+1)}}},`extractor`),Tkr=U((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=Tkr(e,e.children(t));n=[...n,...r]}),n},`sorter`),DV=U(e=>Tkr(e,e.children()),`sortNodesByHierarchy`),Ekr=U((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=CV.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),Dkr=U((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||TV(i,n))continue;let r=EV(i,e,t);if(r&&!Ekr(e,r,t))return r}return null},`findSafeAnchorNode`),U(SV,`createCommonLayoutRenderer`),U(akr,`clearLayoutRenderState`),U(okr,`defaultMeasureLayout`),U(skr,`paintLayoutData`),U(ckr,`paintLayoutNode`),U(lkr,`shouldPaintAsCluster`),U(ukr,`buildNodeLookup`),U(dkr,`shouldSkipPaintEdge`),U(fkr,`paintLayoutEdge`),U(pkr,`getRenderedNode`),U(mkr,`shouldSkipIntersect`),U(hkr,`positionRenderedEdgeLabel`)}));function kkr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function OV(){if(Zkr)return PV;Zkr=1;function e(e){return e==null}U(e,`isNothing`);function t(e){return typeof e==`object`&&!!e}U(t,`isObject`);function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}U(n,`toArray`);function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;rs&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}U(t,`getLine`);function n(t,n){return e.repeat(` `,n-t.length)+t}U(n,`padStart`);function r(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],l,u=-1;for(;l=a.exec(r.buffer);)s.push(l.index),o.push(l.index+l[0].length),r.position<=l.index&&u<0&&(u=o.length-2);u<0&&(u=o.length-1);let d=``,f=Math.min(r.line+i.linesAfter,s.length).toString().length,p=i.maxLength-(i.indent+f+3);for(let a=1;a<=i.linesBefore&&!(u-a<0);a++){let l=t(r.buffer,o[u-a],s[u-a],r.position-(o[u]-o[u-a]),p);d=e.repeat(` `,i.indent)+n((r.line-a+1).toString(),f)+` | `+l.str+` `+d}let m=t(r.buffer,o[u],s[u],r.position,p);d+=e.repeat(` `,i.indent)+n((r.line+1).toString(),f)+` | `+m.str+` `,d+=e.repeat(`-`,i.indent+f+3+m.pos)+`^ `;for(let a=1;a<=i.linesAfter&&!(u+a>=s.length);a++){let l=t(r.buffer,o[u+a],s[u+a],r.position-(o[u]-o[u+a]),p);d+=e.repeat(` `,i.indent)+n((r.line+a+1).toString(),f)+` | `+l.str+` `}return d.replace(/\n$/,``)}return U(r,`makeSnippet`),eAr=r,eAr}function AV(){if(rAr)return nAr;rAr=1;let e=kV(),t=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],n=[`scalar`,`sequence`,`mapping`];function r(e){let t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}U(r,`compileStyleAliases`);function i(i,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e(`Unknown option "`+n+`" is met in definition of "`+i+`" YAML type.`)}),this.options=a,this.tag=i,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(e){return e},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=r(a.styleAliases||null),n.indexOf(this.kind)===-1)throw new e(`Unknown kind "`+this.kind+`" is specified for "`+i+`" YAML type.`)}return U(i,`Type2`),nAr=i,nAr}function jkr(){if(aAr)return iAr;aAr=1;let e=kV(),t=AV();function n(e,t){let n=[];return e[t].forEach(function(e){let t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}U(n,`compileList`);function r(){let e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function t(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}U(t,`collectType`);for(let e=0,n=arguments.length;e=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}U(n,`isHexCode`);function r(e){return e>=48&&e<=55}U(r,`isOctCode`);function i(e){return e>=48&&e<=57}U(i,`isDecCode`);function a(e){if(e===null)return!1;let t=e.length,a=0,s=!1;if(!t)return!1;let l=e[a];if((l===`-`||l===`+`)&&(l=e[++a]),l===`0`){if(a+1===t)return!0;if(l=e[++a],l===`b`){for(a++;a=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:U(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:U(function(e){return e.toString(10)},`decimal`),hexadecimal:U(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),vAr}function zkr(){if(xAr)return bAr;xAr=1;let e=OV(),t=AV(),n=RegExp(`^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),r=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function i(e){return e===null||!n.test(e)?!1:isFinite(parseFloat(e,10))?!0:r.test(e)}U(i,`resolveYamlFloat`);function a(e){let t=e.toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}U(a,`constructYamlFloat`);let o=/^[-+]?[0-9]+e/;function s(t,n){if(isNaN(t))switch(n){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(t===1/0)switch(n){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(t===-1/0)switch(n){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(e.isNegativeZero(t))return`-0.0`;let r=t.toString(10);return o.test(r)?r.replace(`e`,`.e`):r}U(s,`representYamlFloat`);function l(t){return Object.prototype.toString.call(t)===`[object Number]`&&(t%1!=0||e.isNegativeZero(t))}return U(l,`isFloat`),bAr=new t(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:i,construct:a,predicate:l,represent:s,defaultStyle:`lowercase`}),bAr}function Bkr(){return CAr||(CAr=1,SAr=Fkr().extend({implicit:[Ikr(),Lkr(),Rkr(),zkr()]})),SAr}function Vkr(){return TAr||(TAr=1,wAr=Bkr()),wAr}function Hkr(){if(DAr)return EAr;DAr=1;let e=AV(),t=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),n=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 r(e){return e===null?!1:t.exec(e)!==null||n.exec(e)!==null}U(r,`resolveYamlTimestamp`);function i(e){let r=0,i=null,a=t.exec(e);if(a===null&&(a=n.exec(e)),a===null)throw Error(`Date resolve error`);let o=+a[1],s=a[2]-1,l=+a[3];if(!a[4])return new Date(Date.UTC(o,s,l));let u=+a[4],d=+a[5],f=+a[6];if(a[7]){for(r=a[7].slice(0,3);r.length<3;)r+=`0`;r=+r}if(a[9]){let e=+a[10],t=+(a[11]||0);i=(e*60+t)*6e4,a[9]===`-`&&(i=-i)}let p=new Date(Date.UTC(o,s,l,u,d,f,r));return i&&p.setTime(p.getTime()-i),p}U(i,`constructYamlTimestamp`);function a(e){return e.toISOString()}return U(a,`representYamlTimestamp`),EAr=new e(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:r,construct:i,instanceOf:Date,represent:a}),EAr}function Ukr(){if(kAr)return OAr;kAr=1;let e=AV();function t(e){return e===`<<`||e===null}return U(t,`resolveYamlMerge`),OAr=new e(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:t}),OAr}function Wkr(){if(jAr)return AAr;jAr=1;let e=AV();function t(e){if(e===null)return!1;let t=0,n=e.length;for(let r=0;r64)){if(n<0)return!1;t+=6}}return t%8==0}U(t,`resolveYamlBinary`);function n(e){let t=e.replace(/[\r\n=]/g,``),n=t.length,r=0,i=[];for(let e=0;e>16&255),i.push(r>>8&255),i.push(r&255)),r=r<<6|`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`.indexOf(t.charAt(e));let a=n%4*6;return a===0?(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)):a===18?(i.push(r>>10&255),i.push(r>>2&255)):a===12&&i.push(r>>4&255),new Uint8Array(i)}U(n,`constructYamlBinary`);function r(e){let t=``,n=0,r=e.length,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;for(let a=0;a>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]),n=(n<<8)+e[a];let a=r%3;return a===0?(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]):a===2?(t+=i[n>>10&63],t+=i[n>>4&63],t+=i[n<<2&63],t+=i[64]):a===1&&(t+=i[n>>2&63],t+=i[n<<4&63],t+=i[64],t+=i[64]),t}U(r,`representYamlBinary`);function i(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}return U(i,`isBinary`),AAr=new e(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:t,construct:n,predicate:i,represent:r}),AAr}function Gkr(){if(NAr)return MAr;NAr=1;let e=AV(),t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(e===null)return!0;let r=[],i=e;for(let e=0,a=i.length;e=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}U(g,`fromHexCode`);function _(e){return e===120?2:e===117?4:e===85?8:0}U(_,`escapedHexLen`);function v(e){return e>=48&&e<=57?e-48:-1}U(v,`fromDecimalCode`);function y(e){switch(e){case 48:return`\0`;case 97:return`\x07`;case 98:return`\b`;case 116:return` `;case 9:return` `;case 110:return` `;case 118:return`\v`;case 102:return`\f`;case 114:return`\r`;case 101:return`\x1B`;case 32:return` `;case 34:return`"`;case 47:return`/`;case 92:return`\\`;case 78:return`…`;case 95:return`\xA0`;case 76:return`\u2028`;case 80:return`\u2029`;default:return``}}U(y,`simpleEscapeSequence`);function b(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}U(b,`charFromCodepoint`);function x(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}U(x,`setProperty`);let S=Array(256),C=Array(256);for(let e=0;e<256;e++)S[e]=+!!y(e),C[e]=y(e);function w(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||r,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:100,this.maxTotalMergeKeys=typeof t.maxTotalMergeKeys==`number`?t.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}U(w,`State`);function T(e,r){let i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=n(i),new t(r,i)}U(T,`generateError`);function E(e,t){throw T(e,t)}U(E,`throwError`);function D(e,t){e.onWarning&&e.onWarning.call(null,T(e,t))}U(D,`throwWarning`);function O(e,t,n){let r=e.anchorMapTransactions;if(r.length!==0){let n=r[r.length-1];i.call(n,t)||(n[t]={existed:i.call(e.anchorMap,t),value:e.anchorMap[t]})}e.anchorMap[t]=n}U(O,`storeAnchor`);function k(e){e.anchorMapTransactions.push(Object.create(null))}U(k,`beginAnchorTransaction`);function A(e){let t=e.anchorMapTransactions.pop(),n=e.anchorMapTransactions;if(n.length===0)return;let r=n[n.length-1],a=Object.keys(t);for(let e=0,n=a.length;e=0;--r){let i=t[n[r]];i.existed?e.anchorMap[n[r]]=i.value:delete e.anchorMap[n[r]]}}U(j,`rollbackAnchorTransaction`);function M(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}U(M,`snapshotState`);function N(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.tag=t.tag,e.anchor=t.anchor,e.kind=t.kind,e.result=t.result}U(N,`restoreState`);let P={YAML:U(function(e,t,n){e.version!==null&&E(e,`duplication of %YAML directive`),n.length!==1&&E(e,`YAML directive accepts exactly one argument`);let r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);r===null&&E(e,`ill-formed argument of the YAML directive`);let i=parseInt(r[1],10),a=parseInt(r[2],10);i!==1&&E(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&D(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:U(function(e,t,n){let r;n.length!==2&&E(e,`TAG directive accepts exactly two arguments`);let a=n[0];r=n[1],l.test(a)||E(e,`ill-formed tag handle (first argument) of the TAG directive`),i.call(e.tagMap,a)&&E(e,`there is a previously declared suffix for "`+a+`" tag handle`),u.test(r)||E(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{r=decodeURIComponent(r)}catch{E(e,`tag prefix is malformed: `+r)}e.tagMap[a]=r},`handleTagDirective`)};function F(e,t,n,r){if(t=32&&n<=1114111||E(e,`expected valid JSON character`)}else a.test(i)&&E(e,`the stream contains non-printable characters`);e.result+=i}}U(F,`captureSegment`);function I(t,n,r,a){e.isObject(r)||E(t,`cannot merge mappings; the provided source object is unacceptable`);let o=Object.keys(r);for(let e=0,s=o.length;et.maxTotalMergeKeys&&E(t,`merge keys exceeded maxTotalMergeKeys (`+t.maxTotalMergeKeys+`)`),i.call(n,s)||(x(n,s,r[s]),a[s]=!0)}}U(I,`mergeMappings`);function L(e,t,n,r,a,o,s,l,u){if(Array.isArray(a)){a=Array.prototype.slice.call(a);for(let t=0,n=a.length;t1&&(t.result+=e.repeat(` `,n-1))}U(ne,`writeFoldedLines`);function z(e,t,n){let r,i,a,o,s,l,u=e.kind,d=e.result,g=e.input.charCodeAt(e.position);if(m(g)||h(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96)return!1;if(g===63||g===45){let t=e.input.charCodeAt(e.position+1);if(m(t)||n&&h(t))return!1}for(e.kind=`scalar`,e.result=``,r=i=e.position,a=!1;g!==0;){if(g===58){let t=e.input.charCodeAt(e.position+1);if(m(t)||n&&h(t))break}else if(g===35){if(m(e.input.charCodeAt(e.position-1)))break}else if(e.position===e.lineStart&&te(e)||n&&h(g))break;else if(f(g)){if(o=e.line,s=e.lineStart,l=e.lineIndent,ee(e,!1,-1),e.lineIndent>=t){a=!0,g=e.input.charCodeAt(e.position);continue}e.position=i,e.line=o,e.lineStart=s,e.lineIndent=l;break}a&&(F(e,r,i,!1),ne(e,e.line-o),r=i=e.position,a=!1),p(g)||(i=e.position+1),g=e.input.charCodeAt(++e.position)}return F(e,r,i,!1),e.result?!0:(e.kind=u,e.result=d,!1)}U(z,`readPlainScalar`);function re(e,t){let n,r,i=e.input.charCodeAt(e.position);if(i!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39){if(F(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0}else f(i)?(F(e,n,r,!0),ne(e,ee(e,!1,t)),n=r=e.position):e.position===e.lineStart&&te(e)?E(e,`unexpected end of the document within a single quoted scalar`):(e.position++,p(i)||(r=e.position));E(e,`unexpected end of the stream within a single quoted scalar`)}U(re,`readSingleQuotedScalar`);function ie(e,t){let n,r,i,a=e.input.charCodeAt(e.position);if(a!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;)if(a===34)return F(e,n,e.position,!0),e.position++,!0;else if(a===92){if(F(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),f(a))ee(e,!1,t);else if(a<256&&S[a])e.result+=C[a],e.position++;else if((i=_(a))>0){let t=i,n=0;for(;t>0;t--)a=e.input.charCodeAt(++e.position),(i=g(a))>=0?n=(n<<4)+i:E(e,`expected hexadecimal character`);e.result+=b(n),e.position++}else E(e,`unknown escape sequence`);n=r=e.position}else f(a)?(F(e,n,r,!0),ne(e,ee(e,!1,t)),n=r=e.position):e.position===e.lineStart&&te(e)?E(e,`unexpected end of the document within a double quoted scalar`):(e.position++,p(a)||(r=e.position));E(e,`unexpected end of the stream within a double quoted scalar`)}U(ie,`readDoubleQuotedScalar`);function ae(e,t){let n=!0,r,i,a,o=e.tag,s,l=e.anchor,u,d,f,p,h=Object.create(null),g,_,v,y=e.input.charCodeAt(e.position);if(y===91)u=93,p=!1,s=[];else if(y===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&O(e,e.anchor,s),y=e.input.charCodeAt(++e.position);y!==0;){if(ee(e,!0,t),y=e.input.charCodeAt(e.position),y===u)return e.position++,e.tag=o,e.anchor=l,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?y===44&&E(e,`expected the node content, but found ','`):E(e,`missed comma between flow collection entries`),_=g=v=null,d=f=!1,y===63&&m(e.input.charCodeAt(e.position+1))&&(d=f=!0,e.position++,ee(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,pe(e,t,1,!1,!0),_=e.tag,g=e.result,ee(e,!0,t),y=e.input.charCodeAt(e.position),(f||e.line===r)&&y===58&&(d=!0,y=e.input.charCodeAt(++e.position),ee(e,!0,t),pe(e,t,1,!1,!0),v=e.result),p?L(e,s,h,_,g,v,r,i,a):d?s.push(L(e,null,h,_,g,v,r,i,a)):s.push(g),ee(e,!0,t),y=e.input.charCodeAt(e.position),y===44?(n=!0,y=e.input.charCodeAt(++e.position)):n=!1}E(e,`unexpected end of the stream within a flow collection`)}U(ae,`readFlowCollection`);function oe(t,n){let r,i=1,a=!1,o=!1,s=n,l=0,u=!1,d,m=t.input.charCodeAt(t.position);if(m===124)r=!1;else if(m===62)r=!0;else return!1;for(t.kind=`scalar`,t.result=``;m!==0;)if(m=t.input.charCodeAt(++t.position),m===43||m===45)i===1?i=m===43?3:2:E(t,`repeat of a chomping mode identifier`);else if((d=v(m))>=0)d===0?E(t,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?E(t,`repeat of an indentation width identifier`):(s=n+d-1,o=!0);else break;if(p(m)){do m=t.input.charCodeAt(++t.position);while(p(m));if(m===35)do m=t.input.charCodeAt(++t.position);while(!f(m)&&m!==0)}for(;m!==0;){for(R(t),t.lineIndent=0,m=t.input.charCodeAt(t.position);(!o||t.lineIndents&&(s=t.lineIndent),f(m)){l++;continue}if(!o&&s===0&&E(t,`missing indentation for block scalar`),t.lineIndentt)&&o!==0)E(e,`bad indentation of a sequence entry`);else if(e.lineIndentt)&&(_&&(i=e.line,a=e.lineStart,o=e.position),pe(e,t,4,!0,r)&&(_?h=e.result:g=e.result),_||(L(e,u,d,f,h,g,i,a,o),f=h=g=null),ee(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===x||e.lineIndent>t)&&y!==0)E(e,`bad indentation of a mapping entry`);else if(e.lineIndent=e.maxDepth&&E(e,`nesting exceeded maxDepth (`+e.maxDepth+`)`),e.depth+=1,e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let g=o=s=n===4||n===3;if(r&&ee(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndent tag; it should be "scalar", not "`+e.kind+`"`);for(let t=0,n=e.implicitTypes.length;t`),e.result!==null&&p.kind!==e.kind&&E(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+p.kind+`", not "`+e.kind+`"`),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&O(e,e.anchor,e.result)):E(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),--e.depth,e.tag!==null||e.anchor!==null||d}U(pe,`composeNode`);function me(e){let t=e.position,n=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(ee(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){n=!0,r=e.input.charCodeAt(++e.position);let t=e.position;for(;r!==0&&!m(r);)r=e.input.charCodeAt(++e.position);let a=e.input.slice(t,e.position),o=[];for(a.length<1&&E(e,`directive name must not be less than one character in length`);r!==0;){for(;p(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!f(r));break}if(f(r))break;for(t=e.position;r!==0&&!m(r);)r=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}r!==0&&R(e),i.call(P,a)?P[a](e,a,o):D(e,`unknown document directive "`+a+`"`)}ee(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ee(e,!0,-1)):n&&E(e,`directives end mark is expected`),pe(e,e.lineIndent-1,4,!1,!0),ee(e,!0,-1),e.checkLineBreaks&&o.test(e.input.slice(t,e.position))&&D(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&te(e)?e.input.charCodeAt(e.position)===46&&(e.position+=3,ee(e,!0,-1)):e.position=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==a||e>=65536&&e<=1114111}U(_,`isPrintable`);function v(e){return _(e)&&e!==a&&e!==13&&e!==10}U(v,`isNsCharOrWhitespace`);function y(e,t,n){let r=v(e),i=r&&!g(e);return(n?r:r&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!i)||v(t)&&!g(t)&&e===35||t===58&&i}U(y,`isPlainSafe`);function b(e){return _(e)&&e!==a&&!g(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}U(b,`isPlainSafeFirst`);function x(e){return!g(e)&&e!==58}U(x,`isPlainSafeLast`);function S(e,t){let n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}U(S,`codePointAt`);function C(e){return/^\n* /.test(e)}U(C,`needIndentIndicator`);function w(e,t,n,r,i,a,o,s){let l,u=0,d=null,f=!1,p=!1,m=r!==-1,h=-1,g=b(S(e,0))&&x(S(e,e.length-1));if(t||o)for(l=0;l=65536?l+=2:l++){if(u=S(e,l),!_(u))return 5;g=g&&y(u,d,s),d=u}else{for(l=0;l=65536?l+=2:l++){if(u=S(e,l),u===10)f=!0,m&&(p=p||l-h-1>r&&e[h+1]!==` `,h=l);else if(!_(u))return 5;g=g&&y(u,d,s),d=u}p=p||m&&l-h-1>r&&e[h+1]!==` `}return!f&&!p?g&&!o&&!i(e)?1:a===2?5:2:n>9&&C(e)?5:o?a===2?5:2:p?4:3}U(w,`chooseScalarStyle`);function T(e,n,r,i,a){e.dump=(function(){if(n.length===0)return e.quotingType===2?`""`:`''`;if(!e.noCompatMode&&(s.indexOf(n)!==-1||l.test(n)))return e.quotingType===2?`"`+n+`"`:`'`+n+`'`;let o=e.indent*Math.max(1,r),u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),d=i||e.flowLevel>-1&&r>=e.flowLevel;function f(t){return h(e,t)}switch(U(f,`testAmbiguity`),w(n,d,e.indent,u,f,e.quotingType,e.forceQuotes&&!i,a)){case 1:return n;case 2:return`'`+n.replace(/'/g,`''`)+`'`;case 3:return`|`+E(n,e.indent)+D(p(n,o));case 4:return`>`+E(n,e.indent)+D(p(O(n,u),o));case 5:return`"`+A(n)+`"`;default:throw new t(`impossible error: invalid scalar style`)}})()}U(T,`writeScalar`);function E(e,t){let n=C(e)?String(t):``,r=e[e.length-1]===` `;return n+(r&&(e[e.length-2]===` `||e===` `)?`+`:r?``:`-`)+` `}U(E,`blockHeader`);function D(e){return e[e.length-1]===` `?e.slice(0,-1):e}U(D,`dropEndingNewline`);function O(e,t){let n=/(\n+)([^\n]*)/g,r=(function(){let r=e.indexOf(` `);return r=r===-1?e.length:r,n.lastIndex=r,k(e.slice(0,r),t)})(),i=e[0]===` `||e[0]===` `,a,o;for(;o=n.exec(e);){let e=o[1],n=o[2];a=n[0]===` `,r+=e+(!i&&!a&&n!==``?` `:``)+k(n,t),i=a}return r}U(O,`foldString`);function k(e,t){if(e===``||e[0]===` `)return e;let n=/ [^ ]/g,r,i=0,a,o=0,s=0,l=``;for(;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,l+=` `+e.slice(i,a),i=a+1),o=s;return l+=` `,e.length-i>t&&o>i?l+=e.slice(i,o)+` `+e.slice(o+1):l+=e.slice(i),l.slice(1)}U(k,`foldLine`);function A(e){let t=``,n=0;for(let r=0;r=65536?r+=2:r++){n=S(e,r);let i=o[n];!i&&_(n)?(t+=e[r],n>=65536&&(t+=e[r+1])):t+=i||d(n)}return t}U(A,`escapeString`);function j(e,t,n){let r=``,i=e.tag;for(let i=0,a=n.length;i1024&&(o+=`? `),o+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),I(e,t,l,!1,!1)&&(o+=e.dump,r+=o))}e.tag=i,e.dump=`{`+r+`}`}U(N,`writeFlowMapping`);function P(e,n,r,i){let a=``,o=e.tag,s=Object.keys(r);if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys==`function`)s.sort(e.sortKeys);else if(e.sortKeys)throw new t(`sortKeys must be a boolean or a function`);for(let t=0,o=s.length;t1024;d&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`?`:o+=`? `),o+=e.dump,d&&(o+=m(e,n)),I(e,n+1,u,!0,d)&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`:`:o+=`: `,o+=e.dump,a+=o)}e.tag=o,e.dump=a||`{}`}U(P,`writeBlockMapping`);function F(e,n,a){let o=a?e.explicitTypes:e.implicitTypes;for(let s=0,l=o.length;s tag resolver accepts not "`+a+`" style`);e.dump=o}return!0}}return!1}U(F,`detectType`);function I(e,n,i,a,o,s,l){e.tag=null,e.dump=i,F(e,i,!1)||F(e,i,!0);let u=r.call(e.dump),d=a;a&&(a=e.flowLevel<0||e.flowLevel>n);let f=u===`[object Object]`||u===`[object Array]`,p,m;if(f&&(p=e.duplicates.indexOf(i),m=p!==-1),(e.tag!==null&&e.tag!==`?`||m||e.indent!==2&&n>0)&&(o=!1),m&&e.usedDuplicates[p])e.dump=`*ref_`+p;else{if(f&&m&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),u===`[object Object]`)a&&Object.keys(e.dump).length!==0?(P(e,n,e.dump,o),m&&(e.dump=`&ref_`+p+e.dump)):(N(e,n,e.dump),m&&(e.dump=`&ref_`+p+` `+e.dump));else if(u===`[object Array]`)a&&e.dump.length!==0?(e.noArrayIndent&&!l&&n>0?M(e,n-1,e.dump,o):M(e,n,e.dump,o),m&&(e.dump=`&ref_`+p+e.dump)):(j(e,n,e.dump),m&&(e.dump=`&ref_`+p+` `+e.dump));else if(u===`[object String]`)e.tag!==`?`&&T(e,e.dump,n,s,d);else if(u===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new t(`unacceptable kind of an object to dump `+u)}if(e.tag!==null&&e.tag!==`?`){let t=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`);t=e.tag[0]===`!`?`!`+t:t.slice(0,18)===`tag:yaml.org,2002:`?`!!`+t.slice(18):`!<`+t+`>`,e.dump=t+` `+e.dump}}return!0}U(I,`writeNode`);function L(e,t){let n=[],r=[];R(e,n,r);let i=r.length;for(let e=0;e{fN(),U(kkr,`getDefaultExportFromCjs`),MV={},NV={},PV={},U(OV,`requireCommon`),U(kV,`requireException`),U(Akr,`requireSnippet`),U(AV,`requireType`),U(jkr,`requireSchema`),U(Mkr,`requireStr`),U(Nkr,`requireSeq`),U(Pkr,`requireMap`),U(Fkr,`requireFailsafe`),U(Ikr,`require_null`),U(Lkr,`requireBool`),U(Rkr,`requireInt`),U(zkr,`requireFloat`),U(Bkr,`requireJson`),U(Vkr,`requireCore`),U(Hkr,`requireTimestamp`),U(Ukr,`requireMerge`),U(Wkr,`requireBinary`),U(Gkr,`requireOmap`),U(Kkr,`requirePairs`),U(qkr,`requireSet`),U(jV,`require_default`),U(Jkr,`requireLoader`),FV={},U(Ykr,`requireDumper`),U(Xkr,`requireJsYaml`),{Type:UAr,Schema:WAr,FAILSAFE_SCHEMA:GAr,JSON_SCHEMA:IV,CORE_SCHEMA:KAr,DEFAULT_SCHEMA:qAr,load:LV,loadAll:JAr,dump:YAr,YAMLException:XAr,types:ZAr,safeLoad:QAr,safeLoadAll:$Ar,safeDump:ejr}=kkr(Xkr())}));function tjr(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function njr(e,t){if(e!==`_next`&&e!==`_prev`)return t}var rjr,ijr=o((()=>{rjr=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return tjr(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&tjr(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,njr)),n=n._prev;return`[`+e.join(`, `)+`]`}}}));function ajr(e,t){if(e.nodeCount()<=1)return[];var n=cjr(e,t||ujr);return DB(rV(ojr(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function ojr(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)sjr(e,t,n,o);for(;o=i.dequeue();)sjr(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(sjr(e,t,n,o,!0));break}}}return r}function sjr(e,t,n,r,i){var a=i?[]:void 0;return eV(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,ljr(t,n,s)}),eV(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,ljr(t,n,o)}),e.removeNode(r.v),a}function cjr(e,t){var n=new bV,r=0,i=0;eV(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),eV(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=mV(i+r+3).map(function(){return new rjr}),o=r+1;return eV(n.nodes(),function(e){ljr(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function ljr(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var ujr,djr=o((()=>{_V(),xV(),ijr(),ujr=Cz(1)}));function fjr(e){eV(e.graph().acyclicer===`greedy`?ajr(e,t(e)):pjr(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,NOr(`rev`))});function t(e){return function(t){return e.edge(t).weight}}}function pjr(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,eV(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return eV(e.nodes(),i),t}function mjr(e){eV(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var hjr=o((()=>{_V(),djr()}));function zV(e,t,n,r){var i;do i=NOr(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function gjr(e){var t=new bV().setGraph(e.graph());return eV(e.nodes(),function(n){t.setNode(n,e.node(n))}),eV(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function _jr(e){var t=new bV({multigraph:e.isMultigraph()}).setGraph(e.graph());return eV(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),eV(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function vjr(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var l,u;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),l=s*i/a,u=s):(i<0&&(o=-o),l=o,u=o*a/i),{x:n+l,y:r+u}}function BV(e){var t=rV(mV(Sjr(e)+1),function(){return[]});return eV(e.nodes(),function(n){var r=e.node(n),i=r.rank;aV(i)||(t[i][r.order]=n)}),t}function yjr(e){var t=uV(rV(e.nodes(),function(t){return e.node(t).rank}));eV(e.nodes(),function(n){var r=e.node(n);hDr(r,`rank`)&&(r.rank-=t)})}function bjr(e){var t=uV(rV(e.nodes(),function(t){return e.node(t).rank})),n=[];eV(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;eV(n,function(t,n){aV(t)&&n%i!==0?--r:r&&eV(t,function(t){e.node(t).rank+=r})})}function xjr(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),zV(e,`border`,i,t)}function Sjr(e){return cV(rV(e.nodes(),function(t){var n=e.node(t).rank;if(!aV(n))return n}))}function Cjr(e,t){var n={lhs:[],rhs:[]};return eV(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function wjr(e,t){var n=wEr();try{return t()}finally{console.log(e+` time: `+(wEr()-n)+`ms`)}}function Tjr(e,t){return t()}var VV=o((()=>{_V(),xV()}));function Ejr(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&eV(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a{_V(),VV()}));function kjr(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&jjr(e)}function Ajr(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Njr(e),(t===`lr`||t===`rl`)&&(Fjr(e),jjr(e))}function jjr(e){eV(e.nodes(),function(t){Mjr(e.node(t))}),eV(e.edges(),function(t){Mjr(e.edge(t))})}function Mjr(e){var t=e.width;e.width=e.height,e.height=t}function Njr(e){eV(e.nodes(),function(t){Pjr(e.node(t))}),eV(e.edges(),function(t){var n=e.edge(t);eV(n.points,Pjr),Object.prototype.hasOwnProperty.call(n,`y`)&&Pjr(n)})}function Pjr(e){e.y=-e.y}function Fjr(e){eV(e.nodes(),function(t){Ijr(e.node(t))}),eV(e.edges(),function(t){var n=e.edge(t);eV(n.points,Ijr),Object.prototype.hasOwnProperty.call(n,`x`)&&Ijr(n)})}function Ijr(e){var t=e.x;e.x=e.y,e.y=t}var Ljr=o((()=>{_V()}));function Rjr(e){e.graph().dummyChains=[],eV(e.edges(),function(t){zjr(e,t)})}function zjr(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),l=s.labelRank;if(a!==r+1){e.removeEdge(t);var u=void 0,d,f=0;for(++r;r{_V(),VV()}));function Hjr(e){var t={};function n(r){var i=e.node(r);if(Object.prototype.hasOwnProperty.call(t,r))return i.rank;t[r]=!0;var a=uV(rV(e.outEdges(r),function(t){return n(t.w)-e.edge(t).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}eV(e.sources(),n)}function HV(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Ujr=o((()=>{_V()}));function Wjr(e){var t=new bV({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;Gjr(t,e){_V(),xV(),Ujr()})),Yjr=o((()=>{_V()})),Xjr=o((()=>{Yjr()})),Zjr=o((()=>{_V()})),Qjr=o((()=>{_V()})),$jr=o((()=>{Qjr()}));function eMr(e,t,n){uz(t)||(t=[t]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return eV(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);tMr(e,t,n===`post`,a,r,i)}),i}function tMr(e,t,n,r,i,a){Object.prototype.hasOwnProperty.call(r,t)||(r[t]=!0,n||a.push(t),eV(i(t),function(t){tMr(e,t,n,r,i,a)}),n&&a.push(t))}var nMr=o((()=>{_V()}));function rMr(e,t){return eMr(e,t,`post`)}var iMr=o((()=>{nMr()}));function aMr(e,t){return eMr(e,t,`pre`)}var oMr=o((()=>{nMr()})),sMr=o((()=>{KOr()})),cMr=o((()=>{Yjr(),Xjr(),Zjr(),$jr(),iMr(),oMr(),sMr(),Qjr()}));function UV(e){e=gjr(e),Hjr(e);var t=Wjr(e);fMr(t),lMr(t,e);for(var n,r;n=mMr(t);)r=hMr(t,e,n),gMr(t,e,n,r)}function lMr(e,t){var n=rMr(e,e.nodes());n=n.slice(0,n.length-1),eV(n,function(n){uMr(e,t,n)})}function uMr(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=dMr(e,t,n)}function dMr(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||(i=!1,a=t.edge(r,n)),o=a.weight,eV(t.nodeEdges(n),function(a){var s=a.v===n,l=s?a.w:a.v;if(l!==r){var u=s===i,d=t.edge(a).weight;if(o+=u?d:-d,vMr(e,n,l)){var f=e.edge(n,l).cutvalue;o+=u?-f:f}}}),o}function fMr(e,t){arguments.length<2&&(t=e.nodes()[0]),pMr(e,{},1,t)}function pMr(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,eV(e.neighbors(r),function(i){Object.prototype.hasOwnProperty.call(t,i)||(n=pMr(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function mMr(e){return nV(e.edges(),function(t){return e.edge(t).cutvalue<0})}function hMr(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,l=!1;return a.lim>o.lim&&(s=o,l=!0),PDr(tV(t.edges(),function(t){return l===yMr(e,e.node(t.v),s)&&l!==yMr(e,e.node(t.w),s)}),function(e){return HV(t,e)})}function gMr(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),fMr(e),lMr(e,t),_Mr(e,t)}function _Mr(e,t){var n=aMr(e,nV(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),eV(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function vMr(e,t,n){return e.hasEdge(t,n)}function yMr(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var bMr=o((()=>{_V(),cMr(),VV(),Jjr(),Ujr(),UV.initLowLimValues=fMr,UV.initCutValues=lMr,UV.calcCutValue=dMr,UV.leaveEdge=mMr,UV.enterEdge=hMr,UV.exchangeEdges=gMr}));function xMr(e){switch(e.graph().ranker){case`network-simplex`:CMr(e);break;case`tight-tree`:SMr(e);break;case`longest-path`:wMr(e);break;default:CMr(e)}}function SMr(e){Hjr(e),Wjr(e)}function CMr(e){UV(e)}var wMr,TMr=o((()=>{Jjr(),bMr(),Ujr(),wMr=Hjr}));function EMr(e){var t=zV(e,`root`,{},`_root`),n=OMr(e),r=cV(iV(n))-1,i=2*r+1;e.graph().nestingRoot=t,eV(e.edges(),function(t){e.edge(t).minlen*=i});var a=kMr(e)+1;eV(e.children(),function(o){DMr(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function DMr(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length)o!==t&&e.setEdge(t,o,{weight:0,minlen:n});else{var l=xjr(e,`_bt`),u=xjr(e,`_bb`),d=e.node(o);e.setParent(l,o),d.borderTop=l,e.setParent(u,o),d.borderBottom=u,eV(s,function(s){DMr(e,t,n,r,i,a,s);var d=e.node(s),f=d.borderTop?d.borderTop:s,p=d.borderBottom?d.borderBottom:s,m=d.borderTop?r:2*r,h=f===p?i-a[o]+1:1;e.setEdge(l,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,u,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,l,{weight:0,minlen:i+a[o]})}}function OMr(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&eV(a,function(e){n(e,i+1)}),t[r]=i}return eV(e.children(),function(e){n(e,1)}),t}function kMr(e){return hV(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function AMr(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,eV(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}var jMr=o((()=>{_V(),VV()}));function MMr(e,t,n){var r={},i;eV(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}var NMr=o((()=>{_V()}));function PMr(e,t,n){var r=FMr(e),i=new bV({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return eV(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),eV(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=aV(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function FMr(e){for(var t;e.hasNode(t=NOr(`_root`)););return t}var IMr=o((()=>{_V(),xV()}));function LMr(e,t){for(var n=0,r=1;r0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;l+=e.weight*n})),l}var zMr=o((()=>{_V()}));function BMr(e){var t={},n=tV(e.nodes(),function(t){return!e.children(t).length}),r=cV(rV(n,function(t){return e.node(t).rank})),i=rV(mV(r+1),function(){return[]});function a(n){hDr(t,n)||(t[n]=!0,i[e.node(n).rank].push(n),eV(e.successors(n),a))}return eV(gV(n,function(t){return e.node(t).rank}),a),i}var VMr=o((()=>{_V()}));function HMr(e,t){return rV(t,function(t){var n=e.inEdges(t);if(n.length){var r=hV(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}var UMr=o((()=>{_V()}));function WMr(e,t){var n={};return eV(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};aV(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),eV(t.edges(),function(e){var t=n[e.v],r=n[e.w];!aV(t)&&!aV(r)&&(r.indegree++,t.out.push(n[e.w]))}),GMr(tV(n,function(e){return!e.indegree}))}function GMr(e){var t=[];function n(e){return function(t){t.merged||(aV(t.barycenter)||aV(e.barycenter)||t.barycenter>=e.barycenter)&&KMr(e,t)}}function r(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),eV(i.in.reverse(),n(i)),eV(i.out,r(i))}return rV(tV(t,function(e){return!e.merged}),function(e){return pV(e,[`vs`,`i`,`barycenter`,`weight`])})}function KMr(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var qMr=o((()=>{_V()}));function JMr(e,t){var n=Cjr(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=gV(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,l=0;r.sort(XMr(!!t)),l=YMr(a,i,l),eV(r,function(e){l+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,l=YMr(a,i,l)});var u={vs:DB(a)};return s&&(u.barycenter=o/s,u.weight=s),u}function YMr(e,t,n){for(var r;t.length&&(r=QB(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function XMr(e){return function(t,n){return t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}}var ZMr=o((()=>{_V(),VV()}));function QMr(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,l={};o&&(i=tV(i,function(e){return e!==o&&e!==s}));var u=HMr(e,i);eV(u,function(t){if(e.children(t.v).length){var i=QMr(e,t.v,n,r);l[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&eNr(t,i)}});var d=WMr(u,n);$Mr(d,l);var f=JMr(d,r);if(o&&(f.vs=DB([o,f.vs,s]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(f,`barycenter`)||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function $Mr(e,t){eV(e,function(e){e.vs=DB(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function eNr(e,t){aV(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var tNr=o((()=>{_V(),UMr(),qMr(),ZMr()}));function nNr(e){var t=Sjr(e),n=rNr(e,mV(1,t+1),`inEdges`),r=rNr(e,mV(t-1,-1,-1),`outEdges`),i=BMr(e);aNr(e,i);for(var a=1/0,o,s=0,l=0;l<4;++s,++l){iNr(s%2?n:r,s%4>=2),i=BV(e);var u=LMr(e,i);u{_V(),xV(),VV(),NMr(),IMr(),zMr(),VMr(),tNr()}));function sNr(e){var t=lNr(e);eV(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=cNr(e,t,i.v,i.w),o=a.path,s=a.lca,l=0,u=o[l],d=!0;n!==i.w;){if(r=e.node(n),d){for(;(u=o[l])!==s&&e.node(u).maxRanko||s>t[l].lim));for(u=l,l=r;(l=e.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function lNr(e){var t={},n=0;function r(i){var a=n;eV(e.children(i),r),t[i]={low:a,lim:n++}}return eV(e.children(),r),t}var uNr=o((()=>{_V()}));function dNr(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=QB(r);return eV(r,function(t,l){var u=pNr(e,t),d=u?e.node(u).order:o;(u||t===s)&&(eV(r.slice(a,l+1),function(t){eV(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(oo)&&mNr(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return eV(n,function(s,l){if(e.node(s).dummy===`border`){var u=e.predecessors(s);u.length&&(a=e.node(u[0]).order,r(n,o,l,i,a),o=l,i=a)}r(n,o,n.length,a,t.length)}),n}return hV(t,i),n}function pNr(e,t){if(e.node(t).dummy)return nV(e.predecessors(t),function(t){return e.node(t).dummy})}function mNr(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function hNr(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function gNr(e,t,n,r){var i={},a={},o={};return eV(t,function(e){eV(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),eV(t,function(e){var t=-1;eV(e,function(e){var s=r(e);if(s.length){s=gV(s,function(e){return o[e]});for(var l=(s.length-1)/2,u=Math.floor(l),d=Math.ceil(l);u<=d;++u){var f=s[u];a[e]===e&&t{_V(),xV(),VV()}));function ENr(e){e=_jr(e),DNr(e),cDr(SNr(e),function(t,n){e.node(n).x=t})}function DNr(e){var t=BV(e),n=e.graph().ranksep,r=0;eV(t,function(t){var i=cV(rV(t,function(t){return e.node(t).height}));eV(t,function(t){e.node(t).y=r+i/2}),r+=i+n})}var ONr=o((()=>{_V(),VV(),TNr()}));function kNr(e,t){var n=t&&t.debugTiming?wjr:Tjr;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>MNr(e));n(` runLayout`,()=>ANr(t,n)),n(` updateInputGraph`,()=>jNr(e,t))})}function ANr(e,t){t(` makeSpaceForEdgeLabels`,()=>NNr(e)),t(` removeSelfEdges`,()=>HNr(e)),t(` acyclic`,()=>fjr(e)),t(` nestingGraph.run`,()=>EMr(e)),t(` rank`,()=>xMr(_jr(e))),t(` injectEdgeLabelProxies`,()=>PNr(e)),t(` removeEmptyRanks`,()=>bjr(e)),t(` nestingGraph.cleanup`,()=>AMr(e)),t(` normalizeRanks`,()=>yjr(e)),t(` assignRankMinMax`,()=>FNr(e)),t(` removeEdgeLabelProxies`,()=>INr(e)),t(` normalize.run`,()=>Rjr(e)),t(` parentDummyChains`,()=>sNr(e)),t(` addBorderSegments`,()=>Ejr(e)),t(` order`,()=>nNr(e)),t(` insertSelfEdges`,()=>UNr(e)),t(` adjustCoordinateSystem`,()=>kjr(e)),t(` position`,()=>ENr(e)),t(` positionSelfEdges`,()=>WNr(e)),t(` removeBorderNodes`,()=>VNr(e)),t(` normalize.undo`,()=>Bjr(e)),t(` fixupEdgeLabelCoords`,()=>zNr(e)),t(` undoCoordinateSystem`,()=>Ajr(e)),t(` translateGraph`,()=>LNr(e)),t(` assignNodeIntersects`,()=>RNr(e)),t(` reversePoints`,()=>BNr(e)),t(` acyclic.undo`,()=>mjr(e))}function jNr(e,t){eV(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),eV(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function MNr(e){var t=new bV({multigraph:!0,compound:!0}),n=KNr(e.graph());return t.setGraph(lV({},JNr,GNr(n,qNr),pV(n,YNr))),eV(e.nodes(),function(n){var r=KNr(e.node(n));t.setNode(n,OEr(GNr(r,XNr),ZNr)),t.setParent(n,e.parent(n))}),eV(e.edges(),function(n){var r=KNr(e.edge(n));t.setEdge(n,lV({},$Nr,GNr(r,QNr),pV(r,ePr)))}),t}function NNr(e){var t=e.graph();t.ranksep/=2,eV(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function PNr(e){eV(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);zV(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function FNr(e){var t=0;eV(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=cV(t,r.maxRank))}),e.graph().maxRank=t}function INr(e){eV(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function LNr(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function l(e){var a=e.x,o=e.y,s=e.width,l=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-l/2),i=Math.max(i,o+l/2)}eV(e.nodes(),function(t){l(e.node(t))}),eV(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),t-=o,r-=s,eV(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),eV(e.edges(),function(n){var i=e.edge(n);eV(i.points,function(e){e.x-=t,e.y-=r}),Object.prototype.hasOwnProperty.call(i,`x`)&&(i.x-=t),Object.prototype.hasOwnProperty.call(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function RNr(e){eV(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(vjr(r,a)),n.points.push(vjr(i,o))})}function zNr(e){eV(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function BNr(e){eV(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function VNr(e){eV(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(QB(n.borderLeft)),o=e.node(QB(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),eV(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function HNr(e){eV(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function UNr(e){eV(BV(e),function(t){var n=0;eV(t,function(t,r){var i=e.node(t);i.order=r+n,eV(i.selfEdges,function(t){zV(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function WNr(e){eV(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function GNr(e,t){return oV(pV(e,t),Number)}function KNr(e){var t={};return eV(e,function(e,n){t[n.toLowerCase()]=e}),t}var qNr,JNr,YNr,XNr,ZNr,QNr,$Nr,ePr,tPr=o((()=>{_V(),xV(),Ojr(),Ljr(),hjr(),Vjr(),TMr(),jMr(),oNr(),uNr(),ONr(),VV(),qNr=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],JNr={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},YNr=[`acyclicer`,`ranker`,`rankdir`,`align`],XNr=[`width`,`height`],ZNr={width:0,height:0},QNr=[`minlen`,`weight`,`width`,`height`,`labeloffset`],$Nr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},ePr=[`labelpos`]})),nPr=o((()=>{hjr(),tPr(),Vjr(),TMr()})),rPr=l({applyDagreLayoutResult:()=>gPr,getEdgesToRender:()=>WV,measureDagreLayout:()=>yPr,prepareLayoutForDagre:()=>GV,render:()=>xPr,runDagreLayoutCore:()=>bPr}),iPr,aPr,oPr,sPr,cPr,lPr,uPr,WV,dPr,fPr,pPr,mPr,hPr,gPr,_Pr,vPr,GV,yPr,bPr,xPr,SPr=o((()=>{Okr(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),nPr(),xV(),iPr=U((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),aPr=U((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),oPr=U(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),sPr=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],cPr=U((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof(n==null?void 0:n.x)==`number`&&typeof(n==null?void 0:n.y)==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof(e==null?void 0:e.x)==`number`&&typeof(e==null?void 0:e.y)==`number`&&a.push(e)})}),a.length===0)return aPr(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),l=s.x-t.x,u=s.y-t.y;return Math.abs(l)>Math.abs(u)?l>0?`right`:`left`:Math.abs(u)>0?u>0?`bottom`:`top`:aPr(i)},`getSelfLoopSide`),lPr=U((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,l=Math.max(36,Math.min(100,e.width*.8)),u=iPr(Math.max(r,e.width*.35),36,l),d=iPr(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-u/2,y:e},{x:i-u/2,y:e+d},{x:i+u/2,y:e+d},{x:i+u/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-u/2},{x:e+d,y:a-u/2},{x:e+d,y:a+u/2},{x:e,y:a+u/2}]}case`left`:{let e=i-o;return[{x:e,y:a-u/2},{x:e-d,y:a-u/2},{x:e-d,y:a+u/2},{x:e,y:a+u/2}]}default:{let e=a-s;return[{x:i-u/2,y:e},{x:i-u/2,y:e-d},{x:i+u/2,y:e-d},{x:i+u/2,y:e}]}}},`getSelfLoopPoints`),uPr=U((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,l=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+l/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-l/2-4}}},`getSelfLoopLabelPosition`),WV=U((e,t=0,{mergeSelfLoops:n=!0}={})=>{var r;let i=new Map,a=[],o=(r=e.graph())==null?void 0:r.rankdir;return e.edges().forEach(t=>{let r=e.edge(t);if(n&&r.selfLoop){let e=r.selfLoop.id;i.has(e)||i.set(e,[]),i.get(e).push({edge:r,start:t.v,end:t.w})}else a.push({edge:r,start:t.v,end:t.w})}),i.forEach(n=>{if(n.length!==3){n.forEach(e=>a.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,i,s]=n,l=r.edge.originalEdge??i.edge.originalEdge??s.edge.originalEdge??i.edge,u=e.node(l.start);if(!u){n.forEach(e=>a.push(e));return}let d={width:i.edge.width,height:i.edge.height},f=cPr(e,u,n,l.start,o),p=lPr(u,f,t,d.width??0),m=uPr(u,p,f,t,d),h={...i.edge,...l,id:l.id,points:p,start:l.start,end:l.end,x:m.x,y:m.y,width:d.width,height:d.height,labelStyle:i.edge.labelStyle,fromCluster:r.edge.fromCluster??i.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??i.edge.toCluster??s.edge.toCluster};delete h.selfLoop,delete h.originalEdge,a.push({edge:h,start:h.start,end:h.end})}),a},`getEdgesToRender`),dPr=U(async({element:e,graph:t,diagramType:n,id:r,parentCluster:i,siteConfig:a})=>{let o=t.graph().rankdir;W.trace(`Dir in recursive render - dir:`,o);let{clusters:s,edgePaths:l,edgeLabels:u,nodes:d,rootGroups:f}=tkr(e,{edgePathsClass:`edgePaths`});t.nodes()?W.info(`Recursive render XXX`,t.nodes()):W.info(`No nodes found for`,t),t.edges().length>0&&W.info(`Recursive edges`,t.edge(t.edges()[0]));let p=oPr(n);await Promise.all(t.nodes().map(async function(e){let s=t.node(e);if(i!==void 0){let n=JSON.parse(JSON.stringify(i.clusterData));W.trace(`Setting data for parent cluster XXX Node.id = `,e,` data=`,n.height,` Parent cluster`,i.height),t.setNode(i.id,n),t.parent(e)||(W.trace(`Setting parent`,e,i.id),t.setParent(e,i.id,n))}if(W.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(t.node(e))),s!=null&&s.clusterNode){W.info(`Cluster identified XBX`,e,s.width,t.node(e));let{ranksep:i,nodesep:o}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:i+25,nodesep:o});let l=await vPr({element:d,graph:s.graph,diagramType:n,id:r,parentCluster:t.node(e),siteConfig:a}),u=l.elem;SR(s,u),s.diff=l.diff||0,W.info(`New compound node after recursive render XAX`,e,`width`,s.width,`height`,s.height),C_r(u,s)}else t.children(e).length>0?(W.trace(`Cluster - the non recursive path XBX`,e,s.id,s,s.width,`Graph:`,t),W.trace(EV(s.id,t)),CV.set(s.id,{id:EV(s.id,t),node:s})):(W.trace(`Node - the non recursive path XAX`,e,d,t.node(e),o),await rkr(d,t.node(e),{config:a,dir:o}))})),await U(async()=>{let e=t.edges().map(async function(e){let n=t.edge(e.v,e.w,e.name);if(W.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),W.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(t.edge(e))),W.info(`Fix`,CV,`ids:`,e.v,e.w,`Translating: `,CV.get(e.v),CV.get(e.w)),p&&n.selfLoop){var r,i,a,o;if(n.selfLoop.order!==1)return;let e={...n.originalEdge,...n,id:n.selfLoop.id,startLabelLeft:((r=n.originalEdge)==null?void 0:r.startLabelLeft)??n.startLabelLeft,startLabelRight:((i=n.originalEdge)==null?void 0:i.startLabelRight)??n.startLabelRight,endLabelLeft:((a=n.originalEdge)==null?void 0:a.endLabelLeft)??n.endLabelLeft,endLabelRight:((o=n.originalEdge)==null?void 0:o.endLabelRight)??n.endLabelRight};await JR(u,e),n.width=e.width,n.height=e.height,n.labelStyle=e.labelStyle}else await JR(u,n)});await Promise.all(e)},`processEdges`)();let{subGraphTitleTotalMargin:m}=PR(a);return{elem:f,graph:t,groups:{clusters:s,edgePaths:l,edgeLabels:u,nodes:d,rootGroups:f},diagramType:n,id:r,mergeSelfLoops:p,subGraphTitleTotalMargin:m}},`measureDagreGraph`),fPr=U(e=>{W.info(`############################################# XXX`),W.info(`### Layout ### XXX`),W.info(`############################################# XXX`),kNr(e)},`runDagreGraphLayout`),pPr=U((e,t,n)=>{let r=e.node(t);if(!r)return;let i={...r};return r!=null&&r.clusterNode?i.y=(r.y??0)+n:e.children(t).length>0?i.height=(r.height??0)+n:i.y=(r.y??0)+n/2,i},`normalizeDagreNode`),mPr=U((e,t)=>{sPr.forEach(n=>{t[n]!==void 0&&(e[n]=t[n])})},`applyDagreNodeLayout`),hPr=U((e,t,n,r)=>({...e,start:e.start??t,end:e.end??n,points:(e.points??[]).map(e=>({...e,y:typeof e.y==`number`?e.y+r:e.y}))}),`normalizeDagreEdge`),gPr=U((e,t)=>{let{graph:n,mergeSelfLoops:r,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(e=>[e.id,e]));DV(n).forEach(e=>{let t=pPr(n,e,i);if(!t)return;mPr(n.node(e),t);let r=a.get(e);r&&mPr(r,t)});let o=i/2;return e.edges=WV(n,o,{mergeSelfLoops:r}).map(({edge:e,start:t,end:n})=>hPr(e,t,n,o)),e},`applyDagreLayoutResult`),_Pr=U(async({elem:e,graph:t,groups:{clusters:n,edgePaths:r},diagramType:i,id:a,mergeSelfLoops:o,subGraphTitleTotalMargin:s})=>{let l=0;await Promise.all(DV(t).map(async function(e){let r=t.node(e);if(W.info(`Position XBX => `+e+`: (`+r.x,`,`+r.y,`) width: `,r.width,` height: `,r.height),r!=null&&r.clusterNode)r.y+=s,W.info(`A tainted cluster node XBX1`,e,r.id,r.width,r.height,r.x,r.y,t.parent(e)),CV.get(r.id).node=r,IR(r);else if(t.children(e).length>0){var i;W.info(`A pure cluster node XBX1`,e,r.id,r.x,r.y,r.width,r.height,t.parent(e)),r.height+=s,t.node(r.parentId);let a=(r==null?void 0:r.padding)/2||0,o=(r==null||(i=r.labelBBox)==null?void 0:i.height)||0,l=o-a||0;W.debug(`OffsetY`,l,`labelHeight`,o,`halfPadding`,a),await RR(n,r),CV.get(r.id).node=r}else{let e=t.node(r.parentId);r.y+=s/2,W.info(`A regular node XBX1 - using the padding`,r.id,`parent`,r.parentId,r.width,r.height,r.x,r.y,`offsetY`,r.offsetY,`parent`,e,e==null?void 0:e.offsetY,r),IR(r)}}));let u=s/2;return WV(t,u,{mergeSelfLoops:o}).forEach(function({edge:e,start:n,end:o}){W.info(`Edge `+n+` -> `+o+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=u);let s=t.node(n),l=t.node(o),d=YR(r,e,CV,i,s,l,a);U_r(e,d)}),t.nodes().forEach(function(e){let n=t.node(e);W.info(e,n.type,n.diff),n.isGroup&&(l=n.diff)}),W.warn(`Returning from recursive render XAX`,e,l),{elem:e,diff:l}},`paintDagreLayoutCore`),vPr=U(async e=>{let t=await dPr(e);return fPr(t.graph),await _Pr(t)},`renderDagreSubgraph`),GV=U(e=>{var t,n,r,i;let a=new bV({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((t=e.config)==null?void 0:t.nodeSpacing)||e.nodeSpacing||((n=e.config)==null||(n=n.flowchart)==null?void 0:n.nodeSpacing),ranksep:((r=e.config)==null?void 0:r.rankSpacing)||e.rankSpacing||((i=e.config)==null||(i=i.flowchart)==null?void 0:i.rankSpacing),marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(e=>{a.setNode(e.id,{...e}),e.parentId&&a.setParent(e.id,e.parentId)}),W.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,i=a.node(t);a.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),a.setParent(n,i.parentId),a.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),a.setParent(r,i.parentId);let o=structuredClone(e),s=structuredClone(e),l=structuredClone(e),u=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},l.originalEdge=o,l.selfLoop={id:o.id,order:1},u.originalEdge=o,u.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,l.startLabelRight=``,l.startLabelLeft=``,l.endLabelLeft=``,l.endLabelRight=``,l.arrowTypeStart=`none`,l.arrowTypeEnd=`none`,l.id=t+`-cyclic-special-mid`,u.label=``,u.startLabelRight=``,u.startLabelLeft=``,u.arrowTypeStart=`none`,i.isGroup&&(s.fromCluster=t,u.toCluster=t),u.id=t+`-cyclic-special-2`,u.arrowTypeStart=`none`,a.setEdge(t,n,s,t+`-cyclic-special-0`),a.setEdge(n,r,l,t+`-cyclic-special-1`),a.setEdge(r,t,u,t+`-cyclic-special-2`)}else a.setEdge(e.start,e.end,{...e},e.id)}),Ckr(a),{graph:a}},`prepareLayoutForDagre`),yPr=U(async(e,{element:t,preparedLayout:n})=>{let r=n??GV(e),i=_I(),a=await dPr({element:t,graph:r.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:i});return r.measuredLayout=a,a},`measureDagreLayout`),bPr=U((e,t)=>{var n;let r=(n=t.preparedLayout)==null?void 0:n.measuredLayout;if(!r)throw Error(`runDagreLayoutCore requires measureDagreLayout to run first`);return fPr(r.graph),gPr(e,r),r},`runDagreLayoutCore`),xPr=SV({prepareLayout:GV,measureLayout:yPr,runLayoutCore:bPr,paintOptions:{clusterDb:CV,getNodes:U((e,{measure:t})=>DV(t.graph).map(e=>t.graph.node(e)).filter(Boolean),`getDagrePaintNodes`),getEdgeNode:U((e,t,{measure:n})=>e?n.graph.node(e):void 0,`getDagreEdgeNode`),skipNode:U((e,{measure:t})=>!t.graph.hasNode(e.id),`skipNode`),isCluster:U((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,`isCluster`)}})})),CPr=l({render:()=>OLr});function KV(e){let t=[];for(let n=0;n=1-EH||p<=EH||p>=1-EH?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}function TPr(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}function EPr(e){let t=[];for(let n=0;n=Math.abs(n)?+(t>=0):+(n>=0)}function OPr(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),r=t.arrowTypeStart&&UR[t.arrowTypeStart];if(r){let t=e[0],i=e[1],a=Math.atan2(i.y-t.y,i.x-t.x);n[0].x=t.x+r*Math.cos(a),n[0].y=t.y+r*Math.sin(a)}let i=t.arrowTypeEnd&&UR[t.arrowTypeEnd];if(i){let t=e.length,r=e[t-2],a=e[t-1],o=Math.atan2(a.y-r.y,a.x-r.x);n[t-1].x=a.x-i*Math.cos(o),n[t-1].y=a.y-i*Math.sin(o)}return n}function kPr(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},l={x:a+t*e.r,y:o+n*e.r},u=[`L${JV(s)}`];return i===`arc`?u.push(`A${qV(e.r)},${qV(e.r)} 0 0 ${r} ${JV(l)}`):u.push(`M${JV(l)}`),u}function APr(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=n.x-t.x,s=n.y-t.y,l=Math.hypot(i,a),u=Math.hypot(o,s);if(l0){let t=APr(i[e-1],i[e],i[e+1]??i[e],cLr);t&&(p=t.cutLen)}let m=r,h=null;a&&ee.t-t.t);for(let e of g)e.r=Math.min(e.r,e.d-p,m-e.d);for(let e=0;et){let n=t/2;g[e].r=Math.min(g[e].r,n),g[e+1].r=Math.min(g[e+1].r,n)}}for(let e of g)e.r=2?r:null}catch{return null}}function FPr(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=PPr(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=EPr(a);if(s.length===0)return;let l=new Map;for(let e of s){let t=l.get(e.jumpEdgeId)??[];t.push(e),l.set(e.jumpEdgeId,t)}for(let e of a){let t=l.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id),a=r==null?void 0:r.curve;if(a!==void 0&&!NPr(a))continue;let s=o.get(e.id);if(!s||a===void 0&&!MPr(s.getAttribute(`d`)??``))continue;let u=s.getAttribute(`style`)??``,d=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(u),f=d?Number.parseFloat(d[1]):null,p=d?Number.parseFloat(d[2]):null,m=jPr(e,t,n);if(s.setAttribute(`d`,m),f!==null&&p!==null&&typeof s.getTotalLength==`function`){let e=s.getTotalLength(),t=`0 ${f} ${Math.max(0,e-f-p)} ${p}`,n=u.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);s.setAttribute(`style`,n)}}}function IPr(e,{measure:t}){var n;let r=(n=e.config)==null||(n=n.swimlane)==null?void 0:n.lineHops;if(r===!1)return;let i=r===`gap`?`gap`:`arc`,a=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));FPr(t.groups.edgePaths,a,{enabled:!0,jumpRadius:6,jumpStyle:i})}function LPr(e){return Math.max(e.padding??fLr,fLr)}function RPr(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),l=o+Math.min(dLr,Math.max(0,s-o));l<=o?delete e.groupTitleRect:e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:l}}function zPr(e){let t=e.direction,n=e.nodes??(e.nodes=[]);for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===uLr);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:uLr,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=uLr}function BPr(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;e&&r&&(t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t}))}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}function VPr(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=(r==null?void 0:r.layerGap)??100,s=(r==null?void 0:r.nodeGap)??40,l=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=l,e.order=t;let i=n.x[r]??t*s,u=n.y[r]??l*o;e.x=i,e.y=u,t++}l++}let u=i.nodes??[],d=new Map,f=[];for(let e of u){if(!(e!=null&&e.isGroup))continue;e.parentId||f.push(e);let t=u.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],l=e.width??0,u=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-l/2),i=Math.max(i,t+l/2),a=Math.min(a,s-u/2),o=Math.max(o,s+u/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*LPr(e),s=t,l=Math.max(0,i-r)+n,u=Math.max(0,o-a)+s,f=(r+i)/2,p=(a+o)/2;e.x=f,e.y=p,e.width=l,e.height=u,d.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(f.length>0&&d.size>0){let e=1/0,t=-1/0,n=0;for(let r of f){let i=r.padding??20;i>n&&(n=i);let a=d.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of f)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...f].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],l=[];for(let e of a){let t=d.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*LPr(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),l.push(n)}let u=o.length;if(u>0){let e=new Map;if(u===1)e.set(o[0],l[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:sH(t,n,r,i)}:void 0}function WPr(e){if(e.isGroup)return;let t=UPr(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}function YV(e,t,n=DH){return Math.abs(e.x-t.x)n}function $V(e,t,n=DH){return XV(e,t,n)&&Math.abs(e.y-t.y)>n}function eH(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}function tH(e,t,n=DH){return e.horizontal&&t.horizontal&&ZV(e.a,t.a,n)?eH(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&XV(e.a,t.a,n)?eH(e.a.y,e.b.y,t.a.y,t.b.y):0}function nH(e,t=DH){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!YV(e,r,t))&&n.push({x:r.x,y:r.y})}return n}function GPr(e,t=DH){if(!e||e.length!==4)return;let[n,r,i,a]=e;return QV(n,r,t)&&$V(r,i,t)&&QV(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:$V(n,r,t)&&QV(r,i,t)&&$V(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}function aH(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}function oH(e,t){return e.leftt.left&&e.topt.top}function JPr(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}function sH(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}function cH(e){var t;return(t=UPr(e))==null?void 0:t.rect}function lH(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}function YPr(e,t,n,r,i,a=DH){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(ZV(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(ZV(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(XV(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.yn.y))return;if(XV(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let l=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return l&&u?[e,{x:e.x,y:n.y},n]:void 0}function XPr(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}function uH(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=WPr(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}function dH(e){let t=[],n=[];for(let r of e){let e=WPr(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}function ZPr(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...sH(e,i,a,o)})}return n}function QPr(e,t,n=DH){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(a&&o)return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)h||p<_||p>v)return!1;let y=Math.abs(g-d.a.x)i:a&&s&&ZV(e,n,i)?eH(e.x,t.x,n.x,r.x)>i:!1}function pH(e,t,n,r,{epsilon:i=DH,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;rp+i&&hg+i&&f<_-i}function tFr(e,t,n){let r=Math.min(t,n),i=Math.max(t,n);return e>r+DH&&e=2?t[t.length-2]:void 0,n=e&&XV(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!YV(t,e))&&n.push(e)}return n}function gH(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=rFr(t);if(t=e.points,!e.changed)break}return t}function iFr(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=aFr(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}function sFr(e,t){for(let n of e){let e=iFr(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=oFr(r,e.srcRect,!0)),e.dstRect&&(r=oFr(r,e.dstRect,!1)),r=gH(hH(r)),r=hFr(r,e.srcRect,e.dstRect),e.edge.points=gH(hH(r))}}function cFr(e,t,n,r=!1){if(ZV(e,t,OH)){if(t.yn.bottom+OH)return t;if(r){if(e.xn.right+OH)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(XV(e,t,OH)){if(t.xn.right+OH)return t;if(r){if(e.yn.bottom+OH)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}function _H(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}function dFr(e,t){return t===`left`||t===`right`?vH(e.top,e.bottom):vH(e.left,e.right)}function fFr(e,t,n){let r=e.y>=n.top-OH&&e.y<=n.bottom+OH,i=e.x>=n.left-OH&&e.x<=n.right+OH;if(ZV(e,t,OH)&&r){if(Math.abs(e.x-n.left)0?uFr(a):void 0}function mFr(e,t,n,r,i){let a=pFr(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)({...e}));for(let s=t;s>=0&&s=n.left-OH&&Math.max(e.x,t.x)<=n.right+OH,i=Math.min(e.y,t.y)>=n.top-OH&&Math.max(e.y,t.y)<=n.bottom+OH;if(Math.abs(e.y-n.top)r.bottom+OH;case`left`:return ZV(t,n,OH)&&n.xr.right+OH}}function xFr(e,t,n){if(e.length<3)return e;if(n){let n=yFr(e[0],e[1],t);return n&&bFr(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=yFr(e[r-1],e[r],t);return i&&bFr(i,e[r-1],e[r-2],t)?e.slice(0,r):e}function SFr(e,t,n){let r=e;if(t){let e=_H(r,0,1);if(e){let n=cFr(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=xFr(r,t,!0)}if(n){let e=r.length-1,t=_H(r,e,-1);if(t){let i=cFr(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=xFr(r,n,!1)}let i=hFr(r,t,n);return i!==r||r.length===2?i:(t&&(r=vFr(r,t,!0)),n&&(r=vFr(r,n,!1)),r)}function CFr(e,t){for(let n of e){let e=iFr(n,t,2);if(!e)continue;let r=SFr(iH(e.points,OH),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}function wFr(e){return new Map(e.map(e=>[e.id,e]))}function TFr(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!(e!=null&&e.isGroup))break;r=e.id,n=e.parentId}return r}function EFr(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!(e!=null&&e.isGroup))break;n++,r=e.parentId}return n}function DFr(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,l=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-l/2),i=Math.max(i,o+l/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}function OFr(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}function kFr(e){let t=wFr(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>EFr(n,t)-EFr(e,t));for(let t of n){let n=DFr(e.filter(e=>e.parentId===t.id));n&&OFr(t,n)}}function AFr(e,t){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=-1/0;for(let e of i){let n=e[t];typeof n==`number`&&(a=Math.min(a,n),o=Math.max(o,n))}if(!Number.isFinite(a)||!Number.isFinite(o))return!1;let s=U(e=>a+o-e,`mirror`);for(let e of n){let n=e[t];typeof n==`number`&&(e[t]=s(n));let r=e.groupTitleRect;r&&(e.groupTitleRect=t===`x`?{...r,left:s(r.right),right:s(r.left)}:{...r,top:s(r.bottom),bottom:s(r.top)})}for(let e of r)for(let n of e.points??[])n[t]=s(n[t]);return!0}function jFr(e){return!(e.nodes??[]).some(e=>!e.isGroup)||AFr(e,`y`)}function MFr(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t0?Math.max(1,u/d):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*f+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*f+36,r=e-a;t.x=n,t.y=r}kFr(n);let p=n.filter(e=>e.isGroup&&!e.parentId);if(p.length===0)return t===`RL`&&AFr(e,`x`),!0;let m=wFr(n),h=new Map;for(let e of n){if(e.isGroup)continue;let t=TFr(e,m);if(!t)continue;let n=h.get(t)??[];n.push(e),h.set(t,n)}let g=0;for(let e of p){let t=e.padding??0;t>g&&(g=t)}let _=[],v=1/0,y=-1/0;for(let e of p){let t=DFr(h.get(e.id)??[]);t&&(v=Math.min(v,t.minX),y=Math.max(y,t.maxX),_.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(v===1/0||y===-1/0)return!0;let b=Math.max(0,y-v)+2*Math.max(g,10),x=36+b,S=(v+y)/2-b/2-36,C=S+x/2,w=Math.max(g,36);_.sort((e,t)=>e.centerY-t.centerY);for(let e=0;e<_.length;e++){let t=_[e],n,r;if(n=e===0?t.contentTop-w:(_[e-1].contentBottom+t.contentTop)/2,e===_.length-1)r=t.contentBottom+w;else{let n=_[e+1];r=(t.contentBottom+n.contentTop)/2}let i=Math.max(0,r-n),a=(n+r)/2;t.lane.x=C,t.lane.y=a,t.lane.width=x,t.lane.height=i,t.lane.swimlaneContentTop=t.contentTop,t.lane.groupTitleRect={left:S,right:S+36,top:n,bottom:r}}return t===`RL`&&AFr(e,`x`),!0}function NFr(e,t){let{nodeInfoById:n,realNodeRects:r}=uH(t);for(let t of e){if(t.isLayoutOnly)continue;let i=t.points;if(!i||i.length<4)continue;let a=GPr(iH(i,kH),kH);if(!a)continue;let{p3:o}=a,s=a.kind===`HVH`,l=QPr(t,n,kH);if(!l)continue;let{srcId:u,dstId:d,srcInfo:f,dstInfo:p,collinearX:m,collinearY:h}=l;if(m||h)continue;let g,_=f.rect;for(let n of gLr){let i,a,l;if(s){let e=p.cy>f.cy?_.bottom:_.top,t=f.cx+n;if(t<=_.left+kH||t>=_.right-kH)continue;i={x:t,y:e},a={x:t,y:o.y},l={x:o.x,y:o.y}}else{let e=p.cx>f.cx?_.right:_.left,t=f.cy+n;if(t<=_.top+kH||t>=_.bottom-kH)continue;i={x:e,y:t},a={x:o.x,y:t},l={x:o.x,y:o.y}}let m=YV(i,a,kH),h=YV(a,l,kH);if(m&&h||!m&&fH(i,a,r,[u],1)||!h&&fH(a,l,r,[d],1))continue;let v=!m&&pH(i,a,e,t,{epsilon:kH,skipDegenerateOther:!0}),y=!h&&pH(a,l,e,t,{epsilon:kH,skipDegenerateOther:!0});if(!(v||y)){g=m?[a,l]:h?[i,a]:[i,a,l];break}}g&&(t.points=g)}}function PFr(e,t){let n=.001,{realNodeRects:r,labelNodeRects:i}=dH(t.values());for(let a of e){if(a.isLayoutOnly)continue;let o=a.points;if(!o||o.length<4)continue;let s=iH(o,n);if(s.length<4)continue;let l=s.length-1,u=s[l],d=s[l-1],f=s[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(fH(O,k,r,S?[S]:[],-2)||fH(O,k,i,[],-2))continue;if(C){let e=t.get(C),n=e?cH(e):void 0;if(n&&KPr(O,n,2))continue}let A=U((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e{for(let i of e){if(i===a||i.isLayoutOnly)continue;let e=i.points;if(!(!e||e.length<2))for(let i=0;i=0){let e=s[l-3],t=[C,S].filter(e=>!!e);if(fH(e,O,r,t,-2)||M(e,O))continue}let N=[...s.slice(0,l-2),O,k];a.points=N;let P=a.labelNodeId;if(P){let e=t.get(P);if(e){let t=e.width??0,r=e.height??0;if(t>0&&r>0){let i,a,o=-1;for(let e=0;e=t+2||f&&u>=r+2)&&u>o&&(o=u,i=(s.x+l.x)/2,a=(s.y+l.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}function FFr(e,t){let n=U((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),r=U((e,r)=>{let i=iH(e.points??[]);if(i.length<2)return;let a=r?e.start:e.end,o=a?t.get(a):void 0,s=o?cH(o):void 0;if(!o||!a||!s)return;let l=r?i[0]:i[i.length-1],u=r?i[1]:i[i.length-2],d=n(o,l),f=l;if(_Lr(u,d)&&(f=u),XV(d,f,jH))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:r,orientation:`V`,coord:d.x,min:Math.min(d.y,f.y),max:Math.max(d.y,f.y),boundary:d,railEnd:f,rect:s};if(ZV(d,f,jH))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:r,orientation:`H`,coord:d.y,min:Math.min(d.x,f.x),max:Math.max(d.x,f.x),boundary:d,railEnd:f,rect:s}},`terminalLaneFor`),i=U((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),a=U((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&XV(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&ZV(e.boundary,t.boundary,1),`sameTerminalFace`),o=U((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:i(e,t)>=MH&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),s=U((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=i(e,t);if(n2*r?!1:a(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=U((e,t)=>{let n=iH(e.edge.points??[]);if(n.length<2)return;let r=e.orientation===`V`?{x:e.boundary.x+t,y:e.boundary.y}:{x:e.boundary.x,y:e.boundary.y+t},i=e.orientation===`V`?{x:e.railEnd.x+t,y:e.railEnd.y}:{x:e.railEnd.x,y:e.railEnd.y+t};if(!U(()=>Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1?ZV(r,e.boundary,jH)&&r.x>=e.rect.left+1&&r.x<=e.rect.right-1:Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1?XV(r,e.boundary,jH)&&r.y>=e.rect.top+1&&r.y<=e.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(e.atStart){let t=n.length>1&&YV(n[1],e.railEnd,jH),a=n.slice(t?2:1),o=a[0];return o&&!_Lr(o,i)?void 0:[r,i,...a]}let a=n.length>1&&YV(n[n.length-2],e.railEnd,jH),o=n.slice(0,a?-2:-1),s=o[o.length-1];if(!s||_Lr(s,i))return[...o,i,r]},`shiftedCandidate`),u=U(e=>{let n=e.edge,r=iH(n.points??[]);if(r.length!==2)return!1;let i=n.start,a=n.end,o=i?t.get(i):void 0,s=a?t.get(a):void 0;if(!o||!s)return!1;let l=o.x??0,u=o.y??0,d=s.x??0,f=s.y??0,[p,m]=r;return ZV(p,m,jH)&&Math.abs(u-f)<1&&Math.abs(l-d)>1||XV(p,m,jH)&&Math.abs(l-d)<1&&Math.abs(u-f)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let t=0;t<8;t++){let t=e.filter(e=>!e.isLayoutOnly).flatMap(e=>[r(e,!0),r(e,!1)]).filter(e=>!!e),n=!1;for(let e=0;e{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let e of m){for(let i of d){let a=l(e,i);if(!a)continue;let u=r({...e.edge,points:a},e.atStart);if(u&&!t.some(t=>t.edge!==e.edge&&(o(u,t)||p&&s(u,t)))){e.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}function IFr(e,t){let{realNodeRects:n,labelNodeRects:r}=dH(t.values()),i=U((t,i)=>{let a=t.start,o=t.end,s=NH(i);if(s.length!==i.length-1)return!1;let l=[a,o].filter(e=>!!e);for(let e of s)if(fH(e.a,e.b,n,l,-2)||fH(e.a,e.b,r,[],-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of s)for(let n of NH(iH(e)))if(tH(t,n,.5)>=MH||mH(t.a,t.b,n.a,n.b,jH))return!1}}return!0},`candidateIsSafe`),a=U((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=QV(n,r)&&$V(r,i)&&QV(i,a)&&$V(a,o)&&XV(n,a,jH)&&XV(n,o,jH)&&XV(r,i,jH)&&(r.x-n.x)*(a.x-i.x)<0,l=$V(n,r)&&QV(r,i)&&$V(i,a)&&QV(a,o)&&ZV(n,a,jH)&&ZV(n,o,jH)&&ZV(r,i,jH)&&(r.y-n.y)*(a.y-i.y)<0;if(s||l)return iH([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let u=e[t+5],d=$V(n,r)&&QV(r,i)&&$V(i,a)&&QV(a,o)&&$V(o,u)&&XV(n,o,jH)&&XV(n,u,jH)&&XV(i,a,jH)&&(i.x-r.x)*(o.x-a.x)<0,f=QV(n,r)&&$V(r,i)&&QV(i,a)&&$V(a,o)&&QV(o,u)&&ZV(n,o,jH)&&ZV(n,u,jH)&&ZV(i,a,jH)&&(i.y-r.y)*(o.y-a.y)<0;if(d||f)return iH([...e.slice(0,t+1),u,...e.slice(t+6)])},`withoutDogleg`);for(let t=0;t<8;t++){let t=!1;for(let n of e){if(n.isLayoutOnly)continue;let e=iH(n.points??[]);for(let r=0;r<=e.length-5;r++){let o=a(e,r);if(o&&i(n,o)){n.points=o,t=!0;break}}if(t)break}if(!t)return}}function LFr(e,t){let{realNodeRects:n,labelNodeRects:r}=dH(t.values()),i=e.filter(e=>!e.isLayoutOnly),a=U((e,t,n)=>iH(e===t?n??[]:e.points??[]),`pointsFor`),o=U((e,t)=>{let n=0;for(let r=0;r{let t=NH(e);if(t.length!==3)return;let n=t[1];if(t[0].horizontal!==n.horizontal&&t[2].horizontal!==n.horizontal)return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=U((e,t)=>{let r=[e.start,e.end].filter(e=>!!e);return n.filter(e=>{if(r.includes(e.id))return!1;let n=e.rect;return t.horizontal?eH(t.a.x,t.b.x,n.left,n.right)>=MH&&t.a.y>=n.top-2&&t.a.y<=n.bottom+2:eH(t.a.y,t.b.y,n.top,n.bottom)>=MH&&t.a.x>=n.left-2&&t.a.x<=n.right+2})},`blockingRectsFor`),u=U((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=gH(iH(r));return NH(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=U((e,t,s)=>{let l=[e.start,e.end].filter(e=>!!e),u=NH(t);if(u.length!==t.length-1)return!1;for(let e of u)if(fH(e.a,e.b,n,l,-2)||fH(e.a,e.b,r,[],-2))return!1;for(let t of i)if(t!==e){for(let e of u)for(let n of NH(a(t)))if(tH(e,n,.5)>=MH)return!1}return o(e,t)<=s},`candidateIsSafe`);for(let e=0;e<8;e++){let e=o(),t=!1;for(let n of i){let r=a(n),i=s(r);if(!i)continue;let o=l(n,i.segment);if(o.length===0)continue;let f=i.horizontal?[Math.min(...o.map(e=>e.rect.top))-20,Math.max(...o.map(e=>e.rect.bottom))+20]:[Math.min(...o.map(e=>e.rect.left))-20,Math.max(...o.map(e=>e.rect.right))+20];for(let a of f){let o=u(r,i.segment,a);if(o&&d(n,o,e)){n.points=o,t=!0;break}}if(t)break}if(!t)return}}function RFr(e,t){let n=U(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),r=U(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,r=typeof t==`string`?t.toUpperCase():``;if(r===`LR`||r===`RL`||r===`BT`)return;let i=n(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,l=i.bottom-i.top;if(!(l<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+jH||n>=t.bottom-jH?!1:eH(e.a.x,e.b.x,t.left,t.right)>=MH},`horizontalSegmentIntersectsTitle`),a=[...t.values()].map(r).filter(e=>!!e);if(a.length===0)return;let o=0;for(let t of e){if(t.isLayoutOnly)continue;let e=iH(t.points??[]);for(let t of NH(e))for(let e of a)i(t,e.rect)&&(o=Math.max(o,e.rect.bottom-t.a.y+4))}if(!(o<=jH))for(let e of a){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-o/2,e.node.height=n+o,e.node.groupTitleRect={...e.rect,top:e.rect.top-o,bottom:e.rect.bottom-o})}}function zFr(e,t){let n=U(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),r=U(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=n(e),r=e.x,i=e.width;if(!t||typeof r!=`number`||typeof i!=`number`||!Number.isFinite(r)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+jH||n>=t.right-jH?!1:eH(e.a.y,e.b.y,t.top,t.bottom)>=MH},`verticalSegmentIntersectsTitle`),a=U((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+jH||n>=t.bottom-jH?!1:eH(e.a.x,e.b.x,t.left,t.right)>=MH},`horizontalSegmentIntersectsTitle`),o=[...t.values()].map(r).filter(e=>!!e);if(o.length===0)return;let s=0;for(let t of e){if(t.isLayoutOnly)continue;let e=iH(t.points??[]);for(let t of NH(e))for(let e of o)if(i(t,e.rect))s=Math.max(s,e.rect.right-t.a.x+4);else if(a(t,e.rect)){let n=Math.min(t.a.x,t.b.x);s=Math.max(s,e.rect.right-n+4)}}if(!(s<=jH))for(let e of o){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-s/2,e.node.width=n+s,e.node.groupTitleRect={...e.rect,left:e.rect.left-s,right:e.rect.right-s})}}function BFr(e,t){let{realNodeRects:n}=dH(t.values()),r=e.filter(e=>!e.isLayoutOnly),i=U((e,t=new Map)=>iH(t.get(e)??e.points??[]),`replacementPointsFor`),a=U((e=new Map)=>{let t=0;for(let n=0;nr.reduce((t,n)=>t+rH(i(n,e)),0),`totalBends`),s=U(e=>{let t=i(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(QV(n,r,jH)||$V(n,r,jH))return{tailStart:n,terminal:r}},`terminalTailFor`),l=U((e,t)=>{let n=i(e);if(n.length<3)return;let r=n[0],a=n[1],o;if(QV(r,a,jH))o={x:a.x,y:t.tailStart.y};else if($V(r,a,jH))o={x:t.tailStart.x,y:a.y};else return;let s=gH(iH([r,a,o,t.tailStart,t.terminal]));return NH(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=U((e,t)=>{let r=[e.start,e.end].filter(e=>!!e);for(let e of NH(t))if(fH(e.a,e.b,n,r,-2))return!0;return!1},`pathHasNodeHit`),d=U((e,t,n)=>{for(let a of r)if(a!==e){for(let e of NH(t))for(let t of NH(i(a,n)))if(tH(e,t,.5)>=MH)return!0}return!1},`pathHasSharedTrack`),f=U((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=U(()=>{let e=new Map;for(let n of r){let r=n.end;if(!r||!t.has(r)||i(n).length<4)continue;let a=e.get(r)??[];a.push(n),e.set(r,a)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=a();if(e===0)return;let t=o(),n,r=e,i=t;for(let t of p().values())for(let u=0;u=e||b>r||b===r&&x>=i||(n=y,r=b,i=x)}if(!n)return;for(let[e,t]of n)e.points=t}}function VFr(e,t){let{realNodeRects:n,labelNodeRects:r}=dH(t.values()),i=e.filter(e=>!e.isLayoutOnly),a=U((e,t=new Map)=>iH(t.get(e)??e.points??[]),`replacementPointsFor`),o=U((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+rH(a(n,e)),0),`totalBends`),l=U(e=>{let n=e.start,r=e.end,i=n?t.get(n):void 0,a=r?t.get(r):void 0,o=i?cH(i):void 0,s=a?cH(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=U((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=io+jH?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=io+jH?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=U(()=>{let e=[];for(let t of i){let n=a(t);for(let r of NH(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=U((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&eH(e.min,e.max,t.min,t.max)>=MH,`railsInteract`),p=U(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=U(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let t=e.map(e=>e.coord),n=m(e),r=[];if(e.length<=6){let i=Array(n.length).fill(!1),a=[],o=U(()=>{if(a.length===e.length)a.some((e,n)=>Math.abs(e-t[n])>=jH)&&r.push([...a]);else for(let[e,t]of n.entries())i[e]||(i[e]=!0,a.push(t),o(),a.pop(),i[e]=!1)},`visit`);return o(),r}for(let e=0;e{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=gH(iH(t));if(NH(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=U(e=>{for(let[t,i]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of NH(i))if(fH(t.a,t.b,n,e,-2)||fH(t.a,t.b,r,[],-2))return!1}for(let t=0;t=MH)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t,n=e,r=s(),i=1/0;for(let a of p(d()))for(let l of h(a)){let u=g(a,l);if(!u||!_(u))continue;let d=o(u);if(d>=e)continue;let f=s(u),p=a.reduce((e,t,n)=>e+Math.abs(l[n]-t.coord),0);d>n||d===n&&(f>r||f===r&&p>=i)||(t=u,n=d,r=f,i=p)}if(!t)return;for(let[e,n]of t)e.points=n}}function HFr(e,t){let{realNodeRects:n,labelNodeRects:r}=dH(t.values()),i=e.filter(e=>!e.isLayoutOnly),a=U((e,t,n)=>iH(e===t?n??[]:e.points??[]),`pointsFor`),o=U(e=>NH(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),s=U((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&eH(e.a.x,e.b.x,t.left,t.right)>=MH}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&eH(e.a.y,e.b.y,t.top,t.bottom)>=MH}return!1},`segmentRunsAlongRectBorder`),u=U(e=>{let n=[e.start,e.end].filter(e=>!!e),r=[];for(let e of n){let n=t.get(e),i=n?cH(n):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=U((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=QV(n,r,jH)&&$V(r,i,jH)&&QV(i,a,jH),s=$V(n,r,jH)&&QV(r,i,jH)&&$V(i,a,jH);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let l=XV(n,a,jH)||ZV(n,a,jH)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],u=l.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:l.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),d=new Set;return u.map(e=>gH(iH(e))).filter(e=>{if(NH(e).length!==e.length-1||!e.some(e=>YV(e,a,jH)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return!d.has(t)&&(d.add(t),!0)})},`shortcutCandidatesAt`),f=U((e,t,o)=>{let d=[e.start,e.end].filter(e=>!!e),f=u(e);for(let e of NH(t))if(fH(e.a,e.b,n,d,-2)||fH(e.a,e.b,r,[],-2)||f.some(t=>l(e,t)))return!1;for(let n of i)if(n!==e){for(let e of NH(t))for(let t of NH(a(n)))if(tH(e,t,.5)>=MH)return!1}return s(e,t)<=o},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t,n,r=e,l=1/0,u=1/0;for(let p of i){let i=a(p),m=rH(i,jH),h=o(i);for(let a=0;a<=i.length-4;a++)for(let g of d(i,a)){let i=rH(g,jH),a=o(g);if(!(ir||d===r&&(i>l||i===l&&a>=u)||(t=p,n=g,r=d,l=i,u=a)}}if(!t||!n)return;t.points=n}}function UFr(e,t){let n=[];for(let e of t.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,r=e.y??0,i=cH(e);i&&n.push({id:String(e.id??``),cx:t,cy:r,rect:i})}if(n.length===0)return;let r=new Map(n.map(e=>[e.id,e])),i=n.map(e=>({id:e.id,rect:e.rect})),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...n.map(e=>e.rect.top))-20,bottom:Math.max(...n.map(e=>e.rect.bottom))+20,left:Math.min(...n.map(e=>e.rect.left))-20,right:Math.max(...n.map(e=>e.rect.right))+20},s=e.filter(e=>!e.isLayoutOnly),l=new Map(s.map((e,t)=>[e,t])),u=U(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(o[e]+t*20*r);return n},`outwardTracksForSide`),d=U((e,t=new Map)=>iH(t.get(e)??e.points??[]),`replacementPointsFor`),f=U((e,t)=>{let n=0;for(let r of e)for(let e of t)mH(r.a,r.b,e.a,e.b,jH)&&n++;return n},`crossingCountBetweenSegments`),p=U((e,t)=>f(NH(e),NH(t)),`crossingCountBetweenPaths`),m=U((e=new Map)=>{let t=0,n=[],r=new Set,i=[],a=U(e=>{r.has(e)||(r.add(e),i.push(e))},`addEdge`);for(let r=0;r0&&(t+=u,n.push({first:i,second:r,count:u}),a(i),a(r))}}return i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:t,pairs:n,edgeSet:r,edges:i}},`crossingSnapshot`),h=U((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=U(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=U(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of s)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=U((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=U(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=U(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=U((e=new Map)=>s.reduce((t,n)=>t+rH(d(n,e)),0),`totalBends`),C=U((e=new Map)=>s.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=U((e,t,n=new Map)=>{let r=NH(t);for(let t of s)if(t!==e){for(let e of r)for(let r of NH(d(t,n)))if(tH(e,r,.5)>=MH)return!0}return!1},`pathHasSegmentConflict`),T=U((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of NH(t))if(fH(e.a,e.b,i,n,-2))return!0;return!1},`pathHitsNode`),E=U((e,t)=>{let n=gH(iH(t));NH(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=U(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=U((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=U((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),o[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,XPr(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=U((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=U((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),M=U((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),N=U((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),P=U(e=>{let t=new Set;return e.map(e=>iH(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),F=U((e,t,n,r)=>{let i=[],a=YPr(e,t,n,r,20,jH);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?M(i,e,t,n,r):N(i,e,t,n,r),P(i)},`buildCandidatesForSides`),I=U((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],o=[...u(`top`),...u(`bottom`)];for(let s of a){let a=lH(r,s),l=s===`top`||s===`bottom`?u(s):o;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:a.y},a]);for(let i of l)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:a.x,y:i},a])}}},`addVerticalDepartureOuterTrackCandidates`),L=U((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],o=[...u(`top`),...u(`bottom`)];for(let s of a){let a=lH(r,s),l=s===`left`||s===`right`?u(s):i;for(let r of o){E(e,[t,n,{x:n.x,y:r},{x:a.x,y:r},a]);for(let i of l)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:a.y},a])}}},`addHorizontalDepartureOuterTrackCandidates`),R=U(e=>{let t=e.start,n=e.end,i=n?r.get(n):void 0;if(!t||!i)return[];let a=iH(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],l=[];return $V(o,s,jH)?I(l,o,s,i):QV(o,s,jH)&&L(l,o,s,i),l},`terminalPreservingOuterTrackCandidates`),ee=U(e=>{let t=e.start,n=e.end,i=t?r.get(t):void 0,o=n?r.get(n):void 0;if(!i||!o)return[];let s=[];for(let e of a){let t=lH(i,e);for(let n of a)s.push(...F(t,e,lH(o,n),n))}return s.push(...R(e)),s},`candidatePathsFor`),te=U(()=>new Map(s.map(e=>[e,NH(d(e))])),`currentSegmentsByEdge`),ne=U((e,t,n)=>{let r=new Set;for(let i of s){if(i===e)continue;let a=n.get(i)??NH(d(i));t.some(e=>a.some(t=>tH(e,t,.5)>=MH))&&r.add(i)}return r},`sharedTrackConflictsFor`),z=U((e,t,n,r)=>{let i=new Set;return ee(e).map(e=>gH(iH(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=NH(i),o=0;for(let t of s)t!==e&&(o+=f(a,n.get(t)??NH(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:rH(i,jH),totalBends:rH(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:ne(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),re=U((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let l=f(n.segments,i.segments);for(let e of s){if(e===t||e===r)continue;let o=a.get(e)??NH(d(e));l+=f(n.segments,o)+f(i.segments,o)}return e.count-o+l},`pairCrossingCount`),ie=U((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),ae=U((e,t)=>e.segments.some(e=>t.segments.some(t=>tH(e,t,.5)>=MH)),`candidatesShareTrack`),oe=U((e,t,n,r)=>ie(t,n.edge)&&ie(r,e.edge)&&!ae(t,r),`pairCandidatesAreCompatible`),se=U((e,t,n,r,i)=>{let a=re(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),ce=U((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!oe(t,r,n,a))continue;let o=se(e,t,r,n,a);o&&ce(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),ue=U(e=>{let t=S(),n=C(),r=te(),i=b(e),a=new Map(s.map(e=>[e,rH(d(e))])),o=new Map(s.map(e=>[e,x(d(e))])),l=new Map,u=v(e);for(let t of u)for(let n of t){if(l.has(n))continue;let t=z(n,e,r,i);t.length>0&&l.set(n,{edge:n,candidates:t})}let f={replacements:new Map,crossings:e.count,bends:t,length:n},p={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of u){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>l.get(e)).filter(e=>!!e);for(let e=0;e0?f.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=rH(d(o),jH);for(let l of ee(o)){let u=T(o,l),d=!u&&w(o,l),f=y(e,o,l),p=rH(l,jH);u||d||(fi||f===i&&p>=a||(n=o,r=l,i=f,a=p))}}if(n&&r){n.points=r;continue}let o=ue(e);if(!o)return;for(let[e,t]of o)e.points=t}}function WFr(e,t){let{nodeInfoById:n,realNodeRects:r}=uH(t),i=[`top`,`bottom`,`left`,`right`],a={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},o=U((e,t,n,r)=>{let i=[],o=YPr(e,t,n,r,20,PH);return o&&i.push(o),t===r&&i.push(XPr(e,t,n,a[t])),i},`buildOrthogonalPathCandidates`),s=U((e,t)=>{for(let n=0;n{let i=0,a=nH(t,PH),o=n.start,s=n.end;for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,l=t.end;if(!r&&o&&s&&(e===o||e===s||l===o||l===s))continue;let u=t.points;if(!(!u||u.length<2))for(let e of a)for(let t of nH(u,PH))($Pr(e.a,e.b,t.a,t.b,PH,PH)||tH(e,t,PH)>=vLr)&&i++}return i},`pathConflictCount`),u=U((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points??[];if(e.length<1)continue;let r=t.id??``,i=t.start,a=t.end;if(i){let t=n.get(i);t&&f(i,u(e[0],t),r)}if(a){let t=n.get(a);t&&f(a,u(e[e.length-1],t),r)}}let p=U((e,t,n)=>{var r;return((r=d.get(e))==null?void 0:r.some(e=>e.edgeId!==n&&e.side===t))??!1},`faceIsClaimed`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!e||e.length<2)continue;let r=rH(e,PH);if(r<4)continue;let a=t.start,m=t.end;if(!a||!m)continue;let h=n.get(a),g=n.get(m);if(!h||!g)continue;let _=t.id??``,v=l(e,t,!0),y=l(e,t),b,x=v,S=r;for(let e of i){if(p(a,e,_))continue;let n=lH(h,e);for(let r of i){if(p(m,r,_))continue;let i=lH(g,r);for(let u of o(n,e,i,r)){if(s(u,[a,m]))continue;let e=rH(u,PH);if(v>0){let n=l(u,t,!0);if(n>x||n===x&&e>=S)continue;x=n,S=e,b=u}else l(u,t)>y||ee.edgeId!==_));let n=d.get(m);n&&d.set(m,n.filter(e=>e.edgeId!==_)),f(a,u(b[0],h),_),f(m,u(b[b.length-1],g),_)}}}function GFr(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)t&&oH(e,KFr(t)))}function JFr(e,t){let n=[];for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!(!e||e.length<2))for(let r=0;r{let n=JPr(t,3);for(let{nodeId:t,rect:i}of r)if(t!==e&&oH(n,i))return!0;return!1},`labelOverlapsForeignNode`),o=U((e,t)=>{let r=JPr(t,3);for(let t of n)if(t.edgeId!==e&&aH(t.p1,t.p2,r))return!0;return!1},`labelOverlapsForeignEdge`),s=U((e,t,n)=>a(e,n)||o(t,n),`labelOverlapsAnything`),l=[],u=U(e=>{for(let{id:t,rect:n}of i)if(qPr(n,e))return t},`findContainingLane`),d=U((e,t)=>l.some(n=>n.labelId!==e&&oH(t,n.rect)),`overlapsPlacedLabel`);for(let n of e){if(n.isLayoutOnly)continue;let e=n.labelNodeId;if(!e)continue;let r=t.get(e);if(!r)continue;let f=n.points;if(!f||f.length<2)continue;let p=r.width??0,m=r.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=FH&&i>=FH||h.push({idx:e,length:r+i,orientation:r>=FH?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=U(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=U((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=U((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=U((e,t)=>e.midX>=t.left-FH&&e.midX<=t.right+FH&&e.midY>=t.top-FH&&e.midY<=t.bottom+FH,`pointInsideRectInclusive`),E=U(e=>{let t=sH(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=i.find(({rect:t})=>T(e,t));if(!r)return;let a=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,l=r.rect.bottom-m/2-1;if(a>o||s>l)return;let d={midX:w(e.midX,a,o),midY:w(e.midY,s,l)},f=sH(d.midX,d.midY,p,m);return T(e,f)?{laneId:r.id,anchor:d,rect:f}:void 0},`placementForAnchor`),D=U((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=U((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+FH{let r=y(t);for(let t of r)for(let r of S){let i=C(t,r);if(!O(t,i))continue;let a=E(i);if(a&&!qFr(a.rect,f)&&!d(e,a.rect)&&!s(e,n.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=U((t,r,i=!1)=>{let s=y(t);for(let t of s){let s={midX:t.midX,midY:t.midY};if(r&&!O(t,s))continue;let l=E(s);if(l&&!qFr(l.rect,f)&&!d(e,l.rect)&&!a(e,l.rect)&&(i||!o(n.id,l.rect)))return{laneId:l.laneId,anchor:l.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengtht.labelId===e);n>=0?l[n]={labelId:e,rect:t}:l.push({labelId:e,rect:t})}}}function YFr(e,t){return e{let o=YFr(n,r),s=0,l=U(e=>{if(!e)return;let t=i.get(e);if(!t)return;let n=a===`x`?t.w/2:t.h/2;n>s&&(s=n)},`consider`);l(t.labelNodeId);for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.start,r=n.end;e&&r&&YFr(e,r)===o&&l(n.labelNodeId)}return s>0?s+SLr:0},`labelClearanceFor`);for(let t of e){if(t.isLayoutOnly)continue;let i=t.points;if(!GPr(i,bLr))continue;let o=QPr(t,n,bLr);if(!o)continue;let{srcId:s,dstId:l,srcInfo:u,dstInfo:d,collinearX:f,collinearY:p}=o;if(f===p)continue;let m,h;if(f){let e=d.cy>u.cy;m={x:u.cx,y:e?u.rect.bottom:u.rect.top},h={x:d.cx,y:e?d.rect.top:d.rect.bottom}}else{let e=d.cx>u.cx;m={x:e?u.rect.right:u.rect.left,y:u.cy},h={x:e?d.rect.left:d.rect.right,y:d.cy}}if(fH(m,h,r,[s,l],1))continue;let g=a(t,s,l,f?`x`:`y`),_=g>xLr?g:xLr,v=[0,_,-_];for(let n of v){let i={...m},a={...h};if(f){if(i.x+=n,a.x+=n,i.x<=u.rect.left||i.x>=u.rect.right||a.x<=d.rect.left||a.x>=d.rect.right)continue}else if(i.y+=n,a.y+=n,i.y<=u.rect.top||i.y>=u.rect.bottom||a.y<=d.rect.top||a.y>=d.rect.bottom)continue;if(!fH(i,a,r,[s,l],1)&&!pH(i,a,e,t,{epsilon:bLr})){t.points=[i,a];break}}}}function ZFr(e,t){let n=.001,{realNodeRects:r,labelNodeRects:i}=dH(t.values()),a=U((e,t)=>nH(t,n).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),o=U(()=>{let t=[];for(let n of e){if(n.isLayoutOnly)continue;let e=n.points;!e||e.length<2||t.push(...a(n,iH(e)))}return t},`allSegments`),s=U((e,t)=>e.horizontal&&t.horizontal?eH(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?eH(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=U((t,o)=>{let l=t.start,u=t.end,d=a(t,o);if(d.length!==o.length-1)return!1;let f=[l,u].filter(e=>!!e),p=t.labelNodeId?[t.labelNodeId]:[];for(let e of d)if(fH(e.a,e.b,r,f,-2)||fH(e.a,e.b,i,p,-2))return!1;for(let r of e){if(r===t||r.isLayoutOnly)continue;let e=r.points;if(!(!e||e.length<2)){for(let t of d)for(let i of a(r,iH(e)))if(s(t,i)||mH(t.a,t.b,i.a,i.b,n))return!1}}return!0},`candidateIsSafe`),u=U((e,t)=>{let n=iH(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return a(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=U((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=U(e=>{let n=e.edge,r=iH(n.points??[]);if(r.length!==4||e.index!==1)return;let i=n.start?t.get(n.start):void 0,a=n.end?t.get(n.end):void 0,o=i?cH(i):void 0,s=a?cH(a):void 0,l=r.slice(e.index+2);if(i&&a&&o&&s&&l.length!==0)return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:l}},`sourceDetourContextFor`),p=U((e,t,r,i,a,o)=>{let s=i.y>=r.y,l=s?a.bottom:a.top,u=l+(s?20:-20);if(s&&e.b.y<=u+n||!s&&e.b.y>=u-n)return;let d=e.a.x+t;return iH([{x:r.x,y:l},{x:r.x,y:u},{x:d,y:u},{x:d,y:e.b.y},...o],n)},`verticalSourceDetour`),m=U((e,t,r,i,a,o)=>{let s=i.x>=r.x,l=s?a.right:a.left,u=l+(s?20:-20);if(s&&e.b.x<=u+n||!s&&e.b.x>=u-n)return;let d=e.a.y+t;return iH([{x:l,y:r.y},{x:u,y:r.y},{x:u,y:d},{x:e.b.x,y:d},...o],n)},`horizontalSourceDetour`),h=U((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=o(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}function QFr(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,l=i*s-a*o;if(Math.abs(l)<1e-10)return!1;let u=n.x-e.x,d=n.y-e.y,f=(u*s-d*o)/l,p=(u*a-d*i)/l,m=.01;return f>m&&f<.99&&p>m&&p<.99}function $Fr(e){let t=e.nodes??[],n=e.edges??[],r=[];if(!n.length||!t.length)return r;let i=ZPr(t),a=[];for(let e of n){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,o=e.end,s=e.labelNodeId,l=e.id??`${n}->${o}`;for(let e of i)if(e.nodeId!==n&&e.nodeId!==o&&!(s&&e.nodeId===s)){for(let n=0;n0){let e=r.filter(e=>e.type===`edge-node-overlap`).length,t=r.filter(e=>e.type===`edge-edge-crossing`).length;W.warn(`[SWIMLANE_VALIDATE] ${r.length} issue(s) detected: ${e} edge-node overlap(s), ${t} edge crossing(s)`);for(let e of r)W.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return r}function eIr(e,t){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup);if((t===`LR`||t===`RL`)&&i.length>0&&!MFr(e,t)||t===`BT`&&i.length>0&&!jFr(e))return;for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=gH(hH(t)))}WFr(r,n),XFr(r,n),NFr(r,n);let a=new Map;for(let e of n)a.set(String(e.id),e);JFr(r,a),sFr(r,a),PFr(r,a),ZFr(r,a),FFr(r,a),IFr(r,a),LFr(r,a),BFr(r,a);let o=U(()=>{UFr(r,a),VFr(r,a),HFr(r,a),JFr(r,a),CFr(r,a),LFr(r,a),JFr(r,a),CFr(r,a)},`finalizeRenderedEdges`);o(),ZFr(r,a),o(),RFr(r,a),zFr(r,a),RFr(r,a),zFr(r,a)}function bH(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}function tIr(e,t){return e.edges.filter(e=>e.dst===t)}function nIr(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}function rIr(e){let t=nIr(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}function iIr(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}function aIr(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}function oIr(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}function sIr(e,t,n,r){let i=0;for(let t of e.nodes){var a;r!=null&&r.skipGroups&&(a=e.nodeById.get(t))!=null&&a.isGroup||(i=Math.max(i,n[t]??0))}let o=Array.from({length:i+1},()=>[]);for(let i of t){var s;r!=null&&r.skipGroups&&(s=e.nodeById.get(i))!=null&&s.isGroup||o[Math.max(0,n[i]??0)].push(i)}return o}function xH(e){let t=iIr(e),n=aIr(t),r=[],i=rIr(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e{if(i-r<=1)return 0;let a=r+i>>1,o=n(r,a)+n(a,i),s=r,l=a,u=r;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let r=Object.create(null);for(let e of t.nodes)r[e]=0;let i=[],a=U(e=>{r[e]=1;for(let t of n.get(e)??[]){let e=t.dst;r[e]===0?a(e):r[e]===1&&i.push(t)}r[e]=2},`dfs`),o=[...t.nodes].sort((e,t)=>e.localeCompare(t));for(let e of o)r[e]===0&&a(e);let s=new Set(i.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=t.edges.map(e=>s.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...t.nodes],edges:l,layout:t.layout,nodeById:new Map(t.nodeById)},reversed:i}}function uIr(e){let t=new Map,n=U(r=>{if(t.has(r))return t.get(r);let i=e.nodeById.get(r);if(!i)return t.set(r,null),null;let a=i.parentId;if(!a)return t.set(r,null),null;let o=n(a)??a;return t.set(r,o),o},`resolve`);for(let t of e.nodes)n(t);return t}function CH(e){let t=uIr(e);return e=>t.get(e)??null}function dIr(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}function fIr(e,t){let n=dIr(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)r.has(e)&&!i.has(e)&&(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}function pIr(e,t){let n=bH(e),r=(t==null?void 0:t.laneOf)??(()=>null),i=t==null?void 0:t.rankHint,{preds:a}=oIr(n);for(let e of a.values())e.sort((e,t)=>e.localeCompare(t));let o=xH(n)??[...n.nodes].sort((e,t)=>e.localeCompare(t)),s=new Map;for(let[e,t]of o.entries())s.set(t,e);let l=new Map,u=new Map;for(let e of n.nodes)u.set(e,[]);for(let e of o){let t=(a.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=mIr(e,t,{laneOf:r,rankHint:i,topoIndex:s});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of n.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of n.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=s.get(e)??0,r=s.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=hIr(n),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=gIr(m),g=_Ir(m),_=new Map;for(let e of n.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=U(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of o)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:o}}function mIr(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{var i,a;let o=n.laneOf(e),s=n.laneOf(t),l=o!=null&&o===r;if(l!==(s!=null&&s===r))return l?-1:1;let u=(i=n.rankHint)==null?void 0:i[e],d=(a=n.rankHint)==null?void 0:a[t];if(u!=null&&d!=null&&u!==d)return d-u;let f=n.topoIndex.get(e)??0,p=n.topoIndex.get(t)??0;return f===p?e.localeCompare(t):f-p})[0]}function hIr(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}function gIr(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}function _Ir(e){let t=new Map,n=new Map,r=[],i=[],a=0,o=U((s,l)=>{t.set(s,++a),n.set(s,a);for(let u of e.get(s)??[])u!==l&&(t.has(u)?(t.get(u)??0)<(t.get(s)??0)&&(r.push([s,u]),n.set(s,Math.min(n.get(s)??a,t.get(u)??a))):(r.push([s,u]),o(u,s),n.set(s,Math.min(n.get(s)??a,n.get(u)??a)),(n.get(u)??0)>=(t.get(s)??0)&&i.push(vIr(s,u,r,i.length))))},`visit`);for(let n of e.keys())t.has(n)||o(n,null);return i}function vIr(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}function yIr(e,t,n){let r=[...e.nodes],i=new Map;for(let[e,t]of r.entries())i.set(t,e);let a=r.length,o=Array(a).fill(-1),s=Array(a).fill(0),l=[],u=new Set;for(let e of r){let t=n.parent.get(e)??null,r=i.get(e);r!=null&&(t??(o[r]=-1,s[r]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=i.get(e);if(t==null)continue;let r=n.children.get(e)??[];for(let e of r){if(u.has(e))continue;let n=i.get(e);n!=null&&(o[n]=t,s[n]=s[t]+1,u.add(e),l.push(e))}}for(let e of r){if(u.has(e))continue;let t=i.get(e);t!=null&&(o[t]=-1,s[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,a)))+1),f=Array.from({length:d},()=>Array(a).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;s[e]>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r!==-1&&i!==-1&&r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:a},()=>new Map);for(let n of e.edges){let e=n.src,r=n.dst,a=t[e],o=t[r];if(a==null||o==null||(a>o&&([e,r]=[r,e],[a,o]=[o,a]),a==null||o==null||a===o))continue;let s=i.get(e),l=i.get(r);if(s==null||l==null)continue;let u=p(s,l);if(u===-1)continue;let d=m[u];for(let e=a;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=U(e=>{let r=i.get(e);_.add(e);let a=r==null?void 0:m[r],o=a?new Map(a):new Map,s=n.children.get(e)??[];for(let n of s){let r=v(n),i=t[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=t[n];s!=null&&s>i&&(o+=1),a.set(n,o)}g(o,r)}return o},`dfs`);for(let e of n.roots)_.has(e)||v(e);for(let e of r)_.has(e)||v(e);return h}function bIr(e,t,n){let r=new Map,i=U(e=>{let a=n[e]??0,o=[...t.get(e)??[]];o.sort(xIr(n));for(let e of o){i(e);let t=r.get(e);t!=null&&(a=Math.min(a,t))}r.set(e,a)},`annotate`);for(let t of e)i(t);return r}function xIr(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}function SIr(e,t,n,r){let i=0;for(let e of t){let t=n[e]??0;t>i&&(i=t)}let a=Array.from({length:i+1},()=>[]),o=new Set,s=U(e=>{if(o.has(e))return;o.add(e);let t=n[e]??0;a[t]||(a[t]=[]),a[t].push(e);for(let t of r(e))s(t)},`emit`);for(let t of e)s(t);for(let e of t)if(!o.has(e)){let t=n[e]??0;a[t]||(a[t]=[]),a[t].push(e),o.add(e)}return a}function CIr(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}function wIr(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],l=[],u=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):l.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),l.sort((e,t)=>{let n=(u==null?void 0:u.get(e))??0,i=(u==null?void 0:u.get(t))??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...l]}}function TIr(e,t,n){let r=pIr(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=yIr(e,t,r),s=[...a].sort(xIr(t)),l=wIr(i,t,o,bIr(s,i,t)),u=SIr(s,e.nodes,t,l);return u=CIr(u),u}function EIr(e,t,n){let r=new Set(e),i=new Set(t),a=SH(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return cIr(o)}function DIr(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,l=i;t>i&&(a=e.dst,o=e.src,s=i,l=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let l=0;for(let e of r.get(s)??[])l=Math.max(l,(n[e]??0)+1);if(l>=o)continue;let u=o;n[s]=l;let d=DIr(TIr(e,n,i),e.edges,n);d(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let l=0,u=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?u=!0:l++)}if(l>0||!u)continue;let d=t[i]??0,f=d+s,p=0;for(let n of e.edges)n.dst===i&&(p=Math.max(p,(t[n.src]??0)+1));let m=Math.max(d,p,f);m!==d&&(t[i]=m)}}function AIr(e,t){let n=bH(e),r=xH(n)??[...n.nodes].sort(),i=(t==null?void 0:t.compactSingleInput)??!1,a=CH(n),o=Object.create(null);for(let e of r){let r=tIr(n,e),s=t!=null&&t.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r||n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return((t==null?void 0:t.optimizeRanksByCrossings)??!1)&&(o=OIr(n,o)),t!=null&&t.ignoreCrossLaneEdges&&kIr(n,o),{layers:TIr(n,o,a),rankOf:o,dummy:new Set}}function jIr(e,t){let n=bH(e),r={...AIr(n,{compactSingleInput:t==null?void 0:t.compactSingleInput,ignoreCrossLaneEdges:t==null?void 0:t.ignoreCrossLaneEdges,optimizeRanksByCrossings:t==null?void 0:t.optimizeRanksByCrossings}).rankOf},i=CH(n),{preds:a,succs:o}=oIr(n,e=>{if(t!=null&&t.ignoreCrossLaneEdges){let t=i(e.src),n=i(e.dst);if(t&&n&&t!==n)return!1}return!0}),s=xH(n)??[...n.nodes],l=[...s].reverse(),u=U((e,t)=>{let n=0;for(let t of a.get(e)??[])n=Math.max(n,(r[t]??0)+1);let i=1/0,s=o.get(e)??[];return s.length>0&&(i=Math.min(...s.map(e=>(r[e]??0)-1))),Number.isFinite(i)||(i=Math.max(n,t)),Math.min(Math.max(t,n),i)},`clampFeasible`),d=LH.GRAVITY_ITERATIONS,f=U(e=>{let t=!1;for(let n of e){let e=a.get(n)??[],i=o.get(n)??[];if(e.length===0&&i.length===0)continue;let s=e.length>0?e.reduce((e,t)=>e+(r[t]??0)+1,0)/e.length:r[n]??0,l=i.length>0?i.reduce((e,t)=>e+(r[t]??0)-1,0)/i.length:r[n]??0,d=Math.round((s+l)/2),f=u(n,d);f!==r[n]&&(r[n]=f,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(r[e]??0)-1));(r[e]??0)>n&&(r[e]=n)}}return{layers:sIr(n,s,r),rankOf:r,dummy:new Set}}function MIr(e){let t=iIr(e),n=rIr(e),r=aIr(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}function NIr(e,t){let n=bH(e),r=(t==null?void 0:t.direction)===`LR`?MIr(n)??[...n.nodes].sort():xH(n)??[...n.nodes].sort(),i=CH(n),a=U(e=>i(e)??e,`laneOf`),o=Object.create(null),s=new Map,l=U((e,n)=>(t==null?void 0:t.ignoreCrossLaneEdges)??!0?+(a(e)===a(n)):1,`edgeWeight`);for(let e of r){let t=n.nodeById.get(e);if(t!=null&&t.isGroup)continue;let r=tIr(n,e),i=0;if(r.length>0)for(let t of r){let n=t.src,r=o[n]??0;i=Math.max(i,r+l(n,e))}let u=a(e),d=s.get(u)??0,f=Math.max(i,d);o[e]=f,s.set(u,f+1)}return{layers:sIr(n,r,o,{skipGroups:!0}),rankOf:o,dummy:new Set}}function PIr(e,t){let n=bH(t),{rankOf:r}=e,i=e.layers.map(e=>[...e]),a=new Set(e.dummy?[...e.dummy]:[]),o=0,s=new Map(n.nodeById),l=U(e=>{let t=`placeholder-${o++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(s.set(t,n),a.add(t);i.length<=e;)i.push([]);return i[e].push(t),r[t]=e,t},`addDummyAt`),u=[...n.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=r[e.src]??0,n=r[e.dst]??0;if(n-t<=1){d.push(e);continue}let i=e.src;for(let r=t+1,a=0;r!n.nodes.includes(e))],edges:d,layout:n.layout,nodeById:s};return{layering:{layers:i,rankOf:r,dummy:a},graphWithDummies:f}}function FIr(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}function IIr(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}function LIr(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}function RIr(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}function zIr(e,t,n){let r=new Set(e),i=new Set(t),a=SH(e),o=SH(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),cIr(s.map(e=>e.v))}function BIr(e,t,n){return[...e].sort((e,r)=>{let i=FIr(t.get(e)??[]),a=FIr(t.get(r)??[]);return i===a?RIr(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}function VIr(e,t,n,r,i,a){let o=SH(e),s=SH(t),l=LIr(t,o,n,r);if(!i||!a||a.length===0)return BIr(t,l,s);let u=new Map;for(let e of t){let t=i(e),n=u.get(t)??[];n.push(e),u.set(t,n)}let d=[];for(let e of a){let t=u.get(e);if(!t||t.length===0)continue;let n=BIr(t,l,s);d.push(...n)}let f=u.get(null);if(f&&f.length>0){let e=BIr(f,l,s);for(let t of e){let e=IIr(l.get(t)??[]),n=d.length;if(isFinite(e)){for(let[t,r]of d.entries())if(eo.has(e.src)&&s.has(e.dst)),d=l?n.filter(e=>s.has(e.src)&&l.has(e.dst)):void 0,f=U(t=>{let n=zIr(e,t,u);return d&&r&&(n+=zIr(t,r,d)),n},`crossingScore`),p=i?new Map:null;if(i&&p)for(let e of t)p.set(e,i(e));let m=!0,h=f(a);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=CH(t),o=fIr(t,n==null?void 0:n.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=VIr(r[e+1],r[e],i,`up`,a,o),r[e]=HIr(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}function WIr(e,t,n){let r=(n==null?void 0:n.layerGap)??wLr.DEFAULT_LAYER_GAP,i=(n==null?void 0:n.nodeGap)??wLr.DEFAULT_NODE_GAP,a=(n==null?void 0:n.laneGap)??i*2,o=(n==null?void 0:n.direction)??`TB`,s=o===`LR`||o===`RL`,l=e.layers,u=Object.create(null),d=Object.create(null),f=U(e=>t.nodeById.get(e),`getNode`),p=U(e=>{var t;return((t=f(e))==null?void 0:t.width)??0},`getWidth`),m=U(e=>{var t;return((t=f(e))==null?void 0:t.height)??0},`getHeight`),h=CH(t),g=fIr(t,n==null?void 0:n.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(s)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),i=_[e],a=_[e+1],o=i/2+a/2,s=(t+n)/2,u=Math.max(0,s-o-r);v.push(u)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||(t[e]=[])).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+i*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+i*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+a*Math.max(0,S.length-1))/2;for(let n=0;np(e)),a=r-(e.reduce((e,t)=>e+t,0)+i*(t.length-1))/2;for(let[r,o]of t.entries()){let t=e[r];u[o]=a+t/2,d[o]=T+n/2,a+=t+i}}}let o=v[e]??0;T+=n+r+o}let E=new Map;for(let e of t.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let n=e[0].ref,r=n.start,i=n.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o){if(e===r||e===i)continue;let n=t.nodeById.get(e);n!=null&&n.isDummy&&(u[e]=a)}}return{x:u,y:d}}function GIr(e){let t=2166136261;for(let n=0;n>>0}function KIr(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function qIr(e,t){let n=[...e],r=KIr(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}function JIr(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}function YIr(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t!=null&&o!=null&&(r+=a*Math.abs(t-o))}return r}function XIr(e){let t=dIr(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=CH(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),l=r(o);if(!s||!l||s===l)continue;let u=n.get(s),d=n.get(l);if(u==null||d==null)continue;let[f,p]=u<=d?[s,l]:[l,s],m=`${f}\0${p}`,h=i.get(m);h?h.weight++:i.set(m,{a:f,b:p,weight:1})}return[...i.values()]}function ZIr(e,t,n){let r=[...e],i=YIr(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return GIr(`${e.join(`|`)}#${r}#${n}`)}function eLr(e,t={}){let n=dIr(e);if(n.length<2)return n;let r=XIr(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=ZIr(n,r,i),o=Math.max(0,t.restarts??TLr);for(let e=0;eRH&&l*3>=s?o>0?`bottom`:`top`:s>RH?a>0?`right`:`left`:n}function rLr(e,t){return Math.abs(e.to-t.from)e.isGroup&&!e.parentId);for(let e of u){let t={id:e.id},r=U(e=>{o.set(e.id,t),n.filter(t=>t.parentId===e.id).forEach(r)},`assignLane`);r(e)}let d=n.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=ELr;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=U((e,t,n,r)=>{let i=s.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},s.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=U((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=U((e,t,n)=>p(e,nLr(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=U((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)o||t.from-RH<=r&&t.to+RH>=r&&(a+=v))}else if(i){let r=t.x,i=Math.min(t.y,n.y)-RH,o=Math.max(t.y,n.y)+RH;if(o<=i)return 0;for(let t of h)t.edgeIndex!==e&&t.orientation===`horizontal`&&(t.pipe.coordo||t.from-RH<=r&&t.to+RH>=r&&(a+=v))}return a},`crossingPenalty`),b=i.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=a.get(e.start),r=a.get(e.end),i=o.get(e.start),s=o.get(e.end);return{idx:t,crossLane:i&&s&&i.id!==s.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=U((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(l=>n&&l.nodeId===n||r&&l.nodeId===r?!1:Math.abs(e.x-t.x)>RH?l.minYe.y&&l.maxX>i&&l.minXe.x&&l.maxY>o&&l.minYnLr(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of i.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=a.get(t.start),r=a.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),o=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(o),dxSign:Math.sign(i),dySign:Math.sign(o)})}let E=U(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=U(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=U((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=U(e=>{let t=e==null?void 0:e.shape;return t===`question`||t===`diamond`},`isDiamondNode`),M=new Map;for(let e of T.values())M.has(e.dstId)||M.set(e.dstId,new Set),M.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(a.get(e.srcId)))continue;let t=M.get(e.srcId);if(!(t!=null&&t.has(e.srcSide)))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:o}=e,s=a.get(n),l=a.get(r),u=`${n}:${i}:src`,d=i===`top`||i===`bottom`?l.x??0:l.y??0;S.has(u)||S.set(u,[]),S.get(u).push({edgeIdx:t,oppositeCoord:d});let f=`${r}:${o}:dst`,p=o===`top`||o===`bottom`?s.x??0:s.y??0;S.has(f)||S.set(f,[]),S.get(f).push({edgeIdx:t,oppositeCoord:p})}let N=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],o=n[n.length-1],s=a.get(r);if(!s)continue;let l=i===`left`||i===`right`?s.height??10:s.width??10,u=s.shape,d=u===`question`||u===`diamond`?l*.3:l,f=Math.min(20,Math.max(8,d/(t.length+1))),p=-(f*(t.length-1))/2;for(let[e,n]of t.entries()){let t=p+e*f,r=`${n.edgeIdx}:${o}`;N.set(r,t)}}let P=U(e=>{var t;return!!((t=i[e])!=null&&t.labelNodeId)},`edgeHasLabelNode`),F=U((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>P(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>P(e)):!1,`faceHasLabelNode`),I=U((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),L=U((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=(r==null?void 0:r.srcSide)??w(t,i),s=(r==null?void 0:r.dstSide)??w(n,a),l=r?p(t,r.srcSide):m(t,i,!0),u=r?p(n,r.dstSide):m(n,a,!1),d=N.get(`${e}:src`),f=N.get(`${e}:dst`);return d!==void 0&&(l=I(l,o,d)),f!==void 0&&(u=I(u,s,f)),{pSrcPort:l,pDstPort:u,srcSide:o,dstSide:s}},`portsForEdge`);for(let e of b){let t=i[e];if(g[e]=[],!t.start||!t.end||t.points&&t.points.length>0||t.start===t.end)continue;let n=a.get(t.start),r=a.get(t.end);if(!n||!r)continue;let{pSrcPort:o,pDstPort:u,srcSide:p,dstSide:m}=L(e,n,r),v={...o},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=o.y>(n.y??0)?o.y+HH:o.y-HH:v.x=o.x>(n.x??0)?o.x+HH:o.x-HH,T?b.y=u.y>(r.y??0)?u.y+HH:u.y-HH:b.x=u.x>(r.x??0)?u.x+HH:u.x-HH;let E=U((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+zH:r.minX-zH,y:i?r.maxY+BH:r.minY-BH,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+zH:r.minX-zH,y:o?r.maxY+BH:r.minY-BH,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[t.start,t.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(o,n,r,e,!0);v.x=t.x,v.y=t.y;let i=t.leavesPositiveSide?Math.min(e.minY-2,o.y+HH):Math.max(e.maxY+2,o.y-HH);O=[{x:o.x,y:i},{x:t.x,y:i},{x:t.x,y:t.y}]}else{let t=D(o,n,r,e,!1),i=t.leavesPositiveSide?Math.min(e.minX-2,o.x+HH):Math.max(e.maxX+2,o.x-HH);v.x=t.x,v.y=t.y,O=[{x:i,y:o.y},{x:i,y:t.y},{x:t.x,y:t.y}]}}let j=[],M=E(b,k);if(M.inside&&M.obstacle){let e=M.obstacle;if(T){let t=D(u,r,n,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,r,n,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){var R,ee,te,ne;let n=zH,r=Math.abs(v.x-b.x)1||l>1,f=C.get(t.start??``)??0,g=C.get(t.end??``)??0,y=s>1&&F(t.start,p)||l>1&&F(t.end,m);if((r||i)&&!a&&(!d||d&&!y&&(s<=1||f<=2)&&(l<=1||g<=2))&&!x(o,u,t.start,t.end)){t.points=[{...o},{...v},{...b},{...u}],_.add(e);let n=i?`horizontal`:`vertical`,r=i?o.y:o.x,a=i?Math.min(o.x,u.x):Math.min(o.y,u.y),s=i?Math.max(o.x,u.x):Math.max(o.y,u.y),l={id:`fast-path-${n}-${r.toFixed(0)}-${e}`,orientation:n,coord:r,spanMin:a,spanMax:s,tracks:[]};h.push({edgeIndex:e,segmentIndex:0,orientation:n,pipe:l,trackIndex:0,from:a,to:s});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let P=Math.min(v.x,b.x)-50,I=Math.max(v.x,b.x)+50,z=Math.min(v.y,b.y)-50,re=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(P=Math.min(P,e.minX-VH),I=Math.max(I,e.maxX+VH),z=Math.min(z,e.minY-VH),re=Math.max(re,e.maxY+VH))}for(let e of d){if(e.maxXI||e.maxYre)continue;let t=zH;f(`horizontal`,e.minY-t,P,I),f(`horizontal`,e.maxY+t,P,I);let n=BH;f(`vertical`,e.minX-n,z,re),f(`vertical`,e.maxX+n,z,re)}f(`horizontal`,v.y,P,I),f(`horizontal`,b.y,P,I);let ie=s.filter(e=>e.orientation===`horizontal`&&e.coord>=z&&e.coord<=re),ae=s.filter(e=>e.orientation===`vertical`&&e.coord>=P&&e.coord<=I),oe=U((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),se=oe(v.x,v.y),ce=oe(b.x,b.y),le=new Map,ue=new Map,de=new Map,fe=new Set,pe=[];le.set(se,0),de.set(se,`n`),pe.push({key:se,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),fe.add(se);let me=[],he=U((e,n)=>x(e,n,t.start,t.end),`checkSegmentBlocked`),ge={x:b.x,y:v.y},_e=he(v,ge),ve=he(ge,b),ye=_e||ve,be={x:v.x,y:b.y},xe=he(v,be),Se=he(be,b);if(ye?xe||Se||(me=Math.abs(v.x-b.x)0;){pe.sort((e,t)=>e.f-t.f);let n=pe.shift();if(fe.delete(n.key),n.key===ce){let e=ce,t=b;for(me=[t];ue.has(e);){let n=ue.get(e);me.unshift(n),t=n,e=oe(n.x,n.y)}break}let r=n.pt.x,i=n.pt.y,a=ae.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=ie.sort((e,t)=>e.coord-t.coord),l=s.findIndex(e=>Math.abs(e.coord-i)<1),u=[];o>0&&u.push({x:a[o-1].coord,y:i}),o>=0&&o0&&u.push({x:r,y:s[l-1].coord}),l>=0&&le.nodeId===t.start||e.nodeId===t.end?!1:o===s?e.minXr&&e.maxY>l&&e.minYi&&e.maxX>o&&e.minX10&&S<-5||_<-10&&S>5)&&(h=Math.abs(S)*100),(g>10&&x<-5||g<-10&&x>5)&&(h+=Math.abs(x)*50);let C=0,w=de.get(n.key)??`n`,T=Math.abs(x)>RH?`h`:`v`;w!==`n`&&w!==T&&(C=50);let E=p+m+h+C,D=(le.get(n.key)??1/0)+E,O=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(D<(le.get(f)??1/0)){if(ue.set(f,n.pt),le.set(f,D),de.set(f,T),!fe.has(f))pe.push({key:f,f:D+O,pt:a}),fe.add(f);else{let e=pe.findIndex(e=>e.key===f);e!==-1&&(pe[e].f=D+O)}}}}if(me.length===0&&(me=[v,{x:v.x,y:b.y},b]),me.length>4){let e=me[0],t=me[me.length-1],n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),a=Math.max(e.y,t.y);for(let e of me)n=Math.min(n,e.x),r=Math.max(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.y);let o=r>Math.max(e.x,t.x),s=ne.minXn&&e.minYa);if(s.length>0){let n=Math.max(e.x,t.x);for(let e of s){let t=(e.minX+e.maxX)/2;if(e.visualXHalfExtent===void 0||isNaN(e.visualXHalfExtent))continue;let r=t+e.visualXHalfExtent+i;n=Math.max(n,r)}isNaN(n)||(r=n)}}if(s){let r=d.filter(n=>n.minXMath.min(e.y,t.y));if(r.length>0){let a=Math.min(e.x,t.x);for(let e of r){let t=(e.minX+e.maxX)/2-e.visualXHalfExtent-i;a=Math.min(a,t)}n=a}}}let u=U(n=>{let r=t.y>e.y,i=d.filter(n=>{let r=Math.min(e.x,t.x)n.minX,i=Math.min(e.y,t.y)n.minY;return r&&i}),a=i;if(l&&i.length>0){let e=i.filter(e=>e.minXn);e.length>0&&(a=e)}if(a.length===0)return t.y;let o=zH;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>t.y+RH)return e}return t.y},`findBestReturnY`),f=U(n=>{let r=u(n),i={x:n,y:e.y},a={x:n,y:r},o={x:t.x,y:r},s=he(e,i),l=he(i,a),d=he(a,o),f=r!==t.y&&he(o,t);return!s&&!l&&!d&&!f?Math.abs(r-t.y)=3){let e=Ce[Ce.length-1],t=Ce[Ce.length-2],n=Ce[Ce.length-3],r=Math.abs(n.y-t.y)Math.abs(e.x-n.x)&&Ce.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&Ce.splice(-2,1)}}let we=[Ce[0]];for(let e=1;et.x!=r.x>n.x){we.push(n);continue}}else if(Math.abs(t.x-n.x)t.y!=r.y>n.y){we.push(n);continue}}else we.push(n)}we.push(Ce[Ce.length-1]);for(let t=0;te.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&z(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&z(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),ie=U(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),ae=U((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),oe=U((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&ae(n,t)}},`moveSegmentChainToTrack`),se=U(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&z(e,t)))return n.index;return-1},`findAvailableTrack`),ue=U((e,t)=>{if(e.trackIndex===t.trackIndex)return z(e,t);let n=se(e),r=se(t);return n.some(e=>r.some(t=>ce(e,t)))},`segmentsConflict`),de=U((e,t,n)=>{if(re(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=le(e.pipe,t);n(t,r===-1?ie(e.pipe):r)},`resolveTrackConflict`),fe=U(e=>{let t=0;for(let n=0;n{if(pe.has(e))return pe.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return pe.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return pe.set(e,a),a},`getDestInfo`),he=U(()=>{let e=0,t=new Map;for(let[e,n]of i.entries())g[e].length!==0&&n.start&&(t.has(n.start)||t.set(n.start,[]),t.get(n.start).push(e));let n=U(e=>{let t=i[e];if(!t.start||!t.end)return 0;let n=a.get(t.start),r=a.get(t.end);if(!n||!r)return 0;let o=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(o)+Math.abs(s)},`getEdgeDistance`);for(let r of t.values()){r.sort((e,t)=>{let r=me(e),i=me(t);if(Math.abs(r.deviation-i.deviation)>1)return r.deviation-i.deviation;if(Math.abs(r.dest-i.dest)>1)return r.dest-i.dest;let a=n(e),o=n(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,l=g[t].length;if(s!==l)return s-l;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let t=r.map(e=>h[g[e][0]]);e+=fe(t)}return e},`fixSourceHandleCrossings`),ge=U(()=>{let e=0,t=new Map;for(let[e,n]of i.entries())g[e].length!==0&&n.end&&(t.has(n.end)||t.set(n.end,[]),t.get(n.end).push(e));for(let n of t.values()){n.sort((e,t)=>{let n=U(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),r=n(e),i=n(t);return Math.abs(r-i)>.1?r-i:e-t});let t=n.map(e=>h[g[e][g[e].length-1]]);e+=fe(t)}return e},`fixTargetHandleCrossings`),_e=U(()=>{let e=0;for(let t of s){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(n=>{t.push({edgeIndex:n.edgeIndex,segmentIndex:n.segmentIndex,trackIndex:e.index,from:n.from,to:n.to})})}),t.sort((e,t)=>e.from-t.from);let n=[];if(t.length>0){let e=[t[0]],r=t[0].to;for(let i=1;in.add(e.trackIndex));let r=new Map;t.forEach(e=>{let t=me(e.edgeIndex);r.set(e.trackIndex,(r.get(e.trackIndex)??0)+t.delta)});let i=[...n].filter(e=>(r.get(e)??0)<-1),a=[...n].filter(e=>(r.get(e)??0)>1),o=[...n].filter(e=>Math.abs(r.get(e)??0)<=1);i.sort((e,t)=>(r.get(t)??0)-(r.get(e)??0)),a.sort((e,t)=>(r.get(e)??0)-(r.get(t)??0));let s=U((n,r)=>{t.filter(e=>e.trackIndex===n).forEach(t=>{let n=_.has(t.edgeIndex)?e.coord:r;ye.set(`${t.edgeIndex}-${t.segmentIndex}`,n)})},`assignCoord`),l=0;for(let t of i)l++,s(t,e.coord-l*DLr);if(o.length===0&&n.size>0){let e=[...n].sort((e,t)=>Math.abs(r.get(e)??0)-Math.abs(r.get(t)??0))[0],t=i.indexOf(e);t!==-1&&i.splice(t,1);let s=a.indexOf(e);s!==-1&&a.splice(s,1),o.push(e)}let u=0;for(let t of o){if(u===0)s(t,e.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);s(t,e.coord+n*r*DLr*.5)}u++}let d=0;for(let t of a)d++,s(t,e.coord+d*DLr)}}for(let[e,t]of i.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:o}=L(e,a.get(t.start),a.get(t.end)),s=n.map(e=>{let t=h[e],n=ye.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;eRH&&r.push(wH(t,i)),l&&o.orient===t.orient){if(Math.abs(t.coord-o.coord)>RH){let e=t.orient===`vertical`?(i+o.from)/2:rLr(t,o);r.push(wH(t,e),wH(o,e))}else(e===0||e===s.length-2)&&r.push(wH(t,rLr(t,o)))}else if(l)r.push(wH(t,o.coord));else{let e=Math.abs(t.from-i)RH||Math.abs(l.y-o.y)>RH)&&r.push(o);let u=[];r.length>0&&u.push(r[0]);for(let e=1;eRH||Math.abs(t.y-n.y)>RH)&&u.push(t)}t.points=u}for(let e of i){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}e.edges=(e.edges??[]).filter(e=>!e.isLayoutOnly);let be=U((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,l=r-a/2,u=r+a/2;if(e.xs||e.yu)return e;let d=e.x-o,f=s-e.x,p=e.y-l,m=u-e.y,h=Math.min(d,f,p,m);return h===d?{x:o,y:e.y}:h===f?{x:s,y:e.y}:h===p?{x:e.x,y:l}:{x:e.x,y:u}},`nodeBoundaryClamp`);for(let t of e.edges){let e=t.points;if(!e||e.length<2)continue;let n=t.start,r=t.end,i=n?a.get(n):void 0,o=r?a.get(r):void 0;i&&(e[0]=be(e[0],i)),o&&(e[e.length-1]=be(e[e.length-1],o))}return e}function aLr(e){return e.direction??`TB`}function oLr(e){var t,n,r,i,a;let o=BPr(e),s=((t=e.config.flowchart)==null?void 0:t.nodeSpacing)??40,l=((n=e.config.flowchart)==null?void 0:n.rankSpacing)??100,u=((r=e.config.swimlane)==null?void 0:r.ignoreCrossLaneEdges)??!0,d=((i=e.config.swimlane)==null?void 0:i.optimizeRanksByCrossings)??!0,f=((a=e.config.swimlane)==null?void 0:a.automaticLaneOrdering)??!1,p=aLr(e),{ordered:m,coordinates:h}=tLr(o,{nodeGap:s,layerGap:l,ignoreCrossLaneEdges:u,optimizeRanksByCrossings:d,automaticLaneOrdering:f,direction:p});VPr(o,m,h,{nodeGap:s,layerGap:l});for(let t of e.edges??[])delete t.points;iLr(e,p);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return eIr(e,p),$Fr(e),p}function sLr(e){zPr(e);let t=HPr(e);e.nodes=t.nodes,e.edges=t.edges}var cLr,TH,EH,lLr,uLr,dLr,fLr,pLr,DH,OH,mLr,hLr,kH,AH,gLr,jH,MH,NH,_Lr,PH,vLr,FH,yLr,IH,bLr,xLr,SLr,CLr,LH,wLr,TLr,RH,ELr,zH,BH,VH,HH,DLr,OLr,kLr=o((()=>{Okr(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),cLr=5,TH=1e-5,EH=1e-6,U(KV,`buildSegmentList`),U(wPr,`segmentIntersection`),U(TPr,`isHorizontalSeg`),U(EPr,`findEdgeIntersections`),U(qV,`fmt`),U(JV,`pointToString`),U(DPr,`getArcSweepFlag`),lLr=.001,U(OPr,`applyMarkerOffsets`),U(kPr,`emitJump`),U(APr,`computeRoundedCorner`),U(jPr,`rewriteEdgePath`),U(MPr,`isStraightPath`),U(NPr,`curveSupportsLineHops`),U(PPr,`decodeDataPoints`),U(FPr,`applyLineJumpsToSvg`),U(IPr,`applySwimlaneLineJumps`),uLr=`__swimlane_default__`,dLr=21,fLr=20,U(LPr,`topLaneHorizontalPadding`),U(RPr,`assignTopLaneTitleRect`),U(zPr,`prepareLayoutForSwimlanes`),U(BPr,`toGraphView`),U(VPr,`writeBackToLayoutData`),pLr=`[EdgeLabelNodes]`,U(HPr,`createEdgeLabelNodes`),DH=.001,U(UPr,`measuredNodeRect`),U(WPr,`nodeBoundsInfoFor`),U(YV,`samePoint`),U(XV,`sameX`),U(ZV,`sameY`),U(QV,`isHorizontalSegment`),U($V,`isVerticalSegment`),U(eH,`overlapLength`),U(tH,`sameAxisSegmentOverlapLength`),U(nH,`orthogonalSegmentsForPoints`),U(rH,`countOrthogonalBends`),U(iH,`dedupeConsecutivePoints`),U(GPr,`classifyThreeSegmentRoute`),U(aH,`segmentBoundsOverlapRect`),U(KPr,`pointInsideRect`),U(qPr,`rectContainsRect`),U(oH,`rectsOverlap`),U(JPr,`inflateRect`),U(sH,`rectFromCenterSize`),U(cH,`rectOfNodeBounds`),U(lH,`portForRectSide`),U(YPr,`buildOrthogonalPortPath`),U(XPr,`buildSameSideTrackPath`),U(uH,`collectRealNodeBounds`),U(dH,`collectNodeRectEntries`),U(ZPr,`collectLayoutNodeRects`),U(QPr,`getNodePairGeometry`),U(fH,`segmentHitsAnyRect`),U($Pr,`orthogonalSegmentsCross`),U(eFr,`sameAxisSegmentsOverlap`),U(pH,`segmentConflictsWithAnyEdge`),U(mH,`orthogonalSegmentsStrictlyCross`),U(tFr,`strictlyBetween`),U(nFr,`isCollinearIntermediate`),U(rFr,`simplifyPolylineOnce`),U(hH,`orthogonalizePolyline`),U(gH,`simplifyPolyline`),OH=.001,mLr=.5,hLr=4,U(iFr,`endpointContextFor`),U(aFr,`segmentEnterPoint`),U(oFr,`clipEndpoint`),U(sFr,`clipEdgeEndpointsToNodeBoundaries`),U(cFr,`snapEndpointToBoundary`),U(_H,`firstDistinctAdjacent`),U(vH,`cornerClearanceRange`),U(lFr,`clampToCornerClearance`),U(uFr,`intersectRanges`),U(dFr,`clearanceRangeForSide`),U(fFr,`terminalSideForSegment`),U(yH,`isHorizontalSide`),U(pFr,`straightClearanceRange`),U(mFr,`clearStraightEndpointCornerAxis`),U(hFr,`clearStraightEndpointCornerConnections`),U(gFr,`cornerClearedEndpoint`),U(_Fr,`moveCollinearEndpointRun`),U(vFr,`clearEndpointCornerConnection`),U(yFr,`borderSideForSegment`),U(bFr,`leavesOutward`),U(xFr,`collapseOwnBorderStub`),U(SFr,`snapAndCollapseEndpoints`),U(CFr,`prepareEdgeEndpointsForRenderer`),U(wFr,`buildNodeMap`),U(TFr,`resolveTopLevelGroupId`),U(EFr,`groupDepth`),U(DFr,`boundsForChildren`),U(OFr,`applyGroupBounds`),U(kFr,`recomputeNestedGroupBounds`),U(AFr,`mirrorAxis`),U(jFr,`applyBtDirectionTransform`),U(MFr,`applyLrDirectionTransform`),kH=1e-6,AH=8,gLr=[0,AH,-AH,2*AH,-2*AH],U(NFr,`portSwapToLShape`),U(PFr,`collapseShortTerminalStub`),jH=.001,MH=8,NH=nH,_Lr=U((e,t)=>XV(e,t,jH)||ZV(e,t,jH),`orthogonallyAligned`),U(FFr,`separateSharedRenderedTerminalLanes`),U(IFr,`collapseRedundantRectangularDoglegs`),U(LFr,`liftObstacleHuggingSameSideRails`),U(RFr,`liftTopLaneTitleBandsAboveRails`),U(zFr,`shiftLeftLaneTitleBandsLeftOfRails`),U(BFr,`swapDestinationTerminalTailsToReduceCrossings`),U(VFr,`reassignCrossingExternalRailChannels`),U(HFr,`shortcutRedundantOrthogonalJogs`),U(UFr,`resolveRenderedOrthogonalCrossings`),PH=.001,vLr=8,U(WFr,`simplifyDetouredEdges`),FH=.001,yLr=10,IH=7,U(GFr,`markerClearanceRectFor`),U(KFr,`normalizeRect`),U(qFr,`labelOverlapsOwnMarker`),U(JFr,`anchorLabelsToPolyline`),bLr=1e-6,xLr=4,SLr=3,U(YFr,`pairKey`),U(XFr,`straightenCollinearSiblingDetours`),U(ZFr,`nudgeSharedInteriorSubpaths`),U(QFr,`segmentsIntersect`),U($Fr,`validateSwimlanesLayout`),U(eIr,`postProcessSwimlaneLayout`),U(bH,`normalizeGraph`),U(tIr,`incoming`),U(nIr,`buildSuccessorMap`),U(rIr,`buildSortedSuccessorMap`),U(iIr,`buildInDegreeMap`),U(aIr,`sortedZeroInDegreeNodes`),U(oIr,`buildPredecessorSuccessorMaps`),U(sIr,`buildLayersFromRanks`),U(xH,`topoSortIfAcyclic`),U(SH,`buildLayerIndex`),U(cIr,`countInversions`),U(lIr,`removeCycles_DFS`),U(uIr,`buildTopLaneMap`),U(CH,`createTopLaneResolver`),U(dIr,`buildTopLaneOrder`),U(fIr,`resolveTopLaneOrder`),CLr={EPSILON:1e-6},LH={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},wLr={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40},U(pIr,`buildDrivingTree`),U(mIr,`chooseParent`),U(hIr,`buildAdjacency`),U(gIr,`assignComponents`),U(_Ir,`computeBlocks`),U(vIr,`popBlock`),U(yIr,`computeSubtreeCrossCounts`),U(bIr,`annotateMinimumLayers`),U(xIr,`compareByRankThenId`),U(SIr,`emitNodesInTreeOrder`),U(CIr,`deduplicateLayers`),U(wIr,`createChildOrderer`),U(TIr,`buildMultitreeLayerOrder`),U(EIr,`countCrossingsBetweenAdjacent`),U(DIr,`totalCrossings`),U(OIr,`optimizeRanksByCrossings`),U(kIr,`adjustCrossLaneSources`),U(AIr,`assignLayers_LongestPath`),U(jIr,`assignLayers_Gravity`),U(MIr,`topoSortByGenerationIfAcyclic`),U(NIr,`assignLayers_LaneAwareCompact`),U(PIr,`makeProperLayering`),U(FIr,`median`),U(IIr,`barycenter`),U(LIr,`neighborPositionsFor`),U(RIr,`currentOrderTieBreak`),U(zIr,`countCrossingsBetweenAdjacent`),U(BIr,`sortByHeuristic`),U(VIr,`reorderLayer`),U(HIr,`transposeImprove`),U(UIr,`orderLayers`),U(WIr,`assignCoordinates`),TLr=8,U(GIr,`hashString`),U(KIr,`mulberry32`),U(qIr,`deterministicShuffle`),U(JIr,`sourceDistance`),U(YIr,`laneArrangementCost`),U(XIr,`buildWeightedLaneEdges`),U(ZIr,`greedySwitch`),U(QIr,`isBetterCandidate`),U($Ir,`seedForRestart`),U(eLr,`optimizeTopLaneOrder`),U(tLr,`sugiyamaLayout`),RH=CLr.EPSILON,ELr=8,zH=15,BH=15,VH=25,HH=20,DLr=10,U(nLr,`chooseOrthogonalSide`),U(rLr,`sharedLineEndpointCoord`),U(wH,`pointOnLine`),U(iLr,`routeEdgesOrthogonal`),U(aLr,`getSwimlaneDirection`),U(oLr,`runSwimlaneLayoutCore`),U(sLr,`prepareSwimlaneLayout`),OLr=SV({prepareLayout:sLr,runLayoutCore:oLr,afterPaint:IPr})}));function ALr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function PLr(e,t,n){return(t=VLr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FLr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ILr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function LLr(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RLr(){throw TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KH(e,t){return jLr(e)||ILr(e,t)||HLr(e,t)||LLr()}function zLr(e){return MLr(e)||FLr(e)||HLr(e)||RLr()}function BLr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function VLr(e){var t=BLr(e,`string`);return typeof t==`symbol`?t:t+``}function qH(e){"@babel/helpers - typeof";return qH=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qH(e)}function HLr(e,t){if(e){if(typeof e==`string`)return ALr(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ALr(e,t):void 0}}function JH(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function YH(){if(xVr)return bVr;xVr=1;function e(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}return bVr=e,bVr}function ULr(){return CVr||(CVr=1,SVr=typeof xU==`object`&&xU&&xU.Object===Object&&xU),SVr}function WLr(){if(TVr)return wVr;TVr=1;var e=ULr(),t=typeof self==`object`&&self&&self.Object===Object&&self;return wVr=e||t||Function(`return this`)(),wVr}function GLr(){if(DVr)return EVr;DVr=1;var e=WLr();return EVr=function(){return e.Date.now()},EVr}function KLr(){if(kVr)return OVr;kVr=1;var e=/\s/;function t(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}return OVr=t,OVr}function qLr(){if(jVr)return AVr;jVr=1;var e=KLr(),t=/^\s+/;function n(n){return n&&n.slice(0,e(n)+1).replace(t,``)}return AVr=n,AVr}function JLr(){return NVr||(NVr=1,MVr=WLr().Symbol),MVr}function YLr(){if(FVr)return PVr;FVr=1;var e=JLr(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(e){var t=n.call(e,i),a=e[i];try{e[i]=void 0;var o=!0}catch{}var s=r.call(e);return o&&(t?e[i]=a:delete e[i]),s}return PVr=a,PVr}function XLr(){if(LVr)return IVr;LVr=1;var e=Object.prototype.toString;function t(t){return e.call(t)}return IVr=t,IVr}function ZLr(){if(zVr)return RVr;zVr=1;var e=JLr(),t=YLr(),n=XLr(),r=`[object Null]`,i=`[object Undefined]`,a=e?e.toStringTag:void 0;function o(e){return e==null?e===void 0?i:r:a&&a in Object(e)?t(e):n(e)}return RVr=o,RVr}function QLr(){if(VVr)return BVr;VVr=1;function e(e){return typeof e==`object`&&!!e}return BVr=e,BVr}function XH(){if(UVr)return HVr;UVr=1;var e=ZLr(),t=QLr(),n=`[object Symbol]`;function r(r){return typeof r==`symbol`||t(r)&&e(r)==n}return HVr=r,HVr}function $Lr(){if(GVr)return WVr;GVr=1;var e=qLr(),t=YH(),n=XH(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function l(l){if(typeof l==`number`)return l;if(n(l))return r;if(t(l)){var u=typeof l.valueOf==`function`?l.valueOf():l;l=t(u)?u+``:u}if(typeof l!=`string`)return l===0?l:+l;l=e(l);var d=a.test(l);return d||o.test(l)?s(l.slice(2),d?2:8):i.test(l)?r:+l}return WVr=l,WVr}function eRr(){if(qVr)return KVr;qVr=1;var e=YH(),t=GLr(),n=$Lr(),r=`Expected a function`,i=Math.max,a=Math.min;function o(o,s,l){var u,d,f,p,m,h,g=0,_=!1,v=!1,y=!0;if(typeof o!=`function`)throw TypeError(r);s=n(s)||0,e(l)&&(_=!!l.leading,v=`maxWait`in l,f=v?i(n(l.maxWait)||0,s):f,y=`trailing`in l?!!l.trailing:y);function b(e){var t=u,n=d;return u=d=void 0,g=e,p=o.apply(n,t),p}function x(e){return g=e,m=setTimeout(w,s),_?b(e):p}function S(e){var t=e-h,n=e-g,r=s-t;return v?a(r,f-n):r}function C(e){var t=e-h,n=e-g;return h===void 0||t>=s||t<0||v&&n>=f}function w(){var e=t();if(C(e))return T(e);m=setTimeout(w,S(e))}function T(e){return m=void 0,y&&u?b(e):(u=d=void 0,p)}function E(){m!==void 0&&clearTimeout(m),g=0,u=h=d=m=void 0}function D(){return m===void 0?p:T(t())}function O(){var e=t(),n=C(e);if(u=arguments,d=this,h=e,n){if(m===void 0)return x(h);if(v)return clearTimeout(m),m=setTimeout(w,s),b(h)}return m===void 0&&(m=setTimeout(w,s)),p}return O.cancel=E,O.flush=D,O}return KVr=o,KVr}function tRr(e,t,n,r,i){var a=i*Math.PI/180;return{x:Math.cos(a)*(e-n)-Math.sin(a)*(t-r)+n,y:Math.sin(a)*(e-n)+Math.cos(a)*(t-r)+r}}function nRr(e,t,n){if(n===0)return e;var r=(t.x1+t.x2)/2,i=(t.y1+t.y2)/2,a=t.w/t.h,o=1/a,s=tRr(e.x,e.y,r,i,n),l=rHr(s.x,s.y,r,i,a,o);return{x:l.x,y:l.y}}function rRr(){return wHr||(wHr=1,(function(e,t){(function(){var t,n,r=Math.floor,i,a,o,s,l,u,d=Math.min,f,p,m,h,g;n=function(e,t){return et)},u=function(e,t,i,a,o){var s;if(i??(i=0),o??(o=n),i<0)throw Error(`lo must be non-negative`);for(a??(a=e.length);in;0<=n?t++:t--)u.push(t);return u}).apply(this).reverse(),l=[],a=0,o=s.length;ag;0<=g?++p:--p)_.push(a(e,r));return _},h=function(e,t,r,i){var a,o,s;for(i??(i=n),a=e[r];r>t&&(s=r-1>>1,o=e[s],i(a,o)<0);)e[r]=o,r=s;return e[r]=a},g=function(e,t,r){var i,a,o,s,l;for(r??(r=n),a=e.length,l=t,o=e[t],i=2*t+1;i-1}return FGr=t,FGr}function jRr(){if(RGr)return LGr;RGr=1;var e=DRr();function t(t,n){var r=this.__data__,i=e(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}return LGr=t,LGr}function MRr(){if(BGr)return zGr;BGr=1;var e=TRr(),t=ORr(),n=kRr(),r=ARr(),i=jRr();function a(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&n%1==0&&n0;){var u=i.shift();t(u),a.add(u.id()),o&&r(i,a,u)}return e}function szr(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i0&&arguments[0]!==void 0?arguments[0]:Rqr,t=arguments.length>1?arguments[1]:void 0,n=0;n0?i=o:r=o;while(Math.abs(a)>1e-7&&++s<10);return o}function v(t){for(var r=0,o=1,s=i-1;o!==s&&l[o]<=t;++o)r+=a;--o;var u=(t-l[o])/(l[o+1]-l[o]),d=r+u*a,f=m(d,e,n);return f>=.001?h(t,d):f===0?d:_(t,r,r+a)}var y=!1;function b(){y=!0,(e!==t||n!==r)&&g()}var x=function(i){return y||b(),e===t&&n===r?i:i===0?0:i===1?1:p(v(i),t,r)};x.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var S=`generateBezier(`+[e,t,n,r]+`)`;return x.toString=function(){return S},x}function Czr(e,t,n,r,i){if(r===1||t===n)return n;var a=i(t,n,r);return e==null||((e.roundValue||e.color)&&(a=Math.round(a)),e.min!==void 0&&(a=Math.max(a,e.min)),e.max!==void 0&&(a=Math.min(a,e.max))),a}function wzr(e,t){return e.pfValue!=null||e.value!=null?e.pfValue!=null&&(t==null||t.type.units!==`%`)?e.pfValue:e.value:e}function eU(e,t,n,r,i){var a=i==null?null:i.type;n<0?n=0:n>1&&(n=1);var o=wzr(e,i),s=wzr(t,i);if(dU(o)&&dU(s))return Czr(a,o,s,n,r);if(lU(o)&&lU(s)){for(var l=[],u=0;u0?(f===`spring`&&p.push(o.duration),o.easingImpl=fG[f].apply(null,p)):o.easingImpl=fG[f]}}var m=o.easingImpl,h=o.duration===0?1:(n-l)/o.duration;if(o.applying&&(h=o.progress),h<0?h=0:h>1&&(h=1),o.delay==null){var g=o.startPosition,_=o.position;if(_&&i&&!e.locked()){var v={};tU(g.x,_.x)&&(v.x=eU(g.x,_.x,h,m)),tU(g.y,_.y)&&(v.y=eU(g.y,_.y,h,m)),e.position(v)}var y=o.startPan,b=o.pan,x=a.pan,S=b!=null&&r;S&&(tU(y.x,b.x)&&(x.x=eU(y.x,b.x,h,m)),tU(y.y,b.y)&&(x.y=eU(y.y,b.y,h,m)),e.emit(`pan`));var C=o.startZoom,w=o.zoom,T=w!=null&&r;T&&(tU(C,w)&&(a.zoom=QU(a.minZoom,eU(C,w,h,m),a.maxZoom)),e.emit(`zoom`)),(S||T)&&e.emit(`viewport`);var E=o.style;if(E&&E.length>0&&i){for(var D=0;D=0;t--){var n=e[t];n()}e.splice(0,e.length)},d=a.length-1;d>=0;d--){var f=a[d],p=f._private;p.stopped?(a.splice(d,1),p.hooked=!1,p.playing=!1,p.started=!1,u(p.frames)):(p.playing||p.applying)&&(p.playing&&p.applying&&(p.applying=!1),p.started||Ezr(t,f,e),Tzr(t,f,e,n),p.applying&&(p.applying=!1),u(p.frames),p.step!=null&&p.step(e),f.completed()&&(a.splice(d,1),p.hooked=!1,p.playing=!1,p.started=!1,u(p.completes)),s=!0)}return!n&&a.length===0&&o.length===0&&r.push(t),s}for(var a=!1,o=0;o0?t.notify(`draw`,n):t.notify(`draw`)),n.unmerge(r),t.emit(`step`)}function Ozr(e){this.options=bU({},dJr,fJr,e)}function kzr(e){this.options=bU({},mJr,e)}function Azr(e){this.options=bU({},hJr,e)}function jzr(e){this.options=bU({},_Jr,e),this.options.layout=this;var t=this.options.eles.nodes(),n=this.options.eles.edges().filter(function(e){var n=e.source().data(`id`),r=e.target().data(`id`),i=t.some(function(e){return e.data(`id`)===n}),a=t.some(function(e){return e.data(`id`)===r});return!i||!a});this.options.eles=this.options.eles.not(n)}function Mzr(e){this.options=bU({},LJr,e)}function Nzr(e){this.options=bU({},RJr,e)}function Pzr(e){this.options=bU({},zJr,e)}function Fzr(e){this.options=bU({},BJr,e)}function Izr(e){this.options=e,this.notifications=0}function Lzr(e,t){t.radius===0?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function Rzr(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return r===0||t.radius===0?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(iYr(e,t,n,r,i),{cx:GJr,cy:KJr,radius:RG,startX:ZJr,startY:QJr,stopX:$Jr,stopY:eYr,startAngle:NG.ang+Math.PI/2*FG,endAngle:PG.ang-Math.PI/2*FG,counterClockwise:YJr})}function zzr(e){var t=[];if(e!=null){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:5,o=Math.min(a,r/2,i/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}function Jzr(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw Error(e.getShaderInfoLog(r));return r}function Yzr(e,t,n){var r=Jzr(e,e.VERTEX_SHADER,t),i=Jzr(e,e.FRAGMENT_SHADER,n),a=e.createProgram();if(e.attachShader(a,r),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw Error(`Could not initialize shaders`);return a}function Xzr(e,t,n){n===void 0&&(n=t);var r=e.makeOffscreenCanvas(t,n),i=r.context=r.getContext(`2d`);return r.clear=function(){return i.clearRect(0,0,r.width,r.height)},r.clear(),r}function Zzr(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}function Qzr(e){var t=e.pixelRatio;return e.cy.zoom()*t}function $zr(e,t,n,r,i){var a=r*n+t.x,o=i*n+t.y;return o=Math.round(e.canvasHeight-o),[a,o]}function eBr(e,t){return t.picking?!0:e.pstyle(`background-fill`).value!==`solid`||e.pstyle(`background-image`).strValue!==`none`?!1:e.pstyle(`border-width`).value===0||e.pstyle(`border-opacity`).value===0||e.pstyle(`border-style`).value===`solid`}function tBr(e,t){if(e.length!==t.length)return!1;for(var n=0;n>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}function nBr(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function rBr(e,t){var n=e.createTexture();return n.buffer=function(t){e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},n.deleteTexture=function(){e.deleteTexture(n)},n}function iBr(e,t){switch(t){case`float`:return[1,e.FLOAT,4];case`vec2`:return[2,e.FLOAT,4];case`vec3`:return[3,e.FLOAT,4];case`vec4`:return[4,e.FLOAT,4];case`int`:return[1,e.INT,4];case`ivec2`:return[2,e.INT,4]}}function aBr(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}function oBr(e,t,n,r,i,a){switch(t){case e.FLOAT:return new Float32Array(n.buffer,a*r,i);case e.INT:return new Int32Array(n.buffer,a*r,i)}}function sBr(e,t,n,r){var i=KH(iBr(e,t),2),a=i[0],o=i[1],s=aBr(e,o,r),l=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o===e.FLOAT?e.vertexAttribPointer(n,a,o,!1,0,0):o===e.INT&&e.vertexAttribIPointer(n,a,o,0,0),e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,null),l}function iU(e,t,n,r){var i=KH(iBr(e,n),3),a=i[0],o=i[1],s=i[2],l=aBr(e,o,t*a),u=a*s,d=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),e.bufferData(e.ARRAY_BUFFER,t*u,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),o===e.FLOAT?e.vertexAttribPointer(r,a,o,!1,u,0):o===e.INT&&e.vertexAttribIPointer(r,a,o,u,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var f=Array(t),p=0;pTYr?(xBr(e),t.call(e,n)):(SBr(e),jBr(e,n,dK.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,i){return kBr(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var i=e.notify;e.notify=function(t,n){i.call(e,t,n),t===`viewport`||t===`bounds`?e.pickingFrameBuffer.needsDraw=!0:t===`background`&&e.drawing.invalidate(n,{type:`node-body`})}}function xBr(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function SBr(e){var t=function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function CBr(e){var t=e.canvasWidth,n=e.canvasHeight,r=Zzr(e),i=r.pan,a=r.zoom,o=uBr();pBr(o,o,[i.x,i.y]),hBr(o,o,[a,a]);var s=uBr();gBr(s,t,n);var l=uBr();return fBr(l,s,o),l}function wBr(e,t){var n=e.canvasWidth,r=e.canvasHeight,i=Zzr(e),a=i.pan,o=i.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(a.x,a.y),t.scale(o,o)}function TBr(e,t){e.drawSelectionRectangle(t,function(t){return wBr(e,t)})}function EBr(e){var t=e.data.contexts[e.NODE];t.save(),wBr(e,t),t.strokeStyle=`rgba(0, 0, 0, 0.3)`,t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function DBr(e){var t=function(t,n,r){for(var i=t.atlasManager.getAtlasCollection(n),a=e.data.contexts[e.NODE],o=i.atlases,s=0;s=0&&b.add(S)}return b}function kBr(e,t,n){var r=OBr(e,t,n),i=e.getCachedZSortedEles(),a,o,s=GH(r),l;try{for(s.s();!(l=s.n()).done;){var u=i[l.value];if(!a&&u.isNode()&&(a=u),!o&&u.isEdge()&&(o=u),a&&o)break}}catch(e){s.e(e)}finally{s.f()}return[a,o].filter(Boolean)}function ABr(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,`node-underlay`),r.drawNode(n,t,`node-body`),r.drawTexture(n,t,`label`),r.drawNode(n,t,`node-overlay`)):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,`source`),r.drawEdgeArrow(n,t,`target`),r.drawTexture(n,t,`label`),r.drawTexture(n,t,`edge-source-label`),r.drawTexture(n,t,`edge-target-label`))}function jBr(e,t,n){var r;e.webglDebug&&(r=performance.now());var i=e.drawing,a=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&TBr(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var o=e.data.contexts[e.WEBGL];n.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=CBr(e),l=e.getCachedZSortedEles();if(a=l.length,i.startFrame(s,n),n.screen){for(var u=0;u{for(aU=typeof window>`u`?null:window,BBr=aU?aU.navigator:null,aU&&aU.document,VBr=qH(``),HBr=qH({}),UBr=qH(function(){}),WBr=typeof HTMLElement>`u`?`undefined`:qH(HTMLElement),oU=function(e){return e&&e.instanceString&&cU(e.instanceString)?e.instanceString():null},sU=function(e){return e!=null&&qH(e)==VBr},cU=function(e){return e!=null&&qH(e)===UBr},lU=function(e){return!pU(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},uU=function(e){return e!=null&&qH(e)===HBr&&!lU(e)&&e.constructor===Object},GBr=function(e){return e!=null&&qH(e)===HBr},dU=function(e){return e!=null&&qH(e)===qH(1)&&!isNaN(e)},KBr=function(e){return dU(e)&&Math.floor(e)===e},fU=function(e){if(WBr!==`undefined`)return e!=null&&e instanceof HTMLElement},pU=function(e){return mU(e)||qBr(e)},mU=function(e){return oU(e)===`collection`&&e._private.single},qBr=function(e){return oU(e)===`collection`&&!e._private.single},JBr=function(e){return oU(e)===`core`},YBr=function(e){return oU(e)===`stylesheet`},XBr=function(e){return oU(e)===`event`},hU=function(e){return!!(e==null||e===``||e.match(/^\s+$/))},ZBr=function(e){return typeof HTMLElement>`u`?!1:e instanceof HTMLElement},QBr=function(e){return uU(e)&&dU(e.x1)&&dU(e.x2)&&dU(e.y1)&&dU(e.y2)},$Br=function(e){return GBr(e)&&cU(e.then)},eVr=function(){return BBr&&BBr.userAgent.match(/msie|trident|edge/i)},gU=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return`undefined`;for(var e=[],t=0;tt)},dVr=function(e,t){return-1*uVr(e,t)},bU=Object.assign==null?function(e){for(var t=arguments,n=1;n1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var d=RegExp(`^`+oVr+`$`).exec(e);if(d){if(n=parseInt(d[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,r=parseFloat(d[2]),r<0||r>100||(r/=100,i=parseFloat(d[3]),i<0||i>100)||(i/=100,a=d[4],a!==void 0&&(a=parseFloat(a),a<0||a>1)))return;if(r===0)o=s=l=Math.round(i*255);else{var f=i<.5?i*(1+r):i+r-i*r,p=2*i-f;o=Math.round(255*u(p,f,n+1/3)),s=Math.round(255*u(p,f,n)),l=Math.round(255*u(p,f,n-1/3))}t=[o,s,l,a]}return t},mVr=function(e){var t,n=RegExp(`^`+iVr+`$`).exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if(a[a.length-1]===`%`&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)return;t.push(l)}}return t},hVr=function(e){return _Vr[e.toLowerCase()]},gVr=function(e){return(lU(e)?e:null)||hVr(e)||fVr(e)||mVr(e)||pVr(e)},_Vr={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},vVr=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i1&&arguments[1]!==void 0?arguments[1]:TU,n;n=e.next(),!n.done;)t=t*ZVr+n.value|0;return t},DU=function(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:TU)*ZVr+e|0},OU=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:EU;return(t<<5)+t+e|0},$Vr=function(e,t){return e*2097152+t},kU=function(e){return e[0]*2097152+e[1]},AU=function(e,t){return[DU(e[0],t[0]),OU(e[1],t[1])]},eHr=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return QVr({next:function(){return r=0;r--)e[r]===t&&e.splice(r,1)},_Hr=function(e){e.splice(0,e.length)},vHr=function(e,t){for(var n=0;n`u`?`undefined`:qH(Set))===yHr?bHr:Set,HU=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!JBr(e))NU(`An element must have a core reference and parameters set`);else{var r=t.group;if(r??(r=t.data&&t.data.source!=null&&t.data.target!=null?`edges`:`nodes`),r!==`nodes`&&r!==`edges`)NU("An element must be of type `nodes` or `edges`; you specified `"+r+"`");else{this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0||!!t.grabbable,pannable:t.pannable===void 0?r===`edges`:!!t.pannable,active:!1,classes:new VU,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x??(i.position.x=0),i.position.y??(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];lU(t.classes)?l=t.classes:sU(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,d=l.length;u0;){var S=v.pop(),C=g(S),w=S.id();if(f[w]=C,C!==1/0)for(var T=S.neighborhood().intersect(m),E=0;E0)for(n.unshift(t);d[i];){var a=d[i];n.unshift(a.edge),n.unshift(a.node),r=a.node,i=r.id()}return o.spawn(n)}}}},kHr={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,a=Array(i),o=n,s=function(e){for(var t=0;t0;){if(x(),C++,b===u){for(var w=[],T=i,E=u,D=_[E];w.unshift(T),D!=null&&w.unshift(D),T=g[E],T!=null;)E=T.id(),D=_[E];return{found:!0,distance:d[b],path:this.spawn(w),steps:C}}p[b]=!0;for(var O=y._private.edges,k=0;kE&&(m[T]=E,_[T]=w,v[T]=b),!i){var D=w*u+C;!i&&m[D]>E&&(m[D]=E,_[D]=C,v[D]=b)}}}for(var O=0;O1&&arguments[1]!==void 0?arguments[1]:a,r=y(e),i=[],o=r;;){if(o==null)return t.spawn();var l=v(o),u=l.edge,d=l.pred;if(i.unshift(o[0]),o.same(n)&&i.length>0)break;u!=null&&i.unshift(u),o=d}return s.spawn(i)},S=0;S=0;u--){var d=l[u],f=d[1],p=d[2];(t[f]===o&&t[p]===s||t[f]===s&&t[p]===o)&&l.splice(u,1)}for(var m=0;mr;)t=LHr(Math.floor(Math.random()*t.length),e,t),n--;return t},zHr={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy(function(e){return e.isLoop()});var i=n.length,a=r.length,o=Math.ceil((Math.log(i)/Math.LN2)**2),s=Math.floor(i/IHr);if(i<2)NU(`At least 2 nodes are required for Karger-Stein algorithm`);else{for(var l=[],u=0;u1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=0,i=0,a=t;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;r?e=e.slice(t,n):(n0&&e.splice(0,t));for(var o=0,s=e.length-1;s>=0;s--){var l=e[s];a?isFinite(l)||(e[s]=-1/0,o++):e.splice(s,1)}i&&e.sort(function(e,t){return e-t});var u=e.length,d=Math.floor(u/2);return u%2==0?(e[d-1+o]+e[d+o])/2:e[d+1+o]},KHr=function(e,t){return t===0?e:KHr(t,e%t)},qHr=function(e){for(var t=e[0],n=0;n0&&(t=KHr(t,e[n]));else return 0;return t},JHr=function(e){return Math.PI*e/180},qU=function(e,t){return Math.atan2(t,e)-Math.PI/2},YHr=Math.log2||function(e){return Math.log(e)/Math.log(2)},XHr=function(e){return e>0?1:e<0?-1:0},JU=function(e,t){return Math.sqrt(YU(e,t))},YU=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},ZHr=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},$Hr=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},eUr=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},tUr=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},nUr=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},eW=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},tW=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,r,i,a;if(t.length===1)n=r=i=a=t[0];else if(t.length===2)n=i=t[0],a=r=t[1];else if(t.length===4){var o=KH(t,4);n=o[0],r=o[1],i=o[2],a=o[3]}return e.x1-=a,e.x2+=r,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},rUr=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},iUr=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},nW=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},aUr=function(e,t){return nW(e,t.x,t.y)},oUr=function(e,t){return nW(e,t.x1,t.y1)&&nW(e,t.x2,t.y2)},sUr=Math.hypot??function(e,t){return Math.sqrt(e*e+t*t)},cUr=function(e,t,n,r,i,a,o){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:`auto`,l=s===`auto`?pW(i,a):s,u=i/2,d=a/2;l=Math.min(l,u,d);var f=l!==u,p=l!==d,m;if(f){var h=n-u+l-o,g=r-d-o;if(m=lW(e,t,n,r,h,g,n+u-l+o,g,!1),m.length>0)return m}if(p){var _=n+u+o;if(m=lW(e,t,n,r,_,r-d+l-o,_,r+d-l+o,!1),m.length>0)return m}if(f){var v=n-u+l-o,y=r+d+o;if(m=lW(e,t,n,r,v,y,n+u-l+o,y,!1),m.length>0)return m}if(p){var b=n-u-o;if(m=lW(e,t,n,r,b,r-d+l-o,b,r+d-l+o,!1),m.length>0)return m}var x,S=n-u+l,C=r-d+l;if(x=cW(e,t,n,r,S,C,l+o),x.length>0&&x[0]<=S&&x[1]<=C)return[x[0],x[1]];var w=n+u-l,T=r-d+l;if(x=cW(e,t,n,r,w,T,l+o),x.length>0&&x[0]>=w&&x[1]<=T)return[x[0],x[1]];var E=n+u-l,D=r+d-l;if(x=cW(e,t,n,r,E,D,l+o),x.length>0&&x[0]>=E&&x[1]>=D)return[x[0],x[1]];var O=n-u+l,k=r+d-l;return x=cW(e,t,n,r,O,k,l+o),x.length>0&&x[0]<=O&&x[1]>=k?[x[0],x[1]]:[]},lUr=function(e,t,n,r,i,a,o){var s=o,l=Math.min(n,i),u=Math.max(n,i),d=Math.min(r,a),f=Math.max(r,a);return l-s<=e&&e<=u+s&&d-s<=t&&t<=f+s},uUr=function(e,t,n,r,i,a,o,s,l){var u={x1:Math.min(n,o,i)-l,x2:Math.max(n,o,i)+l,y1:Math.min(r,s,a)-l,y2:Math.max(r,s,a)+l};return!(eu.x2||tu.y2)},dUr=function(e,t,n,r){n-=r;var i=t*t-4*e*n;if(i<0)return[];var a=Math.sqrt(i),o=2*e;return[(-t+a)/o,(-t-a)/o]},fUr=function(e,t,n,r,i){e===0&&(e=1e-5),t/=e,n/=e,r/=e;var a,o=(3*n-t*t)/9,s=-(27*r)+t*(9*n-t*t*2),l,u,d,f,p;s/=54,a=o*o*o+s*s,i[1]=0,f=t/3,a>0?(u=s+Math.sqrt(a),u=u<0?-((-u)**(1/3)):u**(1/3),d=s-Math.sqrt(a),d=d<0?-((-d)**(1/3)):d**(1/3),i[0]=-f+u+d,f+=(u+d)/2,i[4]=i[2]=-f,f=Math.sqrt(3)*(-d+u)/2,i[3]=f,i[5]=-f):(i[5]=i[3]=0,a===0?(p=s<0?-((-s)**(1/3)):s**(1/3),i[0]=-f+2*p,i[4]=i[2]=-(p+f)):(o=-o,l=o*o*o,l=Math.acos(s/Math.sqrt(l)),p=2*Math.sqrt(o),i[0]=-f+p*Math.cos(l/3),i[2]=-f+p*Math.cos((l+2*Math.PI)/3),i[4]=-f+p*Math.cos((l+4*Math.PI)/3)))},pUr=function(e,t,n,r,i,a,o,s){var l=1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,u=9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,d=3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,f=1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,p=[];fUr(l,u,d,f,p);for(var m=1e-7,h=[],g=0;g<6;g+=2)Math.abs(p[g+1])=0&&p[g]<=1&&h.push(p[g]);h.push(1),h.push(0);for(var _=-1,v,y,b,x=0;x=0?b<_&&(_=b):_=b;return _},mUr=function(e,t,n,r,i,a){var o=[e-n,t-r],s=[i-n,a-r],l=s[0]*s[0]+s[1]*s[1],u=o[0]*o[0]+o[1]*o[1],d=o[0]*s[0]+o[1]*s[1],f=d*d/l;return d<0?u:f>l?(e-i)*(e-i)+(t-a)*(t-a):u-f},rW=function(e,t,n){for(var r,i,a,o,s,l=0,u=0;u=e&&e>=a||r<=e&&e<=a)s=(e-r)/(a-r)*(o-i)+i,s>t&&l++;else continue}return l%2!=0},iW=function(e,t,n,r,i,a,o,s,l){var u=Array(n.length),d;s[0]==null?d=s:(d=Math.atan(s[1]/s[0]),s[0]<0?d+=Math.PI/2:d=-d-Math.PI/2);for(var f=Math.cos(-d),p=Math.sin(-d),m=0;m0?aW(oW(u,-l)):u;return rW(e,t,h)},hUr=function(e,t,n,r,i,a,o,s){for(var l=Array(n.length*2),u=0;u=0&&g<=1&&v.push(g),_>=0&&_<=1&&v.push(_),v.length===0)return[];var y=v[0]*s[0]+e,b=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,b]:[y,b,v[1]*s[0]+e,v[1]*s[1]+t]:[y,b]},_Ur=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},lW=function(e,t,n,r,i,a,o,s,l){var u=e-i,d=n-e,f=o-i,p=t-a,m=r-t,h=s-a,g=f*p-h*u,_=d*p-m*u,v=h*d-f*m;if(v!==0){var y=g/v,b=_/v,x=.001,S=0-x,C=1+x;return S<=y&&y<=C&&S<=b&&b<=C||l?[e+y*d,t+y*m]:[]}return g===0||_===0?_Ur(e,n,o)===o?[o,s]:_Ur(e,n,i)===i?[i,a]:_Ur(i,o,n)===n?[n,r]:[]:[]},vUr=function(e,t,n,r,i){var a=[],o=r/2,s=i/2,l=t,u=n;a.push({x:l+o*e[0],y:u+s*e[1]});for(var d=1;d0?aW(oW(d,-s)):d}else p=n;for(var h,g,_,v,y=0;y2){for(var m=[u[0],u[1]],h=(m[0]-e)**2+(m[1]-t)**2,g=1;gu&&(u=t)},get:function(e){return l[e]}},f=0;f0?y.edgesTo(v)[0]:v.edgesTo(y)[0];var x=r(b);v=v.id(),u[v]>u[h]+x&&(u[v]=u[h]+x,f.nodes.indexOf(v)<0?f.push(v):f.updateItem(v),l[v]=0,n[v]=[]),u[v]==u[h]+x&&(l[v]=l[v]+l[h],n[v].push(h))}else for(var S=0;S0;){for(var E=t.pop(),D=0;D0&&o.push(n[s]);o.length!==0&&i.push(r.collection(o))}return i},HUr=function(e,t){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:KUr,o=r,s,l,u=0;u=2?gW(e,t,n,0,YUr,XUr):gW(e,t,n,0,JUr)},squaredEuclidean:function(e,t,n){return gW(e,t,n,0,YUr)},manhattan:function(e,t,n){return gW(e,t,n,0,JUr)},max:function(e,t,n){return gW(e,t,n,-1/0,ZUr)}},_W[`squared-euclidean`]=_W.squaredEuclidean,_W.squaredeuclidean=_W.squaredEuclidean,QUr=IU({k:2,m:2,sensitivityThreshold:1e-4,distance:`euclidean`,maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),$Ur=function(e){return QUr(e)},vW=function(e,t,n,r,i){var a=i===`kMedoids`?function(e){return r[e](n)}:function(e){return n[e]},o=function(e){return r[e](t)},s=n,l=t;return cRr(e,r.length,a,o,s,l)},eWr=function(e,t,n){for(var r=n.length,i=Array(r),a=Array(r),o=Array(t),s=null,l=0;ln)return!1;return!0},aWr=function(e,t,n){for(var r=0;ro&&(o=t[l][u],s=u);i[s].push(e[l])}for(var d=0;d=i.threshold||i.mode===`dendrogram`&&e.length===1)return!1;var m=t[a],h=t[r[a]],g=i.mode===`dendrogram`?{left:m,right:h,key:m.key}:{value:m.value.concat(h.value),key:m.key};e[m.index]=g,e.splice(h.index,1),t[m.key]=g;for(var _=0;_n[h.key][v.key]&&(s=n[h.key][v.key])):i.linkage===`max`?(s=n[m.key][v.key],n[m.key][v.key]0&&r.push(i);return r},OWr=function(e,t,n){for(var r=[],i=0;io&&(a=l,o=t[i*e+l])}a>0&&r.push(a)}for(var u=0;ul&&(s=u,l=d)}n[i]=a[s]}return r=OWr(e,t,n),r},AWr=function(e){for(var t=this.cy(),n=this.nodes(),r=wWr(e),i={},a=0;a=D?(O=D,D=A,k=j):A>O&&(O=A);for(var M=0;M0);C[T%r.minIterations*o+R]=ee,L+=ee}if(L>0&&(T>=r.minIterations-1||T==r.maxIterations-1)){for(var te=0,ne=0;ne1||i>1)&&(o=!0),d[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&d[t].push(e.id())})}else f[t]=[void 0,e.target().id()]}):a.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(s?l?o=!0:l=t:s=t),d[t]=[],e.connectedEdges().forEach(function(e){return d[t].push(e.id())})):f[t]=[e.source().id(),e.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(l&&s){if(i){if(u&&l!=u)return p;u=l}else if(u&&l!=u&&s!=u)return p;else u||(u=l)}else u||(u=a[0].id());var m=function(e){for(var t=e,n=[e],r,a,o;d[t].length;)r=d[t].shift(),a=f[r][0],o=f[r][1],t==o?!i&&t!=a&&(d[a]=d[a].filter(function(e){return e!=r}),t=a):(d[o]=d[o].filter(function(e){return e!=r}),t=o),n.unshift(r),n.unshift(t);return n},h=[],g=[];for(g=m(u);g.length!=1;)d[g[0]].length==0?(h.unshift(a.getElementById(g.shift())),h.unshift(a.getElementById(g.shift()))):g=m(g.shift()).concat(g);for(var _ in h.unshift(a.getElementById(g.shift())),d)if(d[_].length)return p;return p.found=!0,p.trail=this.spawn(h,!0),p}},bW=function(){var e=this,t={},n=0,r=0,i=[],a=[],o={},s=function(n,r){for(var o=a.length-1,s=[],l=e.spawn();a[o].x!=n||a[o].y!=r;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach(function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach(function(n){var r=n.id(),i=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(i.filter(function(e){return e.isLoop()})):l.merge(i)})}),i.push(l)},l=function(u,d,f){u===f&&(r+=1),t[d]={id:n,low:n++,cutVertex:!1};var p=e.getElementById(d).connectedEdges().intersection(e);if(p.size()===0)i.push(e.spawn(e.getElementById(d)));else{var m,h,g,_;p.forEach(function(e){m=e.source().id(),h=e.target().id(),g=m===d?h:m,g!==f&&(_=e.id(),o[_]||(o[_]=!0,a.push({x:d,y:g,edge:e})),g in t?t[d].low=Math.min(t[d].low,t[g].id):(l(u,g,d),t[d].low=Math.min(t[d].low,t[g].low),t[d].id<=t[g].low&&(t[d].cutVertex=!0,s(d,g))))})}};e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||(r=0,l(n,n),t[n].cutVertex=r>1)}});var u=Object.keys(t).filter(function(e){return t[e].cutVertex}).map(function(t){return e.getElementById(t)});return{cut:e.spawn(u),components:i}},PWr={hopcroftTarjanBiconnected:bW,htbc:bW,htb:bW,hopcroftTarjanBiconnectedComponents:bW},xW=function(){var e=this,t={},n=0,r=[],i=[],a=e.spawn(e),o=function(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach(function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))}),t[s].index===t[s].low){for(var l=e.spawn();;){var u=i.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var d=l.edgesWith(l),f=l.merge(d);r.push(f),a=a.difference(f)}};return e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||o(n)}}),{cut:a,components:r}},FWr={tarjanStronglyConnected:xW,tsc:xW,tscc:xW,tarjanStronglyConnectedComponents:xW},IWr={},[UU,OHr,kHr,jHr,NHr,FHr,zHr,DUr,mW,hW,jUr,GUr,mWr,SWr,jWr,NWr,PWr,FWr].forEach(function(e){bU(IWr,e)}),LWr=0,RWr=1,zWr=2,SW=function(e){if(!(this instanceof SW))return new SW(e);this.id=`Thenable/1.0.7`,this.state=LWr,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e==`function`&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},SW.prototype={fulfill:function(e){return BWr(this,RWr,`fulfillValue`,e)},reject:function(e){return BWr(this,zWr,`rejectReason`,e)},then:function(e,t){var n=this,r=new SW;return n.onFulfilled.push(UWr(e,r,`fulfill`)),n.onRejected.push(UWr(t,r,`reject`)),VWr(n),r.proxy}},BWr=function(e,t,n,r){return e.state===LWr&&(e.state=t,e[n]=r,VWr(e)),e},VWr=function(e){e.state===RWr?HWr(e,`onFulfilled`,e.fulfillValue):e.state===zWr&&HWr(e,`onRejected`,e.rejectReason)},HWr=function(e,t,n){if(e[t].length!==0){var r=e[t];e[t]=[];var i=function(){for(var e=0;e0}},clearQueue:function(){return function(){var e=this,t=e.length===void 0?[e]:e;if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n0&&this.spawn(r).updateStyle().emit(`class`),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){lU(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=t===void 0,i=[],a=0,o=n.length;a0&&this.spawn(i).updateStyle().emit(`class`),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(t==null)t=250;else if(t===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}},EW.className=EW.classNames=EW.classes,DW={metaChar:`[\\!\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\\`\\{\\|\\}\\~]`,comparatorOp:`=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=`,boolOp:`\\?|\\!|\\^`,string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:yU,meta:`degree|indegree|outdegree`,separator:`\\s*,\\s*`,descendant:`\\s+`,child:`\\s+>\\s+`,subject:`\\$`,group:`node|edge|\\*`,directedEdge:`\\s+->\\s+`,undirectedEdge:`\\s+<->\\s+`},DW.variable=`(?:[\\w-.]|(?:\\\\`+DW.metaChar+`))+`,DW.className=`(?:[\\w-]|(?:\\\\`+DW.metaChar+`))+`,DW.value=DW.string+`|`+DW.number,DW.id=DW.variable,(function(){for(var e=DW.comparatorOp.split(`|`),t,n=0;n=0)&&t!==`=`&&(DW.comparatorOp+=`|\\!`+t)})(),OW=function(){return{checks:[]}},kW={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},qKr=[{selector:`:selected`,matches:function(e){return e.selected()}},{selector:`:unselected`,matches:function(e){return!e.selected()}},{selector:`:selectable`,matches:function(e){return e.selectable()}},{selector:`:unselectable`,matches:function(e){return!e.selectable()}},{selector:`:locked`,matches:function(e){return e.locked()}},{selector:`:unlocked`,matches:function(e){return!e.locked()}},{selector:`:visible`,matches:function(e){return e.visible()}},{selector:`:hidden`,matches:function(e){return!e.visible()}},{selector:`:transparent`,matches:function(e){return e.transparent()}},{selector:`:grabbed`,matches:function(e){return e.grabbed()}},{selector:`:free`,matches:function(e){return!e.grabbed()}},{selector:`:removed`,matches:function(e){return e.removed()}},{selector:`:inside`,matches:function(e){return!e.removed()}},{selector:`:grabbable`,matches:function(e){return e.grabbable()}},{selector:`:ungrabbable`,matches:function(e){return!e.grabbable()}},{selector:`:animated`,matches:function(e){return e.animated()}},{selector:`:unanimated`,matches:function(e){return!e.animated()}},{selector:`:parent`,matches:function(e){return e.isParent()}},{selector:`:childless`,matches:function(e){return e.isChildless()}},{selector:`:child`,matches:function(e){return e.isChild()}},{selector:`:orphan`,matches:function(e){return e.isOrphan()}},{selector:`:nonorphan`,matches:function(e){return e.isChild()}},{selector:`:compound`,matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:`:loop`,matches:function(e){return e.isLoop()}},{selector:`:simple`,matches:function(e){return e.isSimple()}},{selector:`:active`,matches:function(e){return e.active()}},{selector:`:inactive`,matches:function(e){return!e.active()}},{selector:`:backgrounding`,matches:function(e){return e.backgrounding()}},{selector:`:nonbackgrounding`,matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return dVr(e.selector,t.selector)}),JKr=function(){for(var e={},t,n=0;n0&&u.edgeCount>0)return PU("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return PU("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;u.edgeCount===1&&PU("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(e){return e??``},t=function(t){return sU(t)?`"`+t+`"`:e(t)},n=function(e){return` `+e+` `},r=function(r,a){var o=r.type,s=r.value;switch(o){case kW.GROUP:var l=e(s);return l.substring(0,l.length-1);case kW.DATA_COMPARE:var u=r.field,d=r.operator;return`[`+u+n(e(d))+t(s)+`]`;case kW.DATA_BOOL:var f=r.operator,p=r.field;return`[`+e(f)+p+`]`;case kW.DATA_EXIST:return`[`+r.field+`]`;case kW.META_COMPARE:var m=r.operator;return`[[`+r.field+n(e(m))+t(s)+`]]`;case kW.STATE:return s;case kW.ID:return`#`+s;case kW.CLASS:return`.`+s;case kW.PARENT:case kW.CHILD:return i(r.parent,a)+n(`>`)+i(r.child,a);case kW.ANCESTOR:case kW.DESCENDANT:return i(r.ancestor,a)+` `+i(r.descendant,a);case kW.COMPOUND_SPLIT:var h=i(r.left,a),g=i(r.subject,a),_=i(r.right,a);return h+(h.length>0?` `:``)+g+_;case kW.TRUE:return``}},i=function(e,t){return e.checks.reduce(function(n,i,a){return n+(t===e&&a===0?`$`:``)+r(i,t)},``)},a=``,o=0;o1&&o=0&&(t=t.replace(`!`,``),d=!0),t.indexOf(`@`)>=0&&(t=t.replace(`@`,``),u=!0),(i||o||u)&&(s=!i&&!a?``:``+e,l=``+n),u&&(e=s=s.toLowerCase(),n=l=l.toLowerCase()),t){case`*=`:r=s.indexOf(l)>=0;break;case`$=`:r=s.indexOf(l,s.length-l.length)>=0;break;case`^=`:r=s.indexOf(l)===0;break;case`=`:r=e===n;break;case`>`:f=!0,r=e>n;break;case`>=`:f=!0,r=e>=n;break;case`<`:f=!0,r=e1&&arguments[1]!==void 0?arguments[1]:!0;return ozr(this,e,t,szr)},RW.forEachUp=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return ozr(this,e,t,czr)},RW.forEachUpAndDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return ozr(this,e,t,lzr)},RW.ancestors=RW.parents,zW=sqr={data:TW.data({field:`data`,bindingEvent:`data`,allowBinding:!0,allowSetting:!0,settingEvent:`data`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:TW.removeData({field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:TW.data({field:`scratch`,bindingEvent:`scratch`,allowBinding:!0,allowSetting:!0,settingEvent:`scratch`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeScratch:TW.removeData({field:`scratch`,event:`scratch`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0}),rscratch:TW.data({field:`rscratch`,allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:TW.removeData({field:`rscratch`,triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},zW.attr=zW.data,zW.removeAttr=zW.removeData,cqr=sqr,BW={},bU(BW,{degree:uzr(function(e,t){return t.source().same(t.target())?2:1}),indegree:uzr(function(e,t){return+!!t.target().same(e)}),outdegree:uzr(function(e,t){return+!!t.source().same(e)})}),bU(BW,{minDegree:ZH(`degree`,function(e,t){return et}),minIndegree:ZH(`indegree`,function(e,t){return et}),minOutdegree:ZH(`outdegree`,function(e,t){return et})}),bU(BW,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,f=d;d&&(u=u[0]);var p=f?u.position():{x:0,y:0};t===void 0?i!==void 0&&l.position({x:i.x+p.x,y:i.y+p.y}):l.position(e,t+p[e])}else{var m=n.position(),h=o?n.parent():null,g=h&&h.length>0,_=g;g&&(h=h[0]);var v=_?h.position():{x:0,y:0};return i={x:m.x-v.x,y:m.y-v.y},e===void 0?i:i[e]}}else if(!a)return;return this}},VW.modelPosition=VW.point=VW.position,VW.modelPositions=VW.points=VW.positions,VW.renderedPoint=VW.renderedPosition,VW.relativePoint=VW.relativePosition,fqr=lqr,HW=function(e){switch(e){case`left`:case`right-inside`:return`left`;case`right`:case`left-inside`:return`right`;default:return`center`}},UW=function(e){switch(e){case`top`:case`bottom-inside`:return`top`;case`bottom`:case`top-inside`:return`bottom`;default:return`center`}},pqr=function(e){switch(e){case`left`:return`right`;case`right`:return`left`;case`left-inside`:return`left`;case`right-inside`:return`right`;default:return`center`}},WW=GW={},GW.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},GW.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.cy();return!t.styleEnabled()||!t.hasCompoundNodes()||this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify(`bounds`)}}),this},GW.updateCompoundBounds=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes()||!e&&t.batching())return this;function n(e){if(!e.isParent())return;var t=e._private,n=e.children(),r=e.pstyle(`compound-sizing-wrt-labels`).value===`include`,i={width:{val:e.pstyle(`min-width`).pfValue,left:e.pstyle(`min-width-bias-left`),right:e.pstyle(`min-width-bias-right`)},height:{val:e.pstyle(`min-height`).pfValue,top:e.pstyle(`min-height-bias-top`),bottom:e.pstyle(`min-height-bias-bottom`)}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;(a.w===0||a.h===0)&&(a={w:e.pstyle(`width`).pfValue,h:e.pstyle(`height`).pfValue},a.x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);function s(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}function l(e,t,n,r){if(n.units===`%`)switch(r){case`width`:return e>0?n.pfValue*e:0;case`height`:return t>0?n.pfValue*t:0;case`average`:return e>0&&t>0?n.pfValue*(e+t)/2:0;case`min`:return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case`max`:return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}else if(n.units===`px`)return n.pfValue;else return 0}var u=i.width.left.value;i.width.left.units===`px`&&i.width.val>0&&(u=u*100/i.width.val);var d=i.width.right.value;i.width.right.units===`px`&&i.width.val>0&&(d=d*100/i.width.val);var f=i.height.top.value;i.height.top.units===`px`&&i.height.val>0&&(f=f*100/i.height.val);var p=i.height.bottom.value;i.height.bottom.units===`px`&&i.height.val>0&&(p=p*100/i.height.val);var m=s(i.width.val-a.w,u,d),h=m.biasDiff,g=m.biasComplementDiff,_=s(i.height.val-a.h,f,p),v=_.biasDiff,y=_.biasComplementDiff;t.autoPadding=l(a.w,a.h,e.pstyle(`padding`),e.pstyle(`padding-relative-to`).value),t.autoWidth=Math.max(a.w,i.width.val),o.x=(-h+a.x1+a.x2+g)/2,t.autoHeight=Math.max(a.h,i.height.val),o.y=(-v+a.y1+a.y2+y)/2}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},JW=function(e,t){return t==null?e:qW(e,t.x1,t.y1,t.x2,t.y2)},YW=function(e,t,n){return RU(e,t,n)},XW=function(e,t,n){if(!t.cy().headless()){var r=t._private,i=r.rstyle,a=i.arrowWidth/2,o=t.pstyle(n+`-arrow-shape`).value,s,l;if(o!==`none`){n===`source`?(s=i.srcX,l=i.srcY):n===`target`?(s=i.tgtX,l=i.tgtY):(s=i.midX,l=i.midY);var u=r.arrowBounds=r.arrowBounds||{},d=u[n]=u[n]||{};d.x1=s-a,d.y1=l-a,d.x2=s+a,d.y2=l+a,d.w=d.x2-d.x1,d.h=d.y2-d.y1,eW(d,1),qW(e,d.x1,d.y1,d.x2,d.y2)}}},mqr=function(e,t,n){if(!t.cy().headless()){var r=n?n+`-`:``,i=t._private,a=i.rstyle;if(t.pstyle(r+`label`).strValue){var o=t.pstyle(`text-halign`),s=t.pstyle(`text-valign`),l=YW(a,`labelWidth`,n),u=YW(a,`labelHeight`,n),d=YW(a,`labelX`,n),f=YW(a,`labelY`,n),p=t.pstyle(r+`text-margin-x`).pfValue,m=t.pstyle(r+`text-margin-y`).pfValue,h=t.isEdge(),g=t.pstyle(r+`text-rotation`),_=t.pstyle(`text-outline-width`).pfValue,v=t.pstyle(`text-border-width`).pfValue/2,y=t.pstyle(`text-background-padding`).pfValue,b=2,x=u,S=l,C=S/2,w=x/2,T,E,D,O;if(h)T=d-C,E=d+C,D=f-w,O=f+w;else{switch(HW(o.value)){case`left`:T=d-S,E=d;break;case`center`:T=d-C,E=d+C;break;case`right`:T=d,E=d+S}switch(UW(s.value)){case`top`:D=f-x,O=f;break;case`center`:D=f-w,O=f+w;break;case`bottom`:D=f,O=f+x}}var k=p-Math.max(_,v)-y-b,A=p+Math.max(_,v)+y+b,j=m-Math.max(_,v)-y-b,M=m+Math.max(_,v)+y+b;T+=k,E+=A,D+=j,O+=M;var N=n||`main`,P=i.labelBounds,F=P[N]=P[N]||{};F.x1=T,F.y1=D,F.x2=E,F.y2=O,F.w=E-T,F.h=O-D,F.leftPad=k,F.rightPad=A,F.topPad=j,F.botPad=M;var I=h&&g.strValue===`autorotate`,L=g.pfValue!=null&&g.pfValue!==0;if(I||L){var R=I?YW(i.rstyle,`labelAngle`,n):g.pfValue,ee=Math.cos(R),te=Math.sin(R),ne=(T+E)/2,z=(D+O)/2;if(!h){switch(HW(o.value)){case`left`:ne=E;break;case`right`:ne=T}switch(UW(s.value)){case`top`:z=O;break;case`bottom`:z=D}}var re=function(e,t){return e-=ne,t-=z,{x:e*ee-t*te+ne,y:e*te+t*ee+z}},ie=re(T,D),ae=re(T,O),oe=re(E,D),se=re(E,O);T=Math.min(ie.x,ae.x,oe.x,se.x),E=Math.max(ie.x,ae.x,oe.x,se.x),D=Math.min(ie.y,ae.y,oe.y,se.y),O=Math.max(ie.y,ae.y,oe.y,se.y)}var ce=N+`Rot`,le=P[ce]=P[ce]||{};le.x1=T,le.y1=D,le.x2=E,le.y2=O,le.w=E-T,le.h=O-D,qW(e,T,D,E,O),qW(i.labelBounds.all,T,D,E,O)}return e}},hqr=function(e,t){if(!t.cy().headless()){var n=t.pstyle(`outline-opacity`).value,r=t.pstyle(`outline-width`).value+t.pstyle(`outline-offset`).value;gqr(e,t,n,r,`outside`,r/2)}},gqr=function(e,t,n,r,i,a){if(!(n===0||r<=0||i===`inside`)){var o=t.cy().renderer(),s=o.nodeShapes[o.getNodeShape(t)];if(s){var l=t.position(),u=l.x,d=l.y,f=t.width(),p=t.height();s.hasMiterBounds?(i===`center`&&(r/=2),JW(e,s.miterBounds(u,d,f,p,r))):a!=null&&a>0&&tW(e,[a,a,a,a])}}},_qr=function(e,t){if(!t.cy().headless()){var n=t.pstyle(`border-opacity`).value,r=t.pstyle(`border-width`).pfValue,i=t.pstyle(`border-position`).value;gqr(e,t,n,r,i)}},vqr=function(e,t){var n=e._private.cy,r=n.styleEnabled(),i=n.headless(),a=$U(),o=e._private,s=e.isNode(),l=e.isEdge(),u,d,f,p,m,h,g=o.rstyle,_=s&&r?e.pstyle(`bounds-expansion`).pfValue:[0],v=function(e){return e.pstyle(`display`).value!==`none`},y=!r||v(e)&&(!l||v(e.source())&&v(e.target()));if(y){var b=0,x=0;r&&t.includeOverlays&&(b=e.pstyle(`overlay-opacity`).value,b!==0&&(x=e.pstyle(`overlay-padding`).value));var S=0,C=0;r&&t.includeUnderlays&&(S=e.pstyle(`underlay-opacity`).value,S!==0&&(C=e.pstyle(`underlay-padding`).value));var w=Math.max(x,C),T=0,E=0;if(r&&(T=e.pstyle(`width`).pfValue,E=T/2),s&&t.includeNodes){var D=e.position();m=D.x,h=D.y;var O=e.outerWidth()/2,k=e.outerHeight()/2;u=m-O,d=m+O,f=h-k,p=h+k,qW(a,u,f,d,p),r&&hqr(a,e),r&&t.includeOutlines&&!i&&hqr(a,e),r&&_qr(a,e)}else if(l&&t.includeEdges){if(r&&!i){var A=e.pstyle(`curve-style`).strValue;if(u=Math.min(g.srcX,g.midX,g.tgtX),d=Math.max(g.srcX,g.midX,g.tgtX),f=Math.min(g.srcY,g.midY,g.tgtY),p=Math.max(g.srcY,g.midY,g.tgtY),u-=E,d+=E,f-=E,p+=E,qW(a,u,f,d,p),A===`haystack`){var j=g.haystackPts;if(j&&j.length===2){if(u=j[0].x,f=j[0].y,d=j[1].x,p=j[1].y,u>d){var M=u;u=d,d=M}if(f>p){var N=f;f=p,p=N}qW(a,u-E,f-E,d+E,p+E)}}else if(A===`bezier`||A===`unbundled-bezier`||vU(A,`segments`)||vU(A,`taxi`)){var P;switch(A){case`bezier`:case`unbundled-bezier`:P=g.bezierPts;break;case`segments`:case`taxi`:case`round-segments`:case`round-taxi`:P=g.linePts}if(P!=null)for(var F=0;Fd){var ee=u;u=d,d=ee}if(f>p){var te=f;f=p,p=te}u-=E,d+=E,f-=E,p+=E,qW(a,u,f,d,p)}}if(r&&t.includeEdges&&l&&(XW(a,e,`mid-source`),XW(a,e,`mid-target`),XW(a,e,`source`),XW(a,e,`target`)),r&&e.pstyle(`ghost`).value===`yes`){var ne=e.pstyle(`ghost-offset-x`).pfValue,z=e.pstyle(`ghost-offset-y`).pfValue;qW(a,a.x1+ne,a.y1+z,a.x2+ne,a.y2+z)}var re=o.bodyBounds=o.bodyBounds||{};rUr(re,a),tW(re,_),eW(re,1),r&&(u=a.x1,d=a.x2,f=a.y1,p=a.y2,qW(a,u-w,f-w,d+w,p+w));var ie=o.overlayBounds=o.overlayBounds||{};rUr(ie,a),tW(ie,_),eW(ie,1);var ae=o.labelBounds=o.labelBounds||{};ae.all==null?ae.all=$U():eUr(ae.all),r&&t.includeLabels&&(t.includeMainLabels&&mqr(a,e,null),l&&(t.includeSourceLabels&&mqr(a,e,`source`),t.includeTargetLabels&&mqr(a,e,`target`)))}return a.x1=KW(a.x1),a.y1=KW(a.y1),a.x2=KW(a.x2),a.y2=KW(a.y2),a.w=KW(a.x2-a.x1),a.h=KW(a.y2-a.y1),a.w>0&&a.h>0&&y&&(tW(a,_),eW(a,1)),a},yqr=function(e){var t=0,n=function(e){return+!!e<=0;s--)o(s);return this},eG.removeAllListeners=function(){return this.removeListener(`*`)},eG.emit=eG.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,lU(t)||(t=[t]),Vqr(this,function(e,a){n!=null&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var o=function(){var n=r[s];if(n.type===a.type&&(!n.namespace||n.namespace===a.namespace||n.namespace===Fqr)&&e.eventMatches(e.context,n,a)){var i=[a];t!=null&&vHr(i,t),e.beforeEmit(e.context,n,a),n.conf&&n.conf.one&&(e.listeners=e.listeners.filter(function(e){return e!==n}));var o=e.callbackContext(e.context,n,a),l=n.callback.apply(o,i);e.afterEmit(e.context,n,a),l===!1&&(a.stopPropagation(),a.preventDefault())}},s=0;s1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&sU(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--){var n=this[t];e(n)&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,i=0;in&&(n=s,r=o)}return{value:n,ele:r}},min:function(e,t){for(var n=1/0,r,i=this,a=0;a=0&&i`u`?`undefined`:qH(Symbol))!=e&&qH(Symbol.iterator)!=e&&(rG[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},n=0,r=this.length;return PLr({next:function(){return n1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],r=n.cy();if(r.styleEnabled()&&n)return n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n)),n._private.style[e]??(t?r.style().getDefaultProperty(e):null)},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return n.pfValue===void 0?n.value:n.pfValue}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];if(n)return t.style().getRenderedStyle(n,e)},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(uU(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify(`style`)}else if(sU(e)){if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}i.applyBypass(this,e,t,r),this.emitAndNotify(`style`)}else if(e===void 0){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(e===void 0)for(var a=0;a0&&t.push(d[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},`neighborhood`),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),cG.neighbourhood=cG.neighborhood,cG.closedNeighbourhood=cG.closedNeighborhood,cG.openNeighbourhood=cG.openNeighborhood,bU(cG,{source:LW(function(e){var t=this[0],n;return t&&(n=t._private.source||t.cy().collection()),n&&e?n.filter(e):n},`source`),target:LW(function(e){var t=this[0],n;return t&&(n=t._private.target||t.cy().collection()),n&&e?n.filter(e):n},`target`),sources:yzr({attr:`source`}),targets:yzr({attr:`target`})}),bU(cG,{edgesWith:LW(bzr(),`edgesWith`),edgesTo:LW(bzr({thisIsSrc:!0}),`edgesTo`)}),bU(cG,{connectedEdges:LW(function(e){for(var t=[],n=this,r=0;r0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),cG.componentsOf=cG.components,lG=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(e===void 0)NU(`A collection must have a reference to the core`);else{var i=new BU,a=!1;if(!t)t=[];else if(t.length>0&&uU(t[0])&&!mU(t[0])){a=!0;for(var o=[],s=new VU,l=0,u=t.length;l0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this,r=n.cy(),i=r._private,a=[],o=[],s,l=0,u=n.length;l0){for(var F=s.length===n.length?n:new lG(r,s),I=0;I0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this,r=[],i={},a=n._private.cy;function o(e){for(var t=e._private.edges,n=0;n0&&(e?D.emitAndNotify(`remove`):t&&D.emit(`remove`));for(var O=0;Ol&&Math.abs(p.v)>l;);return d?function(e){return o[e*(o.length-1)|0]}:s}}(),dG=function(e,t,n,r){var i=Szr(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},fG={linear:function(e,t,n){return e+(t-e)*n},ease:dG(.25,.1,.25,1),"ease-in":dG(.42,0,1,1),"ease-out":dG(0,0,.58,1),"ease-in-out":dG(.42,0,.58,1),"ease-in-sine":dG(.47,0,.745,.715),"ease-out-sine":dG(.39,.575,.565,1),"ease-in-out-sine":dG(.445,.05,.55,.95),"ease-in-quad":dG(.55,.085,.68,.53),"ease-out-quad":dG(.25,.46,.45,.94),"ease-in-out-quad":dG(.455,.03,.515,.955),"ease-in-cubic":dG(.55,.055,.675,.19),"ease-out-cubic":dG(.215,.61,.355,1),"ease-in-out-cubic":dG(.645,.045,.355,1),"ease-in-quart":dG(.895,.03,.685,.22),"ease-out-quart":dG(.165,.84,.44,1),"ease-in-out-quart":dG(.77,0,.175,1),"ease-in-quint":dG(.755,.05,.855,.06),"ease-out-quint":dG(.23,1,.32,1),"ease-in-out-quint":dG(.86,0,.07,1),"ease-in-expo":dG(.95,.05,.795,.035),"ease-out-expo":dG(.19,1,.22,1),"ease-in-out-expo":dG(1,0,0,1),"ease-in-circ":dG(.6,.04,.98,.335),"ease-out-circ":dG(.075,.82,.165,1),"ease-in-out-circ":dG(.785,.135,.15,.86),spring:function(e,t,n){if(n===0)return fG.linear;var r=Qqr(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":dG},$qr={animate:TW.animate(),animation:TW.animation(),animated:TW.animated(),clearQueue:TW.clearQueue(),delay:TW.delay(),delayAnimation:TW.delayAnimation(),stop:TW.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&CU(function(n){Dzr(n,e),t()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(t,n){Dzr(n,e)},n.beforeRenderPriorities.animations):t()}},eJr={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return r==null||e!==n.target&&mU(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return t.qualifier==null?e:n.target}},pG=function(e){return sU(e)?new PW(e):e},tJr={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new fzr(eJr,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,pG(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,pG(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,pG(t),n),this},once:function(e,t,n){return this.emitter().one(e,pG(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}},TW.eventAliasesOn(tJr),nJr={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||`#fff`,t.jpg(e)}},nJr.jpeg=nJr.jpg,mG={layout:function(e){var t=this;if(e==null)NU(`Layout options must be specified to make a layout`);else if(e.name==null)NU("A `name` must be specified to make a layout");else{var n=e.name,r=t.extension(`layout`,n);if(r==null)NU("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");else{var i=sU(e.eles)?t.$(e.eles):e.eles==null?t.$():e.eles;return new r(bU({},e,{cy:t,eles:i}))}}}},mG.createLayout=mG.makeLayout=mG.layout,rJr={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();t!=null&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount??(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},onRender:function(e){return this.on(`render`,e)},offRender:function(e){return this.off(`render`,e)}},aJr.invalidateDimensions=aJr.resize,hG={collection:function(e,t){return sU(e)?this.$(e):pU(e)?e.collection():lU(e)?(t||(t={}),new lG(this,e,t.unique,t.removed)):new lG(this)},nodes:function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}},hG.elements=hG.filter=hG.$,gG={},_G=`t`,oJr=`f`,gG.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(p||f&&m){var h=void 0;p&&m||p?h=u.properties:m&&(h=u.mappedProperties);for(var g=0;g1&&(x=1),s.color){var C=r.valueMin[0],w=r.valueMax[0],T=r.valueMin[1],E=r.valueMax[1],D=r.valueMin[2],O=r.valueMax[2],k=r.valueMin[3]==null?1:r.valueMin[3],A=r.valueMax[3]==null?1:r.valueMax[3],j=[Math.round(C+(w-C)*x),Math.round(T+(E-T)*x),Math.round(D+(O-D)*x),Math.round(k+(A-k)*x)];a={bypass:r.bypass,name:r.name,value:j,strValue:`rgb(`+j[0]+`, `+j[1]+`, `+j[2]+`)`}}else if(s.number){var M=r.valueMin+(r.valueMax-r.valueMin)*x;a=this.parse(r.name,M,r.bypass,p)}else return!1;if(!a)return g(),!1;a.mapping=r,r=a;break;case o.data:for(var N=r.field.split(`.`),P=f.data,F=0;F0&&a>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:a,easing:e.pstyle(`transition-timing-function`).value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,i),e.emitAndNotify(`style`),r.transitioning=!1})}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify(`style`),r.transitioning=!1)},gG.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);e.removed()||s!=null&&s(n,r,e)&&a(o)},gG.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){i._private.cy.notify(`zorder`,e)})},gG.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},gG.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},gG.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},gG.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)},vG={},vG.applyBypass=function(e,t,n,r){var i=this,a=[],o=!0;if(t===`*`||t===`**`){if(n!==void 0)for(var s=0;si.length?r.substr(i.length):``}function l(){a=a.length>o.length?a.substr(o.length):``}for(;!r.match(/^\s*$/);){var u=r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){PU(`Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: `+r);break}i=u[0];var d=u[1];if(d!==`core`&&new PW(d).invalid)PU(`Skipping parsing of block: Invalid selector found in string stylesheet: `+d),s();else{var f=u[2],p=!1;a=f;for(var m=[];!a.match(/^\s*$/);){var h=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!h){PU(`Skipping parsing of block: Invalid formatting of style property and value definitions found in:`+f),p=!0;break}o=h[0];var g=h[1],_=h[2];t.properties[g]?n.parse(g,_)?(m.push({name:g,val:_}),l()):(PU(`Skipping property: Invalid property definition in: `+o),l()):(PU(`Skipping property: Invalid property name in: `+o),l())}if(p){s();break}n.selector(d);for(var v=0;v=7&&t[0]===`d`&&(d=new RegExp(s.data.regex).exec(t))){if(n)return!1;var p=s.data;return{name:e,value:d,strValue:``+t,mapped:p,field:d[1],bypass:n}}if(t.length>=10&&t[0]===`m`&&(f=new RegExp(s.mapData.regex).exec(t))){if(n||u.multiple)return!1;var m=s.mapData;if(!(u.color||u.number))return!1;var h=this.parse(e,f[4]);if(!h||h.mapped)return!1;var g=this.parse(e,f[5]);if(!g||g.mapped)return!1;if(h.pfValue===g.pfValue||h.strValue===g.strValue)return PU("`"+e+`: `+t+"` is not a valid mapper because the output range is zero; converting to `"+e+`: `+h.strValue+"`"),this.parse(e,h.strValue);if(u.color){var _=h.value,v=g.value;if(_[0]===v[0]&&_[1]===v[1]&&_[2]===v[2]&&(_[3]===v[3]||(_[3]==null||_[3]===1)&&(v[3]==null||v[3]===1)))return!1}return{name:e,value:f,strValue:``+t,mapped:m,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:h.value,valueMax:g.value,bypass:n}}}if(u.multiple&&r!==`multiple`){var y=l?t.split(/\s+/):lU(t)?t:[t];if(u.evenMultiple&&y.length%2!=0)return null;for(var b=[],x=[],S=[],C=``,w=!1,T=0;T0?` `:``)+E.strValue}return u.validate&&!u.validate(b,x)?null:u.singleEnum&&w?b.length===1&&sU(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:S,strValue:C,bypass:n,units:x}}var D=function(){for(var r=0;ru.max||u.strictMax&&t===u.max))return null;var M={name:e,value:t,strValue:``+t+(O||``),units:O,bypass:n};return M.pfValue=u.unitless||O!==`px`&&O!==`em`||O===`px`||!O?t:this.getEmSizeInPixels()*t,(O===`ms`||O===`s`)&&(M.pfValue=O===`ms`?t:1e3*t),(O===`deg`||O===`rad`)&&(M.pfValue=O===`rad`?t:JHr(t)),O===`%`&&(M.pfValue=t/100),M}if(u.propList){var N=[],P=``+t;if(P!==`none`){for(var F=P.split(/\s*,\s*|\s+/),I=0;I0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){s=Math.min((a-2*t)/n.w,(o-2*t)/n.h),s=s>this._private.maxZoom?this._private.maxZoom:s,s=s=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,n=t.pan,r=t.zoom,i,a,o=!1;if(t.zoomingEnabled||(o=!0),dU(e)?a=e:uU(e)&&(a=e.level,e.position==null?e.renderedPosition!=null&&(i=e.renderedPosition):i=GU(e.position,r,n),i!=null&&!t.panningEnabled&&(o=!0)),a=a>t.maxZoom?t.maxZoom:a,a=at.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push(`zoom`))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;dU(l.x)&&(t.pan.x=l.x,o=!1),dU(l.y)&&(t.pan.y=l.y,o=!1),o||i.push(`pan`)}return i.length>0&&(i.push(`viewport`),this.emit(i.join(` `)),this.notify(`viewport`)),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit(`pan viewport`),this.notify(`viewport`)),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(sU(e)){var n=e;e=this.mutableElements().filter(n)}else pU(e)||(e=this.mutableElements());if(e.length!==0){var r=e.boundingBox(),i=this.width(),a=this.height();return t=t===void 0?this._private.zoom:t,{x:(i-t*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled||this.viewport({pan:{x:0,y:0},zoom:1}),this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,n=this;return e.sizeCache=e.sizeCache||(t?function(){var e=n.window().getComputedStyle(t),r=function(t){return parseFloat(e.getPropertyValue(t))};return{width:t.clientWidth-r(`padding-left`)-r(`padding-right`),height:t.clientHeight-r(`padding-top`)-r(`padding-bottom`)}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}},TG.centre=TG.center,TG.autolockNodes=TG.autolock,TG.autoungrabifyNodes=TG.autoungrabify,EG={data:TW.data({field:`data`,bindingEvent:`data`,allowBinding:!0,allowSetting:!0,settingEvent:`data`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeData:TW.removeData({field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0}),scratch:TW.data({field:`scratch`,bindingEvent:`scratch`,allowBinding:!0,allowSetting:!0,settingEvent:`scratch`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeScratch:TW.removeData({field:`scratch`,event:`scratch`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0})},EG.attr=EG.data,EG.removeAttr=EG.removeData,DG=function(e){var t=this;e=bU({},e);var n=e.container;n&&!fU(n)&&fU(n[0])&&(n=n[0]);var r=n?n._cyreg:null;r=r||{},r&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var a=aU!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=bU({name:a?`grid`:`null`},o.layout),o.renderer=bU({name:a?`canvas`:`null`},o.renderer);var s=function(e,t,n){return t===void 0?n===void 0?e:n:t},l=this._private={container:n,ready:!1,options:o,elements:new lG(this),listeners:[],aniEles:new lG(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?a:o.styleEnabled,zoom:dU(o.zoom)?o.zoom:1,pan:{x:uU(o.pan)&&dU(o.pan.x)?o.pan.x:0,y:uU(o.pan)&&dU(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var u=function(e,t){if(e.some($Br))return CW.all(e).then(t);t(e)};l.styleEnabled&&t.setStyle([]);var d=bU({},o,o.renderer);t.initRenderer(d);var f=function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),e!=null&&(uU(e)||lU(e))&&t.add(e),t.one(`layoutready`,function(e){t.notifications(!0),t.emit(e),t.one(`load`,n),t.emitAndNotify(`load`)}).one(`layoutstop`,function(){t.one(`done`,r),t.emit(`done`)});var a=bU({},t._private.options.layout);a.eles=t.elements(),t.layout(a).run()};u([o.style,o.elements],function(e){var n=e[0],a=e[1];l.styleEnabled&&t.style().append(n),f(a,function(){t.startAnimationLoop(),l.ready=!0,cU(o.ready)&&t.on(`ready`,o.ready);for(var e=0;e0,s=!!e.boundingBox,l=$U(s?e.boundingBox:structuredClone(t.extent())),u;if(pU(e.roots))u=e.roots;else if(lU(e.roots)){for(var d=[],f=0;f0;){var j=A(),M=E(j,O);if(M)j.outgoers().filter(function(e){return e.isNode()&&n.has(e)}).forEach(k);else if(M===null){PU("Detected double maximal shift for node `"+j.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var N=0;if(e.avoidOverlap)for(var P=0;P0&&v[0].length<=3?a/2:0),u=2*Math.PI/v[r].length*i;return r===0&&v[0].length===1&&(o=1),{x:se.x+o*Math.cos(u),y:se.y+o*Math.sin(u)}}var d=v[r].length,f=Math.max(d===1?0:s?(l.w-e.padding*2-ce.w)/((e.grid?ue:d)-1):(l.w-e.padding*2-ce.w)/((e.grid?ue:d)+1),N);return{x:se.x+(i+1-(d+1)/2)*f,y:se.y+(r+1-(ne+1)/2)*le}},fe={downward:0,leftward:90,upward:180,rightward:-90};return Object.keys(fe).indexOf(e.direction)===-1&&NU(`Invalid direction '${e.direction}' specified for breadthfirst layout. Valid values are: ${Object.keys(fe).join(`, `)}`),n.nodes().layoutPositions(this,e,function(t){return nRr(de(t),l,fe[e.direction])}),this},mJr={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},kzr.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=t.counterclockwise===void 0?t.clockwise:!t.counterclockwise,a=r.nodes().not(`:parent`);t.sort&&(a=a.sort(t.sort));for(var o=$U(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=(t.sweep===void 0?2*Math.PI-2*Math.PI/a.length:t.sweep)/Math.max(1,a.length-1),u,d=0,f=0;f1&&t.avoidOverlap){d*=1.75;var g=Math.cos(l)-Math.cos(0),_=Math.sin(l)-Math.sin(0),v=Math.sqrt(d*d/(g*g+_*_));u=Math.max(v,u)}return r.nodes().layoutPositions(this,t,function(e,n){var r=t.startAngle+n*l*(i?1:-1),a=u*Math.cos(r),o=u*Math.sin(r);return{x:s.x+a,y:s.y+o}}),this},hJr={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},Azr.prototype.run=function(){for(var e=this.options,t=e,n=t.counterclockwise===void 0?t.clockwise:!t.counterclockwise,r=e.cy,i=t.eles,a=i.nodes().not(`:parent`),o=$U(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=[],u=0,d=0;d0&&Math.abs(v[0].value-b.value)>=g&&(v=[],_.push(v)),v.push(b)}var x=u+t.minNodeSpacing;if(!t.avoidOverlap){var S=_.length>0&&_[0].length>1,C=(Math.min(o.w,o.h)/2-x)/(_.length+S?1:0);x=Math.min(x,C)}for(var w=0,T=0;T<_.length;T++){var E=_[T],D=E.dTheta=(t.sweep===void 0?2*Math.PI-2*Math.PI/E.length:t.sweep)/Math.max(1,E.length-1);if(E.length>1&&t.avoidOverlap){var O=Math.cos(D)-Math.cos(0),k=Math.sin(D)-Math.sin(0),A=Math.sqrt(x*x/(O*O+k*k));w=Math.max(A,w)}E.r=w,w+=x}if(t.equidistant){for(var j=0,M=0,N=0;N<_.length;N++){var P=_[N].r-M;j=Math.max(j,P)}M=0;for(var F=0;F<_.length;F++){var I=_[F];F===0&&(M=I.r),I.r=M,M+=j}}for(var L={},R=0;R<_.length;R++)for(var ee=_[R],te=ee.dTheta,ne=ee.r,z=0;z=e.numIter||(TJr(r,e),r.temperature*=e.coolingFactor,r.temperature=e.animationThreshold&&a(),CU(d)):(IJr(r,e),s())};d()}else{for(;u;)u=o(l),l++;IJr(r,e),s()}return this},jzr.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit(`layoutstop`),this},jzr.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},vJr=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=$U(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=n.eles.components(),l={},u=0;u0){o.graphSet.push(w);for(var u=0;ur.count?0:r.graph},bJr=function(e,t,n,r){var i=r.graphSet[n];if(-10)var l=r.nodeOverlap*s,u=Math.sqrt(i*i+a*a),d=l*i/u,f=l*a/u;else var p=AG(e,i,a),m=AG(t,-1*i,-1*a),h=m.x-p.x,g=m.y-p.y,_=h*h+g*g,u=Math.sqrt(_),l=(e.nodeRepulsion+t.nodeRepulsion)/_,d=l*h/u,f=l*g/u;e.isLocked||(e.offsetX-=d,e.offsetY-=f),t.isLocked||(t.offsetX+=d,t.offsetY+=f)}},kJr=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else var a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},AG=function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,l=a/o,u={};return t===0&&0n?(u.x=r,u.y=i+a/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=i-o*n/2/t,u):0=l)?(u.x=r+a*t/2/n,u.y=i+a/2,u):(0>n&&(s<=-1*l||s>=l)&&(u.x=r-a*t/2/n,u.y=i-a/2),u)},AJr=function(e,t){for(var n=0;nn){var g=t.gravity*p/h,_=t.gravity*m/h;f.offsetX+=g,f.offsetY+=_}}}}},MJr=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],l=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else var i={x:e,y:t};return i},FJr=function(e,t){var n=e.parentId;if(n!=null){var r=t.layoutNodes[t.idToIndex[n]],i=!1;if((r.maxX==null||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(r.minX==null||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(r.minY==null||e.minY-r.padTopg&&(p+=h+t.componentSpacing,f=0,m=0,h=0)}}},LJr={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},Mzr.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(`:parent`);t.sort&&(i=i.sort(t.sort));var a=$U(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(a.h===0||a.w===0)r.nodes().layoutPositions(this,t,function(e){return{x:a.x1,y:a.y1}});else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),u=Math.round(a.w/a.h*s),d=function(e){if(e==null)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},f=function(e){if(e==null)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},p=t.rows,m=t.cols==null?t.columns:t.cols;if(p!=null&&m!=null)l=p,u=m;else if(p!=null&&m==null)l=p,u=Math.ceil(o/l);else if(p==null&&m!=null)u=m,l=Math.ceil(o/u);else if(u*l>o){var h=d(),g=f();(h-1)*g>=o?d(h-1):(g-1)*h>=o&&f(g-1)}else for(;u*l=o?f(v+1):d(_+1)}var y=a.w/u,b=a.h/l;if(t.condense&&(y=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(M=0,j++)},P={},F=0;F(b=mUr(e,t,x[S],x[S+1],x[S+2],x[S+3])))return _(n,b),!0}else if(o.edgeType===`bezier`||o.edgeType===`multibezier`||o.edgeType===`self`||o.edgeType===`compound`){for(var x=o.allpts,S=0;S+5(b=pUr(e,t,x[S],x[S+1],x[S+2],x[S+3],x[S+4],x[S+5])))return _(n,b),!0}for(var g=g||r.source,y=y||r.target,C=i.getArrowWidth(l,f),w=[{name:`source`,x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:`target`,x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:`mid-source`,x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:`mid-target`,x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}],S=0;S0&&(v(g),v(y))}function b(e,t,n){return RU(e,t,n)}function x(n,r){var i=n._private,a=p,o=r?r+`-`:``;n.boundingBox();var s=i.labelBounds[r||`main`],l=n.pstyle(o+`label`).value;if(n.pstyle(`text-events`).strValue===`yes`&&l){var u=b(i.rscratch,`labelX`,r),d=b(i.rscratch,`labelY`,r),f=b(i.rscratch,`labelAngle`,r),m=n.pstyle(o+`text-margin-x`).pfValue,h=n.pstyle(o+`text-margin-y`).pfValue,g=s.x1-a-m,v=s.x2+a-m,y=s.y1-a-h,x=s.y2+a-h;if(f){var S=Math.cos(f),C=Math.sin(f),w=function(e,t){return e-=u,t-=d,{x:e*S-t*C+u,y:e*C+t*S+d}},T=w(g,y),E=w(g,x),D=w(v,y),O=w(v,x);if(rW(e,t,[T.x+m,T.y+h,D.x+m,D.y+h,O.x+m,O.y+h,E.x+m,E.y+h]))return _(n),!0}else if(nW(s,e,t))return _(n),!0}}for(var S=o.length-1;S>=0;S--){var C=o[S];C.isNode()?v(C)||x(C):y(C)||x(C)||x(C,`source`)||x(C,`target`)}return s},jG.getAllInBox=function(e,t,n,r){var i=this.getCachedZSortedEles().interactive,a=2/this.cy.zoom(),o=[],s=Math.min(e,n),l=Math.max(e,n),u=Math.min(t,r),d=Math.max(t,r);e=s,n=l,t=u,r=d;var f=$U({x1:e,y1:t,x2:n,y2:r}),p=[{x:f.x1,y:f.y1},{x:f.x2,y:f.y1},{x:f.x2,y:f.y2},{x:f.x1,y:f.y2}],m=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function h(e,t,n){return RU(e,t,n)}function g(e,t){var n=e._private,r=a,i=``;e.boundingBox();var o=n.labelBounds.main;if(!o)return null;var s=h(n.rscratch,`labelX`,t),l=h(n.rscratch,`labelY`,t),u=h(n.rscratch,`labelAngle`,t),d=e.pstyle(i+`text-margin-x`).pfValue,f=e.pstyle(i+`text-margin-y`).pfValue,p=o.x1-r-d,m=o.x2+r-d,g=o.y1-r-f,_=o.y2+r-f;if(u){var v=Math.cos(u),y=Math.sin(u),b=function(e,t){return e-=s,t-=l,{x:e*v-t*y+s,y:e*y+t*v+l}};return[b(p,g),b(m,g),b(m,_),b(p,_)]}return[{x:p,y:g},{x:m,y:g},{x:m,y:_},{x:p,y:_}]}function _(e,t,n,r){function i(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return i(e,n,r)!==i(t,n,r)&&i(e,t,n)!==i(e,t,r)}for(var v=0;v0?-(Math.PI-e.ang):Math.PI+e.ang},iYr=function(e,t,n,r,i){e===tYr?rYr(PG,NG):nYr(t,e,NG),nYr(t,n,PG),qJr=NG.nx*PG.ny-NG.ny*PG.nx,JJr=NG.nx*PG.nx-NG.ny*-PG.ny,IG=Math.asin(Math.max(-1,Math.min(1,qJr))),Math.abs(IG)<1e-6?(GJr=t.x,KJr=t.y,RG=BG=0):(FG=1,YJr=!1,JJr<0?IG<0?IG=Math.PI+IG:(IG=Math.PI-IG,FG=-1,YJr=!0):IG>0&&(FG=-1,YJr=!0),BG=t.radius===void 0?r:t.radius,LG=IG/2,XJr=Math.min(NG.len/2,PG.len/2),i?(zG=Math.abs(Math.cos(LG)*BG/Math.sin(LG)),zG>XJr?(zG=XJr,RG=Math.abs(zG*Math.sin(LG)/Math.cos(LG))):RG=BG):(zG=Math.min(XJr,BG),RG=Math.abs(zG*Math.sin(LG)/Math.cos(LG))),$Jr=t.x+PG.nx*zG,eYr=t.y+PG.ny*zG,GJr=$Jr-PG.ny*RG*FG,KJr=eYr+PG.nx*RG*FG,ZJr=t.x+NG.nx*zG,QJr=t.y+NG.ny*zG,tYr=t)},VG=.01,aYr=Math.sqrt(2*VG),HG={},HG.findMidptPtsEtc=function(e,t){var n=t.posPts,r=t.intersectionPts,i=t.vectorNormInverse,a,o=e.pstyle(`source-endpoint`),s=e.pstyle(`target-endpoint`),l=o.units!=null&&s.units!=null,u=function(e,t,n,r){var i=r-t,a=n-e,o=Math.sqrt(a*a+i*i);return{x:-i/o,y:a/o}};switch(e.pstyle(`edge-distances`).value){case`node-position`:a=n;break;case`intersection`:a=r;break;case`endpoints`:if(l){var d=KH(this.manualEndptToPx(e.source()[0],o),2),f=d[0],p=d[1],m=KH(this.manualEndptToPx(e.target()[0],s),2),h=m[0],g=m[1],_={x1:f,y1:p,x2:h,y2:g};i=u(f,p,h,g),a=_}else PU(`Edge ${e.id()} has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).`),a=r}return{midptPts:a,vectorNormInverse:i}},HG.findHaystackPoints=function(e){for(var t=0;t0?Math.max(e-t,0):Math.min(e+t,0)},k=O(E,w),A=O(D,T),j=!1;v===u?_=Math.abs(k)>Math.abs(A)?i:r:v===l||v===s?(_=r,j=!0):(v===a||v===o)&&(_=i,j=!0);var M=_===r,N=M?A:k,P=M?D:E,F=XHr(P),I=!1;!(j&&(b||S))&&(v===s&&P<0||v===l&&P>0||v===a&&P>0||v===o&&P<0)&&(F*=-1,N=F*Math.abs(N),I=!0);var L=b?(x<0?1+x:x)*N:(x<0?N:0)+x*F,R=function(e){return Math.abs(e)=Math.abs(N)},ee=R(L),te=R(Math.abs(N)-Math.abs(L));if((ee||te)&&!I){if(M){var ne=Math.abs(P)<=p/2,z=Math.abs(E)<=m/2;if(ne){var re=(d.x1+d.x2)/2;n.segpts=[re,d.y1,re,d.y2]}else if(z){var ie=(d.y1+d.y2)/2;n.segpts=[d.x1,ie,d.x2,ie]}else n.segpts=[d.x1,d.y2]}else{var ae=Math.abs(P)<=f/2,oe=Math.abs(D)<=h/2;if(ae){var se=(d.y1+d.y2)/2;n.segpts=[d.x1,se,d.x2,se]}else if(oe){var ce=(d.x1+d.x2)/2;n.segpts=[ce,d.y1,ce,d.y2]}else n.segpts=[d.x2,d.y1]}}else if(M){var le=d.y1+L+(g?p/2*F:0);n.segpts=[d.x1,le,d.x2,le]}else{var ue=d.x1+L+(g?f/2*F:0);n.segpts=[ue,d.y1,ue,d.y2]}if(n.isRound){var de=e.pstyle(`taxi-radius`).value,fe=e.pstyle(`radius-type`).value[0]===`arc-radius`;n.radii=Array(n.segpts.length/2).fill(de),n.isArcRadius=Array(n.segpts.length/2).fill(fe)}},HG.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if(n.edgeType===`bezier`){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,d=t.tgtShape,f=t.srcCornerRadius,p=t.tgtCornerRadius,m=t.srcRs,h=t.tgtRs,g=!dU(n.startX)||!dU(n.startY),_=!dU(n.arrowStartX)||!dU(n.arrowStartY),v=!dU(n.endX)||!dU(n.endY),y=!dU(n.arrowEndX)||!dU(n.arrowEndY),b=3*(this.getArrowWidth(e.pstyle(`width`).pfValue,e.pstyle(`arrow-scale`).value)*this.arrowShapeWidth),x=JU({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),S=xg.poolIndex()){var _=h;h=g,g=_}var v=d.srcPos=h.position(),y=d.tgtPos=g.position(),b=d.srcW=h.outerWidth(),S=d.srcH=h.outerHeight(),C=d.tgtW=g.outerWidth(),w=d.tgtH=g.outerHeight(),T=d.srcShape=n.nodeShapes[t.getNodeShape(h)],E=d.tgtShape=n.nodeShapes[t.getNodeShape(g)],D=d.srcCornerRadius=h.pstyle(`corner-radius`).value===`auto`?`auto`:h.pstyle(`corner-radius`).pfValue,O=d.tgtCornerRadius=g.pstyle(`corner-radius`).value===`auto`?`auto`:g.pstyle(`corner-radius`).pfValue,k=d.tgtRs=g._private.rscratch,A=d.srcRs=h._private.rscratch;d.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var j=0;j=aYr||(ae=Math.sqrt(Math.max(ie*ie,VG)+Math.max(re*re,VG)));var oe=d.vector={x:ie,y:re},se=d.vectorNorm={x:oe.x/ae,y:oe.y/ae},ce={x:-se.y,y:se.x};d.nodesOverlap=!dU(ae)||E.checkPoint(L[0],L[1],0,C,w,y.x,y.y,O,k)||T.checkPoint(ee[0],ee[1],0,b,S,v.x,v.y,D,A),d.vectorNormInverse=ce,f={nodesOverlap:d.nodesOverlap,dirCounts:d.dirCounts,calculatedIntersection:!0,hasBezier:d.hasBezier,hasUnbundled:d.hasUnbundled,eles:d.eles,srcPos:y,srcRs:k,tgtPos:v,tgtRs:A,srcW:C,srcH:w,tgtW:b,tgtH:S,srcIntn:te,tgtIntn:R,srcShape:E,tgtShape:T,posPts:{x1:z.x2,y1:z.y2,x2:z.x1,y2:z.y1},intersectionPts:{x1:ne.x2,y1:ne.y2,x2:ne.x1,y2:ne.y1},vector:{x:-oe.x,y:-oe.y},vectorNorm:{x:-se.x,y:-se.y},vectorNormInverse:{x:-ce.x,y:-ce.y}}}var le=I?f:d;N.nodesOverlap=le.nodesOverlap,N.srcIntn=le.srcIntn,N.tgtIntn=le.tgtIntn,N.isRound=P.startsWith(`round`),r&&(h.isParent()||h.isChild()||g.isParent()||g.isChild())&&(h.parents().anySame(g)||g.parents().anySame(h)||h.same(g)&&h.isParent())?t.findCompoundLoopPoints(M,le,j,F):h===g?t.findLoopPoints(M,le,j,F):P.endsWith(`segments`)?t.findSegmentsPoints(M,le):P.endsWith(`taxi`)?t.findTaxiPoints(M,le):P===`straight`||!F&&d.eles.length%2==1&&j===Math.floor(d.eles.length/2)?t.findStraightEdgePoints(M):t.findBezierPoints(M,le,j,F,I),t.findEndpoints(M),t.tryToCorrectInvalidPoints(M,le),t.checkForInvalidEdgeWarning(M),t.storeAllpts(M),t.storeEdgeProjections(M),t.calculateArrowAngles(M),t.recalculateEdgeLabelProjections(M),t.calculateLabelAngles(M)}},x=0;x0){var de=s,fe=YU(de,KU(i)),pe=YU(de,KU(ue)),me=fe;pe2&&YU(de,{x:ue[2],y:ue[3]})0){var De=l,Oe=YU(De,KU(i)),B=YU(De,KU(Ee)),ke=Oe;B2&&YU(De,{x:Ee[2],y:Ee[3]})=u||y){f={cp:g,segment:v};break}}if(f)break}var b=f.cp,x=f.segment,S=(u-p)/x.length,C=x.t1-x.t0,w=l?x.t0+C*S:x.t1-C*S;w=QU(0,w,1),t=ZU(b.p0,b.p1,b.p2,w),i=lYr(b.p0,b.p1,b.p2,w);break;case`straight`:case`segments`:case`haystack`:for(var T=0,E,D,O,k,A=r.allpts.length,j=0;j+3=u));j+=2);var M=(u-D)/E;M=QU(0,M,1),t=QHr(O,k,M),i=cYr(O,k)}o(`labelX`,n,t.x),o(`labelY`,n,t.y),o(`labelAutoAngle`,n,i)}};l(`source`),l(`target`),this.applyLabelDimensions(e)}},WG.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,`source`),this.applyPrefixedLabelDimensions(e,`target`))},WG.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=jU(r,e._private.labelDimsKey);if(RU(n.rscratch,`prefixedLabelDimsKey`,t)!==i){zU(n.rscratch,`prefixedLabelDimsKey`,t,i);var a=this.calculateLabelDimensions(e,r),o=e.pstyle(`line-height`).pfValue,s=e.pstyle(`font-size`).pfValue,l=e.pstyle(`text-wrap`).strValue,u=RU(n.rscratch,`labelWrapCachedLines`,t)||[],d=l===`wrap`?Math.max(u.length,1):1,f=s*o,p=a.width,m=a.height+(d-1)*(o-1)*s;zU(n.rstyle,`labelWidth`,t,p),zU(n.rscratch,`labelWidth`,t,p),zU(n.rstyle,`labelHeight`,t,m),zU(n.rscratch,`labelHeight`,t,m),zU(n.rscratch,`labelLineHeight`,t,f),zU(n.rscratch,`labelActualDescent`,t,a.labelActualDescent)}},WG.getLabelText=function(e,t){var n=e._private,r=t?t+`-`:``,i=e.pstyle(r+`label`).strValue,a=e.pstyle(`text-transform`).value,o=function(e,r){return r?(zU(n.rscratch,e,t,r),r):RU(n.rscratch,e,t)};if(!i)return``;a==`none`||(a==`uppercase`?i=i.toUpperCase():a==`lowercase`&&(i=i.toLowerCase()));var s=e.pstyle(`text-wrap`).value;if(s===`wrap`){var l=o(`labelKey`);if(l!=null&&o(`labelWrapKey`)===l)return o(`labelWrapCachedText`);for(var u=`​`,d=i.split(` `),f=e.pstyle(`text-max-width`).pfValue,p=e.pstyle(`text-overflow-wrap`).value===`anywhere`,m=[],h=/[\s\u200b]+|$/g,g=0;gf){var y=_.matchAll(h),b=``,x=0,S=GH(y),C;try{for(S.s();!(C=S.n()).done;){var w=C.value,T=w[0],E=_.substring(x,w.index);x=w.index+T.length;var D=b.length===0?E:b+E+T;this.calculateLabelDimensions(e,D).width<=f?b+=E+T:(b&&m.push(b),b=E+T)}}catch(e){S.e(e)}finally{S.f()}b.match(/^[\s\u200b]+$/)||m.push(b)}else m.push(_)}o(`labelWrapCachedLines`,m),i=o(`labelWrapCachedText`,m.join(` `)),o(`labelWrapKey`,l)}else if(s===`ellipsis`){var O=e.pstyle(`text-max-width`).pfValue,k=``,A=`…`,j=!1;if(this.calculateLabelDimensions(e,i).widthO);M++)k+=i[M],M===i.length-1&&(j=!0);return j||(k+=A),k}return i},WG.getLabelJustification=function(e){var t=e.pstyle(`text-justification`).strValue,n=e.pstyle(`text-halign`).strValue;return t===`auto`?e.isNode()?pqr(n):`center`:t},WG.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=0,i=e.pstyle(`font-style`).strValue,a=e.pstyle(`font-size`).pfValue,o=e.pstyle(`font-family`).strValue,s=e.pstyle(`font-weight`).strValue,l=e.pstyle(`text-metrics`).strValue||`font`,u=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=n.createElement(`canvas`),d=this.labelCalcCanvasContext=u.getContext(`2d`);var f=u.style;f.position=`absolute`,f.left=`-9999px`,f.top=`-9999px`,f.zIndex=`-1`,f.visibility=`hidden`,f.pointerEvents=`none`}d.font=`${i} ${s} ${a}px ${o}`;for(var p=0,m=0,h=t.split(` `),g=h.length,_=0,v=0,y=0;y1&&arguments[1]!==void 0?arguments[1]:!0;if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var D=a(t);x&&(e.hoverData.tapholdCancelled=!0);var O=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];t.length===0?(t.push(y[0]),t.push(y[1])):(t[0]+=y[0],t[1]+=y[1])};n=!0,i(h,[`mousemove`,`vmousemove`,`tapdrag`],t,{x:u[0],y:u[1]});var k=function(e){return{originalEvent:t,type:e,position:{x:u[0],y:u[1]}}},A=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||r.emit(k(`boxstart`)),p[4]=1,e.hoverData.selecting=!0,e.redrawHint(`select`,!0),e.redraw()};if(e.hoverData.which===3){if(x){var j=k(`cxtdrag`);v?v.emit(j):r.emit(j),e.hoverData.cxtDragged=!0,(!e.hoverData.cxtOver||h!==e.hoverData.cxtOver)&&(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(k(`cxtdragout`)),e.hoverData.cxtOver=h,h&&h.emit(k(`cxtdragover`)))}}else if(e.hoverData.dragging){if(n=!0,r.panningEnabled()&&r.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var N=e.hoverData.mdownPos;M={x:(u[0]-N[0])*s,y:(u[1]-N[1])*s},e.hoverData.justStartedPan=!1}else M={x:y[0]*s,y:y[1]*s};r.panBy(M),r.emit(k(`dragpan`)),e.hoverData.dragged=!0}u=e.projectIntoViewport(t.clientX,t.clientY)}else if(p[4]==1&&(v==null||v.pannable()))x&&(!e.hoverData.dragging&&r.boxSelectionEnabled()&&(D||!r.panningEnabled()||!r.userPanningEnabled())?A():!e.hoverData.selecting&&r.panningEnabled()&&r.userPanningEnabled()&&o(v,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=KU(d),e.redrawHint(`select`,!0),e.redraw()),v&&v.pannable()&&v.active()&&v.unactivate());else{if(v&&v.pannable()&&v.active()&&v.unactivate(),(!v||!v.grabbed())&&h!=_&&(_&&i(_,[`mouseout`,`tapdragout`],t,{x:u[0],y:u[1]}),h&&i(h,[`mouseover`,`tapdragover`],t,{x:u[0],y:u[1]}),e.hoverData.last=h),v){if(x){if(r.boxSelectionEnabled()&&D)v&&v.grabbed()&&(g(b),v.emit(k(`freeon`)),b.emit(k(`free`)),e.dragData.didDrag&&(v.emit(k(`dragfreeon`)),b.emit(k(`dragfree`)))),A();else if(v&&v.grabbed()&&e.nodeIsDraggable(v)){var P=!e.dragData.didDrag;P&&e.redrawHint(`eles`,!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||m(b,{inDragLayer:!0});var F={x:0,y:0};if(dU(y[0])&&dU(y[1])&&(F.x+=y[0],F.y+=y[1],P)){var I=e.hoverData.dragDelta;I&&dU(I[0])&&dU(I[1])&&(F.x+=I[0],F.y+=I[1])}e.hoverData.draggingEles=!0,b.silentShift(F).emit(k(`position`)).emit(k(`drag`)),e.redrawHint(`drag`,!0),e.redraw()}}else O()}n=!0}if(p[2]=u[0],p[3]=u[1],n)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},!1);var D,O,k;e.registerBinding(t,`mouseup`,function(t){if(!(e.hoverData.which===1&&t.which!==1&&e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var r=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,d=e.hoverData.down,f=a(t);e.data.bgActivePosistion&&(e.redrawHint(`select`,!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,d&&d.unactivate();var p=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(e.hoverData.which===3){var m=p(`cxttapend`);if(d?d.emit(m):r.emit(m),!e.hoverData.cxtDragged){var h=p(`cxttap`);d?d.emit(h):r.emit(h)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(e.hoverData.which===1){if(i(l,[`mouseup`,`tapend`,`vmouseup`],t,{x:o[0],y:o[1]}),!e.dragData.didDrag&&!e.hoverData.dragged&&!e.hoverData.selecting&&!e.hoverData.isOverThresholdDrag&&(i(d,[`click`,`tap`,`vclick`],t,{x:o[0],y:o[1]}),O=!1,t.timeStamp-k<=r.multiClickDebounceTime()?(D&&clearTimeout(D),O=!0,k=null,i(d,[`dblclick`,`dbltap`,`vdblclick`],t,{x:o[0],y:o[1]})):(D=setTimeout(function(){O||i(d,[`oneclick`,`onetap`,`voneclick`],t,{x:o[0],y:o[1]})},r.multiClickDebounceTime()),k=t.timeStamp)),d==null&&!e.dragData.didDrag&&!e.hoverData.selecting&&!e.hoverData.dragged&&!a(t)&&(r.$(n).unselect([`tapunselect`]),u.length>0&&e.redrawHint(`eles`,!0),e.dragData.possibleDragElements=u=r.collection()),l==d&&!e.dragData.didDrag&&!e.hoverData.selecting&&l!=null&&l._private.selectable&&(e.hoverData.dragging||(r.selectionType()===`additive`||f?l.selected()?l.unselect([`tapunselect`]):l.select([`tapselect`]):f||(r.$(n).unmerge(l).unselect([`tapunselect`]),l.select([`tapselect`]))),e.redrawHint(`eles`,!0)),e.hoverData.selecting){var _=r.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint(`select`,!0),_.length>0&&e.redrawHint(`eles`,!0),r.emit(p(`boxend`)),r.selectionType()===`additive`||f||r.$(n).unmerge(_).unselect(),_.emit(p(`box`)).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(p(`boxselect`)),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint(`select`,!0),e.redrawHint(`eles`,!0),e.redraw()),!s[4]){e.redrawHint(`drag`,!0),e.redrawHint(`eles`,!0);var v=d&&d.grabbed();g(u),v&&(d.emit(p(`freeon`)),u.emit(p(`free`)),e.dragData.didDrag&&(d.emit(p(`dragfreeon`)),u.emit(p(`dragfree`))))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}},!1);var A=[],j=4,M,N=1e5,P=function(e){for(var t=Math.abs(e[0]),n=1;n=j){M=!1;var i=A;if(i[0]>=5){var a=P(i)?i[0]:qHr(i);a>1&&(M=!0,N=a)}}else A.push(Math.abs(r)),n=!0}else M&&(N=Math.min(Math.abs(r),N));if(!e.scrollingPage){var o=e.cy,s=o.zoom(),l=o.pan(),u=e.projectIntoViewport(t.clientX,t.clientY),d=[u[0]*s+l.x,u[1]*s+l.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||w())t.preventDefault();else if(o.panningEnabled()&&o.userPanningEnabled()&&o.zoomingEnabled()&&o.userZoomingEnabled()){t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout(function(){e.data.wheelZooming=!1,e.redrawHint(`eles`,!0),e.redraw()},150);var f;n&&Math.abs(r)>5&&(r=XHr(r)*5),f=r/-250,M&&(f/=N,f*=3),f*=e.wheelSensitivity,t.deltaMode===1&&(f*=33);var p=o.zoom()*10**f;t.type===`gesturechange`&&(p=e.gestureStartZoom*t.scale),o.zoom({level:p,renderedPosition:{x:d[0],y:d[1]}}),o.emit({type:t.type===`gesturechange`?`pinchzoom`:`scrollzoom`,originalEvent:t,position:{x:u[0],y:u[1]}})}}}};e.registerBinding(e.container,`wheel`,F,!0),e.registerBinding(t,`scroll`,function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,`gesturestart`,function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()},!0),e.registerBinding(e.container,`gesturechange`,function(t){e.hasTouchStarted||F(t)},!0),e.registerBinding(e.container,`mouseout`,function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:`mouseout`,position:{x:n[0],y:n[1]}})},!1),e.registerBinding(e.container,`mouseover`,function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:`mouseover`,position:{x:n[0],y:n[1]}})},!1);var I,L,R,ee,te,ne,z,re,ie,ae,oe,se,ce,le=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},ue=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)},de;e.registerBinding(e.container,`touchstart`,de=function(t){if(e.hasTouchStarted=!0,T(t)){v(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,r=e.touchData.now,a=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);r[0]=o[0],r[1]=o[1]}if(t.touches[1]){var o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);r[2]=o[0],r[3]=o[1]}if(t.touches[2]){var o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);r[4]=o[0],r[5]=o[1]}var s=function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}};if(t.touches[1]){e.touchData.singleTouchMoved=!0,g(e.dragData.touchDragEles);var l=e.findContainerClientCoords();ie=l[0],ae=l[1],oe=l[2],se=l[3],I=t.touches[0].clientX-ie,L=t.touches[0].clientY-ae,R=t.touches[1].clientX-ie,ee=t.touches[1].clientY-ae,ce=0<=I&&I<=oe&&0<=R&&R<=oe&&0<=L&&L<=se&&0<=ee&&ee<=se;var d=n.pan(),f=n.zoom();te=le(I,L,R,ee),ne=ue(I,L,R,ee),z=[(I+R)/2,(L+ee)/2],re=[(z[0]-d.x)/f,(z[1]-d.y)/f];var p=200,_=p*p;if(ne<_&&!t.touches[2]){var y=e.findNearestElement(r[0],r[1],!0,!0),b=e.findNearestElement(r[2],r[3],!0,!0);y&&y.isNode()?(y.activate().emit(s(`cxttapstart`)),e.touchData.start=y):b&&b.isNode()?(b.activate().emit(s(`cxttapstart`)),e.touchData.start=b):n.emit(s(`cxttapstart`)),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,e.redraw();return}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(!t.touches[1]&&t.touches[0]){var x=e.findNearestElements(r[0],r[1],!0,!0),S=x[0];if(S!=null&&(S.activate(),e.touchData.start=S,e.touchData.starts=x,e.nodeIsGrabbable(S))){var C=e.dragData.touchDragEles=n.collection(),w=null;e.redrawHint(`eles`,!0),e.redrawHint(`drag`,!0),S.selected()?(w=n.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),m(w,{addToList:C})):h(S,{addToList:C}),u(S),S.emit(s(`grabon`)),w?w.forEach(function(e){e.emit(s(`grab`))}):S.emit(s(`grab`))}i(S,[`touchstart`,`tapstart`,`vmousedown`],t,{x:r[0],y:r[1]}),S??(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint(`select`,!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout(function(){e.touchData.singleTouchMoved===!1&&!e.pinching&&!e.touchData.selecting&&i(e.touchData.start,[`taphold`],t,{x:r[0],y:r[1]})},e.tapholdDuration)}if(t.touches.length>=1){for(var E=e.touchData.startPosition=[null,null,null,null,null,null],D=0;D=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var S=t.touches[0].clientX-ie,C=t.touches[0].clientY-ae,w=t.touches[1].clientX-ie,E=t.touches[1].clientY-ae,D=ue(S,C,w,E),O=D/ne,k=150,A=k*k,j=1.5;if(O>=j*j||D>=A){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var M=f(`cxttapend`);e.touchData.start?(e.touchData.start.unactivate().emit(M),e.touchData.start=null):a.emit(M)}}if(n&&e.touchData.cxt){var M=f(`cxtdrag`);e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0),e.touchData.start?e.touchData.start.emit(M):a.emit(M),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var N=e.findNearestElement(s[0],s[1],!0,!0);(!e.touchData.cxtOver||N!==e.touchData.cxtOver)&&(e.touchData.cxtOver&&e.touchData.cxtOver.emit(f(`cxtdragout`)),e.touchData.cxtOver=N,N&&N.emit(f(`cxtdragover`)))}else if(n&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit(f(`boxstart`)),e.touchData.selecting=!0,e.touchData.didSelect=!0,r[4]=1,!r||r.length===0||r[0]===void 0?(r[0]=(s[0]+s[2]+s[4])/3,r[1]=(s[1]+s[3]+s[5])/3,r[2]=(s[0]+s[2]+s[4])/3+1,r[3]=(s[1]+s[3]+s[5])/3+1):(r[2]=(s[0]+s[2]+s[4])/3,r[3]=(s[1]+s[3]+s[5])/3),e.redrawHint(`select`,!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var P=e.dragData.touchDragEles;if(P){e.redrawHint(`drag`,!0);for(var F=0;F0&&!e.hoverData.draggingEles&&!e.swipePanning&&e.data.bgActivePosistion!=null&&(e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0),e.redraw())}},!1);var pe;e.registerBinding(t,`touchcancel`,pe=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()});var me,he,ge,_e;if(e.registerBinding(t,`touchend`,me=function(t){var r=e.touchData.start;if(e.touchData.capture)t.touches.length===0&&(e.touchData.capture=!1),t.preventDefault();else return;var a=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o=e.cy,s=o.zoom(),l=e.touchData.now,u=e.touchData.earlier;if(t.touches[0]){var d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);l[0]=d[0],l[1]=d[1]}if(t.touches[1]){var d=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);l[2]=d[0],l[3]=d[1]}if(t.touches[2]){var d=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);l[4]=d[0],l[5]=d[1]}var f=function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}};r&&r.unactivate();var p;if(e.touchData.cxt){if(p=f(`cxttapend`),r?r.emit(p):o.emit(p),!e.touchData.cxtDragged){var m=f(`cxttap`);r?r.emit(m):o.emit(m)}e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,e.redraw()}else{if(!t.touches[2]&&o.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var h=o.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,e.redrawHint(`select`,!0),o.emit(f(`boxend`)),h.emit(f(`box`)).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(f(`boxselect`)),h.nonempty()&&e.redrawHint(`eles`,!0),e.redraw()}if(r!=null&&r.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);else if(!t.touches[1]&&!t.touches[0]&&!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var _=e.dragData.touchDragEles;if(r!=null){var v=r._private.grabbed;g(_),e.redrawHint(`drag`,!0),e.redrawHint(`eles`,!0),v&&(r.emit(f(`freeon`)),_.emit(f(`free`)),e.dragData.didDrag&&(r.emit(f(`dragfreeon`)),_.emit(f(`dragfree`)))),i(r,[`touchend`,`tapend`,`vmouseup`,`tapdragout`],t,{x:l[0],y:l[1]}),r.unactivate(),e.touchData.start=null}else i(e.findNearestElement(l[0],l[1],!0,!0),[`touchend`,`tapend`,`vmouseup`,`tapdragout`],t,{x:l[0],y:l[1]});var y=e.touchData.startPosition[0]-l[0],b=y*y,x=e.touchData.startPosition[1]-l[1],S=(b+x*x)*s*s;e.touchData.singleTouchMoved||(r||o.$(`:selected`).unselect([`tapunselect`]),i(r,[`tap`,`vclick`],t,{x:l[0],y:l[1]}),he=!1,t.timeStamp-_e<=o.multiClickDebounceTime()?(ge&&clearTimeout(ge),he=!0,_e=null,i(r,[`dbltap`,`vdblclick`],t,{x:l[0],y:l[1]})):(ge=setTimeout(function(){he||i(r,[`onetap`,`voneclick`],t,{x:l[0],y:l[1]})},o.multiClickDebounceTime()),_e=t.timeStamp)),r!=null&&!e.dragData.didDrag&&r._private.selectable&&S`u`){var ve=[],ye=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},be=function(e){return{event:e,touch:ye(e)}},xe=function(e){ve.push(be(e))},Se=function(e){for(var t=0;t0)return u[0]}return null},m=Object.keys(f),h=0;h0?f:cUr(i,a,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,i,a,o,s){s=s===`auto`?pW(r,i):s;var l=2*s;if(iW(e,t,this.points,a,o,r,i-l,[0,-1],n)||iW(e,t,this.points,a,o,r-l,i,[0,-1],n))return!0;var u=r/2+2*n,d=i/2+2*n;return!!(rW(e,t,[a-u,o-d,a-u,o,a+u,o,a+u,o-d])||sW(e,t,l,l,a+r/2-s,o+i/2-s,n)||sW(e,t,l,l,a-r/2+s,o+i/2-s,n))}}},JG.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon(`triangle`,fW(3,0)),this.generateRoundPolygon(`round-triangle`,fW(3,0)),this.generatePolygon(`rectangle`,fW(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon(`diamond`,n),this.generateRoundPolygon(`round-diamond`,n),this.generatePolygon(`pentagon`,fW(5,0)),this.generateRoundPolygon(`round-pentagon`,fW(5,0)),this.generatePolygon(`hexagon`,fW(6,0)),this.generateRoundPolygon(`round-hexagon`,fW(6,0)),this.generatePolygon(`heptagon`,fW(7,0)),this.generateRoundPolygon(`round-heptagon`,fW(7,0)),this.generatePolygon(`octagon`,fW(8,0)),this.generateRoundPolygon(`round-octagon`,fW(8,0));var r=Array(20),i=xUr(5,0),a=xUr(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*g)break}else if(i){if(m>=e.deqCost*l||m>=e.deqAvgCost*s)break}else if(h>=e.deqNoDrawCost*bYr)break;var _=e.deq(t,f,d);if(_.length>0)for(var v=0;v<_.length;v++)u.push(_[v]);else break}u.length>0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,f,d)&&r())},a=e.priority||uHr;n.beforeRender(i,a(t))}}}},SYr=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:MU;UH(this,e),this.idsByKey=new BU,this.keyForId=new BU,this.cachesByLvl=new BU,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return WH(e,[{key:`getIdsFor`,value:function(e){e??NU(`Can not get id list for null key`);var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new VU,t.set(e,n)),n}},{key:`addIdForKey`,value:function(e,t){e!=null&&this.getIdsFor(e).add(t)}},{key:`deleteIdForKey`,value:function(e,t){e!=null&&this.getIdsFor(e).delete(t)}},{key:`getNumberOfIdsForKey`,value:function(e){return e==null?0:this.getIdsFor(e).size}},{key:`updateKeyMappingFor`,value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:`deleteKeyMappingFor`,value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:`keyHasChangedFor`,value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:`isInvalid`,value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:`getCachesAt`,value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new BU,t.set(e,r),n.push(e)),r}},{key:`getCache`,value:function(e,t){return this.getCachesAt(t).get(e)}},{key:`get`,value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return r!=null&&this.updateKeyMappingFor(e),r}},{key:`getForCachedKey`,value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:`hasCache`,value:function(e,t){return this.getCachesAt(t).has(e)}},{key:`has`,value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:`setCache`,value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:`set`,value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:`deleteCache`,value:function(e,t){this.getCachesAt(t).delete(e)}},{key:`delete`,value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:`invalidateKey`,value:function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})}},{key:`invalidate`,value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||this.getNumberOfIdsForKey(n)===0}}])}(),CYr=25,ZG=50,QG=-4,wYr=3,TYr=7.99,EYr=8,DYr=1024,OYr=1024,kYr=1024,AYr=.2,jYr=.8,MYr=10,NYr=.15,PYr=.1,FYr=.9,IYr=.9,LYr=100,RYr=1,$G={dequeue:`dequeue`,downscale:`downscale`,highQuality:`highQuality`},zYr=IU({getKey:null,doesEleInvalidateKey:MU,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:cHr,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),eK=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=zYr(t);bU(n,r),n.lookup=new SYr(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},tK=eK.prototype,tK.reasons=$G,tK.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},tK.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},tK.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new WU(function(e,t){return t.reqs-e.reqs})},tK.getElementKeyToQueue=function(){var e=this;return e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{}},tK.getElement=function(e,t,n,r,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||t.w===0||t.h===0||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed()||!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(r??(r=Math.ceil(YHr(s*n))),r=TYr||r>wYr)return null;var u=2**r,d=t.h*u,f=t.w*u,p=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,p))return null;var m=l.get(e,r);if(m&&m.invalidated&&(m.invalidated=!1,m.texture.invalidatedWidth-=m.width),m)return m;var h=d<=CYr?CYr:d<=ZG?ZG:Math.ceil(d/ZG)*ZG;if(d>kYr||f>OYr)return null;var g=a.getTextureQueue(h),_=g[g.length-2],v=function(){return a.recycleTexture(h,f)||a.addTexture(h,f)};_||(_=g[g.length-1]),_||(_=v()),_.width-_.usedWidthr;O--)E=a.getElement(e,t,n,O,$G.downscale);D()}else return a.queueElement(e,C.level-1),C}else{var k;if(!b&&!x&&!S)for(var A=r-1;A>=QG;A--){var j=l.get(e,A);if(j){k=j;break}}if(y(k))return a.queueElement(e,r),k;_.context.translate(_.usedWidth,0),_.context.scale(u,u),this.drawElement(_.context,e,t,p,!1),_.context.scale(1/u,1/u),_.context.translate(-_.usedWidth,0)}return m={x:_.usedWidth,texture:_,level:r,scale:u,width:f,height:d,scaledLabelShown:p},_.usedWidth+=Math.ceil(f+EYr),_.eleCaches.push(m),l.set(e,r,m),a.checkTextureFullness(_),m},tK.invalidateElements=function(e){for(var t=0;t=AYr*e.width&&this.retireTexture(e)},tK.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>jYr&&e.fullnessChecks>=MYr?LU(t,e):e.fullnessChecks++},tK.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n),i=this.lookup;LU(r,e),e.retired=!0;for(var a=e.eleCaches,o=0;o=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,_Hr(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),LU(i,o),r.push(o),o}},tK.queueElement=function(e,t){var n=this,r=n.getElementQueue(),i=n.getElementKeyToQueue(),a=this.getKey(e),o=i[a];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,r.updateItem(o);else{var s={eles:e.spawn().merge(e),level:t,reqs:1,key:a};r.push(s),i[a]=s}},tK.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o0;o++){var s=n.pop(),l=s.key,u=s.eles[0],d=a.hasCache(u,s.level);if(r[l]=null,!d){i.push(s);var f=t.getBoundingBox(u);t.getElement(u,f,e,s.level,$G.dequeue)}}return i},tK.removeFromQueue=function(e){var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=this.getKey(e),a=r[i];a!=null&&(a.eles.length===1?(a.reqs=sHr,n.updateItem(a),n.pop(),r[i]=null):a.eles.unmerge(e))},tK.onDequeue=function(e){this.onDequeues.push(e)},tK.offDequeue=function(e){LU(this.onDequeues,e)},tK.setupDequeueing=xYr.setupDequeueing({deqRedrawThreshold:LYr,deqCost:NYr,deqAvgCost:PYr,deqNoDrawCost:FYr,deqFastCost:IYr,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=VYr||n>rK)return null}r.validateLayersElesOrdering(n,e);var o=r.layersByLevel,s=2**n,l=o[n]=o[n]||[],u,d=r.levelIsComplete(n,e),f,p=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return f=o[t],!0},i=function(e){if(!f)for(var r=n+e;nK<=r&&r<=rK&&!t(r);r+=e);};i(1),i(-1);for(var a=l.length-1;a>=0;a--){var s=l[a];s.invalid&&LU(l,s)}};if(!d)p();else return l;var m=function(){if(!u){u=$U();for(var t=0;tZYr||a>ZYr||i*a>XYr)return null;var o=r.makeLayer(u,n);if(t!=null){var d=l.indexOf(t)+1;l.splice(d,0,o)}else(e.insert===void 0||e.insert)&&l.unshift(o);return o};if(r.skipping&&!a)return null;for(var g=null,_=e.length/BYr,v=!a,y=0;y=_||!oUr(g.bb,b.boundingBox()))&&(g=h({insert:!0,after:g}),!g))return null;f||v?r.queueLayer(g,b):r.drawEleInLayer(g,b,n,t),g.eles.push(b),S[n]=g}}return f||(v?null:l)},iK.getEleLevelForLayerLevel=function(e,t){return e},iK.drawEleInLayer=function(e,t,n,r){var i=this,a=this.renderer,o=e.context,s=t.boundingBox();s.w!==0&&s.h!==0&&t.visible()&&(n=i.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(o,!1),a.drawCachedElement(o,t,null,null,n,QYr),a.setImgSmoothing(o,!0))},iK.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||n.length===0)return!1;for(var r=0,i=0;i0||a.invalid)return!1;r+=a.eles.length}return r===t.length},iK.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){t=!0;break}}return t},iK.invalidateElements=function(e){var t=this;e.length!==0&&(t.lastInvalidationTime=wU(),e.length!==0&&t.haveLayers()&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)}))},iK.invalidateLayer=function(e){if(this.lastInvalidationTime=wU(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];LU(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s=t._private.rscratch;if((!a||t.visible())&&!(s.badLine||s.allpts==null||isNaN(s.allpts[0]))){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=a?t.pstyle(`opacity`).value:1,d=a?t.pstyle(`line-opacity`).value:1,f=t.pstyle(`curve-style`).value,p=t.pstyle(`line-style`).value,m=t.pstyle(`width`).pfValue,h=t.pstyle(`line-cap`).value,g=t.pstyle(`line-outline-width`).value,_=t.pstyle(`line-outline-color`).value,v=u*d,y=u*d,b=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;f===`straight-triangle`?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=m,e.lineCap=h,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,p),e.lineCap=`butt`)},x=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;if(e.lineWidth=m+g,e.lineCap=h,g>0)o.colorStrokeStyle(e,_[0],_[1],_[2],n);else{e.lineCap=`butt`;return}f===`straight-triangle`?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,p),e.lineCap=`butt`)},S=function(){i&&o.drawEdgeOverlay(e,t)},C=function(){i&&o.drawEdgeUnderlay(e,t)},w=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;o.drawArrowheads(e,t,n)},T=function(){o.drawElementText(e,t,null,r)};if(e.lineJoin=`round`,t.pstyle(`ghost`).value===`yes`){var E=t.pstyle(`ghost-offset-x`).pfValue,D=t.pstyle(`ghost-offset-y`).pfValue,O=v*t.pstyle(`ghost-opacity`).value;e.translate(E,D),b(O),w(O),e.translate(-E,-D)}else x();C(),b(),w(),S(),T(),n&&e.translate(l.x1,l.y1)}},uXr=function(e){if(![`overlay`,`underlay`].includes(e))throw Error(`Invalid state`);return function(t,n){if(n.visible()){var r=n.pstyle(`${e}-opacity`).value;if(r!==0){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle(`${e}-padding`).pfValue,l=n.pstyle(`${e}-color`).value;t.lineWidth=s,t.lineCap=o.edgeType===`self`&&!a?`butt`:`round`,i.colorStrokeStyle(t,l[0],l[1],l[2],r),i.drawEdgePath(n,t,o.allpts,`solid`)}}}},oK.drawEdgeOverlay=uXr(`overlay`),oK.drawEdgeUnderlay=uXr(`underlay`),oK.drawEdgePath=function(e,t,n,r){var i=e._private.rscratch,a=t,o,s=!1,l=this.usePaths(),u=e.pstyle(`line-dash-pattern`).pfValue,d=e.pstyle(`line-dash-offset`).pfValue;if(l){var f=n.join(`$`);i.pathCacheKey&&i.pathCacheKey===f?(o=t=i.pathCache,s=!0):(o=t=new Path2D,i.pathCacheKey=f,i.pathCache=o)}if(a.setLineDash)switch(r){case`dotted`:a.setLineDash([1,1]);break;case`dashed`:a.setLineDash(u),a.lineDashOffset=d;break;case`solid`:a.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case`bezier`:case`self`:case`compound`:case`multibezier`:for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(r==null){if(a&&!o.eleTextBiggerThanMin(t))return}else if(r===!1)return;if(t.isNode()){var s=t.pstyle(`label`);if(!s||!s.value)return;var l=o.getLabelJustification(t),u=t.pstyle(`text-metrics`).strValue===`glyph`;e.textAlign=l,e.textBaseline=u?`alphabetic`:`bottom`}else{var d=t.element()._private.rscratch.badLine,f=t.pstyle(`label`),p=t.pstyle(`source-label`),m=t.pstyle(`target-label`);if(d||(!f||!f.value)&&(!p||!p.value)&&(!m||!m.value))return;e.textAlign=`center`,e.textBaseline=`bottom`}var h=!n,g;n&&(g=n,e.translate(-g.x1,-g.y1)),i==null?(o.drawText(e,t,null,h,a),t.isEdge()&&(o.drawText(e,t,`source`,h,a),o.drawText(e,t,`target`,h,a))):o.drawText(e,t,i,h,a),n&&e.translate(g.x1,g.y1)},sK.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:!0,r=t.pstyle(`font-style`).strValue,i=t.pstyle(`font-size`).pfValue+`px`,a=t.pstyle(`font-family`).strValue,o=t.pstyle(`font-weight`).strValue,s=n?t.effectiveOpacity()*t.pstyle(`text-opacity`).value:1,l=t.pstyle(`text-outline-opacity`).value*s,u=t.pstyle(`color`).value,d=t.pstyle(`text-outline-color`).value;e.font=r+` `+o+` `+i+` `+a,e.lineJoin=`round`,this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,d[0],d[1],d[2],l)},sK.getTextAngle=function(e,t){var n,r=e._private.rscratch,i=t?t+`-`:``,a=e.pstyle(i+`text-rotation`);if(a.strValue===`autorotate`){var o=RU(r,`labelAngle`,t);n=e.isEdge()?o:0}else n=a.strValue===`none`?0:a.pfValue;return n},sK.drawText=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!i||o!==0&&t.pstyle(`text-opacity`).value!==0){n===`main`&&(n=null);var s=RU(a,`labelX`,n),l=RU(a,`labelY`,n),u,d,f=this.getLabelText(t,n);if(f!=null&&f!==``&&!isNaN(s)&&!isNaN(l)){this.setupTextStyle(e,t,i);var p=n?n+`-`:``,m=RU(a,`labelWidth`,n),h=RU(a,`labelHeight`,n),g=RU(a,`labelActualDescent`,n),_=t.pstyle(p+`text-margin-x`).pfValue,v=t.pstyle(p+`text-margin-y`).pfValue,y=t.isEdge(),b=t.pstyle(`text-halign`).value,x=t.pstyle(`text-valign`).value;y&&(b=`center`,x=`center`),s+=_,l+=v;var S=r?this.getTextAngle(t,n):0;S!==0&&(u=s,d=l,e.translate(u,d),e.rotate(S),s=0,l=0);var C=HW(b),w=UW(x);switch(w){case`top`:break;case`center`:l+=h/2;break;case`bottom`:l+=h}var T=t.pstyle(`text-background-opacity`).value,E=t.pstyle(`text-border-opacity`).value,D=t.pstyle(`text-border-width`).pfValue,O=t.pstyle(`text-background-padding`).pfValue,k=t.pstyle(`text-background-shape`).strValue,A=k===`round-rectangle`||k===`roundrectangle`,j=k===`circle`,M=2;if(T>0||D>0&&E>0){var N=e.fillStyle,P=e.strokeStyle,F=e.lineWidth,I=t.pstyle(`text-background-color`).value,L=t.pstyle(`text-border-color`).value,R=t.pstyle(`text-border-style`).value,ee=T>0,te=D>0&&E>0,ne=s-O;switch(C){case`left`:ne-=m;break;case`center`:ne-=m/2}var z=l-h-O,re=m+2*O,ie=h+2*O;if(ee&&(e.fillStyle=`rgba(${I[0]},${I[1]},${I[2]},${T*o})`),te&&(e.strokeStyle=`rgba(${L[0]},${L[1]},${L[2]},${E*o})`,e.lineWidth=D,e.setLineDash))switch(R){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash([4,2]);break;case`double`:e.lineWidth=D/4,e.setLineDash([]);break;default:e.setLineDash([])}if(A?(e.beginPath(),qzr(e,ne,z,re,ie,M)):j?(e.beginPath(),Kzr(e,ne,z,re,ie)):(e.beginPath(),e.rect(ne,z,re,ie)),ee&&e.fill(),te&&e.stroke(),te&&R===`double`){var ae=D/2;e.beginPath(),A?qzr(e,ne+ae,z+ae,re-2*ae,ie-2*ae,M):e.rect(ne+ae,z+ae,re-2*ae,ie-2*ae),e.stroke()}e.fillStyle=N,e.strokeStyle=P,e.lineWidth=F,e.setLineDash&&e.setLineDash([])}var oe=2*t.pstyle(`text-outline-width`).pfValue;if(oe>0&&(e.lineWidth=oe),l-=g,t.pstyle(`text-wrap`).value===`wrap`){var se=RU(a,`labelWrapCachedLines`,n),ce=RU(a,`labelLineHeight`,n),le=m/2,ue=this.getLabelJustification(t);switch(ue===`auto`||(C===`left`?ue===`left`?s+=-m:ue===`center`&&(s+=-le):C===`center`?ue===`left`?s+=-le:ue===`right`&&(s+=le):C===`right`&&(ue===`center`?s+=le:ue===`right`&&(s+=m))),w){case`top`:l-=(se.length-1)*ce;break;case`center`:case`bottom`:l-=(se.length-1)*ce}for(var de=0;de0&&e.strokeText(se[de],s,l),e.fillText(se[de],s,l),l+=ce}else oe>0&&e.strokeText(f,s,l),e.fillText(f,s,l);S!==0&&(e.rotate(-S),e.translate(-u,-d))}}},cK={},cK.drawNode=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s,l,u=t._private,d=u.rscratch,f=t.position();if(dU(f.x)&&dU(f.y)&&(!a||t.visible())){var p=a?t.effectiveOpacity():1,m=o.usePaths(),h,g=!1,_=t.padding();s=t.width()+2*_,l=t.height()+2*_;var v;n&&(v=n,e.translate(-v.x1,-v.y1));for(var y=t.pstyle(`background-image`).value,b=Array(y.length),x=Array(y.length),S=0,C=0;C0&&arguments[0]!==void 0?arguments[0]:O;o.eleFillStyle(e,t,n)},ie=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I;o.colorStrokeStyle(e,k[0],k[1],k[2],t)},ae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:te;o.colorStrokeStyle(e,R[0],R[1],R[2],t)},oe=function(e,t,n,r){var i=o.nodePathCache=o.nodePathCache||[],a=tHr(n===`polygon`?n+`,`+r.join(`,`):n,``+t,``+e,``+z),s=i[a],l,u=!1;return s==null?(l=new Path2D,i[a]=d.pathCache=l):(l=s,u=!0,d.pathCache=l),{path:l,cacheHit:u}},se=t.pstyle(`shape`).strValue,ce=t.pstyle(`shape-polygon-points`).pfValue;if(m){e.translate(f.x,f.y);var le=oe(s,l,se,ce);h=le.path,g=le.cacheHit}var ue=function(){if(!g){var n=f;m&&(n={x:0,y:0}),o.nodeShapes[o.getNodeShape(t)].draw(h||e,n.x,n.y,s,l,z,d)}m?e.fill(h):e.fill()},de=function(){for(var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=u.backgrounding,a=0,s=0;s0&&arguments[0]!==void 0&&arguments[0],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasPie(t)&&(o.drawPie(e,t,r),n&&(m||o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,s,l,z,d)))},pe=function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasStripe(t)&&(e.save(),m?e.clip(d.pathCache):(o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,s,l,z,d),e.clip()),o.drawStripe(e,t,r),e.restore(),n&&(m||o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,s,l,z,d)))},me=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,n=(E>0?E:-E)*t,r=E>0?0:255;E!==0&&(o.colorFillStyle(e,r,r,r,n),m?e.fill(h):e.fill())},he=function(){if(D>0){if(e.lineWidth=D,e.lineCap=M,e.lineJoin=j,e.setLineDash)switch(A){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash(P),e.lineDashOffset=F;break;case`solid`:case`double`:e.setLineDash([])}if(N!==`center`){if(e.save(),e.lineWidth*=2,N===`inside`)m?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-s/2-D,-l/2-D,s+2*D,l+2*D),t.addPath(h),e.clip(t,`evenodd`)}m?e.stroke(h):e.stroke(),e.restore()}else m?e.stroke(h):e.stroke();if(A===`double`){e.lineWidth=D/3;var n=e.globalCompositeOperation;e.globalCompositeOperation=`destination-out`,m?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},ge=function(){if(L>0){if(e.lineWidth=L,e.lineCap=`butt`,e.setLineDash)switch(ee){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash([4,2]);break;case`solid`:case`double`:e.setLineDash([])}var n=f;m&&(n={x:0,y:0});var r=o.getNodeShape(t),i=D;N===`inside`&&(i=0),N===`outside`&&(i*=2);var a=(s+i+(L+ne))/s,u=(l+i+(L+ne))/l,d=s*a,p=l*u,h=o.nodeShapes[r].points,g;if(m&&(g=oe(d,p,r,h).path),r===`ellipse`)o.drawEllipsePath(g||e,n.x,n.y,d,p);else if([`round-diamond`,`round-heptagon`,`round-hexagon`,`round-octagon`,`round-pentagon`,`round-polygon`,`round-triangle`,`round-tag`].includes(r)){var _=0,v=0,y=0;r===`round-diamond`?_=(i+ne+L)*1.4:r===`round-heptagon`?(_=(i+ne+L)*1.075,y=-(i/2+ne+L)/35):r===`round-hexagon`?_=(i+ne+L)*1.12:r===`round-pentagon`?(_=(i+ne+L)*1.13,y=-(i/2+ne+L)/15):r===`round-tag`?(_=(i+ne+L)*1.12,v=(i/2+L+ne)*.07):r===`round-triangle`&&(_=(i+ne+L)*(Math.PI/2),y=-(i+ne/2+L)/Math.PI),_!==0&&(a=(s+_)/s,d=s*a,[`round-hexagon`,`round-tag`].includes(r)||(u=(l+_)/l,p=l*u)),z=z===`auto`?SUr(d,p):z;for(var b=d/2,x=p/2,S=z+(i+L+ne)/2,C=Array(h.length/2),w=Array(h.length/2),T=0;T0){if(r=r||n.position(),i==null||a==null){var p=n.padding();i=n.width()+2*p,a=n.height()+2*p}o.colorFillStyle(t,u[0],u[1],u[2],l),o.nodeShapes[d].draw(t,r.x,r.y,i+s*2,a+s*2,f),t.fill()}}}},cK.drawNodeOverlay=fXr(`overlay`),cK.drawNodeUnderlay=fXr(`underlay`),cK.hasPie=function(e){return e=e[0],e._private.hasPie},cK.hasStripe=function(e){return e=e[0],e._private.hasStripe},cK.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),a=t.pstyle(`pie-size`),o=t.pstyle(`pie-hole`),s=t.pstyle(`pie-start-angle`).pfValue,l=r.x,u=r.y,d=t.width(),f=t.height(),p=Math.min(d,f)/2,m,h=0;if(this.usePaths()&&(l=0,u=0),a.units===`%`?p*=a.pfValue:a.pfValue!==void 0&&(p=a.pfValue/2),o.units===`%`?m=p*o.pfValue:o.pfValue!==void 0&&(m=o.pfValue/2),!(m>=p))for(var g=1;g<=i.pieBackgroundN;g++){var _=t.pstyle(`pie-`+g+`-background-size`).value,v=t.pstyle(`pie-`+g+`-background-color`).value,y=t.pstyle(`pie-`+g+`-background-opacity`).value*n,b=_/100;b+h>1&&(b=1-h);var x=1.5*Math.PI+2*Math.PI*h;x+=s;var S=2*Math.PI*b,C=x+S;_===0||h>=1||h+b>1||(m===0?(e.beginPath(),e.moveTo(l,u),e.arc(l,u,p,x,C),e.closePath()):(e.beginPath(),e.arc(l,u,p,x,C),e.arc(l,u,m,C,x,!0),e.closePath()),this.colorFillStyle(e,v[0],v[1],v[2],y),e.fill(),h+=b)}},cK.drawStripe=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),a=r.x,o=r.y,s=t.width(),l=t.height(),u=0,d=this.usePaths();e.save();var f=t.pstyle(`stripe-direction`).value,p=t.pstyle(`stripe-size`);switch(f){case`vertical`:break;case`righward`:e.rotate(-Math.PI/2)}var m=s,h=l;p.units===`%`?(m*=p.pfValue,h*=p.pfValue):p.pfValue!==void 0&&(m=p.pfValue,h=p.pfValue),d&&(a=0,o=0),o-=m/2,a-=h/2;for(var g=1;g<=i.stripeBackgroundN;g++){var _=t.pstyle(`stripe-`+g+`-background-size`).value,v=t.pstyle(`stripe-`+g+`-background-color`).value,y=t.pstyle(`stripe-`+g+`-background-opacity`).value*n,b=_/100;b+u>1&&(b=1-u),!(_===0||u>=1||u+b>1)&&(e.beginPath(),e.rect(a,o+h*u,m,h*b),e.closePath(),this.colorFillStyle(e,v[0],v[1],v[2],y),e.fill(),u+=b)}e.restore()},lK={},pXr=100,lK.getPixelRatio=function(){var e=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},lK.paintCache=function(e){for(var t=this.paintCaches=this.paintCaches||[],n=!0,r,i=0;it.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!f&&(d[t.NODE]=!0,d[t.SELECT_BOX]=!0);var y=n.style(),b=n.zoom(),x=o===void 0?b:o,S=n.pan(),C={x:S.x,y:S.y},w={zoom:b,pan:{x:S.x,y:S.y}},T=t.prevViewport;T!==void 0&&w.zoom===T.zoom&&w.pan.x===T.pan.x&&w.pan.y===T.pan.y&&(!g||h)&&(t.motionBlurPxRatio=1),s&&(C=s),x*=l,C.x*=l,C.y*=l;var E=t.getCachedZSortedEles();function D(e,n,r,i,a){var o=e.globalCompositeOperation;e.globalCompositeOperation=`destination-out`,t.colorFillStyle(e,255,255,255,t.motionBlurTransparency),e.fillRect(n,r,i,a),e.globalCompositeOperation=o}function O(e,n){var a,l,d,f;!t.clearingMotionBlur&&(e===u.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]||e===u.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG])?(a={x:S.x*m,y:S.y*m},l=b*m,d=t.canvasWidth*m,f=t.canvasHeight*m):(a=C,l=x,d=t.canvasWidth,f=t.canvasHeight),e.setTransform(1,0,0,1,0,0),n===`motionBlur`?D(e,0,0,d,f):!r&&(n===void 0||n)&&e.clearRect(0,0,d,f),i||(e.translate(a.x,a.y),e.scale(l,l)),s&&e.translate(s.x,s.y),o&&e.scale(o,o)}if(f||(t.textureDrawLastFrame=!1),f){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=n.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var k=t.data.bufferContexts[t.TEXTURE_BUFFER];k.setTransform(1,0,0,1,0,0),k.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:k,drawOnlyNodeLayer:!0,forcedPxRatio:l*t.textureMult});var w=t.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:t.canvasWidth,height:t.canvasHeight};w.mpan={x:(0-w.pan.x)/w.zoom,y:(0-w.pan.y)/w.zoom}}d[t.DRAG]=!1,d[t.NODE]=!1;var A=u.contexts[t.NODE],j=t.textureCache.texture,w=t.textureCache.viewport;A.setTransform(1,0,0,1,0,0),p?D(A,0,0,w.width,w.height):A.clearRect(0,0,w.width,w.height);var M=y.core(`outside-texture-bg-color`).value,N=y.core(`outside-texture-bg-opacity`).value;t.colorFillStyle(A,M[0],M[1],M[2],N),A.fillRect(0,0,w.width,w.height);var b=n.zoom();O(A,!1),A.clearRect(w.mpan.x,w.mpan.y,w.width/w.zoom/l,w.height/w.zoom/l),A.drawImage(j,w.mpan.x,w.mpan.y,w.width/w.zoom/l,w.height/w.zoom/l)}else t.textureOnViewport&&!r&&(t.textureCache=null);var P=n.extent(),F=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),I=t.hideEdgesOnViewport&&F,L=[];if(L[t.NODE]=!d[t.NODE]&&p&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,L[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),L[t.DRAG]=!d[t.DRAG]&&p&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,L[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),d[t.NODE]||i||a||L[t.NODE]){var R=p&&!L[t.NODE]&&m!==1,A=r||(R?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:u.contexts[t.NODE]);O(A,p&&!R?`motionBlur`:void 0),I?t.drawCachedNodes(A,E.nondrag,l,P):t.drawLayeredElements(A,E.nondrag,l,P),t.debug&&t.drawDebugPoints(A,E.nondrag),!i&&!p&&(d[t.NODE]=!1)}if(!a&&(d[t.DRAG]||i||L[t.DRAG])){var R=p&&!L[t.DRAG]&&m!==1,A=r||(R?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:u.contexts[t.DRAG]);O(A,p&&!R?`motionBlur`:void 0),I?t.drawCachedNodes(A,E.drag,l,P):t.drawCachedElements(A,E.drag,l,P),t.debug&&t.drawDebugPoints(A,E.drag),!i&&!p&&(d[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,O),p&&m!==1){var ee=u.contexts[t.NODE],te=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],ne=u.contexts[t.DRAG],z=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],re=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!v?e.clearRect(0,0,t.canvasWidth,t.canvasHeight):D(e,0,0,t.canvasWidth,t.canvasHeight);var i=m;e.drawImage(n,0,0,t.canvasWidth*i,t.canvasHeight*i,0,0,t.canvasWidth,t.canvasHeight)};(d[t.NODE]||L[t.NODE])&&(re(ee,te,L[t.NODE]),d[t.NODE]=!1),(d[t.DRAG]||L[t.DRAG])&&(re(ne,z,L[t.DRAG]),d[t.DRAG]=!1)}t.prevViewport=w,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),p&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!f,t.mbFrames=0,d[t.NODE]=!0,d[t.DRAG]=!0,t.redraw()},pXr)),r||n.emit(`render`)},lK.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,i=n.data,a=r.style(),o=e.drawOnlyNodeLayer,s=e.drawAllLayers,l=i.canvasNeedsRedraw,u=e.forcedContext;if(n.showFps||!o&&l[n.SELECT_BOX]&&!s){var d=u||i.contexts[n.SELECT_BOX];if(t(d),n.selection[4]==1&&(n.hoverData.selecting||n.touchData.selecting)){var f=n.cy.zoom(),p=a.core(`selection-box-border-width`).value/f;d.lineWidth=p,d.fillStyle=`rgba(`+a.core(`selection-box-color`).value[0]+`,`+a.core(`selection-box-color`).value[1]+`,`+a.core(`selection-box-color`).value[2]+`,`+a.core(`selection-box-opacity`).value+`)`,d.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),p>0&&(d.strokeStyle=`rgba(`+a.core(`selection-box-border-color`).value[0]+`,`+a.core(`selection-box-border-color`).value[1]+`,`+a.core(`selection-box-border-color`).value[2]+`,`+a.core(`selection-box-opacity`).value+`)`,d.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(i.bgActivePosistion&&!n.hoverData.selecting){var f=n.cy.zoom(),m=i.bgActivePosistion;d.fillStyle=`rgba(`+a.core(`active-bg-color`).value[0]+`,`+a.core(`active-bg-color`).value[1]+`,`+a.core(`active-bg-color`).value[2]+`,`+a.core(`active-bg-opacity`).value+`)`,d.beginPath(),d.arc(m.x,m.y,a.core(`active-bg-size`).pfValue/f,0,2*Math.PI),d.fill()}var h=n.lastRedrawTime;if(n.showFps&&h){h=Math.round(h);var g=Math.round(1e3/h),_=`1 frame = `+h+` ms = `+g+` fps`;d.setTransform(1,0,0,1,0,0),d.fillStyle=`rgba(255, 0, 0, 0.75)`,d.strokeStyle=`rgba(255, 0, 0, 0.75)`,d.font=`30px Arial`,uK||(uK=d.measureText(_).actualBoundingBoxAscent),d.fillText(_,0,uK),d.strokeRect(0,uK+10,250,20),d.fillRect(0,uK+10,250*Math.min(g/60,1),20)}s||(l[n.SELECT_BOX]=!1)}},mXr=typeof Float32Array<`u`?Float32Array:Array,Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),hXr=function(){function e(t,n,r,i){UH(this,e),this.debugID=Math.floor(Math.random()*1e4),this.r=t,this.texSize=n,this.texRows=r,this.texHeight=Math.floor(n/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,n,n),this.scratch=i(t,n,this.texHeight,`scratch`)}return WH(e,[{key:`lock`,value:function(){this.locked=!0}},{key:`getKeys`,value:function(){return new Set(this.keyToLocation.keys())}},{key:`getScale`,value:function(e){var t=e.w,n=e.h,r=this.texHeight,i=this.texSize,a=r/n,o=t*a,s=n*a;return o>i&&(a=i/t,o=t*a,s=n*a),{scale:a,texW:o,texH:s}}},{key:`draw`,value:function(e,t,n){var r=this;if(this.locked)throw Error(`can't draw, atlas is locked`);var i=this.texSize,a=this.texRows,o=this.texHeight,s=this.getScale(t),l=s.scale,u=s.texW,d=s.texH,f=function(e,r){if(n&&r){var i=r.context,a=e.x,s=e.row,u=a,d=o*s;i.save(),i.translate(u,d),i.scale(l,l),n(i,t),i.restore()}},p=[null,null],m=function(){f(r.freePointer,r.canvas),p[0]={x:r.freePointer.x,y:r.freePointer.row*o,w:u,h:d},p[1]={x:r.freePointer.x+u,y:r.freePointer.row*o,w:0,h:d},r.freePointer.x+=u,r.freePointer.x==i&&(r.freePointer.x=0,r.freePointer.row++)},h=function(){var e=r.scratch,t=r.canvas;e.clear(),f({x:0,row:0},e);var n=i-r.freePointer.x,a=u-n,s=o,l=r.freePointer.x,m=r.freePointer.row*o,h=n;t.context.drawImage(e,0,0,h,s,l,m,h,s),p[0]={x:l,y:m,w:h,h:d};var g=n,_=(r.freePointer.row+1)*o,v=a;t&&t.context.drawImage(e,g,0,v,s,0,_,v,s),p[1]={x:0,y:_,w:v,h:d},r.freePointer.x=a,r.freePointer.row++},g=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+u<=i)m();else if(this.freePointer.row>=a-1)return!1;else this.freePointer.x===i?(g(),m()):this.enableWrapping?h():(g(),m());return this.keyToLocation.set(e,p),this.needsBuffer=!0,p}},{key:`getOffsets`,value:function(e){return this.keyToLocation.get(e)}},{key:`isEmpty`,value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:`canFit`,value:function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return this.freePointer.x+r>t?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},r=n.forceRedraw,i=r!==void 0&&r,a=n.filterEle,o=a===void 0?function(){return!0}:a,s=n.filterType,l=s===void 0?function(){return!0}:s,u=!1,d=!1,f=GH(e),p;try{for(f.s();!(p=f.n()).done;){var m=p.value;if(o(m)){var h=GH(this.renderTypes.values()),g;try{var _=function(){var e=g.value,n=e.type;if(l(n)){var r=t.collections.get(e.collection),a=e.getKey(m),o=Array.isArray(a)?a:[a];if(i)o.forEach(function(e){return r.markKeyForGC(e)}),d=!0;else{var s=e.getID?e.getID(m):m.id(),f=t._key(n,s),p=t.typeAndIdToKey.get(f);p!==void 0&&!tBr(o,p)&&(u=!0,t.typeAndIdToKey.delete(f),p.forEach(function(e){return r.markKeyForGC(e)}))}}};for(h.s();!(g=h.n()).done;)_()}catch(e){h.e(e)}finally{h.f()}}}}catch(e){f.e(e)}finally{f.f()}return d&&(this.gc(),u=!1),u}},{key:`gc`,value:function(){var e=GH(this.collections.values()),t;try{for(e.s();!(t=e.n()).done;)t.value.gc()}catch(t){e.e(t)}finally{e.f()}}},{key:`getOrCreateAtlas`,value:function(e,t,n,r){var i=this.renderTypes.get(t),a=this.collections.get(i.collection),o=!1,s=a.draw(r,n,function(t){i.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),i.drawElement(t,e,n,!0,!0),t.restore()):i.drawElement(t,e,n,!0,!0),o=!0});if(o){var l=i.getID?i.getID(e):e.id(),u=this._key(t,l);this.typeAndIdToKey.has(u)?this.typeAndIdToKey.get(u).push(r):this.typeAndIdToKey.set(u,[r])}return s}},{key:`getAtlasInfo`,value:function(e,t){var n=this,r=this.renderTypes.get(t),i=r.getKey(e);return(Array.isArray(i)?i:[i]).map(function(i){var a=r.getBoundingBox(e,i),o=n.getOrCreateAtlas(e,t,a,i),s=KH(o.getOffsets(i),2),l=s[0];return{atlas:o,tex:l,tex1:l,tex2:s[1],bb:a}})}},{key:`getDebugInfo`,value:function(){var e=[],t=GH(this.collections),n;try{for(t.s();!(n=t.n()).done;){var r=KH(n.value,2),i=r[0],a=r[1].getCounts(),o=a.keyCount,s=a.atlasCount;e.push({type:i,keyCount:o,atlasCount:s})}}catch(e){t.e(e)}finally{t.f()}return e}}])}(),vXr=function(){function e(t){UH(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]}return WH(e,[{key:`getMaxAtlasesPerBatch`,value:function(){return this.maxAtlasesPerBatch}},{key:`getAtlasSize`,value:function(){return this.atlasSize}},{key:`getIndexArray`,value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})}},{key:`startBatch`,value:function(){this.batchAtlases=[]}},{key:`getAtlasCount`,value:function(){return this.batchAtlases.length}},{key:`getAtlases`,value:function(){return this.batchAtlases}},{key:`canAddToCurrentBatch`,value:function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)}},{key:`getAtlasIndexForBatch`,value:function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw Error(`cannot add more atlases to batch`);this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t}}])}(),yXr=` float circleSD(vec2 p, float r) { return distance(vec2(0), p) - r; // signed distance } `,bXr=` float rectangleSD(vec2 p, vec2 b) { vec2 d = abs(p)-b; return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); } `,xXr=` float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; cr.x = (p.y > 0.0) ? cr.x : cr.y; vec2 q = abs(p) - b + cr.x; return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; } `,SXr=` float ellipseSD(vec2 p, vec2 ab) { p = abs( p ); // symmetry // find root with Newton solver vec2 q = ab*(p-ab); float w = (q.x1.0) ? d : -d; } `,dK={SCREEN:{name:`screen`,screen:!0},PICKING:{name:`picking`,picking:!0}},fK={IGNORE:1,USE_BB:2},CXr=0,wXr=1,TXr=2,EXr=3,pK=4,mK=5,hK=6,gK=7,DXr=function(){function e(t,n,r){UH(this,e),this.r=t,this.gl=n,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=Xzr,this.atlasManager=new _Xr(t,r),this.batchManager=new vXr(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(dK.SCREEN),this.pickingProgram=this._createShaderProgram(dK.PICKING),this.vao=this._createVAO()}return WH(e,[{key:`addAtlasCollection`,value:function(e,t){this.atlasManager.addAtlasCollection(e,t)}},{key:`addTextureAtlasRenderType`,value:function(e,t){this.atlasManager.addRenderType(e,t)}},{key:`addSimpleShapeRenderType`,value:function(e,t){this.simpleShapeOptions.set(e,t)}},{key:`invalidate`,value:function(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).type,n=this.atlasManager;return t?n.invalidate(e,{filterType:function(e){return e===t},forceRedraw:!0}):n.invalidate(e)}},{key:`gc`,value:function(){this.atlasManager.gc()}},{key:`_createShaderProgram`,value:function(e){var t=this.gl,n=`#version 300 es precision highp float; uniform mat3 uPanZoomMatrix; uniform int uAtlasSize; // instanced in vec2 aPosition; // a vertex from the unit square in mat3 aTransform; // used to transform verticies, eg into a bounding box in int aVertType; // the type of thing we are rendering // the z-index that is output when using picking mode in vec4 aIndex; // For textures in int aAtlasId; // which shader unit/atlas to use in vec4 aTex; // x/y/w/h of texture in atlas // for edges in vec4 aPointAPointB; in vec4 aPointCPointD; in vec2 aLineWidth; // also used for node border width // simple shapes in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left] in vec4 aColor; // also used for edges in vec4 aBorderColor; // aLineWidth is used for border width // output values passed to the fragment shader out vec2 vTexCoord; out vec4 vColor; out vec2 vPosition; // flat values are not interpolated flat out int vAtlasId; flat out int vVertType; flat out vec2 vTopRight; flat out vec2 vBotLeft; flat out vec4 vCornerRadius; flat out vec4 vBorderColor; flat out vec2 vBorderWidth; flat out vec4 vIndex; void main(void) { int vid = gl_VertexID; vec2 position = aPosition; // TODO make this a vec3, simplifies some code below if(aVertType == ${CXr}) { float texX = aTex.x; // texture coordinates float texY = aTex.y; float texW = aTex.z; float texH = aTex.w; if(vid == 1 || vid == 2 || vid == 4) { texX += texW; } if(vid == 2 || vid == 4 || vid == 5) { texY += texH; } float d = float(uAtlasSize); vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } else if(aVertType == ${pK} || aVertType == ${gK} || aVertType == ${mK} || aVertType == ${hK}) { // simple shapes // the bounding box is needed by the fragment shader vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated // calculations are done in the fragment shader, just pass these along vColor = aColor; vCornerRadius = aCornerRadius; vBorderColor = aBorderColor; vBorderWidth = aLineWidth; gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } else if(aVertType == ${wXr}) { vec2 source = aPointAPointB.xy; vec2 target = aPointAPointB.zw; // adjust the geometry so that the line is centered on the edge position.y = position.y - 0.5; // stretch the unit square into a long skinny rectangle vec2 xBasis = target - source; vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y; gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); vColor = aColor; } else if(aVertType == ${TXr}) { vec2 pointA = aPointAPointB.xy; vec2 pointB = aPointAPointB.zw; vec2 pointC = aPointCPointD.xy; vec2 pointD = aPointCPointD.zw; // adjust the geometry so that the line is centered on the edge position.y = position.y - 0.5; vec2 p0, p1, p2, pos; if(position.x == 0.0) { // The left side of the unit square p0 = pointA; p1 = pointB; p2 = pointC; pos = position; } else { // The right side of the unit square, use same approach but flip the geometry upside down p0 = pointD; p1 = pointC; p2 = pointB; pos = vec2(0.0, -position.y); } vec2 p01 = p1 - p0; vec2 p12 = p2 - p1; vec2 p21 = p1 - p2; // Find the normal vector. vec2 tangent = normalize(normalize(p12) + normalize(p01)); vec2 normal = vec2(-tangent.y, tangent.x); // Find the vector perpendicular to p0 -> p1. vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); // Determine the bend direction. float sigma = sign(dot(p01 + p21, normal)); float width = aLineWidth[0]; if(sign(pos.y) == -sigma) { // This is an intersecting vertex. Adjust the position so that there's no overlap. vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } else { // This is a non-intersecting vertex. Treat it like a mitre join. vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } vColor = aColor; } else if(aVertType == ${EXr} && vid < 3) { // massage the first triangle into an edge arrow if(vid == 0) position = vec2(-0.15, -0.3); if(vid == 1) position = vec2( 0.0, 0.0); if(vid == 2) position = vec2( 0.15, -0.3); gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); vColor = aColor; } else { gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space } vAtlasId = aAtlasId; vVertType = aVertType; vIndex = aIndex; } `,r=this.batchManager.getIndexArray(),i=Yzr(t,n,`#version 300 es precision highp float; // declare texture unit for each texture atlas in the batch ${r.map(function(e){return`uniform sampler2D uTexture${e};`}).join(` `)} uniform vec4 uBGColor; uniform float uZoom; in vec2 vTexCoord; in vec4 vColor; in vec2 vPosition; // model coordinates flat in int vAtlasId; flat in vec4 vIndex; flat in int vVertType; flat in vec2 vTopRight; flat in vec2 vBotLeft; flat in vec4 vCornerRadius; flat in vec4 vBorderColor; flat in vec2 vBorderWidth; out vec4 outColor; ${yXr} ${bXr} ${xXr} ${SXr} vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha return vec4( top.rgb + (bot.rgb * (1.0 - top.a)), top.a + (bot.a * (1.0 - top.a)) ); } vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance // scale to the zoom level so that borders don't look blurry when zoomed in // note 1.5 is an aribitrary value chosen because it looks good return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); } void main(void) { if(vVertType == ${CXr}) { // look up the texel from the texture unit ${r.map(function(e){return`if(vAtlasId == ${e}) outColor = texture(uTexture${e}, vTexCoord);`}).join(` else `)} } else if(vVertType == ${EXr}) { // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; outColor = blend(vColor, uBGColor); outColor.a = 1.0; // make opaque, masks out line under arrow } else if(vVertType == ${pK} && vBorderWidth == vec2(0.0)) { // simple rectangle with no border outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done } else if(vVertType == ${pK} || vVertType == ${gK} || vVertType == ${mK} || vVertType == ${hK}) { // use SDF float outerBorder = vBorderWidth[0]; float innerBorder = vBorderWidth[1]; float borderPadding = outerBorder * 2.0; float w = vTopRight.x - vBotLeft.x - borderPadding; float h = vTopRight.y - vBotLeft.y - borderPadding; vec2 b = vec2(w/2.0, h/2.0); // half width, half height vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center float d; // signed distance if(vVertType == ${pK}) { d = rectangleSD(p, b); } else if(vVertType == ${gK} && w == h) { d = circleSD(p, b.x); // faster than ellipse } else if(vVertType == ${gK}) { d = ellipseSD(p, b); } else { d = roundRectangleSD(p, b, vCornerRadius.wzyx); } // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box if(d > 0.0) { if(d > outerBorder) { discard; } else { outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); } } else { if(d > innerBorder) { vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; vec4 innerBorderColor = blend(vBorderColor, vColor); outColor = distInterp(innerBorderColor, outerColor, d); } else { vec4 outerColor; if(innerBorder == 0.0 && outerBorder == 0.0) { outerColor = vec4(0); } else if(innerBorder == 0.0) { outerColor = vBorderColor; } else { outerColor = blend(vBorderColor, vColor); } outColor = distInterp(vColor, outerColor, d - innerBorder); } } } else { outColor = vColor; } ${e.picking?`if(outColor.a == 0.0) discard; else outColor = vIndex;`:``} } `);i.aPosition=t.getAttribLocation(i,`aPosition`),i.aIndex=t.getAttribLocation(i,`aIndex`),i.aVertType=t.getAttribLocation(i,`aVertType`),i.aTransform=t.getAttribLocation(i,`aTransform`),i.aAtlasId=t.getAttribLocation(i,`aAtlasId`),i.aTex=t.getAttribLocation(i,`aTex`),i.aPointAPointB=t.getAttribLocation(i,`aPointAPointB`),i.aPointCPointD=t.getAttribLocation(i,`aPointCPointD`),i.aLineWidth=t.getAttribLocation(i,`aLineWidth`),i.aColor=t.getAttribLocation(i,`aColor`),i.aCornerRadius=t.getAttribLocation(i,`aCornerRadius`),i.aBorderColor=t.getAttribLocation(i,`aBorderColor`),i.uPanZoomMatrix=t.getUniformLocation(i,`uPanZoomMatrix`),i.uAtlasSize=t.getUniformLocation(i,`uAtlasSize`),i.uBGColor=t.getUniformLocation(i,`uBGColor`),i.uZoom=t.getUniformLocation(i,`uZoom`),i.uTextures=[];for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:dK.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:`startBatch`,value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:`endFrame`,value:function(){this.endBatch()}},{key:`_isVisible`,value:function(e,t){return e.visible()?t&&t.isVisible?t.isVisible(e):!0:!1}},{key:`drawTexture`,value:function(e,t,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(e,a)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var o=a.getTexPickingMode(e);if(o===fK.IGNORE)return;if(o==fK.USE_BB){this.drawPickingRectangle(e,t,n);return}}var s=GH(r.getAtlasInfo(e,n)),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=u.atlas,f=u.tex1,p=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var m=i.getAtlasIndexForBatch(d),h=0,g=[[f,!0],[p,!1]];h=this.maxInstances&&this.endBatch()}}}}catch(e){s.e(e)}finally{s.f()}}}},{key:`setTransformMatrix`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=0;if(n.shapeProps&&n.shapeProps.padding&&(a=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,l=r.tex2,u=s.w/(s.w+l.w);i||(u=1-u);var d=this._getAdjustedBB(o,a,i,u);this._applyTransformMatrix(t,d,n,e)}else{var f=n.getBoundingBox(e),p=this._getAdjustedBB(f,a,!0,1);this._applyTransformMatrix(t,p,n,e)}}},{key:`_applyTransformMatrix`,value:function(e,t,n,r){var i,a;dBr(e);var o=n.getRotation?n.getRotation(r):0;if(o!==0){var s=n.getRotationPoint(r),l=s.x,u=s.y;pBr(e,e,[l,u]),mBr(e,e,o);var d=n.getRotationOffset(r);i=d.x+(t.xOffset||0),a=d.y+(t.yOffset||0)}else i=t.x1,a=t.y1;pBr(e,e,[i,a]),hBr(e,e,[t.w,t.h])}},{key:`_getAdjustedBB`,value:function(e,t,n,r){var i=e.x1,a=e.y1,o=e.w,s=e.h,l=e.yOffset;t&&(i-=t,a-=t,o+=2*t,s+=2*t);var u=0,d=o*r;return n&&r<1?o=d:!n&&r<1&&(u=o-d,i+=u,o=d),{x1:i,y1:a,w:o,h:s,xOffset:u,yOffset:l}}},{key:`drawPickingRectangle`,value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=pK,rU(t,this.indexBuffer.getView(i)),nU([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(e,a,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:`drawNode`,value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var i=r.shapeProps,a=this._getVertTypeForShape(e,i.shape);if(a===void 0||r.isSimple&&!r.isSimple(e,this.renderTarget))this.drawTexture(e,t,n);else{var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=a,a===mK||a===hK){var s=r.getBoundingBox(e),l=this._getCornerRadius(e,i.radius,s),u=this.cornerRadiusBuffer.getView(o);u[0]=l,u[1]=l,u[2]=l,u[3]=l,a===hK&&(u[0]=0,u[2]=0)}rU(t,this.indexBuffer.getView(o));var d=this.renderTarget.picking?1:n===`node-body`?e.effectiveOpacity():1,f=this.renderTarget.picking?1:e.pstyle(i.opacity).value*d,p=e.pstyle(i.color).value;nU(p,f,this.colorBuffer.getView(o));var m=this.lineWidthBuffer.getView(o);if(m[0]=0,m[1]=0,i.border){var h=e.pstyle(`border-width`).value;if(h>0){var g=e.pstyle(`border-color`).value;nU(g,d*e.pstyle(`border-opacity`).value,this.borderColorBuffer.getView(o));var _=e.pstyle(`border-position`).value;if(_===`inside`)m[0]=0,m[1]=-h;else if(_===`outside`)m[0]=h,m[1]=0;else{var v=h/2;m[0]=v,m[1]=-v}}}var y=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,y,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:`_getVertTypeForShape`,value:function(e,t){switch(e.pstyle(t).value){case`rectangle`:return pK;case`ellipse`:return gK;case`roundrectangle`:case`round-rectangle`:return mK;case`bottom-round-rectangle`:return hK;default:return}}},{key:`_getCornerRadius`,value:function(e,t,n){var r=n.w,i=n.h;if(e.pstyle(t).value===`auto`)return pW(r,i);var a=e.pstyle(t).pfValue,o=r/2,s=i/2;return Math.min(a,s,o)}},{key:`drawEdgeArrow`,value:function(e,t,n){if(e.visible()){var r=e._private.rscratch,i,a,o;if(n===`source`?(i=r.arrowStartX,a=r.arrowStartY,o=r.srcArrowAngle):(i=r.arrowEndX,a=r.arrowEndY,o=r.tgtArrowAngle),!(isNaN(i)||i==null||isNaN(a)||a==null||isNaN(o)||o==null)&&e.pstyle(n+`-arrow-shape`).value!==`none`){var s=e.pstyle(n+`-arrow-color`).value,l=e.pstyle(`opacity`).value*e.pstyle(`line-opacity`).value,u=e.pstyle(`width`).pfValue,d=e.pstyle(`arrow-scale`).value,f=this.r.getArrowWidth(u,d),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);dBr(m),pBr(m,m,[i,a]),hBr(m,m,[f,f]),mBr(m,m,o),this.vertTypeBuffer.getView(p)[0]=EXr,rU(t,this.indexBuffer.getView(p)),nU(s,l,this.colorBuffer.getView(p)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:`drawEdgeLine`,value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle(`opacity`).value,i=e.pstyle(`line-opacity`).value,a=e.pstyle(`width`).pfValue,o=e.pstyle(`line-color`).value,s=r*i;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=wXr,rU(t,this.indexBuffer.getView(l)),nU(o,s,this.colorBuffer.getView(l));var u=this.lineWidthBuffer.getView(l);u[0]=a;var d=this.pointAPointBBuffer.getView(l);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var f=0;f=this.maxInstances&&this.endBatch()}}}}},{key:`_isValidEdge`,value:function(e){var t=e._private.rscratch;return!(t.badLine||t.allpts==null||isNaN(t.allpts[0]))}},{key:`_getEdgePoints`,value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(n.length==4)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:`_getNumSegments`,value:function(e){return Math.min(15,this.maxInstances)}},{key:`_getCurveSegmentPoints`,value:function(e,t){if(e.length==4)return e;for(var n=Array((t+1)*2),r=0;r<=t;r++)if(r==0)n[0]=e[0],n[1]=e[1];else if(r==t)n[r*2]=e[e.length-2],n[r*2+1]=e[e.length-1];else{var i=r/t;this._setCurvePoint(e,i,n,r*2)}return n}},{key:`_setCurvePoint`,value:function(e,t,n,r){if(e.length<=2)n[r]=e[0],n[r+1]=e[1];else{for(var i=Array(e.length-2),a=0;a0}},s=function(e){return e.pstyle(`text-events`).strValue===`yes`?fK.USE_BB:fK.IGNORE},l=function(e){var t=e.position(),n=t.x,r=t.y,i=e.outerWidth(),a=e.outerHeight();return{w:i,h:a,x1:n-i/2,y1:r-a/2}};n.drawing.addAtlasCollection(`node`,{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection(`label`,{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType(`node-body`,{collection:`node`,getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType(`node-body`,{getBoundingBox:l,isSimple:eBr,shapeProps:{shape:`shape`,color:`background-color`,opacity:`background-opacity`,radius:`corner-radius`,border:!0}}),n.drawing.addSimpleShapeRenderType(`node-overlay`,{getBoundingBox:l,isVisible:o(`overlay`),shapeProps:{shape:`overlay-shape`,color:`overlay-color`,opacity:`overlay-opacity`,padding:`overlay-padding`,radius:`overlay-corner-radius`}}),n.drawing.addSimpleShapeRenderType(`node-underlay`,{getBoundingBox:l,isVisible:o(`underlay`),shapeProps:{shape:`underlay-shape`,color:`underlay-color`,opacity:`underlay-opacity`,padding:`underlay-padding`,radius:`underlay-corner-radius`}}),n.drawing.addTextureAtlasRenderType(`label`,{collection:`label`,getTexPickingMode:s,getKey:kXr(t.getLabelKey,null),getBoundingBox:AXr(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a(`label`)}),n.drawing.addTextureAtlasRenderType(`edge-source-label`,{collection:`label`,getTexPickingMode:s,getKey:kXr(t.getSourceLabelKey,`source`),getBoundingBox:AXr(t.getSourceLabelBox,`source`),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i(`source`),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a(`source-label`)}),n.drawing.addTextureAtlasRenderType(`edge-target-label`,{collection:`label`,getTexPickingMode:s,getKey:kXr(t.getTargetLabelKey,`target`),getBoundingBox:AXr(t.getTargetLabelBox,`target`),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i(`target`),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a(`target-label`)});var u=SU(function(){console.log(`garbage collect flag set`),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&u()}),bBr(n)},kXr=function(e,t){return function(n){var r=e(n),i=yBr(n,t);return i.length>1?i.map(function(e,t){return`${r}_${t}`}):r}},AXr=function(e,t){return function(n,r){var i=e(n);if(typeof r==`string`){var a=r.indexOf(`_`);if(a>0){var o=Number(r.substring(a+1)),s=yBr(n,t),l=i.h/s.length,u=l*o,d=i.y1+u;return{x1:i.x1,w:i.w,y1:d,h:l,yOffset:u}}}return i}},_K={},_K.drawPolygonPath=function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l0&&a>0){p.clearRect(0,0,i,a),p.globalCompositeOperation=`source-over`;var m=this.getCachedZSortedEles();if(e.full)p.translate(-n.x1*l,-n.y1*l),p.scale(l,l),this.drawElements(p,m),p.scale(1/l,1/l),p.translate(n.x1*l,n.y1*l);else{var h=t.pan(),g={x:h.x*l,y:h.y*l};l*=t.zoom(),p.translate(g.x,g.y),p.scale(l,l),this.drawElements(p,m),p.scale(1/l,1/l),p.translate(-g.x,-g.y)}e.bg&&(p.globalCompositeOperation=`destination-over`,p.fillStyle=e.bg,p.rect(0,0,i,a),p.fill())}return f},yK.png=function(e){return PBr(e,this.bufferCanvasImage(e),`image/png`)},yK.jpg=function(e){return PBr(e,this.bufferCanvasImage(e),`image/jpeg`)},IXr={},IXr.nodeShapeImpl=function(e,t,n,r,i,a,o,s){switch(e){case`ellipse`:return this.drawEllipsePath(t,n,r,i,a);case`polygon`:return this.drawPolygonPath(t,n,r,i,a,o);case`round-polygon`:return this.drawRoundPolygonPath(t,n,r,i,a,o,s);case`roundrectangle`:case`round-rectangle`:return this.drawRoundRectanglePath(t,n,r,i,a,s);case`cutrectangle`:case`cut-rectangle`:return this.drawCutRectanglePath(t,n,r,i,a,o,s);case`bottomroundrectangle`:case`bottom-round-rectangle`:return this.drawBottomRoundRectanglePath(t,n,r,i,a,s);case`barrel`:return this.drawBarrelPath(t,n,r,i,a)}},LXr=FBr,bK=FBr.prototype,bK.CANVAS_LAYERS=3,bK.SELECT_BOX=0,bK.DRAG=1,bK.NODE=2,bK.WEBGL=3,bK.CANVAS_TYPES=[`2d`,`2d`,`2d`,`webgl2`],bK.BUFFER_COUNT=3,bK.TEXTURE_BUFFER=0,bK.MOTIONBLUR_BUFFER_NODE=1,bK.MOTIONBLUR_BUFFER_DRAG=2,bK.redrawHint=function(e,t){var n=this;switch(e){case`eles`:n.data.canvasNeedsRedraw[bK.NODE]=t;break;case`drag`:n.data.canvasNeedsRedraw[bK.DRAG]=t;break;case`select`:n.data.canvasNeedsRedraw[bK.SELECT_BOX]=t;break;case`gc`:n.data.gc=!0}},RXr=typeof Path2D<`u`,bK.path2dEnabled=function(e){if(e===void 0)return this.pathsEnabled;this.pathsEnabled=!!e},bK.usePaths=function(){return RXr&&this.pathsEnabled},bK.setImgSmoothing=function(e,t){e.imageSmoothingEnabled==null?(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t):e.imageSmoothingEnabled=t},bK.getImgSmoothing=function(e){return e.imageSmoothingEnabled==null?e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled:e.imageSmoothingEnabled},bK.makeOffscreenCanvas=function(e,t){var n;return(typeof OffscreenCanvas>`u`?`undefined`:qH(OffscreenCanvas))===`undefined`?(n=this.cy.window().document.createElement(`canvas`),n.width=e,n.height=t):n=new OffscreenCanvas(e,t),n},[nXr,aK,oK,dXr,sK,cK,lK,OXr,_K,yK,IXr].forEach(function(e){bU(bK,e)}),zXr=[{type:`layout`,extensions:VJr},{type:`renderer`,extensions:[{name:`null`,impl:Izr},{name:`base`,impl:yYr},{name:`canvas`,impl:LXr}]}],BXr={},VXr={},HXr=function(){if(arguments.length===2)return LBr.apply(null,arguments);if(arguments.length===3)return IBr.apply(null,arguments);if(arguments.length===4)return zBr.apply(null,arguments);if(arguments.length===5)return RBr.apply(null,arguments);NU(`Invalid extension access syntax`)},DG.prototype.extension=HXr,zXr.forEach(function(e){e.extensions.forEach(function(t){IBr(e.type,t.name,t.impl)})}),xK=function(){if(!(this instanceof xK))return new xK;this.length=0},SK=xK.prototype,SK.instanceString=function(){return`stylesheet`},SK.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},SK.css=function(e,t){var n=this.length-1;if(sU(e))this[n].properties.push({name:e,value:t});else if(uU(e))for(var r=e,i=Object.keys(r),a=0;a{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(n,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),l=n(4);function u(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,this.rect=n!=null&&t!=null?new a(t.x,t.y,n.width,n.height):new a}for(var d in u.prototype=Object.create(r.prototype),r)u[d]=r[d];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},u.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),d=n(12),f=n(11);function p(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var m in p.prototype=Object.create(r.prototype),r)p[m]=r[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(t.owner!=n.owner||t.owner!=this)throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null},p.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(t.owner==null||t.owner!=this)throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&d>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(u,1),r.target!=r.source&&r.target.edges.splice(d,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},p.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,l=0;ln&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new d(this.left,this.top))},p.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,l,d,f,p=this.nodes,m=p.length,h=0;ho&&(t=o),nl&&(r=l),ao&&(t=o),nl&&(r=l),a=this.nodes.length){var l=0;n.forEach(function(t){t.owner==e&&l++}),l==this.nodes.length&&(this.isConnected=!0)}}},e.exports=p}),(function(e,t,n){var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(a==null||a.getGraphManager()!=this)throw`Source not in this graph mgr!`;if(o==null||o.getGraphManager()!=this)throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),n.source==null||n.target==null)throw`Edge source and/or target is null!`;if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(ia)return n[0]=s,n[1]=i,n[2]=v,n[3]=o,!1;if(ra?(n[0]=d,n[1]=f,w=!0):(n[0]=u,n[1]=l,w=!0):E===O&&(r>a?(n[0]=s,n[1]=l,w=!0):(n[0]=p,n[1]=f,w=!0)),-D===O?a>r?(n[2]=y,n[3]=b,T=!0):(n[2]=v,n[3]=_,T=!0):D===O&&(a>r?(n[2]=g,n[3]=_,T=!0):(n[2]=x,n[3]=b,T=!0)),w&&T)return!1;if(r>a?i>o?(k=this.getCardinalDirection(E,O,4),A=this.getCardinalDirection(D,O,2)):(k=this.getCardinalDirection(-E,O,3),A=this.getCardinalDirection(-D,O,1)):i>o?(k=this.getCardinalDirection(-E,O,1),A=this.getCardinalDirection(-D,O,3)):(k=this.getCardinalDirection(E,O,2),A=this.getCardinalDirection(D,O,4)),!w)switch(k){case 1:M=l,j=r+-h/O,n[0]=j,n[1]=M;break;case 2:j=p,M=i+m*O,n[0]=j,n[1]=M;break;case 3:M=f,j=r+h/O,n[0]=j,n[1]=M;break;case 4:j=d,M=i+-m*O,n[0]=j,n[1]=M}if(!T)switch(A){case 1:P=_,N=a+-C/O,n[2]=N,n[3]=P;break;case 2:N=x,P=o+S*O,n[2]=N,n[3]=P;break;case 3:P=b,N=a+C/O,n[2]=N,n[3]=P;break;case 4:N=y,P=o+-S*O,n[2]=N,n[3]=P}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,l=t.y,u=n.x,d=n.y,f=i.x,p=i.y,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;return g=l-o,v=a-s,b=s*o-a*l,_=p-d,y=u-f,x=f*d-u*p,S=g*y-_*v,S===0?null:(m=(v*x-y*b)/S,h=(_*b-g*x)/S,new r(m,h))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(u[0]);s.length>0&&t;){var d=s[0];s.splice(0,1),o.add(d);for(var f=d.getEdges(),a=0;a-1&&u.splice(g,1)}o=new Set,l=new Map}}return e},p.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(f,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&u.push(e),r.set(e,t)}})}n=n.concat(u),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},p.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=p}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(this.coolingFactor=e>a.ADAPTATION_LOWER_NODE_LIMIT?Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),l;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),l=new Set,n=0;nl||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(l=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>l||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=l.length||d>=l[0].length)){for(var f=0;fe}}]),e}()}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(GXr()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(GXr()):n.coseBase=r(n.layoutBase)})(n,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(l.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0}this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(var s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},y.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(t,null,0,359,0,r);var i=_.calculateBounds(e),a=new v;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var v=_[0];_.splice(0,1);var b=d.indexOf(v);b>=0&&d.splice(b,1),m--,f--}h=t==null?0:(d.indexOf(_[0])+1)%m;for(var x=Math.abs(r-n)/f,S=h;p!=f;S=++S%m){var C=d[S].getOtherEnd(e);if(C!=t){var w=(n+p*x)%360,T=(w+x)%360;y.branchRadialLayout(C,e,w,T,i+a,a),p++}}},y.maxDiagonalInTree=function(e){for(var t=h.MIN_VALUE,n=0;nt&&(t=r)}return t},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},y.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null)this.toBeTiled[a.id]=!1;else if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},y.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rl&&(l=d.rect.height)}n+=l+e.verticalPadding}},y.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},y.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},y.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},y.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=h.MAX_VALUE,p,m,g=0;g{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(KXr()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeCoseBilkent=r(KXr()):n.cytoscapeCoseBilkent=r(n.coseBase)})(n,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,l=n(0).layoutBase.PointD,u=n(0).layoutBase.DimensionD,d={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function f(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function p(e){this.options=f(d,e),m(this.options)}var m=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),r.QUALITY=e.quality==`draft`?0:e.quality==`proof`?2:1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};p.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var u=0;u0){var g=n.getGraphManager().add(n.newGraph(),d);this.processChildrenList(g,o,n)}}},p.prototype.stop=function(){return this.stopped=!0,this};var h=function(e){e(`layout`,`cose-bilkent`,p)};typeof cytoscape<`u`&&h(cytoscape),e.exports=h})])})})),JXr=l({render:()=>rZr});function YXr(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}function XXr(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}function ZXr(e){return new Promise(t=>{let n=DI(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),r=CK({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});n.remove(),YXr(e.nodes,r),XXr(e.edges,r),r.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),r.ready(e=>{W.info(`Cytoscape ready`,e),t(r)})})}function QXr(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}function $Xr(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}async function eZr(e,t){W.debug(`Starting cose-bilkent layout algorithm`);try{tZr(e);let t=await ZXr(e),n=QXr(t),r=$Xr(t);return W.debug(`Layout completed: ${n.length} nodes, ${r.length} edges`),{nodes:n,edges:r}}catch(e){throw W.error(`Error in cose-bilkent layout algorithm:`,e),e}}function tZr(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}var nZr,rZr,iZr=o((()=>{hN(),fN(),WXr(),nZr=d(qXr(),1),XI(),CK.use(nZr.default),U(YXr,`addNodes`),U(XXr,`addEdges`),U(ZXr,`createCytoscapeInstance`),U(QXr,`extractPositionedNodes`),U($Xr,`extractPositionedEdges`),U(eZr,`executeCoseBilkentLayout`),U(tZr,`validateLayoutData`),rZr=U(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:l},{algorithm:u})=>{let d={},f={},p=t.select(`g`);a(p,e.markers,e.type,e.diagramId);let m=p.insert(`g`).attr(`class`,`subgraphs`),h=p.insert(`g`).attr(`class`,`edgePaths`),g=p.insert(`g`).attr(`class`,`edgeLabels`),_=p.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};f[t.id]=e,d[t.id]=e,await n(m,t)}else{let n={...t};d[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await eZr({...e,nodes:e.nodes.map(e=>{let t=d[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=d[e.id];t!=null&&t.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=d[t.start??``],a=d[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};l(o,r(h,o,f,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};l(i,r(h,i,f,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`)})),aZr,wK,oZr,TK,EK,DK=o((()=>{zR(),XR(),LR(),MR(),wL(),bI(),hN(),fN(),xp(),aZr={common:oI,getConfig:WF,insertCluster:RR,insertEdge:YR,insertEdgeLabel:JR,insertMarkers:$_r,insertNode:NR,interpolateToCurve:Rdr,labelHelper:xR,log:W,positionEdgeLabel:U_r},wK={},oZr=U(e=>{for(let t of e)wK[t.name]=t},`registerLayoutLoaders`),U(()=>{oZr([{name:`dagre`,loader:U(async()=>await bp(()=>Promise.resolve().then(()=>(SPr(),rPr)),void 0,import.meta.url),`loader`)},{name:`swimlane`,loader:U(async()=>await bp(()=>Promise.resolve().then(()=>(kLr(),CPr)),void 0,import.meta.url),`loader`)},{name:`cose-bilkent`,loader:U(async()=>await bp(()=>Promise.resolve().then(()=>(iZr(),JXr)),void 0,import.meta.url),`loader`)}])},`registerDefaultLayoutLoaders`)(),TK=U(async(e,t)=>{if(!(e.layoutAlgorithm in wK))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=wK[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:l}=a,u=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i!=null&&i.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i!=null&&i.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,l).attr(`stop-opacity`,1)}return r.render(e,t,aZr,{algorithm:n.algorithm})},`render`),EK=U((e=``,{fallback:t=`dagre`}={})=>{if(e in wK)return e;if(t in wK)return W.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`)})),sZr,cZr,lZr,uZr,dZr,fZr,pZr,mZr=o((()=>{sZr=`comm`,cZr=`rule`,lZr=`decl`,uZr=`@import`,dZr=`@namespace`,fZr=`@keyframes`,pZr=`@layer`}));function hZr(e){return e.trim()}function gZr(e,t,n){return e.replace(t,n)}function _Zr(e,t,n){return e.indexOf(t,n)}function OK(e,t){return e.charCodeAt(t)|0}function kK(e,t,n){return e.slice(t,n)}function AK(e){return e.length}function vZr(e){return e.length}function jK(e,t){return t.push(e),e}var yZr,MK,NK=o((()=>{yZr=Math.abs,MK=String.fromCharCode}));function bZr(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:zK,column:BK,length:o,return:``,siblings:s}}function xZr(){return HK}function SZr(){return HK=VK>0?OK(UK,--VK):0,BK--,HK===10&&(BK=1,zK--),HK}function PK(){return HK=VK2||RK(HK)>3?``:` `}function DZr(e,t){for(;--t&&PK()&&!(HK<48||HK>102||HK>57&&HK<65||HK>70&&HK<97););return LK(e,IK()+(t<6&&FK()==32&&PK()==32))}function OZr(e){for(;PK();)switch(HK){case e:return VK;case 34:case 39:e!==34&&e!==39&&OZr(HK);break;case 40:e===41&&OZr(e);break;case 92:PK()}return VK}function kZr(e,t){for(;PK()&&e+HK!==57&&(e+HK!==84||FK()!==47););return`/*`+LK(t,VK-1)+`*`+MK(e===47?e:PK())}function AZr(e){for(;!RK(FK());)PK();return LK(e,VK)}var zK,BK,jZr,VK,HK,UK,MZr=o((()=>{NK(),zK=1,BK=1,jZr=0,VK=0,HK=0,UK=``}));function NZr(e){return wZr(WK(``,null,null,null,[``],e=CZr(e),0,[0],e))}function WK(e,t,n,r,i,a,o,s,l){for(var u=0,d=0,f=o,p=0,m=0,h=0,g=1,_=1,v=1,y=0,b=``,x=i,S=a,C=r,w=b;_;)switch(h=y,y=PK()){case 40:if(h!=108&&OK(w,f-1)==58){_Zr(w+=gZr(TZr(y),`&`,`&\f`),`&\f`,yZr(u?s[u-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:w+=TZr(y);break;case 9:case 10:case 13:case 32:w+=EZr(h);break;case 92:w+=DZr(IK()-1,7);continue;case 47:switch(FK()){case 42:case 47:jK(FZr(kZr(PK(),IK()),t,n,l),l),(RK(h||1)==5||RK(FK()||1)==5)&&AK(w)&&kK(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*g:s[u++]=AK(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=gZr(w,/\f/g,``)),m>0&&(AK(w)-f||g===0&&h===47)&&jK(m>32?IZr(w+`;`,r,n,f-1,l):IZr(gZr(w,` `,``)+`;`,r,n,f-2,l),l);break;case 59:w+=`;`;default:if(jK(C=PZr(w,t,n,u,d,i,s,b,x=[],S=[],f,a),a),y===123){if(d===0)WK(w,t,C,C,x,a,f,s,S);else{switch(p){case 99:if(OK(w,3)===110)break;case 108:if(OK(w,2)===97)break;default:d=0;case 100:case 109:case 115:}d?WK(e,C,C,r&&jK(PZr(e,C,C,0,0,i,s,b,i,x=[],f,S),S),i,S,f,s,r?x:S):WK(w,C,C,C,[``],S,0,s,S)}}}u=d=m=0,g=v=1,b=w=``,f=o;break;case 58:f=1+AK(w),m=h;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&SZr()==125)continue}switch(w+=MK(y),y*g){case 38:v=d>0?1:(w+=`\f`,-1);break;case 44:s[u++]=(AK(w)-1)*v,v=1;break;case 64:FK()===45&&(w+=TZr(PK())),p=FK(),d=f=AK(b=w+=AZr(IK())),y++;break;case 45:h===45&&AK(w)==2&&(g=0)}}return a}function PZr(e,t,n,r,i,a,o,s,l,u,d,f){for(var p=i-1,m=i===0?a:[``],h=vZr(m),g=0,_=0,v=0;g0?m[y]+` `+b:gZr(b,/&\f/g,m[y])))&&(l[v++]=x);return bZr(e,t,n,i===0?cZr:s,l,u,d,f)}function FZr(e,t,n,r){return bZr(e,t,n,sZr,MK(xZr()),kK(e,2,-2),0,r)}function IZr(e,t,n,r,i){return bZr(e,t,n,lZr,kK(e,0,r),kK(e,r+1,-1),r,i)}var LZr=o((()=>{mZr(),NK(),MZr()})),RZr=o((()=>{}));function zZr(e,t){for(var n=``,r=0;r{mZr(),NK()}));function HZr(e){var t=vZr(e);return function(n,r,i,a){for(var o=``,s=0;s{NK()})),WZr=o((()=>{mZr(),NK(),LZr(),RZr(),MZr(),VZr(),UZr()})),GZr,GK,KZr,qZr,KK,qK,JK,YK,XK,ZK=o((()=>{bI(),fN(),GZr=uL(),XI(),GK=U((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),KZr=U((e,t)=>{GK(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),qZr=U((e,t)=>{let n=t.text.replace(ZF,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),KK=U((e,t,n,r)=>{let i=e.append(`image`);i.attr(`x`,t),i.attr(`y`,n);let a=(0,GZr.sanitizeUrl)(r);i.attr(`xlink:href`,a)},`drawImage`),qK=U((e,t,n,r)=>{let i=e.append(`use`);i.attr(`x`,t),i.attr(`y`,n);let a=(0,GZr.sanitizeUrl)(r);i.attr(`xlink:href`,`#${a}`)},`drawEmbeddedImage`),JK=U(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),YK=U(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),XK=U(()=>{let e=DI(`.mermaidTooltip`);return e.empty()&&(e=DI(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`)})),JZr=l({diagram:()=>c$r});function QK(e,t,n,r,i){let a=t[e];if(!a.width){if(n)a.text=_L(a.text,i,r),a.textLines=a.text.split(oI.lineBreakRegex).length,a.width=i,a.height=fL(a.text,r);else{let e=a.text.split(oI.lineBreakRegex);a.textLines=e.length;let t=0;a.height=0,a.width=0;for(let n of e)a.width=Math.max(pL(n,r),a.width),t=fL(n,r),a.height+=t}}return a}async function YZr(e,t,n,r,i){let a=i.db,o=new QQr(i);o.data.widthLimit=n.data.widthLimit/Math.min(vq,r.length);for(let[s,l]of r.entries()){let r=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=r,r=l.image.Y+l.image.height);let u=l.wrap&&yq.wrap,d=xq(yq);d.fontSize+=2,d.fontWeight=`bold`;let f=QK(`label`,l,u,d,o.data.widthLimit);if(f.Y=r+8,r=f.Y+f.height,l.type&&l.type.text!==``){l.type.text=`[`+l.type.text+`]`;let e=QK(`type`,l,u,xq(yq),o.data.widthLimit);e.Y=r+5,r=e.Y+e.height}if(l.descr&&l.descr.text!==``){let e=xq(yq);e.fontSize-=2;let t=QK(`descr`,l,u,e,o.data.widthLimit);t.Y=r+20,r=t.Y+t.height}if(s==0||s%vq===0){let e=n.data.startx+yq.diagramMarginX,t=n.data.stopy+yq.diagramMarginY+r;o.setData(e,e,t,t)}else{let e=o.data.stopx===o.data.startx?o.data.startx:o.data.stopx+yq.diagramMarginX,t=o.data.starty;o.setData(e,e,t,t)}o.name=l.alias;let p=a.getC4ShapeArray(l.alias),m=a.getC4ShapeKeys(l.alias);m.length>0&&await t$r(o,e,p,m),t=l.alias;let h=a.getBoundaries(t);h.length>0&&await YZr(e,t,o,h,i),l.alias!==`global`&&e$r(e,l,o),n.data.stopy=Math.max(o.data.stopy+yq.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+yq.c4ShapeMargin,n.data.stopx),gq=Math.max(gq,n.data.stopx),_q=Math.max(_q,n.data.stopy)}}var XZr,ZZr,$K,QZr,$Zr,eq,eQr,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,tQr,nQr,rQr,iQr,aQr,oQr,sQr,cQr,lQr,uQr,dQr,fQr,pQr,mQr,hQr,gQr,_Qr,vQr,yQr,bQr,xQr,SQr,CQr,wQr,TQr,EQr,dq,fq,DQr,OQr,kQr,AQr,jQr,MQr,NQr,PQr,FQr,IQr,pq,mq,LQr,RQr,zQr,BQr,hq,VQr,HQr,UQr,WQr,GQr,KQr,qQr,JQr,YQr,XQr,gq,_q,ZQr,vq,yq,QQr,bq,xq,$Qr,e$r,t$r,n$r,r$r,i$r,a$r,o$r,s$r,c$r,l$r=o((()=>{ZK(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),XI(),$K=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],n=[1,25],r=[1,26],i=[1,27],a=[1,28],o=[1,63],s=[1,64],l=[1,65],u=[1,66],d=[1,67],f=[1,68],p=[1,69],m=[1,29],h=[1,30],g=[1,31],_=[1,32],v=[1,33],y=[1,34],b=[1,35],x=[1,36],S=[1,37],C=[1,38],w=[1,39],T=[1,40],E=[1,41],D=[1,42],O=[1,43],k=[1,44],A=[1,45],j=[1,46],M=[1,47],N=[1,48],P=[1,50],F=[1,51],I=[1,52],L=[1,53],R=[1,54],ee=[1,55],te=[1,56],ne=[1,57],z=[1,58],re=[1,59],ie=[1,60],ae=[14,42],oe=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ce=[1,82],le=[1,83],ue=[1,84],de=[1,85],fe=[12,14,42],pe=[12,14,33,42],me=[12,14,33,42,76,77,79,80],he=[12,33],ge=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],_e={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:te,71:ne,72:z,73:re,74:ie},{13:70,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:te,71:ne,72:z,73:re,74:ie},{13:71,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:te,71:ne,72:z,73:re,74:ie},{13:72,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:te,71:ne,72:z,73:re,74:ie},{13:73,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:te,71:ne,72:z,73:re,74:ie},{14:[1,74]},e(ae,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:s,37:l,38:u,39:d,40:f,41:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:te,71:ne,72:z,73:re,74:ie}),e(ae,[2,14]),e(oe,[2,16],{12:[1,76]}),e(ae,[2,36],{12:[1,77]}),e(se,[2,19]),e(se,[2,20]),{25:[1,78]},{27:[1,79]},e(se,[2,23]),{35:80,75:81,76:ce,77:le,79:ue,80:de},{35:86,75:81,76:ce,77:le,79:ue,80:de},{35:87,75:81,76:ce,77:le,79:ue,80:de},{35:88,75:81,76:ce,77:le,79:ue,80:de},{35:89,75:81,76:ce,77:le,79:ue,80:de},{35:90,75:81,76:ce,77:le,79:ue,80:de},{35:91,75:81,76:ce,77:le,79:ue,80:de},{35:92,75:81,76:ce,77:le,79:ue,80:de},{35:93,75:81,76:ce,77:le,79:ue,80:de},{35:94,75:81,76:ce,77:le,79:ue,80:de},{35:95,75:81,76:ce,77:le,79:ue,80:de},{35:96,75:81,76:ce,77:le,79:ue,80:de},{35:97,75:81,76:ce,77:le,79:ue,80:de},{35:98,75:81,76:ce,77:le,79:ue,80:de},{35:99,75:81,76:ce,77:le,79:ue,80:de},{35:100,75:81,76:ce,77:le,79:ue,80:de},{35:101,75:81,76:ce,77:le,79:ue,80:de},{35:102,75:81,76:ce,77:le,79:ue,80:de},{35:103,75:81,76:ce,77:le,79:ue,80:de},{35:104,75:81,76:ce,77:le,79:ue,80:de},e(fe,[2,59]),{35:105,75:81,76:ce,77:le,79:ue,80:de},{35:106,75:81,76:ce,77:le,79:ue,80:de},{35:107,75:81,76:ce,77:le,79:ue,80:de},{35:108,75:81,76:ce,77:le,79:ue,80:de},{35:109,75:81,76:ce,77:le,79:ue,80:de},{35:110,75:81,76:ce,77:le,79:ue,80:de},{35:111,75:81,76:ce,77:le,79:ue,80:de},{35:112,75:81,76:ce,77:le,79:ue,80:de},{35:113,75:81,76:ce,77:le,79:ue,80:de},{35:114,75:81,76:ce,77:le,79:ue,80:de},{35:115,75:81,76:ce,77:le,79:ue,80:de},{20:116,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:p,43:23,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:te,71:ne,72:z,73:re,74:ie},{12:[1,118],33:[1,117]},{35:119,75:81,76:ce,77:le,79:ue,80:de},{35:120,75:81,76:ce,77:le,79:ue,80:de},{35:121,75:81,76:ce,77:le,79:ue,80:de},{35:122,75:81,76:ce,77:le,79:ue,80:de},{35:123,75:81,76:ce,77:le,79:ue,80:de},{35:124,75:81,76:ce,77:le,79:ue,80:de},{35:125,75:81,76:ce,77:le,79:ue,80:de},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ae,[2,15]),e(oe,[2,17],{21:22,19:130,22:t,23:n,24:r,26:i,28:a}),e(ae,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:r,26:i,28:a,34:o,36:s,37:l,38:u,39:d,40:f,41:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x,52:S,53:C,54:w,55:T,56:E,57:D,58:O,59:k,60:A,61:j,62:M,63:N,64:P,65:F,66:I,67:L,68:R,69:ee,70:te,71:ne,72:z,73:re,74:ie}),e(se,[2,21]),e(se,[2,22]),e(fe,[2,39]),e(pe,[2,71],{75:81,35:132,76:ce,77:le,79:ue,80:de}),e(me,[2,73]),{78:[1,133]},e(me,[2,75]),e(me,[2,76]),e(fe,[2,40]),e(fe,[2,41]),e(fe,[2,42]),e(fe,[2,43]),e(fe,[2,44]),e(fe,[2,45]),e(fe,[2,46]),e(fe,[2,47]),e(fe,[2,48]),e(fe,[2,49]),e(fe,[2,50]),e(fe,[2,51]),e(fe,[2,52]),e(fe,[2,53]),e(fe,[2,54]),e(fe,[2,55]),e(fe,[2,56]),e(fe,[2,57]),e(fe,[2,58]),e(fe,[2,60]),e(fe,[2,61]),e(fe,[2,62]),e(fe,[2,63]),e(fe,[2,64]),e(fe,[2,65]),e(fe,[2,66]),e(fe,[2,67]),e(fe,[2,68]),e(fe,[2,69]),e(fe,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(he,[2,28]),e(he,[2,29]),e(he,[2,30]),e(he,[2,31]),e(he,[2,32]),e(he,[2,33]),e(he,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(oe,[2,18]),e(ae,[2,38]),e(pe,[2,72]),e(me,[2,74]),e(fe,[2,24]),e(fe,[2,35]),e(ge,[2,25]),e(ge,[2,26],{12:[1,138]}),e(ge,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};_e.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:U(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin(`acc_title`),24;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),26;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin(`person_ext`),45;case 23:return this.begin(`person`),44;case 24:return this.begin(`system_ext_queue`),51;case 25:return this.begin(`system_ext_db`),50;case 26:return this.begin(`system_ext`),49;case 27:return this.begin(`system_queue`),48;case 28:return this.begin(`system_db`),47;case 29:return this.begin(`system`),46;case 30:return this.begin(`boundary`),37;case 31:return this.begin(`enterprise_boundary`),34;case 32:return this.begin(`system_boundary`),36;case 33:return this.begin(`container_ext_queue`),57;case 34:return this.begin(`container_ext_db`),56;case 35:return this.begin(`container_ext`),55;case 36:return this.begin(`container_queue`),54;case 37:return this.begin(`container_db`),53;case 38:return this.begin(`container`),52;case 39:return this.begin(`container_boundary`),38;case 40:return this.begin(`component_ext_queue`),63;case 41:return this.begin(`component_ext_db`),62;case 42:return this.begin(`component_ext`),61;case 43:return this.begin(`component_queue`),60;case 44:return this.begin(`component_db`),59;case 45:return this.begin(`component`),58;case 46:return this.begin(`node`),39;case 47:return this.begin(`node`),39;case 48:return this.begin(`node_l`),40;case 49:return this.begin(`node_r`),41;case 50:return this.begin(`rel`),64;case 51:return this.begin(`birel`),65;case 52:return this.begin(`rel_u`),66;case 53:return this.begin(`rel_u`),66;case 54:return this.begin(`rel_d`),67;case 55:return this.begin(`rel_d`),67;case 56:return this.begin(`rel_l`),68;case 57:return this.begin(`rel_l`),68;case 58:return this.begin(`rel_r`),69;case 59:return this.begin(`rel_r`),69;case 60:return this.begin(`rel_b`),70;case 61:return this.begin(`rel_index`),71;case 62:return this.begin(`update_el_style`),72;case 63:return this.begin(`update_rel_style`),73;case 64:return this.begin(`update_layout_config`),74;case 65:return`EOF_IN_STRUCT`;case 66:return this.begin(`attribute`),`ATTRIBUTE_EMPTY`;case 67:this.begin(`attribute`);break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin(`string`);break;case 73:this.popState();break;case 74:return`STR`;case 75:this.begin(`string_kv`);break;case 76:return this.begin(`string_kv_key`),`STR_KEY`;case 77:this.popState(),this.begin(`string_kv_value`);break;case 78:return`STR_VALUE`;case 79:this.popState(),this.popState();break;case 80:return`STR`;case 81:return`LBRACE`;case 82:return`RBRACE`;case 83:return`SPACE`;case 84:return`EOL`;case 85:return 14}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}})();function ve(){this.yy={}}return U(ve,`Parser`),ve.prototype=_e,_e.Parser=ve,new ve})(),$K.parser=$K,QZr=$K,$Zr=U(e=>_I()[e],`getRequiredConfig`),eq=U((e,t)=>{for(let[n,r]of Object.entries(t))if(r!==void 0){if(typeof r==`object`){let[t,n]=Object.entries(r)[0];e[t]=n}else e[n]=r}},`assignAttributes`),eQr=U(()=>({alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}),`createGlobalBoundary`),tq=[],nq=[``],rq=`global`,iq=``,aq=[eQr()],oq=[],sq=``,cq=!1,lq=4,uq=2,nQr=U(function(){return tQr},`getC4Type`),rQr=U(function(e){tQr=QF(e,_I())},`setC4Type`),iQr=U(function(e,t,n,r,i,a,o,s,l){if(e==null||t==null||n==null||r==null)return;let u={},d=oq.find(e=>e.from===t&&e.to===n);if(d?u=d:oq.push(u),u.type=e,u.from=t,u.to=n,u.label={text:r},i==null)u.techn={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];u[e]={text:t}}else u.techn={text:i};if(a==null)u.descr={text:``};else if(typeof a==`object`){let[e,t]=Object.entries(a)[0];u[e]={text:t}}else u.descr={text:a};eq(u,{sprite:o,tags:s,link:l}),u.wrap=dq()},`addRel`),aQr=U(function(e,t,n,r,i,a,o){if(t===null||n===null)return;let s={},l=tq.find(e=>e.alias===t);if(l&&t===l.alias?s=l:(s.alias=t,tq.push(s)),n==null?s.label={text:``}:s.label={text:n},r==null)s.descr={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]={text:t}}else s.descr={text:r};eq(s,{sprite:i,tags:a,link:o}),s.typeC4Shape={text:e},s.parentBoundary=rq,s.wrap=dq()},`addPersonOrSystem`),oQr=U(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=tq.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,tq.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};eq(l,{sprite:a,tags:o,link:s}),l.wrap=dq(),l.typeC4Shape={text:e},l.parentBoundary=rq},`addContainer`),sQr=U(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=tq.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,tq.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};eq(l,{sprite:a,tags:o,link:s}),l.wrap=dq(),l.typeC4Shape={text:e},l.parentBoundary=rq},`addComponent`),cQr=U(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=aq.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,aq.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`system`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};eq(a,{tags:r,link:i}),a.parentBoundary=rq,a.wrap=dq(),iq=rq,rq=e,nq.push(iq)},`addPersonOrSystemBoundary`),lQr=U(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=aq.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,aq.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`container`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};eq(a,{tags:r,link:i}),a.parentBoundary=rq,a.wrap=dq(),iq=rq,rq=e,nq.push(iq)},`addContainerBoundary`),uQr=U(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=aq.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,aq.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.type={text:`node`};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.type={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};eq(l,{tags:o,link:s}),l.nodeType=e,l.parentBoundary=rq,l.wrap=dq(),iq=rq,rq=t,nq.push(iq)},`addDeploymentNode`),dQr=U(function(){rq=iq,nq.pop(),iq=nq.pop(),nq.push(iq)},`popBoundaryParseStack`),fQr=U(function(e,t,n,r,i,a,o,s,l,u,d){let f=tq.find(e=>e.alias===t);if(!(f===void 0&&(f=aq.find(e=>e.alias===t),f===void 0))){if(n!=null){if(typeof n==`object`){let[e,t]=Object.entries(n)[0];f[e]=t}else f.bgColor=n}if(r!=null){if(typeof r==`object`){let[e,t]=Object.entries(r)[0];f[e]=t}else f.fontColor=r}if(i!=null){if(typeof i==`object`){let[e,t]=Object.entries(i)[0];f[e]=t}else f.borderColor=i}if(a!=null){if(typeof a==`object`){let[e,t]=Object.entries(a)[0];f[e]=t}else f.shadowing=a}if(o!=null){if(typeof o==`object`){let[e,t]=Object.entries(o)[0];f[e]=t}else f.shape=o}if(s!=null){if(typeof s==`object`){let[e,t]=Object.entries(s)[0];f[e]=t}else f.sprite=s}if(l!=null){if(typeof l==`object`){let[e,t]=Object.entries(l)[0];f[e]=t}else f.techn=l}if(u!=null){if(typeof u==`object`){let[e,t]=Object.entries(u)[0];f[e]=t}else f.legendText=u}if(d!=null){if(typeof d==`object`){let[e,t]=Object.entries(d)[0];f[e]=t}else f.legendSprite=d}}},`updateElStyle`),pQr=U(function(e,t,n,r,i,a,o){let s=oq.find(e=>e.from===t&&e.to===n);if(s!==void 0){if(r!=null){if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]=t}else s.textColor=r}if(i!=null){if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.lineColor=i}if(a!=null){if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=parseInt(t)}else s.offsetX=parseInt(a)}if(o!=null){if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=parseInt(t)}else s.offsetY=parseInt(o)}}},`updateRelStyle`),mQr=U(function(e,t,n){let r=lq,i=uq;if(typeof t==`object`){let e=Object.values(t)[0];r=parseInt(e)}else r=parseInt(t);if(typeof n==`object`){let e=Object.values(n)[0];i=parseInt(e)}else i=parseInt(n);r>=1&&(lq=r),i>=1&&(uq=i)},`updateLayoutConfig`),hQr=U(function(){return lq},`getC4ShapeInRow`),gQr=U(function(){return uq},`getC4BoundaryInRow`),_Qr=U(function(){return rq},`getCurrentBoundaryParse`),vQr=U(function(){return iq},`getParentBoundaryParse`),yQr=U(function(e){return e==null?tq:tq.filter(t=>t.parentBoundary===e)},`getC4ShapeArray`),bQr=U(function(e){return tq.find(t=>t.alias===e)},`getC4Shape`),xQr=U(function(e){return Object.keys(yQr(e))},`getC4ShapeKeys`),SQr=U(function(e){return e==null?aq:aq.filter(t=>t.parentBoundary===e)},`getBoundaries`),CQr=SQr,wQr=U(function(){return oq},`getRels`),TQr=U(function(){return sq},`getTitle`),EQr=U(function(e){cq=e},`setWrap`),dq=U(function(){return cq},`autoWrap`),fq={addPersonOrSystem:aQr,addPersonOrSystemBoundary:cQr,addContainer:oQr,addContainerBoundary:lQr,addComponent:sQr,addDeploymentNode:uQr,popBoundaryParseStack:dQr,addRel:iQr,updateElStyle:fQr,updateRelStyle:pQr,updateLayoutConfig:mQr,autoWrap:dq,setWrap:EQr,getC4ShapeArray:yQr,getC4Shape:bQr,getC4ShapeKeys:xQr,getBoundaries:SQr,getBoundarys:CQr,getCurrentBoundaryParse:_Qr,getParentBoundaryParse:vQr,getRels:wQr,getTitle:TQr,getC4Type:nQr,getC4ShapeInRow:hQr,getC4BoundaryInRow:gQr,setAccTitle:dI,getAccTitle:fI,getAccDescription:mI,setAccDescription:pI,getConfig:U(()=>$Zr(`c4`),`getConfig`),clear:U(function(){tq=[],aq=[eQr()],iq=``,rq=`global`,nq=[``],oq=[],nq=[``],sq=``,cq=!1,lq=4,uq=2},`clear`),LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:U(function(e){sq=QF(e,_I())},`setTitle`),setC4Type:rQr},DQr=U(function(e,t){return GK(e,t)},`drawRect`),OQr=U((e,t,n,r)=>{let i=e.append(`g`),a=0;for(let e of t){let t=e.textColor?e.textColor:`#444444`,o=e.lineColor?e.lineColor:`#444444`,s=e.offsetX?parseInt(String(e.offsetX)):0,l=e.offsetY?parseInt(String(e.offsetY)):0;if(a===0){let t=i.append(`line`);t.attr(`x1`,e.startPoint.x),t.attr(`y1`,e.startPoint.y),t.attr(`x2`,e.endPoint.x),t.attr(`y2`,e.endPoint.y),t.attr(`stroke-width`,`1`),t.attr(`stroke`,o),t.style(`fill`,`none`),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`),a=-1}else{let t=i.append(`path`);t.attr(`fill`,`none`).attr(`stroke-width`,`1`).attr(`stroke`,o).attr(`d`,`Mstartx,starty Qcontrolx,controly stopx,stopy `.replaceAll(`startx`,e.startPoint.x).replaceAll(`starty`,e.startPoint.y).replaceAll(`controlx`,e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll(`controly`,e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll(`stopx`,e.endPoint.x).replaceAll(`stopy`,e.endPoint.y)),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`)}let u=e.label.width,d=n.messageFont();pq(n)(e.label.text,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+l,u,e.label.height,{fill:t},d),e.techn&&e.techn.text!==``&&(d=n.messageFont(),pq(n)(`[`+e.techn.text+`]`,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+n.messageFontSize+5+l,Math.max(u,e.techn.width),e.techn.height,{fill:t,"font-style":`italic`},d))}},`drawRels`),kQr=U(function(e,t,n){let r=e.append(`g`),i=t.bgColor?t.bgColor:`none`,a=t.borderColor?t.borderColor:`#444444`,o=t.fontColor?t.fontColor:`black`,s={"stroke-width":1,"stroke-dasharray":`7.0,7.0`};t.nodeType&&(s={"stroke-width":1}),DQr(r,{x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:s});let l=n.boundaryFont();l.fontWeight=`bold`,l.fontSize+=2,l.fontColor=o,pq(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:`#444444`},l),t.type&&t.type.text!==``&&(l=n.boundaryFont(),l.fontColor=o,pq(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:`#444444`},l)),t.descr&&t.descr.text!==``&&(l=n.boundaryFont(),l.fontSize-=2,l.fontColor=o,pq(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:`#444444`},l))},`drawBoundary`),AQr=U(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),jQr=U(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),MQr=U(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),NQr=U(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`)},`insertArrowHead`),PQr=U(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowend`).attr(`refX`,1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`)},`insertArrowEnd`),FQr=U(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),IQr=U(function(e,t){let n=e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,16).attr(`refY`,4);n.append(`path`).attr(`fill`,`black`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 9,2 V 6 L16,4 Z`),n.append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 0,1 L 6,7 M 6,1 L 0,7`)},`insertArrowCrossHead`),pq=(function(){function e(e,t,n,i,a,o,s){r(t.append(`text`).attr(`x`,n+a/2).attr(`y`,i+o/2+5).style(`text-anchor`,`middle`).text(e),s)}U(e,`byText`);function t(e,t,n,i,a,o,s,l){let{fontSize:u,fontFamily:d,fontWeight:f}=l,p=e.split(oI.lineBreakRegex);for(let e=0;e{if(t===`sandbox`){var n;let t=(n=DI(`#i`+e).node())==null?void 0:n.contentDocument;if(!t)throw Error(`Sandbox iframe #i${e} is missing its content document`);return{root:DI(t.body),doc:t}}return{root:DI(`body`),doc:document}},`getDiagramRoot`),RQr=new Set([`system_queue`,`external_system_queue`,`container_queue`,`external_container_queue`,`component_queue`,`external_component_queue`]),zQr=new Set([`system_db`,`external_system_db`,`container_db`,`external_container_db`,`component_db`,`external_component_db`]),BQr={person:`person`,box:`rounded`,rounded:`rounded`,cylinder:`cylinder`,database:`cylinder`,db:`cylinder`,queue:`h-cyl`,pipe:`h-cyl`,component:`fr-rect`},hq=U(e=>e?BQr[e.toLowerCase()]:void 0,`keywordShape`),VQr=U(e=>{let t=hq(e.shape)??hq(e.sprite);if(t)return t;if(e.tags)for(let t of e.tags.split(`,`)){let e=hq(t.trim());if(e)return e}let n=e.typeC4Shape.text;return n===`person`||n===`external_person`?`person`:zQr.has(n)?`cylinder`:RQr.has(n)?`h-cyl`:`rounded`},`resolveNodeShape`),HQr={person:`Person`,system:`Software System`,container:`Container`,component:`Component`},UQr=U(e=>{let t=e.replace(/^external_/,``).replace(/_(db|queue)$/,``);return HQr[t]??t.replace(/_/g,` `)},`stereotypeLabel`),WQr=U(e=>e.startsWith(`external_`),`isExternal`),GQr=U(e=>{var t;let n=UQr(e.typeC4Shape.text);return(t=e.techn)!=null&&t.text?`[${n}: ${e.techn.text}]`:`[${n}]`},`stereotypeText`),KQr=[`person`,`system`,`system_db`,`system_queue`,`container`,`container_db`,`container_queue`,`component`,`component_db`,`component_queue`].flatMap(e=>[e,`external_${e}`]),qQr=new Set(KQr),JQr=U(e=>qQr.has(e),`isC4ElementType`),YQr=U((e,t)=>{let n=e.typeC4Shape.text,r=e.bgColor??(JQr(n)&&t[`${n}_bg_color`]),i=e.borderColor??(JQr(n)&&t[`${n}_border_color`]),a=[];return r&&a.push(`fill:${r}`),i&&a.push(`stroke:${i}`),a.push(`color:${e.fontColor??`#FFFFFF`}`),a},`elementCssStyles`),XQr=U((e,t,n,r,i)=>{var a;let o=e.typeC4Shape.text,s=[`c4-shape`,`c4-${o}`];WQr(o)&&s.push(`c4-external`);let l=VQr(e),u=YQr(e,t);return(l===`rounded`||l===`fr-rect`)&&u.push(`rx:12px`,`ry:12px`),{id:e.alias,label:e.label.text,stereotype:GQr(e),description:(a=e.descr)!=null&&a.text?[e.descr.text]:void 0,labelType:`string`,isGroup:!1,shape:l,cssClasses:s.join(` `),cssStyles:u,padding:n,look:r,useHtmlLabels:!1,width:i}},`buildC4Node`),gq=0,_q=0,ZQr=4,vq=2,$K.yy=fq,yq={},QQr=(XZr=class{constructor(e){this.name=``,this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,bq(e.db.getConfig())}setData(e,t,n,r){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=r}updateVal(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.stopx,n=this.data.widthLimit,r=this.nextData.startx===this.nextData.stopx?t+e.margin:t+e.margin*2,i=r+e.width,a=this.nextData.starty+e.margin*2,o=a+e.height;(r>=n||i>=n||this.nextData.cnt>ZQr)&&(r=this.nextData.startx+e.margin+yq.nextLinePaddingX,a=this.nextData.stopy+e.margin*2,this.nextData.stopx=i=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=o=a+e.height,this.nextData.cnt=1),e.x=r,e.y=a,this.updateVal(this.data,`startx`,r,Math.min),this.updateVal(this.data,`starty`,a,Math.min),this.updateVal(this.data,`stopx`,i,Math.max),this.updateVal(this.data,`stopy`,o,Math.max),this.updateVal(this.nextData,`startx`,r,Math.min),this.updateVal(this.nextData,`starty`,a,Math.min),this.updateVal(this.nextData,`stopx`,i,Math.max),this.updateVal(this.nextData,`stopy`,o,Math.max)}init(e){this.name=``,this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},bq(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},U(XZr,`Bounds`),XZr),bq=U(function(e){OF(yq,e),e!=null&&e.fontFamily&&(yq.personFontFamily=yq.systemFontFamily=yq.messageFontFamily=e.fontFamily),e!=null&&e.fontSize&&(yq.personFontSize=yq.systemFontSize=yq.messageFontSize=e.fontSize),e!=null&&e.fontWeight&&(yq.personFontWeight=yq.systemFontWeight=yq.messageFontWeight=e.fontWeight)},`setConf`),xq=U(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),`boundaryFont`),$Qr=U(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),U(QK,`calcC4ShapeTextWH`),e$r=U(function(e,t,n){let r=n.data.startx,i=n.data.starty;t.x=r,t.y=i,t.width=n.data.stopx-r,t.height=n.data.stopy-i,t.label.y=yq.c4ShapeMargin-35;let a=t.wrap&&yq.wrap,o=xq(yq);o.fontSize+=2,o.fontWeight=`bold`,QK(`label`,t,a,o,pL(t.label.text,o)),mq.drawBoundary(e,t,yq)},`drawBoundary`),t$r=U(async function(e,t,n,r){let i=_I(),a=i.look??`classic`,o={config:i},s=t.attr(`id`)??``,l=r.map(e=>n[Number(e)]),u=U(e=>{let t=e.shape?S_r[e.shape]:void 0;if(!t)throw Error(`C4: no shape handler for "${e.shape}"`);return t},`shapeHandlerFor`);await Promise.all(l.map(async e=>{let n=XQr(e,yq,yq.c4ShapePadding,a,yq.width);n.domId=`${s}-${n.id}`;let r=await u(n)(t,n,o);e.width=n.width??yq.width,e.height=n.height??yq.height,e.margin=yq.c4ShapeMargin,r.remove()}));for(let t of l)e.insert(t);await Promise.all(l.map(async e=>{let n=XQr(e,yq,yq.c4ShapePadding,a,yq.width);n.domId=`${s}-${n.id}`,n.x=e.x+e.width/2,n.y=e.y+e.height/2;let r=t.append(`g`).attr(`transform`,`translate(${e.x+e.width/2}, ${e.y+e.height/2})`);await u(n)(r,n,o),e.intersect=n.intersect})),e.bumpLastMargin(yq.c4ShapeMargin)},`drawC4ShapeArray`),n$r=(ZZr=class{constructor(e,t){this.x=e,this.y=t}},U(ZZr,`Point`),ZZr),r$r=U(function(e,t){if(!e.intersect)throw Error(`C4 shape "${e.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);let{x:n,y:r}=e.intersect(t);return new n$r(n,r)},`getIntersectPoint`),i$r=U(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let r=r$r(e,n);return n.x=e.x+e.width/2,n.y=e.y+e.height/2,{startPoint:r,endPoint:r$r(t,n)}},`getIntersectPoints`),a$r=U(function(e,t,n,r,i){let a=r.db.getC4Type(),o=0;for(let e of t){o+=1;let t=e.wrap&&yq.wrap,r=$Qr(yq);a===`C4Dynamic`&&(e.label.text=o+`: `+e.label.text);let i=pL(e.label.text,r);QK(`label`,e,t,r,i),e.techn&&e.techn.text!==``&&(i=pL(e.techn.text,r),QK(`techn`,e,t,r,i)),e.descr&&e.descr.text!==``&&(i=pL(e.descr.text,r),QK(`descr`,e,t,r,i));let s=n(e.from),l=n(e.to);if(!s||!l)throw Error(`C4 rel "${e.from}" -> "${e.to}" references an unknown shape`);let u=i$r(s,l);if(!u.startPoint||!u.endPoint)throw Error(`Could not calculate intersection points for rel "${e.from}" -> "${e.to}"`);e.startPoint=u.startPoint,e.endPoint=u.endPoint}mq.drawRels(e,t,yq,i)},`drawRels`),U(YZr,`drawInsideBoundary`),o$r={drawPersonOrSystemArray:t$r,drawBoundary:e$r,setConf:bq,draw:U(async function(e,t,n,r){yq=$Zr(`c4`);let i=_I().securityLevel,{root:a}=LQr(t,i),o=r.db;o.setWrap(yq.wrap),ZQr=o.getC4ShapeInRow(),vq=o.getC4BoundaryInRow(),W.debug(`C:${JSON.stringify(yq,null,2)}`);let s=a.select(`[id="${t}"]`);mq.insertComputerIcon(s,t),mq.insertDatabaseIcon(s,t),mq.insertClockIcon(s,t);let l=new QQr(r);l.setData(yq.diagramMarginX,yq.diagramMarginX,yq.diagramMarginY,yq.diagramMarginY),l.data.widthLimit=screen.availWidth,gq=yq.diagramMarginX,_q=yq.diagramMarginY;let u=o.getTitle();await YZr(s,``,l,o.getBoundaries(``),r),mq.insertArrowHead(s,t),mq.insertArrowEnd(s,t),mq.insertArrowCrossHead(s,t),mq.insertArrowFilledHead(s,t),a$r(s,o.getRels(),o.getC4Shape,r,t),l.data.stopx=gq,l.data.stopy=_q;let d=l.data,f=d.startx,p=d.starty,m=_q-p+2*yq.diagramMarginY,h=gq-f,g=h+2*yq.diagramMarginX;u&&s.append(`text`).text(u).attr(`x`,h/2-4*yq.diagramMarginX).attr(`y`,p+yq.diagramMarginY),sI(s,m,g,yq.useMaxWidth);let _=u?60:0;s.attr(`viewBox`,f-yq.diagramMarginX+` -`+(yq.diagramMarginY+_)+` `+g+` `+(m+_)),W.debug(`models:`,d)},`draw`)},s$r=U(()=>{let e=_I().c4??{},t=new CSSStyleSheet;for(let n of KQr){let r=t.cssRules[t.insertRule(`.c4-shape.c4-${n} .label {}`,t.cssRules.length)],i=e[`${n}FontFamily`],a=e[`${n}FontSize`],o=e[`${n}FontWeight`];i&&r.style.setProperty(`font-family`,i),a&&r.style.setProperty(`font-size`,typeof a==`number`?`${a}px`:a),o&&r.style.setProperty(`font-weight`,String(o))}return[...t.cssRules].filter(e=>e.style.length>0).map(e=>` ${e.cssText}`).join(` `)},`elementFontStyles`),c$r={parser:QZr,db:fq,renderer:o$r,styles:U(e=>`.person { stroke: ${e.personBorder}; fill: ${e.personBkg}; } ${s$r()} /* The element font colour is set inline per element (default white); the label text takes it via currentColor. */ .c4-shape .label, .c4-shape .label text { color: inherit; fill: currentColor; } /* Structurizr typography: bold name, smaller stereotype/type and description lines. */ .c4-shape .label .c4-name { font-weight: bold; } .c4-shape .label .c4-type { font-size: 0.75em; } .c4-shape .label .c4-descr { font-size: 0.82em; } .c4-shape .basic, .c4-shape rect, .c4-shape path, .c4-shape circle, .c4-shape ellipse, .c4-shape line { stroke-width: 2px; } `,`getStyles`),init:U(({c4:e,wrap:t})=>{o$r.setConf(e),fq.setWrap(t)},`init`)}})),Sq,Cq=o((()=>{fN(),Sq=U(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; height: 1em; overflow: visible; vertical-align: -0.125em; } .node .label-icon path { fill: currentColor; stroke: revert; stroke-width: revert; } `,`getIconStyles`)})),wq,Tq=o((()=>{fN(),XI(),wq=U((e,t)=>{let n;return t===`sandbox`&&(n=DI(`#i`+e)),DI(t===`sandbox`?n.nodes()[0].contentDocument.body:`body`).select(`[id="${e}"]`)},`getDiagramElement`)})),Eq,u$r,d$r,Dq=o((()=>{bI(),hN(),fN(),Eq=U((e,t,n,r)=>{e.attr(`class`,n);let{width:i,height:a,x:o,y:s}=u$r(e,t);sI(e,a,i,r);let l=d$r(o,s,i,a,t);e.attr(`viewBox`,l),W.debug(`viewBox configured: ${l} with padding: ${t}`)},`setupViewPortForSVG`),u$r=U((e,t)=>{var n;let r=((n=e.node())==null?void 0:n.getBBox())||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},`calculateDimensionsWithPadding`),d$r=U((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`)})),f$r,p$r,m$r,h$r,Oq,g$r,_$r,v$r,y$r,b$r,kq,x$r,S$r=o((()=>{Cq(),Tq(),Dq(),RV(),DK(),ZK(),MR(),wL(),bI(),hN(),fN(),XI(),fx(),NN(),p$r=`flowchart-`,m$r=(f$r=class{constructor(){this.vertexCounter=0,this.config=_I(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=dI,this.setAccDescription=pI,this.setDiagramTitle=hI,this.getAccTitle=fI,this.getAccDescription=mI,this.getDiagramTitle=gI,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}sanitizeText(e){return oI.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,n,r,i,a,o={},s){if(!e||e.trim().length===0)return;let l;if(s!==void 0){let e;e=s.includes(` `)?s+` `:`{ `+s+` }`,l=LV(e,{schema:IV})}let u=this.subGraphLookup.get(e);if(u&&l){u.metadata={...u.metadata,...l};return}let d=this.edges.find(t=>t.id===e);if(d){let e=l;(e==null?void 0:e.animate)!==void 0&&(d.animate=e.animate),(e==null?void 0:e.animation)!==void 0&&(d.animation=e.animation),(e==null?void 0:e.curve)!==void 0&&(d.interpolate=e.curve);return}let f,p=this.vertices.get(e);if(p===void 0&&(t===void 0&&n===void 0&&r!=null&&W.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),p={id:e,labelType:`text`,domId:p$r+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,t===void 0?p.text===void 0&&(p.text=e):(this.config=_I(),f=this.sanitizeText(t.text.trim()),p.labelType=t.type,f.startsWith(`"`)&&f.endsWith(`"`)&&(f=f.substring(1,f.length-1)),p.text=f),n!==void 0&&(p.type=n),r!=null&&r.forEach(e=>{p.styles.push(e)}),i!=null&&i.forEach(e=>{p.classes.push(e)}),a!==void 0&&(p.dir=a),p.props===void 0?p.props=o:o!==void 0&&Object.assign(p.props,o),l!==void 0){if(l.shape){if(l.shape!==l.shape.toLowerCase()||l.shape.includes(`_`))throw Error(`No such shape: ${l.shape}. Shape names should be lowercase.`);if(!kgr(l.shape))throw Error(`No such shape: ${l.shape}.`);p.type=l==null?void 0:l.shape}if(l!=null&&l.label&&(p.text=l==null?void 0:l.label,p.labelType=this.sanitizeNodeLabelType(l==null?void 0:l.labelType)),l!=null&&l.icon){var m;p.icon=l==null?void 0:l.icon,!((m=l.label)!=null&&m.trim())&&p.text===e&&(p.text=``)}if(l!=null&&l.form&&(p.form=l==null?void 0:l.form),l!=null&&l.pos&&(p.pos=l==null?void 0:l.pos),l!=null&&l.img){var h;p.img=l==null?void 0:l.img,!((h=l.label)!=null&&h.trim())&&p.text===e&&(p.text=``)}l!=null&&l.constraint&&(p.constraint=l.constraint),l.w&&(p.assetWidth=Number(l.w)),l.h&&(p.assetHeight=Number(l.h))}}addSingleLink(e,t,n,r){let i={start:e,end:t,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};W.info(`abc78 Got edge...`,i);let a=n.text;if(a!==void 0&&(i.text=this.sanitizeText(a.text.trim()),i.text.startsWith(`"`)&&i.text.endsWith(`"`)&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=this.sanitizeNodeLabelType(a.type)),n!==void 0&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length>10?10:n.length),r&&!this.edges.some(e=>e.id===r))i.id=r,i.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===i.start&&e.end===i.end);i.id=e.length===0?CL(i.start,i.end,{counter:0,prefix:`L`}):CL(i.start,i.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))W.info(`Pushing edge...`),this.edges.push(i);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,t,n){let r=this.isLinkData(n)?n.id.replace(`@`,``):void 0;W.info(`addLink`,e,t,r);for(let i of e)for(let a of t){let o=i===e[e.length-1],s=a===t[0];o&&s?this.addSingleLink(i,a,n,r):this.addSingleLink(i,a,n,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{e==="default"?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if(typeof e==`number`&&e>=this.edges.length)throw Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(e==="default")this.edges.defaultStyle=t;else{var n,r;if(this.edges[e].style=t,(((n=this.edges[e])==null||(n=n.style)==null?void 0:n.length)??0)>0&&!((r=this.edges[e])!=null&&(r=r.style)!=null&&r.some(e=>e==null?void 0:e.startsWith(`fill`)))){var i;(i=this.edges[e])==null||(i=i.style)==null||i.push(`fill:none`)}}})}addClass(e,t){let n=t.join().replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);e.split(`,`).forEach(e=>{let t=this.classes.get(e);t===void 0&&(t={id:e,styles:[],textStyles:[]},this.classes.set(e,t)),n!=null&&n.forEach(e=>{if(/color/.exec(e)){let n=e.replace(`fill`,`bgFill`);t.textStyles.push(n)}t.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction=`LR`),/.*v/.exec(this.direction)&&(this.direction=`TB`),this.direction===`TD`&&(this.direction=`TB`)}setClass(e,t){for(let n of e.split(`,`)){let e=this.vertices.get(n);e&&e.classes.push(t);let r=this.edges.find(e=>e.id===n);r&&r.classes.push(t);let i=this.subGraphLookup.get(n);i&&i.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let n of e.split(`,`))this.tooltips.set(this.version===`gen-1`?this.lookUpDomId(n):n,t)}}setClickFun(e,t,n){if(_I().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{xL.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=xL.formatUrl(t,this.config),r.linkTarget=n)}),this.setClass(e,`clickable`)}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFun(e,t,n)}),this.setClass(e,`clickable`)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){var e;return(e=this.direction)==null?void 0:e.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=XK();DI(e).select(`svg`).selectAll(`g.node`).on(`mouseover`,e=>{var n;let r=DI(e.currentTarget),i=r.attr(`title`);if(i===null)return;let a=(n=e.currentTarget)==null?void 0:n.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.text(r.attr(`title`)).style(`left`,window.scrollX+a.left+(a.right-a.left)/2+`px`).style(`top`,window.scrollY+a.bottom+`px`),t.html(dx.sanitize(i)),r.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),DI(e.currentTarget).classed(`hover`,!1)})}clear(e=`gen-2`){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId=``,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=_I(),uI()}setGen(e){this.version=e||`gen-2`}defaultStyle(){return`fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;`}addSubGraph(e,t,n){let r=e.text.trim(),i=n.text;e===n&&/\s/.exec(n.text)&&(r=void 0);let a=U(e=>{let t={boolean:{},number:{},string:{}},n=[],r;return{nodeList:e.filter(function(e){let i=typeof e;return e.stmt&&e.stmt===`dir`?(r=e.value,!1):e.trim()===``?!1:i in t?t[i].hasOwnProperty(e)?!1:t[i][e]=!0:!n.includes(e)&&n.push(e)}),dir:r}},`uniq`)(t.flat()),o=a.nodeList,s=a.dir,l=_I().flowchart??{};if(s=s??(l.inheritDir?this.getDirection()??_I().direction??void 0:void 0),this.version===`gen-1`)for(let e=0;e2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let r=0,i=1;for(;r=0){let n=this.indexNodes2(e,t);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2(`none`,this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1)}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}countChar(e,t){let n=t.length,r=0;for(let i=0;i`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1))}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=this.countChar(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}destructLink(e,t){let n=this.destructEndLink(e),r;if(t){if(r=this.destructStartLink(t),r.stroke!==n.stroke)return{type:`INVALID`,stroke:`INVALID`};if(r.type===`arrow_open`)r.type=n.type;else{if(r.type!==n.type)return{type:`INVALID`,stroke:`INVALID`};r.type=`double_`+r.type}return r.type===`double_arrow`&&(r.type=`double_arrow_point`),r.length=n.length,r}return n}exists(e,t){for(let n of e)if(n.nodes.includes(t))return!0;return!1}makeUniq(e,t){let n=[];return e.nodes.forEach((r,i)=>{this.exists(t,r)||n.push(e.nodes[i])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return`imageSquare`;if(e.icon)return e.form===`circle`?`iconCircle`:e.form===`square`?`iconSquare`:e.form===`rounded`?`iconRounded`:`icon`;switch(e.type){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;case`ellipse`:return`ellipse`;default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t=`none`,n=`arrow_point`;switch(e){case`arrow_point`:case`arrow_circle`:case`arrow_cross`:n=e;break;case`double_arrow_point`:case`double_arrow_circle`:case`double_arrow_cross`:t=e.replace(`double_`,``),n=t}return{arrowTypeStart:t,arrowTypeEnd:n}}addNodeFromVertex(e,t,n,r,i,a){let o=n.get(e.id),s=r.get(e.id)??!1,l=this.findNode(t,e.id);if(l)l.cssStyles=e.styles,l.cssCompiledStyles=this.getCompiledStyles(e.classes),l.cssClasses=e.classes.join(` `);else{var u;let n={id:e.id,label:e.text,labelType:e.labelType,labelStyle:``,parentId:o,padding:((u=i.flowchart)==null?void 0:u.padding)||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles([`default`,`node`,...e.classes]),cssClasses:`default `+e.classes.join(` `),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};s?t.push({...n,isGroup:!0,shape:`rect`}):t.push({...n,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e!=null&&e.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e!=null&&e.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}getData(){let e=_I(),t=[],n=[],r=this.getSubGraphs(),i=new Map,a=new Map,o=new Map;for(let e of r)for(let t of e.nodes)this.subGraphLookup.has(t)&&o.set(t,e.id);let s=U(e=>{var t;return((t=this.subGraphLookup.get(e))==null||(t=t.metadata)==null?void 0:t.view)===`collapsed`},`isCollapsed`),l=U(e=>{let t,n=new Set,r=e;for(;r!==void 0&&!n.has(r);)n.add(r),s(r)&&(t=r),r=o.get(r);return t},`outermostCollapsed`),u=new Set,d=new Map;for(let e of r){let t=l(e.id);if(t!==void 0){e.id!==t&&(u.add(e.id),d.set(e.id,t));for(let n of e.nodes)n!==t&&(u.add(n),d.set(n,t))}}for(let e=r.length-1;e>=0;e--){let t=r[e];if(!u.has(t.id)){t.nodes.length>0&&a.set(t.id,!0);for(let e of t.nodes)i.set(e,t.id)}}for(let n=r.length-1;n>=0;n--){var f;let a=r[n];u.has(a.id)||(((f=a.metadata)==null?void 0:f.view)===`collapsed`?t.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(` `),shape:`collapsedGroup`,dir:a.dir,isGroup:!1,look:e.look}):t.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(` `),shape:`rect`,dir:a.dir,isGroup:!0,look:e.look}))}this.getVertices().forEach(n=>{u.has(n.id)||this.addNodeFromVertex(n,t,i,a,e,e.look||`classic`)});let p=this.getEdges();return p.forEach((t,r)=>{var i;let{arrowTypeStart:a,arrowTypeEnd:o}=this.destructEdgeType(t.type),s=[...p.defaultStyle??[]],l=d.get(t.start)??t.start,u=d.get(t.end)??t.end;if(l===u&&(d.has(t.start)||d.has(t.end)))return;t.style&&s.push(...t.style);let f={id:CL(l,u,{counter:r,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:l,end:u,type:t.type??`normal`,label:t.text,labelType:t.labelType,labelpos:`c`,thickness:t.stroke,minlen:t.length,classes:(t==null?void 0:t.stroke)===`invisible`?``:`edge-thickness-normal edge-pattern-solid flowchart-link`,arrowTypeStart:(t==null?void 0:t.stroke)===`invisible`||(t==null?void 0:t.type)===`arrow_open`?`none`:a,arrowTypeEnd:(t==null?void 0:t.stroke)===`invisible`||(t==null?void 0:t.type)===`arrow_open`?`none`:o,arrowheadStyle:`fill: #333`,cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:s,style:s,pattern:t.stroke,look:e.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||((i=e.flowchart)==null?void 0:i.curve)};n.push(f)}),{nodes:t,edges:n,other:{},config:e}}defaultConfig(){return Lrr.flowchart}},U(f$r,`FlowDB`),f$r),h$r={getClasses:U(function(e,t){return t.db.getClasses()},`getClasses`),draw:U(async function(e,t,n,r){var i;W.info(`REF0:`),W.info(`Drawing state diagram (v2)`,t);let{securityLevel:a,flowchart:o,layout:s}=_I();r.db.setDiagramId(t),W.debug(`Before getData: `);let l=r.db.getData();W.debug(`Data: `,l);let u=wq(t,a),d=r.db.getDirection();l.type=r.type,l.layoutAlgorithm=EK(s),l.layoutAlgorithm===`dagre`&&s===`elk`&&W.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),l.direction=d,l.nodeSpacing=(o==null?void 0:o.nodeSpacing)||50,l.rankSpacing=(o==null?void 0:o.rankSpacing)||50,l.markers=[`point`,`circle`,`cross`],l.diagramId=t,W.debug(`REF1:`,l),await TK(l,u);let f=((i=l.config.flowchart)==null?void 0:i.diagramPadding)??8;xL.insertTitle(u,`flowchartTitleText`,(o==null?void 0:o.titleTopMargin)||0,r.db.getDiagramTitle()),Eq(u,f,`flowchart`,(o==null?void 0:o.useMaxWidth)||!1)},`draw`)},Oq=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,4],n=[1,3],r=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],o=[1,13],s=[1,14],l=[1,15],u=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],h=[1,50],g=[1,49],_=[1,29],v=[1,30],y=[1,31],b=[1,32],x=[1,33],S=[1,45],C=[1,47],w=[1,43],T=[1,48],E=[1,44],D=[1,51],O=[1,46],k=[1,52],A=[1,53],j=[1,34],M=[1,35],N=[1,36],P=[1,37],F=[1,38],I=[1,58],L=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],R=[1,62],ee=[1,61],te=[1,63],ne=[8,9,11,75,77,78],z=[1,79],re=[1,92],ie=[1,97],ae=[1,96],oe=[1,93],se=[1,89],ce=[1,95],le=[1,91],ue=[1,98],de=[1,94],fe=[1,99],pe=[1,90],me=[8,9,10,11,40,75,77,78],he=[8,9,10,11,40,46,75,77,78],ge=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],_e=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],ve=[44,60,89,102,105,106,109,111,114,115,116],ye=[1,122],be=[1,123],xe=[1,125],Se=[1,124],Ce=[44,60,62,74,89,102,105,106,109,111,114,115,116],we=[1,134],Te=[1,148],Ee=[1,149],De=[1,150],Oe=[1,151],B=[1,136],ke=[1,138],Ae=[1,142],je=[1,143],Me=[1,144],Ne=[1,145],Pe=[1,146],Fe=[1,147],Ie=[1,152],Le=[1,153],Re=[1,132],ze=[1,133],Be=[1,140],Ve=[1,135],He=[1,139],Ue=[1,137],We=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Ge=[1,155],Ke=[1,157],qe=[8,9,11],Je=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Ye=[1,177],Xe=[1,173],Ze=[1,174],Qe=[1,178],$e=[1,175],et=[1,176],tt=[77,116,119],nt=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],rt=[10,106],it=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],at=[1,248],ot=[1,246],st=[1,250],ct=[1,244],lt=[1,245],ut=[1,247],dt=[1,249],ft=[1,251],pt=[1,269],mt=[8,9,11,106],ht=[8,9,10,11,60,84,105,106,109,110,111,112],gt={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:`error`,8:`SEMI`,9:`NEWLINE`,10:`SPACE`,11:`EOF`,12:`GRAPH`,13:`NODIR`,14:`DIR`,27:`subgraph`,29:`SQS`,31:`SQE`,32:`end`,34:`acc_title`,35:`acc_title_value`,36:`acc_descr`,37:`acc_descr_value`,38:`acc_descr_multiline_value`,40:`SHAPE_DATA`,44:`AMP`,46:`STYLE_SEPARATOR`,48:`DOUBLECIRCLESTART`,49:`DOUBLECIRCLEEND`,50:`PS`,51:`PE`,52:`(-`,53:`-)`,54:`STADIUMSTART`,55:`STADIUMEND`,56:`SUBROUTINESTART`,57:`SUBROUTINEEND`,58:`VERTEX_WITH_PROPS_START`,59:`NODE_STRING[field]`,60:`COLON`,61:`NODE_STRING[value]`,62:`PIPE`,63:`CYLINDERSTART`,64:`CYLINDEREND`,65:`DIAMOND_START`,66:`DIAMOND_STOP`,67:`TAGEND`,68:`TRAPSTART`,69:`TRAPEND`,70:`INVTRAPSTART`,71:`INVTRAPEND`,74:`TESTSTR`,75:`START_LINK`,77:`LINK`,78:`LINK_ID`,80:`STR`,81:`MD_STR`,84:`STYLE`,85:`LINKSTYLE`,86:`CLASSDEF`,87:`CLASS`,88:`CLICK`,89:`DOWN`,90:`UP`,93:`idString[vertex]`,94:`idString[class]`,95:`CALLBACKNAME`,96:`CALLBACKARGS`,97:`HREF`,98:`LINK_TARGET`,99:`STR[link]`,100:`STR[tooltip]`,102:`DEFAULT`,104:`INTERPOLATE`,105:`NUM`,106:`COMMA`,109:`NODE_STRING`,110:`UNIT`,111:`BRKT`,112:`PCT`,114:`MINUS`,115:`MULT`,116:`UNICODE_TEXT`,117:`TEXT`,118:`TAGSTART`,119:`EDGE_TEXT`,121:`direction_tb`,122:`direction_bt`,123:`direction_rl`,124:`direction_lr`,125:`direction_td`},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[s])||a[s].length>0)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 183:this.$=a[s];break;case 11:r.setDirection(`TB`),this.$=`TB`;break;case 12:r.setDirection(a[s-1]),this.$=a[s-1];break;case 27:this.$=a[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 34:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 35:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 37:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 43:this.$=a[s-1]+a[s];break;case 44:this.$=a[s];break;case 45:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 46:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 47:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 48:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 49:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),this.$={stmt:a[s-1],nodes:a[s-1],shapeData:a[s]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:r.addVertex(a[s-5][a[s-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-4]),this.$=a[s-5].concat(a[s]);break;case 53:this.$=a[s-4].concat(a[s]);break;case 54:this.$=a[s];break;case 55:this.$=a[s-2],r.setClass(a[s-2],a[s]);break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`square`);break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`doublecircle`);break;case 58:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`circle`);break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`ellipse`);break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`stadium`);break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`subroutine`);break;case 62:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],`rect`,void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`cylinder`);break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`round`);break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`diamond`);break;case 66:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`hexagon`);break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`odd`);break;case 68:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`trapezoid`);break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`inv_trapezoid`);break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_right`);break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_left`);break;case 72:this.$=a[s],r.addVertex(a[s]);break;case 73:a[s-1].text=a[s],this.$=a[s-1];break;case 74:case 75:a[s-2].text=a[s-1],this.$=a[s-2];break;case 76:this.$=a[s];break;case 77:var l=r.destructLink(a[s],a[s-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[s-1]};break;case 78:var l=r.destructLink(a[s],a[s-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[s-1],id:a[s-3]};break;case 79:this.$={text:a[s],type:`text`};break;case 80:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 81:this.$={text:a[s],type:`string`};break;case 82:this.$={text:a[s],type:`markdown`};break;case 83:var l=r.destructLink(a[s]);this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:var l=r.destructLink(a[s]);this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[s-1]};break;case 85:this.$=a[s-1];break;case 86:this.$={text:a[s],type:`text`};break;case 87:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 88:this.$={text:a[s],type:`string`};break;case 89:case 104:this.$={text:a[s],type:`markdown`};break;case 101:this.$={text:a[s],type:`text`};break;case 102:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 103:this.$={text:a[s],type:`text`};break;case 105:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 106:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 107:case 115:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 108:case 116:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 109:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 110:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 111:this.$=a[s-2],r.setLink(a[s-2],a[s]);break;case 112:this.$=a[s-4],r.setLink(a[s-4],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 113:this.$=a[s-4],r.setLink(a[s-4],a[s-2],a[s]);break;case 114:this.$=a[s-6],r.setLink(a[s-6],a[s-4],a[s]),r.setTooltip(a[s-6],a[s-2]);break;case 117:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 118:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 119:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 120:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 121:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 122:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 123:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 124:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 125:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 126:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 127:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 128:case 130:this.$=[a[s]];break;case 129:case 131:a[s-2].push(a[s]),this.$=a[s-2];break;case 133:this.$=a[s-1]+a[s];break;case 181:this.$=a[s];break;case 182:this.$=a[s-1]+``+a[s];break;case 184:this.$=a[s-1]+``+a[s];break;case 185:this.$={stmt:`dir`,value:`TB`};break;case 186:this.$={stmt:`dir`,value:`BT`};break;case 187:this.$={stmt:`dir`,value:`RL`};break;case 188:this.$={stmt:`dir`,value:`LR`};break;case 189:this.$={stmt:`dir`,value:`TD`}}},`anonymous`),table:[{3:1,4:2,9:t,10:n,12:r},{1:[3]},e(i,a,{5:6}),{4:7,9:t,10:n,12:r},{4:8,9:t,10:n,12:r},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:s,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:y,87:b,88:x,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A,121:j,122:M,123:N,124:P,125:F},e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),{8:[1,55],9:[1,56],10:I,15:54,18:57},e(L,[2,3]),e(L,[2,4]),e(L,[2,5]),e(L,[2,6]),e(L,[2,7]),e(L,[2,8]),{8:R,9:ee,11:te,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:R,9:ee,11:te,21:68},{8:R,9:ee,11:te,21:69},{8:R,9:ee,11:te,21:70},{8:R,9:ee,11:te,21:71},{8:R,9:ee,11:te,21:72},{8:R,9:ee,10:[1,73],11:te,21:74},e(L,[2,36]),{35:[1,75]},{37:[1,76]},e(L,[2,39]),e(ne,[2,50],{18:77,39:78,10:I,40:z}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:re,44:ie,60:ae,80:[1,87],89:oe,95:[1,84],97:[1,85],101:86,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe,120:88},e(L,[2,185]),e(L,[2,186]),e(L,[2,187]),e(L,[2,188]),e(L,[2,189]),e(me,[2,51]),e(me,[2,54],{46:[1,100]}),e(he,[2,72],{113:113,29:[1,101],44:h,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:g,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:S,102:C,105:w,106:T,109:E,111:D,114:O,115:k,116:A}),e(ge,[2,181]),e(ge,[2,142]),e(ge,[2,143]),e(ge,[2,144]),e(ge,[2,145]),e(ge,[2,146]),e(ge,[2,147]),e(ge,[2,148]),e(ge,[2,149]),e(ge,[2,150]),e(ge,[2,151]),e(ge,[2,152]),e(i,[2,12]),e(i,[2,18]),e(i,[2,19]),{9:[1,114]},e(_e,[2,26],{18:115,10:I}),e(L,[2,27]),{42:116,43:39,44:h,45:40,47:41,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A},e(L,[2,40]),e(L,[2,41]),e(L,[2,42]),e(ve,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:ye,81:be,116:xe,119:Se},{75:[1,126],77:[1,127]},e(Ce,[2,83]),e(L,[2,28]),e(L,[2,29]),e(L,[2,30]),e(L,[2,31]),e(L,[2,32]),{10:we,12:Te,14:Ee,27:De,28:128,32:Oe,44:B,60:ke,75:Ae,80:[1,130],81:[1,131],83:141,84:je,85:Me,86:Ne,87:Pe,88:Fe,89:Ie,90:Le,91:129,105:Re,109:ze,111:Be,114:Ve,115:He,116:Ue},e(We,a,{5:154}),e(L,[2,37]),e(L,[2,38]),e(ne,[2,48],{44:Ge}),e(ne,[2,49],{18:156,10:I,40:Ke}),e(me,[2,44]),{44:h,47:158,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A},{102:[1,159],103:160,105:[1,161]},{44:h,47:162,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A},{44:h,47:163,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A},e(qe,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(qe,[2,115],{120:168,10:[1,167],14:re,44:ie,60:ae,89:oe,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe}),e(qe,[2,117],{10:[1,169]}),e(Je,[2,183]),e(Je,[2,170]),e(Je,[2,171]),e(Je,[2,172]),e(Je,[2,173]),e(Je,[2,174]),e(Je,[2,175]),e(Je,[2,176]),e(Je,[2,177]),e(Je,[2,178]),e(Je,[2,179]),e(Je,[2,180]),{44:h,47:170,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A},{30:171,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:179,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:181,50:[1,180],67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:182,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:183,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:184,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{109:[1,185]},{30:186,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:187,65:[1,188],67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:189,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:190,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{30:191,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},e(ge,[2,182]),e(i,[2,20]),e(_e,[2,25]),e(ne,[2,46],{39:192,18:193,10:I,40:z}),e(ve,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{77:[1,197],79:198,116:xe,119:Se},e(tt,[2,79]),e(tt,[2,81]),e(tt,[2,82]),e(tt,[2,168]),e(tt,[2,169]),{76:199,79:121,80:ye,81:be,116:xe,119:Se},e(Ce,[2,84]),{8:R,9:ee,10:we,11:te,12:Te,14:Ee,21:201,27:De,29:[1,200],32:Oe,44:B,60:ke,75:Ae,83:141,84:je,85:Me,86:Ne,87:Pe,88:Fe,89:Ie,90:Le,91:202,105:Re,109:ze,111:Be,114:Ve,115:He,116:Ue},e(nt,[2,101]),e(nt,[2,103]),e(nt,[2,104]),e(nt,[2,157]),e(nt,[2,158]),e(nt,[2,159]),e(nt,[2,160]),e(nt,[2,161]),e(nt,[2,162]),e(nt,[2,163]),e(nt,[2,164]),e(nt,[2,165]),e(nt,[2,166]),e(nt,[2,167]),e(nt,[2,90]),e(nt,[2,91]),e(nt,[2,92]),e(nt,[2,93]),e(nt,[2,94]),e(nt,[2,95]),e(nt,[2,96]),e(nt,[2,97]),e(nt,[2,98]),e(nt,[2,99]),e(nt,[2,100]),{6:11,7:12,8:o,9:s,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:y,87:b,88:x,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A,121:j,122:M,123:N,124:P,125:F},{10:I,18:204},{44:[1,205]},e(me,[2,43]),{10:[1,206],44:h,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:113,114:O,115:k,116:A},{10:[1,207]},{10:[1,208],106:[1,209]},e(rt,[2,128]),{10:[1,210],44:h,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:113,114:O,115:k,116:A},{10:[1,211],44:h,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:113,114:O,115:k,116:A},{80:[1,212]},e(qe,[2,109],{10:[1,213]}),e(qe,[2,111],{10:[1,214]}),{80:[1,215]},e(Je,[2,184]),{80:[1,216],98:[1,217]},e(me,[2,55],{113:113,44:h,60:g,89:S,102:C,105:w,106:T,109:E,111:D,114:O,115:k,116:A}),{31:[1,218],67:Ye,82:219,116:Qe,117:$e,118:et},e(it,[2,86]),e(it,[2,88]),e(it,[2,89]),e(it,[2,153]),e(it,[2,154]),e(it,[2,155]),e(it,[2,156]),{49:[1,220],67:Ye,82:219,116:Qe,117:$e,118:et},{30:221,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{51:[1,222],67:Ye,82:219,116:Qe,117:$e,118:et},{53:[1,223],67:Ye,82:219,116:Qe,117:$e,118:et},{55:[1,224],67:Ye,82:219,116:Qe,117:$e,118:et},{57:[1,225],67:Ye,82:219,116:Qe,117:$e,118:et},{60:[1,226]},{64:[1,227],67:Ye,82:219,116:Qe,117:$e,118:et},{66:[1,228],67:Ye,82:219,116:Qe,117:$e,118:et},{30:229,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},{31:[1,230],67:Ye,82:219,116:Qe,117:$e,118:et},{67:Ye,69:[1,231],71:[1,232],82:219,116:Qe,117:$e,118:et},{67:Ye,69:[1,234],71:[1,233],82:219,116:Qe,117:$e,118:et},e(ne,[2,45],{18:156,10:I,40:Ke}),e(ne,[2,47],{44:Ge}),e(ve,[2,75]),e(ve,[2,74]),{62:[1,235],67:Ye,82:219,116:Qe,117:$e,118:et},e(ve,[2,77]),e(tt,[2,80]),{77:[1,236],79:198,116:xe,119:Se},{30:237,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},e(We,a,{5:238}),e(nt,[2,102]),e(L,[2,35]),{43:239,44:h,45:40,47:41,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A},{10:I,18:240},{10:at,60:ot,84:st,92:241,105:ct,107:242,108:243,109:lt,110:ut,111:dt,112:ft},{10:at,60:ot,84:st,92:252,104:[1,253],105:ct,107:242,108:243,109:lt,110:ut,111:dt,112:ft},{10:at,60:ot,84:st,92:254,104:[1,255],105:ct,107:242,108:243,109:lt,110:ut,111:dt,112:ft},{105:[1,256]},{10:at,60:ot,84:st,92:257,105:ct,107:242,108:243,109:lt,110:ut,111:dt,112:ft},{44:h,47:258,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A},e(qe,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(qe,[2,116]),e(qe,[2,118],{10:[1,262]}),e(qe,[2,119]),e(he,[2,56]),e(it,[2,87]),e(he,[2,57]),{51:[1,263],67:Ye,82:219,116:Qe,117:$e,118:et},e(he,[2,64]),e(he,[2,59]),e(he,[2,60]),e(he,[2,61]),{109:[1,264]},e(he,[2,63]),e(he,[2,65]),{66:[1,265],67:Ye,82:219,116:Qe,117:$e,118:et},e(he,[2,67]),e(he,[2,68]),e(he,[2,70]),e(he,[2,69]),e(he,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(ve,[2,78]),{31:[1,266],67:Ye,82:219,116:Qe,117:$e,118:et},{6:11,7:12,8:o,9:s,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:y,87:b,88:x,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A,121:j,122:M,123:N,124:P,125:F},e(me,[2,53]),{43:268,44:h,45:40,47:41,60:g,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A},e(qe,[2,121],{106:pt}),e(mt,[2,130],{108:270,10:at,60:ot,84:st,105:ct,109:lt,110:ut,111:dt,112:ft}),e(ht,[2,132]),e(ht,[2,134]),e(ht,[2,135]),e(ht,[2,136]),e(ht,[2,137]),e(ht,[2,138]),e(ht,[2,139]),e(ht,[2,140]),e(ht,[2,141]),e(qe,[2,122],{106:pt}),{10:[1,271]},e(qe,[2,123],{106:pt}),{10:[1,272]},e(rt,[2,129]),e(qe,[2,105],{106:pt}),e(qe,[2,106],{113:113,44:h,60:g,89:S,102:C,105:w,106:T,109:E,111:D,114:O,115:k,116:A}),e(qe,[2,110]),e(qe,[2,112],{10:[1,273]}),e(qe,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:R,9:ee,11:te,21:278},e(L,[2,34]),e(me,[2,52]),{10:at,60:ot,84:st,105:ct,107:279,108:243,109:lt,110:ut,111:dt,112:ft},e(ht,[2,133]),{14:re,44:ie,60:ae,89:oe,101:280,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe,120:88},{14:re,44:ie,60:ae,89:oe,101:281,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe,120:88},{98:[1,282]},e(qe,[2,120]),e(he,[2,58]),{30:283,67:Ye,80:Xe,81:Ze,82:172,116:Qe,117:$e,118:et},e(he,[2,66]),e(We,a,{5:284}),e(mt,[2,131],{108:270,10:at,60:ot,84:st,105:ct,109:lt,110:ut,111:dt,112:ft}),e(qe,[2,126],{120:168,10:[1,285],14:re,44:ie,60:ae,89:oe,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe}),e(qe,[2,127],{120:168,10:[1,286],14:re,44:ie,60:ae,89:oe,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe}),e(qe,[2,114]),{31:[1,287],67:Ye,82:219,116:Qe,117:$e,118:et},{6:11,7:12,8:o,9:s,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:p,38:m,42:28,43:39,44:h,45:40,47:41,60:g,84:_,85:v,86:y,87:b,88:x,89:S,102:C,105:w,106:T,109:E,111:D,113:42,114:O,115:k,116:A,121:j,122:M,123:N,124:P,125:F},{10:at,60:ot,84:st,92:289,105:ct,107:242,108:243,109:lt,110:ut,111:dt,112:ft},{10:at,60:ot,84:st,92:290,105:ct,107:242,108:243,109:lt,110:ut,111:dt,112:ft},e(he,[2,62]),e(L,[2,33]),e(qe,[2,124],{106:pt}),e(qe,[2,125],{106:pt})],defaultActions:{},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};gt.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:U(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),34;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),36;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return this.pushState(`shapeData`),t.yytext=``,40;case 8:return this.pushState(`shapeDataStr`),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,`
    `),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin(`callbackname`);break;case 14:this.popState();break;case 15:this.popState(),this.begin(`callbackargs`);break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return`MD_STR`;case 20:this.popState();break;case 21:this.begin(`md_string`);break;case 22:return`STR`;case 23:this.popState();break;case 24:this.pushState(`string`);break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin(`click`);break;case 33:this.popState();break;case 34:return 88;case 35:return e.lex.firstGraph()&&this.begin(`dir`),12;case 36:return e.lex.firstGraph()&&this.begin(`dir`),12;case 37:return e.lex.firstGraph()&&this.begin(`dir`),12;case 38:return e.lex.firstGraph()&&this.begin(`dir`),12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;case 71:return this.pushState(`edgeText`),75;case 72:return 119;case 73:return this.popState(),77;case 74:return this.pushState(`thickEdgeText`),75;case 75:return 119;case 76:return this.popState(),77;case 77:return this.pushState(`dottedEdgeText`),75;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;case 81:return`TEXT`;case 82:return this.pushState(`ellipseText`),52;case 83:return this.popState(),55;case 84:return this.pushState(`text`),54;case 85:return this.popState(),57;case 86:return this.pushState(`text`),56;case 87:return 58;case 88:return this.pushState(`text`),67;case 89:return this.popState(),64;case 90:return this.pushState(`text`),63;case 91:return this.popState(),49;case 92:return this.pushState(`text`),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState(`trapText`),68;case 97:return this.pushState(`trapText`),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return`SEP`;case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState(`text`),62;case 111:return this.popState(),51;case 112:return this.pushState(`text`),50;case 113:return this.popState(),31;case 114:return this.pushState(`text`),29;case 115:return this.popState(),66;case 116:return this.pushState(`text`),65;case 117:return`TEXT`;case 118:return`QUOTE`;case 119:return 9;case 120:return 10;case 121:return 11}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}}})();function _t(){this.yy={}}return U(_t,`Parser`),_t.prototype=gt,gt.Parser=_t,new _t})(),Oq.parser=Oq,g$r=Oq,_$r=Object.assign({},g$r),_$r.parse=e=>{let t=e.replace(/}\s*\n/g,`} `);return g$r.parse(t)},v$r=_$r,y$r=U((e,t)=>{let n=e5n,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return ON(r,i,a,t)},`fade`),b$r=U(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span { color: ${e.titleColor}; } .cluster-label span p { background-color: transparent; } .label text,span { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth??1}px; } .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { text-anchor: middle; } .node .katex path { fill: #000; stroke: #000; stroke-width: 1px; } .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { text-align: center; } .node.clickable { cursor: pointer; } .root .anchor path { fill: ${e.lineColor} !important; stroke-width: 0; stroke: ${e.lineColor}; } .arrowheadPath { fill: ${e.arrowheadColor}; } .edgePaths .path { stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth??2}px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${y$r(e.edgeLabelBackground,.5)}; // background-color: } .cluster rect { fill: ${e.clusterBkg}; stroke: ${e.clusterBorder}; stroke-width: 1px; } .cluster text { fill: ${e.titleColor}; } .cluster span { color: ${e.titleColor}; } /* .cluster div { color: ${e.titleColor}; } */ /* Collapsed subgraph node (@{ view: collapsed }) */ .node .collapsed-indicator { fill: ${e.clusterBorder}; stroke: none; opacity: 0.6; } .node .collapsed-separator { stroke: ${e.clusterBorder}; stroke-width: 0.75px; } div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } rect.text { fill: none; stroke-width: 0; } .icon-shape, .image-shape { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; padding: 2px; } .label rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } ${Sq()} `,`getStyles`),kq=U(({defaultLayout:e,styles:t=b$r}={})=>({parser:v$r,get db(){return new m$r},renderer:h$r,styles:t,init:U(t=>{t.flowchart||(t.flowchart={});let n=rrr().layout??e??t.layout;n&&Irr({layout:n}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Irr({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},`init`)}),`createFlowDiagram`),x$r=kq()})),C$r=l({createFlowDiagram:()=>kq,diagram:()=>x$r}),w$r=o((()=>{S$r(),Tq(),Dq(),RV(),DK(),ZK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN()})),T$r=l({diagram:()=>E$r}),E$r,D$r=o((()=>{S$r(),Tq(),Dq(),RV(),DK(),ZK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),E$r=kq({defaultLayout:`swimlane`,styles:U(e=>`${b$r(e)} .swimlane.cluster rect { stroke: ${e.clusterBorder} !important; } [data-look="neo"].cluster rect { filter: none; } `,`getStyles`)})})),O$r=l({diagram:()=>I$r}),k$r,Aq,A$r,j$r,M$r,N$r,P$r,jq,F$r,I$r,L$r=o((()=>{Tq(),Dq(),DK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),XI(),NN(),Aq=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],n=[2,2],r=[1,7],i=[1,9],a=[1,10],o=[1,11],s=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[1,71],ee=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],te=[1,78],ne=[1,77],z=[1,76],re=[69,70,71,72,73],ie=[1,91],ae=[6,9,45,50],oe=[6,9,12,44,45,50,51,52],se=[1,101],ce=[1,100],le=[1,99],ue=[18,61],de=[1,110],fe=[1,109],pe=[20,43,51,53,54,55],me=[18,61,64,66],he={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,9:`NEWLINE`,12:`COLON`,14:`STYLE_SEPARATOR`,16:`BLOCK_START`,18:`BLOCK_STOP`,19:`SQS`,20:`SQE`,21:`title`,22:`title_value`,23:`acc_title`,24:`acc_title_value`,25:`acc_descr`,26:`acc_descr_value`,27:`acc_descr_multiline_value`,33:`END`,34:`SUBGRAPH`,37:`direction_tb`,38:`direction_bt`,39:`direction_rl`,40:`direction_lr`,41:`CLASSDEF`,43:`UNICODE_TEXT`,44:`STYLE_TEXT`,45:`COMMA`,46:`CLASS`,47:`STYLE`,50:`SEMI`,51:`NUM`,52:`BRKT`,53:`ENTITY_NAME`,54:`DECIMAL_NUM`,55:`ENTITY_ONE`,61:`ATTRIBUTE_WORD`,62:`?`,64:`,`,65:`ATTRIBUTE_KEY`,66:`COMMENT`,69:`ZERO_OR_ONE`,70:`ZERO_OR_MORE`,71:`ONE_OR_MORE`,72:`ONLY_ONE`,73:`MD_PARENT`,74:`NON_IDENTIFYING`,75:`IDENTIFYING`,76:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:this.$=a[s-1].concat(a[s]);break;case 4:this.$=a[s];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]),this.$=[a[s-4],a[s-2]];break;case 8:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-8],a[s-4]];break;case 9:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]),this.$=[a[s-6],a[s-2]];break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-6],a[s-4]];break;case 11:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]),this.$=[a[s-3]];break;case 12:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]),this.$=[a[s-5]];break;case 13:r.addEntity(a[s-2]),this.$=[a[s-2]];break;case 14:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-4]];break;case 15:r.addEntity(a[s]),this.$=[a[s]];break;case 16:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]),this.$=[a[s-2]];break;case 17:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]),this.$=[a[s-6]];break;case 18:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]),this.$=[a[s-8]];break;case 19:r.addEntity(a[s-5],a[s-3]),this.$=[a[s-5]];break;case 20:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]),this.$=[a[s-7]];break;case 21:r.addEntity(a[s-3],a[s-1]);break;case 22:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 23:case 24:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 27:r.subgraphDepth?this.$=a[s]:(r.setDirection(a[s].value),this.$=[]);break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:a[s-2].id},a[s-1],{text:a[s-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-1],text:a[s-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-4],text:a[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=a[s];break;case 35:this.$=a[s-1]+` `+a[s];break;case 36:this.$={stmt:`dir`,value:`TB`};break;case 37:this.$={stmt:`dir`,value:`BT`};break;case 38:this.$={stmt:`dir`,value:`RL`};break;case 39:this.$={stmt:`dir`,value:`LR`};break;case 40:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 41:case 42:case 63:case 72:this.$=[a[s]];break;case 43:case 44:this.$=a[s-2].concat([a[s]]);break;case 45:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 46:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 47:this.$=[a[s]];break;case 48:a[s-2].push(a[s]),this.$=a[s-2];break;case 50:this.$=a[s-1]+a[s];break;case 58:case 84:case 85:this.$=a[s].replace(/"/g,``);break;case 64:a[s].push(a[s-1]),this.$=a[s];break;case 65:this.$={type:a[s-1],name:a[s]};break;case 66:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 67:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 68:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 69:case 71:case 74:this.$=a[s];break;case 70:this.$=a[s-1]+a[s];break;case 73:a[s-2].push(a[s]),this.$=a[s-2];break;case 75:this.$=a[s].replace(/"/g,``);break;case 76:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,n,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:i,23:a,25:o,27:s,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},e(t,S,{1:[2,1]}),e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,n,{5:44}),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),e(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},e(N,[2,77]),e(N,[2,78]),e(N,[2,79]),e(N,[2,80]),e(N,[2,81]),e(C,[2,23]),e(C,[2,24]),e(C,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:i,23:a,25:o,27:s,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},e(ee,[2,41]),e(ee,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:te,9:ne,19:[1,75],35:74,50:z},{12:[1,79],14:[1,80]},e(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},e(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},e(re,[2,82]),e(re,[2,83]),e(C,[2,31]),e(C,S),{6:te,9:ne,35:90,45:ie,50:z},{43:[1,92],44:[1,93]},e(ae,[2,47],{49:94,12:P,44:F,51:L,52:R}),e(oe,[2,49]),e(oe,[2,54]),e(oe,[2,55]),e(oe,[2,56]),e(oe,[2,57]),e(C,[2,45],{45:I}),{6:te,9:ne,35:95,45:ie,50:z},e(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),{13:98,43:se,53:ce,76:le},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},e(C,[2,11]),{18:[2,64]},e(ue,[2,65],{59:106,60:107,63:108,65:de,66:fe}),e([18,61,65,66],[2,71]),{61:[2,70]},e(C,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},e(ee,[2,43]),e(ee,[2,44]),e(oe,[2,50]),e(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},e(pe,[2,34]),e(C,[2,7]),e(C,[2,84]),e(C,[2,85]),e(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},e(C,[2,14]),e(ue,[2,66],{60:120,64:[1,121],66:fe}),e(ue,[2,67]),e(me,[2,72]),e(ue,[2,75]),e(me,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},e(ae,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:te,9:ne,35:125,50:z},e(pe,[2,35]),{13:126,43:se,53:ce,76:le},{15:127,43:A,44:j},{13:128,43:se,53:ce,76:le},e(C,[2,12]),e(ue,[2,68]),{63:129,65:de},{18:[1,130]},e(C,[2,19]),e(C,[2,22],{16:[1,131],45:I}),e(C,[2,33]),e(C,[2,10]),{12:[1,132],45:I},e(C,[2,9]),e(me,[2,73]),e(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:se,53:ce,76:le},{18:[1,136]},e(C,[2,20]),e(C,[2,8]),e(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};he.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),23;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),25;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin(`block`),16;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin(`block_bq`);break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;case 32:return t.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin(`style`),47;case 36:return this.popState(),9;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin(`style`),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return t.yytext[0];case 82:return 6}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}}})();function ge(){this.yy={}}return U(ge,`Parser`),ge.prototype=he,he.Parser=ge,new ge})(),Aq.parser=Aq,A$r=Aq,j$r=(k$r=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction=`TB`,this.Cardinality={ZERO_OR_ONE:`ZERO_OR_ONE`,ZERO_OR_MORE:`ZERO_OR_MORE`,ONE_OR_MORE:`ONE_OR_MORE`,ONLY_ONE:`ONLY_ONE`,MD_PARENT:`MD_PARENT`},this.Identification={NON_IDENTIFYING:`NON_IDENTIFYING`,IDENTIFYING:`IDENTIFYING`},this.setAccTitle=dI,this.getAccTitle=fI,this.setAccDescription=pI,this.getAccDescription=mI,this.setDiagramTitle=hI,this.getDiagramTitle=gI,this.getConfig=U(()=>_I().er,`getConfig`),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}addEntity(e,t=``){var n;return this.entities.has(e)?!((n=this.entities.get(e))!=null&&n.alias)&&t&&(this.entities.get(e).alias=t,W.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:`erBox`,look:_I().look??`default`,cssClasses:`default`,cssStyles:[],labelType:`markdown`}),W.info(`Added new entity :`,e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let n=this.addEntity(e),r;for(r=t.length-1;r>=0;r--)t[r].keys||(t[r].keys=[]),t[r].comment||(t[r].comment=``),n.attributes.push(t[r]),W.debug(`Added attribute `,t[r].name)}addRelationship(e,t,n,r){let i;if(this.subGraphLookup.has(e))i=e;else{let t=this.addEntity(e);if(!t)return;i=t.id}let a;if(this.subGraphLookup.has(n))a=n;else{let e=this.addEntity(n);if(!e)return;a=e.id}let o={entityA:i,roleA:t,entityB:a,relSpec:r};this.relationships.push(o),W.debug(`Added new relationship :`,o)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e!=null&&e.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e!=null&&e.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}addCssStyles(e,t){for(let n of e){let e=this.entities.get(n),r=this.subGraphLookup.get(n);if(t){if(e)for(let n of t)e.cssStyles.push(n);if(r){r.cssStyles||(r.cssStyles=[]);for(let e of t)r.cssStyles.push(e)}}}}addClass(e,t){e.forEach(e=>{let n=this.classes.get(e);n===void 0&&(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n)),t&&t.forEach(function(e){if(/color/.exec(e)){let t=e.replace(`fill`,`bgFill`);n.textStyles.push(t)}n.styles.push(e)})})}addSubGraph(e,t,n){let r=e.text.trim(),i=n.text,a=U(e=>{let t=new Set,n;return{nodeList:e.filter(e=>{if(e!=null&&e.stmt)return e.stmt===`dir`&&(n=e.value),!1;if(typeof e!=`string`)return!1;let r=e.trim();return!r||t.has(r)?!1:(t.add(r),!0)}),dir:n}},`uniq`)(t.flat()),o=a.nodeList,s=a.dir;r=r??`subGraph`+this.subCount,i=i||``,i=this.sanitizeText(i),this.subCount+=1;let l={id:r,nodes:o,title:i.trim(),classes:[],cssStyles:[],dir:s,labelType:this.sanitizeNodeLabelType(n==null?void 0:n.type)};return W.info(`Adding`,l.id,l.nodes,l.dir),l.nodes=this.makeUniq(l,this.subGraphs).nodes,this.subGraphs.push(l),this.subGraphLookup.set(r,l),r}getSubGraphs(){return this.subGraphs}setClass(e,t){for(let n of e){let e=this.entities.get(n);if(e)for(let n of t)e.cssClasses+=` `+n;let r=this.subGraphLookup.get(n);if(r)for(let e of t)r.classes.push(e)}}subgraphNodeCache(e){let t=new Set;for(let n of e)for(let e of n.nodes)t.add(e);return t}makeUniq(e,t){let n=this.subgraphNodeCache(t),r=[];return e.nodes.forEach((t,i)=>{n.has(t)?W.warn(`Entity '${t}' already belongs to another subgraph and will be ignored`):r.push(e.nodes[i])}),{nodes:r}}sanitizeText(e){return oI.sanitizeText(e,_I())}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,uI()}getData(){let e=[],t=[],n=_I(),r=this.getSubGraphs(),i=new Map,a=new Map;for(let e=r.length-1;e>=0;e--){let t=r[e];t.nodes.length>0&&a.set(t.id,!0);for(let e of t.nodes)i.set(e,t.id)}for(let t=r.length-1;t>=0;t--){let a=r[t];e.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssStyles:a.cssStyles,cssClasses:a.classes.join(` `),shape:`rect`,dir:a.dir,isGroup:!0,look:n.look})}let o=new Set(r.map(e=>e.id)),s=0;for(let t of this.entities.keys()){if(o.has(t))continue;let n=this.entities.get(t);n&&(n.cssCompiledStyles=this.getCompiledStyles(n.cssClasses.split(` `)),n.colorIndex=s++,e.push({...n,parentId:i.get(t),isGroup:!1}))}let l=0;for(let e of this.relationships){let r={id:CL(e.entityA,e.entityB,{prefix:`id`,counter:l++}),type:`normal`,curve:`basis`,start:e.entityA,end:e.entityB,label:e.roleA,labelpos:`c`,thickness:`normal`,classes:`relationshipLine`,arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:e.relSpec.relType==`IDENTIFYING`?`solid`:`dashed`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.direction}}},U(k$r,`ErDB`),k$r),M$r={},dN(M$r,{draw:()=>N$r}),N$r=U(async function(e,t,n,r){W.info(`REF0:`),W.info(`Drawing er diagram (unified)`,t);let{securityLevel:i,er:a,layout:o}=_I(),s=r.db.getData(),l=wq(t,i);s.type=r.type,s.layoutAlgorithm=EK(o),s.config.flowchart.nodeSpacing=(a==null?void 0:a.nodeSpacing)||140,s.config.flowchart.rankSpacing=(a==null?void 0:a.rankSpacing)||80,s.direction=r.db.getDirection();let{config:u}=s,{look:d}=u;s.markers=d===`neo`?[`only_one_neo`,`zero_or_one_neo`,`one_or_more_neo`,`zero_or_more_neo`]:[`only_one`,`zero_or_one`,`one_or_more`,`zero_or_more`],s.diagramId=t,await TK(s,l),s.layoutAlgorithm===`elk`&&l.select(`.edges`).lower();let f=l.selectAll(`[id*="-background"]`);Array.from(f).length>0&&f.each(function(){let e=DI(this),t=e.attr(`id`).replace(`-background`,``),n=l.select(`#${CSS.escape(t)}`);if(!n.empty()){let t=n.attr(`transform`);e.attr(`transform`,t)}}),xL.insertTitle(l,`erDiagramTitleText`,(a==null?void 0:a.titleTopMargin)??25,r.db.getDiagramTitle()),Eq(l,8,`erDiagram`,(a==null?void 0:a.useMaxWidth)??!0)},`draw`),P$r=U((e,t)=>{let n=e5n,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return ON(r,i,a,t)},`fade`),jq=new Set([`redux-color`,`redux-dark-color`]),F$r=U(e=>{let{theme:t,look:n,bkgColorArray:r,borderColorArray:i}=e;if(!jq.has(t))return``;let a=(r==null?void 0:r.length)>0,o=``;for(let t=0;t{let{look:t,theme:n,erEdgeLabelBackground:r,strokeWidth:i}=e;return` ${F$r(e)} .entityBox { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } .relationshipLabelBox { fill: ${e.tertiaryColor}; opacity: 0.7; background-color: ${e.tertiaryColor}; rect { opacity: 0.5; } } .labelBkg { background-color: ${jq.has(n)&&r?r:P$r(e.tertiaryColor,.5)}; } .edgeLabel { background-color: ${jq.has(n)&&r?r:e.edgeLabelBackground}; } .edgeLabel .label rect { fill: ${jq.has(n)&&r?r:e.edgeLabelBackground}; } .edgeLabel .label text { fill: ${e.textColor}; } .edgeLabel .label { fill: ${e.nodeBorder}; font-size: 14px; } .label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .edge-pattern-dashed { stroke-dasharray: 8,8; } .node rect, .node circle, .node ellipse, .node polygon { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${t===`neo`?i:`1px`}; } .relationshipLine { stroke: ${e.lineColor}; stroke-width: ${t===`neo`?i:`1px`}; fill: none; } .marker { fill: none !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [data-look=neo].labelBkg { background-color: ${P$r(e.tertiaryColor,.5)}; } .cluster rect { fill: ${e.clusterBkg??e.mainBkg}; stroke: ${e.clusterBorder??e.nodeBorder}; stroke-width: 1px; } .cluster text { fill: ${e.titleColor??e.textColor}; } .cluster-label text { fill: ${e.titleColor??e.textColor}; } `},`getStyles`)}})),R$r,Mq,z$r=o((()=>{fN(),R$r=class{constructor(e){this.init=e,this.records=this.init()}reset(){this.records=this.init()}},Mq=(U(R$r,`ImperativeState`),R$r)}));function Nq(e,t){if(e.accDescr){var n;(n=t.setAccDescription)==null||n.call(t,e.accDescr)}if(e.accTitle){var r;(r=t.setAccTitle)==null||r.call(t,e.accTitle)}if(e.title){var i;(i=t.setDiagramTitle)==null||i.call(t,e.title)}}var Pq=o((()=>{fN(),U(Nq,`populateCommonDb`)}));function Fq(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}function Iq(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}function Lq(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}function B$r(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}function Rq(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}function zq(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}function Bq(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}function Vq(e){return zq(e)&&typeof e.fullText==`string`}function V$r(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}function Hq(e){return!!e&&typeof e[Symbol.iterator]==`function`}function Uq(...e){if(e.length===1){let t=e[0];if(t instanceof oZ)return t;if(Hq(t))return new oZ(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new oZ(()=>({index:0}),e=>e.index1?new oZ(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex{Fq(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&Wq(r,t))}):Fq(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&Wq(r,t)))}function Gq(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function H$r(e,t){let n=e;for(;n;){if(t(n))return!0;n=n.$container}return!1}function Kq(e){let t=qq(e).$document;if(!t)throw Error(`AST node has no document.`);return t}function qq(e){for(;e.$container;)e=e.$container;return e}function Jq(e){return Iq(e)?e.ref?[e.ref]:[]:Lq(e)?e.items.map(e=>e.ref):[]}function Yq(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t==null?void 0:t.range;return new oZ(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexYq(e,t))}function Zq(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t!=null&&t.range&&!Qq(e,t.range)?new lZ(e,()=>[]):new lZ(e,e=>Yq(e,t),{includeRoot:!0})}function Qq(e,t){var n;if(!t)return!0;let r=(n=e.$cstNode)==null?void 0:n.range;return r?k1r(r,t):!1}function $q(e){return new oZ(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexzq(e)?e.content:[],{includeRoot:!0})}function E1r(e){return vJ(e).filter(Bq)}function D1r(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function yJ(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function bJ(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}function O1r(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return dQ.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.linedQ.After}function A1r(e,t,n=fQ){if(e){if(t>0){let r=t-e.offset,i=e.text.charAt(r);n.test(i)||t--}return SJ(e,t)}}function j1r(e,t){if(e){let n=P1r(e,!0);if(n&&xJ(n,t))return n;if(Vq(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(xJ(n,t))return n}}}}function xJ(e,t){return Bq(e)&&t.includes(e.tokenType.name)}function SJ(e,t){if(Bq(e))return e;if(zq(e)){let n=N1r(e,t,!1);if(n)return SJ(n,t)}}function M1r(e,t){if(Bq(e))return e;if(zq(e)){let n=N1r(e,t,!0);if(n)return M1r(n,t)}}function N1r(e,t,n){let r=0,i=e.content.length-1,a;for(;r<=i;){let o=Math.floor((r+i)/2),s=e.content[o];if(s.offset<=t&&s.end>t)return s;s.end<=t?(a=n?s:void 0,r=o+1):i=o-1}return a}function P1r(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}function F1r(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e),i=n.content.length-1;for(;rt.test(e))}function AJ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function W1r(e,t){let n=G1r(e),r=t.match(n);return!!r&&r[0].length>0}function G1r(e){typeof e==`string`&&(e=new RegExp(e));let t=e,n=e.source,r=0;function i(){let e=``,a;function o(t){e+=n.substr(r,t),r+=t}X(o,`appendRaw`);function s(t){e+=`(?:`+n.substr(r,t)+`|$)`,r+=t}for(X(s,`appendOptional`);r`,r)-r+1);break;default:s(2)}break;case`[`:a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(n)||[],s(a[0].length);break;case`|`:case`^`:case`$`:case`*`:case`+`:case`?`:o(1);break;case`{`:a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(n),a?o(a[0].length):s(1);break;case`(`:if(n[r+1]===`?`)switch(n[r+2]){case`:`:e+=`(?:`,r+=3,e+=i()+`|$)`;break;case`=`:e+=`(?=`,r+=3,e+=i()+`)`;break;case`!`:a=r,r+=3,i(),e+=n.substr(a,r-a);break;case`<`:switch(n[r+3]){case`=`:case`!`:a=r,r+=4,i(),e+=n.substr(a,r-a);break;default:o(n.indexOf(`>`,r)-r+1),e+=i()+`|$)`}}else o(1),e+=i()+`|$)`;break;case`)`:return++r,e;default:s(1)}return e}return X(i,`process`),new RegExp(i(),e.flags)}function K1r(e){return e.rules.find(e=>dJ(e)&&e.entry)}function q1r(e){return e.rules.filter(e=>mJ(e)&&e.hidden)}function jJ(e,t){let n=new Set,r=K1r(e);if(!r)return new Set(e.rules);let i=[r].concat(q1r(e));for(let e of i)J1r(e,n,t);let a=new Set;for(let t of e.rules)(n.has(t.name)||mJ(t)&&t.hidden)&&a.add(t);return a}function J1r(e,t,n){t.add(e.name),Xq(e).forEach(e=>{if(fJ(e)||n&&hJ(e)){let r=e.rule.ref;r&&!t.has(r.name)&&J1r(r,t,n)}})}function Y1r(e){let t=new Set;return Xq(e).forEach(e=>{oJ(e)&&(dJ(e.type.ref)&&t.add(e.type.ref),cJ(e.type.ref)&&dJ(e.type.ref.$container)&&t.add(e.type.ref.$container))}),t}function X1r(e){if(e.terminal)return e.terminal;if(e.type.ref){let t=FJ(e.type.ref);return t==null?void 0:t.terminal}}function Z1r(e){return e.hidden&&!kJ(BJ(e))}function Q1r(e,t){return!e||!t?[]:NJ(e,t,e.astNode,!0)}function MJ(e,t,n){if(!e||!t)return;let r=NJ(e,t,e.astNode,!0);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}function NJ(e,t,n,r){if(!r){let n=Gq(e.grammarSource,aJ);if(n&&n.feature===t)return[e]}return zq(e)&&e.astNode===n?e.content.flatMap(e=>NJ(e,t,n,!1)):[]}function $1r(e,t){return e?PJ(e,t,e==null?void 0:e.astNode):[]}function e0r(e,t,n){if(!e)return;let r=PJ(e,t,e==null?void 0:e.astNode);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}function PJ(e,t,n){if(e.astNode!==n)return[];if(uJ(e.grammarSource)&&e.grammarSource.value===t)return[e];let r=vJ(e).iterator(),i,a=[];do if(i=r.next(),!i.done){let e=i.value;e.astNode===n?uJ(e.grammarSource)&&e.grammarSource.value===t&&a.push(e):r.prune()}while(!i.done);return a}function t0r(e){var t;let n=e.astNode;for(;n===((t=e.container)==null?void 0:t.astNode);){let t=Gq(e.grammarSource,aJ);if(t)return t;e=e.container}}function FJ(e){let t=e;return cJ(t)&&(rJ(t.$container)?t=t.$container.$container:nJ(t.$container)?t=t.$container:CJ(t.$container)),n0r(e,t,new Map)}function n0r(e,t,n){function r(t,r){let i;return Gq(t,aJ)||(i=n0r(r,r,n)),n.set(e,i),i}if(X(r,`go`),n.has(e))return n.get(e);n.set(e,void 0);for(let a of Xq(t)){var i;if(aJ(a)&&a.feature.toLowerCase()===`name`)return n.set(e,a),a;if(fJ(a)&&dJ(a.rule.ref))return r(a,a.rule.ref);if(pJ(a)&&(i=a.typeRef)!=null&&i.ref)return r(a,a.typeRef.ref)}}function r0r(e){let t=e.$container;if(sJ(t)){let n=t.elements,r=n.indexOf(e);for(let e=r-1;e>=0;e--){let t=n[e];if(rJ(t))return t;{let t=Xq(n[e]).find(rJ);if(t)return t}}}if(tJ(t))return r0r(t)}function i0r(e,t){return e===`?`||e===`*`||sJ(t)&&!!t.guardCondition}function a0r(e){return e===`*`||e===`+`}function o0r(e){return e===`+=`}function IJ(e){return s0r(e,new Set)}function s0r(e,t){if(t.has(e))return!0;t.add(e);for(let n of Xq(e))if(fJ(n)){if(!n.rule.ref||dJ(n.rule.ref)&&!s0r(n.rule.ref,t)||lJ(n.rule.ref))return!1}else if(aJ(n))return!1;else if(rJ(n))return!1;return!!e.definition}function c0r(e){return LJ(e.type,new Set)}function LJ(e,t){if(t.has(e))return!0;if(t.add(e),J$r(e)||f1r(e))return!1;if(x1r(e))return e.types.every(e=>LJ(e,t));if(pJ(e)){if(e.primitiveType!==void 0||e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let n=e.typeRef.ref;return gJ(n)?LJ(n.type,t):!1}return!1}return!1}function RJ(e){if(!mJ(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}function zJ(e){if(nJ(e))return dJ(e)&&IJ(e)?e.name:RJ(e)??e.name;if(a1r(e)||gJ(e)||m1r(e))return e.name;if(rJ(e)){let t=l0r(e);if(t)return t}else if(cJ(e))return e.name;throw Error(`Cannot get name of Unknown Type`)}function l0r(e){var t;if(e.inferredType)return e.inferredType.name;if((t=e.type)!=null&&t.ref)return zJ(e.type.ref)}function u0r(e){if(mJ(e)){var t;return((t=e.type)==null?void 0:t.name)??`string`}return dJ(e)&&IJ(e)?e.name:RJ(e)??e.name}function d0r(e){if(mJ(e)){var t;return((t=e.type)==null?void 0:t.name)??`string`}return RJ(e)??e.name}function BJ(e){let t={s:!1,i:!1,u:!1},n=VJ(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join(``);return new RegExp(n,r)}function VJ(e,t){if(g1r(e))return f0r(e);if(v1r(e))return p0r(e);if(X$r(e))return g0r(e);if(hJ(e)){let t=e.rule.ref;if(!t)throw Error(`Missing rule reference.`);return UJ(VJ(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(s1r(e))return h0r(e);if(S1r(e))return m0r(e);if(p1r(e)){let n=e.regex.lastIndexOf(`/`),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes(`i`),t.s=i.includes(`s`),t.u=i.includes(`u`)),UJ(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(w1r(e))return UJ(xQ,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});var n;throw Error(`Invalid terminal element: ${e==null?void 0:e.$type}, ${e==null||(n=e.$cstNode)==null?void 0:n.text}`)}function f0r(e){return UJ(e.elements.map(e=>VJ(e)).join(`|`),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function p0r(e){return UJ(e.elements.map(e=>VJ(e)).join(``),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function m0r(e){return UJ(`${xQ}*?${VJ(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function h0r(e){return UJ(`(?!${VJ(e.terminal)})${xQ}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function g0r(e){return e.right?UJ(`[${HJ(e.left)}-${HJ(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):UJ(HJ(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function HJ(e){return AJ(e.value)}function UJ(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?``:`?:`)}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function _0r(e){let t=[],n=e.Grammar;for(let e of n.rules)mJ(e)&&Z1r(e)&&U1r(BJ(e))&&t.push(e.name);return{multilineCommentRules:t,nameRegexp:fQ}}function v0r(e){var t=Sai.call(e,wQ),n=e[wQ];try{e[wQ]=void 0;var r=!0}catch{}var i=Cai.call(e);return r&&(t?e[wQ]=n:delete e[wQ]),i}function y0r(e){return Tai.call(e)}function b0r(e){return e==null?e===void 0?Oai:Dai:kai&&kai in Object(e)?wai(e):Eai(e)}function x0r(e){return typeof e==`object`&&!!e}function S0r(e){return typeof e==`symbol`||EQ(e)&&TQ(e)==Aai}function C0r(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=moi)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function H0r(e){return function(){return e}}function U0r(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}function Y0r(e,t){var n=typeof e;return t=t??Toi,!!t&&(n==`number`||n!=`symbol`&&Eoi.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Aoi}function r2r(e){return e!=null&&qQ(e.length)&&!NQ(e)}function i2r(e,t,n){if(!AQ(n))return!1;var r=typeof t;return(r==`number`?JQ(n)&&VQ(t,n.length):r==`string`&&t in n)?UQ(n[t],e):!1}function a2r(e){return KQ(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&YQ(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1}function A2r(e,t){var n=this.__data__,r=u$(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function GJ(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?K2r(s,t-1,n,r,i):v$(i,s):r||(i[i.length]=s)}return i}function q2r(e){return e!=null&&e.length?y$(e,1):[]}function J2r(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++rs))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=n&lui?new F$:void 0;for(a.set(e,t),a.set(t,e);++f=sdi&&(a=I$,o=!1,t=new F$(t));outer:for(;++i-1?i[a?t[o]:o]:void 0}}function p3r(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:jQ(n);return i<0&&(i=mdi(r+i,0)),xoi(e,B$(t,3),i)}function m3r(e){return e&&e.length?e[0]:void 0}function h3r(e,t){var n=-1,r=JQ(e)?Array(e.length):[];return V$(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function g3r(e,t){return(kQ(e)?OQ:hdi)(e,B$(t,3))}function _3r(e,t){return y$(Q$(e,t),1)}function v3r(e,t){return e!=null&&vdi.call(e,t)}function y3r(e,t){return e!=null&&Wui(e,t,ydi)}function b3r(e){return typeof e==`string`||!kQ(e)&&EQ(e)&&TQ(e)==bdi}function x3r(e,t){return OQ(t,function(t){return e[t]})}function S3r(e){return e==null?[]:xdi(e,a$(e))}function C3r(e,t,n,r){e=JQ(e)?e:n1(e),n=n&&!r?jQ(n):0;var i=e.length;return n<0&&(n=Sdi(i+n,0)),t1(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&BQ(e,t,n)>-1}function w3r(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:jQ(n);return i<0&&(i=Cdi(r+i,0)),BQ(e,t,i)}function T3r(e){if(e==null)return!0;if(JQ(e)&&(kQ(e)||typeof e==`string`||typeof e.splice==`function`||QQ(e)||i$(e)||ZQ(e)))return!e.length;var t=k$(e);if(t==Tdi||t==Edi)return!e.size;if(XQ(e))return!xsi(e).length;for(var n in e)if(Ddi.call(e,n))return!1;return!0}function E3r(e){return EQ(e)&&TQ(e)==Odi}function D3r(e){return e===void 0}function O3r(e){if(typeof e!=`function`)throw TypeError(jdi);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function k3r(e,t,n,r){if(!AQ(e))return e;t=h$(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i=zdi){var u=t?null:Rdi(e);if(u)return L$(u);o=!1,i=I$,l=new F$}else l=t?[]:s;outer:for(;++r$J(e,t)):e instanceof f1&&r1(t,e)?!1:e instanceof d1&&(e instanceof f1&&t.push(e),J$(e.definition,e=>$J(e,t)))}function K3r(e){return e instanceof b1}function eY(e){if(e instanceof f1)return`SUBRULE`;if(e instanceof h1)return`OPTION`;if(e instanceof b1)return`OR`;if(e instanceof g1)return`AT_LEAST_ONE`;if(e instanceof _1)return`AT_LEAST_ONE_SEP`;if(e instanceof y1)return`MANY_SEP`;if(e instanceof v1)return`MANY`;if(e instanceof x1)return`CONSUME`;throw Error(`non exhaustive match`)}function q3r(e,t,n){return[new h1({definition:[new x1({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function tY(e){if(e instanceof f1)return tY(e.referencedRule);if(e instanceof x1)return X3r(e);if(G3r(e))return J3r(e);if(K3r(e))return Y3r(e);throw Error(`non exhaustive match`)}function J3r(e){let t=[],n=e.definition,r=0,i=n.length>r,a,o=!0;for(;i&&o;)a=n[r],o=$J(a),t=t.concat(tY(a)),r+=1,i=n.length>r;return u1(t)}function Y3r(e){return u1(b$(Q$(e.definition,e=>tY(e))))}function X3r(e){return[e.terminalType]}function Z3r(e){let t={};return q$(e,e=>{let n=new Hdi(e).startWalking();o$(t,n)}),t}function Q3r(e,t){return e.name+t+Vdi}function nY(e){let t=e.toString();if(w1.hasOwnProperty(t))return w1[t];{let e=Udi.pattern(t);return w1[t]=e,e}}function $3r(){w1={}}function e6r(e,t=!1){try{let t=nY(e);return rY(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===Wdi)t&&z3r(`${T1} Unable to optimize: < ${e.toString()} > Complement Sets cannot be automatically optimized. This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n=``;t&&(n=` This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),ZJ(`${T1} Failed parsing: < ${e.toString()} > Using the @chevrotain/regexp-to-ast library Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function rY(e,t,n){switch(e.type){case`Disjunction`:for(let r=0;r{if(typeof e==`number`)iY(e,t,n);else{let r=e;if(n===!0)for(let e=r.from;e<=r.to;e++)iY(e,t,n);else{for(let e=r.from;e<=r.to&&e=k1){let e=r.from>=k1?r.from:k1,n=r.to,i=cY(e),a=cY(n);for(let e=i;e<=a;e++)t[e]=e}}}});break;case`Group`:rY(a.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}let o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type===`Group`&&aY(a)===!1||a.type!==`Group`&&o===!1)break}break;default:throw Error(`non exhaustive match!`)}return n1(t)}function iY(e,t,n){let r=cY(e);t[r]=r,n===!0&&t6r(e,t)}function t6r(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=cY(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=cY(e.charCodeAt(0));t[n]=n}}}function n6r(e,t){return X$(e.value,e=>{if(typeof e==`number`)return r1(t,e);{let n=e;return X$(t,e=>n.from<=e&&e<=n.to)!==void 0}})}function aY(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?kQ(e.value)?J$(e.value,aY):aY(e.value):!1}function oY(e,t){if(t instanceof RegExp){let n=nY(t),r=new Gdi(e);return r.visit(n),r.found}return X$(t,t=>r1(e,t.charCodeAt(0)))!==void 0}function r6r(e,t){t=H$(t,{debug:!1,safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,` `],tracer:X((e,t)=>t(),`tracer`)});let n=t.tracer;n(`initCharCodeToOptimizedIndexMap`,()=>{O6r()});let r;n(`Reject Lexer.NA`,()=>{r=l1(e,e=>e[E1]===N1.NA)});let i=!1,a;n(`Transform Patterns`,()=>{i=!1,a=Q$(r,e=>{let t=e[E1];if(a1(t)){let e=t.source;return e.length===1&&e!==`^`&&e!==`$`&&e!==`.`&&!t.ignoreCase?e:e.length===2&&e[0]===`\\`&&!r1([`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`],e[1])?e[1]:y6r(t)}if(NQ(t))return i=!0,{exec:t};if(typeof t==`object`)return i=!0,t;if(typeof t==`string`){if(t.length===1)return t;{let e=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`);return y6r(new RegExp(e))}}throw Error(`non exhaustive match`)})});let o,s,l,u,d;n(`misc mapping`,()=>{o=Q$(r,e=>e.tokenTypeIdx),s=Q$(r,e=>{let t=e.GROUP;if(t!==N1.SKIPPED){if(t1(t))return t;if(o1(t))return!1;throw Error(`non exhaustive match`)}}),l=Q$(r,e=>{let t=e.LONGER_ALT;if(t)return kQ(t)?Q$(t,e=>wdi(r,e)):[wdi(r,t)]}),u=Q$(r,e=>e.PUSH_MODE),d=Q$(r,e=>e1(e,`POP_MODE`))});let f;n(`Line Terminator Handling`,()=>{let e=D6r(t.lineTerminatorCharacters);f=Q$(r,e=>!1),t.positionTracking!==`onlyOffset`&&(f=Q$(r,t=>e1(t,`LINE_BREAKS`)?!!t.LINE_BREAKS:T6r(t,e)===!1&&oY(e,t.PATTERN)))});let p,m,h,g;n(`Misc Mapping #2`,()=>{p=Q$(r,C6r),m=Q$(a,w6r),h=c1(r,(e,t)=>{let n=t.GROUP;return t1(n)&&n!==N1.SKIPPED&&(e[n]=[]),e},{}),g=Q$(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:f[t],isCustom:p[t],short:m[t],group:s[t],push:u[t],pop:d[t],tokenTypeIdx:o[t],tokenType:r[t]}))});let _=!0,v=[];return t.safeMode||n(`First Char Optimization`,()=>{v=c1(r,(e,n,r)=>{if(typeof n.PATTERN==`string`)sY(e,cY(n.PATTERN.charCodeAt(0)),g[r]);else if(kQ(n.START_CHARS_HINT)){let t;q$(n.START_CHARS_HINT,n=>{let i=cY(typeof n==`string`?n.charCodeAt(0):n);t!==i&&(t=i,sY(e,i,g[r]))})}else if(a1(n.PATTERN)){if(n.PATTERN.unicode)_=!1,t.ensureOptimizations&&ZJ(`${T1} Unable to analyze < ${n.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let i=e6r(n.PATTERN,t.ensureOptimizations);i1(i)&&(_=!1),q$(i,t=>{sY(e,t,g[r])})}}else t.ensureOptimizations&&ZJ(`${T1} TokenType: <${n.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),_=!1;return e},[])}),{emptyGroups:h,patternIdxToConfig:g,charCodeToPatternIdxToConfig:v,hasCustom:i,canBeOptimized:_}}function i6r(e,t){let n=[],r=o6r(e);n=n.concat(r.errors);let i=s6r(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(a6r(a)),n=n.concat(p6r(a)),n=n.concat(m6r(a,t)),n=n.concat(h6r(a)),n}function a6r(e){let t=[],n=Y$(e,e=>a1(e[E1]));return t=t.concat(c6r(n)),t=t.concat(u6r(n)),t=t.concat(d6r(n)),t=t.concat(f6r(n)),t=t.concat(l6r(n)),t}function o6r(e){let t=Y$(e,e=>!e1(e,E1));return{errors:Q$(t,e=>({message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:j1.MISSING_PATTERN,tokenTypes:[e]})),valid:U$(e,t)}}function s6r(e){let t=Y$(e,e=>{let t=e[E1];return!a1(t)&&!NQ(t)&&!e1(t,`exec`)&&!t1(t)});return{errors:Q$(t,e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:j1.INVALID_PATTERN,tokenTypes:[e]})),valid:U$(e,t)}}function c6r(e){var t;class n extends yQ{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return t=n,X(t,`EndAnchorFinder`),Q$(Y$(e,e=>{let t=e.PATTERN;try{let e=nY(t),r=new n;return r.visit(e),r.found}catch{return Kdi.test(t.source)}}),e=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$' See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:j1.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function l6r(e){return Q$(Y$(e,e=>e.PATTERN.test(``)),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:j1.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function u6r(e){var t;class n extends yQ{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return t=n,X(t,`StartAnchorFinder`),Q$(Y$(e,e=>{let t=e.PATTERN;try{let e=nY(t),r=new n;return r.visit(e),r.found}catch{return qdi.test(t.source)}}),e=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^' See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:j1.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function d6r(e){return Q$(Y$(e,e=>{let t=e[E1];return t instanceof RegExp&&(t.multiline||t.global)}),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:j1.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function f6r(e){let t=[],n=Q$(e,n=>c1(e,(e,r)=>(n.PATTERN.source===r.PATTERN.source&&!r1(t,r)&&r.PATTERN!==N1.NA&&(t.push(r),e.push(r)),e),[]));return n=P$(n),Q$(Y$(n,e=>e.length>1),e=>{let t=Q$(e,e=>e.name);return{message:`The same RegExp pattern ->${Z$(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(`, `)} <-`,type:j1.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function p6r(e){return Q$(Y$(e,e=>{if(!e1(e,`GROUP`))return!1;let t=e.GROUP;return t!==N1.SKIPPED&&t!==N1.NA&&!t1(t)}),e=>({message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:j1.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function m6r(e,t){return Q$(Y$(e,e=>e.PUSH_MODE!==void 0&&!r1(t,e.PUSH_MODE)),e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:j1.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function h6r(e){let t=[],n=c1(e,(e,t,n)=>{let r=t.PATTERN;return r===N1.NA||(t1(r)?e.push({str:r,idx:n,tokenType:t}):a1(r)&&_6r(r)&&e.push({str:r.source,idx:n,tokenType:t})),e},[]);return q$(e,(e,r)=>{q$(n,({str:n,idx:i,tokenType:a})=>{if(r${a.name}<- can never be matched. Because it appears AFTER the Token Type ->${e.name}<-in the lexer's definition. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:j1.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}function g6r(e,t){if(a1(t)){if(v6r(t))return!1;let n=t.exec(e);return n!==null&&n.index===0}if(NQ(t))return t(e,0,[],{});if(e1(t,`exec`))return t.exec(e,0,[],{});if(typeof t==`string`)return t===e;throw Error(`non exhaustive match`)}function _6r(e){return X$([`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`],t=>e.source.indexOf(t)!==-1)===void 0}function v6r(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition `,type:j1.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),e1(e,O1)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+O1+`> property in its definition `,type:j1.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),e1(e,O1)&&e1(e,D1)&&!e1(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${D1}: <${e.defaultMode}>which does not exist `,type:j1.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),e1(e,O1)&&q$(e.modes,(e,t)=>{q$(e,(n,i)=>{o1(n)?r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}> `,type:j1.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):e1(n,`LONGER_ALT`)&&q$(kQ(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT],i=>{!o1(i)&&!r1(e,i)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}> `,type:j1.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),r}function x6r(e,t,n){let r=[],i=!1,a=l1(P$(b$(n1(e.modes))),e=>e[E1]===N1.NA),o=D6r(n);return t&&q$(a,e=>{let t=T6r(e,o);if(t!==!1){let n={message:E6r(e,t),type:t.issue,tokenType:e};r.push(n)}else e1(e,`LINE_BREAKS`)?e.LINE_BREAKS===!0&&(i=!0):oY(o,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:`Warning: No LINE_BREAKS Found. This Lexer has been defined to track line and column information, But none of the Token Types can be identified as matching a line terminator. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS for details.`,type:j1.NO_LINE_BREAKS_FLAGS}),r}function S6r(e){let t={};return q$(a$(e),n=>{let r=e[n];if(kQ(r))t[n]=[];else throw Error(`non exhaustive match`)}),t}function C6r(e){let t=e.PATTERN;if(a1(t))return!1;if(NQ(t)||e1(t,`exec`))return!0;if(t1(t))return!1;throw Error(`non exhaustive match`)}function w6r(e){return t1(e)&&e.length===1?e.charCodeAt(0):!1}function T6r(e,t){if(e1(e,`LINE_BREAKS`))return!1;if(a1(e.PATTERN)){try{oY(t,e.PATTERN)}catch(e){return{issue:j1.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(t1(e.PATTERN))return!1;if(C6r(e))return{issue:j1.CUSTOM_LINE_BREAK};throw Error(`non exhaustive match`)}function E6r(e,t){if(t.issue===j1.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. The problem is in the <${e.name}> Token Type Root cause: ${t.errMsg}. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===j1.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${e.name}> Token Type For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}function D6r(e){return Q$(e,e=>t1(e)?e.charCodeAt(0):e)}function sY(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}function cY(e){return e255?255+~~(e/255):e}}function lY(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx||t.isParent===!0&&t.categoryMatchesMap[n]===!0}function uY(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function dY(e){let t=k6r(e);A6r(t),M6r(t),j6r(t),q$(t,e=>{e.isParent=e.categoryMatches.length>0})}function k6r(e){let t=N$(e),n=e,r=!0;for(;r;){n=P$(b$(Q$(n,e=>e.CATEGORIES)));let e=U$(n,t);t=t.concat(e),i1(e)?r=!1:n=e}return t}function A6r(e){q$(e,e=>{P6r(e)||(Xdi[Ydi]=e,e.tokenTypeIdx=Ydi++),F6r(e)&&!kQ(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),F6r(e)||(e.CATEGORIES=[]),I6r(e)||(e.categoryMatches=[]),L6r(e)||(e.categoryMatchesMap={})})}function j6r(e){q$(e,e=>{e.categoryMatches=[],q$(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(Xdi[n].tokenTypeIdx)})})}function M6r(e){q$(e,e=>{N6r([],e)})}function N6r(e,t){q$(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),q$(t.CATEGORIES,n=>{let r=e.concat(t);r1(r,n)||N6r(r,n)})}function P6r(e){return e1(e,`tokenTypeIdx`)}function F6r(e){return e1(e,`CATEGORIES`)}function I6r(e){return e1(e,`categoryMatches`)}function L6r(e){return e1(e,`categoryMatchesMap`)}function R6r(e){return e1(e,`tokenTypeIdx`)}function fY(e){return z6r(e)?e.LABEL:e.name}function z6r(e){return t1(e.LABEL)&&e.LABEL!==``}function pY(e){return B6r(e)}function B6r(e){let t=e.pattern,n={};if(n.name=e.name,o1(t)||(n.PATTERN=t),e1(e,Qdi))throw`The parent property is no longer supported. See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return e1(e,$di)&&(n.CATEGORIES=e[$di]),dY([n]),e1(e,efi)&&(n.LABEL=e[efi]),e1(e,tfi)&&(n.GROUP=e[tfi]),e1(e,rfi)&&(n.POP_MODE=e[rfi]),e1(e,nfi)&&(n.PUSH_MODE=e[nfi]),e1(e,ifi)&&(n.LONGER_ALT=e[ifi]),e1(e,afi)&&(n.LINE_BREAKS=e[afi]),e1(e,ofi)&&(n.START_CHARS_HINT=e[ofi]),n}function mY(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function V6r(e,t){return lY(e,t)}function H6r(e,t){let n=new cfi(e,t);return n.resolveRefs(),n.errors}function hY(e,t,n=[]){n=N$(n);let r=[],i=0;function a(t){return t.concat(G$(e,i+1))}X(a,`remainingPathWith`);function o(e){let i=hY(a(e),t,n);return r.concat(i)}for(X(o,`getAlternativesForProd`);n.length{i1(e.definition)===!1&&(r=o(e.definition))}),r;else if(t instanceof x1)n.push(t.terminalType);else throw Error(`non exhaustive match`);i++}return r.push({partialPath:n,suffixDef:G$(e,i)}),r}function U6r(e,t,n,r){let i=`EXIT_NONE_TERMINAL`,a=[i],o=`EXIT_ALTERNATIVE`,s=!1,l=t.length,u=l-r-1,d=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!i1(f);){let e=f.pop();if(e===o){s&&W$(f).idx<=u&&f.pop();continue}let r=e.def,p=e.idx,m=e.ruleStack,h=e.occurrenceStack;if(i1(r))continue;let g=r[0];if(g===i){let e={idx:p,def:G$(r),ruleStack:K$(m),occurrenceStack:K$(h)};f.push(e)}else if(g instanceof x1){if(p=0;e--){let t={idx:p,def:g.definition[e].definition.concat(G$(r)),ruleStack:m,occurrenceStack:h};f.push(t),f.push(o)}else if(g instanceof m1)f.push({idx:p,def:g.definition.concat(G$(r)),ruleStack:m,occurrenceStack:h});else if(g instanceof p1)f.push(W6r(g,p,m,h));else throw Error(`non exhaustive match`)}return d}function W6r(e,t,n,r){let i=N$(n);i.push(e.name);let a=N$(r);return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}function gY(e){if(e instanceof h1||e===`Option`)return R1.OPTION;if(e instanceof v1||e===`Repetition`)return R1.REPETITION;if(e instanceof g1||e===`RepetitionMandatory`)return R1.REPETITION_MANDATORY;if(e instanceof _1||e===`RepetitionMandatoryWithSeparator`)return R1.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof y1||e===`RepetitionWithSeparator`)return R1.REPETITION_WITH_SEPARATOR;if(e instanceof b1||e===`Alternation`)return R1.ALTERNATION;throw Error(`non exhaustive match`)}function G6r(e){let{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,a=gY(r);return a===R1.ALTERNATION?vY(t,n,i):yY(t,n,a,i)}function K6r(e,t,n,r,i,a){let o=vY(e,t,n);return a(o,r,e8r(o)?uY:lY,i)}function q6r(e,t,n,r,i,a){let o=yY(e,t,i,n),s=e8r(o)?uY:lY;return a(o[0],s,r)}function J6r(e,t,n,r){let i=e.length,a=J$(e,e=>J$(e,e=>e.length===1));if(t)return function(t){let r=Q$(t,e=>e.GATE);for(let t=0;tb$(e)),(e,t,n)=>(q$(t,t=>{e1(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),q$(t.categoryMatches,t=>{e1(e,t)||(e[t]=n)})}),e),{});return function(){let e=this.LA(1);return t[e.tokenTypeIdx]}}return function(){for(let t=0;te.length===1),i=e.length;if(r&&!n){let t=b$(e);if(t.length===1&&i1(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let e=c1(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,q$(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){let t=this.LA(1);return e[t.tokenTypeIdx]===!0}}}return function(){nextPath:for(let n=0;nhY([e],1)),r=X6r(n.length),i=Q$(n,e=>{let t={};return q$(e,e=>{q$(_Y(e.partialPath),e=>{t[e]=!0})}),t}),a=n;for(let e=1;e<=t;e++){let n=a;a=X6r(n.length);for(let o=0;o{q$(_Y(e.partialPath),e=>{i[o][e]=!0})})}}}}return r}function vY(e,t,n,r){let i=new gfi(e,R1.ALTERNATION,r);return t.accept(i),Q6r(i.result,n)}function yY(e,t,n,r){let i=new gfi(e,n);t.accept(i);let a=i.result,o=new hfi(t,e,n).startWalking();return Q6r([new m1({definition:a}),new m1({definition:o})],r)}function bY(e,t){compareOtherPath:for(let n=0;n{let r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}function e8r(e){return J$(e,e=>J$(e,e=>J$(e,e=>i1(e.categoryMatches))))}function t8r(e){return Q$(e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),e=>Object.assign({type:q1.CUSTOM_LOOKAHEAD_VALIDATION},e))}function n8r(e,t,n,r){let i=$$(e,e=>r8r(e,n)),a=h8r(e,t,n),o=$$(e,e=>d8r(e,n)),s=$$(e,t=>o8r(t,e,r,n));return i.concat(a,o,s)}function r8r(e,t){let n=new _fi;e.accept(n);let r=n.allProductions;return Q$(n1(s1(_di(r,i8r),e=>e.length>1)),n=>{let r=Z$(n),i=t.buildDuplicateFoundError(e,n),a=eY(r),o={message:i,type:q1.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:a,occurrence:r.idx},s=a8r(r);return s&&(o.parameter=s),o})}function i8r(e){return`${eY(e)}_#_${e.idx}_#_${a8r(e)}`}function a8r(e){return e instanceof x1?e.terminalType.name:e instanceof f1?e.nonTerminalName:``}function o8r(e,t,n,r){let i=[];if(c1(t,(t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:q1.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function s8r(e,t,n){let r=[],i;return r1(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:q1.INVALID_RULE_OVERRIDE,ruleName:e})),r}function c8r(e,t,n,r=[]){let i=[],a=xY(t.definition);if(i1(a))return[];{let t=e.name;r1(a,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:q1.LEFT_RECURSION,ruleName:t});let o=$$(U$(a,r.concat([e])),t=>{let i=N$(r);return i.push(t),c8r(e,t,n,i)});return i.concat(o)}}function xY(e){let t=[];if(i1(e))return t;let n=Z$(e);if(n instanceof f1)t.push(n.referencedRule);else if(n instanceof m1||n instanceof h1||n instanceof g1||n instanceof _1||n instanceof y1||n instanceof v1)t=t.concat(xY(n.definition));else if(n instanceof b1)t=b$(Q$(n.definition,e=>xY(e.definition)));else if(!(n instanceof x1))throw Error(`non exhaustive match`);let r=$J(n),i=e.length>1;if(r&&i){let n=G$(e);return t.concat(xY(n))}return t}function l8r(e,t){let n=new vfi;e.accept(n);let r=n.alternations;return $$(r,n=>$$(K$(n.definition),(r,i)=>i1(U6r([r],[],lY,1))?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:q1.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}function u8r(e,t,n){let r=new vfi;e.accept(r);let i=r.alternations;return i=l1(i,e=>e.ignoreAmbiguities===!0),$$(i,r=>{let i=r.idx,a=vY(i,e,r.maxLookahead||t,r),o=p8r(a,r,e,n),s=m8r(a,r,e,n);return o.concat(s)})}function d8r(e,t){let n=new vfi;e.accept(n);let r=n.alternations;return $$(r,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:q1.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}function f8r(e,t,n){let r=[];return q$(e,e=>{let i=new yfi;e.accept(i);let a=i.allProductions;q$(a,i=>{let a=gY(i),o=i.maxLookahead||t,s=i.idx,l=yY(s,e,a,o)[0];if(i1(b$(l))){let t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:q1.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}function p8r(e,t,n,r){let i=[];return Q$(c1(e,(n,r,a)=>(t.definition[a].ignoreAmbiguities===!0||q$(r,r=>{let o=[a];q$(e,(e,n)=>{a!==n&&bY(e,r)&&t.definition[n].ignoreAmbiguities!==!0&&o.push(n)}),o.length>1&&!bY(i,r)&&(i.push(r),n.push({alts:o,path:r}))}),n),[]),e=>{let i=Q$(e.alts,e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:q1.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}function m8r(e,t,n,r){let i=c1(e,(e,t,n)=>{let r=Q$(t,e=>({idx:n,path:e}));return e.concat(r)},[]);return P$($$(i,e=>{if(t.definition[e.idx].ignoreAmbiguities===!0)return[];let a=e.idx,o=e.path;return Q$(Y$(i,e=>t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx{let i=[e.idx+1,a+1],o=t.idx===0?``:t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:q1.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}})}))}function h8r(e,t,n){let r=[],i=Q$(t,e=>e.name);return q$(e,e=>{let t=e.name;if(r1(i,t)){let i=n.buildNamespaceConflictError(e);r.push({message:i,type:q1.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}function g8r(e){let t=H$(e,{errMsgProvider:sfi}),n={};return q$(e.rules,e=>{n[e.name]=e}),H6r(n,t.errMsgProvider)}function _8r(e){return e=H$(e,{errMsgProvider:I1}),n8r(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}function SY(e){return r1(wfi,e.name)}function v8r(e,t,n,r,i,a,o){let s=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[s];if(l===void 0){let e=this.getCurrRuleFullName(),t=this.getGAstProductions()[e];l=new a(t,i).startWalking(),this.firstAfterRepMap[s]=l}let u=l.token,d=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=P1,d=1),u!==void 0&&d!==void 0&&this.shouldInRepetitionRecoveryBeTried(u,d,o)&&this.tryInRepetitionRecovery(e,t,n,u)}function CY(e,t,n){return n|t|e}function y8r(e){H1.reset(),e.accept(H1);let t=H1.dslMethods;return H1.reset(),t}function b8r(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsete.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: ${t.join(` `).replace(/\n/g,` `)}`)}},`validateVisitor`)},n.prototype.constructor=n,n._RULE_NAMES=t,n}function D8r(e,t,n){let r=X(function(){},`derivedConstructor`);w8r(r,e+`BaseSemanticsWithDefaults`);let i=Object.create(n.prototype);return q$(t,e=>{i[e]=T8r}),r.prototype=i,r.prototype.constructor=r,r}function O8r(e,t){return k8r(e,t)}function k8r(e,t){return P$(Q$(Y$(t,t=>NQ(e[t])===!1),t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Ufi.MISSING_METHOD,methodName:t})))}function wY(e,t,n,r=!1){TY(n);let i=W$(this.recordingProdStack),a=NQ(t)?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),e1(t,`MAX_LOOKAHEAD`)&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),U1}function A8r(e,t){TY(t);let n=W$(this.recordingProdStack),r=kQ(e)===!1,i=r===!1?e:e.DEF,a=new b1({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===!0});return e1(e,`MAX_LOOKAHEAD`)&&(a.maxLookahead=e.MAX_LOOKAHEAD),a.hasPredicates=Ldi(i,e=>NQ(e.GATE)),n.definition.push(a),q$(i,e=>{let t=new m1({definition:[]});a.definition.push(t),e1(e,`IGNORE_AMBIGUITIES`)?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:e1(e,`GATE`)&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),U1}function j8r(e){return e===0?``:`${e}`}function TY(e){if(e<0||e>Zfi){let t=Error(`Invalid DSL Method idx value: <${e}> Idx value must be a none negative value smaller than ${Zfi+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}function M8r(e,t){t.forEach(t=>{let n=t.prototype;Object.getOwnPropertyNames(n).forEach(r=>{if(r===`constructor`)return;let i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]})})}function N8r(e=void 0){return function(){return e}}function P8r(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n-1}function V8r(e,t){var n=this.__data__,r=J1(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function EY(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=n&vmi?new mmi:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=ahi}function N5r(e){return c0(e)&&ohi(e.length)&&!!d0[$1(e)]}function P5r(e){return function(t){return e(t)}}function F5r(e,t){var n=s0(e),r=!n&&l0(e),i=!n&&!r&&u0(e),a=!n&&!r&&!i&&Lhi(e),o=n||r||i||a,s=o?Kmi(e.length,String):[],l=s.length;for(var u in e)(t||Rhi.call(e,u))&&!(o&&(u==`length`||i&&(u==`offset`||u==`parent`)||a&&(u==`buffer`||u==`byteLength`||u==`byteOffset`)||ihi(u,l)))&&s.push(u);return s}function I5r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Bhi)}function L5r(e,t){return function(n){return e(t(n))}}function R5r(e){if(!Vhi(e))return Hhi(e);var t=[];for(var n in Object(e))Uhi.call(e,n)&&n!=`constructor`&&t.push(n);return t}function z5r(e){return e!=null&&ohi(e.length)&&!Npi(e)}function B5r(e){return p0(e)?zhi(e):Whi(e)}function V5r(e){return Bmi(e,Ghi,Gmi)}function H5r(e,t,n,r,i,a){var o=n&qhi,s=Khi(e),l=s.length;if(l!=Khi(t).length&&!o)return!1;for(var u=l;u--;){var d=s[u];if(!(o?d in t:Jhi.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var h=o;++uC7r(e,t,n)))}function k7r(e,t,n){let r=RY(e,t,n,{type:S0});return PY(e,r),M7r(e,t,n,FY(e,t,r,n,NY(e,t,n)))}function NY(e,t,n){let r=i_i(x0(n.definition,n=>C7r(e,t,n)),e=>e!==void 0);if(r.length===1)return r[0];if(r.length!==0)return P7r(e,r)}function A7r(e,t,n,r,i){let a=r.left,o=r.right,s=RY(e,t,n,{type:d_i});PY(e,s);let l=RY(e,t,n,{type:f_i});return a.loopback=s,l.loopback=s,e.decisionMap[MY(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,LY(o,s),i===void 0?(LY(s,a),LY(s,l)):(LY(s,l),LY(s,i.left),LY(i.right,a)),{left:a,right:l}}function j7r(e,t,n,r,i){let a=r.left,o=r.right,s=RY(e,t,n,{type:u_i});PY(e,s);let l=RY(e,t,n,{type:f_i}),u=RY(e,t,n,{type:l_i});return s.loopback=u,l.loopback=u,LY(s,a),LY(s,l),LY(o,u),i===void 0?LY(u,s):(LY(u,l),LY(u,i.left),LY(i.right,a)),e.decisionMap[MY(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:l}}function M7r(e,t,n,r){let i=r.left,a=r.right;return LY(i,a),e.decisionMap[MY(t,`Option`,n.idx)]=i,r}function PY(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function FY(e,t,n,r,...i){let a=RY(e,t,r,{type:c_i,start:n});n.end=a;for(let e of i)e===void 0?LY(n,a):(LY(n,e.left),LY(e.right,a));let o={left:n,right:a};return e.decisionMap[MY(t,N7r(r),r.idx)]=n,o}function N7r(e){if(e instanceof b1)return`Alternation`;if(e instanceof h1)return`Option`;if(e instanceof v1)return`Repetition`;if(e instanceof y1)return`RepetitionWithSeparator`;if(e instanceof g1)return`RepetitionMandatory`;if(e instanceof _1)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}function P7r(e,t){let n=t.length;for(let r=0;re.stateNumber.toString()).join(`_`)}`}function z7r(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?U7r(s,t-1,n,r,i):zmi(i,s):r||(i[i.length]=s)}return i}function W7r(e,t){return C_i(x0(e,t),1)}function G7r(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a-1}function X7r(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=N_i){var u=t?null:M_i(e);if(u)return Smi(u);o=!1,i=gmi,l=new mmi}else l=t?[]:s;outer:for(;++r{let i=r.toString(),a=n[i];return a===void 0&&(a={atnStartState:e,decision:t,states:{}},n[i]=a),a}}function l9r(e,t=!0){let n=new Set;for(let r of e){let e=new Set;for(let i of r){if(i===void 0){if(t)break;return!1}let r=[i.tokenTypeIdx].concat(i.categoryMatches);for(let t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function u9r(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;rfY(e)).join(`, `),n=e.production.idx===0?``:e.production.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(`, `)}> in <${h9r(e.production)}${n}> inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. `;return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,r}function h9r(e){if(e instanceof f1)return`SUBRULE`;if(e instanceof h1)return`OPTION`;if(e instanceof b1)return`OR`;if(e instanceof g1)return`AT_LEAST_ONE`;if(e instanceof _1)return`AT_LEAST_ONE_SEP`;if(e instanceof y1)return`MANY_SEP`;if(e instanceof v1)return`MANY`;if(e instanceof x1)return`CONSUME`;throw Error(`non exhaustive match`)}function g9r(e,t,n){return{actualToken:n,possibleTokenTypes:F_i(w_i(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof m_i).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function _9r(e,t){return e.edges[t.tokenTypeIdx]}function v9r(e,t,n){let r=new __i,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===C0){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n0&&!E9r(a))for(let e of i)a.add(e);return a}function y9r(e,t){if(e instanceof m_i&&V6r(t,e.tokenType))return e.target}function b9r(e,t){let n;for(let r of e.elements)if(t.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}function x9r(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function S9r(e,t,n,r){return r=C9r(e,r),t.edges[n.tokenTypeIdx]=r,r}function C9r(e,t){if(t===w0)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}function w9r(e){let t=new __i,n=e.transitions.length;for(let r=0;r0){let n=[...e.stack];VY({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);let r=n.transitions.length;for(let i=0;i1)return!0;return!1}function j9r(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function HY(e){return e.$type===D0}function UY(e,t,n){return M9r({parser:t,tokens:n,ruleNames:new Map},e),t}function M9r(e,t){let n=jJ(t,!1),r=Uq(t.rules).filter(dJ).filter(e=>n.has(e));for(let t of r){let n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,WY(n,t.definition))}let i=Uq(t.rules).filter(lJ).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,N9r(e,t))}function N9r(e,t){let n=t.call.rule.ref;if(!n)throw Error(`Could not resolve reference to infix operator rule: `+t.call.rule.$refText);if(mJ(n))throw Error(`Cannot use terminal rule in infix expression`);let r=t.operators.precedences.flatMap(e=>e.operators),i={$type:`Group`,elements:[]},a={$container:i,$type:`Assignment`,feature:`parts`,operator:`+=`,terminal:t.call},o={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,o);let s={$container:o,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},l={...a,$container:o};o.elements.push(s,l);let u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:X(()=>e.parser.consume(n,t,s),`ALT`)})),d;return t=>{d??(d=qY(e,n)),e.parser.subrule(0,d,!1,a,t),e.parser.many(0,{DEF:X(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)},`DEF`)})}}function WY(e,t,n=!1){let r;if(uJ(t))r=V9r(e,t);else if(rJ(t))r=P9r(e,t);else if(aJ(t))r=WY(e,t.terminal);else if(oJ(t))r=B9r(e,t);else if(fJ(t))r=F9r(e,t);else if(iJ(t))r=L9r(e,t);else if(_J(t))r=R9r(e,t);else if(sJ(t))r=z9r(e,t);else if(e1r(t)){let n=e.consume++;r=X(()=>e.parser.consume(n,P1,t),`method`)}else throw new mQ(t.$cstNode,`Unexpected element type: ${t.$type}`);return H9r(e,n?void 0:KY(t),r,t.cardinality)}function P9r(e,t){let n=zJ(t);return()=>e.parser.action(n,t)}function F9r(e,t){let n=t.rule.ref;if(nJ(n)){let r=e.subrule++,i=dJ(n)&&n.fragment,a=t.arguments.length>0?I9r(n,t.arguments):()=>({}),o;return s=>{o??(o=qY(e,n)),e.parser.subrule(r,o,i,t,a(s))}}if(mJ(n)){let r=e.consume++,i=JY(e,n.name);return()=>e.parser.consume(r,i,t)}if(n)CJ(n);else throw new mQ(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function I9r(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>{var t;return{parameterName:(t=e.parameter)==null||(t=t.ref)==null?void 0:t.name,predicate:GY(e.value)}});return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{let n=t.map(e=>GY(e.value));return t=>{let r={};for(let i=0;it(e)||n(e)}if(Q$r(e)){let t=GY(e.left),n=GY(e.right);return e=>t(e)&&n(e)}if(c1r(e)){let t=GY(e.value);return e=>!t(e)}if(d1r(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}if(Y$r(e)){let t=!!e.true;return()=>t}CJ(e)}function L9r(e,t){if(t.elements.length===1)return WY(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:WY(e,r,!0)},i=KY(r);i&&(t.GATE=GY(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:X(()=>e.ALT(t),`ALT`)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}function R9r(e,t){if(t.elements.length===1)return WY(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:WY(e,r,!0)},i=KY(r);i&&(t.GATE=GY(i)),n.push(t)}let r=e.or++,i=X((e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,`idFunc`),a=X(t=>e.parser.alternatives(r,n.map((n,a)=>{let o={ALT:X(()=>!0,`ALT`)},s=e.parser;o.ALT=()=>{if(n.ALT(t),!s.isRecording()){let e=i(r,s);s.unorderedGroups.get(e)||s.unorderedGroups.set(e,[]);let t=s.unorderedGroups.get(e);(t==null?void 0:t[a])===void 0&&(t[a]=!0)}};let l=n.GATE;return o.GATE=l?()=>l(t):()=>{let e=s.unorderedGroups.get(i(r,s));return!(e!=null&&e[a])},o})),`alternatives`),o=H9r(e,KY(t),a,`*`);return t=>{o(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}function z9r(e,t){let n=t.elements.map(t=>WY(e,t));return e=>n.forEach(t=>t(e))}function KY(e){if(sJ(e))return e.guardCondition}function B9r(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=FJ(t.type.ref),r=n==null?void 0:n.terminal;if(!r)throw Error(`Could not find name assignment for type: `+zJ(t.type.ref));return B9r(e,t,r)}if(fJ(n)&&dJ(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??(a=qY(e,r)),e.parser.subrule(i,a,!1,t,n)}}if(fJ(n)&&mJ(n.rule.ref)){let r=e.consume++,i=JY(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(uJ(n)){let r=e.consume++,i=JY(e,n.value);return()=>e.parser.consume(r,i,t)}throw Error(`Could not build cross reference parser`)}function V9r(e,t){let n=e.consume++,r=e.tokens[t.value];if(!r)throw Error(`Could not find token for keyword: `+t.value);return()=>e.parser.consume(n,r,t)}function H9r(e,t,n,r){let i=t&&GY(t);if(!r){if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:X(()=>n(r),`ALT`),GATE:X(()=>i(r),`GATE`)},{ALT:N8r(),GATE:X(()=>!i(r),`GATE`)}])}return n}if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:X(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:X(()=>e.parser.atLeastOne(t,{DEF:X(()=>n(a),`DEF`)}),`ALT`),GATE:X(()=>i(a),`GATE`)},{ALT:N8r(),GATE:X(()=>!i(a),`GATE`)}])}return r=>e.parser.atLeastOne(t,{DEF:X(()=>n(r),`DEF`)})}if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:X(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}CJ(r)}function qY(e,t){let n=U9r(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}function U9r(e,t){if(nJ(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!dJ(r);)(sJ(r)||iJ(r)||_J(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}function JY(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}function W9r(e){let t=e.Grammar,n=e.parser.Lexer,r=new ovi(e);return UY(t,r,n.definition),r.finalize(),r}function G9r(e){let t=K9r(e);return t.finalize(),t}function K9r(e){let t=e.Grammar,n=e.parser.Lexer;return UY(t,new rvi(e),n.definition)}function YY(){return new Promise(e=>{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}function XY(){return j0=performance.now(),new A0.CancellationTokenSource}function q9r(e){dvi=e}function ZY(e){return e===M0}async function QY(e){if(e===A0.CancellationToken.None)return;let t=performance.now();if(t-j0>=dvi&&(j0=t,await YY(),j0=performance.now()),e.isCancellationRequested)throw M0}function $Y(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);$Y(r,t),$Y(i,t);let a=0,o=0,s=0;for(;an.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Z9r(e){let t=X9r(e.range);return t===e.range?e:{newText:e.newText,range:t}}function Q9r(e){return typeof e.name==`string`}function $9r(e){return typeof e.$comment==`string`}function eei(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$error`in e)}function eX(e){return{code:e}}function tei(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=MJ(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=e0r(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function tX(e){switch(e){case`error`:return 1;case`warning`:return 2;case`info`:return 3;case`hint`:return 4;default:throw Error(`Invalid diagnostic severity: `+e)}}function nei(e){switch(e){case`error`:return eX(U0.LexingError);case`warning`:return eX(U0.LexingWarning);case`info`:return eX(U0.LexingInfo);case`hint`:return eX(U0.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}function nX(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}function rX(e){return e&&`modes`in e&&`defaultMode`in e}function iX(e){return!nX(e)&&!rX(e)}function rei(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||(i=wX.create(0,0));let a=aei(e),o=oX(r);return lei({index:0,tokens:oei({lines:a,position:i,options:o}),position:i})}function iei(e,t){let n=oX(t),r=aei(e);if(r.length===0)return!1;let i=r[0],a=r[r.length-1],o=n.start,s=n.end;return!!(o!=null&&o.exec(i))&&!!(s!=null&&s.exec(a))}function aei(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(gai)}function oei(e){let t=[],n=e.position.line,r=e.position.character;for(let s=0;s=d.length){if(t.length>0){let e=wX.create(n,r);t.push({type:`break`,content:``,range:TX.create(e,e)})}}else{Kvi.lastIndex=f;let e=Kvi.exec(d);if(e){let i=e[0],a=e[1],o=wX.create(n,r+f),s=wX.create(n,r+f+i.length);t.push({type:`tag`,content:a,range:TX.create(o,s)}),f+=i.length,f=aX(d,f)}if(f0&&t[t.length-1].type===`break`?t.slice(0,-1):t}function sei(e,t,n,r){let i=[];if(e.length===0){let e=wX.create(n,r),a=wX.create(n,r+t.length);i.push({type:`text`,content:t,range:TX.create(e,a)})}else{let a=0;for(let o of e){let e=o.index,s=t.substring(a,e);s.length>0&&i.push({type:`text`,content:t.substring(a,e),range:TX.create(wX.create(n,a+r),wX.create(n,e+r))});let l=s.length+1,u=o[1];if(i.push({type:`inline-tag`,content:u,range:TX.create(wX.create(n,a+l+r),wX.create(n,a+l+u.length+r))}),l+=u.length,o.length===4){l+=o[2].length;let e=o[3];i.push({type:`text`,content:e,range:TX.create(wX.create(n,a+l+r),wX.create(n,a+l+e.length+r))})}else i.push({type:`text`,content:``,range:TX.create(wX.create(n,a+l+r),wX.create(n,a+l+r))});a=e+o[0].length}let o=t.substring(a);o.length>0&&i.push({type:`text`,content:o,range:TX.create(wX.create(n,a+r),wX.create(n,a+r+o.length))})}return i}function aX(e,t){let n=e.substring(t).match(Jvi);return n?t+n.index:e.length}function cei(e){let t=e.match(Yvi);if(t&&typeof t.index==`number`)return t.index}function lei(e){var t,n;let r=wX.create(e.position.line,e.position.character);if(e.tokens.length===0)return new Xvi([],TX.create(r,r));let i=[];for(;e.index0){let e=aX(t,i);a=t.substring(e),t=t.substring(0,i)}return(e===`linkcode`||e===`link`&&n.link===`code`)&&(a=`\`${a}\``),((r=n.renderLink)==null?void 0:r.call(n,t,a))??_ei(t,a)}}function _ei(e,t){try{return P0.parse(e,!0),`[${t}](${e})`}catch{return e}}function vei(e){return e.endsWith(` `)?` `:` `}function cX(e){return{documentation:{CommentProvider:X(e=>new tyi(e),`CommentProvider`),DocumentationProvider:X(e=>new eyi(e),`DocumentationProvider`)},parser:{AsyncParser:X(e=>new nyi(e),`AsyncParser`),GrammarConfig:X(e=>_0r(e),`GrammarConfig`),LangiumParser:X(e=>G9r(e),`LangiumParser`),CompletionParser:X(e=>W9r(e),`CompletionParser`),ValueConverter:X(()=>new uvi,`ValueConverter`),TokenBuilder:X(()=>new O0,`TokenBuilder`),Lexer:X(e=>new Gvi(e),`Lexer`),ParserErrorMessageProvider:X(()=>new avi,`ParserErrorMessageProvider`),LexerErrorMessageProvider:X(()=>new Uvi,`LexerErrorMessageProvider`)},workspace:{AstNodeLocator:X(()=>new Rvi,`AstNodeLocator`),AstNodeDescriptionProvider:X(e=>new Ivi(e),`AstNodeDescriptionProvider`),ReferenceDescriptionProvider:X(e=>new Lvi(e),`ReferenceDescriptionProvider`)},references:{Linker:X(e=>new vvi(e),`Linker`),NameProvider:X(()=>new yvi,`NameProvider`),ScopeProvider:X(e=>new kvi(e),`ScopeProvider`),ScopeComputation:X(e=>new xvi(e),`ScopeComputation`),References:X(e=>new bvi(e),`References`)},serializer:{Hydrator:X(e=>new oyi(e),`Hydrator`),JsonSerializer:X(e=>new Avi(e),`JsonSerializer`)},validation:{DocumentValidator:X(e=>new Fvi(e),`DocumentValidator`),ValidationRegistry:X(e=>new Nvi(e),`ValidationRegistry`)},shared:X(()=>e.shared,`shared`)}}function lX(e){return{ServiceRegistry:X(e=>new jvi(e),`ServiceRegistry`),workspace:{LangiumDocuments:X(e=>new _vi(e),`LangiumDocuments`),LangiumDocumentFactory:X(e=>new gvi(e),`LangiumDocumentFactory`),DocumentBuilder:X(e=>new Bvi(e),`DocumentBuilder`),IndexManager:X(e=>new Vvi(e),`IndexManager`),WorkspaceManager:X(e=>new Hvi(e),`WorkspaceManager`),FileSystemProvider:X(t=>e.fileSystemProvider(t),`FileSystemProvider`),WorkspaceLock:X(()=>new ayi,`WorkspaceLock`),ConfigurationProvider:X(e=>new zvi(e),`ConfigurationProvider`)},profilers:{}}}function uX(e,t,n,r,i,a,o,s,l){return bei([e,t,n,r,i,a,o,s,l].reduce(dX,{}))}function yei(e){if(e&&e[cyi])for(let t of Object.values(e))yei(t);return e}function bei(e,t){let n=new Proxy({},{deleteProperty:X(()=>!1,`deleteProperty`),set:X(()=>{throw Error(`Cannot set property on injected service container`)},`set`),get:X((r,i)=>i===cyi||xei(r,i,e,t||n),`get`),getOwnPropertyDescriptor:X((r,i)=>(xei(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),`getOwnPropertyDescriptor`),has:X((t,n)=>n in e,`has`),ownKeys:X(()=>[...Object.getOwnPropertyNames(e)],`ownKeys`)});return n}function xei(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw Error(`Construction failure. Please make sure that your dependencies are constructable. Cause: `+e[t]);if(e[t]===lyi)throw Error(`Cycle detected. Please make "`+String(t)+`" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies`);return e[t]}if(t in n){let i=n[t];e[t]=lyi;try{e[t]=typeof i==`function`?i(r):bei(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}}function dX(e,t){if(t){for(let[n,r]of Object.entries(t))if(r!=null){if(typeof r==`object`){let t=e[n];e[n]=dX(typeof t==`object`&&t?t:{},r)}else e[n]=r}}return e}function Sei(){let e=uX(lX(J0),gyi),t=uX(cX({shared:e}),hyi);return e.ServiceRegistry.register(t),t}function fX(e){let t=Sei(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,P0.parse(`memory:/${n.name??`grammar`}.langium`)),n}function Cei(e){return X2.isInstance(e,$0.$type)}function wei(e){return X2.isInstance(e,t2.$type)}function Tei(e){return X2.isInstance(e,r2.$type)}function Eei(e){return X2.isInstance(e,s2.$type)}function Dei(e){return X2.isInstance(e,u2.$type)}function Oei(e){return X2.isInstance(e,Jyi.$type)}function kei(e){return e===`rmo`||e===`readmodel`||e===`ui`||e===`cmd`||e===`command`||e===`evt`||e===`event`||e===`pcr`||e===`processor`}function Aei(e){return X2.isInstance(e,v2.$type)}function jei(e){return X2.isInstance(e,S2.$type)}function Mei(e){return X2.isInstance(e,w2.$type)}function Nei(e){return X2.isInstance(e,k2.$type)}function Pei(e){return X2.isInstance(e,j2.$type)}function Fei(e){return X2.isInstance(e,M2.$type)}function Iei(e){return X2.isInstance(e,P2.$type)}function Lei(e){return X2.isInstance(e,F2.$type)}function Rei(e){return X2.isInstance(e,R2.$type)}function zei(e){return X2.isInstance(e,z2.$type)}function Bei(e){return X2.isInstance(e,B2.$type)}function Vei(e){return X2.isInstance(e,H2.$type)}function Hei(e){return X2.isInstance(e,G2.$type)}function Uei(e){return X2.isInstance(e,K2.$type)}function Wei(e){return X2.isInstance(e,Y2.$type)}var Gei,Kei,qei,Jei,Yei,Xei,Zei,Qei,$ei,eti,tti,nti,rti,iti,ati,oti,sti,cti,lti,uti,dti,fti,pti,mti,hti,gti,_ti,vti,yti,bti,xti,Sti,Cti,wti,Tti,Eti,Dti,Oti,kti,Ati,jti,Mti,Nti,Pti,Fti,Iti,Lti,Rti,zti,Bti,Vti,Hti,Uti,Wti,Gti,Kti,qti,Jti,Yti,Xti,Zti,Qti,$ti,eni,tni,nni,rni,ini,ani,oni,sni,cni,lni,uni,dni,fni,pni,mni,hni,gni,_ni,vni,yni,bni,xni,Sni,Cni,wni,Tni,Eni,Dni,Oni,kni,Ani,jni,Mni,Nni,Pni,Fni,Ini,Lni,Rni,zni,Bni,Vni,Hni,Uni,Wni,Gni,Kni,qni,Jni,Yni,Xni,Zni,Qni,$ni,eri,tri,nri,rri,iri,ari,ori,sri,cri,lri,uri,dri,fri,pri,mri,hri,gri,_ri,vri,pX,yri,mX,bri,xri,X,Sri,hX,gX,_X,vX,yX,bX,xX,Cri,SX,wri,CX,wX,TX,EX,Tri,DX,Eri,Dri,Ori,kri,OX,Ari,jri,Mri,kX,AX,jX,MX,NX,PX,FX,IX,LX,RX,zX,BX,Nri,Pri,Fri,Iri,VX,Lri,HX,UX,Rri,zri,Bri,Vri,Hri,Uri,Wri,Gri,WX,Kri,qri,Jri,Yri,Xri,Zri,Qri,$ri,eii,tii,nii,GX,rii,iii,aii,oii,sii,cii,lii,uii,dii,fii,pii,mii,hii,KX,qX,gii,_ii,vii,yii,bii,xii,Sii,Cii,wii,Tii,Eii,JX,YX,XX,ZX,QX,$X,Dii,Oii,kii,Aii,jii,Mii,Nii,Pii,Fii,eZ,Iii,tZ,Lii,nZ,rZ,Rii,zii,Bii,Vii,Hii,Uii,Wii,Gii,Kii,qii,Jii,Yii,Xii,Zii,Qii,$ii,eai,tai,nai,rai,iai,aai,oai,sai,cai,lai,iZ,aZ,oZ,sZ,cZ,lZ,uZ,dZ,uai,dai,fZ,pZ,mZ,hZ,gZ,_Z,vZ,yZ,bZ,xZ,SZ,CZ,wZ,TZ,EZ,DZ,OZ,kZ,AZ,jZ,MZ,NZ,PZ,FZ,IZ,LZ,RZ,zZ,BZ,VZ,HZ,UZ,WZ,GZ,KZ,qZ,JZ,YZ,XZ,ZZ,QZ,$Z,eQ,tQ,nQ,rQ,iQ,aQ,oQ,sQ,cQ,lQ,uQ,dQ,fQ,pQ,mQ,hQ,gQ,_Q,fai,pai,vQ,mai,hai,yQ,gai,_ai,bQ,vai,xQ,yai,bai,SQ,CQ,xai,Sai,Cai,wQ,wai,Tai,Eai,Dai,Oai,kai,TQ,EQ,Aai,DQ,OQ,kQ,jai,Mai,Nai,Pai,Fai,Iai,Lai,Rai,AQ,zai,Bai,Vai,Hai,Uai,Wai,Gai,Kai,qai,jQ,MQ,Jai,Yai,Xai,Zai,NQ,PQ,Qai,$ai,eoi,FQ,toi,noi,roi,ioi,aoi,ooi,soi,coi,loi,IQ,LQ,uoi,doi,foi,RQ,poi,moi,hoi,goi,_oi,voi,zQ,yoi,boi,xoi,Soi,Coi,BQ,woi,Toi,Eoi,VQ,HQ,UQ,Doi,WQ,GQ,Ooi,koi,KQ,Aoi,qQ,JQ,YQ,joi,Moi,XQ,Noi,Poi,Foi,Ioi,Loi,Roi,ZQ,zoi,Boi,Voi,Hoi,QQ,Uoi,Woi,Goi,Koi,qoi,Joi,Yoi,Xoi,Zoi,Qoi,$oi,esi,tsi,nsi,rsi,isi,asi,osi,ssi,csi,lsi,usi,dsi,fsi,$Q,psi,e$,msi,t$,n$,r$,hsi,i$,gsi,_si,vsi,ysi,bsi,xsi,a$,Ssi,o$,Csi,wsi,Tsi,s$,Esi,Dsi,c$,l$,Osi,ksi,Asi,jsi,Msi,Nsi,Psi,Fsi,Isi,Lsi,Rsi,u$,zsi,Bsi,Vsi,Hsi,Usi,d$,f$,Wsi,Gsi,p$,Ksi,qsi,Jsi,Ysi,m$,Xsi,Zsi,Qsi,$si,eci,tci,nci,rci,h$,ici,g$,_$,aci,v$,oci,sci,y$,b$,cci,lci,uci,dci,fci,pci,mci,hci,gci,x$,_ci,vci,yci,bci,xci,Sci,Cci,S$,wci,Tci,Eci,C$,Dci,Oci,kci,Aci,w$,jci,T$,E$,D$,Mci,Nci,Pci,Fci,Ici,Lci,Rci,zci,Bci,Vci,Hci,O$,k$,Uci,Wci,A$,j$,Gci,Kci,qci,Jci,Yci,Xci,Zci,Qci,$ci,eli,tli,nli,rli,ili,ali,oli,sli,cli,lli,uli,dli,fli,pli,mli,hli,gli,_li,vli,yli,bli,xli,Sli,Cli,wli,Tli,Eli,Dli,Oli,kli,Ali,jli,Mli,Nli,Pli,Fli,Ili,Lli,Rli,zli,Bli,Vli,Hli,Uli,Wli,Gli,Kli,qli,Jli,Yli,Xli,Zli,Qli,$li,eui,tui,M$,nui,rui,N$,P$,iui,aui,oui,F$,sui,I$,cui,lui,uui,dui,L$,fui,pui,mui,hui,gui,_ui,vui,yui,bui,xui,Sui,Cui,wui,Tui,R$,Eui,Dui,Oui,kui,Aui,jui,Mui,z$,Nui,Pui,Fui,Iui,Lui,Rui,zui,Bui,Vui,Hui,Uui,Wui,Gui,Kui,qui,Jui,Yui,Xui,Zui,B$,Qui,$ui,edi,V$,tdi,ndi,rdi,idi,H$,adi,odi,sdi,cdi,U$,W$,G$,K$,ldi,q$,udi,ddi,J$,fdi,Y$,pdi,mdi,X$,Z$,hdi,Q$,$$,gdi,_di,vdi,ydi,e1,bdi,t1,xdi,n1,Sdi,r1,Cdi,wdi,Tdi,Edi,Ddi,i1,Odi,kdi,Adi,a1,o1,jdi,Mdi,Ndi,Pdi,s1,Fdi,c1,l1,Idi,Ldi,Rdi,zdi,Bdi,u1,d1,f1,p1,m1,h1,g1,_1,v1,y1,b1,x1,S1,C1,Vdi,Hdi,w1,Udi,Wdi,T1,Gdi,E1,D1,O1,Kdi,qdi,Jdi,k1,A1,Ydi,Xdi,Zdi,j1,M1,N1,Qdi,$di,efi,tfi,nfi,rfi,ifi,afi,ofi,P1,F1,sfi,I1,cfi,lfi,ufi,L1,dfi,ffi,pfi,mfi,R1,hfi,gfi,_fi,vfi,yfi,bfi,xfi,Sfi,Cfi,wfi,z1,Tfi,Efi,Dfi,Ofi,kfi,Afi,jfi,Mfi,Nfi,B1,Pfi,Ffi,Ifi,Lfi,Rfi,zfi,V1,Bfi,Vfi,H1,Hfi,Ufi,Wfi,Gfi,Kfi,qfi,Jfi,Yfi,U1,Xfi,Zfi,Qfi,$fi,epi,tpi,npi,W1,G1,K1,q1,rpi,ipi,api,opi,spi,J1,cpi,lpi,upi,dpi,fpi,Y1,ppi,mpi,hpi,gpi,_pi,vpi,X1,Z1,ypi,bpi,xpi,Q1,Spi,Cpi,wpi,Tpi,Epi,Dpi,$1,Opi,kpi,Api,jpi,Mpi,Npi,Ppi,Fpi,Ipi,Lpi,e0,Rpi,zpi,Bpi,Vpi,Hpi,Upi,Wpi,Gpi,Kpi,t0,n0,r0,qpi,Jpi,Ypi,Xpi,Zpi,Qpi,$pi,emi,tmi,nmi,rmi,imi,i0,ami,omi,smi,cmi,a0,lmi,umi,o0,dmi,fmi,pmi,mmi,hmi,gmi,_mi,vmi,ymi,bmi,xmi,Smi,Cmi,wmi,Tmi,Emi,Dmi,Omi,kmi,Ami,jmi,Mmi,Nmi,Pmi,Fmi,Imi,Lmi,Rmi,zmi,s0,Bmi,Vmi,Hmi,Umi,Wmi,Gmi,Kmi,c0,qmi,Jmi,Ymi,Xmi,Zmi,l0,Qmi,$mi,ehi,thi,u0,nhi,rhi,ihi,ahi,ohi,shi,chi,lhi,uhi,dhi,fhi,phi,mhi,hhi,ghi,_hi,vhi,yhi,bhi,xhi,Shi,Chi,whi,Thi,Ehi,Dhi,Ohi,khi,Ahi,d0,jhi,Mhi,Nhi,f0,Phi,Fhi,Ihi,Lhi,Rhi,zhi,Bhi,Vhi,Hhi,Uhi,Whi,p0,Ghi,Khi,qhi,Jhi,Yhi,Xhi,Zhi,m0,Qhi,$hi,egi,tgi,ngi,rgi,igi,agi,ogi,sgi,cgi,lgi,h0,ugi,dgi,fgi,pgi,g0,mgi,hgi,ggi,_gi,vgi,ygi,bgi,xgi,Sgi,Cgi,wgi,_0,Tgi,Egi,Dgi,Ogi,kgi,Agi,jgi,Mgi,Ngi,Pgi,Fgi,Igi,Lgi,Rgi,zgi,Bgi,Vgi,v0,Hgi,Ugi,Wgi,Ggi,Kgi,qgi,Jgi,Ygi,Xgi,Zgi,Qgi,$gi,y0,e_i,t_i,b0,n_i,x0,r_i,i_i,S0,a_i,o_i,s_i,C0,c_i,l_i,u_i,d_i,f_i,p_i,m_i,h_i,g_i,w0,__i,v_i,y_i,b_i,x_i,S_i,C_i,w_i,T_i,E_i,D_i,O_i,k_i,A_i,j_i,M_i,N_i,P_i,F_i,I_i,L_i,R_i,z_i,B_i,V_i,H_i,U_i,W_i,G_i,K_i,q_i,J_i,Y_i,X_i,Z_i,T0,E0,Q_i,$_i,D0,evi,tvi,nvi,rvi,ivi,avi,ovi,svi,cvi,lvi,O0,uvi,k0,A0,j0,dvi,M0,N0,fvi,pvi,mvi,P0,F0,I0,hvi,L0,gvi,_vi,R0,vvi,yvi,bvi,z0,B0,xvi,Svi,Cvi,wvi,Tvi,V0,Evi,H0,Dvi,Ovi,kvi,Avi,jvi,Mvi,Nvi,Pvi,Fvi,U0,Ivi,Lvi,Rvi,W0,zvi,G0,K0,Bvi,Vvi,Hvi,Uvi,Wvi,Gvi,Kvi,qvi,Jvi,Yvi,Xvi,Zvi,Qvi,$vi,eyi,tyi,nyi,ryi,iyi,ayi,oyi,syi,cyi,lyi,uyi,q0,dyi,fyi,pyi,myi,J0,hyi,gyi,_yi,vyi,yyi,byi,xyi,Syi,Cyi,wyi,Tyi,Eyi,Dyi,Oyi,kyi,Ayi,jyi,Myi,Nyi,Pyi,Fyi,Iyi,Lyi,Ryi,zyi,Y0,Byi,Vyi,Hyi,X0,Uyi,Z0,Q0,Wyi,$0,e2,t2,Gyi,n2,Kyi,r2,i2,a2,o2,s2,c2,qyi,l2,u2,Jyi,Yyi,Xyi,Zyi,Qyi,$yi,ebi,tbi,d2,f2,nbi,rbi,ibi,abi,obi,sbi,cbi,p2,m2,h2,g2,lbi,ubi,_2,v2,y2,dbi,b2,fbi,x2,pbi,S2,C2,w2,T2,mbi,E2,D2,O2,k2,A2,hbi,j2,M2,gbi,_bi,vbi,ybi,bbi,xbi,N2,Sbi,Cbi,wbi,P2,F2,Tbi,I2,L2,R2,z2,Ebi,B2,V2,Dbi,Obi,kbi,H2,Abi,jbi,Mbi,Nbi,Pbi,Fbi,U2,Ibi,W2,G2,K2,Lbi,q2,J2,Y2,Rbi,X2,zbi,Bbi,Vbi,Hbi,Ubi,Wbi,Gbi,Kbi,qbi,Jbi,Ybi,Xbi,Zbi,Qbi,$bi,exi,txi,nxi,rxi,ixi,axi,oxi,sxi,cxi,lxi,uxi,dxi,fxi,pxi,mxi,hxi,gxi,_xi,vxi,yxi,bxi,xxi,Sxi,Cxi,wxi,Txi,Exi,Dxi,Oxi,kxi,Z2,Axi,jxi,Mxi,Nxi,Pxi,Fxi,Ixi,Lxi,Rxi,zxi,Bxi,Vxi,Hxi,Uxi,Wxi,Gxi,Q2,$2,e4,t4=o((()=>{D(),vri=Object.create,pX=Object.defineProperty,yri=Object.getOwnPropertyDescriptor,mX=Object.getOwnPropertyNames,bri=Object.getPrototypeOf,xri=Object.prototype.hasOwnProperty,X=(e,t)=>pX(e,`name`,{value:t,configurable:!0}),Sri=(e,t)=>function(){return e&&(t=(0,e[mX(e)[0]])(e=0)),t},hX=(e,t)=>function(){return t||(0,e[mX(e)[0]])((t={exports:{}}).exports,t),t.exports},gX=(e,t)=>{for(var n in t)pX(e,n,{get:t[n],enumerable:!0})},_X=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of mX(t))!xri.call(e,i)&&i!==n&&pX(e,i,{get:()=>t[i],enumerable:!(r=yri(t,i))||r.enumerable});return e},vX=(e,t,n)=>(_X(e,t,`default`),n&&_X(n,t,`default`)),yX=(e,t,n)=>(n=e==null?{}:vri(bri(e)),_X(t||!e||!e.__esModule?pX(n,`default`,{value:e,enumerable:!0}):n,e)),bX=e=>_X(pX({},`__esModule`,{value:!0}),e),xX={},gX(xX,{AnnotatedTextEdit:()=>PX,ChangeAnnotation:()=>MX,ChangeAnnotationIdentifier:()=>NX,CodeAction:()=>iii,CodeActionContext:()=>rii,CodeActionKind:()=>nii,CodeActionTriggerKind:()=>GX,CodeDescription:()=>Mri,CodeLens:()=>aii,Color:()=>DX,ColorInformation:()=>Eri,ColorPresentation:()=>Dri,Command:()=>AX,CompletionItem:()=>Wri,CompletionItemKind:()=>Rri,CompletionItemLabelDetails:()=>Uri,CompletionItemTag:()=>Bri,CompletionList:()=>Gri,CreateFile:()=>IX,DeleteFile:()=>RX,Diagnostic:()=>kX,DiagnosticRelatedInformation:()=>OX,DiagnosticSeverity:()=>Ari,DiagnosticTag:()=>jri,DocumentHighlight:()=>Xri,DocumentHighlightKind:()=>Yri,DocumentLink:()=>sii,DocumentSymbol:()=>tii,DocumentUri:()=>Cri,EOL:()=>wii,FoldingRange:()=>kri,FoldingRangeKind:()=>Ori,FormattingOptions:()=>oii,Hover:()=>Kri,InlayHint:()=>gii,InlayHintKind:()=>KX,InlayHintLabelPart:()=>qX,InlineCompletionContext:()=>Sii,InlineCompletionItem:()=>vii,InlineCompletionList:()=>yii,InlineCompletionTriggerKind:()=>bii,InlineValueContext:()=>hii,InlineValueEvaluatableExpression:()=>mii,InlineValueText:()=>fii,InlineValueVariableLookup:()=>pii,InsertReplaceEdit:()=>Vri,InsertTextFormat:()=>zri,InsertTextMode:()=>Hri,Location:()=>EX,LocationLink:()=>Tri,MarkedString:()=>WX,MarkupContent:()=>UX,MarkupKind:()=>HX,OptionalVersionedTextDocumentIdentifier:()=>VX,ParameterInformation:()=>qri,Position:()=>wX,Range:()=>TX,RenameFile:()=>LX,SelectedCompletionInfo:()=>xii,SelectionRange:()=>cii,SemanticTokenModifiers:()=>uii,SemanticTokenTypes:()=>lii,SemanticTokens:()=>dii,SignatureInformation:()=>Jri,StringValue:()=>_ii,SymbolInformation:()=>$ri,SymbolKind:()=>Zri,SymbolTag:()=>Qri,TextDocument:()=>Tii,TextDocumentEdit:()=>FX,TextDocumentIdentifier:()=>Fri,TextDocumentItem:()=>Lri,TextEdit:()=>jX,URI:()=>SX,VersionedTextDocumentIdentifier:()=>Iri,WorkspaceChange:()=>Pri,WorkspaceEdit:()=>zX,WorkspaceFolder:()=>Cii,WorkspaceSymbol:()=>eii,integer:()=>wri,uinteger:()=>CX}),YX=Sri({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var e,t,n,r;(function(e){function t(e){return typeof e==`string`}X(t,`is`),e.is=t})(Cri||(Cri={})),(function(e){function t(e){return typeof e==`string`}X(t,`is`),e.is=t})(SX||(SX={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}X(t,`is`),e.is=t})(wri||(wri={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}X(t,`is`),e.is=t})(CX||(CX={})),(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=CX.MAX_VALUE),t===Number.MAX_VALUE&&(t=CX.MAX_VALUE),{line:e,character:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&JX.uinteger(t.line)&&JX.uinteger(t.character)}X(n,`is`),e.is=n})(wX||(wX={})),(function(e){function t(e,t,n,r){if(JX.uinteger(e)&&JX.uinteger(t)&&JX.uinteger(n)&&JX.uinteger(r))return{start:wX.create(e,t),end:wX.create(n,r)};if(wX.is(e)&&wX.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&wX.is(t.start)&&wX.is(t.end)}X(n,`is`),e.is=n})(TX||(TX={})),(function(e){function t(e,t){return{uri:e,range:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&TX.is(t.range)&&(JX.string(t.uri)||JX.undefined(t.uri))}X(n,`is`),e.is=n})(EX||(EX={})),(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&TX.is(t.targetRange)&&JX.string(t.targetUri)&&TX.is(t.targetSelectionRange)&&(TX.is(t.originSelectionRange)||JX.undefined(t.originSelectionRange))}X(n,`is`),e.is=n})(Tri||(Tri={})),(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&JX.numberRange(t.red,0,1)&&JX.numberRange(t.green,0,1)&&JX.numberRange(t.blue,0,1)&&JX.numberRange(t.alpha,0,1)}X(n,`is`),e.is=n})(DX||(DX={})),(function(e){function t(e,t){return{range:e,color:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&TX.is(t.range)&&DX.is(t.color)}X(n,`is`),e.is=n})(Eri||(Eri={})),(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&JX.string(t.label)&&(JX.undefined(t.textEdit)||jX.is(t))&&(JX.undefined(t.additionalTextEdits)||JX.typedArray(t.additionalTextEdits,jX.is))}X(n,`is`),e.is=n})(Dri||(Dri={})),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(Ori||(Ori={})),(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return JX.defined(n)&&(o.startCharacter=n),JX.defined(r)&&(o.endCharacter=r),JX.defined(i)&&(o.kind=i),JX.defined(a)&&(o.collapsedText=a),o}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&JX.uinteger(t.startLine)&&JX.uinteger(t.startLine)&&(JX.undefined(t.startCharacter)||JX.uinteger(t.startCharacter))&&(JX.undefined(t.endCharacter)||JX.uinteger(t.endCharacter))&&(JX.undefined(t.kind)||JX.string(t.kind))}X(n,`is`),e.is=n})(kri||(kri={})),(function(e){function t(e,t){return{location:e,message:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&EX.is(t.location)&&JX.string(t.message)}X(n,`is`),e.is=n})(OX||(OX={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ari||(Ari={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(jri||(jri={})),(function(e){function t(e){let t=e;return JX.objectLiteral(t)&&JX.string(t.href)}X(t,`is`),e.is=t})(Mri||(Mri={})),(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return JX.defined(n)&&(o.severity=n),JX.defined(r)&&(o.code=r),JX.defined(i)&&(o.source=i),JX.defined(a)&&(o.relatedInformation=a),o}X(t,`create`),e.create=t;function n(e){var t;let n=e;return JX.defined(n)&&TX.is(n.range)&&JX.string(n.message)&&(JX.number(n.severity)||JX.undefined(n.severity))&&(JX.integer(n.code)||JX.string(n.code)||JX.undefined(n.code))&&(JX.undefined(n.codeDescription)||JX.string((t=n.codeDescription)==null?void 0:t.href))&&(JX.string(n.source)||JX.undefined(n.source))&&(JX.undefined(n.relatedInformation)||JX.typedArray(n.relatedInformation,OX.is))}X(n,`is`),e.is=n})(kX||(kX={})),(function(e){function t(e,t,...n){let r={title:e,command:t};return JX.defined(n)&&n.length>0&&(r.arguments=n),r}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&JX.string(t.title)&&JX.string(t.command)}X(n,`is`),e.is=n})(AX||(AX={})),(function(e){function t(e,t){return{range:e,newText:t}}X(t,`replace`),e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}X(n,`insert`),e.insert=n;function r(e){return{range:e,newText:``}}X(r,`del`),e.del=r;function i(e){let t=e;return JX.objectLiteral(t)&&JX.string(t.newText)&&TX.is(t.range)}X(i,`is`),e.is=i})(jX||(jX={})),(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&JX.string(t.label)&&(JX.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(JX.string(t.description)||t.description===void 0)}X(n,`is`),e.is=n})(MX||(MX={})),(function(e){function t(e){let t=e;return JX.string(t)}X(t,`is`),e.is=t})(NX||(NX={})),(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}X(t,`replace`),e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}X(n,`insert`),e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}X(r,`del`),e.del=r;function i(e){let t=e;return jX.is(t)&&(MX.is(t.annotationId)||NX.is(t.annotationId))}X(i,`is`),e.is=i})(PX||(PX={})),(function(e){function t(e,t){return{textDocument:e,edits:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&VX.is(t.textDocument)&&Array.isArray(t.edits)}X(n,`is`),e.is=n})(FX||(FX={})),(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}X(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&JX.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||JX.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||JX.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||NX.is(t.annotationId))}X(n,`is`),e.is=n})(IX||(IX={})),(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}X(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&JX.string(t.oldUri)&&JX.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||JX.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||JX.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||NX.is(t.annotationId))}X(n,`is`),e.is=n})(LX||(LX={})),(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}X(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&JX.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||JX.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||JX.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||NX.is(t.annotationId))}X(n,`is`),e.is=n})(RX||(RX={})),(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>JX.string(e.kind)?IX.is(e)||LX.is(e)||RX.is(e):FX.is(e)))}X(t,`is`),e.is=t})(zX||(zX={})),BX=(e=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=jX.insert(e,t):NX.is(n)?(i=n,r=PX.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=PX.insert(e,t,i)),this.edits.push(r),i!==void 0)return i}replace(e,t,n){let r,i;if(n===void 0?r=jX.replace(e,t):NX.is(n)?(i=n,r=PX.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=PX.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=jX.del(e):NX.is(t)?(r=t,n=PX.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=PX.del(e,r)),this.edits.push(n),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},X(e,`TextEditChangeImpl`),e),Nri=(t=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(NX.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw Error(`Id ${n} is already in use.`);if(t===void 0)throw Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}},X(t,`ChangeAnnotations`),t),Pri=(n=class{constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Nri(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(FX.is(e)){let t=new BX(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new BX(e.changes[t]);this._textEditChanges[t]=n}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(VX.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){let e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new BX(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new BX(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Nri,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;MX.is(t)||NX.is(t)?r=t:n=t;let i,a;if(r===void 0?i=IX.create(e,n):(a=NX.is(r)?r:this._changeAnnotations.manage(r),i=IX.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let i;MX.is(n)||NX.is(n)?i=n:r=n;let a,o;if(i===void 0?a=LX.create(e,t,r):(o=NX.is(i)?i:this._changeAnnotations.manage(i),a=LX.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;MX.is(t)||NX.is(t)?r=t:n=t;let i,a;if(r===void 0?i=RX.create(e,n):(a=NX.is(r)?r:this._changeAnnotations.manage(r),i=RX.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},X(n,`WorkspaceChange`),n),(function(e){function t(e){return{uri:e}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&JX.string(t.uri)}X(n,`is`),e.is=n})(Fri||(Fri={})),(function(e){function t(e,t){return{uri:e,version:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&JX.string(t.uri)&&JX.integer(t.version)}X(n,`is`),e.is=n})(Iri||(Iri={})),(function(e){function t(e,t){return{uri:e,version:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&JX.string(t.uri)&&(t.version===null||JX.integer(t.version))}X(n,`is`),e.is=n})(VX||(VX={})),(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&JX.string(t.uri)&&JX.string(t.languageId)&&JX.integer(t.version)&&JX.string(t.text)}X(n,`is`),e.is=n})(Lri||(Lri={})),(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}X(t,`is`),e.is=t})(HX||(HX={})),(function(e){function t(e){let t=e;return JX.objectLiteral(e)&&HX.is(t.kind)&&JX.string(t.value)}X(t,`is`),e.is=t})(UX||(UX={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Rri||(Rri={})),(function(e){e.PlainText=1,e.Snippet=2})(zri||(zri={})),(function(e){e.Deprecated=1})(Bri||(Bri={})),(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}X(t,`create`),e.create=t;function n(e){let t=e;return t&&JX.string(t.newText)&&TX.is(t.insert)&&TX.is(t.replace)}X(n,`is`),e.is=n})(Vri||(Vri={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Hri||(Hri={})),(function(e){function t(e){let t=e;return t&&(JX.string(t.detail)||t.detail===void 0)&&(JX.string(t.description)||t.description===void 0)}X(t,`is`),e.is=t})(Uri||(Uri={})),(function(e){function t(e){return{label:e}}X(t,`create`),e.create=t})(Wri||(Wri={})),(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}X(t,`create`),e.create=t})(Gri||(Gri={})),(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}X(t,`fromPlainText`),e.fromPlainText=t;function n(e){let t=e;return JX.string(t)||JX.objectLiteral(t)&&JX.string(t.language)&&JX.string(t.value)}X(n,`is`),e.is=n})(WX||(WX={})),(function(e){function t(e){let t=e;return!!t&&JX.objectLiteral(t)&&(UX.is(t.contents)||WX.is(t.contents)||JX.typedArray(t.contents,WX.is))&&(e.range===void 0||TX.is(e.range))}X(t,`is`),e.is=t})(Kri||(Kri={})),(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}X(t,`create`),e.create=t})(qri||(qri={})),(function(e){function t(e,t,...n){let r={label:e};return JX.defined(t)&&(r.documentation=t),r.parameters=JX.defined(n)?n:[],r}X(t,`create`),e.create=t})(Jri||(Jri={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Yri||(Yri={})),(function(e){function t(e,t){let n={range:e};return JX.number(t)&&(n.kind=t),n}X(t,`create`),e.create=t})(Xri||(Xri={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Zri||(Zri={})),(function(e){e.Deprecated=1})(Qri||(Qri={})),(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}X(t,`create`),e.create=t})($ri||($ri={})),(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}X(t,`create`),e.create=t})(eii||(eii={})),(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}X(t,`create`),e.create=t;function n(e){let t=e;return t&&JX.string(t.name)&&JX.number(t.kind)&&TX.is(t.range)&&TX.is(t.selectionRange)&&(t.detail===void 0||JX.string(t.detail))&&(t.deprecated===void 0||JX.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}X(n,`is`),e.is=n})(tii||(tii={})),(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(nii||(nii={})),(function(e){e.Invoked=1,e.Automatic=2})(GX||(GX={})),(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&JX.typedArray(t.diagnostics,kX.is)&&(t.only===void 0||JX.typedArray(t.only,JX.string))&&(t.triggerKind===void 0||t.triggerKind===GX.Invoked||t.triggerKind===GX.Automatic)}X(n,`is`),e.is=n})(rii||(rii={})),(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):AX.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}X(t,`create`),e.create=t;function n(e){let t=e;return t&&JX.string(t.title)&&(t.diagnostics===void 0||JX.typedArray(t.diagnostics,kX.is))&&(t.kind===void 0||JX.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||AX.is(t.command))&&(t.isPreferred===void 0||JX.boolean(t.isPreferred))&&(t.edit===void 0||zX.is(t.edit))}X(n,`is`),e.is=n})(iii||(iii={})),(function(e){function t(e,t){let n={range:e};return JX.defined(t)&&(n.data=t),n}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&TX.is(t.range)&&(JX.undefined(t.command)||AX.is(t.command))}X(n,`is`),e.is=n})(aii||(aii={})),(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&JX.uinteger(t.tabSize)&&JX.boolean(t.insertSpaces)}X(n,`is`),e.is=n})(oii||(oii={})),(function(e){function t(e,t,n){return{range:e,target:t,data:n}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&TX.is(t.range)&&(JX.undefined(t.target)||JX.string(t.target))}X(n,`is`),e.is=n})(sii||(sii={})),(function(e){function t(e,t){return{range:e,parent:t}}X(t,`create`),e.create=t;function n(t){let n=t;return JX.objectLiteral(n)&&TX.is(n.range)&&(n.parent===void 0||e.is(n.parent))}X(n,`is`),e.is=n})(cii||(cii={})),(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(lii||(lii={})),(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(uii||(uii={})),(function(e){function t(e){let t=e;return JX.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}X(t,`is`),e.is=t})(dii||(dii={})),(function(e){function t(e,t){return{range:e,text:t}}X(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&TX.is(t.range)&&JX.string(t.text)}X(n,`is`),e.is=n})(fii||(fii={})),(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}X(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&TX.is(t.range)&&JX.boolean(t.caseSensitiveLookup)&&(JX.string(t.variableName)||t.variableName===void 0)}X(n,`is`),e.is=n})(pii||(pii={})),(function(e){function t(e,t){return{range:e,expression:t}}X(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&TX.is(t.range)&&(JX.string(t.expression)||t.expression===void 0)}X(n,`is`),e.is=n})(mii||(mii={})),(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.defined(t)&&TX.is(e.stoppedLocation)}X(n,`is`),e.is=n})(hii||(hii={})),(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}X(t,`is`),e.is=t})(KX||(KX={})),(function(e){function t(e){return{value:e}}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&(t.tooltip===void 0||JX.string(t.tooltip)||UX.is(t.tooltip))&&(t.location===void 0||EX.is(t.location))&&(t.command===void 0||AX.is(t.command))}X(n,`is`),e.is=n})(qX||(qX={})),(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}X(t,`create`),e.create=t;function n(e){let t=e;return JX.objectLiteral(t)&&wX.is(t.position)&&(JX.string(t.label)||JX.typedArray(t.label,qX.is))&&(t.kind===void 0||KX.is(t.kind))&&t.textEdits===void 0||JX.typedArray(t.textEdits,jX.is)&&(t.tooltip===void 0||JX.string(t.tooltip)||UX.is(t.tooltip))&&(t.paddingLeft===void 0||JX.boolean(t.paddingLeft))&&(t.paddingRight===void 0||JX.boolean(t.paddingRight))}X(n,`is`),e.is=n})(gii||(gii={})),(function(e){function t(e){return{kind:`snippet`,value:e}}X(t,`createSnippet`),e.createSnippet=t})(_ii||(_ii={})),(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}X(t,`create`),e.create=t})(vii||(vii={})),(function(e){function t(e){return{items:e}}X(t,`create`),e.create=t})(yii||(yii={})),(function(e){e.Invoked=0,e.Automatic=1})(bii||(bii={})),(function(e){function t(e,t){return{range:e,text:t}}X(t,`create`),e.create=t})(xii||(xii={})),(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}X(t,`create`),e.create=t})(Sii||(Sii={})),(function(e){function t(e){let t=e;return JX.objectLiteral(t)&&SX.is(t.uri)&&JX.string(t.name)}X(t,`is`),e.is=t})(Cii||(Cii={})),wii=[` `,`\r `,`\r`],(function(e){function t(e,t,n,r){return new Eii(e,t,n,r)}X(t,`create`),e.create=t;function n(e){let t=e;return!!(JX.defined(t)&&JX.string(t.uri)&&(JX.undefined(t.languageId)||JX.string(t.languageId))&&JX.uinteger(t.lineCount)&&JX.func(t.getText)&&JX.func(t.positionAt)&&JX.func(t.offsetAt))}X(n,`is`),e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}X(r,`applyEdits`),e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,l=0;for(;o0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return wX.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return wX.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1n(e))}X(s,`stringArray`),e.stringArray=s}}),QX=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var r=XX(),i;(function(e){let t={dispose(){}};e.None=function(){return t}})(i||(e.Event=i={}));var a=(t=class{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:X(()=>this.remove(e,t),`dispose`)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new a),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:X(()=>{this._callbacks&&(this._callbacks.remove(t,n),i.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},`dispose`)};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}},X(n,`Emitter`),n);e.Emitter=o,o._noop=function(){}}}),$X=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var r=XX(),i=ZX(),a=QX(),o;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None});function t(t){let n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}X(t,`is`),e.is=t})(o||(e.CancellationToken=o={}));var s=Object.freeze(function(e,t){let n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),l=(t=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},X(t,`MutableToken`),t);e.CancellationTokenSource=(n=class{get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=o.None}},X(n,`CancellationTokenSource`),n)}}),Dii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){var t,n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E;Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var D=ZX(),O;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(O||(e.ErrorCodes=O={})),e.ResponseError=(t=class e extends Error{constructor(t,n,r){super(n),this.code=D.number(t)?t:O.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,e.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}},X(t,`ResponseError`),t);var k=(n=class e{constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}},X(n,`ParameterStructures`),n);e.ParameterStructures=k,k.auto=new k(`auto`),k.byPosition=new k(`byPosition`),k.byName=new k(`byName`);var A=(r=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return k.auto}},X(r,`AbstractMessageSignature`),r);e.AbstractMessageSignature=A,e.RequestType0=(i=class extends A{constructor(e){super(e,0)}},X(i,`RequestType0`),i),e.RequestType=(a=class extends A{constructor(e,t=k.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},X(a,`RequestType`),a),e.RequestType1=(o=class extends A{constructor(e,t=k.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},X(o,`RequestType1`),o),e.RequestType2=(s=class extends A{constructor(e){super(e,2)}},X(s,`RequestType2`),s),e.RequestType3=(l=class extends A{constructor(e){super(e,3)}},X(l,`RequestType3`),l),e.RequestType4=(u=class extends A{constructor(e){super(e,4)}},X(u,`RequestType4`),u),e.RequestType5=(d=class extends A{constructor(e){super(e,5)}},X(d,`RequestType5`),d),e.RequestType6=(f=class extends A{constructor(e){super(e,6)}},X(f,`RequestType6`),f),e.RequestType7=(p=class extends A{constructor(e){super(e,7)}},X(p,`RequestType7`),p),e.RequestType8=(m=class extends A{constructor(e){super(e,8)}},X(m,`RequestType8`),m),e.RequestType9=(h=class extends A{constructor(e){super(e,9)}},X(h,`RequestType9`),h),e.NotificationType=(g=class extends A{constructor(e,t=k.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},X(g,`NotificationType`),g),e.NotificationType0=(_=class extends A{constructor(e){super(e,0)}},X(_,`NotificationType0`),_),e.NotificationType1=(v=class extends A{constructor(e,t=k.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},X(v,`NotificationType1`),v),e.NotificationType2=(y=class extends A{constructor(e){super(e,2)}},X(y,`NotificationType2`),y),e.NotificationType3=(b=class extends A{constructor(e){super(e,3)}},X(b,`NotificationType3`),b),e.NotificationType4=(x=class extends A{constructor(e){super(e,4)}},X(x,`NotificationType4`),x),e.NotificationType5=(S=class extends A{constructor(e){super(e,5)}},X(S,`NotificationType5`),S),e.NotificationType6=(C=class extends A{constructor(e){super(e,6)}},X(C,`NotificationType6`),C),e.NotificationType7=(w=class extends A{constructor(e){super(e,7)}},X(w,`NotificationType7`),w),e.NotificationType8=(T=class extends A{constructor(e){super(e,8)}},X(T,`NotificationType8`),T),e.NotificationType9=(E=class extends A{constructor(e){super(e,9)}},X(E,`NotificationType9`),E);var j;(function(e){function t(e){let t=e;return t&&D.string(t.method)&&(D.string(t.id)||D.number(t.id))}X(t,`isRequest`),e.isRequest=t;function n(e){let t=e;return t&&D.string(t.method)&&e.id===void 0}X(n,`isNotification`),e.isNotification=n;function r(e){let t=e;return t&&(t.result!==void 0||!!t.error)&&(D.string(t.id)||D.number(t.id)||t.id===null)}X(r,`isResponse`),e.isResponse=r})(j||(e.Message=j={}))}}),Oii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t,n;let r;var i;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var a;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(a||(e.Touch=a={}));var o=(r=(i=Symbol.toStringTag,Symbol.iterator),t=class{constructor(){this[i]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)==null?void 0:e.value}get last(){var e;return(e=this._tail)==null?void 0:e.value}has(e){return this._map.has(e)}get(e,t=a.None){let n=this._map.get(e);if(n)return t!==a.None&&this.touch(n,t),n.value}set(e,t,n=a.None){let r=this._map.get(e);if(r)r.value=t,n!==a.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case a.None:this.addItemLast(r);break;case a.First:this.addItemFirst(r);break;case a.Last:this.addItemLast(r);break;default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:X(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:X(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:X(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}[r](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(t===a.First||t===a.Last){if(t===a.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===a.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}},X(t,`LinkedMap`),t);e.LinkedMap=o,e.LRUCache=(n=class extends o{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=a.AsNew){return super.get(e,t)}peek(e){return super.get(e,a.None)}set(e,t){return super.set(e,t,a.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},X(n,`LRUCache`),n)}}),kii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(e){function t(e){return{dispose:e}}X(t,`create`),e.create=t})(t||(e.Disposable=t={}))}}),Aii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){var t,n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var a=$X(),o;(function(e){e.Continue=0,e.Cancelled=1})(o||(o={})),e.SharedArraySenderStrategy=(t=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),n=new Int32Array(t,0,1);n[0]=o.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let n=this.buffers.get(t);if(n===void 0)return;let r=new Int32Array(n,0,1);Atomics.store(r,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}},X(t,`SharedArraySenderStrategy`),t);var s=(n=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},X(n,`SharedArrayBufferCancellationToken`),n),l=(r=class{constructor(e){this.token=new s(e)}cancel(){}dispose(){}},X(r,`SharedArrayBufferCancellationTokenSource`),r);e.SharedArrayReceiverStrategy=(i=class{constructor(){this.kind=`request`}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new a.CancellationTokenSource:new l(t)}},X(i,`SharedArrayReceiverStrategy`),i)}}),jii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var n=XX();e.Semaphore=(t=class{constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length!==0&&this._active!==this._capacity&&(0,n.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}},X(t,`Semaphore`),t)}}),Mii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var r=XX(),i=ZX(),a=QX(),o=jii(),s;(function(e){function t(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}X(t,`is`),e.is=t})(s||(e.MessageReader=s={}));var l=(t=class{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter,this.partialMessageEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:Error(`Reader received error. Reason: ${i.string(e.message)?e.message:`unknown`}`)}},X(t,`AbstractMessageReader`),t);e.AbstractMessageReader=l;var u;(function(e){function t(e){let t,n,i=new Map,a,o=new Map;if(e===void 0||typeof e==`string`)t=e??`utf-8`;else{if(t=e.charset??`utf-8`,e.contentDecoder!==void 0&&(n=e.contentDecoder,i.set(n.name,n)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,r.default)().applicationJson.decoder,o.set(a.name,a)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}X(t,`fromOptions`),e.fromOptions=t})(u||(u={})),e.ReadableStreamMessageReader=(n=class extends l{constructor(e,t){super(),this.readable=e,this.options=u.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new o.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(Error(`Header must provide a Content-Length property. ${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,r.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}},X(n,`ReadableStreamMessageReader`),n)}}),Nii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var r=XX(),i=ZX(),a=jii(),o=QX(),s=`Content-Length: `,l=`\r `,u;(function(e){function t(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}X(t,`is`),e.is=t})(u||(e.MessageWriter=u={}));var d=(t=class{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:Error(`Writer received error. Reason: ${i.string(e.message)?e.message:`unknown`}`)}},X(t,`AbstractMessageWriter`),t);e.AbstractMessageWriter=d;var f;(function(e){function t(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}X(t,`fromOptions`),e.fromOptions=t})(f||(f={})),e.WriteableStreamMessageWriter=(n=class extends d{constructor(e,t){super(),this.writable=e,this.options=f.fromOptions(t),this.errorCount=0,this.writeSemaphore=new a.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(s,t.byteLength.toString(),l),n.push(l),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}},X(n,`WriteableStreamMessageWriter`),n)}}),Pii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var n=13,r=10,i=`\r `;e.AbstractMessageBuffer=(t=class{constructor(e=`utf-8`){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==`string`?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,a=0,o=0,s=0;row:for(;athis._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}},X(t,`AbstractMessageBuffer`),t)}}),Fii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var r=XX(),i=ZX(),a=Dii(),o=Oii(),s=QX(),l=$X(),u;(function(e){e.type=new a.NotificationType(`$/cancelRequest`)})(u||(u={}));var d;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}X(t,`is`),e.is=t})(d||(e.ProgressToken=d={}));var f;(function(e){e.type=new a.NotificationType(`$/progress`)})(f||(f={})),e.ProgressType=(t=class{constructor(){}},X(t,`ProgressType`),t);var p;(function(e){function t(e){return i.func(e)}X(t,`is`),e.is=t})(p||(p={})),e.NullLogger=Object.freeze({error:X(()=>{},`error`),warn:X(()=>{},`warn`),info:X(()=>{},`info`),log:X(()=>{},`log`)});var m;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(m||(e.Trace=m={}));var h;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(h||(e.TraceValues=h={})),(function(e){function t(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase(),t){case`off`:return e.Off;case`messages`:return e.Messages;case`compact`:return e.Compact;case`verbose`:return e.Verbose;default:return e.Off}}X(t,`fromString`),e.fromString=t;function n(t){switch(t){case e.Off:return`off`;case e.Messages:return`messages`;case e.Compact:return`compact`;case e.Verbose:return`verbose`;default:return`off`}}X(n,`toString`),e.toString=n})(m||(e.Trace=m={}));var g;(function(e){e.Text=`text`,e.JSON=`json`})(g||(e.TraceFormat=g={})),(function(e){function t(t){return i.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}X(t,`fromString`),e.fromString=t})(g||(e.TraceFormat=g={}));var _;(function(e){e.type=new a.NotificationType(`$/setTrace`)})(_||(e.SetTraceNotification=_={}));var v;(function(e){e.type=new a.NotificationType(`$/logTrace`)})(v||(e.LogTraceNotification=v={}));var y;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(y||(e.ConnectionErrors=y={}));var b=(n=class e extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}},X(n,`ConnectionError`),n);e.ConnectionError=b;var x;(function(e){function t(e){let t=e;return t&&i.func(t.cancelUndispatched)}X(t,`is`),e.is=t})(x||(e.ConnectionStrategy=x={}));var S;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&i.func(t.createCancellationTokenSource)&&(t.dispose===void 0||i.func(t.dispose))}X(t,`is`),e.is=t})(S||(e.IdCancellationReceiverStrategy=S={}));var C;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&i.func(t.createCancellationTokenSource)&&(t.dispose===void 0||i.func(t.dispose))}X(t,`is`),e.is=t})(C||(e.RequestCancellationReceiverStrategy=C={}));var w;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new l.CancellationTokenSource}});function t(e){return S.is(e)||C.is(e)}X(t,`is`),e.is=t})(w||(e.CancellationReceiverStrategy=w={}));var T;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(u.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}X(t,`is`),e.is=t})(T||(e.CancellationSenderStrategy=T={}));var E;(function(e){e.Message=Object.freeze({receiver:w.Message,sender:T.Message});function t(e){let t=e;return t&&w.is(t.receiver)&&T.is(t.sender)}X(t,`is`),e.is=t})(E||(e.CancellationStrategy=E={}));var D;(function(e){function t(e){let t=e;return t&&i.func(t.handleMessage)}X(t,`is`),e.is=t})(D||(e.MessageStrategy=D={}));var O;(function(e){function t(e){let t=e;return t&&(E.is(t.cancellationStrategy)||x.is(t.connectionStrategy)||D.is(t.messageStrategy))}X(t,`is`),e.is=t})(O||(e.ConnectionOptions=O={}));var k;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(k||(k={}));function A(t,n,h,x){let C=h===void 0?e.NullLogger:h,w=0,T=0,O=0,A,j=new Map,M,N=new Map,P=new Map,F,I=new o.LinkedMap,L=new Map,R=new Set,ee=new Map,te=m.Off,ne=g.Text,z,re=k.New,ie=new s.Emitter,ae=new s.Emitter,oe=new s.Emitter,se=new s.Emitter,ce=new s.Emitter,le=x&&x.cancellationStrategy?x.cancellationStrategy:E.Message;function ue(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}X(ue,`createRequestQueueKey`);function de(e){return e===null?`res-unknown-`+(++O).toString():`res-`+e.toString()}X(de,`createResponseQueueKey`);function fe(){return`not-`+(++T).toString()}X(fe,`createNotificationQueueKey`);function pe(e,t){a.Message.isRequest(t)?e.set(ue(t.id),t):a.Message.isResponse(t)?e.set(de(t.id),t):e.set(fe(),t)}X(pe,`addMessageToQueue`);function me(e){}X(me,`cancelUndispatched`);function he(){return re===k.Listening}X(he,`isListening`);function ge(){return re===k.Closed}X(ge,`isClosed`);function _e(){return re===k.Disposed}X(_e,`isDisposed`);function ve(){(re===k.New||re===k.Listening)&&(re=k.Closed,ae.fire(void 0))}X(ve,`closeHandler`);function ye(e){ie.fire([e,void 0,void 0])}X(ye,`readErrorHandler`);function be(e){ie.fire(e)}X(be,`writeErrorHandler`),t.onClose(ve),t.onError(ye),n.onClose(ve),n.onError(be);function xe(){F||I.size===0||(F=(0,r.default)().timer.setImmediate(()=>{F=void 0,Ce()}))}X(xe,`triggerMessageQueue`);function Se(e){a.Message.isRequest(e)?Te(e):a.Message.isNotification(e)?De(e):a.Message.isResponse(e)?Ee(e):Oe(e)}X(Se,`handleMessage`);function Ce(){if(I.size===0)return;let e=I.shift();try{let t=x==null?void 0:x.messageStrategy;D.is(t)?t.handleMessage(e,Se):Se(e)}finally{xe()}}X(Ce,`processMessageQueue`);let we=X(e=>{try{if(a.Message.isNotification(e)&&e.method===u.type.method){let t=e.params.id,r=ue(t),i=I.get(r);if(a.Message.isRequest(i)){let a=x==null?void 0:x.connectionStrategy,o=a&&a.cancelUndispatched?a.cancelUndispatched(i,me):void 0;if(o&&(o.error!==void 0||o.result!==void 0)){I.delete(r),ee.delete(t),o.id=i.id,je(o,e.method,Date.now()),n.write(o).catch(()=>C.error(`Sending response for canceled message failed.`));return}}let o=ee.get(t);if(o!==void 0){o.cancel(),Ne(e);return}R.add(t)}pe(I,e)}finally{xe()}},`callback`);function Te(e){if(_e())return;function t(t,r,i){let o={jsonrpc:`2.0`,id:e.id};t instanceof a.ResponseError?o.error=t.toJson():o.result=t===void 0?null:t,je(o,r,i),n.write(o).catch(()=>C.error(`Sending response failed.`))}X(t,`reply`);function r(t,r,i){let a={jsonrpc:`2.0`,id:e.id,error:t.toJson()};je(a,r,i),n.write(a).catch(()=>C.error(`Sending response failed.`))}X(r,`replyError`);function o(t,r,i){t===void 0&&(t=null);let a={jsonrpc:`2.0`,id:e.id,result:t};je(a,r,i),n.write(a).catch(()=>C.error(`Sending response failed.`))}X(o,`replySuccess`),Me(e);let s=j.get(e.method),l,u;s&&(l=s.type,u=s.handler);let d=Date.now();if(u||A){let n=e.id??String(Date.now()),s=S.is(le.receiver)?le.receiver.createCancellationTokenSource(n):le.receiver.createCancellationTokenSource(e);e.id!==null&&R.has(e.id)&&s.cancel(),e.id!==null&&ee.set(n,s);try{let f;if(u){if(e.params===void 0){if(l!==void 0&&l.numberOfParams!==0){r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${e.method} defines ${l.numberOfParams} params but received none.`),e.method,d);return}f=u(s.token)}else if(Array.isArray(e.params)){if(l!==void 0&&l.parameterStructures===a.ParameterStructures.byName){r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,d);return}f=u(...e.params,s.token)}else{if(l!==void 0&&l.parameterStructures===a.ParameterStructures.byPosition){r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,d);return}f=u(e.params,s.token)}}else A&&(f=A(e.method,e.params,s.token));let p=f;f?p.then?p.then(r=>{ee.delete(n),t(r,e.method,d)},t=>{ee.delete(n),t instanceof a.ResponseError?r(t,e.method,d):t&&i.string(t.message)?r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,d):r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,d)}):(ee.delete(n),t(f,e.method,d)):(ee.delete(n),o(f,e.method,d))}catch(o){ee.delete(n),o instanceof a.ResponseError?t(o,e.method,d):o&&i.string(o.message)?r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${o.message}`),e.method,d):r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,d)}}else r(new a.ResponseError(a.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,d)}X(Te,`handleRequest`);function Ee(e){if(!_e()){if(e.id===null)e.error?C.error(`Received response message without id: Error is: ${JSON.stringify(e.error,void 0,4)}`):C.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=L.get(t);if(Pe(e,n),n!==void 0){L.delete(t);try{if(e.error){let t=e.error;n.reject(new a.ResponseError(t.code,t.message,t.data))}else if(e.result!==void 0)n.resolve(e.result);else throw Error(`Should never happen.`)}catch(e){e.message?C.error(`Response handler '${n.method}' failed with message: ${e.message}`):C.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}}X(Ee,`handleResponse`);function De(e){if(_e())return;let t,n;if(e.method===u.type.method){let t=e.params.id;R.delete(t),Ne(e)}else{{let r=N.get(e.method);r&&(n=r.handler,t=r.type)}if(n||M)try{if(Ne(e),n){if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==a.ParameterStructures.byName&&C.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){let r=e.params;e.method===f.type.method&&r.length===2&&d.is(r[0])?n({token:r[0],value:r[1]}):(t!==void 0&&(t.parameterStructures===a.ParameterStructures.byName&&C.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&C.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else t!==void 0&&t.parameterStructures===a.ParameterStructures.byPosition&&C.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params)}else M&&M(e.method,e.params)}catch(t){t.message?C.error(`Notification handler '${e.method}' failed with message: ${t.message}`):C.error(`Notification handler '${e.method}' failed unexpectedly.`)}else oe.fire(e)}}X(De,`handleNotification`);function Oe(e){if(!e){C.error(`Received empty message.`);return}C.error(`Received message which is neither a response nor a notification message: ${JSON.stringify(e,null,4)}`);let t=e;if(i.string(t.id)||i.number(t.id)){let e=t.id,n=L.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}X(Oe,`handleInvalidMessage`);function B(e){if(e!=null)switch(te){case m.Verbose:return JSON.stringify(e,null,4);case m.Compact:return JSON.stringify(e);default:return}}X(B,`stringifyTrace`);function ke(e){if(te!==m.Off&&z){if(ne===g.Text){let t;(te===m.Verbose||te===m.Compact)&&e.params&&(t=`Params: ${B(e.params)} `),z.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Fe(`send-request`,e)}}X(ke,`traceSendingRequest`);function Ae(e){if(te!==m.Off&&z){if(ne===g.Text){let t;(te===m.Verbose||te===m.Compact)&&(t=e.params?`Params: ${B(e.params)} `:`No parameters provided. `),z.log(`Sending notification '${e.method}'.`,t)}else Fe(`send-notification`,e)}}X(Ae,`traceSendingNotification`);function je(e,t,n){if(te!==m.Off&&z){if(ne===g.Text){let r;(te===m.Verbose||te===m.Compact)&&(e.error&&e.error.data?r=`Error data: ${B(e.error.data)} `:e.result?r=`Result: ${B(e.result)} `:e.error===void 0&&(r=`No result returned. `)),z.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Fe(`send-response`,e)}}X(je,`traceSendingResponse`);function Me(e){if(te!==m.Off&&z){if(ne===g.Text){let t;(te===m.Verbose||te===m.Compact)&&e.params&&(t=`Params: ${B(e.params)} `),z.log(`Received request '${e.method} - (${e.id})'.`,t)}else Fe(`receive-request`,e)}}X(Me,`traceReceivedRequest`);function Ne(e){if(te!==m.Off&&z&&e.method!==v.type.method){if(ne===g.Text){let t;(te===m.Verbose||te===m.Compact)&&(t=e.params?`Params: ${B(e.params)} `:`No parameters provided. `),z.log(`Received notification '${e.method}'.`,t)}else Fe(`receive-notification`,e)}}X(Ne,`traceReceivedNotification`);function Pe(e,t){if(te!==m.Off&&z){if(ne===g.Text){let n;if((te===m.Verbose||te===m.Compact)&&(e.error&&e.error.data?n=`Error data: ${B(e.error.data)} `:e.result?n=`Result: ${B(e.result)} `:e.error===void 0&&(n=`No result returned. `)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;z.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else z.log(`Received response ${e.id} without active response promise.`,n)}else Fe(`receive-response`,e)}}X(Pe,`traceReceivedResponse`);function Fe(e,t){if(!z||te===m.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};z.log(n)}X(Fe,`logLSPMessage`);function Ie(){if(ge())throw new b(y.Closed,`Connection is closed.`);if(_e())throw new b(y.Disposed,`Connection is disposed.`)}X(Ie,`throwIfClosedOrDisposed`);function Le(){if(he())throw new b(y.AlreadyListening,`Connection is already listening`)}X(Le,`throwIfListening`);function Re(){if(!he())throw Error(`Call listen() first.`)}X(Re,`throwIfNotListening`);function ze(e){return e===void 0?null:e}X(ze,`undefinedToNull`);function Be(e){if(e!==null)return e}X(Be,`nullToUndefined`);function Ve(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}X(Ve,`isNamedParam`);function He(e,t){switch(e){case a.ParameterStructures.auto:return Ve(t)?Be(t):[ze(t)];case a.ParameterStructures.byName:if(!Ve(t))throw Error(`Received parameters by name but param is not an object literal.`);return Be(t);case a.ParameterStructures.byPosition:return[ze(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}X(He,`computeSingleParam`);function Ue(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=He(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{Ie();let r,o;if(i.string(e)){r=e;let n=t[0],i=0,s=a.ParameterStructures.auto;a.ParameterStructures.is(n)&&(i=1,s=n);let l=t.length,u=l-i;switch(u){case 0:o=void 0;break;case 1:o=He(s,t[i]);break;default:if(s===a.ParameterStructures.byName)throw Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);o=t.slice(i,l).map(e=>ze(e))}}else{let n=t;r=e.method,o=Ue(e,n)}let s={jsonrpc:`2.0`,method:r,params:o};return Ae(s),n.write(s).catch(e=>{throw C.error(`Sending notification failed.`),e})},`sendNotification`),onNotification:X((e,t)=>{Ie();let n;return i.func(e)?M=e:t&&(i.string(e)?(n=e,N.set(e,{type:void 0,handler:t})):(n=e.method,N.set(e.method,{type:e,handler:t}))),{dispose:X(()=>{n===void 0?M=void 0:N.delete(n)},`dispose`)}},`onNotification`),onProgress:X((e,t,n)=>{if(P.has(t))throw Error(`Progress handler for token ${t} already registered`);return P.set(t,n),{dispose:X(()=>{P.delete(t)},`dispose`)}},`onProgress`),sendProgress:X((e,t,n)=>We.sendNotification(f.type,{token:t,value:n}),`sendProgress`),onUnhandledProgress:se.event,sendRequest:X((e,...t)=>{Ie(),Re();let r,o,s;if(i.string(e)){r=e;let n=t[0],i=t[t.length-1],u=0,d=a.ParameterStructures.auto;a.ParameterStructures.is(n)&&(u=1,d=n);let f=t.length;l.CancellationToken.is(i)&&(--f,s=i);let p=f-u;switch(p){case 0:o=void 0;break;case 1:o=He(d,t[u]);break;default:if(d===a.ParameterStructures.byName)throw Error(`Received ${p} parameters for 'by Name' request parameter structure.`);o=t.slice(u,f).map(e=>ze(e))}}else{let n=t;r=e.method,o=Ue(e,n);let i=e.numberOfParams;s=l.CancellationToken.is(n[i])?n[i]:void 0}let u=w++,d;s&&(d=s.onCancellationRequested(()=>{let e=le.sender.sendCancellation(We,u);return e===void 0?(C.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch(()=>{C.log(`Sending cancellation messages for id ${u} failed`)})}));let f={jsonrpc:`2.0`,id:u,method:r,params:o};return ke(f),typeof le.sender.enableCancellation==`function`&&le.sender.enableCancellation(f),new Promise(async(e,t)=>{let i=X(t=>{e(t),le.sender.cleanup(u),d==null||d.dispose()},`resolveWithCleanup`),o=X(e=>{t(e),le.sender.cleanup(u),d==null||d.dispose()},`rejectWithCleanup`),s={method:r,timerStart:Date.now(),resolve:i,reject:o};try{await n.write(f),L.set(u,s)}catch(e){throw C.error(`Sending request failed.`),s.reject(new a.ResponseError(a.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},`sendRequest`),onRequest:X((e,t)=>{Ie();let n=null;return p.is(e)?(n=void 0,A=e):i.string(e)?(n=null,t!==void 0&&(n=e,j.set(e,{handler:t,type:void 0}))):t!==void 0&&(n=e.method,j.set(e.method,{type:e,handler:t})),{dispose:X(()=>{n!==null&&(n===void 0?A=void 0:j.delete(n))},`dispose`)}},`onRequest`),hasPendingResponse:X(()=>L.size>0,`hasPendingResponse`),trace:X(async(e,t,n)=>{let r=!1,a=g.Text;n!==void 0&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,a=n.traceFormat||g.Text)),te=e,ne=a,z=te===m.Off?void 0:t,r&&!ge()&&!_e()&&await We.sendNotification(_.type,{value:m.toString(e)})},`trace`),onError:ie.event,onClose:ae.event,onUnhandledNotification:oe.event,onDispose:ce.event,end:X(()=>{n.end()},`end`),dispose:X(()=>{if(_e())return;re=k.Disposed,ce.fire(void 0);let e=new a.ResponseError(a.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of L.values())t.reject(e);L=new Map,ee=new Map,R=new Set,I=new o.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(t.dispose)&&t.dispose()},`dispose`),listen:X(()=>{Ie(),Le(),re=k.Listening,t.listen(we)},`listen`),inspect:X(()=>{(0,r.default)().console.log(`inspect`)},`inspect`)};return We.onNotification(v.type,e=>{if(te===m.Off||!z)return;let t=te===m.Verbose||te===m.Compact;z.log(e.message,t?e.verbose:void 0)}),We.onNotification(f.type,e=>{let t=P.get(e.token);t?t(e.value):se.fire(e)}),We}X(A,`createMessageConnection`),e.createMessageConnection=A}}),eZ=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=Dii();Object.defineProperty(e,"Message",{enumerable:!0,get:X(function(){return t.Message},`get`)}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:X(function(){return t.RequestType},`get`)}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:X(function(){return t.RequestType0},`get`)}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:X(function(){return t.RequestType1},`get`)}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:X(function(){return t.RequestType2},`get`)}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:X(function(){return t.RequestType3},`get`)}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:X(function(){return t.RequestType4},`get`)}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:X(function(){return t.RequestType5},`get`)}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:X(function(){return t.RequestType6},`get`)}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:X(function(){return t.RequestType7},`get`)}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:X(function(){return t.RequestType8},`get`)}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:X(function(){return t.RequestType9},`get`)}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:X(function(){return t.ResponseError},`get`)}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:X(function(){return t.ErrorCodes},`get`)}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:X(function(){return t.NotificationType},`get`)}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:X(function(){return t.NotificationType0},`get`)}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:X(function(){return t.NotificationType1},`get`)}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:X(function(){return t.NotificationType2},`get`)}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:X(function(){return t.NotificationType3},`get`)}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:X(function(){return t.NotificationType4},`get`)}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:X(function(){return t.NotificationType5},`get`)}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:X(function(){return t.NotificationType6},`get`)}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:X(function(){return t.NotificationType7},`get`)}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:X(function(){return t.NotificationType8},`get`)}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:X(function(){return t.NotificationType9},`get`)}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:X(function(){return t.ParameterStructures},`get`)});var n=Oii();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:X(function(){return n.LinkedMap},`get`)}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:X(function(){return n.LRUCache},`get`)}),Object.defineProperty(e,"Touch",{enumerable:!0,get:X(function(){return n.Touch},`get`)});var r=kii();Object.defineProperty(e,"Disposable",{enumerable:!0,get:X(function(){return r.Disposable},`get`)});var i=QX();Object.defineProperty(e,"Event",{enumerable:!0,get:X(function(){return i.Event},`get`)}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:X(function(){return i.Emitter},`get`)});var a=$X();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:X(function(){return a.CancellationTokenSource},`get`)}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:X(function(){return a.CancellationToken},`get`)});var o=Aii();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:X(function(){return o.SharedArraySenderStrategy},`get`)}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:X(function(){return o.SharedArrayReceiverStrategy},`get`)});var s=Mii();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:X(function(){return s.MessageReader},`get`)}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:X(function(){return s.AbstractMessageReader},`get`)}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:X(function(){return s.ReadableStreamMessageReader},`get`)});var l=Nii();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:X(function(){return l.MessageWriter},`get`)}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:X(function(){return l.AbstractMessageWriter},`get`)}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:X(function(){return l.WriteableStreamMessageWriter},`get`)});var u=Pii();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:X(function(){return u.AbstractMessageBuffer},`get`)});var d=Fii();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:X(function(){return d.ConnectionStrategy},`get`)}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:X(function(){return d.ConnectionOptions},`get`)}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:X(function(){return d.NullLogger},`get`)}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:X(function(){return d.createMessageConnection},`get`)}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:X(function(){return d.ProgressToken},`get`)}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:X(function(){return d.ProgressType},`get`)}),Object.defineProperty(e,"Trace",{enumerable:!0,get:X(function(){return d.Trace},`get`)}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:X(function(){return d.TraceValues},`get`)}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:X(function(){return d.TraceFormat},`get`)}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:X(function(){return d.SetTraceNotification},`get`)}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:X(function(){return d.LogTraceNotification},`get`)}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:X(function(){return d.ConnectionErrors},`get`)}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:X(function(){return d.ConnectionError},`get`)}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:X(function(){return d.CancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:X(function(){return d.CancellationSenderStrategy},`get`)}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:X(function(){return d.CancellationStrategy},`get`)}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:X(function(){return d.MessageStrategy},`get`)}),e.RAL=XX().default}}),Iii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){var t,n,r;Object.defineProperty(e,"__esModule",{value:!0});var i=eZ(),a=(t=class e extends i.AbstractMessageBuffer{constructor(e=`utf-8`){super(e),this.asciiDecoder=new TextDecoder(`ascii`)}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t===`ascii`?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}},X(t,`MessageBuffer`),t);a.emptyBuffer=new Uint8Array;var o=(n=class{constructor(e){this.socket=e,this._onData=new i.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,i.RAL)().console.error(`Converting blob to array buffer failed.`)})},this.socket.addEventListener(`message`,this._messageListener)}onClose(e){return this.socket.addEventListener(`close`,e),i.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),i.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),i.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}onData(e){return this._onData.event(e)}},X(n,`ReadableStreamWrapper`),n),s=(r=class{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener(`close`,e),i.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),i.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),i.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}write(e,t){if(typeof e==`string`){if(t!==void 0&&t!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},X(r,`WritableStreamWrapper`),r),l=new TextEncoder,u=Object.freeze({messageBuffer:Object.freeze({create:X(e=>new a(e),`create`)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:X((e,t)=>{if(t.charset!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(l.encode(JSON.stringify(e,void 0,0)))},`encode`)}),decoder:Object.freeze({name:`application/json`,decode:X((e,t)=>{if(!(e instanceof Uint8Array))throw Error(`In a Browser environments only Uint8Arrays are supported.`);return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},`decode`)})}),stream:Object.freeze({asReadableStream:X(e=>new o(e),`asReadableStream`),asWritableStream:X(e=>new s(e),`asWritableStream`)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:X(()=>clearTimeout(r),`dispose`)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:X(()=>clearTimeout(n),`dispose`)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:X(()=>clearInterval(r),`dispose`)}}})});function d(){return u}X(d,`RIL`),(function(e){function t(){i.RAL.install(u)}X(t,`install`),e.install=t})(d||(d={})),e.default=d}}),tZ=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t,n,r=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:X(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),i=e&&e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&r(t,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,Iii().default.install();var a=eZ();i(eZ(),e),e.BrowserMessageReader=(t=class extends a.AbstractMessageReader{constructor(e){super(),this._onData=new a.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener(`error`,e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},X(t,`BrowserMessageReader`),t),e.BrowserMessageWriter=(n=class extends a.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}},X(n,`BrowserMessageWriter`),n);function o(e,t,n,r){return n===void 0&&(n=a.NullLogger),a.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,a.createMessageConnection)(e,t,n,r)}X(o,`createMessageConnection`),e.createMessageConnection=o}}),Lii=hX({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=tZ()}}),nZ=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){var t,n,r,i,a;Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var o=tZ(),s;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(s||(e.MessageDirection=s={})),e.RegistrationType=(t=class{constructor(e){this.method=e}},X(t,`RegistrationType`),t),e.ProtocolRequestType0=(n=class extends o.RequestType0{constructor(e){super(e)}},X(n,`ProtocolRequestType0`),n),e.ProtocolRequestType=(r=class extends o.RequestType{constructor(e){super(e,o.ParameterStructures.byName)}},X(r,`ProtocolRequestType`),r),e.ProtocolNotificationType0=(i=class extends o.NotificationType0{constructor(e){super(e)}},X(i,`ProtocolNotificationType0`),i),e.ProtocolNotificationType=(a=class extends o.NotificationType{constructor(e){super(e,o.ParameterStructures.byName)}},X(a,`ProtocolNotificationType`),a)}}),rZ=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}X(t,`boolean`),e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}X(n,`string`),e.string=n;function r(e){return typeof e==`number`||e instanceof Number}X(r,`number`),e.number=r;function i(e){return e instanceof Error}X(i,`error`),e.error=i;function a(e){return typeof e==`function`}X(a,`func`),e.func=a;function o(e){return Array.isArray(e)}X(o,`array`),e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}X(s,`stringArray`),e.stringArray=s;function l(e,t){return Array.isArray(e)&&e.every(t)}X(l,`typedArray`),e.typedArray=l;function u(e){return typeof e==`object`&&!!e}X(u,`objectLiteral`),e.objectLiteral=u}}),Rii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))}}),zii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))}}),Bii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=nZ(),n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))}}),Vii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=nZ(),n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))}}),Hii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))}}),Uii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))}}),Wii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))}}),Gii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))}}),Kii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=tZ(),n=nZ(),r;(function(e){e.type=new t.ProgressType;function n(t){return t===e.type}X(n,`is`),e.is=n})(r||(e.WorkDoneProgress=r={}));var i;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),qii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),Jii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=nZ(),n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))}}),Yii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=nZ(),n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))}}),Xii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))}}),Zii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=nZ(),n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var l;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(l||(e.WillDeleteFilesRequest=l={}))}}),Qii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=nZ(),n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))}}),$ii=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),eai=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))}}),tai=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=nZ(),n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))}}),nai=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=tZ(),n=rZ(),r=nZ(),i;(function(e){function t(e){let t=e;return t&&n.boolean(t.retriggerRequest)}X(t,`is`),e.is=t})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(a||(e.DocumentDiagnosticReportKind=a={}));var o;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(o||(e.DocumentDiagnosticRequest=o={}));var s;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(s||(e.WorkspaceDiagnosticRequest=s={}));var l;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)})(l||(e.DiagnosticRefreshRequest=l={}))}}),rai=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(YX(),bX(xX)),n=rZ(),r=nZ(),i;(function(e){e.Markup=1,e.Code=2;function t(e){return e===1||e===2}X(t,`is`),e.is=t})(i||(e.NotebookCellKind=i={}));var a;(function(e){function r(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}X(r,`create`),e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.executionOrder)&&(r.success===void 0||n.boolean(r.success))}X(i,`is`),e.is=i;function a(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}X(a,`equals`),e.equals=a})(a||(e.ExecutionSummary=a={}));var o;(function(e){function r(e,t){return{kind:e,document:t}}X(r,`create`),e.create=r;function o(e){let r=e;return n.objectLiteral(r)&&i.is(r.kind)&&t.DocumentUri.is(r.document)&&(r.metadata===void 0||n.objectLiteral(r.metadata))}X(o,`is`),e.is=o;function s(e,t){let n=new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!l(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!a.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}X(s,`diff`),e.diff=s;function l(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let n=0;n0}X(t,`hasId`),e.hasId=t})(F||(e.StaticRegistrationOptions=F={}));var I;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||k.is(t.documentSelector))}X(t,`is`),e.is=t})(I||(e.TextDocumentRegistrationOptions=I={}));var L;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(t.workDoneProgress===void 0||r.boolean(t.workDoneProgress))}X(t,`is`),e.is=t;function n(e){let t=e;return t&&r.boolean(t.workDoneProgress)}X(n,`hasWorkDoneProgress`),e.hasWorkDoneProgress=n})(L||(e.WorkDoneProgressOptions=L={}));var R;(function(e){e.method=`initialize`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(R||(e.InitializeRequest=R={}));var ee;(function(e){e.unknownProtocolVersion=1})(ee||(e.InitializeErrorCodes=ee={}));var te;(function(e){e.method=`initialized`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(te||(e.InitializedNotification=te={}));var ne;(function(e){e.method=`shutdown`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType0(e.method)})(ne||(e.ShutdownRequest=ne={}));var z;(function(e){e.method=`exit`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType0(e.method)})(z||(e.ExitNotification=z={}));var re;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(re||(e.DidChangeConfigurationNotification=re={}));var ie;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ie||(e.MessageType=ie={}));var ae;(function(e){e.method=`window/showMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(ae||(e.ShowMessageNotification=ae={}));var oe;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(oe||(e.ShowMessageRequest=oe={}));var se;(function(e){e.method=`window/logMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(se||(e.LogMessageNotification=se={}));var ce;(function(e){e.method=`telemetry/event`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(ce||(e.TelemetryEventNotification=ce={}));var le;(function(e){e.None=0,e.Full=1,e.Incremental=2})(le||(e.TextDocumentSyncKind=le={}));var ue;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ue||(e.DidOpenTextDocumentNotification=ue={}));var de;(function(e){function t(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}X(t,`isIncremental`),e.isIncremental=t;function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}X(n,`isFull`),e.isFull=n})(de||(e.TextDocumentContentChangeEvent=de={}));var fe;(function(e){e.method=`textDocument/didChange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(fe||(e.DidChangeTextDocumentNotification=fe={}));var pe;(function(e){e.method=`textDocument/didClose`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(pe||(e.DidCloseTextDocumentNotification=pe={}));var me;(function(e){e.method=`textDocument/didSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(me||(e.DidSaveTextDocumentNotification=me={}));var he;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(he||(e.TextDocumentSaveReason=he={}));var ge;(function(e){e.method=`textDocument/willSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ge||(e.WillSaveTextDocumentNotification=ge={}));var _e;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(_e||(e.WillSaveTextDocumentWaitUntilRequest=_e={}));var ve;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ve||(e.DidChangeWatchedFilesNotification=ve={}));var ye;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ye||(e.FileChangeType=ye={}));var be;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(n.URI.is(t.baseUri)||n.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}X(t,`is`),e.is=t})(be||(e.RelativePattern=be={}));var xe;(function(e){e.Create=1,e.Change=2,e.Delete=4})(xe||(e.WatchKind=xe={}));var Se;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(Se||(e.PublishDiagnosticsNotification=Se={}));var Ce;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Ce||(e.CompletionTriggerKind=Ce={}));var we;(function(e){e.method=`textDocument/completion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(we||(e.CompletionRequest=we={}));var Te;(function(e){e.method=`completionItem/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Te||(e.CompletionResolveRequest=Te={}));var Ee;(function(e){e.method=`textDocument/hover`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ee||(e.HoverRequest=Ee={}));var De;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(De||(e.SignatureHelpTriggerKind=De={}));var Oe;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Oe||(e.SignatureHelpRequest=Oe={}));var B;(function(e){e.method=`textDocument/definition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(B||(e.DefinitionRequest=B={}));var ke;(function(e){e.method=`textDocument/references`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ke||(e.ReferencesRequest=ke={}));var Ae;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ae||(e.DocumentHighlightRequest=Ae={}));var je;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(je||(e.DocumentSymbolRequest=je={}));var Me;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Me||(e.CodeActionRequest=Me={}));var Ne;(function(e){e.method=`codeAction/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ne||(e.CodeActionResolveRequest=Ne={}));var Pe;(function(e){e.method=`workspace/symbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Pe||(e.WorkspaceSymbolRequest=Pe={}));var Fe;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Fe||(e.WorkspaceSymbolResolveRequest=Fe={}));var Ie;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ie||(e.CodeLensRequest=Ie={}));var Le;(function(e){e.method=`codeLens/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Le||(e.CodeLensResolveRequest=Le={}));var Re;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(Re||(e.CodeLensRefreshRequest=Re={}));var ze;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ze||(e.DocumentLinkRequest=ze={}));var Be;(function(e){e.method=`documentLink/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Be||(e.DocumentLinkResolveRequest=Be={}));var Ve;(function(e){e.method=`textDocument/formatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ve||(e.DocumentFormattingRequest=Ve={}));var He;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(He||(e.DocumentRangeFormattingRequest=He={}));var Ue;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ue||(e.DocumentRangesFormattingRequest=Ue={}));var We;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(We||(e.DocumentOnTypeFormattingRequest=We={}));var Ge;(function(e){e.Identifier=1})(Ge||(e.PrepareSupportDefaultBehavior=Ge={}));var Ke;(function(e){e.method=`textDocument/rename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ke||(e.RenameRequest=Ke={}));var qe;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(qe||(e.PrepareRenameRequest=qe={}));var Je;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Je||(e.ExecuteCommandRequest=Je={}));var Ye;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(`workspace/applyEdit`)})(Ye||(e.ApplyWorkspaceEditRequest=Ye={}))}}),oai=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=tZ();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}X(n,`createProtocolConnection`),e.createProtocolConnection=n}}),sai=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:X(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,n(tZ(),e),n((YX(),bX(xX)),e),n(nZ(),e),n(aai(),e);var r=oai();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:X(function(){return r.createProtocolConnection},`get`)});var i;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}}),cai=hX({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:X(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var r=Lii();n(Lii(),e),n(sai(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}X(i,`createProtocolConnection`),e.createProtocolConnection=i}}),lai={},gX(lai,{AbstractAstReflection:()=>aZ,AbstractCstNode:()=>Z_i,AbstractLangiumParser:()=>nvi,AbstractParserErrorMessageProvider:()=>ivi,AbstractThreadedAsyncParser:()=>ryi,AstUtils:()=>dZ,BiMap:()=>B0,Cancellation:()=>A0,CompositeCstNodeImpl:()=>E0,ContextCache:()=>H0,CstNodeBuilder:()=>X_i,CstUtils:()=>iZ,DEFAULT_TOKENIZE_OPTIONS:()=>Wvi,DONE_RESULT:()=>cZ,DatatypeSymbol:()=>D0,DefaultAstNodeDescriptionProvider:()=>Ivi,DefaultAstNodeLocator:()=>Rvi,DefaultAsyncParser:()=>nyi,DefaultCommentProvider:()=>tyi,DefaultConfigurationProvider:()=>zvi,DefaultDocumentBuilder:()=>Bvi,DefaultDocumentValidator:()=>Fvi,DefaultHydrator:()=>oyi,DefaultIndexManager:()=>Vvi,DefaultJsonSerializer:()=>Avi,DefaultLangiumDocumentFactory:()=>gvi,DefaultLangiumDocuments:()=>_vi,DefaultLangiumProfiler:()=>_yi,DefaultLexer:()=>Gvi,DefaultLexerErrorMessageProvider:()=>Uvi,DefaultLinker:()=>vvi,DefaultNameProvider:()=>yvi,DefaultReferenceDescriptionProvider:()=>Lvi,DefaultReferences:()=>bvi,DefaultScopeComputation:()=>xvi,DefaultScopeProvider:()=>kvi,DefaultServiceRegistry:()=>jvi,DefaultTokenBuilder:()=>O0,DefaultValueConverter:()=>uvi,DefaultWorkspaceLock:()=>ayi,DefaultWorkspaceManager:()=>Hvi,Deferred:()=>N0,Disposable:()=>K0,DisposableCache:()=>V0,DocumentCache:()=>Dvi,DocumentState:()=>L0,DocumentValidator:()=>U0,EMPTY_SCOPE:()=>Tvi,EMPTY_STREAM:()=>sZ,EmptyFileSystem:()=>J0,EmptyFileSystemProvider:()=>myi,ErrorWithLocation:()=>mQ,GrammarAST:()=>uai,GrammarUtils:()=>pQ,IndentationAwareLexer:()=>fyi,IndentationAwareTokenBuilder:()=>dyi,JSDocDocumentationProvider:()=>eyi,LangiumCompletionParser:()=>ovi,LangiumParser:()=>rvi,LangiumParserErrorMessageProvider:()=>avi,LeafCstNodeImpl:()=>T0,LexingMode:()=>q0,MapScope:()=>Cvi,Module:()=>syi,MultiMap:()=>z0,MultiMapScope:()=>wvi,OperationCancelled:()=>M0,ParserWorker:()=>iyi,ProfilingTask:()=>vyi,Reduction:()=>uZ,RefResolving:()=>R0,RegExpUtils:()=>hQ,RootCstNodeImpl:()=>$_i,SimpleCache:()=>Evi,StreamImpl:()=>oZ,StreamScope:()=>Svi,TextDocument:()=>pvi,TreeStreamImpl:()=>lZ,URI:()=>P0,UriTrie:()=>hvi,UriUtils:()=>I0,VALIDATE_EACH_NODE:()=>Pvi,ValidationCategory:()=>Mvi,ValidationRegistry:()=>Nvi,ValueConverter:()=>k0,WorkspaceCache:()=>Ovi,assertCondition:()=>B1r,assertUnreachable:()=>CJ,createCompletionParser:()=>W9r,createDefaultCoreModule:()=>cX,createDefaultSharedCoreModule:()=>lX,createGrammarConfig:()=>_0r,createLangiumParser:()=>G9r,createParser:()=>UY,delayNextTick:()=>YY,diagnosticData:()=>eX,eagerLoad:()=>yei,getDiagnosticRange:()=>tei,indentationBuilderDefaultOptions:()=>uyi,inject:()=>uX,interruptAndCheck:()=>QY,isAstNode:()=>Fq,isAstNodeDescription:()=>B$r,isAstNodeWithComment:()=>$9r,isCompositeCstNode:()=>zq,isIMultiModeLexerDefinition:()=>rX,isJSDoc:()=>iei,isLeafCstNode:()=>Bq,isLinkingError:()=>Rq,isMultiReference:()=>Lq,isNamed:()=>Q9r,isOperationCancelled:()=>ZY,isReference:()=>Iq,isRootCstNode:()=>Vq,isTokenTypeArray:()=>nX,isTokenTypeDictionary:()=>iX,loadGrammarFromJson:()=>fX,parseJSDoc:()=>rei,prepareLangiumParser:()=>K9r,setInterruptionPeriod:()=>q9r,startCancelableOperation:()=>XY,stream:()=>Uq,toDiagnosticData:()=>nei,toDiagnosticSeverity:()=>tX}),iZ={},gX(iZ,{DefaultNameRegexp:()=>fQ,RangeComparison:()=>dQ,compareRange:()=>O1r,findCommentNode:()=>j1r,findDeclarationNodeAtOffset:()=>A1r,findLeafNodeAtOffset:()=>SJ,findLeafNodeBeforeOffset:()=>M1r,flattenCst:()=>E1r,getDatatypeNode:()=>T1r,getInteriorNodes:()=>L1r,getNextNode:()=>F1r,getPreviousNode:()=>P1r,getStartlineNode:()=>I1r,inRange:()=>k1r,isChildNode:()=>D1r,isCommentNode:()=>xJ,streamCst:()=>vJ,toDocumentSegment:()=>bJ,tokenToRange:()=>yJ}),X(Fq,`isAstNode`),X(Iq,`isReference`),X(Lq,`isMultiReference`),X(B$r,`isAstNodeDescription`),X(Rq,`isLinkingError`),aZ=(Gei=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var t;let n=this.types[e.container.$type];if(!n)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let r=(t=n.properties[e.property])==null?void 0:t.referenceType;if(!r)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Fq(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}},X(Gei,`AbstractAstReflection`),Gei),X(zq,`isCompositeCstNode`),X(Bq,`isLeafCstNode`),X(Vq,`isRootCstNode`),oZ=(gri=Symbol.iterator,Kei=class e{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:X(()=>this.nextFn(e.state),`next`),[Symbol.iterator]:()=>e};return e}[gri](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return cZ})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=V$r(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?cZ:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return cZ})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(Hq(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return cZ})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t){if(Hq(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}}while(e.iterator);return cZ})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?cZ:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return cZ})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}},X(Kei,`StreamImpl`),Kei),X(V$r,`toString`),X(Hq,`isIterable`),sZ=new oZ(()=>void 0,()=>cZ),cZ=Object.freeze({done:!0,value:void 0}),X(Uq,`stream`),lZ=(qei=class extends oZ{constructor(e,t,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return cZ})}iterator(){let e={state:this.startFn(),next:X(()=>this.nextFn(e.state),`next`),prune:X(()=>{e.state.pruned=!0},`prune`),[Symbol.iterator]:()=>e};return e}},X(qei,`TreeStreamImpl`),qei),(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}X(t,`sum`),e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}X(n,`product`),e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}X(r,`min`),e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}X(i,`max`),e.max=i})(uZ||(uZ={})),dZ={},gX(dZ,{assignMandatoryProperties:()=>U$r,copyAstNode:()=>eJ,findRootNode:()=>qq,getContainerOfType:()=>Gq,getDocument:()=>Kq,getReferenceNodes:()=>Jq,hasContainerOfType:()=>H$r,linkContentToContainer:()=>Wq,streamAllContents:()=>Xq,streamAst:()=>Zq,streamContents:()=>Yq,streamReferences:()=>$q}),X(Wq,`linkContentToContainer`),X(Gq,`getContainerOfType`),X(H$r,`hasContainerOfType`),X(Kq,`getDocument`),X(qq,`findRootNode`),X(Jq,`getReferenceNodes`),X(Yq,`streamContents`),X(Xq,`streamAllContents`),X(Zq,`streamAst`),X(Qq,`isAstNodeInRange`),X($q,`streamReferences`),X(U$r,`assignMandatoryProperties`),X(W$r,`copyDefaultValue`),X(eJ,`copyAstNode`),uai={},gX(uai,{AbstractElement:()=>fZ,AbstractParserRule:()=>pZ,AbstractRule:()=>mZ,AbstractType:()=>hZ,Action:()=>gZ,Alternatives:()=>_Z,ArrayLiteral:()=>vZ,ArrayType:()=>yZ,Assignment:()=>bZ,BooleanLiteral:()=>xZ,CharacterRange:()=>SZ,Condition:()=>CZ,Conjunction:()=>wZ,CrossReference:()=>TZ,Disjunction:()=>EZ,EndOfFile:()=>DZ,Grammar:()=>OZ,GrammarImport:()=>kZ,Group:()=>AZ,InferredType:()=>jZ,InfixRule:()=>MZ,InfixRuleOperatorList:()=>NZ,InfixRuleOperators:()=>PZ,Interface:()=>FZ,Keyword:()=>IZ,LangiumGrammarAstReflection:()=>lQ,LangiumGrammarTerminals:()=>dai,NamedArgument:()=>LZ,NegatedToken:()=>RZ,Negation:()=>zZ,NumberLiteral:()=>BZ,Parameter:()=>VZ,ParameterReference:()=>HZ,ParserRule:()=>UZ,ReferenceType:()=>WZ,RegexToken:()=>GZ,ReturnType:()=>KZ,RuleCall:()=>qZ,SimpleType:()=>JZ,StringLiteral:()=>YZ,TerminalAlternatives:()=>XZ,TerminalElement:()=>ZZ,TerminalGroup:()=>QZ,TerminalRule:()=>$Z,TerminalRuleCall:()=>eQ,Type:()=>tQ,TypeAttribute:()=>nQ,TypeDefinition:()=>rQ,UnionType:()=>iQ,UnorderedGroup:()=>aQ,UntilToken:()=>oQ,ValueLiteral:()=>sQ,Wildcard:()=>cQ,isAbstractElement:()=>tJ,isAbstractParserRule:()=>nJ,isAbstractRule:()=>G$r,isAbstractType:()=>K$r,isAction:()=>rJ,isAlternatives:()=>iJ,isArrayLiteral:()=>q$r,isArrayType:()=>J$r,isAssignment:()=>aJ,isBooleanLiteral:()=>Y$r,isCharacterRange:()=>X$r,isCondition:()=>Z$r,isConjunction:()=>Q$r,isCrossReference:()=>oJ,isDisjunction:()=>$$r,isEndOfFile:()=>e1r,isGrammar:()=>t1r,isGrammarImport:()=>n1r,isGroup:()=>sJ,isInferredType:()=>cJ,isInfixRule:()=>lJ,isInfixRuleOperatorList:()=>r1r,isInfixRuleOperators:()=>i1r,isInterface:()=>a1r,isKeyword:()=>uJ,isNamedArgument:()=>o1r,isNegatedToken:()=>s1r,isNegation:()=>c1r,isNumberLiteral:()=>l1r,isParameter:()=>u1r,isParameterReference:()=>d1r,isParserRule:()=>dJ,isReferenceType:()=>f1r,isRegexToken:()=>p1r,isReturnType:()=>m1r,isRuleCall:()=>fJ,isSimpleType:()=>pJ,isStringLiteral:()=>h1r,isTerminalAlternatives:()=>g1r,isTerminalElement:()=>_1r,isTerminalGroup:()=>v1r,isTerminalRule:()=>mJ,isTerminalRuleCall:()=>hJ,isType:()=>gJ,isTypeAttribute:()=>y1r,isTypeDefinition:()=>b1r,isUnionType:()=>x1r,isUnorderedGroup:()=>_J,isUntilToken:()=>S1r,isValueLiteral:()=>C1r,isWildcard:()=>w1r,reflection:()=>uQ}),dai={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},fZ={$type:`AbstractElement`,cardinality:`cardinality`},X(tJ,`isAbstractElement`),pZ={$type:`AbstractParserRule`},X(nJ,`isAbstractParserRule`),mZ={$type:`AbstractRule`},X(G$r,`isAbstractRule`),hZ={$type:`AbstractType`},X(K$r,`isAbstractType`),gZ={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`},X(rJ,`isAction`),_Z={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`},X(iJ,`isAlternatives`),vZ={$type:`ArrayLiteral`,elements:`elements`},X(q$r,`isArrayLiteral`),yZ={$type:`ArrayType`,elementType:`elementType`},X(J$r,`isArrayType`),bZ={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`},X(aJ,`isAssignment`),xZ={$type:`BooleanLiteral`,true:`true`},X(Y$r,`isBooleanLiteral`),SZ={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`},X(X$r,`isCharacterRange`),CZ={$type:`Condition`},X(Z$r,`isCondition`),wZ={$type:`Conjunction`,left:`left`,right:`right`},X(Q$r,`isConjunction`),TZ={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`},X(oJ,`isCrossReference`),EZ={$type:`Disjunction`,left:`left`,right:`right`},X($$r,`isDisjunction`),DZ={$type:`EndOfFile`,cardinality:`cardinality`},X(e1r,`isEndOfFile`),OZ={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`},X(t1r,`isGrammar`),kZ={$type:`GrammarImport`,path:`path`},X(n1r,`isGrammarImport`),AZ={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`},X(sJ,`isGroup`),jZ={$type:`InferredType`,name:`name`},X(cJ,`isInferredType`),MZ={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`},X(lJ,`isInfixRule`),NZ={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`},X(r1r,`isInfixRuleOperatorList`),PZ={$type:`InfixRuleOperators`,precedences:`precedences`},X(i1r,`isInfixRuleOperators`),FZ={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`},X(a1r,`isInterface`),IZ={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`},X(uJ,`isKeyword`),LZ={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`},X(o1r,`isNamedArgument`),RZ={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`},X(s1r,`isNegatedToken`),zZ={$type:`Negation`,value:`value`},X(c1r,`isNegation`),BZ={$type:`NumberLiteral`,value:`value`},X(l1r,`isNumberLiteral`),VZ={$type:`Parameter`,name:`name`},X(u1r,`isParameter`),HZ={$type:`ParameterReference`,parameter:`parameter`},X(d1r,`isParameterReference`),UZ={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`},X(dJ,`isParserRule`),WZ={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`},X(f1r,`isReferenceType`),GZ={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`},X(p1r,`isRegexToken`),KZ={$type:`ReturnType`,name:`name`},X(m1r,`isReturnType`),qZ={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`},X(fJ,`isRuleCall`),JZ={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`},X(pJ,`isSimpleType`),YZ={$type:`StringLiteral`,value:`value`},X(h1r,`isStringLiteral`),XZ={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`},X(g1r,`isTerminalAlternatives`),ZZ={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},X(_1r,`isTerminalElement`),QZ={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`},X(v1r,`isTerminalGroup`),$Z={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`},X(mJ,`isTerminalRule`),eQ={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`},X(hJ,`isTerminalRuleCall`),tQ={$type:`Type`,name:`name`,type:`type`},X(gJ,`isType`),nQ={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`},X(y1r,`isTypeAttribute`),rQ={$type:`TypeDefinition`},X(b1r,`isTypeDefinition`),iQ={$type:`UnionType`,types:`types`},X(x1r,`isUnionType`),aQ={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`},X(_J,`isUnorderedGroup`),oQ={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`},X(S1r,`isUntilToken`),sQ={$type:`ValueLiteral`},X(C1r,`isValueLiteral`),cQ={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},X(w1r,`isWildcard`),lQ=(Jei=class extends aZ{constructor(){super(...arguments),this.types={AbstractElement:{name:fZ.$type,properties:{cardinality:{name:fZ.cardinality}},superTypes:[]},AbstractParserRule:{name:pZ.$type,properties:{},superTypes:[mZ.$type,hZ.$type]},AbstractRule:{name:mZ.$type,properties:{},superTypes:[]},AbstractType:{name:hZ.$type,properties:{},superTypes:[]},Action:{name:gZ.$type,properties:{cardinality:{name:gZ.cardinality},feature:{name:gZ.feature},inferredType:{name:gZ.inferredType},operator:{name:gZ.operator},type:{name:gZ.type,referenceType:hZ.$type}},superTypes:[fZ.$type]},Alternatives:{name:_Z.$type,properties:{cardinality:{name:_Z.cardinality},elements:{name:_Z.elements,defaultValue:[]}},superTypes:[fZ.$type]},ArrayLiteral:{name:vZ.$type,properties:{elements:{name:vZ.elements,defaultValue:[]}},superTypes:[sQ.$type]},ArrayType:{name:yZ.$type,properties:{elementType:{name:yZ.elementType}},superTypes:[rQ.$type]},Assignment:{name:bZ.$type,properties:{cardinality:{name:bZ.cardinality},feature:{name:bZ.feature},operator:{name:bZ.operator},predicate:{name:bZ.predicate},terminal:{name:bZ.terminal}},superTypes:[fZ.$type]},BooleanLiteral:{name:xZ.$type,properties:{true:{name:xZ.true,defaultValue:!1}},superTypes:[CZ.$type,sQ.$type]},CharacterRange:{name:SZ.$type,properties:{cardinality:{name:SZ.cardinality},left:{name:SZ.left},lookahead:{name:SZ.lookahead},parenthesized:{name:SZ.parenthesized,defaultValue:!1},right:{name:SZ.right}},superTypes:[ZZ.$type]},Condition:{name:CZ.$type,properties:{},superTypes:[]},Conjunction:{name:wZ.$type,properties:{left:{name:wZ.left},right:{name:wZ.right}},superTypes:[CZ.$type]},CrossReference:{name:TZ.$type,properties:{cardinality:{name:TZ.cardinality},deprecatedSyntax:{name:TZ.deprecatedSyntax,defaultValue:!1},isMulti:{name:TZ.isMulti,defaultValue:!1},terminal:{name:TZ.terminal},type:{name:TZ.type,referenceType:hZ.$type}},superTypes:[fZ.$type]},Disjunction:{name:EZ.$type,properties:{left:{name:EZ.left},right:{name:EZ.right}},superTypes:[CZ.$type]},EndOfFile:{name:DZ.$type,properties:{cardinality:{name:DZ.cardinality}},superTypes:[fZ.$type]},Grammar:{name:OZ.$type,properties:{imports:{name:OZ.imports,defaultValue:[]},interfaces:{name:OZ.interfaces,defaultValue:[]},isDeclared:{name:OZ.isDeclared,defaultValue:!1},name:{name:OZ.name},rules:{name:OZ.rules,defaultValue:[]},types:{name:OZ.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:kZ.$type,properties:{path:{name:kZ.path}},superTypes:[]},Group:{name:AZ.$type,properties:{cardinality:{name:AZ.cardinality},elements:{name:AZ.elements,defaultValue:[]},guardCondition:{name:AZ.guardCondition},predicate:{name:AZ.predicate}},superTypes:[fZ.$type]},InferredType:{name:jZ.$type,properties:{name:{name:jZ.name}},superTypes:[hZ.$type]},InfixRule:{name:MZ.$type,properties:{call:{name:MZ.call},dataType:{name:MZ.dataType},inferredType:{name:MZ.inferredType},name:{name:MZ.name},operators:{name:MZ.operators},parameters:{name:MZ.parameters,defaultValue:[]},returnType:{name:MZ.returnType,referenceType:hZ.$type}},superTypes:[pZ.$type]},InfixRuleOperatorList:{name:NZ.$type,properties:{associativity:{name:NZ.associativity},operators:{name:NZ.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:PZ.$type,properties:{precedences:{name:PZ.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:FZ.$type,properties:{attributes:{name:FZ.attributes,defaultValue:[]},name:{name:FZ.name},superTypes:{name:FZ.superTypes,defaultValue:[],referenceType:hZ.$type}},superTypes:[hZ.$type]},Keyword:{name:IZ.$type,properties:{cardinality:{name:IZ.cardinality},predicate:{name:IZ.predicate},value:{name:IZ.value}},superTypes:[fZ.$type]},NamedArgument:{name:LZ.$type,properties:{calledByName:{name:LZ.calledByName,defaultValue:!1},parameter:{name:LZ.parameter,referenceType:VZ.$type},value:{name:LZ.value}},superTypes:[]},NegatedToken:{name:RZ.$type,properties:{cardinality:{name:RZ.cardinality},lookahead:{name:RZ.lookahead},parenthesized:{name:RZ.parenthesized,defaultValue:!1},terminal:{name:RZ.terminal}},superTypes:[ZZ.$type]},Negation:{name:zZ.$type,properties:{value:{name:zZ.value}},superTypes:[CZ.$type]},NumberLiteral:{name:BZ.$type,properties:{value:{name:BZ.value}},superTypes:[sQ.$type]},Parameter:{name:VZ.$type,properties:{name:{name:VZ.name}},superTypes:[]},ParameterReference:{name:HZ.$type,properties:{parameter:{name:HZ.parameter,referenceType:VZ.$type}},superTypes:[CZ.$type]},ParserRule:{name:UZ.$type,properties:{dataType:{name:UZ.dataType},definition:{name:UZ.definition},entry:{name:UZ.entry,defaultValue:!1},fragment:{name:UZ.fragment,defaultValue:!1},inferredType:{name:UZ.inferredType},name:{name:UZ.name},parameters:{name:UZ.parameters,defaultValue:[]},returnType:{name:UZ.returnType,referenceType:hZ.$type}},superTypes:[pZ.$type]},ReferenceType:{name:WZ.$type,properties:{isMulti:{name:WZ.isMulti,defaultValue:!1},referenceType:{name:WZ.referenceType}},superTypes:[rQ.$type]},RegexToken:{name:GZ.$type,properties:{cardinality:{name:GZ.cardinality},lookahead:{name:GZ.lookahead},parenthesized:{name:GZ.parenthesized,defaultValue:!1},regex:{name:GZ.regex}},superTypes:[ZZ.$type]},ReturnType:{name:KZ.$type,properties:{name:{name:KZ.name}},superTypes:[]},RuleCall:{name:qZ.$type,properties:{arguments:{name:qZ.arguments,defaultValue:[]},cardinality:{name:qZ.cardinality},predicate:{name:qZ.predicate},rule:{name:qZ.rule,referenceType:mZ.$type}},superTypes:[fZ.$type]},SimpleType:{name:JZ.$type,properties:{primitiveType:{name:JZ.primitiveType},stringType:{name:JZ.stringType},typeRef:{name:JZ.typeRef,referenceType:hZ.$type}},superTypes:[rQ.$type]},StringLiteral:{name:YZ.$type,properties:{value:{name:YZ.value}},superTypes:[sQ.$type]},TerminalAlternatives:{name:XZ.$type,properties:{cardinality:{name:XZ.cardinality},elements:{name:XZ.elements,defaultValue:[]},lookahead:{name:XZ.lookahead},parenthesized:{name:XZ.parenthesized,defaultValue:!1}},superTypes:[ZZ.$type]},TerminalElement:{name:ZZ.$type,properties:{cardinality:{name:ZZ.cardinality},lookahead:{name:ZZ.lookahead},parenthesized:{name:ZZ.parenthesized,defaultValue:!1}},superTypes:[fZ.$type]},TerminalGroup:{name:QZ.$type,properties:{cardinality:{name:QZ.cardinality},elements:{name:QZ.elements,defaultValue:[]},lookahead:{name:QZ.lookahead},parenthesized:{name:QZ.parenthesized,defaultValue:!1}},superTypes:[ZZ.$type]},TerminalRule:{name:$Z.$type,properties:{definition:{name:$Z.definition},fragment:{name:$Z.fragment,defaultValue:!1},hidden:{name:$Z.hidden,defaultValue:!1},name:{name:$Z.name},type:{name:$Z.type}},superTypes:[mZ.$type]},TerminalRuleCall:{name:eQ.$type,properties:{cardinality:{name:eQ.cardinality},lookahead:{name:eQ.lookahead},parenthesized:{name:eQ.parenthesized,defaultValue:!1},rule:{name:eQ.rule,referenceType:$Z.$type}},superTypes:[ZZ.$type]},Type:{name:tQ.$type,properties:{name:{name:tQ.name},type:{name:tQ.type}},superTypes:[hZ.$type]},TypeAttribute:{name:nQ.$type,properties:{defaultValue:{name:nQ.defaultValue},isOptional:{name:nQ.isOptional,defaultValue:!1},name:{name:nQ.name},type:{name:nQ.type}},superTypes:[]},TypeDefinition:{name:rQ.$type,properties:{},superTypes:[]},UnionType:{name:iQ.$type,properties:{types:{name:iQ.types,defaultValue:[]}},superTypes:[rQ.$type]},UnorderedGroup:{name:aQ.$type,properties:{cardinality:{name:aQ.cardinality},elements:{name:aQ.elements,defaultValue:[]}},superTypes:[fZ.$type]},UntilToken:{name:oQ.$type,properties:{cardinality:{name:oQ.cardinality},lookahead:{name:oQ.lookahead},parenthesized:{name:oQ.parenthesized,defaultValue:!1},terminal:{name:oQ.terminal}},superTypes:[ZZ.$type]},ValueLiteral:{name:sQ.$type,properties:{},superTypes:[]},Wildcard:{name:cQ.$type,properties:{cardinality:{name:cQ.cardinality},lookahead:{name:cQ.lookahead},parenthesized:{name:cQ.parenthesized,defaultValue:!1}},superTypes:[ZZ.$type]}}}},X(Jei,`LangiumGrammarAstReflection`),Jei),uQ=new lQ,X(T1r,`getDatatypeNode`),X(vJ,`streamCst`),X(E1r,`flattenCst`),X(D1r,`isChildNode`),X(yJ,`tokenToRange`),X(bJ,`toDocumentSegment`),(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(dQ||(dQ={})),X(O1r,`compareRange`),X(k1r,`inRange`),fQ=/^[\w\p{L}]$/u,X(A1r,`findDeclarationNodeAtOffset`),X(j1r,`findCommentNode`),X(xJ,`isCommentNode`),X(SJ,`findLeafNodeAtOffset`),X(M1r,`findLeafNodeBeforeOffset`),X(N1r,`binarySearch`),X(P1r,`getPreviousNode`),X(F1r,`getNextNode`),X(I1r,`getStartlineNode`),X(L1r,`getInteriorNodes`),X(R1r,`getCommonParent`),X(z1r,`getParentChain`),pQ={},gX(pQ,{findAssignment:()=>t0r,findNameAssignment:()=>FJ,findNodeForKeyword:()=>e0r,findNodeForProperty:()=>MJ,findNodesForKeyword:()=>$1r,findNodesForKeywordInternal:()=>PJ,findNodesForProperty:()=>Q1r,getActionAtElement:()=>r0r,getActionType:()=>l0r,getAllReachableRules:()=>jJ,getAllRulesUsedForCrossReferences:()=>Y1r,getCrossReferenceTerminal:()=>X1r,getEntryRule:()=>K1r,getExplicitRuleType:()=>RJ,getHiddenRules:()=>q1r,getRuleType:()=>d0r,getRuleTypeName:()=>u0r,getTypeName:()=>zJ,isArrayCardinality:()=>a0r,isArrayOperator:()=>o0r,isCommentTerminal:()=>Z1r,isDataType:()=>c0r,isDataTypeRule:()=>IJ,isOptionalCardinality:()=>i0r,terminalRegex:()=>BJ}),mQ=(Yei=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}},X(Yei,`ErrorWithLocation`),Yei),X(CJ,`assertUnreachable`),X(B1r,`assertCondition`),hQ={},gX(hQ,{NEWLINE_REGEXP:()=>gai,escapeRegExp:()=>AJ,getTerminalParts:()=>H1r,isMultilineComment:()=>U1r,isWhitespace:()=>kJ,partialMatches:()=>W1r,partialRegExp:()=>G1r,whitespaceCharacters:()=>vai}),X(wJ,`cc`),X(TJ,`insertToSet`),X(EJ,`addFlag`),X(DJ,`ASSERT_EXISTS`),X(OJ,`ASSERT_NEVER_REACH_HERE`),X(V1r,`isCharacter`),gQ=[];for(let e=wJ(`0`);e<=wJ(`9`);e++)gQ.push(e);_Q=[wJ(`_`)].concat(gQ);for(let e=wJ(`a`);e<=wJ(`z`);e++)_Q.push(e);for(let e=wJ(`A`);e<=wJ(`Z`);e++)_Q.push(e);fai=[wJ(` `),wJ(`\f`),wJ(` `),wJ(`\r`),wJ(` `),wJ(`\v`),wJ(` `),wJ(`\xA0`),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(` `),wJ(`\u2028`),wJ(`\u2029`),wJ(` `),wJ(` `),wJ(` `),wJ(``)],pai=/[0-9a-fA-F]/,vQ=/[0-9]/,mai=/[1-9]/,hai=(Xei=class{constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:EJ(n,`global`);break;case`i`:EJ(n,`ignoreCase`);break;case`m`:EJ(n,`multiLine`);break;case`u`:EJ(n,`unicode`);break;case`y`:EJ(n,`sticky`)}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}}DJ(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return OJ()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`)}if(e===!0&&t===void 0)return;DJ(t)}if((e!==!0||t!==void 0)&&DJ(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group()}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),DJ(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):OJ()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[wJ(` `),wJ(`\r`),wJ(`\u2028`),wJ(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=gQ;break;case`D`:e=gQ,t=!0;break;case`s`:e=fai;break;case`S`:e=fai,t=!0;break;case`w`:e=_Q;break;case`W`:e=_Q,t=!0}return DJ(e)?{type:`Set`,value:e,complement:t}:OJ()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=wJ(`\f`);break;case`n`:e=wJ(` `);break;case`r`:e=wJ(`\r`);break;case`t`:e=wJ(` `);break;case`v`:e=wJ(`\v`)}return DJ(e)?{type:`Character`,value:e}:OJ()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:wJ(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:wJ(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` `:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:wJ(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){let t=this.classAtom();if(t.type,V1r(t)&&this.isRangeDash()){this.consumeChar(`-`);let n=this.classAtom();if(n.type,V1r(n)){if(n.value=this.input.length)throw Error(`Unexpected end of input`);this.idx++}loc(e){return{begin:e,end:this.idx}}},X(Xei,`RegExpParser`),Xei),yQ=(Zei=class{visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this):this.visit(n))}}visit(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Lookbehind`:this.visitLookbehind(e);break;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},X(Zei,`BaseRegExpVisitor`),Zei),gai=/\r?\n/gm,_ai=new hai,bQ=new(Qei=class extends yQ{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join(``)}reset(e){this.multiline=!1,this.regex=e,this.startRegexp=``,this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===` `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let e=AJ(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=!!` `.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type===`Group`&&e.quantifier||super.visitChildren(e)}},X(Qei,`TerminalRegExpVisitor`),Qei),X(H1r,`getTerminalParts`),X(U1r,`isMultilineComment`),vai=`\f \r \v \xA0            \u2028\u2029   `.split(``),X(kJ,`isWhitespace`),X(AJ,`escapeRegExp`),X(W1r,`partialMatches`),X(G1r,`partialRegExp`),X(K1r,`getEntryRule`),X(q1r,`getHiddenRules`),X(jJ,`getAllReachableRules`),X(J1r,`ruleDfs`),X(Y1r,`getAllRulesUsedForCrossReferences`),X(X1r,`getCrossReferenceTerminal`),X(Z1r,`isCommentTerminal`),X(Q1r,`findNodesForProperty`),X(MJ,`findNodeForProperty`),X(NJ,`findNodesForPropertyInternal`),X($1r,`findNodesForKeyword`),X(e0r,`findNodeForKeyword`),X(PJ,`findNodesForKeywordInternal`),X(t0r,`findAssignment`),X(FJ,`findNameAssignment`),X(n0r,`findNameAssignmentInternal`),X(r0r,`getActionAtElement`),X(i0r,`isOptionalCardinality`),X(a0r,`isArrayCardinality`),X(o0r,`isArrayOperator`),X(IJ,`isDataTypeRule`),X(s0r,`isDataTypeRuleInternal`),X(c0r,`isDataType`),X(LJ,`isDataTypeInternal`),X(RJ,`getExplicitRuleType`),X(zJ,`getTypeName`),X(l0r,`getActionType`),X(u0r,`getRuleTypeName`),X(d0r,`getRuleType`),X(BJ,`terminalRegex`),xQ=`[\\s\\S]`,X(VJ,`abstractElementToRegex`),X(f0r,`terminalAlternativesToRegex`),X(p0r,`terminalGroupToRegex`),X(m0r,`untilTokenToRegex`),X(h0r,`negateTokenToRegex`),X(g0r,`characterRangeToRegex`),X(HJ,`keywordToRegex`),X(UJ,`withCardinality`),X(_0r,`createGrammarConfig`),yai=typeof global==`object`&&global&&global.Object===Object&&global,bai=typeof self==`object`&&self&&self.Object===Object&&self,SQ=yai||bai||Function(`return this`)(),CQ=SQ.Symbol,xai=Object.prototype,Sai=xai.hasOwnProperty,Cai=xai.toString,wQ=CQ?CQ.toStringTag:void 0,X(v0r,`getRawTag`),wai=v0r,Tai=Object.prototype.toString,X(y0r,`objectToString`),Eai=y0r,Dai=`[object Null]`,Oai=`[object Undefined]`,kai=CQ?CQ.toStringTag:void 0,X(b0r,`baseGetTag`),TQ=b0r,X(x0r,`isObjectLike`),EQ=x0r,Aai=`[object Symbol]`,X(S0r,`isSymbol`),DQ=S0r,X(C0r,`arrayMap`),OQ=C0r,kQ=Array.isArray,jai=1/0,Mai=CQ?CQ.prototype:void 0,Nai=Mai?Mai.toString:void 0,X(w0r,`baseToString`),Pai=w0r,Fai=/\s/,X(T0r,`trimmedEndIndex`),Iai=T0r,Lai=/^\s+/,X(E0r,`baseTrim`),Rai=E0r,X(D0r,`isObject`),AQ=D0r,zai=NaN,Bai=/^[-+]0x[0-9a-f]+$/i,Vai=/^0b[01]+$/i,Hai=/^0o[0-7]+$/i,Uai=parseInt,X(O0r,`toNumber`),Wai=O0r,Gai=1/0,Kai=17976931348623157e292,X(k0r,`toFinite`),qai=k0r,X(A0r,`toInteger`),jQ=A0r,X(j0r,`identity`),MQ=j0r,Jai=`[object AsyncFunction]`,Yai=`[object Function]`,Xai=`[object GeneratorFunction]`,Zai=`[object Proxy]`,X(M0r,`isFunction`),NQ=M0r,PQ=SQ[`__core-js_shared__`],Qai=(function(){var e=/[^.]+$/.exec(PQ&&PQ.keys&&PQ.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``})(),X(N0r,`isMasked`),$ai=N0r,eoi=Function.prototype.toString,X(P0r,`toSource`),FQ=P0r,toi=/[\\^$.*+?()[\]{}|]/g,noi=/^\[object .+?Constructor\]$/,roi=Function.prototype,ioi=Object.prototype,aoi=roi.toString,ooi=ioi.hasOwnProperty,soi=RegExp(`^`+aoi.call(ooi).replace(toi,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),X(F0r,`baseIsNative`),coi=F0r,X(I0r,`getValue`),loi=I0r,X(L0r,`getNative`),IQ=L0r,LQ=IQ(SQ,`WeakMap`),uoi=Object.create,doi=(function(){function e(){}return X(e,`object`),function(t){if(!AQ(t))return{};if(uoi)return uoi(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})(),X(R0r,`apply`),foi=R0r,X(z0r,`noop`),RQ=z0r,X(B0r,`copyArray`),poi=B0r,moi=800,hoi=16,goi=Date.now,X(V0r,`shortOut`),_oi=V0r,X(H0r,`constant`),voi=H0r,zQ=(function(){try{var e=IQ(Object,`defineProperty`);return e({},``,{}),e}catch{}})(),yoi=_oi(zQ?function(e,t){return zQ(e,`toString`,{configurable:!0,enumerable:!1,value:voi(t),writable:!0})}:MQ),X(U0r,`arrayEach`),boi=U0r,X(W0r,`baseFindIndex`),xoi=W0r,X(G0r,`baseIsNaN`),Soi=G0r,X(K0r,`strictIndexOf`),Coi=K0r,X(q0r,`baseIndexOf`),BQ=q0r,X(J0r,`arrayIncludes`),woi=J0r,Toi=9007199254740991,Eoi=/^(?:0|[1-9]\d*)$/,X(Y0r,`isIndex`),VQ=Y0r,X(X0r,`baseAssignValue`),HQ=X0r,X(Z0r,`eq`),UQ=Z0r,Doi=Object.prototype.hasOwnProperty,X(Q0r,`assignValue`),WQ=Q0r,X($0r,`copyObject`),GQ=$0r,Ooi=Math.max,X(e2r,`overRest`),koi=e2r,X(t2r,`baseRest`),KQ=t2r,Aoi=9007199254740991,X(n2r,`isLength`),qQ=n2r,X(r2r,`isArrayLike`),JQ=r2r,X(i2r,`isIterateeCall`),YQ=i2r,X(a2r,`createAssigner`),joi=a2r,Moi=Object.prototype,X(o2r,`isPrototype`),XQ=o2r,X(s2r,`baseTimes`),Noi=s2r,Poi=`[object Arguments]`,X(c2r,`baseIsArguments`),Foi=c2r,Ioi=Object.prototype,Loi=Ioi.hasOwnProperty,Roi=Ioi.propertyIsEnumerable,ZQ=Foi((function(){return arguments})())?Foi:function(e){return EQ(e)&&Loi.call(e,`callee`)&&!Roi.call(e,`callee`)},X(l2r,`stubFalse`),zoi=l2r,Boi=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Voi=Boi&&typeof module==`object`&&module&&!module.nodeType&&module,Hoi=Voi&&Voi.exports===Boi?SQ.Buffer:void 0,QQ=(Hoi?Hoi.isBuffer:void 0)||zoi,Uoi=`[object Arguments]`,Woi=`[object Array]`,Goi=`[object Boolean]`,Koi=`[object Date]`,qoi=`[object Error]`,Joi=`[object Function]`,Yoi=`[object Map]`,Xoi=`[object Number]`,Zoi=`[object Object]`,Qoi=`[object RegExp]`,$oi=`[object Set]`,esi=`[object String]`,tsi=`[object WeakMap]`,nsi=`[object ArrayBuffer]`,rsi=`[object DataView]`,isi=`[object Float32Array]`,asi=`[object Float64Array]`,osi=`[object Int8Array]`,ssi=`[object Int16Array]`,csi=`[object Int32Array]`,lsi=`[object Uint8Array]`,usi=`[object Uint8ClampedArray]`,dsi=`[object Uint16Array]`,fsi=`[object Uint32Array]`,$Q={},$Q[isi]=$Q[asi]=$Q[osi]=$Q[ssi]=$Q[csi]=$Q[lsi]=$Q[usi]=$Q[dsi]=$Q[fsi]=!0,$Q[Uoi]=$Q[Woi]=$Q[nsi]=$Q[Goi]=$Q[rsi]=$Q[Koi]=$Q[qoi]=$Q[Joi]=$Q[Yoi]=$Q[Xoi]=$Q[Zoi]=$Q[Qoi]=$Q[$oi]=$Q[esi]=$Q[tsi]=!1,X(u2r,`baseIsTypedArray`),psi=u2r,X(d2r,`baseUnary`),e$=d2r,msi=typeof exports==`object`&&exports&&!exports.nodeType&&exports,t$=msi&&typeof module==`object`&&module&&!module.nodeType&&module,n$=t$&&t$.exports===msi&&yai.process,r$=(function(){try{return t$&&t$.require&&t$.require(`util`).types||n$&&n$.binding&&n$.binding(`util`)}catch{}})(),hsi=r$&&r$.isTypedArray,i$=hsi?e$(hsi):psi,gsi=Object.prototype.hasOwnProperty,X(f2r,`arrayLikeKeys`),_si=f2r,X(p2r,`overArg`),vsi=p2r,ysi=vsi(Object.keys,Object),bsi=Object.prototype.hasOwnProperty,X(m2r,`baseKeys`),xsi=m2r,X(h2r,`keys`),a$=h2r,Ssi=Object.prototype.hasOwnProperty,o$=joi(function(e,t){if(XQ(t)||JQ(t))GQ(t,a$(t),e);else for(var n in t)Ssi.call(t,n)&&WQ(e,n,t[n])}),X(g2r,`nativeKeysIn`),Csi=g2r,wsi=Object.prototype.hasOwnProperty,X(_2r,`baseKeysIn`),Tsi=_2r,X(v2r,`keysIn`),s$=v2r,Esi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dsi=/^\w*$/,X(y2r,`isKey`),c$=y2r,l$=IQ(Object,`create`),X(b2r,`hashClear`),Osi=b2r,X(x2r,`hashDelete`),ksi=x2r,Asi=`__lodash_hash_undefined__`,jsi=Object.prototype.hasOwnProperty,X(S2r,`hashGet`),Msi=S2r,Nsi=Object.prototype.hasOwnProperty,X(C2r,`hashHas`),Psi=C2r,Fsi=`__lodash_hash_undefined__`,X(w2r,`hashSet`),Isi=w2r,X(WJ,`Hash`),WJ.prototype.clear=Osi,WJ.prototype.delete=ksi,WJ.prototype.get=Msi,WJ.prototype.has=Psi,WJ.prototype.set=Isi,Lsi=WJ,X(T2r,`listCacheClear`),Rsi=T2r,X(E2r,`assocIndexOf`),u$=E2r,zsi=Array.prototype.splice,X(D2r,`listCacheDelete`),Bsi=D2r,X(O2r,`listCacheGet`),Vsi=O2r,X(k2r,`listCacheHas`),Hsi=k2r,X(A2r,`listCacheSet`),Usi=A2r,X(GJ,`ListCache`),GJ.prototype.clear=Rsi,GJ.prototype.delete=Bsi,GJ.prototype.get=Vsi,GJ.prototype.has=Hsi,GJ.prototype.set=Usi,d$=GJ,f$=IQ(SQ,`Map`),X(j2r,`mapCacheClear`),Wsi=j2r,X(M2r,`isKeyable`),Gsi=M2r,X(N2r,`getMapData`),p$=N2r,X(P2r,`mapCacheDelete`),Ksi=P2r,X(F2r,`mapCacheGet`),qsi=F2r,X(I2r,`mapCacheHas`),Jsi=I2r,X(L2r,`mapCacheSet`),Ysi=L2r,X(KJ,`MapCache`),KJ.prototype.clear=Wsi,KJ.prototype.delete=Ksi,KJ.prototype.get=qsi,KJ.prototype.has=Jsi,KJ.prototype.set=Ysi,m$=KJ,Xsi=`Expected a function`,X(qJ,`memoize`),qJ.Cache=m$,Zsi=qJ,Qsi=500,X(R2r,`memoizeCapped`),$si=R2r,eci=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tci=/\\(\\)?/g,nci=$si(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(eci,function(e,n,r,i){t.push(r?i.replace(tci,`$1`):n||e)}),t}),X(z2r,`toString`),rci=z2r,X(B2r,`castPath`),h$=B2r,ici=1/0,X(V2r,`toKey`),g$=V2r,X(H2r,`baseGet`),_$=H2r,X(U2r,`get`),aci=U2r,X(W2r,`arrayPush`),v$=W2r,oci=CQ?CQ.isConcatSpreadable:void 0,X(G2r,`isFlattenable`),sci=G2r,X(K2r,`baseFlatten`),y$=K2r,X(q2r,`flatten`),b$=q2r,cci=vsi(Object.getPrototypeOf,Object),X(J2r,`baseSlice`),lci=J2r,X(Y2r,`arrayReduce`),uci=Y2r,X(X2r,`stackClear`),dci=X2r,X(Z2r,`stackDelete`),fci=Z2r,X(Q2r,`stackGet`),pci=Q2r,X($2r,`stackHas`),mci=$2r,hci=200,X(e4r,`stackSet`),gci=e4r,X(JJ,`Stack`),JJ.prototype.clear=dci,JJ.prototype.delete=fci,JJ.prototype.get=pci,JJ.prototype.has=mci,JJ.prototype.set=gci,x$=JJ,X(t4r,`baseAssign`),_ci=t4r,X(n4r,`baseAssignIn`),vci=n4r,yci=typeof exports==`object`&&exports&&!exports.nodeType&&exports,bci=yci&&typeof module==`object`&&module&&!module.nodeType&&module,xci=bci&&bci.exports===yci?SQ.Buffer:void 0,Sci=xci?xci.allocUnsafe:void 0,X(r4r,`cloneBuffer`),Cci=r4r,X(i4r,`arrayFilter`),S$=i4r,X(a4r,`stubArray`),wci=a4r,Tci=Object.prototype.propertyIsEnumerable,Eci=Object.getOwnPropertySymbols,C$=Eci?function(e){return e==null?[]:(e=Object(e),S$(Eci(e),function(t){return Tci.call(e,t)}))}:wci,X(o4r,`copySymbols`),Dci=o4r,Oci=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)v$(t,C$(e)),e=cci(e);return t}:wci,X(s4r,`copySymbolsIn`),kci=s4r,X(c4r,`baseGetAllKeys`),Aci=c4r,X(l4r,`getAllKeys`),w$=l4r,X(u4r,`getAllKeysIn`),jci=u4r,T$=IQ(SQ,`DataView`),E$=IQ(SQ,`Promise`),D$=IQ(SQ,`Set`),Mci=`[object Map]`,Nci=`[object Object]`,Pci=`[object Promise]`,Fci=`[object Set]`,Ici=`[object WeakMap]`,Lci=`[object DataView]`,Rci=FQ(T$),zci=FQ(f$),Bci=FQ(E$),Vci=FQ(D$),Hci=FQ(LQ),O$=TQ,(T$&&O$(new T$(new ArrayBuffer(1)))!=Lci||f$&&O$(new f$)!=Mci||E$&&O$(E$.resolve())!=Pci||D$&&O$(new D$)!=Fci||LQ&&O$(new LQ)!=Ici)&&(O$=X(function(e){var t=TQ(e),n=t==Nci?e.constructor:void 0,r=n?FQ(n):``;if(r)switch(r){case Rci:return Lci;case zci:return Mci;case Bci:return Pci;case Vci:return Fci;case Hci:return Ici}return t},`getTag`)),k$=O$,Uci=Object.prototype.hasOwnProperty,X(d4r,`initCloneArray`),Wci=d4r,A$=SQ.Uint8Array,X(f4r,`cloneArrayBuffer`),j$=f4r,X(p4r,`cloneDataView`),Gci=p4r,Kci=/\w*$/,X(m4r,`cloneRegExp`),qci=m4r,Jci=CQ?CQ.prototype:void 0,Yci=Jci?Jci.valueOf:void 0,X(h4r,`cloneSymbol`),Xci=h4r,X(g4r,`cloneTypedArray`),Zci=g4r,Qci=`[object Boolean]`,$ci=`[object Date]`,eli=`[object Map]`,tli=`[object Number]`,nli=`[object RegExp]`,rli=`[object Set]`,ili=`[object String]`,ali=`[object Symbol]`,oli=`[object ArrayBuffer]`,sli=`[object DataView]`,cli=`[object Float32Array]`,lli=`[object Float64Array]`,uli=`[object Int8Array]`,dli=`[object Int16Array]`,fli=`[object Int32Array]`,pli=`[object Uint8Array]`,mli=`[object Uint8ClampedArray]`,hli=`[object Uint16Array]`,gli=`[object Uint32Array]`,X(_4r,`initCloneByTag`),_li=_4r,X(v4r,`initCloneObject`),vli=v4r,yli=`[object Map]`,X(y4r,`baseIsMap`),bli=y4r,xli=r$&&r$.isMap,Sli=xli?e$(xli):bli,Cli=`[object Set]`,X(b4r,`baseIsSet`),wli=b4r,Tli=r$&&r$.isSet,Eli=Tli?e$(Tli):wli,Dli=1,Oli=2,kli=4,Ali=`[object Arguments]`,jli=`[object Array]`,Mli=`[object Boolean]`,Nli=`[object Date]`,Pli=`[object Error]`,Fli=`[object Function]`,Ili=`[object GeneratorFunction]`,Lli=`[object Map]`,Rli=`[object Number]`,zli=`[object Object]`,Bli=`[object RegExp]`,Vli=`[object Set]`,Hli=`[object String]`,Uli=`[object Symbol]`,Wli=`[object WeakMap]`,Gli=`[object ArrayBuffer]`,Kli=`[object DataView]`,qli=`[object Float32Array]`,Jli=`[object Float64Array]`,Yli=`[object Int8Array]`,Xli=`[object Int16Array]`,Zli=`[object Int32Array]`,Qli=`[object Uint8Array]`,$li=`[object Uint8ClampedArray]`,eui=`[object Uint16Array]`,tui=`[object Uint32Array]`,M$={},M$[Ali]=M$[jli]=M$[Gli]=M$[Kli]=M$[Mli]=M$[Nli]=M$[qli]=M$[Jli]=M$[Yli]=M$[Xli]=M$[Zli]=M$[Lli]=M$[Rli]=M$[zli]=M$[Bli]=M$[Vli]=M$[Hli]=M$[Uli]=M$[Qli]=M$[$li]=M$[eui]=M$[tui]=!0,M$[Pli]=M$[Fli]=M$[Wli]=!1,X(YJ,`baseClone`),nui=YJ,rui=4,X(x4r,`clone`),N$=x4r,X(S4r,`compact`),P$=S4r,iui=`__lodash_hash_undefined__`,X(C4r,`setCacheAdd`),aui=C4r,X(w4r,`setCacheHas`),oui=w4r,X(XJ,`SetCache`),XJ.prototype.add=XJ.prototype.push=aui,XJ.prototype.has=oui,F$=XJ,X(T4r,`arraySome`),sui=T4r,X(E4r,`cacheHas`),I$=E4r,cui=1,lui=2,X(D4r,`equalArrays`),uui=D4r,X(O4r,`mapToArray`),dui=O4r,X(k4r,`setToArray`),L$=k4r,fui=1,pui=2,mui=`[object Boolean]`,hui=`[object Date]`,gui=`[object Error]`,_ui=`[object Map]`,vui=`[object Number]`,yui=`[object RegExp]`,bui=`[object Set]`,xui=`[object String]`,Sui=`[object Symbol]`,Cui=`[object ArrayBuffer]`,wui=`[object DataView]`,Tui=CQ?CQ.prototype:void 0,R$=Tui?Tui.valueOf:void 0,X(A4r,`equalByTag`),Eui=A4r,Dui=1,Oui=Object.prototype.hasOwnProperty,X(j4r,`equalObjects`),kui=j4r,Aui=1,jui=`[object Arguments]`,Mui=`[object Array]`,z$=`[object Object]`,Nui=Object.prototype.hasOwnProperty,X(M4r,`baseIsEqualDeep`),Pui=M4r,X(N4r,`baseIsEqual`),Fui=N4r,Iui=1,Lui=2,X(P4r,`baseIsMatch`),Rui=P4r,X(F4r,`isStrictComparable`),zui=F4r,X(I4r,`getMatchData`),Bui=I4r,X(L4r,`matchesStrictComparable`),Vui=L4r,X(R4r,`baseMatches`),Hui=R4r,X(z4r,`baseHasIn`),Uui=z4r,X(B4r,`hasPath`),Wui=B4r,X(V4r,`hasIn`),Gui=V4r,Kui=1,qui=2,X(H4r,`baseMatchesProperty`),Jui=H4r,X(U4r,`baseProperty`),Yui=U4r,X(W4r,`basePropertyDeep`),Xui=W4r,X(G4r,`property`),Zui=G4r,X(K4r,`baseIteratee`),B$=K4r,X(q4r,`arrayAggregator`),Qui=q4r,X(J4r,`createBaseFor`),$ui=J4r(),X(Y4r,`baseForOwn`),edi=Y4r,X(X4r,`createBaseEach`),V$=X4r(edi),X(Z4r,`baseAggregator`),tdi=Z4r,X(Q4r,`createAggregator`),ndi=Q4r,rdi=Object.prototype,idi=rdi.hasOwnProperty,H$=KQ(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&YQ(t[0],t[1],i)&&(r=1);++n{t.accept(e)})}},X($ei,`AbstractProduction`),$ei),f1=(eti=class extends d1{constructor(e){super([]),this.idx=1,o$(this,s1(e,e=>e!==void 0))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},X(eti,`NonTerminal`),eti),p1=(tti=class extends d1{constructor(e){super(e.definition),this.orgText=``,o$(this,s1(e,e=>e!==void 0))}},X(tti,`Rule`),tti),m1=(nti=class extends d1{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,o$(this,s1(e,e=>e!==void 0))}},X(nti,`Alternative`),nti),h1=(rti=class extends d1{constructor(e){super(e.definition),this.idx=1,o$(this,s1(e,e=>e!==void 0))}},X(rti,`Option`),rti),g1=(iti=class extends d1{constructor(e){super(e.definition),this.idx=1,o$(this,s1(e,e=>e!==void 0))}},X(iti,`RepetitionMandatory`),iti),_1=(ati=class extends d1{constructor(e){super(e.definition),this.idx=1,o$(this,s1(e,e=>e!==void 0))}},X(ati,`RepetitionMandatoryWithSeparator`),ati),v1=(oti=class extends d1{constructor(e){super(e.definition),this.idx=1,o$(this,s1(e,e=>e!==void 0))}},X(oti,`Repetition`),oti),y1=(sti=class extends d1{constructor(e){super(e.definition),this.idx=1,o$(this,s1(e,e=>e!==void 0))}},X(sti,`RepetitionWithSeparator`),sti),b1=(cti=class extends d1{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,o$(this,s1(e,e=>e!==void 0))}},X(cti,`Alternation`),cti),x1=(lti=class{constructor(e){this.idx=1,o$(this,s1(e,e=>e!==void 0))}accept(e){e.visit(this)}},X(lti,`Terminal`),lti),X(W3r,`serializeGrammar`),X(QJ,`serializeProduction`),S1=(uti=class{visit(e){let t=e;switch(t.constructor){case f1:return this.visitNonTerminal(t);case m1:return this.visitAlternative(t);case h1:return this.visitOption(t);case g1:return this.visitRepetitionMandatory(t);case _1:return this.visitRepetitionMandatoryWithSeparator(t);case y1:return this.visitRepetitionWithSeparator(t);case v1:return this.visitRepetition(t);case b1:return this.visitAlternation(t);case x1:return this.visitTerminal(t);case p1:return this.visitRule(t);default:throw Error(`non exhaustive match`)}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}},X(uti,`GAstVisitor`),uti),X(G3r,`isSequenceProd`),X($J,`isOptionalProd`),X(K3r,`isBranchingProd`),X(eY,`getProductionDslName`),C1=(dti=class{walk(e,t=[]){q$(e.definition,(n,r)=>{let i=G$(e.definition,r+1);if(n instanceof f1)this.walkProdRef(n,i,t);else if(n instanceof x1)this.walkTerminal(n,i,t);else if(n instanceof m1)this.walkFlat(n,i,t);else if(n instanceof h1)this.walkOption(n,i,t);else if(n instanceof g1)this.walkAtLeastOne(n,i,t);else if(n instanceof _1)this.walkAtLeastOneSep(n,i,t);else if(n instanceof y1)this.walkManySep(n,i,t);else if(n instanceof v1)this.walkMany(n,i,t);else if(n instanceof b1)this.walkOr(n,i,t);else throw Error(`non exhaustive match`)})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new h1({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=q3r(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new h1({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=q3r(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);q$(e.definition,e=>{let t=new m1({definition:[e]});this.walk(t,r)})}},X(dti,`RestWalker`),dti),X(q3r,`restForRepetitionWithSeparator`),X(tY,`first`),X(J3r,`firstForSequence`),X(Y3r,`firstForBranching`),X(X3r,`firstForTerminal`),Vdi=`_~IN~_`,Hdi=(fti=class extends C1{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=Q3r(e.referencedRule,e.idx)+this.topProd.name,i=tY(new m1({definition:t.concat(n)}));this.follows[r]=i}},X(fti,`ResyncFollowsWalker`),fti),X(Z3r,`computeAllProdsFollows`),X(Q3r,`buildBetweenProdsFollowPrefix`),w1={},Udi=new hai,X(nY,`getRegExpAst`),X($3r,`clearRegExpParserCache`),Wdi=`Complement Sets are not supported for first char optimization`,T1=`Unable to use "first char" lexer optimizations: `,X(e6r,`getOptimizedStartCodesIndices`),X(rY,`firstCharOptimizedIndices`),X(iY,`addOptimizedIdxToResult`),X(t6r,`handleIgnoreCase`),X(n6r,`findCode`),X(aY,`isWholeOptional`),Gdi=(pti=class extends yQ{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case`Lookahead`:this.visitLookahead(e);return;case`NegativeLookahead`:this.visitNegativeLookahead(e);return;case`Lookbehind`:this.visitLookbehind(e);return;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){r1(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?n6r(e,this.targetCharCodes)===void 0&&(this.found=!0):n6r(e,this.targetCharCodes)!==void 0&&(this.found=!0)}},X(pti,`CharCodeFinder`),pti),X(oY,`canMatchCharCode`),E1=`PATTERN`,D1=`defaultMode`,O1=`modes`,X(r6r,`analyzeTokenTypes`),X(i6r,`validatePatterns`),X(a6r,`validateRegExpPattern`),X(o6r,`findMissingPatterns`),X(s6r,`findInvalidPatterns`),Kdi=/[^\\][$]/,X(c6r,`findEndOfInputAnchor`),X(l6r,`findEmptyMatchRegExps`),qdi=/[^\\[][\^]|^\^/,X(u6r,`findStartOfInputAnchor`),X(d6r,`findUnsupportedFlags`),X(f6r,`findDuplicatePatterns`),X(p6r,`findInvalidGroupType`),X(m6r,`findModesThatDoNotExist`),X(h6r,`findUnreachablePatterns`),X(g6r,`tryToMatchStrToPattern`),X(_6r,`noMetaChar`),X(v6r,`usesLookAheadOrBehind`),X(y6r,`addStickyFlag`),X(b6r,`performRuntimeChecks`),X(x6r,`performWarningRuntimeChecks`),X(S6r,`cloneEmptyGroups`),X(C6r,`isCustomPattern`),X(w6r,`isShortPattern`),Jdi={test:X(function(e){let t=e.length;for(let n=this.lastIndex;n${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`}},(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`,e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=`MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE`})(j1||(j1={})),M1={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` `,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Zdi,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(M1),N1=(mti=class{constructor(e,t=M1){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent <${e}>`);let{time:r,value:i}=B3r(t),a=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},typeof t==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. a boolean 2nd argument is no longer supported`);this.config=o$({},M1,t);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n==`number`&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,()=>{let n,r=!0;this.TRACE_INIT(`Lexer Config handling`,()=>{if(this.config.lineTerminatorsPattern===M1.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Jdi;else if(this.config.lineTerminatorCharacters===M1.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),kQ(e)?n={modes:{defaultMode:N$(e)},defaultMode:D1}:(r=!1,n=N$(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT(`performRuntimeChecks`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(b6r(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(`performWarningRuntimeChecks`,()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(x6r(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},q$(n.modes,(e,t)=>{n.modes[t]=l1(e,e=>o1(e))});let i=a$(n.modes);if(q$(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),this.config.skipValidations===!1&&this.TRACE_INIT(`validatePatterns`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(i6r(e,i))}),i1(this.lexerDefinitionErrors)){dY(e);let r;this.TRACE_INIT(`analyzeTokenTypes`,()=>{r=r6r(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=o$({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,!i1(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let e=Q$(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- `);throw Error(`Errors detected in definition of Lexer: `+e)}q$(this.lexerDefinitionWarning,e=>{z3r(e.message)}),this.TRACE_INIT(`Choosing sub-methods implementations`,()=>{if(r&&(this.handleModes=RQ),this.trackStartLines===!1&&(this.computeNewColumn=MQ),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=RQ),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(`Failed Optimization Warnings`,()=>{let e=c1(this.canModeBeOptimized,(e,t,n)=>(t===!1&&e.push(n),e),[]);if(t.ensureOptimizations&&!i1(e))throw Error(`Lexer Modes: < ${e.join(`, `)} > cannot be optimized. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT(`clearRegExpParserCache`,()=>{$3r()}),this.TRACE_INIT(`toFastProperties`,()=>{V3r(this)})})}tokenize(e,t=this.defaultMode){if(!i1(this.lexerDefinitionErrors)){let e=Q$(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- `);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer: `+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v=e,y=v.length,b=0,x=0,S=this.hasCustom?0:Math.floor(e.length/10),C=Array(S),w=[],T=this.trackStartLines?1:void 0,E=this.trackStartLines?1:void 0,D=S6r(this.emptyGroups),O=this.trackStartLines,k=this.config.lineTerminatorsPattern,A=0,j=[],M=[],N=[],P=[];Object.freeze(P);let F=!1,I=X(e=>{if(N.length===1&&e.tokenType.PUSH_MODE===void 0){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);w.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{N.pop();let e=W$(N);j=this.patternIdxToConfig[e],M=this.charCodeToPatternIdxToConfig[e],A=j.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;F=!!(M&&t)}},`pop_mode`);function L(e){N.push(e),M=this.charCodeToPatternIdxToConfig[e],j=this.patternIdxToConfig[e],A=j.length,A=j.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;F=!!(M&&t)}X(L,`push_mode`),L.call(this,t);let R,ee=this.config.recoveryEnabled;for(;bs.length){s=a,d=a.length,l=u,R=t;break}}}break}}if(d!==-1){if(f=R.group,f!==void 0&&(s=s===null?e.substring(b,b+d):s,p=R.tokenTypeIdx,m=this.createTokenInstance(s,b,p,R.tokenType,T,E,d),this.handlePayload(m,l),f===!1?x=this.addToken(C,x,m):D[f].push(m)),O===!0&&R.canLineTerminator===!0){let t=0,n,r;k.lastIndex=0;do s=s===null?e.substring(b,b+d):s,n=k.test(s),n===!0&&(r=k.lastIndex-1,t++);while(n===!0);t===0?E=this.computeNewColumn(E,d):(T+=t,E=d-r,this.updateTokenEndLineColumnLocation(m,f,r,t,T,E,d))}else E=this.computeNewColumn(E,d);b+=d,this.handleModes(R,I,L,m)}else{let t=b,n=T,i=E,a=ee===!1;for(;a===!1&&b ${fY(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return`Redundant input, expecting EOF but found: `+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let a=` but found: '`+Z$(t).image+`'`;return r?`Expecting: `+r+a:`Expecting: one of these possible Token sequences: ${Q$(Q$(c1(e,(e,t)=>e.concat(t),[]),e=>`[${Q$(e,e=>fY(e)).join(`, `)}]`),(e,t)=>` ${t+1}. ${e}`).join(` `)}`+a},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i=` but found: '`+Z$(t).image+`'`;return n?`Expecting: `+n+i:`Expecting: expecting at least one iteration which starts with one of these possible Token sequences:: <${Q$(e,e=>`[${Q$(e,e=>fY(e)).join(`,`)}]`).join(` ,`)}>`+i}},Object.freeze(F1),sfi={buildRuleNotFoundError(e,t){return`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<- inside top level rule: ->`+e.name+`<-`}},I1={buildDuplicateFoundError(e,t){function n(e){return e instanceof x1?e.terminalType.name:e instanceof f1?e.nonTerminalName:``}X(n,`getExtraProductionArgument`);let r=e.name,i=Z$(t),a=i.idx,o=eY(i),s=n(i),l=`->${o}${a>0?a:``}<- ${s?`with argument: ->${s}<-`:``} appears more than once (${t.length} times) in the top level rule: ->${r}<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return l=l.replace(/[ \t]+/g,` `),l=l.replace(/\s\s+/g,` `),l},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. To resolve this make sure each Terminal and Non-Terminal names are unique This is easy to accomplish by using the convention that Terminal names start with an uppercase letter and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=Q$(e.prefixPath,e=>fY(e)).join(`, `),n=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(` ,`)}> due to common lookahead prefix in inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX For Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?``:e.alternation.idx,n=e.prefixPath.length===0,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(` ,`)}> in inside <${e.topLevelRule.name}> Rule, `;if(n)r+=`These alternatives are all empty (match no tokens), making them indistinguishable. Only the last alternative may be empty. `;else{let t=Q$(e.prefixPath,e=>fY(e)).join(`, `);r+=`<${t}> may appears as a prefix path in all these alternatives. `}return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,r},buildEmptyRepetitionError(e){let t=eY(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError(e){return`deprecated`},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: inside <${e.topLevelRule.name}> Rule. has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name;return`Left Recursion found in grammar. rule: <${t}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: ${`${t} --> ${Q$(e.leftRecursionPath,e=>e.name).concat([t]).join(` --> `)}`} To fix this refactor your grammar to remove the left recursion. see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return`deprecated`},buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof p1?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}},X(H6r,`resolveGrammar`),cfi=(hti=class extends S1{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){q$(n1(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:q1.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},X(hti,`GastRefResolverVisitor`),hti),lfi=(gti=class extends C1{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName=``,this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=N$(this.path.ruleStack).reverse(),this.occurrenceStack=N$(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){i1(this.ruleStack)?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},X(gti,`AbstractNextPossibleTokensWalker`),gti),ufi=(_ti=class extends lfi{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName=``,this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let e=new m1({definition:t.concat(n)});this.possibleTokTypes=tY(e),this.found=!0}}},X(_ti,`NextAfterTokenWalker`),_ti),L1=(vti=class extends C1{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},X(vti,`AbstractNextTerminalAfterProductionWalker`),vti),dfi=(yti=class extends L1{walkMany(e,t,n){if(e.idx===this.occurrence){let e=Z$(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof x1&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}},X(yti,`NextTerminalAfterManyWalker`),yti),ffi=(bti=class extends L1{walkManySep(e,t,n){if(e.idx===this.occurrence){let e=Z$(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof x1&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}},X(bti,`NextTerminalAfterManySepWalker`),bti),pfi=(xti=class extends L1{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=Z$(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof x1&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}},X(xti,`NextTerminalAfterAtLeastOneWalker`),xti),mfi=(Sti=class extends L1{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=Z$(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof x1&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}},X(Sti,`NextTerminalAfterAtLeastOneSepWalker`),Sti),X(hY,`possiblePathsFrom`),X(U6r,`nextPossibleTokensAfter`),X(W6r,`expandTopLevelRule`),(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(R1||(R1={})),X(gY,`getProdType`),X(G6r,`getLookaheadPaths`),X(K6r,`buildLookaheadFuncForOr`),X(q6r,`buildLookaheadFuncForOptionalProd`),X(J6r,`buildAlternativesLookAheadFunc`),X(Y6r,`buildSingleAlternativeLookaheadFunction`),hfi=(Cti=class extends C1{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)}walkOption(e,t,n){this.checkIsTarget(e,R1.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,R1.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,R1.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,R1.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,R1.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}},X(Cti,`RestDefinitionFinderWalker`),Cti),gfi=(wti=class extends S1{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,R1.OPTION)}visitRepetition(e){this.checkIsTarget(e,R1.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,R1.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,R1.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,R1.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,R1.ALTERNATION)}},X(wti,`InsideDefinitionFinderVisitor`),wti),X(X6r,`initializeArrayOfArrays`),X(_Y,`pathToHashKeys`),X(Z6r,`isUniquePrefixHash`),X(Q6r,`lookAheadSequenceFromAlternatives`),X(vY,`getLookaheadPathsForOr`),X(yY,`getLookaheadPathsForOptionalProd`),X(bY,`containsPath`),X($6r,`isStrictPrefixOfPath`),X(e8r,`areTokenCategoriesNotUsed`),X(t8r,`validateLookahead`),X(n8r,`validateGrammar`),X(r8r,`validateDuplicateProductions`),X(i8r,`identifyProductionForDuplicates`),X(a8r,`getExtraProductionArgument`),_fi=(Tti=class extends S1{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}},X(Tti,`OccurrenceValidationCollector`),Tti),X(o8r,`validateRuleDoesNotAlreadyExist`),X(s8r,`validateRuleIsOverridden`),X(c8r,`validateNoLeftRecursion`),X(xY,`getFirstNoneTerminal`),vfi=(Eti=class extends S1{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},X(Eti,`OrCollector`),Eti),X(l8r,`validateEmptyOrAlternative`),X(u8r,`validateAmbiguousAlternationAlternatives`),yfi=(Dti=class extends S1{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}},X(Dti,`RepetitionCollector`),Dti),X(d8r,`validateTooManyAlts`),X(f8r,`validateSomeNonEmptyLookaheadPath`),X(p8r,`checkAlternativesAmbiguities`),X(m8r,`checkPrefixAlternativesAmbiguities`),X(h8r,`checkTerminalAndNoneTerminalsNameSpace`),X(g8r,`resolveGrammar`),X(_8r,`validateGrammar`),bfi=`MismatchedTokenException`,xfi=`NoViableAltException`,Sfi=`EarlyExitException`,Cfi=`NotAllInputParsedException`,wfi=[bfi,xfi,Sfi,Cfi],Object.freeze(wfi),X(SY,`isRecognitionException`),z1=(Oti=class extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},X(Oti,`RecognitionException`),Oti),Tfi=(kti=class extends z1{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=bfi}},X(kti,`MismatchedTokenException`),kti),Efi=(Ati=class extends z1{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=xfi}},X(Ati,`NoViableAltException`),Ati),Dfi=(jti=class extends z1{constructor(e,t){super(e,t),this.name=Cfi}},X(jti,`NotAllInputParsedException`),jti),Ofi=(Mti=class extends z1{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Sfi}},X(Mti,`EarlyExitException`),Mti),kfi={},Afi=`InRuleRecoveryException`,jfi=(Nti=class extends Error{constructor(e){super(e),this.name=Afi}},X(Nti,`InRuleRecoveryException`),Nti),Mfi=(Pti=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=e1(e,`recoveryEnabled`)?e.recoveryEnabled:G1.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=v8r)}getTokenToInsert(e){let t=mY(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[],s=!1,l=this.LA(1),u=this.LA(1),d=X(()=>{let e=this.LA(0),t=new Tfi(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),l,this.LA(0));t.resyncedTokens=K$(o),this.SAVE_ERROR(t)},`generateErrorMessage`);for(;!s;)if(this.tokenMatcher(u,r)){d();return}else if(n.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,i)?s=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new jfi(`sad sad panda`)}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||i1(t))return!1;let n=this.LA(1);return X$(t,e=>this.tokenMatcher(n,e))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return r1(this.getFollowSetFromFollowKey(t),e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),n=2;for(;;){let r=X$(e,e=>V6r(t,e));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return kfi;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return Q$(e,(n,r)=>r===0?kfi:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){return b$(Q$(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e)))}getFollowSetFromFollowKey(e){if(e===kfi)return[P1];let t=e.ruleName+e.idxInCallingRule+Vdi+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,P1)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return K$(t)}attemptInRepetitionRecovery(e,t,n,r,i,a,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:N$(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return Q$(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},X(Pti,`Recoverable`),Pti),X(v8r,`attemptInRepetitionRecovery`),Nfi=4,B1=8,Pfi=8,Ffi=1<c8r(e,e,I1))}validateEmptyOrAlternatives(e){return $$(e,e=>l8r(e,I1))}validateAmbiguousAlternationAlternatives(e,t){return $$(e,e=>u8r(e,t,I1))}validateSomeNonEmptyLookaheadPath(e,t){return f8r(e,t,I1)}buildLookaheadForAlternation(e){return K6r(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,J6r)}buildLookaheadForOptional(e){return q6r(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,gY(e.prodType),Y6r)}},X(Fti,`LLkLookaheadStrategy`),Fti),Vfi=(Iti=class{initLooksAhead(e){this.dynamicTokensEnabled=e1(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:G1.dynamicTokensEnabled,this.maxLookahead=e1(e,`maxLookahead`)?e.maxLookahead:G1.maxLookahead,this.lookaheadStrategy=e1(e,`lookaheadStrategy`)?e.lookaheadStrategy:new Bfi({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){q$(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{let{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=y8r(e);q$(t,t=>{let n=t.idx===0?``:t.idx;this.TRACE_INIT(`${eY(t)}${n}`,()=>{let n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=CY(this.fullRuleNameToShort[e.name],Ffi,t.idx);this.setLaFuncCache(r,n)})}),q$(n,t=>{this.computeLookaheadFunc(e,t.idx,Lfi,`Repetition`,t.maxLookahead,eY(t))}),q$(r,t=>{this.computeLookaheadFunc(e,t.idx,Ifi,`Option`,t.maxLookahead,eY(t))}),q$(i,t=>{this.computeLookaheadFunc(e,t.idx,Rfi,`RepetitionMandatory`,t.maxLookahead,eY(t))}),q$(a,t=>{this.computeLookaheadFunc(e,t.idx,V1,`RepetitionMandatoryWithSeparator`,t.maxLookahead,eY(t))}),q$(o,t=>{this.computeLookaheadFunc(e,t.idx,zfi,`RepetitionWithSeparator`,t.maxLookahead,eY(t))})})})}computeLookaheadFunc(e,t,n,r,i,a){this.TRACE_INIT(`${a}${t===0?``:t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=CY(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(e,t){return CY(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},X(Iti,`LooksAhead`),Iti),H1=new(Lti=class extends S1{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},X(Lti,`DslMethodsCollectorVisitor`),Lti),X(y8r,`collectMethods`),X(b8r,`setNodeLocationOnlyOffset`),X(x8r,`setNodeLocationFull`),X(S8r,`addTerminalToCst`),X(C8r,`addNoneTerminalToCst`),Hfi=`name`,X(w8r,`defineNameProp`),X(T8r,`defaultVisit`),X(E8r,`createBaseSemanticVisitorConstructor`),X(D8r,`createBaseVisitorConstructorWithDefaults`),(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(Ufi||(Ufi={})),X(O8r,`validateVisitor`),X(k8r,`validateMissingCstMethods`),Wfi=(Rti=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=e1(e,`nodeLocationTracking`)?e.nodeLocationTracking:G1.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=RQ,this.cstFinallyStateUpdate=RQ,this.cstPostTerminal=RQ,this.cstPostNonTerminal=RQ,this.cstPostRule=RQ;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=x8r,this.setNodeLocationFromNode=x8r,this.cstPostRule=RQ,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=RQ,this.setNodeLocationFromNode=RQ,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=b8r,this.setNodeLocationFromNode=b8r,this.cstPostRule=RQ,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=RQ,this.setNodeLocationFromNode=RQ,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=RQ,this.setNodeLocationFromNode=RQ,this.cstPostRule=RQ,this.setInitialNodeLocation=RQ;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];S8r(n,t,e),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];C8r(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(o1(this.baseCstVisitorConstructor)){let e=E8r(this.className,a$(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(o1(this.baseCstVisitorWithDefaultsConstructor)){let e=D8r(this.className,a$(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},X(Rti,`TreeBuilder`),Rti),Gfi=(zti=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error(`Missing invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):W1}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?W1:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},X(zti,`LexerAdapter`),zti),Kfi=(Bti=class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=K1){if(r1(this.definedRulesNames,e)){let t={message:I1.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:q1.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=K1){let r=s8r(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(SY(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return W3r(n1(this.gastProductionsCache))}},X(Bti,`RecognizerApi`),Bti),qfi=(Vti=class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=uY,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},e1(t,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 For Further details.`);if(kQ(e)){if(i1(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 For Further details.`)}if(kQ(e))this.tokensMap=c1(e,(e,t)=>(e[t.name]=t,e),{});else if(e1(e,`modes`)&&J$(b$(n1(e.modes)),R6r)){let t=u1(b$(n1(e.modes)));this.tokensMap=c1(t,(e,t)=>(e[t.name]=t,e),{})}else if(AQ(e))this.tokensMap=N$(e);else throw Error(` argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=P1;let n=J$(e1(e,`modes`)?b$(n1(e.modes)):n1(e),e=>i1(e.categoryMatches));this.tokenMatcher=n?uY:lY,dY(n1(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=e1(n,`resyncEnabled`)?n.resyncEnabled:K1.resyncEnabled,i=e1(n,`recoveryValueFunc`)?n.recoveryValueFunc:K1.recoveryValueFunc,a=this.ruleShortNameIdx<t.call(this)&&e.call(this),`lookAheadFunc`)}}else i=e;if(r.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(Rfi,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=X(()=>e.call(this)&&t.call(this),`lookAheadFunc`)}}else i=t;if(r.call(this)===!0){let e=this.doSingleRepetition(i);for(;r.call(this)===!0&&e===!0;)e=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,R1.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,Rfi,e,pfi)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(V1,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=X(()=>this.tokenMatcher(this.LA(1),i),`separatorLookAheadFunc`);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,mfi],t,V1,e,mfi)}else throw this.raiseEarlyExitException(e,R1.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(Lfi,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=X(()=>e.call(this)&&t.call(this),`lookaheadFunction`)}}else i=t;let a=!0;for(;r.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,Lfi,e,dfi,a)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(zfi,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=X(()=>this.tokenMatcher(this.LA(1),i),`separatorLookAheadFunc`);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,ffi],t,zfi,e,ffi)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,V1,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(Ffi,t),r=kQ(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(i!==void 0)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Dfi(t,e))}}subruleInternal(e,t,n){let r;try{let i=n===void 0?void 0:n.ARGS;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw SY(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA(1);this.tokenMatcher(t,e)===!0?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Tfi(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===Afi?n:e}}throw n}saveRecogState(){let e=this.errors,t=N$(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),P1)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},X(Vti,`RecognizerEngine`),Vti),Jfi=(Hti=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=e1(e,`errorMessageProvider`)?e.errorMessageProvider:G1.errorMessageProvider}SAVE_ERROR(e){if(SY(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:N$(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)}get errors(){return N$(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],a=yY(e,i,t,this.maxLookahead)[0],o=[];for(let e=1;e<=this.maxLookahead;e++)o.push(this.LA(e));let s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Ofi(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=vY(e,r,this.maxLookahead),a=[];for(let e=1;e<=this.maxLookahead;e++)a.push(this.LA(e));let o=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Efi(s,this.LA(1),o))}},X(Hti,`ErrorHandler`),Hti),Yfi=(Uti=class{initContentAssist(){}computeContentAssist(e,t){let n=this.gastProductionsCache[e];if(o1(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return U6r([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=Z$(e.ruleStack),n=this.getGAstProductions()[t];return new ufi(n,e).startWalking()}},X(Uti,`ContentAssist`),Uti),U1={description:`This Object indicates the Parser is during Recording Phase`},Object.freeze(U1),Xfi=!0,Zfi=2**B1-1,Qfi=pY({name:`RECORDING_PHASE_TOKEN`,pattern:N1.NA}),dY([Qfi]),$fi=mY(Qfi,`This IToken indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1),Object.freeze($fi),epi={name:`This CSTNode indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},tpi=(Wti=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,()=>{for(let e=0;e<10;e++){let t=e>0?e:``;this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:``;delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return W1}topLevelRuleRecord(e,t){try{let n=new p1({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=` This error was thrown during the "grammar recording phase" For more info see: https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}}optionInternalRecord(e,t){return wY.call(this,h1,e,t)}atLeastOneInternalRecord(e,t){wY.call(this,g1,t,e)}atLeastOneSepFirstInternalRecord(e,t){wY.call(this,_1,t,e,Xfi)}manyInternalRecord(e,t){wY.call(this,v1,t,e)}manySepFirstInternalRecord(e,t){wY.call(this,y1,t,e,Xfi)}orInternalRecord(e,t){return A8r.call(this,e,t)}subruleInternalRecord(e,t,n){if(TY(t),!e||e1(e,`ruleName`)===!1){let n=Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=W$(this.recordingProdStack),i=e.ruleName,a=new f1({idx:t,nonTerminalName:i,label:n==null?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?epi:U1}consumeInternalRecord(e,t,n){if(TY(t),!P6r(e)){let n=Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=W$(this.recordingProdStack),i=new x1({idx:t,terminalType:e,label:n==null?void 0:n.LABEL});return r.definition.push(i),$fi}},X(Wti,`GastRecorder`),Wti),X(wY,`recordProd`),X(A8r,`recordOrProd`),X(j8r,`getIdxSuffix`),X(TY,`assertMethodIdxIsValid`),npi=(Gti=class{initPerformanceTracer(e){if(e1(e,`traceInitPerf`)){let t=e.traceInitPerf,n=typeof t==`number`;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=G1.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent <${e}>`);let{time:r,value:i}=B3r(t),a=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}},X(Gti,`PerformanceTracer`),Gti),X(M8r,`applyMixins`),W1=mY(P1,``,NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(W1),G1=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:F1,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),K1=Object.freeze({recoveryValueFunc:X(()=>void 0,`recoveryValueFunc`),resyncEnabled:!0}),(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`,e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]=`CUSTOM_LOOKAHEAD_VALIDATION`})(q1||(q1={})),X(N8r,`EMPTY_ALT`),rpi=(Kti=class e{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT(`performSelfAnalysis`,()=>{let t;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT(`toFastProps`,()=>{V3r(this)}),this.TRACE_INIT(`Grammar Recording`,()=>{try{this.enableRecording(),q$(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT(`Grammar Resolving`,()=>{r=g8r({rules:n1(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT(`Grammar Validations`,()=>{if(i1(r)&&this.skipValidations===!1){let e=_8r({rules:n1(this.gastProductionsCache),tokenTypes:n1(this.tokensMap),errMsgProvider:I1,grammarName:n}),t=t8r({lookaheadStrategy:this.lookaheadStrategy,rules:n1(this.gastProductionsCache),tokenTypes:n1(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(e,t)}}),i1(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT(`computeAllProdsFollows`,()=>{let e=Z3r(n1(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT(`ComputeLookaheadFunctions`,()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)==null||t.call(e,{rules:n1(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(n1(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!i1(this.definitionErrors))throw t=Q$(this.definitionErrors,e=>e.message),Error(`Parser Definition Errors detected: ${t.join(` ------------------------------- `)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),e1(t,`ignoredIssues`))throw Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES For further details.`);this.skipValidations=e1(t,`skipValidations`)?t.skipValidations:G1.skipValidations}},X(Kti,`Parser`),Kti),rpi.DEFER_DEFINITION_ERRORS_HANDLING=!1,M8r(rpi,[Mfi,Vfi,Wfi,Gfi,qfi,Kfi,Jfi,Yfi,tpi,npi]),ipi=(qti=class extends rpi{constructor(e,t=G1){let n=N$(t);n.outputCst=!1,super(e,n)}},X(qti,`EmbeddedActionsParser`),qti),X(P8r,`arrayMap`),api=P8r,X(F8r,`listCacheClear`),opi=F8r,X(I8r,`eq`),spi=I8r,X(L8r,`assocIndexOf`),J1=L8r,cpi=Array.prototype.splice,X(R8r,`listCacheDelete`),lpi=R8r,X(z8r,`listCacheGet`),upi=z8r,X(B8r,`listCacheHas`),dpi=B8r,X(V8r,`listCacheSet`),fpi=V8r,X(EY,`ListCache`),EY.prototype.clear=opi,EY.prototype.delete=lpi,EY.prototype.get=upi,EY.prototype.has=dpi,EY.prototype.set=fpi,Y1=EY,X(H8r,`stackClear`),ppi=H8r,X(U8r,`stackDelete`),mpi=U8r,X(W8r,`stackGet`),hpi=W8r,X(G8r,`stackHas`),gpi=G8r,_pi=typeof global==`object`&&global&&global.Object===Object&&global,vpi=typeof self==`object`&&self&&self.Object===Object&&self,X1=_pi||vpi||Function(`return this`)(),Z1=X1.Symbol,ypi=Object.prototype,bpi=ypi.hasOwnProperty,xpi=ypi.toString,Q1=Z1?Z1.toStringTag:void 0,X(K8r,`getRawTag`),Spi=K8r,Cpi=Object.prototype.toString,X(q8r,`objectToString`),wpi=q8r,Tpi=`[object Null]`,Epi=`[object Undefined]`,Dpi=Z1?Z1.toStringTag:void 0,X(J8r,`baseGetTag`),$1=J8r,X(Y8r,`isObject`),Opi=Y8r,kpi=`[object AsyncFunction]`,Api=`[object Function]`,jpi=`[object GeneratorFunction]`,Mpi=`[object Proxy]`,X(X8r,`isFunction`),Npi=X8r,Ppi=X1[`__core-js_shared__`],Fpi=(function(){var e=/[^.]+$/.exec(Ppi&&Ppi.keys&&Ppi.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``})(),X(Z8r,`isMasked`),Ipi=Z8r,Lpi=Function.prototype.toString,X(Q8r,`toSource`),e0=Q8r,Rpi=/[\\^$.*+?()[\]{}|]/g,zpi=/^\[object .+?Constructor\]$/,Bpi=Function.prototype,Vpi=Object.prototype,Hpi=Bpi.toString,Upi=Vpi.hasOwnProperty,Wpi=RegExp(`^`+Hpi.call(Upi).replace(Rpi,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),X($8r,`baseIsNative`),Gpi=$8r,X(e5r,`getValue`),Kpi=e5r,X(t5r,`getNative`),t0=t5r,n0=t0(X1,`Map`),r0=t0(Object,`create`),X(n5r,`hashClear`),qpi=n5r,X(r5r,`hashDelete`),Jpi=r5r,Ypi=`__lodash_hash_undefined__`,Xpi=Object.prototype.hasOwnProperty,X(i5r,`hashGet`),Zpi=i5r,Qpi=Object.prototype.hasOwnProperty,X(a5r,`hashHas`),$pi=a5r,emi=`__lodash_hash_undefined__`,X(o5r,`hashSet`),tmi=o5r,X(DY,`Hash`),DY.prototype.clear=qpi,DY.prototype.delete=Jpi,DY.prototype.get=Zpi,DY.prototype.has=$pi,DY.prototype.set=tmi,nmi=DY,X(s5r,`mapCacheClear`),rmi=s5r,X(c5r,`isKeyable`),imi=c5r,X(l5r,`getMapData`),i0=l5r,X(u5r,`mapCacheDelete`),ami=u5r,X(d5r,`mapCacheGet`),omi=d5r,X(f5r,`mapCacheHas`),smi=f5r,X(p5r,`mapCacheSet`),cmi=p5r,X(OY,`MapCache`),OY.prototype.clear=rmi,OY.prototype.delete=ami,OY.prototype.get=omi,OY.prototype.has=smi,OY.prototype.set=cmi,a0=OY,lmi=200,X(m5r,`stackSet`),umi=m5r,X(kY,`Stack`),kY.prototype.clear=ppi,kY.prototype.delete=mpi,kY.prototype.get=hpi,kY.prototype.has=gpi,kY.prototype.set=umi,o0=kY,dmi=`__lodash_hash_undefined__`,X(h5r,`setCacheAdd`),fmi=h5r,X(g5r,`setCacheHas`),pmi=g5r,X(AY,`SetCache`),AY.prototype.add=AY.prototype.push=fmi,AY.prototype.has=pmi,mmi=AY,X(_5r,`arraySome`),hmi=_5r,X(v5r,`cacheHas`),gmi=v5r,_mi=1,vmi=2,X(y5r,`equalArrays`),ymi=y5r,bmi=X1.Uint8Array,X(b5r,`mapToArray`),xmi=b5r,X(x5r,`setToArray`),Smi=x5r,Cmi=1,wmi=2,Tmi=`[object Boolean]`,Emi=`[object Date]`,Dmi=`[object Error]`,Omi=`[object Map]`,kmi=`[object Number]`,Ami=`[object RegExp]`,jmi=`[object Set]`,Mmi=`[object String]`,Nmi=`[object Symbol]`,Pmi=`[object ArrayBuffer]`,Fmi=`[object DataView]`,Imi=Z1?Z1.prototype:void 0,Lmi=Imi?Imi.valueOf:void 0,X(S5r,`equalByTag`),Rmi=S5r,X(C5r,`arrayPush`),zmi=C5r,s0=Array.isArray,X(w5r,`baseGetAllKeys`),Bmi=w5r,X(T5r,`arrayFilter`),Vmi=T5r,X(E5r,`stubArray`),Hmi=E5r,Umi=Object.prototype.propertyIsEnumerable,Wmi=Object.getOwnPropertySymbols,Gmi=Wmi?function(e){return e==null?[]:(e=Object(e),Vmi(Wmi(e),function(t){return Umi.call(e,t)}))}:Hmi,X(D5r,`baseTimes`),Kmi=D5r,X(O5r,`isObjectLike`),c0=O5r,qmi=`[object Arguments]`,X(k5r,`baseIsArguments`),Jmi=k5r,Ymi=Object.prototype,Xmi=Ymi.hasOwnProperty,Zmi=Ymi.propertyIsEnumerable,l0=Jmi((function(){return arguments})())?Jmi:function(e){return c0(e)&&Xmi.call(e,`callee`)&&!Zmi.call(e,`callee`)},X(A5r,`stubFalse`),Qmi=A5r,$mi=typeof exports==`object`&&exports&&!exports.nodeType&&exports,ehi=$mi&&typeof module==`object`&&module&&!module.nodeType&&module,thi=ehi&&ehi.exports===$mi?X1.Buffer:void 0,u0=(thi?thi.isBuffer:void 0)||Qmi,nhi=9007199254740991,rhi=/^(?:0|[1-9]\d*)$/,X(j5r,`isIndex`),ihi=j5r,ahi=9007199254740991,X(M5r,`isLength`),ohi=M5r,shi=`[object Arguments]`,chi=`[object Array]`,lhi=`[object Boolean]`,uhi=`[object Date]`,dhi=`[object Error]`,fhi=`[object Function]`,phi=`[object Map]`,mhi=`[object Number]`,hhi=`[object Object]`,ghi=`[object RegExp]`,_hi=`[object Set]`,vhi=`[object String]`,yhi=`[object WeakMap]`,bhi=`[object ArrayBuffer]`,xhi=`[object DataView]`,Shi=`[object Float32Array]`,Chi=`[object Float64Array]`,whi=`[object Int8Array]`,Thi=`[object Int16Array]`,Ehi=`[object Int32Array]`,Dhi=`[object Uint8Array]`,Ohi=`[object Uint8ClampedArray]`,khi=`[object Uint16Array]`,Ahi=`[object Uint32Array]`,d0={},d0[Shi]=d0[Chi]=d0[whi]=d0[Thi]=d0[Ehi]=d0[Dhi]=d0[Ohi]=d0[khi]=d0[Ahi]=!0,d0[shi]=d0[chi]=d0[bhi]=d0[lhi]=d0[xhi]=d0[uhi]=d0[dhi]=d0[fhi]=d0[phi]=d0[mhi]=d0[hhi]=d0[ghi]=d0[_hi]=d0[vhi]=d0[yhi]=!1,X(N5r,`baseIsTypedArray`),jhi=N5r,X(P5r,`baseUnary`),Mhi=P5r,Nhi=typeof exports==`object`&&exports&&!exports.nodeType&&exports,f0=Nhi&&typeof module==`object`&&module&&!module.nodeType&&module,Phi=f0&&f0.exports===Nhi&&_pi.process,Fhi=(function(){try{return f0&&f0.require&&f0.require(`util`).types||Phi&&Phi.binding&&Phi.binding(`util`)}catch{}})(),Ihi=Fhi&&Fhi.isTypedArray,Lhi=Ihi?Mhi(Ihi):jhi,Rhi=Object.prototype.hasOwnProperty,X(F5r,`arrayLikeKeys`),zhi=F5r,Bhi=Object.prototype,X(I5r,`isPrototype`),Vhi=I5r,X(L5r,`overArg`),Hhi=L5r(Object.keys,Object),Uhi=Object.prototype.hasOwnProperty,X(R5r,`baseKeys`),Whi=R5r,X(z5r,`isArrayLike`),p0=z5r,X(B5r,`keys`),Ghi=B5r,X(V5r,`getAllKeys`),Khi=V5r,qhi=1,Jhi=Object.prototype.hasOwnProperty,X(H5r,`equalObjects`),Yhi=H5r,Xhi=t0(X1,`DataView`),Zhi=t0(X1,`Promise`),m0=t0(X1,`Set`),Qhi=t0(X1,`WeakMap`),$hi=`[object Map]`,egi=`[object Object]`,tgi=`[object Promise]`,ngi=`[object Set]`,rgi=`[object WeakMap]`,igi=`[object DataView]`,agi=e0(Xhi),ogi=e0(n0),sgi=e0(Zhi),cgi=e0(m0),lgi=e0(Qhi),h0=$1,(Xhi&&h0(new Xhi(new ArrayBuffer(1)))!=igi||n0&&h0(new n0)!=$hi||Zhi&&h0(Zhi.resolve())!=tgi||m0&&h0(new m0)!=ngi||Qhi&&h0(new Qhi)!=rgi)&&(h0=X(function(e){var t=$1(e),n=t==egi?e.constructor:void 0,r=n?e0(n):``;if(r)switch(r){case agi:return igi;case ogi:return $hi;case sgi:return tgi;case cgi:return ngi;case lgi:return rgi}return t},`getTag`)),ugi=h0,dgi=1,fgi=`[object Arguments]`,pgi=`[object Array]`,g0=`[object Object]`,mgi=Object.prototype.hasOwnProperty,X(U5r,`baseIsEqualDeep`),hgi=U5r,X(W5r,`baseIsEqual`),ggi=W5r,_gi=1,vgi=2,X(G5r,`baseIsMatch`),ygi=G5r,X(K5r,`isStrictComparable`),bgi=K5r,X(q5r,`getMatchData`),xgi=q5r,X(J5r,`matchesStrictComparable`),Sgi=J5r,X(Y5r,`baseMatches`),Cgi=Y5r,wgi=`[object Symbol]`,X(X5r,`isSymbol`),_0=X5r,Tgi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Egi=/^\w*$/,X(Z5r,`isKey`),Dgi=Z5r,Ogi=`Expected a function`,X(jY,`memoize`),jY.Cache=a0,kgi=jY,Agi=500,X(Q5r,`memoizeCapped`),jgi=Q5r,Mgi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ngi=/\\(\\)?/g,Pgi=jgi(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Mgi,function(e,n,r,i){t.push(r?i.replace(Ngi,`$1`):n||e)}),t}),Fgi=1/0,Igi=Z1?Z1.prototype:void 0,Lgi=Igi?Igi.toString:void 0,X($5r,`baseToString`),Rgi=$5r,X(e7r,`toString`),zgi=e7r,X(t7r,`castPath`),Bgi=t7r,Vgi=1/0,X(n7r,`toKey`),v0=n7r,X(r7r,`baseGet`),Hgi=r7r,X(i7r,`get`),Ugi=i7r,X(a7r,`baseHasIn`),Wgi=a7r,X(o7r,`hasPath`),Ggi=o7r,X(s7r,`hasIn`),Kgi=s7r,qgi=1,Jgi=2,X(c7r,`baseMatchesProperty`),Ygi=c7r,X(l7r,`identity`),Xgi=l7r,X(u7r,`baseProperty`),Zgi=u7r,X(d7r,`basePropertyDeep`),Qgi=d7r,X(f7r,`property`),$gi=f7r,X(p7r,`baseIteratee`),y0=p7r,X(m7r,`createBaseFor`),e_i=m7r(),X(h7r,`baseForOwn`),t_i=h7r,X(g7r,`createBaseEach`),b0=g7r(t_i),X(_7r,`baseMap`),n_i=_7r,X(v7r,`map`),x0=v7r,X(y7r,`baseFilter`),r_i=y7r,X(b7r,`filter`),i_i=b7r,X(MY,`buildATNKey`),S0=1,a_i=2,o_i=4,s_i=5,C0=7,c_i=8,l_i=9,u_i=10,d_i=11,f_i=12,p_i=(Jti=class{constructor(e){this.target=e}isEpsilon(){return!1}},X(Jti,`AbstractTransition`),Jti),m_i=(Yti=class extends p_i{constructor(e,t){super(e),this.tokenType=t}},X(Yti,`AtomTransition`),Yti),h_i=(Xti=class extends p_i{constructor(e){super(e)}isEpsilon(){return!0}},X(Xti,`EpsilonTransition`),Xti),g_i=(Zti=class extends p_i{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}},X(Zti,`RuleTransition`),Zti),X(x7r,`createATN`),X(S7r,`createRuleStartAndStopATNStates`),X(C7r,`atom`),X(w7r,`repetition`),X(T7r,`repetitionSep`),X(E7r,`repetitionMandatory`),X(D7r,`repetitionMandatorySep`),X(O7r,`alternation`),X(k7r,`option`),X(NY,`block`),X(A7r,`plus`),X(j7r,`star`),X(M7r,`optional`),X(PY,`defineDecisionState`),X(FY,`makeAlts`),X(N7r,`getProdType`),X(P7r,`makeBlock`),X(IY,`tokenRef`),X(F7r,`ruleRef`),X(I7r,`buildRuleHandle`),X(LY,`epsilon`),X(RY,`newState`),X(zY,`addTransition`),X(L7r,`removeState`),w0={},__i=(Qti=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=R7r(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return x0(this.configs,e=>e.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}},X(Qti,`ATNConfigSet`),Qti),X(R7r,`getATNConfigKey`),X(z7r,`baseExtremum`),v_i=z7r,X(B7r,`baseLt`),y_i=B7r,X(V7r,`min`),b_i=V7r,x_i=Z1?Z1.isConcatSpreadable:void 0,X(H7r,`isFlattenable`),S_i=H7r,X(U7r,`baseFlatten`),C_i=U7r,X(W7r,`flatMap`),w_i=W7r,X(G7r,`baseFindIndex`),T_i=G7r,X(K7r,`baseIsNaN`),E_i=K7r,X(q7r,`strictIndexOf`),D_i=q7r,X(J7r,`baseIndexOf`),O_i=J7r,X(Y7r,`arrayIncludes`),k_i=Y7r,X(X7r,`arrayIncludesWith`),A_i=X7r,X(Z7r,`noop`),j_i=Z7r,M_i=m0&&1/Smi(new m0([,-0]))[1]==1/0?function(e){return new m0(e)}:j_i,N_i=200,X(Q7r,`baseUniq`),P_i=Q7r,X($7r,`uniqBy`),F_i=$7r,X(e9r,`flatten`),I_i=e9r,X(t9r,`arrayEach`),L_i=t9r,X(n9r,`castFunction`),R_i=n9r,X(r9r,`forEach`),z_i=r9r,B_i=`[object Map]`,V_i=`[object Set]`,H_i=Object.prototype.hasOwnProperty,X(i9r,`isEmpty`),U_i=i9r,X(a9r,`arrayReduce`),W_i=a9r,X(o9r,`baseReduce`),G_i=o9r,X(s9r,`reduce`),K_i=s9r,X(c9r,`createDFACache`),q_i=($ti=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e=``,t=this.predicates.length;for(let n=0;nconsole.log(e))}initialize(e){this.atn=x7r(e.rules),this.dfas=u9r(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,s=MY(n,`Alternation`,t),l=this.atn.decisionMap[s].decision,u=x0(G6r({maxLookahead:1,occurrence:t,prodType:`Alternation`,rule:n}),e=>x0(e,e=>e[0]));if(l9r(u,!1)&&!i){let e=K_i(u,(e,t,n)=>(z_i(t,t=>{t&&(e[t.tokenTypeIdx]=n,z_i(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){var n;let r=this.LA(1),i=e[r.tokenTypeIdx];if(t!==void 0&&i!==void 0){let e=(n=t[i])==null?void 0:n.GATE;if(e!==void 0&&e.call(this)===!1)return}return i}:function(){let t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){let t=new q_i,n=e===void 0?0:e.length;for(let r=0;rx0(e,e=>e[0]));if(l9r(u)&&u[0][0]&&!i){let e=u[0],t=I_i(e);if(t.length===1&&U_i(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let e=K_i(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,z_i(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){let t=this.LA(1);return e[t.tokenTypeIdx]===!0}}}return function(){let e=BY.call(this,a,l,J_i,o);return typeof e!=`object`&&e===0}}},X(eni,`LLStarLookaheadStrategy`),eni),X(l9r,`isLL1Sequence`),X(u9r,`initATNSimulator`),X(BY,`adaptivePredict`),X(d9r,`performLookahead`),X(f9r,`computeLookaheadTarget`),X(p9r,`reportLookaheadAmbiguity`),X(m9r,`buildAmbiguityError`),X(h9r,`getProductionDslName`),X(g9r,`buildAdaptivePredictError`),X(_9r,`getExistingTargetState`),X(v9r,`computeReachSet`),X(y9r,`getReachableTarget`),X(b9r,`getUniqueAlt`),X(x9r,`newDFAState`),X(S9r,`addDFAEdge`),X(C9r,`addDFAState`),X(w9r,`computeStartState`),X(VY,`closure`),X(T9r,`getEpsilonTarget`),X(E9r,`hasConfigInRuleStopState`),X(D9r,`allConfigsInRuleStopStates`),X(O9r,`hasConflictTerminatingPrediction`),X(k9r,`getConflictingAltSets`),X(A9r,`hasConflictingAltSet`),X(j9r,`hasStateAssociatedWithOneAlt`),YX(),X_i=(tni=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new $_i(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new E0;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=new T0(e.startOffset,e.image.length,yJ(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let t=e.container;if(t){let n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){let t=[];for(let n of e){let e=new T0(n.startOffset,n.image.length,yJ(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,r=!1;if(n.content.length>0)n.content.push(...t);else{for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),r=!0;break}n=n.container}r||this.rootNode.content.unshift(...t)}}construct(e){let t=this.current;typeof e.$type==`string`&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=t;let n=this.nodeStack.pop();(n==null?void 0:n.content.length)===0&&this.removeNode(n)}},X(tni,`CstNodeBuilder`),tni),Z_i=(nni=class{get hidden(){return!1}get astNode(){var e,t;let n=typeof((e=this._astNode)==null?void 0:e.$type)==`string`?this._astNode:(t=this.container)==null?void 0:t.astNode;if(!n)throw Error(`This node has no associated AST element`);return n}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},X(nni,`AbstractCstNode`),nni),T0=(rni=class extends Z_i{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}},X(rni,`LeafCstNodeImpl`),rni),E0=(ini=class extends Z_i{constructor(){super(...arguments),this.content=new Q_i(this)}get offset(){var e;return((e=this.firstNonHiddenNode)==null?void 0:e.offset)??0}get length(){return this.end-this.offset}get end(){var e;return((e=this.lastNonHiddenNode)==null?void 0:e.end)??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},X(ini,`CompositeCstNodeImpl`),ini),Q_i=(ani=class e extends Array{constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(let t of e)t.container=this.parent}},X(ani,`CstNodeContainer`),ani),$_i=(oni=class extends E0{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}},X(oni,`RootCstNodeImpl`),oni),D0=Symbol(`Datatype`),X(HY,`isDataTypeNode`),evi=`​`,tvi=X(e=>e.endsWith(evi)?e:e+evi,`withRuleSuffix`),nvi=(sni=class{constructor(e){var t;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let n=this.lexer.definition,r=e.LanguageMetaData.mode===`production`;this.wrapper=(t=e.shared.profilers.LangiumProfiler)!=null&&t.isActive(`parsing`)?new lvi(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):new cvi(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},X(sni,`AbstractLangiumParser`),sni),rvi=(cni=class extends nvi{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new X_i,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let n=this.computeRuleType(e),r;lJ(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(tvi(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),dJ(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,n=new Map;for(let t=0;t0&&(t=this.construct()),t===void 0)throw Error(`No result from parser`);if(this.stack.length>0)throw Error(`Parser stack is not empty after parsing`);return t}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===D0?n.value=``:t!==void 0&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let n=e.startOffset;for(let e=0;en)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){let r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){let e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);let t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:a}=this.getAssignment(n),o=this.current;if(i){let e=uJ(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(HY(o)){let e=r.image;uJ(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==`number`&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let a;!this.isRecording()&&!n&&(a=this.nodeBuilder.buildCompositeNode(r));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!n&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,r,a))}}performSubruleAssignment(e,t,n){let{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){let t=this.current;if(HY(t))t.value+=e.toString();else if(typeof e==`object`&&e){let n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);let r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),`$infixName`in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):HY(e)?this.converter.convert(e.value,e.$cstNode):(U$r(this.astReflection,e),e)}constructInfix(e,t){let n=e.parts;if(!Array.isArray(n)||n.length===0)return;let r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,a=-1;for(let e=0;ea?(a=o.precedence,i=e):o.precedence===a&&(o.rightAssoc||(i=e))}let o=r.slice(0,i),s=r.slice(i+1),l=n.slice(0,i+1),u=n.slice(i+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:o},f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:s},p=this.constructInfix(d,t),m=this.constructInfix(f,t);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:r[i],right:m}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=Gq(e,aJ);this.assignmentMap.set(e,{assignment:t,crossRef:t&&oJ(t.terminal)?t.terminal.isMulti?`multi`:`single`:void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){let a=this.current,o;switch(o=i===`single`&&typeof n==`string`?this.linker.buildReference(a,t,r,n):i===`multi`&&typeof n==`string`?this.linker.buildMultiReference(a,t,r,n):n,e){case`=`:a[t]=o;break;case`?=`:a[t]=!0;break;case`+=`:Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];t===void 0?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},X(cni,`LangiumParser`),cni),ivi=(lni=class{buildMismatchTokenMessage(e){return F1.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return F1.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return F1.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return F1.buildEarlyExitMessage(e)}},X(lni,`AbstractParserErrorMessageProvider`),lni),avi=(uni=class extends ivi{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(`:KW`)?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},X(uni,`LangiumParserErrorMessageProvider`),uni),ovi=(dni=class extends nvi{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:`partial`});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let n=this.wrapper.DEFINE_RULE(tvi(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},X(dni,`LangiumCompletionParser`),dni),svi={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new avi},cvi=(fni=class extends ipi{constructor(e,t){let n=t&&`maxLookahead`in t;super(e,{...svi,lookaheadStrategy:n?new Bfi({maxLookahead:t.maxLookahead}):new Y_i({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},X(fni,`ChevrotainWrapper`),fni),lvi=(pni=class extends cvi{constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}},X(pni,`ProfilerWrapper`),pni),X(UY,`createParser`),X(M9r,`buildRules`),X(N9r,`buildInfixRule`),X(WY,`buildElement`),X(P9r,`buildAction`),X(F9r,`buildRuleCall`),X(I9r,`buildRuleCallPredicate`),X(GY,`buildPredicate`),X(L9r,`buildAlternatives`),X(R9r,`buildUnorderedGroup`),X(z9r,`buildGroup`),X(KY,`getGuardCondition`),X(B9r,`buildCrossReference`),X(V9r,`buildKeyword`),X(H9r,`wrap`),X(qY,`getRule`),X(U9r,`getRuleName`),X(JY,`getToken`),X(W9r,`createCompletionParser`),X(G9r,`createLangiumParser`),X(K9r,`prepareLangiumParser`),O0=(mni=class{constructor(){this.diagnostics=[]}buildTokens(e,t){let n=Uq(jJ(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(mJ).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=BJ(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n};return typeof n==`function`&&(r.LINE_BREAKS=!0),e.hidden&&(r.GROUP=kJ(t)?N1.SKIPPED:`hidden`),r}requiresCustomPattern(e){return!!(e.flags.includes(`u`)||e.flags.includes(`s`))}regexPatternFunction(e){let t=new RegExp(e,e.flags+`y`);return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(nJ).flatMap(e=>Xq(e).filter(uJ)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!(n!=null&&n.caseInsensitive)))}buildKeywordToken(e,t,n){let r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return typeof r==`function`&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(AJ(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n==null?void 0:n.PATTERN;return r!=null&&r.source&&W1r(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},X(mni,`DefaultTokenBuilder`),mni),uvi=(hni=class{convert(e,t){let n=t.grammarSource;if(oJ(n)&&(n=X1r(n)),fJ(n)){let r=n.rule.ref;if(!r)throw Error(`This cst node was not parsed by a rule.`);return this.runConverter(r,e,t)}return e}runConverter(e,t,n){var r;switch(e.name.toUpperCase()){case`INT`:return k0.convertInt(t);case`STRING`:return k0.convertString(t);case`ID`:return k0.convertID(t)}switch((r=d0r(e))==null?void 0:r.toLowerCase()){case`number`:return k0.convertNumber(t);case`boolean`:return k0.convertBoolean(t);case`bigint`:return k0.convertBigint(t);case`date`:return k0.convertDate(t);default:return t}}},X(hni,`DefaultValueConverter`),hni),(function(e){function t(e){let t=``;for(let r=1;r{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},X(gni,`Deferred`),gni),fvi=(_ni=class e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=X9r(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=J9r(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;ee?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1t&&Y9r(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},X(_ni,`FullTextDocument`),_ni),(function(e){function t(e,t,n,r){return new fvi(e,t,n,r)}X(t,`create`),e.create=t;function n(e,t,n){if(e instanceof fvi)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}X(n,`update`),e.update=n;function r(e,t){let n=e.getText(),r=$Y(t.map(Z9r),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(ri&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}X(r,`applyEdits`),e.applyEdits=r})(pvi||(pvi={})),X($Y,`mergeSort`),X(J9r,`computeLineOffsets`),X(Y9r,`isEOL`),X(X9r,`getWellformedRange`),X(Z9r,`getWellformedEdit`),(()=>{var e,t,n={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}X(t,`e`);function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s2){var l=r.lastIndexOf(`/`);if(l!==r.length-1){l===-1?(r=``,i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1}a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}X(n,`r`);var r={resolve:X(function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},`resolve`),normalize:X(function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},`normalize`),isAbsolute:X(function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},`isAbsolute`),join:X(function(){if(arguments.length===0)return`.`;for(var e,n=0;n0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},`join`),relative:X(function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;iu){if(n.charCodeAt(s+f)===47)return n.slice(s+f+1);if(f===0)return n.slice(s+f)}else o>u&&(e.charCodeAt(i+f)===47?d=f:f===0&&(d=0));break}var p=e.charCodeAt(i+f);if(p!==n.charCodeAt(s+f))break;p===47&&(d=f)}var m=``;for(f=i+d+1;f<=a;++f)f!==a&&e.charCodeAt(f)!==47||(m.length===0?m+=`..`:m+=`/..`);return m.length>0?m+n.slice(s+d):(s+=d,n.charCodeAt(s)===47&&++s,n.slice(s))},`relative`),_makeLong:X(function(e){return e},`_makeLong`),dirname:X(function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},`dirname`),basename:X(function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(u===47){if(!o){i=r+1;break}}else l===-1&&(o=!1,l=r+1),s>=0&&(u===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=l))}return i===a?a=l:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},`basename`),extname:X(function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(l!==47)i===-1&&(a=!1,i=s+1),l===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},`extname`),format:X(function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return(function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r})(0,e)},`format`),parse:X(function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,l=-1,u=!0,d=e.length-1,f=0;d>=r;--d)if((i=e.charCodeAt(d))!==47)l===-1&&(u=!1,l=d+1),i===46?o===-1?o=d:f!==1&&(f=1):o!==-1&&(f=-1);else if(!u){s=d+1;break}return o===-1||l===-1||f===0||f===1&&o===l-1&&o===s+1?l!==-1&&(n.base=n.name=s===0&&a?e.slice(1,l):e.slice(s,l)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(s,o),n.base=e.slice(s,l)),n.ext=e.slice(o,l)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},`parse`),sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},r={};function i(e){var t=r[e];if(t!==void 0)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}X(i,`r`),i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};let o;i.r(a),i.d(a,{URI:X(()=>p,`URI`),Utils:X(()=>D,`Utils`)}),typeof process==`object`?o=process.platform===`win32`:typeof navigator==`object`&&(o=navigator.userAgent.indexOf(`Windows`)>=0);let s=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//;function d(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!s.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!l.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(u.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}X(d,`a`);let f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(e){return e instanceof p||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}constructor(e,t,n,r,i,a=!1){E(this,`scheme`,void 0),E(this,`authority`,void 0),E(this,`path`,void 0),E(this,`query`,void 0),E(this,`fragment`,void 0),typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=(function(e,t){return e||t?e:`file`})(e,a),this.authority=t||``,this.path=(function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t})(this.scheme,n||``),this.query=r||``,this.fragment=i||``,d(this,a))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new h(t,n,r,i,a)}static parse(e,t=!1){let n=f.exec(e);return n?new h(n[2]||``,C(n[4]||``),C(n[5]||``),C(n[7]||``),C(n[9]||``),t):new h(``,``,``,``,``)}static file(e){let t=``;if(o&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new h(`file`,t,e,``,``)}static from(e){let t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return d(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof p)return e;{let t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===m?e.fsPath:null,t}}return e}}e=p,X(e,`l`);let m=o?1:void 0;class h extends p{constructor(...e){super(...e),E(this,`_formatted`,null),E(this,`_fsPath`,null)}get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}t=h,X(t,`d`);let g={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function _(e,t,n){let r,i=-1;for(let a=0;a=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=g[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}X(_,`m`);function v(e){let t;for(let n=0;n1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o&&(n=n.replace(/\//g,`\\`)),n}X(y,`v`);function b(e,t){let n=t?v:_,r=``,{scheme:i,authority:a,path:o,query:s,fragment:l}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),l&&(r+=`#`,r+=t?l:_(l,!1,!1)),r}X(b,`b`);function x(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+x(e.substr(3)):e}}X(x,`C`);let S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(S)?e.replace(S,(e=>x(e))):e}X(C,`w`);var w=i(975);let T=w.posix||w;var D;(function(e){e.joinPath=function(e,...t){return e.with({path:T.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=T.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=T.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return T.basename(e.path)},e.extname=function(e){return T.extname(e.path)}})(D||(D={})),mvi=a})(),{URI:P0,Utils:F0}=mvi,(function(e){var t;e.basename=F0.basename,e.dirname=F0.dirname,e.extname=F0.extname,e.joinPath=F0.joinPath,e.resolvePath=F0.resolvePath;let n=typeof process==`object`&&((t=process)==null?void 0:t.platform)===`win32`;function r(e,t){return(e==null?void 0:e.toString())===(t==null?void 0:t.toString())}X(r,`equals`),e.equals=r;function i(e,t){let r=typeof e==`string`?P0.parse(e).path:e.path,i=typeof t==`string`?P0.parse(t).path:t.path,a=r.split(`/`).filter(e=>e.length>0),o=i.split(`/`).filter(e=>e.length>0);if(n){let e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s({name:e.name,uri:I0.joinPath(P0.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(I0.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let n=e.split(`/`);e.charAt(e.length-1)===`/`&&n.pop();let r=this.root;for(let e of n){let n=r.children.get(e);if(!n){if(t)n={name:e,children:new Map,parent:r},r.children.set(e,n);else return}r=n}return r}collectValues(e){let t=[];e.element&&t.push(e.element);for(let n of e.children.values())t.push(...this.collectValues(n));return t}},X(vni,`UriTrie`),vni),(function(e){e[e.Changed=0]=`Changed`,e[e.Parsed=1]=`Parsed`,e[e.IndexedContent=2]=`IndexedContent`,e[e.ComputedScopes=3]=`ComputedScopes`,e[e.Linked=4]=`Linked`,e[e.IndexedReferences=5]=`IndexedReferences`,e[e.Validated=6]=`Validated`})(L0||(L0={})),gvi=(yni=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=A0.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t=t??P0.parse(e.uri),A0.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return A0.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==`string`){let r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{let r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==`string`){let r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}{let r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:L0.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:L0.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){var n,r;let i=(n=e.parseResult.value.$cstNode)==null?void 0:n.root.fullText,a=(r=this.textDocuments)==null?void 0:r.get(e.uri.toString()),o=a?a.getText():await this.fileSystemProvider.readFile(e.uri);if(a)Object.defineProperty(e,"textDocument",{value:a});else{let t=this.createTextDocumentGetter(e.uri,o);Object.defineProperty(e,"textDocument",{get:t})}return i!==o&&(e.parseResult=await this.parseAsync(e.uri,o,t),e.parseResult.value.$document=e),e.state=L0.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){let n=this.serviceRegistry,r;return()=>r??(r=pvi.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``))}},X(yni,`DefaultLangiumDocumentFactory`),yni),_vi=(bni=class{constructor(e){this.documentTrie=new hvi,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return Uq(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,L0.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=L0.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=L0.Changed;return this.documentTrie.delete(t),n}},X(bni,`DefaultLangiumDocuments`),bni),R0=Symbol(`RefResolving`),vvi=(xni=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=A0.CancellationToken.None){var n;if((n=this.profiler)!=null&&n.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of Zq(e.parseResult.value))await QY(t),$q(r).forEach(t=>{let i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(let n of Zq(e.parseResult.value))await QY(t),$q(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=R0;try{let t=this.getCandidate(e);Rq(t)?n._ref=t:(n._nodeDescription=t,n._ref=this.loadAstNode(t)??this.createLinkingError(e,t))}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);let r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if(`_items`in n&&n._items===void 0){n._items=R0;try{let t=this.getCandidates(e),r=[];if(Rq(t))n._linkingError=t;else for(let e of t){let t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(let t of e.references)`_ref`in t?(t._ref=void 0,delete t._nodeDescription):`_items`in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if(Fq(this._ref))return this._ref;if(B$r(this._nodeDescription)){let n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=R0;let n=qq(e).$document,r=i.getLinkedNode({reference:a,container:e,property:t});if(r.error&&n&&n.state0))return this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,n){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(Rq(t))return{error:t};let n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let n=qq(e.container).$document;return n&&n.stateoJ(e)&&e.isMulti)}findDeclarations(e){if(e){let t=t0r(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(Iq(r)||Lq(r))return Jq(r);if(Array.isArray(r)){for(let t of r)if((Iq(t)||Lq(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return Jq(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||D1r(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n){for(let t of $q(n))if(Lq(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){let n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>I0.equals(e.sourceUri,t.documentUri))),n.push(...r),Uq(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=Kq(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:bJ(t),local:!0})}}return n}},X(Cni,`DefaultReferences`),Cni),z0=(_ri=Symbol.iterator,wni=class{constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return uZ.sum(Uq(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let r=n.indexOf(t);if(r>=0)return n.length===1?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?Uq(t):sZ}has(e,t){if(t===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[_ri](){return this.entries().iterator()}entries(){return Uq(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return Uq(this.map.keys())}values(){return Uq(this.map.values()).flat()}entriesGroupedByKey(){return Uq(this.map.entries())}},X(wni,`MultiMap`),wni),B0=(Tni=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t!==void 0&&(this.map.delete(e),this.inverse.delete(t),!0)}},X(Tni,`BiMap`),Tni),xvi=(Eni=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=A0.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=Yq,r=A0.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await QY(r),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,n){let r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=A0.CancellationToken.None){let n=e.parseResult.value,r=new z0;for(let i of Xq(n))await QY(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){let r=e.$container;if(r){let i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}},X(Eni,`DefaultScopeComputation`),Eni),Svi=(Dni=class{constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},X(Dni,`StreamScope`),Dni),Cvi=(Oni=class{constructor(e,t,n){this.elements=new Map,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t),r=n?[n]:[];return(this.concatOuterScope||r.length>0)&&this.outerScope?Uq(r).concat(this.outerScope.getElements(e)):Uq(r)}getAllElements(){let e=Uq(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},X(Oni,`MapScope`),Oni),wvi=(kni=class{constructor(e,t,n){this.elements=new z0,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||n.length===0)&&this.outerScope?Uq(n).concat(this.outerScope.getElements(e)):Uq(n)}getAllElements(){let e=Uq(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},X(kni,`MultiMapScope`),kni),Tvi={getElement(){},getElements(){return sZ},getAllElements(){return sZ}},V0=(Ani=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error(`This cache has already been disposed`)}},X(Ani,`DisposableCache`),Ani),Evi=(jni=class extends V0{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},X(jni,`SimpleCache`),jni),H0=(Mni=class extends V0{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();let r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){let e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}},X(Mni,`ContextCache`),Mni),Dvi=(Nni=class extends H0{constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(let e of t)this.clear(e)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{let n=e.concat(t);for(let e of n)this.clear(e)}))}},X(Nni,`DocumentCache`),Nni),Ovi=(Pni=class extends Evi{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},X(Pni,`WorkspaceCache`),Pni),kvi=(Fni=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new Ovi(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=Kq(e.container).localSymbols;if(r){let i=e.container;do r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container;while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new Svi(Uq(e),t,n)}createScopeForNodes(e,t,n){return new Svi(Uq(e).map(e=>{let t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new wvi(this.indexManager.allElements(e)))}},X(Fni,`DefaultScopeProvider`),Fni),X($9r,`isAstNodeWithComment`),X(eei,`isIntermediateReference`),Avi=(Ini=class{constructor(e){this.ignoreProperties=new Set([`$container`,`$containerProperty`,`$containerIndex`,`$document`,`$cstNode`]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let n=t??{},r=t==null?void 0:t.replacer,i=X((e,t)=>this.replacer(e,t,n),`defaultReplacer`),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=Kq(e),JSON.stringify(e,a,t==null?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(Iq(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=Kq(e),n=``;this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString());let i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}var s;return{$error:((s=t.error)==null?void 0:s.message)??`Could not resolve reference`,$refText:r}}if(Lq(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=Kq(e.ref),i=``;this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());let a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:e}}if(Fq(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&n!=null&&n.$textRegion)){var l;n.$textRegion.documentURI=(l=this.currentDocument)==null?void 0:l.uri.toString()}if(r&&!e){var u;n??(n={...t}),n.$sourceText=(u=t.$cstNode)==null?void 0:u.text}if(a){n??(n={...t});let e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,``))}return n??t}return t}}addAstNodeRegionWithAssignmentsTo(e){let t=X(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),`createDocumentSegment`);if(e.$cstNode){let n=e.$textRegion=t(e.$cstNode),r=n.assignments={};return Object.keys(e).filter(e=>!e.startsWith(`$`)).forEach(n=>{let i=Q1r(e.$cstNode,n).map(t);i.length!==0&&(r[n]=i)}),e}}linkNode(e,t,n,r,i,a){for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let a=0;a{await this.handleException(()=>e.call(t,n,r,i),`An error occurred during validation`,r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(ZY(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n(`error`,`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if(e===`AstNode`)this.entries.add(`AstNode`,t);else for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=Uq(this.entries.get(e)).concat(this.entries.get(`AstNode`));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,`An error occurred during set-up of the validation`,t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,`An error occurred during tear-down of the validation`,t))}wrapPreparationException(e,t,n){return async(r,i,a,o)=>{await this.handleException(()=>e.call(n,r,i,a,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},X(Rni,`ValidationRegistry`),Rni),Pvi=Object.freeze({validateNode:!0,validateChildren:!0}),Fvi=(zni=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=A0.CancellationToken.None){let r=e.parseResult,i=[];if(await QY(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>{var t;return((t=e.data)==null?void 0:t.code)===U0.LexingError})||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>{var t;return((t=e.data)==null?void 0:t.code)===U0.ParsingError}))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>{var t;return((t=e.data)==null?void 0:t.code)===U0.LinkingError}))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(ZY(e))throw e;console.error(`An error occurred during validation:`,e)}return await QY(n),i}processLexingErrors(e,t,n){var r;let i=[...e.lexerErrors,...((r=e.lexerReport)==null?void 0:r.diagnostics)??[]];for(let e of i){let n=e.severity??`error`,r={severity:tX(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:nei(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if(`previousToken`in n){let t=n.previousToken;if(isNaN(t.startOffset)){let t={line:0,character:0};e={start:t,end:t}}else{let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=yJ(n.token);if(e){let r={severity:tX(`error`),range:e,message:n.message,data:eX(U0.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(let n of e.references){let e=n.error;if(e){var r;let i={node:e.info.container,range:(r=n.$refNode)==null?void 0:r.range,property:e.info.property,index:e.info.index,data:{code:U0.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic(`error`,e.message,i))}}}async validateAst(e,t,n=A0.CancellationToken.None){let r=[],i=X((e,t,n)=>{r.push(this.toDiagnostic(e,t,n))},`acceptor`);return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=A0.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await QY(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=A0.CancellationToken.None){var i;if((i=this.profiler)!=null&&i.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=Zq(e).iterator();for(let e of a){i.startSubTask(e.$type);let o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=Zq(e).iterator();for(let e of i){await QY(r);let a=this.validateSingleNodeOptions(e,t);if(a.validateNode){let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return Pvi}async validateAstAfter(e,t,n,r=A0.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await QY(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:tei(n),severity:tX(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},X(zni,`DefaultDocumentValidator`),zni),X(tei,`getDiagnosticRange`),X(tX,`toDiagnosticSeverity`),X(nei,`toDiagnosticData`),(function(e){e.LexingError=`lexing-error`,e.LexingWarning=`lexing-warning`,e.LexingInfo=`lexing-info`,e.LexingHint=`lexing-hint`,e.ParsingError=`parsing-error`,e.LinkingError=`linking-error`})(U0||(U0={})),Ivi=(Bni=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??Kq(e);t??(t=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${i} has no name.`);let a,o=X(()=>a??(a=bJ(this.nameProvider.getNameNode(e)??e.$cstNode)),`nameSegmentGetter`);return{node:e,name:t,get nameSegment(){return o()},selectionSegment:bJ(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},X(Bni,`DefaultAstNodeDescriptionProvider`),Bni),Lvi=(Vni=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=A0.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of Zq(r))await QY(t),$q(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let n=[];Iq(t)&&t.$nodeDescription?n=[t.$nodeDescription]:Lq(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=Kq(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=bJ(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:I0.equals(e.documentUri,r)});return a}},X(Vni,`DefaultReferenceDescriptionProvider`),Vni),Rvi=(Hni=class{constructor(){this.segmentSeparator=`/`,this.indexSeparator=`@`}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return``}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error(`Missing '$containerProperty' in AST node.`);return t===void 0?e:e+this.indexSeparator+t}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||t.length===0)return e;let n=t.indexOf(this.indexSeparator);if(n>0){let r=t.substring(0,n),i=parseInt(t.substring(n+1)),a=e[r];return a==null?void 0:a[i]}return e[t]},e)}},X(Hni,`DefaultAstNodeLocator`),Hni),W0={},vX(W0,yX(QX(),1)),zvi=(Uni=class{constructor(e){this._ready=new N0,this.onConfigurationSectionUpdateEmitter=new W0.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t;this.workspaceConfig=((t=e.capabilities.workspace)==null?void 0:t.configuration)??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings==`object`&&e.settings!==null&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},X(Uni,`DefaultConfigurationProvider`),Uni),G0=yX(cai(),1),(function(e){function t(e){return{dispose:X(async()=>await e(),`dispose`)}}X(t,`create`),e.create=t})(K0||(K0={})),Bvi=(Wni=class{constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new z0,this.documentPhaseListeners=new z0,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=L0.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=A0.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===L0.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,L0.IndexedReferences);else if(typeof t.validation==`object`){let i=this.findMissingValidationCategories(n,t);if(i.length>0){var r;this.buildState.set(e,{completed:!1,options:{validation:{categories:i}},result:(r=this.buildState.get(e))==null?void 0:r.result}),n.state=L0.IndexedReferences}}}else this.buildState.delete(e)}this.currentState=L0.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=A0.CancellationToken.None){this.currentState=L0.Changed;let r=[];for(let e of t){let t=this.langiumDocuments.deleteDocuments(e);for(let e of t)r.push(e.uri),this.cleanUpDeleted(e)}let i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(let e of i){let t=this.langiumDocuments.getDocument(e);t===void 0&&(t=this.langiumDocumentFactory.fromModel({$type:`INVALID`},e),t.state=L0.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,L0.Changed)}let a=Uq(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,L0.ComputedScopes)),await this.emitUpdate(i,r),await QY(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>{var t;return e.state=1}findMissingValidationCategories(e,t){var n,r;let i=this.buildState.get(e.uri.toString()),a=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),o=i!=null&&(n=i.result)!=null&&n.validationChecks?new Set(i==null||(r=i.result)==null?void 0:r.validationChecks):i!=null&&i.completed?a:new Set;return Uq(t===void 0||t.validation===!0?a:typeof t.validation==`object`?t.validation.categories??a:[]).filter(e=>!o.has(e)).toArray()}async findChangedUris(e){var t;if(this.langiumDocuments.getDocument(e)??((t=this.textDocuments)==null?void 0:t.get(e)))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t=0&&!this.hasTextDocument(e[n]);)n--;te.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),K0.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case L0.Changed:case L0.Parsed:this.indexManager.removeContent(e.uri);case L0.IndexedContent:e.localSymbols=void 0;case L0.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case L0.Linked:this.indexManager.removeReferences(e.uri);case L0.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case L0.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=L0.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,L0.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,L0.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,L0.ComputedScopes,n,async e=>{e.localSymbols=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e,n)});let r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,L0.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,L0.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));let i=e.filter(e=>this.shouldValidate(e)?!0:(this.markAsCompleted(e),!1));await this.runCancelable(i,L0.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let n of e){let e=n.uri.toString(),r=this.buildState.get(e);(!r||r.completed)&&this.buildState.set(e,{completed:!1,options:t,result:r==null?void 0:r.result})}}async runCancelable(e,t,n,r){for(let i of e)i.statee.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),K0.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),K0.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??(n=A0.CancellationToken.None),r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){let r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(M0):this.currentState>=e&&e>r.state?Promise.reject(new G0.ResponseError(G0.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${L0[r.state]}, requiring ${L0[e]}, but workspace state is already ${L0[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{I0.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(M0)})}):Promise.reject(new G0.ResponseError(G0.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(M0):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(M0)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await QY(n),await t(e,n)}catch(e){if(!ZY(e))throw e}}async notifyBuildPhase(e,t,n){if(e.length===0)return;let r=this.buildPhaseListeners.get(t).slice();for(let t of r)await QY(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i=typeof r.validation==`object`?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);let a=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=Uq(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){var t;return((t=this.buildState.get(e.uri.toString()))==null?void 0:t.options)??{}}},X(Wni,`DefaultDocumentBuilder`),Wni),Vvi=(Gni=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new H0,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=Kq(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{I0.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),Uq(r)}allElements(e,t){let n=Uq(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=A0.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),r=e.uri.toString();this.symbolIndex.set(r,n),this.symbolByTypeIndex.clear(r)}async updateReferences(e,t=A0.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(e=>!e.local&&t.has(e.targetUri.toString())):!1}},X(Gni,`DefaultIndexManager`),Gni),Hvi=(Kni=class{constructor(e){this.initialBuildOptions={},this._ready=new N0,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=A0.CancellationToken.None){let n=await this.performStartup(e);await QY(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=X(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},`collector`);await this.loadAdditionalDocuments(e,n);let r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));let i=Uq(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{t(await this.langiumDocuments.getOrCreateDocument(e))}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return P0.parse(e.uri)}async traverseFolder(e,t){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error(`Failure to read directory content of `+e.toString(!0),t)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=I0.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},X(Kni,`DefaultWorkspaceManager`),Kni),Uvi=(qni=class{buildUnexpectedCharactersMessage(e,t,n,r,i){return Zdi.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return Zdi.buildUnableToPopLexerModeMessage(e)}},X(qni,`DefaultLexerErrorMessageProvider`),qni),Wvi={mode:`full`},Gvi=(Jni=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let n=iX(t)?Object.values(t):t,r=e.LanguageMetaData.mode===`production`;this.chevrotainLexer=new N1(n,{positionTracking:`full`,skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=Wvi){var n,r;let i=this.chevrotainLexer.tokenize(e);return{tokens:i.tokens,errors:i.errors,hidden:i.groups.hidden??[],report:(n=(r=this.tokenBuilder).flushLexingReport)==null?void 0:n.call(r,e)}}toTokenTypeDictionary(e){if(iX(e))return e;let t=rX(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}},X(Jni,`DefaultLexer`),Jni),X(nX,`isTokenTypeArray`),X(rX,`isIMultiModeLexerDefinition`),X(iX,`isTokenTypeDictionary`),YX(),X(rei,`parseJSDoc`),X(iei,`isJSDoc`),X(aei,`getLines`),Kvi=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,qvi=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,X(oei,`tokenize`),X(sei,`buildInlineTokens`),Jvi=/\S/,Yvi=/\s*$/,X(aX,`skipWhitespace`),X(cei,`lastCharacter`),X(lei,`parseJSDocComment`),X(uei,`parseJSDocElement`),X(dei,`appendEmptyLine`),X(fei,`parseJSDocText`),X(pei,`parseJSDocInline`),X(mei,`parseJSDocTag`),X(hei,`parseJSDocLine`),X(oX,`normalizeOptions`),X(sX,`normalizeOption`),Xvi=(Yni=class{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>`name`in e)}toString(){let e=``;for(let t of this.elements)if(e.length===0)e=t.toString();else{let n=t.toString();e+=vei(e)+n}return e.trim()}toMarkdown(e){let t=``;for(let n of this.elements)if(t.length===0)t=n.toMarkdown(e);else{let r=n.toMarkdown(e);t+=vei(t)+r}return t.trim()}},X(Yni,`JSDocCommentImpl`),Yni),Zvi=(Xni=class{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} ${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t;return(e==null||(t=e.renderTag)==null?void 0:t.call(e,this))??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let n=gei(this.name,t,e??{});if(typeof n==`string`)return n}let n=``;(e==null?void 0:e.tag)===`italic`||(e==null?void 0:e.tag)===void 0?n=`*`:(e==null?void 0:e.tag)===`bold`?n=`**`:(e==null?void 0:e.tag)===`bold-italic`&&(n=`***`);let r=`${n}@${this.name}${n}`;return this.content.inlines.length===1?r=`${r} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r} ${t}`),this.inline?`{${r}}`:r}},X(Xni,`JSDocTagImpl`),Xni),X(gei,`renderInlineTag`),X(_ei,`renderLinkDefault`),Qvi=(Zni=class{constructor(e,t){this.inlines=e,this.range=t}toString(){let e=``;for(let t=0;tn.range.start.line&&(e+=` `)}return e}toMarkdown(e){let t=``;for(let n=0;nr.range.start.line&&(t+=` `)}return t}},X(Zni,`JSDocTextImpl`),Zni),$vi=(Qni=class{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},X(Qni,`JSDocLineImpl`),Qni),X(vei,`fillNewlines`),eyi=($ni=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&iei(t))return rei(t).toMarkdown({renderLink:X((t,n)=>this.documentationLinkRenderer(e,t,n),`renderLink`),renderTag:X(t=>this.documentationTagRenderer(e,t),`renderTag`)})}documentationLinkRenderer(e,t,n){let r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){let e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=Kq(e).localSymbols;if(!n)return;let r=e;do{let e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},X($ni,`JSDocDocumentationProvider`),$ni),tyi=(eri=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return $9r(e)?e.$comment:(t=j1r(e.$cstNode,this.grammarConfig().multilineCommentRules))==null?void 0:t.text}},X(eri,`DefaultCommentProvider`),eri),nyi=(tri=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},X(tri,`DefaultAsyncParser`),tri),ryi=(nri=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let n=await this.acquireParserWorker(t),r=new N0,i,a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(e=>{let t=this.hydrator.hydrate(e);r.resolve(t)}).catch(e=>{r.reject(e)}).finally(()=>{a.dispose(),clearTimeout(i)}),r.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let e of this.workerPool)if(e.ready)return e.lock(),e;let t=new N0;return e.onCancellationRequested(()=>{let e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1),t.reject(M0)}),this.queue.push(t),t.promise}},X(nri,`AbstractThreadedAsyncParser`),nri),iyi=(rri=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,n,r){this.onReadyEmitter=new W0.Emitter,this.deferred=new N0,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=r,t(e=>{let t=e;this.deferred.resolve(t),this.unlock()}),n(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(M0),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw Error(`Parser worker is busy`);return this._parsing=!0,this.deferred=new N0,this.sendMessage(e),this.deferred.promise}},X(rri,`ParserWorker`),rri),ayi=(iri=class{constructor(){this.previousTokenSource=new A0.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=XY();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=A0.CancellationToken.None){let r=new N0,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{let r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(e){ZY(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},X(iri,`DefaultWorkspaceLock`),iri),oyi=(ari=class{constructor(e){this.grammarElementIdMap=new B0,this.tokenTypeIdMap=new B0,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,n=new Map;for(let n of Zq(e))t.set(n,{});if(e.$cstNode)for(let t of vJ(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`)){if(Array.isArray(i)){let e=[];n[r]=e;for(let n of i)Fq(n)?e.push(this.dehydrateAstNode(n,t)):Iq(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else Fq(i)?n[r]=this.dehydrateAstNode(i,t):Iq(i)?n[r]=this.dehydrateReference(i,t):i!==void 0&&(n[r]=i)}return n}dehydrateReference(e,t){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){let n=t.cstNodes.get(e);return Vq(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),zq(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Bq(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let t=e.value,n=this.createHydrationContext(t);return`$cstNode`in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){let t=new Map,n=new Map;for(let n of Zq(e))t.set(n,{});let r;if(e.$cstNode)for(let t of vJ(e.$cstNode)){let e;`fullText`in t?(e=new $_i(t.fullText),r=e):`content`in t?e=new E0:`tokenType`in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`)){if(Array.isArray(i)){let e=[];n[r]=e;for(let a of i)Fq(a)?e.push(this.setParent(this.hydrateAstNode(a,t),n)):Iq(a)?e.push(this.hydrateReference(a,n,r,t)):e.push(a)}else Fq(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):Iq(i)?n[r]=this.hydrateReference(i,n,r,t):i!==void 0&&(n[r]=i)}return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){let r=t.cstNodes.get(e);if(typeof e.grammarSource==`number`&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),zq(r))for(let i of e.content){let e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,a=e.startColumn,o=e.endLine,s=e.endColumn,l=e.hidden;return new T0(n,r,{start:{line:i,character:a},end:{line:o,character:s}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of Zq(this.grammar))tJ(t)&&this.grammarElementIdMap.set(t,e++)}},X(ari,`DefaultHydrator`),ari),X(cX,`createDefaultCoreModule`),X(lX,`createDefaultSharedCoreModule`),(function(e){e.merge=(e,t)=>dX(dX({},e),t)})(syi||(syi={})),X(uX,`inject`),cyi=Symbol(`isProxy`),X(yei,`eagerLoad`),X(bei,`_inject`),lyi=Symbol(),X(xei,`_resolve`),X(dX,`_merge`),uyi={indentTokenName:`INDENT`,dedentTokenName:`DEDENT`,whitespaceTokenName:`WS`,ignoreIndentationDelimiters:[]},(function(e){e.REGULAR=`indentation-sensitive`,e.IGNORE_INDENTATION=`ignore-indentation`})(q0||(q0={})),dyi=(ori=class extends O0{constructor(e=uyi){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...uyi,...e},this.indentTokenType=pY({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=pY({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let n=super.buildTokens(e,t);if(!nX(n))throw Error(`Invalid tokens built by default builder`);let{indentTokenName:r,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:o}=this.options,s,l,u,d=[];for(let e of n){for(let[t,n]of o)e.name===t?e.PUSH_MODE=q0.IGNORE_INDENTATION:e.name===n&&(e.POP_MODE=!0);e.name===i?s=e:e.name===r?l=e:e.name===a?u=e:d.push(e)}if(!s||!l||!u)throw Error(`Some indentation/whitespace tokens not found!`);return o.length>0?{modes:{[q0.REGULAR]:[s,l,...d,u],[q0.IGNORE_INDENTATION]:[...d,u]},defaultMode:q0.REGULAR}:[s,l,u,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r `.includes(e[t-1])}matchWhitespace(e,t,n,r){this.whitespaceRegExp.lastIndex=t;let i=this.whitespaceRegExp.exec(e);return{currIndentLevel:(i==null?void 0:i[0].length)??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,t,n,r){let i=this.getLineNumber(t,r);return mY(e,n,r,r+n.length,i,i,1,n.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,n,r){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,n,r);return i<=a?null:(this.indentationStack.push(i),o)}dedentMatcher(e,t,n,r){var i;if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:a,prevIndentLevel:o,match:s}=this.matchWhitespace(e,t,n,r);if(a>=o)return null;let l=this.indentationStack.lastIndexOf(a);if(l===-1){var u;return this.diagnostics.push({severity:`error`,message:`Invalid dedent level ${a} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:(s==null||(u=s[0])==null?void 0:u.length)??0,line:this.getLineNumber(e,t),column:1}),null}let d=this.indentationStack.length-l-1,f=((i=e.substring(0,t).match(/[\r\n]+$/))==null?void 0:i[0].length)??1;for(let r=0;r1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,``,e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},X(ori,`IndentationAwareTokenBuilder`),ori),fyi=(sri=class extends Gvi{constructor(e){if(super(e),e.parser.TokenBuilder instanceof dyi)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw Error(`IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder`)}tokenize(e,t=Wvi){let n=super.tokenize(e),r=n.report;(t==null?void 0:t.mode)===`full`&&n.tokens.push(...r.remainingDedents),r.remainingDedents=[];let{indentTokenType:i,dedentTokenType:a}=this.indentationTokenBuilder,o=i.tokenTypeIdx,s=a.tokenTypeIdx,l=[],u=n.tokens.length-1;for(let e=0;e=0&&l.push(n.tokens[u]),n.tokens=l,n}},X(sri,`IndentationAwareLexer`),sri),pyi={},gX(pyi,{AstUtils:()=>dZ,BiMap:()=>B0,Cancellation:()=>A0,ContextCache:()=>H0,CstUtils:()=>iZ,DONE_RESULT:()=>cZ,Deferred:()=>N0,Disposable:()=>K0,DisposableCache:()=>V0,DocumentCache:()=>Dvi,EMPTY_STREAM:()=>sZ,ErrorWithLocation:()=>mQ,GrammarUtils:()=>pQ,MultiMap:()=>z0,OperationCancelled:()=>M0,Reduction:()=>uZ,RegExpUtils:()=>hQ,SimpleCache:()=>Evi,StreamImpl:()=>oZ,TreeStreamImpl:()=>lZ,URI:()=>P0,UriTrie:()=>hvi,UriUtils:()=>I0,WorkspaceCache:()=>Ovi,assertCondition:()=>B1r,assertUnreachable:()=>CJ,delayNextTick:()=>YY,interruptAndCheck:()=>QY,isOperationCancelled:()=>ZY,loadGrammarFromJson:()=>fX,setInterruptionPeriod:()=>q9r,startCancelableOperation:()=>XY,stream:()=>Uq}),vX(pyi,W0),myi=(cri=class{stat(e){throw Error(`No file system is available.`)}statSync(e){throw Error(`No file system is available.`)}async exists(){return!1}existsSync(){return!1}readBinary(){throw Error(`No file system is available.`)}readBinarySync(){throw Error(`No file system is available.`)}readFile(){throw Error(`No file system is available.`)}readFileSync(){throw Error(`No file system is available.`)}async readDirectory(){return[]}readDirectorySync(){return[]}},X(cri,`EmptyFileSystemProvider`),cri),J0={fileSystemProvider:X(()=>new myi,`fileSystemProvider`)},hyi={Grammar:X(()=>void 0,`Grammar`),LanguageMetaData:X(()=>({caseInsensitive:!1,fileExtensions:[`.langium`],languageId:`langium`}),`LanguageMetaData`)},gyi={AstReflection:X(()=>new lQ,`AstReflection`)},X(Sei,`createMinimalGrammarServices`),X(fX,`loadGrammarFromJson`),vX(lai,pyi),_yi=(lri=class{constructor(e){this.activeCategories=new Set,this.allCategories=new Set([`validating`,`parsing`,`linking`]),this.activeCategories=e??new Set(this.allCategories),this.records=new z0}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new vyi(t=>this.records.add(e,this.dumpRecord(e,t)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let n=[];for(let e of t.entries.keys()){let r=t.entries.get(e),i=r.reduce((e,t)=>e+t);n.push({name:`${t.identifier}.${e}`,count:r.length,duration:i})}let r=t.duration-n.map(e=>e.duration).reduce((e,t)=>e+t,0);n.push({name:t.identifier,count:1,duration:r}),n.sort((e,t)=>t.duration-e.duration);function i(e){return Math.round(100*e)/100}return X(i,`Round`),console.table(n.map(e=>({Element:e.name,Count:e.count,"Self %":i(100*e.duration/t.duration),"Time (ms)":i(e.duration)}))),t}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},X(lri,`DefaultLangiumProfiler`),lri),vyi=(uri=class{constructor(e,t){this.stack=[],this.entries=new z0,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(`, `)}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw Error(`Sub-Task "${t.id}" is not already stopped.`);let n=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);let r=n-t.content;this.entries.add(e,r)}},X(uri,`ProfilingTask`),uri),(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[^\[\]\r\n]+)\]/}})(yyi||(yyi={})),(e=>{e.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(byi||(byi={})),(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(xyi||(xyi={})),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(Syi||(Syi={})),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Cyi||(Cyi={})),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(wyi||(wyi={})),(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Tyi||(Tyi={})),(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Eyi||(Eyi={})),(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})(Dyi||(Dyi={})),(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(Oyi||(Oyi={})),(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(kyi||(kyi={})),(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(Ayi||(Ayi={})),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(jyi||(jyi={})),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})(Myi||(Myi={})),(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Nyi||(Nyi={})),{...yyi.Terminals,...byi.Terminals,...xyi.Terminals,...Syi.Terminals,...Cyi.Terminals,...wyi.Terminals,...Tyi.Terminals,...Eyi.Terminals,...Dyi.Terminals,...Oyi.Terminals,...kyi.Terminals,...Ayi.Terminals,...Myi.Terminals,...jyi.Terminals,...Nyi.Terminals},Pyi={$type:`AbnfAlternation`,alternatives:`alternatives`},Fyi={$type:`AbnfConcatenation`,elements:`elements`},Iyi={$type:`AbnfElement`,primary:`primary`,repeat:`repeat`},Lyi={$type:`AbnfGroup`,element:`element`},Ryi={$type:`AbnfNumVal`,value:`value`},zyi={$type:`AbnfOptionalGroup`,element:`element`},Y0={$type:`AbnfPrimary`},Byi={$type:`AbnfRule`,definition:`definition`,name:`name`},Vyi={$type:`AbnfRuleName`,name:`name`},Hyi={$type:`AbnfStringLiteral`,value:`value`},X0={$type:`Accelerator`,name:`name`,x:`x`,y:`y`},Uyi={$type:`Alignment`,direction:`direction`,members:`members`},Z0={$type:`Anchor`,evolution:`evolution`,name:`name`,visibility:`visibility`},Q0={$type:`Annotation`,number:`number`,text:`text`,x:`x`,y:`y`},Wyi={$type:`Annotations`,x:`x`,y:`y`},$0={$type:`Architecture`,accDescr:`accDescr`,accTitle:`accTitle`,alignments:`alignments`,edges:`edges`,groups:`groups`,junctions:`junctions`,services:`services`,title:`title`},X(Cei,`isArchitecture`),e2={$type:`Axis`,label:`label`,name:`name`},t2={$type:`Branch`,name:`name`,order:`order`},X(wei,`isBranch`),Gyi={$type:`Checkout`,branch:`branch`},n2={$type:`CherryPicking`,id:`id`,parent:`parent`,tags:`tags`},Kyi={$type:`ClassDefStatement`,className:`className`,styleText:`styleText`},r2={$type:`Commit`,id:`id`,message:`message`,tags:`tags`,type:`type`},X(Tei,`isCommit`),i2={$type:`Common`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`},a2={$type:`Component`,decorator:`decorator`,evolution:`evolution`,inertia:`inertia`,label:`label`,name:`name`,visibility:`visibility`},o2={$type:`Curve`,entries:`entries`,label:`label`,name:`name`},s2={$type:`Cynefin`,accDescr:`accDescr`,accTitle:`accTitle`,domains:`domains`,title:`title`,transitions:`transitions`},X(Eei,`isCynefin`),c2={$type:`Deaccelerator`,name:`name`,x:`x`,y:`y`},qyi={$type:`Decorator`,strategy:`strategy`},l2={$type:`Direction`,accDescr:`accDescr`,accTitle:`accTitle`,dir:`dir`,statements:`statements`,title:`title`},u2={$type:`DomainBlock`,domain:`domain`,items:`items`},X(Dei,`isDomainBlock`),Jyi={$type:`DomainItem`,label:`label`},X(Oei,`isDomainItem`),Yyi={$type:`EbnfChoice`,alternatives:`alternatives`},Xyi={$type:`EbnfExceptionPostfix`,except:`except`},Zyi={$type:`EbnfGroup`,element:`element`},Qyi={$type:`EbnfNonTerminal`,name:`name`},$yi={$type:`EbnfOneOrMorePostfix`,operator:`operator`},ebi={$type:`EbnfOptional`,element:`element`},tbi={$type:`EbnfOptionalPostfix`,operator:`operator`},d2={$type:`EbnfPostfix`},f2={$type:`EbnfPrimary`},nbi={$type:`EbnfRepetition`,element:`element`},rbi={$type:`EbnfRule`,definition:`definition`,name:`name`},ibi={$type:`EbnfSequence`,elements:`elements`},abi={$type:`EbnfSpecial`,text:`text`},obi={$type:`EbnfTerm`,base:`base`,postfixes:`postfixes`},sbi={$type:`EbnfTerminal`,value:`value`},cbi={$type:`EbnfZeroOrMorePostfix`,operator:`operator`},p2={$type:`Edge`,lhsDir:`lhsDir`,lhsGroup:`lhsGroup`,lhsId:`lhsId`,lhsInto:`lhsInto`,rhsDir:`rhsDir`,rhsGroup:`rhsGroup`,rhsId:`rhsId`,rhsInto:`rhsInto`,title:`title`},m2={$type:`EmDataEntity`,dataBlockValue:`dataBlockValue`,dataType:`dataType`,name:`name`},h2={$type:`EmFrame`},g2={$type:`EmGwt`,givenStatements:`givenStatements`,sourceFrame:`sourceFrame`,thenStatements:`thenStatements`,whenStatements:`whenStatements`},lbi={$type:`EmGwtStatement`,entityIdentifier:`entityIdentifier`},ubi={$type:`EmModelEntity`,name:`name`},X(kei,`isEmModelEntityType`),_2={$type:`EmNoteEntity`,dataBlockValue:`dataBlockValue`,dataType:`dataType`,sourceFrame:`sourceFrame`},v2={$type:`EmResetFrame`,dataInlineValue:`dataInlineValue`,dataReference:`dataReference`,dataType:`dataType`,entityIdentifier:`entityIdentifier`,modelEntityType:`modelEntityType`,name:`name`,sourceFrames:`sourceFrames`},X(Aei,`isEmResetFrame`),y2={$type:`EmTimeFrame`,dataInlineValue:`dataInlineValue`,dataReference:`dataReference`,dataType:`dataType`,entityIdentifier:`entityIdentifier`,modelEntityType:`modelEntityType`,name:`name`,sourceFrames:`sourceFrames`},dbi={$type:`Entry`,axis:`axis`,value:`value`},b2={$type:`EventModel`,accDescr:`accDescr`,accTitle:`accTitle`,dataEntities:`dataEntities`,frames:`frames`,gwtEntities:`gwtEntities`,modelEntities:`modelEntities`,noteEntities:`noteEntities`,title:`title`},fbi={$type:`Evolution`,stages:`stages`},x2={$type:`EvolutionStage`,boundary:`boundary`,name:`name`,secondName:`secondName`},pbi={$type:`Evolve`,component:`component`,target:`target`},S2={$type:`GitGraph`,accDescr:`accDescr`,accTitle:`accTitle`,statements:`statements`,title:`title`},X(jei,`isGitGraph`),C2={$type:`Group`,icon:`icon`,id:`id`,in:`in`,title:`title`},w2={$type:`Info`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`},X(Mei,`isInfo`),T2={$type:`Item`,classSelector:`classSelector`,name:`name`},mbi={$type:`Junction`,id:`id`,in:`in`},E2={$type:`Label`,negX:`negX`,negY:`negY`,offsetX:`offsetX`,offsetY:`offsetY`},D2={$type:`Leaf`,classSelector:`classSelector`,name:`name`,value:`value`},O2={$type:`Link`,arrow:`arrow`,from:`from`,fromPort:`fromPort`,linkLabel:`linkLabel`,to:`to`,toPort:`toPort`},k2={$type:`Merge`,branch:`branch`,id:`id`,tags:`tags`,type:`type`},X(Nei,`isMerge`),A2={$type:`Note`,evolution:`evolution`,text:`text`,visibility:`visibility`},hbi={$type:`Option`,name:`name`,value:`value`},j2={$type:`Packet`,accDescr:`accDescr`,accTitle:`accTitle`,blocks:`blocks`,title:`title`},X(Pei,`isPacket`),M2={$type:`PacketBlock`,bits:`bits`,end:`end`,label:`label`,start:`start`},X(Fei,`isPacketBlock`),gbi={$type:`PegAny`,dot:`dot`},_bi={$type:`PegGroup`,element:`element`},vbi={$type:`PegIdentifier`,name:`name`},ybi={$type:`PegLiteral`,value:`value`},bbi={$type:`PegOrderedChoice`,alternatives:`alternatives`},xbi={$type:`PegPrefix`,operator:`operator`,suffix:`suffix`},N2={$type:`PegPrimary`},Sbi={$type:`PegRule`,definition:`definition`,name:`name`},Cbi={$type:`PegSequence`,elements:`elements`},wbi={$type:`PegSuffix`,operator:`operator`,primary:`primary`},P2={$type:`Pie`,accDescr:`accDescr`,accTitle:`accTitle`,sections:`sections`,showData:`showData`,title:`title`},X(Iei,`isPie`),F2={$type:`PieSection`,label:`label`,value:`value`},X(Lei,`isPieSection`),Tbi={$type:`Pipeline`,components:`components`,parent:`parent`},I2={$type:`PipelineComponent`,evolution:`evolution`,label:`label`,name:`name`},L2={$type:`Radar`,accDescr:`accDescr`,accTitle:`accTitle`,axes:`axes`,curves:`curves`,options:`options`,title:`title`},R2={$type:`Railroad`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`},X(Rei,`isRailroad`),z2={$type:`RailroadAbnf`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`},X(zei,`isRailroadAbnf`),Ebi={$type:`RailroadChoiceExpr`,alternatives:`alternatives`},B2={$type:`RailroadEbnf`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`},X(Bei,`isRailroadEbnf`),V2={$type:`RailroadExpression`},Dbi={$type:`RailroadNonTerminalExpr`,name:`name`},Obi={$type:`RailroadOneOrMoreExpr`,element:`element`},kbi={$type:`RailroadOptionalExpr`,element:`element`},H2={$type:`RailroadPeg`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`},X(Vei,`isRailroadPeg`),Abi={$type:`RailroadRule`,definition:`definition`,name:`name`},jbi={$type:`RailroadSequenceExpr`,elements:`elements`},Mbi={$type:`RailroadSpecialExpr`,text:`text`},Nbi={$type:`RailroadTerminalExpr`,value:`value`},Pbi={$type:`RailroadZeroOrMoreExpr`,element:`element`},Fbi={$type:`Section`,classSelector:`classSelector`,name:`name`},U2={$type:`Service`,icon:`icon`,iconText:`iconText`,id:`id`,in:`in`,title:`title`},Ibi={$type:`Size`,height:`height`,width:`width`},W2={$type:`Statement`},G2={$type:`Transition`,from:`from`,label:`label`,to:`to`},X(Hei,`isTransition`),K2={$type:`Treemap`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`,TreemapRows:`TreemapRows`},X(Uei,`isTreemap`),Lbi={$type:`TreemapRow`,indent:`indent`,item:`item`},q2={$type:`TreeNode`,classAnnotation:`classAnnotation`,descAnnotation:`descAnnotation`,iconAnnotation:`iconAnnotation`,indent:`indent`,name:`name`},J2={$type:`TreeView`,accDescr:`accDescr`,accTitle:`accTitle`,nodes:`nodes`,title:`title`},Y2={$type:`Wardley`,accDescr:`accDescr`,accelerators:`accelerators`,accTitle:`accTitle`,anchors:`anchors`,annotation:`annotation`,annotations:`annotations`,components:`components`,deaccelerators:`deaccelerators`,evolution:`evolution`,evolves:`evolves`,links:`links`,notes:`notes`,pipelines:`pipelines`,size:`size`,title:`title`},X(Wei,`isWardley`),Rbi=(dri=class extends aZ{constructor(){super(...arguments),this.types={AbnfAlternation:{name:Pyi.$type,properties:{alternatives:{name:Pyi.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:Fyi.$type,properties:{elements:{name:Fyi.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:Iyi.$type,properties:{primary:{name:Iyi.primary},repeat:{name:Iyi.repeat}},superTypes:[]},AbnfGroup:{name:Lyi.$type,properties:{element:{name:Lyi.element}},superTypes:[Y0.$type]},AbnfNumVal:{name:Ryi.$type,properties:{value:{name:Ryi.value}},superTypes:[Y0.$type]},AbnfOptionalGroup:{name:zyi.$type,properties:{element:{name:zyi.element}},superTypes:[Y0.$type]},AbnfPrimary:{name:Y0.$type,properties:{},superTypes:[]},AbnfRule:{name:Byi.$type,properties:{definition:{name:Byi.definition},name:{name:Byi.name}},superTypes:[]},AbnfRuleName:{name:Vyi.$type,properties:{name:{name:Vyi.name}},superTypes:[Y0.$type]},AbnfStringLiteral:{name:Hyi.$type,properties:{value:{name:Hyi.value}},superTypes:[Y0.$type]},Accelerator:{name:X0.$type,properties:{name:{name:X0.name},x:{name:X0.x},y:{name:X0.y}},superTypes:[]},Alignment:{name:Uyi.$type,properties:{direction:{name:Uyi.direction},members:{name:Uyi.members,defaultValue:[]}},superTypes:[]},Anchor:{name:Z0.$type,properties:{evolution:{name:Z0.evolution},name:{name:Z0.name},visibility:{name:Z0.visibility}},superTypes:[]},Annotation:{name:Q0.$type,properties:{number:{name:Q0.number},text:{name:Q0.text},x:{name:Q0.x},y:{name:Q0.y}},superTypes:[]},Annotations:{name:Wyi.$type,properties:{x:{name:Wyi.x},y:{name:Wyi.y}},superTypes:[]},Architecture:{name:$0.$type,properties:{accDescr:{name:$0.accDescr},accTitle:{name:$0.accTitle},alignments:{name:$0.alignments,defaultValue:[]},edges:{name:$0.edges,defaultValue:[]},groups:{name:$0.groups,defaultValue:[]},junctions:{name:$0.junctions,defaultValue:[]},services:{name:$0.services,defaultValue:[]},title:{name:$0.title}},superTypes:[]},Axis:{name:e2.$type,properties:{label:{name:e2.label},name:{name:e2.name}},superTypes:[]},Branch:{name:t2.$type,properties:{name:{name:t2.name},order:{name:t2.order}},superTypes:[W2.$type]},Checkout:{name:Gyi.$type,properties:{branch:{name:Gyi.branch}},superTypes:[W2.$type]},CherryPicking:{name:n2.$type,properties:{id:{name:n2.id},parent:{name:n2.parent},tags:{name:n2.tags,defaultValue:[]}},superTypes:[W2.$type]},ClassDefStatement:{name:Kyi.$type,properties:{className:{name:Kyi.className},styleText:{name:Kyi.styleText}},superTypes:[]},Commit:{name:r2.$type,properties:{id:{name:r2.id},message:{name:r2.message},tags:{name:r2.tags,defaultValue:[]},type:{name:r2.type}},superTypes:[W2.$type]},Common:{name:i2.$type,properties:{accDescr:{name:i2.accDescr},accTitle:{name:i2.accTitle},title:{name:i2.title}},superTypes:[]},Component:{name:a2.$type,properties:{decorator:{name:a2.decorator},evolution:{name:a2.evolution},inertia:{name:a2.inertia,defaultValue:!1},label:{name:a2.label},name:{name:a2.name},visibility:{name:a2.visibility}},superTypes:[]},Curve:{name:o2.$type,properties:{entries:{name:o2.entries,defaultValue:[]},label:{name:o2.label},name:{name:o2.name}},superTypes:[]},Cynefin:{name:s2.$type,properties:{accDescr:{name:s2.accDescr},accTitle:{name:s2.accTitle},domains:{name:s2.domains,defaultValue:[]},title:{name:s2.title},transitions:{name:s2.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:c2.$type,properties:{name:{name:c2.name},x:{name:c2.x},y:{name:c2.y}},superTypes:[]},Decorator:{name:qyi.$type,properties:{strategy:{name:qyi.strategy}},superTypes:[]},Direction:{name:l2.$type,properties:{accDescr:{name:l2.accDescr},accTitle:{name:l2.accTitle},dir:{name:l2.dir},statements:{name:l2.statements,defaultValue:[]},title:{name:l2.title}},superTypes:[S2.$type]},DomainBlock:{name:u2.$type,properties:{domain:{name:u2.domain},items:{name:u2.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:Jyi.$type,properties:{label:{name:Jyi.label}},superTypes:[]},EbnfChoice:{name:Yyi.$type,properties:{alternatives:{name:Yyi.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:Xyi.$type,properties:{except:{name:Xyi.except}},superTypes:[d2.$type]},EbnfGroup:{name:Zyi.$type,properties:{element:{name:Zyi.element}},superTypes:[f2.$type]},EbnfNonTerminal:{name:Qyi.$type,properties:{name:{name:Qyi.name}},superTypes:[f2.$type]},EbnfOneOrMorePostfix:{name:$yi.$type,properties:{operator:{name:$yi.operator}},superTypes:[d2.$type]},EbnfOptional:{name:ebi.$type,properties:{element:{name:ebi.element}},superTypes:[f2.$type]},EbnfOptionalPostfix:{name:tbi.$type,properties:{operator:{name:tbi.operator}},superTypes:[d2.$type]},EbnfPostfix:{name:d2.$type,properties:{},superTypes:[]},EbnfPrimary:{name:f2.$type,properties:{},superTypes:[]},EbnfRepetition:{name:nbi.$type,properties:{element:{name:nbi.element}},superTypes:[f2.$type]},EbnfRule:{name:rbi.$type,properties:{definition:{name:rbi.definition},name:{name:rbi.name}},superTypes:[]},EbnfSequence:{name:ibi.$type,properties:{elements:{name:ibi.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:abi.$type,properties:{text:{name:abi.text}},superTypes:[f2.$type]},EbnfTerm:{name:obi.$type,properties:{base:{name:obi.base},postfixes:{name:obi.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:sbi.$type,properties:{value:{name:sbi.value}},superTypes:[f2.$type]},EbnfZeroOrMorePostfix:{name:cbi.$type,properties:{operator:{name:cbi.operator}},superTypes:[d2.$type]},Edge:{name:p2.$type,properties:{lhsDir:{name:p2.lhsDir},lhsGroup:{name:p2.lhsGroup,defaultValue:!1},lhsId:{name:p2.lhsId},lhsInto:{name:p2.lhsInto,defaultValue:!1},rhsDir:{name:p2.rhsDir},rhsGroup:{name:p2.rhsGroup,defaultValue:!1},rhsId:{name:p2.rhsId},rhsInto:{name:p2.rhsInto,defaultValue:!1},title:{name:p2.title}},superTypes:[]},EmDataEntity:{name:m2.$type,properties:{dataBlockValue:{name:m2.dataBlockValue},dataType:{name:m2.dataType},name:{name:m2.name}},superTypes:[]},EmFrame:{name:h2.$type,properties:{},superTypes:[]},EmGwt:{name:g2.$type,properties:{givenStatements:{name:g2.givenStatements,defaultValue:[]},sourceFrame:{name:g2.sourceFrame,referenceType:h2.$type},thenStatements:{name:g2.thenStatements,defaultValue:[]},whenStatements:{name:g2.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:lbi.$type,properties:{entityIdentifier:{name:lbi.entityIdentifier,referenceType:ubi.$type}},superTypes:[]},EmModelEntity:{name:ubi.$type,properties:{name:{name:ubi.name}},superTypes:[]},EmNoteEntity:{name:_2.$type,properties:{dataBlockValue:{name:_2.dataBlockValue},dataType:{name:_2.dataType},sourceFrame:{name:_2.sourceFrame,referenceType:h2.$type}},superTypes:[]},EmResetFrame:{name:v2.$type,properties:{dataInlineValue:{name:v2.dataInlineValue},dataReference:{name:v2.dataReference,referenceType:m2.$type},dataType:{name:v2.dataType},entityIdentifier:{name:v2.entityIdentifier},modelEntityType:{name:v2.modelEntityType},name:{name:v2.name},sourceFrames:{name:v2.sourceFrames,defaultValue:[],referenceType:h2.$type}},superTypes:[h2.$type]},EmTimeFrame:{name:y2.$type,properties:{dataInlineValue:{name:y2.dataInlineValue},dataReference:{name:y2.dataReference,referenceType:m2.$type},dataType:{name:y2.dataType},entityIdentifier:{name:y2.entityIdentifier},modelEntityType:{name:y2.modelEntityType},name:{name:y2.name},sourceFrames:{name:y2.sourceFrames,defaultValue:[],referenceType:h2.$type}},superTypes:[h2.$type]},Entry:{name:dbi.$type,properties:{axis:{name:dbi.axis,referenceType:e2.$type},value:{name:dbi.value}},superTypes:[]},EventModel:{name:b2.$type,properties:{accDescr:{name:b2.accDescr},accTitle:{name:b2.accTitle},dataEntities:{name:b2.dataEntities,defaultValue:[]},frames:{name:b2.frames,defaultValue:[]},gwtEntities:{name:b2.gwtEntities,defaultValue:[]},modelEntities:{name:b2.modelEntities,defaultValue:[]},noteEntities:{name:b2.noteEntities,defaultValue:[]},title:{name:b2.title}},superTypes:[]},Evolution:{name:fbi.$type,properties:{stages:{name:fbi.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:x2.$type,properties:{boundary:{name:x2.boundary},name:{name:x2.name},secondName:{name:x2.secondName}},superTypes:[]},Evolve:{name:pbi.$type,properties:{component:{name:pbi.component},target:{name:pbi.target}},superTypes:[]},GitGraph:{name:S2.$type,properties:{accDescr:{name:S2.accDescr},accTitle:{name:S2.accTitle},statements:{name:S2.statements,defaultValue:[]},title:{name:S2.title}},superTypes:[]},Group:{name:C2.$type,properties:{icon:{name:C2.icon},id:{name:C2.id},in:{name:C2.in},title:{name:C2.title}},superTypes:[]},Info:{name:w2.$type,properties:{accDescr:{name:w2.accDescr},accTitle:{name:w2.accTitle},title:{name:w2.title}},superTypes:[]},Item:{name:T2.$type,properties:{classSelector:{name:T2.classSelector},name:{name:T2.name}},superTypes:[]},Junction:{name:mbi.$type,properties:{id:{name:mbi.id},in:{name:mbi.in}},superTypes:[]},Label:{name:E2.$type,properties:{negX:{name:E2.negX,defaultValue:!1},negY:{name:E2.negY,defaultValue:!1},offsetX:{name:E2.offsetX},offsetY:{name:E2.offsetY}},superTypes:[]},Leaf:{name:D2.$type,properties:{classSelector:{name:D2.classSelector},name:{name:D2.name},value:{name:D2.value}},superTypes:[T2.$type]},Link:{name:O2.$type,properties:{arrow:{name:O2.arrow},from:{name:O2.from},fromPort:{name:O2.fromPort},linkLabel:{name:O2.linkLabel},to:{name:O2.to},toPort:{name:O2.toPort}},superTypes:[]},Merge:{name:k2.$type,properties:{branch:{name:k2.branch},id:{name:k2.id},tags:{name:k2.tags,defaultValue:[]},type:{name:k2.type}},superTypes:[W2.$type]},Note:{name:A2.$type,properties:{evolution:{name:A2.evolution},text:{name:A2.text},visibility:{name:A2.visibility}},superTypes:[]},Option:{name:hbi.$type,properties:{name:{name:hbi.name},value:{name:hbi.value,defaultValue:!1}},superTypes:[]},Packet:{name:j2.$type,properties:{accDescr:{name:j2.accDescr},accTitle:{name:j2.accTitle},blocks:{name:j2.blocks,defaultValue:[]},title:{name:j2.title}},superTypes:[]},PacketBlock:{name:M2.$type,properties:{bits:{name:M2.bits},end:{name:M2.end},label:{name:M2.label},start:{name:M2.start}},superTypes:[]},PegAny:{name:gbi.$type,properties:{dot:{name:gbi.dot}},superTypes:[N2.$type]},PegGroup:{name:_bi.$type,properties:{element:{name:_bi.element}},superTypes:[N2.$type]},PegIdentifier:{name:vbi.$type,properties:{name:{name:vbi.name}},superTypes:[N2.$type]},PegLiteral:{name:ybi.$type,properties:{value:{name:ybi.value}},superTypes:[N2.$type]},PegOrderedChoice:{name:bbi.$type,properties:{alternatives:{name:bbi.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:xbi.$type,properties:{operator:{name:xbi.operator},suffix:{name:xbi.suffix}},superTypes:[]},PegPrimary:{name:N2.$type,properties:{},superTypes:[]},PegRule:{name:Sbi.$type,properties:{definition:{name:Sbi.definition},name:{name:Sbi.name}},superTypes:[]},PegSequence:{name:Cbi.$type,properties:{elements:{name:Cbi.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:wbi.$type,properties:{operator:{name:wbi.operator},primary:{name:wbi.primary}},superTypes:[]},Pie:{name:P2.$type,properties:{accDescr:{name:P2.accDescr},accTitle:{name:P2.accTitle},sections:{name:P2.sections,defaultValue:[]},showData:{name:P2.showData,defaultValue:!1},title:{name:P2.title}},superTypes:[]},PieSection:{name:F2.$type,properties:{label:{name:F2.label},value:{name:F2.value}},superTypes:[]},Pipeline:{name:Tbi.$type,properties:{components:{name:Tbi.components,defaultValue:[]},parent:{name:Tbi.parent}},superTypes:[]},PipelineComponent:{name:I2.$type,properties:{evolution:{name:I2.evolution},label:{name:I2.label},name:{name:I2.name}},superTypes:[]},Radar:{name:L2.$type,properties:{accDescr:{name:L2.accDescr},accTitle:{name:L2.accTitle},axes:{name:L2.axes,defaultValue:[]},curves:{name:L2.curves,defaultValue:[]},options:{name:L2.options,defaultValue:[]},title:{name:L2.title}},superTypes:[]},Railroad:{name:R2.$type,properties:{accDescr:{name:R2.accDescr},accTitle:{name:R2.accTitle},rules:{name:R2.rules,defaultValue:[]},title:{name:R2.title}},superTypes:[]},RailroadAbnf:{name:z2.$type,properties:{accDescr:{name:z2.accDescr},accTitle:{name:z2.accTitle},rules:{name:z2.rules,defaultValue:[]},title:{name:z2.title}},superTypes:[]},RailroadChoiceExpr:{name:Ebi.$type,properties:{alternatives:{name:Ebi.alternatives,defaultValue:[]}},superTypes:[V2.$type]},RailroadEbnf:{name:B2.$type,properties:{accDescr:{name:B2.accDescr},accTitle:{name:B2.accTitle},rules:{name:B2.rules,defaultValue:[]},title:{name:B2.title}},superTypes:[]},RailroadExpression:{name:V2.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:Dbi.$type,properties:{name:{name:Dbi.name}},superTypes:[V2.$type]},RailroadOneOrMoreExpr:{name:Obi.$type,properties:{element:{name:Obi.element}},superTypes:[V2.$type]},RailroadOptionalExpr:{name:kbi.$type,properties:{element:{name:kbi.element}},superTypes:[V2.$type]},RailroadPeg:{name:H2.$type,properties:{accDescr:{name:H2.accDescr},accTitle:{name:H2.accTitle},rules:{name:H2.rules,defaultValue:[]},title:{name:H2.title}},superTypes:[]},RailroadRule:{name:Abi.$type,properties:{definition:{name:Abi.definition},name:{name:Abi.name}},superTypes:[]},RailroadSequenceExpr:{name:jbi.$type,properties:{elements:{name:jbi.elements,defaultValue:[]}},superTypes:[V2.$type]},RailroadSpecialExpr:{name:Mbi.$type,properties:{text:{name:Mbi.text}},superTypes:[V2.$type]},RailroadTerminalExpr:{name:Nbi.$type,properties:{value:{name:Nbi.value}},superTypes:[V2.$type]},RailroadZeroOrMoreExpr:{name:Pbi.$type,properties:{element:{name:Pbi.element}},superTypes:[V2.$type]},Section:{name:Fbi.$type,properties:{classSelector:{name:Fbi.classSelector},name:{name:Fbi.name}},superTypes:[T2.$type]},Service:{name:U2.$type,properties:{icon:{name:U2.icon},iconText:{name:U2.iconText},id:{name:U2.id},in:{name:U2.in},title:{name:U2.title}},superTypes:[]},Size:{name:Ibi.$type,properties:{height:{name:Ibi.height},width:{name:Ibi.width}},superTypes:[]},Statement:{name:W2.$type,properties:{},superTypes:[]},Transition:{name:G2.$type,properties:{from:{name:G2.from},label:{name:G2.label},to:{name:G2.to}},superTypes:[]},TreeNode:{name:q2.$type,properties:{classAnnotation:{name:q2.classAnnotation},descAnnotation:{name:q2.descAnnotation},iconAnnotation:{name:q2.iconAnnotation},indent:{name:q2.indent},name:{name:q2.name}},superTypes:[]},TreeView:{name:J2.$type,properties:{accDescr:{name:J2.accDescr},accTitle:{name:J2.accTitle},nodes:{name:J2.nodes,defaultValue:[]},title:{name:J2.title}},superTypes:[]},Treemap:{name:K2.$type,properties:{accDescr:{name:K2.accDescr},accTitle:{name:K2.accTitle},title:{name:K2.title},TreemapRows:{name:K2.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Lbi.$type,properties:{indent:{name:Lbi.indent},item:{name:Lbi.item}},superTypes:[]},Wardley:{name:Y2.$type,properties:{accDescr:{name:Y2.accDescr},accelerators:{name:Y2.accelerators,defaultValue:[]},accTitle:{name:Y2.accTitle},anchors:{name:Y2.anchors,defaultValue:[]},annotation:{name:Y2.annotation,defaultValue:[]},annotations:{name:Y2.annotations,defaultValue:[]},components:{name:Y2.components,defaultValue:[]},deaccelerators:{name:Y2.deaccelerators,defaultValue:[]},evolution:{name:Y2.evolution},evolves:{name:Y2.evolves,defaultValue:[]},links:{name:Y2.links,defaultValue:[]},notes:{name:Y2.notes,defaultValue:[]},pipelines:{name:Y2.pipelines,defaultValue:[]},size:{name:Y2.size},title:{name:Y2.title}},superTypes:[]}}}},X(dri,`MermaidAstReflection`),dri),X2=new Rbi,Bbi=X(()=>zbi??(zbi=fX(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[^\\\\[\\\\]\\\\r\\\\n]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),`ArchitectureGrammarGrammar`),Hbi=X(()=>Vbi??(Vbi=fX(`{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),`CynefinGrammarGrammar`),Wbi=X(()=>Ubi??(Ubi=fX('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),`EventModelingGrammar`),Kbi=X(()=>Gbi??(Gbi=fX(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),`GitGraphGrammarGrammar`),Jbi=X(()=>qbi??(qbi=fX(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),`InfoGrammarGrammar`),Xbi=X(()=>Ybi??(Ybi=fX(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),`PacketGrammarGrammar`),Qbi=X(()=>Zbi??(Zbi=fX(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),`PieGrammarGrammar`),exi=X(()=>$bi??($bi=fX(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),`RadarGrammarGrammar`),nxi=X(()=>txi??(txi=fX(`{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}`)),`RailroadAbnfGrammarGrammar`),ixi=X(()=>rxi??(rxi=fX(`{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}`)),`RailroadEbnfGrammarGrammar`),oxi=X(()=>axi??(axi=fX(`{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`)),`RailroadGrammarGrammar`),cxi=X(()=>sxi??(sxi=fX(`{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`)),`RailroadPegGrammarGrammar`),uxi=X(()=>lxi??(lxi=fX(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),`TreemapGrammarGrammar`),fxi=X(()=>dxi??(dxi=fX(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),`TreeViewGrammarGrammar`),mxi=X(()=>pxi??(pxi=fX(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),`WardleyGrammarGrammar`),hxi={languageId:`architecture`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},gxi={languageId:`cynefin`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},_xi={languageId:`eventmodeling`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},vxi={languageId:`gitGraph`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},yxi={languageId:`info`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},bxi={languageId:`packet`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},xxi={languageId:`pie`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Sxi={languageId:`radar`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Cxi={languageId:`railroadAbnf`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},wxi={languageId:`railroadEbnf`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Txi={languageId:`railroad`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Exi={languageId:`railroadPeg`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Dxi={languageId:`treemap`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Oxi={languageId:`treeView`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},kxi={languageId:`wardley`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Z2={AstReflection:X(()=>new Rbi,`AstReflection`)},Axi={Grammar:X(()=>Bbi(),`Grammar`),LanguageMetaData:X(()=>hxi,`LanguageMetaData`),parser:{}},jxi={Grammar:X(()=>Hbi(),`Grammar`),LanguageMetaData:X(()=>gxi,`LanguageMetaData`),parser:{}},Mxi={Grammar:X(()=>Wbi(),`Grammar`),LanguageMetaData:X(()=>_xi,`LanguageMetaData`),parser:{}},Nxi={Grammar:X(()=>Kbi(),`Grammar`),LanguageMetaData:X(()=>vxi,`LanguageMetaData`),parser:{}},Pxi={Grammar:X(()=>Jbi(),`Grammar`),LanguageMetaData:X(()=>yxi,`LanguageMetaData`),parser:{}},Fxi={Grammar:X(()=>Xbi(),`Grammar`),LanguageMetaData:X(()=>bxi,`LanguageMetaData`),parser:{}},Ixi={Grammar:X(()=>Qbi(),`Grammar`),LanguageMetaData:X(()=>xxi,`LanguageMetaData`),parser:{}},Lxi={Grammar:X(()=>exi(),`Grammar`),LanguageMetaData:X(()=>Sxi,`LanguageMetaData`),parser:{}},Rxi={Grammar:X(()=>nxi(),`Grammar`),LanguageMetaData:X(()=>Cxi,`LanguageMetaData`),parser:{}},zxi={Grammar:X(()=>ixi(),`Grammar`),LanguageMetaData:X(()=>wxi,`LanguageMetaData`),parser:{}},Bxi={Grammar:X(()=>oxi(),`Grammar`),LanguageMetaData:X(()=>Txi,`LanguageMetaData`),parser:{}},Vxi={Grammar:X(()=>cxi(),`Grammar`),LanguageMetaData:X(()=>Exi,`LanguageMetaData`),parser:{}},Hxi={Grammar:X(()=>uxi(),`Grammar`),LanguageMetaData:X(()=>Dxi,`LanguageMetaData`),parser:{}},Uxi={Grammar:X(()=>fxi(),`Grammar`),LanguageMetaData:X(()=>Oxi,`LanguageMetaData`),parser:{}},Wxi={Grammar:X(()=>mxi(),`Grammar`),LanguageMetaData:X(()=>kxi,`LanguageMetaData`),parser:{}},Gxi={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},Q2=(fri=class extends uvi{runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return r===void 0&&(r=this.runCustomConverter(e,t,n)),r===void 0?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){let r=Gxi[e.name];if(r===void 0)return;let i=r.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm,` `);if(i[2]!==void 0)return i[2].replace(/^\s*/gm,``).replace(/\s+$/gm,``).replace(/[\t ]{2,}/gm,` `).replace(/[\n\r]{2,}/gm,` `)}}},X(fri,`AbstractMermaidValueConverter`),fri),$2=(pri=class extends Q2{runCustomConverter(e,t,n){}},X(pri,`CommonValueConverter`),pri),e4=(mri=class extends O0{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){let r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&e.PATTERN!==void 0&&(e.PATTERN=RegExp(e.PATTERN.toString()+`(?:(?=%%)|(?!\\S))`))}),r}},X(mri,`AbstractMermaidTokenBuilder`),mri),hri=class extends e4{},X(hri,`CommonTokenBuilder`)}));function Kxi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Lxi,Yxi);return t.ServiceRegistry.register(n),{shared:t,Radar:n}}var qxi,Jxi,Yxi,Xxi=o((()=>{t4(),qxi=class extends e4{constructor(){super([`radar-beta`])}},Jxi=(X(qxi,`RadarTokenBuilder`),qxi),Yxi={parser:{TokenBuilder:X(()=>new Jxi,`TokenBuilder`),ValueConverter:X(()=>new $2,`ValueConverter`)}},X(Kxi,`createRadarServices`)}));function Zxi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Bxi,rSi);return t.ServiceRegistry.register(n),{shared:t,Railroad:n}}var Qxi,$xi,eSi,tSi,nSi,rSi,iSi=o((()=>{t4(),Qxi=class extends e4{constructor(){super([`railroad-beta`])}},eSi=(X(Qxi,`RailroadTokenBuilder`),Qxi),tSi=X(e=>{let t=e.slice(1,-1),n=``;for(let e=0;enew eSi,`TokenBuilder`),ValueConverter:X(()=>new nSi,`ValueConverter`)}},X(Zxi,`createRailroadServices`)}));function aSi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),zxi,dSi);return t.ServiceRegistry.register(n),{shared:t,RailroadEbnf:n}}var oSi,sSi,cSi,lSi,uSi,dSi,fSi=o((()=>{t4(),oSi=class extends e4{constructor(){super([`railroad-ebnf-beta`])}},cSi=(X(oSi,`RailroadEbnfTokenBuilder`),oSi),lSi=X(e=>{let t=e.slice(1,-1),n=``;for(let e=0;enew cSi,`TokenBuilder`),ValueConverter:X(()=>new uSi,`ValueConverter`)}},X(aSi,`createRailroadEbnfServices`)}));function pSi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Rxi,vSi);return t.ServiceRegistry.register(n),{shared:t,RailroadAbnf:n}}var mSi,hSi,gSi,_Si,vSi,ySi=o((()=>{t4(),mSi=class extends e4{constructor(){super([`railroad-abnf-beta`])}},gSi=(X(mSi,`RailroadAbnfTokenBuilder`),mSi),_Si=(hSi=class extends Q2{runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return e.slice(1,-1)}return r}runCustomConverter(e,t,n){if(e.name===`ABNF_STRING`)return t.slice(1,-1)}},X(hSi,`RailroadAbnfValueConverter`),hSi),vSi={parser:{TokenBuilder:X(()=>new gSi,`TokenBuilder`),ValueConverter:X(()=>new _Si,`ValueConverter`)}},X(pSi,`createRailroadAbnfServices`)}));function bSi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Vxi,ESi);return t.ServiceRegistry.register(n),{shared:t,RailroadPeg:n}}var xSi,SSi,CSi,wSi,TSi,ESi,DSi=o((()=>{t4(),xSi=class extends e4{constructor(){super([`railroad-peg-beta`])}},CSi=(X(xSi,`RailroadPegTokenBuilder`),xSi),wSi=X(e=>{let t=e.slice(1,-1),n=``;for(let e=0;enew CSi,`TokenBuilder`),ValueConverter:X(()=>new TSi,`ValueConverter`)}},X(bSi,`createRailroadPegServices`)}));function OSi(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}function kSi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Hxi,LSi);return t.ServiceRegistry.register(n),OSi(n),{shared:t,Treemap:n}}var ASi,jSi,MSi,NSi,PSi,FSi,ISi,LSi,RSi=o((()=>{t4(),ASi=class extends e4{constructor(){super([`treemap`])}},NSi=(X(ASi,`TreemapTokenBuilder`),ASi),PSi=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,FSi=(jSi=class extends Q2{runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=PSi.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}},X(jSi,`TreemapValueConverter`),jSi),X(OSi,`registerValidationChecks`),ISi=(MSi=class{checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},X(MSi,`TreemapValidator`),MSi),LSi={parser:{TokenBuilder:X(()=>new NSi,`TokenBuilder`),ValueConverter:X(()=>new FSi,`ValueConverter`)},validation:{TreemapValidator:X(()=>new ISi,`TreemapValidator`)}},X(kSi,`createTreemapServices`)}));function zSi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Wxi,HSi);return t.ServiceRegistry.register(n),{shared:t,Wardley:n}}var BSi,VSi,HSi,USi=o((()=>{t4(),BSi=class extends Q2{runCustomConverter(e,t,n){switch(e.name.toUpperCase()){case`LINK_LABEL`:return t.substring(1).trim();default:return}}},VSi=(X(BSi,`WardleyValueConverter`),BSi),HSi={parser:{ValueConverter:X(()=>new VSi,`ValueConverter`)}},X(zSi,`createWardleyServices`)}));function WSi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),jxi,qSi);return t.ServiceRegistry.register(n),{shared:t,Cynefin:n}}var GSi,KSi,qSi,JSi=o((()=>{t4(),GSi=class extends e4{constructor(){super([`cynefin-beta`])}},KSi=(X(GSi,`CynefinTokenBuilder`),GSi),qSi={parser:{TokenBuilder:X(()=>new KSi,`TokenBuilder`),ValueConverter:X(()=>new $2,`ValueConverter`)}},X(WSi,`createCynefinServices`)}));function YSi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Nxi,QSi);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}var XSi,ZSi,QSi,$Si=o((()=>{t4(),XSi=class extends e4{constructor(){super([`gitGraph`])}},ZSi=(X(XSi,`GitGraphTokenBuilder`),XSi),QSi={parser:{TokenBuilder:X(()=>new ZSi,`TokenBuilder`),ValueConverter:X(()=>new $2,`ValueConverter`)}},X(YSi,`createGitGraphServices`)}));function eCi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Pxi,rCi);return t.ServiceRegistry.register(n),{shared:t,Info:n}}var tCi,nCi,rCi,iCi=o((()=>{t4(),tCi=class extends e4{constructor(){super([`info`,`showInfo`])}},nCi=(X(tCi,`InfoTokenBuilder`),tCi),rCi={parser:{TokenBuilder:X(()=>new nCi,`TokenBuilder`),ValueConverter:X(()=>new $2,`ValueConverter`)}},X(eCi,`createInfoServices`)}));function aCi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Fxi,cCi);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}var oCi,sCi,cCi,lCi=o((()=>{t4(),oCi=class extends e4{constructor(){super([`packet`])}},sCi=(X(oCi,`PacketTokenBuilder`),oCi),cCi={parser:{TokenBuilder:X(()=>new sCi,`TokenBuilder`),ValueConverter:X(()=>new $2,`ValueConverter`)}},X(aCi,`createPacketServices`)}));function uCi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Ixi,hCi);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}var dCi,fCi,pCi,mCi,hCi,gCi=o((()=>{t4(),dCi=class extends e4{constructor(){super([`pie`,`showData`])}},pCi=(X(dCi,`PieTokenBuilder`),dCi),mCi=(fCi=class extends Q2{runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},X(fCi,`PieValueConverter`),fCi),hCi={parser:{TokenBuilder:X(()=>new pCi,`TokenBuilder`),ValueConverter:X(()=>new mCi,`ValueConverter`)}},X(uCi,`createPieServices`)}));function _Ci(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Uxi,SCi);return t.ServiceRegistry.register(n),{shared:t,TreeView:n}}var vCi,yCi,bCi,xCi,SCi,CCi=o((()=>{t4(),vCi=class extends Q2{runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return(t==null?void 0:t.length)||0;if(e.name===`QUOTED_NAME`)return t.substring(1,t.length-1);if(e.name===`BARE_NAME`)return t.replace(/[\t ]+$/,``);if(e.name===`CLASS_ANNOTATION`)return t.trim().substring(3).trim();if(e.name===`ICON_ANNOTATION`){let e=t.trim();return e.substring(5,e.length-1)}if(e.name===`DESC_ANNOTATION`)return t.trim().substring(2).trim()}},bCi=(X(vCi,`TreeViewValueConverter`),vCi),xCi=(yCi=class extends e4{constructor(){super([`treeView-beta`])}},X(yCi,`TreeViewTokenBuilder`),yCi),SCi={parser:{TokenBuilder:X(()=>new xCi,`TokenBuilder`),ValueConverter:X(()=>new bCi,`ValueConverter`)}},X(_Ci,`createTreeViewServices`)}));function wCi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Axi,kCi);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}var TCi,ECi,DCi,OCi,kCi,ACi=o((()=>{t4(),TCi=class extends e4{constructor(){super([`architecture`])}},DCi=(X(TCi,`ArchitectureTokenBuilder`),TCi),OCi=(ECi=class extends Q2{runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`){let e=t.replace(/^\[|]$/g,``).trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,`"`).replace(/\\'/g,`'`)),e.trim()}}},X(ECi,`ArchitectureValueConverter`),ECi),kCi={parser:{TokenBuilder:X(()=>new DCi,`TokenBuilder`),ValueConverter:X(()=>new OCi,`ValueConverter`)}},X(wCi,`createArchitectureServices`)}));function jCi(e){let t=e.validation.EventModelingValidator,n=e.validation.ValidationRegistry;if(n){let e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};n.register(e,t)}}function MCi(e=J0){let t=uX(lX(e),Z2),n=uX(cX({shared:t}),Mxi,HCi);return t.ServiceRegistry.register(n),jCi(n),{shared:t,EventModel:n}}var NCi,PCi,FCi,ICi,LCi,RCi,zCi,BCi,VCi,HCi,UCi=o((()=>{t4(),NCi=class extends e4{constructor(){super([`eventmodeling`])}},FCi=(X(NCi,`EventModelingTokenBuilder`),NCi),ICi=new Set([`cmd`,`command`]),LCi=new Set([`evt`,`event`]),RCi=new Set([`rmo`,`readmodel`]),zCi=new Set([`pcr`,`processor`]),BCi=new Set([`ui`]),X(jCi,`registerValidationChecks`),VCi=(PCi=class{checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(ICi.has(e.modelEntityType)?this.validateSources(e,new Set([...BCi,...zCi]),`command`,`ui or processor`,t):LCi.has(e.modelEntityType)?this.validateSources(e,ICi,`event`,`command`,t):RCi.has(e.modelEntityType)?this.validateSources(e,LCi,`read model`,`event`,t):zCi.has(e.modelEntityType)?this.validateSources(e,RCi,`processor`,`read model`,t):BCi.has(e.modelEntityType)&&this.validateSources(e,RCi,`ui`,`read model`,t))}validateSources(e,t,n,r,i){for(let a of e.sourceFrames){let o=a.ref;o!==void 0&&!t.has(o.modelEntityType)&&i(`error`,`A ${n} can only receive input from a ${r}, not from '${o.modelEntityType}'.`,{node:e,property:`sourceFrames`})}}},X(PCi,`EventModelingValidator`),PCi),HCi={parser:{TokenBuilder:X(()=>new FCi,`TokenBuilder`),ValueConverter:X(()=>new $2,`ValueConverter`)},validation:{EventModelingValidator:X(()=>new VCi,`EventModelingValidator`)}},X(MCi,`createEventModelingServices`)})),WCi=l({InfoModule:()=>rCi,createInfoServices:()=>eCi}),GCi=o((()=>{iCi(),t4()})),KCi=l({PacketModule:()=>cCi,createPacketServices:()=>aCi}),qCi=o((()=>{lCi(),t4()})),JCi=l({PieModule:()=>hCi,createPieServices:()=>uCi}),YCi=o((()=>{gCi(),t4()})),XCi=l({TreeViewModule:()=>SCi,createTreeViewServices:()=>_Ci}),ZCi=o((()=>{CCi(),t4()})),QCi=l({ArchitectureModule:()=>kCi,createArchitectureServices:()=>wCi}),$Ci=o((()=>{ACi(),t4()})),ewi=l({GitGraphModule:()=>QSi,createGitGraphServices:()=>YSi}),twi=o((()=>{$Si(),t4()})),nwi=l({EventModelingModule:()=>HCi,createEventModelingServices:()=>MCi}),rwi=o((()=>{UCi(),t4()})),iwi=l({RadarModule:()=>Yxi,createRadarServices:()=>Kxi}),awi=o((()=>{Xxi(),t4()})),owi=l({RailroadModule:()=>rSi,createRailroadServices:()=>Zxi}),swi=o((()=>{iSi(),t4()})),cwi=l({RailroadEbnfModule:()=>dSi,createRailroadEbnfServices:()=>aSi}),lwi=o((()=>{fSi(),t4()})),uwi=l({RailroadAbnfModule:()=>vSi,createRailroadAbnfServices:()=>pSi}),dwi=o((()=>{ySi(),t4()})),fwi=l({RailroadPegModule:()=>ESi,createRailroadPegServices:()=>bSi}),pwi=o((()=>{DSi(),t4()})),mwi=l({TreemapModule:()=>LSi,createTreemapServices:()=>kSi}),hwi=o((()=>{RSi(),t4()})),gwi=l({WardleyModule:()=>HSi,createWardleyServices:()=>zSi}),_wi=o((()=>{USi(),t4()})),vwi=l({CynefinModule:()=>qSi,createCynefinServices:()=>WSi}),ywi=o((()=>{JSi(),t4()}));async function n4(e,t){let n=xwi[e];if(!n)throw Error(`Unknown diagram type: ${e}`);r4[e]||await n();let r=r4[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new i4(r);return r.value}var bwi,r4,xwi,i4,a4=o((()=>{Xxi(),iSi(),fSi(),ySi(),DSi(),RSi(),USi(),JSi(),$Si(),iCi(),lCi(),gCi(),CCi(),ACi(),UCi(),t4(),xp(),r4={},xwi={info:X(async()=>{let{createInfoServices:e}=await bp(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(GCi(),WCi));return{createInfoServices:e}},void 0,import.meta.url);r4.info=e().Info.parser.LangiumParser},`info`),packet:X(async()=>{let{createPacketServices:e}=await bp(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(qCi(),KCi));return{createPacketServices:e}},void 0,import.meta.url);r4.packet=e().Packet.parser.LangiumParser},`packet`),pie:X(async()=>{let{createPieServices:e}=await bp(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(YCi(),JCi));return{createPieServices:e}},void 0,import.meta.url);r4.pie=e().Pie.parser.LangiumParser},`pie`),treeView:X(async()=>{let{createTreeViewServices:e}=await bp(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(ZCi(),XCi));return{createTreeViewServices:e}},void 0,import.meta.url);r4.treeView=e().TreeView.parser.LangiumParser},`treeView`),architecture:X(async()=>{let{createArchitectureServices:e}=await bp(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>($Ci(),QCi));return{createArchitectureServices:e}},void 0,import.meta.url);r4.architecture=e().Architecture.parser.LangiumParser},`architecture`),gitGraph:X(async()=>{let{createGitGraphServices:e}=await bp(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(twi(),ewi));return{createGitGraphServices:e}},void 0,import.meta.url);r4.gitGraph=e().GitGraph.parser.LangiumParser},`gitGraph`),eventmodeling:X(async()=>{let{createEventModelingServices:e}=await bp(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(rwi(),nwi));return{createEventModelingServices:e}},void 0,import.meta.url);r4.eventmodeling=e().EventModel.parser.LangiumParser},`eventmodeling`),radar:X(async()=>{let{createRadarServices:e}=await bp(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(awi(),iwi));return{createRadarServices:e}},void 0,import.meta.url);r4.radar=e().Radar.parser.LangiumParser},`radar`),railroad:X(async()=>{let{createRailroadServices:e}=await bp(async()=>{let{createRailroadServices:e}=await Promise.resolve().then(()=>(swi(),owi));return{createRailroadServices:e}},void 0,import.meta.url);r4.railroad=e().Railroad.parser.LangiumParser},`railroad`),railroadEbnf:X(async()=>{let{createRailroadEbnfServices:e}=await bp(async()=>{let{createRailroadEbnfServices:e}=await Promise.resolve().then(()=>(lwi(),cwi));return{createRailroadEbnfServices:e}},void 0,import.meta.url);r4.railroadEbnf=e().RailroadEbnf.parser.LangiumParser},`railroadEbnf`),railroadAbnf:X(async()=>{let{createRailroadAbnfServices:e}=await bp(async()=>{let{createRailroadAbnfServices:e}=await Promise.resolve().then(()=>(dwi(),uwi));return{createRailroadAbnfServices:e}},void 0,import.meta.url);r4.railroadAbnf=e().RailroadAbnf.parser.LangiumParser},`railroadAbnf`),railroadPeg:X(async()=>{let{createRailroadPegServices:e}=await bp(async()=>{let{createRailroadPegServices:e}=await Promise.resolve().then(()=>(pwi(),fwi));return{createRailroadPegServices:e}},void 0,import.meta.url);r4.railroadPeg=e().RailroadPeg.parser.LangiumParser},`railroadPeg`),treemap:X(async()=>{let{createTreemapServices:e}=await bp(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(hwi(),mwi));return{createTreemapServices:e}},void 0,import.meta.url);r4.treemap=e().Treemap.parser.LangiumParser},`treemap`),wardley:X(async()=>{let{createWardleyServices:e}=await bp(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(_wi(),gwi));return{createWardleyServices:e}},void 0,import.meta.url);r4.wardley=e().Wardley.parser.LangiumParser},`wardley`),cynefin:X(async()=>{let{createCynefinServices:e}=await bp(async()=>{let{createCynefinServices:e}=await Promise.resolve().then(()=>(ywi(),vwi));return{createCynefinServices:e}},void 0,import.meta.url);r4.cynefin=e().Cynefin.parser.LangiumParser},`cynefin`)},X(n4,`parse`),i4=(bwi=class extends Error{constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(` `),n=e.parserErrors.map(e=>`Parse error on line ${e.token.startLine!==void 0&&!isNaN(e.token.startLine)?e.token.startLine:`?`}, column ${e.token.startColumn!==void 0&&!isNaN(e.token.startColumn)?e.token.startColumn:`?`}: ${e.message}`).join(` `);super(`Parsing failed: ${t} ${n}`),this.result=e}},X(bwi,`MermaidParseError`),bwi)})),Swi=l({diagram:()=>jTi});function Cwi(){return sfr({length:7})}function wwi(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}function Twi(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}function Ewi(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){n+=e===t?` *`:` |`});let r=[n,t.id,t.seq];for(let e in c4.records.branches)c4.records.branches.get(e)===t.id&&r.push(e);if(W.debug(r.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=c4.records.commits.get(t.parents[0]);Twi(e,t,n),t.parents[1]&&e.push(c4.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=c4.records.commits.get(t.parents[0]);Twi(e,t,n)}e=wwi(e,e=>e.id),Ewi(e)}var o4,Dwi,s4,c4,Owi,kwi,Awi,jwi,Mwi,Nwi,Pwi,Fwi,Iwi,Lwi,Rwi,zwi,Bwi,Vwi,Hwi,Uwi,Wwi,Gwi,Kwi,qwi,Jwi,Ywi,Xwi,l4,u4,d4,f4,p4,m4,Zwi,Qwi,$wi,h4,g4,_4,v4,y4,b4,x4,S4,eTi,tTi,nTi,rTi,iTi,aTi,oTi,sTi,cTi,lTi,uTi,dTi,fTi,pTi,mTi,hTi,gTi,C4,_Ti,vTi,yTi,bTi,xTi,STi,CTi,wTi,TTi,ETi,DTi,OTi,kTi,ATi,jTi,MTi=o((()=>{z$r(),Pq(),wL(),bI(),hN(),fN(),a4(),XI(),o4={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Dwi=FF.gitGraph,s4=U(()=>mL({...Dwi,...WF().gitGraph}),`getConfig`),c4=new Mq(()=>{let e=s4(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}}),U(Cwi,`getID`),U(wwi,`uniqBy`),Owi=U(function(e){c4.records.direction=e},`setDirection`),kwi=U(function(e){W.debug(`options str`,e),e=e==null?void 0:e.trim(),e=e||`{}`;try{c4.records.options=JSON.parse(e)}catch(e){W.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),Awi=U(function(){return c4.records.options},`getOptions`),jwi=U(function(e){let t=e.msg,n=e.id,r=e.type,i=e.tags;W.info(`commit`,t,n,r,i),W.debug(`Entering commit:`,t,n,r,i);let a=s4();n=oI.sanitizeText(n,a),t=oI.sanitizeText(t,a),i=i==null?void 0:i.map(e=>oI.sanitizeText(e,a));let o={id:n||c4.records.seq+`-`+Cwi(),message:t,seq:c4.records.seq++,type:r??o4.NORMAL,tags:i??[],parents:c4.records.head==null?[]:[c4.records.head.id],branch:c4.records.currBranch};c4.records.head=o,W.info(`main branch`,a.mainBranchName),c4.records.commits.has(o.id)&&W.warn(`Commit ID ${o.id} already exists`),c4.records.commits.set(o.id,o),c4.records.branches.set(c4.records.currBranch,o.id),W.debug(`in pushCommit `+o.id)},`commit`),Mwi=U(function(e){let t=e.name,n=e.order;if(t=oI.sanitizeText(t,s4()),c4.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);c4.records.branches.set(t,c4.records.head==null?null:c4.records.head.id),c4.records.branchConfig.set(t,{name:t,order:n}),Fwi(t),W.debug(`in createBranch`)},`branch`),Nwi=U(e=>{let t=e.branch,n=e.id,r=e.type,i=e.tags,a=s4();t=oI.sanitizeText(t,a),n&&(n=oI.sanitizeText(n,a));let o=c4.records.branches.get(c4.records.currBranch),s=c4.records.branches.get(t),l=o?c4.records.commits.get(o):void 0,u=s?c4.records.commits.get(s):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(c4.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${c4.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!c4.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&c4.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${r} ${i==null?void 0:i.join(` `)}`,token:`merge ${t} ${n} ${r} ${i==null?void 0:i.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${r} ${i==null?void 0:i.join(` `)}`]},e}let d=s||``,f={id:n||`${c4.records.seq}-${Cwi()}`,message:`merged branch ${t} into ${c4.records.currBranch}`,seq:c4.records.seq++,parents:c4.records.head==null?[]:[c4.records.head.id,d],branch:c4.records.currBranch,type:o4.MERGE,customType:r,customId:!!n,tags:i??[]};c4.records.head=f,c4.records.commits.set(f.id,f),c4.records.branches.set(c4.records.currBranch,f.id),W.debug(c4.records.branches),W.debug(`in mergeBranch`)},`merge`),Pwi=U(function(e){let t=e.id,n=e.targetId,r=e.tags,i=e.parent;W.debug(`Entering cherryPick:`,t,n,r);let a=s4();if(t=oI.sanitizeText(t,a),n=oI.sanitizeText(n,a),r=r==null?void 0:r.map(e=>oI.sanitizeText(e,a)),i=oI.sanitizeText(i,a),!t||!c4.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=c4.records.commits.get(t);if(o===void 0||!o)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(i&&!(Array.isArray(o.parents)&&o.parents.includes(i)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let s=o.branch;if(o.type===o4.MERGE&&!i)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!c4.records.commits.has(n)){if(s===c4.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=c4.records.branches.get(c4.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${c4.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let a=c4.records.commits.get(e);if(a===void 0||!a){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${c4.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:c4.records.seq+`-`+Cwi(),message:`cherry-picked ${o==null?void 0:o.message} into ${c4.records.currBranch}`,seq:c4.records.seq++,parents:c4.records.head==null?[]:[c4.records.head.id,o.id],branch:c4.records.currBranch,type:o4.CHERRY_PICK,tags:r?r.filter(Boolean):[`cherry-pick:${o.id}${o.type===o4.MERGE?`|parent:${i}`:``}`]};c4.records.head=l,c4.records.commits.set(l.id,l),c4.records.branches.set(c4.records.currBranch,l.id),W.debug(c4.records.branches),W.debug(`in cherryPick`)}},`cherryPick`),Fwi=U(function(e){if(e=oI.sanitizeText(e,s4()),c4.records.branches.has(e)){c4.records.currBranch=e;let t=c4.records.branches.get(c4.records.currBranch);t===void 0||!t?c4.records.head=null:c4.records.head=c4.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`),U(Twi,`upsert`),U(Ewi,`prettyPrintCommitHistory`),Iwi=U(function(){W.debug(c4.records.commits);let e=Vwi()[0];Ewi([e])},`prettyPrint`),Lwi=U(function(){c4.reset(),uI()},`clear`),Rwi=U(function(){return[...c4.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),zwi=U(function(){return c4.records.branches},`getBranches`),Bwi=U(function(){return c4.records.commits},`getCommits`),Vwi=U(function(){let e=[...c4.records.commits.values()];return e.forEach(function(e){W.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),Hwi={commitType:o4,getConfig:s4,setDirection:Owi,setOptions:kwi,getOptions:Awi,commit:jwi,branch:Mwi,merge:Nwi,cherryPick:Pwi,checkout:Fwi,prettyPrint:Iwi,clear:Lwi,getBranchesAsObjArray:Rwi,getBranches:zwi,getCommits:Bwi,getCommitsArray:Vwi,getCurrentBranch:U(function(){return c4.records.currBranch},`getCurrentBranch`),getDirection:U(function(){return c4.records.direction},`getDirection`),getHead:U(function(){return c4.records.head},`getHead`),setAccTitle:dI,getAccTitle:fI,getAccDescription:mI,setAccDescription:pI,setDiagramTitle:hI,getDiagramTitle:gI},Uwi=U((e,t)=>{Nq(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)Wwi(n,t)},`populate`),Wwi=U((e,t)=>{let n={Commit:U(e=>t.commit(Gwi(e)),`Commit`),Branch:U(e=>t.branch(Kwi(e)),`Branch`),Merge:U(e=>t.merge(qwi(e)),`Merge`),Checkout:U(e=>t.checkout(Jwi(e)),`Checkout`),CherryPicking:U(e=>t.cherryPick(Ywi(e)),`CherryPicking`)}[e.$type];n?n(e):W.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),Gwi=U(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?o4.NORMAL:o4[e.type],tags:e.tags??void 0}),`parseCommit`),Kwi=U(e=>({name:e.name,order:e.order??0}),`parseBranch`),qwi=U(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:o4[e.type],tags:e.tags??void 0}),`parseMerge`),Jwi=U(e=>e.branch,`parseCheckout`),Ywi=U(e=>{var t;return{id:e.id,targetId:``,tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},`parseCherryPicking`),Xwi={parse:U(async e=>{let t=await n4(`gitGraph`,e);W.debug(t),Uwi(t,Hwi)},`parse`)},l4=10,u4=40,d4=4,f4=2,p4=8,m4=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),Zwi=12,Qwi=new Set([`redux-color`,`redux-dark-color`]),$wi=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),h4=U((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),g4=new Map,_4=new Map,v4=30,y4=new Map,b4=[],x4=0,S4=`LR`,eTi=U(()=>{g4.clear(),_4.clear(),y4.clear(),x4=0,b4=[],S4=`LR`},`clear`),tTi=U(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),nTi=U(e=>{let t,n,r;return S4===`BT`?(n=U((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=U((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{var i,a;let o=S4===`TB`||S4==`BT`?(i=_4.get(e))==null?void 0:i.y:(a=_4.get(e))==null?void 0:a.x;o!==void 0&&n(o,r)&&(t=e,r=o)}),t},`findClosestParent`),rTi=U(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=_4.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),iTi=U((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=oTi(n),i=Math.max(r,i)):a.push(n),sTi(n,r)}),r=i,a.forEach(e=>{cTi(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n!=null&&n.parents.length){let e=rTi(n.parents);r=_4.get(e).y-u4,r<=i&&(i=r);let t=g4.get(n.branch).pos,a=r-l4;_4.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),aTi=U(e=>{var t;let n=nTi(e.parents.filter(e=>e!==null));if(!n)throw Error(`Closest parent not found for commit ${e.id}`);let r=(t=_4.get(n))==null?void 0:t.y;if(r===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return r},`findClosestParentPos`),oTi=U(e=>aTi(e)+u4,`calculateCommitPosition`),sTi=U((e,t)=>{let n=g4.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+l4;return _4.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),cTi=U((e,t,n)=>{let r=g4.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;_4.set(e.id,{x:a,y:i})},`setRootPosition`),lTi=U((e,t,n,r,i,a)=>{let{theme:o}=_I(),s=m4.has(o??``),l=Qwi.has(o??``),u=$wi.has(o??``);if(a===o4.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${h4(i,p4,l)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${h4(i,p4,l)} ${r}-inner`);else if(a===o4.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${h4(i,p4,l)}`),a===o4.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${h4(i,p4,l)}`)}if(a===o4.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${h4(i,p4,l)}`)}}},`drawCommitBullet`),uTi=U((e,t,n,r,i)=>{if(t.type!==o4.CHERRY_PICK&&(t.customId&&t.type===o4.MERGE||t.type!==o4.MERGE)&&i.showCommitLabel){var a;let o=e.append(`g`),s=o.insert(`rect`).attr(`class`,`commit-label-bkg`),l=o.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),u=(a=l.node())==null?void 0:a.getBBox();if(u&&(s.attr(`x`,n.posWithOffset-u.width/2-f4).attr(`y`,n.y+13.5).attr(`width`,u.width+2*f4).attr(`height`,u.height+2*f4),S4===`TB`||S4===`BT`?(s.attr(`x`,n.x-(u.width+4*d4+5)).attr(`y`,n.y-12),l.attr(`x`,n.x-(u.width+4*d4)).attr(`y`,n.y+u.height-12)):l.attr(`x`,n.posWithOffset-u.width/2),i.rotateCommitLabel)){if(S4===`TB`||S4===`BT`)l.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(u.width+10)/25*9.5,t=10+u.width/25*8.5;o.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}}},`drawCommitLabel`),dTi=U((e,t,n,r)=>{if(t.tags.length>0){let a=0,o=0,s=0,l=[];for(let r of t.tags.reverse()){var i;let t=e.insert(`polygon`),u=e.append(`circle`),d=e.append(`text`).attr(`y`,n.y-16-a).attr(`class`,`tag-label`).text(r),f=(i=d.node())==null?void 0:i.getBBox();if(!f)throw Error(`Tag bbox not found`);o=Math.max(o,f.width),s=Math.max(s,f.height),d.attr(`x`,n.posWithOffset-f.width/2),l.push({tag:d,hole:u,rect:t,yOffset:a}),a+=20}for(let{tag:e,hole:t,rect:i,yOffset:a}of l){let l=s/2,u=n.y-19.2-a;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,` ${r-o/2-d4/2},${u+f4} ${r-o/2-d4/2},${u-f4} ${n.posWithOffset-o/2-d4},${u-l-f4} ${n.posWithOffset+o/2+d4},${u-l-f4} ${n.posWithOffset+o/2+d4},${u+l+f4} ${n.posWithOffset-o/2-d4},${u+l+f4}`),t.attr(`cy`,u).attr(`cx`,r-o/2+d4/2).attr(`r`,1.5).attr(`class`,`tag-hole`),S4===`TB`||S4===`BT`){let s=r+a;i.attr(`class`,`tag-label-bkg`).attr(`points`,` ${n.x},${s+2} ${n.x},${s-2} ${n.x+l4},${s-l-2} ${n.x+l4+o+4},${s-l-2} ${n.x+l4+o+4},${s+l+2} ${n.x+l4},${s+l+2}`).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),t.attr(`cx`,n.x+d4/2).attr(`cy`,s).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),e.attr(`x`,n.x+5).attr(`y`,s+3).attr(`transform`,`translate(14,14) rotate(45, `+n.x+`,`+r+`)`)}}}},`drawCommitTags`),fTi=U(e=>{switch(e.customType??e.type){case o4.NORMAL:return`commit-normal`;case o4.REVERSE:return`commit-reverse`;case o4.HIGHLIGHT:return`commit-highlight`;case o4.MERGE:return`commit-merge`;case o4.CHERRY_PICK:return`commit-cherry-pick`;default:return`commit-normal`}},`getCommitClassType`),pTi=U((e,t,n,r)=>{let i={x:0,y:0};if(e.parents.length>0){let n=nTi(e.parents);if(n){let a=r.get(n)??i;return t===`TB`?a.y+u4:t===`BT`?(r.get(e.id)??i).y-u4:a.x+u4}}else if(t===`TB`)return v4;else if(t===`BT`)return(r.get(e.id)??i).y-u4;else return 0;return 0},`calculatePosition`),mTi=U((e,t,n)=>{var r,i;let a=S4===`BT`&&n?t:t+l4,o=(r=g4.get(e.branch))==null?void 0:r.pos,s=S4===`TB`||S4===`BT`?(i=g4.get(e.branch))==null?void 0:i.pos:a;if(s===void 0||o===void 0)throw Error(`Position were undefined for commit ${e.id}`);let l=m4.has(_I().theme??``);return{x:s,y:S4===`TB`||S4===`BT`?a:o+(l?Zwi/2+1:-2),posWithOffset:a}},`getCommitPosition`),hTi=U((e,t,n,r)=>{let i=e.append(`g`).attr(`class`,`commit-bullets`),a=e.append(`g`).attr(`class`,`commit-labels`),o=S4===`TB`||S4===`BT`?v4:0,s=[...t.keys()],l=r.parallelCommits??!1,u=U((e,n)=>{var r,i;let a=(r=t.get(e))==null?void 0:r.seq,o=(i=t.get(n))==null?void 0:i.seq;return a!==void 0&&o!==void 0?a-o:0},`sortKeys`),d=s.sort(u);S4===`BT`&&(l&&iTi(d,t,o),d=d.reverse()),d.forEach(e=>{let s=t.get(e);if(!s)throw Error(`Commit not found for key ${e}`);l&&(o=pTi(s,S4,o,_4));let u=mTi(s,o,l);if(n){var d;let e=fTi(s),t=s.customType??s.type,n=((d=g4.get(s.branch))==null?void 0:d.index)??0;lTi(i,s,u,e,n,t),uTi(a,s,u,o,r),dTi(a,s,u,o)}S4===`TB`||S4===`BT`?_4.set(s.id,{x:u.x,y:u.posWithOffset}):_4.set(s.id,{x:u.posWithOffset,y:u.y}),o=S4===`BT`&&l?o+u4:o+u4+l4,o>x4&&(x4=o)})},`drawCommits`),gTi=U((e,t,n,r,i)=>{let a=(S4===`TB`||S4===`BT`?n.xe.branch===a,`isOnBranchToGetCurve`),s=U(n=>n.seq>e.seq&&n.seqs(e)&&o(e))},`shouldRerouteArrow`),C4=U((e,t,n=0)=>{let r=e+Math.abs(e-t)/2;return n>5?r:b4.every(e=>Math.abs(e-r)>=10)?(b4.push(r),r):C4(e,t-Math.abs(e-t)/5,n+1)},`findLane`),_Ti=U((e,t,n,r)=>{var i;let{theme:a}=_I(),o=Qwi.has(a??``),s=_4.get(t.id),l=_4.get(n.id);if(s===void 0||l===void 0)throw Error(`Commit positions not found for commits ${t.id} and ${n.id}`);let u=gTi(t,n,s,l,r),d=``,f=``,p=0,m=0,h=(i=g4.get(n.branch))==null?void 0:i.index;if(n.type===o4.MERGE&&t.id!==n.parents[0]){var g;h=(g=g4.get(t.branch))==null?void 0:g.index}let _;if(u){d=`A 10 10, 0, 0, 0,`,f=`A 10 10, 0, 0, 1,`,p=10,m=10;let e=s.yl.x&&(d=`A 20 20, 0, 0, 0,`,f=`A 20 20, 0, 0, 1,`,p=20,m=20,_=n.type===o4.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${l.y-p} ${f} ${s.x-m} ${l.y} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${l.x+p} ${s.y} ${d} ${l.x} ${s.y+m} L ${l.x} ${l.y}`),s.x===l.x&&(_=`M ${s.x} ${s.y} L ${l.x} ${l.y}`)):S4===`BT`?(s.xl.x&&(d=`A 20 20, 0, 0, 0,`,f=`A 20 20, 0, 0, 1,`,p=20,m=20,_=n.type===o4.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${l.y+p} ${d} ${s.x-m} ${l.y} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${l.x+p} ${s.y} ${f} ${l.x} ${s.y-m} L ${l.x} ${l.y}`),s.x===l.x&&(_=`M ${s.x} ${s.y} L ${l.x} ${l.y}`)):(s.yl.y&&(_=n.type===o4.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${l.x-p} ${s.y} ${d} ${l.x} ${s.y-m} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${s.x} ${l.y+p} ${f} ${s.x+m} ${l.y} L ${l.x} ${l.y}`),s.y===l.y&&(_=`M ${s.x} ${s.y} L ${l.x} ${l.y}`));if(_===void 0)throw Error(`Line definition not found`);e.append(`path`).attr(`d`,_).attr(`class`,`arrow arrow`+h4(h,p4,o))},`drawArrow`),vTi=U((e,t)=>{let n=e.append(`g`).attr(`class`,`commit-arrows`);[...t.keys()].forEach(e=>{let r=t.get(e);r.parents&&r.parents.length>0&&r.parents.forEach(e=>{_Ti(n,t.get(e),r,t)})})},`drawArrows`),yTi=U((e,t,n,r)=>{let{look:i,theme:a,themeVariables:o}=_I(),{dropShadow:s,THEME_COLOR_LIMIT:l}=o,u=m4.has(a??``),d=Qwi.has(a??``),f=e.append(`g`);t.forEach((e,t)=>{var a;let o=h4(t,u?l:p4,d),p=(a=g4.get(e.name))==null?void 0:a.pos;if(p===void 0)throw Error(`Position not found for branch ${e.name}`);let m=S4===`TB`||S4===`BT`?p:u?p+Zwi/2+1:p-2,h=f.append(`line`);h.attr(`x1`,0),h.attr(`y1`,m),h.attr(`x2`,x4),h.attr(`y2`,m),h.attr(`class`,`branch branch`+o),S4===`TB`?(h.attr(`y1`,v4),h.attr(`x1`,p),h.attr(`y2`,x4),h.attr(`x2`,p)):S4===`BT`&&(h.attr(`y1`,x4),h.attr(`x1`,p),h.attr(`y2`,v4),h.attr(`x2`,p)),b4.push(m);let g=e.name,_=tTi(g),v=f.insert(`rect`),y=f.insert(`g`).attr(`class`,`branchLabel`).insert(`g`).attr(`class`,`label branch-label`+o);y.node().appendChild(_);let b=_.getBBox(),x=u?0:4,S=u?16:0,C=u?Zwi:0;i===`neo`&&v.attr(`data-look`,`neo`),v.attr(`class`,`branchLabelBkg label`+o).attr(`style`,i===`neo`?`filter:${u?`url(#${r}-drop-shadow)`:s}`:``).attr(`rx`,x).attr(`ry`,x).attr(`x`,-b.width-4-(n.rotateCommitLabel===!0?30:0)).attr(`y`,-b.height/2+10).attr(`width`,b.width+18+S).attr(`height`,b.height+4+C),y.attr(`transform`,`translate(`+(-b.width-14-(n.rotateCommitLabel===!0?30:0)+S/2)+`, `+(m-b.height/2-2)+`)`),S4===`TB`?(v.attr(`x`,p-b.width/2-10).attr(`y`,0),y.attr(`transform`,`translate(`+(p-b.width/2-5)+`, 0)`),u&&(v.attr(`transform`,`translate(${-S/2-3}, ${-C-10})`),y.attr(`transform`,`translate(`+(p-b.width/2-5)+`, `+(-C*2+7)+`)`))):S4===`BT`?(v.attr(`x`,p-b.width/2-10).attr(`y`,x4),y.attr(`transform`,`translate(`+(p-b.width/2-5)+`, `+x4+`)`),u&&(v.attr(`transform`,`translate(${-S/2-3}, ${C+10})`),y.attr(`transform`,`translate(`+(p-b.width/2-5)+`, `+(x4+C*2+4)+`)`))):v.attr(`transform`,`translate(-19, `+(m-12-C/2)+`)`)})},`drawBranches`),bTi=U(function(e,t,n,r,i){return g4.set(e,{pos:t,index:n}),t+=50+(i?40:0)+(S4===`TB`||S4===`BT`?r.width/2:0),t},`setBranchPosition`),xTi={draw:U(function(e,t,n,r){eTi(),W.debug(`in gitgraph renderer`,e+` `,`id:`,t,n);let i=r.db;if(!i.getConfig){W.error(`getConfig method is not available on db`);return}let a=i.getConfig(),o=a.rotateCommitLabel??!1;y4=i.getCommits();let s=i.getBranchesAsObjArray();S4=i.getDirection();let l=DI(`[id="${t}"]`),{look:u,theme:d,themeVariables:f}=_I(),{useGradient:p,gradientStart:m,gradientStop:h,filterColor:g}=f;if(p){let e=l.append(`defs`).append(`linearGradient`).attr(`id`,t+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,m).attr(`stop-opacity`,1),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,h).attr(`stop-opacity`,1)}u===`neo`&&m4.has(d??``)&&l.append(`defs`).append(`filter`).attr(`id`,t+`-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,g);let _=0;s.forEach((e,t)=>{var n;let r=tTi(e.name),i=l.append(`g`),a=i.insert(`g`).attr(`class`,`branchLabel`),s=a.insert(`g`).attr(`class`,`label branch-label`);(n=s.node())==null||n.appendChild(r);let u=r.getBBox();_=bTi(e.name,_,t,u,o),s.remove(),a.remove(),i.remove()}),hTi(l,y4,!1,a),a.showBranches&&yTi(l,s,a,t),vTi(l,y4),hTi(l,y4,!0,a),xL.insertTitle(l,`gitTitleText`,a.titleTopMargin??0,i.getDiagramTitle()),zrr(void 0,l,a.diagramPadding,a.useMaxWidth)},`draw`)},STi=8,CTi=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),wTi=new Set([`redux-color`,`redux-dark-color`]),TTi=new Set([`neo`,`neo-dark`]),ETi=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),DTi=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`,`neo`,`neo-dark`]),OTi=U(e=>{let{svgId:t}=e,n=``;if(e.useGradient&&t)for(let r=0;r{let{theme:t,themeVariables:n}=WF(),{borderColorArray:r}=n,i=CTi.has(t);if(TTi.has(t)){let t=``;for(let n=0;n`${Array.from({length:e.THEME_COLOR_LIMIT},(e,t)=>t).map(t=>{let n=t%STi;return` .branch-label${t} { fill: ${e[`gitBranchLabel`+n]}; } .commit${t} { stroke: ${e[`git`+n]}; fill: ${e[`git`+n]}; } .commit-highlight${t} { stroke: ${e[`gitInv`+n]}; fill: ${e[`gitInv`+n]}; } .label${t} { fill: ${e[`git`+n]}; } .arrow${t} { stroke: ${e[`git`+n]}; } `}).join(` `)}`,`normalTheme`),jTi={parser:Xwi,db:Hwi,renderer:xTi,styles:U(e=>{let{theme:t}=WF(),n=DTi.has(t);return` .commit-id, .commit-msg, .branch-label { fill: lightgrey; color: lightgrey; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); } ${n?kTi(e):ATi(e)} .branch { stroke-width: ${e.strokeWidth}; stroke: ${e.commitLineColor??e.lineColor}; stroke-dasharray: ${n?`4 2`:`2`}; } .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n?e.nodeBorder:e.commitLabelColor}; ${n?`font-weight:${e.noteFontWeight};`:``}} .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n?`transparent`:e.commitLabelBackground}; opacity: ${n?``:.5}; } .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} .tag-label-bkg { fill: ${n?e.mainBkg:e.tagLabelBackground}; stroke: ${n?e.nodeBorder:e.tagLabelBorder}; ${n?`filter:${e.dropShadow}`:``} } .tag-hole { fill: ${e.textColor}; } .commit-merge { stroke: ${n?e.mainBkg:e.primaryColor}; fill: ${n?e.mainBkg:e.primaryColor}; } .commit-reverse { stroke: ${n?e.mainBkg:e.primaryColor}; fill: ${n?e.mainBkg:e.primaryColor}; stroke-width: ${n?e.strokeWidth:3}; } .commit-highlight-outer { } .commit-highlight-inner { stroke: ${n?e.mainBkg:e.primaryColor}; fill: ${n?e.mainBkg:e.primaryColor}; } .arrow { /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ stroke-width: ${CTi.has(t)?e.strokeWidth:8}; stroke-linecap: round; fill: none } .gitTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } `},`getStyles`)}})),NTi=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(n,(function(){return function(e,t,n){var r=function(e){return e.add(4-e.isoWeekday(),`day`)},i=t.prototype;i.isoWeekYear=function(){return r(this).year()},i.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),`day`);var t,i,a,o,s=r(this),l=(t=this.isoWeekYear(),i=this.$u,a=(i?n.utc:n)().year(t).startOf(`year`),o=4-a.isoWeekday(),a.isoWeekday()>4&&(o+=7),a.add(o,`day`));return s.diff(l,`week`)+1},i.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=i.startOf;i.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):a.bind(this)(e,t)}}}))})),PTi=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(n,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],d=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},f=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},p={A:[a,function(e){this.afternoon=f(e,!1)}],a:[a,function(e){this.afternoon=f(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,l(`seconds`)],ss:[i,l(`seconds`)],m:[i,l(`minutes`)],mm:[i,l(`minutes`)],H:[i,l(`hours`)],h:[i,l(`hours`)],HH:[i,l(`hours`)],hh:[i,l(`hours`)],D:[i,l(`day`)],DD:[r,l(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,l(`week`)],ww:[r,l(`week`)],M:[i,l(`month`)],MM:[r,l(`month`)],MMM:[a,function(e){var t=d(`months`),n=(d(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=d(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,l(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,l(`year`)],Z:u,ZZ:u};function m(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,l=0;l-1)return new Date((t===`X`?1e3:1)*e);var i=m(t)(e),a=i.year,o=i.month,s=i.day,l=i.hours,u=i.minutes,d=i.seconds,f=i.milliseconds,p=i.zone,h=i.week,g=new Date,_=s||(a||o?1:g.getDate()),v=a||g.getFullYear(),y=0;a&&!o||(y=o>0?o-1:g.getMonth());var b,x=l||0,S=u||0,C=d||0,w=f||0;return p?new Date(Date.UTC(v,y,_,x,S,C,w+60*p.offset*1e3)):n?new Date(Date.UTC(v,y,_,x,S,C,w)):(b=new Date(v,y,_,x,S,C,w),h&&(b=r(b).week(h).toDate()),b)}catch{return new Date(``)}}(t,s,r,n),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),d&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var p=s.length,h=1;h<=p;h+=1){a[1]=s[h-1];var g=n.apply(this,a);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}h===p&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),FTi=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(n,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),ITi=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(n,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,d={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},f=function(e){return e instanceof y},p=function(e,t,n){return new y(e,n,t.$l)},m=function(e){return t.p(e)+`s`},h=function(e){return e<0},g=function(e){return h(e)?Math.ceil(e):Math.floor(e)},_=function(e){return Math.abs(e)},v=function(e,t){return e?h(e)?{negative:!0,format:``+_(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},y=function(){function h(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return p(e*d[m(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[m(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(l);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var _=h.prototype;return _.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*d[n]}),0)},_.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=g(e/o),e%=o,this.$d.months=g(e/s),e%=s,this.$d.days=g(e/a),e%=a,this.$d.hours=g(e/i),e%=i,this.$d.minutes=g(e/r),e%=r,this.$d.seconds=g(e/n),e%=n,this.$d.milliseconds=e},_.toISOString=function(){var e=v(this.$d.years,`Y`),t=v(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=v(n,`D`),i=v(this.$d.hours,`H`),a=v(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=v(o,`S`),l=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,u=i.format||a.format||s.format?`T`:``,d=(l?`-`:``)+`P`+e.format+t.format+r.format+u+i.format+a.format+s.format;return d===`P`||d===`-P`?`P0D`:d},_.toJSON=function(){return this.toISOString()},_.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(u,(function(e,t){return t||String(r[e])}))},_.as=function(e){return this.$ms/d[m(e)]},_.get=function(e){var t=this.$ms,n=m(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?g(t/d[n]):this.$d[n],t||0},_.add=function(e,t,n){var r=t?e*d[m(t)]:f(e)?e.$ms:p(e,this).$ms;return p(this.$ms+r*(n?-1:1),this)},_.subtract=function(e,t){return this.add(e,t,!0)},_.locale=function(e){var t=this.clone();return t.$l=e,t},_.clone=function(){return p(this.$ms,this)},_.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},_.valueOf=function(){return this.asMilliseconds()},_.milliseconds=function(){return this.get(`milliseconds`)},_.asMilliseconds=function(){return this.as(`milliseconds`)},_.seconds=function(){return this.get(`seconds`)},_.asSeconds=function(){return this.as(`seconds`)},_.minutes=function(){return this.get(`minutes`)},_.asMinutes=function(){return this.as(`minutes`)},_.hours=function(){return this.get(`hours`)},_.asHours=function(){return this.as(`hours`)},_.days=function(){return this.get(`days`)},_.asDays=function(){return this.as(`days`)},_.weeks=function(){return this.get(`weeks`)},_.asWeeks=function(){return this.as(`weeks`)},_.months=function(){return this.get(`months`)},_.asMonths=function(){return this.as(`months`)},_.years=function(){return this.get(`years`)},_.asYears=function(){return this.as(`years`)},h}(),b=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return p(e,{$l:i.locale()},t)},i.isDuration=f;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return f(e)?b(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return f(e)?b(this,e,-1):o.bind(this)(e,t)}}}))})),LTi=l({diagram:()=>nDi});function RTi(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(n){let i=`^\\s*`+n+`\\s*$`,a=new RegExp(i);e[0].match(a)&&(t[n]=!0,e.shift(1),r=!0)})}var zTi,w4,BTi,VTi,HTi,UTi,WTi,GTi,KTi,T4,qTi,JTi,YTi,E4,D4,XTi,ZTi,O4,k4,QTi,$Ti,eEi,A4,j4,tEi,nEi,M4,rEi,iEi,aEi,oEi,sEi,cEi,lEi,uEi,dEi,fEi,pEi,mEi,hEi,gEi,_Ei,vEi,yEi,bEi,xEi,SEi,CEi,wEi,TEi,EEi,DEi,OEi,kEi,AEi,jEi,MEi,NEi,PEi,FEi,IEi,LEi,REi,N4,zEi,BEi,VEi,HEi,P4,UEi,WEi,F4,GEi,KEi,qEi,JEi,YEi,XEi,ZEi,QEi,$Ei,eDi,I4,tDi,nDi,rDi=o((()=>{wL(),bI(),hN(),fN(),zTi=uL(),w4=d(N8n(),1),BTi=d(NTi(),1),VTi=d(PTi(),1),HTi=d(FTi(),1),UTi=d(ITi(),1),XI(),WTi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],o=[1,30],s=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s]}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};D.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:return this.begin(`open_directive`),`open_directive`;case 1:return this.begin(`acc_title`),31;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),33;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin(`href`);break;case 15:this.popState();break;case 16:return 43;case 17:this.begin(`callbackname`);break;case 18:this.popState();break;case 19:this.popState(),this.begin(`callbackargs`);break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin(`click`);break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return`date`;case 45:return 30;case 46:return`accDescription`;case 47:return 36;case 48:return 38;case 49:return 39;case 50:return`:`;case 51:return 6;case 52:return`INVALID`}},`anonymous`),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function O(){this.yy={}}return U(O,`Parser`),O.prototype=D,D.Parser=O,new O})(),WTi.parser=WTi,GTi=WTi,w4.default.extend(BTi.default),w4.default.extend(VTi.default),w4.default.extend(HTi.default),KTi={friday:5,saturday:6},T4=``,qTi=``,JTi=void 0,YTi=``,E4=[],D4=[],XTi=new Map,ZTi=[],O4=[],k4=``,QTi=``,$Ti=[`active`,`done`,`crit`,`milestone`,`vert`],eEi=[],A4=``,j4=!1,tEi=!1,nEi=`sunday`,M4=`saturday`,rEi=0,iEi=U(function(){ZTi=[],O4=[],k4=``,eEi=[],REi=0,VEi=void 0,HEi=void 0,P4=[],T4=``,qTi=``,QTi=``,JTi=void 0,YTi=``,E4=[],D4=[],j4=!1,tEi=!1,rEi=0,XTi=new Map,A4=``,uI(),nEi=`sunday`,M4=`saturday`},`clear`),aEi=U(function(e){A4=e},`setDiagramId`),oEi=U(function(e){qTi=e},`setAxisFormat`),sEi=U(function(){return qTi},`getAxisFormat`),cEi=U(function(e){JTi=e},`setTickInterval`),lEi=U(function(){return JTi},`getTickInterval`),uEi=U(function(e){YTi=e},`setTodayMarker`),dEi=U(function(){return YTi},`getTodayMarker`),fEi=U(function(e){T4=e},`setDateFormat`),pEi=U(function(){j4=!0},`enableInclusiveEndDates`),mEi=U(function(){return j4},`endDatesAreInclusive`),hEi=U(function(){tEi=!0},`enableTopAxis`),gEi=U(function(){return tEi},`topAxisEnabled`),_Ei=U(function(e){QTi=e},`setDisplayMode`),vEi=U(function(){return QTi},`getDisplayMode`),yEi=U(function(){return T4},`getDateFormat`),bEi=U((e,t)=>{let n=t.toLowerCase().split(/[\s,]+/).filter(e=>e!==``);return[...new Set([...e,...n])]},`mergeTokens`),xEi=U(function(e){E4=bEi(E4,e)},`setIncludes`),SEi=U(function(){return E4},`getIncludes`),CEi=U(function(e){D4=bEi(D4,e)},`setExcludes`),wEi=U(function(){return D4},`getExcludes`),TEi=U(function(){return XTi},`getLinks`),EEi=U(function(e){k4=e,ZTi.push(e)},`addSection`),DEi=U(function(){return ZTi},`getSections`),OEi=U(function(){let e=KEi(),t=0;for(;!e&&t<10;)e=KEi(),t++;return O4=P4,O4},`getTasks`),kEi=U(function(e,t,n,r){let i=e.format(t.trim()),a=e.format(`YYYY-MM-DD`);return r.includes(i)||r.includes(a)?!1:n.includes(`weekends`)&&(e.isoWeekday()===KTi[M4]||e.isoWeekday()===KTi[M4]+1)||n.includes(e.format(`dddd`).toLowerCase())?!0:n.includes(i)||n.includes(a)},`isInvalidDate`),AEi=U(function(e){nEi=e},`setWeekday`),jEi=U(function(){return nEi},`getWeekday`),MEi=U(function(e){M4=e},`setWeekend`),NEi=U(function(e,t,n,r){if(!n.length||e.manualEndTime)return;let i;i=e.startTime instanceof Date?(0,w4.default)(e.startTime):(0,w4.default)(e.startTime,t,!0),i=i.add(1,`d`);let a;a=e.endTime instanceof Date?(0,w4.default)(e.endTime):(0,w4.default)(e.endTime,t,!0);let[o,s]=PEi(i,a,t,n,r);e.endTime=o.toDate(),e.renderEndTime=s},`checkTaskDates`),PEi=U(function(e,t,n,r,i){let a=!1,o=null,s=t.add(1e4,`d`);for(;e<=t;){if(a||(o=t.toDate()),a=kEi(e,n,r,i),a&&(t=t.add(1,`d`),t>s))throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,`d`)}return[t,o]},`fixTaskDates`),FEi=U(function(e,t,n){if(n=n.trim(),U(e=>{let t=e.trim();return t===`x`||t===`X`},`isTimestampFormat`)(t)&&/^\d+$/.test(n))return new Date(Number(n));let r=/^after\s+(?[\d\w- ]+)/.exec(n);if(r!==null){let e=null;for(let t of r.groups.ids.split(` `)){let n=F4(t);n!==void 0&&(!e||n.endTime>e.endTime)&&(e=n)}if(e)return e.endTime;let t=new Date;return t.setHours(0,0,0,0),t}let i=(0,w4.default)(n,t.trim(),!0);if(i.isValid())return i.toDate();{W.debug(`Invalid date:`+n),W.debug(`With date format:`+t.trim());let e=new Date(n);if(e===void 0||isNaN(e.getTime())||e.getFullYear()<-1e4||e.getFullYear()>1e4)throw Error(`Invalid date:`+n);return e}},`getStartDate`),IEi=U(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t===null?[NaN,`ms`]:[Number.parseFloat(t[1]),t[2]]},`parseDuration`),LEi=U(function(e,t,n,r=!1){n=n.trim();let i=/^until\s+(?[\d\w- ]+)/.exec(n);if(i!==null){let e=null;for(let t of i.groups.ids.split(` `)){let n=F4(t);n!==void 0&&(!e||n.startTime{window.open(n,`_self`)}),XTi.set(e,n))}),JEi(e,`clickable`)},`setLink`),JEi=U(function(e,t){e.split(`,`).forEach(function(e){let n=F4(e);n!==void 0&&n.classes.push(t)})},`setClass`),YEi=U(function(e,t,n){if(_I().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{xL.runFunc(t,...r)})},`setClickFun`),XEi=U(function(e,t){eEi.push(function(){let n=A4?`${A4}-${e}`:e,r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,function(){t()})},function(){let n=A4?`${A4}-${e}`:e,r=document.querySelector(`[id="${n}-text"]`);r!==null&&r.addEventListener(`click`,function(){t()})})},`pushFun`),ZEi={getConfig:U(()=>_I().gantt,`getConfig`),clear:iEi,setDateFormat:fEi,getDateFormat:yEi,enableInclusiveEndDates:pEi,endDatesAreInclusive:mEi,enableTopAxis:hEi,topAxisEnabled:gEi,setAxisFormat:oEi,getAxisFormat:sEi,setTickInterval:cEi,getTickInterval:lEi,setTodayMarker:uEi,getTodayMarker:dEi,setAccTitle:dI,getAccTitle:fI,setDiagramTitle:hI,getDiagramTitle:gI,setDiagramId:aEi,setDisplayMode:_Ei,getDisplayMode:vEi,setAccDescription:pI,getAccDescription:mI,addSection:EEi,getSections:DEi,getTasks:OEi,addTask:WEi,findTaskById:F4,addTaskOrg:GEi,setIncludes:xEi,getIncludes:SEi,setExcludes:CEi,getExcludes:wEi,setClickEvent:U(function(e,t,n){e.split(`,`).forEach(function(e){YEi(e,t,n)}),JEi(e,`clickable`)},`setClickEvent`),setLink:qEi,getLinks:TEi,bindFunctions:U(function(e){eEi.forEach(function(t){t(e)})},`bindFunctions`),parseDuration:IEi,isInvalidDate:kEi,setWeekday:AEi,getWeekday:jEi,setWeekend:MEi},U(RTi,`getTaskTags`),w4.default.extend(UTi.default),QEi=U(function(){W.debug(`Something is calling, setConf, remove the call`)},`setConf`),$Ei={monday:LE,tuesday:Jgn,wednesday:Ygn,thursday:RE,friday:Xgn,saturday:Zgn,sunday:IE},eDi=U((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),i=0;for(let e of r)for(let r=0;r=n[r]){n[r]=e.endTime,e.order=r+t,r>i&&(i=r);break}return i},`getMaxIntersections`),tDi=1e4,nDi={parser:GTi,db:ZEi,renderer:{setConf:QEi,draw:U(function(e,t,n,r){let i=_I().gantt;r.db.setDiagramId(t);let a=_I().securityLevel,o;a===`sandbox`&&(o=DI(`#i`+t));let s=DI(a===`sandbox`?o.nodes()[0].contentDocument.body:`body`),l=a===`sandbox`?o.nodes()[0].contentDocument:document,u=l.getElementById(t);I4=u.parentElement.offsetWidth,I4===void 0&&(I4=1200),i.useWidth!==void 0&&(I4=i.useWidth);let d=r.db.getTasks(),f=d.filter(e=>!e.vert),p=[];for(let e of f)p.push(e.type);p=E(p);let m={},h=2*i.topPadding;if(r.db.getDisplayMode()===`compact`||i.displayMode===`compact`){let e={};for(let t of f)e[t.section]===void 0?e[t.section]=[t]:e[t.section].push(t);let t=0;for(let n of Object.keys(e)){let r=eDi(e[n],t)+1;t+=r,h+=r*(i.barHeight+i.barGap),m[n]=r}}else{h+=f.length*(i.barHeight+i.barGap);for(let e of p)m[e]=f.filter(t=>t.type===e).length}u.setAttribute(`viewBox`,`0 0 `+I4+` `+h);let g=s.select(`[id="${t}"]`),_=Bvn().domain([fpn(d,function(e){return e.startTime}),upn(d,function(e){return e.endTime})]).rangeRound([0,I4-i.leftPadding-i.rightPadding]);function v(e,t){let n=e.startTime,r=t.startTime,i=0;return n>r?i=1:ne.vert===t.vert?0:e.vert?1:-1);let d=e.filter(e=>!e.vert),f=[...new Set(d.map(e=>e.order))].map(e=>d.find(t=>t.order===e));g.append(`g`).selectAll(`rect`).data(f).enter().append(`rect`).attr(`x`,0).attr(`y`,function(e,t){return t=e.order,t*n+a-2}).attr(`width`,function(){return u-i.rightPadding/2}).attr(`height`,n).attr(`class`,function(e){for(let[t,n]of p.entries())if(e.type===n)return`section section`+t%i.numberSectionStyles;return`section section0`}).enter();let m=g.append(`g`).selectAll(`rect`).data(e).enter(),h=r.db.getLinks();if(m.append(`rect`).attr(`id`,function(e){return t+`-`+e.id}).attr(`rx`,3).attr(`ry`,3).attr(`x`,function(e){return e.milestone?_(e.startTime)+o+.5*(_(e.endTime)-_(e.startTime))-.5*s:_(e.startTime)+o}).attr(`y`,function(e,t){return t=e.order,e.vert?i.gridLineStartPadding:t*n+a}).attr(`width`,function(e){return e.milestone?s:e.vert?.08*s:_(e.renderEndTime||e.endTime)-_(e.startTime)}).attr(`height`,function(e){return e.vert?d.length*(i.barHeight+i.barGap)+i.barHeight*2:s}).attr(`transform-origin`,function(e,t){return t=e.order,(_(e.startTime)+o+.5*(_(e.endTime)-_(e.startTime))).toString()+`px `+(t*n+a+.5*s).toString()+`px`}).attr(`class`,function(e){let t=``;e.classes.length>0&&(t=e.classes.join(` `));let n=0;for(let[t,r]of p.entries())e.type===r&&(n=t%i.numberSectionStyles);let r=``;return e.active?e.crit?r+=` activeCrit`:r=` active`:e.done?r=e.crit?` doneCrit`:` done`:e.crit&&(r+=` crit`),r.length===0&&(r=` task`),e.milestone&&(r=` milestone `+r),e.vert&&(r=` vert `+r),r+=n,r+=` `+t,`task`+r}),m.append(`text`).attr(`id`,function(e){return t+`-`+e.id+`-text`}).text(function(e){return e.task}).attr(`font-size`,i.fontSize).attr(`x`,function(e){let t=_(e.startTime),n=_(e.renderEndTime||e.endTime);if(e.milestone&&(t+=.5*(_(e.endTime)-_(e.startTime))-.5*s,n=t+s),e.vert)return _(e.startTime)+o;let r=this.getBBox().width;return r>n-t?n+r+1.5*i.leftPadding>u?t+o-5:n+o+5:(n-t)/2+t+o}).attr(`y`,function(e,t){return e.vert?i.gridLineStartPadding+d.length*(i.barHeight+i.barGap)+60:(t=e.order,t*n+i.barHeight/2+(i.fontSize/2-2)+a)}).attr(`text-height`,s).attr(`class`,function(e){let t=_(e.startTime),n=_(e.endTime);e.milestone&&(n=t+s);let r=this.getBBox().width,a=``;e.classes.length>0&&(a=e.classes.join(` `));let o=0;for(let[t,n]of p.entries())e.type===n&&(o=t%i.numberSectionStyles);let l=``;return e.active&&(l=e.crit?`activeCritText`+o:`activeText`+o),e.done?l=e.crit?l+` doneCritText`+o:l+` doneText`+o:e.crit&&(l=l+` critText`+o),e.milestone&&(l+=` milestoneText`),e.vert&&(l+=` vertText`),r>n-t?n+r+1.5*i.leftPadding>u?a+` taskTextOutsideLeft taskTextOutside`+o+` `+l:a+` taskTextOutsideRight taskTextOutside`+o+` `+l+` width-`+r:a+` taskText taskText`+o+` `+l+` width-`+r}),_I().securityLevel===`sandbox`){let e;e=DI(`#i`+t);let n=e.nodes()[0].contentDocument;m.filter(function(e){return h.has(e.id)}).each(function(e){var r=n.querySelector(`#`+CSS.escape(t+`-`+e.id)),i=n.querySelector(`#`+CSS.escape(t+`-`+e.id+`-text`));let a=r.parentNode;var o=n.createElement(`a`);o.setAttribute(`xlink:href`,h.get(e.id)),o.setAttribute(`target`,`_top`),a.appendChild(o),o.appendChild(r),o.appendChild(i)})}}U(b,`drawRects`);function x(e,n,a,o,s,l,u,d){if(u.length===0&&d.length===0)return;let f,p;for(let{startTime:e,endTime:t}of l)(f===void 0||ep)&&(p=t);if(!f||!p)return;if((0,w4.default)(p).diff((0,w4.default)(f),`year`)>5){W.warn(`The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.`);return}let m=r.db.getDateFormat(),h=[],v=null,y=(0,w4.default)(f);for(;y.valueOf()<=p;)r.db.isInvalidDate(y,m,u,d)?v?v.end=y:v={start:y,end:y}:v&&(h.push(v),v=null),y=y.add(1,`d`);g.append(`g`).selectAll(`rect`).data(h).enter().append(`rect`).attr(`id`,e=>t+`-exclude-`+e.start.format(`YYYY-MM-DD`)).attr(`x`,e=>_(e.start.startOf(`day`))+a).attr(`y`,i.gridLineStartPadding).attr(`width`,e=>_(e.end.endOf(`day`))-_(e.start.startOf(`day`))).attr(`height`,s-n-i.gridLineStartPadding).attr(`transform-origin`,function(t,n){return(_(t.start)+a+.5*(_(t.end)-_(t.start))).toString()+`px `+(n*e+.5*s).toString()+`px`}).attr(`class`,`exclude-range`)}U(x,`drawExcludeDays`);function S(e,t,n,r){if(n<=0||e>t)return 1/0;let i=t-e,a=w4.default.duration({[r??`day`]:n}).asMilliseconds();return a<=0?1/0:Math.ceil(i/a)}U(S,`getEstimatedTickCount`);function C(e,t,n,a){let o=r.db.getDateFormat(),s=r.db.getAxisFormat(),l;l=s||(o===`D`?`%d`:i.axisFormat??`%Y-%m-%d`);let u=Qrr(_).tickSize(-a+t+i.gridLineStartPadding).tickFormat(jvn(l)),d=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(d!==null){let e=parseInt(d[1],10);if(isNaN(e)||e<=0)W.warn(`Invalid tick interval value: "${d[1]}". Skipping custom tick interval.`);else{let t=d[2],n=r.db.getWeekday()||i.weekday,a=_.domain(),o=a[0],s=a[1],l=S(o,s,e,t);if(l>tDi)W.warn(`The tick interval "${e}${t}" would generate ${l} ticks, which exceeds the maximum allowed (${tDi}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(t){case`millisecond`:u.ticks(CE.every(e));break;case`second`:u.ticks(kE.every(e));break;case`minute`:u.ticks(AE.every(e));break;case`hour`:u.ticks(jE.every(e));break;case`day`:u.ticks(ME.every(e));break;case`week`:u.ticks($Ei[n].every(e));break;case`month`:u.ticks(HE.every(e))}}}if(g.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+(a-50)+`)`).call(u).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10).attr(`dy`,`1em`),r.db.topAxisEnabled()||i.topAxis){let n=Zrr(_).tickSize(-a+t+i.gridLineStartPadding).tickFormat(jvn(l));if(d!==null){let e=parseInt(d[1],10);if(isNaN(e)||e<=0)W.warn(`Invalid tick interval value: "${d[1]}". Skipping custom tick interval.`);else{let t=d[2],a=r.db.getWeekday()||i.weekday,o=_.domain(),s=o[0],l=o[1];if(S(s,l,e,t)<=tDi)switch(t){case`millisecond`:n.ticks(CE.every(e));break;case`second`:n.ticks(kE.every(e));break;case`minute`:n.ticks(AE.every(e));break;case`hour`:n.ticks(jE.every(e));break;case`day`:n.ticks(ME.every(e));break;case`week`:n.ticks($Ei[a].every(e));break;case`month`:n.ticks(HE.every(e))}}}g.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+t+`)`).call(n).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10)}}U(C,`makeGrid`);function w(e,t){let n=0,r=Object.keys(m).map(e=>[e,m[e]]);g.append(`g`).selectAll(`text`).data(r).enter().append(function(e){let t=e[0].split(oI.lineBreakRegex),n=-(t.length-1)/2,r=l.createElementNS(`http://www.w3.org/2000/svg`,`text`);r.setAttribute(`dy`,n+`em`);for(let[e,n]of t.entries()){let t=l.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);t.setAttribute(`alignment-baseline`,`central`),t.setAttribute(`x`,`10`),e>0&&t.setAttribute(`dy`,`1em`),t.textContent=n,r.appendChild(t)}return r}).attr(`x`,10).attr(`y`,function(i,a){if(a>0)for(let o=0;o` .mermaid-main-font { font-family: ${e.fontFamily}; } .exclude-range { fill: ${e.excludeBkgColor}; } .section { stroke: none; opacity: 0.2; } .section0 { fill: ${e.sectionBkgColor}; } .section2 { fill: ${e.sectionBkgColor2}; } .section1, .section3 { fill: ${e.altSectionBkgColor}; opacity: 0.2; } .sectionTitle0 { fill: ${e.titleColor}; } .sectionTitle1 { fill: ${e.titleColor}; } .sectionTitle2 { fill: ${e.titleColor}; } .sectionTitle3 { fill: ${e.titleColor}; } .sectionTitle { text-anchor: start; font-family: ${e.fontFamily}; } /* Grid and axis */ .grid .tick { stroke: ${e.gridColor}; opacity: 0.8; shape-rendering: crispEdges; } .grid .tick text { font-family: ${e.fontFamily}; fill: ${e.textColor}; } .grid path { stroke-width: 0; } /* Today line */ .today { fill: none; stroke: ${e.todayLineColor}; stroke-width: 2px; } /* Task styling */ /* Default task */ .task { stroke-width: 2; } .taskText { text-anchor: middle; font-family: ${e.fontFamily}; } .taskTextOutsideRight { fill: ${e.taskTextDarkColor}; text-anchor: start; font-family: ${e.fontFamily}; } .taskTextOutsideLeft { fill: ${e.taskTextDarkColor}; text-anchor: end; } /* Special case clickable */ .task.clickable { cursor: pointer; } .taskText.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideLeft.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideRight.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } /* Specific task settings for the sections*/ .taskText0, .taskText1, .taskText2, .taskText3 { fill: ${e.taskTextColor}; } .task0, .task1, .task2, .task3 { fill: ${e.taskBkgColor}; stroke: ${e.taskBorderColor}; } .taskTextOutside0, .taskTextOutside2 { fill: ${e.taskTextOutsideColor}; } .taskTextOutside1, .taskTextOutside3 { fill: ${e.taskTextOutsideColor}; } /* Active task */ .active0, .active1, .active2, .active3 { fill: ${e.activeTaskBkgColor}; stroke: ${e.activeTaskBorderColor}; } .activeText0, .activeText1, .activeText2, .activeText3 { fill: ${e.taskTextDarkColor} !important; } /* Completed task */ .done0, .done1, .done2, .done3 { stroke: ${e.doneTaskBorderColor}; fill: ${e.doneTaskBkgColor}; stroke-width: 2; } .doneText0, .doneText1, .doneText2, .doneText3 { fill: ${e.taskTextDarkColor} !important; } /* Done task text displayed outside the bar sits against the diagram background, not against the done-task bar, so it must use the outside/contrast color. */ .doneText0.taskTextOutsideLeft, .doneText0.taskTextOutsideRight, .doneText1.taskTextOutsideLeft, .doneText1.taskTextOutsideRight, .doneText2.taskTextOutsideLeft, .doneText2.taskTextOutsideRight, .doneText3.taskTextOutsideLeft, .doneText3.taskTextOutsideRight { fill: ${e.taskTextOutsideColor} !important; } /* Tasks on the critical line */ .crit0, .crit1, .crit2, .crit3 { stroke: ${e.critBorderColor}; fill: ${e.critBkgColor}; stroke-width: 2; } .activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: ${e.critBorderColor}; fill: ${e.activeTaskBkgColor}; stroke-width: 2; } .doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: ${e.critBorderColor}; fill: ${e.doneTaskBkgColor}; stroke-width: 2; cursor: pointer; shape-rendering: crispEdges; } .milestone { transform: rotate(45deg) scale(0.8,0.8); } .milestoneText { font-style: italic; } .doneCritText0, .doneCritText1, .doneCritText2, .doneCritText3 { fill: ${e.taskTextDarkColor} !important; } /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */ .doneCritText0.taskTextOutsideLeft, .doneCritText0.taskTextOutsideRight, .doneCritText1.taskTextOutsideLeft, .doneCritText1.taskTextOutsideRight, .doneCritText2.taskTextOutsideLeft, .doneCritText2.taskTextOutsideRight, .doneCritText3.taskTextOutsideLeft, .doneCritText3.taskTextOutsideRight { fill: ${e.taskTextOutsideColor} !important; } .vert { stroke: ${e.vertLineColor}; } .vertText { font-size: 15px; text-anchor: middle; fill: ${e.vertLineColor} !important; } .activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { fill: ${e.taskTextDarkColor} !important; } .titleText { text-anchor: middle; font-size: 18px; fill: ${e.titleColor||e.textColor}; font-family: ${e.fontFamily}; } `,`getStyles`)}})),iDi=l({diagram:()=>sDi}),aDi,oDi,sDi,cDi=o((()=>{QI(),bI(),hN(),fN(),a4(),aDi={parse:U(async e=>{let t=await n4(`info`,e);W.debug(t)},`parse`)},oDi={version:`11.17.2`},sDi={parser:aDi,db:{getVersion:U(()=>oDi.version,`getVersion`)},renderer:{draw:U((e,t,n)=>{W.debug(`rendering info diagram `+e);let r=ZI(t);sI(r,100,400,!0),r.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${n}`)},`draw`)}}})),lDi=l({diagram:()=>yDi}),uDi,dDi,L4,fDi,pDi,mDi,hDi,gDi,_Di,vDi,yDi,bDi=o((()=>{Pq(),QI(),wL(),bI(),hN(),fN(),a4(),XI(),uDi=FF.pie,dDi={sections:new Map,showData:!1,config:uDi},L4=dDi.sections,fDi=dDi.showData,pDi=structuredClone(uDi),mDi={getConfig:U(()=>structuredClone(pDi),`getConfig`),clear:U(()=>{L4=new Map,fDi=dDi.showData,uI()},`clear`),setDiagramTitle:hI,getDiagramTitle:gI,setAccTitle:dI,getAccTitle:fI,setAccDescription:pI,getAccDescription:mI,addSection:U(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);L4.has(e)||(L4.set(e,t),W.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:U(()=>L4,`getSections`),setShowData:U(e=>{fDi=e},`setShowData`),getShowData:U(()=>fDi,`getShowData`)},hDi=U((e,t)=>{Nq(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),gDi={parse:U(async e=>{let t=await n4(`pie`,e);W.debug(t),hDi(t,mDi)},`parse`)},_Di=U(e=>` .pieCircle{ stroke: ${e.pieStrokeColor}; stroke-width : ${e.pieStrokeWidth}; opacity : ${e.pieOpacity}; } .pieCircle.highlighted{ scale: 1.05; opacity: 1; } .pieCircle.highlightedOnHover:hover{ transition-duration: 250ms; scale: 1.05; opacity: 1; } .pieOuterCircle{ stroke: ${e.pieOuterStrokeColor}; stroke-width: ${e.pieOuterStrokeWidth}; fill: none; } .pieTitleText { text-anchor: middle; font-size: ${e.pieTitleTextSize}; fill: ${e.pieTitleTextColor}; font-family: ${e.fontFamily}; } .slice { font-family: ${e.fontFamily}; fill: ${e.pieSectionTextColor}; font-size:${e.pieSectionTextSize}; // fill: white; } .legend text { fill: ${e.pieLegendTextColor}; font-family: ${e.fontFamily}; font-size: ${e.pieLegendTextSize}; } `,`getStyles`),vDi=U(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),n=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return B5t().value(e=>e.value).sort(null)(n)},`createPieArcs`),yDi={parser:gDi,db:mDi,renderer:{draw:U((e,t,n,r)=>{var i;W.debug(`rendering pie chart `+e);let a=r.db,o=_I(),s=mL(a.getConfig(),o.pie),l=ZI(t),u=l.append(`g`);u.attr(`transform`,`translate(225,225)`);let{themeVariables:d}=o,[f]=bL(d.pieOuterStrokeWidth);f??(f=2);let p=s.legendPosition,m=s.textPosition,h=s.donutHole>0&&s.donutHole<=.9?s.donutHole:0,g=Zx().innerRadius(h*185).outerRadius(185),_=Zx().innerRadius(185*m).outerRadius(185*m),v=u.append(`g`);v.append(`circle`).attr(`cx`,0).attr(`cy`,0).attr(`r`,185+f/2).attr(`class`,`pieOuterCircle`);let y=a.getSections(),b=vDi(y),x=[d.pie1,d.pie2,d.pie3,d.pie4,d.pie5,d.pie6,d.pie7,d.pie8,d.pie9,d.pie10,d.pie11,d.pie12],S=0;y.forEach(e=>{S+=e});let C=b.filter(e=>(e.data.value/S*100).toFixed(0)!==`0`),w=MT(x).domain([...y.keys()]);v.selectAll(`mySlices`).data(C).enter().append(`path`).attr(`d`,g).attr(`fill`,e=>w(e.data.label)).attr(`class`,e=>{let t=`pieCircle`;return s.highlightSlice===`hover`?t+=` highlightedOnHover`:s.highlightSlice===e.data.label&&(t+=` highlighted`),t}),v.selectAll(`mySlices`).data(C).enter().append(`text`).text(e=>(e.data.value/S*100).toFixed(0)+`%`).attr(`transform`,e=>`translate(`+_.centroid(e)+`)`).style(`text-anchor`,`middle`).attr(`class`,`slice`);let T=u.append(`text`).text(a.getDiagramTitle()).attr(`x`,0).attr(`y`,-200).attr(`class`,`pieTitleText`),E=[...y.entries()].map(([e,t])=>({label:e,value:t})),D=u.selectAll(`.legend`).data(E).enter().append(`g`).attr(`class`,`legend`);D.append(`rect`).attr(`width`,18).attr(`height`,18).style(`fill`,e=>w(e.label)).style(`stroke`,e=>w(e.label)),D.append(`text`).attr(`x`,22).attr(`y`,14).text(e=>a.getShowData()?`${e.label} [${e.value}]`:e.label);let O=Math.max(...D.selectAll(`text`).nodes().map(e=>(e==null?void 0:e.getBoundingClientRect().width)??0)),k=450,A=490,j=E.length*22;switch(p){case`center`:D.attr(`transform`,(e,t)=>{let n=22*E.length/2,r=-O/2-22,i=t*22-n;return`translate(`+r+`,`+i+`)`});break;case`top`:k+=j,D.attr(`transform`,(e,t)=>`translate(${-O/2-22}, ${t*22-185})`),v.attr(`transform`,()=>`translate(0, ${j+22})`);break;case`bottom`:k+=j,D.attr(`transform`,(e,t)=>{let n=-O/2-22,r=t*22- -207;return`translate(`+n+`,`+r+`)`});break;case`left`:A+=22+O,D.attr(`transform`,(e,t)=>{let n=22*E.length/2;return`translate(-207,`+(t*22-n)+`)`}),v.attr(`transform`,()=>`translate(${O+18+4}, 0)`);break;default:A+=22+O,D.attr(`transform`,(e,t)=>{let n=22*E.length/2;return`translate(216,`+(t*22-n)+`)`})}let M=((i=T.node())==null?void 0:i.getBoundingClientRect().width)??0,N=225-M/2,P=225+M/2,F=Math.min(0,N),I=Math.max(A,P)-F;l.attr(`viewBox`,`${F} 0 ${I} ${k}`),sI(l,k,I,s.useMaxWidth)},`draw`)},styles:_Di}})),xDi=l({diagram:()=>WDi});function SDi(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function CDi(e){return!/^\d+$/.test(e)}function wDi(e){return!/^\d+px$/.test(e)}function R4(e){return QF(e.trim(),_I())}function TDi(e){V4.setData({quadrant1Text:R4(e.text)})}function EDi(e){V4.setData({quadrant2Text:R4(e.text)})}function DDi(e){V4.setData({quadrant3Text:R4(e.text)})}function ODi(e){V4.setData({quadrant4Text:R4(e.text)})}function kDi(e){V4.setData({xAxisLeftText:R4(e.text)})}function ADi(e){V4.setData({xAxisRightText:R4(e.text)})}function jDi(e){V4.setData({yAxisTopText:R4(e.text)})}function MDi(e){V4.setData({yAxisBottomText:R4(e.text)})}function NDi(e){let t={};for(let n of e){let[e,r]=n.trim().split(/\s*:\s*/);if(e===`radius`){if(CDi(r))throw new B4(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(SDi(r))throw new B4(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(SDi(r))throw new B4(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if(wDi(r))throw new B4(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw Error(`style named ${e} is not supported.`)}return t}function PDi(e,t,n,r,i){let a=NDi(i);V4.addPoints([{x:n,y:r,text:R4(e.text),className:t,...a}])}function FDi(e,t){V4.addClass(e,NDi(t))}function IDi(e){V4.setConfig({chartWidth:e})}function LDi(e){V4.setConfig({chartHeight:e})}function RDi(){let{themeVariables:e,quadrantChart:t}=_I();return t&&V4.setConfig(t),V4.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),V4.setData({titleText:gI()}),V4.build()}var zDi,BDi,VDi,HDi,z4,UDi,B4,V4,WDi,GDi=o((()=>{bI(),hN(),fN(),XI(),VDi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,3],n=[1,4],r=[1,5],i=[1,6],a=[1,7],o=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],s=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],ee=[1,62],te=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ne=[1,66],z=[1,67],re=[1,68],ie=[1,69],ae=[1,70],oe=[1,71],se=[1,72],ce=[1,73],le=[1,74],ue=[1,75],de=[1,76],fe=[1,77],pe=[4,5,6,7,8,9,10,11,12,13,14,15,18],me=[1,91],he=[1,92],ge=[1,93],_e=[1,100],ve=[1,94],ye=[1,97],be=[1,95],xe=[1,96],Se=[1,98],Ce=[1,99],we=[1,103],Te=[10,55,56,57],Ee=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],De={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[{18:t,26:1,27:2,28:n,55:r,56:i,57:a},{1:[3]},{18:t,26:8,27:2,28:n,55:r,56:i,57:a},{18:t,26:9,27:2,28:n,55:r,56:i,57:a},e(o,[2,33],{29:10}),e(s,[2,61]),e(s,[2,62]),e(s,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(o,[2,34]),{27:46,55:r,56:i,57:a},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(l,[2,45]),e(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},e(te,[2,64]),e(te,[2,66]),e(te,[2,67]),e(te,[2,70]),e(te,[2,71]),e(te,[2,72]),e(te,[2,73]),e(te,[2,74]),e(te,[2,75]),e(te,[2,76]),e(te,[2,77]),e(te,[2,78]),e(te,[2,79]),e(te,[2,80]),e(te,[2,81]),e(o,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:65,4:ne,5:z,6:re,7:ie,8:ae,9:oe,10:se,11:ce,12:le,13:ue,14:de,15:fe,21:64},e(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,49:[1,78],63:N,64:P,65:F,66:I,67:L}),e(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,49:[1,79],63:N,64:P,65:F,66:I,67:L}),e(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,63:N,64:P,65:F,66:I,67:L}),e(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,63:N,64:P,65:F,66:I,67:L}),e(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,63:N,64:P,65:F,66:I,67:L}),e(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},e(te,[2,65]),e(te,[2,82]),e(te,[2,83]),e(te,[2,84]),{3:83,4:ne,5:z,6:re,7:ie,8:ae,9:oe,10:se,11:ce,12:le,13:ue,14:de,15:fe,18:[1,82]},e(pe,[2,23]),e(pe,[2,1]),e(pe,[2,2]),e(pe,[2,3]),e(pe,[2,4]),e(pe,[2,5]),e(pe,[2,6]),e(pe,[2,7]),e(pe,[2,8]),e(pe,[2,9]),e(pe,[2,10]),e(pe,[2,11]),e(pe,[2,12]),e(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:me,5:he,6:ge,8:_e,11:ve,13:ye,16:90,17:be,18:xe,19:Se,20:Ce,22:89,23:88},e(pe,[2,24]),e(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,63:N,64:P,65:F,66:I,67:L}),e(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:ee,63:N,64:P,65:F,66:I,67:L}),e(l,[2,47],{22:89,16:90,23:101,4:me,5:he,6:ge,8:_e,11:ve,13:ye,17:be,18:xe,19:Se,20:Ce}),{46:[1,102]},e(l,[2,29],{10:we}),e(Te,[2,27],{16:104,4:me,5:he,6:ge,8:_e,11:ve,13:ye,17:be,18:xe,19:Se,20:Ce}),e(Ee,[2,25]),e(Ee,[2,13]),e(Ee,[2,14]),e(Ee,[2,15]),e(Ee,[2,16]),e(Ee,[2,17]),e(Ee,[2,18]),e(Ee,[2,19]),e(Ee,[2,20]),e(Ee,[2,21]),e(Ee,[2,22]),e(l,[2,49],{10:we}),e(l,[2,48],{22:89,16:90,23:105,4:me,5:he,6:ge,8:_e,11:ve,13:ye,17:be,18:xe,19:Se,20:Ce}),{4:me,5:he,6:ge,8:_e,11:ve,13:ye,16:90,17:be,18:xe,19:Se,20:Ce,22:106},e(Ee,[2,26]),e(l,[2,50],{10:we}),e(Te,[2,28],{16:104,4:me,5:he,6:ge,8:_e,11:ve,13:ye,17:be,18:xe,19:Se,20:Ce})],defaultActions:{8:[2,30],9:[2,31]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};De.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin(`title`),35;case 5:return this.popState(),`title_value`;case 6:return this.begin(`acc_title`),37;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),39;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin(`md_string`);break;case 22:return`MD_STR`;case 23:this.popState();break;case 24:this.begin(`string`);break;case 25:this.popState();break;case 26:return`STR`;case 27:this.begin(`class_name`);break;case 28:return this.popState(),47;case 29:return this.begin(`point_start`),44;case 30:return this.begin(`point_x`),45;case 31:this.popState();break;case 32:this.popState(),this.begin(`point_y`);break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function Oe(){this.yy={}}return U(Oe,`Parser`),Oe.prototype=De,De.Parser=Oe,new Oe})(),VDi.parser=VDi,HDi=VDi,z4=MF(),UDi=(zDi=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:``,quadrant1Text:``,quadrant2Text:``,quadrant3Text:``,quadrant4Text:``,xAxisLeftText:``,xAxisRightText:``,yAxisBottomText:``,yAxisTopText:``,points:[]}}getDefaultConfig(){var e,t,n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((e=FF.quadrantChart)==null?void 0:e.chartWidth)||500,chartWidth:((t=FF.quadrantChart)==null?void 0:t.chartHeight)||500,titlePadding:((n=FF.quadrantChart)==null?void 0:n.titlePadding)||10,titleFontSize:((r=FF.quadrantChart)==null?void 0:r.titleFontSize)||20,quadrantPadding:((i=FF.quadrantChart)==null?void 0:i.quadrantPadding)||5,xAxisLabelPadding:((a=FF.quadrantChart)==null?void 0:a.xAxisLabelPadding)||5,yAxisLabelPadding:((o=FF.quadrantChart)==null?void 0:o.yAxisLabelPadding)||5,xAxisLabelFontSize:((s=FF.quadrantChart)==null?void 0:s.xAxisLabelFontSize)||16,yAxisLabelFontSize:((l=FF.quadrantChart)==null?void 0:l.yAxisLabelFontSize)||16,quadrantLabelFontSize:((u=FF.quadrantChart)==null?void 0:u.quadrantLabelFontSize)||16,quadrantTextTopPadding:((d=FF.quadrantChart)==null?void 0:d.quadrantTextTopPadding)||5,pointTextPadding:((f=FF.quadrantChart)==null?void 0:f.pointTextPadding)||5,pointLabelFontSize:((p=FF.quadrantChart)==null?void 0:p.pointLabelFontSize)||12,pointRadius:((m=FF.quadrantChart)==null?void 0:m.pointRadius)||5,xAxisPosition:((h=FF.quadrantChart)==null?void 0:h.xAxisPosition)||`top`,yAxisPosition:((g=FF.quadrantChart)==null?void 0:g.yAxisPosition)||`left`,quadrantInternalBorderStrokeWidth:((_=FF.quadrantChart)==null?void 0:_.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((v=FF.quadrantChart)==null?void 0:v.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:z4.quadrant1Fill,quadrant2Fill:z4.quadrant2Fill,quadrant3Fill:z4.quadrant3Fill,quadrant4Fill:z4.quadrant4Fill,quadrant1TextFill:z4.quadrant1TextFill,quadrant2TextFill:z4.quadrant2TextFill,quadrant3TextFill:z4.quadrant3TextFill,quadrant4TextFill:z4.quadrant4TextFill,quadrantPointFill:z4.quadrantPointFill,quadrantPointTextFill:z4.quadrantPointTextFill,quadrantXAxisTextFill:z4.quadrantXAxisTextFill,quadrantYAxisTextFill:z4.quadrantYAxisTextFill,quadrantTitleFill:z4.quadrantTitleFill,quadrantInternalBorderStrokeFill:z4.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:z4.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,W.info(`clear called`)}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){W.trace(`setConfig called with: `,e),this.config={...this.config,...e}}setThemeConfig(e){W.trace(`setThemeConfig called with: `,e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,n,r){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e===`top`&&t?i:0,bottom:e===`bottom`&&t?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition===`left`&&n?o:0,right:this.config.yAxisPosition===`right`&&n?o:0},l=this.config.titleFontSize+this.config.titlePadding*2,u={top:r?l:0},d=this.config.quadrantPadding+s.left,f=this.config.quadrantPadding+a.top+u.top,p=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,m=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-u.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:u,quadrantSpace:{quadrantLeft:d,quadrantTop:f,quadrantWidth:p,quadrantHalfWidth:p/2,quadrantHeight:m,quadrantHalfHeight:m/2}}}getAxisLabels(e,t,n,r){let{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:l,quadrantHalfWidth:u,quadrantTop:d,quadrantWidth:f}=i,p=!!this.data.xAxisRightText,m=!!this.data.yAxisTopText,h=[];return this.data.xAxisLeftText&&t&&h.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(p?u/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+d+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.xAxisRightText&&t&&h.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+u+(p?u/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+d+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.yAxisBottomText&&n&&h.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:d+s-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?`center`:`left`,horizontalPos:`top`,rotation:-90}),this.data.yAxisTopText&&n&&h.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:d+o-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?`center`:`left`,horizontalPos:`top`,rotation:-90}),h}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=t,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let e of o)e.text.x=e.x+e.width/2,this.data.points.length===0?(e.text.y=e.y+e.height/2,e.text.horizontalPos=`middle`):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos=`top`);return o}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:n,quadrantLeft:r,quadrantTop:i,quadrantWidth:a}=t,o=yE().domain([0,1]).range([r,a+r]),s=yE().domain([0,1]).range([n+i,i]);return this.data.points.map(e=>{let t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:o(e.x),y:s(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:o(e.x),y:s(e.y)+this.config.pointTextPadding,verticalPos:`center`,horizontalPos:`top`,fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??`0px`}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:l}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s,x2:a+l+t,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:s+t,x2:a+l,y2:s+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s+i,x2:a+l+t,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+t,x2:a,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+t,x2:a+o,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:s+r,x2:a+l-t,y2:s+r}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:`top`,verticalPos:`center`,rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?`bottom`:this.config.xAxisPosition,i=this.calculateSpace(r,e,t,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},U(zDi,`QuadrantBuilder`),zDi),B4=(BDi=class extends Error{constructor(e,t,n){super(`value for ${e} ${t} is invalid, please use a valid ${n}`),this.name=`InvalidStyleError`}},U(BDi,`InvalidStyleError`),BDi),U(SDi,`validateHexCode`),U(CDi,`validateNumber`),U(wDi,`validateSizeInPixels`),U(R4,`textSanitizer`),V4=new UDi,U(TDi,`setQuadrant1Text`),U(EDi,`setQuadrant2Text`),U(DDi,`setQuadrant3Text`),U(ODi,`setQuadrant4Text`),U(kDi,`setXAxisLeftText`),U(ADi,`setXAxisRightText`),U(jDi,`setYAxisTopText`),U(MDi,`setYAxisBottomText`),U(NDi,`parseStyles`),U(PDi,`addPoint`),U(FDi,`addClass`),U(IDi,`setWidth`),U(LDi,`setHeight`),U(RDi,`getQuadrantData`),WDi={parser:HDi,db:{setWidth:IDi,setHeight:LDi,setQuadrant1Text:TDi,setQuadrant2Text:EDi,setQuadrant3Text:DDi,setQuadrant4Text:ODi,setXAxisLeftText:kDi,setXAxisRightText:ADi,setYAxisTopText:jDi,setYAxisBottomText:MDi,parseStyles:NDi,addPoint:PDi,addClass:FDi,getQuadrantData:RDi,clear:U(function(){V4.clear(),uI()},`clear`),setAccTitle:dI,getAccTitle:fI,setDiagramTitle:hI,getDiagramTitle:gI,getAccDescription:mI,setAccDescription:pI},renderer:{draw:U((e,t,n,r)=>{var i,a,o;function s(e){return e===`top`?`hanging`:`middle`}U(s,`getDominantBaseLine`);function l(e){return e===`left`?`start`:`middle`}U(l,`getTextAnchor`);function u(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}U(u,`getTransformation`);let d=_I();W.debug(`Rendering quadrant chart `+e);let f=d.securityLevel,p;f===`sandbox`&&(p=DI(`#i`+t));let m=DI(f===`sandbox`?p.nodes()[0].contentDocument.body:`body`).select(`[id="${t}"]`),h=m.append(`g`).attr(`class`,`main`),g=((i=d.quadrantChart)==null?void 0:i.chartWidth)??500,_=((a=d.quadrantChart)==null?void 0:a.chartHeight)??500;sI(m,_,g,((o=d.quadrantChart)==null?void 0:o.useMaxWidth)??!0),m.attr(`viewBox`,`0 0 `+g+` `+_),r.db.setHeight(_),r.db.setWidth(g);let v=r.db.getQuadrantData(),y=h.append(`g`).attr(`class`,`quadrants`),b=h.append(`g`).attr(`class`,`border`),x=h.append(`g`).attr(`class`,`data-points`),S=h.append(`g`).attr(`class`,`labels`),C=h.append(`g`).attr(`class`,`title`);v.title&&C.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,v.title.fill).attr(`font-size`,v.title.fontSize).attr(`dominant-baseline`,s(v.title.horizontalPos)).attr(`text-anchor`,l(v.title.verticalPos)).attr(`transform`,u(v.title)).text(v.title.text),v.borderLines&&b.selectAll(`line`).data(v.borderLines).enter().append(`line`).attr(`x1`,e=>e.x1).attr(`y1`,e=>e.y1).attr(`x2`,e=>e.x2).attr(`y2`,e=>e.y2).style(`stroke`,e=>e.strokeFill).style(`stroke-width`,e=>e.strokeWidth);let w=y.selectAll(`g.quadrant`).data(v.quadrants).enter().append(`g`).attr(`class`,`quadrant`);w.append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill),w.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>l(e.text.verticalPos)).attr(`transform`,e=>u(e.text)).text(e=>e.text.text),S.selectAll(`g.label`).data(v.axisLabels).enter().append(`g`).attr(`class`,`label`).append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>s(e.horizontalPos)).attr(`text-anchor`,e=>l(e.verticalPos)).attr(`transform`,e=>u(e));let T=x.selectAll(`g.data-point`).data(v.points).enter().append(`g`).attr(`class`,`data-point`);T.append(`circle`).attr(`cx`,e=>e.x).attr(`cy`,e=>e.y).attr(`r`,e=>e.radius).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeColor).attr(`stroke-width`,e=>e.strokeWidth),T.append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text.text).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>l(e.text.verticalPos)).attr(`transform`,e=>u(e.text))},`draw`)},styles:U(()=>``,`styles`)}})),KDi=l({diagram:()=>ZOi});function qDi(e){return e.type===`bar`}function JDi(e){return e.type===`band`}function H4(e){return e.type===`linear`}function YDi(e,t,n,r){let i=new MOi(r);return JDi(e)?new IOi(t,n,e.categories,e.title,i):new LOi(t,n,[e.min,e.max],e.title,i)}function XDi(e,t,n,r){return new ROi(new MOi(r),e,t,n)}function ZDi(e){return{fontSize:e,markerSize:e*zOi,markerSpacing:e*VOi,itemSpacing:e*BOi}}function QDi(e,t,n,r){return new HOi(new MOi(r),e,t,n)}function $Di(e,t,n){return new GOi(e,t,n)}function eOi(){let e=MF(),t=WF();return mL(e.xyChart,t.themeVariables.xyChart)}function tOi(){let e=WF();return mL(FF.xyChart,e.xyChart)}function nOi(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}function U4(e){let t=WF();return QF(e.trim(),t)}function rOi(e){JOi=e}function iOi(e){e===`horizontal`?G4.chartOrientation=`horizontal`:G4.chartOrientation=`vertical`}function aOi(e){q4.xAxis.title=U4(e.text)}function oOi(e,t){q4.xAxis={type:`linear`,title:q4.xAxis.title,min:e,max:t},J4=!0}function sOi(e){q4.xAxis={type:`band`,title:q4.xAxis.title,categories:e.map(e=>U4(e.text))},J4=!0}function cOi(e){q4.yAxis.title=U4(e.text)}function lOi(e,t){q4.yAxis={type:`linear`,title:q4.yAxis.title,min:e,max:t},XOi=!0}function uOi(e){let t=Math.min(...e),n=Math.max(...e),r=H4(q4.yAxis)?q4.yAxis.min:1/0,i=H4(q4.yAxis)?q4.yAxis.max:-1/0;q4.yAxis={type:`linear`,title:q4.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}function dOi(e){let t=[];if(e.length===0)return t;if(!J4){let t=H4(q4.xAxis)?q4.xAxis.min:1/0,n=H4(q4.xAxis)?q4.xAxis.max:-1/0;oOi(Math.min(t,1),Math.max(n,e.length))}if(JDi(q4.xAxis)&&e.length>q4.xAxis.categories.length&&(e=e.slice(0,q4.xAxis.categories.length)),XOi||uOi(e),JDi(q4.xAxis)&&(t=q4.xAxis.categories.map((t,n)=>[t,e[n]])),H4(q4.xAxis)){let n=q4.xAxis.min,r=q4.xAxis.max;if(e.length===1)t=[[`${n}`,e[0]]];else{let i=(r-n)/(e.length-1);t=e.map((e,t)=>[`${n+t*i}`,e])}}return t}function fOi(e){return YOi[e===0?0:e%YOi.length]}function pOi(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?U4(e.label):``),i=dOi(n),a=r.some(e=>e!==``);q4.plots.push({type:`line`,title:U4(e.text),strokeFill:fOi(W4),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),W4++}function mOi(e,t){let n=dOi(t.map(e=>e.value));q4.plots.push({type:`bar`,title:U4(e.text),fill:fOi(W4),data:n}),W4++}function hOi(){if(q4.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return q4.title=gI(),qOi.build(G4,q4,K4,JOi)}function gOi(){return K4}function _Oi(){return G4}function vOi(){return q4}var yOi,bOi,xOi,SOi,COi,wOi,TOi,EOi,DOi,OOi,kOi,AOi,jOi,MOi,NOi,POi,FOi,IOi,LOi,ROi,zOi,BOi,VOi,HOi,UOi,WOi,GOi,KOi,qOi,W4,JOi,G4,K4,q4,YOi,J4,XOi,ZOi,QOi=o((()=>{QI(),JL(),lL(),wL(),bI(),hN(),fN(),XI(),AOi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,10,12,14,16,18,19,21,23],n=[2,6],r=[1,3],i=[1,5],a=[1,6],o=[1,7],s=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[e(t,n,{3:1,4:2,7:4,5:r,36:i,37:a,38:o}),{1:[3]},e(t,n,{4:2,7:4,3:8,5:r,36:i,37:a,38:o}),e(t,n,{4:2,7:4,6:9,3:10,5:r,8:[1,11],36:i,37:a,38:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(s,[2,36]),e(s,[2,37]),e(s,[2,38]),{1:[2,1]},e(t,n,{4:2,7:4,3:21,5:r,36:i,37:a,38:o}),{1:[2,3]},e(s,[2,5]),e(t,[2,7],{4:22,36:i,37:a,38:o}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},e(T,[2,18]),{1:[2,2]},e(T,[2,8]),e(T,[2,9]),e(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),e(E,[2,40]),e(E,[2,41]),e(D,[2,42]),e(D,[2,44]),e(D,[2,45]),e(D,[2,46]),e(D,[2,47]),e(D,[2,48]),e(D,[2,49]),e(D,[2,50]),e(D,[2,51]),e(D,[2,52]),e(D,[2,53]),e(T,[2,10]),e(T,[2,24],{32:41,31:56,24:x,29:S}),e(T,[2,26]),e(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,11]),e(T,[2,32],{35:60,29:C}),e(T,[2,34]),{33:[1,61]},e(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},e(T,[2,14]),{17:66,24:w},e(T,[2,16]),e(T,[2,17]),e(D,[2,43]),e(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(T,[2,33]),{29:[1,70]},e(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(k,[2,23],{30:[1,73]}),e(T,[2,15]),e(T,[2,28]),e(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,35]),e(T,[2,19]),{25:75,27:64,29:O},e(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function j(){this.yy={}}return U(j,`Parser`),j.prototype=A,A.Parser=j,new j})(),AOi.parser=AOi,jOi=AOi,U(qDi,`isBarPlot`),U(JDi,`isBandAxisData`),U(H4,`isLinearAxisData`),MOi=(yOi=class{constructor(e){this.parentGroup=e}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=Upr(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},U(yOi,`TextDimensionCalculatorWithFont`),yOi),NOi=.7,POi=.2,FOi=(bOi=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){NOi*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(NOi*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=POi*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=POi*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},U(bOi,`BaseAxis`),bOi),IOi=(xOi=class extends FOi{constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=NT().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=NT().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),W.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},U(xOi,`BandAxis`),xOi),LOi=(SOi=class extends FOi{constructor(e,t,n,r,i){super(e,r,i,t),this.domain=n,this.scale=yE().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=yE().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}},U(SOi,`LinearAxis`),SOi),U(YDi,`getAxis`),ROi=(COi=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}},U(COi,`ChartTitle`),COi),U(XDi,`getChartTitleComponent`),zOi=.75,BOi=.5,VOi=.35,U(ZDi,`getLegendLayout`),HOi=(wOi=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(e=>e.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:t,markerSize:n,markerSpacing:r,itemSpacing:i}=ZDi(this.chartConfig.legendFontSize),a=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(e=>e.title),t),o=this.chartConfig.legendPadding*2+n+r+a.width,s=this.chartConfig.legendPadding*2+this.visiblePlots.length*t+(this.visiblePlots.length-1)*i;return o<=e.width&&s<=e.height?(this.boundingRect.width=o,this.boundingRect.height=s):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:t,markerSpacing:n,itemSpacing:r}=ZDi(this.chartConfig.legendFontSize),i=e+r,a=this.boundingRect.x+this.chartConfig.legendPadding,o=this.boundingRect.y+this.chartConfig.legendPadding,s=[],l=[];for(let[e,n]of this.visiblePlots.entries())if(qDi(n))s.push({x:a,y:o+e*i,width:t,height:t,fill:n.fill,strokeFill:n.fill,strokeWidth:0});else{let r=o+e*i+t/2;l.push({path:`M ${a},${r} L ${a+t},${r}`,strokeFill:n.strokeFill,strokeWidth:n.strokeWidth})}return[{groupTexts:[`legend`,`markers`],type:`rect`,data:s},{groupTexts:[`legend`,`markers`],type:`path`,data:l},{groupTexts:[`legend`,`label`],type:`text`,data:this.visiblePlots.map((r,s)=>({text:r.title,x:a+t+n,y:o+s*i+t/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:`middle`,horizontalPos:`left`}))}]}},U(wOi,`ChartLegend`),wOi),U(QDi,`getChartLegendComponent`),UOi=(TOi=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;if(t=this.orientation===`horizontal`?eS().y(e=>e[0]).x(e=>e[1])(e):eS().x(e=>e[0]).y(e=>e[1])(e),!t)return[];let n=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[n,[r,i]]of e.entries()){let e=this.plotData.pointLabels[n];e&&(this.orientation===`horizontal`?t.push({x:i+10,y:r,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):t.push({x:r,y:i-10,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}t.length>0&&n.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:t})}return n}},U(TOi,`LinePlot`),TOi),WOi=(EOi=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},U(EOi,`BarPlot`),EOi),GOi=(DOi=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new UOi(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new WOi(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}}return e}},U(DOi,`BasePlot`),DOi),U($Di,`getPlotComponent`),KOi=(OOi=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:XDi(e,t,n,r),plot:$Di(e,t,n),legend:QDi(e,t,n,r),xAxis:YDi(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:YDi(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i={width:0,height:0},a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`bottom`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=s.height,this.componentStore.yAxis.setAxisPosition(`left`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=s.width,e-=s.width,i=this.componentStore.legend.calculateSpace({width:e,height:o}),e-=i.width,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.legend.setBoundingBoxXY({x:n+a,y:r+Math.max((o-i.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+o}),this.componentStore.yAxis.setRange([r,r+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>qDi(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a={width:0,height:0},o=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:o,height:s});e-=l.width,t-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=l.height,t-=l.height,this.componentStore.xAxis.setAxisPosition(`left`),l=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=l.width,r=l.width,this.componentStore.yAxis.setAxisPosition(`top`),l=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=l.height,i=n+l.height,a=this.componentStore.legend.calculateSpace({width:e,height:s}),e-=a.width,e>0&&(o+=e,e=0),t>0&&(s+=t,t=0),this.componentStore.plot.calculateSpace({width:o,height:s}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.legend.setBoundingBoxXY({x:r+o,y:i+Math.max((s-a.height)/2,0)}),this.componentStore.yAxis.setRange([r,r+o]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>qDi(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},U(OOi,`Orchestrator`),OOi),qOi=(kOi=class{static build(e,t,n,r){return new KOi(e,t,n,r).getDrawableElement()}},U(kOi,`XYChartBuilder`),kOi),W4=0,G4=tOi(),K4=eOi(),q4=nOi(),YOi=K4.plotColorPalette.split(`,`).map(e=>e.trim()),J4=!1,XOi=!1,U(eOi,`getChartDefaultThemeConfig`),U(tOi,`getChartDefaultConfig`),U(nOi,`getChartDefaultData`),U(U4,`textSanitizer`),U(rOi,`setTmpSVGG`),U(iOi,`setOrientation`),U(aOi,`setXAxisTitle`),U(oOi,`setXAxisRangeData`),U(sOi,`setXAxisBand`),U(cOi,`setYAxisTitle`),U(lOi,`setYAxisRangeData`),U(uOi,`setYAxisRangeFromPlotData`),U(dOi,`transformDataWithoutCategory`),U(fOi,`getPlotColorFromPalette`),U(pOi,`setLineData`),U(mOi,`setBarData`),U(hOi,`getDrawableElem`),U(gOi,`getChartThemeConfig`),U(_Oi,`getChartConfig`),U(vOi,`getXYChartData`),ZOi={parser:jOi,db:{getDrawableElem:hOi,clear:U(function(){uI(),W4=0,G4=tOi(),q4=nOi(),K4=eOi(),YOi=K4.plotColorPalette.split(`,`).map(e=>e.trim()),J4=!1,XOi=!1},`clear`),setAccTitle:dI,getAccTitle:fI,setDiagramTitle:hI,getDiagramTitle:gI,getAccDescription:mI,setAccDescription:pI,setOrientation:iOi,setXAxisTitle:aOi,setXAxisRangeData:oOi,setXAxisBand:sOi,setYAxisTitle:cOi,setYAxisRangeData:lOi,setLineData:pOi,setBarData:mOi,setTmpSVGG:rOi,getChartThemeConfig:gOi,getChartConfig:_Oi,getXYChartData:vOi},renderer:{draw:U((e,t,n,r)=>{let i=r.db,a=i.getChartThemeConfig(),o=i.getChartConfig(),s=i.getXYChartData().plots[0].data.map(e=>e[1]);function l(e){return e===`top`?`text-before-edge`:`middle`}U(l,`getDominantBaseLine`);function u(e){return e===`left`?`start`:e===`right`?`end`:`middle`}U(u,`getTextAnchor`);function d(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}U(d,`getTextTransformation`),W.debug(`Rendering xychart chart `+e);let f=ZI(t),p=f.append(`g`).attr(`class`,`main`),m=p.append(`rect`).attr(`width`,o.width).attr(`height`,o.height).attr(`class`,`background`);sI(f,o.height,o.width,!0),f.attr(`viewBox`,`0 0 ${o.width} ${o.height}`),m.attr(`fill`,a.backgroundColor),i.setTmpSVGG(f.append(`g`).attr(`class`,`mermaid-tmp-group`));let h=i.getDrawableElem(),g={};function _(e){let t=p,n=``;for(let[r]of e.entries()){let i=p;r>0&&g[n]&&(i=g[n]),n+=e[r],t=g[n],t||(t=g[n]=i.append(`g`).attr(`class`,e[r]))}return t}U(_,`getGroup`);for(let e of h){if(e.data.length===0)continue;let t=_(e.groupTexts);switch(e.type){case`rect`:if(t.selectAll(`rect`).data(e.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),o.showDataLabel){let n=o.showDataLabelOutsideBar;if(o.chartOrientation===`horizontal`){let r=function(e,t){let{data:n,label:r}=e;return t*r.length*i<=n.width-o};U(r,`fitsHorizontally`);let i=.7,o=10,l=e.data.map((e,t)=>({data:e,label:s[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),u=l.map(e=>{let{data:t}=e,n=t.height*.7;for(;!r(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...u)),f=U(e=>n?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);t.selectAll(`text`).data(l).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,n?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,a.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let r=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,l=o+a/2,u=s>=r.x&&l<=r.x+r.width,d=r.y+n+t<=r.y+r.height;return u&&d};U(r,`fitsInBar`);let i=e.data.map((e,t)=>({data:e,label:s[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=i.map(e=>{let{data:t,label:n}=e,i=t.width/(n.length*.7);for(;!r(e,i,10)&&i>0;)--i;return i}),l=Math.floor(Math.min(...o)),u=U(e=>n?e.data.y-10:e.data.y+10,`determineLabelYPosition`);t.selectAll(`text`).data(i).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,u).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,n?`auto`:`hanging`).attr(`fill`,a.dataLabelColor).attr(`font-size`,`${l}px`).text(e=>e.label)}}break;case`text`:t.selectAll(`text`).data(e.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>l(e.verticalPos)).attr(`text-anchor`,e=>u(e.horizontalPos)).attr(`transform`,e=>d(e)).text(e=>e.text);break;case`path`:t.selectAll(`path`).data(e.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth)}}},`draw`)}}})),$Oi=l({diagram:()=>cki}),eki,tki,nki,rki,iki,aki,oki,ski,cki,lki=o((()=>{Tq(),Dq(),DK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),tki=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,3],n=[1,4],r=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],o=[1,22],s=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],A=[1,70],j=[1,71],M=[1,72],N=[1,73],P=[1,74],F=[1,75],I=[1,76],L=[1,83],R=[1,80],ee=[1,84],te=[1,85],ne=[1,86],z=[1,87],re=[1,88],ie=[1,89],ae=[1,90],oe=[1,91],se=[1,92],ce=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],le=[63,64],ue=[1,101],de=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],pe=[1,110],me=[1,106],he=[1,107],ge=[1,108],_e=[1,109],ve=[1,111],ye=[1,116],be=[1,117],xe=[1,114],Se=[1,115],Ce={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,6:t,9:n,11:r,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:n,11:r,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:n,11:r,13:i},{1:[2,2]},{4:17,5:o,7:13,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:o,7:42,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:o,7:43,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:o,7:44,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:o,7:45,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:o,7:46,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:o,7:47,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:o,7:48,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:o,7:49,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:o,7:50,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},e(D,[2,29]),e(D,[2,30]),e(D,[2,31]),e(D,[2,32]),e(D,[2,33]),e(D,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(k,[2,79]),e(k,[2,80]),{27:[1,67],29:[1,68]},e(k,[2,85]),e(k,[2,86]),{62:69,65:A,66:j,67:M,68:N,69:P,70:F,71:I},{62:77,65:A,66:j,67:M,68:N,69:P,70:F,71:I},{30:78,33:62,75:E,89:C,90:w},{73:79,75:L,76:R,78:81,79:82,80:ee,81:te,82:ne,83:z,84:re,85:ie,86:ae,87:oe,88:se},e(ce,[2,60]),e(ce,[2,62]),{73:93,75:L,76:R,78:81,79:82,80:ee,81:te,82:ne,83:z,84:re,85:ie,86:ae,87:oe,88:se},{30:94,33:62,75:E,76:R,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},e(le,[2,50]),e(le,[2,51]),e(le,[2,52]),e(le,[2,53]),e(le,[2,54]),e(le,[2,55]),e(le,[2,56]),{64:[1,100]},e(T,[2,59],{76:R}),e(T,[2,64],{76:ue}),{33:103,75:[1,102],89:C,90:w},e(de,[2,65],{79:104,75:L,80:ee,81:te,82:ne,83:z,84:re,85:ie,86:ae,87:oe,88:se}),e(fe,[2,67]),e(fe,[2,69]),e(fe,[2,70]),e(fe,[2,71]),e(fe,[2,72]),e(fe,[2,73]),e(fe,[2,74]),e(fe,[2,75]),e(fe,[2,76]),e(fe,[2,77]),e(fe,[2,78]),e(T,[2,57],{76:ue}),e(T,[2,58],{76:R}),{5:pe,28:105,31:me,34:he,36:ge,38:_e,40:ve},{27:[1,112],76:R},{5:ye,40:be,56:113,57:xe,59:Se},{27:[1,118],76:R},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:L,78:121,79:82,80:ee,81:te,82:ne,83:z,84:re,85:ie,86:ae,87:oe,88:se},e(ce,[2,61]),e(ce,[2,63]),e(fe,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:pe,28:126,31:me,34:he,36:ge,38:_e,40:ve},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:ye,40:be,56:130,57:xe,59:Se},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(de,[2,66],{79:104,75:L,80:ee,81:te,82:ne,83:z,84:re,85:ie,86:ae,87:oe,88:se}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(T,[2,27]),{5:pe,28:145,31:me,34:he,36:ge,38:_e,40:ve},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[2,46]),{5:ye,40:be,56:152,57:xe,59:Se},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:pe,28:159,31:me,34:he,36:ge,38:_e,40:ve},{5:pe,28:160,31:me,34:he,36:ge,38:_e,40:ve},{5:pe,28:161,31:me,34:he,36:ge,38:_e,40:ve},{5:pe,28:162,31:me,34:he,36:ge,38:_e,40:ve},{5:ye,40:be,56:163,57:xe,59:Se},{5:ye,40:be,56:164,57:xe,59:Se},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};Ce.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:return`title`;case 1:return this.begin(`acc_title`),9;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),11;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin(`style`),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return`PERCENT`;case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin(`string`);break;case 58:this.popState();break;case 59:return this.begin(`style`),72;case 60:return this.begin(`style`),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin(`string`);break;case 65:this.popState();break;case 66:return`qString`;case 67:return t.yytext=t.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},`anonymous`),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}})();function we(){this.yy={}}return U(we,`Parser`),we.prototype=Ce,Ce.Parser=we,new we})(),tki.parser=tki,nki=tki,rki=(eki=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction=`TB`,this.RequirementType={REQUIREMENT:`Requirement`,FUNCTIONAL_REQUIREMENT:`Functional Requirement`,INTERFACE_REQUIREMENT:`Interface Requirement`,PERFORMANCE_REQUIREMENT:`Performance Requirement`,PHYSICAL_REQUIREMENT:`Physical Requirement`,DESIGN_CONSTRAINT:`Design Constraint`},this.RiskLevel={LOW_RISK:`Low`,MED_RISK:`Medium`,HIGH_RISK:`High`},this.VerifyType={VERIFY_ANALYSIS:`Analysis`,VERIFY_DEMONSTRATION:`Demonstration`,VERIFY_INSPECTION:`Inspection`,VERIFY_TEST:`Test`},this.Relationships={CONTAINS:`contains`,COPIES:`copies`,DERIVES:`derives`,SATISFIES:`satisfies`,VERIFIES:`verifies`,REFINES:`refines`,TRACES:`traces`},this.setAccTitle=dI,this.getAccTitle=fI,this.setAccDescription=pI,this.getAccDescription=mI,this.setDiagramTitle=hI,this.getDiagramTitle=gI,this.getConfig=U(()=>_I().requirement,`getConfig`),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:``,text:``,risk:``,verifyMethod:``,name:``,type:``,cssStyles:[],classes:[`default`]}}getInitialElement(){return{name:``,type:``,docRef:``,cssStyles:[],classes:[`default`]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:[`default`]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:[`default`]}),W.info(`Added new element: `,e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,n){this.relations.push({type:e,src:t,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,uI()}setCssStyle(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(!t||!e)return;for(let n of t)n.includes(`,`)?e.cssStyles.push(...n.split(`,`)):e.cssStyles.push(n)}}setClass(e,t){for(let r of e){let e=this.requirements.get(r)??this.elements.get(r);if(e)for(let r of t){var n;e.classes.push(r);let t=(n=this.classes.get(r))==null?void 0:n.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(let n of e){let e=this.classes.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.classes.set(n,e)),t&&t.forEach(function(t){if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))}),this.elements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))})}}getClasses(){return this.classes}getData(){let e=_I(),t=[],n=[];for(let n of this.requirements.values()){let r=n;r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.shape=`requirementBox`,r.look=e.look,r.colorIndex=t.length,t.push(r)}for(let n of this.elements.values()){let r=n;r.shape=`requirementBox`,r.look=e.look,r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.colorIndex=t.length,t.push(r)}let r=0;for(let t of this.relations){var i,a,o,s;let l=t.type===this.Relationships.CONTAINS,u={id:`${t.src}-${t.dst}-${r++}`,start:((i=this.requirements.get(t.src))==null?void 0:i.name)??((a=this.elements.get(t.src))==null?void 0:a.name),end:((o=this.requirements.get(t.dst))==null?void 0:o.name)??((s=this.elements.get(t.dst))==null?void 0:s.name),label:`<<${t.type}>>`,classes:`relationshipLine`,style:[`fill:none`,l?``:`stroke-dasharray: 10,7`],labelpos:`c`,thickness:`normal`,type:`normal`,pattern:l?`normal`:`dashed`,arrowTypeStart:l?`requirement_contains`:``,arrowTypeEnd:l?``:`requirement_arrow`,look:e.look,labelType:`markdown`};n.push(u)}return{nodes:t,edges:n,other:{},config:e,direction:this.getDirection()}}},U(eki,`RequirementDB`),eki),iki=U(e=>{let{themeVariables:t,look:n}=WF(),{bkgColorArray:r,borderColorArray:i}=t;if(!(i!=null&&i.length))return``;let a=``;for(let t=0;t{let{look:t,themeVariables:n}=WF(),{requirementEdgeLabelBackground:r}=n;return` ${iki(e)} marker { fill: ${e.relationColor}; stroke: ${e.relationColor}; } marker.cross { stroke: ${e.lineColor}; } svg { font-family: ${e.fontFamily}; font-size: ${e.fontSize}; } .reqBox { fill: ${e.requirementBackground}; fill-opacity: 1.0; stroke: ${e.requirementBorderColor}; stroke-width: ${e.requirementBorderSize}; } .reqTitle, .reqLabel{ fill: ${e.requirementTextColor}; } .reqLabelBox { fill: ${e.relationLabelBackground}; fill-opacity: 1.0; } .req-title-line { stroke: ${e.requirementBorderColor}; stroke-width: ${e.requirementBorderSize}; } .relationshipLine { stroke: ${e.relationColor}; stroke-width: ${t===`neo`?e.strokeWidth:`1px`}; } .relationshipLabel { fill: ${e.relationLabelColor}; } .edgeLabel { background-color: ${e.edgeLabelBackground}; } .edgeLabel .label rect { fill: ${e.edgeLabelBackground}; } .edgeLabel .label text { fill: ${e.relationLabelColor}; } .divider { stroke: ${e.nodeBorder}; stroke-width: 1; } .label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .label text,span { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .labelBkg { background-color: ${r??e.edgeLabelBackground}; } `},`getStyles`),oki={},dN(oki,{draw:()=>ski}),ski=U(async function(e,t,n,r){W.info(`REF0:`),W.info(`Drawing requirement diagram (unified)`,t);let{securityLevel:i,state:a,layout:o,look:s}=_I(),l=r.db.getData(),u=wq(t,i);l.type=r.type,l.layoutAlgorithm=EK(o),l.nodeSpacing=(a==null?void 0:a.nodeSpacing)??50,l.rankSpacing=(a==null?void 0:a.rankSpacing)??50,l.markers=s===`neo`?[`requirement_contains_neo`,`requirement_arrow_neo`]:[`requirement_contains`,`requirement_arrow`],l.diagramId=t,await TK(l,u),xL.insertTitle(u,`requirementDiagramTitleText`,(a==null?void 0:a.titleTopMargin)??25,r.db.getDiagramTitle()),Eq(u,8,`requirementDiagram`,(a==null?void 0:a.useMaxWidth)??!0)},`draw`),cki={parser:nki,get db(){return new rki},renderer:oki,styles:aki}})),uki=l({diagram:()=>vAi});async function dki(e,t){d3.bumpVerticalPos(10);let{startx:n,stopx:r,message:i}=t,a=oI.splitBreaks(i).length,o=rI(i),s=o?await iI(i,_I()):xL.calculateTextDimensions(i,f3(u3));if(!o){let e=s.height/a;t.height+=e,d3.bumpVerticalPos(e)}let l,u=s.height-10,d=s.width;if(n===r){l=d3.getVerticalPos()+u,u3.rightAngles||(u+=u3.boxMargin,l=d3.getVerticalPos()+u),u+=30;let e=oI.getMax(d/2,u3.width/2);d3.insert(n-e,d3.getVerticalPos()-10+u,r+e,d3.getVerticalPos()+30+u)}else u+=u3.boxMargin,l=d3.getVerticalPos()+u,d3.insert(n,l-10,r,l);return d3.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,d3.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}function Y4(e,t,n,r,i){d3.bumpVerticalPos(n);let a=r;if(t.id&&t.message&&e[t.id]){let n=e[t.id].width,i=f3(u3);t.message=xL.wrapLabel(`[${t.message}]`,n-2*u3.wrapPadding,i),t.width=n,t.wrap=!0;let o=xL.calculateTextDimensions(t.message,i),s=oI.getMax(o.height,u3.labelBoxHeight);a=r+s,W.debug(`${s} - ${t.message}`)}i(t),d3.bumpVerticalPos(a)}function fki(e,t,n,r,i,a,o){function s(n,r){n.x{let n=f3(u3),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),a=u3.boxMargin*8;r+=a,r-=2*u3.boxTextMargin,t.wrap&&(t.name=xL.wrapLabel(t.name,r-2*u3.wrapPadding,n));let o=xL.calculateTextDimensions(t.name,n);i=oI.getMax(o.height,i);let s=oI.getMax(r,o.width+2*u3.wrapPadding);if(t.margin=u3.boxTextMargin,re.textMaxHeight=i),oI.getMax(r,u3.height)}var hki,gki,_ki,vki,yki,bki,xki,X4,Ski,Cki,Z4,Q4,$4,e3,t3,n3,r3,wki,i3,a3,o3,Tki,s3,Eki,Dki,Oki,kki,Aki,jki,Mki,Nki,Pki,Fki,Iki,Lki,Rki,zki,Bki,Vki,Hki,Uki,Wki,Gki,Kki,qki,Jki,Yki,Xki,c3,Zki,l3,u3,d3,Qki,$ki,f3,p3,eAi,tAi,nAi,rAi,iAi,aAi,m3,oAi,sAi,cAi,lAi,uAi,dAi,fAi,pAi,mAi,hAi,gAi,_Ai,vAi,yAi=o((()=>{z$r(),RV(),ZK(),wL(),bI(),hN(),fN(),XI(),hki=uL(),_ki=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],L=[1,74],R=[1,80],ee=[1,81],te=[1,82],ne=[1,83],z=[1,84],re=[1,85],ie=[1,86],ae=[1,87],oe=[1,88],se=[1,89],ce=[1,90],le=[1,91],ue=[1,92],de=[1,93],fe=[1,94],pe=[1,95],me=[1,96],he=[1,97],ge=[1,98],_e=[1,99],ve=[1,100],ye=[1,101],be=[1,102],xe=[1,103],Se=[1,104],Ce=[1,105],we=[2,78],Te=[4,5,17,51,53,54],Ee=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],De=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Oe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],B=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ke=[5,52],Ae=[70,71,72,73],je=[1,151],Me={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1))}},`anonymous`),table:[{3:1,4:t,5:n,6:r},{1:[3]},{3:5,4:t,5:n,6:r},{3:6,4:t,5:n,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:L},{23:75,55:76,73:L},{23:77,73:F},{69:78,72:[1,79],78:R,79:ee,80:te,81:ne,82:z,83:re,84:ie,85:ae,86:oe,87:se,88:ce,89:le,90:ue,91:de,92:fe,93:pe,94:me,95:he,96:ge,97:_e,98:ve,99:ye,100:be,101:xe,102:Se,103:Ce},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],we),e(I,[2,6]),e(I,[2,16]),e(Te,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(Ee,i,{7:120}),e(Ee,i,{7:121}),e(Ee,i,{7:122}),e(De,i,{41:123,7:124}),e(Oe,i,{43:125,7:126}),e(Oe,i,{7:126,43:127}),e(B,i,{46:128,7:129}),e(Ee,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(ke,we,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:R,79:ee,80:te,81:ne,82:z,83:re,84:ie,85:ae,86:oe,87:se,88:ce,89:le,90:ue,91:de,92:fe,93:pe,94:me,95:he,96:ge,97:_e,98:ve,99:ye,100:be,101:xe,102:Se,103:Ce},e(Ae,[2,79]),e(Ae,[2,80]),e(Ae,[2,81]),e(Ae,[2,82]),e(Ae,[2,83]),e(Ae,[2,84]),e(Ae,[2,85]),e(Ae,[2,86]),e(Ae,[2,87]),e(Ae,[2,88]),e(Ae,[2,89]),e(Ae,[2,90]),e(Ae,[2,91]),e(Ae,[2,92]),e(Ae,[2,93]),e(Ae,[2,94]),e(Ae,[2,95]),e(Ae,[2,96]),e(Ae,[2,97]),e(Ae,[2,98]),e(Ae,[2,99]),e(Ae,[2,100]),e(Ae,[2,101]),e(Ae,[2,102]),e(Ae,[2,103]),e(Ae,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:je},{58:152,104:je},{58:153,104:je},{58:154,104:je},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(ke,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:je},{23:181,72:[1,182],73:F},{58:183,104:je},{58:184,104:je},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(Te,[2,11]),{13:186,51:D,53:O,54:k},e(Te,[2,13]),e(Te,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:je},{58:196,104:je},{58:197,104:je},{5:[2,75]},{58:198,104:je},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(Te,[2,12]),e(De,i,{7:124,41:201}),e(Oe,i,{7:126,43:202}),e(B,i,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(ke,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:je},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};Me.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin(`CONFIG`),75;case 8:return 76;case 9:return this.popState(),this.begin(`ALIAS`),77;case 10:return this.popState(),this.popState(),77;case 11:return t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin(`ALIAS`),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.yytext.trim(),this.popState(),10;case 16:return this.begin(`LINE`),15;case 17:return this.begin(`ID`),51;case 18:return this.begin(`ID`),53;case 19:return 14;case 20:return this.begin(`ID`),54;case 21:return this.popState(),this.popState(),this.begin(`LINE`),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin(`LINE`),37;case 24:return this.begin(`LINE`),38;case 25:return this.begin(`LINE`),39;case 26:return this.begin(`LINE`),40;case 27:return this.begin(`LINE`),50;case 28:return this.begin(`LINE`),42;case 29:return this.begin(`LINE`),44;case 30:return this.begin(`LINE`),49;case 31:return this.begin(`LINE`),45;case 32:return this.begin(`LINE`),48;case 33:return this.begin(`LINE`),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin(`ID`),22;case 45:return this.begin(`ID`),24;case 46:return 30;case 47:return 31;case 48:return this.begin(`acc_title`),32;case 49:return this.popState(),`acc_title_value`;case 50:return this.begin(`acc_descr`),34;case 51:return this.popState(),`acc_descr_value`;case 52:this.begin(`acc_descr_multiline`);break;case 53:this.popState();break;case 54:return`acc_descr_multiline_value`;case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return t.yytext=t.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},`anonymous`),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}})();function Ne(){this.yy={}}return U(Ne,`Parser`),Ne.prototype=Me,Me.Parser=Ne,new Ne})(),_ki.parser=_ki,vki=_ki,yki={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},bki={FILLED:0,OPEN:1},xki={LEFTOF:0,RIGHTOF:1,OVER:2},X4={ACTOR:`actor`,BOUNDARY:`boundary`,COLLECTIONS:`collections`,CONTROL:`control`,DATABASE:`database`,ENTITY:`entity`,PARTICIPANT:`participant`,QUEUE:`queue`},Ski=(gki=class{constructor(){this.state=new Mq(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=dI,this.setAccDescription=pI,this.setDiagramTitle=hI,this.getAccTitle=fI,this.getAccDescription=mI,this.getDiagramTitle=gI,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(_I().wrap),this.LINETYPE=yki,this.ARROWTYPE=bki,this.PLACEMENT=xki}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,n,r,i){let a=this.state.records.currentBox,o;if(i!==void 0){let e;e=i.includes(` `)?i+` `:`{ `+i+` }`,o=LV(e,{schema:IV})}r=(o==null?void 0:o.type)??r,o!=null&&o.alias&&(!n||n.text===t)&&(n={text:o.alias,wrap:n==null?void 0:n.wrap,type:r});let s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&t===s.name&&n==null)return}if((n==null?void 0:n.text)??(n={text:t,type:r}),(r==null||n.text==null)&&(n={text:t,type:r}),this.state.records.actors.set(e,{box:a,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??`participant`}),this.state.records.prevActor){let t=this.state.records.actors.get(this.state.records.prevActor);t&&(t.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=0;if(!e)return 0;for(t=0;t>-`,token:`->>-`,line:`1`,loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[`'ACTIVE_PARTICIPANT'`]},t}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:(n==null?void 0:n.text)??``,wrap:(n==null?void 0:n.wrap)??this.autoWrap(),type:r,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)!==null||/^:?nowrap:/.exec(e)===null&&void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,``)).trim(),wrap:t}}autoWrap(){var e;return this.state.records.wrapEnabled===void 0?((e=_I().sequence)==null?void 0:e.wrap)??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),uI()}parseMessage(e){let t=e.trim(),{wrap:n,cleanedText:r}=this.extractWrap(t),i={text:r,wrap:n};return W.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){var t;let n=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=n!=null&&n[1]?n[1].trim():`transparent`,i=n!=null&&n[2]?n[2].trim():void 0;if((t=window)!=null&&t.CSS)window.CSS.supports(`color`,r)||(r=`transparent`,i=e.trim());else{let t=new Option().style;t.color=r,t.color!==r&&(r=`transparent`,i=e.trim())}let{wrap:a,cleanedText:o}=this.extractWrap(i);return{text:o?QF(o,_I()):void 0,color:r,wrap:a}}addNote(e,t,n){let r={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let n=this.getActor(e);try{let e=QF(t.text,_I());e=e.replace(/=/g,`=`),e=e.replace(/&/g,`&`);let r=JSON.parse(e);this.insertLinks(n,r)}catch(e){W.error(`error while parsing actor link text`,e)}}addALink(e,t){let n=this.getActor(e);try{let e={},r=QF(t.text,_I()),i=r.indexOf(`@`);r=r.replace(/=/g,`=`),r=r.replace(/&/g,`&`);let a=r.slice(0,i-1).trim();e[a]=r.slice(i+1).trim(),this.insertLinks(n,e)}catch(e){W.error(`error while parsing actor link text`,e)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let n in t)e.links[n]=t[n]}addProperties(e,t){let n=this.getActor(e);try{let e=QF(t.text,_I()),r=JSON.parse(e);this.insertProperties(n,r)}catch(e){W.error(`error while parsing actor properties text`,e)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let n in t)e.properties[n]=t[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let n=this.getActor(e),r=document.getElementById(t.text);try{let e=r.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(n,t.properties),t.links&&this.insertLinks(n,t.links)}catch(e){W.error(`error while parsing actor details text`,e)}}getActorProperty(e,t){if((e==null?void 0:e.properties)!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case`sequenceIndex`:this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case`addParticipant`:this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case`createParticipant`:if(this.state.records.actors.has(e.actor))throw Error(`It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior`);this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case`destroyParticipant`:this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case`activeStart`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnection`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnectionReverse`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`activeEnd`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`addNote`:this.addNote(e.actor,e.placement,e.text);break;case`addLinks`:this.addLinks(e.actor,e.text);break;case`addALink`:this.addALink(e.actor,e.text);break;case`addProperties`:this.addProperties(e.actor,e.text);break;case`addDetails`:this.addDetails(e.actor,e.text);break;case`addMessage`:if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw Error(`The created participant `+this.state.records.lastCreated.name+` does not have an associated creating message after its declaration. Please check the sequence diagram.`);this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw Error(`The destroyed participant `+this.state.records.lastDestroyed.name+` does not have an associated destroying message after its declaration. Please check the sequence diagram.`);this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case`boxStart`:this.addBox(e.boxData);break;case`boxEnd`:this.boxEnd();break;case`loopStart`:this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case`loopEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`rectStart`:this.addSignal(void 0,void 0,e.color,e.signalType);break;case`rectEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`optStart`:this.addSignal(void 0,void 0,e.optText,e.signalType);break;case`optEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`altStart`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`else`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`altEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`setAccTitle`:dI(e.text);break;case`parStart`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`and`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`parEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`criticalStart`:this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case`option`:this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case`criticalEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`breakStart`:this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case`breakEnd`:this.addSignal(void 0,void 0,void 0,e.signalType)}}getConfig(){return _I().sequence}},U(gki,`SequenceDB`),gki),Cki=U(e=>{let t=e.dropShadow??`none`,{look:n}=_I();return`.actor { stroke: ${e.actorBorder}; fill: ${e.actorBkg}; stroke-width: ${e.strokeWidth??1}; } rect.actor.outer-path[data-look="neo"] { filter: ${t}; } rect.note[data-look="neo"] { stroke:${e.noteBorderColor}; fill:${e.noteBkgColor}; filter: ${t}; } text.actor > tspan { fill: ${e.actorTextColor}; stroke: none; } .actor-line { stroke: ${e.actorLineColor}; } .innerArc { stroke-width: 1.5; stroke-dasharray: none; } .messageLine0 { stroke-width: 1.5; stroke-dasharray: none; stroke: ${e.signalColor}; } .messageLine1 { stroke-width: 1.5; stroke-dasharray: 2, 2; stroke: ${e.signalColor}; } [id$="-arrowhead"] path { fill: ${e.signalColor}; stroke: ${e.signalColor}; } .sequenceNumber { fill: ${e.sequenceNumberColor}; } [id$="-sequencenumber"] { fill: ${e.signalColor}; } [id$="-crosshead"] path { fill: ${e.signalColor}; stroke: ${e.signalColor}; } .messageText { fill: ${e.signalTextColor}; stroke: none; } .labelBox { stroke: ${e.labelBoxBorderColor}; fill: ${e.labelBoxBkgColor}; filter: ${n===`neo`?t:`none`}; } .labelText, .labelText > tspan { fill: ${e.labelTextColor}; stroke: none; } .loopText, .loopText > tspan { fill: ${e.loopTextColor}; stroke: none; } .sectionTitle, .sectionTitle > tspan { fill: ${e.loopTextColor}; stroke: none; } .loopLine { stroke-width: 2px; stroke-dasharray: 2, 2; stroke: ${e.labelBoxBorderColor}; fill: ${e.labelBoxBorderColor}; } .note { //stroke: #decc93; stroke: ${e.noteBorderColor}; fill: ${e.noteBkgColor}; } .noteText, .noteText > tspan { fill: ${e.noteTextColor}; stroke: none; ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:``} } .activation0 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .activation1 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .activation2 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .actorPopupMenu { position: absolute; } .actorPopupMenuPanel { position: absolute; fill: ${e.actorBkg}; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); } .actor-man circle, line { fill: ${e.actorBkg}; stroke-width: 2px; } g rect.rect { filter: ${t}; stroke: ${e.nodeBorder}; } `},`getStyles`),Z4=36,Q4=`actor-top`,$4=`actor-bottom`,e3=`actor-box`,t3=`actor-man`,n3=new Set([`redux-color`,`redux-dark-color`]),r3=U(function(e,t){let n=GK(e,t);return WF().look===`neo`&&n.attr(`data-look`,`neo`),n},`drawRect`),wki=U(function(e,t,n,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,s=t.rectData;var l=`none`;i&&(l=`block !important`);let u=e.append(`g`);u.attr(`id`,`actor`+o+`_popup`),u.attr(`class`,`actorPopupMenu`),u.attr(`display`,l);var d=``;s.class!==void 0&&(d=` `+s.class);let f=s.width>n?s.width:n,p=u.append(`rect`);if(p.attr(`class`,`actorPopupMenuPanel`+d),p.attr(`x`,s.x),p.attr(`y`,s.height),p.attr(`fill`,s.fill),p.attr(`stroke`,s.stroke),p.attr(`width`,f),p.attr(`height`,s.height),p.attr(`rx`,s.rx),p.attr(`ry`,s.ry),a!=null){var m=20;for(let e in a){var h=u.append(`a`),g=(0,hki.sanitizeUrl)(a[e]);h.attr(`xlink:href`,g),h.attr(`target`,`_blank`),Zki(r)(e,h,s.x+10,s.height+m,f,20,{class:`actor`},r),m+=30}}return p.attr(`height`,m),{height:s.height+m,width:f}},`drawPopup`),i3=U(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),a3=U(async function(e,t,n=null){let r=e.append(`foreignObject`),i=await aI(t.text,WF()),a=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(i).node().getBoundingClientRect();if(r.attr(`height`,Math.round(a.height)).attr(`width`,Math.round(a.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,a.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-a.width/2)).attr(`y`,Math.round(i.y+i.height/2-a.height/2))}else if(n){let{startx:e,stopx:i,starty:o}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-a.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(o)):r.attr(`y`,Math.round(o-a.height))}return[r]},`drawKatex`),o3=U(function(e,t){let n=0,r=0,i=t.text.split(oI.lineBreakRegex),[a,o]=bL(t.fontSize),s=[],l=0,u=U(()=>t.y,`yfunc`);if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case`top`:case`start`:u=U(()=>Math.round(t.y+t.textMargin),`yfunc`);break;case`middle`:case`center`:u=U(()=>Math.round(t.y+(n+r+t.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:u=U(()=>Math.round(t.y+(n+r+2*t.textMargin)-t.textMargin),`yfunc`)}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case`left`:case`start`:t.x=Math.round(t.x+t.textMargin),t.anchor=`start`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break;case`middle`:case`center`:t.x=Math.round(t.x+t.width/2),t.anchor=`middle`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break;case`right`:case`end`:t.x=Math.round(t.x+t.width-t.textMargin),t.anchor=`end`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`}for(let[d,f]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(l=d*a);let i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,u()),t.anchor!==void 0&&i.attr(`text-anchor`,t.anchor).attr(`dominant-baseline`,t.dominantBaseline).attr(`alignment-baseline`,t.alignmentBaseline),t.fontFamily!==void 0&&i.style(`font-family`,t.fontFamily),o!==void 0&&i.style(`font-size`,o),t.fontWeight!==void 0&&i.style(`font-weight`,t.fontWeight),t.fill!==void 0&&i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class),t.dy===void 0?l!==0&&i.attr(`dy`,l):i.attr(`dy`,t.dy);let p=f||`​`;if(t.tspan){let e=i.append(`tspan`);e.attr(`x`,t.x),t.fill!==void 0&&e.attr(`fill`,t.fill),e.text(p)}else i.text(p);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,n=r),s.push(i)}return s},`drawText`),Tki=U(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}U(n,`genPoints`);let r=e.append(`polygon`);return r.attr(`points`,n(t.x,t.y,t.width,t.height,7)),r.attr(`class`,`labelBox`),t.y+=t.height/2,o3(e,t),r},`drawLabel`),s3=-1,Eki=U((e,t,n,r)=>{e.select&&n.forEach(n=>{let i=t.get(n),a=e.select(`#actor`+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr(`y2`,i.stopy+i.height/2):r.mirrorActors&&a.attr(`y2`,i.stopy)})},`fixLifeLineHeights`),Dki=U(function(e,t,n,r,i){var a,o;let s=r?t.stopy:t.starty,l=t.x+t.width/2,u=s+t.height,{look:d,theme:f,themeVariables:p}=n,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower();var _=g;r||(s3++,Object.keys(t.links||{}).length&&!n.forceMenus&&_.attr(`onclick`,i3(`actor${s3}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+s3).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=s3,t.links!=null&&_.attr(`id`,`root-`+s3),d===`neo`&&_.attr(`data-look`,`neo`));let v=JK();var y=`actor`;(a=t.properties)!=null&&a.class?y=t.properties.class:v.fill=`#eaeaea`,y+=r?` ${$4}`:` ${Q4}`,v.x=t.x,v.y=s,v.width=t.width,v.height=t.height,v.class=y,v.rx=3,v.ry=3,v.name=t.name,d===`neo`&&(v.rx=6,v.ry=6);let b=r3(_,v),x=i.get(t.name)??0;if(n3.has(f)&&(b.style(`stroke`,h[x%h.length]),b.style(`fill`,m[x%h.length])),d===`neo`&&b.attr(`filter`,`url(#drop-shadow)`),t.rectData=v,(o=t.properties)!=null&&o.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?qK(_,v.x+v.width-20,v.y+10,e.substr(1)):KK(_,v.x+v.width-20,v.y+10,e)}r||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`participant`),_.attr(`data-id`,t.name)),c3(n,rI(t.description))(t.description,_,v.x,v.y,v.width,v.height,{class:`actor ${e3}`},n);let S=t.height;if(b.node){let e=b.node().getBBox();t.height=e.height,S=e.height}return S},`drawActorTypeParticipant`),Oki=U(function(e,t,n,r,i){var a,o;let s=r?t.stopy:t.starty,l=t.x+t.width/2,u=s+t.height,{look:d,theme:f,themeVariables:p}=n,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower();var _=g;r||(s3++,Object.keys(t.links||{}).length&&!n.forceMenus&&_.attr(`onclick`,i3(`actor${s3}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+s3).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=s3,t.links!=null&&_.attr(`id`,`root-`+s3),d===`neo`&&_.attr(`data-look`,`neo`));let v=JK();var y=`actor`;(a=t.properties)!=null&&a.class?y=t.properties.class:v.fill=`#eaeaea`,y+=r?` ${$4}`:` ${Q4}`,v.x=t.x,v.y=s,v.width=t.width,v.height=t.height,v.class=y,v.name=t.name;let b={...v,x:v.x+-6,y:v.y+6,class:`actor`},x=r3(_,v),S=r3(_,b);t.rectData=v,d===`neo`&&_.attr(`filter`,`url(#drop-shadow)`);let C=i.get(t.name)??0;if(n3.has(f)&&(x.style(`stroke`,h[C%h.length]),x.style(`fill`,m[C%h.length]),S.style(`stroke`,h[C%h.length]),S.style(`fill`,m[C%h.length])),(o=t.properties)!=null&&o.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?qK(_,v.x+v.width-20,v.y+10,e.substr(1)):KK(_,v.x+v.width-20,v.y+10,e)}c3(n,rI(t.description))(t.description,_,v.x-6,v.y+6,v.width,v.height,{class:`actor ${e3}`},n);let w=t.height;if(x.node){let e=x.node().getBBox();t.height=e.height,w=e.height}return r||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`collections`),_.attr(`data-id`,t.name)),w},`drawActorTypeCollections`),kki=U(function(e,t,n,r,i){var a,o;let s=r?t.stopy:t.starty,l=t.x+t.width/2,u=s+t.height,{look:d,theme:f,themeVariables:p}=n,{bkgColorArray:m,borderColorArray:h}=p,g=e.append(`g`).lower(),_=g;r||(s3++,Object.keys(t.links||{}).length&&!n.forceMenus&&_.attr(`onclick`,i3(`actor${s3}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+s3).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=s3,t.links!=null&&_.attr(`id`,`root-`+s3),d===`neo`&&_.attr(`data-look`,`neo`));let v=JK(),y=`actor`;(a=t.properties)!=null&&a.class?y=t.properties.class:v.fill=`#eaeaea`,y+=r?` ${$4}`:` ${Q4}`,_.attr(`class`,y),v.x=t.x,v.y=s,v.width=t.width,v.height=t.height,v.name=t.name;let b=v.height/2,x=b/(2.5+v.height/50),S=_.append(`g`),C=_.append(`g`),w=`M ${v.x},${v.y+b} a ${x},${b} 0 0 0 0,${v.height} h ${v.width-2*x} a ${x},${b} 0 0 0 0,-${v.height} Z `;S.append(`path`).attr(`d`,w),C.append(`path`).attr(`d`,`M ${v.x},${v.y+b} a ${x},${b} 0 0 0 0,${v.height}`),S.attr(`transform`,`translate(${x}, ${-(v.height/2)})`),C.attr(`transform`,`translate(${v.width-x}, ${-v.height/2})`),t.rectData=v,d===`neo`&&S.attr(`filter`,`url(#drop-shadow)`);let T=i.get(t.name)??0;if(n3.has(f)&&(S.style(`stroke`,h[T%h.length]),S.style(`fill`,m[T%h.length]),C.style(`stroke`,h[T%h.length]),C.style(`fill`,m[T%h.length])),(o=t.properties)!=null&&o.icon){let e=t.properties.icon.trim(),n=v.x+v.width-20,r=v.y+10;e.charAt(0)===`@`?qK(_,n,r,e.substr(1)):KK(_,n,r,e)}c3(n,rI(t.description))(t.description,_,v.x,v.y,v.width,v.height,{class:`actor ${e3}`},n);let E=t.height,D=S.select(`path:last-child`);if(D.node()){let e=D.node().getBBox();t.height=e.height,E=e.height}return r||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`queue`),_.attr(`data-id`,t.name)),E},`drawActorTypeQueue`),Aki=U(function(e,t,n,r,i,a){var o;let s=r?t.stopy:t.starty,l=t.x+t.width/2,u=s+75,{look:d,theme:f,themeVariables:p}=n,{bkgColorArray:m,borderColorArray:h,actorBorder:g,actorBkg:_}=p,v=e.append(`g`).lower();r||(s3++,v.append(`line`).attr(`id`,`actor`+s3).attr(`x1`,l).attr(`y1`,u).attr(`x2`,l).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=s3);let y=e.append(`g`),b=t3;b+=r?` ${$4}`:` ${Q4}`,y.attr(`class`,b),y.attr(`name`,t.name);let x=JK();x.x=t.x,x.y=s,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height,x.class=`actor`;let S=t.x+t.width/2,C=s+32;y.append(`defs`).append(`marker`).attr(`id`,i+`-filled-head-control`).attr(`refX`,11).attr(`refY`,5.8).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`172.5`).attr(`stroke-width`,1.2).append(`path`).attr(`d`,`M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z`),y.append(`circle`).attr(`cx`,S).attr(`cy`,C).attr(`r`,22).attr(`filter`,`${d===`neo`?`url(#drop-shadow)`:``}`),y.append(`line`).attr(`marker-end`,`url(#`+i+`-filled-head-control)`).attr(`transform`,`translate(${S}, ${C-22})`);let w=a.get(t.name)??0;return n3.has(f)?(y.style(`stroke`,h[w%h.length]),y.style(`fill`,m[w%h.length])):(y.style(`stroke`,g),y.style(`fill`,_)),t.height=y.node().getBBox().height+2*((n==null||(o=n.sequence)==null?void 0:o.labelBoxHeight)??0),c3(n,rI(t.description))(t.description,y,x.x,x.y+22+(r?5:12),x.width,x.height,{class:`actor ${t3}`},n),r||(y.attr(`data-et`,`participant`),y.attr(`data-type`,`control`),y.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),jki=U(function(e,t,n,r,i){var a;let o=r?t.stopy:t.starty,s=t.x+t.width/2,l=o+75,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m}=f,h=e.append(`g`).lower(),g=e.append(`g`),_=`actor`;_+=r?` ${$4}`:` ${Q4}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=JK();v.x=t.x,v.y=o,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`;let y=t.x+t.width/2,b=o+(r?10:25);g.append(`circle`).attr(`cx`,y).attr(`cy`,b).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),g.append(`line`).attr(`x1`,y-22).attr(`x2`,y+22).attr(`y1`,b+22).attr(`y2`,b+22).attr(`stroke-width`,2),u===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let x=i.get(t.name)??0;return n3.has(d)&&(g.style(`stroke`,m[x%m.length]),g.style(`fill`,p[x%m.length])),t.height=g.node().getBBox().height+((n==null||(a=n.sequence)==null?void 0:a.labelBoxHeight)??0),r||(s3++,h.append(`line`).attr(`id`,`actor`+s3).attr(`x1`,s).attr(`y1`,l).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=s3),c3(n,rI(t.description))(t.description,g,v.x,v.y+(r?15:30),v.width,v.height,{class:`actor ${t3}`},n),r?g.attr(`transform`,`translate(0, 22)`):(g.attr(`transform`,`translate(0, 6)`),g.attr(`data-et`,`participant`),g.attr(`data-type`,`entity`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),Mki=U(function(e,t,n,r,i){var a;let o=r?t.stopy:t.starty,s=t.x+t.width/2,l=o+t.height+2*n.boxTextMargin,{theme:u,themeVariables:d,look:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=d,g=e.append(`g`).lower(),_=g;r||(s3++,Object.keys(t.links||{}).length&&!n.forceMenus&&_.attr(`onclick`,i3(`actor${s3}_popup`)).attr(`cursor`,`pointer`),_.append(`line`).attr(`id`,`actor`+s3).attr(`x1`,s).attr(`y1`,l).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),_=g.append(`g`),t.actorCnt=s3,t.links!=null&&_.attr(`id`,`root-`+s3),f===`neo`&&_.attr(`data-look`,`neo`));let v=JK(),y=`actor`;(a=t.properties)!=null&&a.class?y=t.properties.class:v.fill=`#eaeaea`,y+=r?` ${$4}`:` ${Q4}`,v.x=t.x,v.y=o,v.width=t.width,v.height=t.height,v.class=y,v.name=t.name,v.x=t.x,v.y=o;let b=v.width/3,x=v.width/3,S=b/2,C=S/(2.5+b/50),w=_.append(`g`);w.attr(`class`,y);let T=` M ${v.x},${v.y+C} a ${S},${C} 0 0 0 ${b},0 a ${S},${C} 0 0 0 -${b},0 l 0,${x-2*C} a ${S},${C} 0 0 0 ${b},0 l 0,-${x-2*C} `;w.append(`path`).attr(`d`,T),f===`neo`&&w.attr(`filter`,`url(#drop-shadow)`);let E=i.get(t.name)??0;n3.has(u)?(w.style(`stroke`,m[E%m.length]),w.style(`fill`,p[E%m.length])):w.style(`stroke`,h),w.attr(`transform`,`translate(${b}, ${C})`),t.rectData=v,c3(n,rI(t.description))(t.description,_,v.x,v.y+35,v.width,v.height,{class:`actor ${e3}`},n);let D=w.select(`path:last-child`);return D.node()&&(t.height=D.node().getBBox().height+(n.sequence.labelBoxHeight??0)),r||(_.attr(`data-et`,`participant`),_.attr(`data-type`,`database`),_.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),Nki=U(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+80,l=e.append(`g`).lower(),{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f;r||(s3++,l.append(`line`).attr(`id`,`actor`+s3).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=s3);let g=e.append(`g`),_=t3;_+=r?` ${$4}`:` ${Q4}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=JK();v.x=t.x,v.y=a,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,g.append(`line`).attr(`id`,`actor-man-torso`+s3).attr(`x1`,t.x+t.width/2-55).attr(`y1`,a+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,a+12),g.append(`line`).attr(`id`,`actor-man-arms`+s3).attr(`x1`,t.x+t.width/2-55).attr(`y1`,a+2).attr(`x2`,t.x+t.width/2-55).attr(`y2`,a+22),g.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,a+12).attr(`r`,22),u===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let y=i.get(t.name)??0;return n3.has(d)?(g.style(`stroke`,m[y%m.length]),g.style(`fill`,p[y%m.length])):g.style(`stroke`,h),t.height=g.node().getBBox().height+(n.sequence.labelBoxHeight??0),c3(n,rI(t.description))(t.description,g,v.x,v.y+15,v.width,v.height,{class:`actor ${t3}`},n),g.attr(`transform`,`translate(0,21)`),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`boundary`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),Pki=U(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+80,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,h=e.append(`g`).lower();r||(s3++,h.append(`line`).attr(`id`,`actor`+s3).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=s3);let g=e.append(`g`),_=t3;_+=r?` ${$4}`:` ${Q4}`,g.attr(`class`,_),g.attr(`name`,t.name),r||g.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=l===`neo`?.5:1,y=l===`neo`?a+(1-v)*30:a;g.append(`line`).attr(`id`,`actor-man-torso`+s3).attr(`x1`,o).attr(`y1`,y+25*v).attr(`x2`,o).attr(`y2`,y+45*v),g.append(`line`).attr(`id`,`actor-man-arms`+s3).attr(`x1`,o-Z4/2*v).attr(`y1`,y+33*v).attr(`x2`,o+Z4/2*v).attr(`y2`,y+33*v),g.append(`line`).attr(`x1`,o-Z4/2*v).attr(`y1`,y+60*v).attr(`x2`,o).attr(`y2`,y+45*v),g.append(`line`).attr(`x1`,o).attr(`y1`,y+45*v).attr(`x2`,o+(Z4/2-2)*v).attr(`y2`,y+60*v);let b=g.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=g.node().getBBox().height;let x=JK();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let S=i.get(t.name)??0;return n3.has(u)?(g.style(`stroke`,p[S%p.length]),g.style(`fill`,f[S%p.length])):g.style(`stroke`,m),c3(n,rI(t.description))(t.description,g,x.x,y+35*v-(l===`neo`?10:0),x.width,x.height,{class:`actor ${t3}`},n),t.height},`drawActorTypeActor`),Fki=U(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await Pki(e,t,n,r,s);case`participant`:return await Dki(e,t,n,r,s);case`boundary`:return await Nki(e,t,n,r,s);case`control`:return await Aki(e,t,n,r,i,s);case`entity`:return await jki(e,t,n,r,s);case`database`:return await Mki(e,t,n,r,s);case`collections`:return await Oki(e,t,n,r,s);case`queue`:return await kki(e,t,n,r,s)}},`drawActor`),Iki=U(function(e,t,n){let r=e.append(`g`);Bki(r,t),t.name&&c3(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),Lki=U(function(e){return e.append(`g`)},`anchorElement`),Rki=U(function(e,t,n,r,i,a,o){let{theme:s,themeVariables:l}=r,{bkgColorArray:u,borderColorArray:d,mainBkg:f}=l,p=JK(),m=t.anchored,h=t.actor;p.x=t.startx,p.y=t.starty,p.class=`activation`+i%3,p.width=t.stopx-t.startx,p.height=n-t.starty;let g=r3(m,p),_=(o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(h)??0;n3.has(s)&&(g.style(`stroke`,d[_%d.length]),g.style(`fill`,u[_%d.length]??f))},`drawActivation`),zki=U(async function(e,t,n,r,i){let{boxMargin:a,boxTextMargin:o,labelBoxHeight:s,labelBoxWidth:l,messageFontFamily:u,messageFontSize:d,messageFontWeight:f}=r,p=e.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+i.id),m=U(function(e,t,n,r){return p.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);m(t.startx,t.starty,t.stopx,t.starty),m(t.stopx,t.starty,t.stopx,t.stopy),m(t.startx,t.stopy,t.stopx,t.stopy),m(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(e){m(t.startx,e.y,t.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let h=YK();h.text=n,h.x=t.startx,h.y=t.starty,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.anchor=`middle`,h.valign=`middle`,h.tspan=!1,h.width=Math.max(l??0,50),h.height=s+(r.look===`neo`?15:0)||20,h.textMargin=o,h.class=`labelText`,Tki(p,h),h=Yki(),h.text=t.title,h.x=t.startx+l/2+(t.stopx-t.startx)/2,h.y=t.starty+a+o,h.anchor=`middle`,h.valign=`middle`,h.textMargin=o,h.class=`loopText`,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.wrap=!0;let g=rI(h.text)?await a3(p,h,t):o3(p,h);if(t.sectionTitles!==void 0){for(let[e,n]of Object.entries(t.sectionTitles))if(n.message){h.text=n.message,h.x=t.startx+(t.stopx-t.startx)/2,h.y=t.sections[e].y+a+o,h.class=`sectionTitle`,h.anchor=`middle`,h.valign=`middle`,h.tspan=!1,h.fontFamily=u,h.fontSize=d,h.fontWeight=f,h.wrap=t.wrap,rI(h.text)?(t.starty=t.sections[e].y,await a3(p,h,t)):o3(p,h);let r=Math.round(g.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));t.sections[e].height+=r-(a+o)}}return t.height=Math.round(t.stopy-t.starty),p},`drawLoop`),Bki=U(function(e,t){KZr(e,t)},`drawBackgroundRect`),Vki=U(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),Hki=U(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),Uki=U(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),Wki=U(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),Gki=U(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Kki=U(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),qki=U(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),Jki=U(function(e,t){let{theme:n}=t;e.append(`defs`).append(`filter`).attr(`id`,`drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${n===`redux`||n===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),Yki=U(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),Xki=U(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),c3=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}U(e,`byText`);function t(e,t,n,r,a,o,s,l){let{actorFontSize:u,actorFontFamily:d,actorFontWeight:f}=l,[p,m]=bL(u),h=e.split(oI.lineBreakRegex);for(let e=0;ee.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:U(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:U(function(e){this.boxes.push(e)},`addBox`),addActor:U(function(e){this.actors.push(e)},`addActor`),addLoop:U(function(e){this.loops.push(e)},`addLoop`),addMessage:U(function(e){this.messages.push(e)},`addMessage`),addNote:U(function(e){this.notes.push(e)},`addNote`),lastActor:U(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:U(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:U(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:U(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:U(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,aAi(_I())},`init`),updateVal:U(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:U(function(e,t,n,r){let i=this,a=0;function o(o){return U(function(s){a++;let l=i.sequenceItems.length-a+1;i.updateVal(s,`starty`,t-l*u3.boxMargin,Math.min),i.updateVal(s,`stopy`,r+l*u3.boxMargin,Math.max),i.updateVal(d3.data,`startx`,e-l*u3.boxMargin,Math.min),i.updateVal(d3.data,`stopx`,n+l*u3.boxMargin,Math.max),o!==`activation`&&(i.updateVal(s,`startx`,e-l*u3.boxMargin,Math.min),i.updateVal(s,`stopx`,n+l*u3.boxMargin,Math.max),i.updateVal(d3.data,`starty`,t-l*u3.boxMargin,Math.min),i.updateVal(d3.data,`stopy`,r+l*u3.boxMargin,Math.max))},`updateItemBounds`)}U(o,`updateFn`),this.sequenceItems.forEach(o()),this.activations.forEach(o(`activation`))},`updateBounds`),insert:U(function(e,t,n,r){let i=oI.getMin(e,n),a=oI.getMax(e,n),o=oI.getMin(t,r),s=oI.getMax(t,r);this.updateVal(d3.data,`startx`,i,Math.min),this.updateVal(d3.data,`starty`,o,Math.min),this.updateVal(d3.data,`stopx`,a,Math.max),this.updateVal(d3.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:U(function(e,t,n){let r=n.get(e.from),i=m3(e.from).length||0,a=r.x+r.width/2+(i-1)*u3.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+u3.activationWidth,stopy:void 0,actor:e.from,anchored:l3.anchorElement(t)})},`newActivation`),endActivation:U(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:U(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:U(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:U(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:U(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:U(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:d3.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:U(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:U(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:U(function(e){this.verticalPos+=e,this.data.stopy=oI.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:U(function(){return this.verticalPos},`getVerticalPos`),getBounds:U(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Qki=U(async function(e,t,n){d3.bumpVerticalPos(u3.boxMargin),t.height=u3.boxMargin,t.starty=d3.getVerticalPos();let r=JK();r.x=t.startx,r.y=t.starty,r.width=t.width||u3.width,r.class=`note`;let i=e.append(`g`);i.attr(`data-et`,`note`),i.attr(`data-id`,`i`+n);let a=l3.drawRect(i,r),o=YK();o.x=t.startx,o.y=t.starty,o.width=r.width,o.dy=`1em`,o.text=t.message,o.class=`noteText`,o.fontFamily=u3.noteFontFamily,o.fontSize=u3.noteFontSize,o.fontWeight=u3.noteFontWeight,o.anchor=u3.noteAlign,o.textMargin=u3.noteMargin,o.valign=`center`;let s=rI(o.text)?await a3(i,o):o3(i,o),l=Math.round(s.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));a.attr(`height`,l+2*u3.noteMargin),t.height+=l+2*u3.noteMargin,d3.bumpVerticalPos(l+2*u3.noteMargin),t.stopy=t.starty+l+2*u3.noteMargin,t.stopx=t.startx+r.width,d3.insert(t.startx,t.starty,t.stopx,t.stopy),d3.models.addNote(t)},`drawNote`),$ki=U(function(e,t,n,r,i,a,o){let s=r.db.getActors(),l=s.get(t.from),u=s.get(t.to),d=n.sequenceVisible,f=l.x+l.width/2,p=u.x+u.width/2,m=f<=p,h=mAi(t,r),g=e.append(`g`),_=U((e,t)=>{let n=e?16.5:-16.5;return t?-n:n},`getCircleOffset`),v=U(e=>{g.append(`circle`).attr(`cx`,e).attr(`cy`,o).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:y,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:x}=r.db.LINETYPE;if(d)switch(t.centralConnection){case y:h&&(p+=_(m,!0));break;case b:h||(f+=_(m,!1));break;case x:h?p+=_(m,!0):f+=_(m,!1)}switch(t.centralConnection){case y:v(p);break;case b:v(f);break;case x:v(f),v(p)}},`drawCentralConnection`),f3=U(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),p3=U(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),eAi=U(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`),U(dki,`boundMessage`),tAi=U(async function(e,t,n,r,i,a){let{startx:o,stopx:s,starty:l,message:u,type:d,sequenceIndex:f,sequenceVisible:p}=t,m=xL.calculateTextDimensions(u,f3(u3)),h=YK();h.x=Math.min(o,s),h.y=l+10,h.width=Math.abs(s-o),h.class=`messageText`,h.dy=`1em`,h.text=u,h.fontFamily=u3.messageFontFamily,h.fontSize=u3.messageFontSize,h.fontWeight=u3.messageFontWeight,h.anchor=u3.messageAlign,h.valign=`center`,h.textMargin=u3.wrapPadding,h.tspan=!1,rI(h.text)?await a3(e,h,{startx:o,stopx:s,starty:n}):o3(e,h);let g=m.width,_;if(o===s){let a=p||u3.showSequenceNumbers,l=mAi(i,r),u=hAi(i,r),d=o+(a&&(l||u)?10:0);_=u3.rightAngles?e.append(`path`).attr(`d`,`M ${d},${n} H ${o+oI.getMax(u3.width/2,g/2)} V ${n+25} H ${o}`):e.append(`path`).attr(`d`,`M `+d+`,`+n+` C `+(d+60)+`,`+(n-10)+` `+(o+60)+`,`+(n+30)+` `+o+`,`+(n+20)),fAi(i,r)&&$ki(e,i,t,r,o,s,n)}else _=e.append(`line`),_.attr(`x1`,o),_.attr(`y1`,n),_.attr(`x2`,s),_.attr(`y2`,n),fAi(i,r)&&$ki(e,i,t,r,o,s,n);d===r.db.LINETYPE.DOTTED||d===r.db.LINETYPE.DOTTED_CROSS||d===r.db.LINETYPE.DOTTED_POINT||d===r.db.LINETYPE.DOTTED_OPEN||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===r.db.LINETYPE.SOLID_TOP_DOTTED||d===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===r.db.LINETYPE.STICK_TOP_DOTTED||d===r.db.LINETYPE.STICK_BOTTOM_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(_.style(`stroke-dasharray`,`3, 3`),_.attr(`class`,`messageLine1`)):_.attr(`class`,`messageLine0`),_.attr(`data-et`,`message`),_.attr(`data-id`,`i`+t.id),_.attr(`data-from`,t.from),_.attr(`data-to`,t.to);let v=``;if(u3.arrowMarkerAbsolute&&(v=$F(!0)),_.attr(`stroke-width`,2),_.attr(`stroke`,`none`),_.style(`fill`,`none`),(d===r.db.LINETYPE.SOLID_TOP||d===r.db.LINETYPE.SOLID_TOP_DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-solidTopArrowHead)`),(d===r.db.LINETYPE.SOLID_BOTTOM||d===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-solidBottomArrowHead)`),(d===r.db.LINETYPE.STICK_TOP||d===r.db.LINETYPE.STICK_TOP_DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-stickTopArrowHead)`),(d===r.db.LINETYPE.STICK_BOTTOM||d===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-stickBottomArrowHead)`),(d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&_.attr(`marker-start`,`url(`+v+`#`+a+`-solidBottomArrowHead)`),(d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&_.attr(`marker-start`,`url(`+v+`#`+a+`-solidTopArrowHead)`),(d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&_.attr(`marker-start`,`url(`+v+`#`+a+`-stickBottomArrowHead)`),(d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&_.attr(`marker-start`,`url(`+v+`#`+a+`-stickTopArrowHead)`),(d===r.db.LINETYPE.SOLID||d===r.db.LINETYPE.DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-arrowhead)`),(d===r.db.LINETYPE.BIDIRECTIONAL_SOLID||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(_.attr(`marker-start`,`url(`+v+`#`+a+`-arrowhead)`),_.attr(`marker-end`,`url(`+v+`#`+a+`-arrowhead)`)),(d===r.db.LINETYPE.SOLID_POINT||d===r.db.LINETYPE.DOTTED_POINT)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-filled-head)`),(d===r.db.LINETYPE.SOLID_CROSS||d===r.db.LINETYPE.DOTTED_CROSS)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-crosshead)`),p||u3.showSequenceNumbers){let l=d===r.db.LINETYPE.BIDIRECTIONAL_SOLID||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,u=d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,p=fAi(i,r),m=o,h=s;l?(oo?h=s-12:(h=s-6,m+=(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||(i==null?void 0:i.centralConnection)===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),h+=p?15:0,_.attr(`x2`,h),_.attr(`x1`,m)):_.attr(`x1`,o+6);let g=0,y=o===s,b=o<=s;g=y?t.fromBounds+1:u?b?t.toBounds-1:t.fromBounds+1:b?t.fromBounds+1:t.toBounds-1;let x=`12px`,S=f.toString().length;S>5?x=`7px`:S>3&&(x=`9px`),e.append(`line`).attr(`x1`,g).attr(`y1`,n).attr(`x2`,g).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+v+`#`+a+`-sequencenumber)`),e.append(`text`).attr(`x`,g).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,x).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(f)}},`drawMessage`),nAi=U(function(e,t,n,r,i,a,o){let s=0,l=0,u,d=0;for(let e of r){let r=t.get(e),a=r.box;u&&u!=a&&(o||d3.models.addBox(u),l+=u3.boxMargin+u.margin),a&&a!=u&&(o||(a.x=s+l,a.y=i),l+=a.margin),r.width=oI.getMax(r.width||u3.width,u3.width),r.height=oI.getMax(r.height||u3.height,u3.height),r.margin=r.margin||u3.actorMargin,d=oI.getMax(d,r.height),n.get(r.name)&&(l+=r.width/2),r.x=s+l,r.starty=d3.getVerticalPos(),d3.insert(r.x,i,r.x+r.width,r.height),s+=r.width+l,r.box&&(r.box.width=s+a.margin-r.box.x),l=r.margin,u=r.box,d3.models.addActor(r)}u&&!o&&d3.models.addBox(u),d3.bumpVerticalPos(d)},`addActorRenderingData`),rAi=U(async function(e,t,n,r,i,a,o){if(r){let r=0;d3.bumpVerticalPos(u3.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||(n.stopy=d3.getVerticalPos());let l=await l3.drawActor(e,n,u3,!0,i,a,o);r=oI.getMax(r,l)}d3.bumpVerticalPos(r+u3.boxMargin)}else for(let r of n){let n=t.get(r);await l3.drawActor(e,n,u3,!1,i,a,o)}},`drawActors`),iAi=U(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=cAi(n),l=l3.drawPopup(e,n,s,u3,u3.forceMenus,r);l.height>i&&(i=l.height),l.width+n.x>a&&(a=l.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),aAi=U(function(e){OF(u3,e),e.fontFamily&&(u3.actorFontFamily=u3.noteFontFamily=u3.messageFontFamily=e.fontFamily),e.fontSize&&(u3.actorFontSize=u3.noteFontSize=u3.messageFontSize=e.fontSize),e.fontWeight&&(u3.actorFontWeight=u3.noteFontWeight=u3.messageFontWeight=e.fontWeight)},`setConf`),m3=U(function(e){return d3.activations.filter(function(t){return t.actor===e})},`actorActivations`),oAi=U(function(e,t){let n=t.get(e),r=m3(e);return[r.reduce(function(e,t){return oI.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return oI.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`),U(Y4,`adjustLoopHeightForWrap`),U(fki,`adjustCreatedDestroyedData`),sAi=U(async function(e,t,n,r){let{securityLevel:i,sequence:a,look:o,themeVariables:s}=_I();u3=a;let l;i===`sandbox`&&(l=DI(`#i`+t));let u=DI(i===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=i===`sandbox`?l.nodes()[0].contentDocument:document;d3.init(),W.debug(r.db);let f=i===`sandbox`?u.select(`[id="${t}"]`):DI(`[id="${t}"]`),p=r.db.getActors(),m=r.db.getCreatedActors(),h=r.db.getDestroyedActors(),g=r.db.getBoxes(),_=r.db.getActorKeys(),v=r.db.getMessages(),y=r.db.getDiagramTitle(),b=r.db.hasAtLeastOneBox(),x=r.db.hasAtLeastOneBoxWithTitle(),S=await pki(p,v,r);if(u3.height=await mki(p,S,g),l3.insertComputerIcon(f,t),l3.insertDatabaseIcon(f,t),l3.insertClockIcon(f,t),b&&(d3.bumpVerticalPos(u3.boxMargin),x&&d3.bumpVerticalPos(g[0].textMaxHeight)),u3.hideUnusedParticipants===!0){let e=new Set;v.forEach(t=>{e.add(t.from),e.add(t.to)}),_=_.filter(t=>e.has(t))}let C=new Map(_.map((e,t)=>{var n;return[((n=p.get(e))==null?void 0:n.name)??e,t]}));nAi(f,p,m,_,0,v,!1);let w=await _Ai(v,p,S,r);l3.insertArrowHead(f,t),l3.insertArrowCrossHead(f,t),l3.insertArrowFilledHead(f,t),l3.insertSequenceNumber(f,t),l3.insertSolidTopArrowHead(f,t),l3.insertSolidBottomArrowHead(f,t),l3.insertStickTopArrowHead(f,t),l3.insertStickBottomArrowHead(f,t),o===`neo`&&l3.insertDropShadow(f,u3);function T(e,t){let n=d3.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),l3.drawActivation(f,n,t,u3,m3(e.from).length,r,C),d3.insert(n.startx,t-10,n.stopx,t)}U(T,`activeEnd`);let E=1,D=1,O=[],k=[],A=0;for(let e of v){let t,n,i;switch(e.type){case r.db.LINETYPE.NOTE:d3.resetVerticalPos(),n=e.noteModel,await Qki(f,n,e.id);break;case r.db.LINETYPE.ACTIVE_START:d3.newActivation(e,f,p);break;case r.db.LINETYPE.CENTRAL_CONNECTION:d3.newActivation(e,f,p);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:d3.newActivation(e,f,p);break;case r.db.LINETYPE.ACTIVE_END:T(e,d3.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Y4(w,e,u3.boxMargin,u3.boxMargin+u3.boxTextMargin,e=>d3.newLoop(e));break;case r.db.LINETYPE.LOOP_END:t=d3.endLoop(),await l3.drawLoop(f,t,`loop`,u3,e),d3.bumpVerticalPos(t.stopy-d3.getVerticalPos()),d3.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:Y4(w,e,u3.boxMargin,u3.boxMargin,e=>{let t=e.message;t||(t=(s==null?void 0:s.rectBkgColor)||(s==null?void 0:s.actorBkg)||`rgba(128, 128, 128, 0.5)`),d3.newLoop(void 0,t)});break;case r.db.LINETYPE.RECT_END:t=d3.endLoop(),k.push(t),d3.models.addLoop(t),d3.bumpVerticalPos(t.stopy-d3.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Y4(w,e,u3.boxMargin,u3.boxMargin+u3.boxTextMargin,e=>d3.newLoop(e));break;case r.db.LINETYPE.OPT_END:t=d3.endLoop(),await l3.drawLoop(f,t,`opt`,u3,e),d3.bumpVerticalPos(t.stopy-d3.getVerticalPos()),d3.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:Y4(w,e,u3.boxMargin,u3.boxMargin+u3.boxTextMargin,e=>d3.newLoop(e));break;case r.db.LINETYPE.ALT_ELSE:Y4(w,e,u3.boxMargin+u3.boxTextMargin,u3.boxMargin,e=>d3.addSectionToLoop(e));break;case r.db.LINETYPE.ALT_END:t=d3.endLoop(),await l3.drawLoop(f,t,`alt`,u3,e),d3.bumpVerticalPos(t.stopy-d3.getVerticalPos()),d3.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:Y4(w,e,u3.boxMargin,u3.boxMargin+u3.boxTextMargin,e=>d3.newLoop(e)),d3.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:Y4(w,e,u3.boxMargin+u3.boxTextMargin,u3.boxMargin,e=>d3.addSectionToLoop(e));break;case r.db.LINETYPE.PAR_END:t=d3.endLoop(),await l3.drawLoop(f,t,`par`,u3,e),d3.bumpVerticalPos(t.stopy-d3.getVerticalPos()),d3.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:E=e.message.start||E,D=e.message.step||D,e.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Y4(w,e,u3.boxMargin,u3.boxMargin+u3.boxTextMargin,e=>d3.newLoop(e));break;case r.db.LINETYPE.CRITICAL_OPTION:Y4(w,e,u3.boxMargin+u3.boxTextMargin,u3.boxMargin,e=>d3.addSectionToLoop(e));break;case r.db.LINETYPE.CRITICAL_END:t=d3.endLoop(),await l3.drawLoop(f,t,`critical`,u3,e),d3.bumpVerticalPos(t.stopy-d3.getVerticalPos()),d3.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:Y4(w,e,u3.boxMargin,u3.boxMargin+u3.boxTextMargin,e=>d3.newLoop(e));break;case r.db.LINETYPE.BREAK_END:t=d3.endLoop(),await l3.drawLoop(f,t,`break`,u3,e),d3.bumpVerticalPos(t.stopy-d3.getVerticalPos()),d3.models.addLoop(t);break;default:try{i=e.msgModel,i.starty=d3.getVerticalPos(),i.sequenceIndex=E,i.sequenceVisible=r.db.showSequenceNumbers(),i.id=e.id,i.from=e.from,i.to=e.to;let t=await dki(f,i);fki(e,i,t,A,p,m,h),O.push({messageModel:i,lineStartY:t,msg:e}),d3.models.addMessage(i)}catch(e){W.error(`error while drawing message`,e)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(E=Math.round((E+D)*100)/100),A++}W.debug(`createdActors`,m),W.debug(`destroyedActors`,h),await rAi(f,p,_,!1,t,r,C);for(let e of O)await tAi(f,e.messageModel,e.lineStartY,r,e.msg,t);u3.mirrorActors&&await rAi(f,p,_,!0,t,r,C),k.forEach(e=>l3.drawBackgroundRect(f,e)),Eki(f,p,_,u3);for(let e of d3.models.boxes){e.height=d3.getVerticalPos()-e.y,d3.insert(e.x,e.y,e.x+e.width,e.height);let t=u3.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,l3.drawBox(f,e,u3)}b&&d3.bumpVerticalPos(u3.boxMargin);let j=iAi(f,p,_,d),{bounds:M}=d3.getBounds();M.startx===void 0&&(M.startx=0),M.starty===void 0&&(M.starty=0),M.stopx===void 0&&(M.stopx=0),M.stopy===void 0&&(M.stopy=0);let N=M.stopy-M.starty;N2,p=U(e=>l?-e:e,`adjustValue`);e.from===e.to?d=u:(e.activate&&!f&&(d+=p(u3.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(d+=p(3)),[n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(u-=p(3)));let m=[i,a,o,s],h=Math.abs(u-d);e.wrap&&e.message&&(e.message=xL.wrapLabel(e.message,oI.getMax(h+2*u3.wrapPadding,u3.width),f3(u3)));let g=xL.calculateTextDimensions(e.message,f3(u3));return{width:oI.getMax(e.wrap?0:g.width+2*u3.wrapPadding,h+2*u3.wrapPadding,u3.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,m),toBounds:Math.max.apply(null,m)}},`buildMessageModel`),_Ai=U(async function(e,t,n,r){let i={},a=[],o,s,l;for(let n of e){switch(n.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:n.id,msg:n.message,from:2**53-1,to:-(2**53-1),width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:n.message&&(o=a.pop(),i[o.id]=o,i[n.id]=o,a.push(o));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{let e=t.get(n.from?n.from:n.to.actor),r=m3(n.from?n.from:n.to.actor).length,i=e.x+e.width/2+(r-1)*u3.activationWidth/2,a={startx:i,stopx:i+u3.activationWidth,actor:n.from,enabled:!0};d3.activations.push(a)}break;case r.db.LINETYPE.ACTIVE_END:{let e=d3.activations.map(e=>e.actor).lastIndexOf(n.from);d3.activations.splice(e,1).splice(0,1)}}n.placement===void 0?(l=gAi(n,t,r),n.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(e=>{if(o=e,l.startx===l.stopx){let e=t.get(n.from),r=t.get(n.to);o.from=oI.getMin(e.x-l.width/2,e.x-e.width/2,o.from),o.to=oI.getMax(r.x+l.width/2,r.x+e.width/2,o.to),o.width=oI.getMax(o.width,Math.abs(o.to-o.from))-u3.labelBoxWidth}else o.from=oI.getMin(l.startx,o.from),o.to=oI.getMax(l.stopx,o.to),o.width=oI.getMax(o.width,l.width)-u3.labelBoxWidth})):(s=await lAi(n,t,r),n.noteModel=s,a.forEach(e=>{o=e,o.from=oI.getMin(o.from,s.startx),o.to=oI.getMax(o.to,s.startx+s.width),o.width=oI.getMax(o.width,Math.abs(o.from-o.to))-u3.labelBoxWidth}))}return d3.activations=[],W.debug(`Loop type widths:`,i),i},`calculateLoopBounds`),vAi={parser:vki,get db(){return new Ski},renderer:{bounds:d3,drawActors:rAi,drawActorsPopup:iAi,setConf:aAi,draw:sAi},styles:Cki,init:U(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Irr({sequence:{wrap:e.wrap}}))},`init`)}})),bAi,xAi,SAi,CAi,wAi,TAi,h3,EAi,g3,DAi,OAi,kAi,AAi=o((()=>{Cq(),Tq(),Dq(),DK(),ZK(),wL(),bI(),hN(),fN(),XI(),fx(),SAi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,18],n=[1,19],r=[1,20],i=[1,41],a=[1,26],o=[1,42],s=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],F=[1,64],I=[1,8,9,41],L=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ee=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],te=[13,60,86,100,102,103],ne=[13,60,73,74,86,100,102,103],z=[13,60,68,69,70,71,72,86,100,102,103],re=[1,103],ie=[1,121],ae=[1,117],oe=[1,113],se=[1,119],ce=[1,114],le=[1,115],ue=[1,116],de=[1,118],fe=[1,120],pe=[22,50,60,61,82,86,87,88,89,90],me=[1,128],he=[12,39],ge=[1,8,9,39,41,44,46],_e=[1,8,9,22],ve=[1,153],ye=[1,8,9,61],be=[1,8,9,22,50,60,61,82,86,87,88,89,90],xe={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:n,37:r,38:22,42:i,43:23,46:a,48:o,51:s,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:F}),{39:[1,65]},e(I,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:L,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),e(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},e(ee,[2,133]),e(ee,[2,134]),e(ee,[2,135]),e(ee,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:n,37:r,42:i,46:a,48:o,51:s,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:n,37:r,38:22,42:i,43:23,46:a,48:o,51:s,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:F},e(O,[2,64]),{67:93,73:P,74:F},e(te,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),e(ne,[2,84]),e(ne,[2,85]),e(ne,[2,86]),e(ne,[2,87]),e(ne,[2,88]),e(z,[2,89]),e(z,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:i,43:23,48:o,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:re},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:ie,50:ae,59:110,60:oe,82:se,84:111,85:112,86:ce,87:le,88:ue,89:de,90:fe},{60:[1,122]},{13:L,55:123},e(I,[2,72]),e(I,[2,138]),{22:ie,50:ae,59:124,60:oe,61:[1,125],82:se,84:111,85:112,86:ce,87:le,88:ue,89:de,90:fe},e(pe,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},e(R,[2,16]),e(R,[2,17]),e(R,[2,18]),{11:127,12:me,39:[2,36]},e(he,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),e(he,[2,10]),e(ge,[2,55],{11:131,12:me}),e(D,[2,7]),{9:[1,132]},e(_e,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},e(te,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),e(te,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:i,43:23,48:o,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(I,[2,48],{39:[1,142]}),{41:[1,143]},e(I,[2,50]),{41:[2,61],45:144,51:re},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:ve}),e(ye,[2,107],{85:154,22:ie,50:ae,60:oe,82:se,86:ce,87:le,88:ue,89:de,90:fe}),e(be,[2,109]),e(be,[2,111]),e(be,[2,112]),e(be,[2,113]),e(be,[2,114]),e(be,[2,115]),e(be,[2,116]),e(be,[2,117]),e(be,[2,118]),e(be,[2,119]),e(O,[2,106]),e(I,[2,71]),e(O,[2,73],{61:ve}),{60:[1,155]},e(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},e(he,[2,12]),e(ge,[2,56]),{1:[2,4]},e(_e,[2,69]),e(_e,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},e(te,[2,80]),e(I,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:i,43:23,48:o,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:i,43:23,48:o,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:i,43:23,48:o,54:u,56:d},{45:163,51:re},e(I,[2,49]),{41:[2,62]},e(I,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:ie,50:ae,60:oe,82:se,84:169,85:112,86:ce,87:le,88:ue,89:de,90:fe},e(be,[2,110]),e(pe,[2,75]),{14:[1,170]},e(he,[2,11]),e(_e,[2,70]),e(I,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:re},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(ye,[2,108],{85:154,22:ie,50:ae,60:oe,82:se,86:ce,87:le,88:ue,89:de,90:fe}),e(ge,[2,8]),e(I,[2,51]),{41:[1,175]},e(I,[2,54]),e(O,[2,104]),e(I,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};xe.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:U(function(e,t,n,r){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin(`acc_title`),33;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),35;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return`EDGE_STATE`;case 18:this.begin(`callback_name`);break;case 19:this.popState();break;case 20:this.popState(),this.begin(`callback_args`);break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return`STR`;case 26:this.begin(`string`);break;case 27:return 82;case 28:return 57;case 29:return this.begin(`namespace`),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin(`namespace-body`),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return`EOF_IN_STRUCT`;case 36:return 8;case 37:break;case 38:return`EDGE_STATE`;case 39:return this.begin(`class`),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin(`class-body`),39;case 44:return this.popState(),41;case 45:return`EOF_IN_STRUCT`;case 46:return`EDGE_STATE`;case 47:return`OPEN_IN_STRUCT`;case 48:break;case 49:return`MEMBER`;case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return`GENERICTYPE`;case 61:this.begin(`generic`);break;case 62:this.popState();break;case 63:return`BQUOTE_STR`;case 64:this.begin(`bqstring`);break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return`PLUS`;case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return`EQUALS`;case 89:return`EQUALS`;case 90:return 60;case 91:return 12;case 92:return 14;case 93:return`PUNCTUATION`;case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}}})();function Se(){this.yy={}}return U(Se,`Parser`),Se.prototype=xe,xe.Parser=Se,new Se})(),SAi.parser=SAi,CAi=SAi,wAi=[`#`,`+`,`~`,`-`,``],TAi=(bAi=class{constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=QF(e,_I());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+eI(this.id);this.memberType===`method`&&(e+=`(${eI(this.parameters.trim())})`,this.returnType&&(e+=` : `+eI(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t=``;if(this.memberType===`method`){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(n){let e=n[1]?n[1].trim():``;if(wAi.includes(e)&&(this.visibility=e),this.id=n[2],this.parameters=n[3]?n[3].trim():``,t=n[4]?n[4].trim():``,this.returnType=n[5]?n[5].trim():``,t===``){let e=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(e)&&(t=e,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,r=e.substring(0,1),i=e.substring(n-1);wAi.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(t=i),this.id=e.substring(this.visibility===``?0:1,t===``?n:n-1)}this.classifier=t,this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim();let n=`${this.visibility?`\\`+this.visibility:``}${eI(this.id)}${this.memberType===`method`?`(${eI(this.parameters)})${this.returnType?` : `+eI(this.returnType):``}`:``}`;this.text=n.replaceAll(`<`,`<`).replaceAll(`>`,`>`),this.text.startsWith(`\\<`)&&(this.text=this.text.replace(`\\<`,`~`))}parseClassifier(){switch(this.classifier){case`*`:return`font-style:italic;`;case`$`:return`text-decoration:underline;`;default:return``}}},U(bAi,`ClassMember`),bAi),h3=`classId-`,EAi=0,g3=U(e=>oI.sanitizeText(e,_I()),`sanitizeText`),DAi=(xAi=class e{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=U(e=>{let t=XK();DI(e).select(`svg`).selectAll(`g`).filter(function(){return DI(this).attr(`title`)!==null}).on(`mouseover`,e=>{let n=DI(e.currentTarget),r=n.attr(`title`);if(!r)return;let i=e.currentTarget.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.html(dx.sanitize(r)).style(`left`,`${window.scrollX+i.left+i.width/2}px`).style(`top`,`${window.scrollY+i.bottom+4}px`),n.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),DI(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=dI,this.getAccTitle=fI,this.setAccDescription=pI,this.getAccDescription=mI,this.setDiagramTitle=hI,this.getDiagramTitle=gI,this.getConfig=U(()=>_I().class,`getConfig`),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(e){let t=oI.sanitizeText(e,_I()),n=``,r=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);r=g3(e[0]),n=g3(e[1])}return{className:r,type:n}}setClassLabel(e,t){let n=oI.sanitizeText(e,_I());t&&(t=g3(t));let{className:r}=this.splitClassNameAndType(n);this.classes.get(r).label=t,this.classes.get(r).text=`${t}${this.classes.get(r).type?`<${this.classes.get(r).type}>`:``}`}addClass(e){let t=oI.sanitizeText(e,_I()),{className:n,type:r}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let i=oI.sanitizeText(n,_I());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`<${r}>`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:h3+i+`-`+EAi}),EAi++}addInterface(e,t){let n={id:`interface${this.interfaces.length}`,label:e,classId:t};this.interfaces.push(n)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){let t=oI.sanitizeText(e,_I());if(this.classes.has(t)){let e=this.classes.get(t).domId;return this.diagramId?`${this.diagramId}-${e}`:e}throw Error(`Class not found: `+t)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.direction=`TB`,uI()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){let t=typeof e==`number`?`note${e}`:e;return this.notes.get(t)}getNotes(){return this.notes}addRelation(e){W.debug(`Adding relation: `+JSON.stringify(e));let t=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!t.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!t.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=oI.sanitizeText(e.relationTitle1.trim(),_I()),e.relationTitle2=oI.sanitizeText(e.relationTitle2.trim(),_I()),this.relations.push(e)}addAnnotation(e,t){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(t)}addMember(e,t){this.addClass(e);let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);if(typeof t==`string`){let e=t.trim();e.startsWith(`<<`)&&e.endsWith(`>>`)?r.annotations.push(g3(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new TAi(e,`method`)):e&&r.members.push(new TAi(e,`attribute`))}}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(e,t){let n=this.notes.size,r={id:`note${n}`,class:t,text:e,index:n};return this.notes.set(r.id,r),r.id}cleanupLabel(e){return e.startsWith(`:`)&&(e=e.substring(1)),g3(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=h3+n),n=this.splitClassNameAndType(n).className;let r=this.classes.get(n);r&&(r.cssClasses+=` `+t)})}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),t&&t.forEach(t=>{if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.classes.forEach(e=>{e.cssClasses.includes(n)&&e.styles.push(...t.flatMap(e=>e.split(`,`)))})}}setTooltip(e,t){e.split(`,`).forEach(e=>{if(t!==void 0){let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);r&&(r.tooltip=g3(t))}})}getTooltip(e,t){return t&&this.namespaces.has(t)?this.namespaces.get(t).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,t,n){let r=_I();e.split(`,`).forEach(e=>{let i=e;/\d/.exec(e[0])&&(i=h3+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.link=xL.formatUrl(t,r),a.linkTarget=r.securityLevel===`sandbox`?`_top`:typeof n==`string`?g3(n):`_blank`)}),this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFunc(e,t,n);let r=this.splitClassNameAndType(e).className,i=this.classes.get(r);i&&(i.haveCallback=!0)}),this.setCssClass(e,`clickable`)}setClickFunc(e,t,n){let r=oI.sanitizeText(e,_I());if(_I().securityLevel!==`loose`||t===void 0)return;let i=this.splitClassNameAndType(r).className;if(this.classes.has(i)){let e=[];if(typeof n==`string`){e=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{let n=this.lookUpDomId(i),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{xL.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){let n=t.at(-1);return n?`${n}.${e}`:e}static getAncestorIds(e){let t=e.split(`.`),n=Array(t.length);n[0]=t[0];for(let e=1;e0?a[e-1]:void 0,o=e===a.length-1,s=o&&n?n:i[e];this.namespaces.has(t)?o&&(this.namespaces.get(t).explicit=!0):this.namespaces.set(t,this.createNamespaceNode(t,s,r,o)),r&&this.linkParentChild(r,t)}return r}popNamespace(){this.namespaceStack.pop()}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,n){if(this.namespaces.has(e)){for(let n of t){let{className:t}=this.splitClassNameAndType(n),r=this.getClass(t);r.parent=e,this.namespaces.get(e).classes.set(t,r)}for(let t of n){let n=this.getNote(t);n.parent=e,this.namespaces.get(e).notes.set(t,n)}}}setCssStyle(e,t){let n=this.classes.get(e);if(t&&n)for(let e of t)e.includes(`,`)?n.styles.push(...e.split(`,`)):n.styles.push(e)}getArrowMarker(e){let t;switch(e){case 0:t=`aggregation`;break;case 1:t=`extension`;break;case 2:t=`composition`;break;case 3:t=`dependency`;break;case 4:t=`lollipop`;break;default:t=`none`}return t}resolveExplicitAncestor(e){let t=e;for(;t;){let e=this.namespaces.get(t);if(!e)return;if(e.explicit)return t;t=e.parent}}getData(){var e;let t=[],n=[],r=_I(),i=((e=r.class)==null?void 0:e.hierarchicalNamespaces)??!0;for(let e of this.namespaces.values()){if(!i&&!e.explicit)continue;let n={id:e.id,label:i?e.label:e.id,isGroup:!0,padding:r.class.padding??16,shape:`rect`,cssStyles:[],look:r.look,parentId:i?e.parent:void 0};t.push(n)}for(let e of this.classes.values()){let n=i?e.parent:this.resolveExplicitAncestor(e.parent),a={...e,type:void 0,isGroup:!1,parentId:n,look:r.look};t.push(a)}for(let e of this.notes.values()){var a;let o=i?e.parent:this.resolveExplicitAncestor(e.parent),s={id:e.id,label:e.text,isGroup:!1,shape:`note`,padding:r.class.padding??6,cssStyles:[`text-align: left`,`white-space: nowrap`,`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look,parentId:o,labelType:`markdown`};t.push(s);let l=(a=this.classes.get(e.class))==null?void 0:a.id;if(l){let t={id:`edgeNote${e.index}`,start:e.id,end:l,type:`normal`,thickness:`normal`,classes:`relation`,arrowTypeStart:`none`,arrowTypeEnd:`none`,arrowheadStyle:``,labelStyle:[``],style:[`fill: none`],pattern:`dotted`,look:r.look};n.push(t)}}for(let e of this.interfaces){let n={id:e.id,label:e.label,isGroup:!1,shape:`rect`,cssStyles:[`opacity: 0;`],look:r.look};t.push(n)}let o=0;for(let e of this.relations){o++;let t={id:CL(e.id1,e.id2,{prefix:`id`,counter:o}),start:e.id1,end:e.id2,type:`normal`,label:e.title,labelpos:`c`,thickness:`normal`,classes:`relation`,arrowTypeStart:this.getArrowMarker(e.relation.type1),arrowTypeEnd:this.getArrowMarker(e.relation.type2),startLabelRight:e.relationTitle1===`none`?``:e.relationTitle1,endLabelLeft:e.relationTitle2===`none`?``:e.relationTitle2,arrowheadStyle:``,labelStyle:[`display: inline-block`],style:e.style||``,pattern:e.relation.lineType==1?`dashed`:`solid`,look:r.look,labelType:`markdown`};n.push(t)}return{nodes:t,edges:n,other:{},config:r,direction:this.getDirection()}}},U(xAi,`ClassDB`),xAi),OAi=U(e=>`g.classGroup text { fill: ${e.nodeBorder||e.classText}; stroke: none; font-family: ${e.fontFamily}; font-size: 10px; .title { font-weight: bolder; } } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span { color: ${e.titleColor}; } .cluster-label span p { background-color: transparent; } .cluster rect { fill: ${e.clusterBkg}; stroke: ${e.clusterBorder}; stroke-width: 1px; } .cluster text { fill: ${e.titleColor}; } .cluster span { color: ${e.titleColor}; } .nodeLabel, .edgeLabel { color: ${e.classText}; } .noteLabel .nodeLabel, .noteLabel .edgeLabel { color: ${e.noteTextColor}; } .edgeLabel .label rect { fill: ${e.mainBkg}; } .label text { fill: ${e.classText}; } .labelBkg { background: ${e.mainBkg}; } .edgeLabel .label span { background: ${e.mainBkg}; } .classTitle { font-weight: bolder; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; } .divider { stroke: ${e.nodeBorder}; stroke-width: 1; } g.clickable { cursor: pointer; } g.classGroup rect { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } g.classGroup line { stroke: ${e.nodeBorder}; stroke-width: 1; } .classLabel .box { stroke: none; stroke-width: 0; fill: ${e.mainBkg}; opacity: 0.5; } .classLabel .label { fill: ${e.nodeBorder}; font-size: 10px; } .relation { stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth}; fill: none; } .dashed-line{ stroke-dasharray: 3; } .dotted-line{ stroke-dasharray: 1 2; } [id$="-compositionStart"], .composition { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-compositionEnd"], .composition { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-dependencyStart"], .dependency { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-dependencyEnd"], .dependency { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-extensionStart"], .extension { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-extensionEnd"], .extension { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-aggregationStart"], .aggregation { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-aggregationEnd"], .aggregation { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-lollipopStart"], .lollipop { fill: ${e.mainBkg} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-lollipopEnd"], .lollipop { fill: ${e.mainBkg} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } .edgeTerminals { font-size: 11px; line-height: initial; } .classTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } .edgeLabel[data-look="neo"] { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } ${Sq()} `,`getStyles`),kAi={getClasses:U(function(e,t){return t.db.getClasses()},`getClasses`),draw:U(async function(e,t,n,r){W.info(`REF0:`),W.info(`Drawing class diagram (v3)`,t);let{securityLevel:i,state:a,layout:o}=_I();r.db.setDiagramId(t);let s=r.db.getData(),l=wq(t,i);s.type=r.type,s.layoutAlgorithm=EK(o),s.nodeSpacing=(a==null?void 0:a.nodeSpacing)||50,s.rankSpacing=(a==null?void 0:a.rankSpacing)||50,s.markers=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`],s.diagramId=t,await TK(s,l),xL.insertTitle(l,`classDiagramTitleText`,(a==null?void 0:a.titleTopMargin)??25,r.db.getDiagramTitle()),Eq(l,8,`classDiagram`,(a==null?void 0:a.useMaxWidth)??!0)},`draw`),getDir:U((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`)}})),jAi=l({diagram:()=>MAi}),MAi,NAi=o((()=>{AAi(),Tq(),Dq(),DK(),ZK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),MAi={parser:CAi,get db(){return new DAi},renderer:kAi,styles:OAi,init:U(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}})),PAi=l({diagram:()=>FAi}),FAi,IAi=o((()=>{AAi(),Tq(),Dq(),DK(),ZK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),FAi={parser:CAi,get db(){return new DAi},renderer:kAi,styles:OAi,init:U(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}}));function LAi(e=``,t=0,n=``,r=bji){return`${yji}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}function _3(e,t,n){if(!t.id||t.id===``||t.id===``)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}function RAi(e){var t;return(e==null||(t=e.classes)==null?void 0:t.join(` `))??``}function zAi(e){return(e==null?void 0:e.styles)??[]}var BAi,VAi,HAi,UAi,WAi,GAi,v3,y3,KAi,qAi,JAi,YAi,b3,XAi,ZAi,QAi,$Ai,eji,tji,nji,rji,iji,aji,oji,sji,cji,lji,x3,uji,dji,fji,pji,mji,hji,gji,_ji,vji,yji,bji,xji,Sji,Cji,wji,S3,C3,Tji,Eji,w3,Dji,T3,Oji,kji,E3,D3,Aji,jji=o((()=>{Tq(),Dq(),DK(),ZK(),wL(),bI(),hN(),fN(),XI(),fx(),VAi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var l=a[s],u=a[s-2].trim();if(a[s].match(`:`)){var d=a[s].split(`:`);l=d[0],u=[u,d[1]]}this.$={stmt:`state`,id:l,type:`default`,description:u};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``}}},`anonymous`),table:[{3:1,4:t,5:n,6:r},{1:[3]},{3:5,4:t,5:n,6:r},{3:6,4:t,5:n,6:r},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:s,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(A,[2,14],{14:[1,71]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,i,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){function i(){let n=t.yytext.indexOf(`%%`);if(n===0)return!1;if(n>0){let r=t.yytext.slice(0,n),i=t.yytext.slice(n);i&&e.lexer.unput(i),t.yytext=r}return!0}switch(U(i,`processId`),n){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState(`SCALE`),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin(`acc_title`),33;case 17:return this.popState(),`acc_title_value`;case 18:return this.begin(`acc_descr`),35;case 19:return this.popState(),`acc_descr_value`;case 20:this.begin(`acc_descr_multiline`);break;case 21:this.popState();break;case 22:return`acc_descr_multiline_value`;case 23:return this.pushState(`CLASSDEF`),41;case 24:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 25:return this.popState(),this.pushState(`CLASSDEFID`),42;case 26:return this.popState(),43;case 27:return this.pushState(`CLASS`),48;case 28:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 29:return this.popState(),50;case 30:return this.pushState(`STYLE`),45;case 31:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 32:return this.popState(),47;case 33:return this.pushState(`SCALE`),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState(`STATE`);break;case 37:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState(`STATE_STRING`);break;case 48:return this.pushState(`STATE_ID`),`AS`;case 49:return i()?(this.popState(),`ID`):void 0;case 50:this.popState();break;case 51:return`STATE_DESCR`;case 52:throw Error(`Error: State name must be a single word. Found: "`+t.yytext.trim()+`"`);case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState(`struct`),20;case 56:return this.popState(),21;case 57:break;case 58:return this.begin(`NOTE`),29;case 59:return this.popState(),this.pushState(`NOTE_ID`),59;case 60:return this.popState(),this.pushState(`NOTE_ID`),60;case 61:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 62:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 63:break;case 64:return`NOTE_TEXT`;case 65:return i()?(this.popState(),`ID`):void 0;case 66:return i()?(this.popState(),this.pushState(`NOTE_TEXT`),24):void 0;case 67:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 68:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return i()?24:void 0;case 74:return t.yytext=t.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return`INVALID`}},`anonymous`),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}})();function P(){this.yy={}}return U(P,`Parser`),P.prototype=N,N.Parser=P,new P})(),VAi.parser=VAi,HAi=VAi,UAi=`TB`,WAi=`TB`,GAi=`dir`,v3=`state`,y3=`root`,KAi=`relation`,qAi=`classDef`,JAi=`style`,YAi=`applyClass`,b3=`default`,XAi=`divider`,ZAi=`fill:none`,QAi=`fill: #333`,$Ai=`c`,eji=`markdown`,tji=`normal`,nji=`rect`,rji=`rectWithTitle`,iji=`stateStart`,aji=`stateEnd`,oji=`divider`,sji=`roundedWithTitle`,cji=`note`,lji=`noteGroup`,x3=`statediagram`,uji=`${x3}-state`,dji=`transition`,fji=`note`,pji=`${dji} note-edge`,mji=`${x3}-${fji}`,hji=`${x3}-cluster`,gji=`${x3}-cluster-alt`,_ji=`parent`,vji=`note`,yji=`state`,bji=`----`,xji=`${bji}${vji}`,Sji=`${bji}${_ji}`,Cji=U((e,t=WAi)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),wji={getClasses:U(function(e,t){return t.db.getClasses()},`getClasses`),draw:U(async function(e,t,n,r){W.info(`REF0:`),W.info(`Drawing state diagram (v2)`,t);let{securityLevel:i,state:a,layout:o}=_I();r.db.extract(r.db.getRootDocV2());let s=r.db.getData(),l=wq(t,i);s.type=r.type,s.layoutAlgorithm=o,s.nodeSpacing=(a==null?void 0:a.nodeSpacing)||50,s.rankSpacing=(a==null?void 0:a.rankSpacing)||50,s.markers=_I().look===`neo`?[`barbNeo`]:[`barb`],s.diagramId=t,await TK(s,l);try{(typeof r.db.getLinks==`function`?r.db.getLinks():new Map).forEach((e,t)=>{var n;let r=typeof t==`string`?t:typeof(t==null?void 0:t.id)==`string`?t.id:``,i=s.nodes.find(e=>e.id===r);if(!r){W.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(t));return}let a=(n=l.node())==null?void 0:n.querySelectorAll(`g.node, g.rough-node`),o;if(a==null||a.forEach(e=>{var t;let n=(t=e.textContent)==null?void 0:t.trim();(e.id===(i==null?void 0:i.domId)||n===r)&&(o=e)}),!o){W.warn(`⚠️ Could not find node matching text:`,r);return}let u=o.parentNode;if(!u){W.warn(`⚠️ Node has no parent, cannot wrap:`,r);return}let d=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),f=e.url.replace(/^"+|"+$/g,``);if(d.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,f),d.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);d.setAttribute(`title`,t),o.setAttribute(`title`,t)}u.replaceChild(d,o),d.appendChild(o),W.info(`🔗 Wrapped node in tag for:`,r,e.url)})}catch(e){W.error(`❌ Error injecting clickable links:`,e)}xL.insertTitle(l,`statediagramTitleText`,(a==null?void 0:a.titleTopMargin)??25,r.db.getDiagramTitle()),Eq(l,8,x3,(a==null?void 0:a.useMaxWidth)??!0)},`draw`),getDir:Cji},S3=new Map,C3=0,U(LAi,`stateDomId`),Tji=U((e,t,n,r,i,a,o,s)=>{W.trace(`items`,t),t.forEach(t=>{switch(t.stmt){case v3:w3(e,t,n,r,i,a,o,s);break;case b3:w3(e,t,n,r,i,a,o,s);break;case KAi:{w3(e,t.state1,n,r,i,a,o,s),w3(e,t.state2,n,r,i,a,o,s);let l=o===`neo`,u={id:`edge`+C3,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:l?`arrow_barb_neo`:`arrow_barb`,style:ZAi,labelStyle:``,label:oI.sanitizeText(t.description??``,_I()),arrowheadStyle:QAi,labelpos:$Ai,labelType:eji,thickness:tji,classes:dji,look:o};i.push(u),C3++}}})},`setupDoc`),Eji=U((e,t=WAi)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),U(_3,`insertOrUpdateNode`),U(RAi,`getClassesFromDbInfo`),U(zAi,`getStylesFromDbInfo`),w3=U((e,t,n,r,i,a,o,s)=>{let l=t.id,u=n.get(l),d=RAi(u),f=zAi(u),p=_I();if(W.info(`dataFetcher parsedItem`,t,u,f),l!==`root`){var m;let n=nji;t.start===!0?n=iji:t.start===!1&&(n=aji),t.type!==b3&&(n=t.type),S3.get(l)||S3.set(l,{id:l,shape:n,description:oI.sanitizeText(l,p),cssClasses:`${d} ${uji}`,cssStyles:f});let u=S3.get(l);if(t.description){if(Array.isArray(u.description))u.shape=rji,u.description.push(t.description);else{var h;(h=u.description)!=null&&h.length&&u.description.length>0?(u.shape=rji,u.description=u.description===l?[t.description]:[u.description,t.description]):(u.shape=nji,u.description=t.description)}u.description=oI.sanitizeTextOrArray(u.description,p)}((m=u.description)==null?void 0:m.length)===1&&u.shape===rji&&(u.shape=u.type===`group`?sji:nji),!u.type&&t.doc&&(W.info(`Setting cluster for XCX`,l,Eji(t)),u.type=`group`,u.isGroup=!0,u.dir=Eji(t),u.shape=t.type===XAi?oji:sji,u.cssClasses=`${u.cssClasses} ${hji} ${a?gji:``}`);let _={labelStyle:``,shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:l,dir:u.dir,domId:LAi(l,C3),type:u.type,isGroup:u.type===`group`,padding:8,rx:10,ry:10,look:o,labelType:`markdown`};if(_.shape===oji&&(_.label=``),e&&e.id!==`root`&&(W.trace(`Setting node `,l,` to be child of its parent `,e.id),_.parentId=e.id),_.centerLabel=!0,t.note){var g;let e={labelStyle:``,shape:cji,label:t.note.text,labelType:`markdown`,cssClasses:mji,cssStyles:[],cssCompiledStyles:[],id:l+xji+`-`+C3,domId:LAi(l,C3,vji),type:u.type,isGroup:u.type===`group`,padding:(g=p.flowchart)==null?void 0:g.padding,look:o,position:t.note.position},n=l+Sji,a={labelStyle:``,shape:lji,label:t.note.text,cssClasses:u.cssClasses,cssStyles:[],id:l+Sji,domId:LAi(l,C3,_ji),type:`group`,isGroup:!0,padding:16,look:o,position:t.note.position};C3++,a.id=n,e.parentId=n,_3(r,a,s),_3(r,e,s),_3(r,_,s);let d=l,f=e.id;t.note.position===`left of`&&(d=e.id,f=l),i.push({id:d+`-`+f,start:d,end:f,arrowhead:`none`,arrowTypeEnd:``,style:ZAi,labelStyle:``,classes:pji,arrowheadStyle:QAi,labelpos:$Ai,labelType:eji,thickness:tji,look:o})}else _3(r,_,s)}t.doc&&(W.trace(`Adding nodes children `),Tji(t,t.doc,n,r,i,!a,o,s))},`dataFetcher`),Dji=U(()=>{S3.clear(),C3=0},`reset`),T3={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},Oji=U(()=>new Map,`newClassesList`),kji=U(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),E3=U(e=>JSON.parse(JSON.stringify(e)),`clone`),D3=(BAi=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Oji(),this.documents={root:kji()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=fI,this.setAccTitle=dI,this.getAccDescription=mI,this.setAccDescription=pI,this.setDiagramTitle=hI,this.getDiagramTitle=gI,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case v3:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case KAi:this.addRelation(t.state1,t.state2,t.description);break;case qAi:this.addStyleClass(t.id.trim(),t.classes);break;case JAi:this.handleStyleDef(t);break;case YAi:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip)}let t=this.getStates(),n=_I();Dji(),w3(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>{var t;return(t=e.replace(/;/g,``))==null?void 0:t.trim()}))}}setRootDoc(e){W.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,n){if(t.stmt===KAi){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===v3&&(t.id===T3.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==y3&&t.stmt!==v3||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===XAi){let t=E3(e);t.doc=E3(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:v3,id:ofr(),type:`divider`,doc:E3(i)};r.push(E3(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:y3,stmt:y3},{id:y3,stmt:y3,doc:this.rootDoc},!0),{id:y3,doc:this.rootDoc}}addState(e,t=b3,n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0){let l=e==null?void 0:e.trim();if(!this.currentDocument.states.has(l))W.info(`Adding state `,l,r),this.currentDocument.states.set(l,{stmt:v3,id:l,descriptions:[],type:t,doc:n,note:i,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(l);if(!e)throw Error(`State not found: ${l}`);e.doc||(e.doc=n),e.type||(e.type=t)}if(r&&(W.info(`Setting state description`,l,r),(Array.isArray(r)?r:[r]).forEach(e=>this.addDescription(l,e.trim()))),i){let e=this.currentDocument.states.get(l);if(!e)throw Error(`State not found: ${l}`);e.note=i,e.note.text=oI.sanitizeText(e.note.text,_I())}a&&(W.info(`Setting state classes`,l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),o&&(W.info(`Setting state styles`,l,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setStyle(l,e.trim()))),s&&(W.info(`Setting state styles`,l,o),(Array.isArray(s)?s:[s]).forEach(e=>this.setTextStyle(l,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:kji()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Oji(),e||(this.links=new Map,uI())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){W.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,n){this.links.set(e,{url:t,tooltip:n}),W.warn(`Adding link`,e,t,n)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===T3.START_NODE?(this.startEndCount++,`${T3.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=b3){return e===T3.START_NODE?T3.START_TYPE:t}endIdIfNeeded(e=``){return e===T3.END_NODE?(this.startEndCount++,`${T3.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=b3){return e===T3.END_NODE?T3.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:oI.sanitizeText(n,_I())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),o=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,o),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?oI.sanitizeText(n,_I()):void 0})}}addDescription(e,t){var n;let r=this.currentDocument.states.get(e),i=t.startsWith(`:`)?t.replace(`:`,``).trim():t;r==null||(n=r.descriptions)==null||n.push(oI.sanitizeText(i,_I()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(T3.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(T3.COLOR_KEYWORD).exec(e)){let e=t.replace(T3.FILL_KEYWORD,T3.BG_FILL).replace(T3.COLOR_KEYWORD,T3.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setupToolTips(e){let t=XK();DI(e).select(`svg`).selectAll(`g.node, g.rough-node`).on(`mouseover`,e=>{var n;let r=DI(e.currentTarget),i=r.attr(`title`);if(i===null)return;let a=(n=e.currentTarget)==null?void 0:n.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.style(`left`,window.scrollX+a.left+(a.right-a.left)/2+`px`).style(`top`,window.scrollY+a.bottom+`px`),t.html(dx.sanitize(i)),r.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),DI(e.currentTarget).classed(`hover`,!1)})}setCssClass(e,t){e.split(`,`).forEach(e=>{var n;let r=this.getState(e);if(!r){let t=e.trim();this.addState(t),r=this.getState(t)}r==null||(n=r.classes)==null||n.push(t)})}setStyle(e,t){var n;(n=this.getState(e))==null||(n=n.styles)==null||n.push(t)}setTextStyle(e,t){var n;(n=this.getState(e))==null||(n=n.textStyles)==null||n.push(t)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===GAi)}getDirection(){var e;return((e=this.getDirectionStatement())==null?void 0:e.value)??UAi}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:GAi,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=_I();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:Cji(this.getRootDocV2())}}getConfig(){return _I().state}},U(BAi,`StateDB`),BAi.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},BAi),Aji=U(e=>` defs [id$="-barbEnd"] { fill: ${e.transitionColor}; stroke: ${e.transitionColor}; } g.stateGroup text { fill: ${e.nodeBorder}; stroke: none; font-size: 10px; } g.stateGroup text { fill: ${e.textColor}; stroke: none; font-size: 10px; } g.stateGroup .state-title { font-weight: bolder; fill: ${e.stateLabelColor}; } g.stateGroup rect { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } g.stateGroup line { stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth||1}; } .transition { stroke: ${e.transitionColor}; stroke-width: ${e.strokeWidth||1}; fill: none; } .stateGroup .composit { fill: ${e.background}; border-bottom: 1px } .stateGroup .alt-composit { fill: #e0e0e0; border-bottom: 1px } .state-note { stroke: ${e.noteBorderColor}; fill: ${e.noteBkgColor}; text { fill: ${e.noteTextColor}; stroke: none; font-size: 10px; } } .stateLabel .box { stroke: none; stroke-width: 0; fill: ${e.mainBkg}; opacity: 0.5; } .edgeLabel .label rect { fill: ${e.labelBackgroundColor}; opacity: 0.5; } .edgeLabel { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } .edgeLabel .label text { fill: ${e.transitionLabelColor||e.tertiaryTextColor}; } .label div .edgeLabel { color: ${e.transitionLabelColor||e.tertiaryTextColor}; } .stateLabel text { fill: ${e.stateLabelColor}; font-size: 10px; font-weight: bold; } .node circle.state-start { fill: ${e.specialStateColor}; stroke: ${e.specialStateColor}; } .node .fork-join { fill: ${e.specialStateColor}; stroke: ${e.specialStateColor}; } .node circle.state-end { fill: ${e.innerEndBackground}; stroke: ${e.background}; stroke-width: 1.5 } .end-state-inner { fill: ${e.compositeBackground||e.background}; // stroke: ${e.background}; stroke-width: 1.5 } .node rect { fill: ${e.stateBkg||e.mainBkg}; stroke: ${e.stateBorder||e.nodeBorder}; stroke-width: ${e.strokeWidth||1}px; } .node polygon { fill: ${e.mainBkg}; stroke: ${e.stateBorder||e.nodeBorder};; stroke-width: ${e.strokeWidth||1}px; } [id$="-barbEnd"] { fill: ${e.lineColor}; } .statediagram-cluster rect { fill: ${e.compositeTitleBackground}; stroke: ${e.stateBorder||e.nodeBorder}; stroke-width: ${e.strokeWidth||1}px; } .cluster-label, .nodeLabel { color: ${e.stateLabelColor}; // line-height: 1; } .statediagram-cluster rect.outer { rx: 5px; ry: 5px; } .statediagram-state .divider { stroke: ${e.stateBorder||e.nodeBorder}; } .statediagram-state .title-state { rx: 5px; ry: 5px; } .statediagram-cluster.statediagram-cluster .inner { fill: ${e.compositeBackground||e.background}; } .statediagram-cluster.statediagram-cluster-alt .inner { fill: ${e.altBackground?e.altBackground:`#efefef`}; } .statediagram-cluster .inner { rx:0; ry:0; } .statediagram-state rect.basic { rx: 5px; ry: 5px; } .statediagram-state rect.divider { stroke-dasharray: 10,10; fill: ${e.altBackground?e.altBackground:`#efefef`}; } .note-edge { stroke-dasharray: 5; } .statediagram-note rect { fill: ${e.noteBkgColor}; stroke: ${e.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note rect { fill: ${e.noteBkgColor}; stroke: ${e.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note text { fill: ${e.noteTextColor}; } .statediagram-note .nodeLabel { color: ${e.noteTextColor}; } .statediagram .edgeLabel { color: red; // ${e.noteTextColor}; } [id$="-dependencyStart"], [id$="-dependencyEnd"] { fill: ${e.lineColor}; stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth||1}; } .statediagramTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } [data-look="neo"].statediagram-cluster rect { fill: ${e.mainBkg}; stroke: ${e.useGradient?`url(`+e.svgId+`-gradient)`:e.stateBorder||e.nodeBorder}; stroke-width: ${e.strokeWidth??1}; } [data-look="neo"].statediagram-cluster rect.outer { rx: ${e.radius}px; ry: ${e.radius}px; filter: ${e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${e.svgId}-drop-shadow)`):`none`} } `,`getStyles`)})),Mji=l({diagram:()=>Zji}),Nji,Pji,Fji,Iji,Lji,Rji,zji,Bji,Vji,Hji,Uji,Wji,O3,Gji,Kji,qji,Jji,Yji,Xji,Zji,Qji=o((()=>{jji(),Tq(),Dq(),DK(),ZK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),XI(),nPr(),xV(),Nji=U(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,_I().state.sizeUnit).attr(`cx`,_I().state.padding+_I().state.sizeUnit).attr(`cy`,_I().state.padding+_I().state.sizeUnit),`drawStartState`),Pji=U(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,_I().state.textHeight).attr(`class`,`divider`).attr(`x2`,_I().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),Fji=U((e,t)=>{let n=e.append(`text`).attr(`x`,2*_I().state.padding).attr(`y`,_I().state.textHeight+2*_I().state.padding).attr(`font-size`,_I().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,_I().state.padding).attr(`y`,_I().state.padding).attr(`width`,r.width+2*_I().state.padding).attr(`height`,r.height+2*_I().state.padding).attr(`rx`,_I().state.radius),n},`drawSimpleState`),Iji=U((e,t)=>{let n=U(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*_I().state.padding).text(t);n||r.attr(`dy`,_I().state.textHeight)},`addTspan`),r=e.append(`text`).attr(`x`,2*_I().state.padding).attr(`y`,_I().state.textHeight+1.3*_I().state.padding).attr(`font-size`,_I().state.fontSize).attr(`class`,`state-title`).text(t.descriptions[0]).node().getBBox(),i=r.height,a=e.append(`text`).attr(`x`,_I().state.padding).attr(`y`,i+_I().state.padding*.4+_I().state.dividerMargin+_I().state.textHeight).attr(`class`,`state-description`),o=!0,s=!0;t.descriptions.forEach(function(e){o||(n(a,e,s),s=!1),o=!1});let l=e.append(`line`).attr(`x1`,_I().state.padding).attr(`y1`,_I().state.padding+i+_I().state.dividerMargin/2).attr(`y2`,_I().state.padding+i+_I().state.dividerMargin/2).attr(`class`,`descr-divider`),u=a.node().getBBox(),d=Math.max(u.width,r.width);return l.attr(`x2`,d+3*_I().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,_I().state.padding).attr(`y`,_I().state.padding).attr(`width`,d+2*_I().state.padding).attr(`height`,u.height+i+2*_I().state.padding).attr(`rx`,_I().state.radius),e},`drawDescrState`),Lji=U((e,t,n)=>{let r=_I().state.padding,i=2*_I().state.padding,a=e.node().getBBox(),o=a.width,s=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,_I().state.titleShift).attr(`font-size`,_I().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,o);d===o&&(d+=i);let f,p=e.node().getBBox();t.doc,f=s-r,u>o&&(f=(o-d)/2+r),Math.abs(s-p.x)o&&(f=s-(u-o)/2);let m=1-_I().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+_I().state.textHeight+_I().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=o&&l.attr(`x`,s+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,_I().state.titleShift-_I().state.textHeight-_I().state.padding).attr(`width`,d).attr(`height`,_I().state.textHeight*3).attr(`rx`,_I().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,_I().state.titleShift-_I().state.textHeight-_I().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*_I().state.textHeight).attr(`rx`,_I().state.radius),e},`addTitleAndBox`),Rji=U(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,_I().state.sizeUnit+_I().state.miniPadding).attr(`cx`,_I().state.padding+_I().state.sizeUnit+_I().state.miniPadding).attr(`cy`,_I().state.padding+_I().state.sizeUnit+_I().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,_I().state.sizeUnit).attr(`cx`,_I().state.padding+_I().state.sizeUnit+2).attr(`cy`,_I().state.padding+_I().state.sizeUnit+2)),`drawEndState`),zji=U((e,t)=>{let n=_I().state.forkWidth,r=_I().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,_I().state.padding).attr(`y`,_I().state.padding)},`drawForkJoinState`),Bji=U((e,t,n,r)=>{let i=0,a=r.append(`text`);a.style(`text-anchor`,`start`),a.attr(`class`,`noteText`);let o=e.replace(/\r\n/g,`
    `);o=o.replace(/\n/g,`
    `);let s=o.split(oI.lineBreakRegex),l=1.25*_I().state.noteMargin;for(let e of s){let r=e.trim();if(r.length>0){let e=a.append(`tspan`);if(e.text(r),l===0){let t=e.node().getBBox();l+=t.height}i+=l,e.attr(`x`,t+_I().state.noteMargin),e.attr(`y`,n+i+1.25*_I().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},`_drawLongText`),Vji=U((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,_I().state.padding),{textWidth:r,textHeight:i}=Bji(e,0,0,t.append(`g`));return n.attr(`height`,i+2*_I().state.noteMargin),n.attr(`width`,r+_I().state.noteMargin*2),n},`drawNote`),Hji=U(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&Nji(i),t.type===`end`&&Rji(i),(t.type===`fork`||t.type===`join`)&&zji(i,t),t.type===`note`&&Vji(t.note.text,i),t.type===`divider`&&Pji(i),t.type==="default"&&t.descriptions.length===0&&Fji(i,t),t.type==="default"&&t.descriptions.length>0&&Iji(i,t);let a=i.node().getBBox();return r.width=a.width+2*_I().state.padding,r.height=a.height+2*_I().state.padding,r},`drawState`),Uji=0,Wji=U(function(e,t,n){let r=U(function(e){switch(e){case D3.relationType.AGGREGATION:return`aggregation`;case D3.relationType.EXTENSION:return`extension`;case D3.relationType.COMPOSITION:return`composition`;case D3.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);t.points=t.points.filter(e=>!Number.isNaN(e.y));let i=t.points,a=eS().x(function(e){return e.x}).y(function(e){return e.y}).curve(iS),o=e.append(`path`).attr(`d`,a(i)).attr(`id`,`edge`+Uji).attr(`class`,`transition`),s=``;if(_I().state.arrowMarkerAbsolute&&(s=$F(!0)),o.attr(`marker-end`,`url(`+s+`#`+r(D3.relationType.DEPENDENCY)+`End)`),n.title!==void 0){let r=e.append(`g`).attr(`class`,`stateLabel`),{x:i,y:a}=xL.calcLabelPosition(t.points),o=oI.getRows(n.title),s=0,l=[],u=0,d=0;for(let e=0;e<=o.length;e++){let t=r.append(`text`).attr(`text-anchor`,`middle`).text(o[e]).attr(`x`,i).attr(`y`,a+s),n=t.node().getBBox();u=Math.max(u,n.width),d=Math.min(d,n.x),W.info(n.x,i,a+s),s===0&&(s=t.node().getBBox().height,W.info(`Title height`,s,a)),l.push(t)}let f=s*o.length;if(o.length>1){let e=(o.length-1)*s*.5;l.forEach((t,n)=>t.attr(`y`,a+n*s-e)),f=s*o.length}let p=r.node().getBBox();r.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,i-u/2-_I().state.padding/2).attr(`y`,a-f/2-_I().state.padding/2-3.5).attr(`width`,u+_I().state.padding).attr(`height`,f+_I().state.padding),W.info(p)}Uji++},`drawEdge`),Gji={},Kji=U(function(){},`setConf`),qji=U(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),Jji=U(function(e,t,n,r){O3=_I().state;let i=_I().securityLevel,a;i===`sandbox`&&(a=DI(`#i`+t));let o=DI(i===`sandbox`?a.nodes()[0].contentDocument.body:`body`),s=i===`sandbox`?a.nodes()[0].contentDocument:document;W.debug(`Rendering diagram `+e);let l=o.select(`[id='${t}']`);qji(l),Xji(r.db.getRootDoc(),l.append(`g`).attr(`id`,t+`-root`),void 0,!1,o,s,r);let u=O3.padding,d=l.node().getBBox(),f=d.width+u*2,p=d.height+u*2,m=f*1.75;sI(l,p,m,O3.useMaxWidth),l.attr(`viewBox`,`${d.x-O3.padding} ${d.y-O3.padding} `+f+` `+p)},`draw`),Yji=U(e=>e?e.length*O3.fontSizeFactor:1,`getLabelWidth`),Xji=U((e,t,n,r,i,a,o)=>{let s=new bV({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):W.debug(`No Node `+e+`: `+JSON.stringify(s.node(e)))});let g=h.getBBox();s.edges().forEach(function(e){e!==void 0&&s.edge(e)!==void 0&&(W.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(s.edge(e))),Wji(t,s.edge(e),s.edge(e).relation))}),g=h.getBBox();let _={id:n||`root`,label:n||`root`,width:0,height:0};return _.width=g.width+2*O3.padding,_.height=g.height+2*O3.padding,W.debug(`Doc rendered`,_,s),_},`renderDoc`),Zji={parser:HAi,get db(){return new D3(1)},renderer:{setConf:Kji,draw:Jji},styles:Aji,init:U(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}})),$ji=l({diagram:()=>eMi}),eMi,tMi=o((()=>{jji(),Tq(),Dq(),DK(),ZK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),eMi={parser:HAi,get db(){return new D3(2)},renderer:wji,styles:Aji,init:U(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}})),nMi=l({diagram:()=>NMi});function rMi(e){let t=_I().journey,n=t.maxLabelWidth;P3=0;let r=60;Object.keys(N3).forEach(i=>{let a=N3[i].color,o={cx:20,cy:r,r:7,fill:a,stroke:`#000`,pos:N3[i].position};M3.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(i),l=s.node().getBoundingClientRect().width;s.remove();let u=[];if(l<=n)u=[i];else{let t=i.split(` `),r=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=r?`${r} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(r&&u.push(r),r=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(u.push(t.slice(0,-1)+`-`),t=r);r=t}}else r=t}),r&&u.push(r),s.remove()}u.forEach((n,i)=>{let a={x:40,y:r+7+i*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=M3.drawText(e,a).node().getBoundingClientRect().width;o>P3&&o>t.leftMargin-o&&(P3=o)}),r+=Math.max(20,u.length*20)})}var iMi,aMi,k3,oMi,A3,j3,sMi,cMi,lMi,uMi,dMi,fMi,pMi,mMi,hMi,gMi,_Mi,vMi,yMi,bMi,xMi,SMi,CMi,wMi,TMi,EMi,M3,DMi,N3,P3,F3,I3,OMi,L3,kMi,AMi,jMi,MMi,NMi,PMi=o((()=>{Cq(),ZK(),bI(),hN(),fN(),XI(),iMi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,11,12,14,16,17,18],n=[1,9],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,14],l={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,14:i,16:a,17:o,18:s},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:n,12:r,14:i,16:a,17:o,18:s},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin(`acc_title`),12;case 8:return this.popState(),`acc_title_value`;case 9:return this.begin(`acc_descr`),14;case 10:return this.popState(),`acc_descr_value`;case 11:this.begin(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 17;case 15:return 18;case 16:return 19;case 17:return`:`;case 18:return 6;case 19:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}})();function u(){this.yy={}}return U(u,`Parser`),u.prototype=l,l.Parser=u,new u})(),iMi.parser=iMi,aMi=iMi,k3=``,oMi=[],A3=[],j3=[],sMi=U(function(){oMi.length=0,A3.length=0,k3=``,j3.length=0,uI()},`clear`),cMi=U(function(e){k3=e,oMi.push(e)},`addSection`),lMi=U(function(){return oMi},`getSections`),uMi=U(function(){let e=mMi(),t=0;for(;!e&&t<100;)e=mMi(),t++;return A3.push(...j3),A3},`getTasks`),dMi=U(function(){let e=[];return A3.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},`updateActors`),fMi=U(function(e,t){let n=t.substr(1).split(`:`),r=0,i=[];n.length===1?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(`,`));let a=i.map(e=>e.trim()),o={section:k3,type:k3,people:a,task:e,score:r};j3.push(o)},`addTask`),pMi=U(function(e){let t={section:k3,type:k3,description:e,task:e,classes:[]};A3.push(t)},`addTaskOrg`),mMi=U(function(){let e=U(function(e){return j3[e].processed},`compileTask`),t=!0;for(let[n,r]of j3.entries())e(n),t=t&&r.processed;return t},`compileTasks`),hMi={getConfig:U(()=>_I().journey,`getConfig`),clear:sMi,setDiagramTitle:hI,getDiagramTitle:gI,setAccTitle:dI,getAccTitle:fI,setAccDescription:pI,getAccDescription:mI,addSection:cMi,getSections:lMi,getTasks:uMi,addTask:fMi,addTaskOrg:pMi,getActors:U(function(){return dMi()},`getActors`)},gMi=U(e=>`.label { font-family: ${e.fontFamily}; color: ${e.textColor}; } .mouth { stroke: #666; } line { stroke: ${e.textColor} } .legend { fill: ${e.textColor}; font-family: ${e.fontFamily}; } .label text { fill: #333; } .label { color: ${e.textColor} } .face { ${e.faceColor?`fill: ${e.faceColor}`:`fill: #FFF8DC`}; stroke: #999; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: 1px; } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${e.arrowheadColor}; } .edgePaths .path { stroke: ${e.lineColor}; stroke-width: 1.5px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; rect { opacity: 0.5; } text-align: center; } .cluster rect { } .cluster text { fill: ${e.titleColor}; } div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .task-type-0, .section-type-0 { ${e.fillType0?`fill: ${e.fillType0}`:``}; } .task-type-1, .section-type-1 { ${e.fillType0?`fill: ${e.fillType1}`:``}; } .task-type-2, .section-type-2 { ${e.fillType0?`fill: ${e.fillType2}`:``}; } .task-type-3, .section-type-3 { ${e.fillType0?`fill: ${e.fillType3}`:``}; } .task-type-4, .section-type-4 { ${e.fillType0?`fill: ${e.fillType4}`:``}; } .task-type-5, .section-type-5 { ${e.fillType0?`fill: ${e.fillType5}`:``}; } .task-type-6, .section-type-6 { ${e.fillType0?`fill: ${e.fillType6}`:``}; } .task-type-7, .section-type-7 { ${e.fillType0?`fill: ${e.fillType7}`:``}; } .actor-0 { ${e.actor0?`fill: ${e.actor0}`:``}; } .actor-1 { ${e.actor1?`fill: ${e.actor1}`:``}; } .actor-2 { ${e.actor2?`fill: ${e.actor2}`:``}; } .actor-3 { ${e.actor3?`fill: ${e.actor3}`:``}; } .actor-4 { ${e.actor4?`fill: ${e.actor4}`:``}; } .actor-5 { ${e.actor5?`fill: ${e.actor5}`:``}; } ${Sq()} `,`getStyles`),_Mi=U(function(e,t){return GK(e,t)},`drawRect`),vMi=U(function(e,t){let n=e.append(`circle`).attr(`cx`,t.cx).attr(`cy`,t.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),r=e.append(`g`);r.append(`circle`).attr(`cx`,t.cx-5).attr(`cy`,t.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),r.append(`circle`).attr(`cx`,t.cx+5).attr(`cy`,t.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function i(e){let n=Zx().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+2)+`)`)}U(i,`smile`);function a(e){let n=Zx().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+7)+`)`)}U(a,`sad`);function o(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,t.cx-5).attr(`y1`,t.cy+7).attr(`x2`,t.cx+5).attr(`y2`,t.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return U(o,`ambivalent`),t.score>3?i(r):t.score<3?a(r):o(r),n},`drawFace`),yMi=U(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),bMi=U(function(e,t){return qZr(e,t)},`drawText`),xMi=U(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}U(n,`genPoints`);let r=e.append(`polygon`);r.attr(`points`,n(t.x,t.y,50,20,7)),r.attr(`class`,`labelBox`),t.y+=t.labelMargin,t.x+=.5*t.labelMargin,bMi(e,t)},`drawLabel`),SMi=U(function(e,t,n){let r=e.append(`g`),i=JK();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,_Mi(r,i),EMi(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),CMi=-1,wMi=U(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);CMi++,a.append(`line`).attr(`id`,r+`-task`+CMi).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),vMi(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=JK();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,_Mi(a,o);let s=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color,r={cx:s,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position};yMi(a,r),s+=10}),EMi(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),TMi=U(function(e,t){KZr(e,t)},`drawBackgroundRect`),EMi=(function(){function e(e,t,n,i,a,o,s,l){r(t.append(`text`).attr(`x`,n+a/2).attr(`y`,i+o/2+5).style(`font-color`,l).style(`text-anchor`,`middle`).text(e),s)}U(e,`byText`);function t(e,t,n,i,a,o,s,l,u){let{taskFontSize:d,taskFontFamily:f}=l,p=e.split(//gi);for(let e=0;e{N3[e]={color:F3.actorColours[g%F3.actorColours.length],position:g},g++}),rMi(f),I3=F3.leftMargin+P3,L3.insert(0,0,I3,Object.keys(N3).length*50),jMi(f,p,0,t);let _=L3.getBounds();m&&f.append(`text`).text(m).attr(`x`,I3).attr(`font-size`,o).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,a).attr(`font-family`,s);let v=_.stopy-_.starty+2*F3.diagramMarginY,y=I3+_.stopx+2*F3.diagramMarginX;sI(f,v,y,F3.useMaxWidth),f.append(`line`).attr(`x1`,I3).attr(`y1`,F3.height*4).attr(`x2`,y-I3-4).attr(`y2`,F3.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#`+t+`-arrowhead)`);let b=m?70:0;f.attr(`viewBox`,`${_.startx} -25 ${y} ${v+b}`),f.attr(`preserveAspectRatio`,`xMinYMin meet`),f.attr(`height`,v+b+25)},`draw`),L3={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:U(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:U(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:U(function(e,t,n,r){let i=_I().journey,a=this,o=0;function s(s){return U(function(l){o++;let u=a.sequenceItems.length-o+1;a.updateVal(l,`starty`,t-u*i.boxMargin,Math.min),a.updateVal(l,`stopy`,r+u*i.boxMargin,Math.max),a.updateVal(L3.data,`startx`,e-u*i.boxMargin,Math.min),a.updateVal(L3.data,`stopx`,n+u*i.boxMargin,Math.max),s!==`activation`&&(a.updateVal(l,`startx`,e-u*i.boxMargin,Math.min),a.updateVal(l,`stopx`,n+u*i.boxMargin,Math.max),a.updateVal(L3.data,`starty`,t-u*i.boxMargin,Math.min),a.updateVal(L3.data,`stopy`,r+u*i.boxMargin,Math.max))},`updateItemBounds`)}U(s,`updateFn`),this.sequenceItems.forEach(s())},`updateBounds`),insert:U(function(e,t,n,r){let i=Math.min(e,n),a=Math.max(e,n),o=Math.min(t,r),s=Math.max(t,r);this.updateVal(L3.data,`startx`,i,Math.min),this.updateVal(L3.data,`starty`,o,Math.min),this.updateVal(L3.data,`stopx`,a,Math.max),this.updateVal(L3.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),bumpVerticalPos:U(function(e){this.verticalPos+=e,this.data.stopy=this.verticalPos},`bumpVerticalPos`),getVerticalPos:U(function(){return this.verticalPos},`getVerticalPos`),getBounds:U(function(){return this.data},`getBounds`)},kMi=F3.sectionFills,AMi=F3.sectionColours,jMi=U(function(e,t,n,r){let i=_I().journey,a=``,o=n+(i.height*2+i.diagramMarginY),s=0,l=`#CCC`,u=`black`,d=0;for(let[n,f]of t.entries()){if(a!==f.section){l=kMi[s%kMi.length],d=s%kMi.length,u=AMi[s%AMi.length];let r=0,o=f.section;for(let e=n;e(N3[t]&&(e[t]=N3[t]),e),{});f.x=n*i.taskMargin+n*i.width+I3,f.y=o,f.width=i.diagramMarginX,f.height=i.diagramMarginY,f.colour=u,f.fill=l,f.num=d,f.actors=p,M3.drawTask(e,f,i,r),L3.insert(f.x,f.y,f.x+f.width+i.taskMargin,450)}},`drawTasks`),MMi={setConf:DMi,draw:OMi},NMi={parser:aMi,db:hMi,renderer:MMi,styles:gMi,init:U(e=>{MMi.setConf(e.journey),hMi.clear()},`init`)}})),FMi=l({diagram:()=>INi});function IMi(e,t){e.each(function(){var e=DI(this),n=e.text().split(/(\s+|
    )/).reverse(),r,i=[],a=1.1,o=e.attr(`y`),s=parseFloat(e.attr(`dy`)),l=e.text(null).append(`tspan`).attr(`x`,0).attr(`y`,o).attr(`dy`,s+`em`);for(let s=0;st||r===`
    `)&&(i.pop(),l.text(i.join(` `).trim()),i=r===`
    `?[``]:[r],l=e.append(`tspan`).attr(`x`,0).attr(`y`,o).attr(`dy`,a+`em`).text(r))})}var LMi,RMi,zMi,R3,BMi,VMi,HMi,z3,B3,UMi,WMi,GMi,KMi,qMi,JMi,YMi,XMi,ZMi,QMi,$Mi,eNi,tNi,V3,nNi,rNi,iNi,aNi,oNi,sNi,cNi,lNi,uNi,dNi,fNi,pNi,mNi,hNi,gNi,H3,_Ni,vNi,yNi,bNi,U3,W3,xNi,SNi,CNi,wNi,TNi,ENi,DNi,ONi,kNi,ANi,jNi,MNi,NNi,PNi,FNi,INi,LNi=o((()=>{QI(),wL(),bI(),hN(),fN(),XI(),NN(),LMi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],r=[1,13],i=[1,14],a=[1,15],o=[1,16],s=[1,19],l=[1,20],u={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s]}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:r,17:i,19:a,20:o,21:17,22:18,23:s,24:l},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:r,17:i,19:a,20:o,21:17,22:18,23:s,24:l},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin(`acc_title`),15;case 10:return this.popState(),`acc_title_value`;case 11:return this.begin(`acc_descr`),17;case 12:return this.popState(),`acc_descr_value`;case 13:this.begin(`acc_descr_multiline`);break;case 14:this.popState();break;case 15:return`acc_descr_multiline_value`;case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}})();function d(){this.yy={}}return U(d,`Parser`),d.prototype=u,u.Parser=d,new d})(),LMi.parser=LMi,RMi=LMi,zMi={},dN(zMi,{addEvent:()=>ZMi,addSection:()=>qMi,addTask:()=>XMi,addTaskOrg:()=>QMi,clear:()=>WMi,default:()=>eNi,getCommonDb:()=>UMi,getDirection:()=>KMi,getSections:()=>JMi,getTasks:()=>YMi,setDirection:()=>GMi}),R3=``,BMi=0,VMi=`LR`,HMi=[],z3=[],B3=[],UMi=U(()=>krr,`getCommonDb`),WMi=U(function(){HMi.length=0,z3.length=0,R3=``,B3.length=0,VMi=`LR`,uI()},`clear`),GMi=U(function(e){VMi=e},`setDirection`),KMi=U(function(){return VMi},`getDirection`),qMi=U(function(e){R3=e,HMi.push(e)},`addSection`),JMi=U(function(){return HMi},`getSections`),YMi=U(function(){let e=$Mi(),t=0;for(;!e&&t<100;)e=$Mi(),t++;return z3.push(...B3),z3},`getTasks`),XMi=U(function(e,t,n){let r={id:BMi++,section:R3,type:R3,task:e,score:t||0,events:n?[n]:[]};B3.push(r)},`addTask`),ZMi=U(function(e){B3.find(e=>e.id===BMi-1).events.push(e)},`addEvent`),QMi=U(function(e){let t={section:R3,type:R3,description:e,task:e,classes:[]};z3.push(t)},`addTaskOrg`),$Mi=U(function(){let e=U(function(e){return B3[e].processed},`compileTask`),t=!0;for(let[n,r]of B3.entries())e(n),t=t&&r.processed;return t},`compileTasks`),eNi={clear:WMi,getCommonDb:UMi,getDirection:KMi,setDirection:GMi,addSection:qMi,getSections:JMi,getTasks:YMi,addTask:XMi,addTaskOrg:QMi,addEvent:ZMi},tNi=0,V3=U(function(e,t){let n=e.append(`rect`);return n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),n.attr(`rx`,t.rx),n.attr(`ry`,t.ry),t.class!==void 0&&n.attr(`class`,t.class),n},`drawRect`),nNi=U(function(e,t){let n=e.append(`circle`).attr(`cx`,t.cx).attr(`cy`,t.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),r=e.append(`g`);r.append(`circle`).attr(`cx`,t.cx-5).attr(`cy`,t.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),r.append(`circle`).attr(`cx`,t.cx+5).attr(`cy`,t.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function i(e){let n=Zx().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+2)+`)`)}U(i,`smile`);function a(e){let n=Zx().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+7)+`)`)}U(a,`sad`);function o(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,t.cx-5).attr(`y1`,t.cy+7).attr(`x2`,t.cx+5).attr(`y2`,t.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return U(o,`ambivalent`),t.score>3?i(r):t.score<3?a(r):o(r),n},`drawFace`),rNi=U(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),iNi=U(function(e,t){let n=t.text.replace(//gi,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class!==void 0&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),aNi=U(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}U(n,`genPoints`);let r=e.append(`polygon`);r.attr(`points`,n(t.x,t.y,50,20,7)),r.attr(`class`,`labelBox`),t.y+=t.labelMargin,t.x+=.5*t.labelMargin,iNi(e,t)},`drawLabel`),oNi=U(function(e,t,n){let r=e.append(`g`),i=dNi();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width,i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,V3(r,i),fNi(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),sNi=-1,cNi=U(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);sNi++,a.append(`line`).attr(`id`,r+`-task`+sNi).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),nNi(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=dNi();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,V3(a,o),fNi(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),lNi=U(function(e,t){V3(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:`rect`}).lower()},`drawBackgroundRect`),uNi=U(function(){return{x:0,y:0,fill:void 0,"text-anchor":`start`,width:100,height:100,textMargin:0,rx:0,ry:0}},`getTextObj`),dNi=U(function(){return{x:0,y:0,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),fNi=(function(){function e(e,t,n,i,a,o,s,l){r(t.append(`text`).attr(`x`,n+a/2).attr(`y`,i+o/2+5).style(`font-color`,l).style(`text-anchor`,`middle`).text(e),s)}U(e,`byText`);function t(e,t,n,i,a,o,s,l,u){let{taskFontSize:d,taskFontFamily:f}=l,p=e.split(//gi);for(let e=0;e0?`M0 ${t.height-5} v${-t.height+10} q0,-${o},${o},-${o} h${t.width-10} q${o},0,${o},${o} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;e.append(`path`).attr(`id`,r+`-node-`+tNi++).attr(`class`,`node-bkg node-`+t.type).attr(`d`,s),a!=null&&a.includes(`redux`)||e.append(`line`).attr(`class`,`node-line-`+n).attr(`x1`,0).attr(`y1`,t.height).attr(`x2`,t.width).attr(`y2`,t.height)},`defaultBkg`),H3={drawRect:V3,drawCircle:rNi,drawSection:oNi,drawText:iNi,drawLabel:aNi,drawTask:cNi,drawBackgroundRect:lNi,getTextObj:uNi,getNoteRect:dNi,initGraphics:pNi,drawNode:mNi,getVirtualNodeHeight:hNi},_Ni=U(function(e,t,n,r){var i,a,o;let s=_I(),{look:l,theme:u,themeVariables:d}=s,{useGradient:f,gradientStart:p,gradientStop:m}=d,h=((i=s.timeline)==null?void 0:i.leftMargin)??50;W.debug(`timeline`,r.db);let g=s.securityLevel,_;g===`sandbox`&&(_=DI(`#i`+t));let v=DI(g===`sandbox`?_.nodes()[0].contentDocument.body:`body`).select(`#`+t);v.append(`g`);let y=r.db.getTasks(),b=r.db.getCommonDb().getDiagramTitle();W.debug(`task`,y),H3.initGraphics(v,t);let x=r.db.getSections();W.debug(`sections`,x);let S=0,C=0,w=0,T=0,E=50+h,D=50;T=50;let O=0,k=!0;x.forEach(function(e){let t={number:O,descr:e,section:O,width:150,padding:20,maxHeight:S},n=H3.getVirtualNodeHeight(v,t,s);W.debug(`sectionHeight before draw`,n),S=Math.max(S,n+20)});let A=0,j=0;W.debug(`tasks.length`,y.length);for(let[e,t]of y.entries()){let n={number:e,descr:t,section:t.section,width:150,padding:20,maxHeight:C},r=H3.getVirtualNodeHeight(v,n,s);W.debug(`taskHeight before draw`,r),C=Math.max(C,r+20),A=Math.max(A,t.events.length);let i=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:150,padding:20,maxHeight:50};i+=H3.getVirtualNodeHeight(v,n,s)}t.events.length>0&&(i+=(t.events.length-1)*10),j=Math.max(j,i)}W.debug(`maxSectionHeight before draw`,S),W.debug(`maxTaskHeight before draw`,C),x&&x.length>0?x.forEach(e=>{let n=y.filter(t=>t.section===e),r={number:O,descr:e,section:O,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:S};W.debug(`sectionNode`,r);let i=v.append(`g`),a=H3.drawNode(i,r,O,s,t);W.debug(`sectionNode output`,a),i.attr(`transform`,`translate(${E}, ${T})`),D+=S+50,n.length>0&&vNi(v,n,O,E,D,C,s,A,j,S,!1,t),E+=200*Math.max(n.length,1),D=T,O++}):(k=!1,vNi(v,y,O,E,D,C,s,A,j,S,!0,t));let M=v.node().getBBox();if(W.debug(`bounds`,M),b&&v.append(`text`).text(b).attr(`x`,l===`neo`?M.x*2+h:M.width/2-h).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),w=k?S+C+150:C+100,v.append(`g`).attr(`class`,`lineWrapper`).append(`line`).attr(`x1`,h).attr(`y1`,w).attr(`x2`,M.width+3*h).attr(`y2`,w).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#${t}-arrowhead)`),l===`neo`&&f&&u!==`neutral`){let e=v.select(`defs`),t=(e.empty()?v.append(`defs`):e).append(`linearGradient`).attr(`id`,v.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,p).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,m).attr(`stop-opacity`,1)}cI(void 0,v,((a=s.timeline)==null?void 0:a.padding)??50,((o=s.timeline)==null?void 0:o.useMaxWidth)??!1)},`draw`),vNi=U(function(e,t,n,r,i,a,o,s,l,u,d,f){for(let s of t){var p;let t={descr:s.task,section:n,number:n,width:150,padding:20,maxHeight:a};W.debug(`taskNode`,t);let u=e.append(`g`).attr(`class`,`taskWrapper`),m=H3.drawNode(u,t,n,o,f).height;if(W.debug(`taskHeight after draw`,m),u.attr(`transform`,`translate(${r}, ${i})`),a=Math.max(a,m),s.events){let t=e.append(`g`).attr(`class`,`lineWrapper`),u=a;i+=100,u+=yNi(e,s.events,n,r,i,o,f),i-=100,t.append(`line`).attr(`x1`,r+95).attr(`y1`,i+a).attr(`x2`,r+95).attr(`y2`,i+a+100+l+100).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#${f}-arrowhead)`).attr(`stroke-dasharray`,`5,5`)}r+=200,d&&!((p=o.timeline)!=null&&p.disableMulticolor)&&n++}i-=10},`drawTasks`),yNi=U(function(e,t,n,r,i,a,o){let s=0,l=i;i+=100;for(let l of t){let t={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50};W.debug(`eventNode`,t);let u=e.append(`g`).attr(`class`,`eventWrapper`),d=H3.drawNode(u,t,n,a,o,!0).height;s+=d,u.attr(`transform`,`translate(${r}, ${i})`),i=i+10+d}return i=l,s},`drawEvents`),bNi={setConf:U(()=>{},`setConf`),draw:_Ni},U3=200,W3=5,xNi=U3+W3*2,SNi=U3+100,CNi=SNi+W3*2,wNi=10,TNi=0,ENi=20,DNi=20,ONi=30,kNi=50,ANi=U(function(e,t,n,r){var i,a,o,s;let l=_I(),u=((i=l.timeline)==null?void 0:i.leftMargin)??50;W.debug(`timeline`,r.db);let d=ZI(t);d.append(`g`);let f=r.db.getTasks(),p=r.db.getCommonDb().getDiagramTitle();W.debug(`task`,f),H3.initGraphics(d);let m=r.db.getSections();W.debug(`sections`,m);let h=0,g=0,_=50+u,v=50,y=v,b=_,x=xNi+DNi,S=CNi+kNi,C=b+x,w=0,T=m&&m.length>0,E=T?C:_+x,D=Math.max(50,x+S-W3*2);m.forEach(function(e){let t={number:w,descr:e,section:w,width:D,padding:W3,maxHeight:h},n=H3.getVirtualNodeHeight(d,t,l);W.debug(`sectionHeight before draw`,n),h=Math.max(h,n)});let O=0;W.debug(`tasks.length`,f.length);for(let[e,t]of f.entries()){let n={number:e,descr:t,section:t.section,width:U3,padding:W3,maxHeight:g},r=H3.getVirtualNodeHeight(d,n,l);W.debug(`taskHeight before draw`,r),g=Math.max(g,r);let i=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:SNi,padding:W3,maxHeight:50};i+=H3.getVirtualNodeHeight(d,n,l)}t.events.length>0&&(i+=(t.events.length-1)*wNi),O=Math.max(O,i)+TNi}W.debug(`maxSectionHeight before draw`,h),W.debug(`maxTaskHeight before draw`,g);let k=Math.max(g,O)+ONi;T?m.forEach(e=>{let t=f.filter(t=>t.section===e),n={number:w,descr:e,section:w,width:D,padding:W3,maxHeight:h};W.debug(`sectionNode`,n);let r=d.append(`g`),i=H3.drawNode(r,n,w,l);W.debug(`sectionNode output`,i);let a=E-x;r.attr(`transform`,`translate(${a}, ${v})`);let o=v+i.height+ENi;t.length>0&&jNi(d,t,w,E,o,g,l,k,!1);let s=t.length,u=i.height+ENi+k*Math.max(s,1)-(s>0?ONi*2:0);v+=u,w++}):jNi(d,f,w,E,v,g,l,k,!0);let A=(a=d.node())==null?void 0:a.getBBox();if(!A)throw Error(`bbox not found`);if(W.debug(`bounds`,A),p){var j;if(d.append(`text`).text(p).attr(`x`,A.width/2-u).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),A=(j=d.node())==null?void 0:j.getBBox(),!A)throw Error(`bbox not found`);W.debug(`bounds after title`,A)}let[M]=bL(l.fontSize),N=(M??16)*2,P=(M??16)*.5+20,F=d.append(`g`).attr(`class`,`lineWrapper`);F.append(`line`).attr(`x1`,E).attr(`y1`,y-N).attr(`x2`,E).attr(`y2`,A.y+A.height+P).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`),F.lower(),cI(void 0,d,((o=l.timeline)==null?void 0:o.padding)??50,((s=l.timeline)==null?void 0:s.useMaxWidth)??!1)},`draw`),jNi=U(function(e,t,n,r,i,a,o,s,l){for(let d of t){var u;let t={descr:d.task,section:n,number:n,width:U3,padding:W3,maxHeight:a};W.debug(`taskNode`,t);let f=e.append(`g`).attr(`class`,`taskWrapper`),p=H3.drawNode(f,t,n,o),m=p.height;W.debug(`taskHeight after draw`,m);let h=r-DNi-p.width;if(f.attr(`transform`,`translate(${h}, ${i})`),a=Math.max(a,m),d.events&&d.events.length>0){let t=i,a=r+kNi;MNi(e,d.events,n,r,a,t,o)}i+=s,l&&!((u=o.timeline)!=null&&u.disableMulticolor)&&n++}},`drawTasks`),MNi=U(function(e,t,n,r,i,a,o){let s=a;for(let a of t){let t={descr:a,section:n,number:n,width:SNi,padding:W3,maxHeight:0};W.debug(`eventNode`,t);let l=e.append(`g`).attr(`class`,`eventWrapper`),u=H3.drawNode(l,t,n,o).height;l.attr(`transform`,`translate(${i}, ${s})`);let d=e.append(`g`).attr(`class`,`lineWrapper`),f=s+u/2;d.append(`line`).attr(`x1`,r).attr(`y1`,f).attr(`x2`,i).attr(`y2`,f).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`).attr(`stroke-dasharray`,`5,5`),s=s+u+wNi}return s-a},`drawEvents`),NNi={setConf:U(()=>{},`setConf`),draw:ANi},PNi=U(e=>{var t;let{theme:n}=WF(),r=n==null?void 0:n.includes(`dark`),i=n==null?void 0:n.includes(`color`),a=((t=e.svgId)==null?void 0:t.replace(/^#/,``))??``,o=a?`url(#${a}-drop-shadow)`:e.dropShadow??`none`,s=``;for(let t=0;t{let t=``;for(let t=0;t{},`setConf`),draw:U((e,t,n,r)=>{var i,a;return((r==null||(i=r.db)==null||(a=i.getDirection)==null?void 0:a.call(i))??`LR`)===`TD`?NNi.draw(e,t,n,r):bNi.draw(e,t,n,r)},`draw`)},parser:RMi,styles:U(e=>{var t;let{theme:n}=WF(),r=n==null?void 0:n.includes(`redux`),i=n===`neutral`,a=((t=e.svgId)==null?void 0:t.replace(/^#/,``))??``,o=``;if(e.useGradient&&a&&e.THEME_COLOR_LIMIT&&!i)for(let t=0;t{G3=[];for(let e=0;e<256;++e)G3.push((e+256).toString(16).slice(1))}));function BNi(){if(!VNi){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);VNi=crypto.getRandomValues.bind(crypto)}return VNi(HNi)}var VNi,HNi,UNi=o((()=>{HNi=new Uint8Array(16)})),WNi,GNi,KNi=o((()=>{WNi=typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),GNi={randomUUID:WNi}}));function qNi(e,t,n){var r;if(GNi.randomUUID&&!t&&!e)return GNi.randomUUID();e=e||{};let i=e.random??((r=e.rng)==null?void 0:r.call(e))??BNi();if(i.length<16)throw Error(`Random bytes length must be >= 16`);if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=i[e];return t}return RNi(i)}var JNi=o((()=>{KNi(),UNi(),zNi()})),YNi=o((()=>{zNi(),UNi(),JNi()})),XNi=l({diagram:()=>aPi}),ZNi,QNi,$Ni,ePi,K3,tPi,nPi,rPi,iPi,aPi,oPi=o((()=>{Tq(),Dq(),DK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),YNi(),NN(),QNi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])}}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:n,9:22,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:u,7:d,10:23,11:f},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:s}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(m,[2,14],{7:h,11:g}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(m,[2,13],{7:h,11:g}),e(_,[2,11]),e(_,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};v.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:return e.getLogger().trace(`Found comment`,t.yytext),6;case 1:return 8;case 2:this.begin(`CLASS`);break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 6:return e.getLogger().trace(`SPACELINE`),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace(`end icon`),this.popState();break;case 10:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),19;case 11:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),19;case 12:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),19;case 13:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),19;case 14:return this.begin(`NODE`),19;case 15:return this.begin(`NODE`),19;case 16:return this.begin(`NODE`),19;case 17:return this.begin(`NODE`),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin(`NSTR2`);break;case 22:return`NODE_DESCR`;case 23:this.popState();break;case 24:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 25:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 28:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 29:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 30:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 31:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 32:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 33:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 35:return e.getLogger().trace(`Long description:`,t.yytext),20;case 36:return e.getLogger().trace(`Long description:`,t.yytext),20}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}})();function y(){this.yy={}}return U(y,`Parser`),y.prototype=v,v.Parser=y,new y})(),QNi.parser=QNi,$Ni=QNi,ePi=12,K3={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},tPi=(ZNi=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=K3,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level0?this.nodes[0]:null}addNode(e,t,n,r){var i,a;W.info(`addNode`,e,t,n,r);let o=!1;this.nodes.length===0?(this.baseLevel=e,e=0,o=!0):this.baseLevel!==void 0&&(e-=this.baseLevel,o=!1);let s=_I(),l=((i=s.mindmap)==null?void 0:i.padding)??FF.mindmap.padding;switch(r){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:l*=2}let u={id:this.count++,nodeId:QF(t,s),level:e,descr:QF(n,s),type:r,children:[],width:((a=s.mindmap)==null?void 0:a.maxNodeWidth)??FF.mindmap.maxNodeWidth,padding:l,isRoot:o},d=this.getParent(e);if(d)d.children.push(u),this.nodes.push(u);else if(o)this.nodes.push(u);else throw Error(`There can be only one root. No parent could be found for ("${u.descr}")`)}getType(e,t){switch(W.debug(`In get type`,e,t),e){case`[`:return this.nodeType.RECT;case`(`:return t===`)`?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case`((`:return this.nodeType.CIRCLE;case`)`:return this.nodeType.CLOUD;case`))`:return this.nodeType.BANG;case`{{`:return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=_I(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=QF(e.icon,t)),e.class&&(n.class=QF(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return`no-border`;case this.nodeType.RECT:return`rect`;case this.nodeType.ROUNDED_RECT:return`rounded-rect`;case this.nodeType.CIRCLE:return`circle`;case this.nodeType.CLOUD:return`cloud`;case this.nodeType.BANG:return`bang`;case this.nodeType.HEXAGON:return`hexgon`;default:return`no-border`}}assignSections(e,t){if(e.section=e.level===0?void 0:t,e.children)for(let[n,r]of e.children.entries()){let i=e.level===0?n%(ePi-1):t;this.assignSections(r,i)}}flattenNodes(e,t){let n=_I(),r=[`mindmap-node`];e.isRoot===!0?r.push(`section-root`,`section--1`):e.section!==void 0&&r.push(`section-${e.section}`),e.class&&r.push(e.class);let i=r.join(` `),a=U(e=>{var t;let r=(((t=n.theme)==null?void 0:t.toLowerCase())??``).includes(`redux`);switch(e){case K3.CIRCLE:return`mindmapCircle`;case K3.RECT:return`rect`;case K3.ROUNDED_RECT:return`rounded`;case K3.CLOUD:return`cloud`;case K3.BANG:return`bang`;case K3.HEXAGON:return`hexagon`;case K3.DEFAULT:return r?`rounded`:`defaultMindmapNode`;case K3.NO_BORDER:default:return`rect`}},`getShapeFromType`),o={id:e.id.toString(),domId:`node_`+e.id.toString(),label:e.descr,labelType:`markdown`,isGroup:!1,shape:a(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:i,cssStyles:[],look:n.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(o),e.children)for(let n of e.children)this.flattenNodes(n,t)}generateEdges(e,t){if(!e.children)return;let n=_I();for(let r of e.children){let i=`edge`;r.section!==void 0&&(i+=` section-edge-${r.section}`);let a=e.level+1;i+=` edge-depth-${a}`;let o={id:`edge_${e.id}_${r.id}`,start:e.id.toString(),end:r.id.toString(),type:`normal`,curve:`basis`,thickness:`normal`,look:n.look,classes:i,depth:e.level,section:r.section};t.push(o),this.generateEdges(r,t)}}getData(){let e=this.getMindmap(),t=_I(),n=rrr().layout!==void 0,r=t;if(n||(r.layout=`cose-bilkent`),!e)return{nodes:[],edges:[],config:r};W.debug(`getData: mindmapRoot`,e,t),this.assignSections(e);let i=[],a=[];this.flattenNodes(e,i),this.generateEdges(e,a),W.debug(`getData: processed ${i.length} nodes and ${a.length} edges`);let o=new Map;for(let e of i)o.set(e.id,{shape:e.shape,width:e.width,height:e.height,padding:e.padding});return{nodes:i,edges:a,config:r,rootNode:e,markers:[`point`],direction:`TB`,nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:`mindmap`,diagramId:`mindmap-`+qNi()}}getLogger(){return W}},U(ZNi,`MindmapDB`),ZNi),nPi={draw:U(async(e,t,n,r)=>{var i,a;W.debug(`Rendering mindmap diagram `+e);let o=r.db,s=o.getData(),l=wq(t,s.config.securityLevel);if(s.type=r.type,s.layoutAlgorithm=EK(s.config.layout,{fallback:`cose-bilkent`}),s.diagramId=t,!o.getMindmap())return;s.nodes.forEach(e=>{e.shape===`rounded`?(e.radius=15,e.taper=15,e.stroke=`none`,e.width=0,e.padding=15):e.shape===`circle`?e.padding=10:e.shape===`rect`?(e.width=0,e.padding=10):e.shape===`hexagon`&&(e.width=0,e.height=0)}),await TK(s,l);let{themeVariables:u}=WF(),{useGradient:d,gradientStart:f,gradientStop:p}=u;if(d&&f&&p){let e=l.attr(`id`),t=l.append(`defs`).append(`linearGradient`).attr(`id`,`${e}-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,f).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,p).attr(`stop-opacity`,1)}Eq(l,((i=s.config.mindmap)==null?void 0:i.padding)??FF.mindmap.padding,`mindmapDiagram`,((a=s.config.mindmap)==null?void 0:a.useMaxWidth)??FF.mindmap.useMaxWidth)},`draw`)},rPi=U(e=>{let{theme:t,look:n}=e,r=``;for(let t=0;t{let r=``;for(let i=0;i{let{theme:t}=e,n=e.svgId,r=e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${n}-drop-shadow)`):`none`;return` .edge { stroke-width: 3; } ${rPi(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${e.git0}; } .section-root text { fill: ${e.gitBranchLabel0}; } .section-root span { color: ${t!=null&&t.includes(`redux`)?e.nodeBorder:e.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .mindmap-node-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } [data-look="neo"].mindmap-node { filter: ${r}; } [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { fill: ${t!=null&&t.includes(`redux`)?e.mainBkg:e.git0}; } [data-look="neo"].mindmap-node.section-root .text-inner-tspan { fill: ${t!=null&&t.includes(`redux`)?e.nodeBorder:e[`cScaleLabel`+ +(t===`neutral`)]}; } ${e.useGradient&&n&&e.mainBkg?iPi(e.THEME_COLOR_LIMIT,n,e.mainBkg):``} `},`getStyles`)}})),sPi=l({diagram:()=>xPi}),cPi,lPi,q3,uPi,dPi,fPi,pPi,mPi,hPi,gPi,_Pi,J3,vPi,yPi,bPi,xPi,SPi=o((()=>{QI(),Cq(),RV(),zR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),NN(),cPi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},{6:n,9:22,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},{6:u,7:d,10:23,11:f},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:s}),e(p,[2,19]),e(p,[2,21],{15:30,24:m}),e(p,[2,22]),e(p,[2,23]),e(h,[2,25]),e(h,[2,26]),e(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},e(g,[2,14],{7:_,11:v}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,16],{15:37,24:m}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(h,[2,31]),{21:[1,39]},{22:[1,40]},e(g,[2,13],{7:_,11:v}),e(y,[2,11]),e(y,[2,12]),e(p,[2,15],{24:b}),e(h,[2,30]),{22:[1,41]},e(h,[2,27]),e(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:return this.pushState(`shapeData`),t.yytext=``,24;case 1:return this.pushState(`shapeDataStr`),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,`
    `),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace(`Found comment`,t.yytext),6;case 7:return 8;case 8:this.begin(`CLASS`);break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 12:return e.getLogger().trace(`SPACELINE`),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace(`end icon`),this.popState();break;case 16:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),20;case 17:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),20;case 18:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),20;case 19:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),20;case 20:return this.begin(`NODE`),20;case 21:return this.begin(`NODE`),20;case 22:return this.begin(`NODE`),20;case 23:return this.begin(`NODE`),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin(`NSTR2`);break;case 28:return`NODE_DESCR`;case 29:this.popState();break;case 30:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 31:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 35:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 36:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 37:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 41:return e.getLogger().trace(`Long description:`,t.yytext),21;case 42:return e.getLogger().trace(`Long description:`,t.yytext),21}},`anonymous`),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function S(){this.yy={}}return U(S,`Parser`),S.prototype=x,x.Parser=S,new S})(),cPi.parser=cPi,lPi=cPi,q3=[],uPi=[],dPi=0,fPi={},pPi=U(()=>{q3=[],uPi=[],dPi=0,fPi={}},`clear`),mPi=U(e=>{if(q3.length===0)return null;let t=q3[0].level,n=null;for(let e=q3.length-1;e>=0;e--)if(q3[e].level===t&&!n&&(n=q3[e]),q3[e].levelt.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:QF(n.label??``,r),labelType:`markdown`,isGroup:!1,ticket:n==null?void 0:n.ticket,priority:n==null?void 0:n.priority,assigned:n==null?void 0:n.assigned,icon:n==null?void 0:n.icon,shape:`kanbanItem`,level:n.level,rx:5,ry:5,cssStyles:[`text-align: left`]};t.push(i)}}return{nodes:t,edges:e,other:{},config:_I()}},`getData`),_Pi=U((e,t,n,r,i)=>{var a,o;let s=_I(),l=((a=s.mindmap)==null?void 0:a.padding)??FF.mindmap.padding;switch(r){case J3.ROUNDED_RECT:case J3.RECT:case J3.HEXAGON:l*=2}let u={id:QF(t,s)||`kbn`+dPi++,level:e,label:QF(n,s),width:((o=s.mindmap)==null?void 0:o.maxNodeWidth)??FF.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(i!==void 0){let e;e=i.includes(` `)?i+` `:`{ `+i+` }`;let t=LV(e,{schema:IV});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t!=null&&t.shape&&t.shape===`kanbanItem`&&(u.shape=t==null?void 0:t.shape),t!=null&&t.label&&(u.label=t==null?void 0:t.label),t!=null&&t.icon&&(u.icon=t==null?void 0:t.icon.toString()),t!=null&&t.assigned&&(u.assigned=t==null?void 0:t.assigned.toString()),t!=null&&t.ticket&&(u.ticket=t==null?void 0:t.ticket.toString()),t!=null&&t.priority&&(u.priority=t==null?void 0:t.priority)}let d=mPi(e);d?u.parentId=d.id||`kbn`+dPi++:uPi.push(u),q3.push(u)},`addNode`),J3={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},vPi={clear:pPi,addNode:_Pi,getSections:hPi,getData:gPi,nodeType:J3,getType:U((e,t)=>{switch(W.debug(`In get type`,e,t),e){case`[`:return J3.RECT;case`(`:return t===`)`?J3.ROUNDED_RECT:J3.CLOUD;case`((`:return J3.CIRCLE;case`)`:return J3.CLOUD;case`))`:return J3.BANG;case`{{`:return J3.HEXAGON;default:return J3.DEFAULT}},`getType`),setElementForId:U((e,t)=>{fPi[e]=t},`setElementForId`),decorateNode:U(e=>{if(!e)return;let t=_I(),n=q3[q3.length-1];e.icon&&(n.icon=QF(e.icon,t)),e.class&&(n.cssClasses=QF(e.class,t))},`decorateNode`),type2Str:U(e=>{switch(e){case J3.DEFAULT:return`no-border`;case J3.RECT:return`rect`;case J3.ROUNDED_RECT:return`rounded-rect`;case J3.CIRCLE:return`circle`;case J3.CLOUD:return`cloud`;case J3.BANG:return`bang`;case J3.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:U(()=>W,`getLogger`),getElementById:U(e=>fPi[e],`getElementById`)},yPi={draw:U(async(e,t,n,r)=>{var i,a;W.debug(`Rendering kanban diagram `+e);let o=r.db.getData(),s=_I();s.htmlLabels=!1;let l=ZI(t);for(let e of o.nodes)e.domId=`${t}-${e.id}`;let u=l.append(`g`);u.attr(`class`,`sections`);let d=l.append(`g`);d.attr(`class`,`items`);let f=o.nodes.filter(e=>e.isGroup),p=0,m=[],h=25;for(let e of f){var g,_;let t=(s==null||(g=s.kanban)==null?void 0:g.sectionWidth)||200;p+=1,e.x=t*p+(p-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+p;let n=await RR(u,e);h=Math.max(h,n==null||(_=n.labelBBox)==null?void 0:_.height),m.push(n)}let v=0;for(let e of f){var y;let t=m[v];v+=1;let n=(s==null||(y=s.kanban)==null?void 0:y.sectionWidth)||200,r=-n*3/2+h,i=r,a=o.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-15;let r=(await NR(d,t,{config:s})).node().getBBox();t.y=i+r.height/2,await IR(t),i=t.y+r.height/2+5}let l=t.cluster.select(`rect`),u=Math.max(i-r+30,50)+(h-25);l.attr(`height`,u)}cI(void 0,l,((i=s.mindmap)==null?void 0:i.padding)??FF.kanban.padding,((a=s.mindmap)==null?void 0:a.useMaxWidth)??FF.kanban.useMaxWidth)},`draw`)},bPi=U(e=>{let t=``;for(let t=0;te.darkMode?jN(t,n):AN(t,n),`adjuster`);for(let r=0;r` .edge { stroke-width: 3; } ${bPi(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${e.git0}; } .section-root text { fill: ${e.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .cluster-label, .label { color: ${e.textColor}; fill: ${e.textColor}; } .kanban-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } ${Sq()} `,`getStyles`)}}));function CPi(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}var wPi=o((()=>{}));function TPi(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}var EPi=o((()=>{}));function DPi(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}var OPi=o((()=>{})),kPi=o((()=>{wPi(),EPi(),OPi()}));function APi(e){return e.target.depth}function jPi(e){return e.depth}function MPi(e,t){return t-1-e.height}function NPi(e,t){return e.sourceLinks.length?e.depth:t-1}function PPi(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?TPi(e.sourceLinks,APi)-1:0}var FPi=o((()=>{kPi()}));function IPi(e){return function(){return e}}var LPi=o((()=>{}));function RPi(e,t){return BPi(e.source,t.source)||e.index-t.index}function zPi(e,t){return BPi(e.target,t.target)||e.index-t.index}function BPi(e,t){return e.y0-t.y0}function VPi(e){return e.value}function HPi(e){return e.index}function UPi(e){return e.nodes}function WPi(e){return e.links}function GPi(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function KPi({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function qPi(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=HPi,l=NPi,u,d,f=UPi,p=WPi,m=6;function h(){let e={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return g(e),_(e),v(e),y(e),S(e),KPi(e),e}h.update=function(e){return KPi(e),e},h.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:IPi(e),h):s},h.nodeAlign=function(e){return arguments.length?(l=typeof e==`function`?e:IPi(e),h):l},h.nodeSort=function(e){return arguments.length?(u=e,h):u},h.nodeWidth=function(e){return arguments.length?(i=+e,h):i},h.nodePadding=function(e){return arguments.length?(a=o=+e,h):a},h.nodes=function(e){return arguments.length?(f=typeof e==`function`?e:IPi(e),h):f},h.links=function(e){return arguments.length?(p=typeof e==`function`?e:IPi(e),h):p},h.linkSort=function(e){return arguments.length?(d=e,h):d},h.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],h):[n-e,r-t]},h.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],h):[[e,t],[n,r]]},h.iterations=function(e){return arguments.length?(m=+e,h):m};function g({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=GPi(n,t)),typeof i!=`object`&&(i=r.target=GPi(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(d!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(d),n.sort(d)}function _({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(DPi(t.sourceLinks,VPi),DPi(t.targetLinks,VPi)):t.fixedValue}function v({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function y({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function b({nodes:t}){let r=CPi(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(l.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(u)for(let e of o)e.sort(u);return o}function x(e){let n=TPi(e,e=>(r-t-(e.length-1)*o)/DPi(e,VPi));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;te.length)-1)),x(n);for(let e=0;e0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,O(e)}u===void 0&&i.sort(BPi),T(i,n)}}function w(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=j(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,O(e)}u===void 0&&i.sort(BPi),T(i,n)}}function T(e,n){let i=e.length>>1,a=e[i];D(e,a.y0-o,i-1,n),E(e,a.y1+o,i+1,n),D(e,r,e.length-1,n),E(e,t,0,n)}function E(e,t,n,r){for(;n1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function D(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function O({sourceLinks:e,targetLinks:t}){if(d===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(zPi);for(let{target:{targetLinks:t}}of e)t.sort(RPi)}}function k(e){if(d===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(zPi),n.sort(RPi)}function A(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function j(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return h}var JPi=o((()=>{kPi(),FPi(),LPi()}));function YPi(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function XPi(){return new YPi}var ZPi,QPi,Y3,$Pi,eFi=o((()=>{ZPi=Math.PI,QPi=2*ZPi,Y3=1e-6,$Pi=QPi-Y3,YPi.prototype=XPi.prototype={constructor:YPi,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,l=r-t,u=a-e,d=o-t,f=u*u+d*d;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(f>Y3){if(!(Math.abs(d*s-l*u)>Y3)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var p=n-a,m=r-o,h=s*s+l*l,g=p*p+m*m,_=Math.sqrt(h),v=Math.sqrt(f),y=i*Math.tan((ZPi-Math.acos((h+f-g)/(2*_*v)))/2),b=y/v,x=y/_;Math.abs(b-1)>Y3&&(this._+=`L`+(e+b*u)+`,`+(t+b*d)),this._+=`A`+i+`,`+i+`,0,0,`+ +(d*p>u*m)+`,`+(this._x1=e+x*s)+`,`+(this._y1=t+x*l)}}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),l=e+o,u=t+s,d=1^a,f=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+l+`,`+u:(Math.abs(this._x1-l)>Y3||Math.abs(this._y1-u)>Y3)&&(this._+=`L`+l+`,`+u),n&&(f<0&&(f=f%QPi+QPi),f>$Pi?this._+=`A`+n+`,`+n+`,0,1,`+d+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+d+`,`+(this._x1=l)+`,`+(this._y1=u):f>Y3&&(this._+=`A`+n+`,`+n+`,0,`+ +(f>=ZPi)+`,`+d+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}}})),tFi=o((()=>{eFi()}));function nFi(e){return function(){return e}}var rFi=o((()=>{}));function iFi(e){return e[0]}function aFi(e){return e[1]}var oFi=o((()=>{})),sFi,cFi=o((()=>{sFi=Array.prototype.slice}));function lFi(e){return e.source}function uFi(e){return e.target}function dFi(e){var t=lFi,n=uFi,r=iFi,i=aFi,a=null;function o(){var o,s=sFi.call(arguments),l=t.apply(this,s),u=n.apply(this,s);if(a||(a=o=XPi()),e(a,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:nFi(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:nFi(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function fFi(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function pFi(){return dFi(fFi)}var mFi=o((()=>{tFi(),cFi(),rFi(),oFi()})),hFi=o((()=>{tFi(),rFi(),mFi(),cFi()}));function gFi(e){return[e.source.x1,e.y0]}function _Fi(e){return[e.target.x0,e.y1]}function vFi(){return pFi().source(gFi).target(_Fi)}var yFi=o((()=>{hFi()})),bFi=o((()=>{JPi(),FPi(),yFi()})),xFi=l({diagram:()=>RFi}),SFi,CFi,wFi,TFi,X3,Z3,Q3,$3,EFi,DFi,OFi,kFi,AFi,jFi,MFi,NFi,PFi,FFi,IFi,LFi,RFi,zFi=o((()=>{bI(),hN(),fN(),XI(),bFi(),TFi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,9],n=[1,10],r=[1,5,10,12],i={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:`error`,4:`SANKEY`,5:`NEWLINE`,10:`EOF`,11:`field[source]`,12:`COMMA`,13:`field[target]`,14:`field[value]`,18:`DQUOTE`,19:`ESCAPED_TEXT`,20:`NON_ESCAPED_TEXT`},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1]}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:t,20:n},{1:[2,6],7:11,10:[1,12]},e(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(r,[2,8]),e(r,[2,9]),{19:[1,16]},e(r,[2,11]),{1:[2,1]},{1:[2,5]},e(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:t,20:n},{15:18,16:7,17:8,18:t,20:n},{18:[1,19]},e(n,[2,3]),{12:[1,20]},e(r,[2,10]),{15:21,16:7,17:8,18:t,20:n},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};i.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:return this.pushState(`csv`),4;case 1:return this.pushState(`csv`),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState(`escaped_text`),18;case 6:return 20;case 7:return this.popState(`escaped_text`),18;case 8:return 19}},`anonymous`),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}})();function a(){this.yy={}}return U(a,`Parser`),a.prototype=i,i.Parser=a,new a})(),TFi.parser=TFi,X3=TFi,Z3=[],Q3=[],$3=new Map,EFi=U(()=>{Z3=[],Q3=[],$3=new Map,uI()},`clear`),DFi=(SFi=class{constructor(e,t,n=0){this.source=e,this.target=t,this.value=n}},U(SFi,`SankeyLink`),SFi),OFi=U((e,t,n)=>{Z3.push(new DFi(e,t,n))},`addLink`),kFi=(CFi=class{constructor(e){this.ID=e}},U(CFi,`SankeyNode`),CFi),AFi={nodesMap:$3,getConfig:U(()=>_I().sankey,`getConfig`),getNodes:U(()=>Q3,`getNodes`),getLinks:U(()=>Z3,`getLinks`),getGraph:U(()=>({nodes:Q3.map(e=>({id:e.ID})),links:Z3.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),`getGraph`),addLink:OFi,findOrCreateNode:U(e=>{e=oI.sanitizeText(e,_I());let t=$3.get(e);return t===void 0&&(t=new kFi(e),$3.set(e,t),Q3.push(t)),t},`findOrCreateNode`),getAccTitle:fI,setAccTitle:dI,getAccDescription:mI,setAccDescription:pI,getDiagramTitle:gI,setDiagramTitle:hI,clear:EFi},jFi=(wFi=class e{static next(t){return new e(t+ ++e.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return`url(`+this.href+`)`}},U(wFi,`Uid`),wFi.count=0,wFi),MFi={left:jPi,right:MPi,center:PPi,justify:NPi},NFi=U(e=>{let t=0,n=0;for(let r of e){let e=r.value??0;e>t&&(t=e,n=r.layer??0)}return n},`findCentralNodeLayer`),PFi={draw:U(function(e,t,n,r){let{securityLevel:i,sankey:a}=_I(),o=Lrr.sankey,s;i===`sandbox`&&(s=DI(`#i`+t));let l=DI(i===`sandbox`?s.nodes()[0].contentDocument.body:`body`),u=i===`sandbox`?l.select(`[id="${t}"]`):DI(`[id="${t}"]`),d=(a==null?void 0:a.width)??o.width,f=(a==null?void 0:a.height)??o.width,p=(a==null?void 0:a.useMaxWidth)??o.useMaxWidth,m=(a==null?void 0:a.nodeAlignment)??o.nodeAlignment,h=(a==null?void 0:a.prefix)??o.prefix,g=(a==null?void 0:a.suffix)??o.suffix,_=(a==null?void 0:a.showValues)??o.showValues,v=(a==null?void 0:a.nodeWidth)??o.nodeWidth??10,y=(a==null?void 0:a.nodePadding)??o.nodePadding??12,b=(a==null?void 0:a.labelStyle)??o.labelStyle??`legacy`,x=(a==null?void 0:a.nodeColors)??{},S=r.db.getGraph(),C=MFi[m];qPi().nodeId(e=>e.id).nodeWidth(v).nodePadding(y+(_?15:0)).nodeAlign(C).extent([[0,0],[d,f]])(S);let w=NFi(S.nodes),T=MT(vur),E=U(e=>x[e]??T(e),`getNodeColor`);u.append(`g`).attr(`class`,`nodes`).selectAll(`.node`).data(S.nodes).join(`g`).attr(`class`,`node`).attr(`id`,e=>(e.uid=jFi.next(`node-`)).id).attr(`transform`,function(e){return`translate(`+e.x0+`,`+e.y0+`)`}).attr(`x`,e=>e.x0).attr(`y`,e=>e.y0).append(`rect`).attr(`height`,e=>e.y1-e.y0).attr(`width`,e=>e.x1-e.x0).attr(`fill`,e=>E(e.id));let D=U(({id:e,value:t})=>_?`${e} ${h}${Math.round(t*100)/100}${g}`:e,`getText`),O=U(e=>b===`outlined`?(e.layer??0)k.selectAll(e?`.${e}`:`text`).data(S.nodes).join(`text`).attr(`class`,e??null).attr(`x`,e=>O(e).x).attr(`y`,e=>(e.y1+e.y0)/2).attr(`dy`,`${_?`0`:`0.35`}em`).attr(`text-anchor`,e=>O(e).anchor).text(D),`appendLabel`);b===`outlined`?(A(`sankey-label-bg`),A(`sankey-label-fg`)):A();let j=u.append(`g`).attr(`class`,`links`).attr(`fill`,`none`).attr(`stroke-opacity`,.5).selectAll(`.link`).data(S.links).join(`g`).attr(`class`,`link`).style(`mix-blend-mode`,`multiply`),M=(a==null?void 0:a.linkColor)??`gradient`;if(M===`gradient`){let e=j.append(`linearGradient`).attr(`id`,e=>(e.uid=jFi.next(`linearGradient-`)).id).attr(`gradientUnits`,`userSpaceOnUse`).attr(`x1`,e=>e.source.x1).attr(`x2`,e=>e.target.x0);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,e=>E(e.source.id)),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,e=>E(e.target.id))}let N;switch(M){case`gradient`:N=U(e=>e.uid,`coloring`);break;case`source`:N=U(e=>E(e.source.id),`coloring`);break;case`target`:N=U(e=>E(e.target.id),`coloring`);break;default:N=M}j.append(`path`).attr(`d`,vFi()).attr(`stroke`,N).attr(`stroke-width`,e=>Math.max(1,e.width)),cI(void 0,u,0,p)},`draw`)},FFi=U(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,``).replaceAll(/([\n\r])+/g,` `).trim(),`prepareTextForParsing`),IFi=U(e=>`.label { font-family: ${e.fontFamily}; } .node-labels { font-family: ${e.fontFamily}; } /* Outlined label style - background stroke for better readability */ .sankey-label-bg { stroke: ${e.mainBkg||e.background||`#fff`}; stroke-width: 4px; stroke-linejoin: round; paint-order: stroke; } /* Foreground label text */ .sankey-label-fg { fill: ${e.textColor}; } /* Node styling */ .node rect { shape-rendering: crispEdges; } /* Link styling */ .link { fill: none; stroke-opacity: 0.5; mix-blend-mode: multiply; } `,`getStyles`),LFi=X3.parse.bind(X3),X3.parse=e=>LFi(FFi(e)),RFi={styles:IFi,parser:X3,db:AFi,renderer:PFi}})),BFi=l({diagram:()=>QFi}),VFi,HFi,UFi,WFi,GFi,KFi,qFi,JFi,YFi,XFi,ZFi,QFi,$Fi=o((()=>{Pq(),QI(),wL(),bI(),hN(),fN(),a4(),HFi=FF.packet,UFi=(VFi=class{constructor(){this.packet=[],this.setAccTitle=dI,this.getAccTitle=fI,this.setDiagramTitle=hI,this.getDiagramTitle=gI,this.getAccDescription=mI,this.setAccDescription=pI}getConfig(){let e=mL({...HFi,...WF().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){uI(),this.packet=[]}},U(VFi,`PacketDB`),VFi),WFi=1e4,GFi=U((e,t)=>{Nq(e,t);let n=-1,r=[],i=1,{bitsPerRow:a}=t.getConfig();for(let{start:o,end:s,bits:l,label:u}of e.blocks){if(o!==void 0&&s!==void 0&&s{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),qFi={parser:{yy:void 0},parse:U(async e=>{var t;let n=await n4(`packet`,e),r=(t=qFi.parser)==null?void 0:t.yy;if(!(r instanceof UFi))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);W.debug(n),GFi(n,r)},`parse`)},JFi=U((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),p=o+s,m=p*(d.length+1)-(f?0:o),h=l*u+2,g=ZI(t);g.attr(`viewBox`,`0 0 ${h} ${m}`),sI(g,m,h,a.useMaxWidth);for(let[e,t]of d.entries())YFi(g,t,e,a);g.append(`text`).text(f).attr(`x`,h/2).attr(`y`,m-p/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),YFi=U((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:l})=>{let u=e.append(`g`),d=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(u.append(`rect`).attr(`x`,t).attr(`y`,d).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),u.append(`text`).attr(`x`,t+n/2).attr(`y`,d+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!l)continue;let a=e.end===e.start,f=d-2;u.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,f).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||u.append(`text`).attr(`x`,t+n).attr(`y`,f).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),XFi={draw:JFi},ZFi={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},QFi={parser:qFi,get db(){return new UFi},renderer:XFi,styles:U(({packet:e}={})=>{let t=mL(ZFi,e);return` .packetByte { font-size: ${t.byteFontSize}; } .packetByte.start { fill: ${t.startByteColor}; } .packetByte.end { fill: ${t.endByteColor}; } .packetLabel { fill: ${t.labelColor}; font-size: ${t.labelFontSize}; } .packetTitle { fill: ${t.titleColor}; font-size: ${t.titleFontSize}; } .packetBlock { stroke: ${t.blockStrokeColor}; stroke-width: ${t.blockStrokeWidth}; fill: ${t.blockFillColor}; } `},`styles`)}})),eIi=l({diagram:()=>CIi});function tIi(e,t,n,r,i,a,o){let s=t.length,l=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let u=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=nIi(e,r,i,l);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,rIi(u,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,u.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}function nIi(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}function rIi(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}var e6,t6,aIi,n6,oIi,sIi,cIi,lIi,uIi,dIi,fIi,pIi,r6,mIi,hIi,gIi,_Ii,vIi,yIi,bIi,xIi,SIi,CIi,wIi=o((()=>{Pq(),QI(),wL(),bI(),hN(),fN(),a4(),e6={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},t6=32,aIi={axes:[],curves:[],options:e6},n6=structuredClone(aIi),oIi=FF.radar,sIi=U(()=>mL({...oIi,...WF().radar}),`getConfig`),cIi=U(()=>n6.axes,`getAxes`),lIi=U(()=>n6.curves,`getCurves`),uIi=U(()=>n6.options,`getOptions`),dIi=U(e=>{n6.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),fIi=U(e=>{n6.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:pIi(e.entries)}))},`setCurves`),pIi=U(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=cIi();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>{var n;return((n=e.axis)==null?void 0:n.$refText)===t.name});if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),r6={getAxes:cIi,getCurves:lIi,getOptions:uIi,setAxes:dIi,setCurves:fIi,setOptions:U(e=>{var t,n,r,i,a;let o=e.reduce((e,t)=>(e[t.name]=t,e),{});n6.options={showLegend:((t=o.showLegend)==null?void 0:t.value)??e6.showLegend,ticks:((n=o.ticks)==null?void 0:n.value)??e6.ticks,max:((r=o.max)==null?void 0:r.value)??e6.max,min:((i=o.min)==null?void 0:i.value)??e6.min,graticule:((a=o.graticule)==null?void 0:a.value)??e6.graticule},n6.options.ticks>t6&&(W.warn(`Radar diagram ticks (${n6.options.ticks}) exceeds maximum allowed (${t6}). Using ${t6} instead.`),n6.options.ticks=t6)},`setOptions`),getConfig:sIi,clear:U(()=>{uI(),n6=structuredClone(aIi)},`clear`),setAccTitle:dI,getAccTitle:fI,setDiagramTitle:hI,getDiagramTitle:gI,getAccDescription:mI,setAccDescription:pI},mIi=U(e=>{Nq(e,r6);let{axes:t,curves:n,options:r}=e;r6.setAxes(t),r6.setCurves(n),r6.setOptions(r)},`populate`),hIi={parse:U(async e=>{let t=await n4(`radar`,e);W.debug(t),mIi(t)},`parse`)},gIi=U((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),l=i.getConfig(),u=i.getDiagramTitle(),d=_Ii(ZI(t),l),f=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),p=s.min,m=Math.min(l.width,l.height)/2;vIi(d,a,m,s.ticks,s.graticule),yIi(d,a,m,l),tIi(d,a,o,p,f,s.graticule,l),iIi(d,o,s.showLegend,l),d.append(`text`).attr(`class`,`radarTitle`).text(u).attr(`x`,0).attr(`y`,-l.height/2-l.marginTop)},`draw`),_Ii=U((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return sI(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),vIi=U((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),yIi=U((e,t,n,r)=>{let i=t.length;for(let a=0;a.01?`start`:l<-.01?`end`:`middle`,f=u>.01?`hanging`:u<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*l+4*l).attr(`y`,n*r.axisLabelFactor*u+4*u).attr(`text-anchor`,d).attr(`dominant-baseline`,f).attr(`class`,`radarAxisLabel`)}},`drawAxes`),U(tIi,`drawCurves`),U(nIi,`relativeRadius`),U(rIi,`closedRoundCurve`),U(iIi,`drawLegend`),bIi={draw:gIi},xIi=U((e,t)=>{let n=``;for(let r=0;r{let t=mL(MF(),WF().themeVariables);return{themeVariables:t,radarOptions:mL(t.radar,e)}},`buildRadarStyleOptions`),CIi={parser:hIi,db:r6,renderer:bIi,styles:U(({radar:e}={})=>{let{themeVariables:t,radarOptions:n}=SIi(e);return` .radarTitle { font-size: ${t.fontSize}; color: ${t.titleColor}; dominant-baseline: hanging; text-anchor: middle; } .radarAxisLine { stroke: ${n.axisColor}; stroke-width: ${n.axisStrokeWidth}; } .radarAxisLabel { font-size: ${n.axisLabelFontSize}px; color: ${n.axisColor}; } .radarGraticule { fill: ${n.graticuleColor}; fill-opacity: ${n.graticuleOpacity}; stroke: ${n.graticuleColor}; stroke-width: ${n.graticuleStrokeWidth}; } .radarLegendText { text-anchor: start; font-size: ${n.legendFontSize}px; dominant-baseline: hanging; } ${xIi(t,n)} `},`styles`)}})),TIi=l({diagram:()=>dLi});function EIi(e){switch(W.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return W.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}function DIi(e){switch(W.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}function OIi(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}function kIi(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}function AIi(e){return e.includes(`==`)?`thick`:`normal`}function jIi(e){return e.includes(`.-`)?`dotted`:`solid`}function MIi(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}function NIi(e,t,n=0,r=0,i=8){var a,o,s,l,u,d,f;W.debug(`setBlockSizes abc95 (start)`,e.id,e==null||(a=e.size)==null?void 0:a.x,`block width =`,e==null?void 0:e.size,`siblingWidth`,n),e!=null&&(o=e.size)!=null&&o.width||(e.size={width:n,height:r,x:0,y:0});let p=0,m=0;if(((s=e.children)==null?void 0:s.length)>0){var h,g;for(let n of e.children)NIi(n,t,0,0,i);let a=uLi(e);p=a.width,m=a.height,W.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,p,m);for(let t of e.children)t.size&&(W.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${p} ${m} ${JSON.stringify(t.size)}`),t.size.width=p*(t.widthInColumns??1)+i*((t.widthInColumns??1)-1),t.size.height=m,t.size.x=0,t.size.y=0,W.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${p} maxHeight:${m}`));for(let n of e.children)NIi(n,t,p,m,i);let o=e.columns??-1,s=0;for(let t of e.children)s+=t.widthInColumns??1;let l=e.children.length;o>0&&o0?Math.min(e.children.length,o):e.children.length;if(t>0){var v;let n=(d-t*i-i)/t;W.debug(`abc95 (growing to fit) width`,e.id,d,(v=e.size)==null?void 0:v.width,n);for(let t of e.children)t.size&&(t.size.width=n)}}e.size={width:d,height:f,x:0,y:0}}W.debug(`setBlockSizes abc94 (done)`,e.id,e==null||(l=e.size)==null?void 0:l.x,e==null||(u=e.size)==null?void 0:u.width,e==null||(d=e.size)==null?void 0:d.y,e==null||(f=e.size)==null?void 0:f.height)}function PIi(e,t,n=8){var r,i,a,o,s,l;W.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e==null||(r=e.size)==null?void 0:r.x} y: ${e==null||(i=e.size)==null?void 0:i.y} width: ${e==null||(a=e.size)==null?void 0:a.width}`);let u=e.columns??-1;if(W.debug(`layoutBlocks columns abc95`,e.id,`=>`,u,e),e.children&&e.children.length>0){var d,f,p,m,h;let r=(e==null||(d=e.children[0])==null||(d=d.size)==null?void 0:d.width)??0,i=e.children.length*r+(e.children.length-1)*n;W.debug(`widthOfChildren 88`,i,`posX`);let a=new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=MIi(u,t),r=a.get(e)??0;n.size.height>r&&a.set(e,n.size.height);let i=(n==null?void 0:n.widthInColumns)??1;u>0&&(i=Math.min(i,u-t%u)),t+=i}}let o=new Map;{let e=0,t=[...a.keys()].sort((e,t)=>e-t);for(let r of t)o.set(r,e),e+=(a.get(r)??0)+n}let s=0;W.debug(`abc91 block?.size?.x`,e.id,e==null||(f=e.size)==null?void 0:f.x);let l=e!=null&&(p=e.size)!=null&&p.x?(e==null||(m=e.size)==null?void 0:m.x)+(-(e==null||(h=e.size)==null?void 0:h.width)/2||0):-n,x=0;for(let r of e.children){var g,_;let i=e;if(!r.size)continue;let{width:d,height:f}=r.size,{px:p,py:m}=MIi(u,s);if(m!=x){var v,y,b;x=m,l=e!=null&&(v=e.size)!=null&&v.x?(e==null||(y=e.size)==null?void 0:y.x)+(-(e==null||(b=e.size)==null?void 0:b.width)/2||0):-n,W.debug(`New row in layout for block`,e.id,` and child `,r.id,x)}if(W.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${s} (px, py) ${p},${m} (${i==null||(g=i.size)==null?void 0:g.x},${i==null||(_=i.size)==null?void 0:_.y}) parent: ${i.id} width: ${d}${n}`),i.size){let e=d/2;r.size.x=l+n+e,W.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${l} new startingPosX${r.size.x} ${e} padding=${n} width=${d} halfWidth=${e} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${d*((r==null?void 0:r.widthInColumns)??1)/2}`),l=r.size.x+e;let t=o.get(m)??0,s=a.get(m)??f;r.size.y=i.size.y-i.size.height/2+t+s/2+n,W.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${l}${n}${e}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${d*((r==null?void 0:r.widthInColumns)??1)/2}`)}r.children&&PIi(r,t,n);let h=(r==null?void 0:r.widthInColumns)??1;u>0&&(h=Math.min(h,u-s%u)),s+=h,W.debug(`abc88 columnsPos`,r,s)}}W.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e==null||(o=e.size)==null?void 0:o.x} y: ${e==null||(s=e.size)==null?void 0:s.y} width: ${e==null||(l=e.size)==null?void 0:l.width}`)}function FIi(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:l}=e.size;a-s/2r&&(r=a+s/2),o+l/2>i&&(i=o+l/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=FIi(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}function IIi(e){var t;let n=e.getBlock(`root`);if(!n)return;let r=((t=_I())==null||(t=t.block)==null?void 0:t.padding)??8;NIi(n,e,0,0,r),PIi(n,e,r),W.debug(`getBlocks`,JSON.stringify(n,null,2));let{minX:i,minY:a,maxX:o,maxY:s}=FIi(n),l=s-a;return{x:i,y:a,width:o-i,height:l}}function LIi(e,t,n=!1){var r,i;let a=e,o=`default`;((a==null||(r=a.classes)==null?void 0:r.length)||0)>0&&(o=((a==null?void 0:a.classes)??[]).join(` `)),o+=` flowchart-label`;let s=((a==null?void 0:a.classes)??[]).flatMap(e=>{var n;return((n=t.getClasses().get(e))==null?void 0:n.styles)??[]}),l=0,u=`rect`,d;switch(a.type){case`round`:l=5,u=`rect`;break;case`composite`:l=0,u=`composite`,d=0;break;case`square`:u=`rect`;break;case`diamond`:u=`question`;break;case`hexagon`:u=`hexagon`;break;case`block_arrow`:u=`block_arrow`;break;case`odd`:u=`rect_left_inv_arrow`;break;case`lean_right`:u=`lean_right`;break;case`lean_left`:u=`lean_left`;break;case`trapezoid`:u=`trapezoid`;break;case`inv_trapezoid`:u=`inv_trapezoid`;break;case`rect_left_inv_arrow`:u=`rect_left_inv_arrow`;break;case`circle`:u=`circle`;break;case`ellipse`:u=`ellipse`;break;case`stadium`:u=`stadium`;break;case`subroutine`:u=`subroutine`;break;case`cylinder`:u=`cylinder`;break;case`group`:u=`rect`;break;case`doublecircle`:u=`doublecircle`;break;default:u=`rect`}let f=Wdr((a==null?void 0:a.styles)??[]),p=a.label,m=a.size??{width:0,height:0,x:0,y:0},h=t.getDiagramId();return{labelStyle:f.labelStyle,shape:u,label:p,labelText:p,rx:l,ry:l,class:o,cssClasses:o,cssStyles:(a==null?void 0:a.styles)??[],cssCompiledStyles:s,style:f.style,id:a.id,domId:h?`${h}-${a.id}`:a.id,isGroup:!1,directions:a.directions,width:m.width||void 0,height:m.height||void 0,wrappingWidth:m.width||1/0,x:m.x,y:m.y,positioned:n,intersect:void 0,padding:d??((i=WF())==null||(i=i.block)==null?void 0:i.padding)??0,widthInColumns:a.widthInColumns??1}}async function RIi(e,t,n){var r;let i=LIi(t,n,!1);if(t.type===`group`)return;let a=await NR(e,i,{config:WF()}),o=((r=a.node())==null?void 0:r.getBBox())??{width:0,height:0},s=n.getBlock(i.id);s.size={width:o.width,height:o.height,x:0,y:0,node:a},n.setBlock(s),a.remove()}async function zIi(e,t,n){let r=LIi(t,n,!0);n.getBlock(r.id).type!==`space`&&(await NR(e,r,{config:WF()}),t.intersect=r==null?void 0:r.intersect,IR(r))}async function BIi(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await BIi(e,i.children,n,r)}async function VIi(e,t,n){await BIi(e,t,n,RIi)}async function HIi(e,t,n){await BIi(e,t,n,zIi)}async function UIi(e,t,n,r,i){let a=new bV({multigraph:!0,compound:!0});a.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),o=r.getBlock(n.end);if(t!=null&&t.size&&o!=null&&o.size){let r=t.size,s=o.size,l=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}],u=i?`${i}-${n.id}`:n.id,d=`${n.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${n.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;YR(e,{...n,id:u,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:d},{},`block`,a.node(n.start),a.node(n.end),i),n.label&&(await JR(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:d}),U_r({...n,x:l[1].x,y:l[1].y},{originalPath:l}))}}}var WIi,GIi,i6,KIi,qIi,JIi,YIi,XIi,ZIi,a6,QIi,$Ii,eLi,tLi,nLi,rLi,iLi,o6,aLi,oLi,sLi,cLi,lLi,uLi,dLi,fLi=o((()=>{Cq(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),Ldr(),NN(),XI(),xV(),WIi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],n=[1,7],r=[1,13],i=[1,14],a=[1,19],o=[1,16],s=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),l=r.edgeStrToThickness(a[s-1].edgeTypeStr),u=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:l,pattern:u,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let d=r.generateId();this.$={id:d,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:n,28:r,29:i,31:a,39:o,43:s,46:l}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:o,43:s,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(h,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},e(d,[2,27]),e(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},e(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:U(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return U(v,`Parser`),v.prototype=_,_.Parser=v,new v})(),WIi.parser=WIi,GIi=WIi,i6=new Map,KIi=[],qIi=new Map,JIi=`color`,YIi=`fill`,XIi=`bgFill`,ZIi=`,`,a6=new Map,QIi=``,$Ii=U(e=>oI.sanitizeText(e,_I()),`sanitizeText`),eLi=U(function(e,t=``){let n=a6.get(e);n||(n={id:e,styles:[],textStyles:[]},a6.set(e,n)),t!=null&&t.split(ZIi).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(JIi).exec(e)){let e=t.replace(YIi,XIi).replace(JIi,YIi);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),tLi=U(function(e,t=``){let n=i6.get(e);t!=null&&(n.styles=t.split(ZIi))},`addStyle2Node`),nLi=U(function(e,t){e.split(`,`).forEach(function(e){let n=i6.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},i6.set(t,n)}n.classes||(n.classes=[]),n.classes.push(t)})},`setCssClass`),rLi=U((e,t)=>{let n=e.flat(),r=[],i=n.find(e=>(e==null?void 0:e.type)===`column-setting`),a=(i==null?void 0:i.columns)??-1;for(let e of n)if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&W.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&(e.label=$Ii(e.label)),e.type===`classDef`)eLi(e.id,e.css);else if(e.type===`applyClass`)nLi(e.id,(e==null?void 0:e.styleClass)??``);else if(e.type===`applyStyles`)e!=null&&e.stylesStr&&tLi(e.id,e==null?void 0:e.stylesStr);else if(e.type===`column-setting`)t.columns=e.columns??-1;else if(e.type===`edge`){let t=(qIi.get(e.id)??0)+1;qIi.set(e.id,t),e.id=t+`-`+e.id,KIi.push(e)}else{e.label||(e.label=e.type===`composite`?``:e.id);let t=i6.get(e.id);if(t===void 0?i6.set(e.id,e):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&rLi(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n{W.debug(`Clear called`),uI(),o6={id:`root`,type:`composite`,children:[],columns:-1},i6=new Map([[`root`,o6]]),iLi=[],a6=new Map,KIi=[],qIi=new Map,QIi=``},`clear`),U(EIi,`typeStr2Type`),U(DIi,`edgeTypeStr2Type`),U(OIi,`edgeStrToEdgeData`),U(kIi,`edgeStrToEdgeStartData`),U(AIi,`edgeStrToThickness`),U(jIi,`edgeStrToPattern`),oLi=0,sLi={getConfig:U(()=>WF().block,`getConfig`),typeStr2Type:EIi,edgeTypeStr2Type:DIi,edgeStrToEdgeData:OIi,edgeStrToEdgeStartData:kIi,edgeStrToThickness:AIi,edgeStrToPattern:jIi,getLogger:U(()=>W,`getLogger`),getBlocksFlat:U(()=>[...i6.values()],`getBlocksFlat`),getBlocks:U(()=>iLi||[],`getBlocks`),getEdges:U(()=>KIi,`getEdges`),setHierarchy:U(e=>{o6.children=e,rLi(e,o6),iLi=o6.children},`setHierarchy`),getBlock:U(e=>i6.get(e),`getBlock`),setBlock:U(e=>{i6.set(e.id,e)},`setBlock`),getColumns:U(e=>{let t=i6.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:U(function(){return a6},`getClasses`),clear:aLi,generateId:U(()=>(oLi++,`id-`+Math.random().toString(36).substr(2,12)+`-`+oLi),`generateId`),setDiagramId:U(e=>{QIi=e},`setDiagramId`),getDiagramId:U(()=>QIi,`getDiagramId`)},cLi=U((e,t)=>{let n=e5n,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return ON(r,i,a,t)},`fade`),lLi=U(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span { color: ${e.titleColor}; } .label text,span { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: 1px; } .flowchart-label text { text-anchor: middle; } // .flowchart-label .text-outer-tspan { // text-anchor: middle; // } // .flowchart-label .text-inner-tspan { // text-anchor: start; // } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${e.arrowheadColor}; } .edgePaths .path { stroke: ${e.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; /* * This is for backward compatibility with existing code that didn't * add a \`

    \` around edge labels. * * TODO: We should probably remove this in a future release. */ p { margin: 0; padding: 0; display: inline; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${e.edgeLabelBackground}; } .node .cluster { // fill: ${cLi(e.mainBkg,.5)}; fill: ${cLi(e.clusterBkg,.5)}; stroke: ${cLi(e.clusterBorder,.2)}; box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; stroke-width: 1px; } .cluster text { fill: ${e.titleColor}; } .cluster span { color: ${e.titleColor}; } /* .cluster div { color: ${e.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } ${Sq()} `,`getStyles`),U(MIi,`calculateBlockPosition`),uLi=U(e=>{let t=0,n=0;for(let r of e.children){let{width:e,height:i,x:a,y:o}=r.size??{width:0,height:0,x:0,y:0};if(W.debug(`getMaxChildSize abc95 child:`,r.id,`width:`,e,`height:`,i,`x:`,a,`y:`,o,r.type),r.type===`space`)continue;let s=e/(r.widthInColumns??1);s>t&&(t=s),i>n&&(n=i)}return{width:t,height:n}},`getMaxChildSize`),U(NIi,`setBlockSizes`),U(PIi,`layoutBlocks`),U(FIi,`findBounds`),U(IIi,`layout`),U(LIi,`getNodeFromBlock`),U(RIi,`calculateBlockSize`),U(zIi,`insertBlockPositioned`),U(BIi,`performOperations`),U(VIi,`calculateBlockSizes`),U(HIi,`insertBlocks`),U(UIi,`insertEdges`),dLi={parser:GIi,db:sLi,renderer:{draw:U(async function(e,t,n,r){var i;let{securityLevel:a,block:o}=WF(),s=r.db;s.setDiagramId(t);let l;a===`sandbox`&&(l=DI(`#i`+t));let u=DI(a===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=a===`sandbox`?u.select(`[id="${t}"]`):DI(`[id="${t}"]`);$_r(d,[`point`,`circle`,`cross`],r.type,t);let f=s.getBlocks(),p=s.getBlocksFlat(),m=s.getEdges(),h=d.insert(`g`).attr(`class`,`block`);await VIi(h,f,s);let g=IIi(s);await HIi(h,f,s),await UIi(h,m,p,s,t);let _=(i=h.node())==null?void 0:i.getBBox(),v=_&&Number.isFinite(_.width)&&Number.isFinite(_.height)?_:g;if(v){let e=Math.max(1,Math.round(.125*(v.width/v.height))),t=v.height+e+10,n=v.width+10,{useMaxWidth:r}=o;sI(d,t,n,!!r),W.debug(`Here Bounds`,g,v),d.attr(`viewBox`,`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},`draw`),getClasses:U(function(e,t){return t.db.getClasses()},`getClasses`)},styles:lLi}})),pLi=l({diagram:()=>WLi});function mLi(e){return e.some(e=>xLi.test(e))}function hLi(e){for(let t of e){let e=SLi.exec(t);if(e!=null&&e.index&&e.index>0)return e.index}return 4}function gLi(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}function _Li(e){let t=e.split(` `),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e0){let n=e.substring(i).toLowerCase(),r=t==null?void 0:t.extensionIcons;return(r==null?void 0:r[n])??(r==null?void 0:r[n.slice(1)])}}function yLi(e,t){return e.includes(`:`)?e:e in c6.icons||!t?`${c6.prefix}:${e}`:`${t}:${e}`}function bLi(e,t){if(e.icon!==`none`){if(e.icon)return yLi(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=vLi(e.name,t);if(n===`none`)return;if(n)return yLi(n,t.defaultIconPack)}return`${c6.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}var xLi,SLi,CLi,wLi,TLi,ELi,DLi,s6,OLi,kLi,ALi,jLi,MLi,NLi,PLi,c6,FLi,ILi,LLi,RLi,zLi,BLi,VLi,HLi,ULi,WLi,GLi=o((()=>{z$r(),Pq(),QI(),lL(),wL(),bI(),hN(),fN(),a4(),xLi=/[─━│┃└┗├┣]/,SLi=/[└┗├┣]/,CLi=/[─━]/,wLi=/^[\s│┃]+$/,TLi=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,ELi=/^\s*%%/,DLi=` `,U(mLi,`isBoxDrawingFormat`),U(hLi,`inferSegmentWidth`),U(gLi,`remapErrorLines`),U(_Li,`preprocessBoxDrawing`),s6=new Mq(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),OLi=U(()=>{s6.reset(),uI()},`clear`),kLi=U(()=>s6.records.stack[0],`getRoot`),ALi=U(()=>s6.records.cnt,`getCount`),jLi=FF.treeView,MLi={clear:OLi,addNode:U((e,t,n,r,i,a)=>{for(;e<=s6.records.stack[s6.records.stack.length-1].level;)s6.records.stack.pop();let o={id:s6.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};s6.records.stack[s6.records.stack.length-1].children.push(o),s6.records.stack.push(o)},`addNode`),getRoot:kLi,getCount:ALi,getConfig:U(()=>mL(jLi,WF().treeView),`getConfig`),getAccTitle:fI,getAccDescription:mI,getDiagramTitle:gI,setAccDescription:pI,setAccTitle:dI,setDiagramTitle:hI},NLi=U(e=>{Nq(e,MLi);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,a=t.classAnnotation||void 0,o=t.iconAnnotation,s=o===void 0?void 0:o||`none`,l=t.descAnnotation||void 0,u=l?QF(l,WF()):void 0;MLi.addNode(e,n,i,a,s,u)}},`populate`),PLi={parse:U(async e=>{let{text:t,lineMap:n}=_Li(e);try{let e=await n4(`treeView`,t);W.debug(e),NLi(e)}catch(e){throw n.size>0&&e instanceof Error&&(e.message=gLi(e.message,n)),e}},`parse`)},c6={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:``},file:{body:``}}},U(vLi,`detectIcon`),U(yLi,`qualifyIcon`),U(bLi,`getNodeIcon`),sL([{name:c6.prefix,icons:c6}]),FLi=14,ILi=4,LLi=16,RLi=U(async(e,t)=>{let n=[],r=U(e=>{let i=bLi(e,t);i&&n.push({icon:i,node:e}),e.children.forEach(r)},`collect`);r(e);let i=await Promise.all(n.map(async({icon:e,node:t})=>({id:t.id,svg:await cL(e,{height:FLi,width:FLi})})));return new Map(i.map(({id:e,svg:t})=>[e,t]))},`resolveNodeIcons`),zLi=U((e,t,n,r,i,a)=>{var o;let s=r.append(`g`),l=`treeView-node-label`;n.nodeType===`directory`&&(l+=` treeView-node-dir`),n.cssClass&&(l+=` ${n.cssClass}`);let u=FLi+ILi,d=bLi(n,i),f=d!==void 0;d&&s.append(`g`).attr(`class`,`treeView-node-icon`).attr(`transform`,`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(n.id)??``);let p=s.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,l),{height:m,width:h}=p.node().getBBox(),g=m+i.paddingY*2,_=e+i.paddingX+(f?u:0);p.attr(`x`,_),p.attr(`y`,t+g/2);let v=_+h;return n.BBox={x:e,y:t,width:h+i.paddingX*2+(f?u:0),height:g},(o=n.cssClass)!=null&&o.split(/\s+/).includes(`highlight`)&&s.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,g-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:s,labelRightEdge:v,centerY:t+g/2}},`positionLabel`),BLi=U((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),VLi=U((e,t,n,r)=>{let i=0,a=0,o=[],s=U((e,t,n,s)=>{let l=s*(n.rowIndent+n.paddingX),u=zLi(l,i,t,e,n,r);o.push(u);let{height:d,width:f}=t.BBox;BLi(e,l-n.rowIndent,i+d/2,l,i+d/2,n.lineThickness),a=Math.max(a,l+f),i+=d},`drawNode`),l=U((t,r=0)=>{s(e,t,n,r),t.children.forEach(e=>{l(e,r+1)});let{x:i,y:a,height:o}=t.BBox;if(t.children.length){let{y:r,height:s}=t.children[t.children.length-1].BBox;BLi(e,i+n.paddingX,a+o,i+n.paddingX,r+s/2+n.lineThickness/2,n.lineThickness)}},`processNode`);l(t);let u=o.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...o.map(e=>e.labelRightEdge))+LLi;for(let t of u){let r=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();a=Math.max(a,e+r.width+n.paddingX)}}for(let e of o){var d;if((d=e.node.cssClass)!=null&&d.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=a-e.node.BBox.x+8;t.attr(`width`,n),a=Math.max(a,e.node.BBox.x+n+2)}}}return{totalHeight:i,totalWidth:a}},`drawTree`),HLi={draw:U(async(e,t,n,r)=>{W.debug(`Rendering treeView diagram `+e);let i=r.db,a=i.getRoot(),o=i.getConfig(),s=ZI(t),l=s.append(`g`);l.attr(`class`,`tree-view`);let{totalHeight:u,totalWidth:d}=VLi(l,a,o,await RLi(a,o));s.attr(`viewBox`,`-${o.lineThickness/2} 0 ${d} ${u}`),sI(s,u,d,o.useMaxWidth)},`draw`)},ULi={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},WLi={db:MLi,renderer:HLi,parser:PLi,styles:U(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=mL(ULi,e);return` .treeView-node-label { font-size: ${t}; fill: ${n}; white-space: pre; } .treeView-node-dir { font-weight: bold; } .treeView-node-line { stroke: ${r}; } .treeView-node-icon { color: ${i}; } .treeView-node-description { font-size: ${t}; fill: ${a}; font-style: italic; white-space: pre; } .treeView-highlight-bg { fill: ${o}; stroke: ${s}; stroke-width: 1; } `},`styles`)}})),KLi=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(n,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=28)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),l=n(5);function u(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,this.rect=n!=null&&t!=null?new a(t.x,t.y,n.width,n.height):new a}for(var d in u.prototype=Object.create(r.prototype),r)u[d]=r[d];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},u.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(7),s=n(3),l=n(1),u=n(13),d=n(12),f=n(11);function p(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var m in p.prototype=Object.create(r.prototype),r)p[m]=r[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(t.owner!=n.owner||t.owner!=this)throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null},p.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(t.owner==null||t.owner!=this)throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&d>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(u,1),r.target!=r.source&&r.target.edges.splice(d,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},p.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,l=0;ln&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new d(this.left,this.top))},p.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,l,d,f,p=this.nodes,m=p.length,h=0;ho&&(t=o),nl&&(r=l),ao&&(t=o),nl&&(r=l),a=this.nodes.length){var l=0;n.forEach(function(t){t.owner==e&&l++}),l==this.nodes.length&&(this.isConnected=!0)}}},e.exports=p}),(function(e,t,n){var r,i=n(1);function a(e){r=n(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(a==null||a.getGraphManager()!=this)throw`Source not in this graph mgr!`;if(o==null||o.getGraphManager()!=this)throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),n.source==null||n.target==null)throw`Edge source and/or target is null!`;if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(ia)return n[0]=s,n[1]=i,n[2]=v,n[3]=o,!1;if(ra?(n[0]=d,n[1]=f,w=!0):(n[0]=u,n[1]=l,w=!0):E===O&&(r>a?(n[0]=s,n[1]=l,w=!0):(n[0]=p,n[1]=f,w=!0)),-D===O?a>r?(n[2]=y,n[3]=b,T=!0):(n[2]=v,n[3]=_,T=!0):D===O&&(a>r?(n[2]=g,n[3]=_,T=!0):(n[2]=x,n[3]=b,T=!0)),w&&T)return!1;if(r>a?i>o?(k=this.getCardinalDirection(E,O,4),A=this.getCardinalDirection(D,O,2)):(k=this.getCardinalDirection(-E,O,3),A=this.getCardinalDirection(-D,O,1)):i>o?(k=this.getCardinalDirection(-E,O,1),A=this.getCardinalDirection(-D,O,3)):(k=this.getCardinalDirection(E,O,2),A=this.getCardinalDirection(D,O,4)),!w)switch(k){case 1:M=l,j=r+-h/O,n[0]=j,n[1]=M;break;case 2:j=p,M=i+m*O,n[0]=j,n[1]=M;break;case 3:M=f,j=r+h/O,n[0]=j,n[1]=M;break;case 4:j=d,M=i+-m*O,n[0]=j,n[1]=M}if(!T)switch(A){case 1:P=_,N=a+-C/O,n[2]=N,n[3]=P;break;case 2:N=x,P=o+S*O,n[2]=N,n[3]=P;break;case 3:P=b,N=a+C/O,n[2]=N,n[3]=P;break;case 4:N=y,P=o+-S*O,n[2]=N,n[3]=P}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,l=t.y,u=n.x,d=n.y,f=i.x,p=i.y,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;return g=l-o,v=a-s,b=s*o-a*l,_=p-d,y=u-f,x=f*d-u*p,S=g*y-_*v,S===0?null:(m=(v*x-y*b)/S,h=(_*b-g*x)/S,new r(m,h))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var d=(-l+Math.sqrt(l*l-4*s*u))/(2*s),f=(-l-Math.sqrt(l*l-4*s*u))/(2*s);return d>=0&&d<=1?[d]:f>=0&&f<=1?[f]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(u[0]);s.length>0&&t;){var d=s[0];s.splice(0,1),o.add(d);for(var f=d.getEdges(),a=0;a-1&&u.splice(g,1)}o=new Set,l=new Map}}return e},p.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(f,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&u.push(e),r.set(e,t)}})}n=n.concat(u),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},p.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=p}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(5);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(this.coolingFactor=e>a.ADAPTATION_LOWER_NODE_LIMIT?Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),l;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),l=new Set,n=0;nl||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(l=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>l||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=l.length||d>=l[0].length)){for(var f=0;fe}}]),e}()}),(function(e,t,n){function r(){}r.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t=Math.min(this.m,this.n);this.s=function(e){for(var t=[];e-->0;)t.push(0);return t}(Math.min(this.m+1,this.n)),this.U=function(e){return function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t}(this.n),i=function(e){for(var t=[];e-->0;)t.push(0);return t}(this.m),a=!0,o=!0,s=Math.min(this.m-1,this.n),l=Math.max(0,Math.min(this.n-2,this.m)),u=0;u=0;A--)if(this.s[A]!==0){for(var j=A+1;j=0;R--){if(function(e,t){return e&&t}(R0;){var ce=void 0,le=void 0;for(ce=D-2;ce>=-1&&ce!==-1;ce--)if(Math.abs(n[ce])<=se+oe*(Math.abs(this.s[ce])+Math.abs(this.s[ce+1]))){n[ce]=0;break}if(ce===D-2)le=4;else{var ue=void 0;for(ue=D-1;ue>=ce&&ue!==ce;ue--){var de=(ue===D?0:Math.abs(n[ue]))+(ue===ce+1?0:Math.abs(n[ue-1]));if(Math.abs(this.s[ue])<=se+oe*de){this.s[ue]=0;break}}ue===ce?le=3:ue===D-1?le=1:(le=2,ce=ue)}switch(ce++,le){case 1:var fe=n[D-2];n[D-2]=0;for(var pe=D-2;pe>=ce;pe--){var me=r.hypot(this.s[pe],fe),he=this.s[pe]/me,ge=fe/me;if(this.s[pe]=me,pe!==ce&&(fe=-ge*n[pe-1],n[pe-1]=he*n[pe-1]),o)for(var _e=0;_e=this.s[ce+1]);){var Ve=this.s[ce];if(this.s[ce]=this.s[ce+1],this.s[ce+1]=Ve,o&&ceMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(KLi()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(KLi()):n.coseBase=r(n.layoutBase)})(n,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),880:((e,t,n)=>{var r=n(551).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),578:((e,t,n)=>{var r=n(551).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),l=n(806),u=n(902),d=n(551).FDLayoutConstants,f=n(551).LayoutConstants,p=n(551).Point,m=n(551).PointD,h=n(551).DimensionD,g=n(551).Layout,_=n(551).Integer,v=n(551).IGeometry,y=n(551).LGraph,b=n(551).Transform,x=n(551).LinkedList;function S(){r.call(this),this.toBeTiled={},this.constraints={}}for(var C in S.prototype=Object.create(r.prototype),r)S[C]=r[C];S.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},S.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},S.prototype.newNode=function(e){return new o(this.graphManager,e)},S.prototype.newEdge=function(e){return new s(null,null,e)},S.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH<10?10:l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},S.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},S.prototype.layout=function(){return f.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},S.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(l.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return Object.keys(this.constraints).length>0&&(u.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},S.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0){if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.PURE_INCREMENTAL?d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0}this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.PURE_INCREMENTAL?d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},S.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var u=this.constraints.alignmentConstraint.vertical,n=0;n=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var f=new Map,p=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;f.has(t)?f.get(t).push(n):f.set(t,[n]),f.has(n)?f.get(n).push(t):f.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;p.has(r)?p.get(r).push(i):p.set(r,[i]),p.has(i)?p.get(i).push(r):p.set(i,[r])}});var m=function(e,t){var n=[],r=[],i=new x,a=new Set,o=0;return e.forEach(function(s,l){if(!a.has(l)){n[o]=[],r[o]=!1;var u=l;for(i.push(u),a.add(u),n[o].push(u);i.length!=0;)u=i.shift(),t.has(u)&&(r[o]=!0),e.get(u).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},h=m(f,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=h.components,this.fixedComponentsOnHorizontal=h.isFixed;var g=m(p,e.fixedNodesOnVertical);this.componentsOnVertical=g.components,this.fixedComponentsOnVertical=g.isFixed}}},S.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1)for(var s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(f.WORLD_CENTER_X-o.x/2,f.WORLD_CENTER_Y-o.y/2))},S.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);S.branchRadialLayout(t,null,0,359,0,r);var i=y.calculateBounds(e),a=new b;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var _=g[0];g.splice(0,1);var y=d.indexOf(_);y>=0&&d.splice(y,1),m--,f--}h=t==null?0:(d.indexOf(g[0])+1)%m;for(var b=Math.abs(r-n)/f,x=h;p!=f;x=++x%m){var C=d[x].getOtherEnd(e);if(C!=t){var w=(n+p*b)%360,T=(w+b)%360;S.branchRadialLayout(C,e,w,T,i+a,a),p++}}},S.maxDiagonalInTree=function(e){for(var t=_.MIN_VALUE,n=0;nt&&(t=r)}return t},S.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},S.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;ui?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},S.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},S.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},S.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null)this.toBeTiled[a.id]=!1;else if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},S.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rd&&(d=p.rect.height)}n+=d+e.verticalPadding}},S.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},S.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var u=a/i,d=o/i,f=(n-r)**2+4*(u+r)*(d+n)*i,p=(r-n+Math.sqrt(f))/(2*(u+r)),m;t?(m=Math.ceil(p),m==p&&m++):m=Math.floor(p);var h=m*(u+r)-r;return s>h&&(h=s),h+=r*2,h},S.prototype.tileNodesByFavoringDim=function(e,t,n){var r=l.TILING_PADDING_VERTICAL,i=l.TILING_PADDING_HORIZONTAL,a=l.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},u=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=u;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var d=0,f=0,p=0;p0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},S.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},S.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var l=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var f=i;f<=a;f++)u[0]+=this.grid[f][o-1].length+this.grid[f][o].length-1;if(a0)for(var f=o;f<=s;f++)u[3]+=this.grid[i-1][f].length+this.grid[i][f].length-1;for(var p=_.MAX_VALUE,m,h,g=0;g{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var a=0;r.forEach(function(e){t==`horizontal`?(p.set(e,l.has(e)?u[l.get(e)]:i.get(e)),a+=p.get(e)):(p.set(e,l.has(e)?d[l.get(e)]:i.get(e)),a+=p.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||p.set(e,a)})}else{var o=0;e.forEach(function(e){o+=t==`horizontal`?l.has(e)?u[l.get(e)]:i.get(e):l.has(e)?d[l.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){p.set(e,o)})}});for(var g=function(){var r=h.shift();e.get(r).forEach(function(e){if(p.get(e.id)o&&(o=y),bs&&(s=b)}}catch(e){m=!0,h=e}finally{try{!f&&g.return&&g.return()}finally{if(m)throw h}}var x=(r+o)/2-(a+s)/2,S=!0,C=!1,w=void 0;try{for(var T=e[Symbol.iterator](),E;!(S=(E=T.next()).done);S=!0){var D=E.value;p.set(D,p.get(D)+x)}}catch(e){C=!0,w=e}finally{try{!S&&T.return&&T.return()}finally{if(C)throw w}}})}return p},y=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?u[l.get(e.left)]-u[l.get(e.right)]>=0?t++:n++:d[l.get(e.top)]-d[l.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)t.fixedNodeConstraint.forEach(function(e,t){C[t]=[e.position.x,e.position.y],w[t]=[u[l.get(e.nodeId)],d[l.get(e.nodeId)]]}),T=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return D.has(e)})),o=void 0;o=a.size>0?u[l.get(a.values().next().value)]:_(i).x,n[t].forEach(function(t){C[e]=[o,d[l.get(t)]],w[e]=[u[l.get(t)],d[l.get(t)]],e++})},a=0;a0?u[l.get(i.values().next().value)]:_(n).y,o[t].forEach(function(t){C[e]=[u[l.get(t)],a],w[e]=[u[l.get(t)],d[l.get(t)]],e++})},f=0;fj&&(j=A[N].length,M=N);if(j0){var le={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:u[l.get(e.nodeId)],y:d[l.get(e.nodeId)]},r=e.position,i=g(r,n);le.x+=i.x,le.y+=i.y}),le.x/=t.fixedNodeConstraint.length,le.y/=t.fixedNodeConstraint.length,u.forEach(function(e,t){u[t]+=le.x}),d.forEach(function(e,t){d[t]+=le.y}),t.fixedNodeConstraint.forEach(function(e){u[l.get(e.nodeId)]=e.position.x,d[l.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var ue=t.alignmentConstraint.vertical,de=function(e){var t=new Set;ue[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return D.has(e)})),i=void 0;i=n.size>0?u[l.get(n.values().next().value)]:_(t).x,t.forEach(function(e){D.has(e)||(u[l.get(e)]=i)})},fe=0;fe0?d[l.get(n.values().next().value)]:_(t).y,t.forEach(function(e){D.has(e)||(d[l.get(e)]=i)})},he=0;he{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),JLi=s(((e,t,n)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(qLi()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(qLi()):n.cytoscapeFcose=r(n.coseBase)})(n,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n0&&u.merge(e)});for(var d=0;d1){u=s[0],d=u.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length0&&r.set(`dummy`+(r.size+1),m),h},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var l=!0,u=!1,d=void 0;try{for(var f=t.nodeIndexes[Symbol.iterator](),p;!(l=(p=f.next()).done);l=!0){var m=p.value,h=r(m,2),g=h[0],_=h[1],v=n.cy.getElementById(g);if(v){var y=v.boundingBox(),b=t.xCoords[_]-y.w/2,x=t.xCoords[_]+y.w/2,S=t.yCoords[_]-y.h/2,C=t.yCoords[_]+y.h/2;ba&&(a=x),Ss&&(s=C)}}}catch(e){u=!0,d=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw d}}var w=e.x-(a+i)/2,T=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+w}),t.yCoords=t.yCoords.map(function(e){return e+T})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,l=n.getRect().x+n.getRect().width,u=n.getRect().y,d=n.getRect().y+n.getRect().height;ra&&(a=l),us&&(s=d)});var E=e.x-(a+i)/2,D=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+E,n.getCenterY()+D)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),l=void 0,u=void 0,d=void 0,f=void 0,p=e.descendants().not(`:parent`),m=p.length,h=0;hl&&(i=l),ad&&(o=d),s{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,l=n(140).layoutBase.LayoutConstants,u=n(140).layoutBase.FDLayoutConstants,d=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,f=e.eles,p=f.nodes(),m=f.edges(),h=void 0,g=void 0,_=void 0,v={};e.randomize&&(h=t.nodeIndexes,g=t.xCoords,_=t.yCoords);var y=function(e){return typeof e==`function`},b=function(e,t){return y(e)?e(t):e},x=r.calcParentsWithoutChildren(n,f),S=function e(t,n,i,l){for(var u=n.length,d=0;d0){var C=void 0;C=i.getGraphManager().add(i.newGraph(),m),e(C,p,i,l)}}},C=function(t,n,r){for(var i=0,a=0,o=0;o0?i/a:y(e.idealEdgeLength)?50:e.idealEdgeLength,d.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,d.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH)},w=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(d.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(d.MAX_ITERATIONS=u.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(d.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(d.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(d.TILING_COMPARE_BY=e.tilingCompareBy),l.QUALITY=e.quality==`proof`?2:0,d.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,d.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!e.randomize,d.ANIMATE=u.ANIMATE=l.ANIMATE=e.animate,d.TILE=e.tile,d.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,d.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,d.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,d.PURE_INCREMENTAL=!e.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!1),e.step==`enforced`&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!1),e.step==`cose`&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!0),e.step==`all`&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!!e.randomize,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!0),d.TREE_REDUCTION_ON_INCREMENTAL=!(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint);var T=new i,E=T.newGraphManager();return S(E.addRoot(),r.getTopMostNodes(p),T,e),C(T,E,m),w(T,e),T.runLayout(),v}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n0){if(p){var m=o.getTopMostNodes(t.eles.nodes());if(u=o.connectComponents(n,t.eles,m),u.forEach(function(e){var t=e.boundingBox();d.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&u.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var h=n.collection();if(t.tile){var g=new Map,_=[],v=[],y=0,b={nodeIndexes:g,xCoords:_,yCoords:v},x=[];if(u.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){h.merge(e.nodes()[n]),t.isParent()||(b.nodeIndexes.set(e.nodes()[n].id(),y++),b.xCoords.push(e.nodes()[0].position().x),b.yCoords.push(e.nodes()[0].position().y))}),x.push(t))}),h.length>1){var S=h.boundingBox();d.push({x:S.x1+S.w/2,y:S.y1+S.h/2}),u.push(h),i.push(b);for(var C=x.length-1;C>=0;C--)u.splice(x[C],1),i.splice(x[C],1),d.splice(x[C],1)}}u.forEach(function(e,n){t.eles=e,a.push(l(t,i[n])),o.relocateComponent(d[n],a[n],t)})}else u.forEach(function(e,n){o.relocateComponent(d[n],i[n],t)});var w=new Set;if(u.length>1){var T=[],E=r.filter(function(e){return e.css(`display`)==`none`});u.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(E).length>0){var s={};s.edges=[],s.nodes=[];var l=void 0;e.nodes().not(E).forEach(function(e){if(t.quality==`draft`){if(!e.isParent())l=r.get(e.id()),s.nodes.push({x:i[n].xCoords[l]-e.boundingbox().w/2,y:i[n].yCoords[l]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var u=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:u.topLeftX,y:u.topLeftY,width:u.width,height:u.height})}}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var l=e.source(),u=e.target();if(l.css(`display`)!=`none`&&u.css(`display`)!=`none`){if(t.quality==`draft`){var d=r.get(l.id()),f=r.get(u.id()),p=[],m=[];if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);if(u.isParent()){var g=o.calcBoundingBox(u,i[n].xCoords,i[n].yCoords,r);m.push(g.topLeftX+g.width/2),m.push(g.topLeftY+g.height/2)}else m.push(i[n].xCoords[f]),m.push(i[n].yCoords[f]);s.edges.push({startX:p[0],startY:p[1],endX:m[0],endY:m[1]})}else a[n][l.id()]&&a[n][u.id()]&&s.edges.push({startX:a[n][l.id()].getCenterX(),startY:a[n][l.id()].getCenterY(),endX:a[n][u.id()].getCenterX(),endY:a[n][u.id()].getCenterY()})}}),s.nodes.length>0&&(T.push(s),w.add(n))}});var D=f.packComponents(T,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+D[t].dx}),r=e.yCoords.map(function(e){return e+D[t].dy});e.xCoords=n,e.yCoords=r});else{var O=0;w.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+D[O].dx,n.getCenterY()+D[O].dy)}),O++})}}}else{var k=t.eles.boundingBox();if(d.push({x:k.x1+k.w/2,y:k.y1+k.h/2}),t.randomize){var A=s(t);i.push(A)}t.quality=="default"||t.quality==`proof`?(a.push(l(t,i[0])),o.relocateComponent(d[0],a[0],t)):o.relocateComponent(d[0],i[0],t)}}var j=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??(r={x:e.position(`x`),y:e.position(`y`)}),{x:r.x,y:r.y}}var l=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(l={x:t.xCoords[n],y:t.yCoords[n]})}),l??(l={x:e.position(`x`),y:e.position(`y`)}),{x:l.x,y:l.y}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var M=o.calcParentsWithoutChildren(n,r),N=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(N),r.nodes().not(`:parent`).not(N).layoutPositions(e,t,j),M.length>0&&M.forEach(function(e){e.position(j(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),l=new Map,u=new Map,d=new Map,f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=[],b=void 0,x=1e8,S=1e-9,C=e.piTol,w=e.samplingType,T=e.nodeSeparation,E=void 0,D=function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var h=f[o],v=0;vd&&(d=g[S],p=S)}return p},k=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*b);for(var n=0;n=1)break;d=u}for(var g=0;g=1)break;d=u}for(var x=0;x0&&(r.isParent()?f[t].push(d.get(r.id())):f[t].push(r.id()))})});var ne=function(e){var n=u.get(e),r=void 0;l.get(e).forEach(function(i){r=t.getElementById(i).isParent()?d.get(i):i,f[n].push(r),f[u.get(r)].push(e)})},z=!0,re=!1,ie=void 0;try{for(var ae=l.keys()[Symbol.iterator](),oe;!(z=(oe=ae.next()).done);z=!0){var se=oe.value;ne(se)}}catch(e){re=!0,ie=e}finally{try{!z&&ae.return&&ae.return()}finally{if(re)throw ie}}b=u.size;var ce=void 0;if(b>2){E=b{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})})),YLi=l({diagram:()=>jRi});function XLi(e,t){if(e===0)return t();let n=Math.random,r=e>>>0;Math.random=function(){r=r+1831565813>>>0;let e=r;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=n}}function ZLi(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`service`,id:e.id,icon:e.icon,label:e.title,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-service`})})}function QLi(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`junction`,id:e.id,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-junction`})})}function $Li(e,t){t.nodes().map(t=>{let n=f6(t);n.type!==`group`&&(n.x=t.position().x,n.y=t.position().y,e.getElementById(n.id).attr(`transform`,`translate(`+(n.x||0)+`,`+(n.y||0)+`)`))})}function eRi(e,t){e.forEach(e=>{t.add({group:`nodes`,data:{type:`group`,id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:`node-group`})})}function tRi(e,t){e.forEach(e=>{let{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:o,lhsDir:s,rhsDir:l,rhsGroup:u,title:d}=e,f=dRi(e.lhsDir,e.rhsDir)?`segments`:`straight`,p={id:`${n}-${r}`,label:d,source:n,sourceDir:s,sourceArrow:i,sourceGroup:a,sourceEndpoint:s===`L`?`0 50%`:s===`R`?`100% 50%`:s===`T`?`50% 0`:`50% 100%`,target:r,targetDir:l,targetArrow:o,targetGroup:u,targetEndpoint:l===`L`?`0 50%`:l===`R`?`100% 50%`:l===`T`?`50% 0`:`50% 100%`};t.add({group:`edges`,data:p,classes:f})})}function nRi(e,t,n,r=[]){let i=U((e,t)=>{let r=new Map;for(let[i,a]of e.entries()){let e=`${i}`,o=0,s=[...a.entries()];if(s.length===1)r.set(e,s[0][1]);else for(let i=0;i{let n=new Map,r=new Map;return t.forEach(([t,i],a)=>{var o;let s=((o=e.getNode(a))==null?void 0:o.in)??`default`,l=n.get(i)??new Map;n.has(i)||n.set(i,l);let u=r.get(t)??new Map;r.has(t)||r.set(t,u);for(let e of[l,u]){let t=e.get(s)??[];e.has(s)||e.set(s,t),t.push(a)}}),{horiz:[...i(n,`horizontal`).values()].filter(e=>e.length>1),vert:[...i(r,`vertical`).values()].filter(e=>e.length>1)}}).reduce(([e,t],{horiz:n,vert:r})=>[[...e,...n],[...t,...r]],[[],[]]),s=new Set;r.forEach(e=>e.members.forEach(e=>s.add(e)));let l=U(e=>e.filter(e=>!e.some(e=>s.has(e))),`dropOverlapping`),u=l(a),d=l(o);return r.forEach(e=>{e.members.length<2||(e.direction===`row`?u.push([...e.members]):d.push([...e.members]))}),{horizontal:u,vertical:d}}function rRi(e,t,n=[]){let r=[],i=t.getConfigField(`iconSize`),a=t.getConfigField(`idealEdgeLengthMultiplier`),o=a*i,s=new Set;n.forEach(e=>{for(let t=0;t`${e[0]},${e[1]}`,`posToStr`),u=U(e=>e.split(`,`).map(e=>parseInt(e)),`strToPos`);return e.forEach(e=>{let t=new Map([...e.entries()].map(([e,t])=>[l(t),e])),n=[l([0,0])],o={},d={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let e=n.shift();if(e){o[e]=1;let f=t.get(e);if(f){let p=u(e);Object.entries(d).forEach(([e,u])=>{let d=l([p[0]+u[0],p[1]+u[1]]),m=t.get(d);if(m&&!o[d]){if(n.push(d),s.has(`${f}|${m}`))return;r.push({[sRi[e]]:m,[sRi[lRi(e)]]:f,gap:a*i})}})}}}}),r}function iRi(e,t,n,r,i,{spatialMaps:a,groupAlignments:o}){return new Promise(s=>{let l=DI(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),u=CK({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`straight`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`edge[label]`,style:{label:`data(label)`}},{selector:`edge.segments`,style:{"curve-style":`segments`,"segment-weights":`0`,"segment-distances":[.5],"edge-distances":`endpoints`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`node`,style:{"compound-sizing-wrt-labels":`include`}},{selector:`node[label]`,style:{"text-valign":`bottom`,"text-halign":`center`,"font-size":`${i.getConfigField(`fontSize`)}px`}},{selector:`.node-service`,style:{label:`data(label)`,width:`data(width)`,height:`data(height)`}},{selector:`.node-junction`,style:{width:`data(width)`,height:`data(height)`}},{selector:`.node-group`,style:{padding:`${i.getConfigField(`padding`)}px`}}],layout:{name:`grid`,boundingBox:{x1:0,x2:100,y1:0,y2:100}}});l.remove(),eRi(n,u),ZLi(e,u,i),QLi(t,u,i),tRi(r,u);let d=i.getLayoutHints(),f=nRi(i,a,o,d),p=rRi(a,i,d),m=i.getConfigField(`iconSize`),h=i.getConfigField(`idealEdgeLengthMultiplier`)*m,g=.5*m,_=i.getConfigField(`edgeElasticity`),v=i.getConfigField(`seed`),y=u.layout({name:`fcose`,quality:`proof`,randomize:i.getConfigField(`randomize`),nodeSeparation:i.getConfigField(`nodeSeparation`),numIter:i.getConfigField(`numIter`),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){let[t,n]=e.connectedNodes(),{parent:r}=f6(t),{parent:i}=f6(n);return r===i?h:g},edgeElasticity(e){let[t,n]=e.connectedNodes(),{parent:r}=f6(t),{parent:i}=f6(n);return r===i?_:.001},alignmentConstraint:f,relativePlacementConstraint:p});y.one(`layoutstop`,()=>{function e(e,t,n,r){let i,a,{x:o,y:s}=e,{x:l,y:u}=t;a=(r-s+(o-n)*(s-u)/(o-l))/Math.sqrt(1+((s-u)/(o-l))**2),i=Math.sqrt((r-s)**2+(n-o)**2-a**2);let d=Math.sqrt((l-o)**2+(u-s)**2);i/=d;let f=(l-o)*(r-s)-(u-s)*(n-o);switch(!0){case f>=0:f=1;break;case f<0:f=-1}let p=(l-o)*(n-o)+(u-s)*(r-s);switch(!0){case p>=0:p=1;break;case p<0:p=-1}return a=Math.abs(a)*f,i*=p,{distances:a,weights:i}}U(e,`getSegmentWeights`),u.startBatch();for(let n of Object.values(u.edges())){var t;if((t=n.data)!=null&&t.call(n)){let{x:t,y:r}=n.source().position(),{x:i,y:a}=n.target().position();if(t!==i&&r!==a){let t=n.sourceEndpoint(),r=n.targetEndpoint(),{sourceDir:i}=xRi(n),[a,o]=d6(i)?[t.x,r.y]:[r.x,t.y],{weights:s,distances:l}=e(t,r,a,o);n.style(`segment-distances`,l),n.style(`segment-weights`,s)}}}u.endBatch(),XLi(v,()=>y.run())});try{XLi(v,()=>y.run())}catch(e){throw e instanceof RangeError&&e.message.includes(`Invalid array length`)?Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):e}u.ready(e=>{W.info(`Ready`,e),s(u)})})}var aRi,oRi,sRi,cRi,l6,lRi,uRi,u6,d6,dRi,fRi,pRi,mRi,hRi,gRi,_Ri,vRi,yRi,bRi,xRi,f6,SRi,CRi,wRi,TRi,ERi,p6,m6,DRi,ORi,kRi,ARi,jRi,MRi=o((()=>{Pq(),QI(),JL(),lL(),wL(),bI(),hN(),fN(),a4(),WXr(),aRi=d(JLi(),1),XI(),sRi={L:`left`,R:`right`,T:`top`,B:`bottom`},cRi={L:U(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:U(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:U(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:U(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},l6={L:U((e,t)=>e-t+2,`L`),R:U((e,t)=>e-2,`R`),T:U((e,t)=>e-t+2,`T`),B:U((e,t)=>e-2,`B`)},lRi=U(function(e){return u6(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),uRi=U(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),u6=U(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),d6=U(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),dRi=U(function(e,t){let n=u6(e)&&d6(t),r=d6(e)&&u6(t);return n||r},`isArchitectureDirectionXY`),fRi=U(function(e){let t=e[0],n=e[1],r=u6(t)&&d6(n),i=d6(t)&&u6(n);return r||i},`isArchitecturePairXY`),pRi=U(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),mRi=U(function(e,t){let n=`${e}${t}`;return pRi(n)?n:void 0},`getArchitectureDirectionPair`),hRi=U(function([e,t],n){let r=n[0],i=n[1];return u6(r)?d6(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:u6(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),gRi=U(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),_Ri=U(function(e,t){return dRi(e,t)?`bend`:u6(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),vRi=U(function(e){return e.type===`service`},`isArchitectureService`),yRi=U(function(e){return e.type===`junction`},`isArchitectureJunction`),bRi=U((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),xRi=U(e=>e.data(),`edgeData`),f6=U(e=>e.data(),`nodeData`),SRi=FF.architecture,CRi=(oRi=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=dI,this.getAccTitle=fI,this.setDiagramTitle=hI,this.getDiagramTitle=gI,this.getAccDescription=mI,this.setAccDescription=pI,this.clear()}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,uI()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(vRi)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(yRi)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:l}){if(!uRi(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!uRi(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=this.nodes.get(e).in,d=this.nodes.get(t).in;if(o&&u&&d&&u==d)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&u&&d&&u==d)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:l};this.edges.push(f);let p=this.nodes.get(e),m=this.nodes.get(t);p&&m&&(p.edges.push(this.edges[this.edges.length-1]),m.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let n=new Map,r=new Map;for(let[i,a]of this.nodes.entries()){let o=new Map;for(let r of a.edges){var e,t;let a=(e=this.getNode(r.lhsId))==null?void 0:e.in,s=(t=this.getNode(r.rhsId))==null?void 0:t.in;if(a&&s&&a!==s){let e=_Ri(r.lhsDir,r.rhsDir);e!==`bend`&&n.set(bRi(a,s),e)}if(r.lhsId===i){let e=mRi(r.lhsDir,r.rhsDir);e&&o.set(e,r.rhsId)}else{let e=mRi(r.rhsDir,r.lhsDir);e&&o.set(e,r.lhsId)}}r.set(i,o)}let i=new Set,a=new Set(r.keys()),o=U(e=>{let t=new Map([[e,[0,0]]]),n=[e];for(;n.length>0;){let e=n.shift();if(e){i.add(e),a.delete(e);let o=r.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=t.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[l,u]=s;o.forEach((e,r)=>{i.has(e)||(t.set(e,hRi([l,u],r)),n.push(e))})}}return t},`BFS`),s=[];for(;a.size>0;){let e=a.values().next().value;s.push(o(e))}this.dataStructures={adjList:r,spatialMaps:s,groupAlignments:n}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return mL({...SRi,...WF().architecture})}getConfigField(e){return this.getConfig()[e]}},U(oRi,`ArchitectureDB`),oRi),wRi=U((e,t)=>{var n;Nq(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),(n=e.alignments)==null||n.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),TRi={parser:{yy:void 0},parse:U(async e=>{var t;let n=await n4(`architecture`,e);W.debug(n);let r=(t=TRi.parser)==null?void 0:t.yy;if(!(r instanceof CRi))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);wRi(n,r)},`parse`)},ERi=U(e=>` .edge { stroke-width: ${e.archEdgeWidth}; stroke: ${e.archEdgeColor}; fill: none; } .arrow { fill: ${e.archEdgeArrowColor}; } .node-bkg { fill: none; stroke: ${e.archGroupBorderColor}; stroke-width: ${e.archGroupBorderWidth}; stroke-dasharray: 8; } .node-icon-text { display: flex; align-items: center; } .node-icon-text > div { color: #fff; margin: 1px; height: fit-content; text-align: center; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; } `,`getStyles`),U(XLi,`withSeededRandom`),p6=U(e=>`${e}`,`wrapIcon`),m6={prefix:`mermaid-architecture`,height:80,width:80,icons:{database:{body:p6(``)},server:{body:p6(``)},disk:{body:p6(``)},internet:{body:p6(``)},cloud:{body:p6(``)},unknown:ddr,blank:{body:p6(``)}}},DRi=U(async function(e,t,n,r){let i=n.getConfigField(`padding`),a=n.getConfigField(`iconSize`),o=a/2,s=a/6,l=s/2;await Promise.all(t.edges().map(async t=>{var a,u;let{source:d,sourceDir:f,sourceArrow:p,sourceGroup:m,target:h,targetDir:g,targetArrow:_,targetGroup:v,label:y}=xRi(t),{x:b,y:x}=t[0].sourceEndpoint(),{x:S,y:C}=t[0].midpoint(),{x:w,y:T}=t[0].targetEndpoint(),E=i+4;if(m&&(u6(f)?b+=f===`L`?-E:E:x+=f===`T`?-E:E+18),v&&(u6(g)?w+=g===`L`?-E:E:T+=g===`T`?-E:E+18),!m&&((a=n.getNode(d))==null?void 0:a.type)===`junction`&&(u6(f)?b+=f===`L`?o:-o:x+=f===`T`?o:-o),!v&&((u=n.getNode(h))==null?void 0:u.type)===`junction`&&(u6(g)?w+=g===`L`?o:-o:T+=g===`T`?o:-o),t[0]._private.rscratch){let t=e.insert(`g`);if(t.insert(`path`).attr(`d`,`M ${b},${x} L ${S},${C} L${w},${T} `).attr(`class`,`edge`).attr(`id`,`${r}-${CL(d,h,{prefix:`L`})}`),p){let e=u6(f)?l6[f](b,s):b-l,n=d6(f)?l6[f](x,s):x-l;t.insert(`polygon`).attr(`points`,cRi[f](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(_){let e=u6(g)?l6[g](w,s):w-l,n=d6(g)?l6[g](T,s):T-l;t.insert(`polygon`).attr(`points`,cRi[g](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(y){let e=dRi(f,g)?`XY`:u6(f)?`X`:`Y`,n=0;n=e===`X`?Math.abs(b-w):e===`Y`?Math.abs(x-T)/1.5:Math.abs(b-w)/2;let r=t.append(`g`);if(await qL(r,y,{useHtmlLabels:!1,width:n,classes:`architecture-service-label`},_I()),r.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e===`X`)r.attr(`transform`,`translate(`+S+`, `+C+`)`);else if(e===`Y`)r.attr(`transform`,`translate(`+S+`, `+C+`) rotate(-90)`);else if(e===`XY`){let e=mRi(f,g);if(e&&fRi(e)){let t=r.node().getBoundingClientRect(),[n,i]=gRi(e);r.attr(`dominant-baseline`,`auto`).attr(`transform`,`rotate(${-1*n*i*45})`);let a=r.node().getBoundingClientRect();r.attr(`transform`,` translate(${S}, ${C-t.height/2}) translate(${n*a.width/2}, ${i*a.height/2}) rotate(${-1*n*i*45}, 0, ${t.height/2}) `)}}}}}))},`drawEdges`),ORi=U(async function(e,t,n,r){let i=n.getConfigField(`padding`)*.75,a=n.getConfigField(`fontSize`),o=n.getConfigField(`iconSize`)/2;await Promise.all(t.nodes().map(async t=>{let s=f6(t);if(s.type===`group`){let{h:l,w:u,x1:d,y1:f}=t.boundingBox(),p=e.append(`rect`);p.attr(`id`,`${r}-group-${s.id}`).attr(`x`,d+o).attr(`y`,f+o).attr(`width`,u).attr(`height`,l).attr(`class`,`node-bkg`);let m=e.append(`g`),h=d,g=f;if(s.icon){let e=m.append(`g`);e.html(`${await cL(s.icon,{height:i,width:i,fallbackPrefix:m6.prefix})}`),e.attr(`transform`,`translate(`+(h+o+1)+`, `+(g+o+1)+`)`),h+=i,g+=a/2-1-2}if(s.label){let e=m.append(`g`);await qL(e,s.label,{useHtmlLabels:!1,width:u,classes:`architecture-service-label`},_I()),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`start`).attr(`text-anchor`,`start`),e.attr(`transform`,`translate(`+(h+o+4)+`, `+(g+o+2)+`)`)}n.setElementForId(s.id,p)}}))},`drawGroups`),kRi=U(async function(e,t,n,r){let i=_I();for(let a of n){let n=t.append(`g`),o=e.getConfigField(`iconSize`);if(a.title){let e=n.append(`g`);await qL(e,a.title,{useHtmlLabels:!1,width:o*1.5,classes:`architecture-service-label`},i),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e.attr(`transform`,`translate(`+o/2+`, `+o+`)`)}let s=n.append(`g`);if(a.icon)s.html(`${await cL(a.icon,{height:o,width:o,fallbackPrefix:m6.prefix})}`);else if(a.iconText){s.html(`${await cL(`blank`,{height:o,width:o,fallbackPrefix:m6.prefix})}`);let e=s.append(`g`).append(`foreignObject`).attr(`width`,o).attr(`height`,o).append(`div`).attr(`class`,`node-icon-text`).attr(`style`,`height: ${o}px;`).append(`div`).html(QF(a.iconText,i)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue(`font-size`).replace(/\D/g,``))??16;e.attr(`style`,`-webkit-line-clamp: ${Math.floor((o-2)/t)};`)}else s.append(`path`).attr(`class`,`node-bkg`).attr(`id`,`${r}-node-${a.id}`).attr(`d`,`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);n.attr(`id`,`${r}-service-${a.id}`).attr(`class`,`architecture-service`);let{width:l,height:u}=n.node().getBBox();a.width=l,a.height=u,e.setElementForId(a.id,n)}return 0},`drawServices`),ARi=U(function(e,t,n,r){n.forEach(n=>{let i=t.append(`g`),a=e.getConfigField(`iconSize`);i.append(`g`).append(`rect`).attr(`id`,`${r}-node-${n.id}`).attr(`fill-opacity`,`0`).attr(`width`,a).attr(`height`,a),i.attr(`class`,`architecture-junction`);let{width:o,height:s}=i._groups[0][0].getBBox();i.width=o,i.height=s,e.setElementForId(n.id,i)})},`drawJunctions`),sL([{name:m6.prefix,icons:m6}]),CK.use(aRi.default),U(ZLi,`addServices`),U(QLi,`addJunctions`),U($Li,`positionNodes`),U(eRi,`addGroups`),U(tRi,`addEdges`),U(nRi,`getAlignments`),U(rRi,`getRelativeConstraints`),U(iRi,`layoutArchitecture`),jRi={parser:TRi,get db(){return new CRi},renderer:{draw:U(async(e,t,n,r)=>{let i=r.db;i.setDiagramId(t);let a=i.getServices(),o=i.getJunctions(),s=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),d=ZI(t),f=d.append(`g`);f.attr(`class`,`architecture-edges`);let p=d.append(`g`);p.attr(`class`,`architecture-services`);let m=d.append(`g`);m.attr(`class`,`architecture-groups`),await kRi(i,p,a,t),ARi(i,p,o,t);let h=await iRi(a,o,s,l,i,u);await DRi(f,h,i,t),await ORi(m,h,i,t),$Li(i,h),cI(void 0,d,i.getConfigField(`padding`),i.getConfigField(`useMaxWidth`))},`draw`)},styles:ERi}})),NRi=l({diagram:()=>Ezi});function PRi(){vzi={}}function FRi(){let e=yzi,{ast:t}=vzi,n=LRi();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((r,i)=>{let a=WRi(r,t.dataEntities,n);e=izi(e,{$kind:lzi,index:i,frame:r,textProps:a});let o;ZRi(r)?(W.debug(`source frame`,r.sourceFrames),o=t.frames.filter(e=>r.sourceFrames.some(t=>t.$refText===e.name)),o.forEach(t=>{e=izi(e,{$kind:dzi,index:i,frame:r,sourceFrame:t})})):e=izi(e,{$kind:dzi,index:i,frame:r})}),e={...e,sortedSwimlanesArray:JRi(e.swimlanes)},e}function IRi(e){vzi.ast=e}function LRi(){return h6}function RRi(e){let t=e.split(`.`);if(t.length===2)return t[0]}function zRi(e){let t=e.split(`.`);return t.length===2?t[1]:e}function BRi(e,t){if(t&&t.length!==0)return Object.values(e).find(e=>e.namespace===t)}function VRi(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}function HRi(e,t){let n=RRi(e.entityIdentifier),r=BRi(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||h6.labelUiAutomation}:n?{index:VRi(t,0,100),label:h6.labelUiAutomationPrefix+n}:{index:0,label:h6.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||h6.labelCommandReadModel}:n?{index:VRi(t,100,200),label:h6.labelCommandReadModelPrefix+n}:{index:100,label:h6.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||h6.labelEvents}:n?{index:VRi(t,200,300),label:h6.labelEventsPrefix+n}:{index:200,label:h6.labelEvents}}}function URi(e){let{themeVariables:t}=WF();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}function WRi(e,t,n){let r=WF(),i=QF(zRi(e.entityIdentifier)??``,r),a,o={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
    `},s=`${_L(i,n.textMaxWidth,o)}`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf(`{`)+1),a=a.substring(0,a.lastIndexOf(`}`)-1),a=QF(a,r),a=_L(a,n.textMaxWidth,o),a=a.replaceAll(` `,` `)),e.dataReference){let i=t.find(t=>{var n;return t.name===((n=e.dataReference)==null?void 0:n.$refText)});i&&(a=i.dataBlockValue,a=a.substring(a.indexOf(`{ `)+2),a=a.substring(0,a.lastIndexOf(`}`)-1),a=QF(a,r),a=_L(a,n.textMaxWidth,o),a=a.replaceAll(` `,` `),a+=`
    `)}let l=a!==void 0;l&&(s+=`

    ${a}`);let u={fontSize:o.fontSize,fontWeight:o.fontWeight,fontFamily:o.fontFamily},d=vL(s,u),f=l?d.width/3:d.width,p={content:s,width:f,height:d.height};return W.debug(`[${e.name}] ${e.entityIdentifier} text`,p),p}function GRi(e,t){let n=t,r=URi(n.frame),i={width:n.textProps.width+2*h6.boxTextPadding,height:n.textProps.height+2*h6.boxTextPadding};return[{$kind:uzi,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}function KRi(e,t,n){return t===void 0?h6.contentStartX:t.index===e.index&&e.r?e.r+h6.boxPadding:n===void 0?h6.contentStartX:n.r-h6.boxOverlap+h6.boxPadding}function qRi(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}function JRi(e){return Object.values(e).sort((e,t)=>e.index-t.index)}function YRi(e,t){let n=t,r=HRi(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*h6.swimlaneMinHeight+h6.swimlaneGap,height:h6.swimlaneMinHeight,maxHeight:h6.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(h6.boxMinWidth,Math.min(h6.boxMaxWidth,n.dimension.width))+2*h6.boxPadding,height:Math.max(h6.boxMinHeight,Math.min(h6.boxMaxHeight,n.dimension.height))+2*h6.boxPadding},l=KRi(i,o,a),u=l+s.width+h6.boxPadding,d=qRi(Object.values(e.swimlanes),u);i.r=l+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(h6.swimlaneMinHeight,i.maxHeight)+2*h6.swimlanePadding;let f={x:l,y:h6.swimlanePadding+i.y,r:u,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},p={...e,boxes:[...e.boxes,f],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:d},m=JRi(p.swimlanes);m.length>0&&(m[0].y=0);for(let e=1;e0}function QRi(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}function $Ri(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}function ezi(e,t){let n=t;if(Aei(n.frame)||XRi(n.index,n.frame))return[];let r=QRi(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let i;return i=n.sourceFrame?QRi(e.boxes,n.sourceFrame):$Ri(e.boxes,r.swimlane.index,n.index-1),i===void 0?[]:[{$kind:fzi,frame:n.frame,index:n.index,sourceBox:i,targetBox:r}]}function tzi(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}function nzi(e,t){let n=bzi[t.$kind];if(n==null)return[];let r=n(e,t);return W.debug(`decided events`,r),r}function rzi(e,t){let n=t.reduce((e,t)=>{let n=xzi[t.$kind];return n==null?e:n(e,t)},e);return W.debug(`evolve events`,{state:e,newState:n,events:t}),n}function izi(e,t){return rzi(e,nzi(e,t))}function azi(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}function ozi(e,t){return e>t}function szi(e,t,n,r){return i=>{let a=i.sourceBox.swimlane.y+t.swimlanePadding,o=i.targetBox.swimlane.y+t.swimlanePadding,s=ozi(a,o),l=i.sourceBox.x+i.sourceBox.dimension.width*2/3,u=i.targetBox.x+i.targetBox.dimension.width/3,d,f;W.debug(`rendering relation up=${s} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),s?(d=a,f=o+i.targetBox.dimension.height):(d=a+i.sourceBox.dimension.height,f=o);let p=r.emRelationStroke??i.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,i.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${n})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}function czi(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}var lzi,uzi,dzi,fzi,pzi,mzi,hzi,gzi,_zi,vzi,h6,yzi,bzi,xzi,Szi,Czi,wzi,Tzi,Ezi,Dzi=o((()=>{Pq(),wL(),bI(),hN(),fN(),a4(),XI(),lzi=`position frame`,uzi=`frame positioned`,dzi=`position relation`,fzi=`relation positioned`,pzi=U(function(e){W.debug(`options str`,e)},`setOptions`),mzi=U(function(){return{}},`getOptions`),hzi=U(function(){PRi(),uI()},`clear`),U(PRi,`reset`),gzi=FF.eventmodeling,_zi=U(()=>mL({...gzi,...WF().eventmodeling}),`getConfig`),vzi={},U(FRi,`getState`),U(IRi,`setAst`),h6={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `},U(LRi,`getDiagramProps`),yzi={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]},U(RRi,`extractNamespace`),U(zRi,`extractName`),U(BRi,`findSwimlaneByNamespace`),U(VRi,`findNextAvailableIndex`),U(HRi,`calculateSwimlaneProps`),U(URi,`calculateEntityVisualProps`),U(WRi,`calculateTextProps`),U(GRi,`decidePositionFrame`),U(KRi,`calculateX`),U(qRi,`calculateMaxRight`),U(JRi,`sortedSwimlanesArray`),U(YRi,`evolveFramePositioned`),U(XRi,`isFirstFrame`),U(ZRi,`hasSourceFrame`),U(QRi,`findBoxByFrame`),U($Ri,`findBoxByLineIndex`),U(ezi,`decidePositionRelation`),U(tzi,`evolveRelationPositioned`),bzi={[lzi]:GRi,[dzi]:ezi},xzi={[uzi]:YRi,[fzi]:tzi},U(nzi,`decide`),U(rzi,`evolve`),U(izi,`dispatch`),Szi={getConfig:_zi,setOptions:pzi,getOptions:mzi,clear:hzi,setAccTitle:dI,getAccTitle:fI,getAccDescription:mI,setAccDescription:pI,setDiagramTitle:hI,getDiagramTitle:gI,setAst:IRi,getDiagramProps:LRi,getState:FRi},Czi={parse:U(async e=>{let t=await n4(`eventmodeling`,e);W.debug(t),Szi.setAst(t),Nq(t,Szi)},`parse`)},wzi=_I(),Tzi=wzi==null?void 0:wzi.eventmodeling,U(azi,`renderD3Box`),U(ozi,`dirUpwards`),U(szi,`renderD3Relation`),U(czi,`renderD3Swimlane`),Ezi={parser:Czi,db:Szi,renderer:{draw:U(function(e,t,n,r){if(W.debug(`in eventmodeling renderer`,e+` `,`id:`,t,n),!Tzi)throw Error(`EventModeling config not found`);let i=r.db,{themeVariables:a,eventmodeling:o}=_I(),s=DI(`[id="${t}"]`),l=i.getDiagramProps(),u=i.getState(),d=`em-arrowhead-${t}`,f=a.emArrowhead??`#000000`;u.sortedSwimlanesArray.forEach(czi(s,u.maxR,l,a)),u.boxes.forEach(azi(s,l)),u.relations.forEach(szi(s,l,d,a)),s.append(`defs`).append(`marker`).attr(`id`,d).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,f),zrr(void 0,s,(o==null?void 0:o.padding)??30,o==null?void 0:o.useMaxWidth)},`draw`)},styles:U(e=>``,`getStyles`)}})),Ozi=l({diagram:()=>Zzi}),kzi,Azi,jzi,Mzi,Nzi,g6,Pzi,Fzi,Izi,Lzi,Rzi,zzi,Bzi,Vzi,Hzi,Uzi,Wzi,Gzi,Kzi,qzi,Jzi,Yzi,_6,Xzi,v6,Zzi,Qzi=o((()=>{QI(),wL(),bI(),hN(),fN(),cR(),Azi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,4],n=[1,14],r=[1,12],i=[1,13],a=[6,7,8],o=[1,20],s=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:i},e(a,[2,3]),{1:[2,2]},e(a,[2,4]),e(a,[2,5]),{1:[2,6],6:n,12:15,13:r,14:i},{6:n,9:16,12:11,13:r,14:i},{6:o,7:s,10:17,11:l},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:o,7:s,10:22,11:l},{1:[2,7],6:n,12:15,13:r,14:i},e(d,[2,14],{7:f,11:p}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(u,[2,15]),e(d,[2,13],{7:f,11:p}),e(m,[2,11]),e(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}})();function g(){this.yy={}}return U(g,`Parser`),g.prototype=h,h.Parser=g,new g})(),Azi.parser=Azi,jzi=Azi,Mzi=(kzi=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,uI()}getRoot(){return this.root}addNode(e,t){let n=oI.sanitizeText(t,_I());if(!this.root){this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],hI(n);return}this.baseLevel??(this.baseLevel=e);let r=e-this.baseLevel+1;for(r<=0&&(r=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=r;)this.stack.pop();let i=this.stack[this.stack.length-1].node,a={text:n,children:[]};i.children.push(a),this.stack.push({level:r,node:a})}getAccTitle(){return fI()}setAccTitle(e){dI(e)}getAccDescription(){return mI()}setAccDescription(e){pI(e)}getDiagramTitle(){return gI()}setDiagramTitle(e){hI(e)}},U(kzi,`IshikawaDB`),kzi),Nzi=14,g6=250,Pzi=30,Fzi=60,Izi=5,Lzi=82*Math.PI/180,Rzi=Math.cos(Lzi),zzi=Math.sin(Lzi),Bzi=U((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,a=r.height+t*2;sI(e,a,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${a}`)},`applyPaddedViewBox`),Vzi=U((e,t,n,r)=>{var i,a;let o=r.db.getRoot();if(!o)return;let s=_I(),{look:l,handDrawnSeed:u,themeVariables:d}=s,f=bL(s.fontSize)[0]??Nzi,p=l===`handDrawn`,m=o.children??[],h=((i=s.ishikawa)==null?void 0:i.diagramPadding)??20,g=((a=s.ishikawa)==null?void 0:a.useMaxWidth)??!1,_=ZI(t),v=_.append(`g`).attr(`class`,`ishikawa`),y=p?sR.svg(_.node()):void 0,b=y?{roughSvg:y,seed:u??0,lineColor:(d==null?void 0:d.lineColor)??`#333`,fillColor:(d==null?void 0:d.mainBkg)??`#fff`}:void 0,x=`ishikawa-arrow-${t}`;p||v.append(`defs`).append(`marker`).attr(`id`,x).attr(`viewBox`,`0 0 10 10`).attr(`refX`,0).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 Z`).attr(`class`,`ishikawa-arrow`);let S=0,C=g6,w=p?void 0:v6(v,S,C,S,C,`ishikawa-spine`);if(Uzi(v,S,C,o.text,f,b),!m.length){p&&v6(v,S,C,S,C,`ishikawa-spine`,b),Bzi(_,h,g);return}S-=20;let T=m.filter((e,t)=>t%2==0),E=m.filter((e,t)=>t%2==1),D=Hzi(T),O=Hzi(E),k=D.total+O.total,A=g6,j=g6;if(k>0){let e=g6*2,t=g6*.3;A=Math.max(t,e*(D.total/k)),j=Math.max(t,e*(O.total/k))}let M=f*2;A=Math.max(A,D.max*M),j=Math.max(j,O.max*M),C=Math.max(A,g6),w&&w.attr(`y1`,C).attr(`y2`,C),v.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${C})`);let N=Math.ceil(m.length/2);for(let e=0;eMath.min(e,t.getBBox().x),1/0)}if(p)v6(v,S,C,0,C,`ishikawa-spine`,b);else{w.attr(`x1`,S);let e=`url(#${x})`;v.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}Bzi(_,h,g)},`draw`),Hzi=U(e=>{let t=U(e=>e.children.reduce((e,n)=>e+1+t(n),0),`countDescendants`);return e.reduce((e,n)=>{let r=t(n);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),Uzi=U((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),l=_6(s,Yzi(r,o),0,0,`ishikawa-head-label`,`start`,i),u=l.node().getBBox(),d=Math.max(60,u.width+6),f=Math.max(40,u.height*2+40),p=`M 0 ${-f/2} L 0 ${f/2} Q ${d*2.4} 0 0 ${-f/2} Z`;if(a){let e=a.roughSvg.path(p,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,p);l.attr(`transform`,`translate(${(d-u.width)/2-u.x+3},${-u.y-u.height/2})`)},`drawHead`),Wzi=U((e,t)=>{let n=[],r=[],i=U((e,a,o)=>{let s=t===-1?[...e].reverse():e;for(let e of s){let t=n.length,s=e.children??[];n.push({depth:o,text:Yzi(e.text,15),parentIndex:a,childCount:s.length}),o%2==0?(r.push(t),s.length&&i(s,t,o+1)):(s.length&&i(s,t,o+1),r.push(t))}},`walk`);return i(e,-1,2),{entries:n,yOrder:r}},`flattenTree`),Gzi=U((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),l=_6(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(l.x-20,l.y-2,l.width+40,l.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,l.x-20).attr(`y`,l.y-2).attr(`width`,l.width+40).attr(`height`,l.height+4)},`drawCauseLabel`),Kzi=U((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,l=i/o,u=-l*6,d=s*6,f=t,p=n,m=`M ${f} ${p} L ${f-s*6*2+u} ${p-l*6*2+d} L ${f-s*6*2-u} ${p-l*6*2-d} Z`,h=a.roughSvg.path(m,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>h)},`drawArrowMarker`),qzi=U((e,t,n,r,i,a,o,s)=>{let l=t.children??[],u=a*(l.length?1:.2),d=-Rzi*u,f=zzi*u*i,p=n+d,m=r+f;if(v6(e,n,r,p,m,`ishikawa-branch`,s),s&&Kzi(e,n,r,n-p,r-m,s),Gzi(e,t.text,p,m,i,o,s),!l.length)return;let{entries:h,yOrder:g}=Wzi(l,i),_=h.length,v=Array(_);for(let[e,t]of g.entries())v[t]=r+f*((e+1)/(_+1));let y=new Map;y.set(-1,{x0:n,y0:r,x1:p,y1:m,childCount:l.length,childrenDrawn:0});let b=-Rzi,x=zzi*i,S=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of h.entries()){let r=v[t],i=y.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),l=0,u=0,d=0;if(n.depth%2==0){let e=i.y1-i.y0;l=Xzi(i.x0,i.x1,e?(r-i.y0)/e:.5),u=r,d=l-(n.childCount>0?Fzi+n.childCount*Izi:Pzi),v6(a,l,r,d,r,`ishikawa-sub-branch`,s),s&&Kzi(a,l,r,1,0,s),_6(a,n.text,d,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;l=Xzi(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),u=i.y0,d=l+b*((r-u)/x),v6(a,l,u,d,r,`ishikawa-sub-branch`,s),s&&Kzi(a,l,u,l-d,u-r,s),_6(a,n.text,d,r,S,`end`,o)}n.childCount>0&&y.set(t,{x0:l,y0:u,x1:d,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),Jzi=U(e=>e.split(/|\n/),`splitLines`),Yzi=U((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(` `)},`wrapText`),_6=U((e,t,n,r,i,a,o)=>{let s=Jzi(t),l=o*1.05,u=e.append(`text`).attr(`class`,i).attr(`text-anchor`,a).attr(`x`,n).attr(`y`,r-(s.length-1)*l/2);for(let[e,t]of s.entries())u.append(`tspan`).attr(`x`,n).attr(`dy`,e===0?0:l).text(t);return u},`drawMultilineText`),Xzi=U((e,t,n)=>e+(t-e)*n,`lerp`),v6=U((e,t,n,r,i,a,o)=>{if(o){let s=o.roughSvg.line(t,n,r,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>s).attr(`class`,a)}else return e.append(`line`).attr(`class`,a).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i)},`drawLine`),Zzi={parser:jzi,get db(){return new Mzi},renderer:{draw:Vzi},styles:U(e=>` .ishikawa .ishikawa-spine, .ishikawa .ishikawa-branch, .ishikawa .ishikawa-sub-branch { stroke: ${e.lineColor}; stroke-width: 2; fill: none; } .ishikawa .ishikawa-sub-branch { stroke-width: 1; } .ishikawa .ishikawa-arrow { fill: ${e.lineColor}; } .ishikawa .ishikawa-head { fill: ${e.mainBkg}; stroke: ${e.lineColor}; stroke-width: 2; } .ishikawa .ishikawa-label-box { fill: ${e.mainBkg}; stroke: ${e.lineColor}; stroke-width: 2; } .ishikawa text { font-family: ${e.fontFamily}; font-size: ${e.fontSize}; fill: ${e.textColor}; } .ishikawa .ishikawa-head-label { font-weight: 600; text-anchor: middle; dominant-baseline: middle; font-size: 14px; } .ishikawa .ishikawa-label { text-anchor: end; } .ishikawa .ishikawa-label.cause { text-anchor: middle; dominant-baseline: middle; } .ishikawa .ishikawa-label.align { text-anchor: end; dominant-baseline: middle; } .ishikawa .ishikawa-label.up { dominant-baseline: baseline; } .ishikawa .ishikawa-label.down { dominant-baseline: hanging; } `,`getStyles`)}}));function $zi(e,t){let n=tBi(e),r=n.filter(t=>eBi(t,e)),i=0,a=0,o=[];if(r.length>1){let t=aBi(r);for(let e=0;et.angle-e.angle);let n=r[r.length-1];for(let t=0;tr.radius*2&&(f=r.radius*2),(u==null||u.width>f)&&(u={circle:r,width:f,p1:s,p2:n,large:f>r.radius,sweep:!0})}u!=null&&(o.push(u),i+=nBi(u.circle.radius,u.width),n=s)}}else{let t=e[0];for(let n=1;nMath.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-HBi,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function eBi(e,t){return t.every(t=>y6(e,t)=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return nBi(e,r)+nBi(t,i)}function iBi(e,t){let n=y6(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,l=e.y+a*(t.y-e.y)/n,u=-(t.y-e.y)*(o/n),d=-(t.x-e.x)*(o/n);return[{x:s+u,y:l-d},{x:s-u,y:l+d}]}function aBi(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function oBi(e,t,n,r){r=r||{};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),l=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n=0&&(t=n),Math.abs(l)sBi(t))}function b6(e,t){let n=0;for(let r=0;re.fx-t.fx,v=t.slice(),y=t.slice(),b=t.slice(),x=t.slice();for(let t=0;t{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:h[0].slice(),fx:h[0].fx,simplex:e})}p=0;for(let e=0;e=h[m-1].fx){let n=!1;if(y.fx>t.fx?(x6(b,1+d,v,-d,t),b.fx=e(b),b.fx=1)break;for(let t=1;ts+a*i*l||u>=m)p=i;else{if(Math.abs(f)<=-o*l)return i;f*(p-d)>=0&&(p=d),d=i,m=u}return 0}for(let h=0;h<10;++h){if(x6(r.x,1,n.x,i,t),u=r.fx=e(r.x,r.fxprime),f=b6(r.fxprime,t),u>s+a*i*l||h&&u>=d)return m(p,i,d);if(Math.abs(f)<=-o*l)return i;if(f>=0)return m(i,p,u);d=u,p=i,i*=2}return i}function pBi(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,l=1,u;n=n||{},u=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),uBi(o,r.fxprime,-1);for(let t=0;t{let t={};for(let n=0;nrBi(e,t,r)-n,0,e+t)}function gBi(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;ne===t?0:ee.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=hBi(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let l=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?l=1:e.size<=1e-10&&(l=-1),i[a][o]=i[o][a]=l}),{distances:r,constraints:i}}function vBi(e,t,n,r){for(let e=0;e0&&h<=f||p<0&&h>=f||(i+=2*g*g,t[2*a]+=4*g*(o-u),t[2*a+1]+=4*g*(s-d),t[2*l]+=4*g*(u-o),t[2*l+1]+=4*g*(d-s))}}return i}function yBi(e,t={}){let n=xBi(e,t),r=t.lossFunction||S6;if(e.length>=8){let i=bBi(e,t),a=r(i,e),o=r(n,e);a+1e-8e.map(e=>e/s));let l=(e,t)=>vBi(e,t,a,o),u=null;for(let e=0;ee.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+UBi>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;ne[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function SBi(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=rBi(n.radius,i.radius,y6(n,i))}else t=$zi(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function CBi(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&y6(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function wBi(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t{delete e.parent}),Array.from(r.values())}function TBi(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function EBi(e,t,n){t??(t=Math.PI/2);let r=kBi(e).map(e=>Object.assign({},e)),i=wBi(r);for(let e of i){CBi(e,t,n);let r=TBi(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,l;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)l=a.yRange.max-i.yRange.min+o;else{l=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(l+=e)}for(let t of e)t.x+=s,t.y+=l,r.push(t)}let l=1;for(;l({radius:d*e.radius,x:r+f+(e.x-o.min)*d,y:r+p+(e.y-s.min)*d,setid:e.setid})))}function OBi(e){let t={};for(let n of e)t[n.setid]=n;return t}function kBi(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function ABi(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,l=null,u=!0,d=!0,f=null,p=null,m=!1,h=null,g=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,_={},v=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],y=0,b=function(e){if(e in _)return _[e];var t=_[e]=v[y];return y+=1,y>=v.length&&(y=0),t},x=mBi,S=S6;function C(_){let v=_.datum(),y=new Set;v.forEach(e=>{e.size==0&&e.sets.length==1&&y.add(e.sets[0])}),v=v.filter(e=>!e.sets.some(e=>y.has(e)));let C={},w={};if(v.length>0){let e=x(v,{lossFunction:S,distinct:m});s&&(e=EBi(e,o,p)),C=DBi(e,n,r,i,l),w=FBi(C,v,g)}let T={};v.forEach(e=>{e.label&&(T[e.sets]=e.label)});function E(e){if(e.sets in T)return T[e.sets];if(e.sets.length==1)return``+e.sets[0]}_.selectAll(`svg`).data([C]).enter().append(`svg`);let D=_.select(`svg`);t?D.attr(`viewBox`,`0 0 ${n} ${r}`):D.attr(`width`,n).attr(`height`,r);let O={},k=!1;D.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!m&&(k=!0,O[e.sets[0]]=LBi(t))});function A(e){return t=>BBi(e.sets.map(e=>{let i=O[e],a=C[e];return i||(i={x:n/2,y:r/2,radius:1}),a||(a={x:n/2,y:r/2,radius:1}),{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),h)}let j=D.selectAll(`.venn-area`).data(v,e=>e.sets),M=j.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),N=M.append(`path`),P=M.append(`text`).attr(`class`,`label`).text(e=>E(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);d&&(N.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:b(e.sets)).style(`fill-opacity`,`.25`),P.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?b(t.sets):`#444`));function F(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let I=_;k&&typeof I.transition==`function`?(I=F(_),I.selectAll(`path`).attrTween(`d`,A)):I.selectAll(`path`).attr(`d`,e=>BBi(e.sets.map(e=>C[e])),h);let L=I.selectAll(`text`).filter(e=>e.sets in w).text(e=>E(e)).attr(`x`,e=>Math.floor(w[e.sets].x)).attr(`y`,e=>Math.floor(w[e.sets].y));u&&(k?`on`in L?L.on(`end`,jBi(C,E)):L.each(`end`,jBi(C,E)):L.each(jBi(C,E)));let R=F(j.exit()).remove();typeof j.transition==`function`&&R.selectAll(`path`).attrTween(`d`,A);let ee=R.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return f!==null&&(P.style(`font-size`,`0px`),L.style(`font-size`,f),ee.style(`font-size`,`0px`)),{circles:C,textCentres:w,nodes:j,enter:M,update:I,exit:R}}return C.wrap=function(e){return arguments.length?(u=e,C):u},C.useViewBox=function(){return t=!0,C},C.width=function(e){return arguments.length?(n=e,C):n},C.height=function(e){return arguments.length?(r=e,C):r},C.padding=function(e){return arguments.length?(i=e,C):i},C.distinct=function(e){return arguments.length?(m=e,C):m},C.colours=function(e){return arguments.length?(b=e,C):b},C.colors=function(e){return arguments.length?(b=e,C):b},C.fontSize=function(e){return arguments.length?(f=e,C):f},C.round=function(e){return arguments.length?(h=e,C):h},C.duration=function(e){return arguments.length?(a=e,C):a},C.layoutFunction=function(e){return arguments.length?(x=e,C):x},C.normalize=function(e){return arguments.length?(s=e,C):s},C.scaleToFit=function(e){return arguments.length?(l=e,C):l},C.styled=function(e){return arguments.length?(d=e,C):d},C.orientation=function(e){return arguments.length?(o=e,C):o},C.orientationOrder=function(e){return arguments.length?(p=e,C):p},C.lossFunction=function(e){return arguments.length?(S=e==="default"?S6:e===`logRatio`?SBi:e,C):S},C}function jBi(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,l=o.pop(),u=[l],d=0,f=1.1;r.textContent=null;let p=[];function m(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,p.push(t),r.append(t),t}let h=m(l);for(;l=o.pop(),l;){u.push(l);let e=u.join(` `);h.textContent=e,e.length>s&&h.getComputedTextLength()>i&&(u.pop(),h.textContent=u.join(` `),u=[l],h=m(l),d++)}let g=.35-d*f/2,_=r.getAttribute(`x`),v=r.getAttribute(`y`);p.forEach((e,t)=>{e.setAttribute(`x`,_),e.setAttribute(`y`,v),e.setAttribute(`dy`,`${g+t*f}em`)})}}function MBi(e,t,n){let r=t[0].radius-y6(t[0],e);for(let n=1;n=a&&(i=r[n],a=o)}let o=dBi(n=>-1*MBi({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},l=!0;for(let t of e)if(y6(s,t)>t.radius){l=!1;break}for(let e of t)if(y6(s,e)e.p1))}function PBi(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function IBi(e,t,n){let r=[];return r.push(` M`,e,t),r.push(` m`,-n,0),r.push(` a`,n,n,0,1,0,n*2,0),r.push(` a`,n,n,0,1,0,-n*2,0),r.join(` `)}function LBi(e){let t=e.split(` `);return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function RBi(e){if(e.length===0)return[];let t={};return $zi(e,t),t.arcs}function zBi(e,t){if(e.length===0)return`M 0 0`;let n=10**(t||0),r=t==null?e=>e:e=>Math.round(e*n)/n;if(e.length==1){let t=e[0].circle;return IBi(r(t.x),r(t.y),r(t.radius))}let i=[` M`,r(e[0].p2.x),r(e[0].p2.y)];for(let t of e){let e=r(t.circle.radius);i.push(` A`,e,e,0,+!!t.large,+!!t.sweep,r(t.p1.x),r(t.p1.y))}return i.join(` `)}function BBi(e,t){return zBi(RBi(e),t)}function VBi(e,t={}){let{lossFunction:n,layoutFunction:r=mBi,normalize:i=!0,orientation:a=Math.PI/2,orientationOrder:o,width:s=600,height:l=350,padding:u=15,scaleToFit:d=!1,symmetricalTextCentre:f=!1,distinct:p,round:m=2}=t,h=r(e,{lossFunction:n==="default"||!n?S6:n===`logRatio`?SBi:n,distinct:p});i&&(h=EBi(h,a,o));let g=DBi(h,s,l,u,d),_=FBi(g,e,f),v=new Map(Object.keys(g).map(e=>[e,{set:e,x:g[e].x,y:g[e].y,radius:g[e].radius}])),y=e.map(e=>{let t=e.sets.map(e=>v.get(e)),n=RBi(t);return{circles:t,arcs:n,path:zBi(n,m),area:e,has:new Set(e.sets)}});function b(e){let t=``;for(let n of y)n.has.size>e.length&&e.every(e=>n.has.has(e))&&(t+=` `+n.path);return t}return y.map(({circles:e,arcs:t,path:n,area:r})=>({data:r,text:_[r.sets],circles:e,arcs:t,path:n,distinctPath:n+b(r.sets)}))}var HBi,UBi,WBi=o((()=>{HBi=1e-10,UBi=1e-10})),GBi=l({diagram:()=>yVi});function KBi(){return mL(hVi,WF().venn)}function qBi(e){let t=new Map;for(let n of e){let e=n.targets.join(`|`),r=t.get(e);r?Object.assign(r,n.styles):t.set(e,{...n.styles})}return t}function C6(e){return e.join(`|`)}function JBi(e,t,n,r,i,a){let o=(e==null?void 0:e.useDebugLayout)??!1,s=n.select(`svg`).append(`g`).attr(`class`,`venn-text-nodes`),l=new Map;for(let e of r){let t=C6(e.sets),n=l.get(t);n?n.push(e):l.set(t,[e])}for(let[e,n]of l.entries()){let r=t.get(e);if(!(r!=null&&r.text))continue;let l=r.text.x,d=r.text.y,f=Math.min(...r.circles.map(e=>e.radius)),p=Math.min(...r.circles.map(e=>e.radius-Math.hypot(l-e.x,d-e.y))),m=Number.isFinite(p)?Math.max(0,p):0;m===0&&Number.isFinite(f)&&(m=f*.6);let h=s.append(`g`).attr(`class`,`venn-text-area`).attr(`font-size`,`${40*i}px`);o&&h.append(`circle`).attr(`class`,`venn-text-debug-circle`).attr(`cx`,l).attr(`cy`,d).attr(`r`,m).attr(`fill`,`none`).attr(`stroke`,`purple`).attr(`stroke-width`,1.5*i).attr(`stroke-dasharray`,`${6*i} ${4*i}`);let g=Math.max(80*i,m*2*.95),_=Math.max(60*i,m*2*.95),v=(r.data.label&&r.data.label.length>0?Math.min(32*i,m*.25):0)+(n.length<=2?30*i:0),y=l-g/2,b=d-_/2+v,x=Math.max(1,Math.ceil(Math.sqrt(n.length))),S=Math.max(1,Math.ceil(n.length/x)),C=g/x,w=_/S;for(let[e,t]of n.entries()){var u;let n=e%x,r=Math.floor(e/x),s=y+C*(n+.5),l=b+w*(r+.5);o&&h.append(`rect`).attr(`class`,`venn-text-debug-cell`).attr(`x`,y+C*n).attr(`y`,b+w*r).attr(`width`,C).attr(`height`,w).attr(`fill`,`none`).attr(`stroke`,`teal`).attr(`stroke-width`,1*i).attr(`stroke-dasharray`,`${4*i} ${3*i}`);let d=C*.9,f=w*.9,p=h.append(`foreignObject`).attr(`class`,`venn-text-node-fo`).attr(`width`,d).attr(`height`,f).attr(`x`,s-d/2).attr(`y`,l-f/2).attr(`overflow`,`visible`),m=(u=a.get(t.id))==null?void 0:u.color,g=p.append(`xhtml:span`).attr(`class`,`venn-text-node`).style(`display`,`flex`).style(`width`,`100%`).style(`height`,`100%`).style(`white-space`,`normal`).style(`align-items`,`center`).style(`justify-content`,`center`).style(`text-align`,`center`).style(`overflow-wrap`,`normal`).style(`word-break`,`normal`).text(t.label??t.id);m&&g.style(`color`,m)}}}function YBi(e){let t=new Set(e.map(e=>[...e.sets].sort().join(`|`))),n=new Map(e.filter(e=>e.sets.length===1&&e.size!==void 0).map(e=>[e.sets[0],e.size])),r=[];for(let i of e){if(i.sets.length<3)continue;let e=[...i.sets].sort();for(let i=0;i0?[...e,...r]:e}var XBi,ZBi,QBi,$Bi,eVi,tVi,nVi,rVi,iVi,aVi,w6,oVi,sVi,cVi,lVi,T6,uVi,dVi,fVi,pVi,mVi,hVi,gVi,_Vi,vVi,yVi,bVi=o((()=>{QI(),wL(),bI(),hN(),fN(),XI(),NN(),WBi(),cR(),XBi=(function(){var e=U(function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[5,8],n=[7,8,11,12,17,19,22,24],r=[1,17],i=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],s=[1,39],l=[7,8,11,12,17,19,22,24,27],u=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],h=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],g={trace:U(function(){},`trace`),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:`error`,5:`VENN`,7:`EOF`,8:`NEWLINE`,11:`TITLE`,12:`SET`,14:`BRACKET_LABEL`,15:`COLON`,16:`NUMERIC`,17:`UNION`,19:`TEXT`,20:`IDENTIFIER`,21:`STRING`,22:`INDENT_TEXT`,24:`STYLE`,27:`COMMA`,31:`HEXCOLOR`,32:`RGBCOLOR`,33:`RGBACOLOR`},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:U(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 3:case 4:this.$=[];break;case 5:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[s];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:r.addSubsetData([a[s]],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 10:r.addSubsetData([a[s-1]],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 11:r.addSubsetData([a[s-2]],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 12:r.addSubsetData([a[s-3]],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 13:if(a[s].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s]),r.addSubsetData(a[s],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 14:if(a[s-1].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-1]),r.addSubsetData(a[s-1],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 15:if(a[s-2].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-2]),r.addSubsetData(a[s-2],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 16:if(a[s-3].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-3]),r.addSubsetData(a[s-3],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 17:case 18:case 19:r.addTextData(a[s-1],a[s],void 0);break;case 20:case 21:r.addTextData(a[s-2],a[s-1],a[s]);break;case 23:r.addStyleData(a[s-1],a[s]);break;case 24:case 25:case 26:var l=r.getCurrentSets();if(!l)throw Error(`text requires set`);r.addTextData(l,a[s],void 0);break;case 27:case 28:var l=r.getCurrentSets();if(!l)throw Error(`text requires set`);r.addTextData(l,a[s-1],a[s]);break;case 29:case 41:this.$=[a[s]];break;case 30:case 42:this.$=[...a[s-2],a[s]];break;case 31:this.$=[a[s-2],a[s]];break;case 33:this.$=a[s].join(` `);break;case 34:this.$=[a[s]];break;case 35:a[s-1].push(a[s]),this.$=a[s-1];break;case 43:case 44:this.$=a[s]}},`anonymous`),table:[e(t,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(n,[2,4],{6:5}),e(t,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),e(n,[2,8]),{13:16,20:r,21:i},{13:20,18:19,20:r,21:i},{13:20,18:21,20:r,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:r,21:i},e(n,[2,9],{14:[1,27],15:[1,28]}),e(a,[2,43]),e(a,[2,44]),e(n,[2,13],{14:[1,29],15:[1,30],27:o}),e(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},e(n,[2,22]),e(n,[2,24],{14:[1,35]}),e(n,[2,25],{14:[1,36]}),e(n,[2,26]),{20:s,25:37,26:38,27:o},e(n,[2,10],{15:[1,40]}),{16:[1,41]},e(n,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:r,21:i},e(n,[2,17],{14:[1,45]}),e(n,[2,18],{14:[1,46]}),e(n,[2,19]),e(n,[2,27]),e(n,[2,28]),e(n,[2,23],{27:[1,47]}),e(l,[2,29]),{15:[1,48]},{16:[1,49]},e(n,[2,11]),{16:[1,50]},e(n,[2,15]),e(a,[2,42]),e(n,[2,20]),e(n,[2,21]),{20:s,26:51},{16:u,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},e(n,[2,12]),e(n,[2,16]),e(l,[2,30]),e(l,[2,31]),e(l,[2,32]),e(l,[2,33],{30:61,16:u,20:d,31:f,32:p,33:m}),e(h,[2,34]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),e(h,[2,39]),e(h,[2,40]),e(h,[2,35])],defaultActions:{6:[2,1]},parseError:U(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:U(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}U(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}U(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??(S=x()),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,s=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,u,l,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};g.lexer=(function(){return{EOF:1,parseError:U(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:U(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:U(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:U(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:U(function(){return this._more=!0,this},`more`),reject:U(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:U(function(e){this.unput(this.match.slice(e))},`less`),pastInput:U(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:U(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:U(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` `+t+`^`},`showPosition`),test_match:U(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:U(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:U(function(){return this.next()||this.lex()},`lex`),begin:U(function(e){this.conditionStack.push(e)},`begin`),popState:U(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:U(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:U(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:U(function(e){this.begin(e)},`pushState`),stateStackSize:U(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:U(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:break;case 3:if(e.getIndentMode&&e.getIndentMode())return e.consumeIndentText=!0,this.begin(`INITIAL`),22;break;case 4:break;case 5:e.setIndentMode&&e.setIndentMode(!1),this.begin(`INITIAL`),this.unput(t.yytext);break;case 6:return this.begin(`bol`),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(e.consumeIndentText)e.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return t.yytext=t.yytext.slice(2,-2),14;case 17:return t.yytext=t.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}})();function _(){this.yy={}}return U(_,`Parser`),_.prototype=g,g.Parser=_,new _})(),XBi.parser=XBi,ZBi=XBi,QBi=[],$Bi=[],eVi=[],tVi=new Set,rVi=!1,iVi=U((e,t,n)=>{let r=T6(e).sort(),i=n??10/e.length**2;nVi=r,r.length===1&&tVi.add(r[0]),QBi.push({sets:r,size:i,label:t?w6(t):void 0})},`addSubsetData`),aVi=U(()=>QBi,`getSubsetData`),w6=U(e=>{let t=e.trim();return t.length>=2&&t.startsWith(`"`)&&t.endsWith(`"`)?t.slice(1,-1):t},`normalizeText`),oVi=U(e=>e&&w6(e),`normalizeStyleValue`),sVi=U((e,t,n)=>{let r=w6(t);$Bi.push({sets:T6(e).sort(),id:r,label:n?w6(n):void 0})},`addTextData`),cVi=U((e,t)=>{let n=T6(e).sort(),r={};for(let[e,n]of t)r[e]=oVi(n)??n;eVi.push({targets:n,styles:r})},`addStyleData`),lVi=U(()=>eVi,`getStyleData`),T6=U(e=>e.map(e=>w6(e)),`normalizeIdentifierList`),uVi=U(e=>{let t=T6(e).filter(e=>!tVi.has(e));if(t.length>0)throw Error(`unknown set identifier: ${t.join(`, `)}`)},`validateUnionIdentifiers`),dVi=U(()=>$Bi,`getTextData`),fVi=U(()=>nVi,`getCurrentSets`),pVi=U(()=>rVi,`getIndentMode`),mVi=U(e=>{rVi=e},`setIndentMode`),hVi=FF.venn,U(KBi,`getConfig`),gVi={getConfig:KBi,clear:U(()=>{uI(),QBi.length=0,$Bi.length=0,eVi.length=0,tVi.clear(),nVi=void 0,rVi=!1},`customClear`),setAccTitle:dI,getAccTitle:fI,setDiagramTitle:hI,getDiagramTitle:gI,getAccDescription:mI,setAccDescription:pI,addSubsetData:iVi,getSubsetData:aVi,addTextData:sVi,addStyleData:cVi,validateUnionIdentifiers:uVi,getTextData:dVi,getStyleData:lVi,getCurrentSets:fVi,getIndentMode:pVi,setIndentMode:mVi},_Vi=U(e=>` .venn-title { font-size: 32px; fill: ${e.vennTitleTextColor}; font-family: ${e.fontFamily}; } .venn-circle text { font-size: 48px; font-family: ${e.fontFamily}; } .venn-intersection text { font-size: 48px; fill: ${e.vennSetTextColor}; font-family: ${e.fontFamily}; } .venn-text-node { font-family: ${e.fontFamily}; color: ${e.vennSetTextColor}; } `,`getStyles`),U(qBi,`buildStyleByKey`),vVi=U((e,t,n,r)=>{var i,a;let o=r.db,s=(i=o.getConfig)==null?void 0:i.call(o),{themeVariables:l,look:u,handDrawnSeed:d}=WF(),f=u===`handDrawn`,p=[l.venn1,l.venn2,l.venn3,l.venn4,l.venn5,l.venn6,l.venn7,l.venn8].filter(Boolean),m=(a=o.getDiagramTitle)==null?void 0:a.call(o),h=o.getSubsetData(),g=o.getTextData(),_=qBi(o.getStyleData()),v=YBi(h),y=(s==null?void 0:s.width)??800,b=(s==null?void 0:s.height)??450,x=y/1600,S=m?48*x:0,C=l.primaryTextColor??l.textColor,w=ZI(t);w.attr(`viewBox`,`0 0 ${y} ${b}`),m&&w.append(`text`).text(m).attr(`class`,`venn-title`).attr(`font-size`,`${32*x}px`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`x`,`50%`).attr(`y`,32*x).style(`fill`,l.vennTitleTextColor||l.titleColor);let T=DI(document.createElement(`div`)),E=ABi().width(y).height(b-S);T.datum(v).call(E);let D=f?sR.svg(T.select(`svg`).node()):void 0,O=VBi(v,{width:y,height:b-S,padding:(s==null?void 0:s.padding)??15}),k=new Map;for(let e of O){let t=C6([...e.data.sets].sort());k.set(t,e)}g.length>0&&JBi(s,k,T,g,x,_);let A=kN(l.background||`#f4f4f4`);T.selectAll(`.venn-circle`).each(function(e,t){let n=DI(this),r=C6([...e.sets].sort()),i=_.get(r),a=(i==null?void 0:i.fill)||p[t%p.length]||l.primaryColor;n.classed(`venn-set-${t%8}`,!0);let o=(i==null?void 0:i[`fill-opacity`])??.1,s=(i==null?void 0:i.stroke)||a,u=(i==null?void 0:i[`stroke-width`])||`${5*x}`;if(f&&D){let e=k.get(r);if(e&&e.circles.length>0){var m;let r=e.circles[0],i=D.circle(r.x,r.y,r.radius*2,{roughness:.7,seed:d,fill:d5n(a,.7),fillStyle:`hachure`,fillWeight:2,hachureGap:8,hachureAngle:-41+t*60,stroke:s,strokeWidth:parseFloat(String(u))});n.select(`path`).remove(),(m=n.node())==null||m.insertBefore(i,n.select(`text`).node())}}else n.select(`path`).style(`fill`,a).style(`fill-opacity`,o).style(`stroke`,s).style(`stroke-width`,u).style(`stroke-opacity`,.95);let h=(i==null?void 0:i.color)||(A?AN(a,30):jN(a,30));n.select(`text`).style(`font-size`,`${48*x}px`).style(`fill`,h)}),f&&D?T.selectAll(`.venn-intersection`).each(function(e){let t=DI(this),n=C6([...e.sets].sort()),r=_.get(n),i=r==null?void 0:r.fill;if(i){let e=t.select(`path`),n=e.attr(`d`);if(n){var a;let t=D.path(n,{roughness:.7,seed:d,fill:d5n(i,.3),fillStyle:`cross-hatch`,fillWeight:2,hachureGap:6,hachureAngle:60,stroke:`none`}),r=e.node();r==null||(a=r.parentNode)==null||a.insertBefore(t,r),e.remove()}}else t.select(`path`).style(`fill-opacity`,0);t.select(`text`).style(`font-size`,`${48*x}px`).style(`fill`,(r==null?void 0:r.color)??l.vennSetTextColor??C)}):(T.selectAll(`.venn-intersection text`).style(`font-size`,`${48*x}px`).style(`fill`,e=>{var t;let n=C6([...e.sets].sort());return((t=_.get(n))==null?void 0:t.color)??l.vennSetTextColor??C}),T.selectAll(`.venn-intersection path`).style(`fill-opacity`,e=>{var t;let n=C6([...e.sets].sort());return(t=_.get(n))!=null&&t.fill?1:0}).style(`fill`,e=>{var t;let n=C6([...e.sets].sort());return((t=_.get(n))==null?void 0:t.fill)??`transparent`}));let j=w.append(`g`).attr(`transform`,`translate(0, ${S})`),M=T.select(`svg`).node();if(M&&`childNodes`in M)for(let e of[...M.childNodes]){var N;(N=j.node())==null||N.appendChild(e)}sI(w,b,y,(s==null?void 0:s.useMaxWidth)??!0)},`draw`),U(C6,`stableSetsKey`),U(JBi,`renderTextNodes`),U(YBi,`ensurePairwiseSubsets`),yVi={parser:ZBi,db:gVi,renderer:{draw:vVi},styles:_Vi}})),xVi=l({diagram:()=>jVi});function SVi(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e==null?void 0:e.classSelector,e!=null&&e.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}var CVi,wVi,TVi,EVi,DVi,OVi,E6,D6,kVi,AVi,jVi,MVi=o((()=>{Pq(),QI(),Dq(),rL(),wL(),bI(),hN(),fN(),a4(),XI(),CVi=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=dI,this.getAccTitle=fI,this.setDiagramTitle=hI,this.getDiagramTitle=gI,this.getAccDescription=mI,this.setAccDescription=pI}getNodes(){return this.nodes}getConfig(){let e=FF,t=WF();return mL({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??(this.root=e))}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{eL(e)&&(n!=null&&n.textStyles?n.textStyles.push(e):n.textStyles=[e]),n!=null&&n.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){var t;return((t=this.classes.get(e))==null?void 0:t.styles)??[]}clear(){uI(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},wVi=(U(CVi,`TreeMapDB`),CVi),U(SVi,`buildHierarchy`),TVi=U((e,t)=>{Nq(e,t);let n=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let r of e.TreemapRows??[]){let e=r.item;if(!e)continue;let i=r.indent?parseInt(r.indent):0,a=EVi(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,l={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};n.push(l)}let r=SVi(n),i=U((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&i(r.children,n+1)},`addNodesRecursively`);i(r,0)},`populate`),EVi=U(e=>e.name?String(e.name):``,`getItemName`),DVi={parser:{yy:void 0},parse:U(async e=>{try{var t;let n=await n4(`treemap`,e);W.debug(`Treemap AST:`,n);let r=(t=DVi.parser)==null?void 0:t.yy;if(!(r instanceof wVi))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);TVi(n,r)}catch(e){throw W.error(`Error parsing treemap:`,e),e}},`parse`)},OVi=10,E6=10,D6=25,kVi={draw:U((e,t,n,r)=>{let i=r.db,a=i.getConfig(),o=a.padding??OVi,s=i.getDiagramTitle(),l=i.getRoot(),{themeVariables:u}=WF();if(!l)return;let d=s?30:0,f=ZI(t),p=a.nodeWidth?a.nodeWidth*E6:960,m=a.nodeHeight?a.nodeHeight*E6:500,h=p,g=m+d;f.attr(`viewBox`,`0 0 ${h} ${g}`),sI(f,g,h,a.useMaxWidth);let _;try{let e=a.valueFormat||`,`;if(e===`$0,0`)_=U(e=>`$`+_E(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let t=/\.\d+/.exec(e),n=t?t[0]:``;_=U(e=>`$`+_E(`,`+n)(e),`valueFormat`)}else if(e.startsWith(`$`)){let t=e.substring(1);_=U(e=>`$`+_E(t||``)(e),`valueFormat`)}else _=_E(e)}catch(e){W.error(`Error creating format function:`,e),_=_E(`,`)}let v=MT().range([`transparent`,u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),y=MT().range([`transparent`,u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),b=MT().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);s&&f.append(`text`).attr(`x`,h/2).attr(`y`,d/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(s);let x=f.append(`g`).attr(`transform`,`translate(0, ${d})`).attr(`class`,`treemapContainer`),S=Glr(l).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),C=dur().size([p,m]).paddingTop(e=>e.children&&e.children.length>0?D6+E6:0).paddingInner(o).paddingLeft(e=>e.children&&e.children.length>0?E6:0).paddingRight(e=>e.children&&e.children.length>0?E6:0).paddingBottom(e=>e.children&&e.children.length>0?E6:0).round(!0)(S),w=C.descendants().filter(e=>e.children&&e.children.length>0),T=x.selectAll(`.treemapSection`).data(w).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);T.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,D6).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),T.append(`clipPath`).attr(`id`,(e,n)=>`clip-section-${t}-${n}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,D6),T.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>v(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>y(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=tL({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),T.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,D6/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,n)=>`url(#clip-section-${t}-${n})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+b(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+tL({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=DI(this),n=e.data.name;t.text(n);let r=e.x1-e.x0,i;i=a.showValues!==!1&&e.value?r-10-30-10-6:r-6-6;let o=Math.max(15,i),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),a.showValues!==!1&&T.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,D6/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?_(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+b(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+tL({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let E=C.leaves(),D=E.length>20,O=D?16:38,k=D?14:28,A=D?4:8,j=D?4:6,M=D?2:4,N=D?8:10,P=D?1:2,F=x.selectAll(`.treemapLeafGroup`).data(E).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);F.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?v(e.parent.data.name):v(e.data.name)).attr(`style`,e=>tL({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?v(e.parent.data.name):v(e.data.name)).attr(`stroke-width`,3),F.append(`clipPath`).attr(`id`,(e,n)=>`clip-${t}-${n}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),F.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${O}px;fill:`+b(e.data.name)+`;`+tL({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,n)=>`url(#clip-${t}-${n})`).text(e=>e.data.name).each(function(e){let t=DI(this),n=e.x1-e.x0,r=e.y1-e.y0,i=t.node(),a=n-2*M,o=r-2*M;if(aa&&s>A;)s--,t.style(`font-size`,`${s}px`);let u=Math.max(j,Math.min(k,Math.round(s*l))),d=s+P+u;for(;d>o&&s>A&&(s--,u=Math.max(j,Math.min(k,Math.round(s*l))),!(ua||s(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${k}px;fill:`+b(e.data.name)+`;`+tL({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,n)=>`url(#clip-${t}-${n})`).text(e=>e.value?_(e.value):``).each(function(e){let t=DI(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let r=DI(n).select(`.treemapLabel`);if(r.empty()||r.style(`display`)===`none`){t.style(`display`,`none`);return}let i=parseFloat(r.style(`font-size`)),a=Math.max(j,Math.min(k,Math.round(i*.6)));t.style(`font-size`,`${a}px`);let o=(e.y1-e.y0)/2+i/2+P;t.attr(`y`,o);let s=e.x1-e.x0,l=e.y1-e.y0-4,u=s-2*M;t.node().getComputedTextLength()>u||o+a>l||a{let t=mL(MF(),WF().themeVariables),n=mL(AVi,e),r=n.titleColor??t.titleColor,i=n.labelColor??t.textColor,a=n.valueColor??t.textColor;return` .treemapNode.section { stroke: ${n.sectionStrokeColor}; stroke-width: ${n.sectionStrokeWidth}; fill: ${n.sectionFillColor}; } .treemapNode.leaf { stroke: ${n.leafStrokeColor}; stroke-width: ${n.leafStrokeWidth}; fill: ${n.leafFillColor}; } .treemapLabel { fill: ${i}; font-size: ${n.labelFontSize}; } .treemapValue { fill: ${a}; font-size: ${n.valueFontSize}; } .treemapTitle { fill: ${r}; font-size: ${n.titleFontSize}; } `},`getStyles`)}})),NVi=l({diagram:()=>oHi});function PVi(){return _I()[`wardley-beta`]}function FVi(e,t,n,r,i,a,o,s,l){A6.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:l})}function IVi(e,t,n=!1,r,i){A6.addLink({source:e,target:t,dashed:n,label:r,flow:i})}function LVi(e,t,n){A6.addTrend({nodeId:e,targetX:t,targetY:n})}function RVi(e,t,n){A6.addAnnotation({number:e,coordinates:t,text:n})}function zVi(e,t,n){A6.addNote({text:e,x:t,y:n})}function BVi(e,t,n){A6.addAccelerator({name:e,x:t,y:n})}function VVi(e,t,n){A6.addDeaccelerator({name:e,x:t,y:n})}function HVi(e,t){A6.setAnnotationsBox(e,t)}function UVi(e,t){A6.setSize(e,t)}function WVi(e){A6.startPipeline(e)}function GVi(e,t){A6.addPipelineComponent(e,t)}function KVi(e){A6.setAxes(e)}function qVi(e){return A6.getNode(e)}function JVi(e){return A6.resolveNodeId(e)}function YVi(){return A6.build()}function XVi(){A6.clear(),uI()}var ZVi,O6,k6,QVi,$Vi,eHi,tHi,A6,nHi,rHi,iHi,aHi,oHi,sHi=o((()=>{Pq(),QI(),wL(),bI(),hN(),fN(),a4(),O6=U((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),k6=U((e,t,n)=>({x:O6(t,`${n} evolution`),y:O6(e,`${n} visibility`)}),`toCoordinates`),QVi=U(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),$Vi=U(e=>{if(!(e!=null&&e.startsWith(`+`)))return{};let t=/^\+'([^']*)'/.exec(e),n=t==null?void 0:t[1];return e.includes(`<>`)?{flow:`bidirectional`,label:n}:e.includes(`<`)?{flow:`backward`,label:n}:e.includes(`>`)?{flow:`forward`,label:n}:{label:n}},`extractFlowFromArrow`),eHi=U((e,t)=>{if(Nq(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=k6(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{var n;let r=k6(e.visibility,e.evolution,`Component "${e.name}"`),i=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,a=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,o=(n=e.decorator)==null?void 0:n.strategy;t.addNode(e.name,e.name,r.x,r.y,`component`,i,a,e.inertia,o)}),e.notes.forEach(e=>{let n=k6(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=O6(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=QVi(e.fromPort)??QVi(e.toPort),{flow:i,label:a}=$Vi(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if((n==null?void 0:n.y)!==void 0){let r=O6(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=k6(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=k6(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=k6(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=k6(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),tHi={parser:{yy:void 0},parse:U(async e=>{var t;let n=await n4(`wardley`,e);W.debug(n);let r=(t=tHi.parser)==null?void 0:t.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);eHi(n,r)},`parse`)},A6=new(ZVi=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},U(ZVi,`WardleyBuilder`),ZVi),U(PVi,`getConfig`),U(FVi,`addNode`),U(IVi,`addLink`),U(LVi,`addTrend`),U(RVi,`addAnnotation`),U(zVi,`addNote`),U(BVi,`addAccelerator`),U(VVi,`addDeaccelerator`),U(HVi,`setAnnotationsBox`),U(UVi,`setSize`),U(WVi,`startPipeline`),U(GVi,`addPipelineComponent`),U(KVi,`updateAxes`),U(qVi,`getNode`),U(JVi,`resolveNodeId`),U(YVi,`getWardleyData`),U(XVi,`clear`),nHi={getConfig:PVi,addNode:FVi,addLink:IVi,addTrend:LVi,addAnnotation:RVi,addNote:zVi,addAccelerator:BVi,addDeaccelerator:VVi,setAnnotationsBox:HVi,setSize:UVi,startPipeline:WVi,addPipelineComponent:GVi,updateAxes:KVi,getNode:qVi,resolveNodeId:JVi,getWardleyData:YVi,clear:XVi,setAccTitle:dI,getAccTitle:fI,setDiagramTitle:hI,getDiagramTitle:gI,getAccDescription:mI,setAccDescription:pI},rHi=[`Genesis`,`Custom Built`,`Product`,`Commodity`],iHi=U(()=>{var e,t,n,r,i,a,o,s,l,u,d,f;let{themeVariables:p}=_I();return{backgroundColor:((e=p.wardley)==null?void 0:e.backgroundColor)??p.background??`#fff`,axisColor:((t=p.wardley)==null?void 0:t.axisColor)??`#000`,axisTextColor:((n=p.wardley)==null?void 0:n.axisTextColor)??p.primaryTextColor??`#222`,gridColor:((r=p.wardley)==null?void 0:r.gridColor)??`rgba(100, 100, 100, 0.2)`,componentFill:((i=p.wardley)==null?void 0:i.componentFill)??`#fff`,componentStroke:((a=p.wardley)==null?void 0:a.componentStroke)??`#000`,componentLabelColor:((o=p.wardley)==null?void 0:o.componentLabelColor)??p.primaryTextColor??`#222`,linkStroke:((s=p.wardley)==null?void 0:s.linkStroke)??`#000`,evolutionStroke:((l=p.wardley)==null?void 0:l.evolutionStroke)??`#dc3545`,annotationStroke:((u=p.wardley)==null?void 0:u.annotationStroke)??`#000`,annotationTextColor:((d=p.wardley)==null?void 0:d.annotationTextColor)??p.primaryTextColor??`#222`,annotationFill:((f=p.wardley)==null?void 0:f.annotationFill)??p.background??`#fff`}},`getTheme`),aHi=U(()=>{let e=_I()[`wardley-beta`];return{width:(e==null?void 0:e.width)??900,height:(e==null?void 0:e.height)??600,padding:(e==null?void 0:e.padding)??48,nodeRadius:(e==null?void 0:e.nodeRadius)??6,nodeLabelOffset:(e==null?void 0:e.nodeLabelOffset)??8,axisFontSize:(e==null?void 0:e.axisFontSize)??12,labelFontSize:(e==null?void 0:e.labelFontSize)??10,showGrid:(e==null?void 0:e.showGrid)??!1,useMaxWidth:(e==null?void 0:e.useMaxWidth)??!0}},`getConfigValues`),oHi={parser:tHi,db:nHi,renderer:{draw:U((e,t,n,r)=>{var i,a;W.debug(`Rendering Wardley map `+e);let o=aHi(),s=iHi(),l=o.nodeRadius*1.6,u=r.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=((i=d.size)==null?void 0:i.width)??o.width,m=((a=d.size)==null?void 0:a.height)??o.height,h=ZI(t);h.selectAll(`*`).remove(),sI(h,m,p,o.useMaxWidth),h.attr(`viewBox`,`0 0 ${p} ${m}`);let g=h.append(`g`).attr(`class`,`wardley-map`),_=h.append(`defs`);_.append(`marker`).attr(`id`,`arrow-${t}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),_.append(`marker`).attr(`id`,`link-arrow-end-${t}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`marker`).attr(`id`,`link-arrow-start-${t}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),g.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,m).attr(`fill`,s.backgroundColor);let v=p-o.padding*2,y=m-o.padding*2;f&&g.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let b=U(e=>o.padding+e/100*v,`projectX`),x=U(e=>m-o.padding-e/100*y,`projectY`),S=g.append(`g`).attr(`class`,`wardley-axes`);S.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,m-o.padding).attr(`y2`,m-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),S.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,m-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let C=d.axes.xLabel??`Evolution`,w=d.axes.yLabel??`Visibility`;S.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+v/2).attr(`y`,m-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(C),S.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+y/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+y/2})`).text(w);let T=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:rHi;if(T.length>0){let e=g.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===T.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/T.length;T.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}T.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*v,l=(a+(o.padding+i.end*v))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,m-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,l).attr(`y`,m-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=g.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+v*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,m-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,m-o.padding-y*n).attr(`y2`,m-o.padding-y*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let E=new Map;if(d.nodes.forEach(e=>{E.set(e.id,{x:b(e.x),y:x(e.y),node:e})}),d.pipelines.length>0){let e=g.append(`g`).attr(`class`,`wardley-pipelines`),t=g.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:E.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e{let t=E.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),u=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=u-t/2,d=E.get(n.nodeId);d&&(d.x=(i+a)/2,d.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let D=g.append(`g`).attr(`class`,`wardley-links`),O=new Map;d.pipelines.forEach(e=>{O.set(e.nodeId,new Set(e.componentIds))});let k=d.links.filter(e=>{if(!E.has(e.source)||!E.has(e.target))return!1;let t=O.get(e.target);return!(t!=null&&t.has(e.source))});D.selectAll(`line`).data(k).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=E.get(e.source),n=E.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=E.get(e.source),n=E.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=E.get(e.source),n=E.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=E.get(e.source),n=E.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${t})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${t})`:null),D.selectAll(`text`).data(k.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=E.get(e.source),n=E.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=E.get(e.source),n=E.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=E.get(e.source),n=E.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),l=o/s,u=-a/s,d=r+l*8,f=i+u*8,p=Math.atan2(o,a)*180/Math.PI;return(p>90||p<-90)&&(p+=180),`rotate(${p} ${d} ${f})`}).text(e=>e.label);let A=g.append(`g`).attr(`class`,`wardley-trends`),j=d.trends.map(e=>{let t=E.get(e.nodeId);if(!t)return null;let n=b(e.targetX),r=x(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),l=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>l?n-i/s*l:n,adjustedY2:s>l?r-a/s*l:r}}).filter(e=>e!==null);A.selectAll(`line`).data(j).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${t})`);let M=g.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));M.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),M.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),M.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let N=M.filter(e=>e.sourceStrategy===`market`);N.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),M.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let P=o.nodeRadius*.7,F=o.nodeRadius*1.2;if(N.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>E.get(e.id).x).attr(`y1`,e=>E.get(e.id).y-F).attr(`x2`,e=>E.get(e.id).x-F*Math.cos(Math.PI/6)).attr(`y2`,e=>E.get(e.id).y+F*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>E.get(e.id).x-F*Math.cos(Math.PI/6)).attr(`y1`,e=>E.get(e.id).y+F*Math.sin(Math.PI/6)).attr(`x2`,e=>E.get(e.id).x+F*Math.cos(Math.PI/6)).attr(`y2`,e=>E.get(e.id).y+F*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>E.get(e.id).x+F*Math.cos(Math.PI/6)).attr(`y1`,e=>E.get(e.id).y+F*Math.sin(Math.PI/6)).attr(`x2`,e=>E.get(e.id).x).attr(`y2`,e=>E.get(e.id).y-F).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y-F).attr(`r`,P).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>E.get(e.id).x-F*Math.cos(Math.PI/6)).attr(`cy`,e=>E.get(e.id).y+F*Math.sin(Math.PI/6)).attr(`r`,P).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>E.get(e.id).x+F*Math.cos(Math.PI/6)).attr(`cy`,e=>E.get(e.id).y+F*Math.sin(Math.PI/6)).attr(`r`,P).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),M.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>E.get(e.id).x-l/2).attr(`y`,e=>E.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),M.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=E.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=E.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=E.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=E.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),M.append(`text`).attr(`x`,e=>{let t=E.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=E.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=g.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:b(e.x),y:x(e.y)}));if(n.length>1)for(let t=0;t{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=b(d.annotationsBox.x),n=x(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,l=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();l=Math.max(l,i.height)});let u=e+20+105,d=i.length*16+20+l/2,f=o.padding,h=p-o.padding-u,g=o.padding,_=m-o.padding-d;t=Math.max(f,Math.min(t,h)),n=Math.max(g,Math.min(n,_)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,u).attr(`height`,d).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=g.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=b(t.x),r=x(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=g.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=b(t.x),r=x(t.y),i=` M ${n} ${r-15} L ${n+60-20} ${r-15} L ${n+60-20} ${r-15-8} L ${n+60} ${r} L ${n+60-20} ${r+15+8} L ${n+60-20} ${r+15} L ${n} ${r+15} Z `;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+30).attr(`y`,r+15+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(d.deaccelerators.length>0){let e=g.append(`g`).attr(`class`,`wardley-deaccelerators`);d.deaccelerators.forEach(t=>{let n=b(t.x),r=x(t.y),i=` M ${n+60} ${r-15} L ${n+20} ${r-15} L ${n+20} ${r-15-8} L ${n} ${r} L ${n+20} ${r+15+8} L ${n+20} ${r+15} L ${n+60} ${r+15} Z `;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+30).attr(`y`,r+15+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:U(({wardley:e}={})=>{let t=mL(mL(MF(),WF().themeVariables).wardley,e);return` .wardley-background { fill: ${t.backgroundColor}; } .wardley-axes line, .wardley-axes path { stroke: ${t.axisColor}; } .wardley-axis-label { fill: ${t.axisTextColor}; } .wardley-stage-label { fill: ${t.axisTextColor}; } .wardley-grid line { stroke: ${t.gridColor}; } .wardley-node circle { fill: ${t.componentFill}; stroke: ${t.componentStroke}; } .wardley-node-label { fill: ${t.componentLabelColor}; } .wardley-link { stroke: ${t.linkStroke}; } .wardley-link--dashed { stroke-dasharray: 4 4; } .wardley-link-label { fill: ${t.axisTextColor}; } .wardley-trend line { stroke: ${t.evolutionStroke}; } .wardley-annotation-line { stroke: ${t.annotationStroke}; } .wardley-annotation circle { fill: ${t.annotationFill}; stroke: ${t.annotationStroke}; } .wardley-annotation text { fill: ${t.annotationTextColor}; } .wardley-annotations-box rect { fill: ${t.annotationFill}; stroke: ${t.annotationStroke}; } .wardley-annotations-box text { fill: ${t.annotationTextColor}; } .wardley-pipeline-box { stroke: ${t.componentStroke}; } .wardley-notes text { fill: ${t.axisTextColor}; } `},`styles`)}})),cHi=l({diagram:()=>wHi});function j6(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function lHi(e){let t=0;for(let n=0;n{Pq(),QI(),wL(),bI(),hN(),fN(),a4(),hHi=U(()=>({domains:new Map,transitions:[]}),`createDefaultData`),M6=hHi(),N6={getDomains:U(()=>M6.domains,`getDomains`),getTransitions:U(()=>M6.transitions,`getTransitions`),setDomains:U(e=>{if(e)for(let t of e){let e=t.domain,n=(t.items??[]).map(e=>({label:e.label}));M6.domains.set(e,{name:e,items:n})}},`setDomains`),setTransitions:U(e=>{e&&(M6.transitions=e.filter(e=>e.from!==e.to||(W.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1)).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},`setTransitions`),getConfig:U(()=>mL({...FF.cynefin,...WF().cynefin}),`getConfig`),clear:U(()=>{uI(),M6=hHi()},`clear`),setAccTitle:dI,getAccTitle:fI,setDiagramTitle:hI,getDiagramTitle:gI,getAccDescription:mI,setAccDescription:pI},gHi=U(e=>{Nq(e,N6),N6.setDomains(e.domains),N6.setTransitions(e.transitions)},`populate`),_Hi={parse:U(async e=>{let t=await n4(`cynefin`,e);W.debug(t),gHi(t)},`parse`)},U(j6,`seededRandom`),U(lHi,`hashString`),U(uHi,`resolveSeed`),U(dHi,`generateFoldPath`),U(fHi,`generateHorizontalBoundary`),U(pHi,`generateCliffPath`),U(mHi,`generateConfusionPath`),vHi={complex:{model:`Probe → Sense → Respond`,practice:`Emergent Practices`},complicated:{model:`Sense → Analyse → Respond`,practice:`Good Practices`},clear:{model:`Sense → Categorise → Respond`,practice:`Best Practices`},chaotic:{model:`Act → Sense → Respond`,practice:`Novel Practices`},confusion:{model:``,practice:`Disorder`}},yHi=U((e,t)=>{let n=e/2,r=t/2;return{complex:{cx:n/2,cy:r/2,x:0,y:0,w:n,h:r},complicated:{cx:n+n/2,cy:r/2,x:n,y:0,w:n,h:r},chaotic:{cx:n/2,cy:r+r/2,x:0,y:r,w:n,h:r},clear:{cx:n+n/2,cy:r+r/2,x:n,y:r,w:n,h:r},confusion:{cx:n,cy:r,x:n*.7,y:r*.7,w:n*.6,h:r*.6}}},`getDomainLayouts`),bHi=U(()=>mL(MF(),WF().themeVariables).cynefin,`getCynefinDomainColors`),xHi=3,SHi={draw:U((e,t,n,r)=>{let i=r.db,a=i.getDomains(),o=i.getTransitions(),s=i.getDiagramTitle(),l=i.getAccTitle(),u=i.getAccDescription(),d=i.getConfig(),f=bHi();W.debug(`Rendering Cynefin diagram`);let p=d.width,m=d.height,h=d.padding,g=d.showDomainDescriptions,_=d.boundaryAmplitude,v=p+h*2,y=m+h*2,b={complex:f.complexBg,complicated:f.complicatedBg,clear:f.clearBg,chaotic:f.chaoticBg,confusion:f.confusionBg},x=ZI(t);sI(x,y,v,d.useMaxWidth??!0),x.attr(`viewBox`,`0 0 ${v} ${y}`),l&&x.append(`title`).text(l),u&&x.append(`desc`).text(u);let S=x.append(`g`).attr(`transform`,`translate(${h}, ${h})`),C=yHi(p,m),w=uHi(d.seed,t),T=S.append(`g`).attr(`class`,`cynefin-backgrounds`),E=[`complex`,`complicated`,`chaotic`,`clear`];for(let e of E){let t=C[e];T.append(`rect`).attr(`class`,`cynefinDomain`).attr(`x`,t.x).attr(`y`,t.y).attr(`width`,t.w).attr(`height`,t.h).attr(`fill`,b[e]).attr(`fill-opacity`,.4).attr(`stroke`,`none`)}let D=S.append(`g`).attr(`class`,`cynefin-boundaries`);D.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,dHi(p,m,w,_)).attr(`fill`,`none`),D.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,fHi(p,m,w+100,_)).attr(`fill`,`none`),D.append(`path`).attr(`class`,`cynefinCliff`).attr(`d`,pHi(p,m)).attr(`fill`,`none`);let O=p*.15,k=m*.15;S.append(`path`).attr(`class`,`cynefinConfusion`).attr(`d`,mHi(p/2,m/2,O,k)).attr(`fill`,b.confusion).attr(`fill-opacity`,.5);let A=S.append(`g`).attr(`class`,`cynefin-labels`);for(let e of E){let t=C[e];A.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,t.cx).attr(`y`,g?t.cy-30:t.cy).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(e.charAt(0).toUpperCase()+e.slice(1))}if(A.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,p/2).attr(`y`,g?m/2-10:m/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(`Confusion`),g){let e=S.append(`g`).attr(`class`,`cynefin-subtitles`);for(let t of E){let n=C[t],r=vHi[t];e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy-10).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.model),e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy+5).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.practice)}e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,p/2).attr(`y`,m/2+8).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(vHi.confusion.practice)}let j=S.append(`g`).attr(`class`,`cynefin-items`);for(let e of[`complex`,`complicated`,`chaotic`,`clear`,`confusion`]){let t=a.get(e);if(!t||t.items.length===0)continue;let n=C[e],r=e===`confusion`,i=t.items,o=0;r&&t.items.length>xHi&&(o=t.items.length-xHi,i=t.items.slice(0,xHi));let s;if(r){let e=g?22:14;s=n.cy+e}else s=n.cy+(g?25:15);if([...i].forEach((t,r)=>{let i=s+r*30,a=j.append(`g`),o=a.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,13).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(t.label),l=t.label.length*7,u=o.node();if(u&&typeof u.getBBox==`function`){let e=u.getBBox();e.width>0&&(l=e.width)}let d=l+20,f=n.cx-d/2;a.attr(`transform`,`translate(${f}, ${i})`),a.insert(`rect`,`text`).attr(`class`,`cynefinItem`).attr(`x`,0).attr(`y`,0).attr(`width`,d).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,b[e]).attr(`fill-opacity`,.95),o.attr(`x`,d/2).attr(`y`,13)}),o>0){let t=s+i.length*30,r=`+${o} more`,a=j.append(`g`),l=a.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,13).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(r),u=r.length*7,d=l.node();if(d&&typeof d.getBBox==`function`){let e=d.getBBox();e.width>0&&(u=e.width)}let f=u+20,p=n.cx-f/2;a.attr(`transform`,`translate(${p}, ${t})`),a.insert(`rect`,`text`).attr(`class`,`cynefinItemOverflow`).attr(`x`,0).attr(`y`,0).attr(`width`,f).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,b[e]).attr(`fill-opacity`,.6),l.attr(`x`,f/2).attr(`y`,13)}}if(o.length>0){let e=x.select(`defs`).empty()?x.append(`defs`):x.select(`defs`),n=`cynefin-arrow-${t}`;e.append(`marker`).attr(`id`,n).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`cynefinArrowHead`);let r=S.append(`g`).attr(`class`,`cynefin-arrows`);o.forEach(e=>{let t=C[e.from],i=C[e.to];if(!t||!i)return;if(e.from===e.to){W.warn(`Cynefin renderer: skipping self-loop on domain "${e.from}"`);return}let a=t.cx,o=t.cy,s=i.cx,l=i.cy,u=(a+s)/2,d=(o+l)/2,f=s-a,p=l-o,m=Math.sqrt(f*f+p*p),h=m*.15,g=-p/m,_=f/m,v=u+g*h,y=d+_*h;r.append(`path`).attr(`class`,`cynefinArrowLine`).attr(`d`,`M${a},${o} Q${v},${y} ${s},${l}`).attr(`fill`,`none`).attr(`marker-end`,`url(#${n})`),e.label&&r.append(`text`).attr(`class`,`cynefinArrowLabel`).attr(`x`,v).attr(`y`,y-6).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`auto`).text(e.label)})}s&&S.append(`text`).attr(`class`,`cynefinTitle`).attr(`x`,p/2).attr(`y`,-h/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(s)},`draw`)},CHi=U(()=>mL(MF(),WF().themeVariables).cynefin,`getCynefinTheme`),wHi={parser:_Hi,db:N6,renderer:SHi,styles:U(()=>{let e=CHi();return` .cynefinDomain { stroke: none; } .cynefinDomainLabel { font-size: ${e.domainFontSize}px; font-weight: bold; fill: ${e.labelColor}; } .cynefinSubtitle { font-size: ${e.itemFontSize-1}px; fill: ${e.textColor}; font-style: italic; } .cynefinItem { fill-opacity: 0.95; stroke: ${e.boundaryColor}; stroke-width: 1; } .cynefinItemText { font-size: ${e.itemFontSize}px; fill: ${e.textColor}; } .cynefinItemOverflow { fill-opacity: 0.6; stroke: ${e.boundaryColor}; stroke-width: 1; stroke-dasharray: 3 2; } .cynefinBoundary { stroke: ${e.boundaryColor}; stroke-width: ${e.boundaryWidth}; stroke-dasharray: 6 3; } .cynefinCliff { stroke: ${e.cliffColor}; stroke-width: ${e.cliffWidth}; } .cynefinConfusion { stroke: ${e.boundaryColor}; stroke-width: 1.5; stroke-dasharray: 4 2; } .cynefinArrowLine { stroke: ${e.arrowColor}; stroke-width: ${e.arrowWidth}; fill: none; } .cynefinArrowHead { fill: ${e.arrowColor}; stroke: none; } .cynefinArrowLabel { font-size: ${e.itemFontSize-1}px; fill: ${e.textColor}; } .cynefinTitle { font-size: ${e.domainFontSize+2}px; font-weight: bold; fill: ${e.labelColor}; } `},`styles`)}})),EHi,DHi,OHi,kHi,AHi,jHi,P6,F6,I6,MHi,NHi,PHi,L6,R6,FHi,IHi,LHi,RHi,zHi,BHi,z6,VHi,B6,HHi,UHi,WHi,V6,H6,GHi,KHi,U6,qHi=o((()=>{QI(),bI(),hN(),fN(),OHi=``,kHi=``,AHi=``,jHi=[],P6=new Map,F6=U(e=>QF(e,_I()),`sanitizeText`),I6=U(e=>{switch(e.type){case`terminal`:return{...e,value:F6(e.value)};case`nonterminal`:return{...e,name:F6(e.name)};case`sequence`:return{...e,elements:e.elements.map(I6)};case`choice`:return{...e,alternatives:e.alternatives.map(I6)};case`optional`:return{...e,element:I6(e.element)};case`repetition`:return{...e,element:I6(e.element),separator:e.separator?I6(e.separator):void 0};case`special`:return{...e,text:F6(e.text)}}},`sanitizeAstNode`),MHi=U(()=>{OHi=``,kHi=``,AHi=``,jHi.length=0,P6.clear(),uI(),W.debug(`[Railroad] Database cleared`)},`clear`),NHi=U(e=>{OHi=F6(e),W.debug(`[Railroad] Title set:`,e)},`setTitle`),PHi=U(()=>OHi,`getTitle`),L6={clear:MHi,setTitle:NHi,getTitle:PHi,addRule:U(e=>{let t={...e,name:F6(e.name),definition:I6(e.definition),comment:e.comment?F6(e.comment):void 0};W.debug(`[Railroad] Adding rule:`,t.name),P6.has(t.name)&&W.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),jHi.push(t),P6.set(t.name,t)},`addRule`),getRules:U(()=>jHi,`getRules`),getRule:U(e=>P6.get(e),`getRule`),setAccTitle:U(e=>{kHi=F6(e).replace(/^\s+/g,``),W.debug(`[Railroad] Accessibility title set:`,e)},`setAccTitle`),getAccTitle:U(()=>kHi,`getAccTitle`),setAccDescription:U(e=>{AHi=F6(e).replace(/\n\s+/g,` `),W.debug(`[Railroad] Accessibility description set:`,e)},`setAccDescription`),getAccDescription:U(()=>AHi,`getAccDescription`),setDiagramTitle:NHi,getDiagramTitle:PHi},R6={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:`monospace`,terminalFill:`#FFFFC0`,terminalStroke:`#000000`,terminalTextColor:`#000000`,nonTerminalFill:`#FFFFFF`,nonTerminalStroke:`#000000`,nonTerminalTextColor:`#000000`,lineColor:`#000000`,strokeWidth:2,markerFill:`#000000`,commentFill:`#E8E8E8`,commentStroke:`#888888`,commentTextColor:`#666666`,specialFill:`#F0E0FF`,specialStroke:`#8800CC`,ruleNameColor:`#000066`,showMarkers:!0,markerRadius:5},FHi=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,IHi=/^[\w "',.-]+$/,LHi=new Set([`compactMode`,`padding`,`verticalSeparation`,`horizontalSeparation`,`arcRadius`,`fontSize`,`fontFamily`,`terminalFill`,`terminalStroke`,`terminalTextColor`,`nonTerminalFill`,`nonTerminalStroke`,`nonTerminalTextColor`,`lineColor`,`strokeWidth`,`markerFill`,`commentFill`,`commentStroke`,`commentTextColor`,`specialFill`,`specialStroke`,`ruleNameColor`,`showMarkers`,`markerRadius`]),RHi=U(e=>e?Object.keys(e).every(e=>e===`railroad`||LHi.has(e)):!1,`isRailroadStyleOptions`),zHi=U(e=>e?`railroad`in e&&e.railroad?e.railroad:RHi(e)?e:{}:{},`extractRailroadOverrides`),BHi=U(e=>{if(!e||RHi(e))return{};let{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},`extractThemeOverrides`),z6=U((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return FHi.test(n)?n:t},`sanitizeColorValue`),VHi=U((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return IHi.test(n)?n:t},`sanitizeFontFamilyValue`),B6=U((e,t)=>{let n=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(n)&&n>=0?n:t},`sanitizeNumberValue`),HHi=U(e=>{let t=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(t)&&t>0?t:void 0},`parseThemeFontSize`),UHi=U(e=>{let t=VHi(e.fontFamily,R6.fontFamily),n=HHi(e.fontSize)??R6.fontSize;return{...R6,fontFamily:t,fontSize:n,terminalFill:z6(e.secondBkg??e.secondaryColor,R6.terminalFill),terminalStroke:z6(e.secondaryBorderColor??e.lineColor,R6.terminalStroke),terminalTextColor:z6(e.secondaryTextColor??e.textColor,R6.terminalTextColor),nonTerminalFill:z6(e.mainBkg??e.background,R6.nonTerminalFill),nonTerminalStroke:z6(e.primaryBorderColor??e.lineColor,R6.nonTerminalStroke),nonTerminalTextColor:z6(e.primaryTextColor??e.textColor,R6.nonTerminalTextColor),lineColor:z6(e.lineColor,R6.lineColor),markerFill:z6(e.lineColor,R6.markerFill),commentFill:z6(e.labelBackground??e.tertiaryColor,R6.commentFill),commentStroke:z6(e.tertiaryBorderColor??e.lineColor,R6.commentStroke),commentTextColor:z6(e.tertiaryTextColor??e.textColor,R6.commentTextColor),specialFill:z6(e.tertiaryColor??e.secondaryColor,R6.specialFill),specialStroke:z6(e.tertiaryBorderColor??e.secondaryBorderColor,R6.specialStroke),ruleNameColor:z6(e.titleColor??e.textColor,R6.ruleNameColor)}},`buildThemeDefaults`),WHi=U(e=>{let t=WF(),n=UHi({...MF(),...t.themeVariables??{},...BHi(e)}),r={...t.railroad??{},...zHi(e)};return{compactMode:r.compactMode??n.compactMode,padding:B6(r.padding,n.padding),verticalSeparation:B6(r.verticalSeparation,n.verticalSeparation),horizontalSeparation:B6(r.horizontalSeparation,n.horizontalSeparation),arcRadius:B6(r.arcRadius,n.arcRadius),fontSize:B6(r.fontSize,n.fontSize),fontFamily:VHi(r.fontFamily,n.fontFamily),terminalFill:z6(r.terminalFill,n.terminalFill),terminalStroke:z6(r.terminalStroke,n.terminalStroke),terminalTextColor:z6(r.terminalTextColor,n.terminalTextColor),nonTerminalFill:z6(r.nonTerminalFill,n.nonTerminalFill),nonTerminalStroke:z6(r.nonTerminalStroke,n.nonTerminalStroke),nonTerminalTextColor:z6(r.nonTerminalTextColor,n.nonTerminalTextColor),lineColor:z6(r.lineColor,n.lineColor),strokeWidth:B6(r.strokeWidth,n.strokeWidth),markerFill:z6(r.markerFill,n.markerFill),commentFill:z6(r.commentFill,n.commentFill),commentStroke:z6(r.commentStroke,n.commentStroke),commentTextColor:z6(r.commentTextColor,n.commentTextColor),specialFill:z6(r.specialFill,n.specialFill),specialStroke:z6(r.specialStroke,n.specialStroke),ruleNameColor:z6(r.ruleNameColor,n.ruleNameColor),showMarkers:r.showMarkers??n.showMarkers,markerRadius:B6(r.markerRadius,n.markerRadius)}},`buildRailroadStyleOptions`),V6=U(e=>{let{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:s,nonTerminalTextColor:l,lineColor:u,strokeWidth:d,markerFill:f,commentFill:p,commentStroke:m,commentTextColor:h,specialFill:g,specialStroke:_,ruleNameColor:v}=WHi(e);return` .railroad-diagram { font-family: ${t}; font-size: ${n}px; } .railroad-terminal rect { fill: ${r}; stroke: ${i}; stroke-width: ${d}px; } .railroad-terminal text { fill: ${a}; font-family: ${t}; font-size: ${n}px; text-anchor: middle; dominant-baseline: middle; } .railroad-nonterminal rect { fill: ${o}; stroke: ${s}; stroke-width: ${d}px; } .railroad-nonterminal text { fill: ${l}; font-family: ${t}; font-size: ${n}px; text-anchor: middle; dominant-baseline: middle; } .railroad-line { stroke: ${u}; stroke-width: ${d}px; fill: none; } .railroad-start circle, .railroad-end circle { fill: ${f}; } .railroad-comment ellipse { fill: ${p}; stroke: ${m}; stroke-width: ${d}px; } .railroad-comment text { fill: ${h}; font-style: italic; font-family: ${t}; font-size: ${n}px; text-anchor: middle; dominant-baseline: middle; } .railroad-special rect { fill: ${g}; stroke: ${_}; stroke-width: ${d}px; stroke-dasharray: 5,3; } .railroad-special text { fill: ${l}; font-family: ${t}; font-size: ${n}px; text-anchor: middle; dominant-baseline: middle; } .railroad-rule-name { font-weight: bold; fill: ${v}; font-family: ${t}; font-size: ${n}px; } .railroad-group { /* Grouping container, no specific styles */ } `},`getStyles`),H6=(EHi=class{constructor(){this.d=``}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${+!!r} ${+!!i} ${a} ${o} `,this}build(){return this.d.trim()}},U(EHi,`PathBuilder`),EHi),GHi=(DHi=class{constructor(e,t=WHi()){this.textCache=new Map,this.svg=e,this.config=t}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let t=this.svg.append(`text`).attr(`font-family`,this.config.fontFamily).attr(`font-size`,this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-terminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i).attr(`rx`,10).attr(`ry`,10),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-nonterminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){let n=t.map(t=>this.renderExpression(e,t)),r=0,i=0,a=0;for(let e of n)r+=e.dimensions.width,i=Math.max(i,e.dimensions.up),a=Math.max(a,e.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;let o=e.append(`g`).attr(`class`,`railroad-sequence`),s=0;for(let e=0;ethis.renderExpression(e,t)),r=0,i=0;for(let e of n)r=Math.max(r,e.dimensions.width),i+=e.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;let a=this.config.arcRadius,o=a*4,s=r+o,l=e.append(`g`).attr(`class`,`railroad-choice`),u=0,d=i/2;for(let e of n){let t=u,n=t+e.dimensions.up,i=a*2+(r-e.dimensions.width)/2;l.node().appendChild(e.element).setAttribute(`transform`,`translate(${i}, ${t})`);let o=new H6,f=n>d;n===d?o.moveTo(0,d).lineTo(i,n):o.moveTo(0,d).arcTo(a,a,0,!1,f,a,d+(f?a:-a)).lineTo(a,n-(f?a:-a)).arcTo(a,a,0,!1,!f,a*2,n).lineTo(i,n),l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,o.build());let p=new H6,m=i+e.dimensions.width,h=s-a*2;n===d?p.moveTo(m,n).lineTo(s,d):p.moveTo(m,n).lineTo(h,n).arcTo(a,a,0,!1,!f,s-a,n+(f?-a:a)).lineTo(s-a,d+(f?a:-a)).arcTo(a,a,0,!1,f,s,d),l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,p.build()),u+=e.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:s,height:i,up:d,down:i-d}}}renderOptional(e,t){let n=this.renderExpression(e,t),r=this.config.arcRadius,i=r*2,a=n.dimensions.width+r*4,o=n.dimensions.height+i,s=e.append(`g`).attr(`class`,`railroad-optional`),l=r*2,u=i;s.node().appendChild(n.element).setAttribute(`transform`,`translate(${l}, ${u})`);let d=u+n.dimensions.up,f=new H6().moveTo(0,d).lineTo(r*2,d);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,f.build());let p=new H6().moveTo(l+n.dimensions.width,d).lineTo(a,d);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,p.build());let m=new H6().moveTo(0,d).arcTo(r,r,0,!1,!1,r,d-r).lineTo(r,r).arcTo(r,r,0,!1,!0,r*2,0).lineTo(a-r*2,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,d-r).arcTo(r,r,0,!1,!1,a,d);return s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,m.build()),{element:s.node(),dimensions:{width:a,height:o,up:d,down:o-d}}}renderRepetition(e,t,n){let r=this.renderExpression(e,t),i=this.config.arcRadius,a=i*2,o=r.dimensions.width+i*4,s=n===0,l=r.dimensions.height+a+(s?a:0),u=e.append(`g`).attr(`class`,`railroad-repetition`),d=i*2,f=s?a:0;u.node().appendChild(r.element).setAttribute(`transform`,`translate(${d}, ${f})`);let p=f+r.dimensions.up;u.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new H6().moveTo(0,p).lineTo(i*2,p).build()),u.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new H6().moveTo(d+r.dimensions.width,p).lineTo(o,p).build());let m=f+r.dimensions.height+i,h=new H6().moveTo(d+r.dimensions.width,p).arcTo(i,i,0,!1,!0,d+r.dimensions.width+i,p+i).lineTo(d+r.dimensions.width+i,m).arcTo(i,i,0,!1,!0,d+r.dimensions.width,m+i).lineTo(i*2,m+i).arcTo(i,i,0,!1,!0,i,m).lineTo(i,p+i).arcTo(i,i,0,!1,!0,i*2,p);if(u.append(`path`).attr(`class`,`railroad-line`).attr(`d`,h.build()),s){let e=new H6().moveTo(0,p).arcTo(i,i,0,!1,!1,i,p-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,p-i).arcTo(i,i,0,!1,!1,o,p);u.append(`path`).attr(`class`,`railroad-line`).attr(`d`,e.build())}return{element:u.node(),dimensions:{width:o,height:l,up:p,down:l-p}}}renderSpecial(e,t){let n=this.measureText(`? `+t+` ?`),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-special`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(`? `+t+` ?`),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case`terminal`:return this.renderTerminal(e,t.value);case`nonterminal`:return this.renderNonTerminal(e,t.name);case`sequence`:return this.renderSequence(e,t.elements);case`choice`:return this.renderChoice(e,t.alternatives);case`optional`:return this.renderOptional(e,t.element);case`repetition`:return this.renderRepetition(e,t.element,t.min);case`special`:return this.renderSpecial(e,t.text);default:throw Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){let n=this.svg.append(`g`).attr(`class`,`railroad-rule`).attr(`transform`,`translate(0, ${t})`),r=e.name+` =`,i=this.measureText(r).width+20,a=i+20,o=n.append(`g`),s=this.renderExpression(o,e.definition),l=Math.max(20,s.dimensions.up),u=l-s.dimensions.up;return o.attr(`transform`,`translate(${a}, ${u})`),n.append(`g`).attr(`class`,`railroad-rule-name-group`).append(`text`).attr(`class`,`railroad-rule-name`).attr(`x`,0).attr(`y`,l).text(r),n.append(`g`).attr(`class`,`railroad-start`).append(`circle`).attr(`cx`,i).attr(`cy`,l).attr(`r`,this.config.markerRadius),n.append(`g`).attr(`class`,`railroad-end`).append(`circle`).attr(`cx`,a+s.dimensions.width+10).attr(`cy`,l).attr(`r`,this.config.markerRadius),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new H6().moveTo(i+this.config.markerRadius,l).lineTo(a,l).build()),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new H6().moveTo(a+s.dimensions.width,l).lineTo(a+s.dimensions.width+10-this.config.markerRadius,l).build()),{height:Math.max(40,u+s.dimensions.height+this.config.padding*2),width:a+s.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(let r of e){let e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+this.config.padding*2,height:t+this.config.padding}}},U(DHi,`RailroadRenderer`),DHi),KHi=U((e,t,n)=>{sI(e,t.height,t.width,n),e.attr(`viewBox`,`0 0 ${t.width} ${t.height}`)},`configureRailroadSvgSize`),U6={draw:U((e,t,n)=>{W.debug(`[Railroad] Rendering diagram `+e);try{let e=ZI(t);e.attr(`class`,`railroad-diagram`);let n=WF().railroad,r=(n==null?void 0:n.useMaxWidth)??!0,i=L6.getRules();if(W.debug(`[Railroad] Rendering ${i.length} rules`),i.length===0){W.warn(`[Railroad] No rules to render`),KHi(e,{height:100,width:200},r);return}KHi(e,new GHi(e,WHi()).renderDiagram(i),r),W.debug(`[Railroad] Render complete`)}catch(e){throw W.error(`[Railroad] Render error:`,e),e}},`draw`)}})),JHi=l({default:()=>$Hi,diagram:()=>QHi}),YHi,W6,XHi,ZHi,QHi,$Hi,eUi=o((()=>{qHi(),Pq(),QI(),bI(),hN(),fN(),a4(),YHi=Zxi().Railroad.parser.LangiumParser,W6=U(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(W6);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(W6);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:W6(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:W6(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:W6(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),XHi=U(e=>({name:e.name,definition:W6(e.definition)}),`transformRule`),ZHi=U(e=>{Nq(e,L6),e.title&&L6.setTitle(e.title),e.rules.map(e=>L6.addRule(XHi(e)))},`populateDb`),QHi={parser:{parse:U(e=>{L6.clear(),W.debug(`[Railroad Parser] Starting Langium parse`);let t=YHi.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new i4(t);let n=t.value;W.debug(`[Railroad Parser] Parsed rules:`,n.rules.length),ZHi(n),W.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:L6}},db:L6,renderer:U6,styles:V6},$Hi=QHi})),tUi=l({diagram:()=>lUi}),nUi,G6,rUi,iUi,aUi,oUi,sUi,cUi,lUi,uUi=o((()=>{qHi(),Pq(),QI(),bI(),hN(),fN(),a4(),nUi=aSi().RailroadEbnf.parser.LangiumParser,G6=U(e=>{let t=e.alternatives.map(rUi);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),rUi=U(e=>{let t=e.elements.map(oUi);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),iUi=U(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return G6(e.element);case`EbnfOptional`:return{type:`optional`,element:G6(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:G6(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),aUi=U((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},iUi(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),oUi=U(e=>e.postfixes.reduce((e,t)=>aUi(e,t),iUi(e.base)),`transformTerm`),sUi=U(e=>({name:e.name,definition:G6(e.definition)}),`transformRule`),cUi=U(e=>{Nq(e,L6),e.title&&L6.setTitle(e.title),e.rules.map(e=>L6.addRule(sUi(e)))},`populateDb`),lUi={parser:{parse:U(e=>{L6.clear(),W.debug(`[EBNF Parser] Starting Langium parse`);let t=nUi.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new i4(t);let n=t.value;W.debug(`[EBNF Parser] Parsed rules:`,n.rules.length),cUi(n),W.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:L6}},db:L6,renderer:U6,styles:V6}})),dUi=l({diagram:()=>bUi}),fUi,pUi,mUi,hUi,gUi,_Ui,vUi,yUi,bUi,xUi=o((()=>{qHi(),Pq(),QI(),bI(),hN(),fN(),a4(),fUi=pSi().RailroadAbnf.parser.LangiumParser,pUi=U(e=>{let t=e.alternatives.map(mUi);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),mUi=U(e=>{let t=e.elements.map(gUi);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),hUi=U(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),gUi=U(e=>{let t=_Ui(e.primary);if(!e.repeat)return t;let{min:n,max:r}=hUi(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),_Ui=U(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return pUi(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:pUi(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),vUi=U(e=>({name:e.name,definition:pUi(e.definition)}),`transformRule`),yUi=U(e=>{Nq(e,L6),e.title&&L6.setTitle(e.title),e.rules.map(e=>L6.addRule(vUi(e)))},`populateDb`),bUi={parser:{parse:U(e=>{L6.clear(),W.debug(`[ABNF Parser] Starting Langium parse`);let t=fUi.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new i4(t);let n=t.value;W.debug(`[ABNF Parser] Parsed rules:`,n.rules.length),yUi(n),W.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:L6}},db:L6,renderer:U6,styles:V6}})),SUi=l({diagram:()=>MUi}),CUi,wUi,TUi,EUi,DUi,OUi,kUi,AUi,jUi,MUi,NUi=o((()=>{qHi(),Pq(),QI(),bI(),hN(),fN(),a4(),CUi=bSi().RailroadPeg.parser.LangiumParser,wUi=U(e=>{let t=e.alternatives.map(TUi);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),TUi=U(e=>{let t=e.elements.map(EUi);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),EUi=U(e=>{let t=OUi(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${DUi(t)}`:`!${DUi(t)}`}:t},`transformPrefix`),DUi=U(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),OUi=U(e=>{let t=kUi(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),kUi=U(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return wUi(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),AUi=U(e=>({name:e.name,definition:wUi(e.definition)}),`transformRule`),jUi=U(e=>{Nq(e,L6),e.title&&L6.setTitle(e.title),e.rules.map(e=>L6.addRule(AUi(e)))},`populateDb`),MUi={parser:{parse:U(e=>{L6.clear(),W.debug(`[PEG Parser] Starting Langium parse`);let t=CUi.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new i4(t);let n=t.value;W.debug(`[PEG Parser] Parsed rules:`,n.rules.length),jUi(n),W.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:L6}},db:L6,renderer:U6,styles:V6}})),PUi=l({clearLayoutRenderState:()=>akr,createCommonLayoutRenderer:()=>SV,default:()=>uKi,defaultMeasureLayout:()=>okr,paintLayoutData:()=>skr});function FUi(e,t){e.attr(`role`,yGi),t!==``&&e.attr(`aria-roledescription`,t)}function IUi(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}function LUi(e){let t=e.match(irr);if(!t)return{text:e,metadata:{}};let n=t[1],r=n?t[2].split(` `).map(e=>e.startsWith(n)?e.slice(n.length):e).join(` `):t[2],i=LV(r,{schema:IV})??{};i=typeof i==`object`&&!Array.isArray(i)?i:{};let a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}function RUi(e){let t=TGi(wGi(e)),n=EGi(t.text),r=mL(t.config,n.directive);return e=CGi(n.text),{code:e,title:t.title,config:r}}function zUi(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}function BUi(e){let t=RUi(e);return GF(),Qnr(t.config??{}),t}async function VUi(e,t){K6();try{let{code:t,config:n}=BUi(e);return{diagramType:(await ZGi(t)).type,config:n}}catch(e){if(t!=null&&t.suppressErrors)return!1;throw e}}function HUi(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}function UUi(e={}){var t;let n=OF({},e);n!=null&&n.fontFamily&&!((t=n.themeVariables)!=null&&t.fontFamily)&&(n.themeVariables||(n.themeVariables={}),n.themeVariables.fontFamily=n.fontFamily),qnr(n),n!=null&&n.theme&&n.theme in NF?n.themeVariables=NF[n.theme].getThemeVariables(n.themeVariables):n&&(n.themeVariables=NF.default.getThemeVariables(n.themeVariables));let r=typeof n==`object`?Knr(n):Ynr();F8n(r.logLevel),K6()}function WUi(e,t,n,r){FUi(t,e),IUi(t,n,r,t.attr(`id`))}var GUi,KUi,qUi,JUi,YUi,XUi,ZUi,QUi,$Ui,eWi,tWi,nWi,rWi,iWi,aWi,oWi,sWi,cWi,lWi,uWi,dWi,fWi,pWi,mWi,hWi,gWi,_Wi,vWi,yWi,bWi,xWi,SWi,CWi,wWi,TWi,EWi,DWi,OWi,kWi,AWi,jWi,MWi,NWi,PWi,FWi,IWi,LWi,RWi,zWi,BWi,VWi,HWi,UWi,WWi,GWi,KWi,qWi,JWi,YWi,XWi,ZWi,QWi,$Wi,eGi,tGi,nGi,rGi,iGi,aGi,oGi,sGi,cGi,lGi,uGi,dGi,fGi,pGi,mGi,hGi,gGi,_Gi,K6,vGi,yGi,bGi,xGi,SGi,CGi,wGi,TGi,EGi,DGi,OGi,kGi,AGi,jGi,MGi,NGi,PGi,FGi,IGi,LGi,RGi,zGi,BGi,VGi,HGi,UGi,WGi,GGi,KGi,qGi,JGi,YGi,XGi,ZGi,q6,QGi,$Gi,eKi,tKi,nKi,rKi,iKi,aKi,J6,oKi,sKi,cKi,lKi,Y6,uKi,dKi=o((()=>{QI(),Okr(),RV(),DK(),zR(),XR(),LR(),MR(),rL(),JL(),lL(),wL(),bI(),hN(),fN(),Opr(),XI(),WZr(),fx(),Ldr(),xp(),KUi=`c4`,qUi={id:KUi,detector:U(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(l$r(),JZr));return{diagram:e}},void 0,import.meta.url);return{id:KUi,diagram:e}},`loader`)},JUi=`flowchart`,YUi={id:JUi,detector:U((e,t)=>{var n,r;return(t==null||(n=t.flowchart)==null?void 0:n.defaultRenderer)===`dagre-wrapper`||(t==null||(r=t.flowchart)==null?void 0:r.defaultRenderer)===`elk`?!1:/^\s*graph/.test(e)},`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(w$r(),C$r));return{diagram:e}},void 0,import.meta.url);return{id:JUi,diagram:e}},`loader`)},XUi=`flowchart-v2`,ZUi={id:XUi,detector:U((e,t)=>{var n,r,i;return(t==null||(n=t.flowchart)==null?void 0:n.defaultRenderer)!==`dagre-d3`&&((t==null||(r=t.flowchart)==null?void 0:r.defaultRenderer)===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&(t==null||(i=t.flowchart)==null?void 0:i.defaultRenderer)===`dagre-wrapper`?!0:/^\s*flowchart/.test(e))},`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(w$r(),C$r));return{diagram:e}},void 0,import.meta.url);return{id:XUi,diagram:e}},`loader`)},QUi=`swimlane`,$Ui={id:QUi,detector:U(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(D$r(),T$r));return{diagram:e}},void 0,import.meta.url);return{id:QUi,diagram:e}},`loader`)},eWi=`er`,tWi={id:eWi,detector:U(e=>/^\s*erDiagram/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(L$r(),O$r));return{diagram:e}},void 0,import.meta.url);return{id:eWi,diagram:e}},`loader`)},nWi=`gitGraph`,rWi={id:nWi,detector:U(e=>/^\s*gitGraph/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(MTi(),Swi));return{diagram:e}},void 0,import.meta.url);return{id:nWi,diagram:e}},`loader`)},iWi=`gantt`,aWi={id:iWi,detector:U(e=>/^\s*gantt/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(rDi(),LTi));return{diagram:e}},void 0,import.meta.url);return{id:iWi,diagram:e}},`loader`)},oWi=`info`,sWi={id:oWi,detector:U(e=>/^\s*info/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(cDi(),iDi));return{diagram:e}},void 0,import.meta.url);return{id:oWi,diagram:e}},`loader`)},cWi=`pie`,lWi={id:cWi,detector:U(e=>/^\s*pie/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(bDi(),lDi));return{diagram:e}},void 0,import.meta.url);return{id:cWi,diagram:e}},`loader`)},uWi=`quadrantChart`,dWi={id:uWi,detector:U(e=>/^\s*quadrantChart/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(GDi(),xDi));return{diagram:e}},void 0,import.meta.url);return{id:uWi,diagram:e}},`loader`)},fWi=`xychart`,pWi={id:fWi,detector:U(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(QOi(),KDi));return{diagram:e}},void 0,import.meta.url);return{id:fWi,diagram:e}},`loader`)},mWi=`requirement`,hWi={id:mWi,detector:U(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(lki(),$Oi));return{diagram:e}},void 0,import.meta.url);return{id:mWi,diagram:e}},`loader`)},gWi=`sequence`,_Wi={id:gWi,detector:U(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(yAi(),uki));return{diagram:e}},void 0,import.meta.url);return{id:gWi,diagram:e}},`loader`)},vWi=`class`,yWi={id:vWi,detector:U((e,t)=>{var n;return(t==null||(n=t.class)==null?void 0:n.defaultRenderer)!==`dagre-wrapper`&&/^\s*classDiagram/.test(e)},`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(NAi(),jAi));return{diagram:e}},void 0,import.meta.url);return{id:vWi,diagram:e}},`loader`)},bWi=`classDiagram`,xWi={id:bWi,detector:U((e,t)=>{var n;return/^\s*classDiagram/.test(e)&&(t==null||(n=t.class)==null?void 0:n.defaultRenderer)===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e)},`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(IAi(),PAi));return{diagram:e}},void 0,import.meta.url);return{id:bWi,diagram:e}},`loader`)},SWi=`state`,CWi={id:SWi,detector:U((e,t)=>{var n;return(t==null||(n=t.state)==null?void 0:n.defaultRenderer)!==`dagre-wrapper`&&/^\s*stateDiagram/.test(e)},`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Qji(),Mji));return{diagram:e}},void 0,import.meta.url);return{id:SWi,diagram:e}},`loader`)},wWi=`stateDiagram`,TWi={id:wWi,detector:U((e,t)=>{var n;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&(t==null||(n=t.state)==null?void 0:n.defaultRenderer)===`dagre-wrapper`)},`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(tMi(),$ji));return{diagram:e}},void 0,import.meta.url);return{id:wWi,diagram:e}},`loader`)},EWi=`journey`,DWi={id:EWi,detector:U(e=>/^\s*journey/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(PMi(),nMi));return{diagram:e}},void 0,import.meta.url);return{id:EWi,diagram:e}},`loader`)},OWi={draw:U((e,t,n)=>{W.debug(`rendering svg for syntax error `);let r=ZI(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),sI(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},kWi=OWi,AWi={db:{},renderer:OWi,parser:{parse:U(()=>{},`parse`)}},jWi=`flowchart-elk`,MWi={id:jWi,detector:U((e,t={})=>{var n;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&(t==null||(n=t.flowchart)==null?void 0:n.defaultRenderer)===`elk`?(t.layout=`elk`,!0):!1},`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(w$r(),C$r));return{diagram:e}},void 0,import.meta.url);return{id:jWi,diagram:e}},`loader`)},NWi=`timeline`,PWi={id:NWi,detector:U(e=>/^\s*timeline/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(LNi(),FMi));return{diagram:e}},void 0,import.meta.url);return{id:NWi,diagram:e}},`loader`)},FWi=`mindmap`,IWi={id:FWi,detector:U(e=>/^\s*mindmap/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(oPi(),XNi));return{diagram:e}},void 0,import.meta.url);return{id:FWi,diagram:e}},`loader`)},LWi=`kanban`,RWi={id:LWi,detector:U(e=>/^\s*kanban/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(SPi(),sPi));return{diagram:e}},void 0,import.meta.url);return{id:LWi,diagram:e}},`loader`)},zWi=`sankey`,BWi={id:zWi,detector:U(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(zFi(),xFi));return{diagram:e}},void 0,import.meta.url);return{id:zWi,diagram:e}},`loader`)},VWi=`packet`,HWi={id:VWi,detector:U(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>($Fi(),BFi));return{diagram:e}},void 0,import.meta.url);return{id:VWi,diagram:e}},`loader`)},UWi=`radar`,WWi={id:UWi,detector:U(e=>/^\s*radar-beta/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(wIi(),eIi));return{diagram:e}},void 0,import.meta.url);return{id:UWi,diagram:e}},`loader`)},GWi=`block`,KWi={id:GWi,detector:U(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(fLi(),TIi));return{diagram:e}},void 0,import.meta.url);return{id:GWi,diagram:e}},`loader`)},qWi=`treeView`,JWi={id:qWi,detector:U(e=>/^\s*treeView-beta/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(GLi(),pLi));return{diagram:e}},void 0,import.meta.url);return{id:qWi,diagram:e}},`loader`)},YWi=`architecture`,XWi={id:YWi,detector:U(e=>/^\s*architecture/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(MRi(),YLi));return{diagram:e}},void 0,import.meta.url);return{id:YWi,diagram:e}},`loader`)},ZWi=`eventmodeling`,QWi={id:ZWi,detector:U(e=>/^\s*eventmodeling/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Dzi(),NRi));return{diagram:e}},void 0,import.meta.url);return{id:ZWi,diagram:e}},`loader`)},$Wi=`ishikawa`,eGi={id:$Wi,detector:U(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Qzi(),Ozi));return{diagram:e}},void 0,import.meta.url);return{id:$Wi,diagram:e}},`loader`)},tGi=`venn`,nGi={id:tGi,detector:U(e=>/^\s*venn-beta/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(bVi(),GBi));return{diagram:e}},void 0,import.meta.url);return{id:tGi,diagram:e}},`loader`)},rGi=`treemap`,iGi={id:rGi,detector:U(e=>/^\s*treemap/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(MVi(),xVi));return{diagram:e}},void 0,import.meta.url);return{id:rGi,diagram:e}},`loader`)},aGi=`wardley`,oGi={id:aGi,detector:U(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(sHi(),NVi));return{diagram:e}},void 0,import.meta.url);return{id:aGi,diagram:e}},`loader`)},sGi=`cynefin`,cGi={id:sGi,detector:U(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(THi(),cHi));return{diagram:e}},void 0,import.meta.url);return{id:sGi,diagram:e}},`loader`)},lGi=`railroad`,uGi={id:lGi,detector:U(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(eUi(),JHi));return{diagram:e}},void 0,import.meta.url);return{id:lGi,diagram:e}},`loader`)},dGi=`railroadEbnf`,fGi={id:dGi,detector:U(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(uUi(),tUi));return{diagram:e}},void 0,import.meta.url);return{id:dGi,diagram:e}},`loader`)},pGi=`railroadAbnf`,mGi={id:pGi,detector:U(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(xUi(),dUi));return{diagram:e}},void 0,import.meta.url);return{id:pGi,diagram:e}},`loader`)},hGi=`railroadPeg`,gGi={id:hGi,detector:U(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:U(async()=>{let{diagram:e}=await bp(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(NUi(),SUi));return{diagram:e}},void 0,import.meta.url);return{id:hGi,diagram:e}},`loader`)},_Gi=!1,K6=U(()=>{_Gi||(_Gi=!0,yI(`error`,AWi,e=>e.toLowerCase().trim()===`error`),yI(`---`,{db:{clear:U(()=>{},`clear`)},styles:{},renderer:{draw:U(()=>{},`draw`)},parser:{parse:U(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:U(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),XF(MWi,IWi,XWi),XF(qUi,RWi,xWi,yWi,tWi,aWi,sWi,lWi,hWi,_Wi,$Ui,ZUi,YUi,PWi,rWi,TWi,CWi,DWi,dWi,BWi,HWi,pWi,KWi,QWi,JWi,WWi,eGi,iGi,uGi,fGi,mGi,gGi,nGi,oGi,cGi))},`addDiagrams`),vGi=U(async()=>{W.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(JF).map(async([e,{detector:t,loader:n}])=>{if(n)try{Vrr(e)}catch{try{let{diagram:e,id:r}=await n();yI(r,e,t)}catch(t){throw W.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete JF[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){W.error(`Failed to load ${e.length} external diagrams`);for(let t of e)W.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),yGi=`graphics-document document`,U(FUi,`setA11yDiagramInfo`),U(IUi,`addSVGa11yTitleDescription`),bGi=(GUi=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static async fromText(t,n={}){var r;let i=WF(),a=YF(t,i);t=mfr(t)+` `;try{Vrr(a)}catch{let e=crr(a);if(!e)throw new orr(`Diagram ${a} not found.`);let{id:t,diagram:n}=await e();yI(t,n)}let{db:o,parser:s,renderer:l,init:u}=Vrr(a);if(s.parser&&(s.parser.yy=o),(r=o.clear)==null||r.call(o),u==null||u(i),n.title){var d;(d=o.setDiagramTitle)==null||d.call(o,n.title)}return await s.parse(t),new e(a,t,o,s,l)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},U(GUi,`Diagram`),GUi),xGi=[],SGi=U(()=>{xGi.forEach(e=>{e()}),xGi=[]},`attachFunctions`),CGi=U(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`),U(LUi,`extractFrontMatter`),wGi=U(e=>e.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),TGi=U(e=>{let{text:t,metadata:n}=LUi(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||(a.gantt={}),a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),EGi=U(e=>{let t=xL.detectInit(e)??{},n=xL.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):(n==null?void 0:n.type)===`wrap`&&(t.wrap=!0),{text:efr(e),directive:t}},`processDirectives`),U(RUi,`preprocessDiagram`),U(zUi,`toBase64`),DGi=5e4,OGi=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,kGi=`sandbox`,AGi=`loose`,jGi=`http://www.w3.org/2000/svg`,MGi=`http://www.w3.org/1999/xlink`,NGi=`http://www.w3.org/1999/xhtml`,PGi=`100%`,FGi=`100%`,IGi=`border:0;margin:0;`,LGi=`margin:0`,RGi=`allow-top-navigation-by-user-activation allow-popups`,zGi=`The "iframe" tag is not supported by your browser.`,BGi=[`foreignobject`],VGi=[`dominant-baseline`],U(BUi,`processAndSetConfigs`),U(VUi,`parse`),HGi=U((e,t,n=[])=>`.${e} ${t} ${Gnr(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),UGi=U((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=KF(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{Fdr(e.styles)||r.forEach(t=>{n.insertRule(HGi(e.id,t,e.styles),n.cssRules.length)}),Fdr(e.textStyles)||n.insertRule(HGi(e.id,`tspan`,((e==null?void 0:e.textStyles)||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0){if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=anr(t)+` `}else r+=`${e.themeCSS} `}return r+anr(n)},`createCssStyles`),WGi=U((e,t)=>zZr(NZr(`${e}{${t}}`),HZr([U(function(t,n,r,i){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(n=>n===e&&Array.isArray(t.children)&&t.children.every(e=>e.type===`decl`&&new Set([`font-family`,`font-size`,`fill`]).has(e.props))?n:!n.startsWith(`${e} `)&&!n.startsWith(`${e}>`)||n.startsWith(`${e} ||`)?`${e} ${n}`:n)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(W.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=sZr))},`addNamespace`),BZr])),`compileCSS`),GGi=U((e,t,n,r)=>{let i=UGi(e,n);return WGi(r,Orr(t,i,{...e.themeVariables,theme:e.theme,look:e.look},r))},`createUserStyles`),KGi=U((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=SL(r),r=r.replace(/
    /g,`
    `),r},`cleanUpSvgCode`),qGi=U((e=``,t)=>{var n;return``},`putIntoIFrame`),JGi=U((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,jGi);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`),U(HUi,`sandboxedIframe`),YGi=U((e,t,n,r)=>{var i,a,o;(i=e.getElementById(t))==null||i.remove(),(a=e.getElementById(n))==null||a.remove(),(o=e.getElementById(r))==null||o.remove()},`removeExistingElements`),XGi=U(async function(e,t,n){var r,i,a,o,s,l;K6();let u=BUi(t);t=u.code;let d=WF();W.debug(d),t.length>((d==null?void 0:d.maxTextSize)??DGi)&&(t=OGi);let f=`#${e}`,p=`i`+e,m=`#`+p,h=`d`+e,g=`#`+h,_=U(()=>{let e=DI(y?m:g).node();e&&`remove`in e&&e.remove()},`removeTempElements`),v=DI(document.body),y=d.securityLevel===kGi,b=d.securityLevel===AGi,x=d.fontFamily;n===void 0?(YGi(document,e,h,p),y?(v=DI(HUi(DI(document.body),p).nodes()[0].contentDocument.body),v.node().style.margin=`0`):v=DI(`body`),JGi(v,e,h)):(n&&(n.innerHTML=``),y?(v=DI(HUi(DI(n),p).nodes()[0].contentDocument.body),v.node().style.margin=`0`):v=DI(n),JGi(v,e,h,`font-family: ${x}`,MGi));let S,C;try{S=await bGi.fromText(t,{title:u.title})}catch(e){if(d.suppressErrorRendering)throw _(),e;S=await bGi.fromText(`error`),C=e}let w=v.select(g).node(),T=S.type,E=w.firstChild,D=E.firstChild,O=GGi(d,T,(r=(i=S.renderer).getClasses)==null?void 0:r.call(i,t,S),f),k=document.createElement(`style`);k.innerHTML=O,E.insertBefore(k,D);try{await S.renderer.draw(t,e,`11.17.2`,S)}catch(n){throw d.suppressErrorRendering?_():kWi.draw(t,e,`11.17.2`),n}WUi(T,v.select(`${g} svg`),(a=(o=S.db).getAccTitle)==null?void 0:a.call(o),(s=(l=S.db).getAccDescription)==null?void 0:s.call(l));let A=U(()=>{v.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,NGi);let t=v.select(g).node().innerHTML;if(W.debug(`config.arrowMarkerAbsolute`,d.arrowMarkerAbsolute),t=KGi(t,y,RF(d.arrowMarkerAbsolute)),y){let e=v.select(g+` svg`).node();t=qGi(t,e)}else b||(t=dx.sanitize(t,{ADD_TAGS:BGi,ADD_ATTR:VGi,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return SGi(),t},`serializeSvg`)();if(C)throw C;return _(),{diagramType:T,svg:A,bindFunctions:S.db.bindFunctions}},`render`),U(UUi,`initialize`),ZGi=U((e,t={})=>{let{code:n}=RUi(e);return bGi.fromText(n,t)},`getDiagramFromText`),U(WUi,`addA11yInfo`),q6=Object.freeze({render:XGi,parse:VUi,getDiagramFromText:ZGi,initialize:UUi,getConfig:WF,setConfig:Xnr,getSiteConfig:Ynr,updateSiteConfig:Jnr,reset:U(()=>{GF()},`reset`),globalReset:U(()=>{GF(LF)},`globalReset`),defaultConfig:LF}),F8n(WF().logLevel),GF(WF()),QGi=U((e,t,n)=>{W.warn(e),Kdr(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),$Gi=U(async function(e={querySelector:`.mermaid`}){try{await eKi(e)}catch(t){if(Kdr(t)&&W.error(t.str),Y6.parseError&&Y6.parseError(t),!e.suppressErrors)throw W.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),eKi=U(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=q6.getConfig();W.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);W.debug(`Found ${i.length} diagrams`),(r==null?void 0:r.startOnLoad)!==void 0&&(W.debug(`Start On Load: `+(r==null?void 0:r.startOnLoad)),q6.updateSiteConfig({startOnLoad:r==null?void 0:r.startOnLoad}));let a=new xL.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(W.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=Dpr(xL.entityDecode(o)).trim().replace(//gi,`
    `);let r=xL.detectInit(o);r&&W.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await lKi(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){QGi(e,s,Y6.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),tKi=U(function(e){q6.initialize(e)},`initialize`),nKi=U(async function(e,t,n){W.warn(`mermaid.init is deprecated. Please use run instead.`),e&&tKi(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(r.nodes=t instanceof HTMLElement?[t]:t),await $Gi(r)},`init`),rKi=U(async(e,{lazyLoad:t=!0}={})=>{K6(),XF(...e),t===!1&&await vGi()},`registerExternalDiagrams`),iKi=U(function(){if(Y6.startOnLoad){let{startOnLoad:e}=q6.getConfig();e&&Y6.run().catch(e=>W.error(`Mermaid failed to initialize`,e))}},`contentLoaded`),typeof document<`u`&&window.addEventListener(`load`,iKi,!1),aKi=U(function(e){Y6.parseError=e},`setParseErrorHandler`),J6=[],oKi=!1,sKi=U(async()=>{if(!oKi){for(oKi=!0;J6.length>0;){let e=J6.shift();if(e)try{await e()}catch(e){W.error(`Error executing queue`,e)}}oKi=!1}},`executeQueue`),cKi=U(async(e,t)=>new Promise((n,r)=>{let i=U(()=>new Promise((i,a)=>{q6.parse(e,t).then(e=>{i(e),n(e)},e=>{var t;W.error(`Error parsing`,e),(t=Y6.parseError)==null||t.call(Y6,e),a(e),r(e)})}),`performCall`);J6.push(i),sKi().catch(r)}),`parse`),lKi=U((e,t,n)=>new Promise((r,i)=>{let a=U(()=>new Promise((a,o)=>{q6.render(e,t,n).then(e=>{a(e),r(e)},e=>{var t;W.error(`Error parsing`,e),(t=Y6.parseError)==null||t.call(Y6,e),o(e),i(e)})}),`performCall`);J6.push(a),sKi().catch(i)}),`render`),Y6={startOnLoad:!0,mermaidAPI:q6,parse:cKi,render:lKi,init:nKi,run:$Gi,registerExternalDiagrams:rKi,registerLayoutLoaders:oZr,initialize:tKi,parseError:void 0,contentLoaded:iKi,setParseErrorHandler:aKi,detectType:YF,registerIconPacks:sL,getRegisteredDiagramsMetadata:U(()=>Object.keys(JF).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},uKi=Y6})),fKi=l({Mermaid:()=>mKi});function pKi(){return _Ki||(_Ki=bp(()=>Promise.resolve().then(()=>(dKi(),PUi)).then(e=>(gKi=e.default,gKi.initialize({startOnLoad:!1,theme:`default`,securityLevel:`strict`}),gKi)),void 0,import.meta.url)),_Ki}function mKi({chart:e,className:t,cssClass:n,...r}){let i=(0,hKi.useRef)(null),[a,o]=(0,hKi.useState)(null);return(0,hKi.useEffect)(()=>{if(!e.trim()){var t;(t=i.current)==null||t.replaceChildren(),o(null);return}if(!i.current)return;let n=i.current,r=!1;return pKi().then(async t=>{if(!r)try{let i=`mermaid-${++vKi}`,{svg:a}=await t.render(i,e.trim());r||(n.innerHTML=a,o(null))}catch(e){r||o(String(e))}}),()=>{r=!0}},[e]),(0,X6.jsxs)(X6.Fragment,{children:[(0,X6.jsx)(`div`,{...Ne(r),ref:i,hidden:a!==null,className:a?void 0:xn(`pf-flex pf-justify-center`,t,n)}),a&&(0,X6.jsx)(`pre`,{...Ne(r),className:xn(`pf-text-sm pf-text-muted-foreground`,t,n),children:e})]})}var hKi,X6,gKi,_Ki,vKi,yKi=o((()=>{Pe(),hKi=d(p(),1),Sn(),X6=Ie(),xp(),gKi=null,_Ki=null,vKi=0})),bKi,xKi,SKi,CKi,wKi,TKi,Z6=o((()=>{bKi=10**8*24*60*60*1e3,-bKi,xKi=6048e5,SKi=864e5,CKi=6e4,wKi=36e5,TKi=Symbol.for(`constructDateFrom`)}));function Q6(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&TKi in e?e[TKi](t):e instanceof Date?new e.constructor(t):new Date(t)}var $6=o((()=>{Z6()}));function e8(e,t){return Q6(t||e,e)}var t8=o((()=>{$6()}));function EKi(e,t,n){let r=e8(e,n==null?void 0:n.in);return isNaN(t)?Q6((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}var DKi=o((()=>{$6(),t8()}));function OKi(e,t,n){let r=e8(e,n==null?void 0:n.in);if(isNaN(t))return Q6((n==null?void 0:n.in)||e,NaN);if(!t)return r;let i=r.getDate(),a=Q6((n==null?void 0:n.in)||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}var kKi=o((()=>{$6(),t8()})),AKi=o((()=>{})),jKi=o((()=>{})),MKi=o((()=>{})),NKi=o((()=>{})),PKi=o((()=>{})),FKi=o((()=>{})),IKi=o((()=>{}));function n8(){return LKi}var LKi,r8=o((()=>{LKi={}}));function i8(e,t){var n,r;let i=n8(),a=(t==null?void 0:t.weekStartsOn)??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,o=e8(e,t==null?void 0:t.in),s=o.getDay(),l=(s{r8(),t8()}));function o8(e,t){return i8(e,{...t,weekStartsOn:1})}var s8=o((()=>{a8()}));function RKi(e,t){let n=e8(e,t==null?void 0:t.in),r=n.getFullYear(),i=Q6(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=o8(i),o=Q6(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=o8(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}var zKi=o((()=>{$6(),s8(),t8()}));function BKi(e){let t=e8(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}var VKi=o((()=>{t8()}));function c8(e,...t){let n=Q6.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}var l8=o((()=>{$6()}));function u8(e,t){let n=e8(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}var HKi=o((()=>{t8()}));function UKi(e,t,n){let[r,i]=c8(n==null?void 0:n.in,e,t),a=u8(r),o=u8(i),s=+a-BKi(a),l=+o-BKi(o);return Math.round((s-l)/SKi)}var WKi=o((()=>{VKi(),l8(),Z6(),HKi()}));function GKi(e,t){let n=RKi(e,t),r=Q6((t==null?void 0:t.in)||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),o8(r)}var KKi=o((()=>{$6(),zKi(),s8()})),qKi=o((()=>{})),JKi=o((()=>{})),YKi=o((()=>{})),XKi=o((()=>{})),ZKi=o((()=>{}));function QKi(e,t,n){return EKi(e,t*7,n)}var $Ki=o((()=>{DKi()}));function eqi(e,t,n){return OKi(e,t*12,n)}var tqi=o((()=>{kKi()})),nqi=o((()=>{}));function rqi(e,t){let n,r=t==null?void 0:t.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=Q6.bind(null,e));let t=e8(e,r);(!n||n{$6(),t8()}));function aqi(e,t){let n,r=t==null?void 0:t.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=Q6.bind(null,e));let t=e8(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),Q6(r,n||NaN)}var oqi=o((()=>{$6(),t8()})),sqi=o((()=>{})),cqi=o((()=>{})),lqi=o((()=>{})),uqi=o((()=>{})),dqi=o((()=>{})),fqi=o((()=>{})),pqi=o((()=>{}));function mqi(e,t,n){let[r,i]=c8(n==null?void 0:n.in,e,t);return+u8(r)==+u8(i)}var hqi=o((()=>{l8(),HKi()}));function gqi(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}var _qi=o((()=>{}));function vqi(e){return!(!gqi(e)&&typeof e!=`number`||isNaN(+e8(e)))}var yqi=o((()=>{_qi(),t8()})),bqi=o((()=>{})),xqi=o((()=>{})),Sqi=o((()=>{}));function Cqi(e,t,n){let[r,i]=c8(n==null?void 0:n.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}var wqi=o((()=>{l8()})),Tqi=o((()=>{})),Eqi=o((()=>{})),Dqi=o((()=>{})),Oqi=o((()=>{})),kqi=o((()=>{})),Aqi=o((()=>{})),jqi=o((()=>{})),Mqi=o((()=>{})),Nqi=o((()=>{})),Pqi=o((()=>{})),Fqi=o((()=>{}));function Iqi(e,t){let n=e8(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}var Lqi=o((()=>{t8()})),Rqi=o((()=>{})),zqi=o((()=>{})),Bqi=o((()=>{})),Vqi=o((()=>{})),Hqi=o((()=>{})),Uqi=o((()=>{}));function Wqi(e,t){let[n,r]=c8(e,t.start,t.end);return{start:n,end:r}}var Gqi=o((()=>{l8()})),Kqi=o((()=>{})),qqi=o((()=>{})),Jqi=o((()=>{}));function Yqi(e,t){let{start:n,end:r}=Wqi(t==null?void 0:t.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setDate(1);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);let l=[];for(;+o<=a;)l.push(Q6(n,o)),o.setMonth(o.getMonth()+s);return i?l.reverse():l}var Xqi=o((()=>{Gqi(),$6()})),Zqi=o((()=>{})),Qqi=o((()=>{})),$qi=o((()=>{})),eJi=o((()=>{}));function tJi(e,t){let n=e8(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}var nJi=o((()=>{t8()})),rJi=o((()=>{}));function iJi(e,t){let n=e8(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}var aJi=o((()=>{t8()}));function oJi(e,t){let n=e8(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}var sJi=o((()=>{t8()})),cJi=o((()=>{}));function lJi(e,t){let{start:n,end:r}=Wqi(t==null?void 0:t.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setMonth(0,1);let s=(t==null?void 0:t.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);let l=[];for(;+o<=a;)l.push(Q6(n,o)),o.setFullYear(o.getFullYear()+s);return i?l.reverse():l}var uJi=o((()=>{Gqi(),$6()})),dJi=o((()=>{})),fJi=o((()=>{}));function pJi(e,t){var n,r;let i=n8(),a=(t==null?void 0:t.weekStartsOn)??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,o=e8(e,t==null?void 0:t.in),s=o.getDay(),l=(s{r8(),t8()}));function hJi(e,t){return pJi(e,{...t,weekStartsOn:1})}var gJi=o((()=>{mJi()})),_Ji=o((()=>{})),vJi=o((()=>{})),yJi=o((()=>{})),bJi=o((()=>{})),xJi=o((()=>{})),SJi=o((()=>{})),CJi=o((()=>{})),wJi,TJi,EJi=o((()=>{wJi={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},TJi=(e,t,n)=>{let r,i=wJi[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r}}));function DJi(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var OJi=o((()=>{})),kJi,AJi,jJi,MJi,NJi=o((()=>{OJi(),kJi={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},AJi={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},jJi={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},MJi={date:DJi({formats:kJi,defaultWidth:`full`}),time:DJi({formats:AJi,defaultWidth:`full`}),dateTime:DJi({formats:jJi,defaultWidth:`full`})}})),PJi,FJi,IJi=o((()=>{PJi={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},FJi=(e,t,n,r)=>PJi[e]}));function d8(e){return(t,n)=>{let r=n!=null&&n.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n!=null&&n.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var LJi=o((()=>{})),RJi,zJi,BJi,VJi,HJi,UJi,WJi,GJi,KJi=o((()=>{LJi(),RJi={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},zJi={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},BJi={narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},VJi={narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},HJi={narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},UJi={narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},WJi=(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},GJi={ordinalNumber:WJi,era:d8({values:RJi,defaultWidth:`wide`}),quarter:d8({values:zJi,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:d8({values:BJi,defaultWidth:`wide`}),day:d8({values:VJi,defaultWidth:`wide`}),dayPeriod:d8({values:HJi,defaultWidth:`wide`,formattingValues:UJi,defaultFormattingWidth:`wide`})}}));function f8(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?JJi(s,e=>e.test(o)):qJi(s,e=>e.test(o)),u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;let d=t.slice(o.length);return{value:u,rest:d}}}function qJi(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function JJi(e,t){for(let n=0;n{}));function XJi(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var ZJi=o((()=>{})),QJi,$Ji,eYi,tYi,nYi,rYi,iYi,aYi,oYi,sYi,cYi,lYi,uYi,dYi=o((()=>{YJi(),ZJi(),QJi=/^(\d+)(th|st|nd|rd)?/i,$Ji=/\d+/i,eYi={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tYi={any:[/^b/i,/^(a|c)/i]},nYi={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rYi={any:[/1/i,/2/i,/3/i,/4/i]},iYi={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},aYi={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oYi={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},sYi={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cYi={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},lYi={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},uYi={ordinalNumber:XJi({matchPattern:QJi,parsePattern:$Ji,valueCallback:e=>parseInt(e,10)}),era:f8({matchPatterns:eYi,defaultMatchWidth:`wide`,parsePatterns:tYi,defaultParseWidth:`any`}),quarter:f8({matchPatterns:nYi,defaultMatchWidth:`wide`,parsePatterns:rYi,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:f8({matchPatterns:iYi,defaultMatchWidth:`wide`,parsePatterns:aYi,defaultParseWidth:`any`}),day:f8({matchPatterns:oYi,defaultMatchWidth:`wide`,parsePatterns:sYi,defaultParseWidth:`any`}),dayPeriod:f8({matchPatterns:cYi,defaultMatchWidth:`any`,parsePatterns:lYi,defaultParseWidth:`any`})}})),p8,fYi=o((()=>{EJi(),NJi(),IJi(),KJi(),dYi(),p8={code:`en-US`,formatDistance:TJi,formatLong:MJi,formatRelative:FJi,localize:GJi,match:uYi,options:{weekStartsOn:0,firstWeekContainsDate:1}}})),pYi=o((()=>{fYi()}));function mYi(e,t){let n=e8(e,t==null?void 0:t.in);return UKi(n,oJi(n))+1}var hYi=o((()=>{WKi(),sJi(),t8()}));function gYi(e,t){let n=e8(e,t==null?void 0:t.in),r=+o8(n)-GKi(n);return Math.round(r/xKi)+1}var _Yi=o((()=>{Z6(),s8(),KKi(),t8()}));function vYi(e,t){var n,r;let i=e8(e,t==null?void 0:t.in),a=i.getFullYear(),o=n8(),s=(t==null?void 0:t.firstWeekContainsDate)??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??o.firstWeekContainsDate??((r=o.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,l=Q6((t==null?void 0:t.in)||e,0);l.setFullYear(a+1,0,s),l.setHours(0,0,0,0);let u=i8(l,t),d=Q6((t==null?void 0:t.in)||e,0);d.setFullYear(a,0,s),d.setHours(0,0,0,0);let f=i8(d,t);return+i>=+u?a+1:+i>=+f?a:a-1}var yYi=o((()=>{r8(),$6(),a8(),t8()}));function bYi(e,t){var n,r;let i=n8(),a=(t==null?void 0:t.firstWeekContainsDate)??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??i.firstWeekContainsDate??((r=i.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,o=vYi(e,t),s=Q6((t==null?void 0:t.in)||e,0);return s.setFullYear(o,0,a),s.setHours(0,0,0,0),i8(s,t)}var xYi=o((()=>{r8(),$6(),yYi(),a8()}));function SYi(e,t){let n=e8(e,t==null?void 0:t.in),r=+i8(n,t)-bYi(n,t);return Math.round(r/xKi)+1}var CYi=o((()=>{Z6(),a8(),xYi(),t8()}));function m8(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var wYi=o((()=>{})),h8,TYi=o((()=>{wYi(),h8={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return m8(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):m8(n+1,2)},d(e,t){return m8(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return m8(e.getHours()%12||12,t.length)},H(e,t){return m8(e.getHours(),t.length)},m(e,t){return m8(e.getMinutes(),t.length)},s(e,t){return m8(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return m8(Math.trunc(r*10**(n-3)),t.length)}}}));function EYi(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+m8(a,2)}function DYi(e,t){return e%60==0?(e>0?`-`:`+`)+m8(Math.abs(e)/60,2):g8(e,t)}function g8(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=m8(Math.trunc(r/60),2),a=m8(r%60,2);return n+i+t+a}var _8,OYi,kYi=o((()=>{hYi(),_Yi(),zKi(),CYi(),yYi(),wYi(),TYi(),_8={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},OYi={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return h8.y(e,t)},Y:function(e,t,n,r){let i=vYi(e,r),a=i>0?i:1-i;return t===`YY`?m8(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):m8(a,t.length)},R:function(e,t){return m8(RKi(e),t.length)},u:function(e,t){return m8(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return m8(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return m8(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return h8.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return m8(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=SYi(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):m8(i,t.length)},I:function(e,t,n){let r=gYi(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):m8(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):h8.d(e,t)},D:function(e,t,n){let r=mYi(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):m8(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return m8(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return m8(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return m8(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?_8.noon:r===0?_8.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?_8.evening:r>=12?_8.afternoon:r>=4?_8.morning:_8.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return h8.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):h8.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):m8(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):m8(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):h8.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):h8.s(e,t)},S:function(e,t){return h8.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return DYi(r);case`XXXX`:case`XX`:return g8(r);default:return g8(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return DYi(r);case`xxxx`:case`xx`:return g8(r);default:return g8(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+EYi(r,`:`);default:return`GMT`+g8(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+EYi(r,`:`);default:return`GMT`+g8(r,`:`)}},t:function(e,t,n){return m8(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return m8(+e,t.length)}}})),AYi,jYi,MYi,NYi,PYi=o((()=>{AYi=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},jYi=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},MYi=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return AYi(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`})}return a.replace(`{{date}}`,AYi(r,t)).replace(`{{time}}`,jYi(i,t))},NYi={p:jYi,P:MYi}}));function FYi(e){return zYi.test(e)}function IYi(e){return BYi.test(e)}function LYi(e,t,n){let r=RYi(e,t,n);if(console.warn(r),VYi.includes(e))throw RangeError(r)}function RYi(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var zYi,BYi,VYi,HYi=o((()=>{zYi=/^D+$/,BYi=/^Y+$/,VYi=[`D`,`DD`,`YY`,`YYYY`]}));function v8(e,t,n){var r,i,a,o;let s=n8(),l=(n==null?void 0:n.locale)??s.locale??p8,u=(n==null?void 0:n.firstWeekContainsDate)??(n==null||(r=n.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??((i=s.locale)==null||(i=i.options)==null?void 0:i.firstWeekContainsDate)??1,d=(n==null?void 0:n.weekStartsOn)??(n==null||(a=n.locale)==null||(a=a.options)==null?void 0:a.weekStartsOn)??s.weekStartsOn??((o=s.locale)==null||(o=o.options)==null?void 0:o.weekStartsOn)??0,f=e8(e,n==null?void 0:n.in);if(!vqi(f))throw RangeError(`Invalid time value`);let p=t.match(GYi).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=NYi[t];return n(e,l.formatLong)}return e}).join(``).match(WYi).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:UYi(e)};if(OYi[t])return{isToken:!0,value:e};if(t.match(JYi))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});l.localize.preprocessor&&(p=l.localize.preprocessor(f,p));let m={firstWeekContainsDate:u,weekStartsOn:d,locale:l};return p.map(r=>{if(!r.isToken)return r.value;let i=r.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&IYi(i)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&FYi(i))&&LYi(i,t,String(e));let a=OYi[i[0]];return a(f,i,l.localize,m)}).join(``)}function UYi(e){let t=e.match(KYi);return t?t[1].replace(qYi,`'`):e}var WYi,GYi,KYi,qYi,JYi,YYi=o((()=>{pYi(),r8(),kYi(),PYi(),HYi(),yqi(),t8(),WYi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GYi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KYi=/^'([^]*?)'?$/,qYi=/''/g,JYi=/[a-zA-Z]/})),XYi=o((()=>{})),ZYi=o((()=>{})),QYi=o((()=>{})),$Yi=o((()=>{})),eXi=o((()=>{})),tXi=o((()=>{})),nXi=o((()=>{})),rXi=o((()=>{})),iXi=o((()=>{})),aXi=o((()=>{})),oXi=o((()=>{})),sXi=o((()=>{})),cXi=o((()=>{})),lXi=o((()=>{}));function uXi(e,t){let n=e8(e,t==null?void 0:t.in),r=n.getFullYear(),i=n.getMonth(),a=Q6(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}var dXi=o((()=>{$6(),t8()})),fXi=o((()=>{})),pXi=o((()=>{})),mXi=o((()=>{})),hXi=o((()=>{})),gXi=o((()=>{})),_Xi=o((()=>{})),vXi=o((()=>{})),yXi=o((()=>{})),bXi=o((()=>{}));function xXi(e,t){return e8(e,t==null?void 0:t.in).getMonth()}var SXi=o((()=>{t8()})),CXi=o((()=>{})),wXi=o((()=>{})),TXi=o((()=>{})),EXi=o((()=>{})),DXi=o((()=>{})),OXi=o((()=>{})),kXi=o((()=>{}));function AXi(e,t){return e8(e,t==null?void 0:t.in).getFullYear()}var jXi=o((()=>{t8()})),MXi=o((()=>{})),NXi=o((()=>{})),PXi=o((()=>{})),FXi=o((()=>{})),IXi=o((()=>{})),LXi=o((()=>{})),RXi=o((()=>{}));function zXi(e,t){return+e8(e)>+e8(t)}var BXi=o((()=>{t8()}));function VXi(e,t){return+e8(e)<+e8(t)}var HXi=o((()=>{t8()})),UXi=o((()=>{})),WXi=o((()=>{})),GXi=o((()=>{})),KXi=o((()=>{})),qXi=o((()=>{})),JXi=o((()=>{})),YXi=o((()=>{})),XXi=o((()=>{})),ZXi=o((()=>{})),QXi=o((()=>{})),$Xi=o((()=>{})),eZi=o((()=>{})),tZi=o((()=>{})),nZi=o((()=>{})),rZi=o((()=>{})),iZi=o((()=>{})),aZi=o((()=>{})),oZi=o((()=>{})),sZi=o((()=>{})),cZi=o((()=>{})),lZi=o((()=>{}));function uZi(e,t,n){let[r,i]=c8(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}var dZi=o((()=>{l8()})),fZi=o((()=>{})),pZi=o((()=>{})),mZi=o((()=>{}));function hZi(e,t,n){let[r,i]=c8(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()}var gZi=o((()=>{l8()})),_Zi=o((()=>{})),vZi=o((()=>{})),yZi=o((()=>{})),bZi=o((()=>{})),xZi=o((()=>{})),SZi=o((()=>{})),CZi=o((()=>{})),wZi=o((()=>{})),TZi=o((()=>{})),EZi=o((()=>{})),DZi=o((()=>{})),OZi=o((()=>{})),kZi=o((()=>{})),AZi=o((()=>{})),jZi=o((()=>{})),MZi=o((()=>{})),NZi=o((()=>{})),PZi=o((()=>{})),FZi=o((()=>{})),IZi=o((()=>{})),LZi=o((()=>{})),RZi=o((()=>{})),zZi=o((()=>{})),BZi=o((()=>{})),VZi=o((()=>{})),HZi=o((()=>{})),UZi=o((()=>{})),WZi=o((()=>{})),GZi=o((()=>{})),KZi=o((()=>{})),qZi=o((()=>{})),JZi=o((()=>{})),YZi=o((()=>{})),XZi=o((()=>{})),ZZi=o((()=>{})),QZi=o((()=>{})),$Zi=o((()=>{})),eQi=o((()=>{})),tQi=o((()=>{})),nQi=o((()=>{}));function y8(e,t){let n=()=>Q6(t==null?void 0:t.in,NaN),r=(t==null?void 0:t.additionalDigits)??2,i=rQi(e),a;if(i.date){let e=iQi(i.date,r);a=aQi(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,l;if(i.time&&(s=oQi(i.time),isNaN(s)))return n();if(i.timezone){if(l=cQi(i.timezone),isNaN(l))return n()}else{let e=new Date(o+s),n=e8(0,t==null?void 0:t.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return e8(o+s+l,t==null?void 0:t.in)}function rQi(e){let t={},n=e.split(x8.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],x8.timeZoneDelimiter.test(t.date)&&(t.date=e.split(x8.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=x8.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function iQi(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function aQi(e,t){if(t===null)return new Date(NaN);let n=e.match(gQi);if(!n)return new Date(NaN);let r=!!n[4],i=b8(n[1]),a=b8(n[2])-1,o=b8(n[3]),s=b8(n[4]),l=b8(n[5])-1;if(r)return pQi(t,s,l)?lQi(t,s,l):new Date(NaN);{let e=new Date(0);return!dQi(t,a,o)||!fQi(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function b8(e){return e?parseInt(e):1}function oQi(e){let t=e.match(_Qi);if(!t)return NaN;let n=sQi(t[1]),r=sQi(t[2]),i=sQi(t[3]);return mQi(n,r,i)?n*wKi+r*CKi+i*1e3:NaN}function sQi(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function cQi(e){if(e===`Z`)return 0;let t=e.match(vQi);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return hQi(r,i)?n*(r*wKi+i*CKi):NaN}function lQi(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}function uQi(e){return e%400==0||e%4==0&&e%100!=0}function dQi(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(yQi[t]||(uQi(e)?29:28))}function fQi(e,t){return t>=1&&t<=(uQi(e)?366:365)}function pQi(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function mQi(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function hQi(e,t){return t>=0&&t<=59}var x8,gQi,_Qi,vQi,yQi,bQi=o((()=>{Z6(),$6(),t8(),x8={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},gQi=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,_Qi=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,vQi=/^([+-])(\d{2})(?::?(\d{2}))?$/,yQi=[31,null,31,30,31,30,31,31,30,31,30,31]})),xQi=o((()=>{})),SQi=o((()=>{})),CQi=o((()=>{})),wQi=o((()=>{})),TQi=o((()=>{})),EQi=o((()=>{})),DQi=o((()=>{})),OQi=o((()=>{})),kQi=o((()=>{})),AQi=o((()=>{})),jQi=o((()=>{})),MQi=o((()=>{})),NQi=o((()=>{})),PQi=o((()=>{})),FQi=o((()=>{})),IQi=o((()=>{}));function LQi(e,t,n){let r=e8(e,n==null?void 0:n.in),i=r.getFullYear(),a=r.getDate(),o=Q6((n==null?void 0:n.in)||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=uXi(o);return r.setMonth(t,Math.min(a,s)),r}var RQi=o((()=>{$6(),dXi(),t8()})),zQi=o((()=>{})),BQi=o((()=>{})),VQi=o((()=>{})),HQi=o((()=>{})),UQi=o((()=>{})),WQi=o((()=>{})),GQi=o((()=>{})),KQi=o((()=>{})),qQi=o((()=>{})),JQi=o((()=>{}));function YQi(e,t,n){let r=e8(e,n==null?void 0:n.in);return isNaN(+r)?Q6((n==null?void 0:n.in)||e,NaN):(r.setFullYear(t),r)}var XQi=o((()=>{$6(),t8()})),ZQi=o((()=>{})),QQi=o((()=>{})),$Qi=o((()=>{})),e$i=o((()=>{})),t$i=o((()=>{})),n$i=o((()=>{})),r$i=o((()=>{})),i$i=o((()=>{})),a$i=o((()=>{})),o$i=o((()=>{})),s$i=o((()=>{})),c$i=o((()=>{})),l$i=o((()=>{})),u$i=o((()=>{})),d$i=o((()=>{})),f$i=o((()=>{})),p$i=o((()=>{})),m$i=o((()=>{})),h$i=o((()=>{AKi(),PKi(),DKi(),IKi(),JKi(),FKi(),YKi(),kKi(),XKi(),ZKi(),$Ki(),tqi(),nqi(),sqi(),cqi(),lqi(),uqi(),dqi(),$6(),fqi(),pqi(),bqi(),WKi(),xqi(),Sqi(),wqi(),Eqi(),Dqi(),Oqi(),kqi(),Aqi(),Mqi(),Nqi(),Pqi(),zqi(),Bqi(),Vqi(),Hqi(),Uqi(),Kqi(),qqi(),Jqi(),Xqi(),Qqi(),$qi(),eJi(),rJi(),cJi(),uJi(),Fqi(),dJi(),fJi(),gJi(),_Ji(),vJi(),Lqi(),yJi(),bJi(),xJi(),SJi(),mJi(),aJi(),CJi(),YYi(),XYi(),ZYi(),QYi(),$Yi(),eXi(),tXi(),nXi(),rXi(),iXi(),aXi(),oXi(),sXi(),cXi(),lXi(),hYi(),dXi(),pXi(),mXi(),hXi(),gXi(),_Xi(),_Yi(),zKi(),vXi(),yXi(),bXi(),SXi(),CXi(),Tqi(),wXi(),TXi(),EXi(),CYi(),DXi(),yYi(),kXi(),jXi(),MXi(),NXi(),PXi(),FXi(),IXi(),LXi(),RXi(),BXi(),HXi(),_qi(),UXi(),WXi(),GXi(),KXi(),qXi(),Rqi(),fXi(),eZi(),tZi(),nZi(),hqi(),iZi(),oZi(),sZi(),lZi(),dZi(),fZi(),mZi(),aZi(),gZi(),jKi(),MKi(),_Zi(),vZi(),yZi(),bZi(),xZi(),SZi(),CZi(),wZi(),TZi(),EZi(),DZi(),OZi(),yqi(),kZi(),NKi(),AZi(),MZi(),NZi(),FZi(),IZi(),OXi(),LZi(),PZi(),RZi(),zZi(),iqi(),BZi(),VZi(),HZi(),UZi(),oqi(),WZi(),GZi(),KZi(),qZi(),JZi(),YZi(),XZi(),ZZi(),QZi(),$Zi(),eQi(),tQi(),nQi(),$Xi(),bQi(),xQi(),SQi(),CQi(),wQi(),TQi(),EQi(),DQi(),OQi(),kQi(),AQi(),jQi(),MQi(),NQi(),PQi(),FQi(),IQi(),zQi(),BQi(),ZXi(),VQi(),HQi(),UQi(),QXi(),XXi(),qKi(),WQi(),GQi(),RQi(),KQi(),qQi(),YXi(),JQi(),XQi(),HKi(),ZQi(),rZi(),s8(),KKi(),cZi(),nJi(),Zqi(),pZi(),QQi(),$Qi(),a8(),xYi(),sJi(),e$i(),n$i(),r$i(),jZi(),i$i(),jqi(),a$i(),o$i(),t$i(),s$i(),c$i(),l$i(),u$i(),t8(),JXi(),d$i(),f$i(),p$i(),m$i()})),g$i=o((()=>{}));function _$i(e,t,n=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(` `)}var v$i=o((()=>{}));function S8(e,t){try{let n=(b$i[e]||(b$i[e]=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).format))(t).split(`GMT`)[1];return n in C8?C8[n]:y$i(n,n.split(`:`))}catch{if(e in C8)return C8[e];let t=e==null?void 0:e.match(x$i);return t?y$i(e,t.slice(1)):NaN}}function y$i(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return C8[e]=n*60+r>0?n*60+r+i:n*60-r-i}var b$i,C8,x$i,S$i=o((()=>{b$i={},C8={},x$i=/([+-]\d\d):?(\d\d)?/}));function C$i(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-S8(e.timeZone,e)*60))}function w$i(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),T$i(e)}function T$i(e){let t=S8(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);let i=-new Date(+e).getTimezoneOffset(),a=i- -new Date(+r).getTimezoneOffset(),o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);let s=i-n;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);let l=new Date(+e);l.setUTCSeconds(0);let u=i>0?l.getSeconds():(l.getSeconds()-60)%60,d=Math.round(-(S8(e.timeZone,e)*60))%60;(d||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+u));let f=S8(e.timeZone,e),p=f>0?Math.floor(f):Math.ceil(f),m=-new Date(+e).getTimezoneOffset()-p,h=p!==n,g=m-s;if(h&&g){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g);let t=S8(e.timeZone,e),n=p-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}var w8,E$i,D$i=o((()=>{S$i(),w8=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(S8(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),T$i(this,NaN),C$i(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-S8(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),C$i(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},E$i=/^(get|set)(?!UTC)/,Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!E$i.test(e))return;let t=e.replace(E$i,`$1UTC`);w8.prototype[t]&&(e.startsWith(`get`)?w8.prototype[e]=function(){return this.internal[t]()}:(w8.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),w$i(this),+this},w8.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),C$i(this),+this}))})})),T8,O$i=o((()=>{v$i(),D$i(),T8=class e extends w8{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e==null?void 0:e.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${_$i(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:(t==null?void 0:t.timeZone)||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:(t==null?void 0:t.timeZone)||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:(t==null?void 0:t.timeZone)||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset();return[e>0?`-`:`+`,String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),String(Math.abs(e)%60).padStart(2,`0`)]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}}})),k$i=o((()=>{O$i()})),A$i=o((()=>{})),E8=o((()=>{g$i(),O$i(),D$i(),k$i(),S$i(),A$i(),v$i()}));function j$i(e,t){let n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),a=t.addDays(i,34);return t.getMonth(e)===t.getMonth(a)?M$i:N$i}var M$i,N$i,P$i=o((()=>{M$i=5,N$i=4}));function F$i(e,t){let n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}var I$i=o((()=>{}));function L$i(e,t){let n=F$i(e,t),r=j$i(e,t);return t.addDays(n,r*7-1)}var R$i=o((()=>{P$i(),I$i()})),z$i,B$i=o((()=>{YYi(),fYi(),z$i={...p8,labels:{labelDayButton:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>v8(e,t,{locale:p8,...n});let a=i(e,`PPPP`);return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:`Choose the Month`,labelNext:`Go to the Next Month`,labelPrevious:`Go to the Previous Month`,labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:`Choose the Year`,labelGrid:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>v8(e,n,{locale:p8,...t}),r(e,`LLLL yyyy`)},labelGridcell:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>v8(e,t,{locale:p8,...n});let a=i(e,`PPPP`);return t!=null&&t.today&&(a=`Today, ${a}`),a},labelNav:`Navigation bar`,labelWeekNumberHeader:`Week Number`,labelWeekday:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>v8(e,n,{locale:p8,...t}),r(e,`cccc`)}}}})),D8,O8,k8=o((()=>{E8(),DKi(),kKi(),$Ki(),tqi(),WKi(),wqi(),Xqi(),uJi(),gJi(),Lqi(),mJi(),aJi(),YYi(),_Yi(),SXi(),CYi(),jXi(),BXi(),HXi(),_qi(),hqi(),dZi(),gZi(),iqi(),oqi(),RQi(),XQi(),HKi(),s8(),nJi(),a8(),sJi(),R$i(),I$i(),B$i(),D8=class e{constructor(e,t){this.today=()=>{var e;return(e=this.overrides)!=null&&e.today?this.overrides.today():this.options.timeZone?T8.tz(this.options.timeZone):new(this.options.Date??Date)},this.newDate=(e,t,n)=>{var r;return(r=this.overrides)!=null&&r.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new T8(e,t,n,this.options.timeZone):new Date(e,t,n)},this.addDays=(e,t)=>{var n;return(n=this.overrides)!=null&&n.addDays?this.overrides.addDays(e,t):EKi(e,t)},this.addMonths=(e,t)=>{var n;return(n=this.overrides)!=null&&n.addMonths?this.overrides.addMonths(e,t):OKi(e,t)},this.addWeeks=(e,t)=>{var n;return(n=this.overrides)!=null&&n.addWeeks?this.overrides.addWeeks(e,t):QKi(e,t)},this.addYears=(e,t)=>{var n;return(n=this.overrides)!=null&&n.addYears?this.overrides.addYears(e,t):eqi(e,t)},this.differenceInCalendarDays=(e,t)=>{var n;return(n=this.overrides)!=null&&n.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):UKi(e,t)},this.differenceInCalendarMonths=(e,t)=>{var n;return(n=this.overrides)!=null&&n.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):Cqi(e,t)},this.eachMonthOfInterval=e=>{var t;return(t=this.overrides)!=null&&t.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):Yqi(e)},this.eachYearOfInterval=e=>{var t;let n=(t=this.overrides)!=null&&t.eachYearOfInterval?this.overrides.eachYearOfInterval(e):lJi(e),r=new Set(n.map(e=>this.getYear(e)));if(r.size===n.length)return n;let i=[];return r.forEach(e=>{i.push(new Date(e,0,1))}),i},this.endOfBroadcastWeek=e=>{var t;return(t=this.overrides)!=null&&t.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):L$i(e,this)},this.endOfISOWeek=e=>{var t;return(t=this.overrides)!=null&&t.endOfISOWeek?this.overrides.endOfISOWeek(e):hJi(e)},this.endOfMonth=e=>{var t;return(t=this.overrides)!=null&&t.endOfMonth?this.overrides.endOfMonth(e):Iqi(e)},this.endOfWeek=(e,t)=>{var n;return(n=this.overrides)!=null&&n.endOfWeek?this.overrides.endOfWeek(e,t):pJi(e,this.options)},this.endOfYear=e=>{var t;return(t=this.overrides)!=null&&t.endOfYear?this.overrides.endOfYear(e):iJi(e)},this.format=(e,t,n)=>{var r;let i=(r=this.overrides)!=null&&r.format?this.overrides.format(e,t,this.options):v8(e,t,this.options);return this.options.numerals&&this.options.numerals!==`latn`?this.replaceDigits(i):i},this.getISOWeek=e=>{var t;return(t=this.overrides)!=null&&t.getISOWeek?this.overrides.getISOWeek(e):gYi(e)},this.getMonth=(e,t)=>{var n;return(n=this.overrides)!=null&&n.getMonth?this.overrides.getMonth(e,this.options):xXi(e,this.options)},this.getYear=(e,t)=>{var n;return(n=this.overrides)!=null&&n.getYear?this.overrides.getYear(e,this.options):AXi(e,this.options)},this.getWeek=(e,t)=>{var n;return(n=this.overrides)!=null&&n.getWeek?this.overrides.getWeek(e,this.options):SYi(e,this.options)},this.isAfter=(e,t)=>{var n;return(n=this.overrides)!=null&&n.isAfter?this.overrides.isAfter(e,t):zXi(e,t)},this.isBefore=(e,t)=>{var n;return(n=this.overrides)!=null&&n.isBefore?this.overrides.isBefore(e,t):VXi(e,t)},this.isDate=e=>{var t;return(t=this.overrides)!=null&&t.isDate?this.overrides.isDate(e):gqi(e)},this.isSameDay=(e,t)=>{var n;return(n=this.overrides)!=null&&n.isSameDay?this.overrides.isSameDay(e,t):mqi(e,t)},this.isSameMonth=(e,t)=>{var n;return(n=this.overrides)!=null&&n.isSameMonth?this.overrides.isSameMonth(e,t):uZi(e,t)},this.isSameYear=(e,t)=>{var n;return(n=this.overrides)!=null&&n.isSameYear?this.overrides.isSameYear(e,t):hZi(e,t)},this.max=e=>{var t;return(t=this.overrides)!=null&&t.max?this.overrides.max(e):rqi(e)},this.min=e=>{var t;return(t=this.overrides)!=null&&t.min?this.overrides.min(e):aqi(e)},this.setMonth=(e,t)=>{var n;return(n=this.overrides)!=null&&n.setMonth?this.overrides.setMonth(e,t):LQi(e,t)},this.setYear=(e,t)=>{var n;return(n=this.overrides)!=null&&n.setYear?this.overrides.setYear(e,t):YQi(e,t)},this.startOfBroadcastWeek=(e,t)=>{var n;return(n=this.overrides)!=null&&n.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):F$i(e,this)},this.startOfDay=e=>{var t;return(t=this.overrides)!=null&&t.startOfDay?this.overrides.startOfDay(e):u8(e)},this.startOfISOWeek=e=>{var t;return(t=this.overrides)!=null&&t.startOfISOWeek?this.overrides.startOfISOWeek(e):o8(e)},this.startOfMonth=e=>{var t;return(t=this.overrides)!=null&&t.startOfMonth?this.overrides.startOfMonth(e):tJi(e)},this.startOfWeek=(e,t)=>{var n;return(n=this.overrides)!=null&&n.startOfWeek?this.overrides.startOfWeek(e,this.options):i8(e,this.options)},this.startOfYear=e=>{var t;return(t=this.overrides)!=null&&t.startOfYear?this.overrides.startOfYear(e):oJi(e)},this.options={locale:z$i,...e},this.overrides=t}getDigitMap(){let{numerals:e=`latn`}=this.options,t=new Intl.NumberFormat(`en-US`,{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){let t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){var t;let n=(t=this.options.locale)==null?void 0:t.code;return n&&e.yearFirstLocales.has(n)?`year-first`:`month-first`}formatMonthYear(t){let{locale:n,timeZone:r,numerals:i}=this.options,a=n==null?void 0:n.code;if(a&&e.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:`long`,year:`numeric`,timeZone:r,numberingSystem:i}).format(t)}catch{}let o=this.getMonthYearOrder()===`year-first`?`y LLLL`:`LLLL y`;return this.format(t,o)}},D8.yearFirstLocales=new Set([`eu`,`hu`,`ja`,`ja-Hira`,`ja-JP`,`ko`,`ko-KR`,`lt`,`lt-LT`,`lv`,`lv-LV`,`mn`,`mn-MN`,`zh`,`zh-CN`,`zh-HK`,`zh-TW`]),O8=new D8})),V$i,H$i=o((()=>{k8(),V$i=class{constructor(e,t,n=O8){this.date=e,this.displayMonth=t,this.outside=!(!t||n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,`yyyy-MM-dd`),this.displayMonthId=n.format(t,`yyyy-MM`),this.dateMonthId=n.format(e,`yyyy-MM`)}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}})),U$i,W$i=o((()=>{U$i=class{constructor(e,t){this.date=e,this.weeks=t}}})),G$i,K$i=o((()=>{G$i=class{constructor(e,t){this.days=t,this.weekNumber=e}}})),A8=o((()=>{H$i(),W$i(),K$i(),k8()}));function q$i(e){return J$i.createElement(`span`,{...e})}var J$i,Y$i=o((()=>{J$i=d(p(),1)}));function X$i(e){let{size:t=24,orientation:n=`left`,className:r,style:i}=e;return j8.createElement(`svg`,{className:r,style:i,width:t,height:t,viewBox:`0 0 24 24`},n===`up`&&j8.createElement(`polygon`,{points:`6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28`}),n===`down`&&j8.createElement(`polygon`,{points:`6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72`}),n===`left`&&j8.createElement(`polygon`,{points:`16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20`}),n===`right`&&j8.createElement(`polygon`,{points:`8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20`}))}var j8,Z$i=o((()=>{j8=d(p(),1)}));function Q$i(e){let{day:t,modifiers:n,...r}=e;return $$i.createElement(`td`,{...r})}var $$i,e1i=o((()=>{$$i=d(p(),1)}));function t1i(e){let{day:t,modifiers:n,...r}=e,i=n1i.useRef(null);return n1i.useEffect(()=>{var e;n.focused&&((e=i.current)==null||e.focus())},[n.focused]),n1i.createElement(`button`,{ref:i,...r})}var n1i,r1i=o((()=>{n1i=d(p(),1)})),M8,N8,P8,F8,I8=o((()=>{(function(e){e.Root=`root`,e.Chevron=`chevron`,e.Day=`day`,e.DayButton=`day_button`,e.CaptionLabel=`caption_label`,e.Dropdowns=`dropdowns`,e.Dropdown=`dropdown`,e.DropdownRoot=`dropdown_root`,e.Footer=`footer`,e.MonthGrid=`month_grid`,e.MonthCaption=`month_caption`,e.MonthsDropdown=`months_dropdown`,e.Month=`month`,e.Months=`months`,e.Nav=`nav`,e.NextMonthButton=`button_next`,e.PreviousMonthButton=`button_previous`,e.Week=`week`,e.Weeks=`weeks`,e.Weekday=`weekday`,e.Weekdays=`weekdays`,e.WeekNumber=`week_number`,e.WeekNumberHeader=`week_number_header`,e.YearsDropdown=`years_dropdown`})(M8||(M8={})),(function(e){e.disabled=`disabled`,e.hidden=`hidden`,e.outside=`outside`,e.focused=`focused`,e.today=`today`})(N8||(N8={})),(function(e){e.range_end=`range_end`,e.range_middle=`range_middle`,e.range_start=`range_start`,e.selected=`selected`})(P8||(P8={})),(function(e){e.weeks_before_enter=`weeks_before_enter`,e.weeks_before_exit=`weeks_before_exit`,e.weeks_after_enter=`weeks_after_enter`,e.weeks_after_exit=`weeks_after_exit`,e.caption_after_enter=`caption_after_enter`,e.caption_after_exit=`caption_after_exit`,e.caption_before_enter=`caption_before_enter`,e.caption_before_exit=`caption_before_exit`})(F8||(F8={}))}));function i1i(){let e=(0,a1i.useContext)(o1i);if(e===void 0)throw Error(`useDayPicker() must be used within a custom component.`);return e}var a1i,o1i,L8=o((()=>{a1i=d(p(),1),o1i=(0,a1i.createContext)(void 0)}));function s1i(e){let{options:t,className:n,...r}=e,{classNames:i,components:a,styles:o}=i1i(),s=[i[M8.Dropdown],n].join(` `),l=t==null?void 0:t.find(({value:e})=>e===r.value);return R8.createElement(`span`,{"data-disabled":r.disabled,className:i[M8.DropdownRoot],style:o==null?void 0:o[M8.DropdownRoot]},R8.createElement(a.Select,{className:s,...r},t==null?void 0:t.map(({value:e,label:t,disabled:n})=>R8.createElement(a.Option,{key:e,value:e,disabled:n},t))),R8.createElement(`span`,{className:i[M8.CaptionLabel],style:o==null?void 0:o[M8.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,R8.createElement(a.Chevron,{orientation:`down`,size:18,className:i[M8.Chevron],style:o==null?void 0:o[M8.Chevron]})))}var R8,c1i=o((()=>{R8=d(p(),1),I8(),L8()}));function l1i(e){return u1i.createElement(`div`,{...e})}var u1i,d1i=o((()=>{u1i=d(p(),1)}));function f1i(e){return p1i.createElement(`div`,{...e})}var p1i,m1i=o((()=>{p1i=d(p(),1)}));function h1i(e){let{calendarMonth:t,displayIndex:n,...r}=e;return g1i.createElement(`div`,{...r},e.children)}var g1i,_1i=o((()=>{g1i=d(p(),1)}));function v1i(e){let{calendarMonth:t,displayIndex:n,...r}=e;return y1i.createElement(`div`,{...r})}var y1i,b1i=o((()=>{y1i=d(p(),1)}));function x1i(e){return S1i.createElement(`table`,{...e})}var S1i,C1i=o((()=>{S1i=d(p(),1)}));function w1i(e){return T1i.createElement(`div`,{...e})}var T1i,E1i=o((()=>{T1i=d(p(),1)}));function D1i(e){let{components:t}=i1i();return O1i.createElement(t.Dropdown,{...e})}var O1i,k1i=o((()=>{O1i=d(p(),1),L8()}));function A1i(e){let{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...a}=e,{components:o,classNames:s,styles:l,labels:{labelPrevious:u,labelNext:d}}=i1i(),f=(0,z8.useCallback)(e=>{i&&(n==null||n(e))},[i,n]),p=(0,z8.useCallback)(e=>{r&&(t==null||t(e))},[r,t]);return z8.createElement(`nav`,{...a},z8.createElement(o.PreviousMonthButton,{type:`button`,className:s[M8.PreviousMonthButton],style:l==null?void 0:l[M8.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":u(r),onClick:p},z8.createElement(o.Chevron,{disabled:!r||void 0,className:s[M8.Chevron],style:l==null?void 0:l[M8.Chevron],orientation:`left`})),z8.createElement(o.NextMonthButton,{type:`button`,className:s[M8.NextMonthButton],style:l==null?void 0:l[M8.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":!i||void 0,"aria-label":d(i),onClick:f},z8.createElement(o.Chevron,{disabled:!i||void 0,orientation:`right`,className:s[M8.Chevron],style:l==null?void 0:l[M8.Chevron]})))}var z8,j1i=o((()=>{z8=d(p(),1),I8(),L8()}));function M1i(e){return N1i.createElement(`button`,{...e})}var N1i,P1i=o((()=>{N1i=d(p(),1)}));function F1i(e){return I1i.createElement(`option`,{...e})}var I1i,L1i=o((()=>{I1i=d(p(),1)}));function R1i(e){return z1i.createElement(`button`,{...e})}var z1i,B1i=o((()=>{z1i=d(p(),1)}));function V1i(e){let{rootRef:t,...n}=e;return H1i.createElement(`div`,{...n,ref:t})}var H1i,U1i=o((()=>{H1i=d(p(),1)}));function W1i(e){return G1i.createElement(`select`,{...e})}var G1i,K1i=o((()=>{G1i=d(p(),1)}));function q1i(e){let{week:t,...n}=e;return J1i.createElement(`tr`,{...n})}var J1i,Y1i=o((()=>{J1i=d(p(),1)}));function X1i(e){return Z1i.createElement(`th`,{...e})}var Z1i,Q1i=o((()=>{Z1i=d(p(),1)}));function $1i(e){return e0i.createElement(`thead`,{"aria-hidden":!0},e0i.createElement(`tr`,{...e}))}var e0i,t0i=o((()=>{e0i=d(p(),1)}));function n0i(e){let{week:t,...n}=e;return r0i.createElement(`th`,{...n})}var r0i,i0i=o((()=>{r0i=d(p(),1)}));function a0i(e){return o0i.createElement(`th`,{...e})}var o0i,s0i=o((()=>{o0i=d(p(),1)}));function c0i(e){return l0i.createElement(`tbody`,{...e})}var l0i,u0i=o((()=>{l0i=d(p(),1)}));function d0i(e){let{components:t}=i1i();return f0i.createElement(t.Dropdown,{...e})}var f0i,p0i=o((()=>{f0i=d(p(),1),L8()})),m0i=l({CaptionLabel:()=>q$i,Chevron:()=>X$i,Day:()=>Q$i,DayButton:()=>t1i,Dropdown:()=>s1i,DropdownNav:()=>l1i,Footer:()=>f1i,Month:()=>h1i,MonthCaption:()=>v1i,MonthGrid:()=>x1i,Months:()=>w1i,MonthsDropdown:()=>D1i,Nav:()=>A1i,NextMonthButton:()=>M1i,Option:()=>F1i,PreviousMonthButton:()=>R1i,Root:()=>V1i,Select:()=>W1i,Week:()=>q1i,WeekNumber:()=>n0i,WeekNumberHeader:()=>a0i,Weekday:()=>X1i,Weekdays:()=>$1i,Weeks:()=>c0i,YearsDropdown:()=>d0i}),h0i=o((()=>{Y$i(),Z$i(),e1i(),r1i(),c1i(),d1i(),m1i(),_1i(),b1i(),C1i(),E1i(),k1i(),j1i(),P1i(),L1i(),B1i(),U1i(),K1i(),Y1i(),Q1i(),t0i(),i0i(),s0i(),u0i(),p0i()}));function B8(e,t,n=!1,r=O8){let{from:i,to:a}=e,{differenceInCalendarDays:o,isSameDay:s}=r;return i&&a?(o(a,i)<0&&([i,a]=[a,i]),o(t,i)>=+!!n&&o(a,t)>=+!!n):!n&&a?s(a,t):!n&&i?s(i,t):!1}var V8=o((()=>{A8()}));function g0i(e){return!!(e&&typeof e==`object`&&`before`in e&&`after`in e)}function _0i(e){return!!(e&&typeof e==`object`&&`from`in e)}function v0i(e){return!!(e&&typeof e==`object`&&`after`in e)}function y0i(e){return!!(e&&typeof e==`object`&&`before`in e)}function b0i(e){return!!(e&&typeof e==`object`&&`dayOfWeek`in e)}function x0i(e,t){return Array.isArray(e)&&e.every(t.isDate)}var H8=o((()=>{}));function U8(e,t,n=O8){let r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:a,isAfter:o}=n;return r.some(t=>{if(typeof t==`boolean`)return t;if(n.isDate(t))return i(e,t);if(x0i(t,n))return t.some(t=>i(e,t));if(_0i(t))return B8(t,e,!1,n);if(b0i(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(g0i(t)){let n=a(t.before,e),r=a(t.after,e),i=n>0,s=r<0;return o(t.before,t.after)?s&&i:i||s}return v0i(t)?a(e,t.after)>0:y0i(t)?a(t.before,e)>0:typeof t==`function`&&t(e)})}var S0i=o((()=>{k8(),V8(),H8()}));function C0i(e,t,n,r,i){let{disabled:a,hidden:o,modifiers:s,showOutsideDays:l,broadcastCalendar:u,today:d=i.today()}=t,{isSameDay:f,isSameMonth:p,startOfMonth:m,isBefore:h,endOfMonth:g,isAfter:_}=i,v=n&&m(n),y=r&&g(r),b={[N8.focused]:[],[N8.outside]:[],[N8.disabled]:[],[N8.hidden]:[],[N8.today]:[]},x={};for(let t of e){let{date:e,displayMonth:n}=t,r=!(!n||p(e,n)),m=!!(v&&h(e,v)),g=!!(y&&_(e,y)),S=!!(a&&U8(e,a,i)),C=!!(o&&U8(e,o,i))||m||g||!u&&!l&&r||u&&l===!1&&r,w=f(e,d);r&&b.outside.push(t),S&&b.disabled.push(t),C&&b.hidden.push(t),w&&b.today.push(t),s&&Object.keys(s).forEach(n=>{let r=s==null?void 0:s[n];r&&U8(e,r,i)&&(x[n]?x[n].push(t):x[n]=[t])})}return e=>{let t={[N8.focused]:!1,[N8.disabled]:!1,[N8.hidden]:!1,[N8.outside]:!1,[N8.today]:!1},n={};for(let n in b)t[n]=b[n].some(t=>t===e);for(let t in x)n[t]=x[t].some(t=>t===e);return{...t,...n}}}var w0i=o((()=>{I8(),S0i()}));function T0i(e,t,n={}){return Object.entries(e).filter(([,e])=>e===!0).reduce((e,[r])=>(n[r]?e.push(n[r]):t[N8[r]]?e.push(t[N8[r]]):t[P8[r]]&&e.push(t[P8[r]]),e),[t[M8.Day]])}var E0i=o((()=>{I8()}));function D0i(e){return{...m0i,...e}}var O0i=o((()=>{h0i()}));function k0i(e){let t={"data-mode":e.mode??void 0,"data-required":`required`in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith(`data-`)&&(t[e]=n)}),t}var A0i=o((()=>{}));function j0i(){let e={};for(let t in M8)e[M8[t]]=`rdp-${M8[t]}`;for(let t in N8)e[N8[t]]=`rdp-${N8[t]}`;for(let t in P8)e[P8[t]]=`rdp-${P8[t]}`;for(let t in F8)e[F8[t]]=`rdp-${F8[t]}`;return e}var M0i=o((()=>{I8()}));function N0i(e,t,n){return(n??new D8(t)).formatMonthYear(e)}var P0i=o((()=>{k8()}));function F0i(e,t,n){return(n??new D8(t)).format(e,`d`)}var I0i=o((()=>{k8()}));function L0i(e,t=O8){return t.format(e,`LLLL`)}var R0i=o((()=>{k8()}));function z0i(e,t,n){return(n??new D8(t)).format(e,`cccccc`)}var B0i=o((()=>{k8()}));function V0i(e,t=O8){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}var H0i=o((()=>{k8()}));function U0i(){return``}var W0i=o((()=>{}));function G0i(e,t=O8){return t.format(e,`yyyy`)}var K0i=o((()=>{k8()})),q0i=l({formatCaption:()=>N0i,formatDay:()=>F0i,formatMonthDropdown:()=>L0i,formatWeekNumber:()=>V0i,formatWeekNumberHeader:()=>U0i,formatWeekdayName:()=>z0i,formatYearDropdown:()=>G0i}),J0i=o((()=>{P0i(),I0i(),R0i(),B0i(),H0i(),W0i(),K0i()}));function Y0i(e){return{...q0i,...e}}var X0i=o((()=>{J0i()}));function Z0i(e,t,n,r){let i=(r??new D8(n)).format(e,`PPPP`);return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}var Q0i=o((()=>{k8()}));function $0i(e,t,n){return(n??new D8(t)).formatMonthYear(e)}var e2i=o((()=>{k8()}));function t2i(e,t,n,r){let i=(r??new D8(n)).format(e,`PPPP`);return t!=null&&t.today&&(i=`Today, ${i}`),i}var n2i=o((()=>{k8()}));function r2i(e){return`Choose the Month`}var i2i=o((()=>{}));function a2i(){return``}var o2i=o((()=>{}));function s2i(e,t){return c2i}var c2i,l2i=o((()=>{c2i=`Go to the Next Month`}));function u2i(e){return`Go to the Previous Month`}var d2i=o((()=>{}));function f2i(e,t,n){return(n??new D8(t)).format(e,`cccc`)}var p2i=o((()=>{k8()}));function m2i(e,t){return`Week ${e}`}var h2i=o((()=>{}));function g2i(e){return`Week Number`}var _2i=o((()=>{}));function v2i(e){return`Choose the Year`}var y2i=o((()=>{})),b2i=l({labelDayButton:()=>Z0i,labelGrid:()=>$0i,labelGridcell:()=>t2i,labelMonthDropdown:()=>r2i,labelNav:()=>a2i,labelNext:()=>s2i,labelPrevious:()=>u2i,labelWeekNumber:()=>m2i,labelWeekNumberHeader:()=>g2i,labelWeekday:()=>f2i,labelYearDropdown:()=>v2i}),x2i=o((()=>{Q0i(),e2i(),e2i(),n2i(),i2i(),o2i(),l2i(),d2i(),p2i(),h2i(),_2i(),y2i()}));function S2i(e,t){var n;let r=((n=t.locale)==null?void 0:n.labels)??{};return{...b2i,...e??{},labelDayButton:W8(Z0i,e==null?void 0:e.labelDayButton,r.labelDayButton),labelMonthDropdown:W8(r2i,e==null?void 0:e.labelMonthDropdown,r.labelMonthDropdown),labelNext:W8(s2i,e==null?void 0:e.labelNext,r.labelNext),labelPrevious:W8(u2i,e==null?void 0:e.labelPrevious,r.labelPrevious),labelWeekNumber:W8(m2i,e==null?void 0:e.labelWeekNumber,r.labelWeekNumber),labelYearDropdown:W8(v2i,e==null?void 0:e.labelYearDropdown,r.labelYearDropdown),labelGrid:W8($0i,e==null?void 0:e.labelGrid,r.labelGrid),labelGridcell:W8(t2i,e==null?void 0:e.labelGridcell,r.labelGridcell),labelNav:W8(a2i,e==null?void 0:e.labelNav,r.labelNav),labelWeekNumberHeader:W8(g2i,e==null?void 0:e.labelWeekNumberHeader,r.labelWeekNumberHeader),labelWeekday:W8(f2i,e==null?void 0:e.labelWeekday,r.labelWeekday)}}var W8,C2i=o((()=>{x2i(),W8=(e,t,n)=>t||(n?typeof n==`function`?n:(...e)=>n:e)}));function w2i(e,t,n,r,i){let{startOfMonth:a,startOfYear:o,endOfYear:s,eachMonthOfInterval:l,getMonth:u}=i;return l({start:o(e),end:s(e)}).map(e=>{let o=r.formatMonthDropdown(e,i);return{value:u(e),label:o,disabled:t&&ea(n)||!1}})}var T2i=o((()=>{}));function E2i(e,t={},n={}){let r={...t==null?void 0:t[M8.Day]};return Object.entries(e).filter(([,e])=>e===!0).forEach(([e])=>{r={...r,...n==null?void 0:n[e]}}),r}var D2i=o((()=>{I8()}));function O2i(e,t,n,r){let i=r??e.today(),a=n?e.startOfBroadcastWeek(i,e):t?e.startOfISOWeek(i):e.startOfWeek(i),o=[];for(let t=0;t<7;t++){let n=e.addDays(a,t);o.push(n)}return o}var k2i=o((()=>{}));function A2i(e,t,n,r,i=!1){if(!e||!t)return;let{startOfYear:a,endOfYear:o,eachYearOfInterval:s,getYear:l}=r,u=s({start:a(e),end:o(t)});return i&&u.reverse(),u.map(e=>{let t=n.formatYearDropdown(e,r);return{value:l(e),label:t,disabled:!1}})}var j2i=o((()=>{}));function M2i(e,t={}){var n;let{weekStartsOn:r,locale:i}=t,a=r??(i==null||(n=i.options)==null?void 0:n.weekStartsOn)??0,o=t=>{let n=typeof t==`number`||typeof t==`string`?new Date(t):t;return new T8(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},s=e=>{let t=o(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>o(T8.tz(e)),newDate:(t,n,r)=>new T8(t,n,r,12,0,0,e),startOfDay:e=>o(e),startOfWeek:(e,t)=>{let n=o(e),r=(t==null?void 0:t.weekStartsOn)??a,i=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-i),n},startOfISOWeek:e=>{let t=o(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{let t=o(e);return t.setDate(1),t},startOfYear:e=>{let t=o(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{let n=o(e),r=((((t==null?void 0:t.weekStartsOn)??a)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{let t=o(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{let t=o(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{let t=o(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{let n=o(t.start),r=o(t.end),i=[],a=new T8(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=r.getFullYear()*12+r.getMonth();for(;a.getFullYear()*12+a.getMonth()<=s;)i.push(new T8(a,e)),a.setMonth(a.getMonth()+1,1);return i},addDays:(e,t)=>{let n=o(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{let n=o(e);return n.setDate(n.getDate()+t*7),n},addMonths:(e,t)=>{let n=o(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{let n=o(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{let n=o(t.start),r=o(t.end),i=[],a=new T8(n.getFullYear(),0,1,12,0,0,e);for(;a.getFullYear()<=r.getFullYear();)i.push(new T8(a,e)),a.setFullYear(a.getFullYear()+1,0,1);return i},getWeek:(e,t)=>{var n;return SYi(s(e),{weekStartsOn:(t==null?void 0:t.weekStartsOn)??a,firstWeekContainsDate:(t==null?void 0:t.firstWeekContainsDate)??(i==null||(n=i.options)==null?void 0:n.firstWeekContainsDate)??1})},getISOWeek:e=>gYi(s(e)),differenceInCalendarDays:(e,t)=>UKi(s(e),s(t)),differenceInCalendarMonths:(e,t)=>Cqi(s(e),s(t))}}var N2i=o((()=>{E8(),WKi(),wqi(),_Yi(),CYi()}));function P2i(e,t,{classNames:n,months:r,focused:i,dateLib:a}){let o=(0,G8.useRef)(null),s=(0,G8.useRef)(r),l=(0,G8.useRef)(!1);(0,G8.useLayoutEffect)(()=>{let u=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;let d=a.isSameMonth(r[0].date,u[0].date),f=a.isAfter(r[0].date,u[0].date),p=f?n[F8.caption_after_enter]:n[F8.caption_before_enter],m=f?n[F8.weeks_after_enter]:n[F8.weeks_before_enter],h=o.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(F2i(g).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=I2i(e);t&&e.contains(t)&&e.removeChild(t);let n=L2i(e);n&&n.classList.remove(p);let r=R2i(e);r&&r.classList.remove(m)}),o.current=g):o.current=null,l.current||d||i)return;let _=h instanceof HTMLElement?F2i(h):[],v=F2i(e.current);if(v!=null&&v.every(e=>e instanceof HTMLElement)&&_!=null&&_.every(e=>e instanceof HTMLElement)){l.current=!0;let t=[];e.current.style.isolation=`isolate`;let r=z2i(e.current);r&&(r.style.zIndex=`1`),v.forEach((i,a)=>{let o=_[a];if(!o)return;i.style.position=`relative`,i.style.overflow=`hidden`;let s=L2i(i);s&&s.classList.add(p);let u=R2i(i);u&&u.classList.add(m);let d=()=>{l.current=!1,e.current&&(e.current.style.isolation=``),r&&(r.style.zIndex=``),s&&s.classList.remove(p),u&&u.classList.remove(m),i.style.position=``,i.style.overflow=``,i.contains(o)&&i.removeChild(o)};t.push(d),o.style.pointerEvents=`none`,o.style.position=`absolute`,o.style.overflow=`hidden`,o.setAttribute(`aria-hidden`,`true`);let h=B2i(o);h&&(h.style.opacity=`0`);let g=L2i(o);g&&(g.classList.add(f?n[F8.caption_before_exit]:n[F8.caption_after_exit]),g.addEventListener(`animationend`,d));let v=R2i(o);v&&v.classList.add(f?n[F8.weeks_before_exit]:n[F8.weeks_after_exit]),i.insertBefore(o,i.firstChild)})}})}var G8,K8,F2i,I2i,L2i,R2i,z2i,B2i,V2i=o((()=>{G8=d(p(),1),I8(),K8=e=>e instanceof HTMLElement?e:null,F2i=e=>[...e.querySelectorAll(`[data-animated-month]`)??[]],I2i=e=>K8(e.querySelector(`[data-animated-month]`)),L2i=e=>K8(e.querySelector(`[data-animated-caption]`)),R2i=e=>K8(e.querySelector(`[data-animated-weeks]`)),z2i=e=>K8(e.querySelector(`[data-animated-nav]`)),B2i=e=>K8(e.querySelector(`[data-animated-weekdays]`))}));function H2i(e,t,n,r){let i=e[0],a=e[e.length-1],{ISOWeek:o,fixedWeeks:s,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfMonth:h,endOfWeek:g,isAfter:_,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=r,x=l?v(i,r):o?y(i):b(i),S=l?p(a):o?m(h(a)):g(h(a)),C=t&&(l?p(t):o?m(t):g(t)),w=d(C&&_(S,C)?C:S,x),T=f(a,i)+1,E=[];for(let e=0;e<=w;e++){let t=u(x,e);E.push(t)}let D=(l?35:42)*T;if(s&&E.length{}));function W2i(e){let t=[];return e.reduce((e,n)=>{let r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}var G2i=o((()=>{}));function K2i(e,t,n,r){let{numberOfMonths:i=1}=n,a=[];for(let n=0;nt)break;a.push(i)}return a}var q2i=o((()=>{}));function J2i(e,t,n,r){let{month:i,defaultMonth:a,today:o=r.today(),numberOfMonths:s=1}=e,l=i||a||o,{differenceInCalendarMonths:u,addMonths:d,startOfMonth:f}=r;return n&&u(n,l){}));function X2i(e,t,n,r){let{addDays:i,endOfBroadcastWeek:a,endOfISOWeek:o,endOfMonth:s,endOfWeek:l,getISOWeek:u,getWeek:d,startOfBroadcastWeek:f,startOfISOWeek:p,startOfWeek:m}=r,h=e.reduce((e,h)=>{let g=n.broadcastCalendar?f(h,r):n.ISOWeek?p(h):m(h),_=n.broadcastCalendar?a(h):n.ISOWeek?o(s(h)):l(s(h)),v=t.filter(e=>e>=g&&e<=_),y=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length{let t=y-v.length;return e>_&&e<=i(_,t)});v.push(...e)}let b=v.reduce((e,t)=>{let i=n.ISOWeek?u(t):d(t),a=e.find(e=>e.weekNumber===i),o=new V$i(t,h,r);return a?a.days.push(o):e.push(new G$i(i,[o])),e},[]),x=new U$i(h,b);return e.push(x),e},[]);return n.reverseMonths?h.reverse():h}var Z2i=o((()=>{A8()}));function Q2i(e,t){let{startMonth:n,endMonth:r}=e,{startOfYear:i,startOfDay:a,startOfMonth:o,endOfMonth:s,addYears:l,endOfYear:u,today:d}=t,f=e.captionLayout===`dropdown`||e.captionLayout===`dropdown-years`;return n?n=o(n):!n&&f&&(n=i(l(e.today??d(),-100))),r?r=s(r):!r&&f&&(r=u(e.today??d())),[n&&a(n),r&&a(r)]}var $2i=o((()=>{}));function e4i(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a=1}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:l}=r,u=i?a:1,d=o(e);if(!t||!(l(t,e){}));function n4i(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:l}=r,u=i?a??1:1,d=o(e);if(!t||!(l(d,t)<=0))return s(d,-u)}var r4i=o((()=>{}));function i4i(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}var a4i=o((()=>{}));function o4i(e,t){let[n,r]=(0,s4i.useState)(e);return[t===void 0?n:t,r]}var s4i,c4i=o((()=>{s4i=d(p(),1)}));function l4i(e,t){var n;let[r,i]=Q2i(e,t),{startOfMonth:a,endOfMonth:o}=t,s=J2i(e,r,i,t),[l,u]=o4i(s,e.month?s:void 0);(0,u4i.useEffect)(()=>{let n=J2i(e,r,i,t);u(n)},[e.timeZone]);let{months:d,weeks:f,days:p,previousMonth:m,nextMonth:h}=(0,u4i.useMemo)(()=>{let n=K2i(l,i,{numberOfMonths:e.numberOfMonths},t),a=X2i(n,H2i(n,e.endMonth?o(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t);return{months:a,weeks:i4i(a),days:W2i(a),previousMonth:n4i(l,r,e,t),nextMonth:e4i(l,i,e,t)}},[t,l.getTime(),i==null?void 0:i.getTime(),r==null?void 0:r.getTime(),e.disableNavigation,e.broadcastCalendar,(n=e.endMonth)==null?void 0:n.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:g,onMonthChange:_}=e,v=e=>f.some(t=>t.days.some(t=>t.isEqualTo(e))),y=e=>{if(g)return;let t=a(e);r&&ta(i)&&(t=a(i)),u(t),_==null||_(t)};return{months:d,weeks:f,days:p,navStart:r,navEnd:i,previousMonth:m,nextMonth:h,goToMonth:y,goToDay:e=>{v(e)||y(e.date)}}}var u4i,d4i=o((()=>{u4i=d(p(),1),U2i(),G2i(),q2i(),Y2i(),Z2i(),$2i(),t4i(),r4i(),a4i(),c4i()}));function f4i(e){return!e[N8.disabled]&&!e[N8.hidden]&&!e[N8.outside]}function p4i(e,t,n,r){let i,a=-1;for(let o of e){let e=t(o);f4i(e)&&(e[N8.focused]&&af4i(t(e)))),i}var q8,m4i=o((()=>{I8(),(function(e){e[e.Today=0]=`Today`,e[e.Selected=1]=`Selected`,e[e.LastFocused=2]=`LastFocused`,e[e.FocusedModifier=3]=`FocusedModifier`})(q8||(q8={}))}));function h4i(e,t,n,r,i,a,o){let{ISOWeek:s,broadcastCalendar:l}=a,{addDays:u,addMonths:d,addWeeks:f,addYears:p,endOfBroadcastWeek:m,endOfISOWeek:h,endOfWeek:g,max:_,min:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:x}=o,S={day:u,week:f,month:d,year:p,startOfWeek:e=>l?y(e,o):s?b(e):x(e),endOfWeek:e=>l?m(e):s?h(e):g(e)}[e](n,t===`after`?1:-1);return t===`before`&&r?S=_([r,S]):t===`after`&&i&&(S=v([i,S])),S}var g4i=o((()=>{}));function _4i(e,t,n,r,i,a,o,s=0){if(s>365)return;let l=h4i(e,t,n.date,r,i,a,o),u=!!(a.disabled&&U8(l,a.disabled,o)),d=!!(a.hidden&&U8(l,a.hidden,o)),f=new V$i(l,l,o);return!u&&!d?f:_4i(e,t,f,r,i,a,o,s+1)}var v4i=o((()=>{A8(),S0i(),g4i()}));function y4i(e,t,n,r,i){let{autoFocus:a}=e,[o,s]=(0,b4i.useState)(),l=p4i(t.days,n,r||(()=>!1),o),[u,d]=(0,b4i.useState)(a?l:void 0);return(0,b4i.useEffect)(()=>{u&&l&&(t.days.some(e=>e.isEqualTo(u))||d(l))},[t.days,u,l]),{isFocusTarget:e=>!!(l!=null&&l.isEqualTo(e)),setFocused:d,focused:u,blur:()=>{s(u),d(void 0)},moveFocus:(n,r)=>{if(!u)return;let a=_4i(n,r,u,t.navStart,t.navEnd,e,i);a&&(!e.disableNavigation||t.days.some(e=>e.isEqualTo(a)))&&(t.goToDay(a),d(a))}}}var b4i,x4i=o((()=>{b4i=d(p(),1),m4i(),v4i()}));function S4i(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=o4i(n,i?n:void 0),s=i?n:a,{isSameDay:l}=t,u=e=>(s==null?void 0:s.some(t=>l(t,e)))??!1,{min:d,max:f}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(u(e)){if((s==null?void 0:s.length)===d||r&&(s==null?void 0:s.length)===1)return;a=s==null?void 0:s.filter(t=>!l(t,e))}else a=(s==null?void 0:s.length)===f?[e]:[...a,e];return i||o(a),i==null||i(a,e,t,n),a},isSelected:u}}var C4i=o((()=>{c4i()}));function w4i(e,t,n=0,r=0,i=!1,a=O8){let{from:o,to:s}=t||{},{isSameDay:l,isAfter:u,isBefore:d}=a,f;if(!o&&!s)f={from:e,to:n>0?void 0:e};else if(o&&!s)f=l(o,e)?n===0?{from:o,to:e}:i?{from:o,to:void 0}:void 0:d(e,o)?{from:e,to:o}:{from:o,to:e};else if(o&&s){if(l(o,e)&&l(s,e))f=i?{from:o,to:s}:void 0;else if(l(o,e))f={from:o,to:n>0?void 0:e};else if(l(s,e))f={from:e,to:n>0?void 0:e};else if(d(e,o))f={from:e,to:s};else if(u(e,o))f={from:o,to:e};else if(u(e,s))f={from:o,to:e};else throw Error(`Invalid range`)}if(f!=null&&f.from&&f!=null&&f.to){let t=a.differenceInCalendarDays(f.to,f.from);(r>0&&t>r||n>1&&t{k8()}));function E4i(e,t,n=O8){let r=Array.isArray(t)?t:[t],i=e.from,a=n.differenceInCalendarDays(e.to,e.from),o=Math.min(a,6);for(let e=0;e<=o;e++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}var D4i=o((()=>{k8()}));function O4i(e,t,n=O8){return B8(e,t.from,!1,n)||B8(e,t.to,!1,n)||B8(t,e.from,!1,n)||B8(t,e.to,!1,n)}var k4i=o((()=>{A8(),V8()}));function A4i(e,t,n=O8){let r=Array.isArray(t)?t:[t];if(r.filter(e=>typeof e!=`function`).some(t=>typeof t==`boolean`?t:n.isDate(t)?B8(e,t,!1,n):x0i(t,n)?t.some(t=>B8(e,t,!1,n)):_0i(t)?t.from&&t.to?O4i(e,{from:t.from,to:t.to},n):!1:b0i(t)?E4i(e,t.dayOfWeek,n):g0i(t)?n.isAfter(t.before,t.after)?O4i(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):U8(e.from,t,n)||U8(e.to,t,n):v0i(t)||y0i(t)?U8(e.from,t,n)||U8(e.to,t,n):!1))return!0;let i=r.filter(e=>typeof e==`function`);if(i.length){let t=e.from,r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}var j4i=o((()=>{k8(),S0i(),D4i(),V8(),k4i(),H8()})),M4i=o((()=>{T4i(),S0i(),D4i(),j4i(),V8(),k4i(),H8()}));function N4i(e,t){let{disabled:n,excludeDisabled:r,resetOnSelect:i,selected:a,required:o,onSelect:s}=e,[l,u]=o4i(a,s?a:void 0),d=s?a:l;return{selected:d,select:(a,l,f)=>{let{min:p,max:m}=e,h;if(a){let e=d==null?void 0:d.from,n=d==null?void 0:d.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(a,e);h=i&&(r||!(d!=null&&d.from))?!o&&s?void 0:{from:a,to:void 0}:w4i(a,d,p,m,o,t)}return r&&n&&h!=null&&h.from&&h.to&&A4i({from:h.from,to:h.to},n,t)&&(h.from=a,h.to=void 0),s||u(h),s==null||s(h,a,l,f),h},isSelected:e=>d&&B8(d,e,!1,t)}}var P4i=o((()=>{c4i(),M4i(),V8()}));function F4i(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=o4i(n,i?n:void 0),s=i?n:a,{isSameDay:l}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!r&&s&&s&&l(e,s)&&(a=void 0),i||o(a),i==null||i(a,e,t,n),a},isSelected:e=>s?l(s,e):!1}}var I4i=o((()=>{c4i()}));function L4i(e,t){let n=F4i(e,t),r=S4i(e,t),i=N4i(e,t);switch(e.mode){case`single`:return n;case`multiple`:return r;case`range`:return i;default:return}}var R4i=o((()=>{C4i(),P4i(),I4i()}));function J8(e,t){return e instanceof T8&&e.timeZone===t?e:new T8(e,t)}var z4i=o((()=>{E8()}));function Y8(e,t,n){if(!n)return J8(e,t);let r=J8(e,t),i=new T8(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(i.getTime())}function B4i(e,t,n){return typeof e==`boolean`||typeof e==`function`?e:e instanceof Date?Y8(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?Y8(e,t,n):e):_0i(e)?{...e,from:e.from?J8(e.from,t):e.from,to:e.to?J8(e.to,t):e.to}:g0i(e)?{before:Y8(e.before,t,n),after:Y8(e.after,t,n)}:v0i(e)?{after:Y8(e.after,t,n)}:y0i(e)?{before:Y8(e.before,t,n)}:e}function V4i(e,t,n){return e&&(Array.isArray(e)?e.map(e=>B4i(e,t,n)):B4i(e,t,n))}var H4i=o((()=>{E8(),z4i(),H8()}));function U4i(e){let t=e,n=t.timeZone;if(n){if(t={...e,timeZone:n},t.today&&(t.today=J8(t.today,n)),t.month&&(t.month=J8(t.month,n)),t.defaultMonth&&(t.defaultMonth=J8(t.defaultMonth,n)),t.startMonth&&(t.startMonth=J8(t.startMonth,n)),t.endMonth&&(t.endMonth=J8(t.endMonth,n)),t.mode===`single`&&t.selected)t.selected=J8(t.selected,n);else if(t.mode===`multiple`&&t.selected){var r;t.selected=(r=t.selected)==null?void 0:r.map(e=>J8(e,n))}else t.mode===`range`&&t.selected&&(t.selected={from:t.selected.from?J8(t.selected.from,n):t.selected.from,to:t.selected.to?J8(t.selected.to,n):t.selected.to});if(t.disabled!==void 0&&(t.disabled=V4i(t.disabled,n)),t.hidden!==void 0&&(t.hidden=V4i(t.hidden,n)),t.modifiers){let e={};Object.keys(t.modifiers).forEach(r=>{var i;e[r]=V4i((i=t.modifiers)==null?void 0:i[r],n)}),t.modifiers=e}}let{components:i,formatters:a,labels:o,dateLib:s,locale:l,classNames:u}=(0,X8.useMemo)(()=>{let e={...z$i,...t.locale},n=t.broadcastCalendar?1:t.weekStartsOn,r=t.noonSafe&&t.timeZone?M2i(t.timeZone,{weekStartsOn:n,locale:e}):void 0,i=t.dateLib&&r?{...r,...t.dateLib}:t.dateLib??r,a=new D8({locale:e,weekStartsOn:n,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},i);return{dateLib:a,components:D0i(t.components),formatters:Y0i(t.formatters),labels:S2i(t.labels,a.options),locale:e,classNames:{...j0i(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:s.today()});let{captionLayout:d,mode:f,navLayout:p,numberOfMonths:m=1,onDayBlur:h,onDayClick:g,onDayFocus:_,onDayKeyDown:v,onDayMouseEnter:y,onDayMouseLeave:b,onNextClick:x,onPrevClick:S,showWeekNumber:C,styles:w}=t,{formatCaption:T,formatDay:E,formatMonthDropdown:D,formatWeekNumber:O,formatWeekNumberHeader:k,formatWeekdayName:A,formatYearDropdown:j}=a,M=l4i(t,s),{days:N,months:P,navStart:F,navEnd:I,previousMonth:L,nextMonth:R,goToMonth:ee}=M,te=C0i(N,t,F,I,s),{isSelected:ne,select:z,selected:re}=L4i(t,s)??{},{blur:ie,focused:ae,isFocusTarget:oe,moveFocus:se,setFocused:ce}=y4i(t,M,te,ne??(()=>!1),s),{labelDayButton:le,labelGridcell:ue,labelGrid:de,labelMonthDropdown:fe,labelNav:pe,labelPrevious:me,labelNext:he,labelWeekday:ge,labelWeekNumber:_e,labelWeekNumberHeader:ve,labelYearDropdown:ye}=o,be=(0,X8.useMemo)(()=>O2i(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),xe=f!==void 0||g!==void 0,Se=(0,X8.useCallback)(()=>{L&&(ee(L),S==null||S(L))},[L,ee,S]),Ce=(0,X8.useCallback)(()=>{R&&(ee(R),x==null||x(R))},[ee,R,x]),we=(0,X8.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),ce(e),!t.disabled&&(z==null||z(e.date,t,n),g==null||g(e.date,t,n))},[z,g,ce]),Te=(0,X8.useCallback)((e,t)=>n=>{ce(e),_==null||_(e.date,t,n)},[_,ce]),Ee=(0,X8.useCallback)((e,t)=>n=>{ie(),h==null||h(e.date,t,n)},[ie,h]),De=(0,X8.useCallback)((e,n)=>r=>{let i={ArrowLeft:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`after`:`before`],ArrowRight:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`before`:`after`],ArrowDown:[r.shiftKey?`year`:`week`,`after`],ArrowUp:[r.shiftKey?`year`:`week`,`before`],PageUp:[r.shiftKey?`year`:`month`,`before`],PageDown:[r.shiftKey?`year`:`month`,`after`],Home:[`startOfWeek`,`before`],End:[`endOfWeek`,`after`]};if(i[r.key]){r.preventDefault(),r.stopPropagation();let[e,t]=i[r.key];se(e,t)}v==null||v(e.date,n,r)},[se,v,t.dir]),Oe=(0,X8.useCallback)((e,t)=>n=>{y==null||y(e.date,t,n)},[y]),B=(0,X8.useCallback)((e,t)=>n=>{b==null||b(e.date,t,n)},[b]),ke=(0,X8.useCallback)((e,t)=>n=>{let r=Number(n.target.value),i=s.setMonth(s.startOfMonth(e),r);ee(s.addMonths(i,-t))},[s,ee]),Ae=(0,X8.useCallback)((e,t)=>n=>{let r=Number(n.target.value),i=s.setYear(s.startOfMonth(e),r);ee(s.addMonths(i,-t))},[s,ee]),{className:je,style:Me}=(0,X8.useMemo)(()=>({className:[u[M8.Root],t.className].filter(Boolean).join(` `),style:{...w==null?void 0:w[M8.Root],...t.style}}),[u,t.className,t.style,w]),Ne=k0i(t),Pe=e=>{let t=w==null?void 0:w[M8.Dropdown],n=w==null?void 0:w[e];if(t||n)return{...t,...n}},Fe=(0,X8.useRef)(null);P2i(Fe,!!t.animate,{classNames:u,months:P,focused:ae,dateLib:s});let Ie={dayPickerProps:t,selected:re,select:z,isSelected:ne,months:P,nextMonth:R,previousMonth:L,goToMonth:ee,getModifiers:te,components:i,classNames:u,styles:w,labels:o,formatters:a};return X8.createElement(o1i.Provider,{value:Ie},X8.createElement(i.Root,{rootRef:t.animate?Fe:void 0,className:je,style:Me,dir:t.dir,id:t.id,lang:t.lang??l.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t[`aria-label`],"aria-labelledby":t[`aria-labelledby`],...Ne},X8.createElement(i.Months,{className:u[M8.Months],style:w==null?void 0:w[M8.Months]},!t.hideNavigation&&!p&&X8.createElement(i.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:u[M8.Nav],style:w==null?void 0:w[M8.Nav],"aria-label":pe(),onPreviousClick:Se,onNextClick:Ce,previousMonth:L,nextMonth:R}),P.map((e,n)=>{let r=t.reverseMonths?P.length-1-n:n;return X8.createElement(i.Month,{"data-animated-month":t.animate?`true`:void 0,className:u[M8.Month],style:w==null?void 0:w[M8.Month],key:n,displayIndex:n,calendarMonth:e},p===`around`&&!t.hideNavigation&&n===0&&X8.createElement(i.PreviousMonthButton,{type:`button`,className:u[M8.PreviousMonthButton],style:w==null?void 0:w[M8.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":!L||void 0,"aria-label":me(L),onClick:Se,"data-animated-button":t.animate?`true`:void 0},X8.createElement(i.Chevron,{disabled:!L||void 0,className:u[M8.Chevron],style:w==null?void 0:w[M8.Chevron],orientation:t.dir===`rtl`?`right`:`left`})),X8.createElement(i.MonthCaption,{"data-animated-caption":t.animate?`true`:void 0,className:u[M8.MonthCaption],style:w==null?void 0:w[M8.MonthCaption],calendarMonth:e,displayIndex:n},d!=null&&d.startsWith(`dropdown`)?X8.createElement(i.DropdownNav,{className:u[M8.Dropdowns],style:w==null?void 0:w[M8.Dropdowns]},(()=>{let n=d===`dropdown`||d===`dropdown-months`?X8.createElement(i.MonthsDropdown,{key:`month`,className:u[M8.MonthsDropdown],"aria-label":fe(),disabled:!!t.disableNavigation,onChange:ke(e.date,r),options:w2i(e.date,F,I,a,s),style:Pe(M8.MonthsDropdown),value:s.getMonth(e.date)}):X8.createElement(`span`,{key:`month`},D(e.date,s)),o=d===`dropdown`||d===`dropdown-years`?X8.createElement(i.YearsDropdown,{key:`year`,className:u[M8.YearsDropdown],"aria-label":ye(s.options),disabled:!!t.disableNavigation,onChange:Ae(e.date,r),options:A2i(F,I,a,s,!!t.reverseYears),style:Pe(M8.YearsDropdown),value:s.getYear(e.date)}):X8.createElement(`span`,{key:`year`},j(e.date,s));return s.getMonthYearOrder()===`year-first`?[o,n]:[n,o]})(),X8.createElement(`span`,{role:`status`,"aria-live":`polite`,style:{border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}},T(e.date,s.options,s))):X8.createElement(i.CaptionLabel,{className:u[M8.CaptionLabel],style:w==null?void 0:w[M8.CaptionLabel],role:`status`,"aria-live":`polite`},T(e.date,s.options,s))),p===`around`&&!t.hideNavigation&&n===m-1&&X8.createElement(i.NextMonthButton,{type:`button`,className:u[M8.NextMonthButton],style:w==null?void 0:w[M8.NextMonthButton],tabIndex:R?void 0:-1,"aria-disabled":!R||void 0,"aria-label":he(R),onClick:Ce,"data-animated-button":t.animate?`true`:void 0},X8.createElement(i.Chevron,{disabled:!R||void 0,className:u[M8.Chevron],style:w==null?void 0:w[M8.Chevron],orientation:t.dir===`rtl`?`left`:`right`})),n===m-1&&p===`after`&&!t.hideNavigation&&X8.createElement(i.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:u[M8.Nav],style:w==null?void 0:w[M8.Nav],"aria-label":pe(),onPreviousClick:Se,onNextClick:Ce,previousMonth:L,nextMonth:R}),X8.createElement(i.MonthGrid,{role:`grid`,"aria-multiselectable":f===`multiple`||f===`range`,"aria-label":de(e.date,s.options,s)||void 0,className:u[M8.MonthGrid],style:w==null?void 0:w[M8.MonthGrid]},!t.hideWeekdays&&X8.createElement(i.Weekdays,{"data-animated-weekdays":t.animate?`true`:void 0,className:u[M8.Weekdays],style:w==null?void 0:w[M8.Weekdays]},C&&X8.createElement(i.WeekNumberHeader,{"aria-label":ve(s.options),className:u[M8.WeekNumberHeader],style:w==null?void 0:w[M8.WeekNumberHeader],scope:`col`},k()),be.map(e=>X8.createElement(i.Weekday,{"aria-label":ge(e,s.options,s),className:u[M8.Weekday],key:String(e),style:w==null?void 0:w[M8.Weekday],scope:`col`},A(e,s.options,s)))),X8.createElement(i.Weeks,{"data-animated-weeks":t.animate?`true`:void 0,className:u[M8.Weeks],style:w==null?void 0:w[M8.Weeks]},e.weeks.map(e=>X8.createElement(i.Week,{className:u[M8.Week],key:e.weekNumber,style:w==null?void 0:w[M8.Week],week:e},C&&X8.createElement(i.WeekNumber,{week:e,style:w==null?void 0:w[M8.WeekNumber],"aria-label":_e(e.weekNumber,{locale:l}),className:u[M8.WeekNumber],scope:`row`,role:`rowheader`},O(e.weekNumber,s)),e.days.map(e=>{let{date:n}=e,r=te(e);if(r[N8.focused]=!r.hidden&&!!(ae!=null&&ae.isEqualTo(e)),r[P8.selected]=(ne==null?void 0:ne(n))||r.selected,_0i(re)){let{from:e,to:t}=re;r[P8.range_start]=!!(e&&t&&s.isSameDay(n,e)),r[P8.range_end]=!!(e&&t&&s.isSameDay(n,t)),r[P8.range_middle]=B8(re,n,!0,s)}let a=E2i(r,w,t.modifiersStyles),o=T0i(r,u,t.modifiersClassNames),l=!xe&&!r.hidden?ue(n,r,s.options,s):void 0;return X8.createElement(i.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:r,className:o.join(` `),style:a,role:`gridcell`,"aria-selected":r.selected||void 0,"aria-label":l,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":r.selected||void 0,"data-disabled":r.disabled||void 0,"data-hidden":r.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":r.focused||void 0,"data-today":r.today||void 0},!r.hidden&&xe?X8.createElement(i.DayButton,{className:u[M8.DayButton],style:w==null?void 0:w[M8.DayButton],type:`button`,day:e,modifiers:r,disabled:!r.focused&&r.disabled||void 0,"aria-disabled":r.focused&&r.disabled||void 0,tabIndex:oe(e)?0:-1,"aria-label":le(n,r,s.options,s),onClick:we(e,r),onBlur:Ee(e,r),onFocus:Te(e,r),onKeyDown:De(e,r),onMouseEnter:Oe(e,r),onMouseLeave:B(e,r)},E(n,s.options,s)):!r.hidden&&E(e.date,s.options,s))}))))))})),t.footer&&X8.createElement(i.Footer,{className:u[M8.Footer],style:w==null?void 0:w[M8.Footer],role:`status`,"aria-live":`polite`},t.footer)))}var X8,W4i=o((()=>{X8=d(p(),1),k8(),w0i(),E0i(),O0i(),A0i(),M0i(),X0i(),C2i(),T2i(),D2i(),k2i(),j2i(),N2i(),I8(),V2i(),d4i(),L8(),x4i(),R4i(),H4i(),V8(),z4i(),H8()})),G4i=o((()=>{M0i()})),K4i=o((()=>{})),q4i=o((()=>{})),J4i=o((()=>{})),Y4i=o((()=>{K4i(),q4i(),J4i()})),X4i=o((()=>{E8(),A8(),h0i(),W4i(),J0i(),G4i(),x2i(),Y4i(),I8(),L8(),M4i()}));function Z4i({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r=`label`,buttonVariant:i=`ghost`,formatters:a,components:o,"aria-label":s,"aria-labelledby":l,...u}){let d=j0i();return(0,Z8.jsx)(U4i,{showOutsideDays:n,className:xn(`pf-calendar bg-background group/calendar [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent`,String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:e=>e.toLocaleString(`default`,{month:`short`}),...a},classNames:{root:xn(`w-fit`,d.root),months:xn(`relative flex flex-col gap-4 md:flex-row`,d.months),month:xn(`flex w-full flex-col gap-4`,d.month),nav:xn(`absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1`,d.nav),button_previous:xn(Tn({variant:i}),`h-[var(--cell-size)] w-[var(--cell-size)] select-none p-0 aria-disabled:opacity-50`,d.button_previous),button_next:xn(Tn({variant:i}),`h-[var(--cell-size)] w-[var(--cell-size)] select-none p-0 aria-disabled:opacity-50`,d.button_next),month_caption:xn(`flex h-[var(--cell-size)] w-full items-center justify-center px-[var(--cell-size)]`,d.month_caption),dropdowns:xn(`flex h-[var(--cell-size)] w-full items-center justify-center gap-1.5 text-sm font-medium`,d.dropdowns),dropdown_root:xn(`pf-calendar-dropdown-root shadow-xs relative rounded-md`,d.dropdown_root),dropdown:xn(`bg-popover absolute inset-0 opacity-0`,d.dropdown),caption_label:xn(`pf-calendar-caption-label select-none font-medium`,r===`label`?`text-sm`:`[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md text-sm [&>svg]:size-3.5`,d.caption_label),month_grid:`w-full border-collapse`,weekdays:xn(`flex`,d.weekdays),weekday:xn(`text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal`,d.weekday),week:xn(`mt-2 flex w-full`,d.week),week_number_header:xn(`w-[var(--cell-size)] select-none`,d.week_number_header),week_number:xn(`text-muted-foreground select-none text-[0.8rem]`,d.week_number),day:xn(`group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md`,d.day),range_start:xn(`bg-accent rounded-l-md`,d.range_start),range_middle:xn(`rounded-none`,d.range_middle),range_end:xn(`bg-accent rounded-r-md`,d.range_end),today:xn(`bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none`,d.today),outside:xn(`text-muted-foreground aria-selected:text-muted-foreground`,d.outside),disabled:xn(`text-muted-foreground opacity-50`,d.disabled),hidden:xn(`invisible`,d.hidden),...t},components:{MonthGrid:e=>(0,Z8.jsx)(x1i,{...e,...Ne({"aria-label":s,"aria-labelledby":l})}),Root:({className:e,rootRef:t,...n})=>(0,Z8.jsx)(`div`,{"data-slot":`calendar`,ref:t,className:xn(e),...n}),Chevron:({className:e,orientation:t,...n})=>t===`left`?(0,Z8.jsx)(gp,{className:xn(`size-4`,e),...n}):t===`right`?(0,Z8.jsx)(_p,{className:xn(`size-4`,e),...n}):(0,Z8.jsx)(hp,{className:xn(`size-4`,e),...n}),DayButton:Q4i,WeekNumber:({children:e,...t})=>(0,Z8.jsx)(`td`,{...t,children:(0,Z8.jsx)(`div`,{className:`flex size-[var(--cell-size)] items-center justify-center text-center`,children:e})}),...o},...u})}function Q4i({className:e,day:t,modifiers:n,...r}){let i=j0i(),a=$4i.useRef(null);return $4i.useEffect(()=>{var e;n.focused&&((e=a.current)==null||e.focus())},[n.focused]),(0,Z8.jsx)(Cn,{ref:a,variant:`ghost`,size:`icon`,"data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:xn(`data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[var(--cell-size)] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70`,i.day,e),...r})}var $4i,Z8,e3i=o((()=>{$4i=d(p(),1),yp(),X4i(),Sn(),Pe(),En(),Z8=Ie()})),t3i=l({PrefabCalendar:()=>n3i,PrefabDatePicker:()=>r3i});function n3i({mode:e=`single`,value:t,onSelect:n,className:r,...i}){let a=(0,Q8.useMemo)(()=>{if(t){if(e===`range`)try{let e=JSON.parse(t);return{from:e.from?y8(e.from):void 0,to:e.to?y8(e.to):void 0}}catch{return}if(e===`multiple`)try{return JSON.parse(t).map(e=>y8(e))}catch{return}return y8(t)}},[t,e]),o=(0,Q8.useMemo)(()=>{if(a)return e===`range`?a.from:e===`multiple`?a[0]:a},[a,e]),[s,l]=(0,Q8.useState)(()=>{if(e!==`range`||!a)return!1;let t=a;return!!t.from&&!!t.to}),u=xn(`rounded-lg border border-border`,r);return e===`range`?(0,$8.jsx)(Z4i,{...Ne(i),mode:`range`,numberOfMonths:2,defaultMonth:o,selected:a,onSelect:(e,t)=>{if(n){if(s)n(JSON.stringify({from:t.toISOString()})),l(!1);else if(e){var r,i;n(JSON.stringify({from:(r=e.from)==null?void 0:r.toISOString(),to:(i=e.to)==null?void 0:i.toISOString()})),l(!!e.from&&!!e.to)}}},className:u}):e===`multiple`?(0,$8.jsx)(Z4i,{...Ne(i),mode:`multiple`,defaultMonth:o,selected:a,onSelect:e=>{n&&e&&n(JSON.stringify(e.map(e=>e.toISOString())))},className:u}):(0,$8.jsx)(Z4i,{...Ne(i),mode:`single`,defaultMonth:o,selected:a,onSelect:e=>{e&&n&&n(e.toISOString())},className:u})}function r3i({placeholder:e=`Pick a date`,value:t,onSelect:n,className:r,...i}){let[a,o]=(0,Q8.useState)(!1),s=(0,Q8.useMemo)(()=>{if(t)return y8(t)},[t]),l=e=>{let t=e;t&&n&&n(t.toISOString()),o(!1)};return(0,$8.jsxs)(w2t,{open:a,onOpenChange:o,children:[(0,$8.jsxs)(T2t,{...Ne(i),className:xn(`pf-button pf-button-variant-outline pf-button-size-default w-full justify-between text-left font-normal`,!s&&`text-muted-foreground`,r),children:[(0,$8.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,$8.jsx)(Kae,{className:`size-4`}),s?v8(s,`PPP`):e]}),(0,$8.jsx)(hp,{className:`size-4 opacity-50`})]}),(0,$8.jsx)(E2t,{className:`w-auto p-0`,align:`start`,children:(0,$8.jsx)(Z4i,{mode:`single`,selected:s,onSelect:l})})]})}var Q8,$8,i3i=o((()=>{Q8=d(p(),1),h$i(),yp(),Sn(),Pe(),e3i(),D2t(),$8=Ie()}));function e5(e,t){return(0,a3i.lazy)(()=>e().then(e=>({default:e[t]})))}var a3i,o3i,s3i,t5,c3i,l3i,u3i,d3i,f3i,p3i,m3i,h3i,g3i,_3i,v3i,y3i,b3i,x3i,S3i,C3i,w3i,T3i,E3i,D3i,O3i=o((()=>{a3i=d(p(),1),sjt(),djt(),vjt(),wjt(),Djt(),_Ut(),wUt(),OUt(),jUt(),PUt(),LUt(),UUt(),_Gt(),xGt(),wGt(),WGt(),qGt(),YYt(),tXt(),pXt(),EXt(),kXt(),MXt(),IXt(),HXt(),qXt(),ZXt(),VQt(),L3t(),xp(),o3i=()=>bp(()=>Promise.resolve().then(()=>($6t(),Y6t)),void 0,import.meta.url),s3i=e5(o3i,`Svg`),t5=()=>bp(()=>Promise.resolve().then(()=>(xGn(),cGn)),void 0,import.meta.url),c3i=e5(t5,`PrefabBarChart`),l3i=e5(t5,`PrefabLineChart`),u3i=e5(t5,`PrefabAreaChart`),d3i=e5(t5,`PrefabPieChart`),f3i=e5(t5,`PrefabRadarChart`),p3i=e5(t5,`PrefabRadialChart`),m3i=e5(t5,`PrefabScatterChart`),h3i=e5(t5,`PrefabWaterfallChart`),g3i=e5(t5,`PrefabSparkline`),_3i=()=>bp(()=>Promise.resolve().then(()=>(s6n(),n6n)),void 0,import.meta.url),v3i=e5(_3i,`Code`),y3i=e5(_3i,`Markdown`),b3i=()=>bp(()=>Promise.resolve().then(()=>(j8n(),D8n)),void 0,import.meta.url),x3i=e5(b3i,`PrefabCarousel`),S3i=()=>bp(()=>Promise.resolve().then(()=>(yKi(),fKi)),void 0,import.meta.url),C3i=e5(S3i,`Mermaid`),w3i=()=>bp(()=>Promise.resolve().then(()=>(i3i(),t3i)),void 0,import.meta.url),T3i=e5(w3i,`PrefabCalendar`),E3i=e5(w3i,`PrefabDatePicker`),D3i={Button:ajt,Badge:cjt,Card:fjt,CardHeader:pjt,CardTitle:mjt,CardDescription:hjt,CardContent:gjt,CardFooter:_jt,Alert:Tjt,AlertTitle:bjt,AlertDescription:xjt,Input:kUt,Textarea:MUt,Label:VYt,Separator:FUt,Slider:pGt,Dot:vGt,Loader:HUt,Progress:HGt,Combobox:gUt,ComboboxGroup:()=>null,ComboboxLabel:()=>null,ComboboxOption:()=>null,ComboboxSeparator:()=>null,Select:UYt,SelectGroup:()=>null,SelectLabel:()=>null,SelectOption:()=>null,SelectSeparator:()=>null,RadioGroup:WYt,Radio:HYt,Checkbox:KYt,Switch:qYt,ButtonGroup:JYt,Table:Pv,TableHeader:Fv,TableBody:Iv,TableFooter:GGt,TableRow:Lv,TableHead:Rv,TableCell:zv,TableCaption:KGt,BarChart:c3i,LineChart:l3i,AreaChart:u3i,PieChart:d3i,RadarChart:f3i,RadialChart:p3i,ScatterChart:m3i,WaterfallChart:h3i,Sparkline:g3i,Carousel:x3i,DataTable:BQt,Metric:zXt,Ring:UXt,DropZone:eXt,Field:vUt,ChoiceCard:yUt,FieldTitle:bUt,FieldDescription:xUt,FieldContent:SUt,FieldError:CUt,Row:nXt,Column:rXt,Container:sXt,Form:oXt,Grid:iXt,GridItem:aXt,Dashboard:lXt,DashboardItem:uXt,Div:cXt,Link:fXt,Span:dXt,Text:mXt,Heading:Dy,H1:hXt,H2:gXt,H3:_Xt,H4:vXt,P:yXt,Lead:bXt,Large:xXt,Small:SXt,Muted:CXt,BlockQuote:wXt,Code:v3i,Image:AXt,Markdown:y3i,Mermaid:C3i,Icon:TUt,Kbd:SGt,Audio:PXt,Embed:DXt,Svg:s3i,Video:NXt,Condition:YXt,ForEach:JXt,Slot:XXt,Tabs:A3t,Tab:()=>null,Accordion:j3t,AccordionItem:()=>null,Pages:M3t,Page:()=>null,Tooltip:N3t,HoverCard:P3t,Popover:F3t,Dialog:I3t,Calendar:T3i,DatePicker:E3i}}));function n5(e,t){let n=e;return(e,...r)=>(t(e),n==null?void 0:n(e,...r))}function k3i(e,t,n){e.onValueChange=n5(e.onValueChange,e=>t.set(n,e))}var A3i=o((()=>{}));function j3i(e,t){let n=e.trim();if(!n)return!1;try{let e=n;return e.startsWith(`{{`)&&e.endsWith(`}}`)&&(e=e.slice(2,-2).trim()),!!rZt(e,t)}catch{return console.warn(`[Prefab] Failed to parse condition expression: "${e}". Falling back to key lookup.`),!!t[n]}}var M3i=o((()=>{oZt()}));function N3i(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function P3i(e,t=`|`){return e.map(e=>J3i(e)).join(t)}function F3i(e,t){return typeof t==`bigint`?t.toString():t}function I3i(e){return new v6i(e)}function L3i(e){return e==null}function R3i(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function z3i(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r){let e=t._zod.def.shape[a];return r?r(e,a):e}):U3i(e,a,r?r(n.value,a):n.value))}}function W3i(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?H3i(e,n,()=>t[n]):U3i(e,n,r.value))}}function o5(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function G3i(e){return JSON.stringify(e)}function K3i(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function s5(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function c5(e){if(s5(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return s5(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function q3i(e){return c5(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function l5(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function u5(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function d5(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function J3i(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Y3i(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function X3i(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return a5(i,e,Z3i(e,t)),u5(e,o5(n,{shape:i,checks:[]}))}function Z3i(e,t){let n=i5(e),r=[];for(let e of Reflect.ownKeys(t)){var i;if(!((i=Object.getOwnPropertyDescriptor(n,e))!=null&&i.enumerable))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Q3i(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Z3i(e,t)),a={};return a5(a,e,Reflect.ownKeys(i5(e)).filter(e=>!i.has(e))),u5(e,o5(n,{shape:a,checks:[]}))}function $3i(e,t){if(!c5(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=i5(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return u5(e,o5(e._zod.def,{shape:e6i(e,t)}))}function e6i(e,t){let n={};return a5(n,e,Reflect.ownKeys(i5(e))),W3i(n,t),n}function t6i(e,t){if(!c5(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return u5(e,o5(e._zod.def,{shape:e6i(e,t)}))}function n6i(e,t){var n,r;if(!(t!=null&&(n=t._zod)!=null&&n.def))throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if((r=e._zod.def.checks)!=null&&r.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let i={};return a5(i,e,Reflect.ownKeys(i5(e))),a5(i,t,Reflect.ownKeys(i5(t))),u5(e,o5(e._zod.def,{shape:i,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function r6i(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Z3i(t,n)):void 0,o={};return a5(o,t,Reflect.ownKeys(i5(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),u5(t,o5(t._zod.def,{shape:o,checks:[]}))}function i6i(e,t,n){let r=n?new Set(Z3i(t,n)):void 0,i={};return a5(i,t,Reflect.ownKeys(i5(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),u5(t,o5(t._zod.def,{shape:i}))}function f5(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function m5(e){return typeof e==`string`?e:e==null?void 0:e.message}function o6i(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function s6i(e,t,n){var r;for(let i=t;ie;return t[O6i]=!0,t}var v6i,y6i,b6i,x6i,S6i,C6i,w6i,T6i,E6i,y5,D6i,O6i,b5=o((()=>{T5(),v6i=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}},y6i=Symbol(`evaluating`),b6i=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},x6i=I3i(()=>{var e;if(w5.jitless||typeof navigator<`u`&&(e=navigator)!=null&&(e=e.userAgent)!=null&&e.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),S6i=new Set([`string`,`number`,`symbol`]),C6i={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},w6i={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},T6i=/[\uD800-\uDBFF]/,y5=!1,D6i={configurable:!0,get(){y5=!0}},O6i=`~constantCatch`}));function k6i(e){let t=N6i;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return N6i=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function x5(e,t,n,r){let i={};function a(e){this.def=e,this.constr=f,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function l(n,r){if(!n._zod){M6i.value=new a(r);try{Object.defineProperty(n,"_zod",M6i)}finally{M6i.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),d6i(i,o))}let i=f.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let u=(r==null?void 0:r.Parent)??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function f(e){var t;let n=r!=null&&r.Parent?k6i(d):this;l(n,e);let i=n._zod.deferred;if(i){for(let e of i)e();n._zod.deferred=void 0}let a=(t=globalThis.__zod_globalConfig)==null?void 0:t.postProcessor;return a&&a(n),n}return Object.defineProperty(f,"init",{value:l}),Object.defineProperty(f,Symbol.hasInstance,{value:t=>{var n;return r!=null&&r.Parent&&t instanceof r.Parent?!0:t==null||(n=t._zod)==null||(n=n.traits)==null?void 0:n.has(e)}}),Object.defineProperty(f,"name",{value:e}),f}function S5(e){return e&&Object.assign(w5,e),w5}var A6i,j6i,M6i,N6i,C5,P6i,w5,T5=o((()=>{b5(),j6i=Object.freeze({status:`aborted`}),M6i={value:void 0,enumerable:!1},N6i=`captureStackTrace`in Error?Error:null,C5=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},P6i=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(A6i=globalThis).__zod_globalConfig??(A6i.__zod_globalConfig={}),w5=globalThis.__zod_globalConfig}));function F6i(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,F3i,2)),e.message}function I6i(e){this._zod.message=e}function L6i(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function R6i(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?L6i(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function z6i(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i{T5(),b5(),B6i={get:F6i,set:I6i,enumerable:!0,configurable:!0},V6i={value:void 0,enumerable:!1},H6i=new WeakSet([Object.prototype,Error.prototype]),U6i=(e,t)=>{e.name=`$ZodError`,V6i.value=t,Object.defineProperty(e,"issues",V6i),V6i.value=void 0,Object.defineProperty(e,"message",B6i);let n=Object.getPrototypeOf(e);H6i.has(n)||(H6i.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},W6i=x5(`$ZodError`,U6i)}));function K6i(e,t){return{callee:(t==null?void 0:t.callee)??e,Err:t==null?void 0:t.Err}}function q6i(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>h5(e,n,S5()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}function J6i(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[e8i]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new C5;return a.issues.length===0}var Y6i,X6i,Z6i,Q6i,$6i,e8i,t8i,n8i,r8i,i8i,a8i,o8i,s8i,c8i,l8i,u8i,d8i=o((()=>{T5(),b5(),Y6i=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new C5;if(s.issues.length){let n=new((a==null?void 0:a.Err)??e)(s.issues.map(e=>h5(e,o,S5())));throw b6i(n,(a==null?void 0:a.callee)??t),n}return s.value};return t},X6i=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a==null?void 0:a.Err)??e)(s.issues.map(e=>h5(e,o,S5())));throw b6i(n,(a==null?void 0:a.callee)??t),n}return s.value};return t},Z6i=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new C5;return a.issues.length?q6i(e,a.issues,i):{success:!0,data:a.value}},Q6i=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?q6i(e,a.issues,i):{success:!0,data:a.value}},$6i=Symbol.for(`zod.compile.invalid`),e8i=Symbol.for(`zod.compile.fallback`),t8i=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==$6i)return!0;if(r.definite===!0&&n===void 0)return!1}return J6i(e,t,n)}),n8i=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},r8i=e=>{let t=Y6i(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,K6i(n,a))};return n},i8i=e=>{let t=Y6i(e),n=(e,r,i,a)=>t(e,r,i,K6i(n,a));return n},a8i=e=>{let t=X6i(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,K6i(n,a))};return n},o8i=e=>{let t=X6i(e),n=async(e,r,i,a)=>await t(e,r,i,K6i(n,a));return n},s8i=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Z6i(e)(t,n,i)},c8i=e=>(t,n,r)=>Z6i(e)(t,n,r),l8i=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Q6i(e)(t,n,i)},u8i=e=>async(t,n,r)=>Q6i(e)(t,n,r)}));function f8i(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function p8i(){return new RegExp(O8i,`u`)}function m8i(e){return RegExp(`^${e}$`)}function h8i(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function g8i(e){return RegExp(`^${h8i(e)}$`)}function _8i(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${h8i({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${h8i({precision:e.precision})}`:n;return RegExp(`^${L8i}T(?:${r})$`)}var v8i,y8i,b8i,x8i,S8i,C8i,w8i,T8i,E8i,D8i,O8i,k8i,A8i,j8i,M8i,N8i,P8i,F8i,I8i,L8i,R8i,z8i,B8i,V8i,H8i,U8i,W8i,G8i,K8i,q8i=o((()=>{v8i=/^[cC][0-9a-z]{6,}$/,y8i=/^[0-9a-z]+$/,b8i=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,x8i=/^[0-9a-vA-V]{20}$/,S8i=/^[A-Za-z0-9]{27}$/,C8i=/^[a-zA-Z0-9_-]{21}$/,w8i=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,T8i=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,E8i=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,D8i=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,O8i=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,k8i=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,A8i=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,j8i=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,M8i=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,N8i=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,P8i=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,F8i=/^https?$/,I8i=/^\+[1-9]\d{6,14}$/,L8i=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,R8i=m8i(L8i),z8i=/^[\s\S]{0,}$/,B8i=/^-?\d+$/,V8i=/^-?\d+(?:\.\d+)?$/,H8i=/^(?:true|false)$/i,U8i=/^null$/i,W8i=/^undefined$/i,G8i=/^[^A-Z]*$/,K8i=/^[^a-z]*$/})),E5,J8i,D5,Y8i,X8i,Z8i,Q8i,$8i,e5i,t5i,O5,n5i,r5i,i5i,a5i,o5i,s5i,c5i,l5i=o((()=>{T5(),q8i(),b5(),E5=x5(`$ZodCheck`,(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),J8i=e=>{let t=e.value;return!L3i(t)&&t.length!==void 0},D5={number:`number`,bigint:`bigint`,object:`date`},Y8i=x5(`$ZodCheckLessThan`,(e,t)=>{E5.init(e,t);let n=D5[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value{E5.init(e,t);let n=D5[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:D5[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Z8i=x5(`$ZodCheckMultipleOf`,(e,t)=>{E5.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):z3i(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Q8i=x5(`$ZodCheckNumberFormat`,(e,t)=>{var n;E5.init(e,t),t.format=t.format||`float64`;let r=(n=t.format)==null?void 0:n.includes(`int`),i=r?`int`:`number`,[a,o]=C6i[t.format];e._zod.check=n=>{let s=n.value;if(r){if(!Number.isInteger(s)){n.issues.push({expected:i,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?n.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:i,inclusive:!0,continue:!t.abort}):n.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}so&&n.issues.push({origin:`number`,input:s,code:`too_big`,maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),$8i=x5(`$ZodCheckMaxLength`,(e,t)=>{var n;E5.init(e,t),(n=e._zod.def).when??(n.when=J8i),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?c6i(r):i)<=t.maximum)return;let a=l6i(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),e5i=x5(`$ZodCheckMinLength`,(e,t)=>{var n;E5.init(e,t),(n=e._zod.def).when??(n.when=J8i),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=l6i(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),t5i=x5(`$ZodCheckLengthEquals`,(e,t)=>{var n;E5.init(e,t),(n=e._zod.def).when??(n.when=J8i),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?c6i(r):i;if(a===t.length)return;let o=l6i(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),O5=x5(`$ZodCheckStringFormat`,(e,t)=>{var n,r;E5.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),n5i=x5(`$ZodCheckRegex`,(e,t)=>{O5.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),r5i=x5(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??(t.pattern=G8i),O5.init(e,t)}),i5i=x5(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??(t.pattern=K8i),O5.init(e,t)}),a5i=x5(`$ZodCheckIncludes`,(e,t)=>{E5.init(e,t);let n=l5(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),o5i=x5(`$ZodCheckStartsWith`,(e,t)=>{E5.init(e,t);let n=RegExp(`^${l5(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),s5i=x5(`$ZodCheckEndsWith`,(e,t)=>{E5.init(e,t);let n=RegExp(`.*${l5(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),c5i=x5(`$ZodCheckOverwrite`,(e,t)=>{E5.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),u5i,d5i=o((()=>{u5i=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){var e;let t=Function,n=((e=this)==null?void 0:e.content)??[``];return new t(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${n.join(` `)}\n};`)(...Object.values(this.closed))}}})),f5i,p5i=o((()=>{f5i={major:4,minor:6,patch:7}}));async function m5i(e,t){let n={async:!0};return U5i(await e._zod.run({value:t,issues:[]},n),n)}function h5i(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return U5i(r,n)}catch{}return m5i(e,t)},vendor:`zod`,version:1}}function g5i(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function _5i(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?g5i(e)||2:v5i(e,t)}function v5i(e,t){var n;if(!t.normalize&&((n=t.protocol)==null?void 0:n.source)===F8i.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}function y5i(e){return e.replace(J5i,``)}function b5i(e,t){return t.lastIndex=0,t.test(e.hostname)}function x5i(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function S5i(e){return c7i.test(e)?g5i(`http://[${e}]`):!1}function C5i(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:S5i(n)}function w5i(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function T5i(e){if(!m7i.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return w5i(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function E5i(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&(i==null?void 0:i.typ)!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function D5i(e,t){let n=o6i(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!(a!=null&&a.skipChecks)&&(a==null?void 0:a.direction)!==`backward`){for(let[t,r]of o6i(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,s6i(n.issues,t,e),n}}return i(n,a)}}function O5i(e,t,n){e.issues.length&&t.issues.push(...p5(n,e.issues)),t.value[n]=e.value}function k5i(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...p5(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}function A5i(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:O7i,i=r.length?[...t,...r]:t;for(let t of i){var a;if(!((a=e.shape)!=null&&(a=a[t])!=null&&(a=a._zod)!=null&&(a=a.traits)!=null&&a.has(`$ZodType`)))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`)}let o=Y3i(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function j5i(e,t,n,r,i,a,o){let s=[],l=i.keySet,u=i.catchall._zod,d=u.def.type,f=u.optin,p=u.optout,m=0;for(let i in t){if(o&&n.issues.length!==m){if(f5(n,m))break;m=n.issues.length}if(l.has(i))continue;if(i===`__proto__`){d===`never`&&s.push(i);continue}if(d===`never`){s.push(i);continue}let a=u.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>k5i(e,n,i,t,f,p))):k5i(a,n,i,t,f,p)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function M5i(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!f5(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>h5(e,r,S5())))}),t)}function N5i(e){let t=new Map;for(let r of e.options){var n;let i=(n=r._zod.propValues)==null?void 0:n[e.discriminator];if(!i||i.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let e of i)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,r)}return t}function P5i(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(c5(e)&&c5(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=P5i(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{var n,o;let s;if(e.code===`unrecognized_keys`&&!((n=e.path)!=null&&n.length))i??(i=e),s=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&((o=e.path)==null?void 0:o.length)===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),s=[t]}else return!1;for(let e of s)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let l=P5i(t.value,n.value);if(!l.valid){if(f5(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}function I5i(e,t){return e.value=t.issues.length?void 0:t.value,e}function L5i(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function R5i(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function z5i(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>h5(e,r,S5()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function B5i(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function V5i(e){return e.memo||(e.value=Object.freeze(e.value)),e}function H5i(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(g5(e))}}var k5,U5i,W5i,A5,G5i,K5i,q5i,J5i,Y5i,X5i,Z5i,Q5i,$5i,e7i,t7i,n7i,r7i,i7i,a7i,o7i,s7i,c7i,l7i,u7i,d7i,f7i,p7i,m7i,h7i,g7i,_7i,v7i,y7i,b7i,x7i,S7i,C7i,w7i,T7i,E7i,D7i,O7i,k7i,A7i,j7i,M7i,N7i,P7i,F7i,I7i,L7i,R7i,z7i,B7i,V7i,H7i,U7i,W7i,G7i,K7i,q7i,J7i,Y7i,X7i=o((()=>{l5i(),T5(),d5i(),q8i(),b5(),p5i(),k5=x5(`$ZodType`,(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=f5i;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r!=null&&r.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0){var a;(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse})}else{let t=(t,n,r)=>{if(t.memo)return t;let i=f5(t),a;for(let o of n){if(o._zod.def.when){if(a6i(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&(r==null?void 0:r.async)===!1)throw new C5;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(s6i(t.issues,n,e),i||(i=f5(t,n)))});else{if(t.issues.length===n)continue;s6i(t.issues,n,e),i||(i=f5(t,n))}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(f5(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new C5;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new C5;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return f6i(this,`~standard`,h5i(this))},set"~standard"(e){_5(this,`~standard`,e)}}),U5i=(e,t)=>e.issues.length?{issues:e.issues.map(e=>h5(e,t,S5()))}:{value:e.value},W5i=x5(`$ZodString`,(e,t)=>{k5.init(e,t),e._zod.pattern=t.pattern??z8i,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),A5=x5(`$ZodStringFormat`,(e,t)=>{O5.init(e,t),W5i.init(e,t)}),G5i=x5(`$ZodGUID`,(e,t)=>{t.pattern??(t.pattern=T8i),A5.init(e,t)}),K5i=x5(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=E8i(e))}else t.pattern??(t.pattern=E8i());A5.init(e,t)}),q5i=x5(`$ZodEmail`,(e,t)=>{t.pattern??(t.pattern=D8i),A5.init(e,t)}),J5i=/[\t\n\r]/g,Y5i=x5(`$ZodURL`,(e,t)=>{A5.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=_5i(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=y5i(r);return}t.hostname&&!b5i(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!x5i(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:y5i(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),X5i=x5(`$ZodEmoji`,(e,t)=>{t.pattern??(t.pattern=p8i()),A5.init(e,t)}),Z5i=x5(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?C8i:f8i(t.length)),A5.init(e,t)}),Q5i=x5(`$ZodCUID`,(e,t)=>{t.pattern??(t.pattern=v8i),A5.init(e,t)}),$5i=x5(`$ZodCUID2`,(e,t)=>{t.pattern??(t.pattern=y8i),A5.init(e,t)}),e7i=x5(`$ZodULID`,(e,t)=>{t.pattern??(t.pattern=b8i),A5.init(e,t)}),t7i=x5(`$ZodXID`,(e,t)=>{t.pattern??(t.pattern=x8i),A5.init(e,t)}),n7i=x5(`$ZodKSUID`,(e,t)=>{t.pattern??(t.pattern=S8i),A5.init(e,t)}),r7i=x5(`$ZodISODateTime`,(e,t)=>{t.pattern??(t.pattern=_8i(t)),A5.init(e,t)}),i7i=x5(`$ZodISODate`,(e,t)=>{t.pattern??(t.pattern=R8i),A5.init(e,t)}),a7i=x5(`$ZodISOTime`,(e,t)=>{t.pattern??(t.pattern=g8i(t)),A5.init(e,t)}),o7i=x5(`$ZodISODuration`,(e,t)=>{t.pattern??(t.pattern=w8i),A5.init(e,t)}),s7i=x5(`$ZodIPv4`,(e,t)=>{t.pattern??(t.pattern=k8i),A5.init(e,t)}),c7i=/^[0-9a-fA-F:.]+$/,l7i=x5(`$ZodIPv6`,(e,t)=>{t.pattern??(t.pattern=A8i),A5.init(e,t),e._zod.check=n=>{S5i(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),u7i=x5(`$ZodCIDRv4`,(e,t)=>{t.pattern??(t.pattern=j8i),A5.init(e,t)}),d7i=x5(`$ZodCIDRv6`,(e,t)=>{t.pattern??(t.pattern=M8i),A5.init(e,t),e._zod.check=n=>{C5i(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),f7i=/^[0-9a-zA-Z+/]*={0,2}$/,p7i=x5(`$ZodBase64`,(e,t)=>{t.pattern??(t.pattern=f7i),A5.init(e,t),e._zod.check=n=>{w5i(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),m7i=/^[A-Za-z0-9_-]*$/,h7i=x5(`$ZodBase64URL`,(e,t)=>{t.pattern??(t.pattern=m7i),A5.init(e,t),e._zod.check=n=>{T5i(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),g7i=x5(`$ZodE164`,(e,t)=>{t.pattern??(t.pattern=I8i),A5.init(e,t)}),_7i=x5(`$ZodJWT`,(e,t)=>{A5.init(e,t),e._zod.check=n=>{E5i(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),v7i=x5(`$ZodNumber`,(e,t)=>{k5.init(e,t),e._zod.pattern=V8i,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),y7i=x5(`$ZodNumberFormat`,(e,t)=>{Q8i.init(e,t),v7i.init(e,t)}),b7i=x5(`$ZodBoolean`,(e,t)=>{k5.init(e,t),e._zod.pattern=H8i,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),x7i=x5(`$ZodUndefined`,(e,t)=>{k5.init(e,t),e._zod.pattern=W8i,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),S7i=x5(`$ZodNull`,(e,t)=>{k5.init(e,t),e._zod.pattern=U8i,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),C7i=x5(`$ZodAny`,(e,t)=>{k5.init(e,t),e._zod.parse=e=>e}),w7i=x5(`$ZodUnknown`,(e,t)=>{k5.init(e,t),e._zod.parse=e=>e}),T7i=x5(`$ZodNever`,(e,t)=>{k5.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),E7i=e=>Array.isArray(e)?e.length:-1,D7i=x5(`$ZodArray`,(e,t)=>{k5.init(e,t);let n=w5.memoizer;n==null||n.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i==null?void 0:i.abortEarly;for(let e=0;eO5i(t,r,e)));else if(O5i(l,r,e),s&&l.issues.length!==0&&f5(l))break}return o.length?Promise.all(o).then(()=>r):r},D5i(e,E7i)}),O7i=[],k7i=x5(`$ZodObject`,(e,t)=>{k5.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n!=null&&n.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=I3i(()=>A5i(t));v5(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||r5(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=s5,o=t.catchall,s,l=w5.memoizer;l==null||l.attach(e),e._zod.parse=(t,n)=>{s??(s=i.value);let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=l?l.alloc(e,t,{},n):{};let u=[],d=s.shape,f=n==null?void 0:n.abortEarly,p=t.issues.length;for(let e of s.allKeys){if(f&&t.issues.length!==p){if(f5(t,p))break;p=t.issues.length}if(e===`__proto__`)continue;let i=d[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?u.push(s.then(n=>k5i(n,t,e,r,a,o))):k5i(s,t,e,r,a,o)}return o?j5i(u,r,t,n,i.value,e,f===!0):u.length?Promise.all(u).then(()=>t):t}}),A7i=x5(`$ZodObjectJIT`,(e,t)=>{k7i.init(e,t);let n=e._zod.parse,r=I3i(()=>A5i(t)),i=w5.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new u5i([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,l=(e,t)=>` let ${e}_ab = false; for (let i = 0; i < ${e}.issues.length; i++) { const iss = ${e}.issues[i]; iss.path = iss.path ? [${t}, ...iss.path] : [${t}]; payload.issues.push(iss); if (iss.continue !== true) ${e}_ab = true; } if (${e}_ab && ctx && ctx.abortEarly) { payload.value = newResult; return payload; }`;o.write(`const input = payload.value;`);let u=Object.create(null),d=0;for(let e of n.allKeys)u[e]=`key_${d++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){var f,p;if(e===`__proto__`)continue;let n=u[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:G3i(e),i=`${r} in input`,d=t[e],m=d==null||(f=d._zod)==null?void 0:f.optin,h=m!==void 0,g=(d==null||(p=d._zod)==null?void 0:p.optout)===`optional`;if(o.write(`const ${n} = ${s(r)};`),h&&g){let e=m===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` const ${n}_present = ${i}; if (!${n}.issues.length || ${n}_present) { if (${n}.issues.length) {${l(n,r)} } if (${e}) { newResult[${r}] = ${n}.value; } } `)}else h?(o.write(` if (${n}.issues.length) {${l(n,r)} } `),m===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(` if (${n}.value !== undefined || ${i}) { newResult[${r}] = ${n}.value; } `)):o.write(` const ${n}_present = ${i}; if (${n}.issues.length) {${l(n,r)} } if (!${n}_present && !${n}.issues.length) { payload.issues.push({ code: "invalid_type", expected: "nonoptional", input: undefined, path: [${r}] }); if (ctx && ctx.abortEarly) { payload.value = newResult; return payload; } } if (${n}_present) { newResult[${r}] = ${n}.value; } `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=s5,l=!w5.jitless,u=l&&x6i.value,d=t.catchall,f;e._zod.parse=(i,p)=>{f??(f=r.value);let m=i.value;return s(m)?l&&u&&(p==null?void 0:p.async)===!1&&p.jitless!==!0?(o||(o=a(t.shape)),i=o(i,p),d?j5i([],m,i,p,f,e,(p==null?void 0:p.abortEarly)===!0):i):n(i,p):(i.issues.push({expected:`object`,code:`invalid_type`,input:m,inst:e}),i)}}),j7i=x5(`$ZodUnion`,(e,t)=>{k5.init(e,t),v5(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),v5(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),v5(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),v5(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>R3i(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>M5i(t,r,e,i)):M5i(o,r,e,i)}}),M7i=x5(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,j7i.init(e,t);let n=e._zod.parse;v5(e,`propValues`,e=>{var t;let n={},r=0;for(let t of e.def.options){var i;let a=t._zod.propValues;if(!a||Object.keys(a).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(t)}"`);(i=a[e.def.discriminator])!=null&&i.has(void 0)&&r++;for(let[e,t]of Object.entries(a)){Object.prototype.hasOwnProperty.call(n,e)||r5(n,e,new Set);for(let r of t)n[e].add(r)}}return!e.def.unionFallback&&r>1&&((t=n[e.def.discriminator])==null||t.delete(void 0)),n}),t.options.forEach((e,n)=>{let r=V3i(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=I3i(()=>N5i(t));e._zod.parse=(i,a)=>{let o=i.value;if(!s5(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o==null?void 0:o[t.discriminator],l=r.value.get(s);return l&&(s!==void 0||a.direction!==`backward`)?l._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),N7i=x5(`$ZodIntersection`,(e,t)=>{k5.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>F5i(e,t,n)):F5i(e,i,a)}}),P7i=x5(`$ZodRecord`,(e,t)=>{k5.init(e,t);let n=w5.memoizer;n==null||n.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!c5(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let l=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(l.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>h5(e,i,S5())),input:n,path:[n],inst:e});continue}let u=s.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...p5(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...p5(n,d.issues)),r.value[u]=d.value)}let u;for(let e in a)if(!l.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else u=u??[],u.push(e)}u&&u.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:u,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let l;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let u=t.keyType._zod.run({value:n,issues:[]},i);if(u instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&V8i.test(n)&&u.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(u=e)}if(u.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(l=l??[],l.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:u.issues.map(e=>h5(e,i,S5())),input:n,path:[n],inst:e});continue}let d=u.value;if(d===`__proto__`)continue;let f=t.valueType._zod.run({value:a[n],issues:[]},i);f instanceof Promise?o.push(f.then(e=>{e.issues.length&&r.issues.push(...p5(n,e.issues)),r.value[d]=e.value})):(f.issues.length&&r.issues.push(...p5(n,f.issues)),r.value[d]=f.value)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),F7i=x5(`$ZodEnum`,(e,t)=>{k5.init(e,t);let n=N3i(t.entries),r=new Set(n);e._zod.values=r,v5(e,`pattern`,e=>{let t=N3i(e.def.entries).filter(e=>S6i.has(typeof e));return RegExp(t.length?`^(${t.map(e=>l5(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),I7i=x5(`$ZodLiteral`,(e,t)=>{k5.init(e,t);let n=new Set(t.values);e._zod.values=n,v5(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?l5(e):e?l5(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),L7i=x5(`$ZodTransform`,(e,t)=>{var n;k5.init(e,t),e._zod.optin=`optional`,(n=w5.memoizer)==null||n.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new P6i(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new C5;return n.value=i,n}}),R7i=x5(`$ZodOptional`,(e,t)=>{k5.init(e,t),v5(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,v5(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),v5(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${R3i(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>I5i(e,t)):I5i(e,r)}return t.innerType._zod.run(e,n)}}),z7i=x5(`$ZodExactOptional`,(e,t)=>{R7i.init(e,t),v5(e,`values`,e=>e.def.innerType._zod.values),v5(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),B7i=x5(`$ZodNullable`,(e,t)=>{k5.init(e,t),v5(e,`optin`,e=>e.def.innerType._zod.optin),v5(e,`optout`,e=>e.def.innerType._zod.optout),v5(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${R3i(t.source)}|null)$`):void 0}),v5(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),V7i=x5(`$ZodDefault`,(e,t)=>{k5.init(e,t),e._zod.optin=`defaulted`,v5(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>L5i(e,t)):L5i(r,t)}}),H7i=x5(`$ZodPrefault`,(e,t)=>{k5.init(e,t),e._zod.optin=`defaulted`,v5(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),U7i=x5(`$ZodNonOptional`,(e,t)=>{k5.init(e,t),v5(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>R5i(t,e)):R5i(i,e)}}),W7i=x5(`$ZodCatch`,(e,t)=>{k5.init(e,t),v5(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),v5(e,`optout`,e=>e.def.innerType._zod.optout),v5(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>z5i(e,r,t,n)):z5i(e,r,t,n)}}),G7i=x5(`$ZodPipe`,(e,t)=>{k5.init(e,t),v5(e,`values`,e=>e.def.in._zod.values),v5(e,`optin`,e=>e.def.in._zod.optin),v5(e,`optout`,e=>e.def.out._zod.optout),v5(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>B5i(e,t.in,n)):B5i(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>B5i(e,t.out,n)):B5i(r,t.out,n)}}),K7i=x5(`$ZodPreprocess`,(e,t)=>{G7i.init(e,t)}),q7i=x5(`$ZodReadonly`,(e,t)=>{k5.init(e,t),v5(e,`propValues`,e=>e.def.innerType._zod.propValues),v5(e,`values`,e=>e.def.innerType._zod.values),v5(e,`optin`,e=>{var t;return(t=e.def.innerType)==null||(t=t._zod)==null?void 0:t.optin}),v5(e,`optout`,e=>{var t;return(t=e.def.innerType)==null||(t=t._zod)==null?void 0:t.optout}),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(V5i):V5i(r)}}),J7i=x5(`$ZodLazy`,(e,t)=>{k5.init(e,t),B3i(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||(e._cachedInner=t.getter()),e._cachedInner}),v5(e,`pattern`,e=>{var t;return(t=e.innerType)==null||(t=t._zod)==null?void 0:t.pattern}),v5(e,`propValues`,e=>{var t;return(t=e.innerType)==null||(t=t._zod)==null?void 0:t.propValues}),v5(e,`optin`,e=>{var t;return((t=e.innerType)==null||(t=t._zod)==null?void 0:t.optin)??void 0}),v5(e,`optout`,e=>{var t;return((t=e.innerType)==null||(t=t._zod)==null?void 0:t.optout)??void 0}),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Y7i=x5(`$ZodCustom`,(e,t)=>{E5.init(e,t),k5.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>H5i(t,n,r,e));H5i(i,n,r,e)}})}));function Z7i(e){return typeof e==`object`&&!!e}function Q7i(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function $7i(e,t,n){let r=s9i.get(e);if(r!==void 0)return r?N5:j5;if(t.has(e))return N5;t.add(e);let i=j5,a=e=>{if(i!==N5&&e!=null&&e._zod){let r=$7i(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=j5;for(let o of Reflect.ownKeys(e)){var a;let s=Object.getOwnPropertyDescriptor(e,o);if(r&&!s.enumerable)continue;let l=s.get?M5:(a=s.value)!=null&&a._zod?$7i(s.value,t,n):j5;l>i&&(i=l)}return i},s=e=>{e>i&&(i=e)},l=e._zod.def;switch(l.type){case`object`:{let e=V3i(l);s(e?o(e,!0):M5),a(l.catchall);break}case`array`:a(l.element);break;case`tuple`:for(let e of l.items)a(e);a(l.rest);break;case`record`:case`map`:a(l.keyType),a(l.valueType);break;case`set`:a(l.valueType);break;case`union`:for(let e of l.options)a(e);break;case`intersection`:a(l.left),a(l.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(l.innerType);break;case`pipe`:a(l.in),a(l.out);break;case`function`:a(l.input),a(l.output);break;case`lazy`:{let r=l._cachedInner??(n?e._zod.innerType:void 0);s(r?$7i(r,t,!1):M5);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in l){let t=Object.getOwnPropertyDescriptor(l,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),e9i(e,i)}function e9i(e,t){return t!==M5&&s9i.set(e,t===N5),t}function t9i(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}function n9i(){return l9i}function r9i(e,t){var n;let r=(n=e[a9i])==null?void 0:n.backEdges;return r!==void 0&&Z7i(t)&&r.has(t)}var i9i,a9i,o9i,s9i,j5,M5,N5,c9i,P5,l9i,u9i=o((()=>{b5(),i9i=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},a9i=`~memo`,o9i=[],s9i=new WeakMap,j5=0,M5=1,N5=2,P5=[],l9i={alloc(e,t,n){let r=c9i;if(!r)return n;c9i=void 0;let i={value:n,issues:null};return r.set(t.value,i),P5.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&r9i(n,e.value))throw new i9i;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,l)=>{if(n===void 0){let i=$7i(e,new Set,!1);if(i===j5)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,l);i===N5||r?n=!0:r=!0}let u=s.value;if(!Z7i(u))return t(s,l);let d=l[a9i];d||(d={buckets:new WeakMap,backEdges:void 0},l[a9i]=d);let f;i===l?f=a:(f=t9i(d,e),i=l,a=f);let p=f.get(u);if(p)return s.value=p.value,p.issues?p.issues.length&&s.issues.push(...Q7i(p.issues)):(s.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(p.value)),s;c9i=f;let m=P5.length,h=t(s,l);c9i=void 0;let g=P5.length>m?P5.pop():void 0;return h instanceof Promise?h.then(e=>(g&&(g.issues=e.issues.length?Q7i(e.issues):o9i),e)):(g&&(g.issues=h.issues.length?Q7i(h.issues):o9i),h)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}}}));function d9i(){return{localeError:f9i()}}var f9i,p9i=o((()=>{b5(),f9i=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(u6i(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${J3i(e.values[0])}`:`Invalid option: expected one of ${P3i(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${P3i(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function m9i(){return new g9i}var h9i,g9i,F5,_9i=o((()=>{g9i=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(h9i=globalThis).__zod_globalRegistry??(h9i.__zod_globalRegistry=m9i()),F5=globalThis.__zod_globalRegistry})),v9i=o((()=>{}));function y9i(e){return e.checks&&(e.checks=[...e.checks]),e}function b9i(e,t){return new e(y9i({type:`string`,...d5(t)}))}function x9i(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...d5(t)})}function S9i(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...d5(t)})}function C9i(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...d5(t)})}function w9i(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...d5(t)})}function T9i(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...d5(t)})}function E9i(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...d5(t)})}function D9i(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...d5(t)})}function O9i(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...d5(t)})}function k9i(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...d5(t)})}function A9i(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...d5(t)})}function j9i(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...d5(t)})}function M9i(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...d5(t)})}function N9i(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...d5(t)})}function P9i(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...d5(t)})}function F9i(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...d5(t)})}function I9i(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...d5(t)})}function L9i(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...d5(t)})}function R9i(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...d5(t)})}function z9i(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...d5(t)})}function B9i(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...d5(t)})}function V9i(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...d5(t)})}function H9i(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...d5(t)})}function U9i(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...d5(t)})}function W9i(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...d5(t)})}function G9i(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...d5(t)})}function K9i(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...d5(t)})}function q9i(e,t){return new e(y9i({type:`number`,checks:[],...d5(t)}))}function J9i(e,t){return new e(y9i({type:`number`,coerce:!0,checks:[],...d5(t)}))}function Y9i(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...d5(t)})}function X9i(e,t){return new e({type:`boolean`,...d5(t)})}function Z9i(e,t){return new e({type:`undefined`,...d5(t)})}function Q9i(e,t){return new e({type:`null`,...d5(t)})}function $9i(e){return new e({type:`any`})}function eea(e){return new e({type:`unknown`})}function tea(e,t){return new e({type:`never`,...d5(t)})}function nea(e,t){return new Y8i({check:`less_than`,...d5(t),value:e,inclusive:!1})}function rea(e,t){return new Y8i({check:`less_than`,...d5(t),value:e,inclusive:!0})}function iea(e,t){return new X8i({check:`greater_than`,...d5(t),value:e,inclusive:!1})}function aea(e,t){return new X8i({check:`greater_than`,...d5(t),value:e,inclusive:!0})}function oea(e,t){return new Z8i({check:`multiple_of`,...d5(t),value:e})}function sea(e,t){return new $8i({check:`max_length`,...d5(t),maximum:e})}function cea(e,t){return new e5i({check:`min_length`,...d5(t),minimum:e})}function lea(e,t){return new t5i({check:`length_equals`,...d5(t),length:e})}function uea(e,t){return new n5i({check:`string_format`,format:`regex`,...d5(t),pattern:e})}function dea(e){return new r5i({check:`string_format`,format:`lowercase`,...d5(e)})}function fea(e){return new i5i({check:`string_format`,format:`uppercase`,...d5(e)})}function pea(e,t){return new a5i({check:`string_format`,format:`includes`,...d5(t),includes:e})}function mea(e,t){return new o5i({check:`string_format`,format:`starts_with`,...d5(t),prefix:e})}function hea(e,t){return new s5i({check:`string_format`,format:`ends_with`,...d5(t),suffix:e})}function I5(e){return new c5i({check:`overwrite`,tx:e})}function gea(e){return I5(t=>t.normalize(e))}function _ea(){return I5(e=>e.trim())}function vea(){return I5(e=>e.toLowerCase())}function yea(){return I5(e=>e.toUpperCase())}function bea(){return I5(e=>K3i(e))}function xea(e,t,n){return new e({type:`array`,element:t,...d5(n)})}function Sea(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...d5(n)})}function Cea(e,t){let n=wea(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(g5(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??(r.code=`custom`),`input`in r||(r.input=t.value),r.inst??(r.inst=n),r.continue??(r.continue=!n._zod.def.abort),t.issues.push(g5(r))}},e(t.value,t)),t);return n}function wea(e,t){let n=new E5({check:`custom`,...d5(t)});return n._zod.check=e,n}var Tea=o((()=>{l5i(),b5()}));function L5(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&r5(e,t,n[t]);return e}function Eea(e){let t=(e==null?void 0:e.target)??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??F5,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??`throw`,override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:(e==null?void 0:e.cycles)??`ref`,reused:(e==null?void 0:e.reused)??`inline`,intersections:[],deferred:[],external:(e==null?void 0:e.external)??void 0}}function R5(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function z5(e,t,n={path:[],schemaPath:[]}){var r,i,a;let o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;let l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let u=(r=(i=e._zod).toJSONSchema)==null?void 0:r.call(i);if(u)l.schema=u;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,r);else{let n=l.schema,i=t.processors[o.type];if(!i)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}let i=e._zod.parent;i&&(l.ref||(l.ref=i),z5(i,t,r),t.seen.get(i).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&L5(l.schema,d),t.io===`input`&&B5(e)&&(delete l.schema.examples,delete l.schema.default),t.io===`input`&&`_prefault`in l.schema&&((a=l.schema).default??(a.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function Dea(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Oea(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){var i;let n=(i=e.metadataRegistry.get(t[0]))==null?void 0:i.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let a=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){var i;let n=(i=e.external.registry.get(t[0]))==null?void 0:i.id,a=e.external.uri??(e=>e);if(n)return{ref:a(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${a(`__shared`)}#/${r}/${Dea(o)}`}}let a=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:a+Dea(o)}},o=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=a(e);t.def={...t.schema},r&&(t.defId=r);let i=t.schema;for(let e in i)delete i[e];i.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle){var s;throw Error(`Cycle detected: #/${(s=e.cycle)==null?void 0:s.join(`/`)}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}}for(let n of e.seen.entries()){var l;let r=n[1];if(t===n[0])o(n);else{if(e.external){var u;let r=(u=e.external.registry.get(n[0]))==null?void 0:u.id;if(t!==n[0]&&r){o(n);continue}}((l=e.metadataRegistry.get(n[0]))!=null&&l.id||r.cycle||r.count>1&&e.reused===`ref`)&&o(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function kea(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;kea(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function Aea(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function jea(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Pea.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){var i;let t=((i=n.properties)==null?void 0:i[r])??Aea(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}r5(n,r,e.length===1?e[0]:jea(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let a={type:`object`,properties:n};if(r.size&&(a.required=[...r]),t.every(e=>e.additionalProperties===!1))a.additionalProperties=!1;else{let e=[];for(let n of t){let t=Aea(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?a.additionalProperties=e[0]:e.length>1&&(a.additionalProperties={allOf:e})}return a}function Mea(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Pea)if(t in e)return;let n=t.filter(e=>Fea.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=jea(t);else{let e=n[0],i=Fea.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>jea([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,L5(e,r))}function Nea(e,t){var n,r,i;let a=e.seen.get(t);if(!a)throw Error(`Unprocessed schema. This is a bug in Zod.`);let o=t=>{let n=e.seen.get(t);if(n.ref===null)return;let r=n.def??n.schema,i={...r},a=n.ref;if(n.ref=null,a){o(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(r.allOf=r.allOf??[],r.allOf.push(s)):L5(r,s),L5(r,i),t._zod.parent===a)for(let e in r)e!==`$ref`&&e!==`allOf`&&(e in i||delete r[e]);if(s.$ref&&n.def)for(let e in r)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}let s=t._zod.parent;if(s&&s!==a){o(s);let t=e.seen.get(s);if(t!=null&&t.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(let e in r)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())o(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())kea(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e==null?void 0:e.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Mea(e)}}let s={};if(e.target===`draft-2020-12`?s.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?s.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?s.$schema=`http://json-schema.org/draft-04/schema#`:e.target,(n=e.external)!=null&&n.uri){var l;let n=(l=e.external.registry.get(t))==null?void 0:l.id;if(!n)throw Error("Schema is missing an `id` property");s.$id=e.external.uri(n)}L5(s,a.defId?a.schema:a.def??a.schema);let u=(r=e.metadataRegistry.get(t))==null?void 0:r.id;u!==void 0&&s.id===u&&delete s.id;let d=((i=e.external)==null?void 0:i.defs)??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,r5(d,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(d).length>0&&(e.target===`draft-2020-12`?s.$defs=d:s.definitions=d);try{let n=JSON.parse(JSON.stringify(s));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:V5(t,`input`,e.processors),output:V5(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function B5(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return B5(r.element,n);if(r.type===`set`)return B5(r.valueType,n);if(r.type===`lazy`)return B5(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return B5(r.innerType,n);if(r.type===`intersection`)return B5(r.left,n)||B5(r.right,n);if(r.type===`record`||r.type===`map`)return B5(r.keyType,n)||B5(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:B5(r.in,n)||B5(r.out,n);if(r.type===`object`){for(let e in r.shape)if(B5(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(B5(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(B5(e,n))return!0;return!!(r.rest&&B5(r.rest,n))}return!1}var Pea,Fea,Iea,V5,Lea=o((()=>{_9i(),b5(),Pea=new Set([`type`,`properties`,`required`,`additionalProperties`]),Fea=[`oneOf`,`anyOf`],Iea=(e,t={})=>n=>{let r=Eea({...n,processors:t});return z5(e,r),Oea(r,e),Nea(r,e)},V5=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Eea({...i??{},target:a,io:t,processors:n});return z5(e,o),Oea(o,e),Nea(o,e)}}));function H5(e){var t;let n={},r=e._zod.def,i=e._zod.traits.has(`$ZodCheck`)?[e,...r.checks??[]]:r.checks??[];for(let e of i)(t=Xea[e._zod.def.check])==null||t.call(Xea,n,e._zod.def);let a=e._zod.bag;a.minimum!==void 0&&W5(n,`minimum`,a.minimum),a.exclusiveMinimum!==void 0&&W5(n,`exclusiveMinimum`,a.exclusiveMinimum),a.maximum!==void 0&&G5(n,`maximum`,a.maximum),a.exclusiveMaximum!==void 0&&G5(n,`exclusiveMaximum`,a.exclusiveMaximum),a.multipleOf!==void 0&&Uea(n,a.multipleOf),a.format!==void 0&&(n.format??(n.format=a.format),a.format.includes(`int`)&&(n.isInt=!0)),a.mime&&Gea(n,a.mime);for(let e of a.patterns??[])Wea(n,e);return n}function U5(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?U5(t.out):t.type===`catch`?U5(t.innerType):e._zod.optin}function Rea(e,t,n){if(t.$ref){var r;if(n.has(t))return t;n.add(t);let i=(r=e.get(t))==null?void 0:r.def;if(!i)return t;let a=Rea(e,i,n);return a===i?t:a}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Rea(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let i=Array.isArray(t.type)?t.type:[t.type],a=!i.includes(`string`)&&i.some(e=>e===`number`||e===`integer`),o=t.enum??(t.const===void 0?void 0:[t.const]);if(!a&&!(o!=null&&o.some(e=>typeof e==`number`)))return t;let{minimum:s,maximum:l,exclusiveMinimum:u,exclusiveMaximum:d,multipleOf:f,format:p,id:m,...h}=t;return h.enum?h.enum=h.enum.map(e=>typeof e==`number`?String(e):e):typeof h.const==`number`&&(h.const=String(h.const)),a&&(h.type=`string`,o||(h.pattern=(i.includes(`number`)?V8i:B8i).source)),h}function zea(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let i of Ota.get(e)??[]){var r;let a=e.seen.get(i),o=(r=(a==null?void 0:a.def)??(a==null?void 0:a.schema))==null?void 0:r.propertyNames;if(!o||o===!0||n.has(o))continue;let s=Rea(t,o,new Set);s!==o&&n.set(o,s)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function Bea(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(R5(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Mta):JSON.parse(o)}function Vea(e,t){if(`_idmap`in e){let n=e,r=Eea({...t,processors:Vta}),i={};for(let e of n._idmap.entries()){let[t,n]=e;z5(n,r)}let a={};r.external={registry:n,uri:t==null?void 0:t.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Oea(r,n),r5(a,t,Nea(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Eea({...t,processors:Vta});return z5(e,n),Oea(n,e),Nea(n,e)}var W5,G5,Hea,Uea,Wea,Gea,Kea,qea,Jea,Yea,Xea,Zea,Qea,$ea,eta,tta,nta,rta,ita,ata,ota,sta,cta,lta,uta,dta,fta,pta,mta,hta,gta,_ta,vta,yta,bta,xta,Sta,Cta,wta,Tta,Eta,Dta,Ota,kta,Ata,jta,Mta,Nta,Pta,Fta,Ita,Lta,Rta,zta,Bta,Vta,Hta=o((()=>{q8i(),X7i(),Lea(),b5(),W5=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},G5=(e,t,n)=>{(e[t]===void 0||n{W5(e,`minimum`,t),G5(e,`maximum`,t)},Uea=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Wea=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Gea=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Kea=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},qea=(e,t)=>W5(e,`minimum`,t.minimum),Jea=(e,t)=>G5(e,`maximum`,t.maximum),Yea=e=>(t,n)=>{Kea(t,n.format);let[r,i]=e[n.format];W5(t,`minimum`,r),G5(t,`maximum`,i)},Xea={greater_than:(e,t)=>W5(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>G5(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Uea(e,t.value),number_format:Yea(C6i),bigint_format:Yea(w6i),min_length:qea,max_length:Jea,length_equals:(e,t)=>Hea(e,t.length),min_size:qea,max_size:Jea,size_equals:(e,t)=>Hea(e,t.size),string_format:(e,t)=>{Kea(e,t.format),t.pattern&&Wea(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Gea(e,t.mime)},Zea={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Qea=new Map([[f7i,N8i],[m7i,P8i]]),$ea=e=>Qea.get(e)??e,eta=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:l,contentEncoding:u,laxFormat:d}=H5(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Zea[s]??s,i.format===``&&delete i.format,(s===`time`||d)&&delete i.format),u&&(i.contentEncoding=u),l&&l.size>0){let e=[...l].map($ea);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},tta=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:u,isInt:d}=H5(e);i.type=d?`integer`:`number`;let f=typeof u==`number`&&u>=(a??-1/0),p=typeof l==`number`&&l<=(o??1/0),m=t.target===`draft-04`||t.target===`openapi-3.0`;if(f?m?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),p?m?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):R5(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},nta=(e,t,n,r)=>{n.type=`boolean`},rta=(e,t,n,r)=>{R5(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},ita=(e,t,n,r)=>{R5(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},ata=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},ota=(e,t,n,r)=>{R5(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},sta=(e,t,n,r)=>{R5(e,t,n,r,`Void cannot be represented in JSON Schema`)},cta=(e,t,n,r)=>{n.not={}},lta=(e,t,n,r)=>{},uta=(e,t,n,r)=>{},dta=(e,t,n,r)=>{R5(e,t,n,r,`Date cannot be represented in JSON Schema`)},fta=(e,t,n,r)=>{let i=e._zod.def,a=N3i(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},pta=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(R5(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(R5(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},mta=(e,t,n,r)=>{R5(e,t,n,r,`NaN cannot be represented in JSON Schema`)},hta=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},gta=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=H5(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},_ta=(e,t,n,r)=>{n.type=`boolean`},vta=(e,t,n,r)=>{R5(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},yta=(e,t,n,r)=>{R5(e,t,n,r,`Function types cannot be represented in JSON Schema`)},bta=(e,t,n,r)=>{R5(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},xta=(e,t,n,r)=>{R5(e,t,n,r,`Map cannot be represented in JSON Schema`)},Sta=(e,t,n,r)=>{R5(e,t,n,r,`Set cannot be represented in JSON Schema`)},Cta=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=H5(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=z5(a.element,t,{...r,path:[...r.path,`items`]})},wta=(e,t,n,r)=>{var i;let a=n,o=e._zod.def,s=o.shape;if(Object.getOwnPropertySymbols(s).length&&R5(e,t,a,r,`Symbol keys cannot be represented in JSON Schema`))return;a.type=`object`,a.properties={};for(let e in s)r5(a.properties,e,z5(s[e],t,{...r,path:[...r.path,`properties`,e]}));let l=[];for(let e of Object.keys(s)){let n=o.shape[e];(t.io===`input`?U5(n)===void 0:n._zod.optout===void 0)&&l.push(e)}l.length>0&&(a.required=l),((i=o.catchall)==null?void 0:i._zod.def.type)===`never`?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=z5(o.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(a.additionalProperties=!1)},Tta=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>z5(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Eta=(e,t,n,r)=>{let i=e._zod.def,a=z5(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=z5(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,l=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=l,t.intersections.push(l)},Dta=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,l=a.items.map((e,n)=>z5(e,t,{...r,path:[...r.path,o,n]})),u=a.rest?z5(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,d=a.items.length;for(;d>0;){let e=a.items[d-1];if(!(t.io===`input`?U5(e)!==void 0:e._zod.optout===`optional`))break;d--}let f=a.items.length,p=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=l,p?i.items=!1:u&&(i.items=u),d>0&&(i.minItems=d),p&&(i.maxItems=f)):t.target===`openapi-3.0`?(i.items={anyOf:l},u&&i.items.anyOf.push(u),d>0&&(i.minItems=d),p&&(i.maxItems=f)):(i.items=l,p?i.additionalItems=!1:u&&(i.additionalItems=u),d>0&&(i.minItems=d),p&&(i.maxItems=f));let{minimum:m,maximum:h}=H5(e);typeof m==`number`&&(i.minItems=m),typeof h==`number`&&(i.maxItems=h)},Ota=new WeakMap,kta=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=H5(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=z5(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)r5(i.patternProperties,$ea(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=z5(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Ota.get(t);n||(n=[],Ota.set(t,n),t.deferred.push(()=>zea(t))),n.push(e)}i.additionalProperties=z5(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let l=o._zod.values,u=t.io===`input`&&U5(a.valueType)!==void 0;if(l&&!a.partial&&!u){let e=[...l].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},Ata=(e,t,n,r)=>{let i=e._zod.def,a=z5(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},jta=(e,t,n,r)=>{let i=e._zod.def;z5(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Mta=Symbol(),Nta=(e,t,n,r)=>{let i=e._zod.def;z5(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Bea(i.defaultValue,e,t,n,r);o!==Mta&&(n.default=o)},Pta=(e,t,n,r)=>{let i=e._zod.def;z5(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Bea(i.defaultValue,e,t,n,r);o!==Mta&&(n._prefault=o)},Fta=(e,t,n,r)=>{let i=e._zod.def;z5(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{R5(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Ita=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;z5(o,t,r);let s=t.seen.get(e);s.ref=o},Lta=(e,t,n,r)=>{let i=e._zod.def;z5(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Rta=(e,t,n,r)=>{let i=e._zod.def;z5(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},zta=(e,t,n,r)=>{let i=e._zod.def;z5(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Bta=(e,t,n,r)=>{let i=e._zod.innerType;z5(i,t,r);let a=t.seen.get(e);a.ref=i},Vta={string:eta,number:tta,boolean:nta,bigint:rta,symbol:ita,null:ata,undefined:ota,void:sta,never:cta,any:lta,unknown:uta,date:dta,enum:fta,literal:pta,nan:mta,template_literal:hta,file:gta,success:_ta,custom:vta,function:yta,transform:bta,map:xta,set:Sta,array:Cta,object:wta,union:Tta,intersection:Eta,tuple:Dta,record:kta,nullable:Ata,nonoptional:jta,default:Nta,prefault:Pta,catch:Fta,pipe:Ita,readonly:Lta,promise:Rta,optional:zta,lazy:Bta}})),K5=o((()=>{T5(),d8i(),G6i(),X7i(),u9i(),l5i(),p5i(),b5(),_9i(),d5i(),v9i(),Tea(),Lea(),Hta(),Lea()})),Uta=o((()=>{K5()}));function Wta(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Gta,Kta,q5,qta=o((()=>{K5(),b5(),Gta=new WeakSet([Object.prototype,Error.prototype]),Kta=(e,t)=>{W6i.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Gta.has(n)||(Gta.add(n),Wta(n,`format`,e=>t=>z6i(e,t)),Wta(n,`flatten`,e=>t=>R6i(e,t)),Wta(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,F3i,2)}),Wta(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,F3i,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},q5=x5(`ZodError`,Kta,void 0,{Parent:Error})})),Jta,Yta,Xta,Zta,Qta,$ta,ena,tna,nna,rna,ina,ana,ona=o((()=>{K5(),qta(),Jta=Y6i(q5),Yta=X6i(q5),Xta=Z6i(q5),Zta=Q6i(q5),Qta=r8i(q5),$ta=i8i(q5),ena=a8i(q5),tna=o8i(q5),nna=s8i(q5),rna=c8i(q5),ina=l8i(q5),ana=u8i(q5)}));function sna(){w5.localeError||S5(d9i())}function cna(){w5.memoizer||S5({memoizer:n9i()})}function Z(e){return b9i(wna,e)}function lna(e){return x9i(kna,e)}function una(e){return D9i(jna,e)}function J5(e){return q9i(qna,e)}function dna(e){return Y9i(Jna,e)}function Y5(e){return X9i(Yna,e)}function X5(e){return Z9i(Xna,e)}function Z5(e){return Q9i(Zna,e)}function Q5(){return $9i(Qna)}function $5(){return eea($na)}function e7(e){return tea(era,e)}function t7(e,t){return xea(tra,e,t)}function Q(e,t){let n={type:`object`,shape:e??{},...d5(t)};return new nra(n)}function n7(e,t){return new nra({type:`object`,shape:e,catchall:$5(),...d5(t)})}function r7(e,t){return new rra({type:`union`,options:e,...d5(t)})}function i7(e,t,n){return new ira({type:`union`,options:t,discriminator:e,...d5(n)})}function a7(e,t){return new ara({type:`intersection`,left:e,right:t})}function o7(e,t,n){return!t||!t._zod?new ora({type:`record`,keyType:Z(),valueType:e,...d5(t)}):new ora({type:`record`,keyType:e,valueType:t,...d5(n)})}function s7(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new sra({type:`enum`,entries:n,...d5(t)})}function $(e,t){return new cra({type:`literal`,values:Array.isArray(e)?e:[e],...d5(t)})}function fna(e){return new lra({type:`transform`,transform:e})}function c7(e){return new ura({type:`optional`,innerType:e})}function pna(e){return new dra({type:`optional`,innerType:e})}function mna(e){return new fra({type:`nullable`,innerType:e})}function hna(e,t){return new pra({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():q3i(t)}})}function gna(e,t){return new mra({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():q3i(t)}})}function _na(e,t){return new hra({type:`nonoptional`,innerType:e,...d5(t)})}function vna(e,t){return new gra({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:_6i(t)})}function yna(e,t){return new _ra({type:`pipe`,in:e,out:t})}function bna(e){return new yra({type:`readonly`,innerType:e})}function l7(e){return new bra({type:`lazy`,getter:e})}function xna(e,t={}){return Sea(xra,e,t)}function Sna(e,t){return Cea(e,t)}function u7(e,t){return new vra({type:`pipe`,in:fna(e),out:t})}var d7,Cna,wna,f7,Tna,Ena,Dna,Ona,kna,Ana,p7,jna,Mna,Nna,Pna,Fna,Ina,Lna,Rna,zna,Bna,Vna,Hna,Una,Wna,Gna,Kna,qna,Jna,Yna,Xna,Zna,Qna,$na,era,tra,nra,rra,ira,ara,ora,sra,cra,lra,ura,dra,fra,pra,mra,hra,gra,_ra,vra,yra,bra,xra,Sra=o((()=>{K5(),Hta(),Lea(),p9i(),Uta(),ona(),d7=x5(`ZodType`,(e,t)=>(sna(),k5.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(o5(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return u5(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(xna(e,t))},superRefine(e,t){return this.check(Sna(e,t))},overwrite(e){return this.check(I5(e))},optional(){return c7(this)},exactOptional(){return pna(this)},nullable(){return mna(this)},nullish(){return c7(mna(this))},nonoptional(e){return _na(this,e)},array(){return t7(this)},or(e){return r7([this,e])},and(e){return a7(this,e)},transform(e){return yna(this,fna(e))},default(e){return hna(this,e)},prefault(e){return gna(this,e)},catch(e){return vna(this,e)},pipe(e){return yna(this,e)},readonly(){return bna(this)},describe(e){let t=this.clone();return F5.add(t,{description:e}),t},meta(...e){if(e.length===0)return F5.get(this);let t=this.clone();return F5.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return f6i(this,`~standard`,{...h5i(this),jsonSchema:{input:V5(this,`input`),output:V5(this,`output`)}})},set"~standard"(e){_5(this,`~standard`,e)},parse:function e(t,n){return Jta(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Yta(this,t,n,{callee:e})},safeParse(e,t){return Xta(this,e,t)},async safeParseAsync(e,t){return Zta(this,e,t)},get spa(){var e;return(e=this)==null?void 0:e.safeParseAsync},set spa(e){_5(this,`spa`,e)},validate(e,t){return t8i(this,e,t)},validateAsync(e,t){return n8i(this,e,t)},encode:function e(t,n){return Qta(this,t,n,{callee:e})},decode:function e(t,n){return $ta(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ena(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await tna(this,t,n,{callee:e})},safeEncode(e,t){return nna(this,e,t)},safeDecode(e,t){return rna(this,e,t)},async safeEncodeAsync(e,t){return ina(this,e,t)},async safeDecodeAsync(e,t){return ana(this,e,t)},toJSONSchema(e){return Iea(this,{})(e)},get description(){var e;return(e=F5.get(this))==null?void 0:e.description},get _def(){return this._zod.def}}),Cna=x5(`_ZodString`,(e,t)=>{W5i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eta(e,t,n,r)},p6i({format:e=>H5(e).format??null,minLength:e=>H5(e).minimum??null,maxLength:e=>H5(e).maximum??null},{regex(...e){return this.check(uea(...e))},includes(...e){return this.check(pea(...e))},startsWith(...e){return this.check(mea(...e))},endsWith(...e){return this.check(hea(...e))},min(...e){return this.check(cea(...e))},max(...e){return this.check(sea(...e))},length(...e){return this.check(lea(...e))},nonempty(...e){return this.check(cea(1,...e))},lowercase(e){return this.check(dea(e))},uppercase(e){return this.check(fea(e))},trim(){return this.check(_ea())},normalize(...e){return this.check(gea(...e))},toLowerCase(){return this.check(vea())},toUpperCase(){return this.check(yea())},slugify(){return this.check(bea())}})),wna=x5(`ZodString`,(e,t)=>{W5i.init(e,t),Cna.init(e,t)},{email(e){return this.check(x9i(kna,e))},url(e){return this.check(D9i(jna,e))},jwt(e){return this.check(H9i(Kna,e))},emoji(e){return this.check(O9i(Mna,e))},guid(e){return this.check(S9i(Ana,e))},uuid(e){return this.check(C9i(p7,e))},uuidv4(e){return this.check(w9i(p7,e))},uuidv6(e){return this.check(T9i(p7,e))},uuidv7(e){return this.check(E9i(p7,e))},nanoid(e){return this.check(k9i(Nna,e))},cuid(e){return this.check(A9i(Pna,e))},cuid2(e){return this.check(j9i(Fna,e))},ulid(e){return this.check(M9i(Ina,e))},base64(e){return this.check(z9i(Una,e))},base64url(e){return this.check(B9i(Wna,e))},xid(e){return this.check(N9i(Lna,e))},ksuid(e){return this.check(P9i(Rna,e))},ipv4(e){return this.check(F9i(zna,e))},ipv6(e){return this.check(I9i(Bna,e))},cidrv4(e){return this.check(L9i(Vna,e))},cidrv6(e){return this.check(R9i(Hna,e))},e164(e){return this.check(V9i(Gna,e))},datetime(e){return this.check(U9i(Tna,e))},date(e){return this.check(W9i(Ena,e))},time(e){return this.check(G9i(Dna,e))},duration(e){return this.check(K9i(Ona,e))}}),f7=x5(`ZodStringFormat`,(e,t)=>{A5.init(e,t),Cna.init(e,t)}),Tna=x5(`ZodISODateTime`,(e,t)=>{r7i.init(e,t),f7.init(e,t)}),Ena=x5(`ZodISODate`,(e,t)=>{i7i.init(e,t),f7.init(e,t)}),Dna=x5(`ZodISOTime`,(e,t)=>{a7i.init(e,t),f7.init(e,t)}),Ona=x5(`ZodISODuration`,(e,t)=>{o7i.init(e,t),f7.init(e,t)}),kna=x5(`ZodEmail`,(e,t)=>{q5i.init(e,t),f7.init(e,t)}),Ana=x5(`ZodGUID`,(e,t)=>{G5i.init(e,t),f7.init(e,t)}),p7=x5(`ZodUUID`,(e,t)=>{K5i.init(e,t),f7.init(e,t)}),jna=x5(`ZodURL`,(e,t)=>{Y5i.init(e,t),f7.init(e,t)}),Mna=x5(`ZodEmoji`,(e,t)=>{X5i.init(e,t),f7.init(e,t)}),Nna=x5(`ZodNanoID`,(e,t)=>{Z5i.init(e,t),f7.init(e,t)}),Pna=x5(`ZodCUID`,(e,t)=>{Q5i.init(e,t),f7.init(e,t)}),Fna=x5(`ZodCUID2`,(e,t)=>{$5i.init(e,t),f7.init(e,t)}),Ina=x5(`ZodULID`,(e,t)=>{e7i.init(e,t),f7.init(e,t)}),Lna=x5(`ZodXID`,(e,t)=>{t7i.init(e,t),f7.init(e,t)}),Rna=x5(`ZodKSUID`,(e,t)=>{n7i.init(e,t),f7.init(e,t)}),zna=x5(`ZodIPv4`,(e,t)=>{s7i.init(e,t),f7.init(e,t)}),Bna=x5(`ZodIPv6`,(e,t)=>{l7i.init(e,t),f7.init(e,t)}),Vna=x5(`ZodCIDRv4`,(e,t)=>{u7i.init(e,t),f7.init(e,t)}),Hna=x5(`ZodCIDRv6`,(e,t)=>{d7i.init(e,t),f7.init(e,t)}),Una=x5(`ZodBase64`,(e,t)=>{p7i.init(e,t),f7.init(e,t)}),Wna=x5(`ZodBase64URL`,(e,t)=>{h7i.init(e,t),f7.init(e,t)}),Gna=x5(`ZodE164`,(e,t)=>{g7i.init(e,t),f7.init(e,t)}),Kna=x5(`ZodJWT`,(e,t)=>{_7i.init(e,t),f7.init(e,t)}),qna=x5(`ZodNumber`,(e,t)=>{v7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tta(e,t,n,r),e.isFinite=!0},p6i({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=H5(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=H5(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=H5(e);return!!t||!!(n!=null&&n.some(Number.isSafeInteger))},format:e=>H5(e).format??null},{gt(e,t){return this.check(iea(e,t))},gte(e,t){return this.check(aea(e,t))},min(e,t){return this.check(aea(e,t))},lt(e,t){return this.check(nea(e,t))},lte(e,t){return this.check(rea(e,t))},max(e,t){return this.check(rea(e,t))},int(e){return this.check(dna(e))},safe(e){return this.check(dna(e))},positive(e){return this.check(iea(0,e))},nonnegative(e){return this.check(aea(0,e))},negative(e){return this.check(nea(0,e))},nonpositive(e){return this.check(rea(0,e))},multipleOf(e,t){return this.check(oea(e,t))},step(e,t){return this.check(oea(e,t))},finite(){return this}})),Jna=x5(`ZodNumberFormat`,(e,t)=>{y7i.init(e,t),qna.init(e,t)}),Yna=x5(`ZodBoolean`,(e,t)=>{b7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nta(e,t,n,r)}),Xna=x5(`ZodUndefined`,(e,t)=>{x7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ota(e,t,n,r)}),Zna=x5(`ZodNull`,(e,t)=>{S7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ata(e,t,n,r)}),Qna=x5(`ZodAny`,(e,t)=>{C7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lta(e,t,n,r)}),$na=x5(`ZodUnknown`,(e,t)=>{w7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uta(e,t,n,r)}),era=x5(`ZodNever`,(e,t)=>{T7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cta(e,t,n,r)}),tra=x5(`ZodArray`,(e,t)=>{cna(),D7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cta(e,t,n,r),e.element=t.element},{min(e,t){return this.check(cea(e,t))},nonempty(e){return this.check(cea(1,e))},max(e,t){return this.check(sea(e,t))},length(e,t){return this.check(lea(e,t))},unwrap(){return this.element}}),nra=x5(`ZodObject`,(e,t)=>{cna(),A7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wta(e,t,n,r),g6i(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return s7(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(o5(this._zod.def,{catchall:e}))},passthrough(){return this.clone(o5(this._zod.def,{catchall:$5()}))},loose(){return this.clone(o5(this._zod.def,{catchall:$5()}))},strict(){return this.clone(o5(this._zod.def,{catchall:e7()}))},strip(){return this.clone(o5(this._zod.def,{catchall:void 0}))},extend(e){return $3i(this,e)},safeExtend(e){return t6i(this,e)},merge(e){return n6i(this,e)},pick(e){return X3i(this,e)},omit(e){return Q3i(this,e)},partial(...e){return r6i(ura,this,e[0])},exactPartial(...e){return r6i(dra,this,e[0],`exactPartial`)},required(...e){return i6i(hra,this,e[0])}}),rra=x5(`ZodUnion`,(e,t)=>{j7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tta(e,t,n,r),e.options=t.options}),ira=x5(`ZodDiscriminatedUnion`,(e,t)=>{rra.init(e,t),M7i.init(e,t)}),ara=x5(`ZodIntersection`,(e,t)=>{N7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eta(e,t,n,r)}),ora=x5(`ZodRecord`,(e,t)=>{cna(),P7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kta(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),sra=x5(`ZodEnum`,(e,t)=>{F7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fta(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new sra({...t,checks:[],...d5(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new sra({...t,checks:[],...d5(r),entries:i})}}),cra=x5(`ZodLiteral`,(e,t)=>{I7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pta(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),lra=x5(`ZodTransform`,(e,t)=>{cna(),L7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bta(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new P6i(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(g5(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??(t.code=`custom`),`input`in t||(t.input=n.value),t.inst??(t.inst=e),n.issues.push(g5(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),ura=x5(`ZodOptional`,(e,t)=>{R7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),dra=x5(`ZodExactOptional`,(e,t)=>{z7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),fra=x5(`ZodNullable`,(e,t)=>{B7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ata(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),pra=x5(`ZodDefault`,(e,t)=>{V7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),mra=x5(`ZodPrefault`,(e,t)=>{H7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),hra=x5(`ZodNonOptional`,(e,t)=>{U7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),gra=x5(`ZodCatch`,(e,t)=>{W7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),_ra=x5(`ZodPipe`,(e,t)=>{G7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ita(e,t,n,r),e.in=t.in,e.out=t.out}),vra=x5(`ZodPreprocess`,(e,t)=>{_ra.init(e,t),K7i.init(e,t)}),yra=x5(`ZodReadonly`,(e,t)=>{q7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),bra=x5(`ZodLazy`,(e,t)=>{J7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bta(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),xra=x5(`ZodCustom`,(e,t)=>{Y7i.init(e,t),d7.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vta(e,t,n,r)})})),Cra,wra,Tra=o((()=>{K5(),Cra={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},wra||(wra={})}));function Era(e){return U9i(Tna,e)}function Dra(e){return W9i(Ena,e)}var Ora=o((()=>{K5(),Sra()}));function kra(e){return J9i(qna,e)}var Ara=o((()=>{K5(),Sra()})),jra=o((()=>{Sra(),Uta(),qta(),ona(),Tra(),K5(),Hta(),_9i(),b5(),Uta(),Ora(),Sra(),X7i(),Ara()})),m7=o((()=>{jra(),jra()})),h7,g7,Mra,Nra,Pra,Fra,Ira,Lra,Rra,zra,Bra,Vra,Hra,Ura,Wra,Gra,Kra,qra,Jra,_7,Yra,v7=o((()=>{m7(),h7=l7(()=>o7(Z(),$5())),g7={onSuccess:r7([h7,t7(h7)]).optional(),onError:r7([h7,t7(h7)]).optional()},Mra=Q({action:$(`toolCall`),tool:Z(),arguments:r7([o7(Z(),$5()),Z()]).optional(),...g7}),Nra=Q({action:$(`invokeAppTool`),tool:Z(),arguments:o7(Z(),$5()).optional(),...g7}),Pra=Q({action:$(`sendMessage`),content:Z(),...g7}),Fra=Q({action:$(`updateContext`),content:Z().optional(),structuredContent:o7(Z(),$5()).optional(),...g7}),Ira=Q({action:$(`openLink`),url:Z(),...g7}),Lra=Q({action:$(`requestDisplayMode`),mode:s7([`inline`,`fullscreen`,`pip`]),...g7}),Rra=Q({action:$(`setState`),key:Z(),value:$5().optional(),...g7}),zra=Q({action:$(`toggleState`),key:Z(),...g7}),Bra=Q({action:$(`appendState`),key:Z(),value:$5().optional(),index:r7([J5(),Z()]).optional(),...g7}),Vra=Q({action:$(`popState`),key:Z(),index:r7([J5(),Z()]),...g7}),Hra=Q({action:$(`showToast`),message:Z(),description:Z().optional(),variant:s7([`default`,`success`,`error`,`warning`,`info`]).optional(),duration:J5().optional(),...g7}),Ura=Q({action:$(`closeOverlay`),...g7}),Wra=Q({action:$(`openFilePicker`),accept:Z().optional(),multiple:Y5().optional(),maxSize:J5().int().optional(),...g7}),Gra=Q({action:$(`fetch`),url:Z(),method:s7([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`]).optional(),headers:o7(Z(),Z()).optional(),body:r7([o7(Z(),$5()),Z()]).optional(),...g7}),Kra=Q({action:$(`setInterval`),duration:r7([J5().int().positive(),Z()]),while:r7([Z(),Y5()]).optional(),count:J5().int().positive().optional(),onTick:r7([h7,t7(h7)]).optional(),onComplete:r7([h7,t7(h7)]).optional(),...g7}),qra=Q({action:$(`callHandler`),handler:Z(),arguments:o7(Z(),$5()).optional(),...g7}),Jra=i7(`action`,[Mra,Nra,Pra,Fra,Ira,Lra,Rra,zra,Bra,Vra,Hra,Ura,Wra,Gra,Kra,qra]),_7=r7([Jra,t7(Jra)]),Yra={toolCall:Mra,invokeAppTool:Nra,sendMessage:Pra,updateContext:Fra,openLink:Ira,requestDisplayMode:Lra,setState:Rra,toggleState:zra,appendState:Bra,popState:Vra,showToast:Hra,closeOverlay:Ura,openFilePicker:Wra,fetch:Gra,setInterval:Kra,callHandler:qra}})),y7,Xra,b7,x7=o((()=>{m7(),y7=Q({cssClass:Z().optional(),ariaLabel:Z().optional(),ariaLabelledBy:Z().optional(),onMount:$5().optional()}),Xra=l7(()=>o7(Z(),$5())),b7=y7.extend({children:t7(Xra).optional()})})),Zra,Qra,$ra=o((()=>{m7(),x7(),Zra=b7.extend({type:$(`AccordionItem`),title:Z(),value:Z().optional()}),Qra=b7.extend({type:$(`Accordion`),multiple:Y5().optional(),collapsible:Y5().optional(),defaultValues:t7(Z()).optional()})})),eia,tia,nia,ria=o((()=>{m7(),x7(),eia=b7.extend({type:$(`Alert`),variant:s7([`default`,`destructive`,`success`,`warning`,`info`]).or(Z()).optional(),icon:Z().nullable().optional()}),tia=y7.extend({type:$(`AlertTitle`),content:Z()}),nia=y7.extend({type:$(`AlertDescription`),content:Z()})})),iia,aia=o((()=>{m7(),x7(),iia=b7.extend({type:$(`Badge`),label:Z().optional(),variant:s7([`default`,`secondary`,`destructive`,`success`,`warning`,`info`,`outline`,`ghost`]).or(Z()).optional()})})),oia,sia=o((()=>{m7(),x7(),v7(),oia=y7.extend({type:$(`Button`),label:Z(),icon:Z().nullable().optional(),variant:s7([`default`,`destructive`,`outline`,`secondary`,`ghost`,`link`,`success`,`warning`,`info`]).or(Z()).optional(),size:s7([`default`,`xs`,`sm`,`lg`,`icon`,`icon-xs`,`icon-sm`,`icon-lg`]).optional(),buttonType:s7([`submit`,`button`,`reset`]).nullable().optional(),disabled:r7([Y5(),Z()]).optional(),onClick:_7.optional()})})),cia,lia=o((()=>{m7(),x7(),cia=b7.extend({type:$(`ButtonGroup`),orientation:s7([`horizontal`,`vertical`]).optional()})})),uia,dia=o((()=>{m7(),x7(),v7(),uia=y7.extend({type:$(`Calendar`),mode:s7([`single`,`multiple`,`range`]).optional(),name:Z().optional(),onChange:_7.optional()})})),fia,pia=o((()=>{m7(),x7(),fia=b7.extend({type:$(`Carousel`),visible:J5().nullable().optional(),gap:J5().optional(),height:J5().optional(),direction:s7([`left`,`right`,`up`,`down`]).optional(),loop:Y5().optional(),autoAdvance:J5().optional(),continuous:Y5().optional(),speed:J5().optional(),effect:s7([`slide`,`fade`]).optional(),dimInactive:Y5().optional(),showControls:Y5().optional(),controlsPosition:s7([`overlay`,`outside`,`gutter`]).optional(),showDots:Y5().optional(),pauseOnHover:Y5().optional(),align:s7([`start`,`center`,`end`]).optional(),slidesToScroll:J5().optional(),drag:Y5().optional()})})),S7,C7,mia,hia,gia,_ia,via,yia,bia,xia,Sia,Cia,wia=o((()=>{m7(),x7(),S7=Q({dataKey:Z(),label:Z().optional(),color:Z().optional()}),C7=Z(),mia=y7.extend({data:r7([t7(o7(Z(),$5())),Z()]).optional(),series:t7(S7),xAxis:Z().optional(),height:r7([J5().int(),Z()]).optional(),showLegend:Y5().optional(),showTooltip:Y5().optional(),animate:Y5().optional(),showGrid:Y5().optional(),showYAxis:Y5().optional(),valueFormat:C7.optional()}),hia=mia.extend({type:$(`BarChart`),stacked:Y5().optional(),horizontal:Y5().optional(),barRadius:J5().int().optional(),xAxisLabel:Z().optional(),yAxisLabel:Z().optional()}),gia=mia.extend({type:$(`LineChart`),series:r7([t7(S7),Z()]),curve:s7([`linear`,`smooth`,`step`]).optional(),showDots:Y5().optional(),xAxisLabel:Z().optional(),yAxisLabel:Z().optional()}),_ia=mia.extend({type:$(`AreaChart`),stacked:Y5().optional(),curve:s7([`linear`,`smooth`,`step`]).optional(),showDots:Y5().optional()}),via=y7.extend({type:$(`PieChart`),data:r7([t7(o7(Z(),$5())),Z()]).optional(),dataKey:Z(),nameKey:Z(),aggregateBelow:J5().min(0).max(1).nullable().optional(),aggregateExcept:r7([t7(Z()),Z()]).nullable().optional(),height:r7([J5().int(),Z()]).optional(),innerRadius:J5().int().optional(),showLabel:Y5().optional(),paddingAngle:J5().int().optional(),showLegend:Y5().optional(),showTooltip:Y5().optional(),animate:Y5().optional(),valueFormat:C7.optional()}).superRefine((e,t)=>{if((e.aggregateBelow!=null||e.aggregateExcept!=null)&&(e.aggregateBelow!=null&&e.aggregateExcept!=null&&t.addIssue({code:`custom`,message:`Pie aggregation options are mutually exclusive`}),e.dataKey===e.nameKey&&t.addIssue({code:`custom`,message:`Pie aggregation requires different dataKey and nameKey`}),Array.isArray(e.data))){let n=0,r=!1;for(let i of e.data){let a=i[e.dataKey];typeof a==`string`&&a.includes(`{{`)&&a.includes(`}}`)?r=!0:typeof a!=`number`||!Number.isFinite(a)||a<0?t.addIssue({code:`custom`,message:`Pie aggregation requires finite non-negative numeric values`}):n+=a}!r&&!Number.isFinite(n)&&t.addIssue({code:`custom`,message:`Pie aggregation requires a finite total`})}}),yia=y7.extend({type:$(`RadarChart`),data:r7([t7(o7(Z(),$5())),Z()]).optional(),series:t7(S7),axisKey:Z().optional(),height:r7([J5().int(),Z()]).optional(),filled:Y5().optional(),showDots:Y5().optional(),showLegend:Y5().optional(),showTooltip:Y5().optional(),animate:Y5().optional(),showGrid:Y5().optional()}),bia=y7.extend({type:$(`RadialChart`),data:r7([t7(o7(Z(),$5())),Z()]).optional(),dataKey:Z(),nameKey:Z(),height:r7([J5().int(),Z()]).optional(),innerRadius:J5().int().optional(),startAngle:J5().int().optional(),endAngle:J5().int().optional(),showLegend:Y5().optional(),showTooltip:Y5().optional(),animate:Y5().optional(),valueFormat:C7.optional()}),xia=y7.extend({type:$(`ScatterChart`),data:r7([t7(o7(Z(),$5())),Z()]).optional(),series:t7(S7),xAxis:Z(),yAxis:Z(),zAxis:Z().optional(),height:r7([J5().int(),Z()]).optional(),showLegend:Y5().optional(),showTooltip:Y5().optional(),animate:Y5().optional(),showGrid:Y5().optional()}),Sia=y7.extend({type:$(`WaterfallChart`),data:r7([t7(o7(Z(),$5())),Z()]).optional(),dataKey:Z(),nameKey:Z(),totalKey:Z().optional(),height:r7([J5().int(),Z()]).optional(),increaseColor:Z().optional(),decreaseColor:Z().optional(),totalColor:Z().optional(),barRadius:J5().int().optional(),showConnectors:Y5().optional(),showLegend:Y5().optional(),showTooltip:Y5().optional(),animate:Y5().optional(),showGrid:Y5().optional(),showYAxis:Y5().optional(),valueFormat:C7.optional()}),Cia=y7.extend({type:$(`Sparkline`),data:r7([t7(J5()),Z()]).optional(),height:r7([J5().int(),Z()]).optional(),variant:s7([`default`,`success`,`warning`,`destructive`,`info`,`muted`]).or(Z()).optional(),indicatorClass:Z().optional(),fill:Y5().optional(),curve:s7([`linear`,`smooth`,`step`]).optional(),strokeWidth:J5().optional(),mode:s7([`line`,`bar`]).optional()})})),Tia,Eia,Dia,Oia,kia,Aia,jia=o((()=>{m7(),x7(),Tia=b7.extend({type:$(`Card`)}),Eia=b7.extend({type:$(`CardHeader`)}),Dia=b7.extend({type:$(`CardTitle`),content:Z().optional()}),Oia=b7.extend({type:$(`CardDescription`),content:Z().optional()}),kia=b7.extend({type:$(`CardContent`)}),Aia=b7.extend({type:$(`CardFooter`)})})),Mia,Nia=o((()=>{m7(),x7(),v7(),Mia=y7.extend({type:$(`Checkbox`),label:Z().optional(),value:Y5().optional(),name:Z().optional(),disabled:Y5().optional(),required:Y5().optional(),onChange:_7.optional()})})),Pia,Fia=o((()=>{m7(),x7(),Pia=y7.extend({type:$(`Code`),content:Z(),language:Z().optional()})})),Iia,Lia,Ria,zia,Bia,Via=o((()=>{m7(),x7(),v7(),Iia=y7.extend({type:$(`ComboboxOption`),value:Z(),label:Z(),disabled:Y5().optional()}),Lia=b7.extend({type:$(`ComboboxGroup`)}),Ria=y7.extend({type:$(`ComboboxLabel`),label:Z()}),zia=y7.extend({type:$(`ComboboxSeparator`)}),Bia=b7.extend({type:$(`Combobox`),placeholder:Z().nullable().optional(),value:Z().optional(),searchPlaceholder:Z().nullable().optional(),name:Z().nullable().optional(),disabled:Y5().optional(),side:s7([`top`,`right`,`bottom`,`left`]).optional(),align:s7([`start`,`center`,`end`]).optional(),invalid:Y5().optional(),onChange:_7.optional()})})),Hia,Uia,Wia=o((()=>{m7(),x7(),Hia=Q({when:Z(),children:t7(Xra).optional()}),Uia=Q({type:$(`Condition`),cases:t7(Hia).min(1),else:t7(Xra).optional()})})),Gia,Kia=o((()=>{m7(),x7(),Gia=b7.extend({type:$(`Column`)})})),qia,Jia=o((()=>{m7(),x7(),qia=b7.extend({type:$(`Container`)})})),Yia,Xia,Zia=o((()=>{m7(),x7(),Yia=b7.extend({type:$(`Dashboard`),columns:J5().optional(),rowHeight:r7([J5(),Z()]).optional(),rows:J5().optional()}),Xia=b7.extend({type:$(`DashboardItem`),col:J5().optional(),row:J5().optional(),colSpan:J5().optional(),rowSpan:J5().optional(),zIndex:J5().optional()})})),Qia,$ia,eaa=o((()=>{m7(),x7(),v7(),Qia=Q({key:Z(),header:Z(),sortable:Y5().optional(),format:Z().optional(),width:Z().optional(),minWidth:Z().optional(),maxWidth:Z().optional(),headerClass:Z().optional(),cellClass:Z().optional()}),$ia=y7.extend({type:$(`DataTable`),columns:t7(Qia),rows:r7([t7(o7(Z(),$5())),Z()]).optional(),search:Y5().optional(),searchPlaceholder:Z().nullable().optional(),paginated:Y5().optional(),pageSize:J5().int().optional(),onRowClick:_7.optional()})})),taa,naa=o((()=>{m7(),x7(),v7(),taa=y7.extend({type:$(`DatePicker`),placeholder:Z().optional(),value:Z().optional(),name:Z().optional(),onChange:_7.optional()})})),raa,iaa=o((()=>{m7(),x7(),raa=b7.extend({type:$(`Dialog`),title:Z().optional(),description:Z().optional()})})),aaa,oaa,saa,caa=o((()=>{m7(),x7(),aaa=b7.extend({type:$(`Div`),style:o7(Z(),Z()).optional()}),oaa=y7.extend({type:$(`Span`),content:Z(),style:o7(Z(),Z()).optional(),code:Y5().optional(),bold:Y5().optional(),italic:Y5().optional()}),saa=y7.extend({type:$(`Link`),content:Z(),href:Z(),target:Z().optional(),style:o7(Z(),Z()).optional(),code:Y5().optional(),bold:Y5().optional(),italic:Y5().optional()})})),laa,uaa=o((()=>{m7(),x7(),laa=y7.extend({type:$(`Dot`),variant:s7([`default`,`secondary`,`success`,`warning`,`destructive`,`info`,`muted`]).or(Z()).optional(),size:s7([`sm`,`default`,`lg`]).optional(),shape:s7([`circle`,`square`,`rounded`]).optional()})})),daa,faa=o((()=>{m7(),x7(),v7(),daa=y7.extend({type:$(`DropZone`),icon:Z().nullable().optional(),label:Z().optional(),description:Z().optional(),accept:Z().optional(),multiple:Y5().optional(),maxSize:J5().int().optional(),disabled:Y5().optional(),value:t7($5()).optional(),name:Z().optional(),onChange:_7.optional()})})),paa,maa=o((()=>{m7(),x7(),paa=y7.extend({type:$(`Embed`),url:Z().optional(),html:Z().optional(),width:Z().optional(),height:Z().optional(),sandbox:Z().optional(),allow:Z().optional()}).refine(e=>e.url!=null||e.html!=null,{message:`Embed requires either 'url' or 'html'`})})),haa,gaa,_aa,vaa,yaa,baa,xaa=o((()=>{m7(),x7(),haa=b7.extend({type:$(`Field`),invalid:r7([Y5(),Z()]).optional(),disabled:r7([Y5(),Z()]).optional()}),gaa=b7.extend({type:$(`ChoiceCard`),invalid:r7([Y5(),Z()]).optional(),disabled:r7([Y5(),Z()]).optional()}),_aa=y7.extend({type:$(`FieldTitle`),content:Z()}),vaa=y7.extend({type:$(`FieldDescription`),content:Z()}),yaa=b7.extend({type:$(`FieldContent`)}),baa=y7.extend({type:$(`FieldError`),content:Z()})})),Saa,Caa=o((()=>{m7(),x7(),Saa=b7.extend({type:$(`ForEach`),key:Z()})})),waa,Taa=o((()=>{m7(),x7(),v7(),waa=b7.extend({type:$(`Form`),onSubmit:_7.optional()})})),Eaa,Daa=o((()=>{m7(),x7(),Eaa=b7.extend({type:$(`Grid`),minColumnWidth:Z().optional(),columnTemplate:Z().optional()})})),Oaa,kaa=o((()=>{m7(),x7(),Oaa=b7.extend({type:$(`GridItem`),colSpan:J5().optional(),rowSpan:J5().optional()})})),w7,Aaa,jaa,Maa,Naa,Paa,Faa,Iaa,Laa,Raa,zaa,Baa,Vaa,Haa=o((()=>{m7(),x7(),w7=y7.extend({content:Z(),bold:Y5().optional(),italic:Y5().optional()}),Aaa=y7.extend({type:$(`Text`),content:Z().optional(),bold:Y5().optional(),italic:Y5().optional(),children:t7(Q5()).optional()}),jaa=w7.extend({type:$(`Heading`),level:r7([$(1),$(2),$(3),$(4)]).optional()}),Maa=w7.extend({type:$(`H1`)}),Naa=w7.extend({type:$(`H2`)}),Paa=w7.extend({type:$(`H3`)}),Faa=w7.extend({type:$(`H4`)}),Iaa=w7.extend({type:$(`P`)}),Laa=w7.extend({type:$(`Lead`)}),Raa=w7.extend({type:$(`Large`)}),zaa=w7.extend({type:$(`Small`)}),Baa=w7.extend({type:$(`Muted`)}),Vaa=w7.extend({type:$(`BlockQuote`)})})),Uaa,Waa=o((()=>{m7(),x7(),Uaa=b7.extend({type:$(`HoverCard`),side:s7([`top`,`right`,`bottom`,`left`]).optional(),openDelay:J5().optional(),closeDelay:J5().optional()})})),Gaa,Kaa=o((()=>{m7(),x7(),Gaa=y7.extend({type:$(`Icon`),name:Z(),size:s7([`sm`,`default`,`lg`]).optional()})})),qaa,Jaa=o((()=>{m7(),x7(),qaa=y7.extend({type:$(`Image`),src:Z(),alt:Z().optional(),width:Z().optional(),height:Z().optional()})})),Yaa,Xaa=o((()=>{m7(),x7(),Yaa=y7.extend({type:$(`Kbd`),label:Z().optional()})})),Zaa,Qaa,$aa=o((()=>{m7(),x7(),Zaa=y7.extend({type:$(`Video`),src:Z(),poster:Z().optional(),controls:Y5().optional(),autoplay:Y5().optional(),loop:Y5().optional(),muted:Y5().optional(),width:Z().optional(),height:Z().optional()}),Qaa=y7.extend({type:$(`Audio`),src:Z(),controls:Y5().optional(),autoplay:Y5().optional(),loop:Y5().optional(),muted:Y5().optional()})})),eoa,toa=o((()=>{m7(),x7(),v7(),eoa=y7.extend({type:$(`Input`),inputType:s7([`text`,`email`,`password`,`number`,`tel`,`url`,`search`,`date`,`time`,`datetime-local`,`file`]).optional(),placeholder:Z().optional(),value:Z().optional(),name:Z().optional(),disabled:Y5().optional(),readOnly:Y5().optional(),required:Y5().optional(),minLength:J5().int().optional(),maxLength:J5().int().optional(),min:J5().optional(),max:J5().optional(),step:J5().optional(),pattern:Z().optional(),onChange:_7.optional()})})),noa,roa=o((()=>{m7(),x7(),noa=b7.extend({type:$(`Label`),text:Z().optional(),forId:Z().optional(),optional:Y5().optional()})})),ioa,aoa=o((()=>{m7(),x7(),ioa=y7.extend({type:$(`Markdown`),content:Z()})})),ooa,soa=o((()=>{m7(),x7(),ooa=y7.extend({type:$(`Mermaid`),chart:Z()})})),coa,loa=o((()=>{m7(),x7(),coa=y7.extend({type:$(`Metric`),label:Z(),value:r7([Z(),J5()]),description:Z().optional(),delta:r7([Z(),J5()]).optional(),trend:s7([`up`,`down`,`neutral`]).optional(),trendSentiment:s7([`positive`,`negative`,`neutral`]).optional()})})),uoa,doa,foa=o((()=>{m7(),x7(),uoa=b7.extend({type:$(`Page`),title:Z(),value:Z().optional()}),doa=b7.extend({type:$(`Pages`),value:Z().optional(),name:Z().optional()})})),poa,moa=o((()=>{m7(),x7(),poa=b7.extend({type:$(`Popover`),title:Z().optional(),description:Z().optional(),side:s7([`top`,`right`,`bottom`,`left`]).optional()})})),hoa,goa=o((()=>{m7(),x7(),hoa=y7.extend({type:$(`Progress`),value:r7([J5(),Z()]).optional(),min:J5().optional(),max:J5().optional(),target:r7([J5(),Z()]).optional(),variant:s7([`default`,`success`,`warning`,`destructive`,`info`,`muted`]).or(Z()).optional(),size:s7([`sm`,`default`,`lg`]).optional(),indicatorClass:Z().optional(),targetClass:Z().optional(),orientation:s7([`horizontal`,`vertical`]).optional()})})),_oa,voa,yoa=o((()=>{m7(),x7(),v7(),_oa=b7.extend({type:$(`RadioGroup`),id:Z().optional(),value:Z().optional(),name:Z().optional(),onChange:_7.optional()}),voa=y7.extend({type:$(`Radio`),id:Z().optional(),option:Z(),label:Z().optional(),value:Y5().optional(),name:Z().optional(),disabled:Y5().optional(),required:Y5().optional()})})),boa,xoa=o((()=>{m7(),x7(),boa=b7.extend({type:$(`Ring`),value:r7([J5(),Z()]).optional(),min:J5().optional(),max:J5().optional(),label:Z().optional(),variant:s7([`default`,`success`,`warning`,`destructive`,`info`,`muted`]).or(Z()).optional(),size:s7([`sm`,`default`,`lg`]).optional(),thickness:J5().optional(),target:r7([J5(),Z()]).optional(),indicatorClass:Z().optional(),targetClass:Z().optional()})})),Soa,Coa=o((()=>{m7(),x7(),Soa=b7.extend({type:$(`Row`)})})),woa,Toa,Eoa,Doa,Ooa,koa=o((()=>{m7(),x7(),v7(),woa=b7.extend({type:$(`Select`),placeholder:Z().optional(),value:Z().optional(),name:Z().optional(),size:s7([`sm`,`default`]).optional(),side:s7([`top`,`right`,`bottom`,`left`]).optional(),align:s7([`start`,`center`,`end`]).optional(),disabled:Y5().optional(),required:Y5().optional(),invalid:Y5().optional(),onChange:_7.optional()}),Toa=b7.extend({type:$(`SelectGroup`)}),Eoa=y7.extend({type:$(`SelectLabel`),label:Z()}),Doa=y7.extend({type:$(`SelectSeparator`)}),Ooa=y7.extend({type:$(`SelectOption`),value:Z(),label:Z(),selected:Y5().optional(),disabled:Y5().optional()})})),Aoa,joa=o((()=>{m7(),x7(),Aoa=y7.extend({type:$(`Separator`),orientation:s7([`horizontal`,`vertical`]).optional()})})),Moa,Noa=o((()=>{m7(),x7(),Moa=b7.extend({type:$(`Slot`),name:Z()})})),Poa,Foa=o((()=>{m7(),x7(),v7(),Poa=y7.extend({type:$(`Slider`),min:J5().optional(),max:J5().optional(),value:r7([J5(),t7(J5())]).optional(),step:J5().optional(),range:Y5().optional(),name:Z().optional(),disabled:Y5().optional(),variant:s7([`default`,`success`,`warning`,`destructive`,`info`,`muted`]).or(Z()).optional(),size:s7([`sm`,`default`,`lg`]).optional(),indicatorClass:Z().optional(),orientation:s7([`horizontal`,`vertical`]).optional(),handleStyle:s7([`circle`,`bar`]).optional(),handleClass:Z().optional(),onChange:_7.optional()})})),Ioa,Loa=o((()=>{m7(),x7(),Ioa=y7.extend({type:$(`Svg`),content:Z(),width:Z().optional(),height:Z().optional()})})),Roa,zoa=o((()=>{m7(),x7(),Roa=y7.extend({type:$(`Loader`),variant:s7([`spin`,`dots`,`pulse`,`bars`,`ios`]).or(Z()).optional(),size:s7([`sm`,`default`,`lg`]).optional()})})),Boa,Voa=o((()=>{m7(),x7(),v7(),Boa=y7.extend({type:$(`Switch`),label:Z().nullable().optional(),value:Y5().optional(),size:s7([`sm`,`default`]).optional(),name:Z().optional(),disabled:Y5().optional(),required:Y5().optional(),onChange:_7.optional()})})),Hoa,Uoa,Woa,Goa,Koa,qoa,Joa,Yoa,Xoa,Zoa=o((()=>{m7(),x7(),Hoa=b7.extend({type:$(`Table`)}),Uoa=b7.extend({type:$(`TableHeader`)}),Woa=b7.extend({type:$(`TableBody`)}),Goa=b7.extend({type:$(`TableFooter`)}),Koa=b7.extend({type:$(`TableRow`)}),qoa=b7.extend({type:$(`TableHead`),content:Z().optional()}),Joa=b7.extend({type:$(`TableCell`),content:Z().optional()}),Yoa=y7.extend({type:$(`TableCaption`),content:Z()}),Xoa=Q({key:Z(),header:Z(),sortable:Y5().optional()}),y7.extend({type:$(`DataTable`),columns:t7(Xoa),rows:r7([t7(o7(Z(),$5())),Z()]).optional(),searchable:Y5().optional(),paginated:Y5().optional(),pageSize:J5().int().optional(),caption:Z().optional()})})),Qoa,$oa,esa=o((()=>{m7(),x7(),v7(),Qoa=b7.extend({type:$(`Tab`),title:Z(),value:Z().optional(),disabled:Y5().optional()}),$oa=b7.extend({type:$(`Tabs`),variant:s7([`default`,`line`]).or(Z()).optional(),orientation:s7([`horizontal`,`vertical`]).optional(),value:Z().optional(),name:Z().optional(),onChange:_7.optional()})})),tsa,nsa=o((()=>{m7(),x7(),v7(),tsa=y7.extend({type:$(`Textarea`),placeholder:Z().optional(),value:Z().optional(),name:Z().optional(),rows:J5().int().optional(),disabled:Y5().optional(),required:Y5().optional(),minLength:J5().int().optional(),maxLength:J5().int().optional(),onChange:_7.optional()})})),rsa,isa=o((()=>{m7(),x7(),rsa=b7.extend({type:$(`Tooltip`),content:Z(),side:s7([`top`,`right`,`bottom`,`left`]).optional(),delay:J5().optional()})})),asa,osa=o((()=>{v7(),x7(),$ra(),ria(),aia(),sia(),lia(),dia(),pia(),wia(),jia(),Nia(),Fia(),Via(),Wia(),Kia(),Jia(),Zia(),eaa(),naa(),iaa(),caa(),uaa(),faa(),maa(),xaa(),Caa(),Taa(),Daa(),kaa(),Haa(),Waa(),Kaa(),Jaa(),Xaa(),$aa(),toa(),roa(),aoa(),soa(),loa(),foa(),moa(),goa(),yoa(),xoa(),Coa(),koa(),joa(),Noa(),Foa(),Loa(),zoa(),Voa(),Zoa(),esa(),nsa(),isa(),asa={Accordion:Qra,AccordionItem:Zra,Audio:Qaa,Alert:eia,AlertTitle:tia,AlertDescription:nia,AreaChart:_ia,Badge:iia,BarChart:hia,BlockQuote:Vaa,Button:oia,ButtonGroup:cia,Calendar:uia,Carousel:fia,Card:Tia,CardHeader:Eia,CardTitle:Dia,CardDescription:Oia,CardContent:kia,CardFooter:Aia,Checkbox:Mia,ChoiceCard:gaa,Code:Pia,Combobox:Bia,ComboboxGroup:Lia,ComboboxLabel:Ria,ComboboxOption:Iia,ComboboxSeparator:zia,Condition:Uia,Column:Gia,Container:qia,Dashboard:Yia,DashboardItem:Xia,DataTable:$ia,DatePicker:taa,Dialog:raa,Div:aaa,Dot:laa,DropZone:daa,Embed:paa,Field:haa,FieldTitle:_aa,FieldDescription:vaa,FieldContent:yaa,FieldError:baa,ForEach:Saa,Form:waa,Grid:Eaa,GridItem:Oaa,H1:Maa,H2:Naa,H3:Paa,H4:Faa,Heading:jaa,HoverCard:Uaa,Icon:Gaa,Kbd:Yaa,Image:qaa,Input:eoa,Label:noa,Large:Raa,Link:saa,Lead:Laa,LineChart:gia,Markdown:ioa,Mermaid:ooa,Metric:coa,Muted:Baa,P:Iaa,Page:uoa,Pages:doa,PieChart:via,RadarChart:yia,RadialChart:bia,Popover:poa,Progress:hoa,Radio:voa,RadioGroup:_oa,Ring:boa,Row:Soa,ScatterChart:xia,WaterfallChart:Sia,Sparkline:Cia,Select:woa,SelectGroup:Toa,SelectLabel:Eoa,SelectOption:Ooa,SelectSeparator:Doa,Separator:Aoa,Slider:Poa,Slot:Moa,Svg:Ioa,Small:zaa,Loader:Roa,Span:oaa,Switch:Boa,Tab:Qoa,Table:Hoa,TableBody:Woa,TableCaption:Yoa,TableCell:Joa,TableFooter:Goa,TableHead:qoa,TableHeader:Uoa,TableRow:Koa,Tabs:$oa,Text:Aaa,Textarea:tsa,Tooltip:rsa,Video:Zaa}}));function ssa(e){let t=asa[e.type];if(!t){let t={kind:`unknown_type`,message:`Unknown component: "${e.type}"`,issues:[`"${e.type}" is not a registered component type`]};return console.warn(`[Prefab] Validation error:`,t.message,{node:e}),t}let n=t.safeParse(e);if(!n.success){let t=n.error.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`),r={kind:`schema_error`,message:`Invalid <${e.type}> props`,issues:t};return console.warn(`[Prefab] Validation error:`,r.message,{issues:t,node:e}),r}return null}function csa(e){let t=Yra[e.action];if(!t){let t={kind:`unknown_type`,message:`Unknown action: "${e.action}"`,issues:[`"${e.action}" is not a registered action type`]};return console.warn(`[Prefab] Action validation error:`,t.message,{action:e}),t}let n=t.safeParse(e);if(!n.success){let t=n.error.issues.map(e=>`${e.path.join(`.`)}: ${e.message}`),r={kind:`schema_error`,message:`Invalid "${e.action}" action`,issues:t};return console.warn(`[Prefab] Action validation error:`,r.message,{issues:t,action:e}),r}return null}var lsa=o((()=>{osa()}));function usa({error:e,node:t}){let[n,r]=(0,dsa.useState)(!1);return(0,T7.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm`,children:[(0,T7.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,T7.jsx)(`p`,{className:`font-medium text-destructive`,children:e.message}),(0,T7.jsx)(`button`,{type:`button`,onClick:()=>r(!n),className:`shrink-0 text-xs text-muted-foreground hover:text-foreground`,children:n?`Hide`:`Details`})]}),n&&(0,T7.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[e.issues.length>0&&(0,T7.jsx)(`ul`,{className:`list-inside list-disc space-y-0.5 text-xs text-muted-foreground`,children:e.issues.map((e,t)=>(0,T7.jsx)(`li`,{children:e},t))}),(0,T7.jsx)(`pre`,{className:`max-h-40 overflow-auto rounded bg-muted p-2 text-xs`,children:JSON.stringify(t,null,2)})]})]})}var dsa,T7,fsa=o((()=>{dsa=d(p(),1),T7=Ie()}));function psa(){_sa=0}function msa(e,t){if(gsa.has(e)&&!(`name`in t)){let n=`${e.toLowerCase()}_${++_sa}`;return t.name=n,n}}function hsa(e,t){let n={},r=e=>{if(gsa.has(e.type)&&typeof e.name==`string`&&!(e.name in t)){let t=e.type===`DropZone`?[]:e.value;if(t===void 0&&e.children){if(e.type===`Select`){let n=e.children.find(e=>e.selected);n&&(t=n.value)}else if(e.type===`RadioGroup`){let n=e.children.find(e=>e.value);n&&(t=n.option)}}t!==void 0&&!(typeof t==`string`&&t.includes(`{{`))&&(n[e.name]=t)}if(e.children)for(let t of e.children)r(t)};return r(e),n}var gsa,_sa,vsa=o((()=>{gsa=new Set([`Input`,`Textarea`,`Checkbox`,`Switch`,`Slider`,`Calendar`,`DatePicker`,`DropZone`,`Select`,`RadioGroup`,`Combobox`,`Tabs`,`Pages`]),_sa=0}));function ysa(e){return new Promise((t,n)=>{var r,i;let a=document.createElement(`input`),o,s=!1,l=!1,u=()=>{var t;a.removeEventListener(`change`,p),window.removeEventListener(`focus`,m),(t=e.signal)==null||t.removeEventListener(`abort`,f),clearTimeout(o),a.remove()},d=(e,r)=>{s||(s=!0,u(),r===void 0?t(e??[]):n(r))},f=()=>d(void 0,new DOMException(`Cancelled`,`AbortError`)),p=async()=>{l=!0,clearTimeout(o);try{let t=QYt(Array.from(a.files??[]),e.accept);d(await ZYt(t,e))}catch(e){d(void 0,e)}},m=()=>{clearTimeout(o),o=setTimeout(()=>{l||d([])},300)};if((r=e.signal)!=null&&r.aborted)f();else{a.type=`file`,e.accept&&(a.accept=e.accept),a.multiple=e.multiple??!1,a.style.display=`none`,a.addEventListener(`change`,p),window.addEventListener(`focus`,m),(i=e.signal)==null||i.addEventListener(`abort`,f,{once:!0}),document.body.appendChild(a);try{a.click()}catch(e){d(void 0,e)}}})}var bsa=o((()=>{$Yt()}));function xsa(e,t){return E7.set(e.getAll,t),()=>{E7.get(e.getAll)===t&&E7.delete(e.getAll)}}async function Ssa(e,t,n,r){let i=E7.get(e.getAll);if(!i)throw Error(`No app tool dispatcher for ${t}`);let a=await i(t,n,r);if(E7.get(e.getAll)!==i)throw new Csa;return a}var E7,Csa,wsa=o((()=>{E7=new WeakMap,Csa=class extends Error{constructor(){super(`App tool invocation is no longer active`)}}}));function Tsa(e){for(let t of[...jsa.values()])(e===void 0||t.owner===e)&&t.cleanup()}function Esa(e){Msa=e}function Dsa(e){let t=e.content;return t!=null&&t.length&&t.filter(e=>e.type===`text`&&e.text).map(e=>e.text).join(` `)||`Unknown error`}function Osa(e){let t=e.content;if(!(t!=null&&t.length))return;let n=t.filter(e=>e.type===`text`&&e.text).map(e=>e.text).join(``);if(n)try{return JSON.parse(n)}catch{return n}}async function ksa(e,t,n,r,i=0,a,o,s,l,u){var d,f,p;if(u==null||(d=u.signal)==null||d.throwIfAborted(),i>Asa){var m;return console.warn(`[Prefab] Action callback depth limit exceeded`),u==null||(m=u.reportError)==null||m.call(u,`Action callback depth limit exceeded`),!1}let h={...n.getAll(),...o,$event:r,$result:l,$error:a},{onSuccess:g,onError:_,...v}=e,y=Ny(v,h);g!==void 0&&(y.onSuccess=g),_!==void 0&&(y.onError=_);let b=csa(y);if(b){var x;return u==null||(x=u.reportError)==null||x.call(u,`${b.message}: ${b.issues.join(`; `)}`),!1}let S=!0,C,w;try{switch(y.action){case`toolCall`:{if(!t)throw Error(`Calling a server tool requires an MCP host connection`);let e=y.tool,n=y.arguments??{};if(typeof n!=`object`||!n||Array.isArray(n))throw Error(`Tool arguments must resolve to an object`);let r={name:e,arguments:n,_meta:Msa?{fastmcp:{app:Msa}}:void 0},i=u!=null&&u.signal?await t.callServerTool(r,{signal:u.signal}):await t.callServerTool(r);if(i!=null&&i.isError){S=!1,C=Dsa(i);break}if((i==null?void 0:i.structuredContent)!=null){let e=i.structuredContent,t=i._meta,n=t==null?void 0:t.fastmcp;w=(y.unwrapResult||n!=null&&n.wrap_result)&&`result`in e?e.result:e}else w=i?Osa(i):void 0;break}case`invokeAppTool`:{let e=await Ssa(n,y.tool,y.arguments??{},{signal:u==null?void 0:u.signal,depth:i+1,overlayClose:s});e.isError?(S=!1,C=Dsa(e)):w=e.structuredContent;break}case`sendMessage`:{let e=y.content,n=await(t==null?void 0:t.sendMessage({role:`user`,content:[{type:`text`,text:e}]}));n!=null&&n.isError&&(S=!1,C=Dsa(n));break}case`updateContext`:try{await(t==null?void 0:t.updateModelContext({content:y.content?[{type:`text`,text:y.content}]:void 0,structuredContent:y.structuredContent}))}catch(e){S=!1,C=e instanceof Error?e.message:String(e)}break;case`openLink`:{let e=y.url;if(t)try{let n=await t.openLink({url:e});n!=null&&n.isError&&window.open(e,`_blank`,`noopener,noreferrer`)}catch{window.open(e,`_blank`,`noopener,noreferrer`)}else window.open(e,`_blank`,`noopener,noreferrer`);break}case`requestDisplayMode`:try{await(t==null?void 0:t.requestDisplayMode({mode:y.mode}))}catch(e){S=!1,C=e instanceof Error?e.message:String(e)}break;case`setState`:n.set(y.key,y.value);break;case`toggleState`:{let e=y.key;n.set(e,!n.get(e));break}case`appendState`:{let e=y.key,t=n.get(e);if(t!=null&&!Array.isArray(t)){console.warn(`[Prefab] appendState: "${e}" is not an array`);break}let r=Array.isArray(t)?[...t]:[],i=y.index;if(i!=null){let e=i<0?Math.max(0,r.length+i):i;r.splice(e,0,y.value)}else r.push(y.value);n.set(e,r);break}case`popState`:{let e=y.key,t=y.index,r=n.get(e);if(!Array.isArray(r)){console.warn(`[Prefab] popState: "${e}" is not an array`);break}let i=t<0?r.length+t:t;n.set(e,r.filter((e,t)=>t!==i));break}case`showToast`:{let e=y.message,t={description:y.description,duration:y.duration},n=y.variant;n===`success`?be.success(e,t):n===`error`?be.error(e,t):n===`warning`?be.warning(e,t):n===`info`?be.info(e,t):be(e,t);break}case`closeOverlay`:s==null||s();break;case`fetch`:{let e=y.url,t=y.method??`GET`,n=y.headers??{},r=y.body,i={method:t,headers:{...n}};if(u!=null&&u.signal&&(i.signal=u.signal),r!=null&&t!==`GET`&&t!==`HEAD`){if(typeof r==`object`){var T;i.body=JSON.stringify(r),(T=i.headers)[`Content-Type`]??(T[`Content-Type`]=`application/json`)}else i.body=r}let a=await globalThis.fetch(e,i);if(!a.ok)throw Error(`${a.status} ${a.statusText}`);let o=a.headers.get(`content-type`)??``,s;if(o.includes(`application/json`))s=await a.json();else{let e=await a.text();try{s=JSON.parse(e)}catch{s=e}}w=s;break}case`openFilePicker`:{let e=y.accept,t=y.multiple??!1,n=y.maxSize,r=await ysa({accept:e,multiple:t,maxSize:n,signal:u==null?void 0:u.signal});if(!Array.isArray(r)||r.length===0)return!0;w=r;break}case`setInterval`:{var E;let r=e.duration,a=()=>{if(typeof r==`number`)return r;let e={...n.getAll(),...o??{}},t=My(String(r),e);return Number(t)||1e3},l=e.while,d=y.count,f=e.onTick,p=e.onComplete,m=0,h=a(),g=()=>{if(d!=null&&m>=d)return!1;if(l!=null){let e={...n.getAll(),...o??{}};return j3i(l,e)}return!0},_=async()=>{p&&await D7(p,t,n,void 0,i+1,void 0,o,s,void 0,u)};if(!g()){await _();break}let v,b=!1,x,S=0,C=!1,w=()=>{v!==void 0&&(globalThis.clearInterval(v),jsa.delete(v),v=void 0)},T=(e=!0)=>{b||(b=!0,w(),x==null||x(e))};if(x=u==null||(E=u.registerCleanup)==null?void 0:E.call(u,T),b)break;let D=()=>{let e=globalThis.setInterval(async()=>{if(!(b||C)){S++;try{if(m++,f&&await D7(f,t,n,m,i+1,void 0,o,s,void 0,u),b||C||v!==e)return;if(!g()){C=!0,globalThis.clearInterval(e),await _();return}if(typeof r!=`number`){let e=a();e!==h&&(h=e,w(),D())}}catch(e){var l;let t=u==null||(l=u.signal)==null?void 0:l.aborted;if(T(),!t)throw e}finally{S--,C&&S===0&&T(!1)}}},h);v=e,jsa.set(e,{owner:(u==null?void 0:u.intervalOwner)??n,cleanup:T})};D();break}case`callHandler`:{let e=y.handler,t=eZt(e);if(!t){S=!1,C=`Unknown handler: "${e}"`;break}let i=t({state:{...n.getAll()},event:r,arguments:y.arguments});i&&typeof i==`object`&&(n.merge(i),w=i);break}}}catch(e){var D;if(e instanceof Csa){var O;return u==null||(O=u.reportError)==null||O.call(u,e.message),!1}u!=null&&(D=u.signal)!=null&&D.aborted&&e!==u.signal.reason&&!(e instanceof Error&&e.name===`AbortError`)&&console.warn(`[Prefab] Action failed after cancellation`,e),S=!1,C=e instanceof Error?e.message:String(e)}if(u==null||(f=u.signal)==null||f.throwIfAborted(),S||u==null||(p=u.reportError)==null||p.call(u,C??`Action execution failed`),S&&y.onSuccess){let e=await D7(y.onSuccess,t,n,r,i+1,void 0,o,s,w,u);u!=null&&u.propagateCallbackFailures&&(S=e)}else!S&&y.onError&&await D7(y.onError,t,n,r,i+1,C,o,s,void 0,u);return S}async function D7(e,t,n,r,i=0,a,o,s,l,u){let d=Array.isArray(e)?e:[e];for(let e of d)if(!await ksa(e,t,n,r,i,a,o,s,l,u))return!1;return!0}var Asa,jsa,Msa,Nsa=o((()=>{Ae(),Py(),lsa(),bsa(),M3i(),tZt(),wsa(),Asa=10,jsa=new Map}));function Psa(e,t,n,r,i){let a={...e};for(let o of Lsa){let s=a[o];if(!s||typeof s==`function`)continue;let l=s;a[o]=async a=>{if(o===`onSubmit`&&a&&typeof a==`object`&&`target`in a){let e=a.target;if(e instanceof HTMLFormElement){let t=new FormData(e);for(let[e,r]of t.entries())typeof r==`string`&&n.set(e,r)}}let s=a;if(a&&typeof a==`object`&&`target`in a){let e=a.target;s=e.type===`checkbox`?e.checked:e.value}Array.isArray(a)&&typeof a[0]==`number`&&(s=e.range?a:a[0]),await D7(l,t,n,s,0,void 0,r,i)}}return a}function Fsa(e,t){let n={...t};if(`ariaLabel`in n&&(n[`aria-label`]=n.ariaLabel==null?void 0:String(n.ariaLabel),delete n.ariaLabel),`ariaLabelledBy`in n&&(n[`aria-labelledby`]=n.ariaLabelledBy==null?void 0:String(n.ariaLabelledBy),delete n.ariaLabelledBy),(e===`Button`||e===`Badge`)&&`label`in n&&(n._textContent=n.label,delete n.label),(e===`Text`||e===`Heading`||e===`P`||e===`Lead`||e===`Large`||e===`Small`||e===`Muted`||e===`BlockQuote`||e===`H1`||e===`H2`||e===`H3`||e===`H4`||e===`Label`)&&(`text`in n?(n._textContent=n.text,delete n.text):`content`in n&&(n._textContent=n.content,delete n.content)),e===`CardTitle`||e===`CardDescription`||e===`AlertTitle`||e===`AlertDescription`||e===`FieldTitle`||e===`FieldDescription`||e===`FieldError`)for(let e of[`title`,`description`,`text`,`content`])e in n&&(n._textContent=n[e],delete n[e]);if((e===`TableHead`||e===`TableCell`||e===`TableCaption`)&&`content`in n&&(n._textContent=n.content,delete n.content),e===`Input`&&`inputType`in n&&(n.type=n.inputType,delete n.inputType),e===`Button`&&`buttonType`in n&&(n.buttonType&&(n.type=n.buttonType),delete n.buttonType),e===`Label`&&`forId`in n&&(n.htmlFor=n.forId,delete n.forId),e===`Slider`){if(`onChange`in n&&(n.onValueChange=n.onChange,delete n.onChange),`value`in n&&n.value!=null){let e=Array.isArray(n.value)?n.value:[n.value];n.onValueChange?n.value=e:(n.defaultValue=e,delete n.value)}`defaultValue`in n&&typeof n.defaultValue==`number`&&(n.defaultValue=[n.defaultValue]),`min`in n&&(n.min=Number(n.min)),`max`in n&&(n.max=Number(n.max)),`step`in n&&(n.step=Number(n.step)),delete n.range,`indicatorClass`in n&&(n.indicatorClassName=n.indicatorClass,delete n.indicatorClass),`handleClass`in n&&(n.handleClassName=n.handleClass,delete n.handleClass)}if(e===`Progress`){let e=n.min??0,t=n.max??100,r=n.value??0,i=t-e;i>0&&(n.value=(r-e)/i*100,n.target!=null&&(n.target=(n.target-e)/i*100)),delete n.min,delete n.max,`indicatorClass`in n&&(n.indicatorClassName=n.indicatorClass,delete n.indicatorClass),`targetClass`in n&&(n.targetClassName=n.targetClass,delete n.targetClass)}if(e===`Ring`){let e=n.min??0,t=n.max??100,r=n.value??0,i=t-e;i>0&&(n.value=(r-e)/i*100,n.target!=null&&(n.target=(n.target-e)/i*100)),delete n.min,delete n.max,`indicatorClass`in n&&(n.indicatorClassName=n.indicatorClass,delete n.indicatorClass),`targetClass`in n&&(n.targetClassName=n.targetClass,delete n.targetClass)}return(e===`Select`||e===`RadioGroup`||e===`Combobox`||e===`Tabs`)&&`onChange`in n&&(n.onValueChange=n.onChange,delete n.onChange),(e===`Checkbox`||e===`Switch`)&&`onChange`in n&&(n.onCheckedChange=n.onChange,delete n.onChange),(e===`Calendar`||e===`DatePicker`)&&`onChange`in n&&(n.onSelect=n.onChange,delete n.onChange),`cssClass`in n&&(n.className=n.cssClass,delete n.cssClass),n}function Isa(e){let t={...e};return delete t._textContent,t}var Lsa,Rsa,zsa,Bsa=o((()=>{Nsa(),Lsa=new Set([`onClick`,`onChange`,`onSubmit`,`onRowClick`,`onMount`]),Rsa={Select:[`value`,`label`,`selected`,`disabled`],RadioGroup:[`id`,`option`,`label`,`value`,`disabled`]},zsa=[`value`,`label`,`selected`,`disabled`]}));function Vsa(e){return typeof e==`string`?e.includes(`{{`)&&e.includes(`}}`):Array.isArray(e)?e.some(Vsa):typeof e==`object`&&e?Object.values(e).some(Vsa):!1}function Hsa(e,t){return Usa.has(e)&&(typeof t.data==`string`||Vsa(t.data)||e===`PieChart`&&Vsa(t.aggregateExcept))&&t.animate===void 0?{...t,animate:!1}:t}var Usa,Wsa=o((()=>{Usa=new Set([`BarChart`,`LineChart`,`AreaChart`,`PieChart`,`ScatterChart`,`RadarChart`,`RadialChart`,`WaterfallChart`])}));function Gsa({onMount:e,children:t}){return(0,Jsa.useEffect)(()=>{e()},[]),(0,A7.jsx)(A7.Fragment,{children:t})}function O7(e,t){let n=Ny({ariaLabel:e.ariaLabel,ariaLabelledBy:e.ariaLabelledBy},t);return Ne(Fsa(e.type,n))}function k7({node:e,scope:t,state:n,app:r,renderElement:i}){let a=T3t();if(`$ref`in e&&typeof e.$ref==`string`){let a=t.$defs||{},o=e.$ref,s=a[o];if(!s)return console.warn(`[Prefab] Unknown $ref: "${o}"`),null;let l=t.$resolving||new Set;if(l.has(o))return console.warn(`[Prefab] Circular $ref: "${o}"`),null;let u={...t,$resolving:new Set([...l,o])},d=e.let;if(d){let e=Ny(d,{...n.getAll(),...u});u={...u,...e}}let f=e.cssClass,p={...s};for(let t of[`ariaLabel`,`ariaLabelledBy`])e[t]!==void 0&&(p[t]=e[t]);let m=(0,A7.jsx)(k7,{node:p,scope:u,state:n,app:r,renderElement:i});return f?(0,A7.jsx)(`div`,{className:f,children:m}):m}let{type:o,children:s,...l}=e,u=ssa(e);if(u)return(0,A7.jsx)(usa,{error:u,node:e});let d=D3i[o];if(!d)return console.warn(`[Prefab] Unknown component type: ${o}`),null;let f={...n.getAll(),...t},p={},m={};for(let[e,t]of Object.entries(l))Lsa.has(e)&&typeof t==`object`&&t?m[e]=t:p[e]=t;let h=Ny(Hsa(o,p),f),g=Fsa(o,Psa({...h,...m},r,n,t,a)),_=g._textContent,v=g.onMount;delete g.onMount;let y=e=>{let t=i?i(e):e;return v?(0,A7.jsx)(Gsa,{onMount:v,children:t}):t},b=Isa(g);if(msa(o,b),o===`Combobox`&&s){if(s.some(e=>e.type===`ComboboxGroup`)){let e=[];for(let t of s)if(t.type===`ComboboxGroup`&&t.children){let n={...O7(t,f),items:[]};for(let e of t.children)if(e.type===`ComboboxLabel`&&`label`in e){n.labelNames=O7(e,f);let t=e.label;n.label=typeof t==`string`?My(t,f):t}else if(e.type===`ComboboxOption`){let t={...O7(e,f)};for(let n of[`value`,`label`,`disabled`])if(n in e){let r=e[n];t[n]=typeof r==`string`?My(r,f):r}n.items.push(t)}e.push(n)}b._groups=e}else{let e=[],t=[],n={};for(let r of s)if(r.type===`ComboboxSeparator`)t.push(e.length),n[e.length]=O7(r,f);else if(r.type===`ComboboxOption`){let t={...O7(r,f)};for(let e of[`value`,`label`,`disabled`])if(e in r){let n=r[e];t[e]=typeof n==`string`?My(n,f):n}e.push(t)}b._items=e,t.length>0&&(b._separatorIndices=t,b._separatorNames=n)}if(`name`in b&&typeof b.name==`string`){let e=b.name,t=n.get(e);t!==void 0&&(b.value=String(t)),b.onValueChange=n5(b.onValueChange,t=>n.set(e,t))}return y((0,A7.jsx)(d,{...b,children:_}))}if(o in Rsa&&s){if(o===`Select`&&s.some(e=>e.type===`SelectGroup`||e.type===`SelectSeparator`||e.type===`SelectLabel`)){let e=e=>{let t={...O7(e,f)};for(let n of zsa)if(n in e){let r=e[n];t[n]=typeof r==`string`?My(r,f):r}return t},t=[];for(let n of s)if(n.type===`SelectGroup`){let r=[],i,a;for(let t of n.children??[])if(t.type===`SelectLabel`){a=O7(t,f);let e=t.label;i=typeof e==`string`?My(e,f):void 0}else t.type===`SelectOption`&&r.push(e(t));t.push({...O7(n,f),_type:`group`,labelNames:a,label:i,items:r})}else if(n.type===`SelectSeparator`)t.push({...O7(n,f),_type:`separator`});else if(n.type===`SelectLabel`){let e=n.label,r=typeof e==`string`?My(e,f):void 0;t.push({...O7(n,f),_type:`label`,label:r})}else n.type===`SelectOption`&&t.push({_type:`item`,...e(n)});b._selectChildren=t}else{let e=Rsa[o];b._items=s.map(t=>{let n={...O7(t,f)};for(let r of e)if(r in t){let e=t[r];n[r]=typeof e==`string`?My(e,f):e}return n})}if(`name`in b&&typeof b.name==`string`){let e=b.name,t=n.get(e);t!==void 0&&(b.value=String(t)),b.onValueChange=n5(b.onValueChange,t=>n.set(e,t))}return y((0,A7.jsx)(d,{...b,children:_}))}if(`name`in b&&typeof b.name==`string`){let e=b.name,t=n.get(e);if(o===`Input`||o===`Textarea`)t!==void 0&&(b.value=String(t)),b.onChange=n5(b.onChange,t=>n.set(e,t.target.value));else if(o===`Checkbox`||o===`Switch`)t!==void 0&&(b.value=!!t),b.onCheckedChange=n5(b.onCheckedChange,t=>n.set(e,t));else if(o===`Slider`){let r=!!b.range;t!==void 0&&(b.value=r?t:[Number(t)]);let i=b.onValueChange;b.onValueChange=t=>{r?n.set(e,Array.isArray(t)?t:[t]):n.set(e,Array.isArray(t)?t[0]:t),i==null||i(t)}}else o===`Calendar`||o===`DatePicker`?(t!==void 0&&(b.value=String(t)),b.onSelect=n5(b.onSelect,t=>n.set(e,t))):o===`DropZone`&&(b.onChange=n5(b.onChange,t=>{if(Array.isArray(t)&&t.length!==0){if(b.multiple){let r=n.get(e);n.set(e,[...Array.isArray(r)?r:[],...t])}else n.set(e,t)}}))}if(new Set([`Tabs`,`Accordion`,`Pages`]).has(o)&&s){let e=s.map((e,i)=>{var a;return{...O7(e,f),title:e.title??`Item ${i+1}`,value:e.value??e.title??`item-${i}`,disabled:e.disabled??!1,content:(0,A7.jsx)(A7.Fragment,{children:(a=e.children)==null?void 0:a.map((e,a)=>(0,A7.jsx)(k7,{node:e,scope:t,state:n,app:r},`${i}-${a}`))})}});if(`name`in b&&typeof b.name==`string`){let e=b.name,t=n.get(e);t!==void 0&&(b.value=String(t)),(o===`Tabs`||!b.onValueChange)&&k3i(b,n,e)}return b._panels=e,y((0,A7.jsx)(d,{...b}))}if(o===`ForEach`&&s){let e=l.key??l.itemKey,i=e?My(e,f):[],a=typeof i==`string`?Ksa(i,f)??My(`{{ ${i} }}`,f):i;if(!Array.isArray(a))return null;let o=l.cssClass,u=o?`w-full ${o}`:`contents`;return(0,A7.jsx)(`div`,{className:u,children:a.map((e,i)=>{let a={...t,$index:i,$item:e},o=l.let;if(o){let e=Ny(o,{...n.getAll(),...a});a={...a,...e}}return s.map((e,t)=>(0,A7.jsx)(k7,{node:e,scope:a,state:n,app:r},`${i}-${t}`))})})}if(o===`Condition`){let e=l.cases,i=l.else,a={...n.getAll(),...t};if(e){for(let i of e)if(j3i(i.when,a)){var x;return(0,A7.jsx)(A7.Fragment,{children:(x=i.children)==null?void 0:x.map((e,i)=>(0,A7.jsx)(k7,{node:e,scope:t,state:n,app:r},i))})}}return i?(0,A7.jsx)(A7.Fragment,{children:i.map((e,i)=>(0,A7.jsx)(k7,{node:e,scope:t,state:n,app:r},i))}):null}if(o===`Slot`){let e=h.name,i=e?n.get(e):void 0;return typeof i==`object`&&i&&`type`in i?(0,A7.jsx)(k7,{node:i,scope:t,state:n,app:r}):s&&s.length>0?(0,A7.jsx)(A7.Fragment,{children:s.map((e,i)=>(0,A7.jsx)(k7,{node:e,scope:t,state:n,app:r},i))}):null}let S=t,C=l.let;if(C){let e=Ny(C,f);S={...t,...e}}let w=s==null?void 0:s.map((e,t)=>(0,A7.jsx)(k7,{node:e,scope:S,state:n,app:r},t));return _!=null||w&&w.length>0?y((0,A7.jsxs)(d,{...b,children:[_,w]})):y((0,A7.jsx)(d,{...b}))}function Ksa(e,t){let n=e.split(`.`),r=t;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function qsa({tree:e,defs:t,state:n,app:r}){psa();let i=(0,Jsa.useRef)(!1);if(!i.current){i.current=!0;let t=hsa(e,n.getAll());Object.keys(t).length>0&&n.merge(t)}let a=t?{$defs:t}:{};return(0,A7.jsx)(KQt.Provider,{value:n,children:(0,A7.jsx)(MQt,{renderNode:e=>(0,A7.jsx)(k7,{node:e,scope:a,state:n,app:r}),children:(0,A7.jsx)(k7,{node:e,scope:a,state:n,app:r})})})}var Jsa,A7,Ysa=o((()=>{Pe(),Jsa=d(p(),1),A7=Ie(),O3i(),Py(),A3i(),qQt(),k3t(),RQt(),M3i(),lsa(),fsa(),vsa(),Bsa(),Wsa()}));function Xsa(e){return/^\d+$/.test(e)}function Zsa(e,t){let n=t.split(`.`),r=e;for(let e of n){if(r==null)return;if(Xsa(e)){if(!Array.isArray(r))return;r=r[Number(e)]}else{if(typeof r!=`object`||Array.isArray(r))return;r=r[e]}}return r}function Qsa(e,t,n){let r=t.split(`.`);if(r.length===1)return{...e,[r[0]]:n};let[i,...a]=r,o=e[i];if(o==null)return console.warn(`[Prefab] setByPath: "${i}" is ${o}, cannot set "${t}"`),e;let s=a.join(`.`),l=a[0];if(Xsa(l)){if(!Array.isArray(o))return console.warn(`[Prefab] setByPath: "${i}" is not an array, cannot index with "${l}" in "${t}"`),e;let r=Number(l);if(r<0||r>=o.length)return console.warn(`[Prefab] setByPath: index ${r} out of bounds for "${i}" (length ${o.length}) in "${t}"`),e;if(a.length===1){let t=[...o];return t[r]=n,{...e,[i]:t}}let s=o[r];if(typeof s!=`object`||!s)return console.warn(`[Prefab] setByPath: element at "${i}.${r}" is not an object, cannot traverse further in "${t}"`),e;let u=Qsa(s,a.slice(1).join(`.`),n),d=[...o];return d[r]=u,{...e,[i]:d}}return typeof o!=`object`||Array.isArray(o)?(console.warn(`[Prefab] setByPath: "${i}" is not an object, cannot traverse "${t}"`),e):{...e,[i]:Qsa(o,s,n)}}function $sa(e){let[t,n]=(0,j7.useState)(()=>({...e??{}})),r=(0,j7.useRef)(t);r.current=t;let i=(0,j7.useCallback)(e=>{r.current=e,n(e)},[]),a=(0,j7.useCallback)(e=>e.includes(`.`)?Zsa(r.current,e):r.current[e],[]),o=(0,j7.useCallback)(()=>r.current,[]),s=(0,j7.useCallback)((e,t)=>{let n=e.includes(`.`)?Qsa(r.current,e,t):{...r.current,[e]:t};i(n)},[i]),l=(0,j7.useCallback)(e=>{let t={...r.current,...e};i(t)},[i]),u=(0,j7.useCallback)(e=>{let t=e?{...e}:{};r.current=t,n(t)},[]);return(0,j7.useMemo)(()=>({get:a,getAll:o,set:s,merge:l,reset:u}),[a,o,s,l,u])}var j7,eca=o((()=>{j7=d(p(),1)}));function tca(e,t){return new Promise((n,r)=>{let i=!1,a=()=>{i=!0,t.removeEventListener(`abort`,a),r(t.reason)};t.addEventListener(`abort`,a,{once:!0}),t.aborted&&a(),e.then(e=>{t.removeEventListener(`abort`,a),n(e)},e=>{t.removeEventListener(`abort`,a),i&&e!==t.reason&&!(e instanceof Error&&e.name===`AbortError`)&&console.warn(`[Prefab] Action failed after cancellation`,e),r(e)})})}var nca=o((()=>{}));function M7(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r{}));function N7(e){return encodeURI(ica(e))}function ica(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}var aca=o((()=>{}));function P7(e,t=Object.create(null),n=lca,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:P7(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(cca[i])continue;let a=`${r}/${N7(i)}`,o=e[i];if(Array.isArray(o)){if(oca[i]){let e=o.length;for(let r=0;r{aca(),oca={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},sca={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},cca={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},lca=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`)}));function F7(e){return e.test.bind(e)}function dca(e){return e%4==0&&(e%100!=0||e%400==0)}function fca(e){let t=e.match(_ca);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&dca(n)?29:vca[r])}function pca(e,t){let n=t.match(yca);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}function mca(e){let t=e.split(Nca);return t.length==2&&fca(t[0])&&pca(!0,t[1])}function hca(e){return Pca.test(e)&&Fca.test(e)}function gca(e){if(Ica.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}var _ca,vca,yca,bca,xca,Sca,Cca,wca,Tca,Eca,Dca,Oca,kca,Aca,jca,Mca,Nca,Pca,Fca,Ica,Lca=o((()=>{_ca=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,vca=[0,31,28,31,30,31,30,31,31,30,31,30,31],yca=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,bca=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,xca=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Sca=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Cca=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,wca=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Tca=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Eca=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Dca=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Oca=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},kca=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Aca=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,jca=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e)),Mca={date:fca,time:pca.bind(void 0,!1),"date-time":mca,duration:jca,uri:hca,"uri-reference":F7(xca),"uri-template":F7(Sca),url:F7(Cca),email:Oca,hostname:F7(bca),ipv4:F7(kca),ipv6:F7(Aca),regex:gca,uuid:F7(wca),"json-pointer":F7(Tca),"json-pointer-uri-fragment":F7(Eca),"relative-json-pointer":F7(Dca)},Nca=/t|\s/i,Pca=/\/|:/,Fca=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Ica=/[^\\]\\Z/})),Rca=o((()=>{}));function zca(e){let t=0,n=e.length,r=0,i;for(;r=55296&&i<=56319&&r{}));function I7(e,t,n=`2019-09`,r=P7(t),i=!0,a=null,o=`#`,s=`#`,l=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let u=typeof e,d;switch(u){case`boolean`:case`number`:case`string`:d=u;break;case`object`:d=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${u}" type are not supported.`)}let{$ref:f,$recursiveRef:p,$recursiveAnchor:m,type:h,const:g,enum:_,required:v,not:y,anyOf:b,allOf:x,oneOf:S,if:C,then:w,else:T,format:E,properties:D,patternProperties:O,additionalProperties:k,unevaluatedProperties:A,minProperties:j,maxProperties:M,propertyNames:N,dependentRequired:P,dependentSchemas:F,dependencies:I,prefixItems:L,items:R,additionalItems:ee,unevaluatedItems:te,contains:ne,minContains:z,maxContains:re,minItems:ie,maxItems:ae,uniqueItems:oe,minimum:se,maximum:ce,exclusiveMinimum:le,exclusiveMaximum:ue,multipleOf:de,minLength:fe,maxLength:pe,pattern:me,__absolute_ref__:he,__absolute_recursive_ref__:ge}=t,_e=[];if(m===!0&&a===null&&(a=t),p===`#`){let u=a===null?r[ge]:a,d=`${s}/$recursiveRef`,f=I7(e,a===null?t:a,n,r,i,u,o,d,l);f.valid||_e.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:d,error:`A subschema had errors.`},...f.errors)}if(f!==void 0){let t=r[he||f];if(t===void 0){let e=`Unresolved $ref "${f}".`;throw he&&he!==f&&(e+=` Absolute URI "${he}".`),e+=`\nKnown schemas:\n- ${Object.keys(r).join(` - `)}`,Error(e)}let u=`${s}/$ref`,d=I7(e,t,n,r,i,a,o,u,l);if(d.valid||_e.push({instanceLocation:o,keyword:`$ref`,keywordLocation:u,error:`A subschema had errors.`},...d.errors),n===`4`||n===`7`)return{valid:_e.length===0,errors:_e}}if(Array.isArray(h)){let t=h.length,n=!1;for(let r=0;rM7(e,t))||_e.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(_)}.`}):_.some(t=>e===t)||_e.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(_)}.`})),y!==void 0){let t=`${s}/not`;I7(e,y,n,r,i,a,o,t).valid&&_e.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let ve=[];if(b!==void 0){let t=`${s}/anyOf`,u=_e.length,d=!1;for(let s=0;s{let d=Object.create(l),f=I7(e,s,n,r,i,m===!0?a:null,o,`${t}/${u}`,d);return _e.push(...f.errors),f.valid&&ve.push(d),f.valid}).length;d===1?_e.length=u:_e.splice(u,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${d} matches).`})}if((d===`object`||d===`array`)&&Object.assign(l,...ve),C!==void 0){let t=`${s}/if`;if(I7(e,C,n,r,i,a,o,t,l).valid){if(w!==void 0){let u=I7(e,w,n,r,i,a,o,`${s}/then`,l);u.valid||_e.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...u.errors)}}else if(T!==void 0){let u=I7(e,T,n,r,i,a,o,`${s}/else`,l);u.valid||_e.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...u.errors)}}if(d===`object`){if(v!==void 0)for(let t of v)t in e||_e.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(j!==void 0&&t.lengthM&&_e.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${M} properties.`}),N!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${N7(s)}`,l=I7(s,N,n,r,i,a,e,t);l.valid||_e.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...l.errors)}}if(P!==void 0){let t=`${s}/dependantRequired`;for(let n in P)if(n in e){let r=P[n];for(let i of r)i in e||_e.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(F!==void 0)for(let t in F){let u=`${s}/dependentSchemas`;if(t in e){let s=I7(e,F[t],n,r,i,a,o,`${u}/${N7(t)}`,l);s.valid||_e.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:u,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(I!==void 0){let t=`${s}/dependencies`;for(let s in I)if(s in e){let l=I[s];if(Array.isArray(l))for(let n of l)n in e||_e.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let u=I7(e,l,n,r,i,a,o,`${t}/${N7(s)}`);u.valid||_e.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...u.errors)}}}let u=Object.create(null),d=!1;if(D!==void 0){let t=`${s}/properties`;for(let s in D){if(!(s in e))continue;let f=`${o}/${N7(s)}`,p=I7(e[s],D[s],n,r,i,a,f,`${t}/${N7(s)}`);if(p.valid)l[s]=u[s]=!0;else if(d=i,_e.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...p.errors),d)break}}if(!d&&O!==void 0){let t=`${s}/patternProperties`;for(let s in O){let f=new RegExp(s,`u`),p=O[s];for(let m in e){if(!f.test(m))continue;let h=`${o}/${N7(m)}`,g=I7(e[m],p,n,r,i,a,h,`${t}/${N7(s)}`);g.valid?l[m]=u[m]=!0:(d=i,_e.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${m}" matches pattern "${s}" but does not match associated schema.`},...g.errors))}}}if(!d&&k!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(u[s])continue;let f=`${o}/${N7(s)}`,p=I7(e[s],k,n,r,i,a,f,t);p.valid?l[s]=!0:(d=i,_e.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...p.errors))}}else if(!d&&A!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!l[s]){let u=`${o}/${N7(s)}`,d=I7(e[s],A,n,r,i,a,u,t);d.valid?l[s]=!0:_e.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...d.errors)}}}else if(d===`array`){ae!==void 0&&e.length>ae&&_e.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${ae}).`}),ie!==void 0&&e.length=(z||0)&&(_e.length=d),z===void 0&&re===void 0&&f===0?_e.splice(d,0,{instanceLocation:o,keyword:`contains`,keywordLocation:u,error:`Array does not contain item matching schema.`}):z!==void 0&&fre&&_e.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${re} items matching schema. ${f} items were found.`})}}if(!d&&te!==void 0){let d=`${s}/unevaluatedItems`;for(;u=ce||e>ce)&&_e.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${ue?`or equal to `:``} ${ce}.`})):(se!==void 0&&ece&&_e.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${ce}.`}),le!==void 0&&e<=le&&_e.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${le}.`}),ue!==void 0&&e>=ue&&_e.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${ue}.`})),de!==void 0){let t=e%de;Math.abs(0-t)>=1.1920929e-7&&Math.abs(de-t)>=1.1920929e-7&&_e.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${de}.`})}}else if(d===`string`){let t=fe===void 0&&pe===void 0?0:zca(e);fe!==void 0&&tpe&&_e.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${pe}).`}),me!==void 0&&!new RegExp(me,`u`).test(e)&&_e.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),E!==void 0&&Mca[E]&&!Mca[E](e)&&_e.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${E}".`})}return{valid:_e.length===0,errors:_e}}var Vca=o((()=>{rca(),uca(),Lca(),aca(),Bca()})),Hca,Uca=o((()=>{uca(),Vca(),D(),Hca=class{constructor(e,t=`2019-09`,n=!0){E(this,`schema`,void 0),E(this,`draft`,void 0),E(this,`shortCircuit`,void 0),E(this,`lookup`,void 0),this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=P7(e)}validate(e){return I7(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),P7(e,this.lookup)}}})),Wca=o((()=>{rca(),uca(),Lca(),aca(),Rca(),Bca(),Vca(),Uca()}));function L7(e){return{isError:!0,content:[{type:`text`,text:e}]}}var Gca,Kca,qca,Jca=o((()=>{nca(),Wca(),m7(),Nsa(),Py(),wsa(),D(),Gca=Q({action:Z()}).passthrough(),Kca=Q({name:Z().min(1).max(128).regex(/^[a-zA-Z0-9_.-]+$/),description:Z().optional(),inputSchema:Q({type:$(`object`)}).passthrough(),bind:o7(Z(),$5()).default({}),actions:r7([Gca,t7(Gca)]).default([]),result:o7(Z(),$5())}),qca=class{constructor(e){E(this,`app`,void 0),E(this,`entries`,new Map),E(this,`generation`,0),E(this,`ready`,!1),E(this,`pending`,Promise.resolve()),E(this,`controllers`,new Set),E(this,`unregister`,void 0),this.app=e,e&&(e.onlisttools=async()=>({tools:[...this.entries.values()].map(e=>e.definition)}),e.oncalltool=({name:e,arguments:t},n)=>this.call(e,t??{},{signal:n.mcpReq.signal}))}call(e,t={},n={}){let r=this.entries.get(e);if(!r)return Promise.resolve(L7(`Unknown app tool: ${e}`));let i=structuredClone(t),a=this.pending.then(()=>r.run(i,n));return this.pending=a.catch(()=>void 0),a}connected(){this.ready=!0,this.entries.size&&this.notify()}notify(){this.ready&&this.app&&this.app.sendToolListChanged().catch(e=>{console.warn(`[Prefab] Unable to notify app tool list change`,e)})}reset(){var e;this.generation++,(e=this.unregister)==null||e.call(this),this.unregister=void 0;for(let e of this.controllers)e.abort();this.controllers.clear(),this.entries.clear(),this.pending=Promise.resolve()}clear(){this.reset(),this.notify()}replace(e,t){this.reset();let n=this.generation;try{let r=t7(Kca).parse(e??[]),i=new Map;for(let e of r){if(i.has(e.name))throw Error(`Duplicate app tool: ${e.name}`);let r=new Hca(e.inputSchema,`2020-12`);i.set(e.name,{definition:{name:e.name,description:e.description,inputSchema:e.inputSchema},run:async(a,o)=>{var s,l;let u=new AbortController,d=()=>u.abort(),f=!0,p=new Set,m=(e=!1)=>{var t;f||p.size||((t=o.signal)==null||t.removeEventListener(`abort`,d),u.signal.removeEventListener(`abort`,h),this.controllers.delete(u),e&&u.abort())},h=()=>{for(let e of[...p])e()};u.signal.addEventListener(`abort`,h,{once:!0}),(s=o.signal)==null||s.addEventListener(`abort`,d,{once:!0}),(l=o.signal)!=null&&l.aborted&&d(),this.controllers.add(u);try{let s=()=>{if(n!==this.generation||u.signal.aborted)throw Error(`App tool invocation is no longer active`)};if(s(),a&&typeof a==`object`){for(let t of Object.keys(e.bind))if(Object.prototype.hasOwnProperty.call(a,t))return L7(`Bound argument cannot be overridden: ${t}`)}let l=r.validate(a);if(!l.valid)return L7(`Invalid arguments for ${e.name}: ${l.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}`);let d=Ny(e.bind,t.getAll()),h=structuredClone({...a,...d}),g={get:e=>(s(),t.get(e)),getAll:()=>(s(),t.getAll()),set:(e,n)=>{s(),t.set(e,n)},merge:e=>{s(),t.merge(e)},reset:e=>{s(),t.reset(e)}};xsa(g,(e,t,n)=>{if(s(),!f)return this.call(e,t,n);let r=i.get(e);return r?r.run(structuredClone(t),{...n,signal:u.signal}):Promise.resolve(L7(`Unknown app tool: ${e}`))});let _,v=await tca(D7(e.actions,this.app,g,h,o.depth??0,void 0,void 0,o.overlayClose,void 0,{signal:u.signal,propagateCallbackFailures:!0,intervalOwner:t,registerCleanup:e=>u.signal.aborted?(e(),()=>{}):(p.add(e),(t=!0)=>{p.delete(e),m(t)}),reportError:e=>{_??(_=e)}}),u.signal);if(s(),!v)return L7(_??`Action execution failed in app tool: ${e.name}`);let y=Ny(e.result,{...t.getAll(),$event:h}),b=JSON.stringify(y);return{content:[{type:`text`,text:b}],structuredContent:JSON.parse(b)}}catch(e){return L7(e instanceof Error?e.message:String(e))}finally{f=!1,m()}}})}this.entries=i,this.unregister=xsa(t,(e,t,n)=>this.call(e,t,n))}catch(e){console.warn(`[Prefab] Invalid app tools; tools cleared`,e)}this.notify()}}})),R7=d(p(),1);Ae(),Ysa(),eca(),Jca();var z7=Ie();function Yca({injected:e}){let t=window.location.hash,n=t.startsWith(`#docpreview:`),{hashTree:r,hashState:i,hashData:a,hashTools:o,hashError:s}=(0,R7.useMemo)(()=>{let e=t.indexOf(`:`);if(e===-1)return{hashTree:null,hashState:{},hashData:{},hashTools:void 0,hashError:null};try{let n=decodeURIComponent(t.slice(e+1)),r=JSON.parse(n);if(r.view){let e=new Set([`view`,`state`,`tools`]),t={};for(let[n,i]of Object.entries(r))e.has(n)||(t[n]=i);return{hashTree:r.view,hashState:r.state??{},hashData:t,hashTools:r.tools,hashError:null}}return{hashTree:r,hashState:{},hashData:{},hashTools:void 0,hashError:null}}catch(e){return{hashTree:null,hashState:{},hashData:{},hashTools:void 0,hashError:e.message}}},[]),l=(e==null?void 0:e.tree)??r?a:{...Me,...a},u=$sa({...(e==null?void 0:e.data)??l,...(e==null?void 0:e.state)??i}),d=(0,R7.useRef)(new qca(null)),[f,p]=(0,R7.useState)((e==null?void 0:e.tree)??r),[m]=(0,R7.useState)(s),h=(0,R7.useRef)(null);(0,R7.useLayoutEffect)(()=>(d.current.replace((e==null?void 0:e.tools)??o,u),()=>d.current.clear()),[]),(0,R7.useEffect)(()=>{let e=e=>{var t;if(((t=e.data)==null?void 0:t.type)===`prefab:render`){let{tree:t,data:n,state:r,tools:i}=e.data;t&&p(t),u.reset({...n??{},...r??{}}),d.current.replace(i,u)}};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[u]),(0,R7.useEffect)(()=>{if(!n)return;let e=e=>{e.data&&e.data.type===`prefab:theme`&&document.documentElement.classList.toggle(`dark`,e.data.dark)};return window.addEventListener(`message`,e),window.parent.postMessage({type:`prefab:ready`},`*`),()=>{window.removeEventListener(`message`,e)}},[n]),(0,R7.useEffect)(()=>{if(!n||!h.current)return;let e=()=>{let e=document.documentElement.scrollHeight;window.parent.postMessage({type:`prefab:resize`,height:e},`*`)};e();let t=new ResizeObserver(e);return t.observe(h.current),()=>t.disconnect()},[n,f]);let g=f??je;return n?(0,z7.jsxs)(`div`,{ref:h,className:`bg-transparent text-foreground py-12 px-16 flex flex-col items-center`,children:[m&&(0,z7.jsxs)(`div`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:[`JSON parse error: `,m]}),(0,z7.jsx)(qsa,{tree:g,state:u,app:null}),(0,z7.jsx)(ke,{})]}):(0,z7.jsxs)(`div`,{className:`min-h-screen bg-background text-foreground`,children:[(0,z7.jsxs)(`div`,{className:`mx-auto max-w-4xl p-8`,children:[m&&(0,z7.jsxs)(`div`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:[`JSON parse error: `,m]}),(0,z7.jsx)(qsa,{tree:g,state:u,app:null})]}),(0,z7.jsx)(ke,{})]})}var Xca,Zca,Qca,$ca=o((()=>{Xca=Object.defineProperty,Zca=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qca=(e,t)=>{let n={};for(var r in e)Xca(n,r,{get:e[r],enumerable:!0});return t&&Xca(n,Symbol.toStringTag,{value:`Module`}),n}}));function ela(e){return typeof e==`string`&&tla.has(e.replace(/#$/,``))}var tla,nla=o((()=>{tla=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`])})),rla=o((()=>{jra(),jra()})),ila=o((()=>{rla()})),ala,ola,sla,B7,cla,V7,H7,lla,ula,U7,W7,dla,fla,pla,mla,hla,gla,G7,K7,q7,J7,Y7,_la,X7,Z7,vla,yla,Q7,$7,bla,xla,e9,Sla,Cla,wla,t9,n9,r9,Tla,Ela,Dla,Ola,kla,Ala,jla,Mla,Nla,Pla,Fla,Ila,Lla,Rla,zla,Bla,Vla,i9,a9,Hla,Ula,Wla,Gla,o9,s9,Kla,qla,Jla,Yla,Xla,Zla,c9,Qla,$la,eua,tua,nua,rua,iua,aua,oua,sua,cua,lua,uua,dua,fua,pua,mua,hua,gua,_ua,vua,yua,bua,l9,u9,d9,xua,f9,p9,m9,Sua,Cua,wua,Tua,Eua,h9,Dua,Oua,g9,kua,Aua,jua,Mua,Nua,Pua,Fua,Iua,Lua,Rua,zua,Bua,Vua,Hua,Uua,_9,Wua,Gua,Kua,qua,Jua,Yua,v9,y9,Xua,Zua,Qua,$ua,eda,tda,nda,rda,ida,b9,ada,oda,sda,cda,lda,uda,dda,fda,pda,mda,hda,gda,_da,vda,yda,bda,xda,x9,Sda,Cda,wda,Tda,Eda,Dda,Oda,kda,Ada,jda,Mda,Nda,Pda,Fda,Ida,Lda,Rda,S9,zda,Bda,Vda,Hda,Uda,Wda,Gda,Kda,qda,Jda,Yda,Xda,Zda,Qda=o((()=>{ila(),ala=`2025-11-25`,ola=[ala,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],sla=`io.modelcontextprotocol/related-task`,B7=`io.modelcontextprotocol/protocolVersion`,cla=`io.modelcontextprotocol/clientInfo`,V7=`io.modelcontextprotocol/serverInfo`,H7=`io.modelcontextprotocol/clientCapabilities`,lla=`io.modelcontextprotocol/subscriptionId`,ula=`io.modelcontextprotocol/logLevel`,U7=l7(()=>r7([Z(),J5(),Y5(),Z5(),o7(Z(),U7),t7(U7)])),W7=o7(Z(),U7),dla=t7(U7),fla=r7([Z(),J5().int()]),pla=Z(),mla=Q({ttl:J5().optional()}),hla=Q({taskId:Z()}),gla=n7({progressToken:fla.optional(),[sla]:hla.optional()}),G7=Q({_meta:gla.optional()}),K7=G7.extend({task:mla.optional()}),q7=Q({method:Z(),params:G7.loose().optional()}),J7=Q({_meta:gla.optional()}),Y7=Q({method:Z(),params:J7.loose().optional()}),_la=n7({get[V7](){return r9.optional().catch(void 0)}}),X7=n7({_meta:_la.optional()}),Z7=r7([Z(),J5().int()]),vla=Q({jsonrpc:$(`2.0`),id:Z7,...q7.shape}).strict(),yla=Q({jsonrpc:$(`2.0`),...Y7.shape}).strict(),Q7=Q({jsonrpc:$(`2.0`),id:Z7,result:X7}).strict(),$7=Q({jsonrpc:$(`2.0`),id:Z7.optional(),error:Q({code:J5().int(),message:Z(),data:$5().optional()})}).strict(),bla=r7([vla,yla,Q7,$7]),xla=r7([Q7,$7]),e9=X7.strict(),Sla=J7.extend({requestId:Z7.optional(),reason:Z().optional()}),Cla=Y7.extend({method:$(`notifications/cancelled`),params:Sla}),wla=Q({src:Z(),mimeType:Z().optional(),sizes:t7(Z()).optional(),theme:s7([`light`,`dark`]).optional()}),t9=Q({icons:t7(wla).optional()}),n9=Q({name:Z(),title:Z().optional()}),r9=n9.extend({...n9.shape,...t9.shape,version:Z(),websiteUrl:Z().optional(),description:Z().optional()}),Tla=a7(Q({applyDefaults:Y5().optional()}),W7),Ela=u7(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,a7(Q({form:Tla.optional(),url:W7.optional()}),W7.optional())),Dla=n7({list:W7.optional(),cancel:W7.optional(),requests:n7({sampling:n7({createMessage:W7.optional()}).optional(),elicitation:n7({create:W7.optional()}).optional()}).optional()}),Ola=n7({list:W7.optional(),cancel:W7.optional(),requests:n7({tools:n7({call:W7.optional()}).optional()}).optional()}),kla=Q({experimental:o7(Z(),W7).optional(),sampling:Q({context:W7.optional(),tools:W7.optional()}).optional(),elicitation:Ela.optional(),roots:Q({listChanged:Y5().optional()}).optional(),tasks:Dla.optional(),extensions:o7(Z(),W7).optional()}),Ala=G7.extend({protocolVersion:Z(),capabilities:kla,clientInfo:r9}),jla=q7.extend({method:$(`initialize`),params:Ala}),Mla=Q({experimental:o7(Z(),W7).optional(),logging:W7.optional(),completions:W7.optional(),prompts:Q({listChanged:Y5().optional()}).optional(),resources:Q({subscribe:Y5().optional(),listChanged:Y5().optional()}).optional(),tools:Q({listChanged:Y5().optional()}).optional(),tasks:Ola.optional(),extensions:o7(Z(),W7).optional()}),Nla=X7.extend({protocolVersion:Z(),capabilities:Mla,serverInfo:r9,instructions:Z().optional()}),Pla=Y7.extend({method:$(`notifications/initialized`),params:J7.optional()}),Fla=q7.extend({method:$(`server/discover`),params:G7.optional()}),Ila=X7.extend({supportedVersions:t7(Z()),capabilities:Mla,instructions:Z().optional()}),Lla=q7.extend({method:$(`ping`),params:G7.optional()}),Rla=Q({progress:J5(),total:c7(J5()),message:c7(Z())}),zla=Q({...J7.shape,...Rla.shape,progressToken:fla}),Bla=Y7.extend({method:$(`notifications/progress`),params:zla}),Vla=G7.extend({cursor:pla.optional()}),i9=q7.extend({params:Vla.optional()}),a9=X7.extend({nextCursor:pla.optional()}),Hla=Q({uri:Z(),mimeType:c7(Z()),_meta:o7(Z(),$5()).optional()}),Ula=Hla.extend({text:Z()}),Wla=Z().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Gla=Hla.extend({blob:Wla}),o9=s7([`user`,`assistant`]),s9=Q({audience:t7(o9).optional(),priority:J5().min(0).max(1).optional(),lastModified:Era({offset:!0}).optional()}),Kla=Q({...n9.shape,...t9.shape,uri:Z(),description:c7(Z()),mimeType:c7(Z()),size:c7(J5()),annotations:s9.optional(),_meta:c7(n7({}))}),qla=Q({...n9.shape,...t9.shape,uriTemplate:Z(),description:c7(Z()),mimeType:c7(Z()),annotations:s9.optional(),_meta:c7(n7({}))}),Jla=i9.extend({method:$(`resources/list`)}),Yla=a9.extend({resources:t7(Kla)}),Xla=i9.extend({method:$(`resources/templates/list`)}),Zla=a9.extend({resourceTemplates:t7(qla)}),c9=G7.extend({uri:Z()}),Qla=c9,$la=q7.extend({method:$(`resources/read`),params:Qla}),eua=X7.extend({contents:t7(r7([Ula,Gla]))}),tua=Y7.extend({method:$(`notifications/resources/list_changed`),params:J7.optional()}),nua=c9,rua=q7.extend({method:$(`resources/subscribe`),params:nua}),iua=c9,aua=q7.extend({method:$(`resources/unsubscribe`),params:iua}),oua=Q({toolsListChanged:Y5().optional(),promptsListChanged:Y5().optional(),resourcesListChanged:Y5().optional(),resourceSubscriptions:t7(Z()).optional()}),sua=G7.extend({notifications:oua}),cua=q7.extend({method:$(`subscriptions/listen`),params:sua}),lua=J7.extend({notifications:oua}),uua=Y7.extend({method:$(`notifications/subscriptions/acknowledged`),params:lua}),dua=_la.extend({[lla]:Z7}),fua=X7.extend({_meta:dua}),pua=J7.extend({uri:Z()}),mua=Y7.extend({method:$(`notifications/resources/updated`),params:pua}),hua=Q({name:Z(),description:c7(Z()),required:c7(Y5())}),gua=Q({...n9.shape,...t9.shape,description:c7(Z()),arguments:c7(t7(hua)),_meta:c7(n7({}))}),_ua=i9.extend({method:$(`prompts/list`)}),vua=a9.extend({prompts:t7(gua)}),yua=G7.extend({name:Z(),arguments:o7(Z(),Z()).optional()}),bua=q7.extend({method:$(`prompts/get`),params:yua}),l9=Q({type:$(`text`),text:Z(),annotations:s9.optional(),_meta:o7(Z(),$5()).optional()}),u9=Q({type:$(`image`),data:Wla,mimeType:Z(),annotations:s9.optional(),_meta:o7(Z(),$5()).optional()}),d9=Q({type:$(`audio`),data:Wla,mimeType:Z(),annotations:s9.optional(),_meta:o7(Z(),$5()).optional()}),xua=Q({type:$(`tool_use`),name:Z(),id:Z(),input:o7(Z(),$5()),_meta:o7(Z(),$5()).optional()}),f9=Q({type:$(`resource`),resource:r7([Ula,Gla]),annotations:s9.optional(),_meta:o7(Z(),$5()).optional()}),p9=Kla.extend({type:$(`resource_link`)}),m9=r7([l9,u9,d9,p9,f9]),Sua=Q({role:o9,content:m9}),Cua=X7.extend({description:Z().optional(),messages:t7(Sua)}),wua=Y7.extend({method:$(`notifications/prompts/list_changed`),params:J7.optional()}),Tua=Q({title:Z().optional(),readOnlyHint:Y5().optional(),destructiveHint:Y5().optional(),idempotentHint:Y5().optional(),openWorldHint:Y5().optional()}),Eua=Q({taskSupport:s7([`required`,`optional`,`forbidden`]).optional()}),h9=Q({...n9.shape,...t9.shape,description:Z().optional(),inputSchema:Q({type:$(`object`),properties:o7(Z(),U7).optional(),required:t7(Z()).optional()}).catchall($5()),outputSchema:n7({$schema:Z().optional()}).optional(),annotations:Tua.optional(),execution:Eua.optional(),_meta:o7(Z(),$5()).optional()}),Dua=i9.extend({method:$(`tools/list`)}),Oua=a9.extend({tools:t7(h9)}),g9=X7.extend({content:t7(m9).default([]),structuredContent:$5().optional(),isError:Y5().optional()}),kua=g9.or(X7.extend({toolResult:$5()})),Aua=K7.extend({name:Z(),arguments:o7(Z(),$5()).optional()}),jua=q7.extend({method:$(`tools/call`),params:Aua}),Mua=Y7.extend({method:$(`notifications/tools/list_changed`),params:J7.optional()}),Nua=Q({autoRefresh:Y5().default(!0),debounceMs:J5().int().nonnegative().default(300)}),Pua=s7([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Fua=G7.extend({level:Pua}),Iua=q7.extend({method:$(`logging/setLevel`),params:Fua}),Lua=J7.extend({level:Pua,logger:Z().optional(),data:$5()}),Rua=Y7.extend({method:$(`notifications/message`),params:Lua}),zua=Q({name:Z().optional()}),Bua=Q({hints:t7(zua).optional(),costPriority:J5().min(0).max(1).optional(),speedPriority:J5().min(0).max(1).optional(),intelligencePriority:J5().min(0).max(1).optional()}),Vua=Q({mode:s7([`auto`,`required`,`none`]).optional()}),Hua=Q({type:$(`tool_result`),toolUseId:Z().describe(`The unique identifier for the corresponding tool call.`),content:t7(m9),structuredContent:$5().optional(),isError:Y5().optional(),_meta:o7(Z(),$5()).optional()}),Uua=i7(`type`,[l9,u9,d9]),_9=i7(`type`,[l9,u9,d9,xua,Hua]),Wua=Q({role:o9,content:r7([_9,t7(_9)]),_meta:o7(Z(),$5()).optional()}),Gua=K7.extend({messages:t7(Wua),modelPreferences:Bua.optional(),systemPrompt:Z().optional(),includeContext:s7([`none`,`thisServer`,`allServers`]).optional(),temperature:J5().optional(),maxTokens:J5().int(),stopSequences:t7(Z()).optional(),metadata:W7.optional(),tools:t7(h9).optional(),toolChoice:Vua.optional()}),Kua=q7.extend({method:$(`sampling/createMessage`),params:Gua}),qua=X7.extend({model:Z(),stopReason:c7(s7([`endTurn`,`stopSequence`,`maxTokens`]).or(Z())),role:o9,content:Uua}),Jua=X7.extend({model:Z(),stopReason:c7(s7([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(Z())),role:o9,content:r7([_9,t7(_9)])}),Yua=Q({type:$(`boolean`),title:Z().optional(),description:Z().optional(),default:Y5().optional()}),v9=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),minLength:J5().optional(),maxLength:J5().optional(),format:s7([`email`,`uri`,`date`,`date-time`]).optional(),default:Z().optional()}),y9=Q({type:s7([`number`,`integer`]),title:Z().optional(),description:Z().optional(),minimum:J5().optional(),maximum:J5().optional(),default:J5().optional()}),Xua=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),enum:t7(Z()),default:Z().optional()}),Zua=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),oneOf:t7(Q({const:Z(),title:Z()})),default:Z().optional()}),Qua=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),enum:t7(Z()),enumNames:t7(Z()).optional(),default:Z().optional()}),$ua=r7([Xua,Zua]),eda=Q({type:$(`array`),title:Z().optional(),description:Z().optional(),minItems:J5().optional(),maxItems:J5().optional(),items:Q({type:$(`string`),enum:t7(Z())}),default:t7(Z()).optional()}),tda=Q({type:$(`array`),title:Z().optional(),description:Z().optional(),minItems:J5().optional(),maxItems:J5().optional(),items:Q({anyOf:t7(Q({const:Z(),title:Z()}))}),default:t7(Z()).optional()}),nda=r7([eda,tda]),rda=r7([Qua,$ua,nda]),ida=r7([rda,Yua,v9,y9]),b9=K7.extend({mode:$(`form`).optional(),message:Z(),requestedSchema:Q({type:$(`object`),properties:o7(Z(),ida),required:t7(Z()).optional()}).catchall($5())}),ada=K7.extend({mode:$(`url`),message:Z(),elicitationId:Z(),url:Z().url()}),oda=r7([b9,ada]),sda=q7.extend({method:$(`elicitation/create`),params:oda}),cda=J7.extend({elicitationId:Z()}),lda=Y7.extend({method:$(`notifications/elicitation/complete`),params:cda}),uda=X7.extend({action:s7([`accept`,`decline`,`cancel`]),content:u7(e=>e===null?void 0:e,o7(Z(),r7([Z(),J5(),Y5(),t7(Z())])).optional())}),dda=Q({type:$(`ref/resource`),uri:Z()}),fda=Q({type:$(`ref/prompt`),name:Z()}),pda=G7.extend({ref:r7([fda,dda]),argument:Q({name:Z(),value:Z()}),context:Q({arguments:o7(Z(),Z()).optional()}).optional()}),mda=q7.extend({method:$(`completion/complete`),params:pda}),hda=X7.extend({completion:n7({values:t7(Z()).max(100),total:c7(J5().int()),hasMore:c7(Y5())})}),gda=Q({uri:Z().startsWith(`file://`),name:Z().optional(),_meta:o7(Z(),$5()).optional()}),_da=q7.extend({method:$(`roots/list`),params:G7.optional()}),vda=X7.extend({roots:t7(gda)}),yda=Y7.extend({method:$(`notifications/roots/list_changed`),params:J7.optional()}),bda=n7({ttl:J5().optional(),pollInterval:J5().optional()}),xda=s7([`working`,`input_required`,`completed`,`failed`,`cancelled`]),x9=Q({taskId:Z(),status:xda,ttl:r7([J5(),Z5()]),createdAt:Z(),lastUpdatedAt:Z(),pollInterval:c7(J5()),statusMessage:c7(Z())}),Sda=X7.extend({task:x9}),Cda=J7.merge(x9),wda=Y7.extend({method:$(`notifications/tasks/status`),params:Cda}),Tda=q7.extend({method:$(`tasks/get`),params:G7.extend({taskId:Z()})}),Eda=X7.merge(x9),Dda=q7.extend({method:$(`tasks/result`),params:G7.extend({taskId:Z()})}),Oda=X7.loose(),kda=i9.extend({method:$(`tasks/list`)}),Ada=a9.extend({tasks:t7(x9)}),jda=q7.extend({method:$(`tasks/cancel`),params:G7.extend({taskId:Z()})}),Mda=X7.merge(x9),Nda=r7([Lla,jla,Fla,mda,Iua,bua,_ua,Jla,Xla,$la,rua,aua,cua,jua,Dua]),Pda=r7([Cla,Bla,Pla,yda]),Fda=r7([e9,qua,Jua,uda,vda]),Ida=r7([Lla,Kua,sda,_da]),Lda=r7([Cla,Bla,Rua,mua,tua,Mua,wua,uua,lda]),Rda=r7([e9,Nla,Ila,hda,Cua,vua,Yla,Zla,eua,g9,Oua,fua]),S9=una().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Cra.custom,message:`URL must be parseable`,fatal:!0}),j6i}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),zda=n7({resource:Z().url(),authorization_servers:t7(S9).optional(),jwks_uri:Z().url().optional(),scopes_supported:t7(Z()).optional(),bearer_methods_supported:t7(Z()).optional(),resource_signing_alg_values_supported:t7(Z()).optional(),resource_name:Z().optional(),resource_documentation:Z().optional(),resource_policy_uri:Z().url().optional(),resource_tos_uri:Z().url().optional(),tls_client_certificate_bound_access_tokens:Y5().optional(),authorization_details_types_supported:t7(Z()).optional(),dpop_signing_alg_values_supported:t7(Z()).optional(),dpop_bound_access_tokens_required:Y5().optional()}),Bda=n7({issuer:Z(),authorization_endpoint:S9,token_endpoint:S9,registration_endpoint:S9.optional(),scopes_supported:t7(Z()).optional(),response_types_supported:t7(Z()),response_modes_supported:t7(Z()).optional(),grant_types_supported:t7(Z()).optional(),token_endpoint_auth_methods_supported:t7(Z()).optional(),token_endpoint_auth_signing_alg_values_supported:t7(Z()).optional(),service_documentation:S9.optional(),revocation_endpoint:S9.optional(),revocation_endpoint_auth_methods_supported:t7(Z()).optional(),revocation_endpoint_auth_signing_alg_values_supported:t7(Z()).optional(),introspection_endpoint:Z().optional(),introspection_endpoint_auth_methods_supported:t7(Z()).optional(),introspection_endpoint_auth_signing_alg_values_supported:t7(Z()).optional(),code_challenge_methods_supported:t7(Z()).optional(),client_id_metadata_document_supported:Y5().optional(),authorization_response_iss_parameter_supported:Y5().optional().catch(void 0),dpop_signing_alg_values_supported:t7(Z()).optional()}),Vda=n7({issuer:Z(),authorization_endpoint:S9,token_endpoint:S9,userinfo_endpoint:S9.optional(),jwks_uri:S9,registration_endpoint:S9.optional(),scopes_supported:t7(Z()).optional(),response_types_supported:t7(Z()),response_modes_supported:t7(Z()).optional(),grant_types_supported:t7(Z()).optional(),acr_values_supported:t7(Z()).optional(),subject_types_supported:t7(Z()),id_token_signing_alg_values_supported:t7(Z()),id_token_encryption_alg_values_supported:t7(Z()).optional(),id_token_encryption_enc_values_supported:t7(Z()).optional(),userinfo_signing_alg_values_supported:t7(Z()).optional(),userinfo_encryption_alg_values_supported:t7(Z()).optional(),userinfo_encryption_enc_values_supported:t7(Z()).optional(),request_object_signing_alg_values_supported:t7(Z()).optional(),request_object_encryption_alg_values_supported:t7(Z()).optional(),request_object_encryption_enc_values_supported:t7(Z()).optional(),token_endpoint_auth_methods_supported:t7(Z()).optional(),token_endpoint_auth_signing_alg_values_supported:t7(Z()).optional(),display_values_supported:t7(Z()).optional(),claim_types_supported:t7(Z()).optional(),claims_supported:t7(Z()).optional(),service_documentation:Z().optional(),claims_locales_supported:t7(Z()).optional(),ui_locales_supported:t7(Z()).optional(),claims_parameter_supported:Y5().optional(),request_parameter_supported:Y5().optional(),request_uri_parameter_supported:Y5().optional(),require_request_uri_registration:Y5().optional(),op_policy_uri:S9.optional(),op_tos_uri:S9.optional(),client_id_metadata_document_supported:Y5().optional(),authorization_response_iss_parameter_supported:Y5().optional().catch(void 0)}),Hda=Q({...Vda.shape,...Bda.pick({code_challenge_methods_supported:!0}).shape}),Uda=Q({access_token:Z(),id_token:Z().optional(),token_type:Z(),expires_in:kra().optional(),scope:Z().optional(),refresh_token:Z().optional(),issuer:Z().optional().catch(void 0)}).strip(),Wda=Q({issued_token_type:$(`urn:ietf:params:oauth:token-type:id-jag`),access_token:Z(),token_type:Z().optional(),expires_in:J5().optional(),scope:Z().optional()}).strip(),Gda=Q({error:Z(),error_description:Z().optional(),error_uri:Z().optional()}),Kda=S9.optional().or($(``).transform(()=>void 0)),qda=Q({redirect_uris:t7(S9),token_endpoint_auth_method:Z().optional(),grant_types:t7(Z()).optional(),response_types:t7(Z()).optional(),application_type:Z().optional(),client_name:Z().optional(),client_uri:S9.optional(),logo_uri:Kda,scope:Z().optional(),contacts:t7(Z()).optional(),tos_uri:Kda,policy_uri:Z().optional(),jwks_uri:S9.optional(),jwks:Q5().optional(),software_id:Z().optional(),software_version:Z().optional(),software_statement:Z().optional()}).strip(),Jda=Q({client_id:Z(),client_secret:Z().optional(),client_id_issued_at:J5().optional(),client_secret_expires_at:J5().optional(),issuer:Z().optional().catch(void 0)}).strip(),Yda=qda.merge(Jda),Xda=Q({error:Z(),error_description:Z().optional()}).strip(),Zda=Q({token:Z(),token_type_hint:Z().optional()}).strip()})),$da=o((()=>{Qda()}));function C9(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Mpa,{value:n,enumerable:!1,configurable:!0})}function w9(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Mpa)){let n=t[Mpa];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}function efa(e){return e>=Npa}function tfa(e){var t;let n=e.structuredContent;return n===void 0||typeof n==`object`&&n&&!Array.isArray(n)||(((t=e.content)==null?void 0:t.some(e=>e.type===`text`))??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(n)}]}}function nfa(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Ppa.some(t=>t in e)?e:{...e,content:[]}}function rfa(){let e=l7(()=>r7([Z(),J5(),Y5(),Z5(),o7(Z(),e),t7(e)])),t=o7(Z(),e),n=r7([Z(),J5().int()]),r=Z(),i=Q({ttl:J5().optional()}),a=Q({taskId:Z()}),o=n7({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=Q({_meta:o.optional()}),l=s.extend({task:i.optional()}),u=Q({method:Z(),params:s.loose().optional()}),d=Q({_meta:o.optional()}),f=Q({method:Z(),params:d.loose().optional()}),p=n7({_meta:o.optional()}),m=r7([Z(),J5().int()]),h=p.strict(),g=d.extend({requestId:m.optional(),reason:Z().optional()}),_=f.extend({method:$(`notifications/cancelled`),params:g}),v=Q({src:Z(),mimeType:Z().optional(),sizes:t7(Z()).optional(),theme:s7([`light`,`dark`]).optional()}),y=Q({icons:t7(v).optional()}),b=Q({name:Z(),title:Z().optional()}),x=b.extend({...b.shape,...y.shape,version:Z(),websiteUrl:Z().optional(),description:Z().optional()}),S=u7(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,a7(Q({form:a7(Q({applyDefaults:Y5().optional()}),t).optional(),url:t.optional()}),t.optional())),C=n7({list:t.optional(),cancel:t.optional(),requests:n7({sampling:n7({createMessage:t.optional()}).optional(),elicitation:n7({create:t.optional()}).optional()}).optional()}),w=n7({list:t.optional(),cancel:t.optional(),requests:n7({tools:n7({call:t.optional()}).optional()}).optional()}),T=Q({experimental:o7(Z(),t).optional(),sampling:Q({context:t.optional(),tools:t.optional()}).optional(),elicitation:S.optional(),roots:Q({listChanged:Y5().optional()}).optional(),tasks:C.optional(),extensions:o7(Z(),t).optional()}),E=s.extend({protocolVersion:Z(),capabilities:T,clientInfo:x}),D=u.extend({method:$(`initialize`),params:E}),O=Q({experimental:o7(Z(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:Q({listChanged:Y5().optional()}).optional(),resources:Q({subscribe:Y5().optional(),listChanged:Y5().optional()}).optional(),tools:Q({listChanged:Y5().optional()}).optional(),tasks:w.optional(),extensions:o7(Z(),t).optional()}),k=p.extend({protocolVersion:Z(),capabilities:O,serverInfo:x,instructions:Z().optional()}),A=f.extend({method:$(`notifications/initialized`),params:d.optional()}),j=u.extend({method:$(`ping`),params:s.optional()}),M=Q({progress:J5(),total:c7(J5()),message:c7(Z())}),N=Q({...d.shape,...M.shape,progressToken:n}),P=f.extend({method:$(`notifications/progress`),params:N}),F=s.extend({cursor:r.optional()}),I=u.extend({params:F.optional()}),L=p.extend({nextCursor:r.optional()}),R=Q({uri:Z(),mimeType:c7(Z()),_meta:o7(Z(),$5()).optional()}),ee=R.extend({text:Z()}),te=Z().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ne=R.extend({blob:te}),z=s7([`user`,`assistant`]),re=Q({audience:t7(z).optional(),priority:J5().min(0).max(1).optional(),lastModified:Era({offset:!0}).optional()}),ie=Q({...b.shape,...y.shape,uri:Z(),description:c7(Z()),mimeType:c7(Z()),size:c7(J5()),annotations:re.optional(),_meta:c7(n7({}))}),ae=Q({...b.shape,...y.shape,uriTemplate:Z(),description:c7(Z()),mimeType:c7(Z()),annotations:re.optional(),_meta:c7(n7({}))}),oe=I.extend({method:$(`resources/list`)}),se=L.extend({resources:t7(ie)}),ce=I.extend({method:$(`resources/templates/list`)}),le=L.extend({resourceTemplates:t7(ae)}),ue=s.extend({uri:Z()}),de=ue,fe=u.extend({method:$(`resources/read`),params:de}),pe=p.extend({contents:t7(r7([ee,ne]))}),me=f.extend({method:$(`notifications/resources/list_changed`),params:d.optional()}),he=ue,ge=u.extend({method:$(`resources/subscribe`),params:he}),_e=ue,ve=u.extend({method:$(`resources/unsubscribe`),params:_e}),ye=d.extend({uri:Z()}),be=f.extend({method:$(`notifications/resources/updated`),params:ye}),xe=Q({name:Z(),description:c7(Z()),required:c7(Y5())}),Se=Q({...b.shape,...y.shape,description:c7(Z()),arguments:c7(t7(xe)),_meta:c7(n7({}))}),Ce=I.extend({method:$(`prompts/list`)}),we=L.extend({prompts:t7(Se)}),Te=s.extend({name:Z(),arguments:o7(Z(),Z()).optional()}),Ee=u.extend({method:$(`prompts/get`),params:Te}),De=Q({type:$(`text`),text:Z(),annotations:re.optional(),_meta:o7(Z(),$5()).optional()}),Oe=Q({type:$(`image`),data:te,mimeType:Z(),annotations:re.optional(),_meta:o7(Z(),$5()).optional()}),B=Q({type:$(`audio`),data:te,mimeType:Z(),annotations:re.optional(),_meta:o7(Z(),$5()).optional()}),ke=Q({type:$(`tool_use`),name:Z(),id:Z(),input:o7(Z(),$5()),_meta:o7(Z(),$5()).optional()}),Ae=Q({type:$(`resource`),resource:r7([ee,ne]),annotations:re.optional(),_meta:o7(Z(),$5()).optional()}),je=ie.extend({type:$(`resource_link`)}),Me=r7([De,Oe,B,je,Ae]),Ne=Q({role:z,content:Me}),Pe=p.extend({description:Z().optional(),messages:t7(Ne)}),Fe=f.extend({method:$(`notifications/prompts/list_changed`),params:d.optional()}),Ie=Q({title:Z().optional(),readOnlyHint:Y5().optional(),destructiveHint:Y5().optional(),idempotentHint:Y5().optional(),openWorldHint:Y5().optional()}),Le=Q({taskSupport:s7([`required`,`optional`,`forbidden`]).optional()}),Re=Q({...b.shape,...y.shape,description:Z().optional(),inputSchema:Q({type:$(`object`),properties:o7(Z(),e).optional(),required:t7(Z()).optional()}).catchall($5()),outputSchema:Q({type:$(`object`),properties:o7(Z(),e).optional(),required:t7(Z()).optional()}).catchall($5()).optional(),annotations:Ie.optional(),execution:Le.optional(),_meta:o7(Z(),$5()).optional()}),ze=I.extend({method:$(`tools/list`)}),Be=L.extend({tools:t7(Re)}),Ve=p.extend({content:t7(Me),structuredContent:o7(Z(),$5()).optional(),isError:Y5().optional()}),He=l.extend({name:Z(),arguments:o7(Z(),$5()).optional()}),Ue=u.extend({method:$(`tools/call`),params:He}),We=f.extend({method:$(`notifications/tools/list_changed`),params:d.optional()}),Ge=s7([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Ke=s.extend({level:Ge}),qe=u.extend({method:$(`logging/setLevel`),params:Ke}),Je=d.extend({level:Ge,logger:Z().optional(),data:$5()}),Ye=f.extend({method:$(`notifications/message`),params:Je}),Xe=Q({name:Z().optional()}),Ze=Q({hints:t7(Xe).optional(),costPriority:J5().min(0).max(1).optional(),speedPriority:J5().min(0).max(1).optional(),intelligencePriority:J5().min(0).max(1).optional()}),Qe=Q({mode:s7([`auto`,`required`,`none`]).optional()}),$e=Q({type:$(`tool_result`),toolUseId:Z().describe(`The unique identifier for the corresponding tool call.`),content:t7(Me),structuredContent:Q({}).loose().optional(),isError:Y5().optional(),_meta:o7(Z(),$5()).optional()}),et=i7(`type`,[De,Oe,B]),tt=i7(`type`,[De,Oe,B,ke,$e]),nt=Q({role:z,content:r7([tt,t7(tt)]),_meta:o7(Z(),$5()).optional()}),rt=l.extend({messages:t7(nt),modelPreferences:Ze.optional(),systemPrompt:Z().optional(),includeContext:s7([`none`,`thisServer`,`allServers`]).optional(),temperature:J5().optional(),maxTokens:J5().int(),stopSequences:t7(Z()).optional(),metadata:t.optional(),tools:t7(Re).optional(),toolChoice:Qe.optional()}),it=u.extend({method:$(`sampling/createMessage`),params:rt}),at=p.extend({model:Z(),stopReason:c7(s7([`endTurn`,`stopSequence`,`maxTokens`]).or(Z())),role:z,content:et}),ot=p.extend({model:Z(),stopReason:c7(s7([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(Z())),role:z,content:r7([tt,t7(tt)])}),st=Q({type:$(`boolean`),title:Z().optional(),description:Z().optional(),default:Y5().optional()}),ct=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),minLength:J5().optional(),maxLength:J5().optional(),format:s7([`email`,`uri`,`date`,`date-time`]).optional(),default:Z().optional()}),lt=Q({type:s7([`number`,`integer`]),title:Z().optional(),description:Z().optional(),minimum:J5().optional(),maximum:J5().optional(),default:J5().optional()}),ut=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),enum:t7(Z()),default:Z().optional()}),dt=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),oneOf:t7(Q({const:Z(),title:Z()})),default:Z().optional()}),ft=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),enum:t7(Z()),enumNames:t7(Z()).optional(),default:Z().optional()}),pt=r7([ut,dt]),mt=Q({type:$(`array`),title:Z().optional(),description:Z().optional(),minItems:J5().optional(),maxItems:J5().optional(),items:Q({type:$(`string`),enum:t7(Z())}),default:t7(Z()).optional()}),ht=Q({type:$(`array`),title:Z().optional(),description:Z().optional(),minItems:J5().optional(),maxItems:J5().optional(),items:Q({anyOf:t7(Q({const:Z(),title:Z()}))}),default:t7(Z()).optional()}),gt=r7([mt,ht]),_t=r7([ft,pt,gt]),vt=r7([_t,st,ct,lt]),yt=l.extend({mode:$(`form`).optional(),message:Z(),requestedSchema:Q({type:$(`object`),properties:o7(Z(),vt),required:t7(Z()).optional()}).catchall($5())}),bt=l.extend({mode:$(`url`),message:Z(),elicitationId:Z(),url:Z().url()}),xt=r7([yt,bt]),St=u.extend({method:$(`elicitation/create`),params:xt}),Ct=d.extend({elicitationId:Z()}),wt=f.extend({method:$(`notifications/elicitation/complete`),params:Ct}),Tt=p.extend({action:s7([`accept`,`decline`,`cancel`]),content:u7(e=>e===null?void 0:e,o7(Z(),r7([Z(),J5(),Y5(),t7(Z())])).optional())}),Et=Q({type:$(`ref/resource`),uri:Z()}),Dt=Q({type:$(`ref/prompt`),name:Z()}),Ot=s.extend({ref:r7([Dt,Et]),argument:Q({name:Z(),value:Z()}),context:Q({arguments:o7(Z(),Z()).optional()}).optional()}),kt=u.extend({method:$(`completion/complete`),params:Ot}),At=p.extend({completion:n7({values:t7(Z()).max(100),total:c7(J5().int()),hasMore:c7(Y5())})}),jt=Q({uri:Z().startsWith(`file://`),name:Z().optional(),_meta:o7(Z(),$5()).optional()}),Mt=u.extend({method:$(`roots/list`),params:s.optional()}),Nt=p.extend({roots:t7(jt)}),Pt=f.extend({method:$(`notifications/roots/list_changed`),params:d.optional()}),Ft=n7({ttl:J5().optional(),pollInterval:J5().optional()}),It=s7([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Lt=Q({taskId:Z(),status:It,ttl:r7([J5(),Z5()]),createdAt:Z(),lastUpdatedAt:Z(),pollInterval:c7(J5()),statusMessage:c7(Z())}),Rt=p.extend({task:Lt}),zt=d.merge(Lt),Bt=f.extend({method:$(`notifications/tasks/status`),params:zt}),Vt=u.extend({method:$(`tasks/get`),params:s.extend({taskId:Z()})}),Ht=p.merge(Lt),Ut=u.extend({method:$(`tasks/result`),params:s.extend({taskId:Z()})}),Wt=p.loose(),Gt=I.extend({method:$(`tasks/list`)}),Kt=L.extend({tasks:t7(Lt)}),qt=u.extend({method:$(`tasks/cancel`),params:s.extend({taskId:Z()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:l,RequestSchema:u,NotificationsParamsSchema:d,NotificationSchema:f,ResultSchema:p,RequestIdSchema:m,EmptyResultSchema:h,CancelledNotificationParamsSchema:g,CancelledNotificationSchema:_,IconSchema:v,IconsSchema:y,BaseMetadataSchema:b,ImplementationSchema:x,ClientTasksCapabilitySchema:C,ServerTasksCapabilitySchema:w,ClientCapabilitiesSchema:T,InitializeRequestParamsSchema:E,InitializeRequestSchema:D,ServerCapabilitiesSchema:O,InitializeResultSchema:k,InitializedNotificationSchema:A,PingRequestSchema:j,ProgressSchema:M,ProgressNotificationParamsSchema:N,ProgressNotificationSchema:P,PaginatedRequestParamsSchema:F,PaginatedRequestSchema:I,PaginatedResultSchema:L,ResourceContentsSchema:R,TextResourceContentsSchema:ee,BlobResourceContentsSchema:ne,RoleSchema:z,AnnotationsSchema:re,ResourceSchema:ie,ResourceTemplateSchema:ae,ListResourcesRequestSchema:oe,ListResourcesResultSchema:se,ListResourceTemplatesRequestSchema:ce,ListResourceTemplatesResultSchema:le,ResourceRequestParamsSchema:ue,ReadResourceRequestParamsSchema:de,ReadResourceRequestSchema:fe,ReadResourceResultSchema:pe,ResourceListChangedNotificationSchema:me,SubscribeRequestParamsSchema:he,SubscribeRequestSchema:ge,UnsubscribeRequestParamsSchema:_e,UnsubscribeRequestSchema:ve,ResourceUpdatedNotificationParamsSchema:ye,ResourceUpdatedNotificationSchema:be,PromptArgumentSchema:xe,PromptSchema:Se,ListPromptsRequestSchema:Ce,ListPromptsResultSchema:we,GetPromptRequestParamsSchema:Te,GetPromptRequestSchema:Ee,TextContentSchema:De,ImageContentSchema:Oe,AudioContentSchema:B,ToolUseContentSchema:ke,EmbeddedResourceSchema:Ae,ResourceLinkSchema:je,ContentBlockSchema:Me,PromptMessageSchema:Ne,GetPromptResultSchema:Pe,PromptListChangedNotificationSchema:Fe,ToolAnnotationsSchema:Ie,ToolExecutionSchema:Le,ToolSchema:Re,ListToolsRequestSchema:ze,ListToolsResultSchema:Be,CallToolResultSchema:Ve,CallToolRequestParamsSchema:He,CallToolRequestSchema:Ue,ToolListChangedNotificationSchema:We,LoggingLevelSchema:Ge,SetLevelRequestParamsSchema:Ke,SetLevelRequestSchema:qe,LoggingMessageNotificationParamsSchema:Je,LoggingMessageNotificationSchema:Ye,ModelHintSchema:Xe,ModelPreferencesSchema:Ze,ToolChoiceSchema:Qe,ToolResultContentSchema:$e,SamplingContentSchema:et,SamplingMessageContentBlockSchema:tt,SamplingMessageSchema:nt,CreateMessageRequestParamsSchema:rt,CreateMessageRequestSchema:it,CreateMessageResultSchema:at,CreateMessageResultWithToolsSchema:ot,BooleanSchemaSchema:st,StringSchemaSchema:ct,NumberSchemaSchema:lt,UntitledSingleSelectEnumSchemaSchema:ut,TitledSingleSelectEnumSchemaSchema:dt,LegacyTitledEnumSchemaSchema:ft,SingleSelectEnumSchemaSchema:pt,UntitledMultiSelectEnumSchemaSchema:mt,TitledMultiSelectEnumSchemaSchema:ht,MultiSelectEnumSchemaSchema:gt,EnumSchemaSchema:_t,PrimitiveSchemaDefinitionSchema:vt,ElicitRequestFormParamsSchema:yt,ElicitRequestURLParamsSchema:bt,ElicitRequestParamsSchema:xt,ElicitRequestSchema:St,ElicitationCompleteNotificationParamsSchema:Ct,ElicitationCompleteNotificationSchema:wt,ElicitResultSchema:Tt,ResourceTemplateReferenceSchema:Et,PromptReferenceSchema:Dt,CompleteRequestParamsSchema:Ot,CompleteRequestSchema:kt,CompleteResultSchema:At,RootSchema:jt,ListRootsRequestSchema:Mt,ListRootsResultSchema:Nt,RootsListChangedNotificationSchema:Pt,TaskCreationParamsSchema:Ft,TaskStatusSchema:It,TaskSchema:Lt,CreateTaskResultSchema:Rt,TaskStatusNotificationParamsSchema:zt,TaskStatusNotificationSchema:Bt,GetTaskRequestSchema:Vt,GetTaskResultSchema:Ht,GetTaskPayloadRequestSchema:Ut,GetTaskPayloadResultSchema:Wt,ListTasksRequestSchema:Gt,ListTasksResultSchema:Kt,CancelTaskRequestSchema:qt,CancelTaskResultSchema:p.merge(Lt),ClientRequestSchema:r7([j,D,kt,qe,Ee,Ce,oe,ce,fe,ge,ve,Ue,ze,Vt,Ut,Gt,qt]),ClientNotificationSchema:r7([_,P,A,Pt,Bt]),ClientResultSchema:r7([h,at,ot,Tt,Nt,Ht,Kt,Rt]),ServerRequestSchema:r7([j,it,St,Mt,Vt,Ut,Gt,qt]),ServerNotificationSchema:r7([_,P,Ye,be,me,We,Fe,Bt,wt]),ServerResultSchema:r7([h,k,At,Pe,we,se,le,pe,Ve,Be,Ht,Kt,Rt]),CallToolResultWireSchema:$5().superRefine((e,t)=>{if(typeof e==`object`&&e&&!Array.isArray(e)&&e.content===void 0){for(let n of Ppa)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(nfa).pipe(Ve)}}function ifa(){return Fpa??(Fpa=rfa())}function afa(e){return e.type!==`object`}function ofa(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function sfa(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(ofa(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=ela(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&ofa(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:i[o]=Ipa.has(o)?s:Lpa.has(o)?r(s,!0):r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}function cfa(){if(Vpa)return Vpa;let e=ifa();return Vpa={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Vpa}function lfa(e){return Object.prototype.hasOwnProperty.call(Rpa,e)}function ufa(e){return Object.prototype.hasOwnProperty.call(zpa,e)}function dfa(e){return Object.prototype.hasOwnProperty.call(Bpa,e)}function ffa(e){return dfa(e)?cfa().resultSchemas[e]:void 0}function pfa(e){return lfa(e)?cfa().requestSchemas[e]:void 0}function mfa(e){return ufa(e)?cfa().notificationSchemas[e]:void 0}function hfa(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function gfa(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}function _fa(e){return hfa(e)&&hfa(e.outputSchema)&&afa(e.outputSchema)}function vfa(e){return e}function yfa(){let e=l7(()=>r7([Z(),J5(),Y5(),Z5(),o7(Z(),e),t7(e)])),t=o7(Z(),e),n=r7([Z(),J5().int()]),r=Z(),i=r7([Z(),J5().int()]),a=s7([`user`,`assistant`]),o=s7([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=Z().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),l=Q({ttl:J5().optional()}),u=Q({taskId:Z()}),d=n7({progressToken:n.optional(),"io.modelcontextprotocol/related-task":u.optional()}),f=Q({_meta:d.optional()}),p=f.extend({task:l.optional()}),m=Q({_meta:d.optional()}),h=Q({method:Z(),params:m.loose().optional()}),g=Q({src:Z(),mimeType:Z().optional(),sizes:t7(Z()).optional(),theme:s7([`light`,`dark`]).optional()}),_=Q({icons:t7(g).optional()}),v=Q({name:Z(),title:Z().optional()}),y=v.extend({...v.shape,..._.shape,version:Z(),websiteUrl:Z().optional(),description:Z().optional()}),b=u7(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,a7(Q({form:a7(Q({applyDefaults:Y5().optional()}),t).optional(),url:t.optional()}),t.optional())),x=n7({list:t.optional(),cancel:t.optional(),requests:n7({sampling:n7({createMessage:t.optional()}).optional(),elicitation:n7({create:t.optional()}).optional()}).optional()}),S=n7({list:t.optional(),cancel:t.optional(),requests:n7({tools:n7({call:t.optional()}).optional()}).optional()}),C=Q({experimental:o7(Z(),t).optional(),sampling:Q({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:Q({listChanged:Y5().optional()}).optional(),tasks:x.optional(),extensions:o7(Z(),t).optional()}),w=Q({experimental:o7(Z(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:Q({listChanged:Y5().optional()}).optional(),resources:Q({subscribe:Y5().optional(),listChanged:Y5().optional()}).optional(),tools:Q({listChanged:Y5().optional()}).optional(),tasks:S.optional(),extensions:o7(Z(),t).optional()}),T=Q({progress:J5(),total:c7(J5()),message:c7(Z())}),E=Q({...m.shape,...T.shape,progressToken:n}),D=h.extend({method:$(`notifications/progress`),params:E}),O=m.extend({level:o,logger:Z().optional(),data:$5()}),k=h.extend({method:$(`notifications/message`),params:O}),A=Q({uri:Z(),mimeType:c7(Z()),_meta:o7(Z(),$5()).optional()}),j=A.extend({text:Z()}),M=A.extend({blob:s}),N=Q({audience:t7(a).optional(),priority:J5().min(0).max(1).optional(),lastModified:Era({offset:!0}).optional()}),P=Q({...v.shape,..._.shape,uri:Z(),description:c7(Z()),mimeType:c7(Z()),size:c7(J5()),annotations:N.optional(),_meta:c7(n7({}))}),F=Q({...v.shape,..._.shape,uriTemplate:Z(),description:c7(Z()),mimeType:c7(Z()),annotations:N.optional(),_meta:c7(n7({}))}),I=h.extend({method:$(`notifications/resources/list_changed`),params:m.optional()}),L=m.extend({uri:Z()}),R=h.extend({method:$(`notifications/resources/updated`),params:L}),ee=Q({name:Z(),description:c7(Z()),required:c7(Y5())}),te=Q({...v.shape,..._.shape,description:c7(Z()),arguments:c7(t7(ee)),_meta:c7(n7({}))}),ne=h.extend({method:$(`notifications/prompts/list_changed`),params:m.optional()}),z=Q({type:$(`text`),text:Z(),annotations:N.optional(),_meta:o7(Z(),$5()).optional()}),re=Q({type:$(`image`),data:s,mimeType:Z(),annotations:N.optional(),_meta:o7(Z(),$5()).optional()}),ie=Q({type:$(`audio`),data:s,mimeType:Z(),annotations:N.optional(),_meta:o7(Z(),$5()).optional()}),ae=Q({type:$(`tool_use`),name:Z(),id:Z(),input:o7(Z(),$5()),_meta:o7(Z(),$5()).optional()}),oe=Q({type:$(`resource`),resource:r7([j,M]),annotations:N.optional(),_meta:o7(Z(),$5()).optional()}),se=P.extend({type:$(`resource_link`)}),ce=r7([z,re,ie,se,oe]),le=Q({role:a,content:ce}),ue=Q({title:Z().optional(),readOnlyHint:Y5().optional(),destructiveHint:Y5().optional(),idempotentHint:Y5().optional(),openWorldHint:Y5().optional()}),de=h.extend({method:$(`notifications/tools/list_changed`),params:m.optional()}),fe=Q({name:Z().optional()}),pe=Q({hints:t7(fe).optional(),costPriority:J5().min(0).max(1).optional(),speedPriority:J5().min(0).max(1).optional(),intelligencePriority:J5().min(0).max(1).optional()}),me=Q({mode:s7([`auto`,`required`,`none`]).optional()}),he=Q({type:$(`boolean`),title:Z().optional(),description:Z().optional(),default:Y5().optional()}),ge=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),minLength:J5().optional(),maxLength:J5().optional(),format:s7([`email`,`uri`,`date`,`date-time`]).optional(),default:Z().optional()}),_e=Q({type:s7([`number`,`integer`]),title:Z().optional(),description:Z().optional(),minimum:J5().optional(),maximum:J5().optional(),default:J5().optional()}),ve=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),enum:t7(Z()),default:Z().optional()}),ye=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),oneOf:t7(Q({const:Z(),title:Z()})),default:Z().optional()}),be=Q({type:$(`string`),title:Z().optional(),description:Z().optional(),enum:t7(Z()),enumNames:t7(Z()).optional(),default:Z().optional()}),xe=r7([ve,ye]),Se=Q({type:$(`array`),title:Z().optional(),description:Z().optional(),minItems:J5().optional(),maxItems:J5().optional(),items:Q({type:$(`string`),enum:t7(Z())}),default:t7(Z()).optional()}),Ce=Q({type:$(`array`),title:Z().optional(),description:Z().optional(),minItems:J5().optional(),maxItems:J5().optional(),items:Q({anyOf:t7(Q({const:Z(),title:Z()}))}),default:t7(Z()).optional()}),we=r7([Se,Ce]),Te=r7([be,xe,we]),Ee=r7([Te,he,ge,_e]),De=p.extend({mode:$(`form`).optional(),message:Z(),requestedSchema:Q({type:$(`object`),properties:o7(Z(),Ee),required:t7(Z()).optional()}).catchall($5())}),Oe=Q({type:$(`ref/resource`),uri:Z()}),B=Q({type:$(`ref/prompt`),name:Z()}),ke=Q({uri:Z().startsWith(`file://`),name:Z().optional(),_meta:o7(Z(),$5()).optional()}),Ae=C.shape,je=Q({experimental:Ae.experimental,sampling:Ae.sampling,elicitation:Ae.elicitation,roots:Ae.roots,extensions:Ae.extensions}),Me=w.shape,Ne=Q({experimental:Me.experimental,logging:Me.logging,completions:Me.completions,prompts:Me.prompts,resources:Me.resources,tools:Me.tools,extensions:Me.extensions}),Pe=n7({progressToken:n.optional(),[B7]:Z(),[cla]:y.optional(),[H7]:je,[ula]:o.optional()}),Fe=Q({...v.shape,..._.shape,description:Z().optional(),inputSchema:n7({$schema:Z().optional(),type:$(`object`)}),outputSchema:n7({$schema:Z().optional()}).optional(),annotations:ue.optional(),_meta:o7(Z(),$5()).optional()}),Ie=Q({type:$(`tool_result`),toolUseId:Z(),content:t7(ce),structuredContent:$5().optional(),isError:Y5().optional(),_meta:o7(Z(),$5()).optional()}),Le=r7([z,re,ie,ae,Ie]),Re=Q({role:a,content:r7([Le,t7(Le)]),_meta:o7(Z(),$5()).optional()}),ze=Z(),Be=n7({[V7]:y.optional().catch(void 0)}),Ve=Be.optional();function He(e){return n7({_meta:Ve,resultType:ze.default(`complete`),...e})}let Ue=He({}),We=He({nextCursor:r.optional()}),Ge=He({content:t7(ce),structuredContent:$5().optional(),isError:Y5().optional()}),Ke=He({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),tools:t7(Fe),nextCursor:r.optional()}),qe=He({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),prompts:t7(te),nextCursor:r.optional()}),Je=He({description:Z().optional(),messages:t7(le)}),Ye=He({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),resources:t7(P),nextCursor:r.optional()}),Xe=He({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),resourceTemplates:t7(F),nextCursor:r.optional()}),Ze=He({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),contents:t7(r7([j,M]))}),Qe=He({completion:Q({values:t7(Z()).max(100),total:J5().int().optional(),hasMore:Y5().optional()}).loose()}),$e=He({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`])}),et=He({ttlMs:J5().int().min(0).catch(0),cacheScope:s7([`public`,`private`]).catch(`private`),supportedVersions:t7(Z()),capabilities:Ne,instructions:Z().optional()}),tt=Q({messages:t7(Re),modelPreferences:pe.optional(),systemPrompt:Z().optional(),includeContext:s7([`none`,`thisServer`,`allServers`]).optional(),temperature:J5().optional(),maxTokens:J5().int(),stopSequences:t7(Z()).optional(),metadata:t.optional(),tools:t7(Fe).optional(),toolChoice:me.optional()}),nt=Q({method:$(`sampling/createMessage`),params:tt}),rt=Q({method:$(`roots/list`),params:Q({_meta:o7(Z(),$5()).optional()}).optional()}),it=Q({...Re.shape,model:Z(),stopReason:Z().optional()}),at=Q({roots:t7(ke)}),ot=Q({action:s7([`accept`,`decline`,`cancel`]),content:o7(Z(),r7([Z(),J5(),Y5(),t7(Z())])).optional()}),st=Q({mode:$(`url`),message:Z(),url:Z().url()}),ct=r7([De,st]),lt=Q({method:$(`elicitation/create`),params:ct}),ut=r7([nt,rt,lt]),dt=r7([it,at,ot]),ft=o7(Z(),ut),pt=o7(Z(),dt),mt=He({inputRequests:ft.optional(),requestState:Z().optional()}),ht={inputResponses:pt.optional(),requestState:Z().optional()},gt=Q({_meta:Pe,...ht}),_t=n7({progressToken:n.optional()});function vt(e,t){return Q({method:$(e),params:Q({_meta:Pe,...t})})}function yt(e,t){return Q({method:$(e),params:Q({_meta:_t.optional(),...t}).optional()})}let bt={name:Z(),arguments:o7(Z(),$5()).optional(),...ht},xt={cursor:r.optional()},St=vt(`tools/call`,bt),Ct=vt(`tools/list`,xt),wt=vt(`prompts/list`,xt),Tt=vt(`prompts/get`,{name:Z(),arguments:o7(Z(),Z()).optional(),...ht}),Et=vt(`resources/list`,xt),Dt=vt(`resources/templates/list`,xt),Ot=vt(`resources/read`,{uri:Z(),...ht}),kt={ref:r7([B,Oe]),argument:Q({name:Z(),value:Z()}),context:Q({arguments:o7(Z(),Z()).optional()}).optional()},At=vt(`completion/complete`,kt),jt=vt(`server/discover`,{}),Mt=Q({toolsListChanged:Y5().optional(),promptsListChanged:Y5().optional(),resourcesListChanged:Y5().optional(),resourceSubscriptions:t7(Z()).optional()}),Nt={notifications:Mt},Pt=vt(`subscriptions/listen`,Nt),Ft=Be.extend({"io.modelcontextprotocol/subscriptionId":i}),It=n7({_meta:Ft,resultType:ze.default(`complete`)}),Lt={"tools/call":yt(`tools/call`,bt),"tools/list":yt(`tools/list`,xt),"prompts/get":yt(`prompts/get`,{name:Z(),arguments:o7(Z(),Z()).optional()}),"prompts/list":yt(`prompts/list`,xt),"resources/list":yt(`resources/list`,xt),"resources/templates/list":yt(`resources/templates/list`,xt),"resources/read":yt(`resources/read`,{uri:Z()}),"completion/complete":yt(`completion/complete`,kt),"server/discover":yt(`server/discover`,{}),"subscriptions/listen":yt(`subscriptions/listen`,Nt)};function Rt(e){return n7({_meta:Ve,...e})}let zt={"tools/call":Rt({content:t7(ce),structuredContent:$5().optional(),isError:Y5().optional()}),"tools/list":Rt({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),tools:t7(Fe),nextCursor:r.optional()}),"prompts/get":Rt({description:Z().optional(),messages:t7(le)}),"prompts/list":Rt({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),prompts:t7(te),nextCursor:r.optional()}),"resources/list":Rt({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),resources:t7(P),nextCursor:r.optional()}),"resources/templates/list":Rt({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),resourceTemplates:t7(F),nextCursor:r.optional()}),"resources/read":Rt({ttlMs:J5().int().min(0),cacheScope:s7([`public`,`private`]),contents:t7(r7([j,M]))}),"completion/complete":Rt({completion:Q({values:t7(Z()).max(100),total:J5().int().optional(),hasMore:Y5().optional()}).loose()}),"server/discover":Rt({ttlMs:J5().int().min(0).catch(0),cacheScope:s7([`public`,`private`]).catch(`private`),supportedVersions:t7(Z()),capabilities:Ne,instructions:Z().optional()}),"subscriptions/listen":Rt({})},Bt=n7({"io.modelcontextprotocol/subscriptionId":i.optional()}),Vt=Q({method:$(`notifications/subscriptions/acknowledged`),params:Q({_meta:Bt.optional(),notifications:Mt})}),Ht=Q({_meta:Bt.optional(),requestId:i,reason:Z().optional()}),Ut=Q({method:$(`notifications/cancelled`),params:Ht}),Wt={"notifications/cancelled":Ut,"notifications/progress":D,"notifications/message":k,"notifications/resources/updated":R,"notifications/resources/list_changed":I,"notifications/tools/list_changed":de,"notifications/prompts/list_changed":ne,"notifications/subscriptions/acknowledged":Vt},Gt=e=>Q({jsonrpc:$(`2.0`),id:r7([Z(),J5().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:l,RelatedTaskMetadataSchema:u,RequestMetaSchema:d,BaseRequestParamsSchema:f,TaskAugmentedRequestParamsSchema:p,NotificationsParamsSchema:m,NotificationSchema:h,IconSchema:g,IconsSchema:_,BaseMetadataSchema:v,ImplementationSchema:y,ClientTasksCapabilitySchema:x,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:C,ServerCapabilitiesSchema:w,ProgressSchema:T,ProgressNotificationParamsSchema:E,ProgressNotificationSchema:D,LoggingMessageNotificationParamsSchema:O,LoggingMessageNotificationSchema:k,ResourceContentsSchema:A,TextResourceContentsSchema:j,BlobResourceContentsSchema:M,AnnotationsSchema:N,ResourceSchema:P,ResourceTemplateSchema:F,ResourceListChangedNotificationSchema:I,ResourceUpdatedNotificationParamsSchema:L,ResourceUpdatedNotificationSchema:R,PromptArgumentSchema:ee,PromptSchema:te,PromptListChangedNotificationSchema:ne,TextContentSchema:z,ImageContentSchema:re,AudioContentSchema:ie,ToolUseContentSchema:ae,EmbeddedResourceSchema:oe,ResourceLinkSchema:se,ContentBlockSchema:ce,PromptMessageSchema:le,ToolAnnotationsSchema:ue,ToolListChangedNotificationSchema:de,ModelHintSchema:fe,ModelPreferencesSchema:pe,ToolChoiceSchema:me,BooleanSchemaSchema:he,StringSchemaSchema:ge,NumberSchemaSchema:_e,UntitledSingleSelectEnumSchemaSchema:ve,TitledSingleSelectEnumSchemaSchema:ye,LegacyTitledEnumSchemaSchema:be,SingleSelectEnumSchemaSchema:xe,UntitledMultiSelectEnumSchemaSchema:Se,TitledMultiSelectEnumSchemaSchema:Ce,MultiSelectEnumSchemaSchema:we,EnumSchemaSchema:Te,PrimitiveSchemaDefinitionSchema:Ee,ElicitRequestFormParamsSchema:De,ResourceTemplateReferenceSchema:Oe,PromptReferenceSchema:B,RootSchema:ke,ClientCapabilities2026Schema:je,ServerCapabilities2026Schema:Ne,RequestMetaEnvelopeSchema:Pe,ToolSchema:Fe,ToolResultContentSchema:Ie,SamplingMessageContentBlockSchema:Le,SamplingMessageSchema:Re,ResultTypeSchema:ze,ResultMetaSchema:Be,ResultSchema:Ue,PaginatedResultSchema:We,CallToolResultSchema:Ge,ListToolsResultSchema:Ke,ListPromptsResultSchema:qe,GetPromptResultSchema:Je,ListResourcesResultSchema:Ye,ListResourceTemplatesResultSchema:Xe,ReadResourceResultSchema:Ze,CompleteResultSchema:Qe,CacheableResultSchema:$e,DiscoverResultSchema:et,CreateMessageRequestParamsSchema:tt,CreateMessageRequestSchema:nt,ListRootsRequestSchema:rt,CreateMessageResultSchema:it,ListRootsResultSchema:at,ElicitResultSchema:ot,ElicitRequestURLParamsSchema:st,ElicitRequestParamsSchema:ct,ElicitRequestSchema:lt,InputRequestSchema:ut,InputResponseSchema:dt,InputRequestsSchema:ft,InputResponsesSchema:pt,InputRequiredResultSchema:mt,InputResponseRequestParamsSchema:gt,CallToolRequestSchema:St,ListToolsRequestSchema:Ct,ListPromptsRequestSchema:wt,GetPromptRequestSchema:Tt,ListResourcesRequestSchema:Et,ListResourceTemplatesRequestSchema:Dt,ReadResourceRequestSchema:Ot,CompleteRequestSchema:At,DiscoverRequestSchema:jt,SubscriptionFilterSchema:Mt,SubscriptionsListenRequestSchema:Pt,SubscriptionsListenResultMetaSchema:Ft,SubscriptionsListenResultSchema:It,dispatchRequestSchemas:Lt,dispatchResultSchemas:zt,NotificationMetaSchema:Bt,SubscriptionsAcknowledgedNotificationSchema:Vt,CancelledNotificationParamsSchema:Ht,CancelledNotificationSchema:Ut,notificationSchemas2026:Wt,JSONRPCResultResponseSchema:Gt(Ue),CallToolResultResponseSchema:Gt(r7([Ge,mt])),ListToolsResultResponseSchema:Gt(Ke),ListPromptsResultResponseSchema:Gt(qe),GetPromptResultResponseSchema:Gt(r7([Je,mt])),ListResourcesResultResponseSchema:Gt(Ye),ListResourceTemplatesResultResponseSchema:Gt(Xe),ReadResourceResultResponseSchema:Gt(r7([Ze,mt])),CompleteResultResponseSchema:Gt(Qe),DiscoverResultResponseSchema:Gt(et),SubscriptionsListenResultResponseSchema:Gt(It)}}function T9(){return Wpa??(Wpa=yfa())}function bfa(e){return Gpa.includes(e)}function xfa(e){return e[Kpa]}function Sfa(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Cfa(e){return e===`public`||e===`private`}function wfa(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||$pa.includes(e))return t;throw new N9(M9.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Tfa(e,t){let n=xfa(t);if(t.resultType!==`complete`||!bfa(e))return n===void 0?t:Afa(t);let r=t,i=Sfa(r.ttlMs)?r.ttlMs:Ofa(n),a=Cfa(r.cacheScope)?r.cacheScope:kfa(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Kpa],o}function Efa(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Dfa(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[V7]:t}}:!Efa(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[V7]:t}}}function Ofa(e){return e!==void 0&&Sfa(e.ttlMs)?e.ttlMs:Zpa}function kfa(e){return e!==void 0&&Cfa(e.cacheScope)?e.cacheScope:Qpa}function Afa(e){let t={...e};return delete t[Kpa],t}function jfa(){if(tma)return tma;let e=T9();return tma={request:{"elicitation/create":Q({method:$(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":Q({method:$(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":Q({method:$(`roots/list`),params:n7({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},tma}function Mfa(e){return ema.includes(e)}function Nfa(e){return Mfa(e)?jfa().request[e]:void 0}function Pfa(e){return Mfa(e)?jfa().response[e]:void 0}function Ffa(e){return Object.prototype.hasOwnProperty.call(nma,e)}function Ifa(e){return Object.prototype.hasOwnProperty.call(rma,e)}function Lfa(e){return Object.prototype.hasOwnProperty.call(nma,e)}function Rfa(e){return Ffa(e)?T9().dispatchRequestSchemas[e]:void 0}function zfa(e){return Lfa(e)?T9().dispatchResultSchemas[e]:void 0}function Bfa(e){return Ifa(e)?T9().notificationSchemas2026[e]:void 0}function E9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function D9(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}function Vfa(e,t){let n=t,r=!1,i=()=>(r||(n={...n},r=!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>E9(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!E9(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(E9(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}function Hfa(){if(sma)return sma;let e=T9();return sma={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},sma}function Ufa(e){return e!==void 0&&efa(e)?oma:Upa}function Wfa(e){return e.revision===void 0?e.era===`modern`?oma.era:Upa.era:Ufa(e.revision).era}function Gfa(e){return lma.some(t=>t.hasRequestMethod(e))}function Kfa(e){return lma.some(t=>t.hasNotificationMethod(e))}function qfa(e){return e===`tasks/get`||e===`tasks/cancel`}function Jfa(e,t){return Xta(e,t)}function O9(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function Yfa(e){var t;if(e==null)return!1;let n=typeof e;return n!==`object`&&n!==`function`||!(`~standard`in e)?!1:typeof((t=e[`~standard`])==null?void 0:t.validate)==`function`}function Xfa(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:gma});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);hma||(hma=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=Vea(e,{target:gma,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&Zfa(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function Zfa(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||Zfa(e)))}return!1}function Qfa(e){var t;return(t=e.path)!=null&&t.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function $fa(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>Qfa(e)).join(`, `)}:{success:!0,data:n.value}}function epa(e){let t=Vea(e,{target:gma,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}function tpa(e){let t=_ma.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>Era({local:e,offset:t,precision:n}))))}function npa(e,t){let n;switch(e){case`email`:n=[lna()];break;case`uri`:n=[una()];break;case`date`:n=[Dra()];break;case`date-time`:n=tpa(t)}return new Set(n.map(e=>epa(e)).filter(e=>e!==void 0))}function rpa(e,t,n){return n!==`zod`||npa(e,t).has(t)}function k9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ipa(e){try{return Xfa(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new N9(M9.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}function apa(e){return vma.has(e)||e.startsWith(`x-`)}function opa(e,t,n,r){if(!k9(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(bma,e.type)?bma[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||apa(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?xma.has(e.format)?(typeof s!=`string`||!rpa(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function spa(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&k9(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,opa(n,`properties.${e}`,t,r)])):yma.has(i)?n[i]=a:apa(i)||r.push(i);if(r.length>0)throw new N9(M9.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function cpa(e,t){if(!k9(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!Jfa(ida,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function lpa(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>lpa(e,t[r],`${n}[${r}]`)):!k9(e)||!k9(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?lpa(r,t[e],i):apa(e)?[]:[i]})}function upa(e){if(!Yfa(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=spa(ipa(e.requestedSchema),t),r=Jfa(b9.shape.requestedSchema,n);if(!r.success)throw new N9(M9.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${cpa(n,r.error.message)}`);let i=lpa(n,r.data);if(i.length>0)throw new N9(M9.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new N9(M9.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function dpa(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}function fpa(e,t){let n=e.slice(0,-6);wma[n]=t,Tma[n]=e=>t.safeParse(e).success}function ppa(e){switch(e){case`initialize`:case`notifications/initialized`:return Ufa(void 0);case`server/discover`:return Ufa(cma);default:return}}function mpa(e,t){let n=e.params;if(!_pa(n))return{message:e,lifted:{}};let r=n._meta,i=_pa(r)?Ema.filter(e=>e in r):[],a=t===`request`?Dma.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&_pa(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function hpa(e,t){let n=e.validateResult(t,void 0);if(n.ok||n.reason!==`not-in-era`)return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function gpa(e){return()=>e}function _pa(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function vpa(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ypa(e){let t={},n=[];if(!vpa(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e))!vpa(i)||`method`in i||`result`in i?n.push(r):t[r]=i;return{accepted:t,droppedKeys:n}}function bpa(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}var xpa,Spa,Cpa,wpa,Tpa,Epa,Dpa,Opa,kpa,Apa,jpa,Mpa,A9,j9,Npa,Ppa,Fpa,Ipa,Lpa,Rpa,zpa,Bpa,Vpa,Hpa,Upa,Wpa,Gpa,Kpa,M9,N9,qpa,Jpa,Ypa,Xpa,Zpa,Qpa,$pa,ema,tma,nma,rma,ima,ama,oma,sma,cma,lma,uma,dma,fma,pma,mma,hma,gma,_ma,vma,yma,bma,xma,Sma,Cma,wma,Tma,Ema,Dma,Oma,kma,Ama=o((()=>{$ca(),nla(),$da(),ila(),D(),Mpa=Symbol.for(`mcp.sdk.errorBrands`),kpa=Symbol.hasInstance,xpa=class e extends Error{static[kpa](e){return w9(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return w9(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,C9(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},Object.defineProperty(xpa,"mcpBrand",{value:`mcp.OAuthError`}),A9=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),j9=(Apa=Symbol.hasInstance,Spa=class extends Error{static[Apa](e){return w9(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return w9(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,C9(this,new.target)}},Object.defineProperty(Spa,"mcpBrand",{value:`mcp.SdkError`}),Spa),Cpa=class extends j9{constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}},Object.defineProperty(Cpa,"mcpBrand",{value:`mcp.SdkHttpError`}),Npa=`2026-07-28`,Ppa=[`task`,`inputRequests`,`requestState`],Ipa=new Set([`const`,`enum`,`default`,`examples`]),Lpa=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]),Rpa={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},zpa={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Bpa={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Object.keys(Rpa),Object.keys(zpa),Hpa={ok:!1,reason:`not-in-era`},Upa={era:`2025-11-25`,hasRequestMethod:lfa,hasNotificationMethod:ufa,validateRequest:(e,t)=>gfa(pfa(e),t),validateResult:(e,t)=>gfa(ffa(e),t),validateNotification:(e,t)=>gfa(mfa(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Hpa,validateInputResponse:()=>Hpa,samplingResultVariant:((e,t)=>{let n=ifa();return gfa(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=tfa(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&afa(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(hfa(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:vfa(e)}}return{kind:`complete`,result:vfa(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>_fa(e))?t:{...t,tools:n.map(e=>_fa(e)?{...e,outputSchema:sfa(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0},Gpa=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`],Kpa=Symbol(`modelcontextprotocol.resultCacheHintFallback`),M9=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),N9=(jpa=Symbol.hasInstance,wpa=class e extends Error{static[jpa](e){return w9(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return w9(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,C9(this,new.target)}static fromError(t,n,r){if(t===M9.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Jpa(e.elicitations,n)}if(t===M9.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Ypa({supported:e.supported,requested:e.requested},n)}if(t===M9.InvalidParams||t===M9.ResourceNotFound){let e=r;if(typeof(e==null?void 0:e.uri)==`string`&&(t===M9.ResourceNotFound||Object.keys(e).length===1))return new qpa(e.uri,n)}if(t===M9.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Xpa({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Object.defineProperty(wpa,"mcpBrand",{value:`mcp.ProtocolError`}),wpa),qpa=(Tpa=class extends N9{constructor(e,t=`Resource not found: ${e}`){super(M9.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Object.defineProperty(Tpa,"mcpBrand",{value:`mcp.ResourceNotFoundError`}),Tpa),Jpa=(Epa=class extends N9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(M9.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}},Object.defineProperty(Epa,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`}),Epa),Ypa=(Dpa=class extends N9{constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(M9.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Object.defineProperty(Dpa,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`}),Dpa),Xpa=(Opa=class extends N9{constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(M9.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Object.defineProperty(Opa,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`}),Opa),Zpa=0,Qpa=`private`,$pa=[`tools/call`,`prompts/get`,`resources/read`],ema=[`elicitation/create`,`sampling/createMessage`,`roots/list`],nma={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},rma={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null},Object.keys(nma),Object.keys(rma),ima={ok:!1,reason:`not-in-era`},ama=[B7,H7],oma={era:`2026-07-28`,hasRequestMethod:Ffa,hasNotificationMethod:Ifa,hasInputRequestMethod:e=>Nfa(e)!==void 0,validateRequest:(e,t)=>D9(Rfa(e),t),validateResult:(e,t)=>D9(zfa(e),t),validateNotification:(e,t)=>D9(Bfa(e),t),validateInputRequest:(e,t)=>D9(Nfa(e),t),validateInputResponse:(e,t)=>D9(Pfa(e),t),samplingResultVariant:()=>ima,outboundEnvelope(e){return{[B7]:e.protocolVersion,[cla]:e.clientInfo,[H7]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of ama)n in e||t.push({key:n,problem:`missing`});let n=T9().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>tfa(e),inputRequestSchema:Nfa,decodeResult(e,t){if(!E9(t))return{kind:`invalid`,error:new j9(A9.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new j9(A9.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new j9(A9.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=E9(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:T9().ResultMetaSchema.safeParse(t._meta),o=a!=null&&a.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new j9(A9.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new j9(A9.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=Hfa(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new j9(A9.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return Dfa(Tfa(e,wfa(e,Vfa(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=T9().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},cma=`2026-07-28`,lma=[Upa,oma],uma=Qca({AnnotationsSchema:()=>s9,AudioContentSchema:()=>d9,BaseMetadataSchema:()=>n9,BaseRequestParamsSchema:()=>G7,BlobResourceContentsSchema:()=>Gla,BooleanSchemaSchema:()=>Yua,CallToolRequestParamsSchema:()=>Aua,CallToolRequestSchema:()=>jua,CallToolResultSchema:()=>g9,CancelTaskRequestSchema:()=>jda,CancelTaskResultSchema:()=>Mda,CancelledNotificationParamsSchema:()=>Sla,CancelledNotificationSchema:()=>Cla,ClientCapabilitiesSchema:()=>kla,ClientNotificationSchema:()=>Pda,ClientRequestSchema:()=>Nda,ClientResultSchema:()=>Fda,ClientTasksCapabilitySchema:()=>Dla,CompatibilityCallToolResultSchema:()=>kua,CompleteRequestParamsSchema:()=>pda,CompleteRequestSchema:()=>mda,CompleteResultSchema:()=>hda,ContentBlockSchema:()=>m9,CreateMessageRequestParamsSchema:()=>Gua,CreateMessageRequestSchema:()=>Kua,CreateMessageResultSchema:()=>qua,CreateMessageResultWithToolsSchema:()=>Jua,CreateTaskResultSchema:()=>Sda,CursorSchema:()=>pla,DiscoverRequestSchema:()=>Fla,DiscoverResultSchema:()=>Ila,ElicitRequestFormParamsSchema:()=>b9,ElicitRequestParamsSchema:()=>oda,ElicitRequestSchema:()=>sda,ElicitRequestURLParamsSchema:()=>ada,ElicitResultSchema:()=>uda,ElicitationCompleteNotificationParamsSchema:()=>cda,ElicitationCompleteNotificationSchema:()=>lda,EmbeddedResourceSchema:()=>f9,EmptyResultSchema:()=>e9,EnumSchemaSchema:()=>rda,GetPromptRequestParamsSchema:()=>yua,GetPromptRequestSchema:()=>bua,GetPromptResultSchema:()=>Cua,GetTaskPayloadRequestSchema:()=>Dda,GetTaskPayloadResultSchema:()=>Oda,GetTaskRequestSchema:()=>Tda,GetTaskResultSchema:()=>Eda,IconSchema:()=>wla,IconsSchema:()=>t9,ImageContentSchema:()=>u9,ImplementationSchema:()=>r9,InitializeRequestParamsSchema:()=>Ala,InitializeRequestSchema:()=>jla,InitializeResultSchema:()=>Nla,InitializedNotificationSchema:()=>Pla,JSONArraySchema:()=>dla,JSONObjectSchema:()=>W7,JSONRPCErrorResponseSchema:()=>$7,JSONRPCMessageSchema:()=>bla,JSONRPCNotificationSchema:()=>yla,JSONRPCRequestSchema:()=>vla,JSONRPCResponseSchema:()=>xla,JSONRPCResultResponseSchema:()=>Q7,JSONValueSchema:()=>U7,LegacyTitledEnumSchemaSchema:()=>Qua,ListChangedOptionsBaseSchema:()=>Nua,ListPromptsRequestSchema:()=>_ua,ListPromptsResultSchema:()=>vua,ListResourceTemplatesRequestSchema:()=>Xla,ListResourceTemplatesResultSchema:()=>Zla,ListResourcesRequestSchema:()=>Jla,ListResourcesResultSchema:()=>Yla,ListRootsRequestSchema:()=>_da,ListRootsResultSchema:()=>vda,ListTasksRequestSchema:()=>kda,ListTasksResultSchema:()=>Ada,ListToolsRequestSchema:()=>Dua,ListToolsResultSchema:()=>Oua,LoggingLevelSchema:()=>Pua,LoggingMessageNotificationParamsSchema:()=>Lua,LoggingMessageNotificationSchema:()=>Rua,ModelHintSchema:()=>zua,ModelPreferencesSchema:()=>Bua,MultiSelectEnumSchemaSchema:()=>nda,NotificationSchema:()=>Y7,NotificationsParamsSchema:()=>J7,NumberSchemaSchema:()=>y9,PaginatedRequestParamsSchema:()=>Vla,PaginatedRequestSchema:()=>i9,PaginatedResultSchema:()=>a9,PingRequestSchema:()=>Lla,PrimitiveSchemaDefinitionSchema:()=>ida,ProgressNotificationParamsSchema:()=>zla,ProgressNotificationSchema:()=>Bla,ProgressSchema:()=>Rla,ProgressTokenSchema:()=>fla,PromptArgumentSchema:()=>hua,PromptListChangedNotificationSchema:()=>wua,PromptMessageSchema:()=>Sua,PromptReferenceSchema:()=>fda,PromptSchema:()=>gua,ReadResourceRequestParamsSchema:()=>Qla,ReadResourceRequestSchema:()=>$la,ReadResourceResultSchema:()=>eua,RelatedTaskMetadataSchema:()=>hla,RequestIdSchema:()=>Z7,RequestMetaSchema:()=>gla,RequestSchema:()=>q7,ResourceContentsSchema:()=>Hla,ResourceLinkSchema:()=>p9,ResourceListChangedNotificationSchema:()=>tua,ResourceRequestParamsSchema:()=>c9,ResourceSchema:()=>Kla,ResourceTemplateReferenceSchema:()=>dda,ResourceTemplateSchema:()=>qla,ResourceUpdatedNotificationParamsSchema:()=>pua,ResourceUpdatedNotificationSchema:()=>mua,ResultMetaObjectSchema:()=>_la,ResultSchema:()=>X7,RoleSchema:()=>o9,RootSchema:()=>gda,RootsListChangedNotificationSchema:()=>yda,SamplingContentSchema:()=>Uua,SamplingMessageContentBlockSchema:()=>_9,SamplingMessageSchema:()=>Wua,ServerCapabilitiesSchema:()=>Mla,ServerNotificationSchema:()=>Lda,ServerRequestSchema:()=>Ida,ServerResultSchema:()=>Rda,ServerTasksCapabilitySchema:()=>Ola,SetLevelRequestParamsSchema:()=>Fua,SetLevelRequestSchema:()=>Iua,SingleSelectEnumSchemaSchema:()=>$ua,StringSchemaSchema:()=>v9,SubscribeRequestParamsSchema:()=>nua,SubscribeRequestSchema:()=>rua,SubscriptionFilterSchema:()=>oua,SubscriptionsAcknowledgedNotificationParamsSchema:()=>lua,SubscriptionsAcknowledgedNotificationSchema:()=>uua,SubscriptionsListenRequestParamsSchema:()=>sua,SubscriptionsListenRequestSchema:()=>cua,SubscriptionsListenResultMetaSchema:()=>dua,SubscriptionsListenResultSchema:()=>fua,TaskAugmentedRequestParamsSchema:()=>K7,TaskCreationParamsSchema:()=>bda,TaskMetadataSchema:()=>mla,TaskSchema:()=>x9,TaskStatusNotificationParamsSchema:()=>Cda,TaskStatusNotificationSchema:()=>wda,TaskStatusSchema:()=>xda,TextContentSchema:()=>l9,TextResourceContentsSchema:()=>Ula,TitledMultiSelectEnumSchemaSchema:()=>tda,TitledSingleSelectEnumSchemaSchema:()=>Zua,ToolAnnotationsSchema:()=>Tua,ToolChoiceSchema:()=>Vua,ToolExecutionSchema:()=>Eua,ToolListChangedNotificationSchema:()=>Mua,ToolResultContentSchema:()=>Hua,ToolSchema:()=>h9,ToolUseContentSchema:()=>xua,UnsubscribeRequestParamsSchema:()=>iua,UnsubscribeRequestSchema:()=>aua,UntitledMultiSelectEnumSchemaSchema:()=>eda,UntitledSingleSelectEnumSchemaSchema:()=>Xua}),dma=e=>vla.safeParse(e).success,fma=e=>yla.safeParse(e).success,pma=e=>Q7.safeParse(e).success,mma=e=>$7.safeParse(e).success,M9.InvalidRequest,M9.UnsupportedProtocolVersion,M9.InvalidParams,M9.MethodNotFound,M9.InvalidParams,M9.MissingRequiredClientCapability,M9.ParseError,M9.InvalidRequest,M9.MethodNotFound,M9.UnsupportedProtocolVersion,M9.MissingRequiredClientCapability,hma=!1,gma=`draft-2020-12`,_ma=/\\\.\\d\{(\d+)\}/,vma=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]),yma=new Set([`$schema`,...Object.keys(b9.shape.requestedSchema.shape)]),bma={string:O9([v9,Xua,Zua,Qua]),number:O9([y9]),integer:O9([y9]),boolean:O9([Yua]),array:O9([eda,tda])},xma=new Set(v9.shape.format.unwrap().options),Object.assign(dpa,{elicit(e){try{return{method:`elicitation/create`,params:upa(e)}}catch(e){throw e instanceof N9?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}}),Sma=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Cma={IdJagTokenExchangeResponseSchema:Wda,OAuthClientInformationFullSchema:Yda,OAuthClientInformationSchema:Jda,OAuthClientMetadataSchema:qda,OAuthClientRegistrationErrorSchema:Xda,OAuthErrorResponseSchema:Gda,OAuthMetadataSchema:Bda,OAuthProtectedResourceMetadataSchema:zda,OAuthTokenRevocationRequestSchema:Zda,OAuthTokensSchema:Uda,OpenIdProviderDiscoveryMetadataSchema:Hda,OpenIdProviderMetadataSchema:Vda},wma={},Tma={};for(let e of Sma)fpa(e,uma[e]);for(let[e,t]of Object.entries(Cma))fpa(e,t);Object.freeze(wma),Object.freeze(Tma),Ema=[B7,cla,H7,ula],Dma=[`inputResponses`,`requestState`],Oma=gpa(void 0),kma=class{constructor(e){E(this,`_transport`,void 0),E(this,`_requestMessageId`,0),E(this,`_requestHandlers`,new Map),E(this,`_customSchemaRequestMethods`,new Set),E(this,`_requestHandlerAbortControllers`,new Map),E(this,`_notificationHandlers`,new Map),E(this,`_responseHandlers`,new Map),E(this,`_progressHandlers`,new Map),E(this,`_timeoutInfo`,new Map),E(this,`_pendingDebouncedNotifications`,new Set),E(this,`_negotiatedProtocolVersion`,void 0),E(this,`_supportedProtocolVersions`,void 0),E(this,`onclose`,void 0),E(this,`onerror`,void 0),E(this,`fallbackRequestHandler`,void 0),E(this,`fallbackNotificationHandler`,void 0),this._options=e,this._supportedProtocolVersions=(e==null?void 0:e.supportedProtocolVersions)??ola,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new j9(A9.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){var t;e.params.requestId!==void 0&&((t=this._requestHandlerAbortControllers.get(e.params.requestId))==null||t.abort(e.params.reason))}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new j9(A9.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var t,n,r,i;this._transport=e;let a=(t=this.transport)==null?void 0:t.onclose;this._transport.onclose=()=>{try{a==null||a()}finally{this._onclose()}};let o=(n=this.transport)==null?void 0:n.onerror;this._transport.onerror=e=>{o==null||o(e),this._onerror(e)};let s=(r=this._transport)==null?void 0:r.onmessage;this._transport.onmessage=(e,t)=>{s==null||s(e,t),pma(e)||mma(e)?this._onresponse(e):dma(e)?this._onrequest(e,t):fma(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},(i=e.setSupportedProtocolVersions)==null||i.call(e,this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new j9(A9.ConnectionClosed,`Connection closed`);this._transport=void 0;try{var r;(r=this.onclose)==null||r.call(this)}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){var t;(t=this.onerror)==null||t.call(this,e)}_onnotification(e,t){let{message:n}=mpa(e,`notification`),r=this._negotiatedWireCodec();if((t==null?void 0:t.classification)===void 0&&this._shouldDropInbound(e)===`drop`)return;if((t==null?void 0:t.classification)!==void 0){let e=Wfa(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(Kfa(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;(i!==void 0||a!==void 0)&&Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var n;let{message:r,lifted:i}=mpa(e,`request`),a=this._negotiatedWireCodec();if((t==null?void 0:t.classification)===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let o=this._transport,s=(e,t,n)=>{let i={jsonrpc:`2.0`,id:r.id,error:{code:e,message:t,...n!==void 0&&{data:n}}};o==null||o.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if((t==null?void 0:t.classification)!==void 0){let e=Wfa(t.classification);if(e!==a.era){this._onerror(Error(`Era mismatch on inbound request '${r.method}': classified as ${e} but this instance serves ${a.era}`));let n=t.classification.revision??e;s(M9.UnsupportedProtocolVersion,`Unsupported protocol version: ${n}`,{supported:this._supportedProtocolVersions,requested:n});return}}if(Gfa(r.method)&&!a.hasRequestMethod(r.method)&&!(qfa(r.method)&&this._customSchemaRequestMethods.has(r.method))){s(M9.MethodNotFound,`Method not found`);return}let l=this._requestHandlers.get(r.method)??this.fallbackRequestHandler;if(l===void 0){s(M9.MethodNotFound,`Method not found`);return}let u=a.checkInboundEnvelope(i);if(u!==void 0){s(M9.InvalidParams,u);return}let d=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:r.id}),f=(e,t,n)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...n,relatedRequestId:r.id}),p=new AbortController;this._requestHandlerAbortControllers.set(r.id,p);let m=i.inputResponses===void 0?void 0:ypa(i.inputResponses),h={sessionId:o==null?void 0:o.sessionId,mcpReq:{id:r.id,method:r.method,_meta:(n=r.params)==null?void 0:n._meta,...i.envelope!==void 0&&{envelope:i.envelope},...m!==void 0&&{inputResponses:m.accepted},...m!==void 0&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:i.requestState===void 0?Oma:gpa(i.requestState),signal:p.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),Yfa(t))return f(e,t,n);let i=hpa(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return f(e,i,t)}),notify:d},http:t!=null&&t.authInfo?{authInfo:t.authInfo}:void 0},g=this.buildContext(h,t);Promise.resolve().then(()=>l(r,g)).then(async e=>{if(p.signal.aborted)return;let t;try{t=a.encodeResult(r.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${r.method}: ${e}`)),s(M9.InternalError,`Internal error`);return}let n={result:t,jsonrpc:`2.0`,id:r.id};await(o==null?void 0:o.send(n))},async e=>{if(p.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:M9.InternalError,n={jsonrpc:`2.0`,id:r.id,error:{code:a.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await(o==null?void 0:o.send(n))}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(r.id)===p&&this._requestHandlerAbortControllers.delete(r.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);n===void 0?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),pma(e)?n(e):n(N9.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(Yfa(t))return qfa(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=hpa(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return Ufa(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=ppa(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Gfa(t)&&!e.hasRequestMethod(t))throw new j9(A9.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},l=Date.now(),u,d;return new Promise((f,p)=>{var m,h,g;let _=e=>{p(e)};if(!this._transport){_(Error(`Not connected`));return}if(((m=this._options)==null?void 0:m.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){_(e);return}if(r!=null&&(h=r.signal)!=null&&h.aborted){let e=r.signal.reason;throw e instanceof j9?e:new j9(A9.RequestTimeout,String(e))}let v=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,y=this._requestMessageId++;d=y;let b={...t,jsonrpc:`2.0`,id:y};if(r!=null&&r.onprogress){var x;this._progressHandlers.set(y,r.onprogress),b.params={...t.params,_meta:{...(x=t.params)==null?void 0:x._meta,progressToken:y}}}let S=this._envelopeOutbound(b),C=!1,w=e=>{if(!C){if(this._progressHandlers.delete(y),v===void 0){var n;t.method!==`initialize`&&((n=this._transport)==null||n.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:y,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))))}else v.abort();p(e instanceof j9?e:new j9(A9.RequestTimeout,String(e)))}};this._responseHandlers.set(y,i=>{var a;if(r!=null&&(a=r.signal)!=null&&a.aborted)return;if(C=!0,i instanceof Error)return p(i);let o;try{o=e.decodeResult(t.method,i.result)}catch(e){return p(e instanceof Error?e:Error(String(e)))}if(o.kind===`invalid`)return p(o.error);if(o.kind===`input_required`){if((r==null?void 0:r.allowInputRequired)===!0)return f(bpa(o));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:l,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return f(this._resolveNonCompleteResult(o,i))}let s=o.result;$fa(n,s).then(e=>{e.success?f(e.data):p(new j9(A9.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},p)}),u=()=>{var e;return w(r==null||(e=r.signal)==null?void 0:e.reason)},r==null||(g=r.signal)==null||g.addEventListener(`abort`,u,{once:!0});let T=(r==null?void 0:r.timeout)??6e4;this._setupTimeout(y,T,r==null?void 0:r.maxTotalTimeout,()=>w(new j9(A9.RequestTimeout,`Request timed out`,{timeout:T})),(r==null?void 0:r.resetTimeoutOnProgress)??!1),this._transport.send(S,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:v==null?void 0:v.signal}).catch(e=>{this._progressHandlers.delete(y),p(e)})}).finally(()=>{var e;u&&(r==null||(e=r.signal)==null||e.removeEventListener(`abort`,u)),d!==void 0&&(this._responseHandlers.delete(d),this._cleanupTimeout(d))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){var r;if(!this._transport)throw new j9(A9.NotConnected,`Not connected`);if(Kfa(t.method)&&!e.hasNotificationMethod(t.method))throw new j9(A9.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((((r=this._options)==null?void 0:r.debouncedNotificationMethods)??[]).includes(t.method)&&!t.params&&(n==null?void 0:n.relatedRequestId)===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{var e;this._pendingDebouncedNotifications.delete(t.method),this._transport&&((e=this._transport)==null||e.send(i,n).catch(e=>this._onerror(e)))})}else await this._transport.send(i,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Gfa(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new N9(M9.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await $fa(t.params,{...r.params});if(!a.success)throw new N9(M9.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Kfa(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new N9(M9.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))})}else{if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await $fa(t.params,{...r.params});if(!i.success)throw new N9(M9.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}}removeNotificationHandler(e){this._notificationHandlers.delete(e)}},Zca((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),l=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(l))throw TypeError(`invalid media type`);var u=new o(l.toLowerCase());if(s!==-1){var d,f,p;for(t.lastIndex=s;f=t.exec(i);){if(f.index!==s)throw TypeError(`invalid parameter format`);s+=f[0].length,d=f[1].toLowerCase(),p=f[2],p.charCodeAt(0)===34&&(p=p.slice(1,-1),p.indexOf(`\\`)!==-1&&(p=p.replace(n,`$1`))),u.parameters[d]=p}if(s!==i.length)throw TypeError(`invalid parameter format`)}return u}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))()}));function P9(e){return e.test.bind(e)}function jma(e,t){let n=t.match(Mma);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Mma,Nma,Pma,Fma,Ima,Lma,Rma,zma,Bma,Vma,Hma,Uma=o((()=>{typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`),Mma=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Nma=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Pma=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Fma=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Ima=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Lma=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Rma=/^(?:\/(?:[^~/]|~0|~1)*)*$/,zma=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Bma=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Vma=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Hma=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,jma.bind(void 0,!1),P9(Pma),P9(Fma),P9(Ima),P9(Nma),P9(Vma),P9(Hma),P9(Lma),P9(Rma),P9(zma),P9(Bma)})),Wma=o((()=>{Uma()})),Gma=o((()=>{globalThis.crypto})),Kma,qma,Jma,Yma,Xma,Zma,Qma,$ma,eha,tha,nha,F9,rha=o((()=>{Ama(),Wma(),Gma(),D(),F9=(eha=Symbol.hasInstance,Kma=class extends Error{static[eha](e){return w9(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return w9(this,e)}constructor(e){super(e),this.name=new.target.name,C9(this,new.target)}},Object.defineProperty(Kma,"mcpBrand",{value:`mcp.OAuthClientFlowError`}),Kma),qma=class extends F9{constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),E(this,`kind`,void 0),E(this,`expected`,void 0),E(this,`received`,void 0),this.kind=e,this.expected=t,this.received=n}},Object.defineProperty(qma,"mcpBrand",{value:`mcp.IssuerMismatchError`}),Jma=class extends F9{constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),E(this,`status`,void 0),E(this,`body`,void 0),E(this,`submittedMetadata`,void 0),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},Object.defineProperty(Jma,"mcpBrand",{value:`mcp.RegistrationRejectedError`}),Yma=class extends F9{constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),E(this,`tokenEndpoint`,void 0),this.tokenEndpoint=e}},Object.defineProperty(Yma,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`}),Xma=class extends F9{constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},Object.defineProperty(Xma,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`}),Zma=class extends F9{constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),E(this,`requiredScope`,void 0),E(this,`resourceMetadataUrl`,void 0),E(this,`errorDescription`,void 0),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}},Object.defineProperty(Zma,"mcpBrand",{value:`mcp.InsufficientScopeError`}),tha=Symbol.hasInstance,Qma=class extends Error{static[tha](e){return w9(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return w9(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,C9(this,new.target)}},Object.defineProperty(Qma,"mcpBrand",{value:`mcp.UnauthorizedError`}),nha=Symbol.hasInstance,$ma=class extends Error{static[nha](e){return w9(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return w9(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,C9(this,new.target)}},Object.defineProperty($ma,"mcpBrand",{value:`mcp.SseError`})})),iha=o((()=>{Qda()}));function aha(e,t){var n;let[r,i]=t,a=r==null?void 0:r.shape;if(typeof(a==null||(n=a.method)==null?void 0:n.value)!=`string`)return;let o=a.method.value,s=e===`request`?`setRequestHandler`:`setNotificationHandler`;fha.has(s)||(fha.add(s),console.warn(`[ext-apps] ${s}(Schema, handler) is deprecated; use ${s}("${o}", { params: Schema.shape.params }, handler).`));let l=i;return[o,{params:a.params},e===`request`?(e,t)=>l({method:o,params:e},oha(t)):e=>l({method:o,params:e})]}function oha(e){var t;return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:(t=e.http)==null?void 0:t.authInfo}}async function sha(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](zha);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function cha(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{var t;let n=(t=e.path)==null?void 0:t.map(e=>typeof e==`object`?e.key:e).join(`.`);return n?`${n}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function lha(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var uha,dha,fha,pha,mha,hha,I9,gha,_ha,vha,yha,bha,xha,Sha,Cha,wha,Tha,Eha,Dha,Oha,kha,Aha,jha,Mha,Nha,Pha,Fha,Iha,Lha,Rha,zha,Bha,Vha=o((()=>{rha(),iha(),D(),ila(),uha=class{constructor(){E(this,`_eventSlots`,new Map)}setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){var t;return(t=this._eventSlots.get(e))==null?void 0:t.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){var n;let r=this._eventSlots.get(e);if(r){(n=r.onHandler)==null||n.call(r,t);for(let e of[...r.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},dha=class{constructor(){E(this,`_methods`,new Set)}claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},fha=new Set,pha=`2026-01-26`,mha=class{constructor(e=window.parent,t){E(this,`eventTarget`,void 0),E(this,`eventSource`,void 0),E(this,`messageListener`,void 0),E(this,`onclose`,void 0),E(this,`onerror`,void 0),E(this,`onmessage`,void 0),E(this,`sessionId`,void 0),E(this,`setProtocolVersion`,void 0),this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{var n,r,i;if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let a=bla.safeParse(e.data);a.success?(console.debug(`Parsed message`,a.data),(n=this.onmessage)==null||n.call(this,a.data)):((r=e.data)==null?void 0:r.jsonrpc)===`2.0`?(console.error(`Failed to parse message`,a.error.message,e),(i=this.onerror)==null||i.call(this,Error(`Invalid JSON-RPC message received: `+a.error.message))):console.debug(`Ignoring non-JSON-RPC message`,a.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){var e;window.removeEventListener(`message`,this.messageListener),(e=this.onclose)==null||e.call(this)}},hha=r7([$(`light`),$(`dark`)]).describe(`Color theme preference for the host environment.`),I9=r7([$(`inline`),$(`fullscreen`),$(`pip`)]).describe(`Display mode for UI presentation.`),gha=r7([$(`--color-background-primary`),$(`--color-background-secondary`),$(`--color-background-tertiary`),$(`--color-background-inverse`),$(`--color-background-ghost`),$(`--color-background-info`),$(`--color-background-danger`),$(`--color-background-success`),$(`--color-background-warning`),$(`--color-background-disabled`),$(`--color-text-primary`),$(`--color-text-secondary`),$(`--color-text-tertiary`),$(`--color-text-inverse`),$(`--color-text-ghost`),$(`--color-text-info`),$(`--color-text-danger`),$(`--color-text-success`),$(`--color-text-warning`),$(`--color-text-disabled`),$(`--color-border-primary`),$(`--color-border-secondary`),$(`--color-border-tertiary`),$(`--color-border-inverse`),$(`--color-border-ghost`),$(`--color-border-info`),$(`--color-border-danger`),$(`--color-border-success`),$(`--color-border-warning`),$(`--color-border-disabled`),$(`--color-ring-primary`),$(`--color-ring-secondary`),$(`--color-ring-inverse`),$(`--color-ring-info`),$(`--color-ring-danger`),$(`--color-ring-success`),$(`--color-ring-warning`),$(`--font-sans`),$(`--font-mono`),$(`--font-weight-normal`),$(`--font-weight-medium`),$(`--font-weight-semibold`),$(`--font-weight-bold`),$(`--font-text-xs-size`),$(`--font-text-sm-size`),$(`--font-text-md-size`),$(`--font-text-lg-size`),$(`--font-heading-xs-size`),$(`--font-heading-sm-size`),$(`--font-heading-md-size`),$(`--font-heading-lg-size`),$(`--font-heading-xl-size`),$(`--font-heading-2xl-size`),$(`--font-heading-3xl-size`),$(`--font-text-xs-line-height`),$(`--font-text-sm-line-height`),$(`--font-text-md-line-height`),$(`--font-text-lg-line-height`),$(`--font-heading-xs-line-height`),$(`--font-heading-sm-line-height`),$(`--font-heading-md-line-height`),$(`--font-heading-lg-line-height`),$(`--font-heading-xl-line-height`),$(`--font-heading-2xl-line-height`),$(`--font-heading-3xl-line-height`),$(`--border-radius-xs`),$(`--border-radius-sm`),$(`--border-radius-md`),$(`--border-radius-lg`),$(`--border-radius-xl`),$(`--border-radius-full`),$(`--border-width-regular`),$(`--shadow-hairline`),$(`--shadow-sm`),$(`--shadow-md`),$(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`),_ha=o7(gha.describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),r7([Z(),X5()]).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Q({method:$(`ui/open-link`),params:Q({url:Z().describe(`URL to open in the host's browser`)})}),vha=Q({isError:Y5().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),yha=Q({isError:Y5().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),bha=Q({isError:Y5().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough(),Q({method:$(`ui/notifications/sandbox-proxy-ready`),params:Q({})}),xha=Q({connectDomains:t7(Z()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). - Maps to CSP \`connect-src\` directive - Empty or omitted → no network connections (secure default)`),resourceDomains:t7(Z()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:t7(Z()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:t7(Z()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Sha=Q({camera:Q({}).optional().describe(`Request camera access. Maps to Permission Policy \`camera\` feature.`),microphone:Q({}).optional().describe(`Request microphone access. Maps to Permission Policy \`microphone\` feature.`),geolocation:Q({}).optional().describe(`Request geolocation access. Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:Q({}).optional().describe(`Request clipboard write access. Maps to Permission Policy \`clipboard-write\` feature.`)}),Q({method:$(`ui/notifications/size-changed`),params:Q({width:J5().optional().describe(`New width in pixels.`),height:J5().optional().describe(`New height in pixels.`)})}),Cha=Q({method:$(`ui/notifications/tool-input`),params:Q({arguments:o7(Z(),$5().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),wha=Q({method:$(`ui/notifications/tool-input-partial`),params:Q({arguments:o7(Z(),$5().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Tha=Q({method:$(`ui/notifications/tool-cancelled`),params:Q({reason:Z().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Eha=Q({fonts:Z().optional()}),Dha=Q({variables:_ha.optional().describe(`CSS variables for theming the app.`),css:Eha.optional().describe(`CSS blocks that apps can inject.`)}),Oha=Q({method:$(`ui/resource-teardown`),params:Q({})}),kha=o7(Z(),$5()),Aha=Q({text:Q({}).optional().describe(`Host supports text content blocks.`),image:Q({}).optional().describe(`Host supports image content blocks.`),audio:Q({}).optional().describe(`Host supports audio content blocks.`),resource:Q({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Q({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Q({}).optional().describe(`Host supports structured content.`)}),Q({method:$(`ui/notifications/request-teardown`),params:Q({}).optional()}),jha=Q({experimental:o7(Z(),o7(Z(),Q5()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:Q({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Q({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Q({listChanged:Y5().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Q({listChanged:Y5().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Q({}).optional().describe(`Host accepts log messages.`),sandbox:Q({permissions:Sha.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:xha.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Aha.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Aha.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Q({tools:Q({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Mha=Q({experimental:o7(Z(),o7(Z(),Q5()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:Q({listChanged:Y5().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:t7(I9).optional().describe(`Display modes the app supports.`)}),Q({method:$(`ui/notifications/initialized`),params:Q({}).optional()}),Q({csp:xha.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:Sha.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:Z().optional().describe(`Dedicated origin for view sandbox. Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists. **Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include: - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`) - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`) If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Y5().optional().describe(`Visual boundary preference - true if view prefers a visible border. Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary. - \`true\`: request visible border + background - \`false\`: request no visible border + background - omitted: host decides border`)}),Q({method:$(`ui/request-display-mode`),params:Q({mode:I9.describe(`The display mode being requested.`)})}),Nha=Q({mode:I9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),Pha=r7([$(`model`),$(`app`)]).describe(`Tool visibility scope - who can access the tool.`),Q({resourceUri:Z().optional(),visibility:t7(Pha).optional().describe(`Who can access this tool. Default: ["model", "app"] - "model": Tool visible to and callable by the agent - "app": Tool callable by the app from this server only`),csp:e7().optional(),permissions:e7().optional()}),Q({mimeTypes:t7(Z()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Q({method:$(`ui/download-file`),params:Q({contents:t7(r7([f9,p9])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Q({method:$(`ui/message`),params:Q({role:$(`user`).describe(`Message role, currently only "user" is supported.`),content:t7(m9).describe(`Message content blocks (text, image, etc.).`)})}),Q({method:$(`ui/notifications/sandbox-resource-ready`),params:Q({html:Z().describe(`HTML content to load into the inner iframe.`),sandbox:Z().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:xha.optional().describe(`CSP configuration from resource metadata.`),permissions:Sha.optional().describe(`Sandbox permissions from resource metadata.`)})}),Fha=Q({method:$(`ui/notifications/tool-result`),params:g9.describe(`Standard MCP tool execution result.`)}),Iha=Q({toolInfo:Q({id:Z7.optional().describe(`JSON-RPC id of the tools/call request.`),tool:h9.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:hha.optional().describe(`Current color theme preference.`),styles:Dha.optional().describe(`Style configuration for theming the app.`),displayMode:I9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:t7(I9).optional().describe(`Display modes the host supports.`),containerDimensions:r7([Q({height:J5().describe(`Fixed container height in pixels.`)}),Q({maxHeight:r7([J5(),X5()]).optional().describe(`Maximum container height in pixels.`)})]).and(r7([Q({width:J5().describe(`Fixed container width in pixels.`)}),Q({maxWidth:r7([J5(),X5()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:Z().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:Z().optional().describe(`User's timezone in IANA format.`),userAgent:Z().optional().describe(`Host application identifier.`),platform:r7([$(`web`),$(`desktop`),$(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Q({touch:Y5().optional().describe(`Whether the device supports touch input.`),hover:Y5().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Q({top:J5().describe(`Top safe area inset in pixels.`),right:J5().describe(`Right safe area inset in pixels.`),bottom:J5().describe(`Bottom safe area inset in pixels.`),left:J5().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),Lha=Q({method:$(`ui/notifications/host-context-changed`),params:Iha.describe(`Partial context update containing only changed fields.`)}),Q({method:$(`ui/update-model-context`),params:Q({content:t7(m9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:o7(Z(),$5().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Q({method:$(`ui/initialize`),params:Q({appInfo:r9.describe(`App identification (name and version).`),appCapabilities:Mha.describe(`Features and capabilities this app provides.`),protocolVersion:Z().describe(`Protocol version this app supports.`)})}),Rha=Q({protocolVersion:Z().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:r9.describe(`Host application identification and version.`),hostCapabilities:jha.describe(`Features and capabilities provided by the host.`),hostContext:Iha.describe(`Rich context about the host environment.`)}).passthrough(),zha={target:`draft-2020-12`},Bha=class e extends kma{_assertInitialized(e){var t;if(this._initializedSent)return;let n=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if((t=this.options)!=null&&t.strict)throw Error(n);console.warn(`${n}. This will throw in a future release.`)}_assertHandlerTiming(t){var n;if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let r=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if((n=this.options)!=null&&n.strict)throw Error(r);console.warn(r)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),E(this,`_appInfo`,void 0),E(this,`_appCapabilities`,void 0),E(this,`options`,void 0),E(this,`_hostCapabilities`,void 0),E(this,`_hostInfo`,void 0),E(this,`_hostContext`,void 0),E(this,`_registeredTools`,{}),E(this,`_initializedSent`,!1),E(this,`_registeredEvents`,new Set),E(this,`_events`,new uha),E(this,`_methods`,new dha),E(this,`setRequestHandler`,(...e)=>{let[t,...n]=aha(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)}),E(this,`setNotificationHandler`,(...e)=>{let[t,...n]=aha(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)}),E(this,`removeRequestHandler`,e=>{this._methods.release(e),super.removeRequestHandler(e)}),E(this,`removeNotificationHandler`,e=>{this._methods.release(e),super.removeNotificationHandler(e)}),E(this,`replaceRequestHandler`,(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)}),E(this,`eventSchemas`,{toolinput:Cha,toolinputpartial:wha,toolresult:Fha,toolcancelled:Tha,hostcontextchanged:Lha}),E(this,`_everHadListener`,new Set),E(this,`_toolHandlersInitialized`,!1),E(this,`_onteardown`,void 0),E(this,`_oncalltool`,void 0),E(this,`_onlisttools`,void 0),E(this,`sendOpenLink`,this.openLink),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&S5({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=lha(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{var e;r._initializedSent&&(e=r._appCapabilities.tools)!=null&&e.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await cha(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await cha(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await sha(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await sha(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:Oha.shape.params,result:kha},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`){var t;if(!((t=this._hostCapabilities)!=null&&t.sampling))throw Error(`Host does not support sampling (required for ${e})`)}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},bha,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},e9,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},vha,t)}downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},yha,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},Nha,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new mha(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{var n;await super.connect(e);let r=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:pha}},Rha,t);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);this._hostCapabilities=r.hostCapabilities,this._hostInfo=r.hostInfo,this._hostContext=r.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,(n=this.options)!=null&&n.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},E(Bha,`ONE_SHOT_EVENTS`,new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]))})),Hha=l({default:()=>Uha}),Uha,Wha=o((()=>{Uha={"prefab_ui/__init__.py":`"""Prefab — the generative UI framework that even humans can use. A JSON component format that renders to real interactive frontends. Transport-agnostic: works with MCP servers, REST APIs, or any backend that can return JSON. **Usage:** \`\`\`python from prefab_ui.components import Column, Heading, Text from prefab_ui.response import UIResponse def show_user(name: str) -> UIResponse: return UIResponse( state={"name": name}, view=Column(Heading("{{ name }}")), ) \`\`\` Submodules: - \`prefab_ui.components\` — UI components (Button, Grid, Card, etc.) - \`prefab_ui.actions\` — state actions (SetState, AppendState, etc.) - \`prefab_ui.css\` — CSS helpers (Responsive, Hover, Md, etc.) - \`prefab_ui.response\` — UIResponse - \`prefab_ui.define\` — Define (reusable component definitions) - \`prefab_ui.use\` — Use (component instantiation) """ from __future__ import annotations import importlib.metadata from prefab_ui.app import PrefabApp __all__ = ["PrefabApp"] try: __version__ = importlib.metadata.version("prefab-ui") except importlib.metadata.PackageNotFoundError: __version__ = "0.0.0-dev" `,"prefab_ui/app.py":`"""Application declarations for Prefab. \`PrefabApp\` describes what to render and which state and assets to load. \`AppTool\` describes an operation an MCP host can expose on a running app. **Usage:** \`\`\`python from prefab_ui.app import AppTool, PrefabApp from prefab_ui.components import Column, Heading, DataTable app = PrefabApp( view=Column(Heading("Dashboard"), DataTable(data=users)), state={"users": users}, ) html = app.html() # complete self-contained page csp = app.csp() # CSP domains for sandboxed delivery \`\`\` """ from __future__ import annotations import dataclasses import json from collections.abc import Callable from contextvars import ContextVar from typing import Any, Literal import pydantic_core from pydantic import BaseModel, Field, PrivateAttr, model_validator from prefab_ui.app_tools import AppTool from prefab_ui.renderer import ( RendererMode, _get_origin, get_renderer_csp, get_renderer_head, ) from prefab_ui.rx import _sanitize_floats from prefab_ui.themes import Theme __all__ = ["AppTool", "PrefabApp", "ResolvedTool"] PROTOCOL_VERSION = "0.3" # ── Tool Resolver ───────────────────────────────────────────────────── @dataclasses.dataclass(frozen=True) class ResolvedTool: """Enriched result from a tool resolver. \`name\` is the backend address, including routing prefixes. \`local_name\` is the registered name before routing, used by callable-backed AppTool definitions. \`description\` and \`input_schema\` come from that registration. These metadata fields are optional for ordinary CallTool resolution. \`unwrap_result\` controls extraction of wrapped backend return values. """ name: str unwrap_result: bool = False local_name: str | None = None description: str | None = None input_schema: dict[str, Any] | None = None _tool_resolver: ContextVar[Callable[[Any], ResolvedTool] | None] = ContextVar( "_tool_resolver", default=None ) def get_tool_resolver() -> Callable[[Any], ResolvedTool] | None: """Return the active tool resolver, or \`None\`.""" return _tool_resolver.get() _PAGE_TEMPLATE = """\\ {title} {head}

    """ def _serialize_state(state: dict[str, Any]) -> dict[str, Any]: """Serialize state for the wire protocol.""" return { key: _sanitize_floats(pydantic_core.to_jsonable_python(value)) for key, value in state.items() } def _theme_from_dict(theme: dict[str, Any]) -> Theme: mode = theme.get("mode") data: dict[str, Any] = { "light_css": theme["light"] if "light" in theme else theme.get("light_css", ""), "dark_css": theme["dark"] if "dark" in theme else theme.get("dark_css"), "css": theme.get("css", ""), "mode": _normalize_mode(mode), } return Theme.model_validate(data) def _normalize_mode(value: Any) -> Literal["light", "dark"] | None: return value if value in ("light", "dark") else None def _theme_css(theme: Theme | dict[str, Any] | None) -> str | None: if theme is None: return None return ( _theme_from_dict(theme).to_css() if isinstance(theme, dict) else theme.to_css() ) def _theme_mode( theme: Theme | dict[str, Any] | None, ) -> Literal["light", "dark"] | None: if theme is None: return None return _theme_from_dict(theme).mode if isinstance(theme, dict) else theme.mode class PrefabApp(BaseModel): """A complete Prefab application. Describes the view, initial state, reusable component definitions, and external assets. Use \`html()\` to produce a self-contained HTML page, or \`to_json()\` for the wire-format envelope. Can be used as a context manager to build the component tree inline: \`\`\`python with PrefabApp(state={"count": 0}, css_class="p-6") as app: Heading("Dashboard") Slider(value=50, name="count") \`\`\` """ title: str = Field(default="Prefab", description="HTML page title") view: Any | None = Field(default=None, description="Component tree to render") css_class: str | None = Field( default=None, description="Extra CSS/Tailwind classes merged onto the pf-app-root wrapper Div", ) state: dict[str, Any] | None = Field( default=None, description="Initial client-side state", ) app_tools: list[AppTool] | None = Field( default=None, description="App-provided tools exposed to an MCP Apps host", ) defs: list[Any] | None = Field( default=None, description="Reusable component definitions (Define instances)", ) stylesheets: list[str] | None = Field( default=None, description="External CSS URLs to load as stylesheets", ) css: list[str] | None = Field( default=None, description="Inline CSS strings to inject as ") mode_val = self.mode if self.mode is not None else _theme_mode(self.theme) if mode_val: head_parts.append( f' """ _CDN_HEAD = """\\ """ _EXTERNAL_HEAD = """\\