bookstack/public/dist/app.js

55 lines
291 KiB
JavaScript
Raw Normal View History

var xu=Object.create;var Et=Object.defineProperty;var ku=Object.getOwnPropertyDescriptor;var Cu=Object.getOwnPropertyNames;var _u=Object.getPrototypeOf,Eu=Object.prototype.hasOwnProperty;var Su=(i,e,t)=>e in i?Et(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Au=(i,e)=>()=>(i&&(e=i(i=0)),e);var E=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),St=(i,e)=>{for(var t in e)Et(i,t,{get:e[t],enumerable:!0})},Oo=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Cu(e))!Eu.call(i,r)&&r!==t&&Et(i,r,{get:()=>e[r],enumerable:!(n=ku(e,r))||n.enumerable});return i};var Ro=(i,e,t)=>(t=i!=null?xu(_u(i)):{},Oo(e||!i||!i.__esModule?Et(t,"default",{value:i,enumerable:!0}):t,i)),Du=i=>Oo(Et({},"__esModule",{value:!0}),i);var se=(i,e,t)=>(Su(i,typeof e!="symbol"?e+"":e,t),t),Tu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var re=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)};var T=(i,e,t)=>(Tu(i,e,"access private method"),t);var _s=E((mb,Sh)=>{Sh.exports={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvb
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u01
`," "],Mh=["{","}","|","\\","^","`"].concat($h),Fh=["'"].concat(Mh),qs=["%","/","?",";","#"].concat(Fh),Bs=["/","?","#"],qh=255,Ps=/^[+a-z0-9A-Z_-]{0,63}$/,Bh=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Os={javascript:!0,"javascript:":!0},Rs={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ph(i,e){if(i&&i instanceof ln)return i;var t=new ln;return t.parse(i,e),t}ln.prototype.parse=function(i,e){var t,n,r,o,s,a=i;if(a=a.trim(),!e&&i.split("#").length===1){var l=Ih.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=Th.exec(a);if(c&&(c=c[0],r=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(e||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=a.substr(0,2)==="//",s&&!(c&&Os[c])&&(a=a.substr(2),this.slashes=!0)),!Os[c]&&(s||c&&!Rs[c])){var u=-1;for(t=0;t<Bs.length;t++)o=a.indexOf(Bs[t]),o!==-1&&(u===-1||o<u)&&(u=o);var h,d;for(u===-1?d=a.lastIndexOf("@"):d=a.lastIndexOf("@",u),d!==-1&&(h=a.slice(0,d),a=a.slice(d+1),this.auth=h),u=-1,t=0;t<qs.length;t++)o=a.indexOf(qs[t]),o!==-1&&(u===-1||o<u)&&(u=o);u===-1&&(u=a.length),a[u-1]===":"&&u--;var p=a.slice(0,u);a=a.slice(u),this.parseHost(p),this.hostname=this.hostname||"";var f=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!f){var m=this.hostname.split(/\./);for(t=0,n=m.length;t<n;t++){var y=m[t];if(y&&!y.match(Ps)){for(var v="",b=0,k=y.length;b<k;b++)y.charCodeAt(b)>127?v+="x":v+=y[b];if(!v.match(Ps)){var w=m.slice(0,t),_=m.slice(t+1),x=y.match(Bh);x&&(w.push(x[1]),_.unshift(x[2])),_.length&&(a=_.join(".")+a),this.hostname=w.join(".");break}}}}this.hostname.length>qh&&(this.hostname=""),f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var S=a.indexOf("#");S!==-1&&(this.hash=a.substr(S),a=a.slice(0,S));var D=a.indexOf("?");return D!==-1&&(this.search=a.substr(D),a=a.slice(0,D)),a&&(this.pathname=a),Rs[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ln.prototype.parseHost=function(i){var e=Lh.exec(i);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),i=i.substr(0,i.length-e.length)),i&&(this.hostname=i)};Ns.exports=Ph});var Vr=E((kb,Zt)=>{"use strict";Zt.exports.encode=Ts();Zt.exports.decode=$s();Zt.exports.format=Fs();Zt.exports.parse=zs()});var Wr=E((Cb,Hs)=>{Hs.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var Gr=E((_b,Us)=>{Us.exports=/[\0-\x1F\x7F-\x9F]/});var Vs=E((Eb,js)=>{js.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/});var Zr=E((Sb,Ws)=>{Ws.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var Gs=E(gt=>{"use strict";gt.Any=Wr();gt.Cc=Gr();gt.Cf=Vs();gt.P=on();gt.Z=Zr()});var R=E(J=>{"use strict";function Oh(i){return Object.prototype.toString.call(i)}function Rh(i){return Oh(i)==="[object String]"}var Nh=Object.prototype.hasOwnProperty;function Ks(i,e){return Nh.call(i,e)}function zh(i){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(t){if(t){if(typeof t!="object")throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){i[n]=t[n]})}}),i}function Hh(i,e,t){return[].concat(i.slice(0,e),t,i.slice(e+1))}function Xs(i){return!(i>=55296&&i<=57343||i>=64976&&i<=65007||(i&65535)===65535||(i&65535)===65534||i>=0&&i<=8||i===11||i>=14&&i<=31||i>=127&&i<=159||i>1114111)}function Ys(i){if(i>65535){i-=65536;var e=55296+(i>>10),t=56320+(i&1023);return String.fromCharCode(e,t)}return String.fromCharCode(i)}var Js=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,Uh=/&([a-z#][a-z0-9]{1,31});/gi,jh=new RegExp(Js.source+"|"+Uh.source,"gi"),Vh=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,Zs=jr();function Wh(i,e){var t=0;return Ks(Zs,e)?Zs[e]:e.charCodeAt(0)===35&&Vh.test(e)&&(t=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Xs(t))?Ys(t):i}function Gh(i){return i.indexOf("\\")<0?i:i.replace(Js,"$1")}function Zh(i){return i.indexOf("\\
`};De.fence=function(i,e,t,n,r){var o=i[e],s=o.info?ud(o.info).trim():"",a="",l="",c,u,h,d,p;return s&&(h=s.split(/(\s+)/g),a=h[0],l=h.slice(2).join("")),t.highlight?c=t.highlight(o.content,a,l)||Je(o.content):c=Je(o.content),c.indexOf("<pre")===0?c+`
`:s?(u=o.attrIndex("class"),d=o.attrs?o.attrs.slice():[],u<0?d.push(["class",t.langPrefix+a]):(d[u]=d[u].slice(),d[u][1]+=" "+t.langPrefix+a),p={attrs:d},"<pre><code"+r.renderAttrs(p)+">"+c+`</code></pre>
`):"<pre><code"+r.renderAttrs(o)+">"+c+`</code></pre>
`};De.image=function(i,e,t,n,r){var o=i[e];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,t,n),r.renderToken(i,e,t)};De.hardbreak=function(i,e,t){return t.xhtmlOut?`<br />
`:`<br>
`};De.softbreak=function(i,e,t){return t.breaks?t.xhtmlOut?`<br />
`:`<br>
`:`
`};De.text=function(i,e){return Je(i[e].content)};De.html_block=function(i,e){return i[e].content};De.html_inline=function(i,e){return i[e].content};function bt(){this.rules=cd({},De)}bt.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+Je(e.attrs[t][0])+'="'+Je(e.attrs[t][1])+'"';return r};bt.prototype.renderToken=function(e,t,n){var r,o="",s=!1,a=e[t];return a.hidden?"":(a.block&&a.nesting!==-1&&t&&e[t-1].hidden&&(o+=`
`),o+=(a.nesting===-1?"</":"<")+a.tag,o+=this.renderAttrs(a),a.nesting===0&&n.xhtmlOut&&(o+=" /"),a.block&&(s=!0,a.nesting===1&&t+1<e.length&&(r=e[t+1],(r.type==="inline"||r.hidden||r.nesting===-1&&r.tag===a.tag)&&(s=!1))),o+=s?`>
`:">",o)};bt.prototype.renderInline=function(i,e,t){for(var n,r="",o=this.rules,s=0,a=i.length;s<a;s++)n=i[s].type,typeof o[n]<"u"?r+=o[n](i,s,e,t,this):r+=this.renderToken(i,s,e);return r};bt.prototype.renderInlineAsText=function(i,e,t){for(var n="",r=0,o=i.length;r<o;r++)i[r].type==="text"?n+=i[r].content:i[r].type==="image"?n+=this.renderInlineAsText(i[r].children,e,t):i[r].type==="softbreak"&&(n+=`
`);return n};bt.prototype.render=function(i,e,t){var n,r,o,s="",a=this.rules;for(n=0,r=i.length;n<r;n++)o=i[n].type,o==="inline"?s+=this.renderInline(i[n].children,e,t):typeof a[o]<"u"?s+=a[i[n].type](i,n,e,t,this):s+=this.renderToken(i,n,e,t);return s};aa.exports=bt});var un=E((Fb,ca)=>{"use strict";function Ce(){this.__rules__=[],this.__cache__=null}Ce.prototype.__find__=function(i){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===i)return e;return-1};Ce.prototype.__compile__=function(){var i=this,e=[""];i.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(n){e.indexOf(n)<0&&e.push(n)})}),i.__cache__={},e.forEach(function(t){i.__cache__[t]=[],i.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||i.__cache__[t].push(n.fn))})})};Ce.prototype.at=function(i,e,t){var n=this.__find__(i),r=t||{};if(n===-1)throw new Error("Parser rule not found: "+i);this.__rules__[n].fn=e,this.__rules__[n].alt=r.alt||[],this.__cache__=null};Ce.prototype.before=function(i,e,t,n){var r=this.__find__(i),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(r,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null};Ce.prototype.after=function(i,e,t,n){var r=this.__find__(i),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(r+1,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null};Ce.prototype.push=function(i,e,t){var n=t||{};this.__rules__.push({name:i,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null};Ce.prototype.enable=function(i,e){Array.isArray(i)||(i=[i]);var t=[];return i.forEach(function(n){var r=this.__find__(n);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!0,t.push(n)},this),this.__cache__=null,t};Ce.prototype.enableOnly=function(i,e){Array.isArray(i)||(i=[i]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(i,e)};Ce.prototype.disable=function(i,e){Array.isArray(i)||(i=[i]);var t=[];return i.forEach(function(n){var r=this.__find__(n);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!1,t.push(n)},this),this.__cache__=null,t};Ce.prototype.getRules=function(i){return this.__cache__===null&&this.__compile__(),this.__cache__[i]||[]};ca.exports=Ce});var ha=E((qb,ua)=>{"use strict";var hd=/\r\n?|\n/g,dd=/\0/g;ua.exports=function(e){var t;t=e.src.replace(hd,`
`),t=t.replace(dd,"\uFFFD"),e.src=t}});var pa=E((Bb,da)=>{"use strict";da.exports=function(e){var t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}});var ma=E((Pb,fa)=>{"use strict";fa.exports=function(e){var t=e.tokens,n,r,o;for(r=0,o=t.length;r<o;r++)n=t[r],n.type==="inline"&&e.md.inline.parse(n.content,e.md,e.env,n.children)}});var ba=E((Ob,ga)=>{"use strict";var pd=R().arrayReplaceAt;function fd(i){return/^<a[>\s]/i.test(i)}function md(i){return/^<\/a\s*>/i.test(i)}ga.exports=function(e){var t,n,r,o,s,a,l,c,u,h,d,p,f,m,y,v,b=e.tokens,k;if(e.md.options.linkify){for(n=0,r=b.length;n<r;n++)if(!(b[n].type!=="inline"||!e.md.linkify.pretest(b[n].content)))for(o=b[n].children,f=0,t=o.length-1;t>=0;t--){if(a=o[t],a.type==="link_close"){for(t--;o[t].level!==a.level&&o[t].type!=="link_open";)t--;continue}if(a.type==="html_inline"&&(fd(a.content)&&f>0&&f--,md(a.content)&&f++),!(f>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(u=a.content,k=e.md.linkify.match(u),l=[],p=a.level,d=0,k.length>0&&k[0].index===0&&t>0&&o[t-1].type==="text_special"&&(k=k.slice(1)),c=0;c<k.length;c++)m=k[c].url,y=e.md.normalizeLink(m),e.md.validateLink(y)&&(v=k[c].text,k[c].schema?k[c].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),h=k[c].index,h>d&&(s=new e.Token("text","",0),s.content=u.slice(d,h),s.level=p,l.push(s)),s=new e.Token("link_open","a",1),s.attrs=[["href",y]],s.level=p++,s.markup="linkify",s.info="auto",l.push(s),s=new e.Token("text","",0),s.content=v,s.level=p,l.push(s),s=new e.Token("link_close","a",-1),s.level=--p,s.markup="linkify",s.info="auto",l.push(s),d=k[c].lastIndex);d<u.length&&(s=new e.Token("text","",0),s.content=u.slice(d),s.level=p,l.push(s)),b[n].children=o=pd(o,t,l)}}}}});var ya=E((Rb,wa)=>{"use strict";var va=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,gd=/\((c|tm|r)\)/i,bd=/\((c|tm|r)\)/ig,vd={c:"\xA9",r:"\xAE",tm:"\u2122"};function wd(i,e){return vd[e.toLowerCase()]}function yd(i){var e,t,n=0;for(e=i.length-1;e>=0;e--)t=i[e],t.type==="text"&&!n&&(t.content=t.content.replace(bd,wd)),t.type==="link_open"&&t.info==="auto"&&n--,t.type==="link_close"&&t.info==="auto"&&n++}function xd(i){var e,t,n=0;for(e=i.length-1;e>=0;e--)t=i[e],t.type==="text"&&!n&&va.test(t.content)&&(t.content=t.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),t.type==="link_open"&&t.info==="auto"&&n--,t.type==="link_close"&&t.info==="auto"&&n++}wa.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(gd.test(e.tokens[t].content)&&yd(e.tokens[t].children),va.test(e.tokens[t].content)&&xd(e.tokens[t].children))}});var Aa=E((Nb,Sa)=>{"use strict";var xa=R().isWhiteSpace,ka=R().isPunctChar,Ca=R().isMdAsciiPunct,kd=/['"]/,_a=/['"]/g,Ea="\u2019";function hn(i,e,t){return i.slice(0,e)+t+i.slice(e+1)}function Cd(i,e){var t,n,r,o,s,a,l,c,u,h,d,p,f,m,y,v,b,k,w,_,x;for(w=[],t=0;t<i.length;t++){for(n=i[t],l=i[t].level,b=w.length-1;b>=0&&!(w[b].level<=l);b--);if(w.length=b+1,n.type==="text"){r=n.content,s=0,a=r.length;e:for(;s<a&&(_a.lastIndex=s,o=_a.exec(r),!!o);){if(y=v=!0,s=o.index+1,k=o[0]==="'",u=32,o.index-1>=0)u=r.charCodeAt(o.index-1);else for(b=t-1;b>=0&&!(i[b].type==="softbreak"||i[b].type==="hardbreak");b--)if(i[b].content){u=i[b].content.charCodeAt(i[b].content.length-1);break}if(h=32,s<a)h=r.charCodeAt(s);else for(b=t+1;b<i.length&&!(i[b].type==="softbreak"||i[b].type==="hardbreak");b++)if(i[b].content){h=i[b].content.charCodeAt(0);break}if(d=Ca(u)||ka(String.fromCharCode(u)),p=Ca(h)||ka(String.fromCharCode(h)),f=xa(u),m=xa(h),m?y=!1:p&&(f||d||(y=!1)),f?v=!1:d&&(m||p||(v=!1)),h===34&&o[0]==='"'&&u>=48&&u<=57&&(v=y=!1),y&&v&&(y=
`,s.map=[t,e.line],!0}});var Ha=E((Gb,za)=>{"use strict";za.exports=function(e,t,n,r){var o,s,a,l,c,u,h,d=!1,p=e.bMarks[t]+e.tShift[t],f=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||p+3>f||(o=e.src.charCodeAt(p),o!==126&&o!==96)||(c=p,p=e.skipChars(p,o),s=p-c,s<3)||(h=e.src.slice(c,p),a=e.src.slice(p,f),o===96&&a.indexOf(String.fromCharCode(o))>=0))return!1;if(r)return!0;for(l=t;l++,!(l>=n||(p=c=e.bMarks[l]+e.tShift[l],f=e.eMarks[l],p<f&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(p)===o&&!(e.sCount[l]-e.blkIndent>=4)&&(p=e.skipChars(p,o),!(p-c<s)&&(p=e.skipSpaces(p),!(p<f)))){d=!0;break}return s=e.sCount[t],e.line=l+(d?1:0),u=e.push("fence","code",0),u.info=a,u.content=e.getLines(t+1,l,s,!0),u.markup=h,u.map=[t,e.line],!0}});var Va=E((Zb,ja)=>{"use strict";var Ua=R().isSpace;ja.exports=function(e,t,n,r){var o,s,a,l,c,u,h,d,p,f,m,y,v,b,k,w,_,x,S,D,q=e.lineMax,L=e.bMarks[t]+e.tShift[t],I=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(L++)!==62)return!1;if(r)return!0;for(l=p=e.sCount[t]+1,e.src.charCodeAt(L)===32?(L++,l++,p++,o=!1,w=!0):e.src.charCodeAt(L)===9?(w=!0,(e.bsCount[t]+p)%4===3?(L++,l++,p++,o=!1):o=!0):w=!1,f=[e.bMarks[t]],e.bMarks[t]=L;L<I&&(s=e.src.charCodeAt(L),Ua(s));){s===9?p+=4-(p+e.bsCount[t]+(o?1:0))%4:p++;L++}for(m=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(w?1:0),u=L>=I,b=[e.sCount[t]],e.sCount[t]=p-l,k=[e.tShift[t]],e.tShift[t]=L-e.bMarks[t],x=e.md.block.ruler.getRules("blockquote"),v=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(D=e.sCount[d]<e.blkIndent,L=e.bMarks[d]+e.tShift[d],I=e.eMarks[d],!(L>=I));d++){if(e.src.charCodeAt(L++)===62&&!D){for(l=p=e.sCount[d]+1,e.src.charCodeAt(L)===32?(L++,l++,p++,o=!1,w=!0):e.src.charCodeAt(L)===9?(w=!0,(e.bsCount[d]+p)%4===3?(L++,l++,p++,o=!1):o=!0):w=!1,f.push(e.bMarks[d]),e.bMarks[d]=L;L<I&&(s=e.src.charCodeAt(L),Ua(s));){s===9?p+=4-(p+e.bsCount[d]+(o?1:0))%4:p++;L++}u=L>=I,m.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(w?1:0),b.push(e.sCount[d]),e.sCount[d]=p-l,k.push(e.tShift[d]),e.tShift[d]=L-e.bMarks[d];continue}if(u)break;for(_=!1,a=0,c=x.length;a<c;a++)if(x[a](e,d,n,!0)){_=!0;break}if(_){e.lineMax=d,e.blkIndent!==0&&(f.push(e.bMarks[d]),m.push(e.bsCount[d]),k.push(e.tShift[d]),b.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}f.push(e.bMarks[d]),m.push(e.bsCount[d]),k.push(e.tShift[d]),b.push(e.sCount[d]),e.sCount[d]=-1}for(y=e.blkIndent,e.blkIndent=0,S=e.push("blockquote_open","blockquote",1),S.markup=">",S.map=h=[t,0],e.md.block.tokenize(e,t,d),S=e.push("blockquote_close","blockquote",-1),S.markup=">",e.lineMax=q,e.parentType=v,h[1]=e.line,a=0;a<k.length;a++)e.bMarks[a+t]=f[a],e.tShift[a+t]=k[a],e.sCount[a+t]=b[a],e.bsCount[a+t]=m[a];return e.blkIndent=y,!0}});var Ga=E((Kb,Wa)=>{"use strict";var Sd=R().isSpace;Wa.exports=function(e,t,n,r){var o,s,a,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||(o=e.src.charCodeAt(c++),o!==42&&o!==45&&o!==95))return!1;for(s=1;c<u;){if(a=e.src.charCodeAt(c++),a!==o&&!Sd(a))return!1;a===o&&s++}return s<3?!1:(r||(e.line=t+1,l=e.push("hr","hr",0),l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(o))),!0)}});var Ja=E((Xb,Ya)=>{"use strict";var Xa=R().isSpace;function Za(i,e){var t,n,r,o;return n=i.bMarks[e]+i.tShift[e],r=i.eMarks[e],t=i.src.charCodeAt(n++),t!==42&&t!==45&&t!==43||n<r&&(o=i.src.charCodeAt(n),!Xa(o))?-1:n}function Ka(i,e){var t,n=i.bMarks[e]+i.tShift[e],r=n,o=i.eMarks[e];if(r+1>=o||(t=i.src.charCodeAt(r++),t<48||t>57))return-1;for(;;){if(r>=o)return-1;if(t=i.src.charCodeAt(r++),t>=48&&t<=57){if(r-n>=10)return-1;continue}if(t===41||t===46)break;return-1}return r<o&&(t=i.src.charCodeAt(r),!Xa(t))?-1:r}function Ad(i,e){var t,n,r=i.level+2;for(t=e+2,n=i.tokens.length-2;t<n;t++)i.tokens[t].level===r&&i.tokens[t].type==="paragraph_open"&&(i.tokens[t+2].hidden=!0,i.tokens[t].hidden=!0,t+=2)}Ya.exports=function(e,t,n,r){var o,s,a,l,c,u,h,d,p,f,m,y,v,b,k,w,_,x,S,D,q,L,I,H,N,ee,ge,V,Oe=!1,Re=!0;if(e.sCount[t]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&e.parentType==="paragraph"&&e.sCount[t]>=e.blkInde
`);cr(e)}}function qu(i){i.status&&i.status>=400&&i.data&&i.data.message&&cr(i.data.message)}var hr={};St(hr,{HttpError:()=>oi,createXMLHttpRequest:()=>Pu,delete:()=>Hu,get:()=>Ou,patch:()=>zu,post:()=>Ru,put:()=>Nu});async function Bu(i){if(i.status===204)return null;let t=(i.headers.get("Content-Type")||"").split(";")[0].split("/").pop();return t==="javascript"||t==="json"?i.json():i.text()}var oi=class extends Error{constructor(e,t){super(e.statusText),this.data=t,this.headers=e.headers,this.redirected=e.redirected,this.status=e.status,this.statusText=e.statusText,this.url=e.url,this.original=e}};function Pu(i,e,t={}){let n=document.querySelector("meta[name=token]").getAttribute("content"),r=new XMLHttpRequest;for(let[o,s]of Object.entries(t))r.addEventListener(o,s.bind(r));return r.open(i,e),r.withCredentials=!0,r.setRequestHeader("X-CSRF-TOKEN",n),r}async function No(i,e={}){let t=i;if(t.startsWith("http")||(t=window.baseUrl(t)),e.params){let l=new URL(t);for(let c of Object.keys(e.params)){let u=e.params[c];typeof u<"u"&&u!==null&&l.searchParams.set(c,u)}t=l.toString()}let n=document.querySelector("meta[name=token]").getAttribute("content"),r={...e,credentials:"same-origin"};r.headers={...r.headers||{},baseURL:window.baseUrl(""),"X-CSRF-TOKEN":n};let o=await fetch(t,r),s=await Bu(o),a={data:s,headers:o.headers,redirected:o.redirected,status:o.status,statusText:o.statusText,url:o.url,original:o};if(!o.ok)throw new oi(o,s);return a}async function si(i,e,t=null){let n={method:i,body:t};return typeof t=="object"&&!(t instanceof FormData)&&(n.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},n.body=JSON.stringify(t)),t instanceof FormData&&i!=="post"&&(t.append("_method",i),n.method="post"),No(e,n)}async function Ou(i,e={}){return No(i,{method:"GET",params:e})}async function Ru(i,e=null){return si("POST",i,e)}async function Nu(i,e=null){return si("PUT",i,e)}async function zu(i,e=null){return si("PATCH",i,e)}async function Hu(i,e=null){return si("DELETE",i,e)}var dr=class{constructor(){this.store=new Map,this.parseTranslations()}parseTranslations(){let e=document.querySelectorAll('meta[name="translation"]');for(let t of e){let n=t.getAttribute("key"),r=t.getAttribute("value");this.store.set(n,r)}}get(e,t){let n=this.getTransText(e);return this.performReplacements(n,t)}getPlural(e,t,n){let r=this.getTransText(e);return this.parsePlural(r,t,n)}parsePlural(e,t,n){let r=e.split("|"),o=/^{([0-9]+)}/,s=/^\[([0-9]+),([0-9*]+)]/,a=null;for(let l of r){let c=l.match(o);if(c!==null&&Number(c[1])===t){a=l.replace(o,"").trim();break}let u=l.match(s);if(u!==null&&Number(u[1])<=t&&(u[2]==="*"||Number(u[2])>=t)){a=l.replace(s,"").trim();break}}return a===null&&r.length>1&&(a=t===1?r[0]:r[1]),a===null&&(a=r[0]),this.performReplacements(a,n)}getTransText(e){let t=this.store.get(e);return t===void 0&&console.warn(`Translation with key "${e}" does not exist`),t}performReplacements(e,t){if(!t)return e;let n=e.match(/:(\S+)/g);if(n===null)return e;let r=e;return n.forEach(o=>{let s=o.substring(1);typeof t[s]>"u"||(r=r.replace(o,t[s]))}),r}},zo=dr;var br={};St(br,{first:()=>Wu,firstOnElement:()=>Zu,get:()=>Gu,init:()=>mr,register:()=>gr});function pr(i){let e=n=>n.slice(0,1).toUpperCase()+n.slice(1),t=i.split("-");return t[0]+t.slice(1).map(e).join("")}function Ho(i){return i.replace(/[A-Z]/g,(e,t)=>(t>0?"-":"")+e.toLowerCase())}var At={},Uo={},fr=new WeakMap;function Uu(i,e){let t={},n={},r=`${i}@`,o=`[refs*="${r}"]`,s=[...e.querySelectorAll(o)];e.matches(o)&&s.push(e);for(let a of s){let l=a.getAttribute("refs").split(" ").filter(c=>c.startsWith(r)).map(c=>c.replace(r,"")).map(pr);for(let c of l)t[c]=a,typeof n[c]>"u"&&(n[c]=[]),n[c].push(a)}return{refs:t,manyRefs:n}}function ju(i,e){let t={},n=`option:${i}:`;for(let{name:r,value:o}of e.attributes)if(r.startsWith(n)){let s=r.replace(n,"");t[pr(s)]=o||""}return t}function Vu(i,e){let t=Uo[i];if(t===void 0)return;let n;try{n=new t,n.$name=i,n.$el=e;let o=Uu(i,e);n.$refs=o.refs,n.$manyRefs=o.manyRefs,n.$opts=ju(i,e),n.setup()}catch(o){console.error("Failed to cre
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var nh="1.15.0";function $e(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var Me=$e(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),jt=$e(/Edge/i),Xo=$e(/firefox/i),Rt=$e(/safari/i)&&!$e(/chrome/i)&&!$e(/android/i),ss=$e(/iP(ad|od|hone)/i),as=$e(/chrome/i)&&$e(/android/i),ls={capture:!1,passive:!1};function P(i,e,t){i.addEventListener(e,t,!Me&&ls)}function B(i,e,t){i.removeEventListener(e,t,!Me&&ls)}function Ai(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function rh(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function xe(i,e,t,n){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&Ai(i,e):Ai(i,e))||n&&i===t)return i;if(i===t)break}while(i=rh(i))}return null}var Yo=/\s+/g;function X(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var n=(" "+i.className+" ").replace(Yo," ").replace(" "+e+" "," ");i.className=(n+(t?" "+e:"")).replace(Yo," ")}}function A(i,e,t){var n=i&&i.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function Xe(i,e){var t="";if(typeof i=="string")t=i;else do{var n=A(i,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function cs(i,e,t){if(i){var n=i.getElementsByTagName(e),r=0,o=n.length;if(t)for(;r<o;r++)t(n[r],r);return n}return[]}function Se(){var i=document.scrollingElement;return i||document.documentElement}function j(i,e,t,n,r){if(!(!i.getBoundingClientRect&&i!==window)){var o,s,a,l,c,u,h;if(i!==window&&i.parentNode&&i!==Se()?(o=i.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,c=o.right,u=o.height,h=o.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||t)&&i!==window&&(r=r||i.parentNode,!Me))do if(r&&r.getBoundingClientRect&&(A(r,"transform")!=="none"||t&&A(r,"position")!=="static")){var d=r.getBoundingClientRect();s-=d.top+parseInt(A(r,"border-top-width")),a-=d.left+parseInt(A(r,"border-left-width")),l=s+o.height,c=a+o.width;break}while(r=r.parentNode);if(n&&i!==window){var p=Xe(r||i),f=p&&p.a,m=p&&p.d;p&&(s/=m,a/=f,h/=f,u/=m,l=s+u,c=a+h)}return{top:s,left:a,bottom:l,right:c,width:h,height:u}}}function Jo(i,e,t){for(var n=je(i,!0),r=j(i)[e];n;){var o=j(n)[t],s=void 0;if(t==="top"||t==="left"?s=r>=o:s=r<=o,!s)return n;if(n===Se())break;n=je(n,!1)}return!1}function pt(i,e,t,n){for(var r=0,o=0,s=i.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==$.ghost&&(n||s[o]!==$.dragged)&&xe(s[o],t.draggable,i,!1)){if(r===e)return s[o];r++}o++}return null}function Rr(i,e){for(var t=i.lastElementChild;t&&(t===$.ghost||A(t,"display")==="none"||e&&!Ai(t,e));)t=t.previousElementSibling;return t||null}function Y(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==$.clone&&(!e||Ai(i,e))&&t++;return t}function Qo(i){var e=0,t=0,n=Se();if(i)do{var r=Xe(i),o=r.a,s=r.d;e+=i.scrollLeft*o,t+=i.scrollTop*s}while(i!==n&&(i=i.parentNode));return[e,t]}function oh(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===i[t][n])return Number(t)}return-1}function je(i,e){if(!i||!i.getBoundingClientRect)return Se();var t=i,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=A(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Se();if(n||e)return t;n=!0}}while(t=t.parentNode);re
`).map(u=>u.indexOf(`drawio-diagram="${r}"`)!==-1?l:u).join(`
`);T(this,kt,En).call(this,c,n),tt()}).catch(a=>{this.handleDrawingUploadError(a)})})}handleDrawingUploadError(e){e.status===413?window.$events.emit("error",this.editor.config.text.serverUploadLimit):window.$events.emit("error",this.editor.config.text.imageUploadError),console.error(e)}fullScreen(){let{container:e}=this.editor.config,t=e.classList.contains("fullscreen");e.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(e){if(!e)return;let t=this.editor.cm.state.doc,n=1,r=-1;for(let s of t.iterLines()){if(s.includes(e)){r=n;break}n+=1}if(r===-1)return;let o=t.line(r);T(this,Dn,Vc).call(this,o.from,o.to,!0),this.focus()}focus(){this.editor.cm.hasFocus||this.editor.cm.focus()}insertContent(e){T(this,Pe,it).call(this,e,e.length)}prependContent(e){e=T(this,ii,$o).call(this,e);let n=T(this,ne,ue).call(this).from+e.length+1;T(this,he,ve).call(this,0,0,`${e}
`,n),this.focus()}appendContent(e){e=T(this,ii,$o).call(this,e),T(this,he,ve).call(this,this.editor.cm.state.doc.length,`
${e}`),this.focus()}replaceContent(e){T(this,kt,En).call(this,e)}replaceLineStart(e){let t=T(this,ne,ue).call(this),n=this.editor.cm.state.doc.lineAt(t.from),r=n.text,o=r.split(" ")[0];if(o===e){let c=r.replace(`${e} `,""),u=t.from+(c.length-r.length);T(this,he,ve).call(this,n.from,n.to,c,u);return}let s=r;/^[#>`]/.test(o)?s=r.replace(o,e).trim():e!==""&&(s=`${e} ${r}`);let l=t.from+(s.length-r.length);T(this,he,ve).call(this,n.from,n.to,s,l)}wrapSelection(e,t){let n=T(this,ne,ue).call(this),r=T(this,We,yt).call(this,n);if(!r){T(this,Ct,Sn).call(this,e,t);return}let o=r,s;r.startsWith(e)&&r.endsWith(t)?(o=r.slice(e.length,r.length-t.length),s=n.extend(n.from,n.to-(e.length+t.length))):(o=`${e}${r}${t}`,s=n.extend(n.from,n.to+(e.length+t.length))),T(this,he,ve).call(this,n.from,n.to,o,s.anchor,s.head)}replaceLineStartForOrderedList(){let e=T(this,ne,ue).call(this),t=this.editor.cm.state.doc.lineAt(e.from),r=this.editor.cm.state.doc.line(t.number-1).text.match(/^(\s*)(\d)([).])\s/)||[],o=(Number(r[2])||0)+1,s=r[1]||"",a=r[3]||".",l=`${s}${o}${a}`;return this.replaceLineStart(l)}cycleCalloutTypeAtSelection(){let e=T(this,ne,ue).call(this),t=this.editor.cm.state.doc.lineAt(e.from),n=["info","success","warning","danger"],r=n.join("|"),s=new RegExp(`class="((${r})\\s+callout|callout\\s+(${r}))"`,"i").exec(t.text),a=(s?s[2]||s[3]:"").toLowerCase();if(a===n[n.length-1])T(this,Ct,Sn).call(this,`<p class="callout ${n[n.length-1]}">`,"</p>");else if(a==="")T(this,Ct,Sn).call(this,'<p class="callout info">',"</p>");else{let l=n.indexOf(a)+1,c=n[l],u=t.text.replace(s[0],s[0].replace(a,c)),h=u.length-t.text.length;T(this,he,ve).call(this,t.from,t.to,u,e.anchor+h,e.head+h)}}syncDisplayPosition(e){let t=e.target;if(Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)<1){this.editor.display.scrollToIndex(-1);return}let r=this.editor.cm.lineBlockAtHeight(t.scrollTop),o=this.editor.cm.state.sliceDoc(0,r.from),l=new DOMParser().parseFromString(this.editor.markdown.render(o),"text/html").documentElement.querySelectorAll("body > *");this.editor.display.scrollToIndex(l.length)}async insertTemplate(e,t,n){let r=this.editor.cm.posAtCoords({x:t,y:n},!1),{data:o}=await window.$http.get(`/templates/${e}`),s=o.markdown||o.html;T(this,he,ve).call(this,r,r,s,r)}insertClipboardImages(e,t,n){let r=this.editor.cm.posAtCoords({x:t,y:n},!1);for(let o of e)this.uploadImage(o,r)}async uploadImage(e,t=null){if(e===null||e.type.indexOf("image")!==0)return;let n="png";if(t===null&&(t=T(this,ne,ue).call(this).from),e.name){let c=e.name.match(/\.(.+)$/);c.length>1&&(n=c[1])}let r=`image-${Math.random().toString(16).slice(2)}`,s=`![](${window.baseUrl(`/loading.gif#upload${r}`)})`;T(this,he,ve).call(this,t,t,s,t);let a=`image-${Date.now()}.${n}`,l=new FormData;l.append("file",e,a),l.append("uploaded_to",this.editor.config.pageId);try{let{data:c}=await window.$http.post("/images/gallery",l),u=`[![](${c.thumbs.display})](${c.url})`;T(this,ni,Mo).call(this,s,u)}catch(c){window.$events.emit("error",this.editor.config.text.imageUploadError),T(this,ni,Mo).call(this,s,""),console.error(c)}}};ti=new WeakSet,Io=function(e,t){let n=`<div drawio-diagram="${e.id}"><img src="${e.url}"></div>`;T(this,Pe,it).call(this,n,n.length,t)},xt=new WeakSet,_n=function(){return this.editor.cm.state.doc.toString()},kt=new WeakSet,En=function(e,t=null){t=t||T(this,ne,ue).call(this);let n=this.editor.cm.state.toText(e),r=Math.min(t.from,n.length);T(this,he,ve).call(this,0,this.editor.cm.state.doc.length,e,r),this.focus()},Pe=new WeakSet,it=function(e,t=0,n=null){n=n||this.editor.cm.state.selection.main;let r=n.from+t;T(this,he,ve).call(this,n.from,n.to,e,r),this.focus()},We=new WeakSet,yt=function(e=null){return e=e||T(this,ne,ue).call(this),this.editor.cm.state.sliceDoc(e.from,e.to)},ne=new WeakSet,ue=function(){return this.editor.cm.state.selection.main},ii=new WeakSet,$o=function(e){return e.replace(/\r\n|\r/g,`
`)},ni=new WeakSet,Mo=function(e,t){let n=T(this,xt,_n).call(this).replace(e,t);T(this,kt,En).call(this,n)},Ct=new WeakSet,Sn=function(e,t){let n=T(this,ne,ue).call(this),r=this.editor.cm.state.doc.lineAt(n.from),o=r.text,s,a=0;o.startsWith(e)&&o.endsWith(t)?(s=o.slice(e.length,o.length-t.length),a=-e.length):(s=`${e}${o}${t}`,a=e.length),T(this,he,ve).call(this,r.from,r.to,s,n.from+a)},he=new WeakSet,ve=function(e,t=null,n=null,r=null,o=null){let s={changes:{from:e,to:t,insert:n}};r&&(s.selection={anchor:r},o&&(s.selection.head=o)),this.editor.cm.dispatch(s)},Dn=new WeakSet,Vc=function(e,t,n=!1){this.editor.cm.dispatch({selection:{anchor:e,head:t},scrollIntoView:n})};var Tn=class{constructor(e){this.settingMap={scrollSync:!0,showPreview:!0,editorWidth:50},this.changeListeners={},this.loadFromLocalStorage(),this.applyToInputs(e),this.listenToInputChanges(e)}applyToInputs(e){for(let t of e){let n=t.getAttribute("name").replace("md-","");t.checked=this.settingMap[n]}}listenToInputChanges(e){for(let t of e)t.addEventListener("change",()=>{let n=t.getAttribute("name").replace("md-","");this.set(n,t.checked)})}loadFromLocalStorage(){let e=window.localStorage.getItem("md-editor-settings");if(!e)return;let t=JSON.parse(e);for(let[n,r]of Object.entries(t))r!==null&&this.settingMap[n]!==void 0&&(this.settingMap[n]=r)}set(e,t){this.settingMap[e]=t,window.localStorage.setItem("md-editor-settings",JSON.stringify(this.settingMap));for(let n of this.changeListeners[e]||[])n(t)}get(e){return this.settingMap[e]||null}onChange(e,t){let n=this.changeListeners[e]||[];n.push(t),this.changeListeners[e]=n}};function Ln({html:i,markdown:e}){return e||i}function Wc(i){window.$events.listen("editor::replace",e=>{let t=Ln(e);i.actions.replaceContent(t)}),window.$events.listen("editor::append",e=>{let t=Ln(e);i.actions.appendContent(t)}),window.$events.listen("editor::prepend",e=>{let t=Ln(e);i.actions.prependContent(t)}),window.$events.listen("editor::insert",e=>{let t=Ln(e);i.actions.insertContent(t)}),window.$events.listen("editor::focus",()=>{i.actions.focus()})}function Cf(i){let e={};return e["Shift-Mod-i"]=()=>i.actions.insertImage(),e["Mod-s"]=()=>window.$events.emit("editor-save-draft"),e["Mod-Enter"]=()=>window.$events.emit("editor-save-page"),e["Shift-Mod-k"]=()=>i.actions.showLinkSelector(),e["Mod-k"]=()=>i.actions.insertLink(),e["Mod-1"]=()=>i.actions.replaceLineStart("##"),e["Mod-2"]=()=>i.actions.replaceLineStart("###"),e["Mod-3"]=()=>i.actions.replaceLineStart("####"),e["Mod-4"]=()=>i.actions.replaceLineStart("#####"),e["Mod-5"]=()=>i.actions.replaceLineStart(""),e["Mod-d"]=()=>i.actions.replaceLineStart(""),e["Mod-6"]=()=>i.actions.replaceLineStart(">"),e["Mod-q"]=()=>i.actions.replaceLineStart(">"),e["Mod-7"]=()=>i.actions.wrapSelection("\n```\n","\n```"),e["Mod-8"]=()=>i.actions.wrapSelection("`","`"),e["Shift-Mod-e"]=()=>i.actions.wrapSelection("`","`"),e["Mod-9"]=()=>i.actions.cycleCalloutTypeAtSelection(),e["Mod-p"]=()=>i.actions.replaceLineStart("-"),e["Mod-o"]=()=>i.actions.replaceLineStartForOrderedList(),e}function Gc(i){let e=Cf(i),t=[],n=r=>()=>(r(),!0);for(let[r,o]of Object.entries(e))t.push({key:r,run:n(o),preventDefault:!0});return t}async function Zc(i){let e=await window.importVersioned("code");function t(a){a.docChanged&&i.actions.updateAndRender()}let n=Ne(i.actions.syncDisplayPosition.bind(i.actions),100,!1),r=i.settings.get("scrollSync");i.settings.onChange("scrollSync",a=>{r=a});let o={scroll:a=>r&&n(a),drop:a=>{let l=a.dataTransfer.getData("bookstack/template");l&&(a.preventDefault(),i.actions.insertTemplate(l,a.pageX,a.pageY));let u=new Fe(a.dataTransfer).getImages();u.length>0&&(a.stopPropagation(),a.preventDefault(),i.actions.insertClipboardImages(u,a.pageX,a.pageY))},paste:a=>{let l=new Fe(a.clipboardData||a.dataTransfer);if(!l.hasItems()||l.containsTabularData())return;let c=l.getImages();for(let u of c)i.actions.uploadImage(u)}},s=e.markdownEditor(i.config.inputEl,t,o,Gc(i));return window.mdEditorView=s,s}async function Kc(i){let e={config:i,markdown:new wn,settings:new Tn(i.settingInputs)};return e.ac
`).length;this.$refs.input.style.height=`${e*20+40}px`}async update(e){e.preventDefault();let t=this.showLoading();this.form.toggleAttribute("hidden",!0);let n={text:this.input.value,parent_id:this.parentId||null};try{let r=await window.$http.put(`/comment/${this.commentId}`,n),o=Ee(r.data);this.container.replaceWith(o),window.$events.success(this.updatedText)}catch(r){console.error(r),window.$events.showValidationErrors(r),this.form.toggleAttribute("hidden",!1),t.remove()}}async delete(){this.showLoading(),await window.$http.delete(`/comment/${this.commentId}`),this.container.closest(".comment-branch").remove(),window.$events.success(this.deletedText),this.$emit("delete")}showLoading(){let e=at();return e.classList.add("px-l"),this.container.append(e),e}};var Bn=class extends g{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.commentCountBar=this.$refs.commentCountBar,this.commentsTitle=this.$refs.commentsTitle,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.formContainer=this.$refs.formContainer,this.form=this.$refs.form,this.formInput=this.$refs.formInput,this.formReplyLink=this.$refs.formReplyLink,this.addCommentButton=this.$refs.addCommentButton,this.hideFormButton=this.$refs.hideFormButton,this.removeReplyToButton=this.$refs.removeReplyToButton,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.parentId=null,this.formReplyText=this.formReplyLink.textContent,this.setupListeners()}setupListeners(){this.removeReplyToButton.addEventListener("click",this.removeReplyTo.bind(this)),this.hideFormButton.addEventListener("click",this.hideForm.bind(this)),this.addCommentButton.addEventListener("click",this.showForm.bind(this)),this.elem.addEventListener("page-comment-delete",()=>{this.updateCount(),this.hideForm()}),this.elem.addEventListener("page-comment-reply",e=>{this.setReply(e.detail.id,e.detail.element)}),this.form&&this.form.addEventListener("submit",this.saveComment.bind(this))}saveComment(e){e.preventDefault(),e.stopPropagation();let t=at();t.classList.add("px-l"),this.form.after(t),this.form.toggleAttribute("hidden",!0);let r={text:this.formInput.value,parent_id:this.parentId||null};window.$http.post(`/comment/${this.pageId}`,r).then(o=>{let s=Ee(o.data);this.formContainer.after(s),window.$events.success(this.createdText),this.hideForm(),this.updateCount()}).catch(o=>{this.form.toggleAttribute("hidden",!1),window.$events.showValidationErrors(o)}),this.form.toggleAttribute("hidden",!1),t.remove()}updateCount(){let e=this.getCommentCount();this.commentsTitle.textContent=window.trans_plural(this.countText,e,{count:e})}resetForm(){this.formInput.value="",this.parentId=null,this.replyToRow.toggleAttribute("hidden",!0),this.container.append(this.formContainer)}showForm(){this.formContainer.toggleAttribute("hidden",!1),this.addButtonContainer.toggleAttribute("hidden",!0),this.formContainer.scrollIntoView({behavior:"smooth",block:"nearest"}),setTimeout(()=>{this.formInput.focus()},100)}hideForm(){this.resetForm(),this.formContainer.toggleAttribute("hidden",!0),this.getCommentCount()>0?this.elem.append(this.addButtonContainer):this.commentCountBar.append(this.addButtonContainer),this.addButtonContainer.toggleAttribute("hidden",!1)}getCommentCount(){return this.container.querySelectorAll('[component="page-comment"]').length}setReply(e,t){t.closest(".comment-branch").querySelector(".comment-branch-children").append(this.formContainer),this.showForm(),this.parentId=e,this.replyToRow.toggleAttribute("hidden",!1);let r=this.replyToRow.querySelector("a");r.textContent=this.formReplyText.replace("1234",this.parentId),r.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.toggleAttribute("hidden",!0),this.container.append(this.formContainer),this.showForm()}};function _f(i,e){vr(`#page-navigation a[href="#${i}"]`,t=>{t.closest("li").classList.toggle("current-heading",e)})}function Ef(i){for(let e of i){let t=e.intersectionRatio===1;_f(e.target.id,t)}}function S
`);return a.textContent}connectedCallback(){let s=Date.now();if(this.editor)return;this.cleanChildContent();let a=this.getContent(),c=a.split(`
`).length*19.2+18+24;this.style.height=`${c}px`;let u=this.shadowRoot.querySelector(".CodeMirrorContainer"),h=d=>{this.editor=d.wysiwygView(u,this.shadowRoot,a,this.getLanguage()),setTimeout(()=>{this.style.height=null},12)};window.importVersioned("code").then(d=>{let p=Date.now()-s<20?20:0;setTimeout(()=>h(d),p)})}cleanChildContent(){let s=this.querySelector("pre");if(s)for(let a of s.childNodes)a.nodeName==="#text"&&a.textContent==="\uFEFF"&&a.remove()}}t.customElements.define("code-block",n)}function zf(i){i.ui.registry.addIcon("codeblock",'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5Z"/><path d="M11.103 15.423c.277.277.277.738 0 .922a.692.692 0 0 1-1.106 0l-4.057-3.78a.738.738 0 0 1 0-1.107l4.057-3.872c.276-.277.83-.277 1.106 0a.724.724 0 0 1 0 1.014L7.6 12.012ZM12.897 8.577c-.245-.312-.2-.675.08-.955.28-.281.727-.27 1.027.033l4.057 3.78a.738.738 0 0 1 0 1.107l-4.057 3.872c-.277.277-.83.277-1.107 0a.724.724 0 0 1 0-1.014l3.504-3.412z"/></svg>'),i.ui.registry.addButton("codeeditor",{tooltip:"Insert code block",icon:"codeblock",onAction(){i.execCommand("codeeditor")}}),i.ui.registry.addButton("editcodeeditor",{tooltip:"Edit code block",icon:"edit-block",onAction(){i.execCommand("codeeditor")}}),i.addCommand("codeeditor",()=>{let e=i.selection.getNode(),t=e.ownerDocument;if(ou(e))su(i,e);else{let n=i.selection.getContent({format:"text"});au(i,n,"",(r,o)=>{let s=t.createElement("pre"),a=t.createElement("code");a.classList.add(`language-${o}`),a.innerText=r,s.append(a),i.insertContent(s.outerHTML)})}}),i.on("dblclick",()=>{let e=i.selection.getNode();ou(e)&&su(i,e)}),i.on("PreInit",()=>{i.parser.addNodeFilter("pre",e=>{for(let t of e){let n=window.tinymce.html.Node.create("code-block",{contenteditable:"false"}),r=t.getAll("span");for(let o of r)o.unwrap();t.attr("style",null),t.wrap(n)}}),i.parser.addNodeFilter("code-block",e=>{for(let t of e)t.attr("contenteditable","false")}),i.serializer.addNodeFilter("code-block",e=>{for(let t of e)t.unwrap()})}),i.ui.registry.addContextToolbar("codeeditor",{predicate(e){return e.nodeName.toLowerCase()==="code-block"},items:"editcodeeditor",position:"node",scope:"node"}),i.on("PreInit",()=>{Nf(i)})}function lu(){return zf}var de=null,ot=null,rt={};function Fo(i){return i.hasAttribute("drawio-diagram")}function Hf(i,e=null){de=i,ot=e,window.$components.first("image-manager").show(n=>{if(e){let r=e.querySelector("img");de.undoManager.transact(()=>{de.dom.setAttrib(r,"src",n.url),de.dom.setAttrib(e,"drawio-diagram",n.id)})}else{let r=`<div drawio-diagram="${n.id}" contenteditable="false"><img src="${n.url}"></div>`;de.insertContent(r)}},"drawio")}async function Uf(i){let e=`image-${Math.random().toString(16).slice(2)}`,t=window.baseUrl("/loading.gif"),n=r=>{r.status===413?window.$events.emit("error",rt.translations.serverUploadLimitText):window.$events.emit("error",rt.translations.imageUploadErrorText),console.error(r)};if(ot){tt();let r=ot.querySelector("img");try{let o=await Lo(i,rt.pageId);de.undoManager.transact(()=>{de.dom.setAttrib(r,"src",o.url),de.dom.setAttrib(ot,"drawio-diagram",o.id)})}catch(o){n(o)}return}setTimeout(async()=>{de.insertContent(`<div drawio-diagram contenteditable="false"><img src="${t}" id="${e}"></div>`),tt();try{let r=await Lo(i,rt.pageId);de.undoManager.transact(()=>{de.dom.setAttrib(e,"src",r.url),de.dom.get(e).parentNode.setAttribute("drawio-diagram",r.id)})}catch(r){de.dom.remove(e),n(r)}},5)}function jf(){if(!ot)return Promise.resolve("");let i=ot.getAttribute("drawio-diagram");return Cn(i)}function cu(i,e=null){de=i,ot=e,ei(rt.drawioUrl,jf,Uf)}function Vf(i){i.addCommand("drawio",()=>{let e=i.selection.getNode();cu(i,Fo(e)?e:null)}),i.ui.registry.addIcon("diagram",`<svg width="24" height="24" fill="${rt.darkMode?"#BBB":"#000000"}" xmlns="http://www.w3.org/2000/svg"><path d="M20.716 7.639V2.845h-4.794v1.598h-7.99V2.845H3.138v4.794h1.598v7.99H3.138v4.794h4.794v-1.598h7.99v1.598h4.794v-4.794h-1.598v-7.99zM4.736 4.443h1.598V6.04H4.736zm1.598 14.382H4.736v-1.598h1.598zm9.588-1.598h-
`),e=i.findIndex(n=>n.trim()==="<!-- Start: custom user content -->"),t=i.findIndex(n=>n.trim()==="<!-- End: custom user content -->");return e===-1||t===-1?"":i.slice(e+1,t).join(`
`)}function pm(i){i.serializer.addNodeFilter("br",e=>{for(let t of e)if(t.parent&&t.parent.name==="code"){let n=window.tinymce.html.Node.create("#text");n.value=`
`,t.replace(n)}})}function fm(i){return function(t){function n(){i.darkMode&&t.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change","")}t.on("ExecCommand change input NodeChange ObjectResized",n),Jc(t),tu(t,i),t.on("init",()=>{n(),Qc(t),window.editor=t,Yc(t)}),t.on("PreInit",()=>{pm(t)}),window.$events.emitPublic(i.containerElement,"editor-tinymce::setup",{editor:t}),t.ui.registry.addButton("inlinecode",{tooltip:"Inline code",icon:"sourcecode",onAction(){t.execCommand("mceToggleFormat",!1,"code")}})}}function mm(i){return`
html, body, html.dark-mode {
background: ${i.darkMode?"#222":"#fff"};
}
body {
padding-left: 15px !important;
padding-right: 15px !important;
height: initial !important;
margin:0!important;
margin-left: auto! important;
margin-right: auto !important;
overflow-y: hidden !important;
}`.trim().replace(`
`,"")}function vu(i){return window.tinymce.addI18n(i.language,i.translationMap),{width:"100%",height:"100%",selector:"#html-editor",cache_suffix:`?version=${document.querySelector('script[src*="/dist/app.js"]').getAttribute("src").split("?version=")[1]}`,content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:i.darkMode?"tinymce-5-dark":"tinymce-5",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,language:i.language,directionality:i.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,remove_trailing_brs:!1,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram],details[*],summary[*],div[*],li[class|checked|style]",automatic_uploads:!1,custom_elements:"doc-root,code-block",valid_children:["-div[p|h1|h2|h3|h4|h5|h6|blockquote|code-block]","+div[pre|img]","-doc-root[doc-root|#text]","-li[details]","+code-block[pre]","+doc-root[p|h1|h2|h3|h4|h5|h6|blockquote|code-block|div|hr]"].join(","),plugins:hm(i),contextmenu:!1,toolbar:iu(i),content_style:mm(i),style_formats:am,style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:lm,table_style_by_css:!0,table_use_colgroups:!0,file_picker_types:"file image",color_map:cm,file_picker_callback:um,paste_preprocess(t,n){let{content:r}=n;r.indexOf('<img src="file://')!==-1&&(n.content="")},init_instance_callback(t){let n=t.getDoc().querySelector("head");n.innerHTML+=dm()},setup(t){ru(t),nu(t),fm(i)(t)}}}var ar=class extends g{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.tinyMceConfig=vu({language:this.$opts.language,containerElement:this.elem,darkMode:this.isDarkMode,textDirection:this.textDirection,drawioUrl:this.getDrawIoUrl(),pageId:Number(this.pageId),translations:{imageUploadErrorText:this.$opts.imageUploadErrorText,serverUploadLimitText:this.$opts.serverUploadLimitText},translationMap:window.editor_translations}),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig).then(e=>{this.editor=e[0]})}getDrawIoUrl(){let e=document.querySelector("[drawio-url]");return e?e.getAttribute("drawio-url"):""}getContent(){return{html:this.editor.getContent()}}};window.baseUrl=function(e){let t=e,n=document.querySelector('meta[name="base-url"]').getAttribute("content");return n[n.length-1]==="/"&&(n=n.slice(0,n.length-1)),t[0]==="/"&&(t=t.slice(1)),`${n}/${t}`};window.importVersioned=function(e){let t=document.querySelector('link[href*="/dist/styles.css?version="]').href.split("?version=").pop();return import(window.baseUrl(`dist/${e}.js?version=${t}`))};window.$http=hr;window.$events=ur;var _t=new zo;window.trans=_t.get.bind(_t);window.trans_choice=_t.getPlural.bind(_t);window.trans_plural=_t.parsePlural.bind(_t);gr(Bo);window.$components=br;mr();
/*! Bundled license information:
sortablejs/modular/sortable.esm.js:
(**!
* Sortable 1.15.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*)
*/
//# sourceMappingURL=app.js.map