!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RevealMermaid=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},n=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),r={exports:{}},i=n,a=Object.defineProperty,o=function(t,e){try{a(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e},s=o,c="__core-js_shared__",u=n[c]||s(c,{}),l=u;(r.exports=function(t,e){return l[t]||(l[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var h,f,d=Function.prototype,p=d.bind,y=d.call,g=p&&p.bind(y),v=p?function(t){return t&&g(y,t)}:function(t){return t&&function(){return y.apply(t,arguments)}},m=n.TypeError,b=function(t){if(null==t)throw m("Can't call method on "+t);return t},_=b,x=n.Object,w=function(t){return x(_(t))},k=w,T=v({}.hasOwnProperty),E=Object.hasOwn||function(t,e){return T(k(t),e)},C=v,S=0,A=Math.random(),M=C(1..toString),N=function(t){return"Symbol("+(void 0===t?"":t)+")_"+M(++S+A,36)},D=function(t){return"function"==typeof t},O=n,B=D,L=function(t){return B(t)?t:void 0},I=function(t,e){return arguments.length<2?L(O[t]):O[t]&&O[t][e]},R=n,F=I("navigator","userAgent")||"",P=R.process,j=R.Deno,Y=P&&P.versions||j&&j.version,z=Y&&Y.v8;z&&(f=(h=z.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!f&&F&&(!(h=F.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=F.match(/Chrome\/(\d+)/))&&(f=+h[1]);var U=function(t){try{return!!t()}catch(t){return!0}},q=f,H=U,$=!!Object.getOwnPropertySymbols&&!H((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&q&&q<41})),W=$&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,V=n,G=r.exports,X=E,Z=N,K=$,Q=W,J=G("wks"),tt=V.Symbol,et=tt&&tt.for,nt=Q?tt:tt&&tt.withoutSetter||Z,rt=function(t){if(!X(J,t)||!K&&"string"!=typeof J[t]){var e="Symbol."+t;K&&X(tt,t)?J[t]=tt[t]:J[t]=Q&&et?et(e):nt(e)}return J[t]},it={};it[rt("toStringTag")]="z";var at="[object z]"===String(it),ot={exports:{}},st=!U((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),ct={},ut=D,lt=function(t){return"object"==typeof t?null!==t:ut(t)},ht=lt,ft=n.document,dt=ht(ft)&&ht(ft.createElement),pt=function(t){return dt?ft.createElement(t):{}},yt=pt,gt=!st&&!U((function(){return 7!=Object.defineProperty(yt("div"),"a",{get:function(){return 7}}).a})),vt=n,mt=lt,bt=vt.String,_t=vt.TypeError,xt=function(t){if(mt(t))return t;throw _t(bt(t)+" is not an object")},wt=Function.prototype.call,kt=wt.bind?wt.bind(wt):function(){return wt.apply(wt,arguments)},Tt=v({}.isPrototypeOf),Et=I,Ct=D,St=Tt,At=W,Mt=n.Object,Nt=At?function(t){return"symbol"==typeof t}:function(t){var e=Et("Symbol");return Ct(e)&&St(e.prototype,Mt(t))},Dt=n.String,Ot=function(t){try{return Dt(t)}catch(t){return"Object"}},Bt=D,Lt=Ot,It=n.TypeError,Rt=function(t){if(Bt(t))return t;throw It(Lt(t)+" is not a function")},Ft=Rt,Pt=function(t,e){var n=t[e];return null==n?void 0:Ft(n)},jt=kt,Yt=D,zt=lt,Ut=n.TypeError,qt=kt,Ht=lt,$t=Nt,Wt=Pt,Vt=function(t,e){var n,r;if("string"===e&&Yt(n=t.toString)&&!zt(r=jt(n,t)))return r;if(Yt(n=t.valueOf)&&!zt(r=jt(n,t)))return r;if("string"!==e&&Yt(n=t.toString)&&!zt(r=jt(n,t)))return r;throw Ut("Can't convert object to primitive value")},Gt=rt,Xt=n.TypeError,Zt=Gt("toPrimitive"),Kt=function(t,e){if(!Ht(t)||$t(t))return t;var n,r=Wt(t,Zt);if(r){if(void 0===e&&(e="default"),n=qt(r,t,e),!Ht(n)||$t(n))return n;throw Xt("Can't convert object to primitive value")}return void 0===e&&(e="number"),Vt(t,e)},Qt=Nt,Jt=function(t){var e=Kt(t,"string");return Qt(e)?e:e+""},te=st,ee=gt,ne=xt,re=Jt,ie=n.TypeError,ae=Object.defineProperty;ct.f=te?ae:function(t,e,n){if(ne(t),e=re(e),ne(n),ee)try{return ae(t,e,n)}catch(t){}if("get"in n||"set"in n)throw ie("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var oe=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},se=ct,ce=oe,ue=st?function(t,e,n){return se.f(t,e,ce(1,n))}:function(t,e,n){return t[e]=n,t},le=D,he=u,fe=v(Function.toString);le(he.inspectSource)||(he.inspectSource=function(t){return fe(t)});var de,pe,ye,ge=he.inspectSource,ve=D,me=ge,be=n.WeakMap,_e=ve(be)&&/native code/.test(me(be)),xe=r.exports,we=N,ke=xe("keys"),Te=function(t){return ke[t]||(ke[t]=we(t))},Ee={},Ce=_e,Se=n,Ae=v,Me=lt,Ne=ue,De=E,Oe=u,Be=Te,Le=Ee,Ie="Object already initialized",Re=Se.TypeError,Fe=Se.WeakMap;if(Ce||Oe.state){var Pe=Oe.state||(Oe.state=new Fe),je=Ae(Pe.get),Ye=Ae(Pe.has),ze=Ae(Pe.set);de=function(t,e){if(Ye(Pe,t))throw new Re(Ie);return e.facade=t,ze(Pe,t,e),e},pe=function(t){return je(Pe,t)||{}},ye=function(t){return Ye(Pe,t)}}else{var Ue=Be("state");Le[Ue]=!0,de=function(t,e){if(De(t,Ue))throw new Re(Ie);return e.facade=t,Ne(t,Ue,e),e},pe=function(t){return De(t,Ue)?t[Ue]:{}},ye=function(t){return De(t,Ue)}}var qe={set:de,get:pe,has:ye,enforce:function(t){return ye(t)?pe(t):de(t,{})},getterFor:function(t){return function(e){var n;if(!Me(e)||(n=pe(e)).type!==t)throw Re("Incompatible receiver, "+t+" required");return n}}},He=st,$e=E,We=Function.prototype,Ve=He&&Object.getOwnPropertyDescriptor,Ge=$e(We,"name"),Xe={EXISTS:Ge,PROPER:Ge&&"something"===function(){}.name,CONFIGURABLE:Ge&&(!He||He&&Ve(We,"name").configurable)},Ze=n,Ke=D,Qe=E,Je=ue,tn=o,en=ge,nn=Xe.CONFIGURABLE,rn=qe.get,an=qe.enforce,on=String(String).split("String");(ot.exports=function(t,e,n,r){var i,a=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet,c=r&&void 0!==r.name?r.name:e;Ke(n)&&("Symbol("===String(c).slice(0,7)&&(c="["+String(c).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Qe(n,"name")||nn&&n.name!==c)&&Je(n,"name",c),(i=an(n)).source||(i.source=on.join("string"==typeof c?c:""))),t!==Ze?(a?!s&&t[e]&&(o=!0):delete t[e],o?t[e]=n:Je(t,e,n)):o?t[e]=n:tn(e,n)})(Function.prototype,"toString",(function(){return Ke(this)&&rn(this).source||en(this)}));var sn=v,cn=sn({}.toString),un=sn("".slice),ln=function(t){return un(cn(t),8,-1)},hn=n,fn=at,dn=D,pn=ln,yn=rt("toStringTag"),gn=hn.Object,vn="Arguments"==pn(function(){return arguments}()),mn=fn?pn:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=gn(t),yn))?n:vn?pn(e):"Object"==(r=pn(e))&&dn(e.callee)?"Arguments":r},bn=mn,_n=at?{}.toString:function(){return"[object "+bn(this)+"]"},xn=at,wn=ot.exports,kn=_n;xn||wn(Object.prototype,"toString",kn,{unsafe:!0});var Tn=pt("span").classList,En=Tn&&Tn.constructor&&Tn.constructor.prototype,Cn=En===Object.prototype?void 0:En,Sn=Rt,An=v(v.bind),Mn=function(t,e){return Sn(t),void 0===e?t:An?An(t,e):function(){return t.apply(e,arguments)}},Nn=v,Dn=U,On=ln,Bn=n.Object,Ln=Nn("".split),In=Dn((function(){return!Bn("z").propertyIsEnumerable(0)}))?function(t){return"String"==On(t)?Ln(t,""):Bn(t)}:Bn,Rn=Math.ceil,Fn=Math.floor,Pn=function(t){var e=+t;return e!=e||0===e?0:(e>0?Fn:Rn)(e)},jn=Pn,Yn=Math.min,zn=function(t){return t>0?Yn(jn(t),9007199254740991):0},Un=function(t){return zn(t.length)},qn=ln,Hn=Array.isArray||function(t){return"Array"==qn(t)},$n=v,Wn=U,Vn=D,Gn=mn,Xn=ge,Zn=function(){},Kn=[],Qn=I("Reflect","construct"),Jn=/^\s*(?:class|function)\b/,tr=$n(Jn.exec),er=!Jn.exec(Zn),nr=function(t){if(!Vn(t))return!1;try{return Qn(Zn,Kn,t),!0}catch(t){return!1}},rr=!Qn||Wn((function(){var t;return nr(nr.call)||!nr(Object)||!nr((function(){t=!0}))||t}))?function(t){if(!Vn(t))return!1;switch(Gn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return er||!!tr(Jn,Xn(t))}:nr,ir=n,ar=Hn,or=rr,sr=lt,cr=rt("species"),ur=ir.Array,lr=function(t){var e;return ar(t)&&(e=t.constructor,(or(e)&&(e===ur||ar(e.prototype))||sr(e)&&null===(e=e[cr]))&&(e=void 0)),void 0===e?ur:e},hr=Mn,fr=In,dr=w,pr=Un,yr=function(t,e){return new(lr(t))(0===e?0:e)},gr=v([].push),vr=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,a=6==t,o=7==t,s=5==t||a;return function(c,u,l,h){for(var f,d,p=dr(c),y=fr(p),g=hr(u,l),v=pr(y),m=0,b=h||yr,_=e?b(c,v):n||o?b(c,0):void 0;v>m;m++)if((s||m in y)&&(d=g(f=y[m],m,p),t))if(e)_[m]=d;else if(d)switch(t){case 3:return!0;case 5:return f;case 6:return m;case 2:gr(_,f)}else switch(t){case 4:return!1;case 7:gr(_,f)}return a?-1:r||i?i:_}},mr={forEach:vr(0),map:vr(1),filter:vr(2),some:vr(3),every:vr(4),find:vr(5),findIndex:vr(6),filterReject:vr(7)},br=U,_r=mr.forEach,xr=function(t,e){var n=[][t];return!!n&&br((function(){n.call(null,e||function(){throw 1},1)}))}("forEach")?[].forEach:function(t){return _r(this,t,arguments.length>1?arguments[1]:void 0)},wr=n,kr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Tr=Cn,Er=xr,Cr=ue,Sr=function(t){if(t&&t.forEach!==Er)try{Cr(t,"forEach",Er)}catch(e){t.forEach=Er}};for(var Ar in kr)kr[Ar]&&Sr(wr[Ar]&&wr[Ar].prototype);Sr(Tr);var Mr={},Nr={},Dr={}.propertyIsEnumerable,Or=Object.getOwnPropertyDescriptor,Br=Or&&!Dr.call({1:2},1);Nr.f=Br?function(t){var e=Or(this,t);return!!e&&e.enumerable}:Dr;var Lr=In,Ir=b,Rr=function(t){return Lr(Ir(t))},Fr=st,Pr=kt,jr=Nr,Yr=oe,zr=Rr,Ur=Jt,qr=E,Hr=gt,$r=Object.getOwnPropertyDescriptor;Mr.f=Fr?$r:function(t,e){if(t=zr(t),e=Ur(e),Hr)try{return $r(t,e)}catch(t){}if(qr(t,e))return Yr(!Pr(jr.f,t,e),t[e])};var Wr={},Vr=Pn,Gr=Math.max,Xr=Math.min,Zr=Rr,Kr=function(t,e){var n=Vr(t);return n<0?Gr(n+e,0):Xr(n,e)},Qr=Un,Jr=function(t){return function(e,n,r){var i,a=Zr(e),o=Qr(a),s=Kr(r,o);if(t&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((t||s in a)&&a[s]===n)return t||s||0;return!t&&-1}},ti={includes:Jr(!0),indexOf:Jr(!1)},ei=E,ni=Rr,ri=ti.indexOf,ii=Ee,ai=v([].push),oi=function(t,e){var n,r=ni(t),i=0,a=[];for(n in r)!ei(ii,n)&&ei(r,n)&&ai(a,n);for(;e.length>i;)ei(r,n=e[i++])&&(~ri(a,n)||ai(a,n));return a},si=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ci=oi,ui=si.concat("length","prototype");Wr.f=Object.getOwnPropertyNames||function(t){return ci(t,ui)};var li={};li.f=Object.getOwnPropertySymbols;var hi=I,fi=Wr,di=li,pi=xt,yi=v([].concat),gi=hi("Reflect","ownKeys")||function(t){var e=fi.f(pi(t)),n=di.f;return n?yi(e,n(t)):e},vi=E,mi=gi,bi=Mr,_i=ct,xi=U,wi=D,ki=/#|\.prototype\./,Ti=function(t,e){var n=Ci[Ei(t)];return n==Ai||n!=Si&&(wi(e)?xi(e):!!e)},Ei=Ti.normalize=function(t){return String(t).replace(ki,".").toLowerCase()},Ci=Ti.data={},Si=Ti.NATIVE="N",Ai=Ti.POLYFILL="P",Mi=Ti,Ni=n,Di=Mr.f,Oi=ue,Bi=ot.exports,Li=o,Ii=function(t,e){for(var n=mi(e),r=_i.f,i=bi.f,a=0;a1?arguments[1]:void 0,a=void 0!==i;a&&(i=sa(i,r>2?arguments[2]:void 0));var o,s,c,u,l,h,f=ga(e),d=0;if(!f||this==va&&ha(f))for(o=da(e),s=n?new this(o):va(o);o>d;d++)h=a?i(e[d],d):e[d],pa(s,d,h);else for(l=(u=ya(e,f)).next,s=n?new this:[];!(c=ca(l,u)).done;d++)h=a?la(u,i,[c.value,d],!0):c.value,pa(s,d,h);return s.length=d,s},ka=function(t,e){if(!e&&!ba)return!1;var n=!1;try{var r={};r[ma]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n};Fi({target:"Array",stat:!0,forced:!ka((function(t){Array.from(t)}))},{from:wa});var Ta,Ea=mn,Ca=n.String,Sa=function(t){if("Symbol"===Ea(t))throw TypeError("Cannot convert a Symbol value to a string");return Ca(t)},Aa=v,Ma=Pn,Na=Sa,Da=b,Oa=Aa("".charAt),Ba=Aa("".charCodeAt),La=Aa("".slice),Ia=function(t){return function(e,n){var r,i,a=Na(Da(e)),o=Ma(n),s=a.length;return o<0||o>=s?t?"":void 0:(r=Ba(a,o))<55296||r>56319||o+1===s||(i=Ba(a,o+1))<56320||i>57343?t?Oa(a,o):r:t?La(a,o,o+2):i-56320+(r-55296<<10)+65536}},Ra={codeAt:Ia(!1),charAt:Ia(!0)},Fa=oi,Pa=si,ja=Object.keys||function(t){return Fa(t,Pa)},Ya=ct,za=xt,Ua=Rr,qa=ja,Ha=st?Object.defineProperties:function(t,e){za(t);for(var n,r=Ua(e),i=qa(e),a=i.length,o=0;a>o;)Ya.f(t,n=i[o++],r[n]);return t},$a=I("document","documentElement"),Wa=xt,Va=Ha,Ga=si,Xa=Ee,Za=$a,Ka=pt,Qa=Te("IE_PROTO"),Ja=function(){},to=function(t){return"