From 751772b87a694a086bcb645c4e429bb5b234ed2d Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Wed, 30 Sep 2020 22:44:58 +0100 Subject: [PATCH] Updated version and assets for release v0.30.2 --- public/dist/app.js | 88 +++++++++++++++++++++------------------------- version | 2 +- 2 files changed, 42 insertions(+), 48 deletions(-) diff --git a/public/dist/app.js b/public/dist/app.js index 8c5573f14..abf742515 100644 --- a/public/dist/app.js +++ b/public/dist/app.js @@ -1,28 +1,28 @@ -(()=>{var ea=Object.defineProperty,By=Object.prototype.hasOwnProperty,se=(n,t)=>()=>(t||(t={exports:{}},n(t.exports,t)),t.exports),Jc=n=>ea(n,"__esModule",{value:!0}),Hy=(n,t)=>{Jc(n);for(var i in t)ea(n,i,{get:t[i],enumerable:!0})},Uy=(n,t)=>{if(Jc(n),typeof t=="object"||typeof t=="function")for(let i in t)!By.call(n,i)&&i!=="default"&&ea(n,i,{get:()=>t[i],enumerable:!0});return n},$e=n=>n&&n.__esModule?n:Uy(ea({},"default",{value:n,enumerable:!0}),n);var Qe=se((js,$s)=>{(function(n,t){typeof js=="object"&&typeof $s!="undefined"?$s.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.CodeMirror=t())})(js,function(){"use strict";var n=navigator.userAgent,t=navigator.platform,i=/gecko\/\d/i.test(n),s=/MSIE \d/.test(n),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(n),c=/Edge\/(\d+)/.exec(n),d=s||l||c,h=d&&(s?document.documentMode||6:+(c||l)[1]),p=!c&&/WebKit\//.test(n),g=p&&/Qt\/\d+\.\d+/.test(n),y=!c&&/Chrome\//.test(n),m=/Opera\//.test(n),v=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(n),E=/PhantomJS/.test(n),D=!c&&/AppleWebKit/.test(n)&&/Mobile\/\w+/.test(n),C=/Android/.test(n),q=D||C||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(n),A=D||/Mac/.test(t),H=/\bCrOS\b/.test(n),N=/win/i.test(t),V=m&&n.match(/Version\/(\d*\.\d*)/);V&&(V=Number(V[1])),V&&V>=15&&(m=!1,p=!0);var B=A&&(g||m&&(V==null||V<12.11)),K=i||d&&h>=9;function ee(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var J=function(e,r){var a=e.className,o=ee(r).exec(a);if(o){var u=a.slice(o.index+o[0].length);e.className=a.slice(0,o.index)+(u?o[1]+u:"")}};function z(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function Q(e,r){return z(e).appendChild(r)}function _(e,r,a,o){var u=document.createElement(e);if(a&&(u.className=a),o&&(u.style.cssText=o),typeof r=="string")u.appendChild(document.createTextNode(r));else if(r)for(var f=0;f=r)return b+(r-f);b+=k-f,b+=a-b%a,f=k+1}}var ue=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};ue.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date()?e.f():setTimeout(e.handler,e.time-+new Date())},ue.prototype.set=function(e,r){this.f=r;var a=+new Date()+e;(!this.id||a=r)return o+Math.min(b,r-u);if(u+=f-o,u+=a-u%a,o=f+1,u>=r)return o}}var nt=[""];function Tt(e){for(;nt.length<=e;)nt.push(ke(nt)+" ");return nt[e]}function ke(e){return e[e.length-1]}function tt(e,r){for(var a=[],o=0;o"€"&&(e.toUpperCase()!=e.toLowerCase()||Fe.test(e))}function oe(e,r){return r?r.source.indexOf("\\w")>-1&&X(e)?!0:r.test(e):X(e)}function te(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var Re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function kt(e){return e.charCodeAt(0)>=768&&Re.test(e)}function Ce(e,r,a){for(;(a<0?r>0:ra?-1:1;;){if(r==a)return r;var u=(r+a)/2,f=o<0?Math.ceil(u):Math.floor(u);if(f==r)return e(f)?r:a;e(f)?a=f:r=f+o}}function be(e,r,a,o){if(!e)return o(r,a,"ltr",0);for(var u=!1,f=0;fr||r==a&&b.to==r)&&(o(Math.max(b.from,r),Math.min(b.to,a),b.level==1?"rtl":"ltr",f),u=!0)}u||o(r,a,"ltr")}var Ae=null;function Ye(e,r,a){var o;Ae=null;for(var u=0;ur)return u;f.to==r&&(f.from!=f.to&&a=="before"?o=u:Ae=u),f.from==r&&(f.from!=f.to&&a!="before"?o=u:Ae=u)}return o??Ae}var hn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(S){return S<=247?e.charAt(S):1424<=S&&S<=1524?"R":1536<=S&&S<=1785?r.charAt(S-1536):1774<=S&&S<=2220?"r":8192<=S&&S<=8203?"w":S==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,f=/[LRr]/,b=/[Lb1n]/,k=/[1n]/;function x(S,M,P){this.level=S,this.from=M,this.to=P}return function(S,M){var P=M=="ltr"?"L":"R";if(S.length==0||M=="ltr"&&!o.test(S))return!1;for(var G=S.length,$=[],ne=0;ne-1&&(o[r]=u.slice(0,f).concat(u.slice(f+1)))}}}function ct(e,r){var a=mi(e,r);if(!a.length)return;for(var o=Array.prototype.slice.call(arguments,2),u=0;u0}function Qn(e){e.prototype.on=function(r,a){Ee(this,r,a)},e.prototype.off=function(r,a){Pe(this,r,a)}}function xt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function wo(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function fr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Bt(e){xt(e),wo(e)}function Fr(e){return e.target||e.srcElement}function ko(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),A&&e.ctrlKey&&r==1&&(r=3),r}var En=function(){if(d&&h<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),gi;function xo(e){if(gi==null){var r=_("span","​");Q(e,_("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(gi=r.offsetWidth<=1&&r.offsetHeight>2&&!(d&&h<8))}var a=gi?_("span","​"):_("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Mr;function Za(e){if(Mr!=null)return Mr;var r=Q(e,document.createTextNode("AخA")),a=U(r,0,1).getBoundingClientRect(),o=U(r,1,2).getBoundingClientRect();return z(e),!a||a.left==a.right?!1:Mr=o.right-a.right<3}var Dn=` +(()=>{var ea=Object.defineProperty,Oy=Object.prototype.hasOwnProperty,le=(t,n)=>()=>(n||(n={exports:{}},t(n.exports,n)),n.exports),Qc=t=>ea(t,"__esModule",{value:!0}),Ny=(t,n)=>{Qc(t);for(var i in n)ea(t,i,{get:n[i],enumerable:!0})},By=(t,n)=>{if(Qc(t),typeof n=="object"||typeof n=="function")for(let i in n)!Oy.call(t,i)&&i!=="default"&&ea(t,i,{get:()=>n[i],enumerable:!0});return t},$e=t=>t&&t.__esModule?t:By(ea({},"default",{value:t,enumerable:!0}),t);var Qe=le((Ws,$s)=>{(function(t,n){typeof Ws=="object"&&typeof $s!="undefined"?$s.exports=n():typeof define=="function"&&define.amd?define(n):(t=t||self,t.CodeMirror=n())})(Ws,function(){"use strict";var t=navigator.userAgent,n=navigator.platform,i=/gecko\/\d/i.test(t),s=/MSIE \d/.test(t),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),c=/Edge\/(\d+)/.exec(t),d=s||u||c,h=d&&(s?document.documentMode||6:+(c||u)[1]),p=!c&&/WebKit\//.test(t),g=p&&/Qt\/\d+\.\d+/.test(t),y=!c&&/Chrome\//.test(t),m=/Opera\//.test(t),b=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),D=/PhantomJS/.test(t),E=!c&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),S=/Android/.test(t),z=E||S||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),A=E||/Mac/.test(n),R=/\bCrOS\b/.test(t),U=/win/i.test(n),Y=m&&t.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(m=!1,p=!0);var B=A&&(g||m&&(Y==null||Y<12.11)),G=i||d&&h>=9;function ee(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var J=function(e,r){var a=e.className,o=ee(r).exec(a);if(o){var l=a.slice(o.index+o[0].length);e.className=a.slice(0,o.index)+(l?o[1]+l:"")}};function P(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function Z(e,r){return P(e).appendChild(r)}function _(e,r,a,o){var l=document.createElement(e);if(a&&(l.className=a),o&&(l.style.cssText=o),typeof r=="string")l.appendChild(document.createTextNode(r));else if(r)for(var f=0;f=r)return v+(r-f);v+=k-f,v+=a-v%a,f=k+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};de.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},de.prototype.set=function(e,r){this.f=r;var a=+new Date+e;(!this.id||a=r)return o+Math.min(v,r-l);if(l+=f-o,l+=a-l%a,o=f+1,l>=r)return o}}var nt=[""];function Tt(e){for(;nt.length<=e;)nt.push(xe(nt)+" ");return nt[e]}function xe(e){return e[e.length-1]}function tt(e,r){for(var a=[],o=0;o"€"&&(e.toUpperCase()!=e.toLowerCase()||Fe.test(e))}function se(e,r){return r?r.source.indexOf("\\w")>-1&&X(e)?!0:r.test(e):X(e)}function te(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var Ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function _t(e){return e.charCodeAt(0)>=768&&Ne.test(e)}function Ee(e,r,a){for(;(a<0?r>0:ra?-1:1;;){if(r==a)return r;var l=(r+a)/2,f=o<0?Math.ceil(l):Math.floor(l);if(f==r)return e(f)?r:a;e(f)?a=f:r=f+o}}function ye(e,r,a,o){if(!e)return o(r,a,"ltr",0);for(var l=!1,f=0;fr||r==a&&v.to==r)&&(o(Math.max(v.from,r),Math.min(v.to,a),v.level==1?"rtl":"ltr",f),l=!0)}l||o(r,a,"ltr")}var Te=null;function Ve(e,r,a){var o;Te=null;for(var l=0;lr)return l;f.to==r&&(f.from!=f.to&&a=="before"?o=l:Te=l),f.from==r&&(f.from!=f.to&&a!="before"?o=l:Te=l)}return o!=null?o:Te}var hn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(C){return C<=247?e.charAt(C):1424<=C&&C<=1524?"R":1536<=C&&C<=1785?r.charAt(C-1536):1774<=C&&C<=2220?"r":8192<=C&&C<=8203?"w":C==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,l=/[stwN]/,f=/[LRr]/,v=/[Lb1n]/,k=/[1n]/;function x(C,M,O){this.level=C,this.from=M,this.to=O}return function(C,M){var O=M=="ltr"?"L":"R";if(C.length==0||M=="ltr"&&!o.test(C))return!1;for(var K=C.length,$=[],ne=0;ne-1&&(o[r]=l.slice(0,f).concat(l.slice(f+1)))}}}function ct(e,r){var a=gi(e,r);if(!a.length)return;for(var o=Array.prototype.slice.call(arguments,2),l=0;l0}function Jn(e){e.prototype.on=function(r,a){De(this,r,a)},e.prototype.off=function(r,a){Re(this,r,a)}}function Ct(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function wo(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function fr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Bt(e){Ct(e),wo(e)}function Ir(e){return e.target||e.srcElement}function ko(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),A&&e.ctrlKey&&r==1&&(r=3),r}var En=function(){if(d&&h<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),vi;function xo(e){if(vi==null){var r=_("span","​");Z(e,_("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(vi=r.offsetWidth<=1&&r.offsetHeight>2&&!(d&&h<8))}var a=vi?_("span","​"):_("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Fr;function Za(e){if(Fr!=null)return Fr;var r=Z(e,document.createTextNode("AخA")),a=j(r,0,1).getBoundingClientRect(),o=j(r,1,2).getBoundingClientRect();return P(e),!a||a.left==a.right?!1:Fr=o.right-a.right<3}var Dn=` -b`.split(/\n/).length!=3?function(e){for(var r=0,a=[],o=e.length;r<=o;){var u=e.indexOf(` -`,r);u==-1&&(u=e.length);var f=e.slice(r,e.charAt(u-1)=="\r"?u-1:u),b=f.indexOf("\r");b!=-1?(a.push(f.slice(0,b)),r+=b+1):(a.push(f),r=u+1)}return a}:function(e){return e.split(/\r\n?|\n/)},An=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(a){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},Jn=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),qr=null;function Bn(e){if(qr!=null)return qr;var r=Q(e,_("span","x")),a=r.getBoundingClientRect(),o=U(r,0,1).getBoundingClientRect();return qr=Math.abs(a.left-o.left)>1}var vi={},Hn={};function zr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),vi[e]=r}function vn(e,r){Hn[e]=r}function Un(e){if(typeof e=="string"&&Hn.hasOwnProperty(e))e=Hn[e];else if(e&&typeof e.name=="string"&&Hn.hasOwnProperty(e.name)){var r=Hn[e.name];typeof r=="string"&&(r={name:r}),e=jt(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Un("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Un("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function bi(e,r){r=Un(r);var a=vi[r.name];if(!a)return bi(e,"text/plain");var o=a(e,r);if(Wn.hasOwnProperty(r.name)){var u=Wn[r.name];for(var f in u){if(!u.hasOwnProperty(f))continue;o.hasOwnProperty(f)&&(o["_"+f]=o[f]),o[f]=u[f]}}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var b in r.modeProps)o[b]=r.modeProps[b];return o}var Wn={};function Qa(e,r){var a=Wn.hasOwnProperty(e)?Wn[e]:Wn[e]={};T(r,a)}function fn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var a={};for(var o in r){var u=r[o];u instanceof Array&&(u=u.concat([])),a[o]=u}return a}function Or(e,r){for(var a;e.innerMode&&!(a=e.innerMode(r),!a||a.mode==e);)r=a.state,e=a.mode;return a||{mode:e,state:r}}function _o(e,r,a){return e.startState?e.startState(r,a):!0}var st=function(e,r,a){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};st.prototype.eol=function(){return this.pos>=this.string.length},st.prototype.sol=function(){return this.pos==this.lineStart},st.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},st.prototype.next=function(){if(this.posr},st.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},st.prototype.skipToEnd=function(){this.pos=this.string.length},st.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},st.prototype.backUp=function(e){this.pos-=e},st.prototype.column=function(){return this.lastColumnPos0?null:(f&&r!==!1&&(this.pos+=f[0].length),f)}},st.prototype.current=function(){return this.string.slice(this.start,this.pos)},st.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},st.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},st.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ye(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var a=e;!a.lines;)for(var o=0;;++o){var u=a.children[o],f=u.chunkSize();if(r=e.first&&ra?j(a,ye(e,a).text.length):Hv(r,ye(e,r.line).text.length)}function Hv(e,r){var a=e.ch;return a==null||a>r?j(e.line,r):a<0?j(e.line,0):e}function Ql(e,r){for(var a=[],o=0;othis.maxLookAhead&&(this.maxLookAhead=e),r},Ln.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ln.fromSaved=function(e,r,a){return r instanceof Co?new Ln(e,fn(e.mode,r.state),a,r.lookAhead):new Ln(e,fn(e.mode,r),a)},Ln.prototype.save=function(e){var r=e!==!1?fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Co(r,this.maxLookAhead):r};function Jl(e,r,a,o){var u=[e.state.modeGen],f={};ou(e,r.text,e.doc.mode,a,function(S,M){return u.push(S,M)},f,o);for(var b=a.state,k=function(S){a.baseTokens=u;var M=e.state.overlays[S],P=1,G=0;a.state=!0,ou(e,r.text,M.mode,a,function($,ne){for(var ie=P;G<$;){var le=u[P];le>$&&u.splice(P,1,$,u[P+1],le),P+=2,G=Math.min($,le)}if(!ne)return;if(M.opaque)u.splice(ie,P-ie,$,"overlay "+ne),P=ie+2;else for(;iee.options.maxHighlightLength&&fn(e.doc.mode,o.state),f=Jl(e,r,o);u&&(o.state=u),r.stateAfter=o.save(!u),r.styles=f.styles,f.classes?r.styleClasses=f.classes:r.styleClasses&&(r.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function wi(e,r,a){var o=e.doc,u=e.display;if(!o.mode.startState)return new Ln(o,!0,r);var f=Uv(e,r,a),b=f>o.first&&ye(o,f-1).stateAfter,k=b?Ln.fromSaved(o,b,f):new Ln(o,_o(o.mode),f);return o.iter(f,r,function(x){Ja(e,x.text,k);var S=k.line;x.stateAfter=S==r-1||S%5==0||S>=u.viewFrom&&Sr.start)return f}throw new Error("Mode "+e.name+" failed to advance stream.")}var nu=function(e,r,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=a};function ru(e,r,a,o){var u=e.doc,f=u.mode,b;r=Me(u,r);var k=ye(u,r.line),x=wi(e,r.line,a),S=new st(k.text,e.options.tabSize,x),M;for(o&&(M=[]);(o||S.pose.options.maxHighlightLength?(k=!1,b&&Ja(e,r,o,M.pos),M.pos=r.length,P=null):P=iu(es(a,M,o.state,G),f),G){var $=G[0].name;$&&(P="m-"+(P?$+" "+P:$))}if(!k||S!=P){for(;xb;--k){if(k<=f.first)return f.first;var x=ye(f,k-1),S=x.stateAfter;if(S&&(!a||k+(S instanceof Co?S.lookAhead:0)<=f.modeFrontier))return k;var M=ce(x.text,null,e.options.tabSize);(u==null||o>M)&&(u=k-1,o=M)}return u}function Wv(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontiera;o--){var u=ye(e,o).stateAfter;if(u&&(!(u instanceof Co)||o+u.lookAhead=r:f.to>r);(o||(o=[])).push(new Eo(b,f.from,x?null:f.to))}}return o}function Yv(e,r,a){var o;if(e)for(var u=0;u=r:f.to>r);if(k||f.from==r&&b.type=="bookmark"&&(!a||f.marker.insertLeft)){var x=f.from==null||(b.inclusiveLeft?f.from<=r:f.from0&&k)for(var ve=0;ve0)continue;var M=[x,1],P=de(S.from,k.from),G=de(S.to,k.to);(P<0||!b.inclusiveLeft&&!P)&&M.push({from:S.from,to:k.from}),(G>0||!b.inclusiveRight&&!G)&&M.push({from:k.to,to:S.to}),u.splice.apply(u,M),x+=M.length-3}return u}function lu(e){var r=e.markedSpans;if(!r)return;for(var a=0;ar)&&(!o||ns(o,f.marker)<0)&&(o=f.marker)}return o}function hu(e,r,a,o,u){var f=ye(e,r),b=jn&&f.markedSpans;if(b)for(var k=0;k=0&&P<=0||M<=0&&P>=0)continue;if(M<=0&&(x.marker.inclusiveRight&&u.inclusiveLeft?de(S.to,a)>=0:de(S.to,a)>0)||M>=0&&(x.marker.inclusiveRight&&u.inclusiveLeft?de(S.from,o)<=0:de(S.from,o)<0))return!0}}function In(e){for(var r;r=du(e);)e=r.find(-1,!0).line;return e}function Qv(e){for(var r;r=To(e);)e=r.find(1,!0).line;return e}function Jv(e){for(var r,a;r=To(e);)e=r.find(1,!0).line,(a||(a=[])).push(e);return a}function rs(e,r){var a=ye(e,r),o=In(a);return a==o?r:Ke(o)}function fu(e,r){if(r>e.lastLine())return r;var a=ye(e,r),o;if(!er(e,a))return r;for(;o=To(a);)a=o.find(1,!0).line;return Ke(a)+1}function er(e,r){var a=jn&&r.markedSpans;if(a)for(var o=void 0,u=0;ur.maxLineLength&&(r.maxLineLength=u,r.maxLine=o)})}var Pr=function(e,r,a){this.text=e,uu(this,r),this.height=a?a(this):1};Pr.prototype.lineNo=function(){return Ke(this)},Qn(Pr);function eb(e,r,a,o){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),lu(e),uu(e,a);var u=o?o(e):1;u!=e.height&&pn(e,u)}function tb(e){e.parent=null,lu(e)}var nb={},rb={};function pu(e,r){if(!e||/^\s*$/.test(e))return null;var a=r.addModeClass?rb:nb;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function mu(e,r){var a=Y("span",null,null,p?"padding-right: .1px":null),o={pre:Y("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var u=0;u<=(r.rest?r.rest.length:0);u++){var f=u?r.rest[u-1]:r.line,b=void 0;o.pos=0,o.addToken=ob,Za(e.display.measure)&&(b=Ot(f,e.doc.direction))&&(o.addToken=sb(o.addToken,b)),o.map=[];var k=r!=e.display.externalMeasured&&Ke(f);lb(f,o,eu(e,f,k)),f.styleClasses&&(f.styleClasses.bgClass&&(o.bgClass=W(f.styleClasses.bgClass,o.bgClass||"")),f.styleClasses.textClass&&(o.textClass=W(f.styleClasses.textClass,o.textClass||""))),o.map.length==0&&o.map.push(0,0,o.content.appendChild(xo(e.display.measure))),u==0?(r.measure.map=o.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(o.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(p){var x=o.content.lastChild;(/\bcm-tab\b/.test(x.className)||x.querySelector&&x.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return ct(e,"renderLine",e,r.line,o.pre),o.pre.className&&(o.textClass=W(o.pre.className,o.textClass||"")),o}function ib(e){var r=_("span","•","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function ob(e,r,a,o,u,f,b){if(!r)return;var k=e.splitSpaces?ab(r,e.trailingSpace):r,x=e.cm.state.specialChars,S=!1,M;if(!x.test(r))e.col+=r.length,M=document.createTextNode(k),e.map.push(e.pos,e.pos+r.length,M),d&&h<9&&(S=!0),e.pos+=r.length;else{M=document.createDocumentFragment();for(var P=0;;){x.lastIndex=P;var G=x.exec(r),$=G?G.index-P:r.length-P;if($){var ne=document.createTextNode(k.slice(P,P+$));d&&h<9?M.appendChild(_("span",[ne])):M.appendChild(ne),e.map.push(e.pos,e.pos+$,ne),e.col+=$,e.pos+=$}if(!G)break;P+=$+1;var ie=void 0;if(G[0]==" "){var le=e.cm.options.tabSize,fe=le-e.col%le;ie=M.appendChild(_("span",Tt(fe),"cm-tab")),ie.setAttribute("role","presentation"),ie.setAttribute("cm-text"," "),e.col+=fe}else G[0]=="\r"||G[0]==` -`?(ie=M.appendChild(_("span",G[0]=="\r"?"␍":"␤","cm-invalidchar")),ie.setAttribute("cm-text",G[0]),e.col+=1):(ie=e.cm.options.specialCharPlaceholder(G[0]),ie.setAttribute("cm-text",G[0]),d&&h<9?M.appendChild(_("span",[ie])):M.appendChild(ie),e.col+=1);e.map.push(e.pos,e.pos+1,ie),e.pos++}}if(e.trailingSpace=k.charCodeAt(r.length-1)==32,a||o||u||S||f||b){var ge=a||"";o&&(ge+=o),u&&(ge+=u);var pe=_("span",[M],ge,f);if(b)for(var ve in b)b.hasOwnProperty(ve)&&ve!="style"&&ve!="class"&&pe.setAttribute(ve,b[ve]);return e.content.appendChild(pe)}e.content.appendChild(M)}function ab(e,r){if(e.length>1&&!/ /.test(e))return e;for(var a=r,o="",u=0;uS&&P.from<=S);G++);if(P.to>=M)return e(a,o,u,f,b,k,x);e(a,o.slice(0,P.to-S),u,f,null,k,x),f=null,o=o.slice(P.to-S),S=P.to}}}function gu(e,r,a,o){var u=!o&&a.widgetNode;u&&e.map.push(e.pos,e.pos+r,u),!o&&e.cm.display.input.needsContentAttribute&&(u||(u=e.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",a.id)),u&&(e.cm.display.input.setUneditable(u),e.content.appendChild(u)),e.pos+=r,e.trailingSpace=!1}function lb(e,r,a){var o=e.markedSpans,u=e.text,f=0;if(!o){for(var b=1;bx||ze.collapsed&&_e.to==x&&_e.from==x)){if(_e.to!=null&&_e.to!=x&&$>_e.to&&($=_e.to,ie=""),ze.className&&(ne+=" "+ze.className),ze.css&&(G=(G?G+";":"")+ze.css),ze.startStyle&&_e.from==x&&(le+=" "+ze.startStyle),ze.endStyle&&_e.to==$&&(ve||(ve=[])).push(ze.endStyle,_e.to),ze.title&&((ge||(ge={})).title=ze.title),ze.attributes)for(var rt in ze.attributes)(ge||(ge={}))[rt]=ze.attributes[rt];ze.collapsed&&(!fe||ns(fe.marker,ze)<0)&&(fe=_e)}else _e.from>x&&$>_e.from&&($=_e.from)}if(ve)for(var Ft=0;Ft=k)break;for(var rn=Math.min(k,$);;){if(M){var Qt=x+M.length;if(!fe){var yt=Qt>rn?M.slice(0,rn-x):M;r.addToken(r,yt,P?P+ne:ne,le,x+yt.length==$?ie:"",G,ge)}if(Qt>=rn){M=M.slice(rn-x),x=rn;break}x=Qt,le=""}M=u.slice(f,f=a[S++]),P=pu(a[S++],r.cm.options)}}}function vu(e,r,a){this.line=r,this.rest=Jv(r),this.size=this.rest?Ke(ke(this.rest))-a+1:1,this.node=this.text=null,this.hidden=er(e,r)}function Io(e,r,a){for(var o=[],u,f=r;f2&&f.push((x.bottom+S.top)/2-a.top)}}f.push(a.bottom-a.top)}}function Su(e,r,a){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var o=0;oa)return{map:e.measure.maps[u],cache:e.measure.caches[u],before:!0}}function yb(e,r){r=In(r);var a=Ke(r),o=e.display.externalMeasured=new vu(e.doc,r,a);o.lineN=a;var u=o.built=mu(e,o);return o.text=u.pre,Q(e.display.lineMeasure,u.pre),o}function Cu(e,r,a,o){return Mn(e,Nr(e,r),a,o)}function us(e,r){if(r>=e.display.viewFrom&&r=a.lineN&&rr)&&(f=x-k,u=f-1,r>=x&&(b="right")),u!=null){if(o=e[S+2],k==x&&a==(o.insertLeft?"left":"right")&&(b=a),a=="left"&&u==0)for(;S&&e[S-2]==e[S-3]&&e[S-1].insertLeft;)o=e[(S-=3)+2],b="left";if(a=="right"&&u==x-k)for(;S=0&&!((a=e[u]).left!=a.right);u--);return a}function kb(e,r,a,o){var u=Du(r.map,a,o),f=u.node,b=u.start,k=u.end,x=u.collapse,S;if(f.nodeType==3){for(var M=0;M<4;M++){for(;b&&kt(r.line.text.charAt(u.coverStart+b));)--b;for(;u.coverStart+k0&&(x=o="right");var P;e.options.lineWrapping&&(P=f.getClientRects()).length>1?S=P[o=="right"?P.length-1:0]:S=f.getBoundingClientRect()}if(d&&h<9&&!b&&(!S||!S.left&&!S.right)){var G=f.parentNode.getClientRects()[0];G?S={left:G.left,right:G.left+Hr(e.display),top:G.top,bottom:G.bottom}:S=Eu}for(var $=S.top-r.rect.top,ne=S.bottom-r.rect.top,ie=($+ne)/2,le=r.view.measure.heights,fe=0;fe=o.text.length?(x=o.text.length,S="before"):x<=0&&(x=0,S="after"),!k)return b(S=="before"?x-1:x,S=="before");function M(ne,ie,le){var fe=k[ie],ge=fe.level==1;return b(le?ne-1:ne,ge!=le)}var P=Ye(k,x,S),G=Ae,$=M(x,P,S=="before");return G!=null&&($.other=M(x,G,S!="before")),$}function Mu(e,r){var a=0;r=Me(e.doc,r),e.options.lineWrapping||(a=Hr(e.display)*r.ch);var o=ye(e.doc,r.line),u=$n(o)+Fo(e.display);return{left:a,right:a,top:u,bottom:u+o.height}}function hs(e,r,a,o,u){var f=j(e,r,a);return f.xRel=u,o&&(f.outside=o),f}function fs(e,r,a){var o=e.doc;if(a+=e.display.viewOffset,a<0)return hs(o.first,0,null,-1,-1);var u=L(o,a),f=o.first+o.size-1;if(u>f)return hs(o.first+o.size-1,ye(o,f).text.length,null,1,1);r<0&&(r=0);for(var b=ye(o,u);;){var k=_b(e,b,u,r,a),x=Zv(b,k.ch+(k.xRel>0||k.outside>0?1:0));if(!x)return k;var S=x.find(1);if(S.line==u)return S;b=ye(o,u=S.line)}}function qu(e,r,a,o){o-=cs(r);var u=r.text.length,f=Le(function(b){return Mn(e,a,b-1).bottom<=o},u,0);return u=Le(function(b){return Mn(e,a,b).top>o},f,u),{begin:f,end:u}}function zu(e,r,a,o){a||(a=Nr(e,r));var u=Mo(e,r,Mn(e,a,o),"line").top;return qu(e,r,a,u)}function ps(e,r,a,o){return e.bottom<=a?!1:e.top>a?!0:(o?e.left:e.right)>r}function _b(e,r,a,o,u){u-=$n(r);var f=Nr(e,r),b=cs(r),k=0,x=r.text.length,S=!0,M=Ot(r,e.doc.direction);if(M){var P=(e.options.lineWrapping?Cb:Sb)(e,r,a,f,M,o,u);S=P.level!=1,k=S?P.from:P.to-1,x=S?P.to:P.from-1}var G=null,$=null,ne=Le(function(De){var _e=Mn(e,f,De);return _e.top+=b,_e.bottom+=b,ps(_e,o,u,!1)?(_e.top<=u&&_e.left<=o&&(G=De,$=_e),!0):!1},k,x),ie,le,fe=!1;if($){var ge=o-$.left<$.right-o,pe=ge==S;ne=G+(pe?0:1),le=pe?"after":"before",ie=ge?$.left:$.right}else{!S&&(ne==x||ne==k)&&ne++,le=ne==0?"after":ne==r.text.length?"before":Mn(e,f,ne-(S?1:0)).bottom+b<=u==S?"after":"before";var ve=bn(e,j(a,ne,le),"line",r,f);ie=ve.left,fe=u=ve.bottom?1:0}return ne=Ce(r.text,ne,1),hs(a,ne,le,fe,o-ie)}function Sb(e,r,a,o,u,f,b){var k=Le(function(P){var G=u[P],$=G.level!=1;return ps(bn(e,j(a,$?G.to:G.from,$?"before":"after"),"line",r,o),f,b,!0)},0,u.length-1),x=u[k];if(k>0){var S=x.level!=1,M=bn(e,j(a,S?x.from:x.to,S?"after":"before"),"line",r,o);ps(M,f,b,!0)&&M.top>b&&(x=u[k-1])}return x}function Cb(e,r,a,o,u,f,b){var k=qu(e,r,o,b),x=k.begin,S=k.end;/\s/.test(r.text.charAt(S-1))&&S--;for(var M=null,P=null,G=0;G=S||$.to<=x)continue;var ne=$.level!=1,ie=Mn(e,o,ne?Math.min(S,$.to)-1:Math.max(x,$.from)).right,le=iele)&&(M=$,P=le)}return M||(M=u[u.length-1]),M.fromS&&(M={from:M.from,to:S,level:M.level}),M}var mr;function Br(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(mr==null){mr=_("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)mr.appendChild(document.createTextNode("x")),mr.appendChild(_("br"));mr.appendChild(document.createTextNode("x"))}Q(e.measure,mr);var a=mr.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),z(e.measure),a||1}function Hr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=_("span","xxxxxxxxxx"),a=_("pre",[r],"CodeMirror-line-like");Q(e.measure,a);var o=r.getBoundingClientRect(),u=(o.right-o.left)/10;return u>2&&(e.cachedCharWidth=u),u||10}function ms(e){for(var r=e.display,a={},o={},u=r.gutters.clientLeft,f=r.gutters.firstChild,b=0;f;f=f.nextSibling,++b){var k=e.display.gutterSpecs[b].className;a[k]=f.offsetLeft+f.clientLeft+u,o[k]=f.clientWidth}return{fixedPos:gs(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:a,gutterWidth:o,wrapperWidth:r.wrapper.clientWidth}}function gs(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ou(e){var r=Br(e.display),a=e.options.lineWrapping,o=a&&Math.max(5,e.display.scroller.clientWidth/Hr(e.display)-3);return function(u){if(er(e.doc,u))return 0;var f=0;if(u.widgets)for(var b=0;b0&&(S=ye(e.doc,x.line).text).length==x.ch){var M=ce(S,S.length,e.options.tabSize)-S.length;x=j(x.line,Math.max(0,Math.round((f-_u(e.display).left)/Hr(e.display))-M))}return x}function vr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var a=e.display.view,o=0;or)&&(u.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=u.viewTo)jn&&rs(e.doc,r)u.viewFrom?nr(e):(u.viewFrom+=o,u.viewTo+=o);else if(r<=u.viewFrom&&a>=u.viewTo)nr(e);else if(r<=u.viewFrom){var f=qo(e,a,a+o,1);f?(u.view=u.view.slice(f.index),u.viewFrom=f.lineN,u.viewTo+=o):nr(e)}else if(a>=u.viewTo){var b=qo(e,r,r,-1);b?(u.view=u.view.slice(0,b.index),u.viewTo=b.lineN):nr(e)}else{var k=qo(e,r,r,-1),x=qo(e,a,a+o,1);k&&x?(u.view=u.view.slice(0,k.index).concat(Io(e,k.lineN,x.lineN)).concat(u.view.slice(x.index)),u.viewTo+=o):nr(e)}var S=u.externalMeasured;S&&(a=u.lineN&&r=o.viewTo)return;var f=o.view[vr(e,r)];if(f.node==null)return;var b=f.changes||(f.changes=[]);ae(b,a)==-1&&b.push(a)}function nr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function qo(e,r,a,o){var u=vr(e,r),f,b=e.display.view;if(!jn||a==e.doc.first+e.doc.size)return{index:u,lineN:a};for(var k=e.display.viewFrom,x=0;x0){if(u==b.length-1)return null;f=k+b[u].size-r,u++}else f=k-r;r+=f,a+=f}for(;rs(e.doc,a)!=a;){if(u==(o<0?0:b.length-1))return null;a+=o*b[u-(o<0?1:0)].size,u+=o}return{index:u,lineN:a}}function Eb(e,r,a){var o=e.display,u=o.view;u.length==0||r>=o.viewTo||a<=o.viewFrom?(o.view=Io(e,r,a),o.viewFrom=r):(o.viewFrom>r?o.view=Io(e,r,o.viewFrom).concat(o.view):o.viewFroma&&(o.view=o.view.slice(0,vr(e,a)))),o.viewTo=a}function Pu(e){for(var r=e.display.view,a=0,o=0;o=e.display.viewTo||k.to().line0?r.blinker=setInterval(function(){e.hasFocus()||Ur(e),r.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Bu(e){e.state.focused||(e.display.input.focus(),ys(e))}function Hu(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ur(e))},100)}function ys(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ct(e,"focus",e,r),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),bs(e)}function Ur(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(ct(e,"blur",e,r),e.state.focused=!1,J(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Oo(e){for(var r=e.display,a=r.lineDiv.offsetTop,o=0;o.005||M<-.005)&&(pn(u.line,b),Uu(u.line),u.rest))for(var P=0;Pe.display.sizerWidth){var G=Math.ceil(k/Hr(e.display));G>e.display.maxLineLength&&(e.display.maxLineLength=G,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}function Uu(e){if(e.widgets)for(var r=0;r=b&&(f=L(r,$n(ye(r,x))-e.wrapper.clientHeight),b=x)}return{from:f,to:Math.max(b,f+1)}}function Ab(e,r){if(at(e,"scrollCursorIntoView"))return;var a=e.display,o=a.sizer.getBoundingClientRect(),u=null;if(r.top+o.top<0?u=!0:r.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(u=!1),u!=null&&!E){var f=_("div","​",null,`position: absolute; +b`.split(/\n/).length!=3?function(e){for(var r=0,a=[],o=e.length;r<=o;){var l=e.indexOf(` +`,r);l==-1&&(l=e.length);var f=e.slice(r,e.charAt(l-1)=="\r"?l-1:l),v=f.indexOf("\r");v!=-1?(a.push(f.slice(0,v)),r+=v+1):(a.push(f),r=l+1)}return a}:function(e){return e.split(/\r\n?|\n/)},An=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(a){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},er=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Mr=null;function Bn(e){if(Mr!=null)return Mr;var r=Z(e,_("span","x")),a=r.getBoundingClientRect(),o=j(r,0,1).getBoundingClientRect();return Mr=Math.abs(a.left-o.left)>1}var bi={},jn={};function qr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),bi[e]=r}function bn(e,r){jn[e]=r}function Hn(e){if(typeof e=="string"&&jn.hasOwnProperty(e))e=jn[e];else if(e&&typeof e.name=="string"&&jn.hasOwnProperty(e.name)){var r=jn[e.name];typeof r=="string"&&(r={name:r}),e=Wt(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Hn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Hn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function yi(e,r){r=Hn(r);var a=bi[r.name];if(!a)return yi(e,"text/plain");var o=a(e,r);if(Un.hasOwnProperty(r.name)){var l=Un[r.name];for(var f in l){if(!l.hasOwnProperty(f))continue;o.hasOwnProperty(f)&&(o["_"+f]=o[f]),o[f]=l[f]}}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var v in r.modeProps)o[v]=r.modeProps[v];return o}var Un={};function Qa(e,r){var a=Un.hasOwnProperty(e)?Un[e]:Un[e]={};T(r,a)}function fn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var a={};for(var o in r){var l=r[o];l instanceof Array&&(l=l.concat([])),a[o]=l}return a}function zr(e,r){for(var a;e.innerMode&&!(a=e.innerMode(r),!a||a.mode==e);)r=a.state,e=a.mode;return a||{mode:e,state:r}}function _o(e,r,a){return e.startState?e.startState(r,a):!0}var st=function(e,r,a){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};st.prototype.eol=function(){return this.pos>=this.string.length},st.prototype.sol=function(){return this.pos==this.lineStart},st.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},st.prototype.next=function(){if(this.posr},st.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},st.prototype.skipToEnd=function(){this.pos=this.string.length},st.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},st.prototype.backUp=function(e){this.pos-=e},st.prototype.column=function(){return this.lastColumnPos0?null:(f&&r!==!1&&(this.pos+=f[0].length),f)}},st.prototype.current=function(){return this.string.slice(this.start,this.pos)},st.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},st.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},st.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ke(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var a=e;!a.lines;)for(var o=0;;++o){var l=a.children[o],f=l.chunkSize();if(r=e.first&&ra?W(a,ke(e,a).text.length):Nv(r,ke(e,r.line).text.length)}function Nv(e,r){var a=e.ch;return a==null||a>r?W(e.line,r):a<0?W(e.line,0):e}function Zl(e,r){for(var a=[],o=0;othis.maxLookAhead&&(this.maxLookAhead=e),r},Ln.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ln.fromSaved=function(e,r,a){return r instanceof So?new Ln(e,fn(e.mode,r.state),a,r.lookAhead):new Ln(e,fn(e.mode,r),a)},Ln.prototype.save=function(e){var r=e!==!1?fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new So(r,this.maxLookAhead):r};function Ql(e,r,a,o){var l=[e.state.modeGen],f={};iu(e,r.text,e.doc.mode,a,function(C,M){return l.push(C,M)},f,o);for(var v=a.state,k=function(C){a.baseTokens=l;var M=e.state.overlays[C],O=1,K=0;a.state=!0,iu(e,r.text,M.mode,a,function($,ne){for(var oe=O;K<$;){var ue=l[O];ue>$&&l.splice(O,1,$,l[O+1],ue),O+=2,K=Math.min($,ue)}if(!ne)return;if(M.opaque)l.splice(oe,O-oe,$,"overlay "+ne),O=oe+2;else for(;oee.options.maxHighlightLength&&fn(e.doc.mode,o.state),f=Ql(e,r,o);l&&(o.state=l),r.stateAfter=o.save(!l),r.styles=f.styles,f.classes?r.styleClasses=f.classes:r.styleClasses&&(r.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function ki(e,r,a){var o=e.doc,l=e.display;if(!o.mode.startState)return new Ln(o,!0,r);var f=Bv(e,r,a),v=f>o.first&&ke(o,f-1).stateAfter,k=v?Ln.fromSaved(o,v,f):new Ln(o,_o(o.mode),f);return o.iter(f,r,function(x){Ja(e,x.text,k);var C=k.line;x.stateAfter=C==r-1||C%5==0||C>=l.viewFrom&&Cr.start)return f}throw new Error("Mode "+e.name+" failed to advance stream.")}var tu=function(e,r,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=a};function nu(e,r,a,o){var l=e.doc,f=l.mode,v;r=Me(l,r);var k=ke(l,r.line),x=ki(e,r.line,a),C=new st(k.text,e.options.tabSize,x),M;for(o&&(M=[]);(o||C.pose.options.maxHighlightLength?(k=!1,v&&Ja(e,r,o,M.pos),M.pos=r.length,O=null):O=ru(es(a,M,o.state,K),f),K){var $=K[0].name;$&&(O="m-"+(O?$+" "+O:$))}if(!k||C!=O){for(;xv;--k){if(k<=f.first)return f.first;var x=ke(f,k-1),C=x.stateAfter;if(C&&(!a||k+(C instanceof So?C.lookAhead:0)<=f.modeFrontier))return k;var M=ce(x.text,null,e.options.tabSize);(l==null||o>M)&&(l=k-1,o=M)}return l}function jv(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontiera;o--){var l=ke(e,o).stateAfter;if(l&&(!(l instanceof So)||o+l.lookAhead=r:f.to>r);(o||(o=[])).push(new Eo(v,f.from,x?null:f.to))}}return o}function Kv(e,r,a){var o;if(e)for(var l=0;l=r:f.to>r);if(k||f.from==r&&v.type=="bookmark"&&(!a||f.marker.insertLeft)){var x=f.from==null||(v.inclusiveLeft?f.from<=r:f.from0&&k)for(var ve=0;ve0)continue;var M=[x,1],O=he(C.from,k.from),K=he(C.to,k.to);(O<0||!v.inclusiveLeft&&!O)&&M.push({from:C.from,to:k.from}),(K>0||!v.inclusiveRight&&!K)&&M.push({from:k.to,to:C.to}),l.splice.apply(l,M),x+=M.length-3}return l}function su(e){var r=e.markedSpans;if(!r)return;for(var a=0;ar)&&(!o||ns(o,f.marker)<0)&&(o=f.marker)}return o}function du(e,r,a,o,l){var f=ke(e,r),v=Wn&&f.markedSpans;if(v)for(var k=0;k=0&&O<=0||M<=0&&O>=0)continue;if(M<=0&&(x.marker.inclusiveRight&&l.inclusiveLeft?he(C.to,a)>=0:he(C.to,a)>0)||M>=0&&(x.marker.inclusiveRight&&l.inclusiveLeft?he(C.from,o)<=0:he(C.from,o)<0))return!0}}function In(e){for(var r;r=cu(e);)e=r.find(-1,!0).line;return e}function Xv(e){for(var r;r=To(e);)e=r.find(1,!0).line;return e}function Zv(e){for(var r,a;r=To(e);)e=r.find(1,!0).line,(a||(a=[])).push(e);return a}function rs(e,r){var a=ke(e,r),o=In(a);return a==o?r:Ke(o)}function hu(e,r){if(r>e.lastLine())return r;var a=ke(e,r),o;if(!tr(e,a))return r;for(;o=To(a);)a=o.find(1,!0).line;return Ke(a)+1}function tr(e,r){var a=Wn&&r.markedSpans;if(a)for(var o=void 0,l=0;lr.maxLineLength&&(r.maxLineLength=l,r.maxLine=o)})}var Pr=function(e,r,a){this.text=e,lu(this,r),this.height=a?a(this):1};Pr.prototype.lineNo=function(){return Ke(this)},Jn(Pr);function Qv(e,r,a,o){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),su(e),lu(e,a);var l=o?o(e):1;l!=e.height&&pn(e,l)}function Jv(e){e.parent=null,su(e)}var eb={},tb={};function fu(e,r){if(!e||/^\s*$/.test(e))return null;var a=r.addModeClass?tb:eb;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function pu(e,r){var a=V("span",null,null,p?"padding-right: .1px":null),o={pre:V("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var l=0;l<=(r.rest?r.rest.length:0);l++){var f=l?r.rest[l-1]:r.line,v=void 0;o.pos=0,o.addToken=rb,Za(e.display.measure)&&(v=Pt(f,e.doc.direction))&&(o.addToken=ob(o.addToken,v)),o.map=[];var k=r!=e.display.externalMeasured&&Ke(f);ab(f,o,Jl(e,f,k)),f.styleClasses&&(f.styleClasses.bgClass&&(o.bgClass=H(f.styleClasses.bgClass,o.bgClass||"")),f.styleClasses.textClass&&(o.textClass=H(f.styleClasses.textClass,o.textClass||""))),o.map.length==0&&o.map.push(0,0,o.content.appendChild(xo(e.display.measure))),l==0?(r.measure.map=o.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(o.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(p){var x=o.content.lastChild;(/\bcm-tab\b/.test(x.className)||x.querySelector&&x.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return ct(e,"renderLine",e,r.line,o.pre),o.pre.className&&(o.textClass=H(o.pre.className,o.textClass||"")),o}function nb(e){var r=_("span","•","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function rb(e,r,a,o,l,f,v){if(!r)return;var k=e.splitSpaces?ib(r,e.trailingSpace):r,x=e.cm.state.specialChars,C=!1,M;if(!x.test(r))e.col+=r.length,M=document.createTextNode(k),e.map.push(e.pos,e.pos+r.length,M),d&&h<9&&(C=!0),e.pos+=r.length;else{M=document.createDocumentFragment();for(var O=0;;){x.lastIndex=O;var K=x.exec(r),$=K?K.index-O:r.length-O;if($){var ne=document.createTextNode(k.slice(O,O+$));d&&h<9?M.appendChild(_("span",[ne])):M.appendChild(ne),e.map.push(e.pos,e.pos+$,ne),e.col+=$,e.pos+=$}if(!K)break;O+=$+1;var oe=void 0;if(K[0]==" "){var ue=e.cm.options.tabSize,fe=ue-e.col%ue;oe=M.appendChild(_("span",Tt(fe),"cm-tab")),oe.setAttribute("role","presentation"),oe.setAttribute("cm-text"," "),e.col+=fe}else K[0]=="\r"||K[0]==` +`?(oe=M.appendChild(_("span",K[0]=="\r"?"␍":"␤","cm-invalidchar")),oe.setAttribute("cm-text",K[0]),e.col+=1):(oe=e.cm.options.specialCharPlaceholder(K[0]),oe.setAttribute("cm-text",K[0]),d&&h<9?M.appendChild(_("span",[oe])):M.appendChild(oe),e.col+=1);e.map.push(e.pos,e.pos+1,oe),e.pos++}}if(e.trailingSpace=k.charCodeAt(r.length-1)==32,a||o||l||C||f||v){var ge=a||"";o&&(ge+=o),l&&(ge+=l);var pe=_("span",[M],ge,f);if(v)for(var ve in v)v.hasOwnProperty(ve)&&ve!="style"&&ve!="class"&&pe.setAttribute(ve,v[ve]);return e.content.appendChild(pe)}e.content.appendChild(M)}function ib(e,r){if(e.length>1&&!/ /.test(e))return e;for(var a=r,o="",l=0;lC&&O.from<=C);K++);if(O.to>=M)return e(a,o,l,f,v,k,x);e(a,o.slice(0,O.to-C),l,f,null,k,x),f=null,o=o.slice(O.to-C),C=O.to}}}function mu(e,r,a,o){var l=!o&&a.widgetNode;l&&e.map.push(e.pos,e.pos+r,l),!o&&e.cm.display.input.needsContentAttribute&&(l||(l=e.content.appendChild(document.createElement("span"))),l.setAttribute("cm-marker",a.id)),l&&(e.cm.display.input.setUneditable(l),e.content.appendChild(l)),e.pos+=r,e.trailingSpace=!1}function ab(e,r,a){var o=e.markedSpans,l=e.text,f=0;if(!o){for(var v=1;vx||Pe.collapsed&&Se.to==x&&Se.from==x)){if(Se.to!=null&&Se.to!=x&&$>Se.to&&($=Se.to,oe=""),Pe.className&&(ne+=" "+Pe.className),Pe.css&&(K=(K?K+";":"")+Pe.css),Pe.startStyle&&Se.from==x&&(ue+=" "+Pe.startStyle),Pe.endStyle&&Se.to==$&&(ve||(ve=[])).push(Pe.endStyle,Se.to),Pe.title&&((ge||(ge={})).title=Pe.title),Pe.attributes)for(var rt in Pe.attributes)(ge||(ge={}))[rt]=Pe.attributes[rt];Pe.collapsed&&(!fe||ns(fe.marker,Pe)<0)&&(fe=Se)}else Se.from>x&&$>Se.from&&($=Se.from)}if(ve)for(var Ft=0;Ft=k)break;for(var rn=Math.min(k,$);;){if(M){var Qt=x+M.length;if(!fe){var wt=Qt>rn?M.slice(0,rn-x):M;r.addToken(r,wt,O?O+ne:ne,ue,x+wt.length==$?oe:"",K,ge)}if(Qt>=rn){M=M.slice(rn-x),x=rn;break}x=Qt,ue=""}M=l.slice(f,f=a[C++]),O=fu(a[C++],r.cm.options)}}}function gu(e,r,a){this.line=r,this.rest=Zv(r),this.size=this.rest?Ke(xe(this.rest))-a+1:1,this.node=this.text=null,this.hidden=tr(e,r)}function Io(e,r,a){for(var o=[],l,f=r;f2&&f.push((x.bottom+C.top)/2-a.top)}}f.push(a.bottom-a.top)}}function _u(e,r,a){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var o=0;oa)return{map:e.measure.maps[l],cache:e.measure.caches[l],before:!0}}function vb(e,r){r=In(r);var a=Ke(r),o=e.display.externalMeasured=new gu(e.doc,r,a);o.lineN=a;var l=o.built=pu(e,o);return o.text=l.pre,Z(e.display.lineMeasure,l.pre),o}function Cu(e,r,a,o){return Mn(e,Or(e,r),a,o)}function us(e,r){if(r>=e.display.viewFrom&&r=a.lineN&&rr)&&(f=x-k,l=f-1,r>=x&&(v="right")),l!=null){if(o=e[C+2],k==x&&a==(o.insertLeft?"left":"right")&&(v=a),a=="left"&&l==0)for(;C&&e[C-2]==e[C-3]&&e[C-1].insertLeft;)o=e[(C-=3)+2],v="left";if(a=="right"&&l==x-k)for(;C=0&&!((a=e[l]).left!=a.right);l--);return a}function yb(e,r,a,o){var l=Eu(r.map,a,o),f=l.node,v=l.start,k=l.end,x=l.collapse,C;if(f.nodeType==3){for(var M=0;M<4;M++){for(;v&&_t(r.line.text.charAt(l.coverStart+v));)--v;for(;l.coverStart+k0&&(x=o="right");var O;e.options.lineWrapping&&(O=f.getClientRects()).length>1?C=O[o=="right"?O.length-1:0]:C=f.getBoundingClientRect()}if(d&&h<9&&!v&&(!C||!C.left&&!C.right)){var K=f.parentNode.getClientRects()[0];K?C={left:K.left,right:K.left+Br(e.display),top:K.top,bottom:K.bottom}:C=Su}for(var $=C.top-r.rect.top,ne=C.bottom-r.rect.top,oe=($+ne)/2,ue=r.view.measure.heights,fe=0;fe=o.text.length?(x=o.text.length,C="before"):x<=0&&(x=0,C="after"),!k)return v(C=="before"?x-1:x,C=="before");function M(ne,oe,ue){var fe=k[oe],ge=fe.level==1;return v(ue?ne-1:ne,ge!=ue)}var O=Ve(k,x,C),K=Te,$=M(x,O,C=="before");return K!=null&&($.other=M(x,K,C!="before")),$}function Fu(e,r){var a=0;r=Me(e.doc,r),e.options.lineWrapping||(a=Br(e.display)*r.ch);var o=ke(e.doc,r.line),l=$n(o)+Fo(e.display);return{left:a,right:a,top:l,bottom:l+o.height}}function hs(e,r,a,o,l){var f=W(e,r,a);return f.xRel=l,o&&(f.outside=o),f}function fs(e,r,a){var o=e.doc;if(a+=e.display.viewOffset,a<0)return hs(o.first,0,null,-1,-1);var l=L(o,a),f=o.first+o.size-1;if(l>f)return hs(o.first+o.size-1,ke(o,f).text.length,null,1,1);r<0&&(r=0);for(var v=ke(o,l);;){var k=kb(e,v,l,r,a),x=Yv(v,k.ch+(k.xRel>0||k.outside>0?1:0));if(!x)return k;var C=x.find(1);if(C.line==l)return C;v=ke(o,l=C.line)}}function Mu(e,r,a,o){o-=cs(r);var l=r.text.length,f=Le(function(v){return Mn(e,a,v-1).bottom<=o},l,0);return l=Le(function(v){return Mn(e,a,v).top>o},f,l),{begin:f,end:l}}function qu(e,r,a,o){a||(a=Or(e,r));var l=Mo(e,r,Mn(e,a,o),"line").top;return Mu(e,r,a,l)}function ps(e,r,a,o){return e.bottom<=a?!1:e.top>a?!0:(o?e.left:e.right)>r}function kb(e,r,a,o,l){l-=$n(r);var f=Or(e,r),v=cs(r),k=0,x=r.text.length,C=!0,M=Pt(r,e.doc.direction);if(M){var O=(e.options.lineWrapping?_b:xb)(e,r,a,f,M,o,l);C=O.level!=1,k=C?O.from:O.to-1,x=C?O.to:O.from-1}var K=null,$=null,ne=Le(function(Ae){var Se=Mn(e,f,Ae);return Se.top+=v,Se.bottom+=v,ps(Se,o,l,!1)?(Se.top<=l&&Se.left<=o&&(K=Ae,$=Se),!0):!1},k,x),oe,ue,fe=!1;if($){var ge=o-$.left<$.right-o,pe=ge==C;ne=K+(pe?0:1),ue=pe?"after":"before",oe=ge?$.left:$.right}else{!C&&(ne==x||ne==k)&&ne++,ue=ne==0?"after":ne==r.text.length?"before":Mn(e,f,ne-(C?1:0)).bottom+v<=l==C?"after":"before";var ve=yn(e,W(a,ne,ue),"line",r,f);oe=ve.left,fe=l=ve.bottom?1:0}return ne=Ee(r.text,ne,1),hs(a,ne,ue,fe,o-oe)}function xb(e,r,a,o,l,f,v){var k=Le(function(O){var K=l[O],$=K.level!=1;return ps(yn(e,W(a,$?K.to:K.from,$?"before":"after"),"line",r,o),f,v,!0)},0,l.length-1),x=l[k];if(k>0){var C=x.level!=1,M=yn(e,W(a,C?x.from:x.to,C?"after":"before"),"line",r,o);ps(M,f,v,!0)&&M.top>v&&(x=l[k-1])}return x}function _b(e,r,a,o,l,f,v){var k=Mu(e,r,o,v),x=k.begin,C=k.end;/\s/.test(r.text.charAt(C-1))&&C--;for(var M=null,O=null,K=0;K=C||$.to<=x)continue;var ne=$.level!=1,oe=Mn(e,o,ne?Math.min(C,$.to)-1:Math.max(x,$.from)).right,ue=oeue)&&(M=$,O=ue)}return M||(M=l[l.length-1]),M.fromC&&(M={from:M.from,to:C,level:M.level}),M}var mr;function Nr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(mr==null){mr=_("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)mr.appendChild(document.createTextNode("x")),mr.appendChild(_("br"));mr.appendChild(document.createTextNode("x"))}Z(e.measure,mr);var a=mr.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),P(e.measure),a||1}function Br(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=_("span","xxxxxxxxxx"),a=_("pre",[r],"CodeMirror-line-like");Z(e.measure,a);var o=r.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function ms(e){for(var r=e.display,a={},o={},l=r.gutters.clientLeft,f=r.gutters.firstChild,v=0;f;f=f.nextSibling,++v){var k=e.display.gutterSpecs[v].className;a[k]=f.offsetLeft+f.clientLeft+l,o[k]=f.clientWidth}return{fixedPos:gs(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:a,gutterWidth:o,wrapperWidth:r.wrapper.clientWidth}}function gs(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zu(e){var r=Nr(e.display),a=e.options.lineWrapping,o=a&&Math.max(5,e.display.scroller.clientWidth/Br(e.display)-3);return function(l){if(tr(e.doc,l))return 0;var f=0;if(l.widgets)for(var v=0;v0&&(C=ke(e.doc,x.line).text).length==x.ch){var M=ce(C,C.length,e.options.tabSize)-C.length;x=W(x.line,Math.max(0,Math.round((f-xu(e.display).left)/Br(e.display))-M))}return x}function vr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var a=e.display.view,o=0;or)&&(l.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=l.viewTo)Wn&&rs(e.doc,r)l.viewFrom?rr(e):(l.viewFrom+=o,l.viewTo+=o);else if(r<=l.viewFrom&&a>=l.viewTo)rr(e);else if(r<=l.viewFrom){var f=qo(e,a,a+o,1);f?(l.view=l.view.slice(f.index),l.viewFrom=f.lineN,l.viewTo+=o):rr(e)}else if(a>=l.viewTo){var v=qo(e,r,r,-1);v?(l.view=l.view.slice(0,v.index),l.viewTo=v.lineN):rr(e)}else{var k=qo(e,r,r,-1),x=qo(e,a,a+o,1);k&&x?(l.view=l.view.slice(0,k.index).concat(Io(e,k.lineN,x.lineN)).concat(l.view.slice(x.index)),l.viewTo+=o):rr(e)}var C=l.externalMeasured;C&&(a=l.lineN&&r=o.viewTo)return;var f=o.view[vr(e,r)];if(f.node==null)return;var v=f.changes||(f.changes=[]);ie(v,a)==-1&&v.push(a)}function rr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function qo(e,r,a,o){var l=vr(e,r),f,v=e.display.view;if(!Wn||a==e.doc.first+e.doc.size)return{index:l,lineN:a};for(var k=e.display.viewFrom,x=0;x0){if(l==v.length-1)return null;f=k+v[l].size-r,l++}else f=k-r;r+=f,a+=f}for(;rs(e.doc,a)!=a;){if(l==(o<0?0:v.length-1))return null;a+=o*v[l-(o<0?1:0)].size,l+=o}return{index:l,lineN:a}}function Cb(e,r,a){var o=e.display,l=o.view;l.length==0||r>=o.viewTo||a<=o.viewFrom?(o.view=Io(e,r,a),o.viewFrom=r):(o.viewFrom>r?o.view=Io(e,r,o.viewFrom).concat(o.view):o.viewFroma&&(o.view=o.view.slice(0,vr(e,a)))),o.viewTo=a}function Pu(e){for(var r=e.display.view,a=0,o=0;o=e.display.viewTo||k.to().line0?r.blinker=setInterval(function(){e.hasFocus()||jr(e),r.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Nu(e){e.state.focused||(e.display.input.focus(),ys(e))}function Bu(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,jr(e))},100)}function ys(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ct(e,"focus",e,r),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),bs(e)}function jr(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(ct(e,"blur",e,r),e.state.focused=!1,J(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Po(e){for(var r=e.display,a=r.lineDiv.offsetTop,o=0;o.005||M<-.005)&&(pn(l.line,v),ju(l.line),l.rest))for(var O=0;Oe.display.sizerWidth){var K=Math.ceil(k/Br(e.display));K>e.display.maxLineLength&&(e.display.maxLineLength=K,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}function ju(e){if(e.widgets)for(var r=0;r=v&&(f=L(r,$n(ke(r,x))-e.wrapper.clientHeight),v=x)}return{from:f,to:Math.max(v,f+1)}}function Eb(e,r){if(at(e,"scrollCursorIntoView"))return;var a=e.display,o=a.sizer.getBoundingClientRect(),l=null;if(r.top+o.top<0?l=!0:r.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(l=!1),l!=null&&!D){var f=_("div","​",null,`position: absolute; top: `+(r.top-a.viewOffset-Fo(e.display))+`px; height: `+(r.bottom-r.top+Fn(e)+a.barHeight)+`px; - left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(f),f.scrollIntoView(u),e.display.lineSpace.removeChild(f)}}function Tb(e,r,a,o){o==null&&(o=0);var u;!e.options.lineWrapping&&r==a&&(r=r.ch?j(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,a=r.sticky=="before"?j(r.line,r.ch+1,"before"):r);for(var f=0;f<5;f++){var b=!1,k=bn(e,r),x=!a||a==r?k:bn(e,a);u={left:Math.min(k.left,x.left),top:Math.min(k.top,x.top)-o,right:Math.max(k.left,x.left),bottom:Math.max(k.bottom,x.bottom)+o};var S=ws(e,u),M=e.doc.scrollTop,P=e.doc.scrollLeft;if(S.scrollTop!=null&&(Ai(e,S.scrollTop),Math.abs(e.doc.scrollTop-M)>1&&(b=!0)),S.scrollLeft!=null&&(br(e,S.scrollLeft),Math.abs(e.doc.scrollLeft-P)>1&&(b=!0)),!b)break}return u}function Lb(e,r){var a=ws(e,r);a.scrollTop!=null&&Ai(e,a.scrollTop),a.scrollLeft!=null&&br(e,a.scrollLeft)}function ws(e,r){var a=e.display,o=Br(e.display);r.top<0&&(r.top=0);var u=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,f=ls(e),b={};r.bottom-r.top>f&&(r.bottom=r.top+f);var k=e.doc.height+ss(a),x=r.topk-o;if(r.topu+f){var M=Math.min(r.top,(S?k:r.bottom)-f);M!=u&&(b.scrollTop=M)}var P=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft,G=pr(e)-(e.options.fixedGutter?a.gutters.offsetWidth:0),$=r.right-r.left>G;return $&&(r.right=r.left+G),r.left<10?b.scrollLeft=0:r.leftG+P-3&&(b.scrollLeft=r.right+($?0:10)-G),b}function ks(e,r){if(r==null)return;Ro(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Wr(e){Ro(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Di(e,r,a){(r!=null||a!=null)&&Ro(e),r!=null&&(e.curOp.scrollLeft=r),a!=null&&(e.curOp.scrollTop=a)}function Ib(e,r){Ro(e),e.curOp.scrollToPos=r}function Ro(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var a=Mu(e,r.from),o=Mu(e,r.to);Wu(e,a,o,r.margin)}}function Wu(e,r,a,o){var u=ws(e,{left:Math.min(r.left,a.left),top:Math.min(r.top,a.top)-o,right:Math.max(r.right,a.right),bottom:Math.max(r.bottom,a.bottom)+o});Di(e,u.scrollLeft,u.scrollTop)}function Ai(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;i||_s(e,{top:r}),ju(e,r,!0),i&&_s(e),Ii(e,100)}function ju(e,r,a){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!a)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function br(e,r,a,o){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(a?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!o)return;e.doc.scrollLeft=r,Yu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Ti(e){var r=e.display,a=r.gutters.offsetWidth,o=Math.round(e.doc.height+ss(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?a:0,docHeight:o,scrollHeight:o+Fn(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:a}}var yr=function(e,r,a){this.cm=a;var o=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=u.tabIndex=-1,e(o),e(u),Ee(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),Ee(u,"scroll",function(){u.clientWidth&&r(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yr.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=r?o+"px":"0";var u=e.viewHeight-(r?o:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+u)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=a?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var f=e.viewWidth-e.barLeft-(a?o:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+f)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(o==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?o:0,bottom:r?o:0}},yr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yr.prototype.zeroWidthHack=function(){var e=A&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ue(),this.disableVert=new ue()},yr.prototype.enableZeroWidthBar=function(e,r,a){e.style.pointerEvents="auto";function o(){var u=e.getBoundingClientRect(),f=a=="vert"?document.elementFromPoint(u.right-1,(u.top+u.bottom)/2):document.elementFromPoint((u.right+u.left)/2,u.bottom-1);f!=e?e.style.pointerEvents="none":r.set(1e3,o)}r.set(1e3,o)},yr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Li=function(){};Li.prototype.update=function(){return{bottom:0,right:0}},Li.prototype.setScrollLeft=function(){},Li.prototype.setScrollTop=function(){},Li.prototype.clear=function(){};function jr(e,r){r||(r=Ti(e));var a=e.display.barWidth,o=e.display.barHeight;$u(e,r);for(var u=0;u<4&&a!=e.display.barWidth||o!=e.display.barHeight;u++)a!=e.display.barWidth&&e.options.lineWrapping&&Oo(e),$u(e,Ti(e)),a=e.display.barWidth,o=e.display.barHeight}function $u(e,r){var a=e.display,o=a.scrollbars.update(r);a.sizer.style.paddingRight=(a.barWidth=o.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=o.bottom)+"px",a.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=o.bottom+"px",a.scrollbarFiller.style.width=o.right+"px"):a.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=o.bottom+"px",a.gutterFiller.style.width=r.gutterWidth+"px"):a.gutterFiller.style.display=""}var Gu={native:yr,null:Li};function Ku(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&J(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gu[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Ee(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,a){a=="horizontal"?br(e,r):Ai(e,r)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Fb=0;function wr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Fb},ub(e.curOp)}function kr(e){var r=e.curOp;r&&db(r,function(a){for(var o=0;o=a.viewTo)||a.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new No(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function zb(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function Ob(e){var r=e.cm,a=r.display;e.updatedDisplay&&Oo(r),e.barMeasure=Ti(r),a.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Cu(r,a.maxLine,a.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Fn(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-pr(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function Pb(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var a=+new Date()+e.options.workTime,o=wi(e,r.highlightFrontier),u=[];r.iter(o.line,Math.min(r.first+r.size,e.display.viewTo+500),function(f){if(o.line>=e.display.viewFrom){var b=f.styles,k=f.text.length>e.options.maxHighlightLength?fn(r.mode,o.state):null,x=Jl(e,f,o,!0);k&&(o.state=k),f.styles=x.styles;var S=f.styleClasses,M=x.classes;M?f.styleClasses=M:S&&(f.styleClasses=null);for(var P=!b||b.length!=f.styles.length||S!=M&&(!S||!M||S.bgClass!=M.bgClass||S.textClass!=M.textClass),G=0;!P&&Ga)return Ii(e,e.options.workDelay),!0}),r.highlightFrontier=o.line,r.modeFrontier=Math.max(r.modeFrontier,o.line),u.length&&nn(e,function(){for(var f=0;f=a.viewFrom&&r.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&Pu(e)==0)return!1;Xu(e)&&(nr(e),r.dims=ms(e));var u=o.first+o.size,f=Math.max(r.visible.from-e.options.viewportMargin,o.first),b=Math.min(u,r.visible.to+e.options.viewportMargin);a.viewFromb&&a.viewTo-b<20&&(b=Math.min(u,a.viewTo)),jn&&(f=rs(e.doc,f),b=fu(e.doc,b));var k=f!=a.viewFrom||b!=a.viewTo||a.lastWrapHeight!=r.wrapperHeight||a.lastWrapWidth!=r.wrapperWidth;Eb(e,f,b),a.viewOffset=$n(ye(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var x=Pu(e);if(!k&&x==0&&!r.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var S=Hb(e);return x>4&&(a.lineDiv.style.display="none"),Wb(e,a.updateLineNumbers,r.dims),x>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,Ub(S),z(a.cursorDiv),z(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,k&&(a.lastWrapHeight=r.wrapperHeight,a.lastWrapWidth=r.wrapperWidth,Ii(e,400)),a.updateLineNumbers=null,!0}function Vu(e,r){for(var a=r.viewport,o=!0;;o=!1){if(!o||!e.options.lineWrapping||r.oldDisplayWidth==pr(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+ss(e.display)-ls(e),a.top)}),r.visible=Po(e.display,e.doc,a),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else o&&(r.visible=Po(e.display,e.doc,a));if(!xs(e,r))break;Oo(e);var u=Ti(e);Ei(e),jr(e,u),Cs(e,u),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _s(e,r){var a=new No(e,r);if(xs(e,a)){Oo(e),Vu(e,a);var o=Ti(e);Ei(e),jr(e,o),Cs(e,o),a.finish()}}function Wb(e,r,a){var o=e.display,u=e.options.lineNumbers,f=o.lineDiv,b=f.firstChild;function k(ne){var ie=ne.nextSibling;return p&&A&&e.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),ie}for(var x=o.view,S=o.viewFrom,M=0;M-1&&($=!1),bu(e,P,S,a)),$&&(z(P.lineNumber),P.lineNumber.appendChild(document.createTextNode(re(e.options,S)))),b=P.node.nextSibling}S+=P.size}for(;b;)b=k(b)}function Ss(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Cs(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Fn(e)+"px"}function Yu(e){var r=e.display,a=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var o=gs(r)-r.scroller.scrollLeft+e.doc.scrollLeft,u=r.gutters.offsetWidth,f=o+"px",b=0;bb.clientWidth,x=b.scrollHeight>b.clientHeight;if(!(o&&k||u&&x))return;if(u&&A&&p){e:for(var S=r.target,M=f.view;S!=b;S=S.parentNode)for(var P=0;P=0&&de(e,o.to())<=0)return a}return-1};var Xe=function(e,r){this.anchor=e,this.head=r};Xe.prototype.from=function(){return Yt(this.anchor,this.head)},Xe.prototype.to=function(){return _t(this.anchor,this.head)},Xe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function yn(e,r,a){var o=e&&e.options.selectionsMayTouch,u=r[a];r.sort(function(G,$){return de(G.from(),$.from())}),a=ae(r,u);for(var f=1;f0:x>=0){var S=Yt(k.from(),b.from()),M=_t(k.to(),b.to()),P=k.empty()?b.from()==b.head:k.from()==k.head;f<=a&&--a,r.splice(--f,2,new Xe(P?M:S,P?S:M))}}return new sn(r,a)}function rr(e,r){return new sn([new Xe(e,r||e)],0)}function ir(e){return e.text?j(e.from.line+e.text.length-1,ke(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ec(e,r){if(de(e,r.from)<0)return e;if(de(e,r.to)<=0)return ir(r);var a=e.line+r.text.length-(r.to.line-r.from.line)-1,o=e.ch;return e.line==r.to.line&&(o+=ir(r).ch-r.to.ch),j(a,o)}function Ds(e,r){for(var a=[],o=0;o1&&e.remove(k.line+1,ne-1),e.insert(k.line+1,fe)}Pt(e,"change",e,r)}function or(e,r,a){function o(u,f,b){if(u.linked)for(var k=0;k1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ke(e.done)}function ac(e,r,a,o){var u=e.history;u.undone.length=0;var f=+new Date(),b,k;if((u.lastOp==o||u.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&u.lastModTime>f-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(b=Vb(u,u.lastOp==o)))k=ke(b.changes),de(r.from,r.to)==0&&de(r.from,k.to)==0?k.to=ir(r):b.changes.push(Ls(e,r));else{var x=ke(u.done);for((!x||!x.ranges)&&Uo(e.sel,u.done),b={changes:[Ls(e,r)],generation:u.generation},u.done.push(b);u.done.length>u.undoDepth;)u.done.shift(),u.done[0].ranges||u.done.shift()}u.done.push(a),u.generation=++u.maxGeneration,u.lastModTime=u.lastSelTime=f,u.lastOp=u.lastSelOp=o,u.lastOrigin=u.lastSelOrigin=r.origin,k||ct(e,"historyAdded")}function Yb(e,r,a,o){var u=r.charAt(0);return u=="*"||u=="+"&&a.ranges.length==o.ranges.length&&a.somethingSelected()==o.somethingSelected()&&new Date()-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Xb(e,r,a,o){var u=e.history,f=o&&o.origin;a==u.lastSelOp||f&&u.lastSelOrigin==f&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==f||Yb(e,f,ke(u.done),r))?u.done[u.done.length-1]=r:Uo(r,u.done),u.lastSelTime=+new Date(),u.lastSelOrigin=f,u.lastSelOp=a,o&&o.clearRedo!==!1&&oc(u.undone)}function Uo(e,r){var a=ke(r);a&&a.ranges&&a.equals(e)||r.push(e)}function sc(e,r,a,o){var u=r["spans_"+e.id],f=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,o),function(b){b.markedSpans&&((u||(u=r["spans_"+e.id]={}))[f]=b.markedSpans),++f})}function Zb(e){if(!e)return null;for(var r,a=0;a-1&&(ke(k)[P]=S[P],delete S[P]))}}return o}function Is(e,r,a,o){if(o){var u=e.anchor;if(a){var f=de(r,u)<0;f!=de(a,u)<0?(u=r,r=a):f!=de(r,a)<0&&(r=a)}return new Xe(u,r)}else return new Xe(a||r,r)}function Wo(e,r,a,o,u){u==null&&(u=e.cm&&(e.cm.display.shift||e.extend)),Ht(e,new sn([Is(e.sel.primary(),r,a,u)],0),o)}function uc(e,r,a){for(var o=[],u=e.cm&&(e.cm.display.shift||e.extend),f=0;f=r.ch:k.to>r.ch))){if(u&&(ct(x,"beforeCursorEnter"),x.explicitlyCleared))if(f.markedSpans){--b;continue}else break;if(!x.atomic)continue;if(a){var P=x.find(o<0?1:-1),G=void 0;if((o<0?M:S)&&(P=mc(e,P,-o,P&&P.line==r.line?f:null)),P&&P.line==r.line&&(G=de(P,a))&&(o<0?G<0:G>0))return Gr(e,P,r,o,u)}var $=x.find(o<0?-1:1);return(o<0?S:M)&&($=mc(e,$,o,$.line==r.line?f:null)),$?Gr(e,$,r,o,u):null}}return r}function $o(e,r,a,o,u){var f=o||1,b=Gr(e,r,a,f,u)||!u&&Gr(e,r,a,f,!0)||Gr(e,r,a,-f,u)||!u&&Gr(e,r,a,-f,!0);return b||(e.cantEdit=!0,j(e.first,0))}function mc(e,r,a,o){return a<0&&r.ch==0?r.line>e.first?Me(e,j(r.line-1)):null:a>0&&r.ch==(o||ye(e,r.line)).text.length?r.line=0;--u)bc(e,{from:o[u].from,to:o[u].to,text:u?[""]:r.text,origin:r.origin});else bc(e,r)}function bc(e,r){if(r.text.length==1&&r.text[0]==""&&de(r.from,r.to)==0)return;var a=Ds(e,r);ac(e,r,a,e.cm?e.cm.curOp.id:NaN),qi(e,r,a,ts(e,r));var o=[];or(e,function(u,f){!f&&ae(o,u.history)==-1&&(xc(u.history,r),o.push(u.history)),qi(u,r,null,ts(u,r))})}function Go(e,r,a){var o=e.cm&&e.cm.state.suppressEdits;if(o&&!a)return;for(var u=e.history,f,b=e.sel,k=r=="undo"?u.done:u.undone,x=r=="undo"?u.undone:u.done,S=0;S=0;--$){var ne=G($);if(ne)return ne.v}}function yc(e,r){if(r==0)return;if(e.first+=r,e.sel=new sn(tt(e.sel.ranges,function(u){return new Xe(j(u.anchor.line+r,u.anchor.ch),j(u.head.line+r,u.head.ch))}),e.sel.primIndex),e.cm){Xt(e.cm,e.first,e.first-r,r);for(var a=e.cm.display,o=a.viewFrom;oe.lastLine())return;if(r.from.linef&&(r={from:r.from,to:j(f,ye(e,f).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Tn(e,r.from,r.to),a||(a=Ds(e,r)),e.cm?ey(e.cm,r,o):Ts(e,r,o),jo(e,a,we),e.cantEdit&&$o(e,j(e.firstLine(),0))&&(e.cantEdit=!1)}function ey(e,r,a){var o=e.doc,u=e.display,f=r.from,b=r.to,k=!1,x=f.line;e.options.lineWrapping||(x=Ke(In(ye(o,f.line))),o.iter(x,b.line+1,function($){if($==u.maxLine)return k=!0,!0})),o.sel.contains(r.from,r.to)>-1&&Ir(e),Ts(o,r,a,Ou(e)),e.options.lineWrapping||(o.iter(x,f.line+r.text.length,function($){var ne=Lo($);ne>u.maxLineLength&&(u.maxLine=$,u.maxLineLength=ne,u.maxLineChanged=!0,k=!1)}),k&&(e.curOp.updateMaxLine=!0)),Wv(o,f.line),Ii(e,400);var S=r.text.length-(b.line-f.line)-1;r.full?Xt(e):f.line==b.line&&r.text.length==1&&!nc(e.doc,r)?tr(e,f.line,"text"):Xt(e,f.line,b.line+1,S);var M=bt(e,"changes"),P=bt(e,"change");if(P||M){var G={from:f,to:b,text:r.text,removed:r.removed,origin:r.origin};P&&Pt(e,"change",e,G),M&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(G)}e.display.selForContextMenu=null}function Vr(e,r,a,o,u){var f;o||(o=a),de(o,a)<0&&(f=[o,a],a=f[0],o=f[1]),typeof r=="string"&&(r=e.splitLines(r)),Kr(e,{from:a,to:o,text:r,origin:u})}function wc(e,r,a,o){a1||!(this.children[0]instanceof Oi))){var k=[];this.collapse(k),this.children=[new Oi(k)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r50){for(var b=u.lines.length%25+25,k=b;k10);e.parent.maybeSpill()},iterN:function(e,r,a){for(var o=0;oe.display.maxLineLength&&(e.display.maxLine=S,e.display.maxLineLength=M,e.display.maxLineChanged=!0)}o!=null&&e&&this.collapsed&&Xt(e,o,u+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&fc(e.doc)),e&&Pt(e,"markerCleared",e,this,o,u),r&&kr(e),this.parent&&this.parent.clear()},ar.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var a,o,u=0;u0||b==0&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Y("span",[f.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(hu(e,r.line,r,a,f)||r.line!=a.line&&hu(e,a.line,r,a,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");$v()}f.addToHistory&&ac(e,{from:r,to:a,origin:"markText"},e.sel,NaN);var k=r.line,x=e.cm,S;if(e.iter(k,a.line+1,function(P){x&&f.collapsed&&!x.options.lineWrapping&&In(P)==x.display.maxLine&&(S=!0),f.collapsed&&k!=r.line&&pn(P,0),Kv(P,new Eo(f,k==r.line?r.ch:null,k==a.line?a.ch:null)),++k}),f.collapsed&&e.iter(r.line,a.line+1,function(P){er(e,P)&&pn(P,0)}),f.clearOnEnter&&Ee(f,"beforeCursorEnter",function(){return f.clear()}),f.readOnly&&(jv(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),f.collapsed&&(f.id=++Sc,f.atomic=!0),x){if(S&&(x.curOp.updateMaxLine=!0),f.collapsed)Xt(x,r.line,a.line+1);else if(f.className||f.startStyle||f.endStyle||f.css||f.attributes||f.title)for(var M=r.line;M<=a.line;M++)tr(x,M,"text");f.atomic&&fc(x.doc),Pt(x,"markerAdded",x,f)}return f}var Ni=function(e,r){this.markers=e,this.primary=r;for(var a=0;a=0;x--)Kr(this,o[x]);k?dc(this,k):this.cm&&Wr(this.cm)}),undo:It(function(){Go(this,"undo")}),redo:It(function(){Go(this,"redo")}),undoSelection:It(function(){Go(this,"undo",!0)}),redoSelection:It(function(){Go(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,a=0,o=0;o=e.ch)&&r.push(u.marker.parent||u.marker)}return r},findMarks:function(e,r,a){e=Me(this,e),r=Me(this,r);var o=[],u=e.line;return this.iter(e.line,r.line+1,function(f){var b=f.markedSpans;if(b)for(var k=0;k=x.to||x.from==null&&u!=e.line||x.from!=null&&u==r.line&&x.from>=r.ch)&&(!a||a(x.marker))&&o.push(x.marker.parent||x.marker)}++u}),o},getAllMarks:function(){var e=[];return this.iter(function(r){var a=r.markedSpans;if(a)for(var o=0;oe)return r=e,!0;e-=f,++a}),Me(this,j(a,r))},indexFromPos:function(e){e=Me(this,e);var r=e.ch;if(e.liner&&(r=e.from),e.to!=null&&e.to-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var M=e.dataTransfer.getData("Text");if(M){var P;if(r.state.draggingText&&!r.state.draggingText.copy&&(P=r.listSelections()),jo(r.doc,rr(a,a)),P)for(var G=0;G=0;k--)Vr(e.doc,"",o[k].from,o[k].to,"+delete");Wr(e)})}function Ms(e,r,a){var o=Ce(e.text,r+a,a);return o<0||o>e.text.length?null:o}function qs(e,r,a){var o=Ms(e,r.ch,a);return o==null?null:new j(r.line,o,a<0?"after":"before")}function zs(e,r,a,o,u){if(e){r.doc.direction=="rtl"&&(u=-u);var f=Ot(a,r.doc.direction);if(f){var b=u<0?ke(f):f[0],k=u<0==(b.level==1),x=k?"after":"before",S;if(b.level>0||r.doc.direction=="rtl"){var M=Nr(r,a);S=u<0?a.text.length-1:0;var P=Mn(r,M,S).top;S=Le(function(G){return Mn(r,M,G).top==P},u<0==(b.level==1)?b.from:b.to-1,S),x=="before"&&(S=Ms(a,S,1))}else S=u<0?b.to:b.from;return new j(o,S,x)}}return new j(o,u<0?a.text.length:0,u<0?"before":"after")}function py(e,r,a,o){var u=Ot(r,e.doc.direction);if(!u)return qs(r,a,o);a.ch>=r.text.length?(a.ch=r.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var f=Ye(u,a.ch,a.sticky),b=u[f];if(e.doc.direction=="ltr"&&b.level%2==0&&(o>0?b.to>a.ch:b.from=b.from&&G>=M.begin)){var $=P?"before":"after";return new j(a.line,G,$)}}var ne=function(fe,ge,pe){for(var ve=function(rt,Ft){return Ft?new j(a.line,k(rt,1),"before"):new j(a.line,rt,"after")};fe>=0&&fe0==(De.level!=1),ze=_e?pe.begin:k(pe.end,-1);if(De.from<=ze&&ze0?M.end:k(M.begin,-1);return le!=null&&!(o>0&&le==r.text.length)&&(ie=ne(o>0?0:u.length-1,o,S(le)),ie)?ie:null}var Ui={selectAll:gc,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),we)},killLine:function(e){return Zr(e,function(r){if(r.empty()){var a=ye(e.doc,r.head.line).text.length;return r.head.ch==a&&r.head.line0)u=new j(u.line,u.ch+1),e.replaceRange(f.charAt(u.ch-1)+f.charAt(u.ch-2),j(u.line,u.ch-2),u,"+transpose");else if(u.line>e.doc.first){var b=ye(e.doc,u.line-1).text;b&&(u=new j(u.line,1),e.replaceRange(f.charAt(0)+e.doc.lineSeparator()+b.charAt(b.length-1),j(u.line-1,b.length-1),u,"+transpose"))}}a.push(new Xe(u,u))}e.setSelections(a)})},newlineAndIndent:function(e){return nn(e,function(){for(var r=e.listSelections(),a=r.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),r[a].anchor,r[a].head,"+input");r=e.listSelections();for(var o=0;oe&&de(r,this.pos)==0&&a==this.button};var ji,$i;function ky(e,r){var a=+new Date();return $i&&$i.compare(a,e,r)?(ji=$i=null,"triple"):ji&&ji.compare(a,e,r)?($i=new Ps(a,e,r),ji=null,"double"):(ji=new Ps(a,e,r),$i=null,"single")}function Bc(e){var r=this,a=r.display;if(at(r,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,Gn(a,e)){p||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(Rs(r,e))return;var o=gr(r,e),u=ko(e),f=o?ky(o,u):"single";if(window.focus(),u==1&&r.state.selectingText&&r.state.selectingText(e),o&&xy(r,u,o,f,e))return;u==1?o?Sy(r,o,f,e):Fr(e)==a.scroller&&xt(e):u==2?(o&&Wo(r.doc,o),setTimeout(function(){return a.input.focus()},20)):u==3&&(K?r.display.input.onContextMenu(e):Hu(r))}function xy(e,r,a,o,u){var f="Click";return o=="double"?f="Double"+f:o=="triple"&&(f="Triple"+f),f=(r==1?"Left":r==2?"Middle":"Right")+f,Wi(e,Ic(f,u),u,function(b){if(typeof b=="string"&&(b=Ui[b]),!b)return!1;var k=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),k=b(e,a)!=Ue}finally{e.state.suppressEdits=!1}return k})}function _y(e,r,a){var o=e.getOption("configureMouse"),u=o?o(e,r,a):{};if(u.unit==null){var f=H?a.shiftKey&&a.metaKey:a.altKey;u.unit=f?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(u.extend==null||e.doc.extend)&&(u.extend=e.doc.extend||a.shiftKey),u.addNew==null&&(u.addNew=A?a.metaKey:a.ctrlKey),u.moveOnDrag==null&&(u.moveOnDrag=!(A?a.altKey:a.ctrlKey)),u}function Sy(e,r,a,o){d?setTimeout(F(Bu,e),0):e.curOp.focus=O();var u=_y(e,a,o),f=e.doc.sel,b;e.options.dragDrop&&En&&!e.isReadOnly()&&a=="single"&&(b=f.contains(r))>-1&&(de((b=f.ranges[b]).from(),r)<0||r.xRel>0)&&(de(b.to(),r)>0||r.xRel<0)?Cy(e,o,r,u):Ey(e,o,r,u)}function Cy(e,r,a,o){var u=e.display,f=!1,b=Lt(e,function(S){p&&(u.scroller.draggable=!1),e.state.draggingText=!1,Pe(u.wrapper.ownerDocument,"mouseup",b),Pe(u.wrapper.ownerDocument,"mousemove",k),Pe(u.scroller,"dragstart",x),Pe(u.scroller,"drop",b),f||(xt(S),o.addNew||Wo(e.doc,a,null,null,o.extend),p&&!v||d&&h==9?setTimeout(function(){u.wrapper.ownerDocument.body.focus({preventScroll:!0}),u.input.focus()},20):u.input.focus())}),k=function(S){f=f||Math.abs(r.clientX-S.clientX)+Math.abs(r.clientY-S.clientY)>=10},x=function(){return f=!0};p&&(u.scroller.draggable=!0),e.state.draggingText=b,b.copy=!o.moveOnDrag,u.scroller.dragDrop&&u.scroller.dragDrop(),Ee(u.wrapper.ownerDocument,"mouseup",b),Ee(u.wrapper.ownerDocument,"mousemove",k),Ee(u.scroller,"dragstart",x),Ee(u.scroller,"drop",b),Hu(e),setTimeout(function(){return u.input.focus()},20)}function Hc(e,r,a){if(a=="char")return new Xe(r,r);if(a=="word")return e.findWordAt(r);if(a=="line")return new Xe(j(r.line,0),Me(e.doc,j(r.line+1,0)));var o=a(e,r);return new Xe(o.from,o.to)}function Ey(e,r,a,o){var u=e.display,f=e.doc;xt(r);var b,k,x=f.sel,S=x.ranges;if(o.addNew&&!o.extend?(k=f.sel.contains(a),k>-1?b=S[k]:b=new Xe(a,a)):(b=f.sel.primary(),k=f.sel.primIndex),o.unit=="rectangle")o.addNew||(b=new Xe(a,a)),a=gr(e,r,!0,!0),k=-1;else{var M=Hc(e,a,o.unit);o.extend?b=Is(b,M.anchor,M.head,o.extend):b=M}o.addNew?k==-1?(k=S.length,Ht(f,yn(e,S.concat([b]),k),{scroll:!1,origin:"*mouse"})):S.length>1&&S[k].empty()&&o.unit=="char"&&!o.extend?(Ht(f,yn(e,S.slice(0,k).concat(S.slice(k+1)),0),{scroll:!1,origin:"*mouse"}),x=f.sel):Fs(f,k,b,Se):(k=0,Ht(f,new sn([b],0),Se),x=f.sel);var P=a;function G(pe){if(de(P,pe)==0)return;if(P=pe,o.unit=="rectangle"){for(var ve=[],De=e.options.tabSize,_e=ce(ye(f,a.line).text,a.ch,De),ze=ce(ye(f,pe.line).text,pe.ch,De),rt=Math.min(_e,ze),Ft=Math.max(_e,ze),ut=Math.min(a.line,pe.line),rn=Math.min(e.lastLine(),Math.max(a.line,pe.line));ut<=rn;ut++){var Qt=ye(f,ut).text,yt=Ge(Qt,rt,De);rt==Ft?ve.push(new Xe(j(ut,yt),j(ut,yt))):Qt.length>yt&&ve.push(new Xe(j(ut,yt),j(ut,Ge(Qt,Ft,De))))}ve.length||ve.push(new Xe(a,a)),Ht(f,yn(e,x.ranges.slice(0,k).concat(ve),k),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pe)}else{var Jt=b,Rt=Hc(e,pe,o.unit),St=Jt.anchor,wt;de(Rt.anchor,St)>0?(wt=Rt.head,St=Yt(Jt.from(),Rt.anchor)):(wt=Rt.anchor,St=_t(Jt.to(),Rt.head));var dt=x.ranges.slice(0);dt[k]=Dy(e,new Xe(Me(f,St),wt)),Ht(f,yn(e,dt,k),Se)}}var $=u.wrapper.getBoundingClientRect(),ne=0;function ie(pe){var ve=++ne,De=gr(e,pe,!0,o.unit=="rectangle");if(!De)return;if(de(De,P)!=0){e.curOp.focus=O(),G(De);var _e=Po(u,f);(De.line>=_e.to||De.line<_e.from)&&setTimeout(Lt(e,function(){ne==ve&&ie(pe)}),150)}else{var ze=pe.clientY<$.top?-20:pe.clientY>$.bottom?20:0;ze&&setTimeout(Lt(e,function(){if(ne!=ve)return;u.scroller.scrollTop+=ze,ie(pe)}),50)}}function le(pe){e.state.selectingText=!1,ne=Infinity,pe&&(xt(pe),u.input.focus()),Pe(u.wrapper.ownerDocument,"mousemove",fe),Pe(u.wrapper.ownerDocument,"mouseup",ge),f.history.lastSelOrigin=null}var fe=Lt(e,function(pe){pe.buttons===0||!ko(pe)?le(pe):ie(pe)}),ge=Lt(e,le);e.state.selectingText=ge,Ee(u.wrapper.ownerDocument,"mousemove",fe),Ee(u.wrapper.ownerDocument,"mouseup",ge)}function Dy(e,r){var a=r.anchor,o=r.head,u=ye(e.doc,a.line);if(de(a,o)==0&&a.sticky==o.sticky)return r;var f=Ot(u);if(!f)return r;var b=Ye(f,a.ch,a.sticky),k=f[b];if(k.from!=a.ch&&k.to!=a.ch)return r;var x=b+(k.from==a.ch==(k.level!=1)?0:1);if(x==0||x==f.length)return r;var S;if(o.line!=a.line)S=(o.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var M=Ye(f,o.ch,o.sticky),P=M-b||(o.ch-a.ch)*(k.level==1?-1:1);M==x-1||M==x?S=P<0:S=P>0}var G=f[x+(S?-1:0)],$=S==(G.level==1),ne=$?G.from:G.to,ie=$?"after":"before";return a.ch==ne&&a.sticky==ie?r:new Xe(new j(a.line,ne,ie),o)}function Uc(e,r,a,o){var u,f;if(r.touches)u=r.touches[0].clientX,f=r.touches[0].clientY;else try{u=r.clientX,f=r.clientY}catch(G){return!1}if(u>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;o&&xt(r);var b=e.display,k=b.lineDiv.getBoundingClientRect();if(f>k.bottom||!bt(e,a))return fr(r);f-=k.top-b.viewOffset;for(var x=0;x=u){var M=L(e.doc,f),P=e.display.gutterSpecs[x];return ct(e,a,e,M,P.className,r),fr(r)}}}function Rs(e,r){return Uc(e,r,"gutterClick",!0)}function Wc(e,r){if(Gn(e.display,r)||Ay(e,r))return;if(at(e,r,"contextmenu"))return;K||e.display.input.onContextMenu(r)}function Ay(e,r){return bt(e,"gutterContextMenu")?Uc(e,r,"gutterContextMenu",!1):!1}function jc(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ci(e)}var Qr={toString:function(){return"CodeMirror.Init"}},$c={},Xo={};function Ty(e){var r=e.optionHandlers;function a(o,u,f,b){e.defaults[o]=u,f&&(r[o]=b?function(k,x,S){S!=Qr&&f(k,x,S)}:f)}e.defineOption=a,e.Init=Qr,a("value","",function(o,u){return o.setValue(u)},!0),a("mode",null,function(o,u){o.doc.modeOption=u,As(o)},!0),a("indentUnit",2,As,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(o){Mi(o),Ci(o),Xt(o)},!0),a("lineSeparator",null,function(o,u){if(o.doc.lineSep=u,!u)return;var f=[],b=o.doc.first;o.doc.iter(function(x){for(var S=0;;){var M=x.text.indexOf(u,S);if(M==-1)break;S=M+u.length,f.push(j(b,M))}b++});for(var k=f.length-1;k>=0;k--)Vr(o.doc,u,f[k],j(f[k].line,f[k].ch+u.length))}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(o,u,f){o.state.specialChars=new RegExp(u.source+(u.test(" ")?"":"| "),"g"),f!=Qr&&o.refresh()}),a("specialCharPlaceholder",ib,function(o){return o.refresh()},!0),a("electricChars",!0),a("inputStyle",q?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(o,u){return o.getInputField().spellcheck=u},!0),a("autocorrect",!1,function(o,u){return o.getInputField().autocorrect=u},!0),a("autocapitalize",!1,function(o,u){return o.getInputField().autocapitalize=u},!0),a("rtlMoveVisually",!N),a("wholeLineUpdateBefore",!0),a("theme","default",function(o){jc(o),Fi(o)},!0),a("keyMap","default",function(o,u,f){var b=Vo(u),k=f!=Qr&&Vo(f);k&&k.detach&&k.detach(o,b),b.attach&&b.attach(o,k||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Iy,!0),a("gutters",[],function(o,u){o.display.gutterSpecs=Es(u,o.options.lineNumbers),Fi(o)},!0),a("fixedGutter",!0,function(o,u){o.display.gutters.style.left=u?gs(o.display)+"px":"0",o.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(o){return jr(o)},!0),a("scrollbarStyle","native",function(o){Ku(o),jr(o),o.display.scrollbars.setScrollTop(o.doc.scrollTop),o.display.scrollbars.setScrollLeft(o.doc.scrollLeft)},!0),a("lineNumbers",!1,function(o,u){o.display.gutterSpecs=Es(o.options.gutters,u),Fi(o)},!0),a("firstLineNumber",1,Fi,!0),a("lineNumberFormatter",function(o){return o},Fi,!0),a("showCursorWhenSelecting",!1,Ei,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(o,u){u=="nocursor"&&(Ur(o),o.display.input.blur()),o.display.input.readOnlyChanged(u)}),a("screenReaderLabel",null,function(o,u){u=u===""?null:u,o.display.input.screenReaderLabelChanged(u)}),a("disableInput",!1,function(o,u){u||o.display.input.reset()},!0),a("dragDrop",!0,Ly),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Ei,!0),a("singleCursorHeightPerLine",!0,Ei,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,Mi,!0),a("addModeClass",!1,Mi,!0),a("pollInterval",100),a("undoDepth",200,function(o,u){return o.doc.history.undoDepth=u}),a("historyEventDelay",1250),a("viewportMargin",10,function(o){return o.refresh()},!0),a("maxHighlightLength",1e4,Mi,!0),a("moveInputWithCursor",!0,function(o,u){u||o.display.input.resetPosition()}),a("tabindex",null,function(o,u){return o.display.input.getField().tabIndex=u||""}),a("autofocus",null),a("direction","ltr",function(o,u){return o.doc.setDirection(u)},!0),a("phrases",null)}function Ly(e,r,a){var o=a&&a!=Qr;if(!r!=!o){var u=e.display.dragFunctions,f=r?Ee:Pe;f(e.display.scroller,"dragstart",u.start),f(e.display.scroller,"dragenter",u.enter),f(e.display.scroller,"dragover",u.over),f(e.display.scroller,"dragleave",u.leave),f(e.display.scroller,"drop",u.drop)}}function Iy(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(J(e.display.wrapper,"CodeMirror-wrap"),os(e)),vs(e),Xt(e),Ci(e),setTimeout(function(){return jr(e)},100)}function lt(e,r){var a=this;if(!(this instanceof lt))return new lt(e,r);this.options=r=r?T(r):{},T($c,r,!1);var o=r.value;typeof o=="string"?o=new Zt(o,r.mode,null,r.lineSeparator,r.direction):r.mode&&(o.modeOption=r.mode),this.doc=o;var u=new lt.inputStyles[r.inputStyle](this),f=this.display=new jb(e,o,u,r);f.wrapper.CodeMirror=this,jc(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ku(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ue(),keySeq:null,specialChars:null},r.autofocus&&!q&&f.input.focus(),d&&h<11&&setTimeout(function(){return a.display.input.reset(!0)},20),Fy(this),uy(),wr(this),this.curOp.forceUpdate=!0,rc(this,o),r.autofocus&&!q||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&ys(a)},20):Ur(this);for(var b in Xo)Xo.hasOwnProperty(b)&&Xo[b](this,r[b],Qr);Xu(this),r.finishInit&&r.finishInit(this);for(var k=0;k20*20}Ee(r.scroller,"touchstart",function(x){if(!at(e,x)&&!f(x)&&!Rs(e,x)){r.input.ensurePolled(),clearTimeout(a);var S=+new Date();r.activeTouch={start:S,moved:!1,prev:S-o.end<=300?o:null},x.touches.length==1&&(r.activeTouch.left=x.touches[0].pageX,r.activeTouch.top=x.touches[0].pageY)}}),Ee(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ee(r.scroller,"touchend",function(x){var S=r.activeTouch;if(S&&!Gn(r,x)&&S.left!=null&&!S.moved&&new Date()-S.start<300){var M=e.coordsChar(r.activeTouch,"page"),P;!S.prev||b(S,S.prev)?P=new Xe(M,M):!S.prev.prev||b(S,S.prev.prev)?P=e.findWordAt(M):P=new Xe(j(M.line,0),Me(e.doc,j(M.line+1,0))),e.setSelection(P.anchor,P.head),e.focus(),xt(x)}u()}),Ee(r.scroller,"touchcancel",u),Ee(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ai(e,r.scroller.scrollTop),br(e,r.scroller.scrollLeft,!0),ct(e,"scroll",e))}),Ee(r.scroller,"mousewheel",function(x){return Ju(e,x)}),Ee(r.scroller,"DOMMouseScroll",function(x){return Ju(e,x)}),Ee(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(x){at(e,x)||Bt(x)},over:function(x){at(e,x)||(ly(e,x),Bt(x))},start:function(x){return sy(e,x)},drop:Lt(e,ay),leave:function(x){at(e,x)||Dc(e)}};var k=r.input.getField();Ee(k,"keyup",function(x){return Rc.call(e,x)}),Ee(k,"keydown",Lt(e,Pc)),Ee(k,"keypress",Lt(e,Nc)),Ee(k,"focus",function(x){return ys(e,x)}),Ee(k,"blur",function(x){return Ur(e,x)})}var Ns=[];lt.defineInitHook=function(e){return Ns.push(e)};function Gi(e,r,a,o){var u=e.doc,f;a==null&&(a="add"),a=="smart"&&(u.mode.indent?f=wi(e,r).state:a="prev");var b=e.options.tabSize,k=ye(u,r),x=ce(k.text,null,b);k.stateAfter&&(k.stateAfter=null);var S=k.text.match(/^\s*/)[0],M;if(!o&&!/\S/.test(k.text))M=0,a="not";else if(a=="smart"&&(M=u.mode.indent(f,k.text.slice(S.length),k.text),M==Ue||M>150)){if(!o)return;a="prev"}a=="prev"?r>u.first?M=ce(ye(u,r-1).text,null,b):M=0:a=="add"?M=x+e.options.indentUnit:a=="subtract"?M=x-e.options.indentUnit:typeof a=="number"&&(M=x+a),M=Math.max(0,M);var P="",G=0;if(e.options.indentWithTabs)for(var $=Math.floor(M/b);$;--$)G+=b,P+=" ";if(Gb,x=Dn(r),S=null;if(k&&o.ranges.length>1)if(wn&&wn.text.join(` -`)==r){if(o.ranges.length%wn.text.length==0){S=[];for(var M=0;M=0;G--){var $=o.ranges[G],ne=$.from(),ie=$.to();$.empty()&&(a&&a>0?ne=j(ne.line,ne.ch-a):e.state.overwrite&&!k?ie=j(ie.line,Math.min(ye(f,ie.line).text.length,ie.ch+ke(x).length)):k&&wn&&wn.lineWise&&wn.text.join(` + left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(f),f.scrollIntoView(l),e.display.lineSpace.removeChild(f)}}function Db(e,r,a,o){o==null&&(o=0);var l;!e.options.lineWrapping&&r==a&&(r=r.ch?W(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,a=r.sticky=="before"?W(r.line,r.ch+1,"before"):r);for(var f=0;f<5;f++){var v=!1,k=yn(e,r),x=!a||a==r?k:yn(e,a);l={left:Math.min(k.left,x.left),top:Math.min(k.top,x.top)-o,right:Math.max(k.left,x.left),bottom:Math.max(k.bottom,x.bottom)+o};var C=ws(e,l),M=e.doc.scrollTop,O=e.doc.scrollLeft;if(C.scrollTop!=null&&(Ti(e,C.scrollTop),Math.abs(e.doc.scrollTop-M)>1&&(v=!0)),C.scrollLeft!=null&&(br(e,C.scrollLeft),Math.abs(e.doc.scrollLeft-O)>1&&(v=!0)),!v)break}return l}function Ab(e,r){var a=ws(e,r);a.scrollTop!=null&&Ti(e,a.scrollTop),a.scrollLeft!=null&&br(e,a.scrollLeft)}function ws(e,r){var a=e.display,o=Nr(e.display);r.top<0&&(r.top=0);var l=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,f=ls(e),v={};r.bottom-r.top>f&&(r.bottom=r.top+f);var k=e.doc.height+ss(a),x=r.topk-o;if(r.topl+f){var M=Math.min(r.top,(C?k:r.bottom)-f);M!=l&&(v.scrollTop=M)}var O=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft,K=pr(e)-(e.options.fixedGutter?a.gutters.offsetWidth:0),$=r.right-r.left>K;return $&&(r.right=r.left+K),r.left<10?v.scrollLeft=0:r.leftK+O-3&&(v.scrollLeft=r.right+($?0:10)-K),v}function ks(e,r){if(r==null)return;Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Hr(e){Oo(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Ai(e,r,a){(r!=null||a!=null)&&Oo(e),r!=null&&(e.curOp.scrollLeft=r),a!=null&&(e.curOp.scrollTop=a)}function Tb(e,r){Oo(e),e.curOp.scrollToPos=r}function Oo(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var a=Fu(e,r.from),o=Fu(e,r.to);Hu(e,a,o,r.margin)}}function Hu(e,r,a,o){var l=ws(e,{left:Math.min(r.left,a.left),top:Math.min(r.top,a.top)-o,right:Math.max(r.right,a.right),bottom:Math.max(r.bottom,a.bottom)+o});Ai(e,l.scrollLeft,l.scrollTop)}function Ti(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;i||_s(e,{top:r}),Uu(e,r,!0),i&&_s(e),Fi(e,100)}function Uu(e,r,a){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!a)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function br(e,r,a,o){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(a?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!o)return;e.doc.scrollLeft=r,Vu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Li(e){var r=e.display,a=r.gutters.offsetWidth,o=Math.round(e.doc.height+ss(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?a:0,docHeight:o,scrollHeight:o+Fn(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:a}}var yr=function(e,r,a){this.cm=a;var o=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),l=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=l.tabIndex=-1,e(o),e(l),De(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),De(l,"scroll",function(){l.clientWidth&&r(l.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yr.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=r?o+"px":"0";var l=e.viewHeight-(r?o:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+l)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=a?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var f=e.viewWidth-e.barLeft-(a?o:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+f)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(o==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?o:0,bottom:r?o:0}},yr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yr.prototype.zeroWidthHack=function(){var e=A&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},yr.prototype.enableZeroWidthBar=function(e,r,a){e.style.pointerEvents="auto";function o(){var l=e.getBoundingClientRect(),f=a=="vert"?document.elementFromPoint(l.right-1,(l.top+l.bottom)/2):document.elementFromPoint((l.right+l.left)/2,l.bottom-1);f!=e?e.style.pointerEvents="none":r.set(1e3,o)}r.set(1e3,o)},yr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ii=function(){};Ii.prototype.update=function(){return{bottom:0,right:0}},Ii.prototype.setScrollLeft=function(){},Ii.prototype.setScrollTop=function(){},Ii.prototype.clear=function(){};function Ur(e,r){r||(r=Li(e));var a=e.display.barWidth,o=e.display.barHeight;Wu(e,r);for(var l=0;l<4&&a!=e.display.barWidth||o!=e.display.barHeight;l++)a!=e.display.barWidth&&e.options.lineWrapping&&Po(e),Wu(e,Li(e)),a=e.display.barWidth,o=e.display.barHeight}function Wu(e,r){var a=e.display,o=a.scrollbars.update(r);a.sizer.style.paddingRight=(a.barWidth=o.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=o.bottom)+"px",a.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=o.bottom+"px",a.scrollbarFiller.style.width=o.right+"px"):a.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=o.bottom+"px",a.gutterFiller.style.width=r.gutterWidth+"px"):a.gutterFiller.style.display=""}var $u={native:yr,null:Ii};function Gu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&J(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new $u[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),De(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,a){a=="horizontal"?br(e,r):Ti(e,r)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Lb=0;function wr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Lb},sb(e.curOp)}function kr(e){var r=e.curOp;r&&ub(r,function(a){for(var o=0;o=a.viewTo)||a.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new No(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mb(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function qb(e){var r=e.cm,a=r.display;e.updatedDisplay&&Po(r),e.barMeasure=Li(r),a.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Cu(r,a.maxLine,a.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Fn(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-pr(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function zb(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var a=+new Date+e.options.workTime,o=ki(e,r.highlightFrontier),l=[];r.iter(o.line,Math.min(r.first+r.size,e.display.viewTo+500),function(f){if(o.line>=e.display.viewFrom){var v=f.styles,k=f.text.length>e.options.maxHighlightLength?fn(r.mode,o.state):null,x=Ql(e,f,o,!0);k&&(o.state=k),f.styles=x.styles;var C=f.styleClasses,M=x.classes;M?f.styleClasses=M:C&&(f.styleClasses=null);for(var O=!v||v.length!=f.styles.length||C!=M&&(!C||!M||C.bgClass!=M.bgClass||C.textClass!=M.textClass),K=0;!O&&Ka)return Fi(e,e.options.workDelay),!0}),r.highlightFrontier=o.line,r.modeFrontier=Math.max(r.modeFrontier,o.line),l.length&&nn(e,function(){for(var f=0;f=a.viewFrom&&r.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&Pu(e)==0)return!1;Yu(e)&&(rr(e),r.dims=ms(e));var l=o.first+o.size,f=Math.max(r.visible.from-e.options.viewportMargin,o.first),v=Math.min(l,r.visible.to+e.options.viewportMargin);a.viewFromv&&a.viewTo-v<20&&(v=Math.min(l,a.viewTo)),Wn&&(f=rs(e.doc,f),v=hu(e.doc,v));var k=f!=a.viewFrom||v!=a.viewTo||a.lastWrapHeight!=r.wrapperHeight||a.lastWrapWidth!=r.wrapperWidth;Cb(e,f,v),a.viewOffset=$n(ke(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var x=Pu(e);if(!k&&x==0&&!r.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var C=Nb(e);return x>4&&(a.lineDiv.style.display="none"),jb(e,a.updateLineNumbers,r.dims),x>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,Bb(C),P(a.cursorDiv),P(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,k&&(a.lastWrapHeight=r.wrapperHeight,a.lastWrapWidth=r.wrapperWidth,Fi(e,400)),a.updateLineNumbers=null,!0}function Ku(e,r){for(var a=r.viewport,o=!0;;o=!1){if(!o||!e.options.lineWrapping||r.oldDisplayWidth==pr(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+ss(e.display)-ls(e),a.top)}),r.visible=Ro(e.display,e.doc,a),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else o&&(r.visible=Ro(e.display,e.doc,a));if(!xs(e,r))break;Po(e);var l=Li(e);Di(e),Ur(e,l),Ss(e,l),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _s(e,r){var a=new No(e,r);if(xs(e,a)){Po(e),Ku(e,a);var o=Li(e);Di(e),Ur(e,o),Ss(e,o),a.finish()}}function jb(e,r,a){var o=e.display,l=e.options.lineNumbers,f=o.lineDiv,v=f.firstChild;function k(ne){var oe=ne.nextSibling;return p&&A&&e.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),oe}for(var x=o.view,C=o.viewFrom,M=0;M-1&&($=!1),vu(e,O,C,a)),$&&(P(O.lineNumber),O.lineNumber.appendChild(document.createTextNode(re(e.options,C)))),v=O.node.nextSibling}C+=O.size}for(;v;)v=k(v)}function Cs(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ss(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Fn(e)+"px"}function Vu(e){var r=e.display,a=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var o=gs(r)-r.scroller.scrollLeft+e.doc.scrollLeft,l=r.gutters.offsetWidth,f=o+"px",v=0;vv.clientWidth,x=v.scrollHeight>v.clientHeight;if(!(o&&k||l&&x))return;if(l&&A&&p){e:for(var C=r.target,M=f.view;C!=v;C=C.parentNode)for(var O=0;O=0&&he(e,o.to())<=0)return a}return-1};var Ye=function(e,r){this.anchor=e,this.head=r};Ye.prototype.from=function(){return Yt(this.anchor,this.head)},Ye.prototype.to=function(){return St(this.anchor,this.head)},Ye.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wn(e,r,a){var o=e&&e.options.selectionsMayTouch,l=r[a];r.sort(function(K,$){return he(K.from(),$.from())}),a=ie(r,l);for(var f=1;f0:x>=0){var C=Yt(k.from(),v.from()),M=St(k.to(),v.to()),O=k.empty()?v.from()==v.head:k.from()==k.head;f<=a&&--a,r.splice(--f,2,new Ye(O?M:C,O?C:M))}}return new sn(r,a)}function ir(e,r){return new sn([new Ye(e,r||e)],0)}function or(e){return e.text?W(e.from.line+e.text.length-1,xe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ju(e,r){if(he(e,r.from)<0)return e;if(he(e,r.to)<=0)return or(r);var a=e.line+r.text.length-(r.to.line-r.from.line)-1,o=e.ch;return e.line==r.to.line&&(o+=or(r).ch-r.to.ch),W(a,o)}function Ds(e,r){for(var a=[],o=0;o1&&e.remove(k.line+1,ne-1),e.insert(k.line+1,fe)}Rt(e,"change",e,r)}function ar(e,r,a){function o(l,f,v){if(l.linked)for(var k=0;k1&&!e.done[e.done.length-2].ranges)return e.done.pop(),xe(e.done)}function oc(e,r,a,o){var l=e.history;l.undone.length=0;var f=+new Date,v,k;if((l.lastOp==o||l.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&l.lastModTime>f-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(v=Gb(l,l.lastOp==o)))k=xe(v.changes),he(r.from,r.to)==0&&he(r.from,k.to)==0?k.to=or(r):v.changes.push(Ls(e,r));else{var x=xe(l.done);for((!x||!x.ranges)&&Ho(e.sel,l.done),v={changes:[Ls(e,r)],generation:l.generation},l.done.push(v);l.done.length>l.undoDepth;)l.done.shift(),l.done[0].ranges||l.done.shift()}l.done.push(a),l.generation=++l.maxGeneration,l.lastModTime=l.lastSelTime=f,l.lastOp=l.lastSelOp=o,l.lastOrigin=l.lastSelOrigin=r.origin,k||ct(e,"historyAdded")}function Kb(e,r,a,o){var l=r.charAt(0);return l=="*"||l=="+"&&a.ranges.length==o.ranges.length&&a.somethingSelected()==o.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Vb(e,r,a,o){var l=e.history,f=o&&o.origin;a==l.lastSelOp||f&&l.lastSelOrigin==f&&(l.lastModTime==l.lastSelTime&&l.lastOrigin==f||Kb(e,f,xe(l.done),r))?l.done[l.done.length-1]=r:Ho(r,l.done),l.lastSelTime=+new Date,l.lastSelOrigin=f,l.lastSelOp=a,o&&o.clearRedo!==!1&&ic(l.undone)}function Ho(e,r){var a=xe(r);a&&a.ranges&&a.equals(e)||r.push(e)}function ac(e,r,a,o){var l=r["spans_"+e.id],f=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,o),function(v){v.markedSpans&&((l||(l=r["spans_"+e.id]={}))[f]=v.markedSpans),++f})}function Yb(e){if(!e)return null;for(var r,a=0;a-1&&(xe(k)[O]=C[O],delete C[O]))}}return o}function Is(e,r,a,o){if(o){var l=e.anchor;if(a){var f=he(r,l)<0;f!=he(a,l)<0?(l=r,r=a):f!=he(r,a)<0&&(r=a)}return new Ye(l,r)}else return new Ye(a||r,r)}function Uo(e,r,a,o,l){l==null&&(l=e.cm&&(e.cm.display.shift||e.extend)),jt(e,new sn([Is(e.sel.primary(),r,a,l)],0),o)}function lc(e,r,a){for(var o=[],l=e.cm&&(e.cm.display.shift||e.extend),f=0;f=r.ch:k.to>r.ch))){if(l&&(ct(x,"beforeCursorEnter"),x.explicitlyCleared))if(f.markedSpans){--v;continue}else break;if(!x.atomic)continue;if(a){var O=x.find(o<0?1:-1),K=void 0;if((o<0?M:C)&&(O=pc(e,O,-o,O&&O.line==r.line?f:null)),O&&O.line==r.line&&(K=he(O,a))&&(o<0?K<0:K>0))return $r(e,O,r,o,l)}var $=x.find(o<0?-1:1);return(o<0?C:M)&&($=pc(e,$,o,$.line==r.line?f:null)),$?$r(e,$,r,o,l):null}}return r}function $o(e,r,a,o,l){var f=o||1,v=$r(e,r,a,f,l)||!l&&$r(e,r,a,f,!0)||$r(e,r,a,-f,l)||!l&&$r(e,r,a,-f,!0);return v||(e.cantEdit=!0,W(e.first,0))}function pc(e,r,a,o){return a<0&&r.ch==0?r.line>e.first?Me(e,W(r.line-1)):null:a>0&&r.ch==(o||ke(e,r.line)).text.length?r.line=0;--l)vc(e,{from:o[l].from,to:o[l].to,text:l?[""]:r.text,origin:r.origin});else vc(e,r)}function vc(e,r){if(r.text.length==1&&r.text[0]==""&&he(r.from,r.to)==0)return;var a=Ds(e,r);oc(e,r,a,e.cm?e.cm.curOp.id:NaN),zi(e,r,a,ts(e,r));var o=[];ar(e,function(l,f){!f&&ie(o,l.history)==-1&&(kc(l.history,r),o.push(l.history)),zi(l,r,null,ts(l,r))})}function Go(e,r,a){var o=e.cm&&e.cm.state.suppressEdits;if(o&&!a)return;for(var l=e.history,f,v=e.sel,k=r=="undo"?l.done:l.undone,x=r=="undo"?l.undone:l.done,C=0;C=0;--$){var ne=K($);if(ne)return ne.v}}function bc(e,r){if(r==0)return;if(e.first+=r,e.sel=new sn(tt(e.sel.ranges,function(l){return new Ye(W(l.anchor.line+r,l.anchor.ch),W(l.head.line+r,l.head.ch))}),e.sel.primIndex),e.cm){Xt(e.cm,e.first,e.first-r,r);for(var a=e.cm.display,o=a.viewFrom;oe.lastLine())return;if(r.from.linef&&(r={from:r.from,to:W(f,ke(e,f).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Tn(e,r.from,r.to),a||(a=Ds(e,r)),e.cm?Qb(e.cm,r,o):Ts(e,r,o),Wo(e,a,be),e.cantEdit&&$o(e,W(e.firstLine(),0))&&(e.cantEdit=!1)}function Qb(e,r,a){var o=e.doc,l=e.display,f=r.from,v=r.to,k=!1,x=f.line;e.options.lineWrapping||(x=Ke(In(ke(o,f.line))),o.iter(x,v.line+1,function($){if($==l.maxLine)return k=!0,!0})),o.sel.contains(r.from,r.to)>-1&&Lr(e),Ts(o,r,a,zu(e)),e.options.lineWrapping||(o.iter(x,f.line+r.text.length,function($){var ne=Lo($);ne>l.maxLineLength&&(l.maxLine=$,l.maxLineLength=ne,l.maxLineChanged=!0,k=!1)}),k&&(e.curOp.updateMaxLine=!0)),jv(o,f.line),Fi(e,400);var C=r.text.length-(v.line-f.line)-1;r.full?Xt(e):f.line==v.line&&r.text.length==1&&!tc(e.doc,r)?nr(e,f.line,"text"):Xt(e,f.line,v.line+1,C);var M=yt(e,"changes"),O=yt(e,"change");if(O||M){var K={from:f,to:v,text:r.text,removed:r.removed,origin:r.origin};O&&Rt(e,"change",e,K),M&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(K)}e.display.selForContextMenu=null}function Kr(e,r,a,o,l){var f;o||(o=a),he(o,a)<0&&(f=[o,a],a=f[0],o=f[1]),typeof r=="string"&&(r=e.splitLines(r)),Gr(e,{from:a,to:o,text:r,origin:l})}function yc(e,r,a,o){a1||!(this.children[0]instanceof Ri))){var k=[];this.collapse(k),this.children=[new Ri(k)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r50){for(var v=l.lines.length%25+25,k=v;k10);e.parent.maybeSpill()},iterN:function(e,r,a){for(var o=0;oe.display.maxLineLength&&(e.display.maxLine=C,e.display.maxLineLength=M,e.display.maxLineChanged=!0)}o!=null&&e&&this.collapsed&&Xt(e,o,l+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&hc(e.doc)),e&&Rt(e,"markerCleared",e,this,o,l),r&&kr(e),this.parent&&this.parent.clear()},sr.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var a,o,l=0;l0||v==0&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=V("span",[f.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(du(e,r.line,r,a,f)||r.line!=a.line&&du(e,a.line,r,a,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Uv()}f.addToHistory&&oc(e,{from:r,to:a,origin:"markText"},e.sel,NaN);var k=r.line,x=e.cm,C;if(e.iter(k,a.line+1,function(O){x&&f.collapsed&&!x.options.lineWrapping&&In(O)==x.display.maxLine&&(C=!0),f.collapsed&&k!=r.line&&pn(O,0),$v(O,new Eo(f,k==r.line?r.ch:null,k==a.line?a.ch:null)),++k}),f.collapsed&&e.iter(r.line,a.line+1,function(O){tr(e,O)&&pn(O,0)}),f.clearOnEnter&&De(f,"beforeCursorEnter",function(){return f.clear()}),f.readOnly&&(Hv(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),f.collapsed&&(f.id=++_c,f.atomic=!0),x){if(C&&(x.curOp.updateMaxLine=!0),f.collapsed)Xt(x,r.line,a.line+1);else if(f.className||f.startStyle||f.endStyle||f.css||f.attributes||f.title)for(var M=r.line;M<=a.line;M++)nr(x,M,"text");f.atomic&&hc(x.doc),Rt(x,"markerAdded",x,f)}return f}var Bi=function(e,r){this.markers=e,this.primary=r;for(var a=0;a=0;x--)Gr(this,o[x]);k?cc(this,k):this.cm&&Hr(this.cm)}),undo:It(function(){Go(this,"undo")}),redo:It(function(){Go(this,"redo")}),undoSelection:It(function(){Go(this,"undo",!0)}),redoSelection:It(function(){Go(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,a=0,o=0;o=e.ch)&&r.push(l.marker.parent||l.marker)}return r},findMarks:function(e,r,a){e=Me(this,e),r=Me(this,r);var o=[],l=e.line;return this.iter(e.line,r.line+1,function(f){var v=f.markedSpans;if(v)for(var k=0;k=x.to||x.from==null&&l!=e.line||x.from!=null&&l==r.line&&x.from>=r.ch)&&(!a||a(x.marker))&&o.push(x.marker.parent||x.marker)}++l}),o},getAllMarks:function(){var e=[];return this.iter(function(r){var a=r.markedSpans;if(a)for(var o=0;oe)return r=e,!0;e-=f,++a}),Me(this,W(a,r))},indexFromPos:function(e){e=Me(this,e);var r=e.ch;if(e.liner&&(r=e.from),e.to!=null&&e.to-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var M=e.dataTransfer.getData("Text");if(M){var O;if(r.state.draggingText&&!r.state.draggingText.copy&&(O=r.listSelections()),Wo(r.doc,ir(a,a)),O)for(var K=0;K=0;k--)Kr(e.doc,"",o[k].from,o[k].to,"+delete");Hr(e)})}function Ms(e,r,a){var o=Ee(e.text,r+a,a);return o<0||o>e.text.length?null:o}function qs(e,r,a){var o=Ms(e,r.ch,a);return o==null?null:new W(r.line,o,a<0?"after":"before")}function zs(e,r,a,o,l){if(e){r.doc.direction=="rtl"&&(l=-l);var f=Pt(a,r.doc.direction);if(f){var v=l<0?xe(f):f[0],k=l<0==(v.level==1),x=k?"after":"before",C;if(v.level>0||r.doc.direction=="rtl"){var M=Or(r,a);C=l<0?a.text.length-1:0;var O=Mn(r,M,C).top;C=Le(function(K){return Mn(r,M,K).top==O},l<0==(v.level==1)?v.from:v.to-1,C),x=="before"&&(C=Ms(a,C,1))}else C=l<0?v.to:v.from;return new W(o,C,x)}}return new W(o,l<0?a.text.length:0,l<0?"before":"after")}function hy(e,r,a,o){var l=Pt(r,e.doc.direction);if(!l)return qs(r,a,o);a.ch>=r.text.length?(a.ch=r.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var f=Ve(l,a.ch,a.sticky),v=l[f];if(e.doc.direction=="ltr"&&v.level%2==0&&(o>0?v.to>a.ch:v.from=v.from&&K>=M.begin)){var $=O?"before":"after";return new W(a.line,K,$)}}var ne=function(fe,ge,pe){for(var ve=function(rt,Ft){return Ft?new W(a.line,k(rt,1),"before"):new W(a.line,rt,"after")};fe>=0&&fe0==(Ae.level!=1),Pe=Se?pe.begin:k(pe.end,-1);if(Ae.from<=Pe&&Pe0?M.end:k(M.begin,-1);return ue!=null&&!(o>0&&ue==r.text.length)&&(oe=ne(o>0?0:l.length-1,o,C(ue)),oe)?oe:null}var Ui={selectAll:mc,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),be)},killLine:function(e){return Xr(e,function(r){if(r.empty()){var a=ke(e.doc,r.head.line).text.length;return r.head.ch==a&&r.head.line0)l=new W(l.line,l.ch+1),e.replaceRange(f.charAt(l.ch-1)+f.charAt(l.ch-2),W(l.line,l.ch-2),l,"+transpose");else if(l.line>e.doc.first){var v=ke(e.doc,l.line-1).text;v&&(l=new W(l.line,1),e.replaceRange(f.charAt(0)+e.doc.lineSeparator()+v.charAt(v.length-1),W(l.line-1,v.length-1),l,"+transpose"))}}a.push(new Ye(l,l))}e.setSelections(a)})},newlineAndIndent:function(e){return nn(e,function(){for(var r=e.listSelections(),a=r.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),r[a].anchor,r[a].head,"+input");r=e.listSelections();for(var o=0;oe&&he(r,this.pos)==0&&a==this.button};var $i,Gi;function yy(e,r){var a=+new Date;return Gi&&Gi.compare(a,e,r)?($i=Gi=null,"triple"):$i&&$i.compare(a,e,r)?(Gi=new Rs(a,e,r),$i=null,"double"):($i=new Rs(a,e,r),Gi=null,"single")}function Nc(e){var r=this,a=r.display;if(at(r,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,Gn(a,e)){p||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(Os(r,e))return;var o=gr(r,e),l=ko(e),f=o?yy(o,l):"single";if(window.focus(),l==1&&r.state.selectingText&&r.state.selectingText(e),o&&wy(r,l,o,f,e))return;l==1?o?xy(r,o,f,e):Ir(e)==a.scroller&&Ct(e):l==2?(o&&Uo(r.doc,o),setTimeout(function(){return a.input.focus()},20)):l==3&&(G?r.display.input.onContextMenu(e):Bu(r))}function wy(e,r,a,o,l){var f="Click";return o=="double"?f="Double"+f:o=="triple"&&(f="Triple"+f),f=(r==1?"Left":r==2?"Middle":"Right")+f,Wi(e,Lc(f,l),l,function(v){if(typeof v=="string"&&(v=Ui[v]),!v)return!1;var k=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),k=v(e,a)!=ze}finally{e.state.suppressEdits=!1}return k})}function ky(e,r,a){var o=e.getOption("configureMouse"),l=o?o(e,r,a):{};if(l.unit==null){var f=R?a.shiftKey&&a.metaKey:a.altKey;l.unit=f?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(l.extend==null||e.doc.extend)&&(l.extend=e.doc.extend||a.shiftKey),l.addNew==null&&(l.addNew=A?a.metaKey:a.ctrlKey),l.moveOnDrag==null&&(l.moveOnDrag=!(A?a.altKey:a.ctrlKey)),l}function xy(e,r,a,o){d?setTimeout(F(Nu,e),0):e.curOp.focus=q();var l=ky(e,a,o),f=e.doc.sel,v;e.options.dragDrop&&En&&!e.isReadOnly()&&a=="single"&&(v=f.contains(r))>-1&&(he((v=f.ranges[v]).from(),r)<0||r.xRel>0)&&(he(v.to(),r)>0||r.xRel<0)?_y(e,o,r,l):Cy(e,o,r,l)}function _y(e,r,a,o){var l=e.display,f=!1,v=Lt(e,function(C){p&&(l.scroller.draggable=!1),e.state.draggingText=!1,Re(l.wrapper.ownerDocument,"mouseup",v),Re(l.wrapper.ownerDocument,"mousemove",k),Re(l.scroller,"dragstart",x),Re(l.scroller,"drop",v),f||(Ct(C),o.addNew||Uo(e.doc,a,null,null,o.extend),p&&!b||d&&h==9?setTimeout(function(){l.wrapper.ownerDocument.body.focus({preventScroll:!0}),l.input.focus()},20):l.input.focus())}),k=function(C){f=f||Math.abs(r.clientX-C.clientX)+Math.abs(r.clientY-C.clientY)>=10},x=function(){return f=!0};p&&(l.scroller.draggable=!0),e.state.draggingText=v,v.copy=!o.moveOnDrag,l.scroller.dragDrop&&l.scroller.dragDrop(),De(l.wrapper.ownerDocument,"mouseup",v),De(l.wrapper.ownerDocument,"mousemove",k),De(l.scroller,"dragstart",x),De(l.scroller,"drop",v),Bu(e),setTimeout(function(){return l.input.focus()},20)}function Bc(e,r,a){if(a=="char")return new Ye(r,r);if(a=="word")return e.findWordAt(r);if(a=="line")return new Ye(W(r.line,0),Me(e.doc,W(r.line+1,0)));var o=a(e,r);return new Ye(o.from,o.to)}function Cy(e,r,a,o){var l=e.display,f=e.doc;Ct(r);var v,k,x=f.sel,C=x.ranges;if(o.addNew&&!o.extend?(k=f.sel.contains(a),k>-1?v=C[k]:v=new Ye(a,a)):(v=f.sel.primary(),k=f.sel.primIndex),o.unit=="rectangle")o.addNew||(v=new Ye(a,a)),a=gr(e,r,!0,!0),k=-1;else{var M=Bc(e,a,o.unit);o.extend?v=Is(v,M.anchor,M.head,o.extend):v=M}o.addNew?k==-1?(k=C.length,jt(f,wn(e,C.concat([v]),k),{scroll:!1,origin:"*mouse"})):C.length>1&&C[k].empty()&&o.unit=="char"&&!o.extend?(jt(f,wn(e,C.slice(0,k).concat(C.slice(k+1)),0),{scroll:!1,origin:"*mouse"}),x=f.sel):Fs(f,k,v,we):(k=0,jt(f,new sn([v],0),we),x=f.sel);var O=a;function K(pe){if(he(O,pe)==0)return;if(O=pe,o.unit=="rectangle"){for(var ve=[],Ae=e.options.tabSize,Se=ce(ke(f,a.line).text,a.ch,Ae),Pe=ce(ke(f,pe.line).text,pe.ch,Ae),rt=Math.min(Se,Pe),Ft=Math.max(Se,Pe),ut=Math.min(a.line,pe.line),rn=Math.min(e.lastLine(),Math.max(a.line,pe.line));ut<=rn;ut++){var Qt=ke(f,ut).text,wt=Ge(Qt,rt,Ae);rt==Ft?ve.push(new Ye(W(ut,wt),W(ut,wt))):Qt.length>wt&&ve.push(new Ye(W(ut,wt),W(ut,Ge(Qt,Ft,Ae))))}ve.length||ve.push(new Ye(a,a)),jt(f,wn(e,x.ranges.slice(0,k).concat(ve),k),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pe)}else{var Jt=v,Ot=Bc(e,pe,o.unit),Et=Jt.anchor,kt;he(Ot.anchor,Et)>0?(kt=Ot.head,Et=Yt(Jt.from(),Ot.anchor)):(kt=Ot.anchor,Et=St(Jt.to(),Ot.head));var dt=x.ranges.slice(0);dt[k]=Sy(e,new Ye(Me(f,Et),kt)),jt(f,wn(e,dt,k),we)}}var $=l.wrapper.getBoundingClientRect(),ne=0;function oe(pe){var ve=++ne,Ae=gr(e,pe,!0,o.unit=="rectangle");if(!Ae)return;if(he(Ae,O)!=0){e.curOp.focus=q(),K(Ae);var Se=Ro(l,f);(Ae.line>=Se.to||Ae.line$.bottom?20:0;Pe&&setTimeout(Lt(e,function(){if(ne!=ve)return;l.scroller.scrollTop+=Pe,oe(pe)}),50)}}function ue(pe){e.state.selectingText=!1,ne=Infinity,pe&&(Ct(pe),l.input.focus()),Re(l.wrapper.ownerDocument,"mousemove",fe),Re(l.wrapper.ownerDocument,"mouseup",ge),f.history.lastSelOrigin=null}var fe=Lt(e,function(pe){pe.buttons===0||!ko(pe)?ue(pe):oe(pe)}),ge=Lt(e,ue);e.state.selectingText=ge,De(l.wrapper.ownerDocument,"mousemove",fe),De(l.wrapper.ownerDocument,"mouseup",ge)}function Sy(e,r){var a=r.anchor,o=r.head,l=ke(e.doc,a.line);if(he(a,o)==0&&a.sticky==o.sticky)return r;var f=Pt(l);if(!f)return r;var v=Ve(f,a.ch,a.sticky),k=f[v];if(k.from!=a.ch&&k.to!=a.ch)return r;var x=v+(k.from==a.ch==(k.level!=1)?0:1);if(x==0||x==f.length)return r;var C;if(o.line!=a.line)C=(o.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var M=Ve(f,o.ch,o.sticky),O=M-v||(o.ch-a.ch)*(k.level==1?-1:1);M==x-1||M==x?C=O<0:C=O>0}var K=f[x+(C?-1:0)],$=C==(K.level==1),ne=$?K.from:K.to,oe=$?"after":"before";return a.ch==ne&&a.sticky==oe?r:new Ye(new W(a.line,ne,oe),o)}function jc(e,r,a,o){var l,f;if(r.touches)l=r.touches[0].clientX,f=r.touches[0].clientY;else try{l=r.clientX,f=r.clientY}catch(K){return!1}if(l>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;o&&Ct(r);var v=e.display,k=v.lineDiv.getBoundingClientRect();if(f>k.bottom||!yt(e,a))return fr(r);f-=k.top-v.viewOffset;for(var x=0;x=l){var M=L(e.doc,f),O=e.display.gutterSpecs[x];return ct(e,a,e,M,O.className,r),fr(r)}}}function Os(e,r){return jc(e,r,"gutterClick",!0)}function Hc(e,r){if(Gn(e.display,r)||Ey(e,r))return;if(at(e,r,"contextmenu"))return;G||e.display.input.onContextMenu(r)}function Ey(e,r){return yt(e,"gutterContextMenu")?jc(e,r,"gutterContextMenu",!1):!1}function Uc(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ei(e)}var Zr={toString:function(){return"CodeMirror.Init"}},Wc={},Xo={};function Dy(e){var r=e.optionHandlers;function a(o,l,f,v){e.defaults[o]=l,f&&(r[o]=v?function(k,x,C){C!=Zr&&f(k,x,C)}:f)}e.defineOption=a,e.Init=Zr,a("value","",function(o,l){return o.setValue(l)},!0),a("mode",null,function(o,l){o.doc.modeOption=l,As(o)},!0),a("indentUnit",2,As,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(o){qi(o),Ei(o),Xt(o)},!0),a("lineSeparator",null,function(o,l){if(o.doc.lineSep=l,!l)return;var f=[],v=o.doc.first;o.doc.iter(function(x){for(var C=0;;){var M=x.text.indexOf(l,C);if(M==-1)break;C=M+l.length,f.push(W(v,M))}v++});for(var k=f.length-1;k>=0;k--)Kr(o.doc,l,f[k],W(f[k].line,f[k].ch+l.length))}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(o,l,f){o.state.specialChars=new RegExp(l.source+(l.test(" ")?"":"| "),"g"),f!=Zr&&o.refresh()}),a("specialCharPlaceholder",nb,function(o){return o.refresh()},!0),a("electricChars",!0),a("inputStyle",z?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(o,l){return o.getInputField().spellcheck=l},!0),a("autocorrect",!1,function(o,l){return o.getInputField().autocorrect=l},!0),a("autocapitalize",!1,function(o,l){return o.getInputField().autocapitalize=l},!0),a("rtlMoveVisually",!U),a("wholeLineUpdateBefore",!0),a("theme","default",function(o){Uc(o),Mi(o)},!0),a("keyMap","default",function(o,l,f){var v=Vo(l),k=f!=Zr&&Vo(f);k&&k.detach&&k.detach(o,v),v.attach&&v.attach(o,k||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Ty,!0),a("gutters",[],function(o,l){o.display.gutterSpecs=Es(l,o.options.lineNumbers),Mi(o)},!0),a("fixedGutter",!0,function(o,l){o.display.gutters.style.left=l?gs(o.display)+"px":"0",o.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(o){return Ur(o)},!0),a("scrollbarStyle","native",function(o){Gu(o),Ur(o),o.display.scrollbars.setScrollTop(o.doc.scrollTop),o.display.scrollbars.setScrollLeft(o.doc.scrollLeft)},!0),a("lineNumbers",!1,function(o,l){o.display.gutterSpecs=Es(o.options.gutters,l),Mi(o)},!0),a("firstLineNumber",1,Mi,!0),a("lineNumberFormatter",function(o){return o},Mi,!0),a("showCursorWhenSelecting",!1,Di,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(o,l){l=="nocursor"&&(jr(o),o.display.input.blur()),o.display.input.readOnlyChanged(l)}),a("screenReaderLabel",null,function(o,l){l=l===""?null:l,o.display.input.screenReaderLabelChanged(l)}),a("disableInput",!1,function(o,l){l||o.display.input.reset()},!0),a("dragDrop",!0,Ay),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Di,!0),a("singleCursorHeightPerLine",!0,Di,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,qi,!0),a("addModeClass",!1,qi,!0),a("pollInterval",100),a("undoDepth",200,function(o,l){return o.doc.history.undoDepth=l}),a("historyEventDelay",1250),a("viewportMargin",10,function(o){return o.refresh()},!0),a("maxHighlightLength",1e4,qi,!0),a("moveInputWithCursor",!0,function(o,l){l||o.display.input.resetPosition()}),a("tabindex",null,function(o,l){return o.display.input.getField().tabIndex=l||""}),a("autofocus",null),a("direction","ltr",function(o,l){return o.doc.setDirection(l)},!0),a("phrases",null)}function Ay(e,r,a){var o=a&&a!=Zr;if(!r!=!o){var l=e.display.dragFunctions,f=r?De:Re;f(e.display.scroller,"dragstart",l.start),f(e.display.scroller,"dragenter",l.enter),f(e.display.scroller,"dragover",l.over),f(e.display.scroller,"dragleave",l.leave),f(e.display.scroller,"drop",l.drop)}}function Ty(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(J(e.display.wrapper,"CodeMirror-wrap"),os(e)),vs(e),Xt(e),Ei(e),setTimeout(function(){return Ur(e)},100)}function lt(e,r){var a=this;if(!(this instanceof lt))return new lt(e,r);this.options=r=r?T(r):{},T(Wc,r,!1);var o=r.value;typeof o=="string"?o=new Zt(o,r.mode,null,r.lineSeparator,r.direction):r.mode&&(o.modeOption=r.mode),this.doc=o;var l=new lt.inputStyles[r.inputStyle](this),f=this.display=new Hb(e,o,l,r);f.wrapper.CodeMirror=this,Uc(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Gu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new de,keySeq:null,specialChars:null},r.autofocus&&!z&&f.input.focus(),d&&h<11&&setTimeout(function(){return a.display.input.reset(!0)},20),Ly(this),sy(),wr(this),this.curOp.forceUpdate=!0,nc(this,o),r.autofocus&&!z||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&ys(a)},20):jr(this);for(var v in Xo)Xo.hasOwnProperty(v)&&Xo[v](this,r[v],Zr);Yu(this),r.finishInit&&r.finishInit(this);for(var k=0;k20*20}De(r.scroller,"touchstart",function(x){if(!at(e,x)&&!f(x)&&!Os(e,x)){r.input.ensurePolled(),clearTimeout(a);var C=+new Date;r.activeTouch={start:C,moved:!1,prev:C-o.end<=300?o:null},x.touches.length==1&&(r.activeTouch.left=x.touches[0].pageX,r.activeTouch.top=x.touches[0].pageY)}}),De(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),De(r.scroller,"touchend",function(x){var C=r.activeTouch;if(C&&!Gn(r,x)&&C.left!=null&&!C.moved&&new Date-C.start<300){var M=e.coordsChar(r.activeTouch,"page"),O;!C.prev||v(C,C.prev)?O=new Ye(M,M):!C.prev.prev||v(C,C.prev.prev)?O=e.findWordAt(M):O=new Ye(W(M.line,0),Me(e.doc,W(M.line+1,0))),e.setSelection(O.anchor,O.head),e.focus(),Ct(x)}l()}),De(r.scroller,"touchcancel",l),De(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ti(e,r.scroller.scrollTop),br(e,r.scroller.scrollLeft,!0),ct(e,"scroll",e))}),De(r.scroller,"mousewheel",function(x){return Qu(e,x)}),De(r.scroller,"DOMMouseScroll",function(x){return Qu(e,x)}),De(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(x){at(e,x)||Bt(x)},over:function(x){at(e,x)||(ay(e,x),Bt(x))},start:function(x){return oy(e,x)},drop:Lt(e,iy),leave:function(x){at(e,x)||Ec(e)}};var k=r.input.getField();De(k,"keyup",function(x){return Rc.call(e,x)}),De(k,"keydown",Lt(e,Pc)),De(k,"keypress",Lt(e,Oc)),De(k,"focus",function(x){return ys(e,x)}),De(k,"blur",function(x){return jr(e,x)})}var Ns=[];lt.defineInitHook=function(e){return Ns.push(e)};function Ki(e,r,a,o){var l=e.doc,f;a==null&&(a="add"),a=="smart"&&(l.mode.indent?f=ki(e,r).state:a="prev");var v=e.options.tabSize,k=ke(l,r),x=ce(k.text,null,v);k.stateAfter&&(k.stateAfter=null);var C=k.text.match(/^\s*/)[0],M;if(!o&&!/\S/.test(k.text))M=0,a="not";else if(a=="smart"&&(M=l.mode.indent(f,k.text.slice(C.length),k.text),M==ze||M>150)){if(!o)return;a="prev"}a=="prev"?r>l.first?M=ce(ke(l,r-1).text,null,v):M=0:a=="add"?M=x+e.options.indentUnit:a=="subtract"?M=x-e.options.indentUnit:typeof a=="number"&&(M=x+a),M=Math.max(0,M);var O="",K=0;if(e.options.indentWithTabs)for(var $=Math.floor(M/v);$;--$)K+=v,O+=" ";if(Kv,x=Dn(r),C=null;if(k&&o.ranges.length>1)if(kn&&kn.text.join(` +`)==r){if(o.ranges.length%kn.text.length==0){C=[];for(var M=0;M=0;K--){var $=o.ranges[K],ne=$.from(),oe=$.to();$.empty()&&(a&&a>0?ne=W(ne.line,ne.ch-a):e.state.overwrite&&!k?oe=W(oe.line,Math.min(ke(f,oe.line).text.length,oe.ch+xe(x).length)):k&&kn&&kn.lineWise&&kn.text.join(` `)==x.join(` -`)&&(ne=ie=j(ne.line,0)));var le={from:ne,to:ie,text:S?S[G%S.length]:x,origin:u||(k?"paste":e.state.cutIncoming>b?"cut":"+input")};Kr(e.doc,le),Pt(e,"inputRead",e,le)}r&&!k&&Kc(e,r),Wr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=P),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Gc(e,r){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&nn(r,function(){return Bs(r,a,0,null,"paste")}),!0}function Kc(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var a=e.doc.sel,o=a.ranges.length-1;o>=0;o--){var u=a.ranges[o];if(u.head.ch>100||o&&a.ranges[o-1].head.line==u.head.line)continue;var f=e.getModeAt(u.head),b=!1;if(f.electricChars){for(var k=0;k-1){b=Gi(e,u.head.line,"smart");break}}else f.electricInput&&(f.electricInput.test(ye(e.doc,u.head.line).text.slice(0,u.head.ch))&&(b=Gi(e,u.head.line,"smart")));b&&Pt(e,"electricInput",e,u.head.line)}}function Vc(e){for(var r=[],a=[],o=0;of&&(Gi(this,k.head.line,o,!0),f=k.head.line,b==this.doc.sel.primIndex&&Wr(this));else{var x=k.from(),S=k.to(),M=Math.max(f,x.line);f=Math.min(this.lastLine(),S.line-(S.ch?0:1))+1;for(var P=M;P0&&Fs(this.doc,b,new Xe(x,G[b].to()),we)}}}),getTokenAt:function(o,u){return ru(this,o,u)},getLineTokens:function(o,u){return ru(this,j(o),u,!0)},getTokenTypeAt:function(o){o=Me(this.doc,o);var u=eu(this,ye(this.doc,o.line)),f=0,b=(u.length-1)/2,k=o.ch,x;if(k==0)x=u[2];else for(;;){var S=f+b>>1;if((S?u[S*2-1]:0)>=k)b=S;else if(u[S*2+1]x&&(o=x,b=!0),k=ye(this.doc,o)}else k=o;return Mo(this,k,{top:0,left:0},u||"page",f||b).top+(b?this.doc.height-$n(k):0)},defaultTextHeight:function(){return Br(this.display)},defaultCharWidth:function(){return Hr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(o,u,f,b,k){var x=this.display;o=bn(this,Me(this.doc,o));var S=o.bottom,M=o.left;if(u.style.position="absolute",u.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(u),x.sizer.appendChild(u),b=="over")S=o.top;else if(b=="above"||b=="near"){var P=Math.max(x.wrapper.clientHeight,this.doc.height),G=Math.max(x.sizer.clientWidth,x.lineSpace.clientWidth);(b=="above"||o.bottom+u.offsetHeight>P)&&o.top>u.offsetHeight?S=o.top-u.offsetHeight:o.bottom+u.offsetHeight<=P&&(S=o.bottom),M+u.offsetWidth>G&&(M=G-u.offsetWidth)}u.style.top=S+"px",u.style.left=u.style.right="",k=="right"?(M=x.sizer.clientWidth-u.offsetWidth,u.style.right="0px"):(k=="left"?M=0:k=="middle"&&(M=(x.sizer.clientWidth-u.offsetWidth)/2),u.style.left=M+"px"),f&&Lb(this,{left:M,top:S,right:M+u.offsetWidth,bottom:S+u.offsetHeight})},triggerOnKeyDown:$t(Pc),triggerOnKeyPress:$t(Nc),triggerOnKeyUp:Rc,triggerOnMouseDown:$t(Bc),execCommand:function(o){if(Ui.hasOwnProperty(o))return Ui[o].call(null,this)},triggerElectric:$t(function(o){Kc(this,o)}),findPosH:function(o,u,f,b){var k=1;u<0&&(k=-1,u=-u);for(var x=Me(this.doc,o),S=0;S0&&M(f.charAt(b-1));)--b;for(;k.5||this.options.lineWrapping)&&vs(this),ct(this,"refresh",this)}),swapDoc:$t(function(o){var u=this.doc;return u.cm=null,this.state.selectingText&&this.state.selectingText(),rc(this,o),Ci(this),this.display.input.reset(),Di(this,o.scrollLeft,o.scrollTop),this.curOp.forceScroll=!0,Pt(this,"swapDoc",this,u),u}),phrase:function(o){var u=this.options.phrases;return u&&Object.prototype.hasOwnProperty.call(u,o)?u[o]:o},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Qn(e),e.registerHelper=function(o,u,f){a.hasOwnProperty(o)||(a[o]=e[o]={_global:[]}),a[o][u]=f},e.registerGlobalHelper=function(o,u,f,b){e.registerHelper(o,u,b),a[o]._global.push({pred:f,val:b})}}function Hs(e,r,a,o,u){var f=r,b=a,k=ye(e,r.line),x=u&&e.direction=="rtl"?-a:a;function S(){var ge=r.line+x;return ge=e.first+e.size?!1:(r=new j(ge,r.ch,r.sticky),k=ye(e,ge))}function M(ge){var pe;if(o=="codepoint"){var ve=k.text.charCodeAt(r.ch+(o>0?0:-1));isNaN(ve)?pe=null:pe=new j(r.line,Math.max(0,Math.min(k.text.length,r.ch+a*(ve>=55296&&ve<56320?2:1))),-a)}else u?pe=py(e.cm,k,r,a):pe=qs(k,r,a);if(pe==null)if(!ge&&S())r=zs(u,e.cm,k,r.line,x);else return!1;else r=pe;return!0}if(o=="char"||o=="codepoint")M();else if(o=="column")M(!0);else if(o=="word"||o=="group")for(var P=null,G=o=="group",$=e.cm&&e.cm.getHelper(r,"wordChars"),ne=!0;!(a<0&&!M(!ne));ne=!1){var ie=k.text.charAt(r.ch)||` -`,le=oe(ie,$)?"w":G&&ie==` -`?"n":!G||/\s/.test(ie)?null:"p";if(G&&!ne&&!le&&(le="s"),P&&P!=le){a<0&&(a=1,M(),r.sticky="after");break}if(le&&(P=le),a>0&&!M(!ne))break}var fe=$o(e,r,f,b,!0);return He(f,fe)&&(fe.hitSide=!0),fe}function Zc(e,r,a,o){var u=e.doc,f=r.left,b;if(o=="page"){var k=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),x=Math.max(k-.5*Br(e.display),3);b=(a>0?r.bottom:r.top)+a*x}else o=="line"&&(b=a>0?r.bottom+3:r.top-3);for(var S;!(S=fs(e,f,b),!S.outside);){if(a<0?b<=0:b>=u.height){S.hitSide=!0;break}b+=a*5}return S}var et=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ue(),this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};et.prototype.init=function(e){var r=this,a=this,o=a.cm,u=a.div=e.lineDiv;Yc(u,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize);function f(k){for(var x=k.target;x;x=x.parentNode){if(x==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(x.className))break}return!1}Ee(u,"paste",function(k){if(!f(k)||at(o,k)||Gc(k,o))return;h<=11&&setTimeout(Lt(o,function(){return r.updateFromDOM()}),20)}),Ee(u,"compositionstart",function(k){r.composing={data:k.data,done:!1}}),Ee(u,"compositionupdate",function(k){r.composing||(r.composing={data:k.data,done:!1})}),Ee(u,"compositionend",function(k){r.composing&&(k.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ee(u,"touchstart",function(){return a.forceCompositionEnd()}),Ee(u,"input",function(){r.composing||r.readFromDOMSoon()});function b(k){if(!f(k)||at(o,k))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()}),k.type=="cut"&&o.replaceSelection("",null,"cut");else if(o.options.lineWiseCopyCut){var x=Vc(o);Zo({lineWise:!0,text:x.text}),k.type=="cut"&&o.operation(function(){o.setSelections(x.ranges,0,we),o.replaceSelection("",null,"cut")})}else return;if(k.clipboardData){k.clipboardData.clearData();var S=wn.text.join(` -`);if(k.clipboardData.setData("Text",S),k.clipboardData.getData("Text")==S){k.preventDefault();return}}var M=Xc(),P=M.firstChild;o.display.lineSpace.insertBefore(M,o.display.lineSpace.firstChild),P.value=wn.text.join(` -`);var G=document.activeElement;he(P),setTimeout(function(){o.display.lineSpace.removeChild(M),G.focus(),G==u&&a.showPrimarySelection()},50)}Ee(u,"copy",b),Ee(u,"cut",b)},et.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},et.prototype.prepareSelection=function(){var e=Ru(this.cm,!1);return e.focus=document.activeElement==this.div,e},et.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},et.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},et.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,a=r.doc.sel.primary(),o=a.from(),u=a.to();if(r.display.viewTo==r.display.viewFrom||o.line>=r.display.viewTo||u.line=r.display.viewFrom&&Qc(r,o)||{node:k[0].measure.map[2],offset:0},S=u.linee.firstLine()&&(o=j(o.line-1,ye(e.doc,o.line-1).length)),u.ch==ye(e.doc,u.line).text.length&&u.liner.viewTo-1)return!1;var f,b,k;o.line==r.viewFrom||(f=vr(e,o.line))==0?(b=Ke(r.view[0].line),k=r.view[0].node):(b=Ke(r.view[f].line),k=r.view[f-1].node.nextSibling);var x=vr(e,u.line),S,M;if(x==r.view.length-1?(S=r.viewTo-1,M=r.lineDiv.lastChild):(S=Ke(r.view[x+1].line)-1,M=r.view[x+1].node.previousSibling),!k)return!1;for(var P=e.doc.splitLines(zy(e,k,M,b,S)),G=Tn(e.doc,j(b,0),j(S,ye(e.doc,S).text.length));P.length>1&&G.length>1;)if(ke(P)==ke(G))P.pop(),G.pop(),S--;else if(P[0]==G[0])P.shift(),G.shift(),b++;else break;for(var $=0,ne=0,ie=P[0],le=G[0],fe=Math.min(ie.length,le.length);$o.ch&&ge.charCodeAt(ge.length-ne-1)==pe.charCodeAt(pe.length-ne-1);)$--,ne++;P[P.length-1]=ge.slice(0,ge.length-ne).replace(/^\u200b+/,""),P[0]=P[0].slice($).replace(/\u200b+$/,"");var De=j(b,$),_e=j(S,G.length?ke(G).length-ne:0);if(P.length>1||P[0]||de(De,_e))return Vr(e.doc,P,De,_e,"+input"),!0},et.prototype.ensurePolled=function(){this.forceCompositionEnd()},et.prototype.reset=function(){this.forceCompositionEnd()},et.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},et.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},et.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&nn(this.cm,function(){return Xt(e.cm)})},et.prototype.setUneditable=function(e){e.contentEditable="false"},et.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,Bs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},et.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},et.prototype.onContextMenu=function(){},et.prototype.resetPosition=function(){},et.prototype.needsContentAttribute=!0;function Qc(e,r){var a=us(e,r.line);if(!a||a.hidden)return null;var o=ye(e.doc,r.line),u=Su(a,o,r.line),f=Ot(o,e.doc.direction),b="left";if(f){var k=Ye(f,r.ch);b=k%2?"right":"left"}var x=Du(u.map,r.ch,b);return x.offset=x.collapse=="right"?x.end:x.start,x}function qy(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function Jr(e,r){return r&&(e.bad=!0),e}function zy(e,r,a,o,u){var f="",b=!1,k=e.doc.lineSeparator(),x=!1;function S($){return function(ne){return ne.id==$}}function M(){b&&(f+=k,x&&(f+=k),b=x=!1)}function P($){$&&(M(),f+=$)}function G($){if($.nodeType==1){var ne=$.getAttribute("cm-text");if(ne){P(ne);return}var ie=$.getAttribute("cm-marker"),le;if(ie){var fe=e.findMarks(j(o,0),j(u+1,0),S(+ie));fe.length&&(le=fe[0].find(0))&&P(Tn(e.doc,le.from,le.to).join(k));return}if($.getAttribute("contenteditable")=="false")return;var ge=/^(pre|div|p|li|table|br)$/i.test($.nodeName);if(!/^br$/i.test($.nodeName)&&$.textContent.length==0)return;ge&&M();for(var pe=0;pe<$.childNodes.length;pe++)G($.childNodes[pe]);/^(pre|p)$/i.test($.nodeName)&&(x=!0),ge&&(b=!0)}else $.nodeType==3&&P($.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(G(r),r==a);)r=r.nextSibling,x=!1;return f}function Qo(e,r,a){var o;if(r==e.display.lineDiv){if(o=e.display.lineDiv.childNodes[a],!o)return Jr(e.clipPos(j(e.display.viewTo-1)),!0);r=null,a=0}else for(o=r;;o=o.parentNode){if(!o||o==e.display.lineDiv)return null;if(o.parentNode&&o.parentNode==e.display.lineDiv)break}for(var u=0;u=9&&r.hasSelection&&(r.hasSelection=null),a.poll()}),Ee(u,"paste",function(b){if(at(o,b)||Gc(b,o))return;o.state.pasteIncoming=+new Date(),a.fastPoll()});function f(b){if(at(o,b))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()});else if(o.options.lineWiseCopyCut){var k=Vc(o);Zo({lineWise:!0,text:k.text}),b.type=="cut"?o.setSelections(k.ranges,null,we):(a.prevInput="",u.value=k.text.join(` -`),he(u))}else return;b.type=="cut"&&(o.state.cutIncoming=+new Date())}Ee(u,"cut",f),Ee(u,"copy",f),Ee(e.scroller,"paste",function(b){if(Gn(e,b)||at(o,b))return;if(!u.dispatchEvent){o.state.pasteIncoming=+new Date(),a.focus();return}var k=new Event("paste");k.clipboardData=b.clipboardData,u.dispatchEvent(k)}),Ee(e.lineSpace,"selectstart",function(b){Gn(e,b)||xt(b)}),Ee(u,"compositionstart",function(){var b=o.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:b,range:o.markText(b,o.getCursor("to"),{className:"CodeMirror-composing"})}}),Ee(u,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},mt.prototype.createField=function(e){this.wrapper=Xc(),this.textarea=this.wrapper.firstChild},mt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},mt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,a=e.doc,o=Ru(e);if(e.options.moveInputWithCursor){var u=bn(e,a.sel.primary().head,"div"),f=r.wrapper.getBoundingClientRect(),b=r.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,u.top+b.top-f.top)),o.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,u.left+b.left-f.left))}return o},mt.prototype.showSelection=function(e){var r=this.cm,a=r.display;Q(a.cursorDiv,e.cursors),Q(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},mt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var a=r.getSelection();this.textarea.value=a,r.state.focused&&he(this.textarea),d&&h>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",d&&h>=9&&(this.hasSelection=null))},mt.prototype.getField=function(){return this.textarea},mt.prototype.supportsTouch=function(){return!1},mt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!q||O()!=this.textarea))try{this.textarea.focus()}catch(e){}},mt.prototype.blur=function(){this.textarea.blur()},mt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},mt.prototype.receivedFocus=function(){this.slowPoll()},mt.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},mt.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function a(){var o=r.poll();!o&&!e?(e=!0,r.polling.set(60,a)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,a)},mt.prototype.poll=function(){var e=this,r=this.cm,a=this.textarea,o=this.prevInput;if(this.contextMenuPending||!r.state.focused||An(a)&&!o&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var u=a.value;if(u==o&&!r.somethingSelected())return!1;if(d&&h>=9&&this.hasSelection===u||A&&/[\uf700-\uf7ff]/.test(u))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var f=u.charCodeAt(0);if(f==8203&&!o&&(o="​"),f==8666)return this.reset(),this.cm.execCommand("undo")}for(var b=0,k=Math.min(o.length,u.length);b1e3||u.indexOf(` -`)>-1?a.value=e.prevInput="":e.prevInput=u,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},mt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},mt.prototype.onKeyPress=function(){d&&h>=9&&(this.hasSelection=null),this.fastPoll()},mt.prototype.onContextMenu=function(e){var r=this,a=r.cm,o=a.display,u=r.textarea;r.contextMenuPending&&r.contextMenuPending();var f=gr(a,e),b=o.scroller.scrollTop;if(!f||m)return;var k=a.options.resetSelectionOnContextMenu;k&&a.doc.sel.contains(f)==-1&&Lt(a,Ht)(a.doc,rr(f),we);var x=u.style.cssText,S=r.wrapper.style.cssText,M=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px; +`)&&(ne=oe=W(ne.line,0)));var ue={from:ne,to:oe,text:C?C[K%C.length]:x,origin:l||(k?"paste":e.state.cutIncoming>v?"cut":"+input")};Gr(e.doc,ue),Rt(e,"inputRead",e,ue)}r&&!k&&Gc(e,r),Hr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=O),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function $c(e,r){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&nn(r,function(){return Bs(r,a,0,null,"paste")}),!0}function Gc(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var a=e.doc.sel,o=a.ranges.length-1;o>=0;o--){var l=a.ranges[o];if(l.head.ch>100||o&&a.ranges[o-1].head.line==l.head.line)continue;var f=e.getModeAt(l.head),v=!1;if(f.electricChars){for(var k=0;k-1){v=Ki(e,l.head.line,"smart");break}}else f.electricInput&&(f.electricInput.test(ke(e.doc,l.head.line).text.slice(0,l.head.ch))&&(v=Ki(e,l.head.line,"smart")));v&&Rt(e,"electricInput",e,l.head.line)}}function Kc(e){for(var r=[],a=[],o=0;of&&(Ki(this,k.head.line,o,!0),f=k.head.line,v==this.doc.sel.primIndex&&Hr(this));else{var x=k.from(),C=k.to(),M=Math.max(f,x.line);f=Math.min(this.lastLine(),C.line-(C.ch?0:1))+1;for(var O=M;O0&&Fs(this.doc,v,new Ye(x,K[v].to()),be)}}}),getTokenAt:function(o,l){return nu(this,o,l)},getLineTokens:function(o,l){return nu(this,W(o),l,!0)},getTokenTypeAt:function(o){o=Me(this.doc,o);var l=Jl(this,ke(this.doc,o.line)),f=0,v=(l.length-1)/2,k=o.ch,x;if(k==0)x=l[2];else for(;;){var C=f+v>>1;if((C?l[C*2-1]:0)>=k)v=C;else if(l[C*2+1]x&&(o=x,v=!0),k=ke(this.doc,o)}else k=o;return Mo(this,k,{top:0,left:0},l||"page",f||v).top+(v?this.doc.height-$n(k):0)},defaultTextHeight:function(){return Nr(this.display)},defaultCharWidth:function(){return Br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(o,l,f,v,k){var x=this.display;o=yn(this,Me(this.doc,o));var C=o.bottom,M=o.left;if(l.style.position="absolute",l.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(l),x.sizer.appendChild(l),v=="over")C=o.top;else if(v=="above"||v=="near"){var O=Math.max(x.wrapper.clientHeight,this.doc.height),K=Math.max(x.sizer.clientWidth,x.lineSpace.clientWidth);(v=="above"||o.bottom+l.offsetHeight>O)&&o.top>l.offsetHeight?C=o.top-l.offsetHeight:o.bottom+l.offsetHeight<=O&&(C=o.bottom),M+l.offsetWidth>K&&(M=K-l.offsetWidth)}l.style.top=C+"px",l.style.left=l.style.right="",k=="right"?(M=x.sizer.clientWidth-l.offsetWidth,l.style.right="0px"):(k=="left"?M=0:k=="middle"&&(M=(x.sizer.clientWidth-l.offsetWidth)/2),l.style.left=M+"px"),f&&Ab(this,{left:M,top:C,right:M+l.offsetWidth,bottom:C+l.offsetHeight})},triggerOnKeyDown:$t(Pc),triggerOnKeyPress:$t(Oc),triggerOnKeyUp:Rc,triggerOnMouseDown:$t(Nc),execCommand:function(o){if(Ui.hasOwnProperty(o))return Ui[o].call(null,this)},triggerElectric:$t(function(o){Gc(this,o)}),findPosH:function(o,l,f,v){var k=1;l<0&&(k=-1,l=-l);for(var x=Me(this.doc,o),C=0;C0&&M(f.charAt(v-1));)--v;for(;k.5||this.options.lineWrapping)&&vs(this),ct(this,"refresh",this)}),swapDoc:$t(function(o){var l=this.doc;return l.cm=null,this.state.selectingText&&this.state.selectingText(),nc(this,o),Ei(this),this.display.input.reset(),Ai(this,o.scrollLeft,o.scrollTop),this.curOp.forceScroll=!0,Rt(this,"swapDoc",this,l),l}),phrase:function(o){var l=this.options.phrases;return l&&Object.prototype.hasOwnProperty.call(l,o)?l[o]:o},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Jn(e),e.registerHelper=function(o,l,f){a.hasOwnProperty(o)||(a[o]=e[o]={_global:[]}),a[o][l]=f},e.registerGlobalHelper=function(o,l,f,v){e.registerHelper(o,l,v),a[o]._global.push({pred:f,val:v})}}function js(e,r,a,o,l){var f=r,v=a,k=ke(e,r.line),x=l&&e.direction=="rtl"?-a:a;function C(){var ge=r.line+x;return ge=e.first+e.size?!1:(r=new W(ge,r.ch,r.sticky),k=ke(e,ge))}function M(ge){var pe;if(o=="codepoint"){var ve=k.text.charCodeAt(r.ch+(o>0?0:-1));isNaN(ve)?pe=null:pe=new W(r.line,Math.max(0,Math.min(k.text.length,r.ch+a*(ve>=55296&&ve<56320?2:1))),-a)}else l?pe=hy(e.cm,k,r,a):pe=qs(k,r,a);if(pe==null)if(!ge&&C())r=zs(l,e.cm,k,r.line,x);else return!1;else r=pe;return!0}if(o=="char"||o=="codepoint")M();else if(o=="column")M(!0);else if(o=="word"||o=="group")for(var O=null,K=o=="group",$=e.cm&&e.cm.getHelper(r,"wordChars"),ne=!0;!(a<0&&!M(!ne));ne=!1){var oe=k.text.charAt(r.ch)||` +`,ue=se(oe,$)?"w":K&&oe==` +`?"n":!K||/\s/.test(oe)?null:"p";if(K&&!ne&&!ue&&(ue="s"),O&&O!=ue){a<0&&(a=1,M(),r.sticky="after");break}if(ue&&(O=ue),a>0&&!M(!ne))break}var fe=$o(e,r,f,v,!0);return He(f,fe)&&(fe.hitSide=!0),fe}function Xc(e,r,a,o){var l=e.doc,f=r.left,v;if(o=="page"){var k=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),x=Math.max(k-.5*Nr(e.display),3);v=(a>0?r.bottom:r.top)+a*x}else o=="line"&&(v=a>0?r.bottom+3:r.top-3);for(var C;!(C=fs(e,f,v),!C.outside);){if(a<0?v<=0:v>=l.height){C.hitSide=!0;break}v+=a*5}return C}var et=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};et.prototype.init=function(e){var r=this,a=this,o=a.cm,l=a.div=e.lineDiv;Vc(l,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize);function f(k){for(var x=k.target;x;x=x.parentNode){if(x==l)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(x.className))break}return!1}De(l,"paste",function(k){if(!f(k)||at(o,k)||$c(k,o))return;h<=11&&setTimeout(Lt(o,function(){return r.updateFromDOM()}),20)}),De(l,"compositionstart",function(k){r.composing={data:k.data,done:!1}}),De(l,"compositionupdate",function(k){r.composing||(r.composing={data:k.data,done:!1})}),De(l,"compositionend",function(k){r.composing&&(k.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),De(l,"touchstart",function(){return a.forceCompositionEnd()}),De(l,"input",function(){r.composing||r.readFromDOMSoon()});function v(k){if(!f(k)||at(o,k))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()}),k.type=="cut"&&o.replaceSelection("",null,"cut");else if(o.options.lineWiseCopyCut){var x=Kc(o);Zo({lineWise:!0,text:x.text}),k.type=="cut"&&o.operation(function(){o.setSelections(x.ranges,0,be),o.replaceSelection("",null,"cut")})}else return;if(k.clipboardData){k.clipboardData.clearData();var C=kn.text.join(` +`);if(k.clipboardData.setData("Text",C),k.clipboardData.getData("Text")==C){k.preventDefault();return}}var M=Yc(),O=M.firstChild;o.display.lineSpace.insertBefore(M,o.display.lineSpace.firstChild),O.value=kn.text.join(` +`);var K=document.activeElement;ae(O),setTimeout(function(){o.display.lineSpace.removeChild(M),K.focus(),K==l&&a.showPrimarySelection()},50)}De(l,"copy",v),De(l,"cut",v)},et.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},et.prototype.prepareSelection=function(){var e=Ru(this.cm,!1);return e.focus=document.activeElement==this.div,e},et.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},et.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},et.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,a=r.doc.sel.primary(),o=a.from(),l=a.to();if(r.display.viewTo==r.display.viewFrom||o.line>=r.display.viewTo||l.line=r.display.viewFrom&&Zc(r,o)||{node:k[0].measure.map[2],offset:0},C=l.linee.firstLine()&&(o=W(o.line-1,ke(e.doc,o.line-1).length)),l.ch==ke(e.doc,l.line).text.length&&l.liner.viewTo-1)return!1;var f,v,k;o.line==r.viewFrom||(f=vr(e,o.line))==0?(v=Ke(r.view[0].line),k=r.view[0].node):(v=Ke(r.view[f].line),k=r.view[f-1].node.nextSibling);var x=vr(e,l.line),C,M;if(x==r.view.length-1?(C=r.viewTo-1,M=r.lineDiv.lastChild):(C=Ke(r.view[x+1].line)-1,M=r.view[x+1].node.previousSibling),!k)return!1;for(var O=e.doc.splitLines(My(e,k,M,v,C)),K=Tn(e.doc,W(v,0),W(C,ke(e.doc,C).text.length));O.length>1&&K.length>1;)if(xe(O)==xe(K))O.pop(),K.pop(),C--;else if(O[0]==K[0])O.shift(),K.shift(),v++;else break;for(var $=0,ne=0,oe=O[0],ue=K[0],fe=Math.min(oe.length,ue.length);$o.ch&&ge.charCodeAt(ge.length-ne-1)==pe.charCodeAt(pe.length-ne-1);)$--,ne++;O[O.length-1]=ge.slice(0,ge.length-ne).replace(/^\u200b+/,""),O[0]=O[0].slice($).replace(/\u200b+$/,"");var Ae=W(v,$),Se=W(C,K.length?xe(K).length-ne:0);if(O.length>1||O[0]||he(Ae,Se))return Kr(e.doc,O,Ae,Se,"+input"),!0},et.prototype.ensurePolled=function(){this.forceCompositionEnd()},et.prototype.reset=function(){this.forceCompositionEnd()},et.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},et.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},et.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&nn(this.cm,function(){return Xt(e.cm)})},et.prototype.setUneditable=function(e){e.contentEditable="false"},et.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,Bs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},et.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},et.prototype.onContextMenu=function(){},et.prototype.resetPosition=function(){},et.prototype.needsContentAttribute=!0;function Zc(e,r){var a=us(e,r.line);if(!a||a.hidden)return null;var o=ke(e.doc,r.line),l=_u(a,o,r.line),f=Pt(o,e.doc.direction),v="left";if(f){var k=Ve(f,r.ch);v=k%2?"right":"left"}var x=Eu(l.map,r.ch,v);return x.offset=x.collapse=="right"?x.end:x.start,x}function Fy(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function Qr(e,r){return r&&(e.bad=!0),e}function My(e,r,a,o,l){var f="",v=!1,k=e.doc.lineSeparator(),x=!1;function C($){return function(ne){return ne.id==$}}function M(){v&&(f+=k,x&&(f+=k),v=x=!1)}function O($){$&&(M(),f+=$)}function K($){if($.nodeType==1){var ne=$.getAttribute("cm-text");if(ne){O(ne);return}var oe=$.getAttribute("cm-marker"),ue;if(oe){var fe=e.findMarks(W(o,0),W(l+1,0),C(+oe));fe.length&&(ue=fe[0].find(0))&&O(Tn(e.doc,ue.from,ue.to).join(k));return}if($.getAttribute("contenteditable")=="false")return;var ge=/^(pre|div|p|li|table|br)$/i.test($.nodeName);if(!/^br$/i.test($.nodeName)&&$.textContent.length==0)return;ge&&M();for(var pe=0;pe<$.childNodes.length;pe++)K($.childNodes[pe]);/^(pre|p)$/i.test($.nodeName)&&(x=!0),ge&&(v=!0)}else $.nodeType==3&&O($.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(K(r),r==a);)r=r.nextSibling,x=!1;return f}function Qo(e,r,a){var o;if(r==e.display.lineDiv){if(o=e.display.lineDiv.childNodes[a],!o)return Qr(e.clipPos(W(e.display.viewTo-1)),!0);r=null,a=0}else for(o=r;;o=o.parentNode){if(!o||o==e.display.lineDiv)return null;if(o.parentNode&&o.parentNode==e.display.lineDiv)break}for(var l=0;l=9&&r.hasSelection&&(r.hasSelection=null),a.poll()}),De(l,"paste",function(v){if(at(o,v)||$c(v,o))return;o.state.pasteIncoming=+new Date,a.fastPoll()});function f(v){if(at(o,v))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()});else if(o.options.lineWiseCopyCut){var k=Kc(o);Zo({lineWise:!0,text:k.text}),v.type=="cut"?o.setSelections(k.ranges,null,be):(a.prevInput="",l.value=k.text.join(` +`),ae(l))}else return;v.type=="cut"&&(o.state.cutIncoming=+new Date)}De(l,"cut",f),De(l,"copy",f),De(e.scroller,"paste",function(v){if(Gn(e,v)||at(o,v))return;if(!l.dispatchEvent){o.state.pasteIncoming=+new Date,a.focus();return}var k=new Event("paste");k.clipboardData=v.clipboardData,l.dispatchEvent(k)}),De(e.lineSpace,"selectstart",function(v){Gn(e,v)||Ct(v)}),De(l,"compositionstart",function(){var v=o.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:v,range:o.markText(v,o.getCursor("to"),{className:"CodeMirror-composing"})}}),De(l,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},gt.prototype.createField=function(e){this.wrapper=Yc(),this.textarea=this.wrapper.firstChild},gt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},gt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,a=e.doc,o=Ru(e);if(e.options.moveInputWithCursor){var l=yn(e,a.sel.primary().head,"div"),f=r.wrapper.getBoundingClientRect(),v=r.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,l.top+v.top-f.top)),o.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,l.left+v.left-f.left))}return o},gt.prototype.showSelection=function(e){var r=this.cm,a=r.display;Z(a.cursorDiv,e.cursors),Z(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},gt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var a=r.getSelection();this.textarea.value=a,r.state.focused&&ae(this.textarea),d&&h>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",d&&h>=9&&(this.hasSelection=null))},gt.prototype.getField=function(){return this.textarea},gt.prototype.supportsTouch=function(){return!1},gt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||q()!=this.textarea))try{this.textarea.focus()}catch(e){}},gt.prototype.blur=function(){this.textarea.blur()},gt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},gt.prototype.receivedFocus=function(){this.slowPoll()},gt.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},gt.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function a(){var o=r.poll();!o&&!e?(e=!0,r.polling.set(60,a)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,a)},gt.prototype.poll=function(){var e=this,r=this.cm,a=this.textarea,o=this.prevInput;if(this.contextMenuPending||!r.state.focused||An(a)&&!o&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var l=a.value;if(l==o&&!r.somethingSelected())return!1;if(d&&h>=9&&this.hasSelection===l||A&&/[\uf700-\uf7ff]/.test(l))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var f=l.charCodeAt(0);if(f==8203&&!o&&(o="​"),f==8666)return this.reset(),this.cm.execCommand("undo")}for(var v=0,k=Math.min(o.length,l.length);v1e3||l.indexOf(` +`)>-1?a.value=e.prevInput="":e.prevInput=l,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},gt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},gt.prototype.onKeyPress=function(){d&&h>=9&&(this.hasSelection=null),this.fastPoll()},gt.prototype.onContextMenu=function(e){var r=this,a=r.cm,o=a.display,l=r.textarea;r.contextMenuPending&&r.contextMenuPending();var f=gr(a,e),v=o.scroller.scrollTop;if(!f||m)return;var k=a.options.resetSelectionOnContextMenu;k&&a.doc.sel.contains(f)==-1&&Lt(a,jt)(a.doc,ir(f),be);var x=l.style.cssText,C=r.wrapper.style.cssText,M=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",l.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-M.top-5)+"px; left: "+(e.clientX-M.left-5)+`px; z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var P;p&&(P=window.scrollY),o.input.focus(),p&&window.scrollTo(null,P),o.input.reset(),a.somethingSelected()||(u.value=r.prevInput=" "),r.contextMenuPending=$,o.selForContextMenu=a.doc.sel,clearTimeout(o.detectingSelectAll);function G(){if(u.selectionStart!=null){var ie=a.somethingSelected(),le="​"+(ie?u.value:"");u.value="⇚",u.value=le,r.prevInput=ie?"":"​",u.selectionStart=1,u.selectionEnd=le.length,o.selForContextMenu=a.doc.sel}}function $(){if(r.contextMenuPending!=$)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=S,u.style.cssText=x,d&&h<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=b),u.selectionStart!=null){(!d||d&&h<9)&&G();var ie=0,le=function(){o.selForContextMenu==a.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&r.prevInput=="​"?Lt(a,gc)(a):ie++<10?o.detectingSelectAll=setTimeout(le,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(le,200)}}if(d&&h>=9&&G(),K){Bt(e);var ne=function(){Pe(window,"mouseup",ne),setTimeout($,20)};Ee(window,"mouseup",ne)}else setTimeout($,50)},mt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},mt.prototype.setUneditable=function(){},mt.prototype.needsContentAttribute=!1;function Py(e,r){if(r=r?T(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var a=O();r.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function o(){e.value=k.getValue()}var u;if(e.form&&(Ee(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var f=e.form;u=f.submit;try{var b=f.submit=function(){o(),f.submit=u,f.submit(),f.submit=b}}catch(x){}}r.finishInit=function(x){x.save=o,x.getTextArea=function(){return e},x.toTextArea=function(){x.toTextArea=isNaN,o(),e.parentNode.removeChild(x.getWrapperElement()),e.style.display="",e.form&&(Pe(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=u))}},e.style.display="none";var k=lt(function(x){return e.parentNode.insertBefore(x,e.nextSibling)},r);return k}function Ry(e){e.off=Pe,e.on=Ee,e.wheelEventPixels=$b,e.Doc=Zt,e.splitLines=Dn,e.countColumn=ce,e.findColumn=Ge,e.isWordChar=X,e.Pass=Ue,e.signal=ct,e.Line=Pr,e.changeEnd=ir,e.scrollbarModel=Gu,e.Pos=j,e.cmpPos=de,e.modes=vi,e.mimeModes=Hn,e.resolveMode=Un,e.getMode=bi,e.modeExtensions=Wn,e.extendMode=Qa,e.copyState=fn,e.startState=_o,e.innerMode=Or,e.commands=Ui,e.keyMap=Kn,e.keyName=Fc,e.isModifierKey=Lc,e.lookupKey=Xr,e.normalizeKeyMap=fy,e.StringStream=st,e.SharedTextMarker=Ni,e.TextMarker=ar,e.LineWidget=Ri,e.e_preventDefault=xt,e.e_stopPropagation=wo,e.e_stop=Bt,e.addClass=I,e.contains=Z,e.rmClass=J,e.keyNames=sr}Ty(lt),My(lt);var Ny="iter insert remove copy getEditor constructor".split(" ");for(var Jo in Zt.prototype)Zt.prototype.hasOwnProperty(Jo)&&ae(Ny,Jo)<0&&(lt.prototype[Jo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Zt.prototype[Jo]));return Qn(Zt),lt.inputStyles={textarea:mt,contenteditable:et},lt.defineMode=function(e){!lt.defaults.mode&&e!="null"&&(lt.defaults.mode=e),zr.apply(this,arguments)},lt.defineMIME=vn,lt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),lt.defineMIME("text/plain","null"),lt.defineExtension=function(e,r){lt.prototype[e]=r},lt.defineDocExtension=function(e,r){Zt.prototype[e]=r},lt.fromTextArea=Py,Ry(lt),lt.version="5.58.1",lt})});var Ks=se((Ki,Gs)=>{!function(n,t){typeof Ki=="object"&&typeof Gs=="object"?Gs.exports=t():typeof define=="function"&&define.amd?define([],t):typeof Ki=="object"?Ki.ClipboardJS=t():n.ClipboardJS=t()}(Ki,function(){return i={},n.m=t=[function(s,l){s.exports=function(c){var d;if(c.nodeName==="SELECT")c.focus(),d=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var h=c.hasAttribute("readonly");h||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),h||c.removeAttribute("readonly"),d=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var p=window.getSelection(),g=document.createRange();g.selectNodeContents(c),p.removeAllRanges(),p.addRange(g),d=p.toString()}return d}},function(s,l){function c(){}c.prototype={on:function(d,h,p){var g=this.e||(this.e={});return(g[d]||(g[d]=[])).push({fn:h,ctx:p}),this},once:function(d,h,p){var g=this;function y(){g.off(d,y),h.apply(p,arguments)}return y._=h,this.on(d,y,p)},emit:function(d){for(var h=[].slice.call(arguments,1),p=((this.e||(this.e={}))[d]||[]).slice(),g=0,y=p.length;g{(function(n){typeof ed=="object"&&typeof td=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("css",function(ee,J){var z=J.inline;J.propertyKeywords||(J=n.resolveMode("text/css"));var Q=ee.indentUnit,_=J.tokenHooks,Y=J.documentTypes||{},U=J.mediaTypes||{},Z=J.mediaFeatures||{},O=J.mediaValueKeywords||{},I=J.propertyKeywords||{},W=J.nonStandardPropertyKeywords||{},he=J.fontProperties||{},F=J.counterDescriptors||{},T=J.colorKeywords||{},ce=J.valueKeywords||{},ue=J.allowNested,ae=J.lineComment,Te=J.supportsAtComponent===!0,Ue,we;function Se(X,oe){return Ue=oe,X}function Ve(X,oe){var te=X.next();if(_[te]){var Re=_[te](X,oe);if(Re!==!1)return Re}if(te=="@")return X.eatWhile(/[\w\\\-]/),Se("def",X.current());if(te=="="||(te=="~"||te=="|")&&X.eat("="))return Se(null,"compare");if(te=='"'||te=="'")return oe.tokenize=Ge(te),oe.tokenize(X,oe);if(te=="#")return X.eatWhile(/[\w\\\-]/),Se("atom","hash");if(te=="!")return X.match(/^\s*\w*/),Se("keyword","important");if(/\d/.test(te)||te=="."&&X.eat(/\d/))return X.eatWhile(/[\w.%]/),Se("number","unit");if(te==="-"){if(/[\d.]/.test(X.peek()))return X.eatWhile(/[\w.%]/),Se("number","unit");if(X.match(/^-[\w\\\-]*/))return X.eatWhile(/[\w\\\-]/),X.match(/^\s*:/,!1)?Se("variable-2","variable-definition"):Se("variable-2","variable");if(X.match(/^\w+-/))return Se("meta","meta")}else return/[,+>*\/]/.test(te)?Se(null,"select-op"):te=="."&&X.match(/^-?[_a-z][_a-z0-9-]*/i)?Se("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(te)?Se(null,te):X.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(X.current().toLowerCase())&&(oe.tokenize=nt),Se("variable callee","variable")):/[\w\\\-]/.test(te)?(X.eatWhile(/[\w\\\-]/),Se("property","word")):Se(null,null)}function Ge(X){return function(oe,te){for(var Re=!1,kt;(kt=oe.next())!=null;){if(kt==X&&!Re){X==")"&&oe.backUp(1);break}Re=!Re&&kt=="\\"}return(kt==X||!Re&&X!=")")&&(te.tokenize=null),Se("string","string")}}function nt(X,oe){return X.next(),X.match(/\s*[\"\')]/,!1)?oe.tokenize=null:oe.tokenize=Ge(")"),Se(null,"(")}function Tt(X,oe,te){this.type=X,this.indent=oe,this.prev=te}function ke(X,oe,te,Re){return X.context=new Tt(te,oe.indentation()+(Re===!1?0:Q),X.context),te}function tt(X){return X.context.prev&&(X.context=X.context.prev),X.context.type}function ft(X,oe,te){return Fe[te.context.type](X,oe,te)}function pt(X,oe,te,Re){for(var kt=Re||1;kt>0;kt--)te.context=te.context.prev;return ft(X,oe,te)}function jt(X){var oe=X.current().toLowerCase();ce.hasOwnProperty(oe)?we="atom":T.hasOwnProperty(oe)?we="keyword":we="variable"}var Fe={};return Fe.top=function(X,oe,te){if(X=="{")return ke(te,oe,"block");if(X=="}"&&te.context.prev)return tt(te);if(Te&&/@component/i.test(X))return ke(te,oe,"atComponentBlock");if(/^@(-moz-)?document$/i.test(X))return ke(te,oe,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(X))return ke(te,oe,"atBlock");if(/^@(font-face|counter-style)/i.test(X))return te.stateArg=X,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(X))return"keyframes";if(X&&X.charAt(0)=="@")return ke(te,oe,"at");if(X=="hash")we="builtin";else if(X=="word")we="tag";else{if(X=="variable-definition")return"maybeprop";if(X=="interpolation")return ke(te,oe,"interpolation");if(X==":")return"pseudo";if(ue&&X=="(")return ke(te,oe,"parens")}return te.context.type},Fe.block=function(X,oe,te){if(X=="word"){var Re=oe.current().toLowerCase();return I.hasOwnProperty(Re)?(we="property","maybeprop"):W.hasOwnProperty(Re)?(we="string-2","maybeprop"):ue?(we=oe.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(we+=" error","maybeprop")}else return X=="meta"?"block":!ue&&(X=="hash"||X=="qualifier")?(we="error","block"):Fe.top(X,oe,te)},Fe.maybeprop=function(X,oe,te){return X==":"?ke(te,oe,"prop"):ft(X,oe,te)},Fe.prop=function(X,oe,te){if(X==";")return tt(te);if(X=="{"&&ue)return ke(te,oe,"propBlock");if(X=="}"||X=="{")return pt(X,oe,te);if(X=="(")return ke(te,oe,"parens");if(X=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(oe.current()))we+=" error";else if(X=="word")jt(oe);else if(X=="interpolation")return ke(te,oe,"interpolation");return"prop"},Fe.propBlock=function(X,oe,te){return X=="}"?tt(te):X=="word"?(we="property","maybeprop"):te.context.type},Fe.parens=function(X,oe,te){return X=="{"||X=="}"?pt(X,oe,te):X==")"?tt(te):X=="("?ke(te,oe,"parens"):X=="interpolation"?ke(te,oe,"interpolation"):(X=="word"&&jt(oe),"parens")},Fe.pseudo=function(X,oe,te){return X=="meta"?"pseudo":X=="word"?(we="variable-3",te.context.type):ft(X,oe,te)},Fe.documentTypes=function(X,oe,te){return X=="word"&&Y.hasOwnProperty(oe.current())?(we="tag",te.context.type):Fe.atBlock(X,oe,te)},Fe.atBlock=function(X,oe,te){if(X=="(")return ke(te,oe,"atBlock_parens");if(X=="}"||X==";")return pt(X,oe,te);if(X=="{")return tt(te)&&ke(te,oe,ue?"block":"top");if(X=="interpolation")return ke(te,oe,"interpolation");if(X=="word"){var Re=oe.current().toLowerCase();Re=="only"||Re=="not"||Re=="and"||Re=="or"?we="keyword":U.hasOwnProperty(Re)?we="attribute":Z.hasOwnProperty(Re)?we="property":O.hasOwnProperty(Re)?we="keyword":I.hasOwnProperty(Re)?we="property":W.hasOwnProperty(Re)?we="string-2":ce.hasOwnProperty(Re)?we="atom":T.hasOwnProperty(Re)?we="keyword":we="error"}return te.context.type},Fe.atComponentBlock=function(X,oe,te){return X=="}"?pt(X,oe,te):X=="{"?tt(te)&&ke(te,oe,ue?"block":"top",!1):(X=="word"&&(we="error"),te.context.type)},Fe.atBlock_parens=function(X,oe,te){return X==")"?tt(te):X=="{"||X=="}"?pt(X,oe,te,2):Fe.atBlock(X,oe,te)},Fe.restricted_atBlock_before=function(X,oe,te){return X=="{"?ke(te,oe,"restricted_atBlock"):X=="word"&&te.stateArg=="@counter-style"?(we="variable","restricted_atBlock_before"):ft(X,oe,te)},Fe.restricted_atBlock=function(X,oe,te){return X=="}"?(te.stateArg=null,tt(te)):X=="word"?(te.stateArg=="@font-face"&&!he.hasOwnProperty(oe.current().toLowerCase())||te.stateArg=="@counter-style"&&!F.hasOwnProperty(oe.current().toLowerCase())?we="error":we="property","maybeprop"):"restricted_atBlock"},Fe.keyframes=function(X,oe,te){return X=="word"?(we="variable","keyframes"):X=="{"?ke(te,oe,"top"):ft(X,oe,te)},Fe.at=function(X,oe,te){return X==";"?tt(te):X=="{"||X=="}"?pt(X,oe,te):(X=="word"?we="tag":X=="hash"&&(we="builtin"),"at")},Fe.interpolation=function(X,oe,te){return X=="}"?tt(te):X=="{"||X==";"?pt(X,oe,te):(X=="word"?we="variable":X!="variable"&&X!="("&&X!=")"&&(we="error"),"interpolation")},{startState:function(X){return{tokenize:null,state:z?"block":"top",stateArg:null,context:new Tt(z?"block":"top",X||0,null)}},token:function(X,oe){if(!oe.tokenize&&X.eatSpace())return null;var te=(oe.tokenize||Ve)(X,oe);return te&&typeof te=="object"&&(Ue=te[1],te=te[0]),we=te,Ue!="comment"&&(oe.state=Fe[oe.state](Ue,X,oe)),we},indent:function(X,oe){var te=X.context,Re=oe&&oe.charAt(0),kt=te.indent;return te.type=="prop"&&(Re=="}"||Re==")")&&(te=te.prev),te.prev&&(Re=="}"&&(te.type=="block"||te.type=="top"||te.type=="interpolation"||te.type=="restricted_atBlock")?(te=te.prev,kt=te.indent):(Re==")"&&(te.type=="parens"||te.type=="atBlock_parens")||Re=="{"&&(te.type=="at"||te.type=="atBlock"))&&(kt=Math.max(0,te.indent-Q))),kt},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:ae,fold:"brace"}});function t(ee){for(var J={},z=0;z{(function(n){typeof nd=="object"&&typeof rd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";function t(O,I,W,he,F,T){this.indented=O,this.column=I,this.type=W,this.info=he,this.align=F,this.prev=T}function i(O,I,W,he){var F=O.indented;return O.context&&O.context.type=="statement"&&W!="statement"&&(F=O.context.indented),O.context=new t(F,I,W,he,null,O.context)}function s(O){var I=O.context.type;return(I==")"||I=="]"||I=="}")&&(O.indented=O.context.indented),O.context=O.context.prev}function l(O,I,W){if(I.prevToken=="variable"||I.prevToken=="type")return!0;if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(O.string.slice(0,W)))return!0;if(I.typeAtEndOfLine&&O.column()==O.indentation())return!0}function c(O){for(;;){if(!O||O.type=="top")return!0;if(O.type=="}"&&O.prev.info!="namespace")return!1;O=O.prev}}n.defineMode("clike",function(O,I){var W=O.indentUnit,he=I.statementIndentUnit||W,F=I.dontAlignCalls,T=I.keywords||{},ce=I.types||{},ue=I.builtin||{},ae=I.blockKeywords||{},Te=I.defKeywords||{},Ue=I.atoms||{},we=I.hooks||{},Se=I.multiLineStrings,Ve=I.indentStatements!==!1,Ge=I.indentSwitch!==!1,nt=I.namespaceSeparator,Tt=I.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,ke=I.numberStart||/[\d\.]/,tt=I.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,ft=I.isOperatorChar||/[+\-*&%=<>!?|\/]/,pt=I.isIdentifierChar||/[\w\$_\xa1-\uffff]/,jt=I.isReservedIdentifier||!1,Fe,X;function oe(Ce,Le){var be=Ce.next();if(we[be]){var Ae=we[be](Ce,Le);if(Ae!==!1)return Ae}if(be=='"'||be=="'")return Le.tokenize=te(be),Le.tokenize(Ce,Le);if(Tt.test(be))return Fe=be,null;if(ke.test(be)){if(Ce.backUp(1),Ce.match(tt))return"number";Ce.next()}if(be=="/"){if(Ce.eat("*"))return Le.tokenize=Re,Re(Ce,Le);if(Ce.eat("/"))return Ce.skipToEnd(),"comment"}if(ft.test(be)){for(;!Ce.match(/^\/[\/*]/,!1)&&Ce.eat(ft););return"operator"}if(Ce.eatWhile(pt),nt)for(;Ce.match(nt);)Ce.eatWhile(pt);var Ye=Ce.current();return h(T,Ye)?(h(ae,Ye)&&(Fe="newstatement"),h(Te,Ye)&&(X=!0),"keyword"):h(ce,Ye)?"type":h(ue,Ye)||jt&&jt(Ye)?(h(ae,Ye)&&(Fe="newstatement"),"builtin"):h(Ue,Ye)?"atom":"variable"}function te(Ce){return function(Le,be){for(var Ae=!1,Ye,hn=!1;(Ye=Le.next())!=null;){if(Ye==Ce&&!Ae){hn=!0;break}Ae=!Ae&&Ye=="\\"}return(hn||!(Ae||Se))&&(be.tokenize=null),"string"}}function Re(Ce,Le){for(var be=!1,Ae;Ae=Ce.next();){if(Ae=="/"&&be){Le.tokenize=null;break}be=Ae=="*"}return"comment"}function kt(Ce,Le){I.typeFirstDefinitions&&Ce.eol()&&c(Le.context)&&(Le.typeAtEndOfLine=l(Ce,Le,Ce.pos))}return{startState:function(Ce){return{tokenize:null,context:new t((Ce||0)-W,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(Ce,Le){var be=Le.context;if(Ce.sol()&&(be.align==null&&(be.align=!1),Le.indented=Ce.indentation(),Le.startOfLine=!0),Ce.eatSpace())return kt(Ce,Le),null;Fe=X=null;var Ae=(Le.tokenize||oe)(Ce,Le);if(Ae=="comment"||Ae=="meta")return Ae;if(be.align==null&&(be.align=!0),Fe==";"||Fe==":"||Fe==","&&Ce.match(/^\s*(?:\/\/.*)?$/,!1))for(;Le.context.type=="statement";)s(Le);else if(Fe=="{")i(Le,Ce.column(),"}");else if(Fe=="[")i(Le,Ce.column(),"]");else if(Fe=="(")i(Le,Ce.column(),")");else if(Fe=="}"){for(;be.type=="statement";)be=s(Le);for(be.type=="}"&&(be=s(Le));be.type=="statement";)be=s(Le)}else Fe==be.type?s(Le):Ve&&((be.type=="}"||be.type=="top")&&Fe!=";"||be.type=="statement"&&Fe=="newstatement")&&i(Le,Ce.column(),"statement",Ce.current());if(Ae=="variable"&&(Le.prevToken=="def"||I.typeFirstDefinitions&&l(Ce,Le,Ce.start)&&c(Le.context)&&Ce.match(/^\s*\(/,!1))&&(Ae="def"),we.token){var Ye=we.token(Ce,Le,Ae);Ye!==void 0&&(Ae=Ye)}return Ae=="def"&&I.styleDefs===!1&&(Ae="variable"),Le.startOfLine=!1,Le.prevToken=X?"def":Ae||Fe,kt(Ce,Le),Ae},indent:function(Ce,Le){if(Ce.tokenize!=oe&&Ce.tokenize!=null||Ce.typeAtEndOfLine)return n.Pass;var be=Ce.context,Ae=Le&&Le.charAt(0),Ye=Ae==be.type;if(be.type=="statement"&&Ae=="}"&&(be=be.prev),I.dontIndentStatements)for(;be.type=="statement"&&I.dontIndentStatements.test(be.info);)be=be.prev;if(we.indent){var hn=we.indent(Ce,be,Le,W);if(typeof hn=="number")return hn}var Ot=be.prev&&be.prev.info=="switch";if(I.allmanIndentation&&/[{(]/.test(Ae)){for(;be.type!="top"&&be.type!="}";)be=be.prev;return be.indented}return be.type=="statement"?be.indented+(Ae=="{"?0:he):be.align&&(!F||be.type!=")")?be.column+(Ye?0:1):be.type==")"&&!Ye?be.indented+he:be.indented+(Ye?0:W)+(!Ye&&Ot&&!/^(?:case|default)\b/.test(Le)?W:0)},electricInput:Ge?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function d(O){for(var I={},W=O.split(" "),he=0;he!?|\/#:@]/,hooks:{"@":function(O){return O.eatWhile(/[\w\$_]/),"meta"},'"':function(O,I){return O.match('""')?(I.tokenize=Q,I.tokenize(O,I)):!1},"'":function(O){return O.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(O,I){var W=I.context;return W.type=="}"&&W.align&&O.eat(">")?(I.context=new t(W.indented,W.column,W.type,W.info,null,W.prev),"operator"):!1},"/":function(O,I){return O.eat("*")?(I.tokenize=_(1),I.tokenize(O,I)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function Y(O){return function(I,W){for(var he=!1,F,T=!1;!I.eol();){if(!O&&!he&&I.match('"')){T=!0;break}if(O&&I.match('"""')){T=!0;break}F=I.next(),!he&&F=="$"&&I.match("{")&&I.skipTo("}"),he=!he&&F=="\\"&&!O}return(T||!O)&&(W.tokenize=null),"string"}}z("text/x-kotlin",{name:"clike",keywords:d("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:d("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:d("catch class do else finally for if where try while enum"),defKeywords:d("class val var object interface fun"),atoms:d("true false null this"),hooks:{"@":function(O){return O.eatWhile(/[\w\$_]/),"meta"},"*":function(O,I){return I.prevToken=="."?"variable":"operator"},'"':function(O,I){return I.tokenize=Y(O.match('""')),I.tokenize(O,I)},"/":function(O,I){return O.eat("*")?(I.tokenize=_(1),I.tokenize(O,I)):!1},indent:function(O,I,W,he){var F=W&&W.charAt(0);if((O.prevToken=="}"||O.prevToken==")")&&W=="")return O.indented;if(O.prevToken=="operator"&&W!="}"&&O.context.type!="}"||O.prevToken=="variable"&&F=="."||(O.prevToken=="}"||O.prevToken==")")&&F==".")return he*2+I.indented;if(I.align&&I.type=="}")return I.indented+(O.context.type==(W||"").charAt(0)?0:he)}},modeProps:{closeBrackets:{triples:'"'}}}),z(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:d("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:d("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:d("for while do if else struct"),builtin:d("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:d("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":A},modeProps:{fold:["brace","include"]}}),z("text/x-nesc",{name:"clike",keywords:d(p+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:E,blockKeywords:d(C),atoms:d("null true false"),hooks:{"#":A},modeProps:{fold:["brace","include"]}}),z("text/x-objectivec",{name:"clike",keywords:d(p+" "+y),types:D,builtin:d(m),blockKeywords:d(C+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:d(q+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:N,hooks:{"#":A,"*":H},modeProps:{fold:["brace","include"]}}),z("text/x-objectivec++",{name:"clike",keywords:d(p+" "+y+" "+g),types:D,builtin:d(m),blockKeywords:d(C+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:d(q+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:N,hooks:{"#":A,"*":H,u:B,U:B,L:B,R:B,"0":V,"1":V,"2":V,"3":V,"4":V,"5":V,"6":V,"7":V,"8":V,"9":V,token:function(O,I,W){if(W=="variable"&&O.peek()=="("&&(I.prevToken==";"||I.prevToken==null||I.prevToken=="}")&&K(O.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),z("text/x-squirrel",{name:"clike",keywords:d("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:E,blockKeywords:d("case catch class else for foreach if switch try while"),defKeywords:d("function local class"),typeFirstDefinitions:!0,atoms:d("true false null"),hooks:{"#":A},modeProps:{fold:["brace","include"]}});var U=null;function Z(O){return function(I,W){for(var he=!1,F,T=!1;!I.eol();){if(!he&&I.match('"')&&(O=="single"||I.match('""'))){T=!0;break}if(!he&&I.match("``")){U=Z(O),T=!0;break}F=I.next(),he=O=="single"&&!he&&F=="\\"}return T&&(W.tokenize=null),"string"}}z("text/x-ceylon",{name:"clike",keywords:d("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(O){var I=O.charAt(0);return I===I.toUpperCase()&&I!==I.toLowerCase()},blockKeywords:d("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:d("class dynamic function interface module object package value"),builtin:d("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:d("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(O){return O.eatWhile(/[\w\$_]/),"meta"},'"':function(O,I){return I.tokenize=Z(O.match('""')?"triple":"single"),I.tokenize(O,I)},"`":function(O,I){return!U||!O.match("`")?!1:(I.tokenize=U,U=null,I.tokenize(O,I))},"'":function(O){return O.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(O,I,W){if((W=="variable"||W=="type")&&I.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var ad=se((id,od)=>{(function(n){typeof id=="object"&&typeof od=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("diff",function(){var t={"+":"positive","-":"negative","@":"meta"};return{token:function(i){var s=i.string.search(/[\t ]+?$/);if(!i.sol()||s===0)return i.skipToEnd(),("error "+(t[i.string.charAt(0)]||"")).replace(/ $/,"");var l=t[i.peek()]||i.skipToEnd();return s===-1?i.skipToEnd():i.pos=s,l}}}),n.defineMIME("text/x-diff","diff")})});var ud=se((sd,ld)=>{(function(n){typeof sd=="object"&&typeof ld=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("fortran",function(){function t(g){for(var y={},m=0;m\/\:]/,d=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");function h(g,y){if(g.match(d))return"operator";var m=g.next();if(m=="!")return g.skipToEnd(),"comment";if(m=='"'||m=="'")return y.tokenize=p(m),y.tokenize(g,y);if(/[\[\]\(\),]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(c.test(m))return g.eatWhile(c),"operator";g.eatWhile(/[\w\$_]/);var v=g.current().toLowerCase();return i.hasOwnProperty(v)?"keyword":s.hasOwnProperty(v)||l.hasOwnProperty(v)?"builtin":"variable"}function p(g){return function(y,m){for(var v=!1,w,E=!1;(w=y.next())!=null;){if(w==g&&!v){E=!0;break}v=!v&&w=="\\"}return(E||!v)&&(m.tokenize=null),"string"}}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||h)(g,y);return m=="comment"||m=="meta",m}}}),n.defineMIME("text/x-fortran","fortran")})});var hd=se((cd,dd)=>{(function(n){typeof cd=="object"&&typeof dd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("go",function(t){var i=t.indentUnit,s={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},l={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},c=/[+\-*&^%:=<>!|\/]/,d;function h(w,E){var D=w.next();if(D=='"'||D=="'"||D=="`")return E.tokenize=p(D),E.tokenize(w,E);if(/[\d\.]/.test(D))return D=="."?w.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):D=="0"?w.match(/^[xX][0-9a-fA-F]+/)||w.match(/^0[0-7]+/):w.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(D))return d=D,null;if(D=="/"){if(w.eat("*"))return E.tokenize=g,g(w,E);if(w.eat("/"))return w.skipToEnd(),"comment"}if(c.test(D))return w.eatWhile(c),"operator";w.eatWhile(/[\w\$_\xa1-\uffff]/);var C=w.current();return s.propertyIsEnumerable(C)?((C=="case"||C=="default")&&(d="case"),"keyword"):l.propertyIsEnumerable(C)?"atom":"variable"}function p(w){return function(E,D){for(var C=!1,q,A=!1;(q=E.next())!=null;){if(q==w&&!C){A=!0;break}C=!C&&w!="`"&&q=="\\"}return(A||!(C||w=="`"))&&(D.tokenize=h),"string"}}function g(w,E){for(var D=!1,C;C=w.next();){if(C=="/"&&D){E.tokenize=h;break}D=C=="*"}return"comment"}function y(w,E,D,C,q){this.indented=w,this.column=E,this.type=D,this.align=C,this.prev=q}function m(w,E,D){return w.context=new y(w.indented,E,D,null,w.context)}function v(w){if(!w.context.prev)return;var E=w.context.type;return(E==")"||E=="]"||E=="}")&&(w.indented=w.context.indented),w.context=w.context.prev}return{startState:function(w){return{tokenize:null,context:new y((w||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(w,E){var D=E.context;if(w.sol()&&(D.align==null&&(D.align=!1),E.indented=w.indentation(),E.startOfLine=!0,D.type=="case"&&(D.type="}")),w.eatSpace())return null;d=null;var C=(E.tokenize||h)(w,E);return C=="comment"||(D.align==null&&(D.align=!0),d=="{"?m(E,w.column(),"}"):d=="["?m(E,w.column(),"]"):d=="("?m(E,w.column(),")"):d=="case"?D.type="case":(d=="}"&&D.type=="}"||d==D.type)&&v(E),E.startOfLine=!1),C},indent:function(w,E){if(w.tokenize!=h&&w.tokenize!=null)return n.Pass;var D=w.context,C=E&&E.charAt(0);if(D.type=="case"&&/^(?:case|default)\b/.test(E))return w.context.type="}",D.indented;var q=C==D.type;return D.align?D.column+(q?0:1):D.indented+(q?0:i)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),n.defineMIME("text/x-go","go")})});var md=se((fd,pd)=>{(function(n){typeof fd=="object"&&typeof pd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("haskell",function(t,i){function s(A,H,N){return H(N),N(A,H)}var l=/[a-z_]/,c=/[A-Z]/,d=/\d/,h=/[0-9A-Fa-f]/,p=/[0-7]/,g=/[a-z_A-Z0-9'\xa1-\uffff]/,y=/[-!#$%&*+.\/<=>?@\\^|~:]/,m=/[(),;[\]`{}]/,v=/[ \t\v\f]/;function w(A,H){if(A.eatWhile(v))return null;var N=A.next();if(m.test(N)){if(N=="{"&&A.eat("-")){var V="comment";return A.eat("#")&&(V="meta"),s(A,H,E(V,1))}return null}if(N=="'")return A.eat("\\"),A.next(),A.eat("'")?"string":"string error";if(N=='"')return s(A,H,D);if(c.test(N))return A.eatWhile(g),A.eat(".")?"qualifier":"variable-2";if(l.test(N))return A.eatWhile(g),"variable";if(d.test(N)){if(N=="0"){if(A.eat(/[xX]/))return A.eatWhile(h),"integer";if(A.eat(/[oO]/))return A.eatWhile(p),"number"}A.eatWhile(d);var V="number";return A.match(/^\.\d+/)&&(V="number"),A.eat(/[eE]/)&&(V="number",A.eat(/[-+]/),A.eatWhile(d)),V}if(N=="."&&A.eat("."))return"keyword";if(y.test(N)){if(N=="-"&&A.eat(/-/)&&(A.eatWhile(/-/),!A.eat(y)))return A.skipToEnd(),"comment";var V="variable";return N==":"&&(V="variable-2"),A.eatWhile(y),V}return"error"}function E(A,H){return H==0?w:function(N,V){for(var B=H;!N.eol();){var K=N.next();if(K=="{"&&N.eat("-"))++B;else if(K=="-"&&N.eat("}")&&(--B,B==0))return V(w),A}return V(E(A,B)),A}}function D(A,H){for(;!A.eol();){var N=A.next();if(N=='"')return H(w),"string";if(N=="\\"){if(A.eol()||A.eat(v))return H(C),"string";A.eat("&")||A.next()}}return H(w),"string error"}function C(A,H){return A.eat("\\")?s(A,H,D):(A.next(),H(w),"error")}var q=function(){var A={};function H(B){return function(){for(var K=0;K","@","~","=>"),H("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),H("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),H("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var N=i.overrideKeywords;if(N)for(var V in N)N.hasOwnProperty(V)&&(A[V]=N[V]);return A}();return{startState:function(){return{f:w}},copyState:function(A){return{f:A.f}},token:function(A,H){var N=H.f(A,function(B){H.f=B}),V=A.current();return q.hasOwnProperty(V)?q[V]:N},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),n.defineMIME("text/x-haskell","haskell")})});var ta=se((gd,vd)=>{(function(n){typeof gd=="object"&&typeof vd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};n.defineMode("xml",function(s,l){var c=s.indentUnit,d={},h=l.htmlMode?t:i;for(var p in h)d[p]=h[p];for(var p in l)d[p]=l[p];var g,y;function m(_,Y){function U(I){return Y.tokenize=I,I(_,Y)}var Z=_.next();if(Z=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?U(E("atom","]]>")):null:_.match("--")?U(E("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),U(D(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),Y.tokenize=E("meta","?>"),"meta"):(g=_.eat("/")?"closeTag":"openTag",Y.tokenize=v,"tag bracket");if(Z=="&"){var O;return _.eat("#")?_.eat("x")?O=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):O=_.eatWhile(/[\d]/)&&_.eat(";"):O=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),O?"atom":"error"}else return _.eatWhile(/[^&<]/),null}m.isInText=!0;function v(_,Y){var U=_.next();if(U==">"||U=="/"&&_.eat(">"))return Y.tokenize=m,g=U==">"?"endTag":"selfcloseTag","tag bracket";if(U=="=")return g="equals",null;if(U=="<"){Y.tokenize=m,Y.state=H,Y.tagName=Y.tagStart=null;var Z=Y.tokenize(_,Y);return Z?Z+" tag error":"tag error"}else return/[\'\"]/.test(U)?(Y.tokenize=w(U),Y.stringStartCol=_.column(),Y.tokenize(_,Y)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function w(_){var Y=function(U,Z){for(;!U.eol();)if(U.next()==_){Z.tokenize=v;break}return"string"};return Y.isInAttribute=!0,Y}function E(_,Y){return function(U,Z){for(;!U.eol();){if(U.match(Y)){Z.tokenize=m;break}U.next()}return _}}function D(_){return function(Y,U){for(var Z;(Z=Y.next())!=null;){if(Z=="<")return U.tokenize=D(_+1),U.tokenize(Y,U);if(Z==">")if(_==1){U.tokenize=m;break}else return U.tokenize=D(_-1),U.tokenize(Y,U)}return"meta"}}function C(_,Y,U){this.prev=_.context,this.tagName=Y,this.indent=_.indented,this.startOfLine=U,(d.doNotIndent.hasOwnProperty(Y)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function q(_){_.context&&(_.context=_.context.prev)}function A(_,Y){for(var U;;){if(!_.context)return;if(U=_.context.tagName,!d.contextGrabbers.hasOwnProperty(U)||!d.contextGrabbers[U].hasOwnProperty(Y))return;q(_)}}function H(_,Y,U){return _=="openTag"?(U.tagStart=Y.column(),N):_=="closeTag"?V:H}function N(_,Y,U){return _=="word"?(U.tagName=Y.current(),y="tag",ee):d.allowMissingTagName&&_=="endTag"?(y="tag bracket",ee(_,Y,U)):(y="error",N)}function V(_,Y,U){if(_=="word"){var Z=Y.current();return U.context&&U.context.tagName!=Z&&d.implicitlyClosed.hasOwnProperty(U.context.tagName)&&q(U),U.context&&U.context.tagName==Z||d.matchClosing===!1?(y="tag",B):(y="tag error",K)}else return d.allowMissingTagName&&_=="endTag"?(y="tag bracket",B(_,Y,U)):(y="error",K)}function B(_,Y,U){return _!="endTag"?(y="error",B):(q(U),H)}function K(_,Y,U){return y="error",B(_,Y,U)}function ee(_,Y,U){if(_=="word")return y="attribute",J;if(_=="endTag"||_=="selfcloseTag"){var Z=U.tagName,O=U.tagStart;return U.tagName=U.tagStart=null,_=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(Z)?A(U,Z):(A(U,Z),U.context=new C(U,Z,O==U.indented)),H}return y="error",ee}function J(_,Y,U){return _=="equals"?z:(d.allowMissing||(y="error"),ee(_,Y,U))}function z(_,Y,U){return _=="string"?Q:_=="word"&&d.allowUnquoted?(y="string",ee):(y="error",ee(_,Y,U))}function Q(_,Y,U){return _=="string"?Q:ee(_,Y,U)}return{startState:function(_){var Y={tokenize:m,state:H,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(Y.baseIndent=_),Y},token:function(_,Y){if(!Y.tagName&&_.sol()&&(Y.indented=_.indentation()),_.eatSpace())return null;g=null;var U=Y.tokenize(_,Y);return(U||g)&&U!="comment"&&(y=null,Y.state=Y.state(g||U,_,Y),y&&(U=y=="error"?U+" error":y)),U},indent:function(_,Y,U){var Z=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+c;if(Z&&Z.noIndent)return n.Pass;if(_.tokenize!=v&&_.tokenize!=m)return U?U.match(/^(\s*)/)[0].length:0;if(_.tagName)return d.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+c*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/$/,blockCommentStart:"",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(_){_.state==z&&(_.state=ee)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var Y=[],U=_.context;U;U=U.prev)U.tagName&&Y.push(U.tagName);return Y.reverse()}}}),n.defineMIME("text/xml","xml"),n.defineMIME("application/xml","xml"),n.mimeModes.hasOwnProperty("text/html")||n.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var Xs=se((bd,yd)=>{(function(n){typeof bd=="object"&&typeof yd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("javascript",function(t,i){var s=t.indentUnit,l=i.statementIndent,c=i.jsonld,d=i.json||c,h=i.typescript,p=i.wordCharacters||/[\w$\xa1-\uffff]/,g=function(){function L(_t){return{type:_t,style:"keyword"}}var R=L("keyword a"),re=L("keyword b"),j=L("keyword c"),de=L("keyword d"),He=L("operator"),Ze={type:"atom",style:"atom"};return{if:L("if"),while:R,with:R,else:re,do:re,try:re,finally:re,return:de,break:de,continue:de,new:L("new"),delete:j,void:j,throw:j,debugger:L("debugger"),var:L("var"),const:L("var"),let:L("var"),function:L("function"),catch:L("catch"),for:L("for"),switch:L("switch"),case:L("case"),default:L("default"),in:He,typeof:He,instanceof:He,true:Ze,false:Ze,null:Ze,undefined:Ze,NaN:Ze,Infinity:Ze,this:L("this"),class:L("class"),super:L("atom"),yield:j,export:L("export"),import:L("import"),extends:j,await:j}}(),y=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(L){for(var R=!1,re,j=!1;(re=L.next())!=null;){if(!R){if(re=="/"&&!j)return;re=="["?j=!0:j&&re=="]"&&(j=!1)}R=!R&&re=="\\"}}var w,E;function D(L,R,re){return w=L,E=re,R}function C(L,R){var re=L.next();if(re=='"'||re=="'")return R.tokenize=q(re),R.tokenize(L,R);if(re=="."&&L.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return D("number","number");if(re=="."&&L.match(".."))return D("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(re))return D(re);if(re=="="&&L.eat(">"))return D("=>","operator");if(re=="0"&&L.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return D("number","number");if(/\d/.test(re))return L.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),D("number","number");if(re=="/")return L.eat("*")?(R.tokenize=A,A(L,R)):L.eat("/")?(L.skipToEnd(),D("comment","comment")):Ke(L,R,1)?(v(L),L.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),D("regexp","string-2")):(L.eat("="),D("operator","operator",L.current()));if(re=="`")return R.tokenize=H,H(L,R);if(re=="#"&&L.peek()=="!")return L.skipToEnd(),D("meta","meta");if(re=="#"&&L.eatWhile(p))return D("variable","property");if(re=="<"&&L.match("!--")||re=="-"&&L.match("->")&&!/\S/.test(L.string.slice(0,L.start)))return L.skipToEnd(),D("comment","comment");if(y.test(re))return(re!=">"||!R.lexical||R.lexical.type!=">")&&(L.eat("=")?(re=="!"||re=="=")&&L.eat("="):/[<>*+\-|&?]/.test(re)&&(L.eat(re),re==">"&&L.eat(re))),re=="?"&&L.eat(".")?D("."):D("operator","operator",L.current());if(p.test(re)){L.eatWhile(p);var j=L.current();if(R.lastType!="."){if(g.propertyIsEnumerable(j)){var de=g[j];return D(de.type,de.style,j)}if(j=="async"&&L.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return D("async","keyword",j)}return D("variable","variable",j)}}function q(L){return function(R,re){var j=!1,de;if(c&&R.peek()=="@"&&R.match(m))return re.tokenize=C,D("jsonld-keyword","meta");for(;(de=R.next())!=null&&!(de==L&&!j);)j=!j&&de=="\\";return j||(re.tokenize=C),D("string","string")}}function A(L,R){for(var re=!1,j;j=L.next();){if(j=="/"&&re){R.tokenize=C;break}re=j=="*"}return D("comment","comment")}function H(L,R){for(var re=!1,j;(j=L.next())!=null;){if(!re&&(j=="`"||j=="$"&&L.eat("{"))){R.tokenize=C;break}re=!re&&j=="\\"}return D("quasi","string-2",L.current())}var N="([{}])";function V(L,R){R.fatArrowAt&&(R.fatArrowAt=null);var re=L.string.indexOf("=>",L.start);if(re<0)return;if(h){var j=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(L.string.slice(L.start,re));j&&(re=j.index)}for(var de=0,He=!1,Ze=re-1;Ze>=0;--Ze){var _t=L.string.charAt(Ze),Yt=N.indexOf(_t);if(Yt>=0&&Yt<3){if(!de){++Ze;break}if(--de==0){_t=="("&&(He=!0);break}}else if(Yt>=3&&Yt<6)++de;else if(p.test(_t))He=!0;else if(/["'\/`]/.test(_t))for(;;--Ze){if(Ze==0)return;var So=L.string.charAt(Ze-1);if(So==_t&&L.string.charAt(Ze-2)!="\\"){Ze--;break}}else if(He&&!de){++Ze;break}}He&&!de&&(R.fatArrowAt=Ze)}var B={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function K(L,R,re,j,de,He){this.indented=L,this.column=R,this.type=re,this.prev=de,this.info=He,j!=null&&(this.align=j)}function ee(L,R){for(var re=L.localVars;re;re=re.next)if(re.name==R)return!0;for(var j=L.context;j;j=j.prev)for(var re=j.vars;re;re=re.next)if(re.name==R)return!0}function J(L,R,re,j,de){var He=L.cc;for(z.state=L,z.stream=de,z.marked=null,z.cc=He,z.style=R,L.lexical.hasOwnProperty("align")||(L.lexical.align=!0);;){var Ze=He.length?He.pop():d?Se:Ue;if(Ze(re,j)){for(;He.length&&He[He.length-1].lex;)He.pop()();return z.marked?z.marked:re=="variable"&&ee(L,j)?"variable-2":R}}}var z={state:null,column:null,marked:null,cc:null};function Q(){for(var L=arguments.length-1;L>=0;L--)z.cc.push(arguments[L])}function _(){return Q.apply(null,arguments),!0}function Y(L,R){for(var re=R;re;re=re.next)if(re.name==L)return!0;return!1}function U(L){var R=z.state;if(z.marked="def",R.context){if(R.lexical.info=="var"&&R.context&&R.context.block){var re=Z(L,R.context);if(re!=null){R.context=re;return}}else if(!Y(L,R.localVars)){R.localVars=new W(L,R.localVars);return}}i.globalVars&&!Y(L,R.globalVars)&&(R.globalVars=new W(L,R.globalVars))}function Z(L,R){if(R)if(R.block){var re=Z(L,R.prev);return re?re==R.prev?R:new I(re,R.vars,!0):null}else return Y(L,R.vars)?R:new I(R.prev,new W(L,R.vars),!1);else return null}function O(L){return L=="public"||L=="private"||L=="protected"||L=="abstract"||L=="readonly"}function I(L,R,re){this.prev=L,this.vars=R,this.block=re}function W(L,R){this.name=L,this.next=R}var he=new W("this",new W("arguments",null));function F(){z.state.context=new I(z.state.context,z.state.localVars,!1),z.state.localVars=he}function T(){z.state.context=new I(z.state.context,z.state.localVars,!0),z.state.localVars=null}function ce(){z.state.localVars=z.state.context.vars,z.state.context=z.state.context.prev}ce.lex=!0;function ue(L,R){var re=function(){var j=z.state,de=j.indented;if(j.lexical.type=="stat")de=j.lexical.indented;else for(var He=j.lexical;He&&He.type==")"&&He.align;He=He.prev)de=He.indented;j.lexical=new K(de,z.stream.column(),L,null,j.lexical,R)};return re.lex=!0,re}function ae(){var L=z.state;L.lexical.prev&&(L.lexical.type==")"&&(L.indented=L.lexical.indented),L.lexical=L.lexical.prev)}ae.lex=!0;function Te(L){function R(re){return re==L?_():L==";"||re=="}"||re==")"||re=="]"?Q():_(R)}return R}function Ue(L,R){return L=="var"?_(ue("vardef",R),fr,Te(";"),ae):L=="keyword a"?_(ue("form"),Ge,Ue,ae):L=="keyword b"?_(ue("form"),Ue,ae):L=="keyword d"?z.stream.match(/^\s*$/,!1)?_():_(ue("stat"),Tt,Te(";"),ae):L=="debugger"?_(Te(";")):L=="{"?_(ue("}"),T,hn,ae,ce):L==";"?_():L=="if"?(z.state.lexical.info=="else"&&z.state.cc[z.state.cc.length-1]==ae&&z.state.cc.pop()(),_(ue("form"),Ge,Ue,ae,xo)):L=="function"?_(An):L=="for"?_(ue("form"),Mr,Ue,ae):L=="class"||h&&R=="interface"?(z.marked="keyword",_(ue("form",L=="class"?L:R),Hn,ae)):L=="variable"?h&&R=="declare"?(z.marked="keyword",_(Ue)):h&&(R=="module"||R=="enum"||R=="type")&&z.stream.match(/^\s*\w/,!1)?(z.marked="keyword",R=="enum"?_(Tn):R=="type"?_(qr,Te("operator"),Pe,Te(";")):_(ue("form"),Bt,Te("{"),ue("}"),hn,ae,ae)):h&&R=="namespace"?(z.marked="keyword",_(ue("form"),Se,Ue,ae)):h&&R=="abstract"?(z.marked="keyword",_(Ue)):_(ue("stat"),Re):L=="switch"?_(ue("form"),Ge,Te("{"),ue("}","switch"),T,hn,ae,ae,ce):L=="case"?_(Se,Te(":")):L=="default"?_(Te(":")):L=="catch"?_(ue("form"),F,we,Ue,ae,ce):L=="export"?_(ue("stat"),bi,ae):L=="import"?_(ue("stat"),Qa,ae):L=="async"?_(Ue):R=="@"?_(Se,Ue):Q(ue("stat"),Se,Te(";"),ae)}function we(L){if(L=="(")return _(Bn,Te(")"))}function Se(L,R){return nt(L,R,!1)}function Ve(L,R){return nt(L,R,!0)}function Ge(L){return L!="("?Q():_(ue(")"),Tt,Te(")"),ae)}function nt(L,R,re){if(z.state.fatArrowAt==z.stream.start){var j=re?Fe:jt;if(L=="(")return _(F,ue(")"),Ae(Bn,")"),ae,Te("=>"),j,ce);if(L=="variable")return Q(F,Bt,Te("=>"),j,ce)}var de=re?tt:ke;return B.hasOwnProperty(L)?_(de):L=="function"?_(An,de):L=="class"||h&&R=="interface"?(z.marked="keyword",_(ue("form"),vi,ae)):L=="keyword c"||L=="async"?_(re?Ve:Se):L=="("?_(ue(")"),Tt,Te(")"),ae,de):L=="operator"||L=="spread"?_(re?Ve:Se):L=="["?_(ue("]"),ye,ae,de):L=="{"?Ye(Ce,"}",null,de):L=="quasi"?Q(ft,de):L=="new"?_(X(re)):L=="import"?_(Se):_()}function Tt(L){return L.match(/[;\}\)\],]/)?Q():Q(Se)}function ke(L,R){return L==","?_(Tt):tt(L,R,!1)}function tt(L,R,re){var j=re==!1?ke:tt,de=re==!1?Se:Ve;if(L=="=>")return _(F,re?Fe:jt,ce);if(L=="operator")return/\+\+|--/.test(R)||h&&R=="!"?_(j):h&&R=="<"&&z.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(ue(">"),Ae(Pe,">"),ae,j):R=="?"?_(Se,Te(":"),de):_(de);if(L=="quasi")return Q(ft,j);if(L==";")return;if(L=="(")return Ye(Ve,")","call",j);if(L==".")return _(kt,j);if(L=="[")return _(ue("]"),Tt,Te("]"),ae,j);if(h&&R=="as")return z.marked="keyword",_(Pe,j);if(L=="regexp")return z.state.lastType=z.marked="operator",z.stream.backUp(z.stream.pos-z.stream.start-1),_(de)}function ft(L,R){return L!="quasi"?Q():R.slice(R.length-2)!="${"?_(ft):_(Se,pt)}function pt(L){if(L=="}")return z.marked="string-2",z.state.tokenize=H,_(ft)}function jt(L){return V(z.stream,z.state),Q(L=="{"?Ue:Se)}function Fe(L){return V(z.stream,z.state),Q(L=="{"?Ue:Ve)}function X(L){return function(R){return R=="."?_(L?te:oe):R=="variable"&&h?_(Qn,L?tt:ke):Q(L?Ve:Se)}}function oe(L,R){if(R=="target")return z.marked="keyword",_(ke)}function te(L,R){if(R=="target")return z.marked="keyword",_(tt)}function Re(L){return L==":"?_(ae,Ue):Q(ke,Te(";"),ae)}function kt(L){if(L=="variable")return z.marked="property",_()}function Ce(L,R){if(L=="async")return z.marked="property",_(Ce);if(L=="variable"||z.style=="keyword"){if(z.marked="property",R=="get"||R=="set")return _(Le);var re;return h&&z.state.fatArrowAt==z.stream.start&&(re=z.stream.match(/^\s*:\s*/,!1))&&(z.state.fatArrowAt=z.stream.pos+re[0].length),_(be)}else{if(L=="number"||L=="string")return z.marked=c?"property":z.style+" property",_(be);if(L=="jsonld-keyword")return _(be);if(h&&O(R))return z.marked="keyword",_(Ce);if(L=="[")return _(Se,Ot,Te("]"),be);if(L=="spread")return _(Ve,be);if(R=="*")return z.marked="keyword",_(Ce);if(L==":")return Q(be)}}function Le(L){return L!="variable"?Q(be):(z.marked="property",_(An))}function be(L){if(L==":")return _(Ve);if(L=="(")return Q(An)}function Ae(L,R,re){function j(de,He){if(re?re.indexOf(de)>-1:de==","){var Ze=z.state.lexical;return Ze.info=="call"&&(Ze.pos=(Ze.pos||0)+1),_(function(_t,Yt){return _t==R||Yt==R?Q():Q(L)},j)}return de==R||He==R?_():re&&re.indexOf(";")>-1?Q(L):_(Te(R))}return function(de,He){return de==R||He==R?_():Q(L,j)}}function Ye(L,R,re){for(var j=3;j"),Pe)}function ct(L){if(L=="=>")return _(Pe)}function at(L,R){if(L=="variable"||z.style=="keyword")return z.marked="property",_(at);if(R=="?"||L=="number"||L=="string")return _(at);if(L==":")return _(Pe);if(L=="[")return _(Te("variable"),yo,Te("]"),at);if(L=="(")return Q(Jn,at)}function Ir(L,R){return L=="variable"&&z.stream.match(/^\s*[?:]/,!1)||R=="?"?_(Ir):L==":"?_(Pe):L=="spread"?_(Ir):Q(Pe)}function bt(L,R){if(R=="<")return _(ue(">"),Ae(Pe,">"),ae,bt);if(R=="|"||L=="."||R=="&")return _(Pe);if(L=="[")return _(Pe,Te("]"),bt);if(R=="extends"||R=="implements")return z.marked="keyword",_(Pe);if(R=="?")return _(Pe,Te(":"),Pe)}function Qn(L,R){if(R=="<")return _(ue(">"),Ae(Pe,">"),ae,bt)}function xt(){return Q(Pe,wo)}function wo(L,R){if(R=="=")return _(Pe)}function fr(L,R){return R=="enum"?(z.marked="keyword",_(Tn)):Q(Bt,Ot,En,gi)}function Bt(L,R){if(h&&O(R))return z.marked="keyword",_(Bt);if(L=="variable")return U(R),_();if(L=="spread")return _(Bt);if(L=="[")return Ye(ko,"]");if(L=="{")return Ye(Fr,"}")}function Fr(L,R){return L=="variable"&&!z.stream.match(/^\s*:/,!1)?(U(R),_(En)):(L=="variable"&&(z.marked="property"),L=="spread"?_(Bt):L=="}"?Q():L=="["?_(Se,Te("]"),Te(":"),Fr):_(Te(":"),Bt,En))}function ko(){return Q(Bt,En)}function En(L,R){if(R=="=")return _(Ve)}function gi(L){if(L==",")return _(fr)}function xo(L,R){if(L=="keyword b"&&R=="else")return _(ue("form","else"),Ue,ae)}function Mr(L,R){if(R=="await")return _(Mr);if(L=="(")return _(ue(")"),Za,ae)}function Za(L){return L=="var"?_(fr,Dn):L=="variable"?_(Dn):Q(Dn)}function Dn(L,R){return L==")"?_():L==";"?_(Dn):R=="in"||R=="of"?(z.marked="keyword",_(Se,Dn)):Q(Se,Dn)}function An(L,R){if(R=="*")return z.marked="keyword",_(An);if(L=="variable")return U(R),_(An);if(L=="(")return _(F,ue(")"),Ae(Bn,")"),ae,Ee,Ue,ce);if(h&&R=="<")return _(ue(">"),Ae(xt,">"),ae,An)}function Jn(L,R){if(R=="*")return z.marked="keyword",_(Jn);if(L=="variable")return U(R),_(Jn);if(L=="(")return _(F,ue(")"),Ae(Bn,")"),ae,Ee,ce);if(h&&R=="<")return _(ue(">"),Ae(xt,">"),ae,Jn)}function qr(L,R){if(L=="keyword"||L=="variable")return z.marked="type",_(qr);if(R=="<")return _(ue(">"),Ae(xt,">"),ae)}function Bn(L,R){return R=="@"&&_(Se,Bn),L=="spread"?_(Bn):h&&O(R)?(z.marked="keyword",_(Bn)):h&&L=="this"?_(Ot,En):Q(Bt,Ot,En)}function vi(L,R){return L=="variable"?Hn(L,R):zr(L,R)}function Hn(L,R){if(L=="variable")return U(R),_(zr)}function zr(L,R){if(R=="<")return _(ue(">"),Ae(xt,">"),ae,zr);if(R=="extends"||R=="implements"||h&&L==",")return R=="implements"&&(z.marked="keyword"),_(h?Pe:Se,zr);if(L=="{")return _(ue("}"),vn,ae)}function vn(L,R){if(L=="async"||L=="variable"&&(R=="static"||R=="get"||R=="set"||h&&O(R))&&z.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return z.marked="keyword",_(vn);if(L=="variable"||z.style=="keyword")return z.marked="property",_(Un,vn);if(L=="number"||L=="string")return _(Un,vn);if(L=="[")return _(Se,Ot,Te("]"),Un,vn);if(R=="*")return z.marked="keyword",_(vn);if(h&&L=="(")return Q(Jn,vn);if(L==";"||L==",")return _(vn);if(L=="}")return _();if(R=="@")return _(Se,vn)}function Un(L,R){if(R=="?")return _(Un);if(L==":")return _(Pe,En);if(R=="=")return _(Ve);var re=z.state.lexical.prev,j=re&&re.info=="interface";return Q(j?Jn:An)}function bi(L,R){return R=="*"?(z.marked="keyword",_(st,Te(";"))):R=="default"?(z.marked="keyword",_(Se,Te(";"))):L=="{"?_(Ae(Wn,"}"),st,Te(";")):Q(Ue)}function Wn(L,R){if(R=="as")return z.marked="keyword",_(Te("variable"));if(L=="variable")return Q(Ve,Wn)}function Qa(L){return L=="string"?_():L=="("?Q(Se):Q(fn,Or,st)}function fn(L,R){return L=="{"?Ye(fn,"}"):(L=="variable"&&U(R),R=="*"&&(z.marked="keyword"),_(_o))}function Or(L){if(L==",")return _(fn,Or)}function _o(L,R){if(R=="as")return z.marked="keyword",_(fn)}function st(L,R){if(R=="from")return z.marked="keyword",_(Se)}function ye(L){return L=="]"?_():Q(Ae(Ve,"]"))}function Tn(){return Q(ue("form"),Bt,Te("{"),ue("}"),Ae(yi,"}"),ae,ae)}function yi(){return Q(Bt,En)}function pn(L,R){return L.lastType=="operator"||L.lastType==","||y.test(R.charAt(0))||/[,.]/.test(R.charAt(0))}function Ke(L,R,re){return R.tokenize==C&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(R.lastType)||R.lastType=="quasi"&&/\{\s*$/.test(L.string.slice(0,L.pos-(re||0)))}return{startState:function(L){var R={tokenize:C,lastType:"sof",cc:[],lexical:new K((L||0)-s,0,"block",!1),localVars:i.localVars,context:i.localVars&&new I(null,null,!1),indented:L||0};return i.globalVars&&typeof i.globalVars=="object"&&(R.globalVars=i.globalVars),R},token:function(L,R){if(L.sol()&&(R.lexical.hasOwnProperty("align")||(R.lexical.align=!1),R.indented=L.indentation(),V(L,R)),R.tokenize!=A&&L.eatSpace())return null;var re=R.tokenize(L,R);return w=="comment"?re:(R.lastType=w=="operator"&&(E=="++"||E=="--")?"incdec":w,J(R,re,w,E,L))},indent:function(L,R){if(L.tokenize==A)return n.Pass;if(L.tokenize!=C)return 0;var re=R&&R.charAt(0),j=L.lexical,de;if(!/^\s*else\b/.test(R))for(var He=L.cc.length-1;He>=0;--He){var Ze=L.cc[He];if(Ze==ae)j=j.prev;else if(Ze!=xo)break}for(;(j.type=="stat"||j.type=="form")&&(re=="}"||(de=L.cc[L.cc.length-1])&&(de==ke||de==tt)&&!/^[,\.=+\-*:?[\(]/.test(R));)j=j.prev;l&&j.type==")"&&j.prev.type=="stat"&&(j=j.prev);var _t=j.type,Yt=re==_t;return _t=="vardef"?j.indented+(L.lastType=="operator"||L.lastType==","?j.info.length+1:0):_t=="form"&&re=="{"?j.indented:_t=="form"?j.indented+s:_t=="stat"?j.indented+(pn(L,R)?l||s:0):j.info=="switch"&&!Yt&&i.doubleIndentSwitch!=!1?j.indented+(/^(?:case|default)\b/.test(R)?s:2*s):j.align?j.column+(Yt?0:1):j.indented+(Yt?0:s)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:c,jsonMode:d,expressionAllowed:Ke,skipExpression:function(L){var R=L.cc[L.cc.length-1];(R==Se||R==Ve)&&L.cc.pop()}}}),n.registerHelper("wordChars","javascript",/[\w$]/),n.defineMIME("text/javascript","javascript"),n.defineMIME("text/ecmascript","javascript"),n.defineMIME("application/javascript","javascript"),n.defineMIME("application/x-javascript","javascript"),n.defineMIME("application/ecmascript","javascript"),n.defineMIME("application/json",{name:"javascript",json:!0}),n.defineMIME("application/x-json",{name:"javascript",json:!0}),n.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),n.defineMIME("text/typescript",{name:"javascript",typescript:!0}),n.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Zs=se((wd,kd)=>{(function(n){typeof wd=="object"&&typeof kd=="object"?n(Qe(),ta(),Xs(),Vs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],n):n(CodeMirror)})(function(n){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function i(g,y,m){var v=g.current(),w=v.search(y);return w>-1?g.backUp(v.length-w):v.match(/<\/?$/)&&(g.backUp(v.length),g.match(y,!1)||g.match(v)),m}var s={};function l(g){var y=s[g];return y||(s[g]=new RegExp("\\s+"+g+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function c(g,y){var m=g.match(l(y));return m?/^\s*(.*?)\s*$/.exec(m[2])[1]:""}function d(g,y){return new RegExp((y?"^":"")+"","i")}function h(g,y){for(var m in g)for(var v=y[m]||(y[m]=[]),w=g[m],E=w.length-1;E>=0;E--)v.unshift(w[E])}function p(g,y){for(var m=0;m=0;D--)v.script.unshift(["type",E[D].matches,E[D].mode]);function C(q,A){var H=m.token(q,A.htmlState),N=/\btag\b/.test(H),V;if(N&&!/[<>\s\/]/.test(q.current())&&(V=A.htmlState.tagName&&A.htmlState.tagName.toLowerCase())&&v.hasOwnProperty(V))A.inTag=V+" ";else if(A.inTag&&N&&/>$/.test(q.current())){var B=/^([\S]+) (.*)/.exec(A.inTag);A.inTag=null;var K=q.current()==">"&&p(v[B[1]],B[2]),ee=n.getMode(g,K),J=d(B[1],!0),z=d(B[1],!1);A.token=function(Q,_){return Q.match(J,!1)?(_.token=C,_.localState=_.localMode=null,null):i(Q,z,_.localMode.token(Q,_.localState))},A.localMode=ee,A.localState=n.startState(ee,m.indent(A.htmlState,"",""))}else A.inTag&&(A.inTag+=q.current(),q.eol()&&(A.inTag+=" "));return H}return{startState:function(){var q=n.startState(m);return{token:C,inTag:null,localMode:null,localState:null,htmlState:q}},copyState:function(q){var A;return q.localState&&(A=n.copyState(q.localMode,q.localState)),{token:q.token,inTag:q.inTag,localMode:q.localMode,localState:A,htmlState:n.copyState(m,q.htmlState)}},token:function(q,A){return A.token(q,A)},indent:function(q,A,H){return!q.localMode||/^\s*<\//.test(A)?m.indent(q.htmlState,A,H):q.localMode.indent?q.localMode.indent(q.localState,A,H):n.Pass},innerMode:function(q){return{state:q.localState||q.htmlState,mode:q.localMode||m}}}},"xml","javascript","css"),n.defineMIME("text/html","htmlmixed")})});var Sd=se((xd,_d)=>{(function(n){typeof xd=="object"&&typeof _d=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("julia",function(t,i){function s(I,W){return typeof W=="undefined"&&(W="\\b"),new RegExp("^(("+I.join(")|(")+"))"+W)}var l="\\\\[0-7]{1,3}",c="\\\\x[A-Fa-f0-9]{1,2}",d=`\\\\[abefnrtv0%?'"\\\\]`,h="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",p=i.operators||s(["[<>]:","[<>=]=","<<=?",">>>?=?","=>","->","\\/\\/","[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),g=i.delimiters||/^[;,()[\]{}]/,y=i.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,m=s([l,c,d,h],"'"),v=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],w=["end","else","elseif","catch","finally"],E=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],D=["true","false","nothing","NaN","Inf"];n.registerHelper("hintWords","julia",E.concat(D));var C=s(v),q=s(w),A=s(E),H=s(D),N=/^@[_A-Za-z][\w]*/,V=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,B=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;function K(I){return I.nestedArrays>0}function ee(I){return I.nestedGenerators>0}function J(I,W){return typeof W=="undefined"&&(W=0),I.scopes.length<=W?null:I.scopes[I.scopes.length-(W+1)]}function z(I,W){if(I.match(/^#=/,!1))return W.tokenize=Y,W.tokenize(I,W);var he=W.leavingExpr;if(I.sol()&&(he=!1),W.leavingExpr=!1,he&&I.match(/^'+/))return"operator";if(I.match(/\.{4,}/))return"error";if(I.match(/\.{1,3}/))return"operator";if(I.eatSpace())return null;var F=I.peek();if(F==="#")return I.skipToEnd(),"comment";if(F==="["&&(W.scopes.push("["),W.nestedArrays++),F==="("&&(W.scopes.push("("),W.nestedGenerators++),K(W)&&F==="]"){for(;W.scopes.length&&J(W)!=="[";)W.scopes.pop();W.scopes.pop(),W.nestedArrays--,W.leavingExpr=!0}if(ee(W)&&F===")"){for(;W.scopes.length&&J(W)!=="(";)W.scopes.pop();W.scopes.pop(),W.nestedGenerators--,W.leavingExpr=!0}if(K(W)){if(W.lastToken=="end"&&I.match(/^:/))return"operator";if(I.match(/^end/))return"number"}var T;if((T=I.match(C,!1))&&W.scopes.push(T[0]),I.match(q,!1)&&W.scopes.pop(),I.match(/^::(?![:\$])/))return W.tokenize=_,W.tokenize(I,W);if(!he&&I.match(V)||I.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/))return"builtin";if(I.match(p))return"operator";if(I.match(/^\.?\d/,!1)){var ce=RegExp(/^im\b/),ue=!1;if(I.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(ue=!0),I.match(/^0x[0-9a-f_]+/i)&&(ue=!0),I.match(/^0b[01_]+/i)&&(ue=!0),I.match(/^0o[0-7_]+/i)&&(ue=!0),I.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(ue=!0),I.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(ue=!0),ue)return I.match(ce),W.leavingExpr=!0,"number"}if(I.match(/^'/))return W.tokenize=U,W.tokenize(I,W);if(I.match(B))return W.tokenize=Z(I.current()),W.tokenize(I,W);if(I.match(N))return"meta";if(I.match(g))return null;if(I.match(A))return"keyword";if(I.match(H))return"builtin";var ae=W.isDefinition||W.lastToken=="function"||W.lastToken=="macro"||W.lastToken=="type"||W.lastToken=="struct"||W.lastToken=="immutable";return I.match(y)?ae?I.peek()==="."?(W.isDefinition=!0,"variable"):(W.isDefinition=!1,"def"):I.match(/^({[^}]*})*\(/,!1)?(W.tokenize=Q,W.tokenize(I,W)):(W.leavingExpr=!0,"variable"):(I.next(),"error")}function Q(I,W){var he=I.match(/^(\(\s*)/);if(he&&(W.firstParenPos<0&&(W.firstParenPos=W.scopes.length),W.scopes.push("("),W.charsAdvanced+=he[1].length),J(W)=="("&&I.match(/^\)/)&&(W.scopes.pop(),W.charsAdvanced+=1,W.scopes.length<=W.firstParenPos)){var F=I.match(/^(\s*where\s+[^\s=]+)*\s*?=(?!=)/,!1);return I.backUp(W.charsAdvanced),W.firstParenPos=-1,W.charsAdvanced=0,W.tokenize=z,F?"def":"builtin"}if(I.match(/^$/g,!1)){for(I.backUp(W.charsAdvanced);W.scopes.length>W.firstParenPos;)W.scopes.pop();return W.firstParenPos=-1,W.charsAdvanced=0,W.tokenize=z,"builtin"}return W.charsAdvanced+=I.match(/^([^()]*)/)[1].length,W.tokenize(I,W)}function _(I,W){return I.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),I.match(/^{/)?W.nestedParameters++:I.match(/^}/)&&W.nestedParameters>0&&W.nestedParameters--,W.nestedParameters>0?I.match(/.*?(?={|})/)||I.next():W.nestedParameters==0&&(W.tokenize=z),"builtin"}function Y(I,W){return I.match(/^#=/)&&W.nestedComments++,I.match(/.*?(?=(#=|=#))/)||I.skipToEnd(),I.match(/^=#/)&&(W.nestedComments--,W.nestedComments==0&&(W.tokenize=z)),"comment"}function U(I,W){var he=!1,F;if(I.match(m))he=!0;else if(F=I.match(/\\u([a-f0-9]{1,4})(?=')/i)){var T=parseInt(F[1],16);(T<=55295||T>=57344)&&(he=!0,I.next())}else if(F=I.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var T=parseInt(F[1],16);T<=1114111&&(he=!0,I.next())}return he?(W.leavingExpr=!0,W.tokenize=z,"string"):(I.match(/^[^']+(?=')/)||I.skipToEnd(),I.match(/^'/)&&(W.tokenize=z),"error")}function Z(I){I.substr(-3)==='"""'?I='"""':I.substr(-1)==='"'&&(I='"');function W(he,F){if(he.eat("\\"))he.next();else{if(he.match(I))return F.tokenize=z,F.leavingExpr=!0,"string";he.eat(/[`"]/)}return he.eatWhile(/[^\\`"]/),"string"}return W}var O={startState:function(){return{tokenize:z,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,charsAdvanced:0,firstParenPos:-1}},token:function(I,W){var he=W.tokenize(I,W),F=I.current();return F&&he&&(W.lastToken=F),he},indent:function(I,W){var he=0;return(W==="]"||W===")"||/^end\b/.test(W)||/^else/.test(W)||/^catch\b/.test(W)||/^elseif\b/.test(W)||/^finally/.test(W))&&(he=-1),(I.scopes.length+he)*t.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"};return O}),n.defineMIME("text/x-julia","julia")})});var Dd=se((Cd,Ed)=>{(function(n){typeof Cd=="object"&&typeof Ed=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("lua",function(t,i){var s=t.indentUnit;function l(C){return new RegExp("^(?:"+C.join("|")+")","i")}function c(C){return new RegExp("^(?:"+C.join("|")+")$","i")}var d=c(i.specials||[]),h=c(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),p=c(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),g=c(["function","if","repeat","do","\\(","{"]),y=c(["end","until","\\)","}"]),m=l(["end","until","\\)","}","else","elseif"]);function v(C){for(var q=0;C.eat("=");)++q;return C.eat("["),q}function w(C,q){var A=C.next();return A=="-"&&C.eat("-")?C.eat("[")&&C.eat("[")?(q.cur=E(v(C),"comment"))(C,q):(C.skipToEnd(),"comment"):A=='"'||A=="'"?(q.cur=D(A))(C,q):A=="["&&/[\[=]/.test(C.peek())?(q.cur=E(v(C),"string"))(C,q):/\d/.test(A)?(C.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(A)?(C.eatWhile(/[\w\\\-_.]/),"variable"):null}function E(C,q){return function(A,H){for(var N=null,V;(V=A.next())!=null;)if(N==null)V=="]"&&(N=0);else if(V=="=")++N;else if(V=="]"&&N==C){H.cur=w;break}else N=null;return q}}function D(C){return function(q,A){for(var H=!1,N;(N=q.next())!=null&&!(N==C&&!H);)H=!H&&N=="\\";return H||(A.cur=w),"string"}}return{startState:function(C){return{basecol:C||0,indentDepth:0,cur:w}},token:function(C,q){if(C.eatSpace())return null;var A=q.cur(C,q),H=C.current();return A=="variable"&&(p.test(H)?A="keyword":h.test(H)?A="builtin":d.test(H)&&(A="variable-2")),A!="comment"&&A!="string"&&(g.test(H)?++q.indentDepth:y.test(H)&&--q.indentDepth),A},indent:function(C,q){var A=m.test(q);return C.basecol+s*(C.indentDepth-(A?1:0))},lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),n.defineMIME("text/x-lua","lua")})});var Ld=se((Ad,Td)=>{(function(n){typeof Ad=="object"&&typeof Td=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&s.substring(d+1,s.length);if(h)return n.findModeByExtension(h)},n.findModeByName=function(s){s=s.toLowerCase();for(var l=0;l{(function(n){typeof Id=="object"&&typeof Fd=="object"?n(Qe(),ta(),Ld()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("markdown",function(t,i){var s=n.getMode(t,"text/html"),l=s.name=="null";function c(F){if(n.findModeByName){var T=n.findModeByName(F);T&&(F=T.mime||T.mimes[0])}var ce=n.getMode(t,F);return ce.name=="null"?null:ce}i.highlightFormatting===void 0&&(i.highlightFormatting=!1),i.maxBlockquoteDepth===void 0&&(i.maxBlockquoteDepth=0),i.taskLists===void 0&&(i.taskLists=!1),i.strikethrough===void 0&&(i.strikethrough=!1),i.emoji===void 0&&(i.emoji=!1),i.fencedCodeBlockHighlighting===void 0&&(i.fencedCodeBlockHighlighting=!0),i.fencedCodeBlockDefaultMode===void 0&&(i.fencedCodeBlockDefaultMode="text/plain"),i.xml===void 0&&(i.xml=!0),i.tokenTypeOverrides===void 0&&(i.tokenTypeOverrides={});var d={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var h in d)d.hasOwnProperty(h)&&i.tokenTypeOverrides[h]&&(d[h]=i.tokenTypeOverrides[h]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,g=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,m=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,v=/^ {0,3}(?:\={1,}|-{2,})\s*$/,w=/^[^#!\[\]*_\\<>` "'(~:]+/,E=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,D=/^\s*\[[^\]]+?\]:.*$/,C=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,q=" ";function A(F,T,ce){return T.f=T.inline=ce,ce(F,T)}function H(F,T,ce){return T.f=T.block=ce,ce(F,T)}function N(F){return!F||!/\S/.test(F.string)}function V(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==K){var T=l;if(!T){var ce=n.innerMode(s,F.htmlState);T=ce.mode.name=="xml"&&ce.state.tagStart===null&&!ce.state.context&&ce.state.tokenize.isInText}T&&(F.f=Q,F.block=B,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function B(F,T){var ce=F.column()===T.indentation,ue=N(T.prevLine.stream),ae=T.indentedCode,Te=T.prevLine.hr,Ue=T.list!==!1,we=(T.listStack[T.listStack.length-1]||0)+3;T.indentedCode=!1;var Se=T.indentation;if(T.indentationDiff===null&&(T.indentationDiff=T.indentation,Ue)){for(T.list=null;Se=4&&(ae||T.prevLine.fencedCodeEnd||T.prevLine.header||ue))return F.skipToEnd(),T.indentedCode=!0,d.code;if(F.eatSpace())return null;if(ce&&T.indentation<=we&&(nt=F.match(m))&&nt[1].length<=6)return T.quote=0,T.header=nt[1].length,T.thisLine.header=!0,i.highlightFormatting&&(T.formatting="header"),T.f=T.inline,J(T);if(T.indentation<=we&&F.eat(">"))return T.quote=ce?1:T.quote+1,i.highlightFormatting&&(T.formatting="quote"),F.eatSpace(),J(T);if(!Ge&&!T.setext&&ce&&T.indentation<=we&&(nt=F.match(g))){var Tt=nt[1]?"ol":"ul";return T.indentation=Se+F.current().length,T.list=!0,T.quote=0,T.listStack.push(T.indentation),T.em=!1,T.strong=!1,T.code=!1,T.strikethrough=!1,i.taskLists&&F.match(y,!1)&&(T.taskList=!0),T.f=T.inline,i.highlightFormatting&&(T.formatting=["list","list-"+Tt]),J(T)}else{if(ce&&T.indentation<=we&&(nt=F.match(E,!0)))return T.quote=0,T.fencedEndRE=new RegExp(nt[1]+"+ *$"),T.localMode=i.fencedCodeBlockHighlighting&&c(nt[2]||i.fencedCodeBlockDefaultMode),T.localMode&&(T.localState=n.startState(T.localMode)),T.f=T.block=ee,i.highlightFormatting&&(T.formatting="code-block"),T.code=-1,J(T);if(T.setext||(!Ve||!Ue)&&!T.quote&&T.list===!1&&!T.code&&!Ge&&!D.test(F.string)&&(nt=F.lookAhead(1))&&(nt=nt.match(v)))return T.setext?(T.header=T.setext,T.setext=0,F.skipToEnd(),i.highlightFormatting&&(T.formatting="header")):(T.header=nt[0].charAt(0)=="="?1:2,T.setext=T.header),T.thisLine.header=!0,T.f=T.inline,J(T);if(Ge)return F.skipToEnd(),T.hr=!0,T.thisLine.hr=!0,d.hr;if(F.peek()==="[")return A(F,T,O)}return A(F,T,T.inline)}function K(F,T){var ce=s.token(F,T.htmlState);if(!l){var ue=n.innerMode(s,T.htmlState);(ue.mode.name=="xml"&&ue.state.tagStart===null&&!ue.state.context&&ue.state.tokenize.isInText||T.md_inside&&F.current().indexOf(">")>-1)&&(T.f=Q,T.block=B,T.htmlState=null)}return ce}function ee(F,T){var ce=T.listStack[T.listStack.length-1]||0,ue=T.indentation=F.quote?T.push(d.formatting+"-"+F.formatting[ce]+"-"+F.quote):T.push("error"))}if(F.taskOpen)return T.push("meta"),T.length?T.join(" "):null;if(F.taskClosed)return T.push("property"),T.length?T.join(" "):null;if(F.linkHref?T.push(d.linkHref,"url"):(F.strong&&T.push(d.strong),F.em&&T.push(d.em),F.strikethrough&&T.push(d.strikethrough),F.emoji&&T.push(d.emoji),F.linkText&&T.push(d.linkText),F.code&&T.push(d.code),F.image&&T.push(d.image),F.imageAltText&&T.push(d.imageAltText,"link"),F.imageMarker&&T.push(d.imageMarker)),F.header&&T.push(d.header,d.header+"-"+F.header),F.quote&&(T.push(d.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=F.quote?T.push(d.quote+"-"+F.quote):T.push(d.quote+"-"+i.maxBlockquoteDepth)),F.list!==!1){var ue=(F.listStack.length-1)%3;ue?ue===1?T.push(d.list2):T.push(d.list3):T.push(d.list1)}return F.trailingSpaceNewLine?T.push("trailing-space-new-line"):F.trailingSpace&&T.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),T.length?T.join(" "):null}function z(F,T){return F.match(w,!0)?J(T):void 0}function Q(F,T){var ce=T.text(F,T);if(typeof ce!="undefined")return ce;if(T.list)return T.list=null,J(T);if(T.taskList){var ue=F.match(y,!0)[1]===" ";return ue?T.taskOpen=!0:T.taskClosed=!0,i.highlightFormatting&&(T.formatting="task"),T.taskList=!1,J(T)}if(T.taskOpen=!1,T.taskClosed=!1,T.header&&F.match(/^#+$/,!0))return i.highlightFormatting&&(T.formatting="header"),J(T);var ae=F.next();if(T.linkTitle){T.linkTitle=!1;var Te=ae;ae==="("&&(Te=")"),Te=(Te+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ue="^\\s*(?:[^"+Te+"\\\\]+|\\\\\\\\|\\\\.)"+Te;if(F.match(new RegExp(Ue),!0))return d.linkHref}if(ae==="`"){var we=T.formatting;i.highlightFormatting&&(T.formatting="code"),F.eatWhile("`");var Se=F.current().length;if(T.code==0&&(!T.quote||Se==1))return T.code=Se,J(T);if(Se==T.code){var Ve=J(T);return T.code=0,Ve}else return T.formatting=we,J(T)}else if(T.code)return J(T);if(ae==="\\"&&(F.next(),i.highlightFormatting)){var Ge=J(T),nt=d.formatting+"-escape";return Ge?Ge+" "+nt:nt}if(ae==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return T.imageMarker=!0,T.image=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(ae==="["&&T.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return T.imageMarker=!1,T.imageAltText=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(ae==="]"&&T.imageAltText){i.highlightFormatting&&(T.formatting="image");var Ge=J(T);return T.imageAltText=!1,T.image=!1,T.inline=T.f=Y,Ge}if(ae==="["&&!T.image)return T.linkText&&F.match(/^.*?\]/)||(T.linkText=!0,i.highlightFormatting&&(T.formatting="link")),J(T);if(ae==="]"&&T.linkText){i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return T.linkText=!1,T.inline=T.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?Y:Q,Ge}if(ae==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return Ge?Ge+=" ":Ge="",Ge+d.linkInline}if(ae==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return Ge?Ge+=" ":Ge="",Ge+d.linkEmail}if(i.xml&&ae==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Tt=F.string.indexOf(">",F.pos);if(Tt!=-1){var ke=F.string.substring(F.start,Tt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ke)&&(T.md_inside=!0)}return F.backUp(1),T.htmlState=n.startState(s),H(F,T,K)}if(i.xml&&ae==="<"&&F.match(/^\/\w*?>/))return T.md_inside=!1,"tag";if(ae==="*"||ae==="_"){for(var tt=1,ft=F.pos==1?" ":F.string.charAt(F.pos-2);tt<3&&F.eat(ae);)tt++;var pt=F.peek()||" ",jt=!/\s/.test(pt)&&(!C.test(pt)||/\s/.test(ft)||C.test(ft)),Fe=!/\s/.test(ft)&&(!C.test(ft)||/\s/.test(pt)||C.test(pt)),X=null,oe=null;if(tt%2&&(!T.em&&jt&&(ae==="*"||!Fe||C.test(ft))?X=!0:T.em==ae&&Fe&&(ae==="*"||!jt||C.test(pt))&&(X=!1)),tt>1&&(!T.strong&&jt&&(ae==="*"||!Fe||C.test(ft))?oe=!0:T.strong==ae&&Fe&&(ae==="*"||!jt||C.test(pt))&&(oe=!1)),oe!=null||X!=null){i.highlightFormatting&&(T.formatting=X==null?"strong":oe==null?"em":"strong em"),X===!0&&(T.em=ae),oe===!0&&(T.strong=ae);var Ve=J(T);return X===!1&&(T.em=!1),oe===!1&&(T.strong=!1),Ve}}else if(ae===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return J(T);F.backUp(1)}if(i.strikethrough){if(ae==="~"&&F.eatWhile(ae)){if(T.strikethrough){i.highlightFormatting&&(T.formatting="strikethrough");var Ve=J(T);return T.strikethrough=!1,Ve}else if(F.match(/^[^\s]/,!1))return T.strikethrough=!0,i.highlightFormatting&&(T.formatting="strikethrough"),J(T)}else if(ae===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return J(T);F.backUp(2)}}if(i.emoji&&ae===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){T.emoji=!0,i.highlightFormatting&&(T.formatting="emoji");var te=J(T);return T.emoji=!1,te}return ae===" "&&(F.match(/^ +$/,!1)?T.trailingSpace++:T.trailingSpace&&(T.trailingSpaceNewLine=!0)),J(T)}function _(F,T){var ce=F.next();if(ce===">"){T.f=T.inline=Q,i.highlightFormatting&&(T.formatting="link");var ue=J(T);return ue?ue+=" ":ue="",ue+d.linkInline}return F.match(/^[^>]+/,!0),d.linkInline}function Y(F,T){if(F.eatSpace())return null;var ce=F.next();return ce==="("||ce==="["?(T.f=T.inline=Z(ce==="("?")":"]"),i.highlightFormatting&&(T.formatting="link-string"),T.linkHref=!0,J(T)):"error"}var U={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Z(F){return function(T,ce){var ue=T.next();if(ue===F){ce.f=ce.inline=Q,i.highlightFormatting&&(ce.formatting="link-string");var ae=J(ce);return ce.linkHref=!1,ae}return T.match(U[F]),ce.linkHref=!0,J(ce)}}function O(F,T){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(T.f=I,F.next(),i.highlightFormatting&&(T.formatting="link"),T.linkText=!0,J(T)):A(F,T,Q)}function I(F,T){if(F.match(/^\]:/,!0)){T.f=T.inline=W,i.highlightFormatting&&(T.formatting="link");var ce=J(T);return T.linkText=!1,ce}return F.match(/^([^\]\\]|\\.)+/,!0),d.linkText}function W(F,T){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?T.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),T.f=T.inline=Q,d.linkHref+" url")}var he={startState:function(){return{f:B,prevLine:{stream:null},thisLine:{stream:null},block:B,htmlState:null,indentation:0,inline:Q,text:z,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&n.copyState(s,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?n.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,T){if(T.formatting=!1,F!=T.thisLine.stream){if(T.header=0,T.hr=!1,F.match(/^\s*$/,!0))return V(T),null;if(T.prevLine=T.thisLine,T.thisLine={stream:F},T.taskList=!1,T.trailingSpace=0,T.trailingSpaceNewLine=!1,!T.localState&&(T.f=T.block,T.f!=K)){var ce=F.match(/^\s*/,!0)[0].replace(/\t/g,q).length;if(T.indentation=ce,T.indentationDiff=null,ce>0)return null}}return T.f(F,T)},innerMode:function(F){return F.block==K?{state:F.htmlState,mode:s}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:he}},indent:function(F,T,ce){return F.block==K&&s.indent?s.indent(F.htmlState,T,ce):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,T,ce):n.Pass},blankLine:V,getType:J,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return he},"xml"),n.defineMIME("text/markdown","markdown"),n.defineMIME("text/x-markdown","markdown")})});var Od=se((qd,zd)=>{(function(n){typeof qd=="object"&&typeof zd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("mllike",function(t,i){var s={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},l=i.extraWords||{};for(var c in l)l.hasOwnProperty(c)&&(s[c]=i.extraWords[c]);var d=[];for(var h in s)d.push(h);n.registerHelper("hintWords","mllike",d);function p(v,w){var E=v.next();if(E==='"')return w.tokenize=g,w.tokenize(v,w);if(E==="{"&&v.eat("|"))return w.longString=!0,w.tokenize=m,w.tokenize(v,w);if(E==="("&&v.eat("*"))return w.commentLevel++,w.tokenize=y,w.tokenize(v,w);if(E==="~"||E==="?")return v.eatWhile(/\w/),"variable-2";if(E==="`")return v.eatWhile(/\w/),"quote";if(E==="/"&&i.slashComments&&v.eat("/"))return v.skipToEnd(),"comment";if(/\d/.test(E))return E==="0"&&v.eat(/[bB]/)&&v.eatWhile(/[01]/),E==="0"&&v.eat(/[xX]/)&&v.eatWhile(/[0-9a-fA-F]/),E==="0"&&v.eat(/[oO]/)?v.eatWhile(/[0-7]/):(v.eatWhile(/[\d_]/),v.eat(".")&&v.eatWhile(/[\d]/),v.eat(/[eE]/)&&v.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(E))return"operator";if(/[\w\xa1-\uffff]/.test(E)){v.eatWhile(/[\w\xa1-\uffff]/);var D=v.current();return s.hasOwnProperty(D)?s[D]:"variable"}return null}function g(v,w){for(var E,D=!1,C=!1;(E=v.next())!=null;){if(E==='"'&&!C){D=!0;break}C=!C&&E==="\\"}return D&&!C&&(w.tokenize=p),"string"}function y(v,w){for(var E,D;w.commentLevel>0&&(D=v.next())!=null;)E==="("&&D==="*"&&w.commentLevel++,E==="*"&&D===")"&&w.commentLevel--,E=D;return w.commentLevel<=0&&(w.tokenize=p),"comment"}function m(v,w){for(var E,D;w.longString&&(D=v.next())!=null;)E==="|"&&D==="}"&&(w.longString=!1),E=D;return w.longString||(w.tokenize=p),"string"}return{startState:function(){return{tokenize:p,commentLevel:0,longString:!1}},token:function(v,w){return v.eatSpace()?null:w.tokenize(v,w)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:i.slashComments?"//":null}}),n.defineMIME("text/x-ocaml",{name:"mllike",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),n.defineMIME("text/x-fsharp",{name:"mllike",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),n.defineMIME("text/x-sml",{name:"mllike",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0})})});var Nd=se((Pd,Rd)=>{(function(n){typeof Pd=="object"&&typeof Rd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("nginx",function(t){function i(w){for(var E={},D=w.split(" "),C=0;C*\/]/.test(C)?p(null,"select-op"):/[;{}:\[\]]/.test(C)?p(null,C):(w.eatWhile(/[\w\\\-]/),p("variable","variable"))}function y(w,E){for(var D=!1,C;(C=w.next())!=null;){if(D&&C=="/"){E.tokenize=g;break}D=C=="*"}return p("comment","comment")}function m(w,E){for(var D=0,C;(C=w.next())!=null;){if(D>=2&&C==">"){E.tokenize=g;break}D=C=="-"?D+1:0}return p("comment","comment")}function v(w){return function(E,D){for(var C=!1,q;(q=E.next())!=null&&!(q==w&&!C);)C=!C&&q=="\\";return C||(D.tokenize=g),p("string","string")}}return{startState:function(w){return{tokenize:g,baseIndent:w||0,stack:[]}},token:function(w,E){if(w.eatSpace())return null;h=null;var D=E.tokenize(w,E),C=E.stack[E.stack.length-1];return h=="hash"&&C=="rule"?D="atom":D=="variable"&&(C=="rule"?D="number":(!C||C=="@media{")&&(D="tag")),C=="rule"&&/^[\{\};]$/.test(h)&&E.stack.pop(),h=="{"?C=="@media"?E.stack[E.stack.length-1]="@media{":E.stack.push("{"):h=="}"?E.stack.pop():h=="@media"?E.stack.push("@media"):C=="{"&&h!="comment"&&E.stack.push("rule"),D},indent:function(w,E){var D=w.stack.length;return/^\}/.test(E)&&(D-=w.stack[w.stack.length-1]=="rule"?2:1),w.baseIndent+D*d},electricChars:"}"}}),n.defineMIME("text/x-nginx-conf","nginx")})});var Ud=se((Bd,Hd)=>{(function(n){typeof Bd=="object"&&typeof Hd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("perl",function(){var c={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},d="string-2",h=/[goseximacplud]/;function p(m,v,w,E,D){return v.chain=null,v.style=null,v.tail=null,v.tokenize=function(C,q){for(var A=!1,H,N=0;H=C.next();){if(H===w[N]&&!A)return w[++N]!==void 0?(q.chain=w[N],q.style=E,q.tail=D):D&&C.eatWhile(D),q.tokenize=y,E;A=!A&&H=="\\"}return E},v.tokenize(m,v)}function g(m,v,w){return v.tokenize=function(E,D){return E.string==w&&(D.tokenize=y),E.skipToEnd(),"string"},v.tokenize(m,v)}function y(m,v){if(m.eatSpace())return null;if(v.chain)return p(m,v,v.chain,v.style,v.tail);if(m.match(/^\-?[\d\.]/,!1)&&m.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(m.match(/^<<(?=\w)/))return m.eatWhile(/\w/),g(m,v,m.current().substr(2));if(m.sol()&&m.match(/^\=item(?!\w)/))return g(m,v,"=cut");var w=m.next();if(w=='"'||w=="'"){if(i(m,3)=="<<"+w){var E=m.pos;m.eatWhile(/\w/);var D=m.current().substr(1);if(D&&m.eat(w))return g(m,v,D);m.pos=E}return p(m,v,[w],"string")}if(w=="q"){var C=t(m,-2);if(!(C&&/\w/.test(C))){if(C=t(m,0),C=="x"){if(C=t(m,1),C=="(")return l(m,2),p(m,v,[")"],d,h);if(C=="[")return l(m,2),p(m,v,["]"],d,h);if(C=="{")return l(m,2),p(m,v,["}"],d,h);if(C=="<")return l(m,2),p(m,v,[">"],d,h);if(/[\^'"!~\/]/.test(C))return l(m,1),p(m,v,[m.eat(C)],d,h)}else if(C=="q"){if(C=t(m,1),C=="(")return l(m,2),p(m,v,[")"],"string");if(C=="[")return l(m,2),p(m,v,["]"],"string");if(C=="{")return l(m,2),p(m,v,["}"],"string");if(C=="<")return l(m,2),p(m,v,[">"],"string");if(/[\^'"!~\/]/.test(C))return l(m,1),p(m,v,[m.eat(C)],"string")}else if(C=="w"){if(C=t(m,1),C=="(")return l(m,2),p(m,v,[")"],"bracket");if(C=="[")return l(m,2),p(m,v,["]"],"bracket");if(C=="{")return l(m,2),p(m,v,["}"],"bracket");if(C=="<")return l(m,2),p(m,v,[">"],"bracket");if(/[\^'"!~\/]/.test(C))return l(m,1),p(m,v,[m.eat(C)],"bracket")}else if(C=="r"){if(C=t(m,1),C=="(")return l(m,2),p(m,v,[")"],d,h);if(C=="[")return l(m,2),p(m,v,["]"],d,h);if(C=="{")return l(m,2),p(m,v,["}"],d,h);if(C=="<")return l(m,2),p(m,v,[">"],d,h);if(/[\^'"!~\/]/.test(C))return l(m,1),p(m,v,[m.eat(C)],d,h)}else if(/[\^'"!~\/(\[{<]/.test(C)){if(C=="(")return l(m,1),p(m,v,[")"],"string");if(C=="[")return l(m,1),p(m,v,["]"],"string");if(C=="{")return l(m,1),p(m,v,["}"],"string");if(C=="<")return l(m,1),p(m,v,[">"],"string");if(/[\^'"!~\/]/.test(C))return p(m,v,[m.eat(C)],"string")}}}if(w=="m"){var C=t(m,-2);if(!(C&&/\w/.test(C))&&(C=m.eat(/[(\[{<\^'"!~\/]/),C)){if(/[\^'"!~\/]/.test(C))return p(m,v,[C],d,h);if(C=="(")return p(m,v,[")"],d,h);if(C=="[")return p(m,v,["]"],d,h);if(C=="{")return p(m,v,["}"],d,h);if(C=="<")return p(m,v,[">"],d,h)}}if(w=="s"){var C=/[\/>\]})\w]/.test(t(m,-2));if(!C&&(C=m.eat(/[(\[{<\^'"!~\/]/),C))return C=="["?p(m,v,["]","]"],d,h):C=="{"?p(m,v,["}","}"],d,h):C=="<"?p(m,v,[">",">"],d,h):C=="("?p(m,v,[")",")"],d,h):p(m,v,[C,C],d,h)}if(w=="y"){var C=/[\/>\]})\w]/.test(t(m,-2));if(!C&&(C=m.eat(/[(\[{<\^'"!~\/]/),C))return C=="["?p(m,v,["]","]"],d,h):C=="{"?p(m,v,["}","}"],d,h):C=="<"?p(m,v,[">",">"],d,h):C=="("?p(m,v,[")",")"],d,h):p(m,v,[C,C],d,h)}if(w=="t"){var C=/[\/>\]})\w]/.test(t(m,-2));if(!C&&(C=m.eat("r"),C&&(C=m.eat(/[(\[{<\^'"!~\/]/),C)))return C=="["?p(m,v,["]","]"],d,h):C=="{"?p(m,v,["}","}"],d,h):C=="<"?p(m,v,[">",">"],d,h):C=="("?p(m,v,[")",")"],d,h):p(m,v,[C,C],d,h)}if(w=="`")return p(m,v,[w],"variable-2");if(w=="/")return/~\s*$/.test(i(m))?p(m,v,[w],d,h):"operator";if(w=="$"){var E=m.pos;if(m.eatWhile(/\d/)||m.eat("{")&&m.eatWhile(/\d/)&&m.eat("}"))return"variable-2";m.pos=E}if(/[$@%]/.test(w)){var E=m.pos;if(m.eat("^")&&m.eat(/[A-Z]/)||!/[@$%&]/.test(t(m,-2))&&m.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var C=m.current();if(c[C])return"variable-2"}m.pos=E}if(/[$@%&]/.test(w)&&(m.eatWhile(/[\w$\[\]]/)||m.eat("{")&&m.eatWhile(/[\w$\[\]]/)&&m.eat("}"))){var C=m.current();return c[C]?"variable-2":"variable"}if(w=="#"&&t(m,-2)!="$")return m.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(w)){var E=m.pos;if(m.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),c[m.current()])return"operator";m.pos=E}if(w=="_"&&m.pos==1){if(s(m,6)=="_END__")return p(m,v,["\0"],"comment");if(s(m,7)=="_DATA__")return p(m,v,["\0"],"variable-2");if(s(m,7)=="_C__")return p(m,v,["\0"],"string")}if(/\w/.test(w)){var E=m.pos;if(t(m,-2)=="{"&&(t(m,0)=="}"||m.eatWhile(/\w/)&&t(m,0)=="}"))return"string";m.pos=E}if(/[A-Z]/.test(w)){var q=t(m,-2),E=m.pos;if(m.eatWhile(/[A-Z_]/),/[\da-z]/.test(t(m,0)))m.pos=E;else{var C=c[m.current()];return C?(C[1]&&(C=C[0]),q!=":"?C==1?"keyword":C==2?"def":C==3?"atom":C==4?"operator":C==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(w)){var q=t(m,-2);m.eatWhile(/\w/);var C=c[m.current()];return C?(C[1]&&(C=C[0]),q!=":"?C==1?"keyword":C==2?"def":C==3?"atom":C==4?"operator":C==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(m,v){return(v.tokenize||y)(m,v)},lineComment:"#"}}),n.registerHelper("wordChars","perl",/[\w$]/),n.defineMIME("text/x-perl","perl");function t(c,d){return c.string.charAt(c.pos+(d||0))}function i(c,d){if(d){var h=c.pos-d;return c.string.substr(h>=0?h:0,d)}else return c.string.substr(0,c.pos-1)}function s(c,d){var h=c.string.length,p=h-c.pos+1;return c.string.substr(c.pos,d&&d=(p=c.string.length-1)?c.pos=p:c.pos=h}})});var $d=se((Wd,jd)=>{(function(n){typeof Wd=="object"&&typeof jd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("pascal",function(){function t(g){for(var y={},m=g.split(" "),v=0;v!?|\/]/;function c(g,y){var m=g.next();if(m=="#"&&y.startOfLine)return g.skipToEnd(),"meta";if(m=='"'||m=="'")return y.tokenize=d(m),y.tokenize(g,y);if(m=="("&&g.eat("*"))return y.tokenize=h,h(g,y);if(m=="{")return y.tokenize=p,p(g,y);if(/[\[\]\(\),;\:\.]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(m=="/"&&g.eat("/"))return g.skipToEnd(),"comment";if(l.test(m))return g.eatWhile(l),"operator";g.eatWhile(/[\w\$_]/);var v=g.current();return i.propertyIsEnumerable(v)?"keyword":s.propertyIsEnumerable(v)?"atom":"variable"}function d(g){return function(y,m){for(var v=!1,w,E=!1;(w=y.next())!=null;){if(w==g&&!v){E=!0;break}v=!v&&w=="\\"}return(E||!v)&&(m.tokenize=null),"string"}}function h(g,y){for(var m=!1,v;v=g.next();){if(v==")"&&m){y.tokenize=null;break}m=v=="*"}return"comment"}function p(g,y){for(var m;m=g.next();)if(m=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||c)(g,y);return m=="comment"||m=="meta",m},electricChars:"{}"}}),n.defineMIME("text/x-pascal","pascal")})});var Vd=se((Gd,Kd)=>{(function(n){typeof Gd=="object"&&typeof Kd=="object"?n(Qe(),Zs(),Ys()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],n):n(CodeMirror)})(function(n){"use strict";function t(g){for(var y={},m=g.split(" "),v=0;v\w/,!1)&&(y.tokenize=i([[["->",null]],[[/[\w]+/,"variable"]]],m,v)),"variable-2";for(var w=!1;!g.eol()&&(w||v===!1||!g.match("{$",!1)&&!g.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!w&&g.match(m)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}w=g.next()=="\\"&&!w}return"string"}var c="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",d="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";n.registerHelper("hintWords","php",[c,d,h].join(" ").split(" ")),n.registerHelper("wordChars","php",/[\w$]/);var p={name:"clike",helperType:"php",keywords:t(c),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(d),builtin:t(h),multiLineStrings:!0,hooks:{$:function(g){return g.eatWhile(/[\w\$_]/),"variable-2"},"<":function(g,y){var m;if(m=g.match(/<<\s*/)){var v=g.eat(/['"]/);g.eatWhile(/[\w\.]/);var w=g.current().slice(m[0].length+(v?2:1));if(v&&g.eat(v),w)return(y.tokStack||(y.tokStack=[])).push(w,0),y.tokenize=s(w,v!="'"),"string"}return!1},"#":function(g){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"},"/":function(g){if(g.eat("/")){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"}return!1},'"':function(g,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=s('"'),"string"},"{":function(g,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(g,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=s(y.tokStack[y.tokStack.length-2])),!1}}};n.defineMode("php",function(g,y){var m=n.getMode(g,y&&y.htmlMode||"text/html"),v=n.getMode(g,p);function w(E,D){var C=D.curMode==v;if(E.sol()&&D.pending&&D.pending!='"'&&D.pending!="'"&&(D.pending=null),C)return C&&D.php.tokenize==null&&E.match("?>")?(D.curMode=m,D.curState=D.html,D.php.context.prev||(D.php=null),"meta"):v.token(E,D.curState);if(E.match(/^<\?\w*/))return D.curMode=v,D.php||(D.php=n.startState(v,m.indent(D.html,"",""))),D.curState=D.php,"meta";if(D.pending=='"'||D.pending=="'"){for(;!E.eol()&&E.next()!=D.pending;);var q="string"}else if(D.pending&&E.pos/.test(A)?D.pending=N[0]:D.pending={end:E.pos,style:q},E.backUp(A.length-H)),q}return{startState:function(){var E=n.startState(m),D=y.startOpen?n.startState(v):null;return{html:E,php:D,curMode:y.startOpen?v:m,curState:y.startOpen?D:E,pending:null}},copyState:function(E){var D=E.html,C=n.copyState(m,D),q=E.php,A=q&&n.copyState(v,q),H;return E.curMode==m?H=C:H=A,{html:C,php:A,curMode:E.curMode,curState:H,pending:E.pending}},token:w,indent:function(E,D,C){return E.curMode!=v&&/^\s*<\//.test(D)||E.curMode==v&&/^\?>/.test(D)?m.indent(E.html,D,C):E.curMode.indent(E.curState,D,C)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(E){return{state:E.curState,mode:E.curMode}}}},"htmlmixed","clike"),n.defineMIME("application/x-httpd-php","php"),n.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),n.defineMIME("text/x-php",p)})});var Zd=se((Yd,Xd)=>{(function(n){"use strict";typeof Yd=="object"&&typeof Xd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(window.CodeMirror)})(function(n){"use strict";n.defineMode("powershell",function(){function t(_,Y){Y=Y||{};for(var U=Y.prefix!==void 0?Y.prefix:"^",Z=Y.suffix!==void 0?Y.suffix:"\\b",O=0;O<_.length;O++)_[O]instanceof RegExp?_[O]=_[O].source:_[O]=_[O].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(U+"("+_.join("|")+")"+Z,"i")}var i="(?=[^A-Za-z\\d\\-_]|$)",s=/[\w\-:]/,l=t([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:i}),c=/[\[\]{},;`\\\.]|@[({]/,d=t(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),h=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,p=t([d,h],{suffix:""}),g=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,y=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,m=/[A-Z]:|%|\?/i,v=t([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),w=t([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),E=t([m,v,w],{suffix:i}),D={keyword:l,number:g,operator:p,builtin:E,punctuation:c,identifier:y};function C(_,Y){var U=Y.returnStack[Y.returnStack.length-1];if(U&&U.shouldReturnFrom(Y))return Y.tokenize=U.tokenize,Y.returnStack.pop(),Y.tokenize(_,Y);if(_.eatSpace())return null;if(_.eat("("))return Y.bracketNesting+=1,"punctuation";if(_.eat(")"))return Y.bracketNesting-=1,"punctuation";for(var Z in D)if(_.match(D[Z]))return Z;var O=_.next();if(O==="'")return q(_,Y);if(O==="$")return ee(_,Y);if(O==='"')return A(_,Y);if(O==="<"&&_.eat("#"))return Y.tokenize=K,K(_,Y);if(O==="#")return _.skipToEnd(),"comment";if(O==="@"){var I=_.eat(/["']/);if(I&&_.eol())return Y.tokenize=z,Y.startQuote=I[0],z(_,Y);if(_.eol())return"error";if(_.peek().match(/[({]/))return"punctuation";if(_.peek().match(s))return ee(_,Y)}return"error"}function q(_,Y){for(var U;(U=_.peek())!=null;)if(_.next(),U==="'"&&!_.eat("'"))return Y.tokenize=C,"string";return"error"}function A(_,Y){for(var U;(U=_.peek())!=null;){if(U==="$")return Y.tokenize=H,"string";if(_.next(),U==="`"){_.next();continue}if(U==='"'&&!_.eat('"'))return Y.tokenize=C,"string"}return"error"}function H(_,Y){return B(_,Y,A)}function N(_,Y){return Y.tokenize=z,Y.startQuote='"',z(_,Y)}function V(_,Y){return B(_,Y,N)}function B(_,Y,U){if(_.match("$(")){var Z=Y.bracketNesting;return Y.returnStack.push({shouldReturnFrom:function(O){return O.bracketNesting===Z},tokenize:U}),Y.tokenize=C,Y.bracketNesting+=1,"punctuation"}else return _.next(),Y.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:U}),Y.tokenize=ee,Y.tokenize(_,Y)}function K(_,Y){for(var U=!1,Z;(Z=_.next())!=null;){if(U&&Z==">"){Y.tokenize=C;break}U=Z==="#"}return"comment"}function ee(_,Y){var U=_.peek();return _.eat("{")?(Y.tokenize=J,J(_,Y)):U!=null&&U.match(s)?(_.eatWhile(s),Y.tokenize=C,"variable-2"):(Y.tokenize=C,"error")}function J(_,Y){for(var U;(U=_.next())!=null;)if(U==="}"){Y.tokenize=C;break}return"variable-2"}function z(_,Y){var U=Y.startQuote;if(_.sol()&&_.match(new RegExp(U+"@")))Y.tokenize=C;else if(U==='"')for(;!_.eol();){var Z=_.peek();if(Z==="$")return Y.tokenize=V,"string";_.next(),Z==="`"&&_.next()}else _.skipToEnd();return"string"}var Q={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:C}},token:function(_,Y){return Y.tokenize(_,Y)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return Q}),n.defineMIME("application/x-powershell","powershell")})});var eh=se((Qd,Jd)=>{(function(n){typeof Qd=="object"&&typeof Jd=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("properties",function(){return{token:function(t,i){var s=t.sol()||i.afterSection,l=t.eol();if(i.afterSection=!1,s&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),l&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),s)for(;t.eatSpace(););var c=t.next();return s&&(c==="#"||c==="!"||c===";")?(i.position="comment",t.skipToEnd(),"comment"):s&&c==="["?(i.afterSection=!0,t.skipTo("]"),t.eat("]"),"header"):c==="="||c===":"?(i.position="quote",null):(c==="\\"&&i.position==="quote"&&(t.eol()&&(i.nextMultiline=!0)),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),n.defineMIME("text/x-properties","properties"),n.defineMIME("text/x-ini","properties")})});var rh=se((th,nh)=>{(function(n){typeof th=="object"&&typeof nh=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";function t(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var i=t(["and","or","not","is"]),s=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],l=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","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","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];n.registerHelper("hintWords","python",s.concat(l));function c(h){return h.scopes[h.scopes.length-1]}n.defineMode("python",function(h,p){for(var g="error",y=p.delimiters||p.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,m=[p.singleOperators,p.doubleOperators,p.doubleDelimiters,p.tripleDelimiters,p.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],v=0;vI?J(Z):W0&&Q(U,Z)&&(he+=" "+g),he}}return B(U,Z)}function B(U,Z,O){if(U.eatSpace())return null;if(!O&&U.match(/^#.*/))return"comment";if(U.match(/^[0-9\.]/,!1)){var I=!1;if(U.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(I=!0),U.match(/^[\d_]+\.\d*/)&&(I=!0),U.match(/^\.\d+/)&&(I=!0),I)return U.eat(/J/i),"number";var W=!1;if(U.match(/^0x[0-9a-f_]+/i)&&(W=!0),U.match(/^0b[01_]+/i)&&(W=!0),U.match(/^0o[0-7_]+/i)&&(W=!0),U.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(U.eat(/J/i),W=!0),U.match(/^0(?![\dx])/i)&&(W=!0),W)return U.eat(/L/i),"number"}if(U.match(A)){var he=U.current().toLowerCase().indexOf("f")!==-1;return he?(Z.tokenize=K(U.current(),Z.tokenize),Z.tokenize(U,Z)):(Z.tokenize=ee(U.current(),Z.tokenize),Z.tokenize(U,Z))}for(var F=0;F=0;)U=U.substr(1);var O=U.length==1,I="string";function W(F){return function(T,ce){var ue=B(T,ce,!0);return ue=="punctuation"&&(T.current()=="{"?ce.tokenize=W(F+1):T.current()=="}"&&(F>1?ce.tokenize=W(F-1):ce.tokenize=he)),ue}}function he(F,T){for(;!F.eol();)if(F.eatWhile(/[^'"\{\}\\]/),F.eat("\\")){if(F.next(),O&&F.eol())return I}else{if(F.match(U))return T.tokenize=Z,I;if(F.match("{{"))return I;if(F.match("{",!1))return T.tokenize=W(0),F.current()?I:T.tokenize(F,T);if(F.match("}}"))return I;if(F.match("}"))return g;F.eat(/['"]/)}if(O){if(p.singleLineStringErrors)return g;T.tokenize=Z}return I}return he.isString=!0,he}function ee(U,Z){for(;"rubf".indexOf(U.charAt(0).toLowerCase())>=0;)U=U.substr(1);var O=U.length==1,I="string";function W(he,F){for(;!he.eol();)if(he.eatWhile(/[^'"\\]/),he.eat("\\")){if(he.next(),O&&he.eol())return I}else{if(he.match(U))return F.tokenize=Z,I;he.eat(/['"]/)}if(O){if(p.singleLineStringErrors)return g;F.tokenize=Z}return I}return W.isString=!0,W}function J(U){for(;c(U).type!="py";)U.scopes.pop();U.scopes.push({offset:c(U).offset+h.indentUnit,type:"py",align:null})}function z(U,Z,O){var I=U.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:U.column()+1;Z.scopes.push({offset:Z.indent+w,type:O,align:I})}function Q(U,Z){for(var O=U.indentation();Z.scopes.length>1&&c(Z).offset>O;){if(c(Z).type!="py")return!0;Z.scopes.pop()}return c(Z).offset!=O}function _(U,Z){U.sol()&&(Z.beginningOfLine=!0);var O=Z.tokenize(U,Z),I=U.current();if(Z.beginningOfLine&&I=="@")return U.match(q,!1)?"meta":C?"operator":g;if(/\S/.test(I)&&(Z.beginningOfLine=!1),(O=="variable"||O=="builtin")&&Z.lastToken=="meta"&&(O="meta"),(I=="pass"||I=="return")&&(Z.dedent+=1),I=="lambda"&&(Z.lambda=!0),I==":"&&!Z.lambda&&c(Z).type=="py"&&J(Z),I.length==1&&!/string|comment/.test(O)){var W="[({".indexOf(I);if(W!=-1&&z(U,Z,"])}".slice(W,W+1)),W="])}".indexOf(I),W!=-1)if(c(Z).type==I)Z.indent=Z.scopes.pop().offset-w;else return g}return Z.dedent>0&&U.eol()&&c(Z).type=="py"&&(Z.scopes.length>1&&Z.scopes.pop(),Z.dedent-=1),O}var Y={startState:function(U){return{tokenize:V,scopes:[{offset:U||0,type:"py",align:null}],indent:U||0,lastToken:null,lambda:!1,dedent:0}},token:function(U,Z){var O=Z.errorToken;O&&(Z.errorToken=!1);var I=_(U,Z);return I&&I!="comment"&&(Z.lastToken=I=="keyword"||I=="punctuation"?U.current():I),I=="punctuation"&&(I=null),U.eol()&&Z.lambda&&(Z.lambda=!1),O?I+" "+g:I},indent:function(U,Z){if(U.tokenize!=V)return U.tokenize.isString?n.Pass:0;var O=c(U),I=O.type==Z.charAt(0);return O.align!=null?O.align-(I?1:0):O.offset-(I?w:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return Y}),n.defineMIME("text/x-python","python");var d=function(h){return h.split(" ")};n.defineMIME("text/x-cython",{name:"python",extra_keywords:d("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var ah=se((ih,oh)=>{(function(n){typeof ih=="object"&&typeof oh=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";function t(p){for(var g={},y=0,m=p.length;y]/)?(A.eat(/[\<\>]/),"atom"):A.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":A.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(A.eatWhile(/[\w$\xa1-\uffff]/),A.eat(/[\?\!\=]/),"atom"):"operator";if(N=="@"&&A.match(/^@?[a-zA-Z_\xa1-\uffff]/))return A.eat("@"),A.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(N=="$")return A.eat(/[a-zA-Z_]/)?A.eatWhile(/[\w]/):A.eat(/\d/)?A.eat(/\d/):A.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(N))return A.eatWhile(/[\w\xa1-\uffff]/),A.eat(/[\?\!]/),A.eat(":")?"atom":"ident";if(N=="|"&&(H.varList||H.lastTok=="{"||H.lastTok=="do"))return g="|",null;if(/[\(\)\[\]{}\\;]/.test(N))return g=N,null;if(N=="-"&&A.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(N)){var J=A.eatWhile(/[=+\-\/*:\.^%<>~|]/);return N=="."&&!J&&(g="."),"operator"}else return null}}}function v(A){for(var H=A.pos,N=0,V,B=!1,K=!1;(V=A.next())!=null;)if(K)K=!1;else{if("[{(".indexOf(V)>-1)N++;else if("]})".indexOf(V)>-1){if(N--,N<0)break}else if(V=="/"&&N==0){B=!0;break}K=V=="\\"}return A.backUp(A.pos-H),B}function w(A){return A||(A=1),function(H,N){if(H.peek()=="}"){if(A==1)return N.tokenize.pop(),N.tokenize[N.tokenize.length-1](H,N);N.tokenize[N.tokenize.length-1]=w(A-1)}else H.peek()=="{"&&(N.tokenize[N.tokenize.length-1]=w(A+1));return m(H,N)}}function E(){var A=!1;return function(H,N){return A?(N.tokenize.pop(),N.tokenize[N.tokenize.length-1](H,N)):(A=!0,m(H,N))}}function D(A,H,N,V){return function(B,K){var ee=!1,J;for(K.context.type==="read-quoted-paused"&&(K.context=K.context.prev,B.eat("}"));(J=B.next())!=null;){if(J==A&&(V||!ee)){K.tokenize.pop();break}if(N&&J=="#"&&!ee){if(B.eat("{")){A=="}"&&(K.context={prev:K.context,type:"read-quoted-paused"}),K.tokenize.push(w());break}else if(/[@\$]/.test(B.peek())){K.tokenize.push(E());break}}ee=!ee&&J=="\\"}return H}}function C(A,H){return function(N,V){return H&&N.eatSpace(),N.match(A)?V.tokenize.pop():N.skipToEnd(),"string"}}function q(A,H){return A.sol()&&A.match("=end")&&A.eol()&&H.tokenize.pop(),A.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[m],indented:0,context:{type:"top",indented:-p.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(A,H){g=null,A.sol()&&(H.indented=A.indentation());var N=H.tokenize[H.tokenize.length-1](A,H),V,B=g;if(N=="ident"){var K=A.current();N=H.lastTok=="."?"property":s.propertyIsEnumerable(A.current())?"keyword":/^[A-Z]/.test(K)?"tag":H.lastTok=="def"||H.lastTok=="class"||H.varList?"def":"variable",N=="keyword"&&(B=K,l.propertyIsEnumerable(K)?V="indent":c.propertyIsEnumerable(K)?V="dedent":((K=="if"||K=="unless")&&A.column()==A.indentation()||K=="do"&&H.context.indented{(function(n){typeof sh=="object"&&typeof lh=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineSimpleMode=function(y,m){n.defineMode(y,function(v){return n.simpleMode(v,m)})},n.simpleMode=function(y,m){t(m,"start");var v={},w=m.meta||{},E=!1;for(var D in m)if(D!=w&&m.hasOwnProperty(D))for(var C=v[D]=[],q=m[D],A=0;A2&&H.token&&typeof H.token!="string"){w.pending=[];for(var B=2;B-1)return n.Pass;var D=v.indent.length-1,C=y[v.state];e:for(;;){for(var q=0;q{(function(n){typeof ch=="object"&&typeof dh=="object"?n(Qe(),uh()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],n):n(CodeMirror)})(function(n){"use strict";n.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),n.defineMIME("text/x-rustsrc","rust"),n.defineMIME("text/rust","rust")})});var mh=se((fh,ph)=>{(function(n){typeof fh=="object"&&typeof ph=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("shell",function(){var t={};function i(m,v){for(var w=0;w1&&m.eat("$");var w=m.next();return/['"({]/.test(w)?(v.tokens[0]=h(w,w=="("?"quote":w=="{"?"def":"string"),y(m,v)):(/\d/.test(w)||m.eatWhile(/\w/),v.tokens.shift(),"def")};function y(m,v){return(v.tokens[0]||d)(m,v)}return{startState:function(){return{tokens:[]}},token:function(m,v){return y(m,v)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),n.defineMIME("text/x-sh","shell"),n.defineMIME("application/x-sh","shell")})});var bh=se((gh,vh)=>{(function(n){typeof gh=="object"&&typeof vh=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("sql",function(p,g){var y=g.client||{},m=g.atoms||{false:!0,true:!0,null:!0},v=g.builtin||d(h),w=g.keywords||d(c),E=g.operatorChars||/^[*+\-%<>!=&|~^\/]/,D=g.support||{},C=g.hooks||{},q=g.dateSQL||{date:!0,time:!0,timestamp:!0},A=g.backslashStringEscapes!==!1,H=g.brackets||/^[\{}\(\)\[\]]/,N=g.punctuation||/^[;.,:]/;function V(z,Q){var _=z.next();if(C[_]){var Y=C[_](z,Q);if(Y!==!1)return Y}if(D.hexNumber&&(_=="0"&&z.match(/^[xX][0-9a-fA-F]+/)||(_=="x"||_=="X")&&z.match(/^'[0-9a-fA-F]+'/)))return"number";if(D.binaryNumber&&((_=="b"||_=="B")&&z.match(/^'[01]+'/)||_=="0"&&z.match(/^b[01]+/)))return"number";if(_.charCodeAt(0)>47&&_.charCodeAt(0)<58)return z.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),D.decimallessFloat&&z.match(/^\.(?!\.)/),"number";if(_=="?"&&(z.eatSpace()||z.eol()||z.eat(";")))return"variable-3";if(_=="'"||_=='"'&&D.doubleQuote)return Q.tokenize=B(_),Q.tokenize(z,Q);if((D.nCharCast&&(_=="n"||_=="N")||D.charsetCast&&_=="_"&&z.match(/[a-z][a-z0-9]*/i))&&(z.peek()=="'"||z.peek()=='"'))return"keyword";if(D.escapeConstant&&(_=="e"||_=="E")&&(z.peek()=="'"||z.peek()=='"'&&D.doubleQuote))return Q.tokenize=function(Z,O){return(O.tokenize=B(Z.next(),!0))(Z,O)},"keyword";if(D.commentSlashSlash&&_=="/"&&z.eat("/"))return z.skipToEnd(),"comment";if(D.commentHash&&_=="#"||_=="-"&&z.eat("-")&&(!D.commentSpaceRequired||z.eat(" ")))return z.skipToEnd(),"comment";if(_=="/"&&z.eat("*"))return Q.tokenize=K(1),Q.tokenize(z,Q);if(_=="."){if(D.zerolessFloat&&z.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(z.match(/^\.+/))return null;if(D.ODBCdotTable&&z.match(/^[\w\d_$#]+/))return"variable-2"}else{if(E.test(_))return z.eatWhile(E),"operator";if(H.test(_))return"bracket";if(N.test(_))return z.eatWhile(N),"punctuation";if(_=="{"&&(z.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||z.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";z.eatWhile(/^[_\w\d]/);var U=z.current().toLowerCase();return q.hasOwnProperty(U)&&(z.match(/^( )+'[^']*'/)||z.match(/^( )+"[^"]*"/))?"number":m.hasOwnProperty(U)?"atom":v.hasOwnProperty(U)?"builtin":w.hasOwnProperty(U)?"keyword":y.hasOwnProperty(U)?"string-2":null}}function B(z,Q){return function(_,Y){for(var U=!1,Z;(Z=_.next())!=null;){if(Z==z&&!U){Y.tokenize=V;break}U=(A||Q)&&!U&&Z=="\\"}return"string"}}function K(z){return function(Q,_){var Y=Q.match(/^.*?(\/\*|\*\/)/);return Y?Y[1]=="/*"?_.tokenize=K(z+1):z>1?_.tokenize=K(z-1):_.tokenize=V:Q.skipToEnd(),"comment"}}function ee(z,Q,_){Q.context={prev:Q.context,indent:z.indentation(),col:z.column(),type:_}}function J(z){z.indent=z.context.indent,z.context=z.context.prev}return{startState:function(){return{tokenize:V,context:null}},token:function(z,Q){if(z.sol()&&(Q.context&&Q.context.align==null&&(Q.context.align=!1)),Q.tokenize==V&&z.eatSpace())return null;var _=Q.tokenize(z,Q);if(_=="comment")return _;Q.context&&Q.context.align==null&&(Q.context.align=!0);var Y=z.current();return Y=="("?ee(z,Q,")"):Y=="["?ee(z,Q,"]"):Q.context&&Q.context.type==Y&&J(Q),_},indent:function(z,Q){var _=z.context;if(!_)return n.Pass;var Y=Q.charAt(0)==_.type;return _.align?_.col+(Y?0:1):_.indent+(Y?0:p.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:D.commentSlashSlash?"//":D.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function t(p){for(var g;(g=p.next())!=null;)if(g=="`"&&!p.eat("`"))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function i(p){for(var g;(g=p.next())!=null;)if(g=='"'&&!p.eat('"'))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function s(p){return p.eat("@")&&(p.match(/^session\./),p.match(/^local\./),p.match(/^global\./)),p.eat("'")?(p.match(/^.*'/),"variable-2"):p.eat('"')?(p.match(/^.*"/),"variable-2"):p.eat("`")?(p.match(/^.*`/),"variable-2"):p.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function l(p){return p.eat("N")?"atom":p.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var c="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function d(p){for(var g={},y=p.split(" "),m=0;m!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:d("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":s}}),n.defineMIME("text/x-mysql",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":t,"\\":l}}),n.defineMIME("text/x-mariadb",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":t,"\\":l}}),n.defineMIME("text/x-sqlite",{name:"sql",client:d("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:d(c+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:d("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:d("date time timestamp datetime"),support:d("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":s,":":s,"?":s,$:s,'"':i,"`":t}}),n.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:d("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:d("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:d("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:d("commentSlashSlash decimallessFloat"),hooks:{}}),n.defineMIME("text/x-plsql",{name:"sql",client:d("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:d("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:d("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:d("date time timestamp"),support:d("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),n.defineMIME("text/x-hive",{name:"sql",keywords:d("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:d("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:d("date timestamp"),support:d("ODBCdotTable doubleQuote binaryNumber hexNumber")}),n.defineMIME("text/x-pgsql",{name:"sql",client:d("source"),keywords:d(c+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv 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_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),n.defineMIME("text/x-gql",{name:"sql",keywords:d("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:d("false true"),builtin:d("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),n.defineMIME("text/x-gpsql",{name:"sql",client:d("source"),keywords:d("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),n.defineMIME("text/x-sparksql",{name:"sql",keywords:d("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:d("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:d("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable doubleQuote zerolessFloat")}),n.defineMIME("text/x-esper",{name:"sql",client:d("source"),keywords:d("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:d("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("time"),support:d("decimallessFloat zerolessFloat binaryNumber hexNumber")})})});var kh=se((yh,wh)=>{(function(n){typeof yh=="object"&&typeof wh=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(t,i){if(!i.inString&&(t.peek()=='"'||t.peek()=="'")&&(i.stringType=t.peek(),t.next(),i.inString=!0),t.sol()&&i.inArray===0&&(i.lhs=!0),i.inString){for(;i.inString&&!t.eol();)t.peek()===i.stringType?(t.next(),i.inString=!1):t.peek()==="\\"?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return i.lhs?"property string":"string"}else{if(i.inArray&&t.peek()==="]")return t.next(),i.inArray--,"bracket";if(i.lhs&&t.peek()==="["&&t.skipTo("]"))return t.next(),t.peek()==="]"&&t.next(),"atom";if(t.peek()==="#")return t.skipToEnd(),"comment";if(t.eatSpace())return null;if(i.lhs&&t.eatWhile(function(s){return s!="="&&s!=" "}))return"property";if(i.lhs&&t.peek()==="=")return t.next(),i.lhs=!1,null;if(!i.lhs&&t.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!i.lhs&&(t.match("true")||t.match("false")))return"atom";if(!i.lhs&&t.peek()==="[")return i.inArray++,t.next(),"bracket";if(!i.lhs&&t.match(/^\-?\d+(?:\.\d+)?/))return"number";t.eatSpace()||t.next()}return null}}}),n.defineMIME("text/x-toml","toml")})});var Sh=se((xh,_h)=>{(function(n){typeof xh=="object"&&typeof _h=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("yaml",function(){var t=["true","false","on","off","yes","no"],i=new RegExp("\\b(("+t.join(")|(")+"))$","i");return{token:function(s,l){var c=s.peek(),d=l.escaped;if(l.escaped=!1,c=="#"&&(s.pos==0||/\s/.test(s.string.charAt(s.pos-1))))return s.skipToEnd(),"comment";if(s.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(l.literal&&s.indentation()>l.keyCol)return s.skipToEnd(),"string";if(l.literal&&(l.literal=!1),s.sol()){if(l.keyCol=0,l.pair=!1,l.pairStart=!1,s.match(/---/))return"def";if(s.match(/\.\.\./))return"def";if(s.match(/\s*-\s+/))return"meta"}if(s.match(/^(\{|\}|\[|\])/))return c=="{"?l.inlinePairs++:c=="}"?l.inlinePairs--:c=="["?l.inlineList++:l.inlineList--,"meta";if(l.inlineList>0&&!d&&c==",")return s.next(),"meta";if(l.inlinePairs>0&&!d&&c==",")return l.keyCol=0,l.pair=!1,l.pairStart=!1,s.next(),"meta";if(l.pairStart){if(s.match(/^\s*(\||\>)\s*/))return l.literal=!0,"meta";if(s.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(l.inlinePairs==0&&s.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(l.inlinePairs>0&&s.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(s.match(i))return"keyword"}return!l.pair&&s.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(l.pair=!0,l.keyCol=s.indentation(),"atom"):l.pair&&s.match(/^:\s*/)?(l.pairStart=!0,"meta"):(l.pairStart=!1,l.escaped=c=="\\",s.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),n.defineMIME("text/x-yaml","yaml"),n.defineMIME("text/yaml","yaml")})});var Dh=se((Ch,Eh)=>{(function(n){typeof Ch=="object"&&typeof Eh=="object"?n(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineOption("scrollPastEnd",!1,function(s,l,c){c&&c!=n.Init&&(s.off("change",t),s.off("refresh",i),s.display.lineSpace.parentNode.style.paddingBottom="",s.state.scrollPastEndPadding=null),l&&(s.on("change",t),s.on("refresh",i),i(s))});function t(s,l){n.changeEnd(l).line==s.lastLine()&&i(s)}function i(s){var l="";if(s.lineCount()>1){var c=s.display.scroller.clientHeight-30,d=s.getLineHandle(s.lastLine()).height;l=c-d+"px"}s.state.scrollPastEndPadding!=l&&(s.state.scrollPastEndPadding=l,s.display.lineSpace.parentNode.style.paddingBottom=l,s.off("refresh",i),s.setSize(),s.on("refresh",i))}})});var Mh=se((L_,na)=>{"use strict";function ra(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ra=function(i){return typeof i}:ra=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ra(n)}function Wy(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Qs(n,t)}function Qs(n,t){return Qs=Object.setPrototypeOf||function(s,l){return s.__proto__=l,s},Qs(n,t)}function $y(n){var t=jy();return function(){var s=ia(n),l;if(t){var c=ia(this).constructor;l=Reflect.construct(s,arguments,c)}else l=s.apply(this,arguments);return Ah(this,l)}}function Ah(n,t){return t&&(ra(t)==="object"||typeof t=="function")?t:Vi(n)}function Vi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jy(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(n){return!1}}function ia(n){return ia=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},ia(n)}function We(n,t){var i;if(typeof Symbol=="undefined"||n[Symbol.iterator]==null){if(Array.isArray(n)||(i=Gy(n))||t&&n&&typeof n.length=="number"){i&&(n=i);var s=0,l=function(){};return{s:l,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(g){throw g},f:l}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,d=!1,h;return{s:function(){i=n[Symbol.iterator]()},n:function(){var g=i.next();return c=g.done,g},e:function(g){d=!0,h=g},f:function(){try{!c&&i.return!=null&&i.return()}finally{if(d)throw h}}}}function Gy(n,t){if(!n)return;if(typeof n=="string")return Th(n,t);var i=Object.prototype.toString.call(n).slice(8,-1);if(i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set")return Array.from(n);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Th(n,t)}function Th(n,t){(t==null||t>n.length)&&(t=n.length);for(var i=0,s=new Array(t);i1?l-1:0),d=1;d'),this.element.appendChild(c));var g=c.getElementsByTagName("span")[0];return g&&(g.textContent!=null?g.textContent=this.options.dictFallbackMessage:g.innerText!=null&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(c,d,h,p){var g={srcX:0,srcY:0,srcWidth:c.width,srcHeight:c.height},y=c.width/c.height;d==null&&h==null?(d=g.srcWidth,h=g.srcHeight):d==null?d=h*y:h==null&&(h=d/y),d=Math.min(d,g.srcWidth),h=Math.min(h,g.srcHeight);var m=d/h;if(g.srcWidth>d||g.srcHeight>h)if(p==="crop")y>m?(g.srcHeight=c.height,g.srcWidth=g.srcHeight*m):(g.srcWidth=c.width,g.srcHeight=g.srcWidth/m);else if(p==="contain")y>m?h=d/y:d=h*y;else throw new Error("Unknown resizeMethod '".concat(p,"'"));return g.srcX=(c.width-g.srcWidth)/2,g.srcY=(c.height-g.srcHeight)/2,g.trgWidth=d,g.trgHeight=h,g},transformFile:function(c,d){return(this.options.resizeWidth||this.options.resizeHeight)&&c.type.match(/image.*/)?this.resizeImage(c,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,d):d(c)},previewTemplate:`
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var O;p&&(O=window.scrollY),o.input.focus(),p&&window.scrollTo(null,O),o.input.reset(),a.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=$,o.selForContextMenu=a.doc.sel,clearTimeout(o.detectingSelectAll);function K(){if(l.selectionStart!=null){var oe=a.somethingSelected(),ue="​"+(oe?l.value:"");l.value="⇚",l.value=ue,r.prevInput=oe?"":"​",l.selectionStart=1,l.selectionEnd=ue.length,o.selForContextMenu=a.doc.sel}}function $(){if(r.contextMenuPending!=$)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=C,l.style.cssText=x,d&&h<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=v),l.selectionStart!=null){(!d||d&&h<9)&&K();var oe=0,ue=function(){o.selForContextMenu==a.doc.sel&&l.selectionStart==0&&l.selectionEnd>0&&r.prevInput=="​"?Lt(a,mc)(a):oe++<10?o.detectingSelectAll=setTimeout(ue,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(ue,200)}}if(d&&h>=9&&K(),G){Bt(e);var ne=function(){Re(window,"mouseup",ne),setTimeout($,20)};De(window,"mouseup",ne)}else setTimeout($,50)},gt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},gt.prototype.setUneditable=function(){},gt.prototype.needsContentAttribute=!1;function zy(e,r){if(r=r?T(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var a=q();r.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function o(){e.value=k.getValue()}var l;if(e.form&&(De(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var f=e.form;l=f.submit;try{var v=f.submit=function(){o(),f.submit=l,f.submit(),f.submit=v}}catch(x){}}r.finishInit=function(x){x.save=o,x.getTextArea=function(){return e},x.toTextArea=function(){x.toTextArea=isNaN,o(),e.parentNode.removeChild(x.getWrapperElement()),e.style.display="",e.form&&(Re(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=l))}},e.style.display="none";var k=lt(function(x){return e.parentNode.insertBefore(x,e.nextSibling)},r);return k}function Py(e){e.off=Re,e.on=De,e.wheelEventPixels=Ub,e.Doc=Zt,e.splitLines=Dn,e.countColumn=ce,e.findColumn=Ge,e.isWordChar=X,e.Pass=ze,e.signal=ct,e.Line=Pr,e.changeEnd=or,e.scrollbarModel=$u,e.Pos=W,e.cmpPos=he,e.modes=bi,e.mimeModes=jn,e.resolveMode=Hn,e.getMode=yi,e.modeExtensions=Un,e.extendMode=Qa,e.copyState=fn,e.startState=_o,e.innerMode=zr,e.commands=Ui,e.keyMap=Kn,e.keyName=Ic,e.isModifierKey=Tc,e.lookupKey=Yr,e.normalizeKeyMap=dy,e.StringStream=st,e.SharedTextMarker=Bi,e.TextMarker=sr,e.LineWidget=Ni,e.e_preventDefault=Ct,e.e_stopPropagation=wo,e.e_stop=Bt,e.addClass=I,e.contains=Q,e.rmClass=J,e.keyNames=lr}Dy(lt),Iy(lt);var Ry="iter insert remove copy getEditor constructor".split(" ");for(var Jo in Zt.prototype)Zt.prototype.hasOwnProperty(Jo)&&ie(Ry,Jo)<0&&(lt.prototype[Jo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Zt.prototype[Jo]));return Jn(Zt),lt.inputStyles={textarea:gt,contenteditable:et},lt.defineMode=function(e){!lt.defaults.mode&&e!="null"&&(lt.defaults.mode=e),qr.apply(this,arguments)},lt.defineMIME=bn,lt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),lt.defineMIME("text/plain","null"),lt.defineExtension=function(e,r){lt.prototype[e]=r},lt.defineDocExtension=function(e,r){Zt.prototype[e]=r},lt.fromTextArea=zy,Py(lt),lt.version="5.58.1",lt})});var Ks=le((Vi,Gs)=>{!function(t,n){typeof Vi=="object"&&typeof Gs=="object"?Gs.exports=n():typeof define=="function"&&define.amd?define([],n):typeof Vi=="object"?Vi.ClipboardJS=n():t.ClipboardJS=n()}(Vi,function(){return i={},t.m=n=[function(s,u){s.exports=function(c){var d;if(c.nodeName==="SELECT")c.focus(),d=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var h=c.hasAttribute("readonly");h||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),h||c.removeAttribute("readonly"),d=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var p=window.getSelection(),g=document.createRange();g.selectNodeContents(c),p.removeAllRanges(),p.addRange(g),d=p.toString()}return d}},function(s,u){function c(){}c.prototype={on:function(d,h,p){var g=this.e||(this.e={});return(g[d]||(g[d]=[])).push({fn:h,ctx:p}),this},once:function(d,h,p){var g=this;function y(){g.off(d,y),h.apply(p,arguments)}return y._=h,this.on(d,y,p)},emit:function(d){for(var h=[].slice.call(arguments,1),p=((this.e||(this.e={}))[d]||[]).slice(),g=0,y=p.length;g{(function(t){typeof Jc=="object"&&typeof ed=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("css",function(ee,J){var P=J.inline;J.propertyKeywords||(J=t.resolveMode("text/css"));var Z=ee.indentUnit,_=J.tokenHooks,V=J.documentTypes||{},j=J.mediaTypes||{},Q=J.mediaFeatures||{},q=J.mediaValueKeywords||{},I=J.propertyKeywords||{},H=J.nonStandardPropertyKeywords||{},ae=J.fontProperties||{},F=J.counterDescriptors||{},T=J.colorKeywords||{},ce=J.valueKeywords||{},de=J.allowNested,ie=J.lineComment,_e=J.supportsAtComponent===!0,ze,be;function we(X,se){return ze=se,X}function We(X,se){var te=X.next();if(_[te]){var Ne=_[te](X,se);if(Ne!==!1)return Ne}if(te=="@")return X.eatWhile(/[\w\\\-]/),we("def",X.current());if(te=="="||(te=="~"||te=="|")&&X.eat("="))return we(null,"compare");if(te=='"'||te=="'")return se.tokenize=Ge(te),se.tokenize(X,se);if(te=="#")return X.eatWhile(/[\w\\\-]/),we("atom","hash");if(te=="!")return X.match(/^\s*\w*/),we("keyword","important");if(/\d/.test(te)||te=="."&&X.eat(/\d/))return X.eatWhile(/[\w.%]/),we("number","unit");if(te==="-"){if(/[\d.]/.test(X.peek()))return X.eatWhile(/[\w.%]/),we("number","unit");if(X.match(/^-[\w\\\-]*/))return X.eatWhile(/[\w\\\-]/),X.match(/^\s*:/,!1)?we("variable-2","variable-definition"):we("variable-2","variable");if(X.match(/^\w+-/))return we("meta","meta")}else return/[,+>*\/]/.test(te)?we(null,"select-op"):te=="."&&X.match(/^-?[_a-z][_a-z0-9-]*/i)?we("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(te)?we(null,te):X.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(X.current().toLowerCase())&&(se.tokenize=nt),we("variable callee","variable")):/[\w\\\-]/.test(te)?(X.eatWhile(/[\w\\\-]/),we("property","word")):we(null,null)}function Ge(X){return function(se,te){for(var Ne=!1,_t;(_t=se.next())!=null;){if(_t==X&&!Ne){X==")"&&se.backUp(1);break}Ne=!Ne&&_t=="\\"}return(_t==X||!Ne&&X!=")")&&(te.tokenize=null),we("string","string")}}function nt(X,se){return X.next(),X.match(/\s*[\"\')]/,!1)?se.tokenize=null:se.tokenize=Ge(")"),we(null,"(")}function Tt(X,se,te){this.type=X,this.indent=se,this.prev=te}function xe(X,se,te,Ne){return X.context=new Tt(te,se.indentation()+(Ne===!1?0:Z),X.context),te}function tt(X){return X.context.prev&&(X.context=X.context.prev),X.context.type}function pt(X,se,te){return Fe[te.context.type](X,se,te)}function mt(X,se,te,Ne){for(var _t=Ne||1;_t>0;_t--)te.context=te.context.prev;return pt(X,se,te)}function Wt(X){var se=X.current().toLowerCase();ce.hasOwnProperty(se)?be="atom":T.hasOwnProperty(se)?be="keyword":be="variable"}var Fe={};return Fe.top=function(X,se,te){if(X=="{")return xe(te,se,"block");if(X=="}"&&te.context.prev)return tt(te);if(_e&&/@component/i.test(X))return xe(te,se,"atComponentBlock");if(/^@(-moz-)?document$/i.test(X))return xe(te,se,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(X))return xe(te,se,"atBlock");if(/^@(font-face|counter-style)/i.test(X))return te.stateArg=X,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(X))return"keyframes";if(X&&X.charAt(0)=="@")return xe(te,se,"at");if(X=="hash")be="builtin";else if(X=="word")be="tag";else{if(X=="variable-definition")return"maybeprop";if(X=="interpolation")return xe(te,se,"interpolation");if(X==":")return"pseudo";if(de&&X=="(")return xe(te,se,"parens")}return te.context.type},Fe.block=function(X,se,te){if(X=="word"){var Ne=se.current().toLowerCase();return I.hasOwnProperty(Ne)?(be="property","maybeprop"):H.hasOwnProperty(Ne)?(be="string-2","maybeprop"):de?(be=se.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(be+=" error","maybeprop")}else return X=="meta"?"block":!de&&(X=="hash"||X=="qualifier")?(be="error","block"):Fe.top(X,se,te)},Fe.maybeprop=function(X,se,te){return X==":"?xe(te,se,"prop"):pt(X,se,te)},Fe.prop=function(X,se,te){if(X==";")return tt(te);if(X=="{"&&de)return xe(te,se,"propBlock");if(X=="}"||X=="{")return mt(X,se,te);if(X=="(")return xe(te,se,"parens");if(X=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(se.current()))be+=" error";else if(X=="word")Wt(se);else if(X=="interpolation")return xe(te,se,"interpolation");return"prop"},Fe.propBlock=function(X,se,te){return X=="}"?tt(te):X=="word"?(be="property","maybeprop"):te.context.type},Fe.parens=function(X,se,te){return X=="{"||X=="}"?mt(X,se,te):X==")"?tt(te):X=="("?xe(te,se,"parens"):X=="interpolation"?xe(te,se,"interpolation"):(X=="word"&&Wt(se),"parens")},Fe.pseudo=function(X,se,te){return X=="meta"?"pseudo":X=="word"?(be="variable-3",te.context.type):pt(X,se,te)},Fe.documentTypes=function(X,se,te){return X=="word"&&V.hasOwnProperty(se.current())?(be="tag",te.context.type):Fe.atBlock(X,se,te)},Fe.atBlock=function(X,se,te){if(X=="(")return xe(te,se,"atBlock_parens");if(X=="}"||X==";")return mt(X,se,te);if(X=="{")return tt(te)&&xe(te,se,de?"block":"top");if(X=="interpolation")return xe(te,se,"interpolation");if(X=="word"){var Ne=se.current().toLowerCase();Ne=="only"||Ne=="not"||Ne=="and"||Ne=="or"?be="keyword":j.hasOwnProperty(Ne)?be="attribute":Q.hasOwnProperty(Ne)?be="property":q.hasOwnProperty(Ne)?be="keyword":I.hasOwnProperty(Ne)?be="property":H.hasOwnProperty(Ne)?be="string-2":ce.hasOwnProperty(Ne)?be="atom":T.hasOwnProperty(Ne)?be="keyword":be="error"}return te.context.type},Fe.atComponentBlock=function(X,se,te){return X=="}"?mt(X,se,te):X=="{"?tt(te)&&xe(te,se,de?"block":"top",!1):(X=="word"&&(be="error"),te.context.type)},Fe.atBlock_parens=function(X,se,te){return X==")"?tt(te):X=="{"||X=="}"?mt(X,se,te,2):Fe.atBlock(X,se,te)},Fe.restricted_atBlock_before=function(X,se,te){return X=="{"?xe(te,se,"restricted_atBlock"):X=="word"&&te.stateArg=="@counter-style"?(be="variable","restricted_atBlock_before"):pt(X,se,te)},Fe.restricted_atBlock=function(X,se,te){return X=="}"?(te.stateArg=null,tt(te)):X=="word"?(te.stateArg=="@font-face"&&!ae.hasOwnProperty(se.current().toLowerCase())||te.stateArg=="@counter-style"&&!F.hasOwnProperty(se.current().toLowerCase())?be="error":be="property","maybeprop"):"restricted_atBlock"},Fe.keyframes=function(X,se,te){return X=="word"?(be="variable","keyframes"):X=="{"?xe(te,se,"top"):pt(X,se,te)},Fe.at=function(X,se,te){return X==";"?tt(te):X=="{"||X=="}"?mt(X,se,te):(X=="word"?be="tag":X=="hash"&&(be="builtin"),"at")},Fe.interpolation=function(X,se,te){return X=="}"?tt(te):X=="{"||X==";"?mt(X,se,te):(X=="word"?be="variable":X!="variable"&&X!="("&&X!=")"&&(be="error"),"interpolation")},{startState:function(X){return{tokenize:null,state:P?"block":"top",stateArg:null,context:new Tt(P?"block":"top",X||0,null)}},token:function(X,se){if(!se.tokenize&&X.eatSpace())return null;var te=(se.tokenize||We)(X,se);return te&&typeof te=="object"&&(ze=te[1],te=te[0]),be=te,ze!="comment"&&(se.state=Fe[se.state](ze,X,se)),be},indent:function(X,se){var te=X.context,Ne=se&&se.charAt(0),_t=te.indent;return te.type=="prop"&&(Ne=="}"||Ne==")")&&(te=te.prev),te.prev&&(Ne=="}"&&(te.type=="block"||te.type=="top"||te.type=="interpolation"||te.type=="restricted_atBlock")?(te=te.prev,_t=te.indent):(Ne==")"&&(te.type=="parens"||te.type=="atBlock_parens")||Ne=="{"&&(te.type=="at"||te.type=="atBlock"))&&(_t=Math.max(0,te.indent-Z))),_t},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:ie,fold:"brace"}});function n(ee){for(var J={},P=0;P{(function(t){typeof td=="object"&&typeof nd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(q,I,H,ae,F,T){this.indented=q,this.column=I,this.type=H,this.info=ae,this.align=F,this.prev=T}function i(q,I,H,ae){var F=q.indented;return q.context&&q.context.type=="statement"&&H!="statement"&&(F=q.context.indented),q.context=new n(F,I,H,ae,null,q.context)}function s(q){var I=q.context.type;return(I==")"||I=="]"||I=="}")&&(q.indented=q.context.indented),q.context=q.context.prev}function u(q,I,H){if(I.prevToken=="variable"||I.prevToken=="type")return!0;if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(q.string.slice(0,H)))return!0;if(I.typeAtEndOfLine&&q.column()==q.indentation())return!0}function c(q){for(;;){if(!q||q.type=="top")return!0;if(q.type=="}"&&q.prev.info!="namespace")return!1;q=q.prev}}t.defineMode("clike",function(q,I){var H=q.indentUnit,ae=I.statementIndentUnit||H,F=I.dontAlignCalls,T=I.keywords||{},ce=I.types||{},de=I.builtin||{},ie=I.blockKeywords||{},_e=I.defKeywords||{},ze=I.atoms||{},be=I.hooks||{},we=I.multiLineStrings,We=I.indentStatements!==!1,Ge=I.indentSwitch!==!1,nt=I.namespaceSeparator,Tt=I.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,xe=I.numberStart||/[\d\.]/,tt=I.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,pt=I.isOperatorChar||/[+\-*&%=<>!?|\/]/,mt=I.isIdentifierChar||/[\w\$_\xa1-\uffff]/,Wt=I.isReservedIdentifier||!1,Fe,X;function se(Ee,Le){var ye=Ee.next();if(be[ye]){var Te=be[ye](Ee,Le);if(Te!==!1)return Te}if(ye=='"'||ye=="'")return Le.tokenize=te(ye),Le.tokenize(Ee,Le);if(Tt.test(ye))return Fe=ye,null;if(xe.test(ye)){if(Ee.backUp(1),Ee.match(tt))return"number";Ee.next()}if(ye=="/"){if(Ee.eat("*"))return Le.tokenize=Ne,Ne(Ee,Le);if(Ee.eat("/"))return Ee.skipToEnd(),"comment"}if(pt.test(ye)){for(;!Ee.match(/^\/[\/*]/,!1)&&Ee.eat(pt););return"operator"}if(Ee.eatWhile(mt),nt)for(;Ee.match(nt);)Ee.eatWhile(mt);var Ve=Ee.current();return h(T,Ve)?(h(ie,Ve)&&(Fe="newstatement"),h(_e,Ve)&&(X=!0),"keyword"):h(ce,Ve)?"type":h(de,Ve)||Wt&&Wt(Ve)?(h(ie,Ve)&&(Fe="newstatement"),"builtin"):h(ze,Ve)?"atom":"variable"}function te(Ee){return function(Le,ye){for(var Te=!1,Ve,hn=!1;(Ve=Le.next())!=null;){if(Ve==Ee&&!Te){hn=!0;break}Te=!Te&&Ve=="\\"}return(hn||!(Te||we))&&(ye.tokenize=null),"string"}}function Ne(Ee,Le){for(var ye=!1,Te;Te=Ee.next();){if(Te=="/"&&ye){Le.tokenize=null;break}ye=Te=="*"}return"comment"}function _t(Ee,Le){I.typeFirstDefinitions&&Ee.eol()&&c(Le.context)&&(Le.typeAtEndOfLine=u(Ee,Le,Ee.pos))}return{startState:function(Ee){return{tokenize:null,context:new n((Ee||0)-H,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(Ee,Le){var ye=Le.context;if(Ee.sol()&&(ye.align==null&&(ye.align=!1),Le.indented=Ee.indentation(),Le.startOfLine=!0),Ee.eatSpace())return _t(Ee,Le),null;Fe=X=null;var Te=(Le.tokenize||se)(Ee,Le);if(Te=="comment"||Te=="meta")return Te;if(ye.align==null&&(ye.align=!0),Fe==";"||Fe==":"||Fe==","&&Ee.match(/^\s*(?:\/\/.*)?$/,!1))for(;Le.context.type=="statement";)s(Le);else if(Fe=="{")i(Le,Ee.column(),"}");else if(Fe=="[")i(Le,Ee.column(),"]");else if(Fe=="(")i(Le,Ee.column(),")");else if(Fe=="}"){for(;ye.type=="statement";)ye=s(Le);for(ye.type=="}"&&(ye=s(Le));ye.type=="statement";)ye=s(Le)}else Fe==ye.type?s(Le):We&&((ye.type=="}"||ye.type=="top")&&Fe!=";"||ye.type=="statement"&&Fe=="newstatement")&&i(Le,Ee.column(),"statement",Ee.current());if(Te=="variable"&&(Le.prevToken=="def"||I.typeFirstDefinitions&&u(Ee,Le,Ee.start)&&c(Le.context)&&Ee.match(/^\s*\(/,!1))&&(Te="def"),be.token){var Ve=be.token(Ee,Le,Te);Ve!==void 0&&(Te=Ve)}return Te=="def"&&I.styleDefs===!1&&(Te="variable"),Le.startOfLine=!1,Le.prevToken=X?"def":Te||Fe,_t(Ee,Le),Te},indent:function(Ee,Le){if(Ee.tokenize!=se&&Ee.tokenize!=null||Ee.typeAtEndOfLine)return t.Pass;var ye=Ee.context,Te=Le&&Le.charAt(0),Ve=Te==ye.type;if(ye.type=="statement"&&Te=="}"&&(ye=ye.prev),I.dontIndentStatements)for(;ye.type=="statement"&&I.dontIndentStatements.test(ye.info);)ye=ye.prev;if(be.indent){var hn=be.indent(Ee,ye,Le,H);if(typeof hn=="number")return hn}var Pt=ye.prev&&ye.prev.info=="switch";if(I.allmanIndentation&&/[{(]/.test(Te)){for(;ye.type!="top"&&ye.type!="}";)ye=ye.prev;return ye.indented}return ye.type=="statement"?ye.indented+(Te=="{"?0:ae):ye.align&&(!F||ye.type!=")")?ye.column+(Ve?0:1):ye.type==")"&&!Ve?ye.indented+ae:ye.indented+(Ve?0:H)+(!Ve&&Pt&&!/^(?:case|default)\b/.test(Le)?H:0)},electricInput:Ge?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function d(q){for(var I={},H=q.split(" "),ae=0;ae!?|\/#:@]/,hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},'"':function(q,I){return q.match('""')?(I.tokenize=Z,I.tokenize(q,I)):!1},"'":function(q){return q.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(q,I){var H=I.context;return H.type=="}"&&H.align&&q.eat(">")?(I.context=new n(H.indented,H.column,H.type,H.info,null,H.prev),"operator"):!1},"/":function(q,I){return q.eat("*")?(I.tokenize=_(1),I.tokenize(q,I)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function V(q){return function(I,H){for(var ae=!1,F,T=!1;!I.eol();){if(!q&&!ae&&I.match('"')){T=!0;break}if(q&&I.match('"""')){T=!0;break}F=I.next(),!ae&&F=="$"&&I.match("{")&&I.skipTo("}"),ae=!ae&&F=="\\"&&!q}return(T||!q)&&(H.tokenize=null),"string"}}P("text/x-kotlin",{name:"clike",keywords:d("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:d("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:d("catch class do else finally for if where try while enum"),defKeywords:d("class val var object interface fun"),atoms:d("true false null this"),hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},"*":function(q,I){return I.prevToken=="."?"variable":"operator"},'"':function(q,I){return I.tokenize=V(q.match('""')),I.tokenize(q,I)},"/":function(q,I){return q.eat("*")?(I.tokenize=_(1),I.tokenize(q,I)):!1},indent:function(q,I,H,ae){var F=H&&H.charAt(0);if((q.prevToken=="}"||q.prevToken==")")&&H=="")return q.indented;if(q.prevToken=="operator"&&H!="}"&&q.context.type!="}"||q.prevToken=="variable"&&F=="."||(q.prevToken=="}"||q.prevToken==")")&&F==".")return ae*2+I.indented;if(I.align&&I.type=="}")return I.indented+(q.context.type==(H||"").charAt(0)?0:ae)}},modeProps:{closeBrackets:{triples:'"'}}}),P(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:d("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:d("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:d("for while do if else struct"),builtin:d("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:d("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":A},modeProps:{fold:["brace","include"]}}),P("text/x-nesc",{name:"clike",keywords:d(p+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:D,blockKeywords:d(S),atoms:d("null true false"),hooks:{"#":A},modeProps:{fold:["brace","include"]}}),P("text/x-objectivec",{name:"clike",keywords:d(p+" "+y),types:E,builtin:d(m),blockKeywords:d(S+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:d(z+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:U,hooks:{"#":A,"*":R},modeProps:{fold:["brace","include"]}}),P("text/x-objectivec++",{name:"clike",keywords:d(p+" "+y+" "+g),types:E,builtin:d(m),blockKeywords:d(S+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:d(z+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:U,hooks:{"#":A,"*":R,u:B,U:B,L:B,R:B,"0":Y,"1":Y,"2":Y,"3":Y,"4":Y,"5":Y,"6":Y,"7":Y,"8":Y,"9":Y,token:function(q,I,H){if(H=="variable"&&q.peek()=="("&&(I.prevToken==";"||I.prevToken==null||I.prevToken=="}")&&G(q.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),P("text/x-squirrel",{name:"clike",keywords:d("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:D,blockKeywords:d("case catch class else for foreach if switch try while"),defKeywords:d("function local class"),typeFirstDefinitions:!0,atoms:d("true false null"),hooks:{"#":A},modeProps:{fold:["brace","include"]}});var j=null;function Q(q){return function(I,H){for(var ae=!1,F,T=!1;!I.eol();){if(!ae&&I.match('"')&&(q=="single"||I.match('""'))){T=!0;break}if(!ae&&I.match("``")){j=Q(q),T=!0;break}F=I.next(),ae=q=="single"&&!ae&&F=="\\"}return T&&(H.tokenize=null),"string"}}P("text/x-ceylon",{name:"clike",keywords:d("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(q){var I=q.charAt(0);return I===I.toUpperCase()&&I!==I.toLowerCase()},blockKeywords:d("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:d("class dynamic function interface module object package value"),builtin:d("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:d("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},'"':function(q,I){return I.tokenize=Q(q.match('""')?"triple":"single"),I.tokenize(q,I)},"`":function(q,I){return!j||!q.match("`")?!1:(I.tokenize=j,j=null,I.tokenize(q,I))},"'":function(q){return q.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(q,I,H){if((H=="variable"||H=="type")&&I.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var od=le((rd,id)=>{(function(t){typeof rd=="object"&&typeof id=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("diff",function(){var n={"+":"positive","-":"negative","@":"meta"};return{token:function(i){var s=i.string.search(/[\t ]+?$/);if(!i.sol()||s===0)return i.skipToEnd(),("error "+(n[i.string.charAt(0)]||"")).replace(/ $/,"");var u=n[i.peek()]||i.skipToEnd();return s===-1?i.skipToEnd():i.pos=s,u}}}),t.defineMIME("text/x-diff","diff")})});var ld=le((ad,sd)=>{(function(t){typeof ad=="object"&&typeof sd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("fortran",function(){function n(g){for(var y={},m=0;m\/\:]/,d=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");function h(g,y){if(g.match(d))return"operator";var m=g.next();if(m=="!")return g.skipToEnd(),"comment";if(m=='"'||m=="'")return y.tokenize=p(m),y.tokenize(g,y);if(/[\[\]\(\),]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(c.test(m))return g.eatWhile(c),"operator";g.eatWhile(/[\w\$_]/);var b=g.current().toLowerCase();return i.hasOwnProperty(b)?"keyword":s.hasOwnProperty(b)||u.hasOwnProperty(b)?"builtin":"variable"}function p(g){return function(y,m){for(var b=!1,w,D=!1;(w=y.next())!=null;){if(w==g&&!b){D=!0;break}b=!b&&w=="\\"}return(D||!b)&&(m.tokenize=null),"string"}}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||h)(g,y);return m=="comment"||m=="meta",m}}}),t.defineMIME("text/x-fortran","fortran")})});var dd=le((ud,cd)=>{(function(t){typeof ud=="object"&&typeof cd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("go",function(n){var i=n.indentUnit,s={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},u={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},c=/[+\-*&^%:=<>!|\/]/,d;function h(w,D){var E=w.next();if(E=='"'||E=="'"||E=="`")return D.tokenize=p(E),D.tokenize(w,D);if(/[\d\.]/.test(E))return E=="."?w.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):E=="0"?w.match(/^[xX][0-9a-fA-F]+/)||w.match(/^0[0-7]+/):w.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(E))return d=E,null;if(E=="/"){if(w.eat("*"))return D.tokenize=g,g(w,D);if(w.eat("/"))return w.skipToEnd(),"comment"}if(c.test(E))return w.eatWhile(c),"operator";w.eatWhile(/[\w\$_\xa1-\uffff]/);var S=w.current();return s.propertyIsEnumerable(S)?((S=="case"||S=="default")&&(d="case"),"keyword"):u.propertyIsEnumerable(S)?"atom":"variable"}function p(w){return function(D,E){for(var S=!1,z,A=!1;(z=D.next())!=null;){if(z==w&&!S){A=!0;break}S=!S&&w!="`"&&z=="\\"}return(A||!(S||w=="`"))&&(E.tokenize=h),"string"}}function g(w,D){for(var E=!1,S;S=w.next();){if(S=="/"&&E){D.tokenize=h;break}E=S=="*"}return"comment"}function y(w,D,E,S,z){this.indented=w,this.column=D,this.type=E,this.align=S,this.prev=z}function m(w,D,E){return w.context=new y(w.indented,D,E,null,w.context)}function b(w){if(!w.context.prev)return;var D=w.context.type;return(D==")"||D=="]"||D=="}")&&(w.indented=w.context.indented),w.context=w.context.prev}return{startState:function(w){return{tokenize:null,context:new y((w||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(w,D){var E=D.context;if(w.sol()&&(E.align==null&&(E.align=!1),D.indented=w.indentation(),D.startOfLine=!0,E.type=="case"&&(E.type="}")),w.eatSpace())return null;d=null;var S=(D.tokenize||h)(w,D);return S=="comment"||(E.align==null&&(E.align=!0),d=="{"?m(D,w.column(),"}"):d=="["?m(D,w.column(),"]"):d=="("?m(D,w.column(),")"):d=="case"?E.type="case":(d=="}"&&E.type=="}"||d==E.type)&&b(D),D.startOfLine=!1),S},indent:function(w,D){if(w.tokenize!=h&&w.tokenize!=null)return t.Pass;var E=w.context,S=D&&D.charAt(0);if(E.type=="case"&&/^(?:case|default)\b/.test(D))return w.context.type="}",E.indented;var z=S==E.type;return E.align?E.column+(z?0:1):E.indented+(z?0:i)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),t.defineMIME("text/x-go","go")})});var pd=le((hd,fd)=>{(function(t){typeof hd=="object"&&typeof fd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("haskell",function(n,i){function s(A,R,U){return R(U),U(A,R)}var u=/[a-z_]/,c=/[A-Z]/,d=/\d/,h=/[0-9A-Fa-f]/,p=/[0-7]/,g=/[a-z_A-Z0-9'\xa1-\uffff]/,y=/[-!#$%&*+.\/<=>?@\\^|~:]/,m=/[(),;[\]`{}]/,b=/[ \t\v\f]/;function w(A,R){if(A.eatWhile(b))return null;var U=A.next();if(m.test(U)){if(U=="{"&&A.eat("-")){var Y="comment";return A.eat("#")&&(Y="meta"),s(A,R,D(Y,1))}return null}if(U=="'")return A.eat("\\"),A.next(),A.eat("'")?"string":"string error";if(U=='"')return s(A,R,E);if(c.test(U))return A.eatWhile(g),A.eat(".")?"qualifier":"variable-2";if(u.test(U))return A.eatWhile(g),"variable";if(d.test(U)){if(U=="0"){if(A.eat(/[xX]/))return A.eatWhile(h),"integer";if(A.eat(/[oO]/))return A.eatWhile(p),"number"}A.eatWhile(d);var Y="number";return A.match(/^\.\d+/)&&(Y="number"),A.eat(/[eE]/)&&(Y="number",A.eat(/[-+]/),A.eatWhile(d)),Y}if(U=="."&&A.eat("."))return"keyword";if(y.test(U)){if(U=="-"&&A.eat(/-/)&&(A.eatWhile(/-/),!A.eat(y)))return A.skipToEnd(),"comment";var Y="variable";return U==":"&&(Y="variable-2"),A.eatWhile(y),Y}return"error"}function D(A,R){return R==0?w:function(U,Y){for(var B=R;!U.eol();){var G=U.next();if(G=="{"&&U.eat("-"))++B;else if(G=="-"&&U.eat("}")&&(--B,B==0))return Y(w),A}return Y(D(A,B)),A}}function E(A,R){for(;!A.eol();){var U=A.next();if(U=='"')return R(w),"string";if(U=="\\"){if(A.eol()||A.eat(b))return R(S),"string";A.eat("&")||A.next()}}return R(w),"string error"}function S(A,R){return A.eat("\\")?s(A,R,E):(A.next(),R(w),"error")}var z=function(){var A={};function R(B){return function(){for(var G=0;G","@","~","=>"),R("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),R("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),R("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var U=i.overrideKeywords;if(U)for(var Y in U)U.hasOwnProperty(Y)&&(A[Y]=U[Y]);return A}();return{startState:function(){return{f:w}},copyState:function(A){return{f:A.f}},token:function(A,R){var U=R.f(A,function(B){R.f=B}),Y=A.current();return z.hasOwnProperty(Y)?z[Y]:U},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),t.defineMIME("text/x-haskell","haskell")})});var ta=le((md,gd)=>{(function(t){typeof md=="object"&&typeof gd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";var n={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(s,u){var c=s.indentUnit,d={},h=u.htmlMode?n:i;for(var p in h)d[p]=h[p];for(var p in u)d[p]=u[p];var g,y;function m(_,V){function j(I){return V.tokenize=I,I(_,V)}var Q=_.next();if(Q=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?j(D("atom","]]>")):null:_.match("--")?j(D("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),j(E(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),V.tokenize=D("meta","?>"),"meta"):(g=_.eat("/")?"closeTag":"openTag",V.tokenize=b,"tag bracket");if(Q=="&"){var q;return _.eat("#")?_.eat("x")?q=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):q=_.eatWhile(/[\d]/)&&_.eat(";"):q=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),q?"atom":"error"}else return _.eatWhile(/[^&<]/),null}m.isInText=!0;function b(_,V){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return V.tokenize=m,g=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return g="equals",null;if(j=="<"){V.tokenize=m,V.state=R,V.tagName=V.tagStart=null;var Q=V.tokenize(_,V);return Q?Q+" tag error":"tag error"}else return/[\'\"]/.test(j)?(V.tokenize=w(j),V.stringStartCol=_.column(),V.tokenize(_,V)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function w(_){var V=function(j,Q){for(;!j.eol();)if(j.next()==_){Q.tokenize=b;break}return"string"};return V.isInAttribute=!0,V}function D(_,V){return function(j,Q){for(;!j.eol();){if(j.match(V)){Q.tokenize=m;break}j.next()}return _}}function E(_){return function(V,j){for(var Q;(Q=V.next())!=null;){if(Q=="<")return j.tokenize=E(_+1),j.tokenize(V,j);if(Q==">")if(_==1){j.tokenize=m;break}else return j.tokenize=E(_-1),j.tokenize(V,j)}return"meta"}}function S(_,V,j){this.prev=_.context,this.tagName=V,this.indent=_.indented,this.startOfLine=j,(d.doNotIndent.hasOwnProperty(V)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function z(_){_.context&&(_.context=_.context.prev)}function A(_,V){for(var j;;){if(!_.context)return;if(j=_.context.tagName,!d.contextGrabbers.hasOwnProperty(j)||!d.contextGrabbers[j].hasOwnProperty(V))return;z(_)}}function R(_,V,j){return _=="openTag"?(j.tagStart=V.column(),U):_=="closeTag"?Y:R}function U(_,V,j){return _=="word"?(j.tagName=V.current(),y="tag",ee):d.allowMissingTagName&&_=="endTag"?(y="tag bracket",ee(_,V,j)):(y="error",U)}function Y(_,V,j){if(_=="word"){var Q=V.current();return j.context&&j.context.tagName!=Q&&d.implicitlyClosed.hasOwnProperty(j.context.tagName)&&z(j),j.context&&j.context.tagName==Q||d.matchClosing===!1?(y="tag",B):(y="tag error",G)}else return d.allowMissingTagName&&_=="endTag"?(y="tag bracket",B(_,V,j)):(y="error",G)}function B(_,V,j){return _!="endTag"?(y="error",B):(z(j),R)}function G(_,V,j){return y="error",B(_,V,j)}function ee(_,V,j){if(_=="word")return y="attribute",J;if(_=="endTag"||_=="selfcloseTag"){var Q=j.tagName,q=j.tagStart;return j.tagName=j.tagStart=null,_=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(Q)?A(j,Q):(A(j,Q),j.context=new S(j,Q,q==j.indented)),R}return y="error",ee}function J(_,V,j){return _=="equals"?P:(d.allowMissing||(y="error"),ee(_,V,j))}function P(_,V,j){return _=="string"?Z:_=="word"&&d.allowUnquoted?(y="string",ee):(y="error",ee(_,V,j))}function Z(_,V,j){return _=="string"?Z:ee(_,V,j)}return{startState:function(_){var V={tokenize:m,state:R,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(V.baseIndent=_),V},token:function(_,V){if(!V.tagName&&_.sol()&&(V.indented=_.indentation()),_.eatSpace())return null;g=null;var j=V.tokenize(_,V);return(j||g)&&j!="comment"&&(y=null,V.state=V.state(g||j,_,V),y&&(j=y=="error"?j+" error":y)),j},indent:function(_,V,j){var Q=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+c;if(Q&&Q.noIndent)return t.Pass;if(_.tokenize!=b&&_.tokenize!=m)return j?j.match(/^(\s*)/)[0].length:0;if(_.tagName)return d.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+c*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/$/,blockCommentStart:"",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(_){_.state==P&&(_.state=ee)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var V=[],j=_.context;j;j=j.prev)j.tagName&&V.push(j.tagName);return V.reverse()}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var Xs=le((vd,bd)=>{(function(t){typeof vd=="object"&&typeof bd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("javascript",function(n,i){var s=n.indentUnit,u=i.statementIndent,c=i.jsonld,d=i.json||c,h=i.typescript,p=i.wordCharacters||/[\w$\xa1-\uffff]/,g=function(){function L(St){return{type:St,style:"keyword"}}var N=L("keyword a"),re=L("keyword b"),W=L("keyword c"),he=L("keyword d"),He=L("operator"),Ze={type:"atom",style:"atom"};return{if:L("if"),while:N,with:N,else:re,do:re,try:re,finally:re,return:he,break:he,continue:he,new:L("new"),delete:W,void:W,throw:W,debugger:L("debugger"),var:L("var"),const:L("var"),let:L("var"),function:L("function"),catch:L("catch"),for:L("for"),switch:L("switch"),case:L("case"),default:L("default"),in:He,typeof:He,instanceof:He,true:Ze,false:Ze,null:Ze,undefined:Ze,NaN:Ze,Infinity:Ze,this:L("this"),class:L("class"),super:L("atom"),yield:W,export:L("export"),import:L("import"),extends:W,await:W}}(),y=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function b(L){for(var N=!1,re,W=!1;(re=L.next())!=null;){if(!N){if(re=="/"&&!W)return;re=="["?W=!0:W&&re=="]"&&(W=!1)}N=!N&&re=="\\"}}var w,D;function E(L,N,re){return w=L,D=re,N}function S(L,N){var re=L.next();if(re=='"'||re=="'")return N.tokenize=z(re),N.tokenize(L,N);if(re=="."&&L.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(re=="."&&L.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(re))return E(re);if(re=="="&&L.eat(">"))return E("=>","operator");if(re=="0"&&L.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(re))return L.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(re=="/")return L.eat("*")?(N.tokenize=A,A(L,N)):L.eat("/")?(L.skipToEnd(),E("comment","comment")):Ke(L,N,1)?(b(L),L.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(L.eat("="),E("operator","operator",L.current()));if(re=="`")return N.tokenize=R,R(L,N);if(re=="#"&&L.peek()=="!")return L.skipToEnd(),E("meta","meta");if(re=="#"&&L.eatWhile(p))return E("variable","property");if(re=="<"&&L.match("!--")||re=="-"&&L.match("->")&&!/\S/.test(L.string.slice(0,L.start)))return L.skipToEnd(),E("comment","comment");if(y.test(re))return(re!=">"||!N.lexical||N.lexical.type!=">")&&(L.eat("=")?(re=="!"||re=="=")&&L.eat("="):/[<>*+\-|&?]/.test(re)&&(L.eat(re),re==">"&&L.eat(re))),re=="?"&&L.eat(".")?E("."):E("operator","operator",L.current());if(p.test(re)){L.eatWhile(p);var W=L.current();if(N.lastType!="."){if(g.propertyIsEnumerable(W)){var he=g[W];return E(he.type,he.style,W)}if(W=="async"&&L.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",W)}return E("variable","variable",W)}}function z(L){return function(N,re){var W=!1,he;if(c&&N.peek()=="@"&&N.match(m))return re.tokenize=S,E("jsonld-keyword","meta");for(;(he=N.next())!=null&&!(he==L&&!W);)W=!W&&he=="\\";return W||(re.tokenize=S),E("string","string")}}function A(L,N){for(var re=!1,W;W=L.next();){if(W=="/"&&re){N.tokenize=S;break}re=W=="*"}return E("comment","comment")}function R(L,N){for(var re=!1,W;(W=L.next())!=null;){if(!re&&(W=="`"||W=="$"&&L.eat("{"))){N.tokenize=S;break}re=!re&&W=="\\"}return E("quasi","string-2",L.current())}var U="([{}])";function Y(L,N){N.fatArrowAt&&(N.fatArrowAt=null);var re=L.string.indexOf("=>",L.start);if(re<0)return;if(h){var W=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(L.string.slice(L.start,re));W&&(re=W.index)}for(var he=0,He=!1,Ze=re-1;Ze>=0;--Ze){var St=L.string.charAt(Ze),Yt=U.indexOf(St);if(Yt>=0&&Yt<3){if(!he){++Ze;break}if(--he==0){St=="("&&(He=!0);break}}else if(Yt>=3&&Yt<6)++he;else if(p.test(St))He=!0;else if(/["'\/`]/.test(St))for(;;--Ze){if(Ze==0)return;var Co=L.string.charAt(Ze-1);if(Co==St&&L.string.charAt(Ze-2)!="\\"){Ze--;break}}else if(He&&!he){++Ze;break}}He&&!he&&(N.fatArrowAt=Ze)}var B={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function G(L,N,re,W,he,He){this.indented=L,this.column=N,this.type=re,this.prev=he,this.info=He,W!=null&&(this.align=W)}function ee(L,N){for(var re=L.localVars;re;re=re.next)if(re.name==N)return!0;for(var W=L.context;W;W=W.prev)for(var re=W.vars;re;re=re.next)if(re.name==N)return!0}function J(L,N,re,W,he){var He=L.cc;for(P.state=L,P.stream=he,P.marked=null,P.cc=He,P.style=N,L.lexical.hasOwnProperty("align")||(L.lexical.align=!0);;){var Ze=He.length?He.pop():d?we:ze;if(Ze(re,W)){for(;He.length&&He[He.length-1].lex;)He.pop()();return P.marked?P.marked:re=="variable"&&ee(L,W)?"variable-2":N}}}var P={state:null,column:null,marked:null,cc:null};function Z(){for(var L=arguments.length-1;L>=0;L--)P.cc.push(arguments[L])}function _(){return Z.apply(null,arguments),!0}function V(L,N){for(var re=N;re;re=re.next)if(re.name==L)return!0;return!1}function j(L){var N=P.state;if(P.marked="def",N.context){if(N.lexical.info=="var"&&N.context&&N.context.block){var re=Q(L,N.context);if(re!=null){N.context=re;return}}else if(!V(L,N.localVars)){N.localVars=new H(L,N.localVars);return}}i.globalVars&&!V(L,N.globalVars)&&(N.globalVars=new H(L,N.globalVars))}function Q(L,N){if(N)if(N.block){var re=Q(L,N.prev);return re?re==N.prev?N:new I(re,N.vars,!0):null}else return V(L,N.vars)?N:new I(N.prev,new H(L,N.vars),!1);else return null}function q(L){return L=="public"||L=="private"||L=="protected"||L=="abstract"||L=="readonly"}function I(L,N,re){this.prev=L,this.vars=N,this.block=re}function H(L,N){this.name=L,this.next=N}var ae=new H("this",new H("arguments",null));function F(){P.state.context=new I(P.state.context,P.state.localVars,!1),P.state.localVars=ae}function T(){P.state.context=new I(P.state.context,P.state.localVars,!0),P.state.localVars=null}function ce(){P.state.localVars=P.state.context.vars,P.state.context=P.state.context.prev}ce.lex=!0;function de(L,N){var re=function(){var W=P.state,he=W.indented;if(W.lexical.type=="stat")he=W.lexical.indented;else for(var He=W.lexical;He&&He.type==")"&&He.align;He=He.prev)he=He.indented;W.lexical=new G(he,P.stream.column(),L,null,W.lexical,N)};return re.lex=!0,re}function ie(){var L=P.state;L.lexical.prev&&(L.lexical.type==")"&&(L.indented=L.lexical.indented),L.lexical=L.lexical.prev)}ie.lex=!0;function _e(L){function N(re){return re==L?_():L==";"||re=="}"||re==")"||re=="]"?Z():_(N)}return N}function ze(L,N){return L=="var"?_(de("vardef",N),fr,_e(";"),ie):L=="keyword a"?_(de("form"),Ge,ze,ie):L=="keyword b"?_(de("form"),ze,ie):L=="keyword d"?P.stream.match(/^\s*$/,!1)?_():_(de("stat"),Tt,_e(";"),ie):L=="debugger"?_(_e(";")):L=="{"?_(de("}"),T,hn,ie,ce):L==";"?_():L=="if"?(P.state.lexical.info=="else"&&P.state.cc[P.state.cc.length-1]==ie&&P.state.cc.pop()(),_(de("form"),Ge,ze,ie,xo)):L=="function"?_(An):L=="for"?_(de("form"),Fr,ze,ie):L=="class"||h&&N=="interface"?(P.marked="keyword",_(de("form",L=="class"?L:N),jn,ie)):L=="variable"?h&&N=="declare"?(P.marked="keyword",_(ze)):h&&(N=="module"||N=="enum"||N=="type")&&P.stream.match(/^\s*\w/,!1)?(P.marked="keyword",N=="enum"?_(Tn):N=="type"?_(Mr,_e("operator"),Re,_e(";")):_(de("form"),Bt,_e("{"),de("}"),hn,ie,ie)):h&&N=="namespace"?(P.marked="keyword",_(de("form"),we,ze,ie)):h&&N=="abstract"?(P.marked="keyword",_(ze)):_(de("stat"),Ne):L=="switch"?_(de("form"),Ge,_e("{"),de("}","switch"),T,hn,ie,ie,ce):L=="case"?_(we,_e(":")):L=="default"?_(_e(":")):L=="catch"?_(de("form"),F,be,ze,ie,ce):L=="export"?_(de("stat"),yi,ie):L=="import"?_(de("stat"),Qa,ie):L=="async"?_(ze):N=="@"?_(we,ze):Z(de("stat"),we,_e(";"),ie)}function be(L){if(L=="(")return _(Bn,_e(")"))}function we(L,N){return nt(L,N,!1)}function We(L,N){return nt(L,N,!0)}function Ge(L){return L!="("?Z():_(de(")"),Tt,_e(")"),ie)}function nt(L,N,re){if(P.state.fatArrowAt==P.stream.start){var W=re?Fe:Wt;if(L=="(")return _(F,de(")"),Te(Bn,")"),ie,_e("=>"),W,ce);if(L=="variable")return Z(F,Bt,_e("=>"),W,ce)}var he=re?tt:xe;return B.hasOwnProperty(L)?_(he):L=="function"?_(An,he):L=="class"||h&&N=="interface"?(P.marked="keyword",_(de("form"),bi,ie)):L=="keyword c"||L=="async"?_(re?We:we):L=="("?_(de(")"),Tt,_e(")"),ie,he):L=="operator"||L=="spread"?_(re?We:we):L=="["?_(de("]"),ke,ie,he):L=="{"?Ve(Ee,"}",null,he):L=="quasi"?Z(pt,he):L=="new"?_(X(re)):L=="import"?_(we):_()}function Tt(L){return L.match(/[;\}\)\],]/)?Z():Z(we)}function xe(L,N){return L==","?_(Tt):tt(L,N,!1)}function tt(L,N,re){var W=re==!1?xe:tt,he=re==!1?we:We;if(L=="=>")return _(F,re?Fe:Wt,ce);if(L=="operator")return/\+\+|--/.test(N)||h&&N=="!"?_(W):h&&N=="<"&&P.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(de(">"),Te(Re,">"),ie,W):N=="?"?_(we,_e(":"),he):_(he);if(L=="quasi")return Z(pt,W);if(L==";")return;if(L=="(")return Ve(We,")","call",W);if(L==".")return _(_t,W);if(L=="[")return _(de("]"),Tt,_e("]"),ie,W);if(h&&N=="as")return P.marked="keyword",_(Re,W);if(L=="regexp")return P.state.lastType=P.marked="operator",P.stream.backUp(P.stream.pos-P.stream.start-1),_(he)}function pt(L,N){return L!="quasi"?Z():N.slice(N.length-2)!="${"?_(pt):_(we,mt)}function mt(L){if(L=="}")return P.marked="string-2",P.state.tokenize=R,_(pt)}function Wt(L){return Y(P.stream,P.state),Z(L=="{"?ze:we)}function Fe(L){return Y(P.stream,P.state),Z(L=="{"?ze:We)}function X(L){return function(N){return N=="."?_(L?te:se):N=="variable"&&h?_(Jn,L?tt:xe):Z(L?We:we)}}function se(L,N){if(N=="target")return P.marked="keyword",_(xe)}function te(L,N){if(N=="target")return P.marked="keyword",_(tt)}function Ne(L){return L==":"?_(ie,ze):Z(xe,_e(";"),ie)}function _t(L){if(L=="variable")return P.marked="property",_()}function Ee(L,N){if(L=="async")return P.marked="property",_(Ee);if(L=="variable"||P.style=="keyword"){if(P.marked="property",N=="get"||N=="set")return _(Le);var re;return h&&P.state.fatArrowAt==P.stream.start&&(re=P.stream.match(/^\s*:\s*/,!1))&&(P.state.fatArrowAt=P.stream.pos+re[0].length),_(ye)}else{if(L=="number"||L=="string")return P.marked=c?"property":P.style+" property",_(ye);if(L=="jsonld-keyword")return _(ye);if(h&&q(N))return P.marked="keyword",_(Ee);if(L=="[")return _(we,Pt,_e("]"),ye);if(L=="spread")return _(We,ye);if(N=="*")return P.marked="keyword",_(Ee);if(L==":")return Z(ye)}}function Le(L){return L!="variable"?Z(ye):(P.marked="property",_(An))}function ye(L){if(L==":")return _(We);if(L=="(")return Z(An)}function Te(L,N,re){function W(he,He){if(re?re.indexOf(he)>-1:he==","){var Ze=P.state.lexical;return Ze.info=="call"&&(Ze.pos=(Ze.pos||0)+1),_(function(St,Yt){return St==N||Yt==N?Z():Z(L)},W)}return he==N||He==N?_():re&&re.indexOf(";")>-1?Z(L):_(_e(N))}return function(he,He){return he==N||He==N?_():Z(L,W)}}function Ve(L,N,re){for(var W=3;W"),Re)}function ct(L){if(L=="=>")return _(Re)}function at(L,N){if(L=="variable"||P.style=="keyword")return P.marked="property",_(at);if(N=="?"||L=="number"||L=="string")return _(at);if(L==":")return _(Re);if(L=="[")return _(_e("variable"),yo,_e("]"),at);if(L=="(")return Z(er,at)}function Lr(L,N){return L=="variable"&&P.stream.match(/^\s*[?:]/,!1)||N=="?"?_(Lr):L==":"?_(Re):L=="spread"?_(Lr):Z(Re)}function yt(L,N){if(N=="<")return _(de(">"),Te(Re,">"),ie,yt);if(N=="|"||L=="."||N=="&")return _(Re);if(L=="[")return _(Re,_e("]"),yt);if(N=="extends"||N=="implements")return P.marked="keyword",_(Re);if(N=="?")return _(Re,_e(":"),Re)}function Jn(L,N){if(N=="<")return _(de(">"),Te(Re,">"),ie,yt)}function Ct(){return Z(Re,wo)}function wo(L,N){if(N=="=")return _(Re)}function fr(L,N){return N=="enum"?(P.marked="keyword",_(Tn)):Z(Bt,Pt,En,vi)}function Bt(L,N){if(h&&q(N))return P.marked="keyword",_(Bt);if(L=="variable")return j(N),_();if(L=="spread")return _(Bt);if(L=="[")return Ve(ko,"]");if(L=="{")return Ve(Ir,"}")}function Ir(L,N){return L=="variable"&&!P.stream.match(/^\s*:/,!1)?(j(N),_(En)):(L=="variable"&&(P.marked="property"),L=="spread"?_(Bt):L=="}"?Z():L=="["?_(we,_e("]"),_e(":"),Ir):_(_e(":"),Bt,En))}function ko(){return Z(Bt,En)}function En(L,N){if(N=="=")return _(We)}function vi(L){if(L==",")return _(fr)}function xo(L,N){if(L=="keyword b"&&N=="else")return _(de("form","else"),ze,ie)}function Fr(L,N){if(N=="await")return _(Fr);if(L=="(")return _(de(")"),Za,ie)}function Za(L){return L=="var"?_(fr,Dn):L=="variable"?_(Dn):Z(Dn)}function Dn(L,N){return L==")"?_():L==";"?_(Dn):N=="in"||N=="of"?(P.marked="keyword",_(we,Dn)):Z(we,Dn)}function An(L,N){if(N=="*")return P.marked="keyword",_(An);if(L=="variable")return j(N),_(An);if(L=="(")return _(F,de(")"),Te(Bn,")"),ie,De,ze,ce);if(h&&N=="<")return _(de(">"),Te(Ct,">"),ie,An)}function er(L,N){if(N=="*")return P.marked="keyword",_(er);if(L=="variable")return j(N),_(er);if(L=="(")return _(F,de(")"),Te(Bn,")"),ie,De,ce);if(h&&N=="<")return _(de(">"),Te(Ct,">"),ie,er)}function Mr(L,N){if(L=="keyword"||L=="variable")return P.marked="type",_(Mr);if(N=="<")return _(de(">"),Te(Ct,">"),ie)}function Bn(L,N){return N=="@"&&_(we,Bn),L=="spread"?_(Bn):h&&q(N)?(P.marked="keyword",_(Bn)):h&&L=="this"?_(Pt,En):Z(Bt,Pt,En)}function bi(L,N){return L=="variable"?jn(L,N):qr(L,N)}function jn(L,N){if(L=="variable")return j(N),_(qr)}function qr(L,N){if(N=="<")return _(de(">"),Te(Ct,">"),ie,qr);if(N=="extends"||N=="implements"||h&&L==",")return N=="implements"&&(P.marked="keyword"),_(h?Re:we,qr);if(L=="{")return _(de("}"),bn,ie)}function bn(L,N){if(L=="async"||L=="variable"&&(N=="static"||N=="get"||N=="set"||h&&q(N))&&P.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return P.marked="keyword",_(bn);if(L=="variable"||P.style=="keyword")return P.marked="property",_(Hn,bn);if(L=="number"||L=="string")return _(Hn,bn);if(L=="[")return _(we,Pt,_e("]"),Hn,bn);if(N=="*")return P.marked="keyword",_(bn);if(h&&L=="(")return Z(er,bn);if(L==";"||L==",")return _(bn);if(L=="}")return _();if(N=="@")return _(we,bn)}function Hn(L,N){if(N=="?")return _(Hn);if(L==":")return _(Re,En);if(N=="=")return _(We);var re=P.state.lexical.prev,W=re&&re.info=="interface";return Z(W?er:An)}function yi(L,N){return N=="*"?(P.marked="keyword",_(st,_e(";"))):N=="default"?(P.marked="keyword",_(we,_e(";"))):L=="{"?_(Te(Un,"}"),st,_e(";")):Z(ze)}function Un(L,N){if(N=="as")return P.marked="keyword",_(_e("variable"));if(L=="variable")return Z(We,Un)}function Qa(L){return L=="string"?_():L=="("?Z(we):Z(fn,zr,st)}function fn(L,N){return L=="{"?Ve(fn,"}"):(L=="variable"&&j(N),N=="*"&&(P.marked="keyword"),_(_o))}function zr(L){if(L==",")return _(fn,zr)}function _o(L,N){if(N=="as")return P.marked="keyword",_(fn)}function st(L,N){if(N=="from")return P.marked="keyword",_(we)}function ke(L){return L=="]"?_():Z(Te(We,"]"))}function Tn(){return Z(de("form"),Bt,_e("{"),de("}"),Te(wi,"}"),ie,ie)}function wi(){return Z(Bt,En)}function pn(L,N){return L.lastType=="operator"||L.lastType==","||y.test(N.charAt(0))||/[,.]/.test(N.charAt(0))}function Ke(L,N,re){return N.tokenize==S&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(N.lastType)||N.lastType=="quasi"&&/\{\s*$/.test(L.string.slice(0,L.pos-(re||0)))}return{startState:function(L){var N={tokenize:S,lastType:"sof",cc:[],lexical:new G((L||0)-s,0,"block",!1),localVars:i.localVars,context:i.localVars&&new I(null,null,!1),indented:L||0};return i.globalVars&&typeof i.globalVars=="object"&&(N.globalVars=i.globalVars),N},token:function(L,N){if(L.sol()&&(N.lexical.hasOwnProperty("align")||(N.lexical.align=!1),N.indented=L.indentation(),Y(L,N)),N.tokenize!=A&&L.eatSpace())return null;var re=N.tokenize(L,N);return w=="comment"?re:(N.lastType=w=="operator"&&(D=="++"||D=="--")?"incdec":w,J(N,re,w,D,L))},indent:function(L,N){if(L.tokenize==A)return t.Pass;if(L.tokenize!=S)return 0;var re=N&&N.charAt(0),W=L.lexical,he;if(!/^\s*else\b/.test(N))for(var He=L.cc.length-1;He>=0;--He){var Ze=L.cc[He];if(Ze==ie)W=W.prev;else if(Ze!=xo)break}for(;(W.type=="stat"||W.type=="form")&&(re=="}"||(he=L.cc[L.cc.length-1])&&(he==xe||he==tt)&&!/^[,\.=+\-*:?[\(]/.test(N));)W=W.prev;u&&W.type==")"&&W.prev.type=="stat"&&(W=W.prev);var St=W.type,Yt=re==St;return St=="vardef"?W.indented+(L.lastType=="operator"||L.lastType==","?W.info.length+1:0):St=="form"&&re=="{"?W.indented:St=="form"?W.indented+s:St=="stat"?W.indented+(pn(L,N)?u||s:0):W.info=="switch"&&!Yt&&i.doubleIndentSwitch!=!1?W.indented+(/^(?:case|default)\b/.test(N)?s:2*s):W.align?W.column+(Yt?0:1):W.indented+(Yt?0:s)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:c,jsonMode:d,expressionAllowed:Ke,skipExpression:function(L){var N=L.cc[L.cc.length-1];(N==we||N==We)&&L.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Zs=le((yd,wd)=>{(function(t){typeof yd=="object"&&typeof wd=="object"?t(Qe(),ta(),Xs(),Vs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)})(function(t){"use strict";var n={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function i(g,y,m){var b=g.current(),w=b.search(y);return w>-1?g.backUp(b.length-w):b.match(/<\/?$/)&&(g.backUp(b.length),g.match(y,!1)||g.match(b)),m}var s={};function u(g){var y=s[g];return y||(s[g]=new RegExp("\\s+"+g+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function c(g,y){var m=g.match(u(y));return m?/^\s*(.*?)\s*$/.exec(m[2])[1]:""}function d(g,y){return new RegExp((y?"^":"")+"","i")}function h(g,y){for(var m in g)for(var b=y[m]||(y[m]=[]),w=g[m],D=w.length-1;D>=0;D--)b.unshift(w[D])}function p(g,y){for(var m=0;m=0;E--)b.script.unshift(["type",D[E].matches,D[E].mode]);function S(z,A){var R=m.token(z,A.htmlState),U=/\btag\b/.test(R),Y;if(U&&!/[<>\s\/]/.test(z.current())&&(Y=A.htmlState.tagName&&A.htmlState.tagName.toLowerCase())&&b.hasOwnProperty(Y))A.inTag=Y+" ";else if(A.inTag&&U&&/>$/.test(z.current())){var B=/^([\S]+) (.*)/.exec(A.inTag);A.inTag=null;var G=z.current()==">"&&p(b[B[1]],B[2]),ee=t.getMode(g,G),J=d(B[1],!0),P=d(B[1],!1);A.token=function(Z,_){return Z.match(J,!1)?(_.token=S,_.localState=_.localMode=null,null):i(Z,P,_.localMode.token(Z,_.localState))},A.localMode=ee,A.localState=t.startState(ee,m.indent(A.htmlState,"",""))}else A.inTag&&(A.inTag+=z.current(),z.eol()&&(A.inTag+=" "));return R}return{startState:function(){var z=t.startState(m);return{token:S,inTag:null,localMode:null,localState:null,htmlState:z}},copyState:function(z){var A;return z.localState&&(A=t.copyState(z.localMode,z.localState)),{token:z.token,inTag:z.inTag,localMode:z.localMode,localState:A,htmlState:t.copyState(m,z.htmlState)}},token:function(z,A){return A.token(z,A)},indent:function(z,A,R){return!z.localMode||/^\s*<\//.test(A)?m.indent(z.htmlState,A,R):z.localMode.indent?z.localMode.indent(z.localState,A,R):t.Pass},innerMode:function(z){return{state:z.localState||z.htmlState,mode:z.localMode||m}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})});var _d=le((kd,xd)=>{(function(t){typeof kd=="object"&&typeof xd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("julia",function(n,i){function s(I,H){return typeof H=="undefined"&&(H="\\b"),new RegExp("^(("+I.join(")|(")+"))"+H)}var u="\\\\[0-7]{1,3}",c="\\\\x[A-Fa-f0-9]{1,2}",d=`\\\\[abefnrtv0%?'"\\\\]`,h="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",p=i.operators||s(["[<>]:","[<>=]=","<<=?",">>>?=?","=>","->","\\/\\/","[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),g=i.delimiters||/^[;,()[\]{}]/,y=i.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,m=s([u,c,d,h],"'"),b=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],w=["end","else","elseif","catch","finally"],D=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],E=["true","false","nothing","NaN","Inf"];t.registerHelper("hintWords","julia",D.concat(E));var S=s(b),z=s(w),A=s(D),R=s(E),U=/^@[_A-Za-z][\w]*/,Y=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,B=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;function G(I){return I.nestedArrays>0}function ee(I){return I.nestedGenerators>0}function J(I,H){return typeof H=="undefined"&&(H=0),I.scopes.length<=H?null:I.scopes[I.scopes.length-(H+1)]}function P(I,H){if(I.match(/^#=/,!1))return H.tokenize=V,H.tokenize(I,H);var ae=H.leavingExpr;if(I.sol()&&(ae=!1),H.leavingExpr=!1,ae&&I.match(/^'+/))return"operator";if(I.match(/\.{4,}/))return"error";if(I.match(/\.{1,3}/))return"operator";if(I.eatSpace())return null;var F=I.peek();if(F==="#")return I.skipToEnd(),"comment";if(F==="["&&(H.scopes.push("["),H.nestedArrays++),F==="("&&(H.scopes.push("("),H.nestedGenerators++),G(H)&&F==="]"){for(;H.scopes.length&&J(H)!=="[";)H.scopes.pop();H.scopes.pop(),H.nestedArrays--,H.leavingExpr=!0}if(ee(H)&&F===")"){for(;H.scopes.length&&J(H)!=="(";)H.scopes.pop();H.scopes.pop(),H.nestedGenerators--,H.leavingExpr=!0}if(G(H)){if(H.lastToken=="end"&&I.match(/^:/))return"operator";if(I.match(/^end/))return"number"}var T;if((T=I.match(S,!1))&&H.scopes.push(T[0]),I.match(z,!1)&&H.scopes.pop(),I.match(/^::(?![:\$])/))return H.tokenize=_,H.tokenize(I,H);if(!ae&&I.match(Y)||I.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/))return"builtin";if(I.match(p))return"operator";if(I.match(/^\.?\d/,!1)){var ce=RegExp(/^im\b/),de=!1;if(I.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(de=!0),I.match(/^0x[0-9a-f_]+/i)&&(de=!0),I.match(/^0b[01_]+/i)&&(de=!0),I.match(/^0o[0-7_]+/i)&&(de=!0),I.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(de=!0),I.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(de=!0),de)return I.match(ce),H.leavingExpr=!0,"number"}if(I.match(/^'/))return H.tokenize=j,H.tokenize(I,H);if(I.match(B))return H.tokenize=Q(I.current()),H.tokenize(I,H);if(I.match(U))return"meta";if(I.match(g))return null;if(I.match(A))return"keyword";if(I.match(R))return"builtin";var ie=H.isDefinition||H.lastToken=="function"||H.lastToken=="macro"||H.lastToken=="type"||H.lastToken=="struct"||H.lastToken=="immutable";return I.match(y)?ie?I.peek()==="."?(H.isDefinition=!0,"variable"):(H.isDefinition=!1,"def"):I.match(/^({[^}]*})*\(/,!1)?(H.tokenize=Z,H.tokenize(I,H)):(H.leavingExpr=!0,"variable"):(I.next(),"error")}function Z(I,H){var ae=I.match(/^(\(\s*)/);if(ae&&(H.firstParenPos<0&&(H.firstParenPos=H.scopes.length),H.scopes.push("("),H.charsAdvanced+=ae[1].length),J(H)=="("&&I.match(/^\)/)&&(H.scopes.pop(),H.charsAdvanced+=1,H.scopes.length<=H.firstParenPos)){var F=I.match(/^(\s*where\s+[^\s=]+)*\s*?=(?!=)/,!1);return I.backUp(H.charsAdvanced),H.firstParenPos=-1,H.charsAdvanced=0,H.tokenize=P,F?"def":"builtin"}if(I.match(/^$/g,!1)){for(I.backUp(H.charsAdvanced);H.scopes.length>H.firstParenPos;)H.scopes.pop();return H.firstParenPos=-1,H.charsAdvanced=0,H.tokenize=P,"builtin"}return H.charsAdvanced+=I.match(/^([^()]*)/)[1].length,H.tokenize(I,H)}function _(I,H){return I.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),I.match(/^{/)?H.nestedParameters++:I.match(/^}/)&&H.nestedParameters>0&&H.nestedParameters--,H.nestedParameters>0?I.match(/.*?(?={|})/)||I.next():H.nestedParameters==0&&(H.tokenize=P),"builtin"}function V(I,H){return I.match(/^#=/)&&H.nestedComments++,I.match(/.*?(?=(#=|=#))/)||I.skipToEnd(),I.match(/^=#/)&&(H.nestedComments--,H.nestedComments==0&&(H.tokenize=P)),"comment"}function j(I,H){var ae=!1,F;if(I.match(m))ae=!0;else if(F=I.match(/\\u([a-f0-9]{1,4})(?=')/i)){var T=parseInt(F[1],16);(T<=55295||T>=57344)&&(ae=!0,I.next())}else if(F=I.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var T=parseInt(F[1],16);T<=1114111&&(ae=!0,I.next())}return ae?(H.leavingExpr=!0,H.tokenize=P,"string"):(I.match(/^[^']+(?=')/)||I.skipToEnd(),I.match(/^'/)&&(H.tokenize=P),"error")}function Q(I){I.substr(-3)==='"""'?I='"""':I.substr(-1)==='"'&&(I='"');function H(ae,F){if(ae.eat("\\"))ae.next();else{if(ae.match(I))return F.tokenize=P,F.leavingExpr=!0,"string";ae.eat(/[`"]/)}return ae.eatWhile(/[^\\`"]/),"string"}return H}var q={startState:function(){return{tokenize:P,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,charsAdvanced:0,firstParenPos:-1}},token:function(I,H){var ae=H.tokenize(I,H),F=I.current();return F&&ae&&(H.lastToken=F),ae},indent:function(I,H){var ae=0;return(H==="]"||H===")"||/^end\b/.test(H)||/^else/.test(H)||/^catch\b/.test(H)||/^elseif\b/.test(H)||/^finally/.test(H))&&(ae=-1),(I.scopes.length+ae)*n.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"};return q}),t.defineMIME("text/x-julia","julia")})});var Ed=le((Cd,Sd)=>{(function(t){typeof Cd=="object"&&typeof Sd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("lua",function(n,i){var s=n.indentUnit;function u(S){return new RegExp("^(?:"+S.join("|")+")","i")}function c(S){return new RegExp("^(?:"+S.join("|")+")$","i")}var d=c(i.specials||[]),h=c(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),p=c(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),g=c(["function","if","repeat","do","\\(","{"]),y=c(["end","until","\\)","}"]),m=u(["end","until","\\)","}","else","elseif"]);function b(S){for(var z=0;S.eat("=");)++z;return S.eat("["),z}function w(S,z){var A=S.next();return A=="-"&&S.eat("-")?S.eat("[")&&S.eat("[")?(z.cur=D(b(S),"comment"))(S,z):(S.skipToEnd(),"comment"):A=='"'||A=="'"?(z.cur=E(A))(S,z):A=="["&&/[\[=]/.test(S.peek())?(z.cur=D(b(S),"string"))(S,z):/\d/.test(A)?(S.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(A)?(S.eatWhile(/[\w\\\-_.]/),"variable"):null}function D(S,z){return function(A,R){for(var U=null,Y;(Y=A.next())!=null;)if(U==null)Y=="]"&&(U=0);else if(Y=="=")++U;else if(Y=="]"&&U==S){R.cur=w;break}else U=null;return z}}function E(S){return function(z,A){for(var R=!1,U;(U=z.next())!=null&&!(U==S&&!R);)R=!R&&U=="\\";return R||(A.cur=w),"string"}}return{startState:function(S){return{basecol:S||0,indentDepth:0,cur:w}},token:function(S,z){if(S.eatSpace())return null;var A=z.cur(S,z),R=S.current();return A=="variable"&&(p.test(R)?A="keyword":h.test(R)?A="builtin":d.test(R)&&(A="variable-2")),A!="comment"&&A!="string"&&(g.test(R)?++z.indentDepth:y.test(R)&&--z.indentDepth),A},indent:function(S,z){var A=m.test(z);return S.basecol+s*(S.indentDepth-(A?1:0))},lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),t.defineMIME("text/x-lua","lua")})});var Td=le((Dd,Ad)=>{(function(t){typeof Dd=="object"&&typeof Ad=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var n=0;n-1&&s.substring(d+1,s.length);if(h)return t.findModeByExtension(h)},t.findModeByName=function(s){s=s.toLowerCase();for(var u=0;u{(function(t){typeof Ld=="object"&&typeof Id=="object"?t(Qe(),ta(),Td()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("markdown",function(n,i){var s=t.getMode(n,"text/html"),u=s.name=="null";function c(F){if(t.findModeByName){var T=t.findModeByName(F);T&&(F=T.mime||T.mimes[0])}var ce=t.getMode(n,F);return ce.name=="null"?null:ce}i.highlightFormatting===void 0&&(i.highlightFormatting=!1),i.maxBlockquoteDepth===void 0&&(i.maxBlockquoteDepth=0),i.taskLists===void 0&&(i.taskLists=!1),i.strikethrough===void 0&&(i.strikethrough=!1),i.emoji===void 0&&(i.emoji=!1),i.fencedCodeBlockHighlighting===void 0&&(i.fencedCodeBlockHighlighting=!0),i.fencedCodeBlockDefaultMode===void 0&&(i.fencedCodeBlockDefaultMode="text/plain"),i.xml===void 0&&(i.xml=!0),i.tokenTypeOverrides===void 0&&(i.tokenTypeOverrides={});var d={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var h in d)d.hasOwnProperty(h)&&i.tokenTypeOverrides[h]&&(d[h]=i.tokenTypeOverrides[h]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,g=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,m=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,b=/^ {0,3}(?:\={1,}|-{2,})\s*$/,w=/^[^#!\[\]*_\\<>` "'(~:]+/,D=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,S=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,z=" ";function A(F,T,ce){return T.f=T.inline=ce,ce(F,T)}function R(F,T,ce){return T.f=T.block=ce,ce(F,T)}function U(F){return!F||!/\S/.test(F.string)}function Y(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==G){var T=u;if(!T){var ce=t.innerMode(s,F.htmlState);T=ce.mode.name=="xml"&&ce.state.tagStart===null&&!ce.state.context&&ce.state.tokenize.isInText}T&&(F.f=Z,F.block=B,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function B(F,T){var ce=F.column()===T.indentation,de=U(T.prevLine.stream),ie=T.indentedCode,_e=T.prevLine.hr,ze=T.list!==!1,be=(T.listStack[T.listStack.length-1]||0)+3;T.indentedCode=!1;var we=T.indentation;if(T.indentationDiff===null&&(T.indentationDiff=T.indentation,ze)){for(T.list=null;we=4&&(ie||T.prevLine.fencedCodeEnd||T.prevLine.header||de))return F.skipToEnd(),T.indentedCode=!0,d.code;if(F.eatSpace())return null;if(ce&&T.indentation<=be&&(nt=F.match(m))&&nt[1].length<=6)return T.quote=0,T.header=nt[1].length,T.thisLine.header=!0,i.highlightFormatting&&(T.formatting="header"),T.f=T.inline,J(T);if(T.indentation<=be&&F.eat(">"))return T.quote=ce?1:T.quote+1,i.highlightFormatting&&(T.formatting="quote"),F.eatSpace(),J(T);if(!Ge&&!T.setext&&ce&&T.indentation<=be&&(nt=F.match(g))){var Tt=nt[1]?"ol":"ul";return T.indentation=we+F.current().length,T.list=!0,T.quote=0,T.listStack.push(T.indentation),T.em=!1,T.strong=!1,T.code=!1,T.strikethrough=!1,i.taskLists&&F.match(y,!1)&&(T.taskList=!0),T.f=T.inline,i.highlightFormatting&&(T.formatting=["list","list-"+Tt]),J(T)}else{if(ce&&T.indentation<=be&&(nt=F.match(D,!0)))return T.quote=0,T.fencedEndRE=new RegExp(nt[1]+"+ *$"),T.localMode=i.fencedCodeBlockHighlighting&&c(nt[2]||i.fencedCodeBlockDefaultMode),T.localMode&&(T.localState=t.startState(T.localMode)),T.f=T.block=ee,i.highlightFormatting&&(T.formatting="code-block"),T.code=-1,J(T);if(T.setext||(!We||!ze)&&!T.quote&&T.list===!1&&!T.code&&!Ge&&!E.test(F.string)&&(nt=F.lookAhead(1))&&(nt=nt.match(b)))return T.setext?(T.header=T.setext,T.setext=0,F.skipToEnd(),i.highlightFormatting&&(T.formatting="header")):(T.header=nt[0].charAt(0)=="="?1:2,T.setext=T.header),T.thisLine.header=!0,T.f=T.inline,J(T);if(Ge)return F.skipToEnd(),T.hr=!0,T.thisLine.hr=!0,d.hr;if(F.peek()==="[")return A(F,T,q)}return A(F,T,T.inline)}function G(F,T){var ce=s.token(F,T.htmlState);if(!u){var de=t.innerMode(s,T.htmlState);(de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText||T.md_inside&&F.current().indexOf(">")>-1)&&(T.f=Z,T.block=B,T.htmlState=null)}return ce}function ee(F,T){var ce=T.listStack[T.listStack.length-1]||0,de=T.indentation=F.quote?T.push(d.formatting+"-"+F.formatting[ce]+"-"+F.quote):T.push("error"))}if(F.taskOpen)return T.push("meta"),T.length?T.join(" "):null;if(F.taskClosed)return T.push("property"),T.length?T.join(" "):null;if(F.linkHref?T.push(d.linkHref,"url"):(F.strong&&T.push(d.strong),F.em&&T.push(d.em),F.strikethrough&&T.push(d.strikethrough),F.emoji&&T.push(d.emoji),F.linkText&&T.push(d.linkText),F.code&&T.push(d.code),F.image&&T.push(d.image),F.imageAltText&&T.push(d.imageAltText,"link"),F.imageMarker&&T.push(d.imageMarker)),F.header&&T.push(d.header,d.header+"-"+F.header),F.quote&&(T.push(d.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=F.quote?T.push(d.quote+"-"+F.quote):T.push(d.quote+"-"+i.maxBlockquoteDepth)),F.list!==!1){var de=(F.listStack.length-1)%3;de?de===1?T.push(d.list2):T.push(d.list3):T.push(d.list1)}return F.trailingSpaceNewLine?T.push("trailing-space-new-line"):F.trailingSpace&&T.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),T.length?T.join(" "):null}function P(F,T){return F.match(w,!0)?J(T):void 0}function Z(F,T){var ce=T.text(F,T);if(typeof ce!="undefined")return ce;if(T.list)return T.list=null,J(T);if(T.taskList){var de=F.match(y,!0)[1]===" ";return de?T.taskOpen=!0:T.taskClosed=!0,i.highlightFormatting&&(T.formatting="task"),T.taskList=!1,J(T)}if(T.taskOpen=!1,T.taskClosed=!1,T.header&&F.match(/^#+$/,!0))return i.highlightFormatting&&(T.formatting="header"),J(T);var ie=F.next();if(T.linkTitle){T.linkTitle=!1;var _e=ie;ie==="("&&(_e=")"),_e=(_e+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ze="^\\s*(?:[^"+_e+"\\\\]+|\\\\\\\\|\\\\.)"+_e;if(F.match(new RegExp(ze),!0))return d.linkHref}if(ie==="`"){var be=T.formatting;i.highlightFormatting&&(T.formatting="code"),F.eatWhile("`");var we=F.current().length;if(T.code==0&&(!T.quote||we==1))return T.code=we,J(T);if(we==T.code){var We=J(T);return T.code=0,We}else return T.formatting=be,J(T)}else if(T.code)return J(T);if(ie==="\\"&&(F.next(),i.highlightFormatting)){var Ge=J(T),nt=d.formatting+"-escape";return Ge?Ge+" "+nt:nt}if(ie==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return T.imageMarker=!0,T.image=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(ie==="["&&T.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return T.imageMarker=!1,T.imageAltText=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(ie==="]"&&T.imageAltText){i.highlightFormatting&&(T.formatting="image");var Ge=J(T);return T.imageAltText=!1,T.image=!1,T.inline=T.f=V,Ge}if(ie==="["&&!T.image)return T.linkText&&F.match(/^.*?\]/)||(T.linkText=!0,i.highlightFormatting&&(T.formatting="link")),J(T);if(ie==="]"&&T.linkText){i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return T.linkText=!1,T.inline=T.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?V:Z,Ge}if(ie==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return Ge?Ge+=" ":Ge="",Ge+d.linkInline}if(ie==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return Ge?Ge+=" ":Ge="",Ge+d.linkEmail}if(i.xml&&ie==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Tt=F.string.indexOf(">",F.pos);if(Tt!=-1){var xe=F.string.substring(F.start,Tt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(xe)&&(T.md_inside=!0)}return F.backUp(1),T.htmlState=t.startState(s),R(F,T,G)}if(i.xml&&ie==="<"&&F.match(/^\/\w*?>/))return T.md_inside=!1,"tag";if(ie==="*"||ie==="_"){for(var tt=1,pt=F.pos==1?" ":F.string.charAt(F.pos-2);tt<3&&F.eat(ie);)tt++;var mt=F.peek()||" ",Wt=!/\s/.test(mt)&&(!S.test(mt)||/\s/.test(pt)||S.test(pt)),Fe=!/\s/.test(pt)&&(!S.test(pt)||/\s/.test(mt)||S.test(mt)),X=null,se=null;if(tt%2&&(!T.em&&Wt&&(ie==="*"||!Fe||S.test(pt))?X=!0:T.em==ie&&Fe&&(ie==="*"||!Wt||S.test(mt))&&(X=!1)),tt>1&&(!T.strong&&Wt&&(ie==="*"||!Fe||S.test(pt))?se=!0:T.strong==ie&&Fe&&(ie==="*"||!Wt||S.test(mt))&&(se=!1)),se!=null||X!=null){i.highlightFormatting&&(T.formatting=X==null?"strong":se==null?"em":"strong em"),X===!0&&(T.em=ie),se===!0&&(T.strong=ie);var We=J(T);return X===!1&&(T.em=!1),se===!1&&(T.strong=!1),We}}else if(ie===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return J(T);F.backUp(1)}if(i.strikethrough){if(ie==="~"&&F.eatWhile(ie)){if(T.strikethrough){i.highlightFormatting&&(T.formatting="strikethrough");var We=J(T);return T.strikethrough=!1,We}else if(F.match(/^[^\s]/,!1))return T.strikethrough=!0,i.highlightFormatting&&(T.formatting="strikethrough"),J(T)}else if(ie===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return J(T);F.backUp(2)}}if(i.emoji&&ie===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){T.emoji=!0,i.highlightFormatting&&(T.formatting="emoji");var te=J(T);return T.emoji=!1,te}return ie===" "&&(F.match(/^ +$/,!1)?T.trailingSpace++:T.trailingSpace&&(T.trailingSpaceNewLine=!0)),J(T)}function _(F,T){var ce=F.next();if(ce===">"){T.f=T.inline=Z,i.highlightFormatting&&(T.formatting="link");var de=J(T);return de?de+=" ":de="",de+d.linkInline}return F.match(/^[^>]+/,!0),d.linkInline}function V(F,T){if(F.eatSpace())return null;var ce=F.next();return ce==="("||ce==="["?(T.f=T.inline=Q(ce==="("?")":"]"),i.highlightFormatting&&(T.formatting="link-string"),T.linkHref=!0,J(T)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Q(F){return function(T,ce){var de=T.next();if(de===F){ce.f=ce.inline=Z,i.highlightFormatting&&(ce.formatting="link-string");var ie=J(ce);return ce.linkHref=!1,ie}return T.match(j[F]),ce.linkHref=!0,J(ce)}}function q(F,T){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(T.f=I,F.next(),i.highlightFormatting&&(T.formatting="link"),T.linkText=!0,J(T)):A(F,T,Z)}function I(F,T){if(F.match(/^\]:/,!0)){T.f=T.inline=H,i.highlightFormatting&&(T.formatting="link");var ce=J(T);return T.linkText=!1,ce}return F.match(/^([^\]\\]|\\.)+/,!0),d.linkText}function H(F,T){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?T.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),T.f=T.inline=Z,d.linkHref+" url")}var ae={startState:function(){return{f:B,prevLine:{stream:null},thisLine:{stream:null},block:B,htmlState:null,indentation:0,inline:Z,text:P,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&t.copyState(s,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?t.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,T){if(T.formatting=!1,F!=T.thisLine.stream){if(T.header=0,T.hr=!1,F.match(/^\s*$/,!0))return Y(T),null;if(T.prevLine=T.thisLine,T.thisLine={stream:F},T.taskList=!1,T.trailingSpace=0,T.trailingSpaceNewLine=!1,!T.localState&&(T.f=T.block,T.f!=G)){var ce=F.match(/^\s*/,!0)[0].replace(/\t/g,z).length;if(T.indentation=ce,T.indentationDiff=null,ce>0)return null}}return T.f(F,T)},innerMode:function(F){return F.block==G?{state:F.htmlState,mode:s}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:ae}},indent:function(F,T,ce){return F.block==G&&s.indent?s.indent(F.htmlState,T,ce):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,T,ce):t.Pass},blankLine:Y,getType:J,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ae},"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")})});var zd=le((Md,qd)=>{(function(t){typeof Md=="object"&&typeof qd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("mllike",function(n,i){var s={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},u=i.extraWords||{};for(var c in u)u.hasOwnProperty(c)&&(s[c]=i.extraWords[c]);var d=[];for(var h in s)d.push(h);t.registerHelper("hintWords","mllike",d);function p(b,w){var D=b.next();if(D==='"')return w.tokenize=g,w.tokenize(b,w);if(D==="{"&&b.eat("|"))return w.longString=!0,w.tokenize=m,w.tokenize(b,w);if(D==="("&&b.eat("*"))return w.commentLevel++,w.tokenize=y,w.tokenize(b,w);if(D==="~"||D==="?")return b.eatWhile(/\w/),"variable-2";if(D==="`")return b.eatWhile(/\w/),"quote";if(D==="/"&&i.slashComments&&b.eat("/"))return b.skipToEnd(),"comment";if(/\d/.test(D))return D==="0"&&b.eat(/[bB]/)&&b.eatWhile(/[01]/),D==="0"&&b.eat(/[xX]/)&&b.eatWhile(/[0-9a-fA-F]/),D==="0"&&b.eat(/[oO]/)?b.eatWhile(/[0-7]/):(b.eatWhile(/[\d_]/),b.eat(".")&&b.eatWhile(/[\d]/),b.eat(/[eE]/)&&b.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(D))return"operator";if(/[\w\xa1-\uffff]/.test(D)){b.eatWhile(/[\w\xa1-\uffff]/);var E=b.current();return s.hasOwnProperty(E)?s[E]:"variable"}return null}function g(b,w){for(var D,E=!1,S=!1;(D=b.next())!=null;){if(D==='"'&&!S){E=!0;break}S=!S&&D==="\\"}return E&&!S&&(w.tokenize=p),"string"}function y(b,w){for(var D,E;w.commentLevel>0&&(E=b.next())!=null;)D==="("&&E==="*"&&w.commentLevel++,D==="*"&&E===")"&&w.commentLevel--,D=E;return w.commentLevel<=0&&(w.tokenize=p),"comment"}function m(b,w){for(var D,E;w.longString&&(E=b.next())!=null;)D==="|"&&E==="}"&&(w.longString=!1),D=E;return w.longString||(w.tokenize=p),"string"}return{startState:function(){return{tokenize:p,commentLevel:0,longString:!1}},token:function(b,w){return b.eatSpace()?null:w.tokenize(b,w)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:i.slashComments?"//":null}}),t.defineMIME("text/x-ocaml",{name:"mllike",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),t.defineMIME("text/x-fsharp",{name:"mllike",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),t.defineMIME("text/x-sml",{name:"mllike",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0})})});var Od=le((Pd,Rd)=>{(function(t){typeof Pd=="object"&&typeof Rd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("nginx",function(n){function i(w){for(var D={},E=w.split(" "),S=0;S*\/]/.test(S)?p(null,"select-op"):/[;{}:\[\]]/.test(S)?p(null,S):(w.eatWhile(/[\w\\\-]/),p("variable","variable"))}function y(w,D){for(var E=!1,S;(S=w.next())!=null;){if(E&&S=="/"){D.tokenize=g;break}E=S=="*"}return p("comment","comment")}function m(w,D){for(var E=0,S;(S=w.next())!=null;){if(E>=2&&S==">"){D.tokenize=g;break}E=S=="-"?E+1:0}return p("comment","comment")}function b(w){return function(D,E){for(var S=!1,z;(z=D.next())!=null&&!(z==w&&!S);)S=!S&&z=="\\";return S||(E.tokenize=g),p("string","string")}}return{startState:function(w){return{tokenize:g,baseIndent:w||0,stack:[]}},token:function(w,D){if(w.eatSpace())return null;h=null;var E=D.tokenize(w,D),S=D.stack[D.stack.length-1];return h=="hash"&&S=="rule"?E="atom":E=="variable"&&(S=="rule"?E="number":(!S||S=="@media{")&&(E="tag")),S=="rule"&&/^[\{\};]$/.test(h)&&D.stack.pop(),h=="{"?S=="@media"?D.stack[D.stack.length-1]="@media{":D.stack.push("{"):h=="}"?D.stack.pop():h=="@media"?D.stack.push("@media"):S=="{"&&h!="comment"&&D.stack.push("rule"),E},indent:function(w,D){var E=w.stack.length;return/^\}/.test(D)&&(E-=w.stack[w.stack.length-1]=="rule"?2:1),w.baseIndent+E*d},electricChars:"}"}}),t.defineMIME("text/x-nginx-conf","nginx")})});var jd=le((Nd,Bd)=>{(function(t){typeof Nd=="object"&&typeof Bd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("perl",function(){var c={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},d="string-2",h=/[goseximacplud]/;function p(m,b,w,D,E){return b.chain=null,b.style=null,b.tail=null,b.tokenize=function(S,z){for(var A=!1,R,U=0;R=S.next();){if(R===w[U]&&!A)return w[++U]!==void 0?(z.chain=w[U],z.style=D,z.tail=E):E&&S.eatWhile(E),z.tokenize=y,D;A=!A&&R=="\\"}return D},b.tokenize(m,b)}function g(m,b,w){return b.tokenize=function(D,E){return D.string==w&&(E.tokenize=y),D.skipToEnd(),"string"},b.tokenize(m,b)}function y(m,b){if(m.eatSpace())return null;if(b.chain)return p(m,b,b.chain,b.style,b.tail);if(m.match(/^\-?[\d\.]/,!1)&&m.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(m.match(/^<<(?=\w)/))return m.eatWhile(/\w/),g(m,b,m.current().substr(2));if(m.sol()&&m.match(/^\=item(?!\w)/))return g(m,b,"=cut");var w=m.next();if(w=='"'||w=="'"){if(i(m,3)=="<<"+w){var D=m.pos;m.eatWhile(/\w/);var E=m.current().substr(1);if(E&&m.eat(w))return g(m,b,E);m.pos=D}return p(m,b,[w],"string")}if(w=="q"){var S=n(m,-2);if(!(S&&/\w/.test(S))){if(S=n(m,0),S=="x"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],d,h);if(S=="[")return u(m,2),p(m,b,["]"],d,h);if(S=="{")return u(m,2),p(m,b,["}"],d,h);if(S=="<")return u(m,2),p(m,b,[">"],d,h);if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],d,h)}else if(S=="q"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],"string");if(S=="[")return u(m,2),p(m,b,["]"],"string");if(S=="{")return u(m,2),p(m,b,["}"],"string");if(S=="<")return u(m,2),p(m,b,[">"],"string");if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],"string")}else if(S=="w"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],"bracket");if(S=="[")return u(m,2),p(m,b,["]"],"bracket");if(S=="{")return u(m,2),p(m,b,["}"],"bracket");if(S=="<")return u(m,2),p(m,b,[">"],"bracket");if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],"bracket")}else if(S=="r"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],d,h);if(S=="[")return u(m,2),p(m,b,["]"],d,h);if(S=="{")return u(m,2),p(m,b,["}"],d,h);if(S=="<")return u(m,2),p(m,b,[">"],d,h);if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],d,h)}else if(/[\^'"!~\/(\[{<]/.test(S)){if(S=="(")return u(m,1),p(m,b,[")"],"string");if(S=="[")return u(m,1),p(m,b,["]"],"string");if(S=="{")return u(m,1),p(m,b,["}"],"string");if(S=="<")return u(m,1),p(m,b,[">"],"string");if(/[\^'"!~\/]/.test(S))return p(m,b,[m.eat(S)],"string")}}}if(w=="m"){var S=n(m,-2);if(!(S&&/\w/.test(S))&&(S=m.eat(/[(\[{<\^'"!~\/]/),S)){if(/[\^'"!~\/]/.test(S))return p(m,b,[S],d,h);if(S=="(")return p(m,b,[")"],d,h);if(S=="[")return p(m,b,["]"],d,h);if(S=="{")return p(m,b,["}"],d,h);if(S=="<")return p(m,b,[">"],d,h)}}if(w=="s"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="y"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="t"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat("r"),S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S)))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="`")return p(m,b,[w],"variable-2");if(w=="/")return/~\s*$/.test(i(m))?p(m,b,[w],d,h):"operator";if(w=="$"){var D=m.pos;if(m.eatWhile(/\d/)||m.eat("{")&&m.eatWhile(/\d/)&&m.eat("}"))return"variable-2";m.pos=D}if(/[$@%]/.test(w)){var D=m.pos;if(m.eat("^")&&m.eat(/[A-Z]/)||!/[@$%&]/.test(n(m,-2))&&m.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var S=m.current();if(c[S])return"variable-2"}m.pos=D}if(/[$@%&]/.test(w)&&(m.eatWhile(/[\w$\[\]]/)||m.eat("{")&&m.eatWhile(/[\w$\[\]]/)&&m.eat("}"))){var S=m.current();return c[S]?"variable-2":"variable"}if(w=="#"&&n(m,-2)!="$")return m.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(w)){var D=m.pos;if(m.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),c[m.current()])return"operator";m.pos=D}if(w=="_"&&m.pos==1){if(s(m,6)=="_END__")return p(m,b,["\0"],"comment");if(s(m,7)=="_DATA__")return p(m,b,["\0"],"variable-2");if(s(m,7)=="_C__")return p(m,b,["\0"],"string")}if(/\w/.test(w)){var D=m.pos;if(n(m,-2)=="{"&&(n(m,0)=="}"||m.eatWhile(/\w/)&&n(m,0)=="}"))return"string";m.pos=D}if(/[A-Z]/.test(w)){var z=n(m,-2),D=m.pos;if(m.eatWhile(/[A-Z_]/),/[\da-z]/.test(n(m,0)))m.pos=D;else{var S=c[m.current()];return S?(S[1]&&(S=S[0]),z!=":"?S==1?"keyword":S==2?"def":S==3?"atom":S==4?"operator":S==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(w)){var z=n(m,-2);m.eatWhile(/\w/);var S=c[m.current()];return S?(S[1]&&(S=S[0]),z!=":"?S==1?"keyword":S==2?"def":S==3?"atom":S==4?"operator":S==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(m,b){return(b.tokenize||y)(m,b)},lineComment:"#"}}),t.registerHelper("wordChars","perl",/[\w$]/),t.defineMIME("text/x-perl","perl");function n(c,d){return c.string.charAt(c.pos+(d||0))}function i(c,d){if(d){var h=c.pos-d;return c.string.substr(h>=0?h:0,d)}else return c.string.substr(0,c.pos-1)}function s(c,d){var h=c.string.length,p=h-c.pos+1;return c.string.substr(c.pos,d&&d=(p=c.string.length-1)?c.pos=p:c.pos=h}})});var Wd=le((Hd,Ud)=>{(function(t){typeof Hd=="object"&&typeof Ud=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("pascal",function(){function n(g){for(var y={},m=g.split(" "),b=0;b!?|\/]/;function c(g,y){var m=g.next();if(m=="#"&&y.startOfLine)return g.skipToEnd(),"meta";if(m=='"'||m=="'")return y.tokenize=d(m),y.tokenize(g,y);if(m=="("&&g.eat("*"))return y.tokenize=h,h(g,y);if(m=="{")return y.tokenize=p,p(g,y);if(/[\[\]\(\),;\:\.]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(m=="/"&&g.eat("/"))return g.skipToEnd(),"comment";if(u.test(m))return g.eatWhile(u),"operator";g.eatWhile(/[\w\$_]/);var b=g.current();return i.propertyIsEnumerable(b)?"keyword":s.propertyIsEnumerable(b)?"atom":"variable"}function d(g){return function(y,m){for(var b=!1,w,D=!1;(w=y.next())!=null;){if(w==g&&!b){D=!0;break}b=!b&&w=="\\"}return(D||!b)&&(m.tokenize=null),"string"}}function h(g,y){for(var m=!1,b;b=g.next();){if(b==")"&&m){y.tokenize=null;break}m=b=="*"}return"comment"}function p(g,y){for(var m;m=g.next();)if(m=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||c)(g,y);return m=="comment"||m=="meta",m},electricChars:"{}"}}),t.defineMIME("text/x-pascal","pascal")})});var Kd=le(($d,Gd)=>{(function(t){typeof $d=="object"&&typeof Gd=="object"?t(Qe(),Zs(),Ys()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],t):t(CodeMirror)})(function(t){"use strict";function n(g){for(var y={},m=g.split(" "),b=0;b\w/,!1)&&(y.tokenize=i([[["->",null]],[[/[\w]+/,"variable"]]],m,b)),"variable-2";for(var w=!1;!g.eol()&&(w||b===!1||!g.match("{$",!1)&&!g.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!w&&g.match(m)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}w=g.next()=="\\"&&!w}return"string"}var c="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",d="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";t.registerHelper("hintWords","php",[c,d,h].join(" ").split(" ")),t.registerHelper("wordChars","php",/[\w$]/);var p={name:"clike",helperType:"php",keywords:n(c),blockKeywords:n("catch do else elseif for foreach if switch try while finally"),defKeywords:n("class function interface namespace trait"),atoms:n(d),builtin:n(h),multiLineStrings:!0,hooks:{$:function(g){return g.eatWhile(/[\w\$_]/),"variable-2"},"<":function(g,y){var m;if(m=g.match(/<<\s*/)){var b=g.eat(/['"]/);g.eatWhile(/[\w\.]/);var w=g.current().slice(m[0].length+(b?2:1));if(b&&g.eat(b),w)return(y.tokStack||(y.tokStack=[])).push(w,0),y.tokenize=s(w,b!="'"),"string"}return!1},"#":function(g){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"},"/":function(g){if(g.eat("/")){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"}return!1},'"':function(g,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=s('"'),"string"},"{":function(g,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(g,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=s(y.tokStack[y.tokStack.length-2])),!1}}};t.defineMode("php",function(g,y){var m=t.getMode(g,y&&y.htmlMode||"text/html"),b=t.getMode(g,p);function w(D,E){var S=E.curMode==b;if(D.sol()&&E.pending&&E.pending!='"'&&E.pending!="'"&&(E.pending=null),S)return S&&E.php.tokenize==null&&D.match("?>")?(E.curMode=m,E.curState=E.html,E.php.context.prev||(E.php=null),"meta"):b.token(D,E.curState);if(D.match(/^<\?\w*/))return E.curMode=b,E.php||(E.php=t.startState(b,m.indent(E.html,"",""))),E.curState=E.php,"meta";if(E.pending=='"'||E.pending=="'"){for(;!D.eol()&&D.next()!=E.pending;);var z="string"}else if(E.pending&&D.pos/.test(A)?E.pending=U[0]:E.pending={end:D.pos,style:z},D.backUp(A.length-R)),z}return{startState:function(){var D=t.startState(m),E=y.startOpen?t.startState(b):null;return{html:D,php:E,curMode:y.startOpen?b:m,curState:y.startOpen?E:D,pending:null}},copyState:function(D){var E=D.html,S=t.copyState(m,E),z=D.php,A=z&&t.copyState(b,z),R;return D.curMode==m?R=S:R=A,{html:S,php:A,curMode:D.curMode,curState:R,pending:D.pending}},token:w,indent:function(D,E,S){return D.curMode!=b&&/^\s*<\//.test(E)||D.curMode==b&&/^\?>/.test(E)?m.indent(D.html,E,S):D.curMode.indent(D.curState,E,S)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(D){return{state:D.curState,mode:D.curMode}}}},"htmlmixed","clike"),t.defineMIME("application/x-httpd-php","php"),t.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),t.defineMIME("text/x-php",p)})});var Xd=le((Vd,Yd)=>{(function(t){"use strict";typeof Vd=="object"&&typeof Yd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(window.CodeMirror)})(function(t){"use strict";t.defineMode("powershell",function(){function n(_,V){V=V||{};for(var j=V.prefix!==void 0?V.prefix:"^",Q=V.suffix!==void 0?V.suffix:"\\b",q=0;q<_.length;q++)_[q]instanceof RegExp?_[q]=_[q].source:_[q]=_[q].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(j+"("+_.join("|")+")"+Q,"i")}var i="(?=[^A-Za-z\\d\\-_]|$)",s=/[\w\-:]/,u=n([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:i}),c=/[\[\]{},;`\\\.]|@[({]/,d=n(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),h=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,p=n([d,h],{suffix:""}),g=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,y=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,m=/[A-Z]:|%|\?/i,b=n([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),w=n([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),D=n([m,b,w],{suffix:i}),E={keyword:u,number:g,operator:p,builtin:D,punctuation:c,identifier:y};function S(_,V){var j=V.returnStack[V.returnStack.length-1];if(j&&j.shouldReturnFrom(V))return V.tokenize=j.tokenize,V.returnStack.pop(),V.tokenize(_,V);if(_.eatSpace())return null;if(_.eat("("))return V.bracketNesting+=1,"punctuation";if(_.eat(")"))return V.bracketNesting-=1,"punctuation";for(var Q in E)if(_.match(E[Q]))return Q;var q=_.next();if(q==="'")return z(_,V);if(q==="$")return ee(_,V);if(q==='"')return A(_,V);if(q==="<"&&_.eat("#"))return V.tokenize=G,G(_,V);if(q==="#")return _.skipToEnd(),"comment";if(q==="@"){var I=_.eat(/["']/);if(I&&_.eol())return V.tokenize=P,V.startQuote=I[0],P(_,V);if(_.eol())return"error";if(_.peek().match(/[({]/))return"punctuation";if(_.peek().match(s))return ee(_,V)}return"error"}function z(_,V){for(var j;(j=_.peek())!=null;)if(_.next(),j==="'"&&!_.eat("'"))return V.tokenize=S,"string";return"error"}function A(_,V){for(var j;(j=_.peek())!=null;){if(j==="$")return V.tokenize=R,"string";if(_.next(),j==="`"){_.next();continue}if(j==='"'&&!_.eat('"'))return V.tokenize=S,"string"}return"error"}function R(_,V){return B(_,V,A)}function U(_,V){return V.tokenize=P,V.startQuote='"',P(_,V)}function Y(_,V){return B(_,V,U)}function B(_,V,j){if(_.match("$(")){var Q=V.bracketNesting;return V.returnStack.push({shouldReturnFrom:function(q){return q.bracketNesting===Q},tokenize:j}),V.tokenize=S,V.bracketNesting+=1,"punctuation"}else return _.next(),V.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:j}),V.tokenize=ee,V.tokenize(_,V)}function G(_,V){for(var j=!1,Q;(Q=_.next())!=null;){if(j&&Q==">"){V.tokenize=S;break}j=Q==="#"}return"comment"}function ee(_,V){var j=_.peek();return _.eat("{")?(V.tokenize=J,J(_,V)):j!=null&&j.match(s)?(_.eatWhile(s),V.tokenize=S,"variable-2"):(V.tokenize=S,"error")}function J(_,V){for(var j;(j=_.next())!=null;)if(j==="}"){V.tokenize=S;break}return"variable-2"}function P(_,V){var j=V.startQuote;if(_.sol()&&_.match(new RegExp(j+"@")))V.tokenize=S;else if(j==='"')for(;!_.eol();){var Q=_.peek();if(Q==="$")return V.tokenize=Y,"string";_.next(),Q==="`"&&_.next()}else _.skipToEnd();return"string"}var Z={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:S}},token:function(_,V){return V.tokenize(_,V)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return Z}),t.defineMIME("application/x-powershell","powershell")})});var Jd=le((Zd,Qd)=>{(function(t){typeof Zd=="object"&&typeof Qd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("properties",function(){return{token:function(n,i){var s=n.sol()||i.afterSection,u=n.eol();if(i.afterSection=!1,s&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),u&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),s)for(;n.eatSpace(););var c=n.next();return s&&(c==="#"||c==="!"||c===";")?(i.position="comment",n.skipToEnd(),"comment"):s&&c==="["?(i.afterSection=!0,n.skipTo("]"),n.eat("]"),"header"):c==="="||c===":"?(i.position="quote",null):(c==="\\"&&i.position==="quote"&&(n.eol()&&(i.nextMultiline=!0)),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),t.defineMIME("text/x-properties","properties"),t.defineMIME("text/x-ini","properties")})});var nh=le((eh,th)=>{(function(t){typeof eh=="object"&&typeof th=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var i=n(["and","or","not","is"]),s=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],u=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","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","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];t.registerHelper("hintWords","python",s.concat(u));function c(h){return h.scopes[h.scopes.length-1]}t.defineMode("python",function(h,p){for(var g="error",y=p.delimiters||p.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,m=[p.singleOperators,p.doubleOperators,p.doubleDelimiters,p.tripleDelimiters,p.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],b=0;bI?J(Q):H0&&Z(j,Q)&&(ae+=" "+g),ae}}return B(j,Q)}function B(j,Q,q){if(j.eatSpace())return null;if(!q&&j.match(/^#.*/))return"comment";if(j.match(/^[0-9\.]/,!1)){var I=!1;if(j.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(I=!0),j.match(/^[\d_]+\.\d*/)&&(I=!0),j.match(/^\.\d+/)&&(I=!0),I)return j.eat(/J/i),"number";var H=!1;if(j.match(/^0x[0-9a-f_]+/i)&&(H=!0),j.match(/^0b[01_]+/i)&&(H=!0),j.match(/^0o[0-7_]+/i)&&(H=!0),j.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(j.eat(/J/i),H=!0),j.match(/^0(?![\dx])/i)&&(H=!0),H)return j.eat(/L/i),"number"}if(j.match(A)){var ae=j.current().toLowerCase().indexOf("f")!==-1;return ae?(Q.tokenize=G(j.current(),Q.tokenize),Q.tokenize(j,Q)):(Q.tokenize=ee(j.current(),Q.tokenize),Q.tokenize(j,Q))}for(var F=0;F=0;)j=j.substr(1);var q=j.length==1,I="string";function H(F){return function(T,ce){var de=B(T,ce,!0);return de=="punctuation"&&(T.current()=="{"?ce.tokenize=H(F+1):T.current()=="}"&&(F>1?ce.tokenize=H(F-1):ce.tokenize=ae)),de}}function ae(F,T){for(;!F.eol();)if(F.eatWhile(/[^'"\{\}\\]/),F.eat("\\")){if(F.next(),q&&F.eol())return I}else{if(F.match(j))return T.tokenize=Q,I;if(F.match("{{"))return I;if(F.match("{",!1))return T.tokenize=H(0),F.current()?I:T.tokenize(F,T);if(F.match("}}"))return I;if(F.match("}"))return g;F.eat(/['"]/)}if(q){if(p.singleLineStringErrors)return g;T.tokenize=Q}return I}return ae.isString=!0,ae}function ee(j,Q){for(;"rubf".indexOf(j.charAt(0).toLowerCase())>=0;)j=j.substr(1);var q=j.length==1,I="string";function H(ae,F){for(;!ae.eol();)if(ae.eatWhile(/[^'"\\]/),ae.eat("\\")){if(ae.next(),q&&ae.eol())return I}else{if(ae.match(j))return F.tokenize=Q,I;ae.eat(/['"]/)}if(q){if(p.singleLineStringErrors)return g;F.tokenize=Q}return I}return H.isString=!0,H}function J(j){for(;c(j).type!="py";)j.scopes.pop();j.scopes.push({offset:c(j).offset+h.indentUnit,type:"py",align:null})}function P(j,Q,q){var I=j.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:j.column()+1;Q.scopes.push({offset:Q.indent+w,type:q,align:I})}function Z(j,Q){for(var q=j.indentation();Q.scopes.length>1&&c(Q).offset>q;){if(c(Q).type!="py")return!0;Q.scopes.pop()}return c(Q).offset!=q}function _(j,Q){j.sol()&&(Q.beginningOfLine=!0);var q=Q.tokenize(j,Q),I=j.current();if(Q.beginningOfLine&&I=="@")return j.match(z,!1)?"meta":S?"operator":g;if(/\S/.test(I)&&(Q.beginningOfLine=!1),(q=="variable"||q=="builtin")&&Q.lastToken=="meta"&&(q="meta"),(I=="pass"||I=="return")&&(Q.dedent+=1),I=="lambda"&&(Q.lambda=!0),I==":"&&!Q.lambda&&c(Q).type=="py"&&J(Q),I.length==1&&!/string|comment/.test(q)){var H="[({".indexOf(I);if(H!=-1&&P(j,Q,"])}".slice(H,H+1)),H="])}".indexOf(I),H!=-1)if(c(Q).type==I)Q.indent=Q.scopes.pop().offset-w;else return g}return Q.dedent>0&&j.eol()&&c(Q).type=="py"&&(Q.scopes.length>1&&Q.scopes.pop(),Q.dedent-=1),q}var V={startState:function(j){return{tokenize:Y,scopes:[{offset:j||0,type:"py",align:null}],indent:j||0,lastToken:null,lambda:!1,dedent:0}},token:function(j,Q){var q=Q.errorToken;q&&(Q.errorToken=!1);var I=_(j,Q);return I&&I!="comment"&&(Q.lastToken=I=="keyword"||I=="punctuation"?j.current():I),I=="punctuation"&&(I=null),j.eol()&&Q.lambda&&(Q.lambda=!1),q?I+" "+g:I},indent:function(j,Q){if(j.tokenize!=Y)return j.tokenize.isString?t.Pass:0;var q=c(j),I=q.type==Q.charAt(0);return q.align!=null?q.align-(I?1:0):q.offset-(I?w:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return V}),t.defineMIME("text/x-python","python");var d=function(h){return h.split(" ")};t.defineMIME("text/x-cython",{name:"python",extra_keywords:d("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var oh=le((rh,ih)=>{(function(t){typeof rh=="object"&&typeof ih=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(p){for(var g={},y=0,m=p.length;y]/)?(A.eat(/[\<\>]/),"atom"):A.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":A.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(A.eatWhile(/[\w$\xa1-\uffff]/),A.eat(/[\?\!\=]/),"atom"):"operator";if(U=="@"&&A.match(/^@?[a-zA-Z_\xa1-\uffff]/))return A.eat("@"),A.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(U=="$")return A.eat(/[a-zA-Z_]/)?A.eatWhile(/[\w]/):A.eat(/\d/)?A.eat(/\d/):A.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(U))return A.eatWhile(/[\w\xa1-\uffff]/),A.eat(/[\?\!]/),A.eat(":")?"atom":"ident";if(U=="|"&&(R.varList||R.lastTok=="{"||R.lastTok=="do"))return g="|",null;if(/[\(\)\[\]{}\\;]/.test(U))return g=U,null;if(U=="-"&&A.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(U)){var J=A.eatWhile(/[=+\-\/*:\.^%<>~|]/);return U=="."&&!J&&(g="."),"operator"}else return null}}}function b(A){for(var R=A.pos,U=0,Y,B=!1,G=!1;(Y=A.next())!=null;)if(G)G=!1;else{if("[{(".indexOf(Y)>-1)U++;else if("]})".indexOf(Y)>-1){if(U--,U<0)break}else if(Y=="/"&&U==0){B=!0;break}G=Y=="\\"}return A.backUp(A.pos-R),B}function w(A){return A||(A=1),function(R,U){if(R.peek()=="}"){if(A==1)return U.tokenize.pop(),U.tokenize[U.tokenize.length-1](R,U);U.tokenize[U.tokenize.length-1]=w(A-1)}else R.peek()=="{"&&(U.tokenize[U.tokenize.length-1]=w(A+1));return m(R,U)}}function D(){var A=!1;return function(R,U){return A?(U.tokenize.pop(),U.tokenize[U.tokenize.length-1](R,U)):(A=!0,m(R,U))}}function E(A,R,U,Y){return function(B,G){var ee=!1,J;for(G.context.type==="read-quoted-paused"&&(G.context=G.context.prev,B.eat("}"));(J=B.next())!=null;){if(J==A&&(Y||!ee)){G.tokenize.pop();break}if(U&&J=="#"&&!ee){if(B.eat("{")){A=="}"&&(G.context={prev:G.context,type:"read-quoted-paused"}),G.tokenize.push(w());break}else if(/[@\$]/.test(B.peek())){G.tokenize.push(D());break}}ee=!ee&&J=="\\"}return R}}function S(A,R){return function(U,Y){return R&&U.eatSpace(),U.match(A)?Y.tokenize.pop():U.skipToEnd(),"string"}}function z(A,R){return A.sol()&&A.match("=end")&&A.eol()&&R.tokenize.pop(),A.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[m],indented:0,context:{type:"top",indented:-p.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(A,R){g=null,A.sol()&&(R.indented=A.indentation());var U=R.tokenize[R.tokenize.length-1](A,R),Y,B=g;if(U=="ident"){var G=A.current();U=R.lastTok=="."?"property":s.propertyIsEnumerable(A.current())?"keyword":/^[A-Z]/.test(G)?"tag":R.lastTok=="def"||R.lastTok=="class"||R.varList?"def":"variable",U=="keyword"&&(B=G,u.propertyIsEnumerable(G)?Y="indent":c.propertyIsEnumerable(G)?Y="dedent":((G=="if"||G=="unless")&&A.column()==A.indentation()||G=="do"&&R.context.indented{(function(t){typeof ah=="object"&&typeof sh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineSimpleMode=function(y,m){t.defineMode(y,function(b){return t.simpleMode(b,m)})},t.simpleMode=function(y,m){n(m,"start");var b={},w=m.meta||{},D=!1;for(var E in m)if(E!=w&&m.hasOwnProperty(E))for(var S=b[E]=[],z=m[E],A=0;A2&&R.token&&typeof R.token!="string"){w.pending=[];for(var B=2;B-1)return t.Pass;var E=b.indent.length-1,S=y[b.state];e:for(;;){for(var z=0;z{(function(t){typeof uh=="object"&&typeof ch=="object"?t(Qe(),lh()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],t):t(CodeMirror)})(function(t){"use strict";t.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),t.defineMIME("text/x-rustsrc","rust"),t.defineMIME("text/rust","rust")})});var ph=le((hh,fh)=>{(function(t){typeof hh=="object"&&typeof fh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("shell",function(){var n={};function i(m,b){for(var w=0;w1&&m.eat("$");var w=m.next();return/['"({]/.test(w)?(b.tokens[0]=h(w,w=="("?"quote":w=="{"?"def":"string"),y(m,b)):(/\d/.test(w)||m.eatWhile(/\w/),b.tokens.shift(),"def")};function y(m,b){return(b.tokens[0]||d)(m,b)}return{startState:function(){return{tokens:[]}},token:function(m,b){return y(m,b)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),t.defineMIME("text/x-sh","shell"),t.defineMIME("application/x-sh","shell")})});var vh=le((mh,gh)=>{(function(t){typeof mh=="object"&&typeof gh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("sql",function(p,g){var y=g.client||{},m=g.atoms||{false:!0,true:!0,null:!0},b=g.builtin||d(h),w=g.keywords||d(c),D=g.operatorChars||/^[*+\-%<>!=&|~^\/]/,E=g.support||{},S=g.hooks||{},z=g.dateSQL||{date:!0,time:!0,timestamp:!0},A=g.backslashStringEscapes!==!1,R=g.brackets||/^[\{}\(\)\[\]]/,U=g.punctuation||/^[;.,:]/;function Y(P,Z){var _=P.next();if(S[_]){var V=S[_](P,Z);if(V!==!1)return V}if(E.hexNumber&&(_=="0"&&P.match(/^[xX][0-9a-fA-F]+/)||(_=="x"||_=="X")&&P.match(/^'[0-9a-fA-F]+'/)))return"number";if(E.binaryNumber&&((_=="b"||_=="B")&&P.match(/^'[01]+'/)||_=="0"&&P.match(/^b[01]+/)))return"number";if(_.charCodeAt(0)>47&&_.charCodeAt(0)<58)return P.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),E.decimallessFloat&&P.match(/^\.(?!\.)/),"number";if(_=="?"&&(P.eatSpace()||P.eol()||P.eat(";")))return"variable-3";if(_=="'"||_=='"'&&E.doubleQuote)return Z.tokenize=B(_),Z.tokenize(P,Z);if((E.nCharCast&&(_=="n"||_=="N")||E.charsetCast&&_=="_"&&P.match(/[a-z][a-z0-9]*/i))&&(P.peek()=="'"||P.peek()=='"'))return"keyword";if(E.escapeConstant&&(_=="e"||_=="E")&&(P.peek()=="'"||P.peek()=='"'&&E.doubleQuote))return Z.tokenize=function(Q,q){return(q.tokenize=B(Q.next(),!0))(Q,q)},"keyword";if(E.commentSlashSlash&&_=="/"&&P.eat("/"))return P.skipToEnd(),"comment";if(E.commentHash&&_=="#"||_=="-"&&P.eat("-")&&(!E.commentSpaceRequired||P.eat(" ")))return P.skipToEnd(),"comment";if(_=="/"&&P.eat("*"))return Z.tokenize=G(1),Z.tokenize(P,Z);if(_=="."){if(E.zerolessFloat&&P.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(P.match(/^\.+/))return null;if(E.ODBCdotTable&&P.match(/^[\w\d_$#]+/))return"variable-2"}else{if(D.test(_))return P.eatWhile(D),"operator";if(R.test(_))return"bracket";if(U.test(_))return P.eatWhile(U),"punctuation";if(_=="{"&&(P.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||P.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";P.eatWhile(/^[_\w\d]/);var j=P.current().toLowerCase();return z.hasOwnProperty(j)&&(P.match(/^( )+'[^']*'/)||P.match(/^( )+"[^"]*"/))?"number":m.hasOwnProperty(j)?"atom":b.hasOwnProperty(j)?"builtin":w.hasOwnProperty(j)?"keyword":y.hasOwnProperty(j)?"string-2":null}}function B(P,Z){return function(_,V){for(var j=!1,Q;(Q=_.next())!=null;){if(Q==P&&!j){V.tokenize=Y;break}j=(A||Z)&&!j&&Q=="\\"}return"string"}}function G(P){return function(Z,_){var V=Z.match(/^.*?(\/\*|\*\/)/);return V?V[1]=="/*"?_.tokenize=G(P+1):P>1?_.tokenize=G(P-1):_.tokenize=Y:Z.skipToEnd(),"comment"}}function ee(P,Z,_){Z.context={prev:Z.context,indent:P.indentation(),col:P.column(),type:_}}function J(P){P.indent=P.context.indent,P.context=P.context.prev}return{startState:function(){return{tokenize:Y,context:null}},token:function(P,Z){if(P.sol()&&(Z.context&&Z.context.align==null&&(Z.context.align=!1)),Z.tokenize==Y&&P.eatSpace())return null;var _=Z.tokenize(P,Z);if(_=="comment")return _;Z.context&&Z.context.align==null&&(Z.context.align=!0);var V=P.current();return V=="("?ee(P,Z,")"):V=="["?ee(P,Z,"]"):Z.context&&Z.context.type==V&&J(Z),_},indent:function(P,Z){var _=P.context;if(!_)return t.Pass;var V=Z.charAt(0)==_.type;return _.align?_.col+(V?0:1):_.indent+(V?0:p.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:E.commentSlashSlash?"//":E.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function n(p){for(var g;(g=p.next())!=null;)if(g=="`"&&!p.eat("`"))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function i(p){for(var g;(g=p.next())!=null;)if(g=='"'&&!p.eat('"'))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function s(p){return p.eat("@")&&(p.match(/^session\./),p.match(/^local\./),p.match(/^global\./)),p.eat("'")?(p.match(/^.*'/),"variable-2"):p.eat('"')?(p.match(/^.*"/),"variable-2"):p.eat("`")?(p.match(/^.*`/),"variable-2"):p.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function u(p){return p.eat("N")?"atom":p.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var c="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function d(p){for(var g={},y=p.split(" "),m=0;m!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:d("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":s}}),t.defineMIME("text/x-mysql",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":n,"\\":u}}),t.defineMIME("text/x-mariadb",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":n,"\\":u}}),t.defineMIME("text/x-sqlite",{name:"sql",client:d("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:d(c+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:d("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:d("date time timestamp datetime"),support:d("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":s,":":s,"?":s,$:s,'"':i,"`":n}}),t.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:d("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:d("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:d("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:d("commentSlashSlash decimallessFloat"),hooks:{}}),t.defineMIME("text/x-plsql",{name:"sql",client:d("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:d("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:d("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:d("date time timestamp"),support:d("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),t.defineMIME("text/x-hive",{name:"sql",keywords:d("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:d("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:d("date timestamp"),support:d("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-pgsql",{name:"sql",client:d("source"),keywords:d(c+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv 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_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),t.defineMIME("text/x-gql",{name:"sql",keywords:d("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:d("false true"),builtin:d("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),t.defineMIME("text/x-gpsql",{name:"sql",client:d("source"),keywords:d("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-sparksql",{name:"sql",keywords:d("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:d("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:d("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable doubleQuote zerolessFloat")}),t.defineMIME("text/x-esper",{name:"sql",client:d("source"),keywords:d("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:d("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("time"),support:d("decimallessFloat zerolessFloat binaryNumber hexNumber")})})});var wh=le((bh,yh)=>{(function(t){typeof bh=="object"&&typeof yh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(n,i){if(!i.inString&&(n.peek()=='"'||n.peek()=="'")&&(i.stringType=n.peek(),n.next(),i.inString=!0),n.sol()&&i.inArray===0&&(i.lhs=!0),i.inString){for(;i.inString&&!n.eol();)n.peek()===i.stringType?(n.next(),i.inString=!1):n.peek()==="\\"?(n.next(),n.next()):n.match(/^.[^\\\"\']*/);return i.lhs?"property string":"string"}else{if(i.inArray&&n.peek()==="]")return n.next(),i.inArray--,"bracket";if(i.lhs&&n.peek()==="["&&n.skipTo("]"))return n.next(),n.peek()==="]"&&n.next(),"atom";if(n.peek()==="#")return n.skipToEnd(),"comment";if(n.eatSpace())return null;if(i.lhs&&n.eatWhile(function(s){return s!="="&&s!=" "}))return"property";if(i.lhs&&n.peek()==="=")return n.next(),i.lhs=!1,null;if(!i.lhs&&n.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!i.lhs&&(n.match("true")||n.match("false")))return"atom";if(!i.lhs&&n.peek()==="[")return i.inArray++,n.next(),"bracket";if(!i.lhs&&n.match(/^\-?\d+(?:\.\d+)?/))return"number";n.eatSpace()||n.next()}return null}}}),t.defineMIME("text/x-toml","toml")})});var _h=le((kh,xh)=>{(function(t){typeof kh=="object"&&typeof xh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("yaml",function(){var n=["true","false","on","off","yes","no"],i=new RegExp("\\b(("+n.join(")|(")+"))$","i");return{token:function(s,u){var c=s.peek(),d=u.escaped;if(u.escaped=!1,c=="#"&&(s.pos==0||/\s/.test(s.string.charAt(s.pos-1))))return s.skipToEnd(),"comment";if(s.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(u.literal&&s.indentation()>u.keyCol)return s.skipToEnd(),"string";if(u.literal&&(u.literal=!1),s.sol()){if(u.keyCol=0,u.pair=!1,u.pairStart=!1,s.match(/---/))return"def";if(s.match(/\.\.\./))return"def";if(s.match(/\s*-\s+/))return"meta"}if(s.match(/^(\{|\}|\[|\])/))return c=="{"?u.inlinePairs++:c=="}"?u.inlinePairs--:c=="["?u.inlineList++:u.inlineList--,"meta";if(u.inlineList>0&&!d&&c==",")return s.next(),"meta";if(u.inlinePairs>0&&!d&&c==",")return u.keyCol=0,u.pair=!1,u.pairStart=!1,s.next(),"meta";if(u.pairStart){if(s.match(/^\s*(\||\>)\s*/))return u.literal=!0,"meta";if(s.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(u.inlinePairs==0&&s.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(u.inlinePairs>0&&s.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(s.match(i))return"keyword"}return!u.pair&&s.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(u.pair=!0,u.keyCol=s.indentation(),"atom"):u.pair&&s.match(/^:\s*/)?(u.pairStart=!0,"meta"):(u.pairStart=!1,u.escaped=c=="\\",s.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),t.defineMIME("text/x-yaml","yaml"),t.defineMIME("text/yaml","yaml")})});var Eh=le((Ch,Sh)=>{(function(t){typeof Ch=="object"&&typeof Sh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineOption("scrollPastEnd",!1,function(s,u,c){c&&c!=t.Init&&(s.off("change",n),s.off("refresh",i),s.display.lineSpace.parentNode.style.paddingBottom="",s.state.scrollPastEndPadding=null),u&&(s.on("change",n),s.on("refresh",i),i(s))});function n(s,u){t.changeEnd(u).line==s.lastLine()&&i(s)}function i(s){var u="";if(s.lineCount()>1){var c=s.display.scroller.clientHeight-30,d=s.getLineHandle(s.lastLine()).height;u=c-d+"px"}s.state.scrollPastEndPadding!=u&&(s.state.scrollPastEndPadding=u,s.display.lineSpace.parentNode.style.paddingBottom=u,s.off("refresh",i),s.setSize(),s.on("refresh",i))}})});var Fh=le((o_,na)=>{"use strict";function ra(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ra=function(i){return typeof i}:ra=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ra(t)}function jy(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&Qs(t,n)}function Qs(t,n){return Qs=Object.setPrototypeOf||function(s,u){return s.__proto__=u,s},Qs(t,n)}function Uy(t){var n=Hy();return function(){var s=ia(t),u;if(n){var c=ia(this).constructor;u=Reflect.construct(s,arguments,c)}else u=s.apply(this,arguments);return Dh(this,u)}}function Dh(t,n){return n&&(ra(n)==="object"||typeof n=="function")?n:Yi(t)}function Yi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hy(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},ia(t)}function Ue(t,n){var i;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(i=Wy(t))||n&&t&&typeof t.length=="number"){i&&(t=i);var s=0,u=function(){};return{s:u,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(g){throw g},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,d=!1,h;return{s:function(){i=t[Symbol.iterator]()},n:function(){var g=i.next();return c=g.done,g},e:function(g){d=!0,h=g},f:function(){try{!c&&i.return!=null&&i.return()}finally{if(d)throw h}}}}function Wy(t,n){if(!t)return;if(typeof t=="string")return Ah(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ah(t,n)}function Ah(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,s=new Array(n);i1?u-1:0),d=1;d
'),this.element.appendChild(c));var g=c.getElementsByTagName("span")[0];return g&&(g.textContent!=null?g.textContent=this.options.dictFallbackMessage:g.innerText!=null&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(c,d,h,p){var g={srcX:0,srcY:0,srcWidth:c.width,srcHeight:c.height},y=c.width/c.height;d==null&&h==null?(d=g.srcWidth,h=g.srcHeight):d==null?d=h*y:h==null&&(h=d/y),d=Math.min(d,g.srcWidth),h=Math.min(h,g.srcHeight);var m=d/h;if(g.srcWidth>d||g.srcHeight>h)if(p==="crop")y>m?(g.srcHeight=c.height,g.srcWidth=g.srcHeight*m):(g.srcWidth=c.width,g.srcHeight=g.srcWidth/m);else if(p==="contain")y>m?h=d/y:d=h*y;else throw new Error("Unknown resizeMethod '".concat(p,"'"));return g.srcX=(c.width-g.srcWidth)/2,g.srcY=(c.height-g.srcHeight)/2,g.trgWidth=d,g.trgHeight=h,g},transformFile:function(c,d){return(this.options.resizeWidth||this.options.resizeHeight)&&c.type.match(/image.*/)?this.resizeImage(c,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,d):d(c)},previewTemplate:`
@@ -48,45 +48,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
-
`,drop:function(c){return this.element.classList.remove("dz-drag-hover")},dragstart:function(c){},dragend:function(c){return this.element.classList.remove("dz-drag-hover")},dragenter:function(c){return this.element.classList.add("dz-drag-hover")},dragover:function(c){return this.element.classList.add("dz-drag-hover")},dragleave:function(c){return this.element.classList.remove("dz-drag-hover")},paste:function(c){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(c){var d=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){c.previewElement=i.createElement(this.options.previewTemplate.trim()),c.previewTemplate=c.previewElement,this.previewsContainer.appendChild(c.previewElement);var h=We(c.previewElement.querySelectorAll("[data-dz-name]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=c.name}}catch(C){h.e(C)}finally{h.f()}var y=We(c.previewElement.querySelectorAll("[data-dz-size]")),m;try{for(y.s();!(m=y.n()).done;)g=m.value,g.innerHTML=this.filesize(c.size)}catch(C){y.e(C)}finally{y.f()}this.options.addRemoveLinks&&(c._removeLink=i.createElement(''.concat(this.options.dictRemoveFile,"")),c.previewElement.appendChild(c._removeLink));var v=function(q){return q.preventDefault(),q.stopPropagation(),c.status===i.UPLOADING?i.confirm(d.options.dictCancelUploadConfirmation,function(){return d.removeFile(c)}):d.options.dictRemoveFileConfirmation?i.confirm(d.options.dictRemoveFileConfirmation,function(){return d.removeFile(c)}):d.removeFile(c)},w=We(c.previewElement.querySelectorAll("[data-dz-remove]")),E;try{for(w.s();!(E=w.n()).done;){var D=E.value;D.addEventListener("click",v)}}catch(C){w.e(C)}finally{w.f()}}},removedfile:function(c){return c.previewElement!=null&&c.previewElement.parentNode!=null&&c.previewElement.parentNode.removeChild(c.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(c,d){if(c.previewElement){c.previewElement.classList.remove("dz-file-preview");var h=We(c.previewElement.querySelectorAll("[data-dz-thumbnail]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.alt=c.name,g.src=d}}catch(y){h.e(y)}finally{h.f()}return setTimeout(function(){return c.previewElement.classList.add("dz-image-preview")},1)}},error:function(c,d){if(c.previewElement){c.previewElement.classList.add("dz-error"),typeof d!="string"&&d.error&&(d=d.error);var h=We(c.previewElement.querySelectorAll("[data-dz-errormessage]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=d}}catch(y){h.e(y)}finally{h.f()}}},errormultiple:function(){},processing:function(c){if(c.previewElement&&(c.previewElement.classList.add("dz-processing"),c._removeLink))return c._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(c,d,h){if(c.previewElement){var p=We(c.previewElement.querySelectorAll("[data-dz-uploadprogress]")),g;try{for(p.s();!(g=p.n()).done;){var y=g.value;y.nodeName==="PROGRESS"?y.value=d:y.style.width="".concat(d,"%")}}catch(m){p.e(m)}finally{p.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(c){if(c.previewElement)return c.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(c){return this.emit("error",c,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(c){if(c._removeLink&&(c._removeLink.innerHTML=this.options.dictRemoveFile),c.previewElement)return c.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h"))),this.clickableElements.length){var c=function m(){return l.hiddenFileInput&&l.hiddenFileInput.parentNode.removeChild(l.hiddenFileInput),l.hiddenFileInput=document.createElement("input"),l.hiddenFileInput.setAttribute("type","file"),(l.options.maxFiles===null||l.options.maxFiles>1)&&l.hiddenFileInput.setAttribute("multiple","multiple"),l.hiddenFileInput.className="dz-hidden-input",l.options.acceptedFiles!==null&&l.hiddenFileInput.setAttribute("accept",l.options.acceptedFiles),l.options.capture!==null&&l.hiddenFileInput.setAttribute("capture",l.options.capture),l.hiddenFileInput.style.visibility="hidden",l.hiddenFileInput.style.position="absolute",l.hiddenFileInput.style.top="0",l.hiddenFileInput.style.left="0",l.hiddenFileInput.style.height="0",l.hiddenFileInput.style.width="0",i.getElement(l.options.hiddenInputContainer,"hiddenInputContainer").appendChild(l.hiddenFileInput),l.hiddenFileInput.addEventListener("change",function(){var v=l.hiddenFileInput.files;if(v.length){var w=We(v),E;try{for(w.s();!(E=w.n()).done;){var D=E.value;l.addFile(D)}}catch(C){w.e(C)}finally{w.f()}}return l.emit("addedfiles",v),m()})};c()}this.URL=window.URL!==null?window.URL:window.webkitURL;var d=We(this.events),h;try{for(d.s();!(h=d.n()).done;){var p=h.value;this.on(p,this.options[p])}}catch(m){d.e(m)}finally{d.f()}this.on("uploadprogress",function(){return l.updateTotalUploadProgress()}),this.on("removedfile",function(){return l.updateTotalUploadProgress()}),this.on("canceled",function(m){return l.emit("complete",m)}),this.on("complete",function(m){if(l.getAddedFiles().length===0&&l.getUploadingFiles().length===0&&l.getQueuedFiles().length===0)return setTimeout(function(){return l.emit("queuecomplete")},0)});var g=function(v){if(v.dataTransfer.types){for(var w=0;w")),d+='');var h=i.createElement(d);return this.element.tagName!=="FORM"?(c=i.createElement('
')),c.appendChild(h)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),c??h}},{key:"getExistingFallback",value:function(){for(var l=function(y){var m=We(y),v;try{for(m.s();!(v=m.n()).done;){var w=v.value;if(/(^| )fallback($| )/.test(w.className))return w}}catch(E){m.e(E)}finally{m.f()}},c=0,d=["div","form"];c0){for(var h=["tb","gb","mb","kb","b"],p=0;p=y){c=l/Math.pow(this.options.filesizeBase,4-p),d=g;break}}c=Math.round(10*c)/10}return"".concat(c," ").concat(this.options.dictFileSizeUnits[d])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(l){if(!l.dataTransfer)return;this.emit("drop",l);for(var c=[],d=0;d0){var v=We(m),w;try{for(v.s();!(w=v.n()).done;){var E=w.value;E.isFile?E.file(function(D){return d.options.ignoreHiddenFiles&&D.name.substring(0,1)==="."?void 0:(D.fullPath="".concat(c,"/").concat(D.name),d.addFile(D))}):E.isDirectory&&d._addFilesFromDirectory(E,"".concat(c,"/").concat(E.name))}}catch(D){v.e(D)}finally{v.f()}y()}return null},p)};return g()}},{key:"accept",value:function(l,c){this.options.maxFilesize&&l.size>this.options.maxFilesize*1024*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(l.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):i.isValidFile(l,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",l)):this.options.accept.call(this,l,c):c(this.options.dictInvalidFileType)}},{key:"addFile",value:function(l){var c=this;l.upload={uuid:i.uuidv4(),progress:0,total:l.size,bytesSent:0,filename:this._renameFile(l)},this.files.push(l),l.status=i.ADDED,this.emit("addedfile",l),this._enqueueThumbnail(l),this.accept(l,function(d){d?(l.accepted=!1,c._errorProcessing([l],d)):(l.accepted=!0,c.options.autoQueue&&c.enqueueFile(l)),c._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(l){var c=We(l),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;this.enqueueFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"enqueueFile",value:function(l){var c=this;if(l.status===i.ADDED&&l.accepted===!0){if(l.status=i.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return c.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(l){var c=this;if(this.options.createImageThumbnails&&l.type.match(/image.*/)&&l.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(l),setTimeout(function(){return c._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var l=this;if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;var c=this._thumbnailQueue.shift();return this.createThumbnail(c,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(d){return l.emit("thumbnail",c,d),l._processingThumbnail=!1,l._processThumbnailQueue()})}},{key:"removeFile",value:function(l){if(l.status===i.UPLOADING&&this.cancelUpload(l),this.files=Ky(this.files,l),this.emit("removedfile",l),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(l){l==null&&(l=!1);var c=We(this.files.slice()),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;(h.status!==i.UPLOADING||l)&&this.removeFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"resizeImage",value:function(l,c,d,h,p){var g=this;return this.createThumbnail(l,c,d,h,!0,function(y,m){if(m==null)return p(l);var v=g.options.resizeMimeType;v==null&&(v=l.type);var w=m.toDataURL(v,g.options.resizeQuality);return(v==="image/jpeg"||v==="image/jpg")&&(w=Fh.restore(l.dataURL,w)),p(i.dataURItoBlob(w))})}},{key:"createThumbnail",value:function(l,c,d,h,p,g){var y=this,m=new FileReader();m.onload=function(){if(l.dataURL=m.result,l.type==="image/svg+xml"){g!=null&&g(m.result);return}y.createThumbnailFromUrl(l,c,d,h,p,g)},m.readAsDataURL(l)}},{key:"displayExistingFile",value:function(l,c,d,h){var p=this,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",l),this.emit("complete",l),!g)this.emit("thumbnail",l,c),d&&d();else{var y=function(v){p.emit("thumbnail",l,v),d&&d()};l.dataURL=c,this.createThumbnailFromUrl(l,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,y,h)}}},{key:"createThumbnailFromUrl",value:function(l,c,d,h,p,g,y){var m=this,v=document.createElement("img");return y&&(v.crossOrigin=y),p=getComputedStyle(document.body).imageOrientation=="from-image"?!1:p,v.onload=function(){var w=function(D){return D(1)};return typeof EXIF!="undefined"&&EXIF!==null&&p&&(w=function(D){return EXIF.getData(v,function(){return D(EXIF.getTag(this,"Orientation"))})}),w(function(E){l.width=v.width,l.height=v.height;var D=m.options.resize.call(m,l,c,d,h),C=document.createElement("canvas"),q=C.getContext("2d");C.width=D.trgWidth,C.height=D.trgHeight,E>4&&(C.width=D.trgHeight,C.height=D.trgWidth);switch(E){case 2:q.translate(C.width,0),q.scale(-1,1);break;case 3:q.translate(C.width,C.height),q.rotate(Math.PI);break;case 4:q.translate(0,C.height),q.scale(1,-1);break;case 5:q.rotate(.5*Math.PI),q.scale(1,-1);break;case 6:q.rotate(.5*Math.PI),q.translate(0,-C.width);break;case 7:q.rotate(.5*Math.PI),q.translate(C.height,-C.width),q.scale(-1,1);break;case 8:q.rotate(-.5*Math.PI),q.translate(-C.height,0);break}Vy(q,v,D.srcX!=null?D.srcX:0,D.srcY!=null?D.srcY:0,D.srcWidth,D.srcHeight,D.trgX!=null?D.trgX:0,D.trgY!=null?D.trgY:0,D.trgWidth,D.trgHeight);var A=C.toDataURL("image/png");if(g!=null)return g(A,C)})},g!=null&&(v.onerror=g),v.src=l.dataURL}},{key:"processQueue",value:function(){var l=this.options.parallelUploads,c=this.getUploadingFiles().length,d=c;if(c>=l)return;var h=this.getQueuedFiles();if(!(h.length>0))return;if(this.options.uploadMultiple)return this.processFiles(h.slice(0,l-c));for(;d1?c-1:0),h=1;hc.options.chunkSize),l[0].upload.totalChunkCount=Math.ceil(h.size/c.options.chunkSize)}if(l[0].upload.chunked){var p=l[0],g=d[0],y=0;p.upload.chunks=[];var m=function(){for(var C=0;p.upload.chunks[C]!==void 0;)C++;if(C>=p.upload.totalChunkCount)return;y++;var q=C*c.options.chunkSize,A=Math.min(q+c.options.chunkSize,g.size),H={name:c._getParamName(0),data:g.webkitSlice?g.webkitSlice(q,A):g.slice(q,A),filename:p.upload.filename,chunkIndex:C};p.upload.chunks[C]={file:p,index:C,dataBlock:H,status:i.UPLOADING,progress:0,retries:0},c._uploadData(l,[H])};if(p.upload.finishedChunkUpload=function(D){var C=!0;D.status=i.SUCCESS,D.dataBlock=null,D.xhr=null;for(var q=0;q=d;h?c++:c--)l[c]=t.charCodeAt(c);return new Blob([s],{type:i})};var Ky=function(t,i){return t.filter(function(s){return s!==i}).map(function(s){return s})},Zy=function(t){return t.replace(/[\-_](\w)/g,function(i){return i.charAt(1).toUpperCase()})};Ne.createElement=function(n){var t=document.createElement("div");return t.innerHTML=n,t.childNodes[0]};Ne.elementInside=function(n,t){if(n===t)return!0;for(;n=n.parentNode;)if(n===t)return!0;return!1};Ne.getElement=function(n,t){var i;if(typeof n=="string"?i=document.querySelector(n):n.nodeType!=null&&(i=n),i==null)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector or a plain HTML element."));return i};Ne.getElements=function(n,t){var i,s;if(n instanceof Array){s=[];try{var l=We(n),c;try{for(l.s();!(c=l.n()).done;)i=c.value,s.push(this.getElement(i,t))}catch(p){l.e(p)}finally{l.f()}}catch(p){s=null}}else if(typeof n=="string"){s=[];var d=We(document.querySelectorAll(n)),h;try{for(d.s();!(h=d.n()).done;)i=h.value,s.push(i)}catch(p){d.e(p)}finally{d.f()}}else n.nodeType!=null&&(s=[n]);if(s==null||!s.length)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return s};Ne.confirm=function(n,t,i){if(window.confirm(n))return t();if(i!=null)return i()};Ne.isValidFile=function(n,t){if(!t)return!0;t=t.split(",");var i=n.type,s=i.replace(/\/.*$/,""),l=We(t),c;try{for(l.s();!(c=l.n()).done;){var d=c.value;if(d=d.trim(),d.charAt(0)==="."){if(n.name.toLowerCase().indexOf(d.toLowerCase(),n.name.length-d.length)!==-1)return!0}else if(/\/\*$/.test(d)){if(s===d.replace(/\/.*$/,""))return!0}else if(i===d)return!0}}catch(h){l.e(h)}finally{l.f()}return!1};typeof jQuery!="undefined"&&jQuery!==null&&(jQuery.fn.dropzone=function(n){return this.each(function(){return new Ne(this,n)})});typeof na!="undefined"&&na!==null?na.exports=Ne:window.Dropzone=Ne;Ne.ADDED="added";Ne.QUEUED="queued";Ne.ACCEPTED=Ne.QUEUED;Ne.UPLOADING="uploading";Ne.PROCESSING=Ne.UPLOADING;Ne.CANCELED="canceled";Ne.ERROR="error";Ne.SUCCESS="success";var Qy=function(t){var i=t.naturalWidth,s=t.naturalHeight,l=document.createElement("canvas");l.width=1,l.height=s;var c=l.getContext("2d");c.drawImage(t,0,0);for(var d=c.getImageData(1,0,1,s),h=d.data,p=0,g=s,y=s;y>p;){var m=h[(y-1)*4+3];m===0?g=y:p=y,y=g+p>>1}var v=y/s;return v===0?1:v},Vy=function(t,i,s,l,c,d,h,p,g,y){var m=Qy(i);return t.drawImage(i,s,l,c,d,h,p,g,y/m)},Fh=function(){function n(){Js(this,n)}return oa(n,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(i){for(var s="",l=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0;!(l=i[m++],c=i[m++],d=i[m++],h=l>>2,p=(l&3)<<4|c>>4,g=(c&15)<<2|d>>6,y=d&63,isNaN(c)?g=y=64:isNaN(d)&&(y=64),s=s+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(p)+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(y),l=c=d="",h=p=g=y="",!(mi.length)break}return l}},{key:"decode64",value:function(i){var s="",l=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0,v=[],w=/[^A-Za-z0-9\+\/\=]/g;for(w.exec(i)&&console.warn(`There were invalid base64 characters in the input text. +`,drop:function(c){return this.element.classList.remove("dz-drag-hover")},dragstart:function(c){},dragend:function(c){return this.element.classList.remove("dz-drag-hover")},dragenter:function(c){return this.element.classList.add("dz-drag-hover")},dragover:function(c){return this.element.classList.add("dz-drag-hover")},dragleave:function(c){return this.element.classList.remove("dz-drag-hover")},paste:function(c){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(c){var d=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){c.previewElement=i.createElement(this.options.previewTemplate.trim()),c.previewTemplate=c.previewElement,this.previewsContainer.appendChild(c.previewElement);var h=Ue(c.previewElement.querySelectorAll("[data-dz-name]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=c.name}}catch(S){h.e(S)}finally{h.f()}var y=Ue(c.previewElement.querySelectorAll("[data-dz-size]")),m;try{for(y.s();!(m=y.n()).done;)g=m.value,g.innerHTML=this.filesize(c.size)}catch(S){y.e(S)}finally{y.f()}this.options.addRemoveLinks&&(c._removeLink=i.createElement(''.concat(this.options.dictRemoveFile,"")),c.previewElement.appendChild(c._removeLink));var b=function(z){return z.preventDefault(),z.stopPropagation(),c.status===i.UPLOADING?i.confirm(d.options.dictCancelUploadConfirmation,function(){return d.removeFile(c)}):d.options.dictRemoveFileConfirmation?i.confirm(d.options.dictRemoveFileConfirmation,function(){return d.removeFile(c)}):d.removeFile(c)},w=Ue(c.previewElement.querySelectorAll("[data-dz-remove]")),D;try{for(w.s();!(D=w.n()).done;){var E=D.value;E.addEventListener("click",b)}}catch(S){w.e(S)}finally{w.f()}}},removedfile:function(c){return c.previewElement!=null&&c.previewElement.parentNode!=null&&c.previewElement.parentNode.removeChild(c.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(c,d){if(c.previewElement){c.previewElement.classList.remove("dz-file-preview");var h=Ue(c.previewElement.querySelectorAll("[data-dz-thumbnail]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.alt=c.name,g.src=d}}catch(y){h.e(y)}finally{h.f()}return setTimeout(function(){return c.previewElement.classList.add("dz-image-preview")},1)}},error:function(c,d){if(c.previewElement){c.previewElement.classList.add("dz-error"),typeof d!="string"&&d.error&&(d=d.error);var h=Ue(c.previewElement.querySelectorAll("[data-dz-errormessage]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=d}}catch(y){h.e(y)}finally{h.f()}}},errormultiple:function(){},processing:function(c){if(c.previewElement&&(c.previewElement.classList.add("dz-processing"),c._removeLink))return c._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(c,d,h){if(c.previewElement){var p=Ue(c.previewElement.querySelectorAll("[data-dz-uploadprogress]")),g;try{for(p.s();!(g=p.n()).done;){var y=g.value;y.nodeName==="PROGRESS"?y.value=d:y.style.width="".concat(d,"%")}}catch(m){p.e(m)}finally{p.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(c){if(c.previewElement)return c.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(c){return this.emit("error",c,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(c){if(c._removeLink&&(c._removeLink.innerHTML=this.options.dictRemoveFile),c.previewElement)return c.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(u){for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h"))),this.clickableElements.length){var c=function m(){return u.hiddenFileInput&&u.hiddenFileInput.parentNode.removeChild(u.hiddenFileInput),u.hiddenFileInput=document.createElement("input"),u.hiddenFileInput.setAttribute("type","file"),(u.options.maxFiles===null||u.options.maxFiles>1)&&u.hiddenFileInput.setAttribute("multiple","multiple"),u.hiddenFileInput.className="dz-hidden-input",u.options.acceptedFiles!==null&&u.hiddenFileInput.setAttribute("accept",u.options.acceptedFiles),u.options.capture!==null&&u.hiddenFileInput.setAttribute("capture",u.options.capture),u.hiddenFileInput.style.visibility="hidden",u.hiddenFileInput.style.position="absolute",u.hiddenFileInput.style.top="0",u.hiddenFileInput.style.left="0",u.hiddenFileInput.style.height="0",u.hiddenFileInput.style.width="0",i.getElement(u.options.hiddenInputContainer,"hiddenInputContainer").appendChild(u.hiddenFileInput),u.hiddenFileInput.addEventListener("change",function(){var b=u.hiddenFileInput.files;if(b.length){var w=Ue(b),D;try{for(w.s();!(D=w.n()).done;){var E=D.value;u.addFile(E)}}catch(S){w.e(S)}finally{w.f()}}return u.emit("addedfiles",b),m()})};c()}this.URL=window.URL!==null?window.URL:window.webkitURL;var d=Ue(this.events),h;try{for(d.s();!(h=d.n()).done;){var p=h.value;this.on(p,this.options[p])}}catch(m){d.e(m)}finally{d.f()}this.on("uploadprogress",function(){return u.updateTotalUploadProgress()}),this.on("removedfile",function(){return u.updateTotalUploadProgress()}),this.on("canceled",function(m){return u.emit("complete",m)}),this.on("complete",function(m){if(u.getAddedFiles().length===0&&u.getUploadingFiles().length===0&&u.getQueuedFiles().length===0)return setTimeout(function(){return u.emit("queuecomplete")},0)});var g=function(b){if(b.dataTransfer.types){for(var w=0;w")),d+='');var h=i.createElement(d);return this.element.tagName!=="FORM"?(c=i.createElement('
')),c.appendChild(h)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),c!=null?c:h}},{key:"getExistingFallback",value:function(){for(var u=function(y){var m=Ue(y),b;try{for(m.s();!(b=m.n()).done;){var w=b.value;if(/(^| )fallback($| )/.test(w.className))return w}}catch(D){m.e(D)}finally{m.f()}},c=0,d=["div","form"];c0){for(var h=["tb","gb","mb","kb","b"],p=0;p=y){c=u/Math.pow(this.options.filesizeBase,4-p),d=g;break}}c=Math.round(10*c)/10}return"".concat(c," ").concat(this.options.dictFileSizeUnits[d])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(u){if(!u.dataTransfer)return;this.emit("drop",u);for(var c=[],d=0;d0){var b=Ue(m),w;try{for(b.s();!(w=b.n()).done;){var D=w.value;D.isFile?D.file(function(E){return d.options.ignoreHiddenFiles&&E.name.substring(0,1)==="."?void 0:(E.fullPath="".concat(c,"/").concat(E.name),d.addFile(E))}):D.isDirectory&&d._addFilesFromDirectory(D,"".concat(c,"/").concat(D.name))}}catch(E){b.e(E)}finally{b.f()}y()}return null},p)};return g()}},{key:"accept",value:function(u,c){this.options.maxFilesize&&u.size>this.options.maxFilesize*1024*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(u.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):i.isValidFile(u,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",u)):this.options.accept.call(this,u,c):c(this.options.dictInvalidFileType)}},{key:"addFile",value:function(u){var c=this;u.upload={uuid:i.uuidv4(),progress:0,total:u.size,bytesSent:0,filename:this._renameFile(u)},this.files.push(u),u.status=i.ADDED,this.emit("addedfile",u),this._enqueueThumbnail(u),this.accept(u,function(d){d?(u.accepted=!1,c._errorProcessing([u],d)):(u.accepted=!0,c.options.autoQueue&&c.enqueueFile(u)),c._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(u){var c=Ue(u),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;this.enqueueFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"enqueueFile",value:function(u){var c=this;if(u.status===i.ADDED&&u.accepted===!0){if(u.status=i.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return c.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(u){var c=this;if(this.options.createImageThumbnails&&u.type.match(/image.*/)&&u.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(u),setTimeout(function(){return c._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var u=this;if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;var c=this._thumbnailQueue.shift();return this.createThumbnail(c,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(d){return u.emit("thumbnail",c,d),u._processingThumbnail=!1,u._processThumbnailQueue()})}},{key:"removeFile",value:function(u){if(u.status===i.UPLOADING&&this.cancelUpload(u),this.files=$y(this.files,u),this.emit("removedfile",u),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(u){u==null&&(u=!1);var c=Ue(this.files.slice()),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;(h.status!==i.UPLOADING||u)&&this.removeFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"resizeImage",value:function(u,c,d,h,p){var g=this;return this.createThumbnail(u,c,d,h,!0,function(y,m){if(m==null)return p(u);var b=g.options.resizeMimeType;b==null&&(b=u.type);var w=m.toDataURL(b,g.options.resizeQuality);return(b==="image/jpeg"||b==="image/jpg")&&(w=Ih.restore(u.dataURL,w)),p(i.dataURItoBlob(w))})}},{key:"createThumbnail",value:function(u,c,d,h,p,g){var y=this,m=new FileReader;m.onload=function(){if(u.dataURL=m.result,u.type==="image/svg+xml"){g!=null&&g(m.result);return}y.createThumbnailFromUrl(u,c,d,h,p,g)},m.readAsDataURL(u)}},{key:"displayExistingFile",value:function(u,c,d,h){var p=this,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",u),this.emit("complete",u),!g)this.emit("thumbnail",u,c),d&&d();else{var y=function(b){p.emit("thumbnail",u,b),d&&d()};u.dataURL=c,this.createThumbnailFromUrl(u,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,y,h)}}},{key:"createThumbnailFromUrl",value:function(u,c,d,h,p,g,y){var m=this,b=document.createElement("img");return y&&(b.crossOrigin=y),p=getComputedStyle(document.body).imageOrientation=="from-image"?!1:p,b.onload=function(){var w=function(E){return E(1)};return typeof EXIF!="undefined"&&EXIF!==null&&p&&(w=function(E){return EXIF.getData(b,function(){return E(EXIF.getTag(this,"Orientation"))})}),w(function(D){u.width=b.width,u.height=b.height;var E=m.options.resize.call(m,u,c,d,h),S=document.createElement("canvas"),z=S.getContext("2d");S.width=E.trgWidth,S.height=E.trgHeight,D>4&&(S.width=E.trgHeight,S.height=E.trgWidth);switch(D){case 2:z.translate(S.width,0),z.scale(-1,1);break;case 3:z.translate(S.width,S.height),z.rotate(Math.PI);break;case 4:z.translate(0,S.height),z.scale(1,-1);break;case 5:z.rotate(.5*Math.PI),z.scale(1,-1);break;case 6:z.rotate(.5*Math.PI),z.translate(0,-S.width);break;case 7:z.rotate(.5*Math.PI),z.translate(S.height,-S.width),z.scale(-1,1);break;case 8:z.rotate(-.5*Math.PI),z.translate(-S.height,0);break}Gy(z,b,E.srcX!=null?E.srcX:0,E.srcY!=null?E.srcY:0,E.srcWidth,E.srcHeight,E.trgX!=null?E.trgX:0,E.trgY!=null?E.trgY:0,E.trgWidth,E.trgHeight);var A=S.toDataURL("image/png");if(g!=null)return g(A,S)})},g!=null&&(b.onerror=g),b.src=u.dataURL}},{key:"processQueue",value:function(){var u=this.options.parallelUploads,c=this.getUploadingFiles().length,d=c;if(c>=u)return;var h=this.getQueuedFiles();if(!(h.length>0))return;if(this.options.uploadMultiple)return this.processFiles(h.slice(0,u-c));for(;d1?c-1:0),h=1;hc.options.chunkSize),u[0].upload.totalChunkCount=Math.ceil(h.size/c.options.chunkSize)}if(u[0].upload.chunked){var p=u[0],g=d[0],y=0;p.upload.chunks=[];var m=function(){for(var S=0;p.upload.chunks[S]!==void 0;)S++;if(S>=p.upload.totalChunkCount)return;y++;var z=S*c.options.chunkSize,A=Math.min(z+c.options.chunkSize,g.size),R={name:c._getParamName(0),data:g.webkitSlice?g.webkitSlice(z,A):g.slice(z,A),filename:p.upload.filename,chunkIndex:S};p.upload.chunks[S]={file:p,index:S,dataBlock:R,status:i.UPLOADING,progress:0,retries:0},c._uploadData(u,[R])};if(p.upload.finishedChunkUpload=function(E){var S=!0;E.status=i.SUCCESS,E.dataBlock=null,E.xhr=null;for(var z=0;z=d;h?c++:c--)u[c]=n.charCodeAt(c);return new Blob([s],{type:i})};var $y=function(n,i){return n.filter(function(s){return s!==i}).map(function(s){return s})},Yy=function(n){return n.replace(/[\-_](\w)/g,function(i){return i.charAt(1).toUpperCase()})};Be.createElement=function(t){var n=document.createElement("div");return n.innerHTML=t,n.childNodes[0]};Be.elementInside=function(t,n){if(t===n)return!0;for(;t=t.parentNode;)if(t===n)return!0;return!1};Be.getElement=function(t,n){var i;if(typeof t=="string"?i=document.querySelector(t):t.nodeType!=null&&(i=t),i==null)throw new Error("Invalid `".concat(n,"` option provided. Please provide a CSS selector or a plain HTML element."));return i};Be.getElements=function(t,n){var i,s;if(t instanceof Array){s=[];try{var u=Ue(t),c;try{for(u.s();!(c=u.n()).done;)i=c.value,s.push(this.getElement(i,n))}catch(p){u.e(p)}finally{u.f()}}catch(p){s=null}}else if(typeof t=="string"){s=[];var d=Ue(document.querySelectorAll(t)),h;try{for(d.s();!(h=d.n()).done;)i=h.value,s.push(i)}catch(p){d.e(p)}finally{d.f()}}else t.nodeType!=null&&(s=[t]);if(s==null||!s.length)throw new Error("Invalid `".concat(n,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return s};Be.confirm=function(t,n,i){if(window.confirm(t))return n();if(i!=null)return i()};Be.isValidFile=function(t,n){if(!n)return!0;n=n.split(",");var i=t.type,s=i.replace(/\/.*$/,""),u=Ue(n),c;try{for(u.s();!(c=u.n()).done;){var d=c.value;if(d=d.trim(),d.charAt(0)==="."){if(t.name.toLowerCase().indexOf(d.toLowerCase(),t.name.length-d.length)!==-1)return!0}else if(/\/\*$/.test(d)){if(s===d.replace(/\/.*$/,""))return!0}else if(i===d)return!0}}catch(h){u.e(h)}finally{u.f()}return!1};typeof jQuery!="undefined"&&jQuery!==null&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new Be(this,t)})});typeof na!="undefined"&&na!==null?na.exports=Be:window.Dropzone=Be;Be.ADDED="added";Be.QUEUED="queued";Be.ACCEPTED=Be.QUEUED;Be.UPLOADING="uploading";Be.PROCESSING=Be.UPLOADING;Be.CANCELED="canceled";Be.ERROR="error";Be.SUCCESS="success";var Xy=function(n){var i=n.naturalWidth,s=n.naturalHeight,u=document.createElement("canvas");u.width=1,u.height=s;var c=u.getContext("2d");c.drawImage(n,0,0);for(var d=c.getImageData(1,0,1,s),h=d.data,p=0,g=s,y=s;y>p;){var m=h[(y-1)*4+3];m===0?g=y:p=y,y=g+p>>1}var b=y/s;return b===0?1:b},Gy=function(n,i,s,u,c,d,h,p,g,y){var m=Xy(i);return n.drawImage(i,s,u,c,d,h,p,g,y/m)},Ih=function(){function t(){Js(this,t)}return oa(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(i){for(var s="",u=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0;!(u=i[m++],c=i[m++],d=i[m++],h=u>>2,p=(u&3)<<4|c>>4,g=(c&15)<<2|d>>6,y=d&63,isNaN(c)?g=y=64:isNaN(d)&&(y=64),s=s+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(p)+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(y),u=c=d="",h=p=g=y="",!(mi.length)break}return u}},{key:"decode64",value:function(i){var s="",u=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0,b=[],w=/[^A-Za-z0-9\+\/\=]/g;for(w.exec(i)&&console.warn(`There were invalid base64 characters in the input text. Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '=' -Expect errors in decoding.`),i=i.replace(/[^A-Za-z0-9\+\/\=]/g,"");!(h=this.KEY_STR.indexOf(i.charAt(m++)),p=this.KEY_STR.indexOf(i.charAt(m++)),g=this.KEY_STR.indexOf(i.charAt(m++)),y=this.KEY_STR.indexOf(i.charAt(m++)),l=h<<2|p>>4,c=(p&15)<<4|g>>2,d=(g&3)<<6|y,v.push(l),g!==64&&v.push(c),y!==64&&v.push(d),l=c=d="",h=p=g=y="",!(m{class ew{constructor(n){this.elem=n,this.toggleButton=n.querySelector(".mobile-menu-toggle"),this.menu=n.querySelector(".header-links"),this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this)}onToggle(n){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.open?window.addEventListener("click",this.onWindowClick):window.removeEventListener("click",this.onWindowClick),n.stopPropagation()}onWindowClick(n){this.onToggle(n)}}qh.exports=ew});var Ph=se((F_,Oh)=>{Oh.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` -`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}});var el=se((M_,Rh)=>{"use strict";Rh.exports=Ph()});var aa=se((q_,Nh)=>{Nh.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/});var Uh=se((z_,Bh)=>{"use strict";var Hh={};function tw(n){var t,i,s=Hh[n];if(s)return s;for(s=Hh[n]=[],t=0;t<128;t++)i=String.fromCharCode(t),/^[0-9a-z]$/i.test(i)?s.push(i):s.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&c<=57343){if(c>=55296&&c<=56319&&s+1=56320&&d<=57343)){p+=encodeURIComponent(n[s]+n[s+1]),s++;continue}p+="%EF%BF%BD";continue}p+=encodeURIComponent(n[s])}return p}sa.defaultChars=";/?:@&=+$,-_.!~*'()#";sa.componentChars="-_.!~*'()";Bh.exports=sa});var $h=se((O_,Wh)=>{"use strict";var jh={};function nw(n){var t,i,s=jh[n];if(s)return s;for(s=jh[n]=[],t=0;t<128;t++)i=String.fromCharCode(t),s.push(i);for(t=0;t=55296&&y<=57343?m+="���":m+=String.fromCharCode(y),l+=6;continue}if((d&248)===240&&l+91114111?m+="����":(y-=65536,m+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),l+=9;continue}m+="�"}return m})}la.defaultChars=";/?:@&=+$,#";la.componentChars="";Wh.exports=la});var Kh=se((P_,Gh)=>{"use strict";Gh.exports=function(t){var i="";return i+=t.protocol||"",i+=t.slashes?"//":"",i+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?i+="["+t.hostname+"]":i+=t.hostname||"",i+=t.port?":"+t.port:"",i+=t.pathname||"",i+=t.search||"",i+=t.hash||"",i}});var ef=se((R_,Vh)=>{"use strict";function ua(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var rw=/^([a-z0-9.+-]+:)/i,iw=/:[0-9]*$/,ow=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,aw=["<",">",'"',"`"," ","\r",` -`," "],sw=["{","}","|","\\","^","`"].concat(aw),lw=["'"].concat(sw),Yh=["%","/","?",";","#"].concat(lw),Xh=["/","?","#"],uw=255,Zh=/^[+a-z0-9A-Z_-]{0,63}$/,cw=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Qh={javascript:!0,"javascript:":!0},Jh={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function dw(n,t){if(n&&n instanceof ua)return n;var i=new ua();return i.parse(n,t),i}ua.prototype.parse=function(n,t){var i,s,l,c,d,h=n;if(h=h.trim(),!t&&n.split("#").length===1){var p=ow.exec(h);if(p)return this.pathname=p[1],p[2]&&(this.search=p[2]),this}var g=rw.exec(h);if(g&&(g=g[0],l=g.toLowerCase(),this.protocol=g,h=h.substr(g.length)),(t||g||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(d=h.substr(0,2)==="//",d&&!(g&&Qh[g])&&(h=h.substr(2),this.slashes=!0)),!Qh[g]&&(d||g&&!Jh[g])){var y=-1;for(i=0;i127?q+="x":q+=C[A];if(!q.match(Zh)){var N=D.slice(0,i),V=D.slice(i+1),B=C.match(cw);B&&(N.push(B[1]),V.unshift(B[2])),V.length&&(h=V.join(".")+h),this.hostname=N.join(".");break}}}}this.hostname.length>uw&&(this.hostname=""),E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var K=h.indexOf("#");K!==-1&&(this.hash=h.substr(K),h=h.slice(0,K));var ee=h.indexOf("?");return ee!==-1&&(this.search=h.substr(ee),h=h.slice(0,ee)),h&&(this.pathname=h),Jh[l]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ua.prototype.parseHost=function(n){var t=iw.exec(n);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),n=n.substr(0,n.length-t.length)),n&&(this.hostname=n)};Vh.exports=dw});var tl=se((N_,Yi)=>{"use strict";Yi.exports.encode=Uh();Yi.exports.decode=$h();Yi.exports.format=Kh();Yi.exports.parse=ef()});var nl=se((B_,tf)=>{tf.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var rl=se((H_,nf)=>{nf.exports=/[\0-\x1F\x7F-\x9F]/});var of=se((U_,rf)=>{rf.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 il=se((W_,af)=>{af.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var sf=se(ni=>{"use strict";ni.Any=nl();ni.Cc=rl();ni.Cf=of();ni.P=aa();ni.Z=il()});var Je=se(qt=>{"use strict";function hw(n){return Object.prototype.toString.call(n)}function fw(n){return hw(n)==="[object String]"}var pw=Object.prototype.hasOwnProperty;function lf(n,t){return pw.call(n,t)}function mw(n){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(i){if(!i)return;if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){n[s]=i[s]})}),n}function gw(n,t,i){return[].concat(n.slice(0,t),i,n.slice(t+1))}function uf(n){return n>=55296&&n<=57343||(n>=64976&&n<=65007||((n&65535)===65535||(n&65535)===65534||(n>=0&&n<=8||(n===11||(n>=14&&n<=31||n>=127&&n<=159)))))?!1:!(n>1114111)}function cf(n){if(n>65535){n-=65536;var t=55296+(n>>10),i=56320+(n&1023);return String.fromCharCode(t,i)}return String.fromCharCode(n)}var df=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,vw=/&([a-z#][a-z0-9]{1,31});/gi,bw=new RegExp(df.source+"|"+vw.source,"gi"),yw=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,hf=el();function ww(n,t){var i=0;return lf(hf,t)?hf[t]:t.charCodeAt(0)===35&&yw.test(t)&&(i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10),uf(i))?cf(i):n}function kw(n){return n.indexOf("\\")<0?n:n.replace(df,"$1")}function xw(n){return n.indexOf("\\")<0&&n.indexOf("&")<0?n:n.replace(bw,function(t,i,s){return i||ww(t,s)})}var _w=/[&<>"]/,Sw=/[&<>"]/g,Cw={"&":"&","<":"<",">":">",'"':"""};function Ew(n){return Cw[n]}function Dw(n){return _w.test(n)?n.replace(Sw,Ew):n}var Aw=/[.?*+^$[\]\\(){}|-]/g;function Tw(n){return n.replace(Aw,"\\$&")}function Lw(n){switch(n){case 9:case 32:return!0}return!1}function Iw(n){if(n>=8192&&n<=8202)return!0;switch(n){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var Fw=aa();function Mw(n){return Fw.test(n)}function qw(n){switch(n){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function zw(n){return n=n.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(n=n.replace(/ẞ/g,"ß")),n.toLowerCase().toUpperCase()}qt.lib={};qt.lib.mdurl=tl();qt.lib.ucmicro=sf();qt.assign=mw;qt.isString=fw;qt.has=lf;qt.unescapeMd=kw;qt.unescapeAll=xw;qt.isValidEntityCode=uf;qt.fromCodePoint=cf;qt.escapeHtml=Dw;qt.arrayReplaceAt=gw;qt.isSpace=Lw;qt.isWhiteSpace=Iw;qt.isMdAsciiPunct=qw;qt.isPunctChar=Mw;qt.escapeRE=Tw;qt.normalizeReference=zw});var pf=se((G_,ff)=>{"use strict";ff.exports=function(t,i,s){var l,c,d,h,p=-1,g=t.posMax,y=t.pos;for(t.pos=i+1,l=1;t.pos{"use strict";var gf=Je().unescapeAll;mf.exports=function(t,i,s){var l,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(t.charCodeAt(i)===60){for(i++;i{"use strict";var Ow=Je().unescapeAll;bf.exports=function(t,i,s){var l,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(i>=s)return p;if(c=t.charCodeAt(i),c!==34&&c!==39&&c!==40)return p;for(i++,c===40&&(c=41);i{"use strict";ca.parseLinkLabel=pf();ca.parseLinkDestination=vf();ca.parseLinkTitle=yf()});var xf=se((X_,kf)=>{"use strict";var Pw=Je().assign,Rw=Je().unescapeAll,Sr=Je().escapeHtml,zn={};zn.code_inline=function(n,t,i,s,l){var c=n[t];return""+Sr(n[t].content)+""};zn.code_block=function(n,t,i,s,l){var c=n[t];return""+Sr(n[t].content)+` -`};zn.fence=function(n,t,i,s,l){var c=n[t],d=c.info?Rw(c.info).trim():"",h="",p,g,y,m;return d&&(h=d.split(/\s+/g)[0]),i.highlight?p=i.highlight(c.content,h)||Sr(c.content):p=Sr(c.content),p.indexOf(""+p+` -`):"
"+p+`
-`};zn.image=function(n,t,i,s,l){var c=n[t];return c.attrs[c.attrIndex("alt")][1]=l.renderInlineAsText(c.children,i,s),l.renderToken(n,t,i)};zn.hardbreak=function(n,t,i){return i.xhtmlOut?`
+Expect errors in decoding.`),i=i.replace(/[^A-Za-z0-9\+\/\=]/g,"");!(h=this.KEY_STR.indexOf(i.charAt(m++)),p=this.KEY_STR.indexOf(i.charAt(m++)),g=this.KEY_STR.indexOf(i.charAt(m++)),y=this.KEY_STR.indexOf(i.charAt(m++)),u=h<<2|p>>4,c=(p&15)<<4|g>>2,d=(g&3)<<6|y,b.push(u),g!==64&&b.push(c),y!==64&&b.push(d),u=c=d="",h=p=g=y="",!(m{class Qy{constructor(t){this.elem=t,this.toggleButton=t.querySelector(".mobile-menu-toggle"),this.menu=t.querySelector(".header-links"),this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this)}onToggle(t){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.open?window.addEventListener("click",this.onWindowClick):window.removeEventListener("click",this.onWindowClick),t.stopPropagation()}onWindowClick(t){this.onToggle(t)}}Mh.exports=Qy});var Ph=le((s_,zh)=>{zh.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` +`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}});var el=le((l_,Rh)=>{"use strict";Rh.exports=Ph()});var aa=le((u_,Oh)=>{Oh.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/});var jh=le((c_,Nh)=>{"use strict";var Bh={};function Jy(t){var n,i,s=Bh[t];if(s)return s;for(s=Bh[t]=[],n=0;n<128;n++)i=String.fromCharCode(n),/^[0-9a-z]$/i.test(i)?s.push(i):s.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n=55296&&c<=57343){if(c>=55296&&c<=56319&&s+1=56320&&d<=57343)){p+=encodeURIComponent(t[s]+t[s+1]),s++;continue}p+="%EF%BF%BD";continue}p+=encodeURIComponent(t[s])}return p}sa.defaultChars=";/?:@&=+$,-_.!~*'()#";sa.componentChars="-_.!~*'()";Nh.exports=sa});var Wh=le((d_,Hh)=>{"use strict";var Uh={};function ew(t){var n,i,s=Uh[t];if(s)return s;for(s=Uh[t]=[],n=0;n<128;n++)i=String.fromCharCode(n),s.push(i);for(n=0;n=55296&&y<=57343?m+="���":m+=String.fromCharCode(y),u+=6;continue}if((d&248)===240&&u+91114111?m+="����":(y-=65536,m+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),u+=9;continue}m+="�"}return m})}la.defaultChars=";/?:@&=+$,#";la.componentChars="";Hh.exports=la});var Gh=le((h_,$h)=>{"use strict";$h.exports=function(n){var i="";return i+=n.protocol||"",i+=n.slashes?"//":"",i+=n.auth?n.auth+"@":"",n.hostname&&n.hostname.indexOf(":")!==-1?i+="["+n.hostname+"]":i+=n.hostname||"",i+=n.port?":"+n.port:"",i+=n.pathname||"",i+=n.search||"",i+=n.hash||"",i}});var Jh=le((f_,Kh)=>{"use strict";function ua(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var tw=/^([a-z0-9.+-]+:)/i,nw=/:[0-9]*$/,rw=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,iw=["<",">",'"',"`"," ","\r",` +`," "],ow=["{","}","|","\\","^","`"].concat(iw),aw=["'"].concat(ow),Vh=["%","/","?",";","#"].concat(aw),Yh=["/","?","#"],sw=255,Xh=/^[+a-z0-9A-Z_-]{0,63}$/,lw=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Zh={javascript:!0,"javascript:":!0},Qh={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function uw(t,n){if(t&&t instanceof ua)return t;var i=new ua;return i.parse(t,n),i}ua.prototype.parse=function(t,n){var i,s,u,c,d,h=t;if(h=h.trim(),!n&&t.split("#").length===1){var p=rw.exec(h);if(p)return this.pathname=p[1],p[2]&&(this.search=p[2]),this}var g=tw.exec(h);if(g&&(g=g[0],u=g.toLowerCase(),this.protocol=g,h=h.substr(g.length)),(n||g||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(d=h.substr(0,2)==="//",d&&!(g&&Zh[g])&&(h=h.substr(2),this.slashes=!0)),!Zh[g]&&(d||g&&!Qh[g])){var y=-1;for(i=0;i127?z+="x":z+=S[A];if(!z.match(Xh)){var U=E.slice(0,i),Y=E.slice(i+1),B=S.match(lw);B&&(U.push(B[1]),Y.unshift(B[2])),Y.length&&(h=Y.join(".")+h),this.hostname=U.join(".");break}}}}this.hostname.length>sw&&(this.hostname=""),D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var G=h.indexOf("#");G!==-1&&(this.hash=h.substr(G),h=h.slice(0,G));var ee=h.indexOf("?");return ee!==-1&&(this.search=h.substr(ee),h=h.slice(0,ee)),h&&(this.pathname=h),Qh[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ua.prototype.parseHost=function(t){var n=nw.exec(t);n&&(n=n[0],n!==":"&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};Kh.exports=uw});var tl=le((p_,Xi)=>{"use strict";Xi.exports.encode=jh();Xi.exports.decode=Wh();Xi.exports.format=Gh();Xi.exports.parse=Jh()});var nl=le((m_,ef)=>{ef.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var rl=le((g_,tf)=>{tf.exports=/[\0-\x1F\x7F-\x9F]/});var rf=le((v_,nf)=>{nf.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 il=le((b_,of)=>{of.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var af=le(ti=>{"use strict";ti.Any=nl();ti.Cc=rl();ti.Cf=rf();ti.P=aa();ti.Z=il()});var Je=le(qt=>{"use strict";function cw(t){return Object.prototype.toString.call(t)}function dw(t){return cw(t)==="[object String]"}var hw=Object.prototype.hasOwnProperty;function sf(t,n){return hw.call(t,n)}function fw(t){var n=Array.prototype.slice.call(arguments,1);return n.forEach(function(i){if(!i)return;if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){t[s]=i[s]})}),t}function pw(t,n,i){return[].concat(t.slice(0,n),i,t.slice(n+1))}function lf(t){return t>=55296&&t<=57343||(t>=64976&&t<=65007||((t&65535)===65535||(t&65535)===65534||(t>=0&&t<=8||(t===11||(t>=14&&t<=31||t>=127&&t<=159)))))?!1:!(t>1114111)}function uf(t){if(t>65535){t-=65536;var n=55296+(t>>10),i=56320+(t&1023);return String.fromCharCode(n,i)}return String.fromCharCode(t)}var cf=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,mw=/&([a-z#][a-z0-9]{1,31});/gi,gw=new RegExp(cf.source+"|"+mw.source,"gi"),vw=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,df=el();function bw(t,n){var i=0;return sf(df,n)?df[n]:n.charCodeAt(0)===35&&vw.test(n)&&(i=n[1].toLowerCase()==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10),lf(i))?uf(i):t}function yw(t){return t.indexOf("\\")<0?t:t.replace(cf,"$1")}function ww(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(gw,function(n,i,s){return i||bw(n,s)})}var kw=/[&<>"]/,xw=/[&<>"]/g,_w={"&":"&","<":"<",">":">",'"':"""};function Cw(t){return _w[t]}function Sw(t){return kw.test(t)?t.replace(xw,Cw):t}var Ew=/[.?*+^$[\]\\(){}|-]/g;function Dw(t){return t.replace(Ew,"\\$&")}function Aw(t){switch(t){case 9:case 32:return!0}return!1}function Tw(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var Lw=aa();function Iw(t){return Lw.test(t)}function Fw(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Mw(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}qt.lib={};qt.lib.mdurl=tl();qt.lib.ucmicro=af();qt.assign=fw;qt.isString=dw;qt.has=sf;qt.unescapeMd=yw;qt.unescapeAll=ww;qt.isValidEntityCode=lf;qt.fromCodePoint=uf;qt.escapeHtml=Sw;qt.arrayReplaceAt=pw;qt.isSpace=Aw;qt.isWhiteSpace=Tw;qt.isMdAsciiPunct=Fw;qt.isPunctChar=Iw;qt.escapeRE=Dw;qt.normalizeReference=Mw});var ff=le((k_,hf)=>{"use strict";hf.exports=function(n,i,s){var u,c,d,h,p=-1,g=n.posMax,y=n.pos;for(n.pos=i+1,u=1;n.pos{"use strict";var mf=Je().unescapeAll;pf.exports=function(n,i,s){var u,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(n.charCodeAt(i)===60){for(i++;i{"use strict";var qw=Je().unescapeAll;vf.exports=function(n,i,s){var u,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(i>=s)return p;if(c=n.charCodeAt(i),c!==34&&c!==39&&c!==40)return p;for(i++,c===40&&(c=41);i{"use strict";ca.parseLinkLabel=ff();ca.parseLinkDestination=gf();ca.parseLinkTitle=bf()});var kf=le((S_,wf)=>{"use strict";var zw=Je().assign,Pw=Je().unescapeAll,Cr=Je().escapeHtml,zn={};zn.code_inline=function(t,n,i,s,u){var c=t[n];return""+Cr(t[n].content)+""};zn.code_block=function(t,n,i,s,u){var c=t[n];return""+Cr(t[n].content)+` +`};zn.fence=function(t,n,i,s,u){var c=t[n],d=c.info?Pw(c.info).trim():"",h="",p,g,y,m;return d&&(h=d.split(/\s+/g)[0]),i.highlight?p=i.highlight(c.content,h)||Cr(c.content):p=Cr(c.content),p.indexOf(""+p+` +`):"
"+p+`
+`};zn.image=function(t,n,i,s,u){var c=t[n];return c.attrs[c.attrIndex("alt")][1]=u.renderInlineAsText(c.children,i,s),u.renderToken(t,n,i)};zn.hardbreak=function(t,n,i){return i.xhtmlOut?`
`:`
-`};zn.softbreak=function(n,t,i){return i.breaks?i.xhtmlOut?`
+`};zn.softbreak=function(t,n,i){return i.breaks?i.xhtmlOut?`
`:`
`:` -`};zn.text=function(n,t){return Sr(n[t].content)};zn.html_block=function(n,t){return n[t].content};zn.html_inline=function(n,t){return n[t].content};function ri(){this.rules=Pw({},zn)}ri.prototype.renderAttrs=function(t){var i,s,l;if(!t.attrs)return"";for(l="",i=0,s=t.attrs.length;i -`:">",c)};ri.prototype.renderInline=function(n,t,i){for(var s,l="",c=this.rules,d=0,h=n.length;d{"use strict";function kn(){this.__rules__=[],this.__cache__=null}kn.prototype.__find__=function(n){for(var t=0;t{"use strict";var Nw=/\r\n?|\n/g,Bw=/\0/g;Sf.exports=function(t){var i;i=t.src.replace(Nw,` -`),i=i.replace(Bw,"�"),t.src=i}});var Df=se((J_,Ef)=>{"use strict";Ef.exports=function(t){var i;t.inlineMode?(i=new t.Token("inline","",0),i.content=t.src,i.map=[0,1],i.children=[],t.tokens.push(i)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}});var Tf=se((e2,Af)=>{"use strict";Af.exports=function(t){var i=t.tokens,s,l,c;for(l=0,c=i.length;l{"use strict";var Hw=Je().arrayReplaceAt;function Uw(n){return/^\s]/i.test(n)}function Ww(n){return/^<\/a\s*>/i.test(n)}Lf.exports=function(t){var i,s,l,c,d,h,p,g,y,m,v,w,E,D,C,q,A=t.tokens,H;if(!t.md.options.linkify)return;for(s=0,l=A.length;s=0;i--){if(h=c[i],h.type==="link_close"){for(i--;c[i].level!==h.level&&c[i].type!=="link_open";)i--;continue}if(h.type==="html_inline"&&(Uw(h.content)&&E>0&&E--,Ww(h.content)&&E++),E>0)continue;if(h.type==="text"&&t.md.linkify.test(h.content)){for(y=h.content,H=t.md.linkify.match(y),p=[],w=h.level,v=0,g=0;gv&&(d=new t.Token("text","",0),d.content=y.slice(v,m),d.level=w,p.push(d)),d=new t.Token("link_open","a",1),d.attrs=[["href",C]],d.level=w++,d.markup="linkify",d.info="auto",p.push(d),d=new t.Token("text","",0),d.content=q,d.level=w,p.push(d),d=new t.Token("link_close","a",-1),d.level=--w,d.markup="linkify",d.info="auto",p.push(d),v=H[g].lastIndex}v{"use strict";var Mf=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,jw=/\((c|tm|r|p)\)/i,$w=/\((c|tm|r|p)\)/ig,Gw={c:"©",r:"®",p:"§",tm:"™"};function Kw(n,t){return Gw[t.toLowerCase()]}function Vw(n){var t,i,s=0;for(t=n.length-1;t>=0;t--)i=n[t],i.type==="text"&&!s&&(i.content=i.content.replace($w,Kw)),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}function Yw(n){var t,i,s=0;for(t=n.length-1;t>=0;t--)i=n[t],i.type==="text"&&!s&&(Mf.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–"))),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}Ff.exports=function(t){var i;if(!t.md.options.typographer)return;for(i=t.tokens.length-1;i>=0;i--){if(t.tokens[i].type!=="inline")continue;jw.test(t.tokens[i].content)&&Vw(t.tokens[i].children),Mf.test(t.tokens[i].content)&&Yw(t.tokens[i].children)}}});var Hf=se((r2,zf)=>{"use strict";var Of=Je().isWhiteSpace,Pf=Je().isPunctChar,Rf=Je().isMdAsciiPunct,Xw=/['"]/,Nf=/['"]/g,Bf="’";function ha(n,t,i){return n.substr(0,t)+i+n.substr(t+1)}function Zw(n,t){var i,s,l,c,d,h,p,g,y,m,v,w,E,D,C,q,A,H,N,V,B;for(N=[],i=0;i=0&&!(N[A].level<=p);A--);if(N.length=A+1,s.type!=="text")continue;l=s.content,d=0,h=l.length;e:for(;d=0)y=l.charCodeAt(c.index-1);else for(A=i-1;A>=0&&!(n[A].type==="softbreak"||n[A].type==="hardbreak");A--){if(n[A].type!=="text")continue;y=n[A].content.charCodeAt(n[A].content.length-1);break}if(m=32,d=48&&y<=57&&(q=C=!1)),C&&q&&(C=v,q=w),!C&&!q){H&&(s.content=ha(s.content,c.index,Bf));continue}if(q){for(A=N.length-1;A>=0&&!(g=N[A],N[A].level=0;i--){if(t.tokens[i].type!=="inline"||!Xw.test(t.tokens[i].content))continue;Zw(t.tokens[i].children,t)}}});var fa=se((i2,Uf)=>{"use strict";function ii(n,t,i){this.type=n,this.tag=t,this.attrs=null,this.map=null,this.nesting=i,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ii.prototype.attrIndex=function(t){var i,s,l;if(!this.attrs)return-1;for(i=this.attrs,s=0,l=i.length;s=0&&(s=this.attrs[i][1]),s};ii.prototype.attrJoin=function(t,i){var s=this.attrIndex(t);s<0?this.attrPush([t,i]):this.attrs[s][1]=this.attrs[s][1]+" "+i};Uf.exports=ii});var $f=se((o2,Wf)=>{"use strict";var Qw=fa();function jf(n,t,i){this.src=n,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=t}jf.prototype.Token=Qw;Wf.exports=jf});var Kf=se((a2,Gf)=>{"use strict";var Jw=da(),ol=[["normalize",Cf()],["block",Df()],["inline",Tf()],["linkify",If()],["replacements",qf()],["smartquotes",Hf()]];function al(){this.ruler=new Jw();for(var n=0;n{"use strict";var ek=Je().isSpace;function sl(n,t){var i=n.bMarks[t]+n.blkIndent,s=n.eMarks[t];return n.src.substr(i,s-i)}function Yf(n){var t=[],i=0,s=n.length,l,c=0,d=0,h=!1,p=0;for(l=n.charCodeAt(i);is)return!1;if(g=i+1,t.sCount[g]=4)return!1;if(h=t.bMarks[g]+t.tShift[g],h>=t.eMarks[g])return!1;if(c=t.src.charCodeAt(h++),c!==124&&c!==45&&c!==58)return!1;for(;h=4)return!1;if(y=Yf(d.replace(/^\||\|$/g,"")),m=y.length,m>w.length)return!1;if(l)return!0;for(v=t.push("table_open","table",1),v.map=D=[i,0],v=t.push("thead_open","thead",1),v.map=[i,i+1],v=t.push("tr_open","tr",1),v.map=[i,i+1],p=0;p=4)break;for(y=Yf(d.replace(/^\||\|$/g,"")),v=t.push("tr_open","tr",1),p=0;p{"use strict";Zf.exports=function(t,i,s){var l,c,d;if(t.sCount[i]-t.blkIndent<4)return!1;for(c=l=i+1;l=4){l++,c=l;continue}break}return t.line=c,d=t.push("code_block","code",0),d.content=t.getLines(i,c,4+t.blkIndent,!0),d.map=[i,t.line],!0}});var ep=se((u2,Jf)=>{"use strict";Jf.exports=function(t,i,s,l){var c,d,h,p,g,y,m,v=!1,w=t.bMarks[i]+t.tShift[i],E=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(w+3>E)return!1;if(c=t.src.charCodeAt(w),c!==126&&c!==96)return!1;if(g=w,w=t.skipChars(w,c),d=w-g,d<3)return!1;if(m=t.src.slice(g,w),h=t.src.slice(w,E),c===96&&h.indexOf(String.fromCharCode(c))>=0)return!1;if(l)return!0;for(p=i;!(p++,p>=s);){if(w=g=t.bMarks[p]+t.tShift[p],E=t.eMarks[p],w=4)continue;if(w=t.skipChars(w,c),w-g{"use strict";var np=Je().isSpace;tp.exports=function(t,i,s,l){var c,d,h,p,g,y,m,v,w,E,D,C,q,A,H,N,V,B,K,ee,J=t.lineMax,z=t.bMarks[i]+t.tShift[i],Q=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(t.src.charCodeAt(z++)!==62)return!1;if(l)return!0;for(p=w=t.sCount[i]+z-(t.bMarks[i]+t.tShift[i]),t.src.charCodeAt(z)===32?(z++,p++,w++,c=!1,N=!0):t.src.charCodeAt(z)===9?(N=!0,(t.bsCount[i]+w)%4===3?(z++,p++,w++,c=!1):c=!0):N=!1,E=[t.bMarks[i]],t.bMarks[i]=z;z=Q,A=[t.sCount[i]],t.sCount[i]=w-p,H=[t.tShift[i]],t.tShift[i]=z-t.bMarks[i],B=t.md.block.ruler.getRules("blockquote"),q=t.parentType,t.parentType="blockquote",ee=!1,v=i+1;v=Q);v++){if(t.src.charCodeAt(z++)===62&&!ee){for(p=w=t.sCount[v]+z-(t.bMarks[v]+t.tShift[v]),t.src.charCodeAt(z)===32?(z++,p++,w++,c=!1,N=!0):t.src.charCodeAt(z)===9?(N=!0,(t.bsCount[v]+w)%4===3?(z++,p++,w++,c=!1):c=!0):N=!1,E.push(t.bMarks[v]),t.bMarks[v]=z;z=Q,D.push(t.bsCount[v]),t.bsCount[v]=t.sCount[v]+1+(N?1:0),A.push(t.sCount[v]),t.sCount[v]=w-p,H.push(t.tShift[v]),t.tShift[v]=z-t.bMarks[v];continue}if(y)break;for(V=!1,h=0,g=B.length;h",K.map=m=[i,0],t.md.block.tokenize(t,i,v),K=t.push("blockquote_close","blockquote",-1),K.markup=">",t.lineMax=J,t.parentType=q,m[1]=t.line,h=0;h{"use strict";var tk=Je().isSpace;ip.exports=function(t,i,s,l){var c,d,h,p,g=t.bMarks[i]+t.tShift[i],y=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(c=t.src.charCodeAt(g++),c!==42&&c!==45&&c!==95)return!1;for(d=1;g{"use strict";var sp=Je().isSpace;function lp(n,t){var i,s,l,c;return s=n.bMarks[t]+n.tShift[t],l=n.eMarks[t],i=n.src.charCodeAt(s++),i!==42&&i!==45&&i!==43||s=c)return-1;if(i=n.src.charCodeAt(l++),i<48||i>57)return-1;for(;;){if(l>=c)return-1;if(i=n.src.charCodeAt(l++),i>=48&&i<=57){if(l-s>=10)return-1;continue}if(i===41||i===46)break;return-1}return l=4)return!1;if(t.listIndent>=0&&t.sCount[i]-t.listIndent>=4&&t.sCount[i]=t.blkIndent&&(I=!0)),(Q=up(t,i))>=0){if(m=!0,Y=t.bMarks[i]+t.tShift[i],q=Number(t.src.substr(Y,Q-Y-1)),I&&q!==1)return!1}else if((Q=lp(t,i))>=0)m=!1;else return!1;if(I&&t.skipSpaces(Q)>=t.eMarks[i])return!1;if(C=t.src.charCodeAt(Q-1),l)return!0;for(D=t.tokens.length,m?(O=t.push("ordered_list_open","ol",1),q!==1&&(O.attrs=[["start",q]])):O=t.push("bullet_list_open","ul",1),O.map=E=[i,0],O.markup=String.fromCharCode(C),H=i,_=!1,Z=t.md.block.ruler.getRules("list"),B=t.parentType,t.parentType="list";H=A?g=1:g=N-y,g>4&&(g=1),p=y+g,O=t.push("list_item_open","li",1),O.markup=String.fromCharCode(C),O.map=v=[i,0],J=t.tight,ee=t.tShift[i],K=t.sCount[i],V=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=p,t.tight=!0,t.tShift[i]=d-t.bMarks[i],t.sCount[i]=N,d>=A&&t.isEmpty(i+1)?t.line=Math.min(t.line+2,s):t.md.block.tokenize(t,i,s,!0),(!t.tight||_)&&(W=!1),_=t.line-i>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=V,t.tShift[i]=ee,t.sCount[i]=K,t.tight=J,O=t.push("list_item_close","li",-1),O.markup=String.fromCharCode(C),H=i=t.line,v[1]=H,d=t.bMarks[i],H>=s)break;if(t.sCount[H]=4)break;for(U=!1,h=0,w=Z.length;h{"use strict";var rk=Je().normalizeReference,pa=Je().isSpace;dp.exports=function(t,i,s,l){var c,d,h,p,g,y,m,v,w,E,D,C,q,A,H,N,V=0,B=t.bMarks[i]+t.tShift[i],K=t.eMarks[i],ee=i+1;if(t.sCount[i]-t.blkIndent>=4)return!1;if(t.src.charCodeAt(B)!==91)return!1;for(;++B3)continue;if(t.sCount[ee]<0)continue;for(A=!1,y=0,m=H.length;y{"use strict";var pp=Je().isSpace;fp.exports=function(t,i,s,l){var c,d,h,p,g=t.bMarks[i]+t.tShift[i],y=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(c=t.src.charCodeAt(g),c!==35||g>=y)return!1;for(d=1,c=t.src.charCodeAt(++g);c===35&&g6||gg&&pp(t.src.charCodeAt(h-1))&&(y=h),t.line=i+1,p=t.push("heading_open","h"+String(d),1),p.markup="########".slice(0,d),p.map=[i,t.line],p=t.push("inline","",0),p.content=t.src.slice(g,y).trim(),p.map=[i,t.line],p.children=[],p=t.push("heading_close","h"+String(d),-1),p.markup="########".slice(0,d)),!0)}});var vp=se((m2,gp)=>{"use strict";gp.exports=function(t,i,s){var l,c,d,h,p,g,y,m,v,w=i+1,E,D=t.md.block.ruler.getRules("paragraph");if(t.sCount[i]-t.blkIndent>=4)return!1;for(E=t.parentType,t.parentType="paragraph";w3)continue;if(t.sCount[w]>=t.blkIndent&&(g=t.bMarks[w]+t.tShift[w],y=t.eMarks[w],g=y)))){m=v===61?1:2;break}if(t.sCount[w]<0)continue;for(c=!1,d=0,h=D.length;d{"use strict";bp.exports=["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","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var ul=se((v2,ll)=>{"use strict";var ik="[a-zA-Z_:][a-zA-Z0-9:._-]*",ok="[^\"'=<>`\\x00-\\x20]+",ak="'[^']*'",sk='"[^"]*"',lk="(?:"+ok+"|"+ak+"|"+sk+")",uk="(?:\\s+"+ik+"(?:\\s*=\\s*"+lk+")?)",wp="<[A-Za-z][A-Za-z0-9\\-]*"+uk+"*\\s*\\/?>",kp="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ck="|",dk="<[?].*?[?]>",hk="]*>",fk="",pk=new RegExp("^(?:"+wp+"|"+kp+"|"+ck+"|"+dk+"|"+hk+"|"+fk+")"),mk=new RegExp("^(?:"+wp+"|"+kp+")");ll.exports.HTML_TAG_RE=pk;ll.exports.HTML_OPEN_CLOSE_TAG_RE=mk});var _p=se((b2,xp)=>{"use strict";var gk=yp(),vk=ul().HTML_OPEN_CLOSE_TAG_RE,oi=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(vk.source+"\\s*$"),/^$/,!1]];xp.exports=function(t,i,s,l){var c,d,h,p,g=t.bMarks[i]+t.tShift[i],y=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(t.src.charCodeAt(g)!==60)return!1;for(p=t.src.slice(g,y),c=0;c{"use strict";Sp.exports=function(t,i){var s,l,c,d,h,p,g=i+1,y=t.md.block.ruler.getRules("paragraph"),m=t.lineMax;for(p=t.parentType,t.parentType="paragraph";g3)continue;if(t.sCount[g]<0)continue;for(l=!1,c=0,d=y.length;c{"use strict";var Dp=fa(),ma=Je().isSpace;function On(n,t,i,s){var l,c,d,h,p,g,y,m;for(this.src=n,this.md=t,this.env=i,this.tokens=s,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",c=this.src,m=!1,d=h=g=y=0,p=c.length;h0&&this.level++,this.tokens.push(s),s};On.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};On.prototype.skipEmptyLines=function(t){for(var i=this.lineMax;ti;)if(!ma(this.src.charCodeAt(--t)))return t+1;return t};On.prototype.skipChars=function(t,i){for(var s=this.src.length;ts;)if(i!==this.src.charCodeAt(--t))return t+1;return t};On.prototype.getLines=function(t,i,s,l){var c,d,h,p,g,y,m,v=t;if(t>=i)return"";for(y=new Array(i-t),c=0;vs?y[c]=new Array(d-s+1).join(" ")+this.src.slice(p,g):y[c]=this.src.slice(p,g)}return y.join("")};On.prototype.Token=Dp;Ep.exports=On});var Lp=se((k2,Tp)=>{"use strict";var bk=da(),ga=[["table",Xf(),["paragraph","reference"]],["code",Qf()],["fence",ep(),["paragraph","reference","blockquote","list"]],["blockquote",rp(),["paragraph","reference","blockquote","list"]],["hr",op(),["paragraph","reference","blockquote","list"]],["list",cp(),["paragraph","reference","blockquote"]],["reference",hp()],["heading",mp(),["paragraph","reference","blockquote"]],["lheading",vp()],["html_block",_p(),["paragraph","reference","blockquote"]],["paragraph",Cp()]];function va(){this.ruler=new bk();for(var n=0;n=i);){if(n.sCount[h]=g){n.line=i;break}for(l=0;l{"use strict";function yk(n){switch(n){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}Ip.exports=function(t,i){for(var s=t.pos;s{"use strict";var wk=Je().isSpace;Mp.exports=function(t,i){var s,l,c=t.pos;if(t.src.charCodeAt(c)!==10)return!1;for(s=t.pending.length-1,l=t.posMax,i||(s>=0&&t.pending.charCodeAt(s)===32?s>=1&&t.pending.charCodeAt(s-1)===32?(t.pending=t.pending.replace(/ +$/,""),t.push("hardbreak","br",0)):(t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0)):t.push("softbreak","br",0)),c++;c{"use strict";var kk=Je().isSpace,cl=[];for(var Op=0;Op<256;Op++)cl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(n){cl[n.charCodeAt(0)]=1});zp.exports=function(t,i){var s,l=t.pos,c=t.posMax;if(t.src.charCodeAt(l)!==92)return!1;if(l++,l{"use strict";Rp.exports=function(t,i){var s,l,c,d,h,p,g=t.pos,y=t.src.charCodeAt(g);if(y!==96)return!1;for(s=g,g++,l=t.posMax;g{"use strict";dl.exports.tokenize=function(t,i){var s,l,c,d,h,p=t.pos,g=t.src.charCodeAt(p);if(i)return!1;if(g!==126)return!1;if(l=t.scanDelims(t.pos,!0),d=l.length,h=String.fromCharCode(g),d<2)return!1;for(d%2&&(c=t.push("text","",0),c.content=h,d--),s=0;s{"use strict";fl.exports.tokenize=function(t,i){var s,l,c,d=t.pos,h=t.src.charCodeAt(d);if(i)return!1;if(h!==95&&h!==42)return!1;for(l=t.scanDelims(t.pos,h===42),s=0;s=0;i--){if(s=t[i],s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;l=t[s.end],h=i>0&&t[i-1].end===s.end+1&&t[i-1].token===s.token-1&&t[s.end+1].token===l.token+1&&t[i-1].marker===s.marker,d=String.fromCharCode(s.marker),c=n.tokens[s.token],c.type=h?"strong_open":"em_open",c.tag=h?"strong":"em",c.nesting=1,c.markup=h?d+d:d,c.content="",c=n.tokens[l.token],c.type=h?"strong_close":"em_close",c.tag=h?"strong":"em",c.nesting=-1,c.markup=h?d+d:d,c.content="",h&&(n.tokens[t[i-1].token].content="",n.tokens[t[s.end+1].token].content="",i--)}}fl.exports.postProcess=function(t){var i,s=t.tokens_meta,l=t.tokens_meta.length;for(Hp(t,t.delimiters),i=0;i{"use strict";var xk=Je().normalizeReference,ml=Je().isSpace;Up.exports=function(t,i){var s,l,c,d,h,p,g,y,m,v,w="",E=t.pos,D=t.posMax,C=t.pos,q=!0;if(t.src.charCodeAt(t.pos)!==91)return!1;if(h=t.pos+1,d=t.md.helpers.parseLinkLabel(t,t.pos,!0),d<0)return!1;if(p=d+1,p=D)return!1;for(C=p,g=t.md.helpers.parseLinkDestination(t.src,p,t.posMax),g.ok&&(w=t.md.normalizeLink(g.str),t.md.validateLink(w)?p=g.pos:w=""),C=p;p=D||t.src.charCodeAt(p)!==41)&&(q=!0),p++}if(q){if(typeof t.env.references=="undefined")return!1;if(p=0?c=t.src.slice(C,p++):p=d+1):p=d+1,c||(c=t.src.slice(h,d)),y=t.env.references[xk(c)],!y)return t.pos=E,!1;w=y.href,m=y.title}return i||(t.pos=h,t.posMax=d,v=t.push("link_open","a",1),v.attrs=s=[["href",w]],m&&s.push(["title",m]),t.md.inline.tokenize(t),v=t.push("link_close","a",-1)),t.pos=p,t.posMax=D,!0}});var $p=se((T2,jp)=>{"use strict";var _k=Je().normalizeReference,gl=Je().isSpace;jp.exports=function(t,i){var s,l,c,d,h,p,g,y,m,v,w,E,D,C="",q=t.pos,A=t.posMax;if(t.src.charCodeAt(t.pos)!==33)return!1;if(t.src.charCodeAt(t.pos+1)!==91)return!1;if(p=t.pos+2,h=t.md.helpers.parseLinkLabel(t,t.pos+1,!1),h<0)return!1;if(g=h+1,g=A)return!1;for(D=g,m=t.md.helpers.parseLinkDestination(t.src,g,t.posMax),m.ok&&(C=t.md.normalizeLink(m.str),t.md.validateLink(C)?g=m.pos:C=""),D=g;g=A||t.src.charCodeAt(g)!==41)return t.pos=q,!1;g++}else{if(typeof t.env.references=="undefined")return!1;if(g=0?d=t.src.slice(D,g++):g=h+1):g=h+1,d||(d=t.src.slice(p,h)),y=t.env.references[_k(d)],!y)return t.pos=q,!1;C=y.href,v=y.title}return i||(c=t.src.slice(p,h),t.md.inline.parse(c,t.md,t.env,E=[]),w=t.push("image","img",0),w.attrs=s=[["src",C],["alt",""]],w.children=E,w.content=c,v&&s.push(["title",v])),t.pos=g,t.posMax=A,!0}});var Yp=se((L2,Gp)=>{"use strict";var Kp=/^<([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])?)*)>/,Vp=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;Gp.exports=function(t,i){var s,l,c,d,h,p,g=t.pos;return t.src.charCodeAt(g)!==60?!1:(s=t.src.slice(g),s.indexOf(">")<0?!1:Vp.test(s)?(l=s.match(Vp),d=l[0].slice(1,-1),h=t.md.normalizeLink(d),t.md.validateLink(h)?(i||(p=t.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=t.push("text","",0),p.content=t.md.normalizeLinkText(d),p=t.push("link_close","a",-1),p.markup="autolink",p.info="auto"),t.pos+=l[0].length,!0):!1):Kp.test(s)?(c=s.match(Kp),d=c[0].slice(1,-1),h=t.md.normalizeLink("mailto:"+d),t.md.validateLink(h)?(i||(p=t.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=t.push("text","",0),p.content=t.md.normalizeLinkText(d),p=t.push("link_close","a",-1),p.markup="autolink",p.info="auto"),t.pos+=c[0].length,!0):!1):!1)}});var Zp=se((I2,Xp)=>{"use strict";var Sk=ul().HTML_TAG_RE;function Ck(n){var t=n|32;return t>=97&&t<=122}Xp.exports=function(t,i){var s,l,c,d,h=t.pos;return t.md.options.html?(c=t.posMax,t.src.charCodeAt(h)!==60||h+2>=c?!1:(s=t.src.charCodeAt(h+1),s!==33&&s!==63&&s!==47&&!Ck(s)?!1:(l=t.src.slice(h).match(Sk),l?(i||(d=t.push("html_inline","",0),d.content=t.src.slice(h,h+l[0].length)),t.pos+=l[0].length,!0):!1))):!1}});var tm=se((F2,Qp)=>{"use strict";var Jp=el(),Ek=Je().has,Dk=Je().isValidEntityCode,em=Je().fromCodePoint,Ak=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Tk=/^&([a-z][a-z0-9]{1,31});/i;Qp.exports=function(t,i){var s,l,c,d=t.pos,h=t.posMax;if(t.src.charCodeAt(d)!==38)return!1;if(d+1{"use strict";function rm(n,t){var i,s,l,c,d,h,p,g,y={},m=t.length;for(i=0;id;s-=c.jump+1){if(c=t[s],c.marker!==l.marker)continue;if(h===-1&&(h=s),c.open&&c.end<0&&c.level===l.level&&(p=!1,(c.close||l.open)&&((c.length+l.length)%3===0&&((c.length%3!==0||l.length%3!==0)&&(p=!0))),!p)){g=s>0&&!t[s-1].open?t[s-1].jump+1:0,l.jump=i-s+g,l.open=!1,c.end=i,c.jump=g,c.close=!1,h=-1;break}}h!==-1&&(y[l.marker][(l.length||0)%3]=h)}}nm.exports=function(t){var i,s=t.tokens_meta,l=t.tokens_meta.length;for(rm(t,t.delimiters),i=0;i{"use strict";om.exports=function(t){var i,s,l=0,c=t.tokens,d=t.tokens.length;for(i=s=0;i0&&l++,c[i].type==="text"&&i+1{"use strict";var vl=fa(),lm=Je().isWhiteSpace,um=Je().isPunctChar,cm=Je().isMdAsciiPunct;function Xi(n,t,i,s){this.src=n,this.env=i,this.md=t,this.tokens=s,this.tokens_meta=Array(s.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}Xi.prototype.pushPending=function(){var n=new vl("text","",0);return n.content=this.pending,n.level=this.pendingLevel,this.tokens.push(n),this.pending="",n};Xi.prototype.push=function(n,t,i){this.pending&&this.pushPending();var s=new vl(n,t,i),l=null;return i<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),s.level=this.level,i>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],l={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(s),this.tokens_meta.push(l),s};Xi.prototype.scanDelims=function(n,t){var i=n,s,l,c,d,h,p,g,y,m,v=!0,w=!0,E=this.posMax,D=this.src.charCodeAt(n);for(s=n>0?this.src.charCodeAt(n-1):32;i{"use strict";var fm=da(),bl=[["text",Fp()],["newline",qp()],["escape",Pp()],["backticks",Np()],["strikethrough",hl().tokenize],["emphasis",pl().tokenize],["link",Wp()],["image",$p()],["autolink",Yp()],["html_inline",Zp()],["entity",tm()]],yl=[["balance_pairs",im()],["strikethrough",hl().postProcess],["emphasis",pl().postProcess],["text_collapse",am()]];function Zi(){var n;for(this.ruler=new fm(),n=0;n=c)break;continue}n.pending+=n.src[n.pos++]}n.pending&&n.pushPending()};Zi.prototype.parse=function(n,t,i,s){var l,c,d,h=new this.State(n,t,i,s);for(this.tokenize(h),c=this.ruler2.getRules(""),d=c.length,l=0;l{"use strict";mm.exports=function(n){var t={};t.src_Any=nl().source,t.src_Cc=rl().source,t.src_Z=il().source,t.src_P=aa().source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var i="[><|]";return t.src_pseudo_letter="(?:(?!"+i+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+i+"|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+i+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(n&&n["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}});var xm=se((R2,vm)=>{"use strict";function wl(n){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(i){if(!i)return;Object.keys(i).forEach(function(s){n[s]=i[s]})}),n}function ba(n){return Object.prototype.toString.call(n)}function Lk(n){return ba(n)==="[object String]"}function Ik(n){return ba(n)==="[object Object]"}function Fk(n){return ba(n)==="[object RegExp]"}function bm(n){return ba(n)==="[object Function]"}function Mk(n){return n.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var ym={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function qk(n){return Object.keys(n||{}).reduce(function(t,i){return t||ym.hasOwnProperty(i)},!1)}var zk={"http:":{validate:function(n,t,i){var s=n.slice(t);return i.re.http||(i.re.http=new RegExp("^\\/\\/"+i.re.src_auth+i.re.src_host_port_strict+i.re.src_path,"i")),i.re.http.test(s)?s.match(i.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(n,t,i){var s=n.slice(t);return i.re.no_http||(i.re.no_http=new RegExp("^"+i.re.src_auth+"(?:localhost|(?:(?:"+i.re.src_domain+")\\.)+"+i.re.src_domain_root+")"+i.re.src_port+i.re.src_host_terminator+i.re.src_path,"i")),i.re.no_http.test(s)?t>=3&&n[t-3]===":"||t>=3&&n[t-3]==="/"?0:s.match(i.re.no_http)[0].length:0}},"mailto:":{validate:function(n,t,i){var s=n.slice(t);return i.re.mailto||(i.re.mailto=new RegExp("^"+i.re.src_email_name+"@"+i.re.src_host_strict,"i")),i.re.mailto.test(s)?s.match(i.re.mailto)[0].length:0}}},Ok="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Pk="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Rk(n){n.__index__=-1,n.__text_cache__=""}function Nk(n){return function(t,i){var s=t.slice(i);return n.test(s)?s.match(n)[0].length:0}}function wm(){return function(n,t){t.normalize(n)}}function ya(n){var t=n.re=gm()(n.__opts__),i=n.__tlds__.slice();n.onCompile(),n.__tlds_replaced__||i.push(Ok),i.push(t.src_xn),t.src_tlds=i.join("|");function s(h){return h.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];n.__compiled__={};function c(h,p){throw new Error('(LinkifyIt) Invalid schema "'+h+'": '+p)}Object.keys(n.__schemas__).forEach(function(h){var p=n.__schemas__[h];if(p===null)return;var g={validate:null,link:null};if(n.__compiled__[h]=g,Ik(p)){Fk(p.validate)?g.validate=Nk(p.validate):bm(p.validate)?g.validate=p.validate:c(h,p),bm(p.normalize)?g.normalize=p.normalize:p.normalize?c(h,p):g.normalize=wm();return}if(Lk(p)){l.push(h);return}c(h,p)}),l.forEach(function(h){if(!n.__compiled__[n.__schemas__[h]])return;n.__compiled__[h].validate=n.__compiled__[n.__schemas__[h]].validate,n.__compiled__[h].normalize=n.__compiled__[n.__schemas__[h]].normalize}),n.__compiled__[""]={validate:null,normalize:wm()};var d=Object.keys(n.__compiled__).filter(function(h){return h.length>0&&n.__compiled__[h]}).map(Mk).join("|");n.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+d+")","i"),n.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+d+")","ig"),n.re.pretest=RegExp("("+n.re.schema_test.source+")|("+n.re.host_fuzzy_test.source+")|@","i"),Rk(n)}function Bk(n,t){var i=n.__index__,s=n.__last_index__,l=n.__text_cache__.slice(i,s);this.schema=n.__schema__.toLowerCase(),this.index=i+t,this.lastIndex=s+t,this.raw=l,this.text=l,this.url=l}function km(n,t){var i=new Bk(n,t);return n.__compiled__[i.schema].normalize(i,n),i}function mn(n,t){if(!(this instanceof mn))return new mn(n,t);t||qk(n)&&(t=n,n={}),this.__opts__=wl({},ym,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=wl({},zk,n),this.__compiled__={},this.__tlds__=Pk,this.__tlds_replaced__=!1,this.re={},ya(this)}mn.prototype.add=function(t,i){return this.__schemas__[t]=i,ya(this),this};mn.prototype.set=function(t){return this.__opts__=wl(this.__opts__,t),this};mn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var i,s,l,c,d,h,p,g,y;if(this.re.schema_test.test(t)){for(p=this.re.schema_search,p.lastIndex=0;(i=p.exec(t))!==null;)if(c=this.testSchemaAt(t,i[2],p.lastIndex),c){this.__schema__=i[2],this.__index__=i.index+i[1].length,this.__last_index__=i.index+i[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(g=t.search(this.re.host_fuzzy_test),g>=0&&((this.__index__<0||g=0&&((l=t.match(this.re.email_fuzzy))!==null&&(d=l.index+l[1].length,h=l.index+l[0].length,(this.__index__<0||dthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=d,this.__last_index__=h)))),this.__index__>=0};mn.prototype.pretest=function(t){return this.re.pretest.test(t)};mn.prototype.testSchemaAt=function(t,i,s){return this.__compiled__[i.toLowerCase()]?this.__compiled__[i.toLowerCase()].validate(t,s,this):0};mn.prototype.match=function(t){var i=0,s=[];this.__index__>=0&&this.__text_cache__===t&&(s.push(km(this,i)),i=this.__last_index__);for(var l=i?t.slice(i):t;this.test(l);)s.push(km(this,i)),l=l.slice(this.__last_index__),i+=this.__last_index__;return s.length?s:null};mn.prototype.tlds=function(t,i){return t=Array.isArray(t)?t:[t],i?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(s,l,c){return s!==c[l-1]}).reverse(),ya(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ya(this),this)};mn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};mn.prototype.onCompile=function(){};vm.exports=mn});var Fm=se(Hk=>{Hy(Hk,{decode:()=>Cl,default:()=>Zk,encode:()=>El,toASCII:()=>Im,toUnicode:()=>Lm,ucs2decode:()=>Sl,ucs2encode:()=>Dm});"use strict";const ai=2147483647,Pn=36,kl=1,Qi=26,Uk=38,Wk=700,_m=72,Sm=128,Cm="-",jk=/^xn--/,$k=/[^\0-\x7E]/,Gk=/[\x2E\u3002\uFF0E\uFF61]/g,Kk={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xl=Pn-kl,Rn=Math.floor,_l=String.fromCharCode;function Cr(n){throw new RangeError(Kk[n])}function Vk(n,t){const i=[];let s=n.length;for(;s--;)i[s]=t(n[s]);return i}function Em(n,t){const i=n.split("@");let s="";i.length>1&&(s=i[0]+"@",n=i[1]),n=n.replace(Gk,".");const l=n.split("."),c=Vk(l,t).join(".");return s+c}function Sl(n){const t=[];let i=0;const s=n.length;for(;i=55296&&l<=56319&&iString.fromCodePoint(...n),Yk=function(n){return n-48<10?n-22:n-65<26?n-65:n-97<26?n-97:Pn},Am=function(n,t){return n+22+75*(n<26)-((t!=0)<<5)},Tm=function(n,t,i){let s=0;for(n=i?Rn(n/Wk):n>>1,n+=Rn(n/t);n>xl*Qi>>1;s+=Pn)n=Rn(n/xl);return Rn(s+(xl+1)*n/(n+Uk))},Cl=function(n){const t=[],i=n.length;let s=0,l=Sm,c=_m,d=n.lastIndexOf(Cm);d<0&&(d=0);for(let h=0;h=128&&Cr("not-basic"),t.push(n.charCodeAt(h));for(let h=d>0?d+1:0;h=i&&Cr("invalid-input");const v=Yk(n.charCodeAt(h++));(v>=Pn||v>Rn((ai-s)/y))&&Cr("overflow"),s+=v*y;const w=m<=c?kl:m>=c+Qi?Qi:m-c;if(vRn(ai/E)&&Cr("overflow"),y*=E}const g=t.length+1;c=Tm(s-p,g,p==0),Rn(s/g)>ai-l&&Cr("overflow"),l+=Rn(s/g),s%=g,t.splice(s++,0,l)}return String.fromCodePoint(...t)},El=function(n){const t=[];n=Sl(n);let i=n.length,s=Sm,l=0,c=_m;for(const p of n)p<128&&t.push(_l(p));let d=t.length,h=d;for(d&&t.push(Cm);h=s&&yRn((ai-l)/g)&&Cr("overflow"),l+=(p-s)*g,s=p;for(const y of n)if(yai&&Cr("overflow"),y==s){let m=l;for(let v=Pn;;v+=Pn){const w=v<=c?kl:v>=c+Qi?Qi:v-c;if(m{"use strict";Mm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}});var Om=se((H2,zm)=>{"use strict";zm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}});var Rm=se((U2,Pm)=>{"use strict";Pm.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}});var Um=se((W2,Nm)=>{"use strict";var Ji=Je(),Qk=wf(),Jk=xf(),e0=Kf(),t0=Lp(),n0=pm(),r0=xm(),si=tl(),Bm=Fm(),i0={default:qm(),zero:Om(),commonmark:Rm()},o0=/^(vbscript|javascript|file|data):/,a0=/^data:image\/(gif|png|jpeg|webp);/;function s0(n){var t=n.trim().toLowerCase();return o0.test(t)?!!a0.test(t):!0}var Hm=["http:","https:","mailto:"];function l0(n){var t=si.parse(n,!0);if(t.hostname&&(!t.protocol||Hm.indexOf(t.protocol)>=0))try{t.hostname=Bm.toASCII(t.hostname)}catch(i){}return si.encode(si.format(t))}function u0(n){var t=si.parse(n,!0);if(t.hostname&&(!t.protocol||Hm.indexOf(t.protocol)>=0))try{t.hostname=Bm.toUnicode(t.hostname)}catch(i){}return si.decode(si.format(t))}function gn(n,t){if(!(this instanceof gn))return new gn(n,t);t||(Ji.isString(n)||(t=n||{},n="default")),this.inline=new n0(),this.block=new t0(),this.core=new e0(),this.renderer=new Jk(),this.linkify=new r0(),this.validateLink=s0,this.normalizeLink=l0,this.normalizeLinkText=u0,this.utils=Ji,this.helpers=Ji.assign({},Qk),this.options={},this.configure(n),t&&this.set(t)}gn.prototype.set=function(n){return Ji.assign(this.options,n),this};gn.prototype.configure=function(n){var t=this,i;if(Ji.isString(n)&&(i=n,n=i0[i],!n))throw new Error('Wrong `markdown-it` preset "'+i+'", check name');if(!n)throw new Error("Wrong `markdown-it` preset, can't be empty");return n.options&&t.set(n.options),n.components&&Object.keys(n.components).forEach(function(s){n.components[s].rules&&t[s].ruler.enableOnly(n.components[s].rules),n.components[s].rules2&&t[s].ruler2.enableOnly(n.components[s].rules2)}),this};gn.prototype.enable=function(n,t){var i=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(l){i=i.concat(this[l].ruler.enable(n,!0))},this),i=i.concat(this.inline.ruler2.enable(n,!0));var s=n.filter(function(l){return i.indexOf(l)<0});if(s.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+s);return this};gn.prototype.disable=function(n,t){var i=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(l){i=i.concat(this[l].ruler.disable(n,!0))},this),i=i.concat(this.inline.ruler2.disable(n,!0));var s=n.filter(function(l){return i.indexOf(l)<0});if(s.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+s);return this};gn.prototype.use=function(n){var t=[this].concat(Array.prototype.slice.call(arguments,1));return n.apply(n,t),this};gn.prototype.parse=function(n,t){if(typeof n!="string")throw new Error("Input data should be a String");var i=new this.core.State(n,this,t);return this.core.process(i),i.tokens};gn.prototype.render=function(n,t){return t=t||{},this.renderer.render(this.parse(n,t),this.options,t)};gn.prototype.parseInline=function(n,t){var i=new this.core.State(n,this,t);return i.inlineMode=!0,this.core.process(i),i.tokens};gn.prototype.renderInline=function(n,t){return t=t||{},this.renderer.render(this.parseInline(n,t),this.options,t)};Nm.exports=gn});var jm=se((j2,Wm)=>{"use strict";Wm.exports=Um()});var Ym=se(($2,$m)=>{var Dl=!0,Gm=!1,Km=!1;$m.exports=function(n,t){t&&(Dl=!t.enabled,Gm=!!t.label,Km=!!t.labelAfter),n.core.ruler.after("inline","github-task-lists",function(i){for(var s=i.tokens,l=2;l=0;s--)if(n[s].level===i)return s;return-1}function d0(n,t){return f0(n[t])&&p0(n[t-1])&&m0(n[t-2])&&g0(n[t])}function h0(n,t){if(n.children.unshift(v0(n,t)),n.children[1].content=n.children[1].content.slice(3),n.content=n.content.slice(3),Gm)if(Km){n.children.pop();var i="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);n.children[0].content=n.children[0].content.slice(0,-1)+' id="'+i+'">',n.children.push(w0(n.content,i,t))}else n.children.unshift(b0(t)),n.children.push(y0(t))}function v0(n,t){var i=new t("html_inline","",0),s=Dl?' disabled="" ':"";return n.content.indexOf("[ ] ")===0?i.content='':(n.content.indexOf("[x] ")===0||n.content.indexOf("[X] ")===0)&&(i.content=''),i}function b0(n){var t=new n("html_inline","",0);return t.content="",t}function w0(n,t,i){var s=new i("html_inline","",0);return s.content='",s.attrs=[{for:t}],s}function f0(n){return n.type==="inline"}function p0(n){return n.type==="paragraph_open"}function m0(n){return n.type==="list_item_open"}function g0(n){return n.content.indexOf("[ ] ")===0||n.content.indexOf("[x] ")===0||n.content.indexOf("[X] ")===0}});const eo={},k0=[];function wa(n,t){if(k0.push({name:n,data:t}),typeof eo[n]=="undefined")return this;let i=eo[n];for(let s=0;swa("success",n),error:n=>wa("error",n),showValidationErrors:S0};async function C0(n,t={}){return Zm(n,{method:"GET",params:t})}async function E0(n,t=null){return ka("POST",n,t)}async function D0(n,t=null){return ka("PUT",n,t)}async function A0(n,t=null){return ka("PATCH",n,t)}async function T0(n,t=null){return ka("DELETE",n,t)}async function ka(n,t,i=null){const s={method:n,body:i};return typeof i=="object"&&!(i instanceof FormData)&&(s.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},s.body=JSON.stringify(i)),i instanceof FormData&&n!=="post"&&(i.append("_method",n),s.method="post"),Zm(t,s)}async function Zm(n,t={}){if(n.startsWith("http")||(n=window.baseUrl(n)),t.params){const d=new URL(n);for(let h of Object.keys(t.params)){const p=t.params[h];typeof p!="undefined"&&p!==null&&d.searchParams.set(h,p)}n=d.toString()}const i=document.querySelector("meta[name=token]").getAttribute("content");t=Object.assign({},t,{credentials:"same-origin"}),t.headers=Object.assign({},t.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":i});const s=await fetch(n,t),l=await L0(s),c={data:l,headers:s.headers,redirected:s.redirected,status:s.status,statusText:s.statusText,url:s.url,original:s};if(!s.ok)throw c;return c}async function L0(n){const t=n.headers.get("Content-Type"),i=t.split("/").pop();return i==="javascript"||i==="json"?await n.json():await n.text()}var Qm={get:C0,post:E0,put:D0,patch:A0,delete:T0};class I0{constructor(n){this.store=new Map(),this.parseTranslations()}parseTranslations(){const n=document.querySelectorAll('meta[name="translation"]');for(let t of n){const i=t.getAttribute("key"),s=t.getAttribute("value");this.store.set(i,s)}}get(n,t){const i=this.getTransText(n);return this.performReplacements(i,t)}getPlural(n,t,i){const s=this.getTransText(n);return this.parsePlural(s,t,i)}parsePlural(n,t,i){const s=n.split("|"),l=/^{([0-9]+)}/,c=/^\[([0-9]+),([0-9*]+)]/;let d=null;for(let h of s){const p=h.match(l);if(p!==null&&Number(p[1])===t){d=h.replace(l,"").trim();break}const g=h.match(c);if(g!==null){const y=Number(g[1]);if(y<=t&&(g[2]==="*"||Number(g[2])>=t)){d=h.replace(c,"").trim();break}}}return d===null&&s.length>1&&(d=t===1?s[0]:s[1]),d===null&&(d=s[0]),this.performReplacements(d,i)}getTransText(n){const t=this.store.get(n);return t===void 0&&console.warn(`Translation with key "${n}" does not exist`),t}performReplacements(n,t){if(!t)return n;const i=n.match(/:([\S]+)/g);return i===null||i.forEach(s=>{const l=s.substring(1);if(typeof t[l]=="undefined")return;n=n.replace(s,t[l])}),n}}var Jm=I0;function xa(n,t){const i=document.querySelectorAll(n);for(let s of i)t(s)}function _a(n,t,i){for(let s of t)n.addEventListener(s,i)}function it(n,t){Array.isArray(n)||(n=[n]);for(const i of n)i.addEventListener("click",t),i.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t(s))})}function Sa(n,t){Array.isArray(n)||(n=[n]);const i=s=>{s.key==="Enter"&&t(s)};n.forEach(s=>s.addEventListener("keypress",i))}function zt(n,t,i,s){n.addEventListener(i,function(l){const c=l.target.closest(t);c&&s.call(c,l,c)})}function eg(n,t){const i=document.querySelectorAll(n);t=t.toLowerCase();for(let s of i)if(s.textContent.toLowerCase().includes(t))return s;return null}function to(n){n.innerHTML='
'}function tg(n){const t=n.querySelectorAll(".loading-container");for(const i of t)i.remove()}function ng(n,t,i){let s;return function(){const l=this,c=arguments,d=function(){s=null,i||n.apply(l,c)},h=i&&!s;clearTimeout(s),s=setTimeout(d,t),h&&n.apply(l,c)}}function no(n){if(!n)return;n.scrollIntoView({behavior:"smooth"});const t=document.getElementById("custom-styles").getAttribute("data-color-light"),i=window.getComputedStyle(n).getPropertyValue("background-color");n.style.backgroundColor=t,setTimeout(()=>{n.classList.add("selectFade"),n.style.backgroundColor=i},10),setTimeout(()=>{n.classList.remove("selectFade"),n.style.backgroundColor=""},3e3)}function rg(n){return n.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function ig(){const n=()=>((1+Math.random())*65536|0).toString(16).substring(1);return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}class F0{setup(){this.modelRow=this.$refs.model,this.addButton=this.$refs.add,this.removeSelector=this.$opts.removeSelector,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.addButton.addEventListener("click",this.add.bind(this)),zt(this.$el,this.removeSelector,"click",n=>{const t=n.target.closest(this.rowSelector);t.remove()})}add(){const n=this.modelRow.cloneNode(!0);n.classList.remove("hidden"),this.setClonedInputNames(n),this.modelRow.parentNode.insertBefore(n,this.modelRow),window.components.init(n)}setClonedInputNames(n){const t=ig(),i=n.querySelectorAll('[name*="randrowid"]');for(const s of i)s.name=s.name.split("randrowid").join(t)}}var og=F0;class M0{setup(){this.row=this.$el,this.url=this.$opts.url,this.deleteButtons=this.$manyRefs.delete,it(this.deleteButtons,this.runDelete.bind(this))}runDelete(){this.row.style.opacity="0.7",this.row.style.pointerEvents="none",window.$http.delete(this.url).then(n=>{typeof n.data=="object"&&n.data.message&&window.$events.emit("success",n.data.message),this.row.remove()}).catch(n=>{this.row.style.opacity=null,this.row.style.pointerEvents=null})}}var ag=M0;class q0{setup(){this.container=this.$el,this.responseContainer=this.container,this.url=this.$opts.url,this.method=this.$opts.method||"post",this.successMessage=this.$opts.successMessage,this.submitButtons=this.$manyRefs.submit||[],this.$opts.responseContainer&&(this.responseContainer=this.container.closest(this.$opts.responseContainer)),this.setupListeners()}setupListeners(){if(this.container.tagName==="FORM"){this.container.addEventListener("submit",this.submitRealForm.bind(this));return}Sa(this.container,n=>{this.submitFakeForm(),n.preventDefault()}),this.submitButtons.forEach(n=>it(n,this.submitFakeForm.bind(this)))}submitFakeForm(){const n=new FormData(),t=this.container.querySelectorAll("[name]");for(const i of t)n.append(i.getAttribute("name"),i.value);this.submit(n)}submitRealForm(n){n.preventDefault();const t=new FormData(this.container);this.submit(t)}async submit(n){this.responseContainer.style.opacity="0.7",this.responseContainer.style.pointerEvents="none";try{const t=await window.$http[this.method.toLowerCase()](this.url,n);this.$emit("success",{formData:n}),this.responseContainer.innerHTML=t.data,this.successMessage&&window.$events.emit("success",this.successMessage)}catch(t){this.responseContainer.innerHTML=t.data}window.components.init(this.responseContainer),this.responseContainer.style.opacity=null,this.responseContainer.style.pointerEvents=null}}var sg=q0;class z0{setup(){this.container=this.$el,this.pageId=this.$opts.pageId,this.editContainer=this.$refs.editContainer,this.listContainer=this.$refs.listContainer,this.mainTabs=this.$refs.mainTabs,this.list=this.$refs.list,this.setupListeners()}setupListeners(){const n=this.reloadList.bind(this);this.container.addEventListener("dropzone-success",n),this.container.addEventListener("ajax-form-success",n),this.container.addEventListener("sortable-list-sort",t=>{this.updateOrder(t.detail.ids)}),this.container.addEventListener("event-emit-select-edit",t=>{this.startEdit(t.detail.id)}),this.container.addEventListener("event-emit-select-edit-back",t=>{this.stopEdit()}),this.container.addEventListener("event-emit-select-insert",t=>{const i=t.target.closest("[data-drag-content]").getAttribute("data-drag-content"),s=JSON.parse(i);window.$events.emit("editor::insert",{html:s["text/html"],markdown:s["text/plain"]})})}reloadList(){this.stopEdit(),this.mainTabs.components.tabs.show("items"),window.$http.get(`/attachments/get/page/${this.pageId}`).then(n=>{this.list.innerHTML=n.data,window.components.init(this.list)})}updateOrder(n){window.$http.put(`/attachments/sort/page/${this.pageId}`,{order:n}).then(t=>{window.$events.emit("success",t.data.message)})}async startEdit(n){this.editContainer.classList.remove("hidden"),this.listContainer.classList.add("hidden"),to(this.editContainer);const t=await window.$http.get(`/attachments/edit/${n}`);this.editContainer.innerHTML=t.data,window.components.init(this.editContainer)}stopEdit(){this.editContainer.classList.add("hidden"),this.listContainer.classList.remove("hidden")}}var lg=z0;const Al={};class O0{setup(){this.parent=this.$el.parentElement,this.container=this.$el,this.type=this.$opts.type,this.url=this.$opts.url,this.input=this.$refs.input,this.list=this.$refs.list,this.lastPopulated=0,this.setupListeners()}setupListeners(){this.input.addEventListener("input",this.requestSuggestions.bind(this)),this.input.addEventListener("focus",this.requestSuggestions.bind(this)),this.input.addEventListener("keydown",n=>{n.key==="Tab"&&this.hideSuggestions()}),this.input.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this)),this.container.addEventListener("keydown",this.containerKeyDown.bind(this)),zt(this.list,"button","click",(n,t)=>{this.selectSuggestion(t.textContent)}),zt(this.list,"button","keydown",(n,t)=>{n.key==="Enter"&&this.selectSuggestion(t.textContent)})}selectSuggestion(n){this.input.value=n,this.lastPopulated=Date.now(),this.input.focus(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hideSuggestions()}containerKeyDown(n){if(n.key==="Enter"&&n.preventDefault(),this.list.classList.contains("hidden"))return;n.key==="ArrowDown"?(this.moveFocus(!0),n.preventDefault()):n.key==="ArrowUp"?(this.moveFocus(!1),n.preventDefault()):n.key==="Escape"&&(this.hideSuggestions(),n.preventDefault())}moveFocus(n=!0){const t=Array.from(this.container.querySelectorAll("input,button")),i=t.indexOf(document.activeElement),s=t[i+(n?1:-1)];s&&s.focus()}async requestSuggestions(){if(Date.now()-this.lastPopulated<50)return;const n=this.getNameFilterIfNeeded(),t=this.input.value.slice(0,3).toLowerCase(),i=await this.loadSuggestions(t,n);let s=i.slice(0,6);t.length>0&&(s=i.filter(l=>l.toLowerCase().includes(t)).slice(0,6)),this.displaySuggestions(s)}getNameFilterIfNeeded(){return this.type!=="value"?null:this.parent.querySelector("input").value}async loadSuggestions(n,t=null){const i={search:n,name:t},s=`${this.url}:${JSON.stringify(i)}`;if(Al[s])return Al[s];const l=await window.$http.get(this.url,i);return Al[s]=l.data,l.data}displaySuggestions(n){if(n.length===0)return this.hideSuggestions();this.list.innerHTML=n.map(t=>`
  • `).join(""),this.list.style.display="block";for(const t of this.list.querySelectorAll("button"))t.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this))}hideSuggestions(){this.list.style.display="none"}hideSuggestionsIfFocusedLost(n){this.container.contains(n.relatedTarget)||this.hideSuggestions()}}var ug=O0;class P0{constructor(n){if(this.elem=n,this.targetElem=document.getElementById("header"),this.showing=!1,this.breakPoint=1200,document.body.classList.contains("flexbox")){this.elem.style.display="none";return}this.elem.addEventListener("click",this.scrollToTop.bind(this)),window.addEventListener("scroll",this.onPageScroll.bind(this))}onPageScroll(){let n=document.documentElement.scrollTop||document.body.scrollTop||0;!this.showing&&n>this.breakPoint?(this.elem.style.display="block",this.showing=!0,setTimeout(()=>{this.elem.style.opacity=.4},1)):this.showing&&n{this.elem.style.display="none"},500))}scrollToTop(){let n=this.targetElem.getBoundingClientRect().top,t=document.documentElement.scrollTop?document.documentElement:document.body,i=300,s=Date.now(),l=this.targetElem.getBoundingClientRect().top;function c(){let d=1-(Date.now()-s)/i,h=Math.abs(d*l);d>0?(t.scrollTop=h,requestAnimationFrame(c.bind(this))):t.scrollTop=n}requestAnimationFrame(c.bind(this))}}var cg=P0;function Ca(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ca=function(t){return typeof t}:Ca=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ca(n)}function R0(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function xn(){return xn=Object.assign||function(n){for(var t=1;t=0)continue;i[l]=n[l]}return i}function B0(n,t){if(n==null)return{};var i=N0(n,t),s,l;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);for(l=0;l=0)continue;if(!Object.prototype.propertyIsEnumerable.call(n,s))continue;i[s]=n[s]}}return i}function j0(n){return H0(n)||U0(n)||W0()}function H0(n){if(Array.isArray(n)){for(var t=0,i=new Array(n.length);t"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch(i){return!1}return!1}function K0(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function _n(n,t,i,s){if(n){i=i||document;do{if(t!=null&&(t[0]===">"?n.parentNode===i&&Ea(n,t):Ea(n,t))||s&&n===i)return n;if(n===i)break}while(n=K0(n))}return null}var pg=/\s+/g;function Ct(n,t,i){if(n&&t)if(n.classList)n.classList[i?"add":"remove"](t);else{var s=(" "+n.className+" ").replace(pg," ").replace(" "+t+" "," ");n.className=(s+(i?" "+t:"")).replace(pg," ")}}function xe(n,t,i){var s=n&&n.style;if(s){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(i=n.currentStyle),t===void 0?i:i[t];!(t in s)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),s[t]=i+(typeof i=="string"?"":"px")}}function Er(n,t){var i="";if(typeof n=="string")i=n;else do{var s=xe(n,"transform");s&&s!=="none"&&(i=s+" "+i)}while(!t&&(n=n.parentNode));var l=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return l&&new l(i)}function mg(n,t,i){if(n){var s=n.getElementsByTagName(t),l=0,c=s.length;if(i)for(;l=c:d=l<=c,!d)return s;if(s===Nn())break;s=cr(s,!1)}return!1}function Da(n,t,i){for(var s=0,l=0,c=n.children;l2&&arguments[2]!==void 0?arguments[2]:{},l=s.evt,c=B0(s,["evt"]);ao.pluginEvent.bind(Ie)(t,i,ur({dragEl:me,parentEl:Dt,ghostEl:Oe,rootEl:ht,nextEl:Dr,lastDownEl:Aa,cloneEl:vt,cloneHidden:dr,dragStarted:uo,putSortable:Wt,activeSortable:Ie.active,originalEvent:l,oldIndex:li,oldDraggableIndex:lo,newIndex:ln,newDraggableIndex:hr,hideGhostForTarget:kg,unhideGhostForTarget:xg,cloneNowHidden:function(){dr=!0},cloneNowShown:function(){dr=!1},dispatchSortableEvent:function(h){tn({sortable:i,name:h,originalEvent:l})}},c))};function tn(n){so(ur({putSortable:Wt,cloneEl:vt,targetEl:me,rootEl:ht,oldIndex:li,oldDraggableIndex:lo,newIndex:ln,newDraggableIndex:hr},n))}var me,Dt,Oe,ht,Dr,Aa,vt,dr,li,ln,lo,hr,Ta,Wt,ui=!1,La=!1,Ia=[],Ar,Sn,zl,Ol,_g,Sg,uo,ci,co,ho=!1,Fa=!1,Ma,Vt,Pl=[],Rl=!1,qa=[],za=typeof document!="undefined",Oa=hg,Cg=ro||Xn?"cssFloat":"float",ex=za&&!G0&&!hg&&"draggable"in document.createElement("div"),Eg=function(){if(!za)return;if(Xn)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}(),Dg=function(t,i){var s=xe(t),l=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),c=Da(t,0,i),d=Da(t,1,i),h=c&&xe(c),p=d&&xe(d),g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+gt(c).width,y=p&&parseInt(p.marginLeft)+parseInt(p.marginRight)+gt(d).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(c&&h.float&&h.float!=="none"){var m=h.float==="left"?"left":"right";return d&&(p.clear==="both"||p.clear===m)?"vertical":"horizontal"}return c&&(h.display==="block"||h.display==="flex"||h.display==="table"||h.display==="grid"||g>=l&&s[Cg]==="none"||d&&s[Cg]==="none"&&g+y>l)?"vertical":"horizontal"},tx=function(t,i,s){var l=s?t.left:t.top,c=s?t.right:t.bottom,d=s?t.width:t.height,h=s?i.left:i.top,p=s?i.right:i.bottom,g=s?i.width:i.height;return l===h||c===p||l+d/2===h+g/2},nx=function(t,i){var s;return Ia.some(function(l){if(Ll(l))return;var c=gt(l),d=l[Kt].options.emptyInsertThreshold,h=t>=c.left-d&&t<=c.right+d,p=i>=c.top-d&&i<=c.bottom+d;if(d&&h&&p)return s=l}),s},Ag=function(t){function i(c,d){return function(h,p,g,y){var m=h.options.group.name&&p.options.group.name&&h.options.group.name===p.options.group.name;if(c==null&&(d||m))return!0;if(c==null||c===!1)return!1;if(d&&c==="clone")return c;if(typeof c=="function")return i(c(h,p,g,y),d)(h,p,g,y);var v=(d?h:p).options.group.name;return c===!0||typeof c=="string"&&c===v||c.join&&c.indexOf(v)>-1}}var s={},l=t.group;(!l||Ca(l)!="object")&&(l={name:l}),s.name=l.name,s.checkPull=i(l.pull,!0),s.checkPut=i(l.put),s.revertClone=l.revertClone,t.group=s},kg=function(){!Eg&&Oe&&xe(Oe,"display","none")},xg=function(){!Eg&&Oe&&xe(Oe,"display","")};za&&document.addEventListener("click",function(n){if(La)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),La=!1,!1},!0);var Tr=function(t){if(me){t=t.touches?t.touches[0]:t;var i=nx(t.clientX,t.clientY);if(i){var s={};for(var l in t)t.hasOwnProperty(l)&&(s[l]=t[l]);s.target=s.rootEl=i,s.preventDefault=void 0,s.stopPropagation=void 0,i[Kt]._onDragOver(s)}}},rx=function(t){me&&me.parentNode[Kt]._isOutsideThisEl(t.target)};function Ie(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=xn({},t),n[Kt]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Dg(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(d,h){d.setData("Text",h.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ie.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};ao.initializePlugins(this,n,i);for(var s in i)!(s in t)&&(t[s]=i[s]);Ag(t);for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this));this.nativeDraggable=t.forceFallback?!1:ex,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?je(n,"pointerdown",this._onTapStart):(je(n,"mousedown",this._onTapStart),je(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(je(n,"dragover",this),je(n,"dragenter",this)),Ia.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),xn(this,J0())}Ie.prototype={constructor:Ie,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(ci=null)},_getDirection:function(t,i){return typeof this.options.direction=="function"?this.options.direction.call(this,t,i,me):this.options.direction},_onTapStart:function(t){if(!t.cancelable)return;var i=this,s=this.el,l=this.options,c=l.preventOnFilter,d=t.type,h=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,p=(h||t).target,g=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||p,y=l.filter;if(ux(s),me)return;if(/mousedown|pointerdown/.test(d)&&t.button!==0||l.disabled)return;if(g.isContentEditable)return;if(p=_n(p,l.draggable,s,!1),p&&p.animated)return;if(Aa===p)return;if(li=Et(p),lo=Et(p,l.draggable),typeof y=="function"){if(y.call(this,t,p,this)){tn({sortable:i,rootEl:g,name:"filter",targetEl:p,toEl:s,fromEl:s}),on("filter",i,{evt:t}),c&&t.cancelable&&t.preventDefault();return}}else if(y&&(y=y.split(",").some(function(m){if(m=_n(g,m.trim(),s,!1),m)return tn({sortable:i,rootEl:m,name:"filter",targetEl:p,fromEl:s,toEl:s}),on("filter",i,{evt:t}),!0}),y)){c&&t.cancelable&&t.preventDefault();return}if(l.handle&&!_n(g,l.handle,s,!1))return;this._prepareDragStart(t,h,p)},_prepareDragStart:function(t,i,s){var l=this,c=l.el,d=l.options,h=c.ownerDocument,p;if(s&&!me&&s.parentNode===c){var g=gt(s);if(ht=c,me=s,Dt=me.parentNode,Dr=me.nextSibling,Aa=s,Ta=d.group,Ie.dragged=me,Ar={target:me,clientX:(i||t).clientX,clientY:(i||t).clientY},_g=Ar.clientX-g.left,Sg=Ar.clientY-g.top,this._lastX=(i||t).clientX,this._lastY=(i||t).clientY,me.style["will-change"]="all",p=function(){if(on("delayEnded",l,{evt:t}),Ie.eventCanceled){l._onDrop();return}l._disableDelayedDragEvents(),!dg&&l.nativeDraggable&&(me.draggable=!0),l._triggerDragStart(t,i),tn({sortable:l,name:"choose",originalEvent:t}),Ct(me,d.chosenClass,!0)},d.ignore.split(",").forEach(function(y){mg(me,y.trim(),Bl)}),je(h,"dragover",Tr),je(h,"mousemove",Tr),je(h,"touchmove",Tr),je(h,"mouseup",l._onDrop),je(h,"touchend",l._onDrop),je(h,"touchcancel",l._onDrop),dg&&this.nativeDraggable&&(this.options.touchStartThreshold=4,me.draggable=!0),on("delayStart",this,{evt:t}),d.delay&&(!d.delayOnTouchOnly||i)&&(!this.nativeDraggable||!(ro||Xn))){if(Ie.eventCanceled){this._onDrop();return}je(h,"mouseup",l._disableDelayedDrag),je(h,"touchend",l._disableDelayedDrag),je(h,"touchcancel",l._disableDelayedDrag),je(h,"mousemove",l._delayedDragTouchMoveHandler),je(h,"touchmove",l._delayedDragTouchMoveHandler),d.supportPointer&&je(h,"pointermove",l._delayedDragTouchMoveHandler),l._dragStartTimer=setTimeout(p,d.delay)}else p()}},_delayedDragTouchMoveHandler:function(t){var i=t.touches?t.touches[0]:t;Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){me&&Bl(me),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Be(t,"mouseup",this._disableDelayedDrag),Be(t,"touchend",this._disableDelayedDrag),Be(t,"touchcancel",this._disableDelayedDrag),Be(t,"mousemove",this._delayedDragTouchMoveHandler),Be(t,"touchmove",this._delayedDragTouchMoveHandler),Be(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,i){i=i||t.pointerType=="touch"&&t,!this.nativeDraggable||i?this.options.supportPointer?je(document,"pointermove",this._onTouchMove):i?je(document,"touchmove",this._onTouchMove):je(document,"mousemove",this._onTouchMove):(je(me,"dragend",this),je(ht,"dragstart",this._onDragStart));try{document.selection?Pa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(s){}},_dragStarted:function(t,i){if(ui=!1,ht&&me){on("dragStarted",this,{evt:i}),this.nativeDraggable&&je(document,"dragover",rx);var s=this.options;!t&&Ct(me,s.dragClass,!1),Ct(me,s.ghostClass,!0),Ie.active=this,t&&this._appendGhost(),tn({sortable:this,name:"start",originalEvent:i})}else this._nulling()},_emulateDragOver:function(){if(Sn){this._lastX=Sn.clientX,this._lastY=Sn.clientY,kg();for(var t=document.elementFromPoint(Sn.clientX,Sn.clientY),i=t;t&&t.shadowRoot&&!(t=t.shadowRoot.elementFromPoint(Sn.clientX,Sn.clientY),t===i);)i=t;if(me.parentNode[Kt]._isOutsideThisEl(t),i)do{if(i[Kt]){var s=void 0;if(s=i[Kt]._onDragOver({clientX:Sn.clientX,clientY:Sn.clientY,target:t,rootEl:i}),s&&!this.options.dragoverBubble)break}t=i}while(i=i.parentNode);xg()}},_onTouchMove:function(t){if(Ar){var i=this.options,s=i.fallbackTolerance,l=i.fallbackOffset,c=t.touches?t.touches[0]:t,d=Oe&&Er(Oe,!0),h=Oe&&d&&d.a,p=Oe&&d&&d.d,g=Oa&&Vt&&vg(Vt),y=(c.clientX-Ar.clientX+l.x)/(h||1)+(g?g[0]-Pl[0]:0)/(h||1),m=(c.clientY-Ar.clientY+l.y)/(p||1)+(g?g[1]-Pl[1]:0)/(p||1);if(!Ie.active&&!ui){if(s&&Math.max(Math.abs(c.clientX-this._lastX),Math.abs(c.clientY-this._lastY))=0&&(tn({rootEl:Dt,name:"add",toEl:Dt,fromEl:ht,originalEvent:t}),tn({sortable:this,name:"remove",toEl:Dt,originalEvent:t}),tn({rootEl:Dt,name:"sort",toEl:Dt,fromEl:ht,originalEvent:t}),tn({sortable:this,name:"sort",toEl:Dt,originalEvent:t})),Wt&&Wt.save()):ln!==li&&(ln>=0&&(tn({sortable:this,name:"update",toEl:Dt,originalEvent:t}),tn({sortable:this,name:"sort",toEl:Dt,originalEvent:t}))),Ie.active&&((ln==null||ln===-1)&&(ln=li,hr=lo),tn({sortable:this,name:"end",toEl:Dt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){on("nulling",this),ht=me=Dt=Oe=Dr=vt=Aa=dr=Ar=Sn=uo=ln=hr=li=lo=ci=co=Wt=Ta=Ie.dragged=Ie.ghost=Ie.clone=Ie.active=null,qa.forEach(function(t){t.checked=!0}),qa.length=zl=Ol=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":me&&(this._onDragOver(t),ix(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],i,s=this.el.children,l=0,c=s.length,d=this.options;ls.right+l||n.clientX<=s.right&&n.clientY>s.bottom&&n.clientX>=s.left:n.clientX>s.right&&n.clientY>s.top||n.clientX<=s.right&&n.clientY>s.bottom+l}function sx(n,t,i,s,l,c,d,h){var p=s?n.clientY:n.clientX,g=s?i.height:i.width,y=s?i.top:i.left,m=s?i.bottom:i.right,v=!1;if(!d){if(h&&May+g*c/2:pm-Ma)return-co}else if(p>y+g*(1-l)/2&&pm-g*c/2)?p>y+g/2?1:-1:0}function cx(n){return Et(me)1&&(qe.forEach(function(h){c.addAnimationState({target:h,rect:cn?gt(h):d}),Ml(h),h.fromRect=d,s.removeAnimationState(h)}),cn=!1,hx(!this.options.removeCloneOnHide,l))},dragOverCompleted:function(i){var s=i.sortable,l=i.isOwner,c=i.insertion,d=i.activeSortable,h=i.parentEl,p=i.putSortable,g=this.options;if(c){if(l&&d._hideClone(),go=!1,g.animation&&qe.length>1&&(cn||!l&&!d.options.sort&&!p)){var y=gt(ot,!1,!0,!0);qe.forEach(function(v){if(v===ot)return;wg(v,y),h.appendChild(v)}),cn=!0}if(!l)if(cn||Ha(),qe.length>1){var m=Ba;d._showClone(s),d.options.animation&&!Ba&&m&&un.forEach(function(v){d.addAnimationState({target:v,rect:vo}),v.fromRect=vo,v.thisAnimationDuration=null})}else d._showClone(s)}},dragOverAnimationCapture:function(i){var s=i.dragRect,l=i.isOwner,c=i.activeSortable;if(qe.forEach(function(h){h.thisAnimationDuration=null}),c.options.animation&&!l&&c.multiDrag.isMultiDrag){vo=xn({},s);var d=Er(ot,!0);vo.top-=d.f,vo.left-=d.e}},dragOverAnimationComplete:function(){cn&&(cn=!1,Ha())},drop:function(i){var s=i.originalEvent,l=i.rootEl,c=i.parentEl,d=i.sortable,h=i.dispatchSortableEvent,p=i.oldIndex,g=i.putSortable,y=g||this.sortable;if(!s)return;var m=this.options,v=c.children;if(!di)if(m.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ct(ot,m.selectedClass,!~qe.indexOf(ot)),~qe.indexOf(ot))qe.splice(qe.indexOf(ot),1),mo=null,so({sortable:d,rootEl:l,name:"deselect",targetEl:ot,originalEvt:s});else{if(qe.push(ot),so({sortable:d,rootEl:l,name:"select",targetEl:ot,originalEvt:s}),s.shiftKey&&mo&&d.el.contains(mo)){var w=Et(mo),E=Et(ot);if(~w&&~E&&w!==E){var D,C;for(E>w?(C=w,D=E):(C=E,D=w+1);C1){var q=gt(ot),A=Et(ot,":not(."+this.options.selectedClass+")");if(!go&&m.animation&&(ot.thisAnimationDuration=null),y.captureAnimationState(),!go&&(m.animation&&(ot.fromRect=q,qe.forEach(function(N){if(N.thisAnimationDuration=null,N!==ot){var V=cn?gt(N):q;N.fromRect=V,y.addAnimationState({target:N,rect:V})}})),Ha(),qe.forEach(function(N){v[A]?c.insertBefore(N,v[A]):c.appendChild(N),A++}),p===Et(ot))){var H=!1;qe.forEach(function(N){if(N.sortableIndex!==Et(N)){H=!0;return}}),H&&h("update")}qe.forEach(function(N){Ml(N)}),y.animateAll()}Cn=y}(l===c||g&&g.lastPutMode!=="clone")&&un.forEach(function(N){N.parentNode&&N.parentNode.removeChild(N)})},nullingGlobal:function(){this.isMultiDrag=di=!1,un.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Be(document,"pointerup",this._deselectMultiDrag),Be(document,"mouseup",this._deselectMultiDrag),Be(document,"touchend",this._deselectMultiDrag),Be(document,"keydown",this._checkKeyDown),Be(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(i){if(typeof di!="undefined"&&di)return;if(Cn!==this.sortable)return;if(i&&_n(i.target,this.options.draggable,this.sortable.el,!1))return;if(i&&i.button!==0)return;for(;qe.length;){var s=qe[0];Ct(s,this.options.selectedClass,!1),qe.shift(),so({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:s,originalEvt:i})}},_checkKeyDown:function(i){i.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(i){i.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},xn(n,{pluginName:"multiDrag",utils:{select:function(i){var s=i.parentNode[Kt];if(!s||!s.options.multiDrag||~qe.indexOf(i))return;Cn&&Cn!==s&&(Cn.multiDrag._deselectMultiDrag(),Cn=s),Ct(i,s.options.selectedClass,!0),qe.push(i)},deselect:function(i){var s=i.parentNode[Kt],l=qe.indexOf(i);if(!s||!s.options.multiDrag||!~l)return;Ct(i,s.options.selectedClass,!1),qe.splice(l,1)}},eventProperties:function(){var i=this,s=[],l=[];return qe.forEach(function(c){s.push({multiDragElement:c,index:c.sortableIndex});var d;cn&&c!==ot?d=-1:cn?d=Et(c,":not(."+i.options.selectedClass+")"):d=Et(c),l.push({multiDragElement:c,index:d})}),{items:j0(qe),clones:[].concat(un),oldIndicies:s,newIndicies:l}},optionListeners:{multiDragKey:function(i){return i=i.toLowerCase(),i==="ctrl"?i="Control":i.length>1&&(i=i.charAt(0).toUpperCase()+i.substr(1)),i}}})}function hx(n,t){qe.forEach(function(i,s){var l=t.children[i.sortableIndex+(n?Number(s):0)];l?t.insertBefore(i,l):t.appendChild(i)})}function Ig(n,t){un.forEach(function(i,s){var l=t.children[i.sortableIndex+(n?Number(s):0)];l?t.insertBefore(i,l):t.appendChild(i)})}function Ha(){qe.forEach(function(n){if(n===ot)return;n.parentNode&&n.parentNode.removeChild(n)})}Ie.mount(new dx());Ie.mount(Vl,Kl);var Ua=Ie;const Mg={name:function(n,t){const i=n.getAttribute("data-name").trim().toLowerCase(),s=t.getAttribute("data-name").trim().toLowerCase();return i.localeCompare(s)},created:function(n,t){const i=Number(n.getAttribute("data-created")),s=Number(t.getAttribute("data-created"));return s-i},updated:function(n,t){const i=Number(n.getAttribute("data-updated")),s=Number(t.getAttribute("data-updated"));return s-i},chaptersFirst:function(n,t){const i=n.getAttribute("data-type"),s=t.getAttribute("data-type");return i===s?0:i==="chapter"?-1:1},chaptersLast:function(n,t){const i=n.getAttribute("data-type"),s=t.getAttribute("data-type");return i===s?0:i==="chapter"?1:-1}};class fx{constructor(n){this.elem=n,this.sortContainer=n.querySelector("[book-sort-boxes]"),this.input=n.querySelector("[book-sort-input]");const t=n.querySelector(".sort-box");Ie.mount(new Fg()),this.setupBookSortable(t),this.setupSortPresets(),window.$events.listen("entity-select-confirm",this.bookSelect.bind(this))}setupSortPresets(){let n="",t=!1;const i=["name","created","updated"];this.sortContainer.addEventListener("click",s=>{const l=s.target.closest(".sort-box-options [data-sort]");if(!l)return;s.preventDefault();const c=l.closest(".sort-box").querySelectorAll("ul"),d=l.getAttribute("data-sort");t=n===d?!t:!1;let h=Mg[d];t&&i.includes(d)&&(h=function(p,g){return 0-Mg[d](p,g)});for(let p of c){const g=Array.from(p.children).filter(y=>y.matches("li"));g.sort(h).forEach(y=>{p.appendChild(y)})}n=d,this.updateMapInput()})}bookSelect(n){const t=this.elem.querySelector(`[data-type="book"][data-id="${n.id}"]`)!==null;if(t)return;const i=n.link+"/sort-item";window.$http.get(i).then(s=>{const l=document.createElement("div");l.innerHTML=s.data;const c=l.children[0];this.sortContainer.append(c),this.setupBookSortable(c)})}setupBookSortable(n){const t=[n.querySelector(".sort-list")];t.push(...n.querySelectorAll(".entity-list-item + ul"));const i={name:"book",pull:["book","chapter"],put:["book","chapter"]},s={name:"chapter",pull:["book","chapter"],put:function(l,c,d){return d.getAttribute("data-type")==="page"}};for(let l of t)new Ie(l,{group:l.classList.contains("sort-list")?i:s,animation:150,fallbackOnBody:!0,swapThreshold:.65,onSort:this.updateMapInput.bind(this),dragClass:"bg-white",ghostClass:"primary-background-light",multiDrag:!0,multiDragKey:"CTRL",selectedClass:"sortable-selected"})}updateMapInput(){const n=this.buildEntityMap();this.input.value=JSON.stringify(n)}buildEntityMap(){const n=[],t=this.elem.querySelectorAll(".sort-list");for(let i of t){const s=i.closest('[data-type="book"]').getAttribute("data-id"),l=Array.from(i.children).filter(c=>c.matches('[data-type="page"], [data-type="chapter"]'));for(let c=0;c{this.entityListElem.innerHTML=t.data}).catch(t=>{console.error(t)}).then(()=>{this.toggleLoading(!1),this.onSearch()})}toggleLoading(n=!1){this.loadingElem.style.display=n?"block":"none"}}var zg=px;const Wa=new WeakMap();function Og(n,t=400,i=null){$a(n),n.style.display="block",ja(n,{opacity:["0","1"]},t,()=>{i&&i()})}function Ga(n,t=400,i=null){$a(n),ja(n,{opacity:["1","0"]},t,()=>{n.style.display="none",i&&i()})}function hi(n,t=400){$a(n);const i=n.getBoundingClientRect().height,s=getComputedStyle(n),l=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:[`${i}px`,"0px"],overflow:["hidden","hidden"],paddingTop:[l,"0px"],paddingBottom:[c,"0px"]};ja(n,d,t,()=>{n.style.display="none"})}function fi(n,t=400){$a(n),n.style.display="block";const i=n.getBoundingClientRect().height,s=getComputedStyle(n),l=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:["0px",`${i}px`],overflow:["hidden","hidden"],paddingTop:["0px",l],paddingBottom:["0px",c]};ja(n,d,t)}function ja(n,t,i=400,s=null){const l=Object.keys(t);for(let d of l)n.style[d]=t[d][0];const c=()=>{for(let d of l)n.style[d]=null;n.style.transition=null,n.removeEventListener("transitionend",c),Wa.delete(n),s&&s()};setTimeout(()=>{n.style.transition=`all ease-in-out ${i}ms`;for(let d of l)n.style[d]=t[d][1];n.addEventListener("transitionend",c),Wa.set(n,c)},15)}function $a(n){if(Wa.has(n)){const t=Wa.get(n);t()}}class mx{constructor(n){this.elem=n,this.isOpen=n.classList.contains("open"),n.addEventListener("click",this.click.bind(this))}open(){const n=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.add("open"),this.elem.setAttribute("aria-expanded","true"),fi(n,240)}close(){const n=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.remove("open"),this.elem.setAttribute("aria-expanded","false"),hi(n,240)}click(n){n.preventDefault(),this.isOpen?this.close():this.open(),this.isOpen=!this.isOpen}}var Pg=mx;const Lr=$e(Qe()),Rg=$e(Ks()),bS=$e(Vs()),yS=$e(Ys()),wS=$e(ad()),kS=$e(ud()),xS=$e(hd()),_S=$e(md()),SS=$e(Zs()),CS=$e(Xs()),ES=$e(Sd()),DS=$e(Dd()),AS=$e(Md()),TS=$e(Od()),LS=$e(Nd()),IS=$e(Ud()),FS=$e($d()),MS=$e(Vd()),qS=$e(Zd()),zS=$e(eh()),OS=$e(rh()),PS=$e(ah()),RS=$e(hh()),NS=$e(mh()),BS=$e(bh()),HS=$e(kh()),US=$e(ta()),WS=$e(Sh()),jS=$e(Dh()),Yl={css:"css",c:"text/x-csrc",java:"text/x-java",scala:"text/x-scala",kotlin:"text/x-kotlin","c++":"text/x-c++src","c#":"text/x-csharp",csharp:"text/x-csharp",diff:"diff",for:"fortran",fortran:"fortran",go:"go",haskell:"haskell",hs:"haskell",html:"htmlmixed",ini:"properties",javascript:"javascript",json:{name:"javascript",json:!0},js:"javascript",jl:"julia",julia:"julia",lua:"lua",md:"markdown",mdown:"markdown",markdown:"markdown",ml:"mllike",nginx:"nginx",perl:"perl",pl:"perl",powershell:"powershell",properties:"properties",ocaml:"mllike",pascal:"text/x-pascal",pas:"text/x-pascal",php:n=>n.includes("/gi,` -`);const i=n.textContent.trimEnd();let s="";if(t!==null){const c=t.className.replace("language-","");s=Ka(c,i)}const l=Lr.default(function(c){n.parentNode.replaceChild(c,n)},{value:i,mode:s,lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});bx(l)}function bx(n){const t='',i=document.createElement("div");i.classList.add("CodeMirror-copy"),i.innerHTML=t,n.display.wrapper.appendChild(i);const s=new Rg.default(i,{text:function(l){return n.getValue()}});s.on("success",l=>{i.classList.add("success"),setTimeout(()=>{i.classList.remove("success")},240)})}function Ka(n,t){n=n.trim().replace(/^\./g,"").toLowerCase();const i=typeof Yl[n];return i==="undefined"?"":i==="function"?Yl[n](t):Yl[n]}function Va(){const n=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(n?"darcula":"default")}function yx(n){const t=n.ownerDocument,i=n.querySelector("code");let s=(n.className||"").replace("language-","");s===""&&i&&(s=(i.className||"").replace("language-","")),n.innerHTML=n.innerHTML.replace(//gi,` -`);const l=n.textContent,c=t.createElement("div"),d=t.createElement("textarea");c.className="CodeMirrorContainer",c.setAttribute("data-lang",s),c.setAttribute("dir","ltr"),d.style.display="none",n.parentNode.replaceChild(c,n),c.appendChild(d),c.contentEditable=!1,d.textContent=l;let h=Lr.default(function(p){c.appendChild(p)},{value:l,mode:Ka(s,l),lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});return setTimeout(()=>{h.refresh()},300),{wrap:c,editor:h}}function wx(n,t){const i=n.textContent;return Lr.default(function(s){n.parentNode.insertBefore(s,n),n.style.display="none"},{value:i,mode:Ka(t,i),lineNumbers:!0,lineWrapping:!1,theme:Va()})}function kx(n,t,i){n.setOption("mode",Ka(t,i))}function xx(n,t){n.setValue(t),setTimeout(()=>{Bg(n)},10)}function Bg(n){n.refresh()}function _x(n){const t=n.textContent,i={value:t,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:Va(),scrollPastEnd:!0};return window.$events.emitPublic(n,"editor-markdown-cm::pre-init",{config:i}),Lr.default(function(s){n.parentNode.insertBefore(s,n),n.style.display="none"},i)}function Sx(){let n=Lr.default.keyMap.default==Lr.default.keyMap.macDefault;return n?"Cmd":"Ctrl"}var Nt={highlight:gx,highlightWithin:vx,wysiwygView:yx,popupEditor:wx,setMode:kx,setContent:xx,updateLayout:Bg,markdownEditor:_x,getMetaKey:Sx};class Cx{setup(){this.container=this.$refs.container,this.popup=this.$el,this.editorInput=this.$refs.editor,this.languageLinks=this.$manyRefs.languageLink,this.saveButton=this.$refs.saveButton,this.languageInput=this.$refs.languageInput,this.historyDropDown=this.$refs.historyDropDown,this.historyList=this.$refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",n=>{n.ctrlKey&&n.key==="Enter"&&this.save()}),it(this.languageLinks,n=>{const t=n.target.dataset.lang;this.languageInput.value=t,this.updateEditorMode(t)}),Sa(this.languageInput,n=>this.save()),it(this.saveButton,n=>this.save()),zt(this.historyList,"button","click",(n,t)=>{n.preventDefault();const i=t.dataset.time;this.editor&&this.editor.setValue(this.history[i])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(n,t,i){this.languageInput.value=t,this.callback=i,this.show(),this.updateEditorMode(t),Nt.setContent(this.editor,n)}show(){this.editor||(this.editor=Nt.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{Nt.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(n){Nt.setMode(this.editor,n,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");const n=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",n.length===0),this.historyList.innerHTML=n.map(t=>{const i=new Date(parseInt(t)).toLocaleTimeString();return`
  • `}).join("")}addHistory(){if(!this.editor)return;const n=this.editor.getValue();if(!n)return;const t=Object.keys(this.history).pop();if(this.history[t]===n)return;this.history[String(Date.now())]=n;const i=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,i)}}var Hg=Cx;class Ex{constructor(n){Nt.highlightWithin(n)}}var Ug=Ex;class Dx{constructor(n){if(this.elem=n,this.trigger=n.querySelector("[collapsible-trigger]"),this.content=n.querySelector("[collapsible-content]"),!this.trigger)return;this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError()}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),fi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),hi(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){const n=this.content.querySelector(".text-neg.text-small");n&&this.open()}}var Wg=Dx;class Ax{constructor(n){this.elem=n,this.checkbox=n.querySelector("input[type=checkbox]"),this.display=n.querySelector('[role="checkbox"]'),this.checkbox.addEventListener("change",this.stateChange.bind(this)),this.elem.addEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(n){const t=n.keyCode===32||n.keyCode===13;t&&(n.preventDefault(),this.toggle())}toggle(){this.checkbox.checked=!this.checkbox.checked,this.checkbox.dispatchEvent(new Event("change")),this.stateChange()}stateChange(){const n=this.checkbox.checked?"true":"false";this.display.setAttribute("aria-checked",n)}}var jg=Ax;class Tx{constructor(n){this.elem=n,this.dealtWith=!1,n.addEventListener("toggle",this.onToggle.bind(this))}onToggle(){if(this.dealtWith)return;Nt.highlightWithin(this.elem),this.dealtWith=!0}}var $g=Tx;class Lx{setup(){this.container=this.$el,this.menu=this.$refs.menu,this.toggle=this.$refs.toggle,this.moveMenu=this.$opts.moveMenu,this.direction=document.dir==="rtl"?"right":"left",this.body=document.body,this.showing=!1,this.setupListeners()}show(n=null){this.hideAll(),this.menu.style.display="block",this.menu.classList.add("anim","menuIn"),this.toggle.setAttribute("aria-expanded","true"),this.moveMenu&&(this.rect=this.menu.getBoundingClientRect(),this.body.appendChild(this.menu),this.menu.style.position="fixed",this.direction==="right"?this.menu.style.right=`${this.rect.right-this.rect.width}px`:this.menu.style.left=`${this.rect.left}px`,this.menu.style.top=`${this.rect.top}px`,this.menu.style.width=`${this.rect.width}px`),this.menu.addEventListener("mouseleave",this.hide.bind(this)),window.addEventListener("click",s=>{this.menu.contains(s.target)||this.hide()});const t=this.menu.querySelector("input");t!==null&&t.focus(),this.showing=!0;const i=new Event("show");this.container.dispatchEvent(i),n&&n.stopPropagation()}hideAll(){for(let n of window.components.dropdown)n.hide()}hide(){this.menu.style.display="none",this.menu.classList.remove("anim","menuIn"),this.toggle.setAttribute("aria-expanded","false"),this.moveMenu&&(this.menu.style.position="",this.menu.style[this.direction]="",this.menu.style.top="",this.menu.style.width="",this.container.appendChild(this.menu)),this.showing=!1}getFocusable(){return Array.from(this.menu.querySelectorAll("[tabindex],[href],button,input:not([type=hidden])"))}focusNext(){const n=this.getFocusable(),t=n.indexOf(document.activeElement);let i=t+1;i>=n.length&&(i=0),n[i].focus()}focusPrevious(){const n=this.getFocusable(),t=n.indexOf(document.activeElement);let i=t-1;i<0&&(i=n.length-1),n[i].focus()}setupListeners(){this.container.addEventListener("click",t=>{const i=Array.from(this.menu.querySelectorAll("a"));i.includes(t.target)&&this.hide()}),it(this.toggle,t=>{t.stopPropagation(),this.show(t),t instanceof KeyboardEvent&&this.focusNext()});const n=t=>{t.key==="ArrowDown"||t.key==="ArrowRight"?(this.focusNext(),t.preventDefault()):t.key==="ArrowUp"||t.key==="ArrowLeft"?(this.focusPrevious(),t.preventDefault()):t.key==="Escape"&&(this.hide(),this.toggle.focus(),t.stopPropagation())};this.container.addEventListener("keydown",n),this.moveMenu&&this.menu.addEventListener("keydown",n),this.menu.addEventListener("keydown ",t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),this.hide())})}}var Gg=Lx;const Kg=$e(Mh());class Ix{setup(){this.container=this.$el,this.url=this.$opts.url,this.successMessage=this.$opts.successMessage,this.removeMessage=this.$opts.removeMessage,this.uploadLimitMessage=this.$opts.uploadLimitMessage,this.timeoutMessage=this.$opts.timeoutMessage;const n=this;this.dz=new Kg.default(this.container,{addRemoveLinks:!0,dictRemoveFile:this.removeMessage,timeout:Number(window.uploadTimeout)||6e4,maxFilesize:Number(window.uploadLimit)||256,url:this.url,withCredentials:!0,init(){this.dz=this,this.dz.on("sending",n.onSending.bind(n)),this.dz.on("success",n.onSuccess.bind(n)),this.dz.on("error",n.onError.bind(n))}})}onSending(n,t,i){const s=window.document.querySelector("meta[name=token]").getAttribute("content");i.append("_token",s),t.ontimeout=l=>{this.dz.emit("complete",n),this.dz.emit("error",n,this.timeoutMessage)}}onSuccess(n,t){this.$emit("success",{file:n,data:t}),this.successMessage&&window.$events.emit("success",this.successMessage),Ga(n.previewElement,800,()=>{this.dz.removeFile(n)})}onError(n,t,i){this.$emit("error",{file:n,errorMessage:t,xhr:i});const s=l=>{const c=n.previewElement.querySelector("[data-dz-errormessage]");c.textContent=l};i&&i.status===413?s(this.uploadLimitMessage):t.file&&s(t.file)}removeAll(){this.dz.removeAllFiles(!0)}}var Vg=Ix;class Fx{constructor(n){this.elem=n,this.buttons=n.querySelectorAll("[toolbox-tab-button]"),this.contentElements=n.querySelectorAll("[toolbox-tab-content]"),this.toggleButton=n.querySelector("[toolbox-toggle]"),this.toggleButton.addEventListener("click",this.toggle.bind(this)),this.elem.addEventListener("click",t=>{let i=t.target.closest("[toolbox-tab-button]");if(i===null)return;let s=i.getAttribute("toolbox-tab-button");this.setActiveTab(s,!0)}),this.setActiveTab(this.contentElements[0].getAttribute("toolbox-tab-content"))}toggle(){this.elem.classList.toggle("open");const n=this.elem.classList.contains("open")?"true":"false";this.toggleButton.setAttribute("aria-expanded",n)}setActiveTab(n,t=!1){for(let i=0,s=this.buttons.length;i{n.preventDefault(),this.runSearch()}),it(this.clearButton,this.clearSearch.bind(this))}runSearch(){const n=this.searchInput.value.trim();if(n.length===0)return this.clearSearch();this.searchView.classList.remove("hidden"),this.contentView.classList.add("hidden"),this.loadingBlock.classList.remove("hidden");const t=window.baseUrl(`/search/${this.entityType}/${this.entityId}`);window.$http.get(t,{term:n}).then(i=>{this.searchResults.innerHTML=i.data}).catch(console.error).then(()=>{this.loadingBlock.classList.add("hidden")})}clearSearch(){this.searchView.classList.add("hidden"),this.contentView.classList.remove("hidden"),this.loadingBlock.classList.add("hidden"),this.searchInput.value=""}}var Zg=qx;class zx{constructor(n){this.elem=n,this.search="",this.lastClick=0,this.selectedItemData=null;const t=n.hasAttribute("entity-types")?n.getAttribute("entity-types"):"page,book,chapter",i=n.hasAttribute("entity-permission")?n.getAttribute("entity-permission"):"view";this.searchUrl=window.baseUrl(`/ajax/search/entities?types=${encodeURIComponent(t)}&permission=${encodeURIComponent(i)}`),this.input=n.querySelector("[entity-selector-input]"),this.searchInput=n.querySelector("[entity-selector-search]"),this.loading=n.querySelector("[entity-selector-loading]"),this.resultsContainer=n.querySelector("[entity-selector-results]"),this.addButton=n.querySelector("[entity-selector-add-button]"),this.elem.addEventListener("click",this.onClick.bind(this));let s=0;this.searchInput.addEventListener("input",l=>{s=Date.now(),this.showLoading(),setTimeout(()=>{if(Date.now()-s<199)return;this.searchEntities(this.searchInput.value)},200)}),this.searchInput.addEventListener("keydown",l=>{l.keyCode===13&&l.preventDefault()}),this.addButton&&this.addButton.addEventListener("click",l=>{this.selectedItemData&&(this.confirmSelection(this.selectedItemData),this.unselectAll())}),this.showLoading(),this.initialLoad()}showLoading(){this.loading.style.display="block",this.resultsContainer.style.display="none"}hideLoading(){this.loading.style.display="none",this.resultsContainer.style.display="block"}initialLoad(){window.$http.get(this.searchUrl).then(n=>{this.resultsContainer.innerHTML=n.data,this.hideLoading()})}searchEntities(n){this.input.value="";let t=`${this.searchUrl}&term=${encodeURIComponent(n)}`;window.$http.get(t).then(i=>{this.resultsContainer.innerHTML=i.data,this.hideLoading()})}isDoubleClick(){let n=Date.now(),t=n-this.lastClick<300;return this.lastClick=n,t}onClick(n){const t=n.target.closest("[data-entity-type]");t&&(n.preventDefault(),n.stopPropagation(),this.selectItem(t))}selectItem(n){const t=this.isDoubleClick(),i=n.getAttribute("data-entity-type"),s=n.getAttribute("data-entity-id"),l=!n.classList.contains("selected")||t;this.unselectAll(),this.input.value=l?`${i}:${s}`:"";const c=n.getAttribute("href"),d=n.querySelector(".entity-list-item-name").textContent,h={id:Number(s),name:d,link:c};if(l?(n.classList.add("selected"),this.selectedItemData=h):window.$events.emit("entity-select-change",null),!t&&!l)return;t&&this.confirmSelection(h),l&&window.$events.emit("entity-select-change",h)}confirmSelection(n){window.$events.emit("entity-select-confirm",n)}unselectAll(){let n=this.elem.querySelectorAll(".selected");for(let t of n)t.classList.remove("selected","primary-background");this.selectedItemData=null}}var Qg=zx;class Ox{setup(){this.elem=this.$el,this.selectButton=this.$refs.select,window.EntitySelectorPopup=this,this.callback=null,this.selection=null,this.selectButton.addEventListener("click",this.onSelectButtonClick.bind(this)),window.$events.listen("entity-select-change",this.onSelectionChange.bind(this)),window.$events.listen("entity-select-confirm",this.onSelectionConfirm.bind(this))}show(n){this.callback=n,this.elem.components.popup.show()}hide(){this.elem.components.popup.hide()}onSelectButtonClick(){this.hide(),this.selection!==null&&this.callback&&this.callback(this.selection)}onSelectionConfirm(n){this.hide(),this.callback&&n&&this.callback(n)}onSelectionChange(n){this.selection=n,n===null?this.selectButton.setAttribute("disabled","true"):this.selectButton.removeAttribute("disabled")}}var Jg=Ox;class Px{setup(){this.container=this.$el,this.name=this.$opts.name,it(this.$el,()=>{this.$emit(this.name,this.$opts)})}}var ev=Px;class Rx{constructor(n){this.elem=n,this.isOpen=n.getAttribute("expand-toggle-is-open")==="yes",this.updateEndpoint=n.getAttribute("expand-toggle-update-endpoint"),this.selector=n.getAttribute("expand-toggle"),n.addEventListener("click",this.click.bind(this))}open(n){fi(n,200)}close(n){hi(n,200)}click(n){n.preventDefault();const t=document.querySelectorAll(this.selector);for(let i of t)this.isOpen?this.close(i):this.open(i);this.isOpen=!this.isOpen,this.updateSystemAjax(this.isOpen)}updateSystemAjax(n){window.$http.patch(this.updateEndpoint,{expand:n?"true":"false"})}}var tv=Rx;class Nx{constructor(n){this.elem=n,this.typeControl=n.querySelector('[name="setting-app-homepage-type"]'),this.pagePickerContainer=n.querySelector("[page-picker-container]"),this.typeControl.addEventListener("change",this.controlPagePickerVisibility.bind(this)),this.controlPagePickerVisibility()}controlPagePickerVisibility(){const n=this.typeControl.value==="page";this.pagePickerContainer.style.display=n?"block":"none"}}var nv=Nx;class Bx{setup(){this.uploadedTo=this.$opts.uploadedTo,this.container=this.$el,this.popupEl=this.$refs.popup,this.searchForm=this.$refs.searchForm,this.searchInput=this.$refs.searchInput,this.cancelSearch=this.$refs.cancelSearch,this.listContainer=this.$refs.listContainer,this.filterTabs=this.$manyRefs.filterTabs,this.selectButton=this.$refs.selectButton,this.formContainer=this.$refs.formContainer,this.dropzoneContainer=this.$refs.dropzoneContainer,this.type="gallery",this.lastSelected={},this.lastSelectedTime=0,this.callback=null,this.resetState=()=>{this.hasData=!1,this.page=1,this.filter="all"},this.resetState(),this.setupListeners(),window.ImageManager=this}setupListeners(){it(this.filterTabs,n=>{this.resetAll(),this.filter=n.target.dataset.filter,this.setActiveFilterTab(this.filter),this.loadGallery()}),this.searchForm.addEventListener("submit",n=>{this.resetListView(),this.loadGallery(),n.preventDefault()}),it(this.cancelSearch,n=>{this.resetListView(),this.resetSearchView(),this.loadGallery(),this.cancelSearch.classList.remove("active")}),this.searchInput.addEventListener("input",n=>{this.cancelSearch.classList.toggle("active",this.searchInput.value.trim())}),zt(this.listContainer,".load-more","click",async n=>{to(n.target),this.page++,await this.loadGallery(),n.target.remove()}),this.listContainer.addEventListener("event-emit-select-image",this.onImageSelectEvent.bind(this)),it(this.selectButton,()=>{this.callback&&this.callback(this.lastSelected),this.hide()}),zt(this.formContainer,"#image-manager-delete","click",n=>{this.lastSelected&&this.loadImageEditForm(this.lastSelected.id,!0)}),this.formContainer.addEventListener("ajax-form-success",this.refreshGallery.bind(this)),this.container.addEventListener("dropzone-success",this.refreshGallery.bind(this))}show(n,t="gallery"){this.resetAll(),this.callback=n,this.type=t,this.popupEl.components.popup.show(),this.dropzoneContainer.classList.toggle("hidden",t!=="gallery"),this.hasData||(this.loadGallery(),this.hasData=!0)}hide(){this.popupEl.components.popup.hide()}async loadGallery(){const n={page:this.page,search:this.searchInput.value||null,uploaded_to:this.uploadedTo,filter_type:this.filter==="all"?null:this.filter},{data:t}=await window.$http.get(`images/${this.type}`,n);this.addReturnedHtmlElementsToList(t),tg(this.listContainer)}addReturnedHtmlElementsToList(n){const t=document.createElement("div");t.innerHTML=n,window.components.init(t);for(const i of[...t.children])this.listContainer.appendChild(i)}setActiveFilterTab(n){this.filterTabs.forEach(i=>i.classList.remove("selected"));const t=this.filterTabs.find(i=>i.dataset.filter===n);t&&t.classList.add("selected")}resetAll(){this.resetState(),this.resetListView(),this.resetSearchView(),this.resetEditForm(),this.setActiveFilterTab("all"),this.selectButton.classList.add("hidden")}resetSearchView(){this.searchInput.value=""}resetEditForm(){this.formContainer.innerHTML=""}resetListView(){to(this.listContainer),this.page=1}refreshGallery(){this.resetListView(),this.loadGallery()}onImageSelectEvent(n){const t=JSON.parse(n.detail.data),i=t&&t.id===this.lastSelected.id&&Date.now()-this.lastSelectedTime<400,s=n.target.classList.contains("selected");[...this.listContainer.querySelectorAll(".selected")].forEach(l=>{l.classList.remove("selected")}),s?this.resetEditForm():(n.target.classList.add("selected"),this.loadImageEditForm(t.id)),this.selectButton.classList.toggle("hidden",s),i&&this.callback&&(this.callback(t),this.hide()),this.lastSelected=t,this.lastSelectedTime=Date.now()}async loadImageEditForm(n,t=!1){t||(this.formContainer.innerHTML="");const i=t?{delete:!0}:{},{data:s}=await window.$http.get(`/images/edit/${n}`,i);this.formContainer.innerHTML=s,window.components.init(this.formContainer)}}var rv=Bx;class Hx{constructor(n){this.elem=n,this.imageElem=n.querySelector("img"),this.imageInput=n.querySelector("input[type=file]"),this.resetInput=n.querySelector("input[data-reset-input]"),this.removeInput=n.querySelector("input[data-remove-input]"),this.defaultImage=n.getAttribute("data-default-image");const t=n.querySelector('button[data-action="reset-image"]');t.addEventListener("click",this.reset.bind(this));const i=n.querySelector('button[data-action="remove-image"]');i&&i.addEventListener("click",this.removeImage.bind(this)),this.imageInput.addEventListener("change",this.fileInputChange.bind(this))}fileInputChange(){this.resetInput.setAttribute("disabled","disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled");for(let n of this.imageInput.files)this.imageElem.src=window.URL.createObjectURL(n);this.imageElem.classList.remove("none")}reset(){this.imageInput.value="",this.imageElem.src=this.defaultImage,this.resetInput.removeAttribute("disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled"),this.imageElem.classList.remove("none")}removeImage(){this.imageInput.value="",this.imageElem.classList.add("none"),this.removeInput.removeAttribute("disabled"),this.resetInput.setAttribute("disabled","disabled")}}var iv=Hx;class Ux{constructor(n){this.elem=n,this.menu=n.querySelector("ul"),this.sortInput=n.querySelector('[name="sort"]'),this.orderInput=n.querySelector('[name="order"]'),this.form=n.querySelector("form"),this.menu.addEventListener("click",t=>{t.target.closest("[data-sort-value]")!==null&&this.sortOptionClick(t)}),this.elem.addEventListener("click",t=>{t.target.closest("[data-sort-dir]")!==null&&this.sortDirectionClick(t)})}sortOptionClick(n){const t=n.target.closest("[data-sort-value]");this.sortInput.value=t.getAttribute("data-sort-value"),n.preventDefault(),this.form.submit()}sortDirectionClick(n){const t=this.orderInput.value,i=t==="asc"?"desc":"asc";this.orderInput.value=i,n.preventDefault(),this.form.submit()}}var ov=Ux;class Wx{constructor(n){this.data=n}hasItems(){return Boolean(this.data)&&Boolean(this.data.types)&&this.data.types.length>0}containsTabularData(){const n=this.data.getData("text/rtf");return n&&n.includes("\\trowd")}getImages(){const n=this.data.types,t=this.data.files,i=[];for(const s of n)if(s.includes("image")){const l=this.data.getData(s);i.push(l.getAsFile())}for(const s of t)s.type.includes("image")&&i.push(s);return i}}var bo=Wx;let Zn=null,Xl,Zl;function jx(n,t,i){Xl=t,Zl=i,Zn=document.createElement("iframe"),Zn.setAttribute("frameborder","0"),window.addEventListener("message",av),Zn.setAttribute("src",n),Zn.setAttribute("class","fullscreen"),Zn.style.backgroundColor="#FFFFFF",document.body.appendChild(Zn)}function $x(){sv()}function av(n){if(!n.data||n.data.length<1)return;let t=JSON.parse(n.data);t.event==="init"?Vx():t.event==="exit"?sv():t.event==="save"?Kx(t):t.event==="export"&&Gx(t)}function Gx(n){Zl&&Zl(n.data)}function Kx(n){lv({action:"export",format:"xmlpng",xml:n.xml,spin:"Updating drawing"})}function Vx(){if(!Xl)return;Xl().then(n=>{lv({action:"load",autosave:1,xml:n})})}function sv(){window.removeEventListener("message",av),Zn&&document.body.removeChild(Zn)}function lv(n){Zn.contentWindow.postMessage(JSON.stringify(n),"*")}async function Yx(n,t){let i={image:n,uploaded_to:t};const s=await window.$http.post(window.baseUrl("/images/drawio"),i);return s.data}async function Xx(n){const t=await window.$http.get(window.baseUrl(`/images/drawio/base64/${n}`));return`data:image/png;base64,${t.data.content}`}var dn={show:jx,close:$x,upload:Yx,load:Xx};const uv=$e(jm()),cv=$e(Ym());class Zx{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.markdown=new uv.default({html:!0}),this.markdown.use(cv.default,{label:!0}),this.display=this.elem.querySelector(".markdown-display"),this.displayStylesLoaded=!1,this.input=this.elem.querySelector("textarea"),this.htmlInput=this.elem.querySelector("input[name=html]"),this.cm=Nt.markdownEditor(this.input),this.onMarkdownScroll=this.onMarkdownScroll.bind(this);const n=()=>{this.displayDoc=this.display.contentDocument,this.init()};this.display.contentDocument.readyState==="complete"?n():this.display.addEventListener("load",n.bind(this)),window.$events.emitPublic(this.elem,"editor-markdown::setup",{markdownIt:this.markdown,displayEl:this.display,codeMirrorInstance:this.cm})}init(){let n=0;this.displayDoc.addEventListener("click",s=>{let l=Date.now()-n<300,c=s.target.closest("a");if(c!==null){s.preventDefault(),window.open(c.getAttribute("href"));return}let d=s.target.closest("[drawio-diagram]");if(d!==null&&l){this.actionEditDrawing(d);return}n=Date.now()}),this.elem.addEventListener("click",s=>{let l=s.target.closest("button[data-action]");if(l===null)return;let c=l.getAttribute("data-action");if(c==="insertImage"&&this.actionInsertImage(),c==="insertLink"&&this.actionShowLinkSelector(),c==="insertDrawing"&&(s.ctrlKey||s.metaKey)){this.actionShowImageManager();return}c==="insertDrawing"&&this.actionStartDrawing(),c==="fullscreen"&&this.actionFullScreen()}),this.elem.addEventListener("click",s=>{const l=s.target.closest(".editor-toolbar-label");if(!l)return;const c=this.elem.querySelectorAll(".markdown-editor-wrap");for(let d of c)d.classList.remove("active");l.closest(".markdown-editor-wrap").classList.add("active")}),window.$events.listen("editor-markdown-update",s=>{this.cm.setValue(s),this.updateAndRender()}),this.codeMirrorSetup(),this.listenForBookStackEditorEvents();const t=new URL(window.location).searchParams,i=t.get("content-text");i&&this.scrollToText(i)}updateAndRender(){const n=this.cm.getValue();this.input.value=n;const t=this.markdown.render(n);window.$events.emit("editor-html-change",t),window.$events.emit("editor-markdown-change",n),this.displayDoc.body.className="page-content",this.displayDoc.body.innerHTML=t,this.htmlInput.value=t,this.loadStylesIntoDisplay()}loadStylesIntoDisplay(){if(this.displayStylesLoaded)return;this.displayDoc.documentElement.classList.add("markdown-editor-display"),document.documentElement.classList.contains("dark-mode")&&(this.displayDoc.documentElement.style.backgroundColor="#222",this.displayDoc.documentElement.classList.add("dark-mode")),this.displayDoc.head.innerHTML="";const n=document.head.querySelectorAll("style,link[rel=stylesheet]");for(let t of n){const i=t.cloneNode(!0);this.displayDoc.head.appendChild(i)}this.displayStylesLoaded=!0}onMarkdownScroll(n){const t=this.displayDoc.body.children;if(t.length<=n)return;const i=n===-1?t[t.length-1]:t[n];i.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})}codeMirrorSetup(){const n=this.cm,t=this;n.setOption("direction","ltr");let i=Nt.getMetaKey();const s={};s[`${i}-Alt-I`]=function(m){let v=m.getSelection(),w=`![${v}](http://)`,E=m.getCursor("from");m.replaceSelection(w),m.setCursor(E.line,E.ch+w.length-1)},s[`${i}-S`]=m=>{window.$events.emit("editor-save-draft")},s[`${i}-Enter`]=m=>{window.$events.emit("editor-save-page")},s[`Shift-${i}-K`]=m=>{this.actionShowLinkSelector()},s[`${i}-K`]=m=>{y()},s[`${i}-1`]=m=>{d("##")},s[`${i}-2`]=m=>{d("###")},s[`${i}-3`]=m=>{d("####")},s[`${i}-4`]=m=>{d("#####")},s[`${i}-5`]=m=>{d("")},s[`${i}-d`]=m=>{d("")},s[`${i}-6`]=m=>{d(">")},s[`${i}-q`]=m=>{d(">")},s[`${i}-7`]=m=>{p("\n```\n","\n```")},s[`${i}-8`]=m=>{p("`","`")},s[`Shift-${i}-E`]=m=>{p("`","`")},s[`${i}-9`]=m=>{p('

    ',"

    ")},n.setOption("extraKeys",s),n.on("change",(m,v)=>{this.updateAndRender()});const l=ng(m=>{let v=m.getScrollInfo(),w=v.top+v.clientHeight===v.height;if(w){this.onMarkdownScroll(-1);return}let E=m.lineAtHeight(v.top,"local"),D=m.getRange({line:0,ch:null},{line:E,ch:null}),C=new DOMParser(),q=C.parseFromString(this.markdown.render(D),"text/html"),A=q.documentElement.querySelectorAll("body > *");this.onMarkdownScroll(A.length)},100);n.on("scroll",m=>{l(m)}),n.on("paste",(m,v)=>{const w=new bo(v.clipboardData||v.dataTransfer);if(!w.hasItems()||w.containsTabularData())return;const E=w.getImages();for(const D of E)g(D)}),n.on("drop",(m,v)=>{const w=v.dataTransfer.getData("bookstack/template");if(w){const D=m.coordsChar({left:v.pageX,top:v.pageY});m.setCursor(D),v.preventDefault(),window.$http.get(`/templates/${w}`).then(C=>{const q=C.data.markdown||C.data.html;m.replaceSelection(q)})}const E=new bo(v.dataTransfer);if(E.hasItems()&&E.getImages().length>0){const D=m.coordsChar({left:v.pageX,top:v.pageY});m.setCursor(D),v.stopPropagation(),v.preventDefault();const C=E.getImages();for(const q of C)g(q)}});function c(m,v){let w=n.getValue(),E=n.listSelections();n.setValue(w.replace(m,v)),n.setSelections(E)}function d(m){let v=n.getCursor(),w=n.getLine(v.line),E=w.length,D=w.split(" ")[0];if(D===m){w=w.replace(`${m} `,""),n.replaceRange(w,{line:v.line,ch:0},{line:v.line,ch:E}),n.setCursor({line:v.line,ch:v.ch-(m.length+1)});return}let C=/^[#>`]/.test(D),q=0;C?(q=m.length-D.length,w=w.replace(D,m).trim()):m!==""&&(q=m.length+1,w=m+" "+w),n.replaceRange(w,{line:v.line,ch:0},{line:v.line,ch:E}),n.setCursor({line:v.line,ch:v.ch+q})}function h(m,v){let w=n.getCursor(),E=n.getLine(w.line),D=E.length,C=E;E.indexOf(m)===0&&E.slice(-v.length)===v?C=E.slice(m.length,E.length-v.length):C=`${m}${E}${v}`,n.replaceRange(C,{line:w.line,ch:0},{line:w.line,ch:D}),n.setCursor({line:w.line,ch:w.ch+m.length})}function p(m,v){let w=n.getSelection();if(w==="")return h(m,v);let E=w,D=0,C=0;w.indexOf(m)===0&&w.slice(-v.length)===v?(E=w.slice(m.length,w.length-v.length),C=-(v.length+m.length)):(E=`${m}${w}${v}`,C=m.length+v.length);let q=n.listSelections()[0];n.replaceSelection(E);let A=q.head.ch<=q.anchor.ch;q.head.ch+=A?D:C,q.anchor.ch+=A?C:D,n.setSelections([q])}function g(m){if(m===null||m.type.indexOf("image")!==0)return;let v="png";if(m.name){let N=m.name.match(/\.(.+)$/);N.length>1&&(v=N[1])}const w="image-"+Math.random().toString(16).slice(2),E=window.baseUrl(`/loading.gif#upload${w}`),D=n.getSelection(),C=`![${D}](${E})`,q=n.getCursor();n.replaceSelection(C),n.setCursor({line:q.line,ch:q.ch+D.length+3});const A="image-"+Date.now()+"."+v,H=new FormData();H.append("file",m,A),H.append("uploaded_to",t.pageId),window.$http.post("/images/gallery",H).then(N=>{const V=`[![${D}](${N.data.thumbs.display})](${N.data.url})`;c(C,V)}).catch(N=>{window.$events.emit("error",trans("errors.image_upload_error")),c(C,D),console.log(N)})}function y(){let m=n.getCursor("from"),v=n.getSelection()||"",w=`[${v}]()`;n.focus(),n.replaceSelection(w);let E=v===""?-3:-1;n.setCursor(m.line,m.ch+w.length+E)}this.updateAndRender()}actionInsertImage(){const n=this.cm.getCursor("from");window.ImageManager.show(t=>{let i=this.cm.getSelection(),s="[!["+(i||t.name)+"]("+t.thumbs.display+")]("+t.url+")";this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(n.line,n.ch+s.length)},"gallery")}actionShowImageManager(){const n=this.cm.getCursor("from");window.ImageManager.show(t=>{this.insertDrawing(t,n)},"drawio")}actionShowLinkSelector(){const n=this.cm.getCursor("from");window.EntitySelectorPopup.show(t=>{let i=this.cm.getSelection()||t.name,s=`[${i}](${t.link})`;this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(n.line,n.ch+s.length)})}getDrawioUrl(){const n=document.querySelector("[drawio-url]");return n?n.getAttribute("drawio-url"):!1}actionStartDrawing(){const n=this.getDrawioUrl();if(!n)return;const t=this.cm.getCursor("from");dn.show(n,()=>Promise.resolve(""),i=>{const s={image:i,uploaded_to:Number(document.getElementById("page-editor").getAttribute("page-id"))};window.$http.post(window.baseUrl("/images/drawio"),s).then(l=>{this.insertDrawing(l.data,t),dn.close()}).catch(l=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(l)})})}insertDrawing(n,t){const i=`
    `;this.cm.focus(),this.cm.replaceSelection(i),this.cm.setCursor(t.line,t.ch+i.length)}actionEditDrawing(n){const t=this.getDrawioUrl();if(!t)return;const i=this.cm.getCursor("from"),s=n.getAttribute("drawio-diagram");dn.show(t,()=>dn.load(s),l=>{let c={image:l,uploaded_to:Number(document.getElementById("page-editor").getAttribute("page-id"))};window.$http.post(window.baseUrl("/images/drawio"),c).then(d=>{let h=`
    `,p=this.cm.getValue().split(` +`};zn.text=function(t,n){return Cr(t[n].content)};zn.html_block=function(t,n){return t[n].content};zn.html_inline=function(t,n){return t[n].content};function ni(){this.rules=zw({},zn)}ni.prototype.renderAttrs=function(n){var i,s,u;if(!n.attrs)return"";for(u="",i=0,s=n.attrs.length;i +`:">",c)};ni.prototype.renderInline=function(t,n,i){for(var s,u="",c=this.rules,d=0,h=t.length;d{"use strict";function xn(){this.__rules__=[],this.__cache__=null}xn.prototype.__find__=function(t){for(var n=0;n{"use strict";var Rw=/\r\n?|\n/g,Ow=/\0/g;_f.exports=function(n){var i;i=n.src.replace(Rw,` +`),i=i.replace(Ow,"�"),n.src=i}});var Ef=le((A_,Sf)=>{"use strict";Sf.exports=function(n){var i;n.inlineMode?(i=new n.Token("inline","",0),i.content=n.src,i.map=[0,1],i.children=[],n.tokens.push(i)):n.md.block.parse(n.src,n.md,n.env,n.tokens)}});var Af=le((T_,Df)=>{"use strict";Df.exports=function(n){var i=n.tokens,s,u,c;for(u=0,c=i.length;u{"use strict";var Nw=Je().arrayReplaceAt;function Bw(t){return/^\s]/i.test(t)}function jw(t){return/^<\/a\s*>/i.test(t)}Tf.exports=function(n){var i,s,u,c,d,h,p,g,y,m,b,w,D,E,S,z,A=n.tokens,R;if(!n.md.options.linkify)return;for(s=0,u=A.length;s=0;i--){if(h=c[i],h.type==="link_close"){for(i--;c[i].level!==h.level&&c[i].type!=="link_open";)i--;continue}if(h.type==="html_inline"&&(Bw(h.content)&&D>0&&D--,jw(h.content)&&D++),D>0)continue;if(h.type==="text"&&n.md.linkify.test(h.content)){for(y=h.content,R=n.md.linkify.match(y),p=[],w=h.level,b=0,g=0;gb&&(d=new n.Token("text","",0),d.content=y.slice(b,m),d.level=w,p.push(d)),d=new n.Token("link_open","a",1),d.attrs=[["href",S]],d.level=w++,d.markup="linkify",d.info="auto",p.push(d),d=new n.Token("text","",0),d.content=z,d.level=w,p.push(d),d=new n.Token("link_close","a",-1),d.level=--w,d.markup="linkify",d.info="auto",p.push(d),b=R[g].lastIndex}b{"use strict";var Ff=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Hw=/\((c|tm|r|p)\)/i,Uw=/\((c|tm|r|p)\)/ig,Ww={c:"©",r:"®",p:"§",tm:"™"};function $w(t,n){return Ww[n.toLowerCase()]}function Gw(t){var n,i,s=0;for(n=t.length-1;n>=0;n--)i=t[n],i.type==="text"&&!s&&(i.content=i.content.replace(Uw,$w)),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}function Kw(t){var n,i,s=0;for(n=t.length-1;n>=0;n--)i=t[n],i.type==="text"&&!s&&(Ff.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–"))),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}If.exports=function(n){var i;if(!n.md.options.typographer)return;for(i=n.tokens.length-1;i>=0;i--){if(n.tokens[i].type!=="inline")continue;Hw.test(n.tokens[i].content)&&Gw(n.tokens[i].children),Ff.test(n.tokens[i].content)&&Kw(n.tokens[i].children)}}});var Bf=le((F_,qf)=>{"use strict";var zf=Je().isWhiteSpace,Pf=Je().isPunctChar,Rf=Je().isMdAsciiPunct,Vw=/['"]/,Of=/['"]/g,Nf="’";function ha(t,n,i){return t.substr(0,n)+i+t.substr(n+1)}function Yw(t,n){var i,s,u,c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B;for(U=[],i=0;i=0&&!(U[A].level<=p);A--);if(U.length=A+1,s.type!=="text")continue;u=s.content,d=0,h=u.length;e:for(;d=0)y=u.charCodeAt(c.index-1);else for(A=i-1;A>=0&&!(t[A].type==="softbreak"||t[A].type==="hardbreak");A--){if(!t[A].content)continue;y=t[A].content.charCodeAt(t[A].content.length-1);break}if(m=32,d=48&&y<=57&&(z=S=!1)),S&&z&&(S=b,z=w),!S&&!z){R&&(s.content=ha(s.content,c.index,Nf));continue}if(z){for(A=U.length-1;A>=0&&!(g=U[A],U[A].level=0;i--){if(n.tokens[i].type!=="inline"||!Vw.test(n.tokens[i].content))continue;Yw(n.tokens[i].children,n)}}});var fa=le((M_,jf)=>{"use strict";function ri(t,n,i){this.type=t,this.tag=n,this.attrs=null,this.map=null,this.nesting=i,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ri.prototype.attrIndex=function(n){var i,s,u;if(!this.attrs)return-1;for(i=this.attrs,s=0,u=i.length;s=0&&(s=this.attrs[i][1]),s};ri.prototype.attrJoin=function(n,i){var s=this.attrIndex(n);s<0?this.attrPush([n,i]):this.attrs[s][1]=this.attrs[s][1]+" "+i};jf.exports=ri});var Wf=le((q_,Hf)=>{"use strict";var Xw=fa();function Uf(t,n,i){this.src=t,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=n}Uf.prototype.Token=Xw;Hf.exports=Uf});var Gf=le((z_,$f)=>{"use strict";var Zw=da(),ol=[["normalize",Cf()],["block",Ef()],["inline",Af()],["linkify",Lf()],["replacements",Mf()],["smartquotes",Bf()]];function al(){this.ruler=new Zw;for(var t=0;t{"use strict";var Qw=Je().isSpace;function sl(t,n){var i=t.bMarks[n]+t.blkIndent,s=t.eMarks[n];return t.src.substr(i,s-i)}function Vf(t){var n=[],i=0,s=t.length,u,c=0,d=0,h=!1,p=0;for(u=t.charCodeAt(i);is)return!1;if(g=i+1,n.sCount[g]=4)return!1;if(h=n.bMarks[g]+n.tShift[g],h>=n.eMarks[g])return!1;if(c=n.src.charCodeAt(h++),c!==124&&c!==45&&c!==58)return!1;for(;h=4)return!1;if(y=Vf(d.replace(/^\||\|$/g,"")),m=y.length,m>w.length)return!1;if(u)return!0;for(b=n.push("table_open","table",1),b.map=E=[i,0],b=n.push("thead_open","thead",1),b.map=[i,i+1],b=n.push("tr_open","tr",1),b.map=[i,i+1],p=0;p=4)break;for(y=Vf(d.replace(/^\||\|$/g,"")),b=n.push("tr_open","tr",1),p=0;p{"use strict";Xf.exports=function(n,i,s){var u,c,d;if(n.sCount[i]-n.blkIndent<4)return!1;for(c=u=i+1;u=4){u++,c=u;continue}break}return n.line=c,d=n.push("code_block","code",0),d.content=n.getLines(i,c,4+n.blkIndent,!0),d.map=[i,n.line],!0}});var Jf=le((O_,Qf)=>{"use strict";Qf.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b=!1,w=n.bMarks[i]+n.tShift[i],D=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(w+3>D)return!1;if(c=n.src.charCodeAt(w),c!==126&&c!==96)return!1;if(g=w,w=n.skipChars(w,c),d=w-g,d<3)return!1;if(m=n.src.slice(g,w),h=n.src.slice(w,D),c===96&&h.indexOf(String.fromCharCode(c))>=0)return!1;if(u)return!0;for(p=i;!(p++,p>=s);){if(w=g=n.bMarks[p]+n.tShift[p],D=n.eMarks[p],w=4)continue;if(w=n.skipChars(w,c),w-g{"use strict";var tp=Je().isSpace;ep.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B,G,ee,J=n.lineMax,P=n.bMarks[i]+n.tShift[i],Z=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.src.charCodeAt(P++)!==62)return!1;if(u)return!0;for(p=w=n.sCount[i]+1,n.src.charCodeAt(P)===32?(P++,p++,w++,c=!1,U=!0):n.src.charCodeAt(P)===9?(U=!0,(n.bsCount[i]+w)%4===3?(P++,p++,w++,c=!1):c=!0):U=!1,D=[n.bMarks[i]],n.bMarks[i]=P;P=Z,A=[n.sCount[i]],n.sCount[i]=w-p,R=[n.tShift[i]],n.tShift[i]=P-n.bMarks[i],B=n.md.block.ruler.getRules("blockquote"),z=n.parentType,n.parentType="blockquote",b=i+1;b=Z);b++){if(n.src.charCodeAt(P++)===62&&!ee){for(p=w=n.sCount[b]+1,n.src.charCodeAt(P)===32?(P++,p++,w++,c=!1,U=!0):n.src.charCodeAt(P)===9?(U=!0,(n.bsCount[b]+w)%4===3?(P++,p++,w++,c=!1):c=!0):U=!1,D.push(n.bMarks[b]),n.bMarks[b]=P;P=Z,E.push(n.bsCount[b]),n.bsCount[b]=n.sCount[b]+1+(U?1:0),A.push(n.sCount[b]),n.sCount[b]=w-p,R.push(n.tShift[b]),n.tShift[b]=P-n.bMarks[b];continue}if(y)break;for(Y=!1,h=0,g=B.length;h",G.map=m=[i,0],n.md.block.tokenize(n,i,b),G=n.push("blockquote_close","blockquote",-1),G.markup=">",n.lineMax=J,n.parentType=z,m[1]=n.line,h=0;h{"use strict";var Jw=Je().isSpace;rp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(c=n.src.charCodeAt(g++),c!==42&&c!==45&&c!==95)return!1;for(d=1;g{"use strict";var ap=Je().isSpace;function sp(t,n){var i,s,u,c;return s=t.bMarks[n]+t.tShift[n],u=t.eMarks[n],i=t.src.charCodeAt(s++),i!==42&&i!==45&&i!==43||s=c)return-1;if(i=t.src.charCodeAt(u++),i<48||i>57)return-1;for(;;){if(u>=c)return-1;if(i=t.src.charCodeAt(u++),i>=48&&i<=57){if(u-s>=10)return-1;continue}if(i===41||i===46)break;return-1}return u=4)return!1;if(n.listIndent>=0&&n.sCount[i]-n.listIndent>=4&&n.sCount[i]=n.blkIndent&&(I=!0)),(Z=lp(n,i))>=0){if(m=!0,V=n.bMarks[i]+n.tShift[i],z=Number(n.src.substr(V,Z-V-1)),I&&z!==1)return!1}else if((Z=sp(n,i))>=0)m=!1;else return!1;if(I&&n.skipSpaces(Z)>=n.eMarks[i])return!1;if(S=n.src.charCodeAt(Z-1),u)return!0;for(E=n.tokens.length,m?(q=n.push("ordered_list_open","ol",1),z!==1&&(q.attrs=[["start",z]])):q=n.push("bullet_list_open","ul",1),q.map=D=[i,0],q.markup=String.fromCharCode(S),R=i,_=!1,Q=n.md.block.ruler.getRules("list"),B=n.parentType,n.parentType="list";R=A?g=1:g=U-y,g>4&&(g=1),p=y+g,q=n.push("list_item_open","li",1),q.markup=String.fromCharCode(S),q.map=b=[i,0],J=n.tight,ee=n.tShift[i],G=n.sCount[i],Y=n.listIndent,n.listIndent=n.blkIndent,n.blkIndent=p,n.tight=!0,n.tShift[i]=d-n.bMarks[i],n.sCount[i]=U,d>=A&&n.isEmpty(i+1)?n.line=Math.min(n.line+2,s):n.md.block.tokenize(n,i,s,!0),(!n.tight||_)&&(H=!1),_=n.line-i>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=Y,n.tShift[i]=ee,n.sCount[i]=G,n.tight=J,q=n.push("list_item_close","li",-1),q.markup=String.fromCharCode(S),R=i=n.line,b[1]=R,d=n.bMarks[i],R>=s)break;if(n.sCount[R]=4)break;for(j=!1,h=0,w=Q.length;h{"use strict";var tk=Je().normalizeReference,pa=Je().isSpace;cp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y=0,B=n.bMarks[i]+n.tShift[i],G=n.eMarks[i],ee=i+1;if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.src.charCodeAt(B)!==91)return!1;for(;++B3)continue;if(n.sCount[ee]<0)continue;for(A=!1,y=0,m=R.length;y{"use strict";var fp=Je().isSpace;hp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(c=n.src.charCodeAt(g),c!==35||g>=y)return!1;for(d=1,c=n.src.charCodeAt(++g);c===35&&g6||gg&&fp(n.src.charCodeAt(h-1))&&(y=h),n.line=i+1,p=n.push("heading_open","h"+String(d),1),p.markup="########".slice(0,d),p.map=[i,n.line],p=n.push("inline","",0),p.content=n.src.slice(g,y).trim(),p.map=[i,n.line],p.children=[],p=n.push("heading_close","h"+String(d),-1),p.markup="########".slice(0,d)),!0)}});var gp=le((W_,mp)=>{"use strict";mp.exports=function(n,i,s){var u,c,d,h,p,g,y,m,b,w=i+1,D,E=n.md.block.ruler.getRules("paragraph");if(n.sCount[i]-n.blkIndent>=4)return!1;for(D=n.parentType,n.parentType="paragraph";w3)continue;if(n.sCount[w]>=n.blkIndent&&(g=n.bMarks[w]+n.tShift[w],y=n.eMarks[w],g=y)))){m=b===61?1:2;break}if(n.sCount[w]<0)continue;for(c=!1,d=0,h=E.length;d{"use strict";vp.exports=["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","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var ul=le((G_,ll)=>{"use strict";var nk="[a-zA-Z_:][a-zA-Z0-9:._-]*",rk="[^\"'=<>`\\x00-\\x20]+",ik="'[^']*'",ok='"[^"]*"',ak="(?:"+rk+"|"+ik+"|"+ok+")",sk="(?:\\s+"+nk+"(?:\\s*=\\s*"+ak+")?)",yp="<[A-Za-z][A-Za-z0-9\\-]*"+sk+"*\\s*\\/?>",wp="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",lk="|",uk="<[?].*?[?]>",ck="]*>",dk="",hk=new RegExp("^(?:"+yp+"|"+wp+"|"+lk+"|"+uk+"|"+ck+"|"+dk+")"),fk=new RegExp("^(?:"+yp+"|"+wp+")");ll.exports.HTML_TAG_RE=hk;ll.exports.HTML_OPEN_CLOSE_TAG_RE=fk});var xp=le((K_,kp)=>{"use strict";var pk=bp(),mk=ul().HTML_OPEN_CLOSE_TAG_RE,ii=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(mk.source+"\\s*$"),/^$/,!1]];kp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(!n.md.options.html)return!1;if(n.src.charCodeAt(g)!==60)return!1;for(p=n.src.slice(g,y),c=0;c{"use strict";_p.exports=function(n,i){var s,u,c,d,h,p,g=i+1,y=n.md.block.ruler.getRules("paragraph"),m=n.lineMax;for(p=n.parentType,n.parentType="paragraph";g3)continue;if(n.sCount[g]<0)continue;for(u=!1,c=0,d=y.length;c{"use strict";var Ep=fa(),ma=Je().isSpace;function Pn(t,n,i,s){var u,c,d,h,p,g,y,m;for(this.src=t,this.md=n,this.env=i,this.tokens=s,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",c=this.src,m=!1,d=h=g=y=0,p=c.length;h0&&this.level++,this.tokens.push(s),s};Pn.prototype.isEmpty=function(n){return this.bMarks[n]+this.tShift[n]>=this.eMarks[n]};Pn.prototype.skipEmptyLines=function(n){for(var i=this.lineMax;ni;)if(!ma(this.src.charCodeAt(--n)))return n+1;return n};Pn.prototype.skipChars=function(n,i){for(var s=this.src.length;ns;)if(i!==this.src.charCodeAt(--n))return n+1;return n};Pn.prototype.getLines=function(n,i,s,u){var c,d,h,p,g,y,m,b=n;if(n>=i)return"";for(y=new Array(i-n),c=0;bs?y[c]=new Array(d-s+1).join(" ")+this.src.slice(p,g):y[c]=this.src.slice(p,g)}return y.join("")};Pn.prototype.Token=Ep;Sp.exports=Pn});var Tp=le((X_,Ap)=>{"use strict";var gk=da(),ga=[["table",Yf(),["paragraph","reference"]],["code",Zf()],["fence",Jf(),["paragraph","reference","blockquote","list"]],["blockquote",np(),["paragraph","reference","blockquote","list"]],["hr",ip(),["paragraph","reference","blockquote","list"]],["list",up(),["paragraph","reference","blockquote"]],["reference",dp()],["heading",pp(),["paragraph","reference","blockquote"]],["lheading",gp()],["html_block",xp(),["paragraph","reference","blockquote"]],["paragraph",Cp()]];function va(){this.ruler=new gk;for(var t=0;t=i);){if(t.sCount[h]=g){t.line=i;break}for(u=0;u{"use strict";function vk(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}Lp.exports=function(n,i){for(var s=n.pos;s{"use strict";var bk=Je().isSpace;Fp.exports=function(n,i){var s,u,c=n.pos;if(n.src.charCodeAt(c)!==10)return!1;for(s=n.pending.length-1,u=n.posMax,i||(s>=0&&n.pending.charCodeAt(s)===32?s>=1&&n.pending.charCodeAt(s-1)===32?(n.pending=n.pending.replace(/ +$/,""),n.push("hardbreak","br",0)):(n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0)):n.push("softbreak","br",0)),c++;c{"use strict";var yk=Je().isSpace,cl=[];for(var zp=0;zp<256;zp++)cl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){cl[t.charCodeAt(0)]=1});qp.exports=function(n,i){var s,u=n.pos,c=n.posMax;if(n.src.charCodeAt(u)!==92)return!1;if(u++,u{"use strict";Rp.exports=function(n,i){var s,u,c,d,h,p,g=n.pos,y=n.src.charCodeAt(g);if(y!==96)return!1;for(s=g,g++,u=n.posMax;g{"use strict";dl.exports.tokenize=function(n,i){var s,u,c,d,h,p=n.pos,g=n.src.charCodeAt(p);if(i)return!1;if(g!==126)return!1;if(u=n.scanDelims(n.pos,!0),d=u.length,h=String.fromCharCode(g),d<2)return!1;for(d%2&&(c=n.push("text","",0),c.content=h,d--),s=0;s{"use strict";fl.exports.tokenize=function(n,i){var s,u,c,d=n.pos,h=n.src.charCodeAt(d);if(i)return!1;if(h!==95&&h!==42)return!1;for(u=n.scanDelims(n.pos,h===42),s=0;s=0;i--){if(s=n[i],s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;u=n[s.end],h=i>0&&n[i-1].end===s.end+1&&n[i-1].token===s.token-1&&n[s.end+1].token===u.token+1&&n[i-1].marker===s.marker,d=String.fromCharCode(s.marker),c=t.tokens[s.token],c.type=h?"strong_open":"em_open",c.tag=h?"strong":"em",c.nesting=1,c.markup=h?d+d:d,c.content="",c=t.tokens[u.token],c.type=h?"strong_close":"em_close",c.tag=h?"strong":"em",c.nesting=-1,c.markup=h?d+d:d,c.content="",h&&(t.tokens[n[i-1].token].content="",t.tokens[n[s.end+1].token].content="",i--)}}fl.exports.postProcess=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(Bp(n,n.delimiters),i=0;i{"use strict";var wk=Je().normalizeReference,ml=Je().isSpace;jp.exports=function(n,i){var s,u,c,d,h,p,g,y,m,b,w="",D=n.pos,E=n.posMax,S=n.pos,z=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;if(h=n.pos+1,d=n.md.helpers.parseLinkLabel(n,n.pos,!0),d<0)return!1;if(p=d+1,p=E)return!1;for(S=p,g=n.md.helpers.parseLinkDestination(n.src,p,n.posMax),g.ok&&(w=n.md.normalizeLink(g.str),n.md.validateLink(w)?p=g.pos:w=""),S=p;p=E||n.src.charCodeAt(p)!==41)&&(z=!0),p++}if(z){if(typeof n.env.references=="undefined")return!1;if(p=0?c=n.src.slice(S,p++):p=d+1):p=d+1,c||(c=n.src.slice(h,d)),y=n.env.references[wk(c)],!y)return n.pos=D,!1;w=y.href,m=y.title}return i||(n.pos=h,n.posMax=d,b=n.push("link_open","a",1),b.attrs=s=[["href",w]],m&&s.push(["title",m]),n.md.inline.tokenize(n),b=n.push("link_close","a",-1)),n.pos=p,n.posMax=E,!0}});var Wp=le((i2,Up)=>{"use strict";var kk=Je().normalizeReference,gl=Je().isSpace;Up.exports=function(n,i){var s,u,c,d,h,p,g,y,m,b,w,D,E,S="",z=n.pos,A=n.posMax;if(n.src.charCodeAt(n.pos)!==33)return!1;if(n.src.charCodeAt(n.pos+1)!==91)return!1;if(p=n.pos+2,h=n.md.helpers.parseLinkLabel(n,n.pos+1,!1),h<0)return!1;if(g=h+1,g=A)return!1;for(E=g,m=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),m.ok&&(S=n.md.normalizeLink(m.str),n.md.validateLink(S)?g=m.pos:S=""),E=g;g=A||n.src.charCodeAt(g)!==41)return n.pos=z,!1;g++}else{if(typeof n.env.references=="undefined")return!1;if(g=0?d=n.src.slice(E,g++):g=h+1):g=h+1,d||(d=n.src.slice(p,h)),y=n.env.references[kk(d)],!y)return n.pos=z,!1;S=y.href,b=y.title}return i||(c=n.src.slice(p,h),n.md.inline.parse(c,n.md,n.env,D=[]),w=n.push("image","img",0),w.attrs=s=[["src",S],["alt",""]],w.children=D,w.content=c,b&&s.push(["title",b])),n.pos=g,n.posMax=A,!0}});var Vp=le((o2,$p)=>{"use strict";var Gp=/^<([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])?)*)>/,Kp=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;$p.exports=function(n,i){var s,u,c,d,h,p,g=n.pos;return n.src.charCodeAt(g)!==60?!1:(s=n.src.slice(g),s.indexOf(">")<0?!1:Kp.test(s)?(u=s.match(Kp),d=u[0].slice(1,-1),h=n.md.normalizeLink(d),n.md.validateLink(h)?(i||(p=n.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=n.push("text","",0),p.content=n.md.normalizeLinkText(d),p=n.push("link_close","a",-1),p.markup="autolink",p.info="auto"),n.pos+=u[0].length,!0):!1):Gp.test(s)?(c=s.match(Gp),d=c[0].slice(1,-1),h=n.md.normalizeLink("mailto:"+d),n.md.validateLink(h)?(i||(p=n.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=n.push("text","",0),p.content=n.md.normalizeLinkText(d),p=n.push("link_close","a",-1),p.markup="autolink",p.info="auto"),n.pos+=c[0].length,!0):!1):!1)}});var Xp=le((a2,Yp)=>{"use strict";var xk=ul().HTML_TAG_RE;function _k(t){var n=t|32;return n>=97&&n<=122}Yp.exports=function(n,i){var s,u,c,d,h=n.pos;return n.md.options.html?(c=n.posMax,n.src.charCodeAt(h)!==60||h+2>=c?!1:(s=n.src.charCodeAt(h+1),s!==33&&s!==63&&s!==47&&!_k(s)?!1:(u=n.src.slice(h).match(xk),u?(i||(d=n.push("html_inline","",0),d.content=n.src.slice(h,h+u[0].length)),n.pos+=u[0].length,!0):!1))):!1}});var em=le((s2,Zp)=>{"use strict";var Qp=el(),Ck=Je().has,Sk=Je().isValidEntityCode,Jp=Je().fromCodePoint,Ek=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Dk=/^&([a-z][a-z0-9]{1,31});/i;Zp.exports=function(n,i){var s,u,c,d=n.pos,h=n.posMax;if(n.src.charCodeAt(d)!==38)return!1;if(d+1{"use strict";function nm(t,n){var i,s,u,c,d,h,p,g,y={},m=n.length;for(i=0;id;s-=c.jump+1){if(c=n[s],c.marker!==u.marker)continue;if(h===-1&&(h=s),c.open&&c.end<0&&(p=!1,(c.close||u.open)&&((c.length+u.length)%3===0&&((c.length%3!==0||u.length%3!==0)&&(p=!0))),!p)){g=s>0&&!n[s-1].open?n[s-1].jump+1:0,u.jump=i-s+g,u.open=!1,c.end=i,c.jump=g,c.close=!1,h=-1;break}}h!==-1&&(y[u.marker][(u.length||0)%3]=h)}}tm.exports=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(nm(n,n.delimiters),i=0;i{"use strict";im.exports=function(n){var i,s,u=0,c=n.tokens,d=n.tokens.length;for(i=s=0;i0&&u++,c[i].type==="text"&&i+1{"use strict";var vl=fa(),sm=Je().isWhiteSpace,lm=Je().isPunctChar,um=Je().isMdAsciiPunct;function Zi(t,n,i,s){this.src=t,this.env=i,this.md=n,this.tokens=s,this.tokens_meta=Array(s.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}Zi.prototype.pushPending=function(){var t=new vl("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t};Zi.prototype.push=function(t,n,i){this.pending&&this.pushPending();var s=new vl(t,n,i),u=null;return i<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),s.level=this.level,i>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],u={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(s),this.tokens_meta.push(u),s};Zi.prototype.scanDelims=function(t,n){var i=t,s,u,c,d,h,p,g,y,m,b=!0,w=!0,D=this.posMax,E=this.src.charCodeAt(t);for(s=t>0?this.src.charCodeAt(t-1):32;i{"use strict";var hm=da(),bl=[["text",Ip()],["newline",Mp()],["escape",Pp()],["backticks",Op()],["strikethrough",hl().tokenize],["emphasis",pl().tokenize],["link",Hp()],["image",Wp()],["autolink",Vp()],["html_inline",Xp()],["entity",em()]],yl=[["balance_pairs",rm()],["strikethrough",hl().postProcess],["emphasis",pl().postProcess],["text_collapse",om()]];function Qi(){var t;for(this.ruler=new hm,t=0;t=c)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};Qi.prototype.parse=function(t,n,i,s){var u,c,d,h=new this.State(t,n,i,s);for(this.tokenize(h),c=this.ruler2.getRules(""),d=c.length,u=0;u{"use strict";pm.exports=function(t){var n={};n.src_Any=nl().source,n.src_Cc=rl().source,n.src_Z=il().source,n.src_P=aa().source,n.src_ZPCc=[n.src_Z,n.src_P,n.src_Cc].join("|"),n.src_ZCc=[n.src_Z,n.src_Cc].join("|");var i="[><|]";return n.src_pseudo_letter="(?:(?!"+i+"|"+n.src_ZPCc+")"+n.src_Any+")",n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n.src_auth="(?:(?:(?!"+n.src_ZCc+"|[@/\\[\\]()]).)+@)?",n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",n.src_host_terminator="(?=$|"+i+"|"+n.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+n.src_ZPCc+"))",n.src_path="(?:[/?#](?:(?!"+n.src_ZCc+"|"+i+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+n.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+n.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+n.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+n.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+n.src_ZCc+"|[']).)+\\'|\\'(?="+n.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+n.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+n.src_ZCc+").|\\!+(?!"+n.src_ZCc+"|[!]).|\\?(?!"+n.src_ZCc+"|[?]).)+|\\/)?",n.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',n.src_xn="xn--[a-z0-9\\-]{1,59}",n.src_domain_root="(?:"+n.src_xn+"|"+n.src_pseudo_letter+"{1,63})",n.src_domain="(?:"+n.src_xn+"|(?:"+n.src_pseudo_letter+")|(?:"+n.src_pseudo_letter+"(?:-|"+n.src_pseudo_letter+"){0,61}"+n.src_pseudo_letter+"))",n.src_host="(?:(?:(?:(?:"+n.src_domain+")\\.)*"+n.src_domain+"))",n.tpl_host_fuzzy="(?:"+n.src_ip4+"|(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%)))",n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%))",n.src_host_strict=n.src_host+n.src_host_terminator,n.tpl_host_fuzzy_strict=n.tpl_host_fuzzy+n.src_host_terminator,n.src_host_port_strict=n.src_host+n.src_port+n.src_host_terminator,n.tpl_host_port_fuzzy_strict=n.tpl_host_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_port_no_ip_fuzzy_strict=n.tpl_host_no_ip_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+n.src_ZPCc+"|>|$))",n.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+n.src_ZCc+")("+n.src_email_name+"@"+n.tpl_host_fuzzy_strict+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_fuzzy_strict+n.src_path+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_no_ip_fuzzy_strict+n.src_path+")",n}});var km=le((f2,gm)=>{"use strict";function wl(t){var n=Array.prototype.slice.call(arguments,1);return n.forEach(function(i){if(!i)return;Object.keys(i).forEach(function(s){t[s]=i[s]})}),t}function ba(t){return Object.prototype.toString.call(t)}function Ak(t){return ba(t)==="[object String]"}function Tk(t){return ba(t)==="[object Object]"}function Lk(t){return ba(t)==="[object RegExp]"}function vm(t){return ba(t)==="[object Function]"}function Ik(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var bm={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Fk(t){return Object.keys(t||{}).reduce(function(n,i){return n||bm.hasOwnProperty(i)},!1)}var Mk={"http:":{validate:function(t,n,i){var s=t.slice(n);return i.re.http||(i.re.http=new RegExp("^\\/\\/"+i.re.src_auth+i.re.src_host_port_strict+i.re.src_path,"i")),i.re.http.test(s)?s.match(i.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,n,i){var s=t.slice(n);return i.re.no_http||(i.re.no_http=new RegExp("^"+i.re.src_auth+"(?:localhost|(?:(?:"+i.re.src_domain+")\\.)+"+i.re.src_domain_root+")"+i.re.src_port+i.re.src_host_terminator+i.re.src_path,"i")),i.re.no_http.test(s)?n>=3&&t[n-3]===":"||n>=3&&t[n-3]==="/"?0:s.match(i.re.no_http)[0].length:0}},"mailto:":{validate:function(t,n,i){var s=t.slice(n);return i.re.mailto||(i.re.mailto=new RegExp("^"+i.re.src_email_name+"@"+i.re.src_host_strict,"i")),i.re.mailto.test(s)?s.match(i.re.mailto)[0].length:0}}},qk="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",zk="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Pk(t){t.__index__=-1,t.__text_cache__=""}function Rk(t){return function(n,i){var s=n.slice(i);return t.test(s)?s.match(t)[0].length:0}}function ym(){return function(t,n){n.normalize(t)}}function ya(t){var n=t.re=mm()(t.__opts__),i=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||i.push(qk),i.push(n.src_xn),n.src_tlds=i.join("|");function s(h){return h.replace("%TLDS%",n.src_tlds)}n.email_fuzzy=RegExp(s(n.tpl_email_fuzzy),"i"),n.link_fuzzy=RegExp(s(n.tpl_link_fuzzy),"i"),n.link_no_ip_fuzzy=RegExp(s(n.tpl_link_no_ip_fuzzy),"i"),n.host_fuzzy_test=RegExp(s(n.tpl_host_fuzzy_test),"i");var u=[];t.__compiled__={};function c(h,p){throw new Error('(LinkifyIt) Invalid schema "'+h+'": '+p)}Object.keys(t.__schemas__).forEach(function(h){var p=t.__schemas__[h];if(p===null)return;var g={validate:null,link:null};if(t.__compiled__[h]=g,Tk(p)){Lk(p.validate)?g.validate=Rk(p.validate):vm(p.validate)?g.validate=p.validate:c(h,p),vm(p.normalize)?g.normalize=p.normalize:p.normalize?c(h,p):g.normalize=ym();return}if(Ak(p)){u.push(h);return}c(h,p)}),u.forEach(function(h){if(!t.__compiled__[t.__schemas__[h]])return;t.__compiled__[h].validate=t.__compiled__[t.__schemas__[h]].validate,t.__compiled__[h].normalize=t.__compiled__[t.__schemas__[h]].normalize}),t.__compiled__[""]={validate:null,normalize:ym()};var d=Object.keys(t.__compiled__).filter(function(h){return h.length>0&&t.__compiled__[h]}).map(Ik).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+n.src_ZPCc+"))("+d+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+n.src_ZPCc+"))("+d+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),Pk(t)}function Ok(t,n){var i=t.__index__,s=t.__last_index__,u=t.__text_cache__.slice(i,s);this.schema=t.__schema__.toLowerCase(),this.index=i+n,this.lastIndex=s+n,this.raw=u,this.text=u,this.url=u}function wm(t,n){var i=new Ok(t,n);return t.__compiled__[i.schema].normalize(i,t),i}function mn(t,n){if(!(this instanceof mn))return new mn(t,n);n||Fk(t)&&(n=t,t={}),this.__opts__=wl({},bm,n),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=wl({},Mk,t),this.__compiled__={},this.__tlds__=zk,this.__tlds_replaced__=!1,this.re={},ya(this)}mn.prototype.add=function(n,i){return this.__schemas__[n]=i,ya(this),this};mn.prototype.set=function(n){return this.__opts__=wl(this.__opts__,n),this};mn.prototype.test=function(n){if(this.__text_cache__=n,this.__index__=-1,!n.length)return!1;var i,s,u,c,d,h,p,g,y;if(this.re.schema_test.test(n)){for(p=this.re.schema_search,p.lastIndex=0;(i=p.exec(n))!==null;)if(c=this.testSchemaAt(n,i[2],p.lastIndex),c){this.__schema__=i[2],this.__index__=i.index+i[1].length,this.__last_index__=i.index+i[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(g=n.search(this.re.host_fuzzy_test),g>=0&&((this.__index__<0||g=0&&((u=n.match(this.re.email_fuzzy))!==null&&(d=u.index+u[1].length,h=u.index+u[0].length,(this.__index__<0||dthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=d,this.__last_index__=h)))),this.__index__>=0};mn.prototype.pretest=function(n){return this.re.pretest.test(n)};mn.prototype.testSchemaAt=function(n,i,s){return this.__compiled__[i.toLowerCase()]?this.__compiled__[i.toLowerCase()].validate(n,s,this):0};mn.prototype.match=function(n){var i=0,s=[];this.__index__>=0&&this.__text_cache__===n&&(s.push(wm(this,i)),i=this.__last_index__);for(var u=i?n.slice(i):n;this.test(u);)s.push(wm(this,i)),u=u.slice(this.__last_index__),i+=this.__last_index__;return s.length?s:null};mn.prototype.tlds=function(n,i){return n=Array.isArray(n)?n:[n],i?(this.__tlds__=this.__tlds__.concat(n).sort().filter(function(s,u,c){return s!==c[u-1]}).reverse(),ya(this),this):(this.__tlds__=n.slice(),this.__tlds_replaced__=!0,ya(this),this)};mn.prototype.normalize=function(n){n.schema||(n.url="http://"+n.url),n.schema==="mailto:"&&!/^mailto:/i.test(n.url)&&(n.url="mailto:"+n.url)};mn.prototype.onCompile=function(){};gm.exports=mn});var Im=le(Nk=>{Ny(Nk,{decode:()=>Sl,default:()=>Yk,encode:()=>El,toASCII:()=>Lm,toUnicode:()=>Tm,ucs2decode:()=>Cl,ucs2encode:()=>Em});"use strict";const oi=2147483647,Rn=36,kl=1,Ji=26,Bk=38,jk=700,xm=72,_m=128,Cm="-",Hk=/^xn--/,Uk=/[^\0-\x7E]/,Wk=/[\x2E\u3002\uFF0E\uFF61]/g,$k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xl=Rn-kl,On=Math.floor,_l=String.fromCharCode;function Sr(t){throw new RangeError($k[t])}function Gk(t,n){const i=[];let s=t.length;for(;s--;)i[s]=n(t[s]);return i}function Sm(t,n){const i=t.split("@");let s="";i.length>1&&(s=i[0]+"@",t=i[1]),t=t.replace(Wk,".");const u=t.split("."),c=Gk(u,n).join(".");return s+c}function Cl(t){const n=[];let i=0;const s=t.length;for(;i=55296&&u<=56319&&iString.fromCodePoint(...t),Kk=function(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:Rn},Dm=function(t,n){return t+22+75*(t<26)-((n!=0)<<5)},Am=function(t,n,i){let s=0;for(t=i?On(t/jk):t>>1,t+=On(t/n);t>xl*Ji>>1;s+=Rn)t=On(t/xl);return On(s+(xl+1)*t/(t+Bk))},Sl=function(t){const n=[],i=t.length;let s=0,u=_m,c=xm,d=t.lastIndexOf(Cm);d<0&&(d=0);for(let h=0;h=128&&Sr("not-basic"),n.push(t.charCodeAt(h));for(let h=d>0?d+1:0;h=i&&Sr("invalid-input");const b=Kk(t.charCodeAt(h++));(b>=Rn||b>On((oi-s)/y))&&Sr("overflow"),s+=b*y;const w=m<=c?kl:m>=c+Ji?Ji:m-c;if(bOn(oi/D)&&Sr("overflow"),y*=D}const g=n.length+1;c=Am(s-p,g,p==0),On(s/g)>oi-u&&Sr("overflow"),u+=On(s/g),s%=g,n.splice(s++,0,u)}return String.fromCodePoint(...n)},El=function(t){const n=[];t=Cl(t);let i=t.length,s=_m,u=0,c=xm;for(const p of t)p<128&&n.push(_l(p));let d=n.length,h=d;for(d&&n.push(Cm);h=s&&yOn((oi-u)/g)&&Sr("overflow"),u+=(p-s)*g,s=p;for(const y of t)if(yoi&&Sr("overflow"),y==s){let m=u;for(let b=Rn;;b+=Rn){const w=b<=c?kl:b>=c+Ji?Ji:b-c;if(m{"use strict";Fm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}});var zm=le((g2,qm)=>{"use strict";qm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}});var Rm=le((v2,Pm)=>{"use strict";Pm.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}});var jm=le((b2,Om)=>{"use strict";var eo=Je(),Xk=yf(),Zk=kf(),Qk=Gf(),Jk=Tp(),e0=fm(),t0=km(),ai=tl(),Nm=Im(),n0={default:Mm(),zero:zm(),commonmark:Rm()},r0=/^(vbscript|javascript|file|data):/,i0=/^data:image\/(gif|png|jpeg|webp);/;function o0(t){var n=t.trim().toLowerCase();return r0.test(n)?!!i0.test(n):!0}var Bm=["http:","https:","mailto:"];function a0(t){var n=ai.parse(t,!0);if(n.hostname&&(!n.protocol||Bm.indexOf(n.protocol)>=0))try{n.hostname=Nm.toASCII(n.hostname)}catch(i){}return ai.encode(ai.format(n))}function s0(t){var n=ai.parse(t,!0);if(n.hostname&&(!n.protocol||Bm.indexOf(n.protocol)>=0))try{n.hostname=Nm.toUnicode(n.hostname)}catch(i){}return ai.decode(ai.format(n))}function gn(t,n){if(!(this instanceof gn))return new gn(t,n);n||(eo.isString(t)||(n=t||{},t="default")),this.inline=new e0,this.block=new Jk,this.core=new Qk,this.renderer=new Zk,this.linkify=new t0,this.validateLink=o0,this.normalizeLink=a0,this.normalizeLinkText=s0,this.utils=eo,this.helpers=eo.assign({},Xk),this.options={},this.configure(t),n&&this.set(n)}gn.prototype.set=function(t){return eo.assign(this.options,t),this};gn.prototype.configure=function(t){var n=this,i;if(eo.isString(t)&&(i=t,t=n0[i],!t))throw new Error('Wrong `markdown-it` preset "'+i+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach(function(s){t.components[s].rules&&n[s].ruler.enableOnly(t.components[s].rules),t.components[s].rules2&&n[s].ruler2.enableOnly(t.components[s].rules2)}),this};gn.prototype.enable=function(t,n){var i=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(u){i=i.concat(this[u].ruler.enable(t,!0))},this),i=i.concat(this.inline.ruler2.enable(t,!0));var s=t.filter(function(u){return i.indexOf(u)<0});if(s.length&&!n)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+s);return this};gn.prototype.disable=function(t,n){var i=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(u){i=i.concat(this[u].ruler.disable(t,!0))},this),i=i.concat(this.inline.ruler2.disable(t,!0));var s=t.filter(function(u){return i.indexOf(u)<0});if(s.length&&!n)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+s);return this};gn.prototype.use=function(t){var n=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,n),this};gn.prototype.parse=function(t,n){if(typeof t!="string")throw new Error("Input data should be a String");var i=new this.core.State(t,this,n);return this.core.process(i),i.tokens};gn.prototype.render=function(t,n){return n=n||{},this.renderer.render(this.parse(t,n),this.options,n)};gn.prototype.parseInline=function(t,n){var i=new this.core.State(t,this,n);return i.inlineMode=!0,this.core.process(i),i.tokens};gn.prototype.renderInline=function(t,n){return n=n||{},this.renderer.render(this.parseInline(t,n),this.options,n)};Om.exports=gn});var Um=le((y2,Hm)=>{"use strict";Hm.exports=jm()});var Vm=le((w2,Wm)=>{var Dl=!0,$m=!1,Gm=!1;Wm.exports=function(t,n){n&&(Dl=!n.enabled,$m=!!n.label,Gm=!!n.labelAfter),t.core.ruler.after("inline","github-task-lists",function(i){for(var s=i.tokens,u=2;u=0;s--)if(t[s].level===i)return s;return-1}function u0(t,n){return d0(t[n])&&h0(t[n-1])&&f0(t[n-2])&&p0(t[n])}function c0(t,n){if(t.children.unshift(m0(t,n)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),$m)if(Gm){t.children.pop();var i="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+i+'">',t.children.push(b0(t.content,i,n))}else t.children.unshift(g0(n)),t.children.push(v0(n))}function m0(t,n){var i=new n("html_inline","",0),s=Dl?' disabled="" ':"";return t.content.indexOf("[ ] ")===0?i.content='':(t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0)&&(i.content=''),i}function g0(t){var n=new t("html_inline","",0);return n.content="",n}function b0(t,n,i){var s=new i("html_inline","",0);return s.content='",s.attrs=[{for:n}],s}function d0(t){return t.type==="inline"}function h0(t){return t.type==="paragraph_open"}function f0(t){return t.type==="list_item_open"}function p0(t){return t.content.indexOf("[ ] ")===0||t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0}});const to={},y0=[];function wa(t,n){if(y0.push({name:t,data:n}),typeof to[t]=="undefined")return this;let i=to[t];for(let s=0;swa("success",t),error:t=>wa("error",t),showValidationErrors:x0};async function _0(t,n={}){return Xm(t,{method:"GET",params:n})}async function C0(t,n=null){return ka("POST",t,n)}async function S0(t,n=null){return ka("PUT",t,n)}async function E0(t,n=null){return ka("PATCH",t,n)}async function D0(t,n=null){return ka("DELETE",t,n)}async function ka(t,n,i=null){const s={method:t,body:i};return typeof i=="object"&&!(i instanceof FormData)&&(s.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},s.body=JSON.stringify(i)),i instanceof FormData&&t!=="post"&&(i.append("_method",t),s.method="post"),Xm(n,s)}async function Xm(t,n={}){if(t.startsWith("http")||(t=window.baseUrl(t)),n.params){const d=new URL(t);for(let h of Object.keys(n.params)){const p=n.params[h];typeof p!="undefined"&&p!==null&&d.searchParams.set(h,p)}t=d.toString()}const i=document.querySelector("meta[name=token]").getAttribute("content");n=Object.assign({},n,{credentials:"same-origin"}),n.headers=Object.assign({},n.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":i});const s=await fetch(t,n),u=await A0(s),c={data:u,headers:s.headers,redirected:s.redirected,status:s.status,statusText:s.statusText,url:s.url,original:s};if(!s.ok)throw c;return c}async function A0(t){if(t.status===204)return null;const n=t.headers.get("Content-Type"),i=n.split("/").pop();return i==="javascript"||i==="json"?await t.json():await t.text()}var Zm={get:_0,post:C0,put:S0,patch:E0,delete:D0};class T0{constructor(t){this.store=new Map,this.parseTranslations()}parseTranslations(){const t=document.querySelectorAll('meta[name="translation"]');for(let n of t){const i=n.getAttribute("key"),s=n.getAttribute("value");this.store.set(i,s)}}get(t,n){const i=this.getTransText(t);return this.performReplacements(i,n)}getPlural(t,n,i){const s=this.getTransText(t);return this.parsePlural(s,n,i)}parsePlural(t,n,i){const s=t.split("|"),u=/^{([0-9]+)}/,c=/^\[([0-9]+),([0-9*]+)]/;let d=null;for(let h of s){const p=h.match(u);if(p!==null&&Number(p[1])===n){d=h.replace(u,"").trim();break}const g=h.match(c);if(g!==null){const y=Number(g[1]);if(y<=n&&(g[2]==="*"||Number(g[2])>=n)){d=h.replace(c,"").trim();break}}}return d===null&&s.length>1&&(d=n===1?s[0]:s[1]),d===null&&(d=s[0]),this.performReplacements(d,i)}getTransText(t){const n=this.store.get(t);return n===void 0&&console.warn(`Translation with key "${t}" does not exist`),n}performReplacements(t,n){if(!n)return t;const i=t.match(/:([\S]+)/g);return i===null||i.forEach(s=>{const u=s.substring(1);if(typeof n[u]=="undefined")return;t=t.replace(s,n[u])}),t}}var Qm=T0;function xa(t,n){const i=document.querySelectorAll(t);for(let s of i)n(s)}function _a(t,n,i){for(let s of n)t.addEventListener(s,i)}function it(t,n){Array.isArray(t)||(t=[t]);for(const i of t)i.addEventListener("click",n),i.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(s))})}function Ca(t,n){Array.isArray(t)||(t=[t]);const i=s=>{s.key==="Enter"&&n(s)};t.forEach(s=>s.addEventListener("keypress",i))}function zt(t,n,i,s){t.addEventListener(i,function(u){const c=u.target.closest(n);c&&s.call(c,u,c)})}function Jm(t,n){const i=document.querySelectorAll(t);n=n.toLowerCase();for(let s of i)if(s.textContent.toLowerCase().includes(n))return s;return null}function no(t){t.innerHTML='
    '}function eg(t){const n=t.querySelectorAll(".loading-container");for(const i of n)i.remove()}function tg(t,n,i){let s;return function(){const u=this,c=arguments,d=function(){s=null,i||t.apply(u,c)},h=i&&!s;clearTimeout(s),s=setTimeout(d,n),h&&t.apply(u,c)}}function ro(t){if(!t)return;t.scrollIntoView({behavior:"smooth"});const n=document.getElementById("custom-styles").getAttribute("data-color-light"),i=window.getComputedStyle(t).getPropertyValue("background-color");t.style.backgroundColor=n,setTimeout(()=>{t.classList.add("selectFade"),t.style.backgroundColor=i},10),setTimeout(()=>{t.classList.remove("selectFade"),t.style.backgroundColor=""},3e3)}function ng(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function rg(){const t=()=>((1+Math.random())*65536|0).toString(16).substring(1);return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}class L0{setup(){this.modelRow=this.$refs.model,this.addButton=this.$refs.add,this.removeSelector=this.$opts.removeSelector,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.addButton.addEventListener("click",this.add.bind(this)),zt(this.$el,this.removeSelector,"click",t=>{const n=t.target.closest(this.rowSelector);n.remove()})}add(){const t=this.modelRow.cloneNode(!0);t.classList.remove("hidden"),this.setClonedInputNames(t),this.modelRow.parentNode.insertBefore(t,this.modelRow),window.components.init(t)}setClonedInputNames(t){const n=rg(),i=t.querySelectorAll('[name*="randrowid"]');for(const s of i)s.name=s.name.split("randrowid").join(n)}}var ig=L0;class I0{setup(){this.row=this.$el,this.url=this.$opts.url,this.deleteButtons=this.$manyRefs.delete,it(this.deleteButtons,this.runDelete.bind(this))}runDelete(){this.row.style.opacity="0.7",this.row.style.pointerEvents="none",window.$http.delete(this.url).then(t=>{typeof t.data=="object"&&t.data.message&&window.$events.emit("success",t.data.message),this.row.remove()}).catch(t=>{this.row.style.opacity=null,this.row.style.pointerEvents=null})}}var og=I0;class F0{setup(){this.container=this.$el,this.responseContainer=this.container,this.url=this.$opts.url,this.method=this.$opts.method||"post",this.successMessage=this.$opts.successMessage,this.submitButtons=this.$manyRefs.submit||[],this.$opts.responseContainer&&(this.responseContainer=this.container.closest(this.$opts.responseContainer)),this.setupListeners()}setupListeners(){if(this.container.tagName==="FORM"){this.container.addEventListener("submit",this.submitRealForm.bind(this));return}Ca(this.container,t=>{this.submitFakeForm(),t.preventDefault()}),this.submitButtons.forEach(t=>it(t,this.submitFakeForm.bind(this)))}submitFakeForm(){const t=new FormData,n=this.container.querySelectorAll("[name]");for(const i of n)t.append(i.getAttribute("name"),i.value);this.submit(t)}submitRealForm(t){t.preventDefault();const n=new FormData(this.container);this.submit(n)}async submit(t){this.responseContainer.style.opacity="0.7",this.responseContainer.style.pointerEvents="none";try{const n=await window.$http[this.method.toLowerCase()](this.url,t);this.$emit("success",{formData:t}),this.responseContainer.innerHTML=n.data,this.successMessage&&window.$events.emit("success",this.successMessage)}catch(n){this.responseContainer.innerHTML=n.data}window.components.init(this.responseContainer),this.responseContainer.style.opacity=null,this.responseContainer.style.pointerEvents=null}}var ag=F0;class M0{setup(){this.container=this.$el,this.pageId=this.$opts.pageId,this.editContainer=this.$refs.editContainer,this.listContainer=this.$refs.listContainer,this.mainTabs=this.$refs.mainTabs,this.list=this.$refs.list,this.setupListeners()}setupListeners(){const t=this.reloadList.bind(this);this.container.addEventListener("dropzone-success",t),this.container.addEventListener("ajax-form-success",t),this.container.addEventListener("sortable-list-sort",n=>{this.updateOrder(n.detail.ids)}),this.container.addEventListener("event-emit-select-edit",n=>{this.startEdit(n.detail.id)}),this.container.addEventListener("event-emit-select-edit-back",n=>{this.stopEdit()}),this.container.addEventListener("event-emit-select-insert",n=>{const i=n.target.closest("[data-drag-content]").getAttribute("data-drag-content"),s=JSON.parse(i);window.$events.emit("editor::insert",{html:s["text/html"],markdown:s["text/plain"]})})}reloadList(){this.stopEdit(),this.mainTabs.components.tabs.show("items"),window.$http.get(`/attachments/get/page/${this.pageId}`).then(t=>{this.list.innerHTML=t.data,window.components.init(this.list)})}updateOrder(t){window.$http.put(`/attachments/sort/page/${this.pageId}`,{order:t}).then(n=>{window.$events.emit("success",n.data.message)})}async startEdit(t){this.editContainer.classList.remove("hidden"),this.listContainer.classList.add("hidden"),no(this.editContainer);const n=await window.$http.get(`/attachments/edit/${t}`);this.editContainer.innerHTML=n.data,window.components.init(this.editContainer)}stopEdit(){this.editContainer.classList.add("hidden"),this.listContainer.classList.remove("hidden")}}var sg=M0;const Al={};class q0{setup(){this.parent=this.$el.parentElement,this.container=this.$el,this.type=this.$opts.type,this.url=this.$opts.url,this.input=this.$refs.input,this.list=this.$refs.list,this.lastPopulated=0,this.setupListeners()}setupListeners(){this.input.addEventListener("input",this.requestSuggestions.bind(this)),this.input.addEventListener("focus",this.requestSuggestions.bind(this)),this.input.addEventListener("keydown",t=>{t.key==="Tab"&&this.hideSuggestions()}),this.input.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this)),this.container.addEventListener("keydown",this.containerKeyDown.bind(this)),zt(this.list,"button","click",(t,n)=>{this.selectSuggestion(n.textContent)}),zt(this.list,"button","keydown",(t,n)=>{t.key==="Enter"&&this.selectSuggestion(n.textContent)})}selectSuggestion(t){this.input.value=t,this.lastPopulated=Date.now(),this.input.focus(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hideSuggestions()}containerKeyDown(t){if(t.key==="Enter"&&t.preventDefault(),this.list.classList.contains("hidden"))return;t.key==="ArrowDown"?(this.moveFocus(!0),t.preventDefault()):t.key==="ArrowUp"?(this.moveFocus(!1),t.preventDefault()):t.key==="Escape"&&(this.hideSuggestions(),t.preventDefault())}moveFocus(t=!0){const n=Array.from(this.container.querySelectorAll("input,button")),i=n.indexOf(document.activeElement),s=n[i+(t?1:-1)];s&&s.focus()}async requestSuggestions(){if(Date.now()-this.lastPopulated<50)return;const t=this.getNameFilterIfNeeded(),n=this.input.value.slice(0,3).toLowerCase(),i=await this.loadSuggestions(n,t);let s=i.slice(0,6);n.length>0&&(s=i.filter(u=>u.toLowerCase().includes(n)).slice(0,6)),this.displaySuggestions(s)}getNameFilterIfNeeded(){return this.type!=="value"?null:this.parent.querySelector("input").value}async loadSuggestions(t,n=null){const i={search:t,name:n},s=`${this.url}:${JSON.stringify(i)}`;if(Al[s])return Al[s];const u=await window.$http.get(this.url,i);return Al[s]=u.data,u.data}displaySuggestions(t){if(t.length===0)return this.hideSuggestions();this.list.innerHTML=t.map(n=>`
  • `).join(""),this.list.style.display="block";for(const n of this.list.querySelectorAll("button"))n.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this))}hideSuggestions(){this.list.style.display="none"}hideSuggestionsIfFocusedLost(t){this.container.contains(t.relatedTarget)||this.hideSuggestions()}}var lg=q0;class z0{constructor(t){if(this.elem=t,this.targetElem=document.getElementById("header"),this.showing=!1,this.breakPoint=1200,document.body.classList.contains("flexbox")){this.elem.style.display="none";return}this.elem.addEventListener("click",this.scrollToTop.bind(this)),window.addEventListener("scroll",this.onPageScroll.bind(this))}onPageScroll(){let t=document.documentElement.scrollTop||document.body.scrollTop||0;!this.showing&&t>this.breakPoint?(this.elem.style.display="block",this.showing=!0,setTimeout(()=>{this.elem.style.opacity=.4},1)):this.showing&&t{this.elem.style.display="none"},500))}scrollToTop(){let t=this.targetElem.getBoundingClientRect().top,n=document.documentElement.scrollTop?document.documentElement:document.body,i=300,s=Date.now(),u=this.targetElem.getBoundingClientRect().top;function c(){let d=1-(Date.now()-s)/i,h=Math.abs(d*u);d>0?(n.scrollTop=h,requestAnimationFrame(c.bind(this))):n.scrollTop=t}requestAnimationFrame(c.bind(this))}}var ug=z0;function Yn(){return(Yn=Object.assign||function(t){for(var n=1;n"&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(i){return!1}return!1}}function R0(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function _n(t,n,i,s){if(t){i=i||document;do{if(n!=null&&(n[0]===">"?t.parentNode===i&&Ea(t,n):Ea(t,n))||s&&t===i)return t;if(t===i)break}while(t=R0(t))}return null}var oo,fg=/\s+/g;function ht(t,n,i){if(t&&n)if(t.classList)t.classList[i?"add":"remove"](n);else{var s=(" "+t.className+" ").replace(fg," ").replace(" "+n+" "," ");t.className=(s+(i?" "+n:"")).replace(fg," ")}}function Ce(t,n,i){var s=t&&t.style;if(s){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),n===void 0?i:i[n];n in s||n.indexOf("webkit")!==-1||(n="-webkit-"+n),s[n]=i+(typeof i=="string"?"":"px")}}function Er(t,n){var i="";if(typeof t=="string")i=t;else do{var s=Ce(t,"transform");s&&s!=="none"&&(i=s+" "+i)}while(!n&&(t=t.parentNode));var u=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return u&&new u(i)}function pg(t,n,i){if(t){var s=t.getElementsByTagName(n),u=0,c=s.length;if(i)for(;u=c:u<=c))return s;if(s===Nn())break;s=cr(s,!1)}return!1}function Da(t,n,i){for(var s=0,u=0,c=t.children;u=0||(y[p]=d[p]);return y}(s,["evt"]);so.pluginEvent.bind(Ie)(t,n,Yn({dragEl:me,parentEl:Dt,ghostEl:Oe,rootEl:ft,nextEl:Dr,lastDownEl:Aa,cloneEl:xt,cloneHidden:dr,dragStarted:co,putSortable:Ut,activeSortable:Ie.active,originalEvent:u,oldIndex:si,oldDraggableIndex:uo,newIndex:ln,newDraggableIndex:hr,hideGhostForTarget:wg,unhideGhostForTarget:kg,cloneNowHidden:function(){dr=!0},cloneNowShown:function(){dr=!1},dispatchSortableEvent:function(d){tn({sortable:n,name:d,originalEvent:u})}},c))};function tn(t){lo(Yn({putSortable:Ut,cloneEl:xt,targetEl:me,rootEl:ft,oldIndex:si,oldDraggableIndex:uo,newIndex:ln,newDraggableIndex:hr},t))}var me,Dt,Oe,ft,Dr,Aa,xt,dr,si,ln,uo,hr,Ta,Ut,li,Cn,ql,zl,xg,_g,co,ui,ho,La,Vt,ci=!1,Ia=!1,Fa=[],fo=!1,Ma=!1,Pl=[],Rl=!1,qa=[],za=typeof document!="undefined",Pa=dg,Cg=io||Zn?"cssFloat":"float",O0=za&&!P0&&!dg&&"draggable"in document.createElement("div"),Sg=function(){if(za){if(Zn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Eg=function(t,n){var i=Ce(t),s=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),u=Da(t,0,n),c=Da(t,1,n),d=u&&Ce(u),h=c&&Ce(c),p=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+vt(u).width,g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+vt(c).width;return i.display==="flex"?i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal":i.display==="grid"?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":u&&d.float&&d.float!=="none"?!c||h.clear!=="both"&&h.clear!==(d.float==="left"?"left":"right")?"horizontal":"vertical":u&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||p>=s&&i[Cg]==="none"||c&&i[Cg]==="none"&&p+g>s)?"vertical":"horizontal"},Dg=function(t){function n(u,c){return function(d,h,p,g){if(u==null&&(c||d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name))return!0;if(u==null||u===!1)return!1;if(c&&u==="clone")return u;if(typeof u=="function")return n(u(d,h,p,g),c)(d,h,p,g);var y=(c?d:h).options.group.name;return u===!0||typeof u=="string"&&u===y||u.join&&u.indexOf(y)>-1}}var i={},s=t.group;s&&typeof s=="object"||(s={name:s}),i.name=s.name,i.checkPull=n(s.pull,!0),i.checkPut=n(s.put),i.revertClone=s.revertClone,t.group=i},wg=function(){!Sg&&Oe&&Ce(Oe,"display","none")},kg=function(){!Sg&&Oe&&Ce(Oe,"display","")};za&&document.addEventListener("click",function(t){if(Ia)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ia=!1,!1},!0);var vn,Ar=function(t){if(me){var n=(u=(t=t.touches?t.touches[0]:t).clientX,c=t.clientY,Fa.some(function(h){if(!Tl(h)){var p=vt(h),g=h[Kt].options.emptyInsertThreshold;return g&&u>=p.left-g&&u<=p.right+g&&c>=p.top-g&&c<=p.bottom+g?d=h:void 0}}),d);if(n){var i={};for(var s in t)t.hasOwnProperty(s)&&(i[s]=t[s]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Kt]._onDragOver(i)}}var u,c,d},N0=function(t){me&&me.parentNode[Kt]._isOutsideThisEl(t.target)};function Ie(t,n){if(!t||!t.nodeType||t.nodeType!==1)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=n=Object.assign({},n),t[Kt]=this;var i,s,u={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Eg(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(h,p){h.setData("Text",p.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ie.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};for(var c in so.initializePlugins(this,t,u),u)!(c in n)&&(n[c]=u[c]);for(var d in Dg(n),this)d.charAt(0)==="_"&&typeof this[d]=="function"&&(this[d]=this[d].bind(this));this.nativeDraggable=!n.forceFallback&&O0,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Xe(t,"pointerdown",this._onTapStart):(Xe(t,"mousedown",this._onTapStart),Xe(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Xe(t,"dragover",this),Xe(t,"dragenter",this)),Fa.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Object.assign(this,(s=[],{captureAnimationState:function(){s=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(h){if(Ce(h,"display")!=="none"&&h!==void 0){s.push({target:h,rect:vt(h)});var p=Yn({},s[s.length-1].rect);if(h.thisAnimationDuration){var g=Er(h,!0);g&&(p.top-=g.f,p.left-=g.e)}h.fromRect=p}})},addAnimationState:function(h){s.push(h)},removeAnimationState:function(h){s.splice(function(p,g){for(var y in p)if(p.hasOwnProperty(y)){for(var m in g)if(g.hasOwnProperty(m)&&g[m]===p[y][m])return Number(y)}return-1}(s,{target:h}),1)},animateAll:function(h){var p=this;if(!this.options.animation)return clearTimeout(i),void(typeof h=="function"&&h());var g=!1,y=0;s.forEach(function(m){var b=0,w=m.target,D=w.fromRect,E=vt(w),S=w.prevFromRect,z=w.prevToRect,A=m.rect,R=Er(w,!0);R&&(E.top-=R.f,E.left-=R.e),w.toRect=E,w.thisAnimationDuration&&Ll(S,E)&&!Ll(D,E)&&(A.top-E.top)/(A.left-E.left)==(D.top-E.top)/(D.left-E.left)&&(b=function(U,Y,B,G){return Math.sqrt(Math.pow(Y.top-U.top,2)+Math.pow(Y.left-U.left,2))/Math.sqrt(Math.pow(Y.top-B.top,2)+Math.pow(Y.left-B.left,2))*G.animation}(A,S,z,p.options)),Ll(E,D)||(w.prevFromRect=D,w.prevToRect=E,b||(b=p.options.animation),p.animate(w,A,E,b)),b&&(g=!0,y=Math.max(y,b),clearTimeout(w.animationResetTimer),w.animationResetTimer=setTimeout(function(){w.animationTime=0,w.prevFromRect=null,w.fromRect=null,w.prevToRect=null,w.thisAnimationDuration=null},b),w.thisAnimationDuration=b)}),clearTimeout(i),g?i=setTimeout(function(){typeof h=="function"&&h()},y):typeof h=="function"&&h(),s=[]},animate:function(h,p,g,y){if(y){Ce(h,"transition",""),Ce(h,"transform","");var m=Er(this.el),b=(p.left-g.left)/(m&&m.a||1),w=(p.top-g.top)/(m&&m.d||1);h.animatingX=!!b,h.animatingY=!!w,Ce(h,"transform","translate3d("+b+"px,"+w+"px,0)"),this.forRepaintDummy=function(D){return D.offsetWidth}(h),Ce(h,"transition","transform "+y+"ms"+(this.options.easing?" "+this.options.easing:"")),Ce(h,"transform","translate3d(0,0,0)"),typeof h.animated=="number"&&clearTimeout(h.animated),h.animated=setTimeout(function(){Ce(h,"transition",""),Ce(h,"transform",""),h.animated=!1,h.animatingX=!1,h.animatingY=!1},y)}}}))}function Ol(t,n,i,s,u,c,d,h){var p,g,y=t[Kt],m=y.options.onMove;return!window.CustomEvent||Zn||io?(p=document.createEvent("Event")).initEvent("move",!0,!0):p=new CustomEvent("move",{bubbles:!0,cancelable:!0}),p.to=n,p.from=t,p.dragged=i,p.draggedRect=s,p.related=u||n,p.relatedRect=c||vt(n),p.willInsertAfter=h,p.originalEvent=d,t.dispatchEvent(p),m&&(g=m.call(y,p,d)),g}function Nl(t){t.draggable=!1}function B0(){Rl=!1}function j0(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,i=n.length,s=0;i--;)s+=n.charCodeAt(i);return s.toString(36)}function Ra(t){return setTimeout(t,0)}function Bl(t){return clearTimeout(t)}Ie.prototype={constructor:Ie,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ui=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,me):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,s=this.options,u=s.preventOnFilter,c=t.type,d=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,h=(d||t).target,p=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||h,g=s.filter;if(function(y){qa.length=0;for(var m=y.getElementsByTagName("input"),b=m.length;b--;){var w=m[b];w.checked&&qa.push(w)}}(i),!me&&!(/mousedown|pointerdown/.test(c)&&t.button!==0||s.disabled)&&!p.isContentEditable&&(this.nativeDraggable||!Sa||!h||h.tagName.toUpperCase()!=="SELECT")&&!((h=_n(h,s.draggable,i,!1))&&h.animated||Aa===h)){if(si=bt(h),uo=bt(h,s.draggable),typeof g=="function"){if(g.call(this,t,h,this))return tn({sortable:n,rootEl:p,name:"filter",targetEl:h,toEl:i,fromEl:i}),on("filter",n,{evt:t}),void(u&&t.cancelable&&t.preventDefault())}else if(g&&(g=g.split(",").some(function(y){if(y=_n(p,y.trim(),i,!1))return tn({sortable:n,rootEl:y,name:"filter",targetEl:h,fromEl:i,toEl:i}),on("filter",n,{evt:t}),!0})))return void(u&&t.cancelable&&t.preventDefault());s.handle&&!_n(p,s.handle,i,!1)||this._prepareDragStart(t,d,h)}}},_prepareDragStart:function(t,n,i){var s,u=this,c=u.el,d=u.options,h=c.ownerDocument;if(i&&!me&&i.parentNode===c){var p=vt(i);if(ft=c,Dt=(me=i).parentNode,Dr=me.nextSibling,Aa=i,Ta=d.group,Ie.dragged=me,xg=(li={target:me,clientX:(n||t).clientX,clientY:(n||t).clientY}).clientX-p.left,_g=li.clientY-p.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,me.style["will-change"]="all",s=function(){on("delayEnded",u,{evt:t}),Ie.eventCanceled?u._onDrop():(u._disableDelayedDragEvents(),!cg&&u.nativeDraggable&&(me.draggable=!0),u._triggerDragStart(t,n),tn({sortable:u,name:"choose",originalEvent:t}),ht(me,d.chosenClass,!0))},d.ignore.split(",").forEach(function(g){pg(me,g.trim(),Nl)}),Xe(h,"dragover",Ar),Xe(h,"mousemove",Ar),Xe(h,"touchmove",Ar),Xe(h,"mouseup",u._onDrop),Xe(h,"touchend",u._onDrop),Xe(h,"touchcancel",u._onDrop),cg&&this.nativeDraggable&&(this.options.touchStartThreshold=4,me.draggable=!0),on("delayStart",this,{evt:t}),!d.delay||d.delayOnTouchOnly&&!n||this.nativeDraggable&&(io||Zn))s();else{if(Ie.eventCanceled)return void this._onDrop();Xe(h,"mouseup",u._disableDelayedDrag),Xe(h,"touchend",u._disableDelayedDrag),Xe(h,"touchcancel",u._disableDelayedDrag),Xe(h,"mousemove",u._delayedDragTouchMoveHandler),Xe(h,"touchmove",u._delayedDragTouchMoveHandler),d.supportPointer&&Xe(h,"pointermove",u._delayedDragTouchMoveHandler),u._dragStartTimer=setTimeout(s,d.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){me&&Nl(me),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;je(t,"mouseup",this._disableDelayedDrag),je(t,"touchend",this._disableDelayedDrag),je(t,"touchcancel",this._disableDelayedDrag),je(t,"mousemove",this._delayedDragTouchMoveHandler),je(t,"touchmove",this._delayedDragTouchMoveHandler),je(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?Xe(document,this.options.supportPointer?"pointermove":n?"touchmove":"mousemove",this._onTouchMove):(Xe(me,"dragend",this),Xe(ft,"dragstart",this._onDragStart));try{document.selection?Ra(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(i){}},_dragStarted:function(t,n){if(ci=!1,ft&&me){on("dragStarted",this,{evt:n}),this.nativeDraggable&&Xe(document,"dragover",N0);var i=this.options;!t&&ht(me,i.dragClass,!1),ht(me,i.ghostClass,!0),Ie.active=this,t&&this._appendGhost(),tn({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Cn){this._lastX=Cn.clientX,this._lastY=Cn.clientY,wg();for(var t=document.elementFromPoint(Cn.clientX,Cn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Cn.clientX,Cn.clientY))!==n;)n=t;if(me.parentNode[Kt]._isOutsideThisEl(t),n)do{if(n[Kt]&&n[Kt]._onDragOver({clientX:Cn.clientX,clientY:Cn.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break;t=n}while(n=n.parentNode);kg()}},_onTouchMove:function(t){if(li){var n=this.options,i=n.fallbackTolerance,s=n.fallbackOffset,u=t.touches?t.touches[0]:t,c=Oe&&Er(Oe,!0),d=Oe&&c&&c.a,h=Oe&&c&&c.d,p=Pa&&Vt&&gg(Vt),g=(u.clientX-li.clientX+s.x)/(d||1)+(p?p[0]-Pl[0]:0)/(d||1),y=(u.clientY-li.clientY+s.y)/(h||1)+(p?p[1]-Pl[1]:0)/(h||1);if(!Ie.active&&!ci){if(i&&Math.max(Math.abs(u.clientX-this._lastX),Math.abs(u.clientY-this._lastY))ae.right+10||q.clientX<=ae.right&&q.clientY>ae.bottom&&q.clientX>=ae.left:q.clientX>ae.right&&q.clientY>ae.top||q.clientX<=ae.right&&q.clientY>ae.bottom+10}(t,u,this)&&!E.animated){if(E===me)return j(!1);if(E&&c===t.target&&(d=E),d&&(i=vt(d)),Ol(ft,c,me,n,d,i,t,!!d)!==!1)return V(),c.appendChild(me),Dt=c,Q(),j(!0)}else if(d.parentNode===c){i=vt(d);var S,z,A,R=me.parentNode!==c,U=!function(q,I,H){var ae=H?q.left:q.top,F=H?I.left:I.top;return ae===F||(H?q.right:q.bottom)===(H?I.right:I.bottom)||ae+(H?q.width:q.height)/2===F+(H?I.width:I.height)/2}(me.animated&&me.toRect||n,d.animated&&d.toRect||i,u),Y=u?"top":"left",B=mg(d,"top","top")||mg(me,"top","top"),G=B?B.scrollTop:void 0;if(ui!==d&&(z=i[Y],fo=!1,Ma=!U&&h.invertSwap||R),(S=function(q,I,H,ae,F,T,ce,de){var ie=ae?q.clientY:q.clientX,_e=ae?H.height:H.width,ze=ae?H.top:H.left,be=ae?H.bottom:H.right,we=!1;if(!ce){if(de&&La<_e*F){if(!fo&&(ho===1?ie>ze+_e*T/2:iebe-La)return-ho}else if(ie>ze+_e*(1-F)/2&&iebe-_e*T/2)?ie>ze+_e/2?1:-1:0}(t,d,i,u,U?1:h.swapThreshold,h.invertedSwapThreshold==null?h.swapThreshold:h.invertedSwapThreshold,Ma,ui===d))!==0){var ee=bt(me);do A=Dt.children[ee-=S];while(A&&(Ce(A,"display")==="none"||A===Oe))}if(S===0||A===d)return j(!1);ui=d,ho=S;var J=d.nextElementSibling,P=!1,Z=Ol(ft,c,me,n,d,i,t,P=S===1);if(Z!==!1)return Z!==1&&Z!==-1||(P=Z===1),Rl=!0,setTimeout(B0,30),V(),P&&!J?c.appendChild(me):d.parentNode.insertBefore(me,P?J:d),B&&bg(B,0,G-B.scrollTop),Dt=me.parentNode,z===void 0||Ma||(La=Math.abs(z-vt(d)[Y])),Q(),j(!0)}if(c.contains(me))return j(!1)}return!1}function _(q,I){on(q,w,Yn({evt:t,isOwner:y,axis:u?"vertical":"horizontal",revert:s,dragRect:n,targetRect:i,canSort:m,fromSortable:b,target:d,completed:j,onMove:function(H,ae){return Ol(ft,c,me,n,H,vt(H),t,ae)},changed:Q},I))}function V(){_("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function j(q){return _("dragOverCompleted",{insertion:q}),q&&(y?g._hideClone():g._showClone(w),w!==b&&(ht(me,Ut?Ut.options.ghostClass:g.options.ghostClass,!1),ht(me,h.ghostClass,!0)),Ut!==w&&w!==Ie.active?Ut=w:w===Ie.active&&Ut&&(Ut=null),b===w&&(w._ignoreWhileAnimating=d),w.animateAll(function(){_("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(d===me&&!me.animated||d===c&&!d.animated)&&(ui=null),h.dragoverBubble||t.rootEl||d===document||(me.parentNode[Kt]._isOutsideThisEl(t.target),!q&&Ar(t)),!h.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),D=!0}function Q(){ln=bt(me),hr=bt(me,h.draggable),tn({sortable:w,name:"change",toEl:c,newIndex:ln,newDraggableIndex:hr,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){je(document,"mousemove",this._onTouchMove),je(document,"touchmove",this._onTouchMove),je(document,"pointermove",this._onTouchMove),je(document,"dragover",Ar),je(document,"mousemove",Ar),je(document,"touchmove",Ar)},_offUpEvents:function(){var t=this.el.ownerDocument;je(t,"mouseup",this._onDrop),je(t,"touchend",this._onDrop),je(t,"pointerup",this._onDrop),je(t,"touchcancel",this._onDrop),je(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;ln=bt(me),hr=bt(me,i.draggable),on("drop",this,{evt:t}),Dt=me&&me.parentNode,ln=bt(me),hr=bt(me,i.draggable),Ie.eventCanceled||(ci=!1,Ma=!1,fo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Bl(this.cloneId),Bl(this._dragStartId),this.nativeDraggable&&(je(document,"drop",this),je(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sa&&Ce(document.body,"user-select",""),Ce(me,"transform",""),t&&(co&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Oe&&Oe.parentNode&&Oe.parentNode.removeChild(Oe),(ft===Dt||Ut&&Ut.lastPutMode!=="clone")&&xt&&xt.parentNode&&xt.parentNode.removeChild(xt),me&&(this.nativeDraggable&&je(me,"dragend",this),Nl(me),me.style["will-change"]="",co&&!ci&&ht(me,Ut?Ut.options.ghostClass:this.options.ghostClass,!1),ht(me,this.options.chosenClass,!1),tn({sortable:this,name:"unchoose",toEl:Dt,newIndex:null,newDraggableIndex:null,originalEvent:t}),ft!==Dt?(ln>=0&&(tn({rootEl:Dt,name:"add",toEl:Dt,fromEl:ft,originalEvent:t}),tn({sortable:this,name:"remove",toEl:Dt,originalEvent:t}),tn({rootEl:Dt,name:"sort",toEl:Dt,fromEl:ft,originalEvent:t}),tn({sortable:this,name:"sort",toEl:Dt,originalEvent:t})),Ut&&Ut.save()):ln!==si&&ln>=0&&(tn({sortable:this,name:"update",toEl:Dt,originalEvent:t}),tn({sortable:this,name:"sort",toEl:Dt,originalEvent:t})),Ie.active&&(ln!=null&&ln!==-1||(ln=si,hr=uo),tn({sortable:this,name:"end",toEl:Dt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){on("nulling",this),ft=me=Dt=Oe=Dr=xt=Aa=dr=li=Cn=co=ln=hr=si=uo=ui=ho=Ut=Ta=Ie.dragged=Ie.ghost=Ie.clone=Ie.active=null,qa.forEach(function(t){t.checked=!0}),qa.length=ql=zl=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":me&&(this._onDragOver(t),function(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],i=this.el.children,s=0,u=i.length,c=this.options;s1&&(qe.forEach(function(d){u.addAnimationState({target:d,rect:cn?vt(d):c}),Fl(d),d.fromRect=c,i.removeAnimationState(d)}),cn=!1,function(d,h){qe.forEach(function(p,g){var y=h.children[p.sortableIndex+(d?Number(g):0)];y?h.insertBefore(p,y):h.appendChild(p)})}(!this.options.removeCloneOnHide,s))},dragOverCompleted:function(n){var i=n.sortable,s=n.isOwner,u=n.activeSortable,c=n.parentEl,d=n.putSortable,h=this.options;if(n.insertion){if(s&&u._hideClone(),go=!1,h.animation&&qe.length>1&&(cn||!s&&!u.options.sort&&!d)){var p=vt(ot,!1,!0,!0);qe.forEach(function(y){y!==ot&&(yg(y,p),c.appendChild(y))}),cn=!0}if(!s)if(cn||Na(),qe.length>1){var g=Oa;u._showClone(i),u.options.animation&&!Oa&&g&&un.forEach(function(y){u.addAnimationState({target:y,rect:mo}),y.fromRect=mo,y.thisAnimationDuration=null})}else u._showClone(i)}},dragOverAnimationCapture:function(n){var i=n.dragRect,s=n.isOwner,u=n.activeSortable;if(qe.forEach(function(d){d.thisAnimationDuration=null}),u.options.animation&&!s&&u.multiDrag.isMultiDrag){mo=Object.assign({},i);var c=Er(ot,!0);mo.top-=c.f,mo.left-=c.e}},dragOverAnimationComplete:function(){cn&&(cn=!1,Na())},drop:function(n){var i=n.originalEvent,s=n.rootEl,u=n.parentEl,c=n.sortable,d=n.dispatchSortableEvent,h=n.oldIndex,p=n.putSortable,g=p||this.sortable;if(i){var y=this.options,m=u.children;if(!di)if(y.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),ht(ot,y.selectedClass,!~qe.indexOf(ot)),~qe.indexOf(ot))qe.splice(qe.indexOf(ot),1),po=null,lo({sortable:c,rootEl:s,name:"deselect",targetEl:ot,originalEvt:i});else{if(qe.push(ot),lo({sortable:c,rootEl:s,name:"select",targetEl:ot,originalEvt:i}),i.shiftKey&&po&&c.el.contains(po)){var b,w,D=bt(po),E=bt(ot);if(~D&&~E&&D!==E)for(E>D?(w=D,b=E):(w=E,b=D+1);w1){var S=vt(ot),z=bt(ot,":not(."+this.options.selectedClass+")");if(!go&&y.animation&&(ot.thisAnimationDuration=null),g.captureAnimationState(),!go&&(y.animation&&(ot.fromRect=S,qe.forEach(function(R){if(R.thisAnimationDuration=null,R!==ot){var U=cn?vt(R):S;R.fromRect=U,g.addAnimationState({target:R,rect:U})}})),Na(),qe.forEach(function(R){m[z]?u.insertBefore(R,m[z]):u.appendChild(R),z++}),h===bt(ot))){var A=!1;qe.forEach(function(R){R.sortableIndex===bt(R)||(A=!0)}),A&&d("update")}qe.forEach(function(R){Fl(R)}),g.animateAll()}Sn=g}(s===u||p&&p.lastPutMode!=="clone")&&un.forEach(function(R){R.parentNode&&R.parentNode.removeChild(R)})}},nullingGlobal:function(){this.isMultiDrag=di=!1,un.length=0},destroyGlobal:function(){this._deselectMultiDrag(),je(document,"pointerup",this._deselectMultiDrag),je(document,"mouseup",this._deselectMultiDrag),je(document,"touchend",this._deselectMultiDrag),je(document,"keydown",this._checkKeyDown),je(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(di!==void 0&&di||Sn!==this.sortable||n&&_n(n.target,this.options.draggable,this.sortable.el,!1)||n&&n.button!==0))for(;qe.length;){var i=qe[0];ht(i,this.options.selectedClass,!1),qe.shift(),lo({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:i,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(t,{pluginName:"multiDrag",utils:{select:function(n){var i=n.parentNode[Kt];i&&i.options.multiDrag&&!~qe.indexOf(n)&&(Sn&&Sn!==i&&(Sn.multiDrag._deselectMultiDrag(),Sn=i),ht(n,i.options.selectedClass,!0),qe.push(n))},deselect:function(n){var i=n.parentNode[Kt],s=qe.indexOf(n);i&&i.options.multiDrag&&~s&&(ht(n,i.options.selectedClass,!1),qe.splice(s,1))}},eventProperties:function(){var n=this,i=[],s=[];return qe.forEach(function(u){var c;i.push({multiDragElement:u,index:u.sortableIndex}),c=cn&&u!==ot?-1:cn?bt(u,":not(."+n.options.selectedClass+")"):bt(u),s.push({multiDragElement:u,index:c})}),{items:[].concat(qe),clones:[].concat(un),oldIndicies:i,newIndicies:s}},optionListeners:{multiDragKey:function(n){return(n=n.toLowerCase())==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})});var hi=Ie;const Ig={name:function(t,n){const i=t.getAttribute("data-name").trim().toLowerCase(),s=n.getAttribute("data-name").trim().toLowerCase();return i.localeCompare(s)},created:function(t,n){const i=Number(t.getAttribute("data-created")),s=Number(n.getAttribute("data-created"));return s-i},updated:function(t,n){const i=Number(t.getAttribute("data-updated")),s=Number(n.getAttribute("data-updated"));return s-i},chaptersFirst:function(t,n){const i=t.getAttribute("data-type"),s=n.getAttribute("data-type");return i===s?0:i==="chapter"?-1:1},chaptersLast:function(t,n){const i=t.getAttribute("data-type"),s=n.getAttribute("data-type");return i===s?0:i==="chapter"?1:-1}};class H0{constructor(t){this.elem=t,this.sortContainer=t.querySelector("[book-sort-boxes]"),this.input=t.querySelector("[book-sort-input]");const n=t.querySelector(".sort-box");this.setupBookSortable(n),this.setupSortPresets(),window.$events.listen("entity-select-confirm",this.bookSelect.bind(this))}setupSortPresets(){let t="",n=!1;const i=["name","created","updated"];this.sortContainer.addEventListener("click",s=>{const u=s.target.closest(".sort-box-options [data-sort]");if(!u)return;s.preventDefault();const c=u.closest(".sort-box").querySelectorAll("ul"),d=u.getAttribute("data-sort");n=t===d?!n:!1;let h=Ig[d];n&&i.includes(d)&&(h=function(p,g){return 0-Ig[d](p,g)});for(let p of c){const g=Array.from(p.children).filter(y=>y.matches("li"));g.sort(h).forEach(y=>{p.appendChild(y)})}t=d,this.updateMapInput()})}bookSelect(t){const n=this.elem.querySelector(`[data-type="book"][data-id="${t.id}"]`)!==null;if(n)return;const i=t.link+"/sort-item";window.$http.get(i).then(s=>{const u=document.createElement("div");u.innerHTML=s.data;const c=u.children[0];this.sortContainer.append(c),this.setupBookSortable(c)})}setupBookSortable(t){const n=[t.querySelector(".sort-list")];n.push(...t.querySelectorAll(".entity-list-item + ul"));const i={name:"book",pull:["book","chapter"],put:["book","chapter"]},s={name:"chapter",pull:["book","chapter"],put:function(u,c,d){return d.getAttribute("data-type")==="page"}};for(let u of n)new hi(u,{group:u.classList.contains("sort-list")?i:s,animation:150,fallbackOnBody:!0,swapThreshold:.65,onSort:this.updateMapInput.bind(this),dragClass:"bg-white",ghostClass:"primary-background-light",multiDrag:!0,multiDragKey:"CTRL",selectedClass:"sortable-selected"})}updateMapInput(){const t=this.buildEntityMap();this.input.value=JSON.stringify(t)}buildEntityMap(){const t=[],n=this.elem.querySelectorAll(".sort-list");for(let i of n){const s=i.closest('[data-type="book"]').getAttribute("data-id"),u=Array.from(i.children).filter(c=>c.matches('[data-type="page"], [data-type="chapter"]'));for(let c=0;c{this.entityListElem.innerHTML=n.data}).catch(n=>{console.error(n)}).then(()=>{this.toggleLoading(!1),this.onSearch()})}toggleLoading(t=!1){this.loadingElem.style.display=t?"block":"none"}}var Mg=U0;const Ua=new WeakMap;function qg(t,n=400,i=null){$a(t),t.style.display="block",Wa(t,{opacity:["0","1"]},n,()=>{i&&i()})}function Ga(t,n=400,i=null){$a(t),Wa(t,{opacity:["1","0"]},n,()=>{t.style.display="none",i&&i()})}function fi(t,n=400){$a(t);const i=t.getBoundingClientRect().height,s=getComputedStyle(t),u=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:[`${i}px`,"0px"],overflow:["hidden","hidden"],paddingTop:[u,"0px"],paddingBottom:[c,"0px"]};Wa(t,d,n,()=>{t.style.display="none"})}function pi(t,n=400){$a(t),t.style.display="block";const i=t.getBoundingClientRect().height,s=getComputedStyle(t),u=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:["0px",`${i}px`],overflow:["hidden","hidden"],paddingTop:["0px",u],paddingBottom:["0px",c]};Wa(t,d,n)}function Wa(t,n,i=400,s=null){const u=Object.keys(n);for(let d of u)t.style[d]=n[d][0];const c=()=>{for(let d of u)t.style[d]=null;t.style.transition=null,t.removeEventListener("transitionend",c),Ua.delete(t),s&&s()};setTimeout(()=>{t.style.transition=`all ease-in-out ${i}ms`;for(let d of u)t.style[d]=n[d][1];t.addEventListener("transitionend",c),Ua.set(t,c)},15)}function $a(t){if(Ua.has(t)){const n=Ua.get(t);n()}}class W0{constructor(t){this.elem=t,this.isOpen=t.classList.contains("open"),t.addEventListener("click",this.click.bind(this))}open(){const t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.add("open"),this.elem.setAttribute("aria-expanded","true"),pi(t,240)}close(){const t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.remove("open"),this.elem.setAttribute("aria-expanded","false"),fi(t,240)}click(t){t.preventDefault(),this.isOpen?this.close():this.open(),this.isOpen=!this.isOpen}}var zg=W0;const Tr=$e(Qe()),Pg=$e(Ks()),K2=$e(Vs()),V2=$e(Ys()),Y2=$e(od()),X2=$e(ld()),Z2=$e(dd()),Q2=$e(pd()),J2=$e(Zs()),e1=$e(Xs()),t1=$e(_d()),n1=$e(Ed()),r1=$e(Fd()),i1=$e(zd()),o1=$e(Od()),a1=$e(jd()),s1=$e(Wd()),l1=$e(Kd()),u1=$e(Xd()),c1=$e(Jd()),d1=$e(nh()),h1=$e(oh()),f1=$e(dh()),p1=$e(ph()),m1=$e(vh()),g1=$e(wh()),v1=$e(ta()),b1=$e(_h()),y1=$e(Eh()),Vl={css:"css",c:"text/x-csrc",java:"text/x-java",scala:"text/x-scala",kotlin:"text/x-kotlin","c++":"text/x-c++src","c#":"text/x-csharp",csharp:"text/x-csharp",diff:"diff",for:"fortran",fortran:"fortran",go:"go",haskell:"haskell",hs:"haskell",html:"htmlmixed",ini:"properties",javascript:"javascript",json:{name:"javascript",json:!0},js:"javascript",jl:"julia",julia:"julia",lua:"lua",md:"markdown",mdown:"markdown",markdown:"markdown",ml:"mllike",nginx:"nginx",perl:"perl",pl:"perl",powershell:"powershell",properties:"properties",ocaml:"mllike",pascal:"text/x-pascal",pas:"text/x-pascal",php:t=>t.includes("/gi,` +`);const i=t.textContent.trimEnd();let s="";if(n!==null){const c=n.className.replace("language-","");s=Ka(c,i)}const u=Tr.default(function(c){t.parentNode.replaceChild(c,t)},{value:i,mode:s,lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});K0(u)}function K0(t){const n='',i=document.createElement("div");i.classList.add("CodeMirror-copy"),i.innerHTML=n,t.display.wrapper.appendChild(i);const s=new Pg.default(i,{text:function(u){return t.getValue()}});s.on("success",u=>{i.classList.add("success"),setTimeout(()=>{i.classList.remove("success")},240)})}function Ka(t,n){t=t.trim().replace(/^\./g,"").toLowerCase();const i=typeof Vl[t];return i==="undefined"?"":i==="function"?Vl[t](n):Vl[t]}function Va(){const t=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(t?"darcula":"default")}function V0(t){const n=t.ownerDocument,i=t.querySelector("code");let s=(t.className||"").replace("language-","");s===""&&i&&(s=(i.className||"").replace("language-","")),t.innerHTML=t.innerHTML.replace(//gi,` +`);const u=t.textContent,c=n.createElement("div"),d=n.createElement("textarea");c.className="CodeMirrorContainer",c.setAttribute("data-lang",s),c.setAttribute("dir","ltr"),d.style.display="none",t.parentNode.replaceChild(c,t),c.appendChild(d),c.contentEditable=!1,d.textContent=u;let h=Tr.default(function(p){c.appendChild(p)},{value:u,mode:Ka(s,u),lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});return setTimeout(()=>{h.refresh()},300),{wrap:c,editor:h}}function Y0(t,n){const i=t.textContent;return Tr.default(function(s){t.parentNode.insertBefore(s,t),t.style.display="none"},{value:i,mode:Ka(n,i),lineNumbers:!0,lineWrapping:!1,theme:Va()})}function X0(t,n,i){t.setOption("mode",Ka(n,i))}function Z0(t,n){t.setValue(n),setTimeout(()=>{Og(t)},10)}function Og(t){t.refresh()}function Q0(t){const n=t.textContent,i={value:n,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:Va(),scrollPastEnd:!0};return window.$events.emitPublic(t,"editor-markdown-cm::pre-init",{config:i}),Tr.default(function(s){t.parentNode.insertBefore(s,t),t.style.display="none"},i)}function J0(){let t=Tr.default.keyMap.default==Tr.default.keyMap.macDefault;return t?"Cmd":"Ctrl"}var Nt={highlight:$0,highlightWithin:G0,wysiwygView:V0,popupEditor:Y0,setMode:X0,setContent:Z0,updateLayout:Og,markdownEditor:Q0,getMetaKey:J0};class ex{setup(){this.container=this.$refs.container,this.popup=this.$el,this.editorInput=this.$refs.editor,this.languageLinks=this.$manyRefs.languageLink,this.saveButton=this.$refs.saveButton,this.languageInput=this.$refs.languageInput,this.historyDropDown=this.$refs.historyDropDown,this.historyList=this.$refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",t=>{t.ctrlKey&&t.key==="Enter"&&this.save()}),it(this.languageLinks,t=>{const n=t.target.dataset.lang;this.languageInput.value=n,this.updateEditorMode(n)}),Ca(this.languageInput,t=>this.save()),it(this.saveButton,t=>this.save()),zt(this.historyList,"button","click",(t,n)=>{t.preventDefault();const i=n.dataset.time;this.editor&&this.editor.setValue(this.history[i])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(t,n,i){this.languageInput.value=n,this.callback=i,this.show(),this.updateEditorMode(n),Nt.setContent(this.editor,t)}show(){this.editor||(this.editor=Nt.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{Nt.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(t){Nt.setMode(this.editor,t,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");const t=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",t.length===0),this.historyList.innerHTML=t.map(n=>{const i=new Date(parseInt(n)).toLocaleTimeString();return`
  • `}).join("")}addHistory(){if(!this.editor)return;const t=this.editor.getValue();if(!t)return;const n=Object.keys(this.history).pop();if(this.history[n]===t)return;this.history[String(Date.now())]=t;const i=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,i)}}var Ng=ex;class tx{constructor(t){Nt.highlightWithin(t)}}var Bg=tx;class nx{constructor(t){if(this.elem=t,this.trigger=t.querySelector("[collapsible-trigger]"),this.content=t.querySelector("[collapsible-content]"),!this.trigger)return;this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError()}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),pi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),fi(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){const t=this.content.querySelector(".text-neg.text-small");t&&this.open()}}var jg=nx;class rx{constructor(t){this.elem=t,this.checkbox=t.querySelector("input[type=checkbox]"),this.display=t.querySelector('[role="checkbox"]'),this.checkbox.addEventListener("change",this.stateChange.bind(this)),this.elem.addEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(t){const n=t.keyCode===32||t.keyCode===13;n&&(t.preventDefault(),this.toggle())}toggle(){this.checkbox.checked=!this.checkbox.checked,this.checkbox.dispatchEvent(new Event("change")),this.stateChange()}stateChange(){const t=this.checkbox.checked?"true":"false";this.display.setAttribute("aria-checked",t)}}var Hg=rx;class ix{constructor(t){this.elem=t,this.dealtWith=!1,t.addEventListener("toggle",this.onToggle.bind(this))}onToggle(){if(this.dealtWith)return;Nt.highlightWithin(this.elem),this.dealtWith=!0}}var Ug=ix;class ox{setup(){this.container=this.$el,this.menu=this.$refs.menu,this.toggle=this.$refs.toggle,this.moveMenu=this.$opts.moveMenu,this.direction=document.dir==="rtl"?"right":"left",this.body=document.body,this.showing=!1,this.setupListeners()}show(t=null){this.hideAll(),this.menu.style.display="block",this.menu.classList.add("anim","menuIn"),this.toggle.setAttribute("aria-expanded","true"),this.moveMenu&&(this.rect=this.menu.getBoundingClientRect(),this.body.appendChild(this.menu),this.menu.style.position="fixed",this.direction==="right"?this.menu.style.right=`${this.rect.right-this.rect.width}px`:this.menu.style.left=`${this.rect.left}px`,this.menu.style.top=`${this.rect.top}px`,this.menu.style.width=`${this.rect.width}px`),this.menu.addEventListener("mouseleave",this.hide.bind(this)),window.addEventListener("click",s=>{this.menu.contains(s.target)||this.hide()});const n=this.menu.querySelector("input");n!==null&&n.focus(),this.showing=!0;const i=new Event("show");this.container.dispatchEvent(i),t&&t.stopPropagation()}hideAll(){for(let t of window.components.dropdown)t.hide()}hide(){this.menu.style.display="none",this.menu.classList.remove("anim","menuIn"),this.toggle.setAttribute("aria-expanded","false"),this.moveMenu&&(this.menu.style.position="",this.menu.style[this.direction]="",this.menu.style.top="",this.menu.style.width="",this.container.appendChild(this.menu)),this.showing=!1}getFocusable(){return Array.from(this.menu.querySelectorAll("[tabindex],[href],button,input:not([type=hidden])"))}focusNext(){const t=this.getFocusable(),n=t.indexOf(document.activeElement);let i=n+1;i>=t.length&&(i=0),t[i].focus()}focusPrevious(){const t=this.getFocusable(),n=t.indexOf(document.activeElement);let i=n-1;i<0&&(i=t.length-1),t[i].focus()}setupListeners(){this.container.addEventListener("click",n=>{const i=Array.from(this.menu.querySelectorAll("a"));i.includes(n.target)&&this.hide()}),it(this.toggle,n=>{n.stopPropagation(),this.show(n),n instanceof KeyboardEvent&&this.focusNext()});const t=n=>{n.key==="ArrowDown"||n.key==="ArrowRight"?(this.focusNext(),n.preventDefault()):n.key==="ArrowUp"||n.key==="ArrowLeft"?(this.focusPrevious(),n.preventDefault()):n.key==="Escape"&&(this.hide(),this.toggle.focus(),n.stopPropagation())};this.container.addEventListener("keydown",t),this.moveMenu&&this.menu.addEventListener("keydown",t),this.menu.addEventListener("keydown ",n=>{n.key==="Enter"&&(n.preventDefault(),n.stopPropagation(),this.hide())})}}var Wg=ox;const $g=$e(Fh());class ax{setup(){this.container=this.$el,this.url=this.$opts.url,this.successMessage=this.$opts.successMessage,this.removeMessage=this.$opts.removeMessage,this.uploadLimitMessage=this.$opts.uploadLimitMessage,this.timeoutMessage=this.$opts.timeoutMessage;const t=this;this.dz=new $g.default(this.container,{addRemoveLinks:!0,dictRemoveFile:this.removeMessage,timeout:Number(window.uploadTimeout)||6e4,maxFilesize:Number(window.uploadLimit)||256,url:this.url,withCredentials:!0,init(){this.dz=this,this.dz.on("sending",t.onSending.bind(t)),this.dz.on("success",t.onSuccess.bind(t)),this.dz.on("error",t.onError.bind(t))}})}onSending(t,n,i){const s=window.document.querySelector("meta[name=token]").getAttribute("content");i.append("_token",s),n.ontimeout=u=>{this.dz.emit("complete",t),this.dz.emit("error",t,this.timeoutMessage)}}onSuccess(t,n){this.$emit("success",{file:t,data:n}),this.successMessage&&window.$events.emit("success",this.successMessage),Ga(t.previewElement,800,()=>{this.dz.removeFile(t)})}onError(t,n,i){this.$emit("error",{file:t,errorMessage:n,xhr:i});const s=u=>{const c=t.previewElement.querySelector("[data-dz-errormessage]");c.textContent=u};i&&i.status===413?s(this.uploadLimitMessage):n.file&&s(n.file)}removeAll(){this.dz.removeAllFiles(!0)}}var Gg=ax;class sx{constructor(t){this.elem=t,this.buttons=t.querySelectorAll("[toolbox-tab-button]"),this.contentElements=t.querySelectorAll("[toolbox-tab-content]"),this.toggleButton=t.querySelector("[toolbox-toggle]"),this.toggleButton.addEventListener("click",this.toggle.bind(this)),this.elem.addEventListener("click",n=>{let i=n.target.closest("[toolbox-tab-button]");if(i===null)return;let s=i.getAttribute("toolbox-tab-button");this.setActiveTab(s,!0)}),this.setActiveTab(this.contentElements[0].getAttribute("toolbox-tab-content"))}toggle(){this.elem.classList.toggle("open");const t=this.elem.classList.contains("open")?"true":"false";this.toggleButton.setAttribute("aria-expanded",t)}setActiveTab(t,n=!1){for(let i=0,s=this.buttons.length;i{t.preventDefault(),this.runSearch()}),it(this.clearButton,this.clearSearch.bind(this))}runSearch(){const t=this.searchInput.value.trim();if(t.length===0)return this.clearSearch();this.searchView.classList.remove("hidden"),this.contentView.classList.add("hidden"),this.loadingBlock.classList.remove("hidden");const n=window.baseUrl(`/search/${this.entityType}/${this.entityId}`);window.$http.get(n,{term:t}).then(i=>{this.searchResults.innerHTML=i.data}).catch(console.error).then(()=>{this.loadingBlock.classList.add("hidden")})}clearSearch(){this.searchView.classList.add("hidden"),this.contentView.classList.remove("hidden"),this.loadingBlock.classList.add("hidden"),this.searchInput.value=""}}var Yg=ux;class cx{constructor(t){this.elem=t,this.search="",this.lastClick=0,this.selectedItemData=null;const n=t.hasAttribute("entity-types")?t.getAttribute("entity-types"):"page,book,chapter",i=t.hasAttribute("entity-permission")?t.getAttribute("entity-permission"):"view";this.searchUrl=window.baseUrl(`/ajax/search/entities?types=${encodeURIComponent(n)}&permission=${encodeURIComponent(i)}`),this.input=t.querySelector("[entity-selector-input]"),this.searchInput=t.querySelector("[entity-selector-search]"),this.loading=t.querySelector("[entity-selector-loading]"),this.resultsContainer=t.querySelector("[entity-selector-results]"),this.addButton=t.querySelector("[entity-selector-add-button]"),this.elem.addEventListener("click",this.onClick.bind(this));let s=0;this.searchInput.addEventListener("input",u=>{s=Date.now(),this.showLoading(),setTimeout(()=>{if(Date.now()-s<199)return;this.searchEntities(this.searchInput.value)},200)}),this.searchInput.addEventListener("keydown",u=>{u.keyCode===13&&u.preventDefault()}),this.addButton&&this.addButton.addEventListener("click",u=>{this.selectedItemData&&(this.confirmSelection(this.selectedItemData),this.unselectAll())}),this.showLoading(),this.initialLoad()}showLoading(){this.loading.style.display="block",this.resultsContainer.style.display="none"}hideLoading(){this.loading.style.display="none",this.resultsContainer.style.display="block"}initialLoad(){window.$http.get(this.searchUrl).then(t=>{this.resultsContainer.innerHTML=t.data,this.hideLoading()})}searchEntities(t){this.input.value="";let n=`${this.searchUrl}&term=${encodeURIComponent(t)}`;window.$http.get(n).then(i=>{this.resultsContainer.innerHTML=i.data,this.hideLoading()})}isDoubleClick(){let t=Date.now(),n=t-this.lastClick<300;return this.lastClick=t,n}onClick(t){const n=t.target.closest("[data-entity-type]");n&&(t.preventDefault(),t.stopPropagation(),this.selectItem(n))}selectItem(t){const n=this.isDoubleClick(),i=t.getAttribute("data-entity-type"),s=t.getAttribute("data-entity-id"),u=!t.classList.contains("selected")||n;this.unselectAll(),this.input.value=u?`${i}:${s}`:"";const c=t.getAttribute("href"),d=t.querySelector(".entity-list-item-name").textContent,h={id:Number(s),name:d,link:c};if(u?(t.classList.add("selected"),this.selectedItemData=h):window.$events.emit("entity-select-change",null),!n&&!u)return;n&&this.confirmSelection(h),u&&window.$events.emit("entity-select-change",h)}confirmSelection(t){window.$events.emit("entity-select-confirm",t)}unselectAll(){let t=this.elem.querySelectorAll(".selected");for(let n of t)n.classList.remove("selected","primary-background");this.selectedItemData=null}}var Xg=cx;class dx{setup(){this.elem=this.$el,this.selectButton=this.$refs.select,window.EntitySelectorPopup=this,this.callback=null,this.selection=null,this.selectButton.addEventListener("click",this.onSelectButtonClick.bind(this)),window.$events.listen("entity-select-change",this.onSelectionChange.bind(this)),window.$events.listen("entity-select-confirm",this.onSelectionConfirm.bind(this))}show(t){this.callback=t,this.elem.components.popup.show()}hide(){this.elem.components.popup.hide()}onSelectButtonClick(){this.hide(),this.selection!==null&&this.callback&&this.callback(this.selection)}onSelectionConfirm(t){this.hide(),this.callback&&t&&this.callback(t)}onSelectionChange(t){this.selection=t,t===null?this.selectButton.setAttribute("disabled","true"):this.selectButton.removeAttribute("disabled")}}var Zg=dx;class hx{setup(){this.container=this.$el,this.name=this.$opts.name,it(this.$el,()=>{this.$emit(this.name,this.$opts)})}}var Qg=hx;class fx{constructor(t){this.elem=t,this.isOpen=t.getAttribute("expand-toggle-is-open")==="yes",this.updateEndpoint=t.getAttribute("expand-toggle-update-endpoint"),this.selector=t.getAttribute("expand-toggle"),t.addEventListener("click",this.click.bind(this))}open(t){pi(t,200)}close(t){fi(t,200)}click(t){t.preventDefault();const n=document.querySelectorAll(this.selector);for(let i of n)this.isOpen?this.close(i):this.open(i);this.isOpen=!this.isOpen,this.updateSystemAjax(this.isOpen)}updateSystemAjax(t){window.$http.patch(this.updateEndpoint,{expand:t?"true":"false"})}}var Jg=fx;class px{constructor(t){this.elem=t,this.typeControl=t.querySelector('[name="setting-app-homepage-type"]'),this.pagePickerContainer=t.querySelector("[page-picker-container]"),this.typeControl.addEventListener("change",this.controlPagePickerVisibility.bind(this)),this.controlPagePickerVisibility()}controlPagePickerVisibility(){const t=this.typeControl.value==="page";this.pagePickerContainer.style.display=t?"block":"none"}}var ev=px;class mx{setup(){this.uploadedTo=this.$opts.uploadedTo,this.container=this.$el,this.popupEl=this.$refs.popup,this.searchForm=this.$refs.searchForm,this.searchInput=this.$refs.searchInput,this.cancelSearch=this.$refs.cancelSearch,this.listContainer=this.$refs.listContainer,this.filterTabs=this.$manyRefs.filterTabs,this.selectButton=this.$refs.selectButton,this.formContainer=this.$refs.formContainer,this.dropzoneContainer=this.$refs.dropzoneContainer,this.type="gallery",this.lastSelected={},this.lastSelectedTime=0,this.callback=null,this.resetState=()=>{this.hasData=!1,this.page=1,this.filter="all"},this.resetState(),this.setupListeners(),window.ImageManager=this}setupListeners(){it(this.filterTabs,t=>{this.resetAll(),this.filter=t.target.dataset.filter,this.setActiveFilterTab(this.filter),this.loadGallery()}),this.searchForm.addEventListener("submit",t=>{this.resetListView(),this.loadGallery(),t.preventDefault()}),it(this.cancelSearch,t=>{this.resetListView(),this.resetSearchView(),this.loadGallery(),this.cancelSearch.classList.remove("active")}),this.searchInput.addEventListener("input",t=>{this.cancelSearch.classList.toggle("active",this.searchInput.value.trim())}),zt(this.listContainer,".load-more","click",async t=>{no(t.target),this.page++,await this.loadGallery(),t.target.remove()}),this.listContainer.addEventListener("event-emit-select-image",this.onImageSelectEvent.bind(this)),it(this.selectButton,()=>{this.callback&&this.callback(this.lastSelected),this.hide()}),zt(this.formContainer,"#image-manager-delete","click",t=>{this.lastSelected&&this.loadImageEditForm(this.lastSelected.id,!0)}),this.formContainer.addEventListener("ajax-form-success",this.refreshGallery.bind(this)),this.container.addEventListener("dropzone-success",this.refreshGallery.bind(this))}show(t,n="gallery"){this.resetAll(),this.callback=t,this.type=n,this.popupEl.components.popup.show(),this.dropzoneContainer.classList.toggle("hidden",n!=="gallery"),this.hasData||(this.loadGallery(),this.hasData=!0)}hide(){this.popupEl.components.popup.hide()}async loadGallery(){const t={page:this.page,search:this.searchInput.value||null,uploaded_to:this.uploadedTo,filter_type:this.filter==="all"?null:this.filter},{data:n}=await window.$http.get(`images/${this.type}`,t);this.addReturnedHtmlElementsToList(n),eg(this.listContainer)}addReturnedHtmlElementsToList(t){const n=document.createElement("div");n.innerHTML=t,window.components.init(n);for(const i of[...n.children])this.listContainer.appendChild(i)}setActiveFilterTab(t){this.filterTabs.forEach(i=>i.classList.remove("selected"));const n=this.filterTabs.find(i=>i.dataset.filter===t);n&&n.classList.add("selected")}resetAll(){this.resetState(),this.resetListView(),this.resetSearchView(),this.resetEditForm(),this.setActiveFilterTab("all"),this.selectButton.classList.add("hidden")}resetSearchView(){this.searchInput.value=""}resetEditForm(){this.formContainer.innerHTML=""}resetListView(){no(this.listContainer),this.page=1}refreshGallery(){this.resetListView(),this.loadGallery()}onImageSelectEvent(t){const n=JSON.parse(t.detail.data),i=n&&n.id===this.lastSelected.id&&Date.now()-this.lastSelectedTime<400,s=t.target.classList.contains("selected");[...this.listContainer.querySelectorAll(".selected")].forEach(u=>{u.classList.remove("selected")}),s?this.resetEditForm():(t.target.classList.add("selected"),this.loadImageEditForm(n.id)),this.selectButton.classList.toggle("hidden",s),i&&this.callback&&(this.callback(n),this.hide()),this.lastSelected=n,this.lastSelectedTime=Date.now()}async loadImageEditForm(t,n=!1){n||(this.formContainer.innerHTML="");const i=n?{delete:!0}:{},{data:s}=await window.$http.get(`/images/edit/${t}`,i);this.formContainer.innerHTML=s,window.components.init(this.formContainer)}}var tv=mx;class gx{constructor(t){this.elem=t,this.imageElem=t.querySelector("img"),this.imageInput=t.querySelector("input[type=file]"),this.resetInput=t.querySelector("input[data-reset-input]"),this.removeInput=t.querySelector("input[data-remove-input]"),this.defaultImage=t.getAttribute("data-default-image");const n=t.querySelector('button[data-action="reset-image"]');n.addEventListener("click",this.reset.bind(this));const i=t.querySelector('button[data-action="remove-image"]');i&&i.addEventListener("click",this.removeImage.bind(this)),this.imageInput.addEventListener("change",this.fileInputChange.bind(this))}fileInputChange(){this.resetInput.setAttribute("disabled","disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled");for(let t of this.imageInput.files)this.imageElem.src=window.URL.createObjectURL(t);this.imageElem.classList.remove("none")}reset(){this.imageInput.value="",this.imageElem.src=this.defaultImage,this.resetInput.removeAttribute("disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled"),this.imageElem.classList.remove("none")}removeImage(){this.imageInput.value="",this.imageElem.classList.add("none"),this.removeInput.removeAttribute("disabled"),this.resetInput.setAttribute("disabled","disabled")}}var nv=gx;class vx{constructor(t){this.elem=t,this.menu=t.querySelector("ul"),this.sortInput=t.querySelector('[name="sort"]'),this.orderInput=t.querySelector('[name="order"]'),this.form=t.querySelector("form"),this.menu.addEventListener("click",n=>{n.target.closest("[data-sort-value]")!==null&&this.sortOptionClick(n)}),this.elem.addEventListener("click",n=>{n.target.closest("[data-sort-dir]")!==null&&this.sortDirectionClick(n)})}sortOptionClick(t){const n=t.target.closest("[data-sort-value]");this.sortInput.value=n.getAttribute("data-sort-value"),t.preventDefault(),this.form.submit()}sortDirectionClick(t){const n=this.orderInput.value,i=n==="asc"?"desc":"asc";this.orderInput.value=i,t.preventDefault(),this.form.submit()}}var rv=vx;class bx{constructor(t){this.data=t}hasItems(){return Boolean(this.data)&&Boolean(this.data.types)&&this.data.types.length>0}containsTabularData(){const t=this.data.getData("text/rtf");return t&&t.includes("\\trowd")}getImages(){const t=this.data.types,n=this.data.files,i=[];for(const s of t)if(s.includes("image")){const u=this.data.getData(s);i.push(u.getAsFile())}for(const s of n)s.type.includes("image")&&i.push(s);return i}}var bo=bx;let Qn=null,Yl,Xl;function yx(t,n,i){Yl=n,Xl=i,Qn=document.createElement("iframe"),Qn.setAttribute("frameborder","0"),window.addEventListener("message",iv),Qn.setAttribute("src",t),Qn.setAttribute("class","fullscreen"),Qn.style.backgroundColor="#FFFFFF",document.body.appendChild(Qn)}function wx(){ov()}function iv(t){if(!t.data||t.data.length<1)return;let n=JSON.parse(t.data);n.event==="init"?_x():n.event==="exit"?ov():n.event==="save"?xx(n):n.event==="export"&&kx(n)}function kx(t){Xl&&Xl(t.data)}function xx(t){av({action:"export",format:"xmlpng",xml:t.xml,spin:"Updating drawing"})}function _x(){if(!Yl)return;Yl().then(t=>{av({action:"load",autosave:1,xml:t})})}function ov(){window.removeEventListener("message",iv),Qn&&document.body.removeChild(Qn)}function av(t){Qn.contentWindow.postMessage(JSON.stringify(t),"*")}async function Cx(t,n){let i={image:t,uploaded_to:n};const s=await window.$http.post(window.baseUrl("/images/drawio"),i);return s.data}async function Sx(t){const n=await window.$http.get(window.baseUrl(`/images/drawio/base64/${t}`));return`data:image/png;base64,${n.data.content}`}var dn={show:yx,close:wx,upload:Cx,load:Sx};const sv=$e(Um()),lv=$e(Vm());class Ex{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.markdown=new sv.default({html:!0}),this.markdown.use(lv.default,{label:!0}),this.display=this.elem.querySelector(".markdown-display"),this.displayStylesLoaded=!1,this.input=this.elem.querySelector("textarea"),this.htmlInput=this.elem.querySelector("input[name=html]"),this.cm=Nt.markdownEditor(this.input),this.onMarkdownScroll=this.onMarkdownScroll.bind(this);const t=()=>{this.displayDoc=this.display.contentDocument,this.init()};this.display.contentDocument.readyState==="complete"?t():this.display.addEventListener("load",t.bind(this)),window.$events.emitPublic(this.elem,"editor-markdown::setup",{markdownIt:this.markdown,displayEl:this.display,codeMirrorInstance:this.cm})}init(){let t=0;this.displayDoc.addEventListener("click",s=>{let u=Date.now()-t<300,c=s.target.closest("a");if(c!==null){s.preventDefault(),window.open(c.getAttribute("href"));return}let d=s.target.closest("[drawio-diagram]");if(d!==null&&u){this.actionEditDrawing(d);return}t=Date.now()}),this.elem.addEventListener("click",s=>{let u=s.target.closest("button[data-action]");if(u===null)return;let c=u.getAttribute("data-action");if(c==="insertImage"&&this.actionInsertImage(),c==="insertLink"&&this.actionShowLinkSelector(),c==="insertDrawing"&&(s.ctrlKey||s.metaKey)){this.actionShowImageManager();return}c==="insertDrawing"&&this.actionStartDrawing(),c==="fullscreen"&&this.actionFullScreen()}),this.elem.addEventListener("click",s=>{const u=s.target.closest(".editor-toolbar-label");if(!u)return;const c=this.elem.querySelectorAll(".markdown-editor-wrap");for(let d of c)d.classList.remove("active");u.closest(".markdown-editor-wrap").classList.add("active")}),window.$events.listen("editor-markdown-update",s=>{this.cm.setValue(s),this.updateAndRender()}),this.codeMirrorSetup(),this.listenForBookStackEditorEvents();const n=new URL(window.location).searchParams,i=n.get("content-text");i&&this.scrollToText(i)}updateAndRender(){const t=this.cm.getValue();this.input.value=t;const n=this.markdown.render(t);window.$events.emit("editor-html-change",n),window.$events.emit("editor-markdown-change",t),this.displayDoc.body.className="page-content",this.displayDoc.body.innerHTML=n,this.htmlInput.value=n,this.loadStylesIntoDisplay()}loadStylesIntoDisplay(){if(this.displayStylesLoaded)return;this.displayDoc.documentElement.classList.add("markdown-editor-display"),document.documentElement.classList.contains("dark-mode")&&(this.displayDoc.documentElement.style.backgroundColor="#222",this.displayDoc.documentElement.classList.add("dark-mode")),this.displayDoc.head.innerHTML="";const t=document.head.querySelectorAll("style,link[rel=stylesheet]");for(let n of t){const i=n.cloneNode(!0);this.displayDoc.head.appendChild(i)}this.displayStylesLoaded=!0}onMarkdownScroll(t){const n=this.displayDoc.body.children;if(n.length<=t)return;const i=t===-1?n[n.length-1]:n[t];i.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})}codeMirrorSetup(){const t=this.cm,n=this;t.setOption("direction","ltr");let i=Nt.getMetaKey();const s={};s[`${i}-Alt-I`]=function(m){let b=m.getSelection(),w=`![${b}](http://)`,D=m.getCursor("from");m.replaceSelection(w),m.setCursor(D.line,D.ch+w.length-1)},s[`${i}-S`]=m=>{window.$events.emit("editor-save-draft")},s[`${i}-Enter`]=m=>{window.$events.emit("editor-save-page")},s[`Shift-${i}-K`]=m=>{this.actionShowLinkSelector()},s[`${i}-K`]=m=>{y()},s[`${i}-1`]=m=>{d("##")},s[`${i}-2`]=m=>{d("###")},s[`${i}-3`]=m=>{d("####")},s[`${i}-4`]=m=>{d("#####")},s[`${i}-5`]=m=>{d("")},s[`${i}-d`]=m=>{d("")},s[`${i}-6`]=m=>{d(">")},s[`${i}-q`]=m=>{d(">")},s[`${i}-7`]=m=>{p("\n```\n","\n```")},s[`${i}-8`]=m=>{p("`","`")},s[`Shift-${i}-E`]=m=>{p("`","`")},s[`${i}-9`]=m=>{p('

    ',"

    ")},t.setOption("extraKeys",s),t.on("change",(m,b)=>{this.updateAndRender()});const u=tg(m=>{let b=m.getScrollInfo(),w=b.top+b.clientHeight===b.height;if(w){this.onMarkdownScroll(-1);return}let D=m.lineAtHeight(b.top,"local"),E=m.getRange({line:0,ch:null},{line:D,ch:null}),S=new DOMParser,z=S.parseFromString(this.markdown.render(E),"text/html"),A=z.documentElement.querySelectorAll("body > *");this.onMarkdownScroll(A.length)},100);t.on("scroll",m=>{u(m)}),t.on("paste",(m,b)=>{const w=new bo(b.clipboardData||b.dataTransfer);if(!w.hasItems()||w.containsTabularData())return;const D=w.getImages();for(const E of D)g(E)}),t.on("drop",(m,b)=>{const w=b.dataTransfer.getData("bookstack/template");if(w){const E=m.coordsChar({left:b.pageX,top:b.pageY});m.setCursor(E),b.preventDefault(),window.$http.get(`/templates/${w}`).then(S=>{const z=S.data.markdown||S.data.html;m.replaceSelection(z)})}const D=new bo(b.dataTransfer);if(D.hasItems()&&D.getImages().length>0){const E=m.coordsChar({left:b.pageX,top:b.pageY});m.setCursor(E),b.stopPropagation(),b.preventDefault();const S=D.getImages();for(const z of S)g(z)}});function c(m,b){let w=t.getValue(),D=t.listSelections();t.setValue(w.replace(m,b)),t.setSelections(D)}function d(m){let b=t.getCursor(),w=t.getLine(b.line),D=w.length,E=w.split(" ")[0];if(E===m){w=w.replace(`${m} `,""),t.replaceRange(w,{line:b.line,ch:0},{line:b.line,ch:D}),t.setCursor({line:b.line,ch:b.ch-(m.length+1)});return}let S=/^[#>`]/.test(E),z=0;S?(z=m.length-E.length,w=w.replace(E,m).trim()):m!==""&&(z=m.length+1,w=m+" "+w),t.replaceRange(w,{line:b.line,ch:0},{line:b.line,ch:D}),t.setCursor({line:b.line,ch:b.ch+z})}function h(m,b){let w=t.getCursor(),D=t.getLine(w.line),E=D.length,S=D;D.indexOf(m)===0&&D.slice(-b.length)===b?S=D.slice(m.length,D.length-b.length):S=`${m}${D}${b}`,t.replaceRange(S,{line:w.line,ch:0},{line:w.line,ch:E}),t.setCursor({line:w.line,ch:w.ch+m.length})}function p(m,b){let w=t.getSelection();if(w==="")return h(m,b);let D=w,E=0,S=0;w.indexOf(m)===0&&w.slice(-b.length)===b?(D=w.slice(m.length,w.length-b.length),S=-(b.length+m.length)):(D=`${m}${w}${b}`,S=m.length+b.length);let z=t.listSelections()[0];t.replaceSelection(D);let A=z.head.ch<=z.anchor.ch;z.head.ch+=A?E:S,z.anchor.ch+=A?S:E,t.setSelections([z])}function g(m){if(m===null||m.type.indexOf("image")!==0)return;let b="png";if(m.name){let U=m.name.match(/\.(.+)$/);U.length>1&&(b=U[1])}const w="image-"+Math.random().toString(16).slice(2),D=window.baseUrl(`/loading.gif#upload${w}`),E=t.getSelection(),S=`![${E}](${D})`,z=t.getCursor();t.replaceSelection(S),t.setCursor({line:z.line,ch:z.ch+E.length+3});const A="image-"+Date.now()+"."+b,R=new FormData;R.append("file",m,A),R.append("uploaded_to",n.pageId),window.$http.post("/images/gallery",R).then(U=>{const Y=`[![${E}](${U.data.thumbs.display})](${U.data.url})`;c(S,Y)}).catch(U=>{window.$events.emit("error",trans("errors.image_upload_error")),c(S,E),console.log(U)})}function y(){let m=t.getCursor("from"),b=t.getSelection()||"",w=`[${b}]()`;t.focus(),t.replaceSelection(w);let D=b===""?-3:-1;t.setCursor(m.line,m.ch+w.length+D)}this.updateAndRender()}actionInsertImage(){const t=this.cm.getCursor("from");window.ImageManager.show(n=>{let i=this.cm.getSelection(),s="[!["+(i||n.name)+"]("+n.thumbs.display+")]("+n.url+")";this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(t.line,t.ch+s.length)},"gallery")}actionShowImageManager(){const t=this.cm.getCursor("from");window.ImageManager.show(n=>{this.insertDrawing(n,t)},"drawio")}actionShowLinkSelector(){const t=this.cm.getCursor("from");window.EntitySelectorPopup.show(n=>{let i=this.cm.getSelection()||n.name,s=`[${i}](${n.link})`;this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(t.line,t.ch+s.length)})}getDrawioUrl(){const t=document.querySelector("[drawio-url]");return t?t.getAttribute("drawio-url"):!1}actionStartDrawing(){const t=this.getDrawioUrl();if(!t)return;const n=this.cm.getCursor("from");dn.show(t,()=>Promise.resolve(""),i=>{const s={image:i,uploaded_to:Number(document.getElementById("page-editor").getAttribute("page-id"))};window.$http.post(window.baseUrl("/images/drawio"),s).then(u=>{this.insertDrawing(u.data,n),dn.close()}).catch(u=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(u)})})}insertDrawing(t,n){const i=`
    `;this.cm.focus(),this.cm.replaceSelection(i),this.cm.setCursor(n.line,n.ch+i.length)}actionEditDrawing(t){const n=this.getDrawioUrl();if(!n)return;const i=this.cm.getCursor("from"),s=t.getAttribute("drawio-diagram");dn.show(n,()=>dn.load(s),u=>{let c={image:u,uploaded_to:Number(document.getElementById("page-editor").getAttribute("page-id"))};window.$http.post(window.baseUrl("/images/drawio"),c).then(d=>{let h=`
    `,p=this.cm.getValue().split(` `).map(g=>g.indexOf(`drawio-diagram="${s}"`)!==-1?h:g).join(` -`);this.cm.setValue(p),this.cm.setCursor(i),this.cm.focus(),dn.close()}).catch(d=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(d)})})}actionFullScreen(){const n=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!n),document.body.classList.toggle("markdown-fullscreen",!n)}scrollToText(n){if(!n)return;const t=this.cm.getValue(),i=t.split(/\r?\n/);let s=i.findIndex(l=>l&&l.indexOf(n)!==-1);if(s===-1)return;this.cm.scrollIntoView({line:s},200),this.cm.focus(),this.cm.setCursor({line:s,char:i[s].length})}listenForBookStackEditorEvents(){function n({html:t,markdown:i}){return i||t}window.$events.listen("editor::replace",t=>{const i=n(t);this.cm.setValue(i)}),window.$events.listen("editor::append",t=>{const i=this.cm.getCursor("from"),s=n(t),l=this.cm.getValue()+` -`+s;this.cm.setValue(l),this.cm.setCursor(i.line,i.ch)}),window.$events.listen("editor::prepend",t=>{const i=this.cm.getCursor("from"),s=n(t),l=s+` -`+this.cm.getValue();this.cm.setValue(l);const c=s.split(` -`).length;this.cm.setCursor(i.line+c,i.ch)}),window.$events.listen("editor::insert",t=>{const i=n(t);this.cm.replaceSelection(i)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}}var dv=Zx;class Qx{constructor(n){this.elem=n,this.inviteOption=n.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){const n=this.inviteOption.value==="true",t=this.elem.querySelectorAll("input[type=password]");for(const s of t)s.disabled=n;const i=this.elem.querySelector("#password-input-container");i&&(i.style.display=n?"none":"block")}}var hv=Qx;class Jx{constructor(n){this.elem=n,this.type=n.getAttribute("notification"),this.textElem=n.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,t=>{this.show(t)}),n.addEventListener("click",this.hide.bind(this)),n.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(n=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=n,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){const t=n.split(" ").length,i=Math.max(2e3,1e3+250*t);setTimeout(this.hide.bind(this),i)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}}var fv=Jx;class e_{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){it(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),it(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}}var pv=e_;class t_{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.formContainer=this.$refs.formContainer,this.commentCountBar=this.$refs.commentCountBar,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.updatedText=this.$opts.updatedText,this.deletedText=this.$opts.deletedText,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(n){let t=n.target.closest("[action]");if(n.target.matches('a[href^="#"]')){const l=n.target.href.split("#")[1];no(document.querySelector("#"+l))}if(t===null)return;n.preventDefault();const i=t.getAttribute("action"),s=t.closest("[comment]");i==="edit"&&this.editComment(s),i==="closeUpdateForm"&&this.closeUpdateForm(),i==="delete"&&this.deleteComment(s),i==="addComment"&&this.showForm(),i==="hideForm"&&this.hideForm(),i==="reply"&&this.setReply(s),i==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){if(!this.editingComment)return;this.editingComment.querySelector("[comment-content]").style.display="block",this.editingComment.querySelector("[comment-edit-container]").style.display="none"}editComment(n){this.hideForm(),this.editingComment&&this.closeUpdateForm(),n.querySelector("[comment-content]").style.display="none",n.querySelector("[comment-edit-container]").style.display="block";let t=n.querySelector("[comment-edit-container] textarea"),i=t.value.split(` -`).length;t.style.height=i*20+40+"px",this.editingComment=n}updateComment(n){let t=n.target;n.preventDefault();let i=t.querySelector("textarea").value,s={text:i,parent_id:this.parentId||null};this.showLoading(t);let l=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${l}`,s).then(c=>{let d=document.createElement("div");d.innerHTML=c.data,this.editingComment.innerHTML=d.children[0].innerHTML,window.$events.success(this.updatedText),window.components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window.$events.showValidationErrors).then(()=>{this.hideLoading(t)})}deleteComment(n){let t=n.getAttribute("comment");this.showLoading(n.querySelector("[comment-content]")),window.$http.delete(`/comment/${t}`).then(i=>{n.parentNode.removeChild(n),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(n){n.preventDefault(),n.stopPropagation();let t=this.formInput.value,i={text:t,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,i).then(s=>{let l=document.createElement("div");l.innerHTML=s.data;let c=l.children[0];this.container.appendChild(c),window.components.init(c),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(s=>{window.$events.showValidationErrors(s),this.hideLoading(this.form)})}updateCount(){let n=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,n,{count:n})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(n){this.showForm(),this.parentId=Number(n.getAttribute("local-id")),this.replyToRow.style.display="block";const t=this.replyToRow.querySelector("a");t.textContent=`#${this.parentId}`,t.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(n){const t=n.querySelectorAll(".form-group");for(let i of t)i.style.display="none";n.querySelector(".form-group.loading").style.display="block"}hideLoading(n){const t=n.querySelectorAll(".form-group");for(let i of t)i.style.display="block";n.querySelector(".form-group.loading").style.display="none"}}var mv=t_;const gv=$e(Ks());class n_{constructor(n){if(this.elem=n,this.pageId=n.getAttribute("page-display"),Nt.highlight(),this.setupPointer(),this.setupNavHighlighting(),window.location.hash){let i=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(i)}const t=document.querySelector(".sidebar-page-nav");t&&zt(t,"a","click",(i,s)=>{i.preventDefault(),window.components["tri-layout"][0].showContent();const l=s.getAttribute("href").substr(1);this.goToText(l),window.history.pushState(null,null,"#"+l)})}goToText(n){const t=document.getElementById(n);if(xa(".page-content [data-highlighted]",i=>{i.removeAttribute("data-highlighted"),i.style.backgroundColor=null}),t!==null)no(t);else{const i=eg(".page-content > div > *",n);i&&no(i)}}setupPointer(){let n=document.getElementById("pointer");if(!n)return;n=n.parentNode.removeChild(n);const t=n.querySelector("div.pointer");let i=!1,s=!1,l=!0,c="";zt(n,"input","click",(h,p)=>{p.select(),h.stopPropagation()}),_a(n,["click","focus"],h=>{h.stopPropagation()}),zt(n,"span.icon","click",(h,p)=>{h.stopPropagation(),l=!l,p.querySelector('[data-icon="include"]').style.display=l?"none":"inline",p.querySelector('[data-icon="link"]').style.display=l?"inline":"none",d()}),new gv.default(n.querySelector("button")),_a(document.body,["click","focus"],h=>{if(!i||s)return;n=n.parentElement.removeChild(n),i=!1});let d=h=>{let p=l?window.baseUrl(`/link/${this.pageId}#${c}`):`{{@${this.pageId}#${c}}}`;l&&!p.startsWith("http")&&(p=window.location.protocol+"//"+window.location.host+p),n.querySelector("input").value=p;const g=n.querySelector("#pointer-edit");if(g&&h){const y=g.dataset.editHref,m=h.id,v=h.textContent&&h.textContent.substring(0,50);g.href=`${y}?content-id=${m}&content-text=${encodeURIComponent(v)}`}};xa('.page-content [id^="bkmrk"]',h=>{_a(h,["mouseup","keyup"],p=>{p.stopPropagation();let g=window.getSelection();if(g.toString().length===0)return;c=h.id,d(h),h.parentNode.insertBefore(n,h),n.style.display="block",i=!0,s=!0,requestAnimationFrame(()=>{const y=h.getBoundingClientRect();let m=p.pageX-y.left-164;m<0&&(m=0);const v=m/y.width*100;t.style.left=v+"%",setTimeout(()=>{s=!1},100)})})})}setupNavHighlighting(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window)||!("intersectionRatio"in window.IntersectionObserverEntry.prototype))return;let n=document.querySelector(".sidebar-page-nav"),t=document.querySelector(".page-content").querySelectorAll("h1, h2, h3, h4, h5, h6");t.length>0&&n!==null&&i(t);function i(c){let d={rootMargin:"0px 0px 0px 0px",threshold:1},h=new IntersectionObserver(s,d);for(let p of c)h.observe(p)}function s(c,d){for(let h of c){let p=h.intersectionRatio===1;l(h.target.id,p)}}function l(c,d){xa('a[href="#'+c+'"]',h=>{h.closest("li").classList.toggle("current-heading",d)})}}}var vv=n_;function bv(n){let t=new Date(n*1e3),i=t.getHours(),s=t.getMinutes();return`${(i>9?"":"0")+i}:${(s>9?"":"0")+s}`}class r_{setup(){this.draftsEnabled=this.$opts.draftsEnabled==="true",this.editorType=this.$opts.editorType,this.pageId=Number(this.$opts.pageId),this.isNewDraft=this.$opts.pageNewDraft==="true",this.hasDefaultTitle=this.$opts.isDefaultTitle||!1,this.container=this.$el,this.titleElem=this.$refs.titleContainer.querySelector("input"),this.saveDraftButton=this.$refs.saveDraft,this.discardDraftButton=this.$refs.discardDraft,this.discardDraftWrap=this.$refs.discardDraftWrap,this.draftDisplay=this.$refs.draftDisplay,this.draftDisplayIcon=this.$refs.draftDisplayIcon,this.changelogInput=this.$refs.changelogInput,this.changelogDisplay=this.$refs.changelogDisplay,this.draftText=this.$opts.draftText,this.autosaveFailText=this.$opts.autosaveFailText,this.editingPageText=this.$opts.editingPageText,this.draftDiscardedText=this.$opts.draftDiscardedText,this.setChangelogText=this.$opts.setChangelogText,this.editorHTML="",this.editorMarkdown="",this.autoSave={interval:null,frequency:3e4,last:0},this.pageId!==0&&this.draftsEnabled&&window.setTimeout(()=>{this.startAutoSave()},1e3),this.draftDisplay.innerHTML=this.draftText,this.setupListeners(),this.setInitialFocus()}setupListeners(){window.$events.listen("editor-save-draft",this.saveDraft.bind(this)),window.$events.listen("editor-save-page",this.savePage.bind(this)),window.$events.listen("editor-html-change",n=>{this.editorHTML=n}),window.$events.listen("editor-markdown-change",n=>{this.editorMarkdown=n}),this.changelogInput.addEventListener("change",this.updateChangelogDisplay.bind(this)),it(this.saveDraftButton,this.saveDraft.bind(this)),it(this.discardDraftButton,this.discardDraft.bind(this))}setInitialFocus(){if(this.hasDefaultTitle)return this.titleElem.select();window.setTimeout(()=>{window.$events.emit("editor::focus","")},500)}startAutoSave(){let n=this.titleElem.value.trim()+"::"+this.editorHTML;this.autoSaveInterval=window.setInterval(()=>{let t=Date.now()-this.autoSave.last{this.draftDisplayIcon.classList.remove("visible")},2e3)}async discardDraft(){let n;try{n=await window.$http.get(`/ajax/page/${this.pageId}`)}catch(t){return console.error(t)}this.autoSave.interval&&window.clearInterval(this.autoSave.interval),this.draftDisplay.innerText=this.editingPageText,this.toggleDiscardDraftVisibility(!1),window.$events.emit("editor-html-update",n.data.html||""),window.$events.emit("editor-markdown-update",n.data.markdown||n.data.html),this.titleElem.value=n.data.name,window.setTimeout(()=>{this.startAutoSave()},1e3),window.$events.emit("success",this.draftDiscardedText)}updateChangelogDisplay(){let n=this.changelogInput.value.trim();n.length===0?n=this.setChangelogText:n.length>16&&(n=n.slice(0,16)+"..."),this.changelogDisplay.innerText=n}toggleDiscardDraftVisibility(n){this.discardDraftWrap.classList.toggle("hidden",!n)}}var yv=r_;class i_{constructor(n){this.elem=n,this.input=n.querySelector("input"),this.resetButton=n.querySelector("[page-picker-reset]"),this.selectButton=n.querySelector("[page-picker-select]"),this.display=n.querySelector("[page-picker-display]"),this.defaultDisplay=n.querySelector("[page-picker-default]"),this.buttonSep=n.querySelector("span.sep"),this.value=this.input.value,this.setupListeners()}setupListeners(){this.selectButton.addEventListener("click",this.showPopup.bind(this)),this.display.parentElement.addEventListener("click",this.showPopup.bind(this)),this.resetButton.addEventListener("click",n=>{this.setValue("","")})}showPopup(){window.EntitySelectorPopup.show(n=>{this.setValue(n.id,n.name)})}setValue(n,t){this.value=n,this.input.value=n,this.controlView(t)}controlView(n){let t=this.value&&this.value!==0;if(Ya(this.resetButton,t),Ya(this.buttonSep,t),Ya(this.defaultDisplay,!t),Ya(this.display,t),t){let i=this.getAssetIdFromVal();this.display.textContent=`#${i}, ${n}`,this.display.href=window.baseUrl(`/link/${i}`)}}getAssetIdFromVal(){return Number(this.value)}}function Ya(n,t){let i=n.tagName==="BUTTON"||n.tagName==="SPAN"?"inline-block":"block";n.style.display=t?i:"none"}var wv=i_;class o_{constructor(n){this.container=n;const t=n.querySelector("[permissions-table-toggle-all]");t.addEventListener("click",this.toggleAllClick.bind(this));const i=n.querySelectorAll("[permissions-table-toggle-all-in-row]");for(let l of i)l.addEventListener("click",this.toggleRowClick.bind(this));const s=n.querySelectorAll("[permissions-table-toggle-all-in-column]");for(let l of s)l.addEventListener("click",this.toggleColumnClick.bind(this))}toggleAllClick(n){n.preventDefault(),this.toggleAllInElement(this.container)}toggleRowClick(n){n.preventDefault(),this.toggleAllInElement(n.target.closest("tr"))}toggleColumnClick(n){n.preventDefault();const t=n.target.closest("th,td"),i=Array.from(t.parentElement.children).indexOf(t),s=t.closest("table").querySelectorAll("tr"),l=[];for(let c of s){const d=c.children[i];d&&l.push(...d.querySelectorAll("input[type=checkbox]"))}this.toggleAllInputs(l)}toggleAllInElement(n){const t=n.querySelectorAll("input[type=checkbox]");this.toggleAllInputs(t)}toggleAllInputs(n){const t=n.length>0?n[0].checked:!1;for(let i of n)i.checked=!t,i.dispatchEvent(new Event("change"))}}var kv=o_;class a_{setup(){this.container=this.$el,this.hideButtons=this.$manyRefs.hide||[],this.onkeyup=null,this.onHide=null,this.setupListeners()}setupListeners(){let n=null;this.container.addEventListener("mousedown",t=>{n=t.target}),this.container.addEventListener("click",t=>{if(t.target===this.container&&n===this.container)return this.hide()}),it(this.hideButtons,t=>this.hide())}hide(n=null){Ga(this.container,240,n),this.onkeyup&&(window.removeEventListener("keyup",this.onkeyup),this.onkeyup=null),this.onHide&&this.onHide()}show(n=null,t=null){Og(this.container,240,n),this.onkeyup=i=>{i.key==="Escape"&&this.hide()},window.addEventListener("keyup",this.onkeyup),this.onHide=t}}var xv=a_;class s_{constructor(n){this.elem=n,this.colorInput=n.querySelector("input[type=color]"),this.lightColorInput=n.querySelector('input[name="setting-app-color-light"]'),this.resetButton=n.querySelector("[setting-app-color-picker-reset]"),this.defaultButton=n.querySelector("[setting-app-color-picker-default]"),this.colorInput.addEventListener("change",this.updateColor.bind(this)),this.colorInput.addEventListener("input",this.updateColor.bind(this)),this.resetButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.current,this.updateColor()}),this.defaultButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.default,this.updateColor()})}updateColor(){const n=this.colorInput.value,t=this.hexToRgb(n),i="rgba("+[t.r,t.g,t.b,"0.15"].join(",")+")";this.lightColorInput.value=i;const s=document.getElementById("custom-styles"),l=s.getAttribute("data-color"),c=s.getAttribute("data-color-light");s.innerHTML=s.innerHTML.split(l).join(n),s.innerHTML=s.innerHTML.split(c).join(i),s.setAttribute("data-color",n),s.setAttribute("data-color-light",i)}hexToRgb(n){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return{r:t?parseInt(t[1],16):0,g:t?parseInt(t[2],16):0,b:t?parseInt(t[3],16):0}}}var _v=s_;class l_{constructor(n){this.elem=n,this.colorInput=n.querySelector("input[type=color]"),this.resetButton=n.querySelector("[setting-color-picker-reset]"),this.defaultButton=n.querySelector("[setting-color-picker-default]"),this.resetButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.current}),this.defaultButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.default})}}var Sv=l_;class u_{constructor(n){this.elem=n,this.input=document.getElementById("books-input"),this.shelfBooksList=n.querySelector("[shelf-sort-assigned-books]"),this.initSortable(),this.setupListeners()}initSortable(){const n=this.elem.querySelectorAll(".scroll-box");for(let t of n)new Ua(t,{group:"shelf-books",ghostClass:"primary-background-light",animation:150,onSort:this.onChange.bind(this)})}setupListeners(){this.elem.addEventListener("click",n=>{const t=n.target.closest(".scroll-box-item:not(.instruction)");t&&(n.preventDefault(),this.sortItemClick(t))})}sortItemClick(n){const t=this.elem.querySelectorAll(".scroll-box"),i=Array.from(t).filter(s=>n.parentElement!==s);i.length>0&&i[0].appendChild(n),this.onChange()}onChange(){const n=Array.from(this.shelfBooksList.querySelectorAll("[data-id]"));this.input.value=n.map(t=>t.getAttribute("data-id")).join(",")}}var Cv=u_;class c_{constructor(n){this.elem=n,this.toggleElem=n.querySelector(".sidebar-toggle"),this.toggleElem.addEventListener("click",this.toggle.bind(this))}toggle(n=!0){this.elem.classList.toggle("open")}}var Ev=c_;class d_{setup(){this.container=this.$el,this.handleSelector=this.$opts.handleSelector;const n=new Ua(this.container,{handle:this.handleSelector,animation:150,onSort:()=>{this.$emit("sort",{ids:n.toArray()})},setData(t,i){const s=i.getAttribute("data-drag-content");if(s){const l=JSON.parse(s);for(const[c,d]of Object.entries(l))t.setData(c,d)}},revertOnSpill:!0,dropBubble:!0,dragoverBubble:!1})}}var Dv=d_;class h_{setup(){this.$el.addEventListener("change",()=>{const n=this.$el.closest("form");n&&n.submit()})}}var Av=h_;class f_{setup(){this.tabContentsByName={},this.tabButtonsByName={},this.allContents=[],this.allButtons=[];for(const[n,t]of Object.entries(this.$manyRefs||{})){if(n.startsWith("toggle")){const i=n.replace("toggle","").toLowerCase();it(t,s=>this.show(i)),this.allButtons.push(...t),this.tabButtonsByName[i]=t}if(n.startsWith("content")){const i=n.replace("content","").toLowerCase();this.tabContentsByName[i]=t,this.allContents.push(...t)}}}show(n){this.allContents.forEach(s=>{s.classList.add("hidden"),s.classList.remove("selected")}),this.allButtons.forEach(s=>s.classList.remove("selected"));const t=this.tabContentsByName[n]||[],i=this.tabButtonsByName[n]||[];t.length>0&&(t.forEach(s=>{s.classList.remove("hidden"),s.classList.add("selected")}),i.forEach(s=>s.classList.add("selected")))}}var Tv=f_;class p_{setup(){this.addRemoveComponentEl=this.$refs.addRemove,this.container=this.$el,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.container.addEventListener("change",n=>{const t=this.addRemoveComponentEl.components["add-remove-rows"];this.hasEmptyRows()||t.add()})}hasEmptyRows(){const n=this.container.querySelectorAll(this.rowSelector),t=[...n].find(i=>[...i.querySelectorAll("input")].filter(s=>s.value).length===0);return t!==void 0}}var Lv=p_;class m_{constructor(n){this.elem=n,this.list=n.querySelector("[template-manager-list]"),this.searching=!1,zt(this.elem,"[template-action]","click",this.handleTemplateActionClick.bind(this)),zt(this.elem,".pagination a","click",this.handlePaginationClick.bind(this)),zt(this.elem,".template-item-content","click",this.handleTemplateItemClick.bind(this)),zt(this.elem,".template-item","dragstart",this.handleTemplateItemDragStart.bind(this)),this.setupSearchBox()}handleTemplateItemClick(n,t){const i=t.closest("[template-id]").getAttribute("template-id");this.insertTemplate(i,"replace")}handleTemplateItemDragStart(n,t){const i=t.closest("[template-id]").getAttribute("template-id");n.dataTransfer.setData("bookstack/template",i),n.dataTransfer.setData("text/plain",i)}handleTemplateActionClick(n,t){n.stopPropagation();const i=t.getAttribute("template-action"),s=t.closest("[template-id]").getAttribute("template-id");this.insertTemplate(s,i)}async insertTemplate(n,t="replace"){const i=await window.$http.get(`/templates/${n}`),s="editor::"+t;window.$events.emit(s,i.data)}async handlePaginationClick(n,t){n.preventDefault();const i=t.getAttribute("href"),s=await window.$http.get(i);this.list.innerHTML=s.data}setupSearchBox(){const n=this.elem.querySelector(".search-box");if(!n)return;const t=n.querySelector("input"),i=n.querySelector("button"),s=n.querySelector("button.search-box-cancel");async function l(){const c=t.value,d=await window.$http.get("/templates",{search:c});s.style.display=c?"block":"none",this.list.innerHTML=d.data}l=l.bind(this),n.addEventListener("keypress",c=>{c.key==="Enter"&&(c.preventDefault(),l())}),i.addEventListener("click",c=>{l()}),s.addEventListener("click",c=>{t.value="",l()})}}var Iv=m_;class g_{constructor(n){this.elem=n,this.input=n.querySelector("input[type=hidden]"),this.checkbox=n.querySelector("input[type=checkbox]"),this.checkbox.addEventListener("change",this.stateChange.bind(this))}stateChange(){this.input.value=this.checkbox.checked?"true":"false";const n=new Event("change");this.input.dispatchEvent(n)}}var Fv=g_;class v_{constructor(n){this.elem=n,this.lastLayoutType="none",this.onDestroy=null,this.scrollCache={content:0,info:0},this.lastTabShown="content",this.mobileTabClick=this.mobileTabClick.bind(this),this.updateLayout(),window.addEventListener("resize",t=>{this.updateLayout()},{passive:!0})}updateLayout(){let n="tablet";if(window.innerWidth<=1e3&&(n="mobile"),window.innerWidth>=1400&&(n="desktop"),n===this.lastLayoutType)return;this.onDestroy&&(this.onDestroy(),this.onDestroy=null),n==="desktop"?this.setupDesktop():n==="mobile"&&this.setupMobile(),this.lastLayoutType=n}setupMobile(){const n=document.querySelectorAll("[tri-layout-mobile-tab]");for(let t of n)t.addEventListener("click",this.mobileTabClick);this.onDestroy=()=>{for(let t of n)t.removeEventListener("click",this.mobileTabClick)}}setupDesktop(){}mobileTabClick(n){const t=n.target.getAttribute("tri-layout-mobile-tab");this.showTab(t)}showContent(){this.showTab("content",!1)}showTab(n,t=!0){this.scrollCache[this.lastTabShown]=document.documentElement.scrollTop;const i=document.querySelectorAll(".tri-layout-mobile-tab");for(let l of i){const c=l.getAttribute("tri-layout-mobile-tab")===n;l.classList.toggle("active",c)}const s=n==="info";if(this.elem.classList.toggle("show-info",s),t){const l=document.querySelector("header"),c=l.getBoundingClientRect().bottom;document.documentElement.scrollTop=this.scrollCache[n]||c,setTimeout(()=>{document.documentElement.scrollTop=this.scrollCache[n]||c},50)}this.lastTabShown=n}}var Mv=v_;function qv(n,t,i){const s=new bo(n.clipboardData||n.dataTransfer);if(!s.hasItems()||s.containsTabularData())return;const l=s.getImages();for(const c of l){const d="image-"+Math.random().toString(16).slice(2),h=window.baseUrl("/loading.gif");n.preventDefault(),setTimeout(()=>{t.insertContent(`

    `),b_(c,i).then(p=>{const g=p.name.replace(/"/g,""),y=`${g}`,m=t.dom.create("a",{target:"_blank",href:p.url},y);t.dom.replace(m,d)}).catch(p=>{t.dom.remove(d),window.$events.emit("error",trans("errors.image_upload_error")),console.log(p)})},10)}}async function b_(n,t){if(n===null||n.type.indexOf("image")!==0)throw new Error("Not an image file");let i="png";if(n.name){let d=n.name.match(/\.(.+)$/);d.length>1&&(i=d[1])}const s="image-"+Date.now()+"."+i,l=new FormData();l.append("file",n,s),l.append("uploaded_to",t.pageId);const c=await window.$http.post(window.baseUrl("/images/gallery"),l);return c.data}function y_(n){for(let t=1;t<5;t++)n.shortcuts.add("meta+"+t,"",["FormatBlock",!1,"h"+(t+1)]);n.shortcuts.add("meta+5","",["FormatBlock",!1,"p"]),n.shortcuts.add("meta+d","",["FormatBlock",!1,"p"]),n.shortcuts.add("meta+6","",["FormatBlock",!1,"blockquote"]),n.shortcuts.add("meta+q","",["FormatBlock",!1,"blockquote"]),n.shortcuts.add("meta+7","",["codeeditor",!1,"pre"]),n.shortcuts.add("meta+e","",["codeeditor",!1,"pre"]),n.shortcuts.add("meta+8","",["FormatBlock",!1,"code"]),n.shortcuts.add("meta+shift+E","",["FormatBlock",!1,"code"]),n.shortcuts.add("meta+S","",()=>{window.$events.emit("editor-save-draft")}),n.shortcuts.add("meta+13","",()=>{window.$events.emit("editor-save-page")}),n.shortcuts.add("meta+9","",function(){const t=n.selection.getNode(),i=t?t.closest(".callout"):null,s=["info","success","warning","danger"],l=s.findIndex(h=>i&&i.classList.contains(h)),c=(l+1)%s.length,d=s[c];n.formatter.apply("callout"+d)})}function w_(n){window.$http.get(window.baseUrl("/custom-head-content")).then(t=>{if(!t.data)return;let i=n.getDoc().querySelector("head");i.innerHTML+=t.data})}function k_(){function n(s){return s.className==="CodeMirrorContainer"}function t(s){const l=s.selection.getNode();if(!n(l)){const h=s.selection.getNode().textContent;window.components.first("code-editor").open(h,"",(p,g)=>{const y=document.createElement("div");y.innerHTML=`
    `,y.querySelector("code").innerText=p,s.formatter.toggle("pre");const m=s.selection.getNode();s.dom.setHTML(m,y.querySelector("pre").innerHTML),s.fire("SetContent"),s.focus()});return}let c=l.hasAttribute("data-lang")?l.getAttribute("data-lang"):"",d=l.querySelector("textarea").textContent;window.components.first("code-editor").open(d,c,(h,p)=>{const g=l.querySelector(".CodeMirror"),y=g.CodeMirror;y&&(Nt.setContent(y,h),Nt.setMode(y,p,h));const m=l.querySelector("textarea");m&&(m.textContent=h),l.setAttribute("data-lang",p),s.focus()})}function i(s){const l=s.querySelector("textarea"),c=l.textContent,d=s.getAttribute("data-lang");s.removeAttribute("contentEditable");const h=document.createElement("pre"),p=document.createElement("code");p.classList.add(`language-${d}`),p.textContent=c,h.appendChild(p),s.parentElement.replaceChild(h,s)}window.tinymce.PluginManager.add("codeeditor",function(s,l){const c=s.$;s.addButton("codeeditor",{text:"Code block",icon:!1,cmd:"codeeditor"}),s.addCommand("codeeditor",()=>{t(s)}),s.on("PreProcess",function(d){c("div.CodeMirrorContainer",d.node).each((h,p)=>{i(p)})}),s.on("dblclick",d=>{let h=s.selection.getNode();if(!n(h))return;t(s)}),s.on("SetContent",function(){c(".CodeMirrorContainer").filter((h,p)=>typeof p.querySelector(".CodeMirror").CodeMirror=="undefined").each((h,p)=>{i(p)});const d=c("body > pre").filter((h,p)=>p.contentEditable!=="false");if(!d.length)return;s.undoManager.transact(function(){d.each((h,p)=>{Nt.wysiwygView(p)})})})})}function x_(n,t,i){let s=null,l=null;function c(y){return y.hasAttribute("drawio-diagram")}function d(y,m=null){s=y,l=m,window.ImageManager.show(function(v){if(m){let w=m.querySelector("img");s.dom.setAttrib(w,"src",v.url),s.dom.setAttrib(m,"drawio-diagram",v.id)}else{let w=`
    `;s.insertContent(w)}},"drawio")}function h(y,m=null){s=y,l=m,dn.show(n,g,p)}async function p(y){const m="image-"+Math.random().toString(16).slice(2),v=window.baseUrl("/loading.gif");if(l){dn.close();let w=l.querySelector("img");try{const E=await dn.upload(y,i);s.dom.setAttrib(w,"src",E.url),s.dom.setAttrib(l,"drawio-diagram",E.id)}catch(E){window.$events.emit("error",trans("errors.image_upload_error")),console.log(E)}return}setTimeout(async()=>{s.insertContent(`
    `),dn.close();try{const w=await dn.upload(y,i);s.dom.setAttrib(m,"src",w.url),s.dom.get(m).parentNode.setAttribute("drawio-diagram",w.id)}catch(w){s.dom.remove(m),window.$events.emit("error",trans("errors.image_upload_error")),console.log(w)}},5)}function g(){if(!l)return Promise.resolve("");let y=l.getAttribute("drawio-diagram");return dn.load(y)}window.tinymce.PluginManager.add("drawio",function(y,m){y.addCommand("drawio",()=>{const v=y.selection.getNode();h(y,c(v)?v:null)}),y.addButton("drawio",{type:"splitbutton",tooltip:"Drawing",image:`data:image/svg+xml;base64,${btoa(` +`);this.cm.setValue(p),this.cm.setCursor(i),this.cm.focus(),dn.close()}).catch(d=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(d)})})}actionFullScreen(){const t=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(t){if(!t)return;const n=this.cm.getValue(),i=n.split(/\r?\n/);let s=i.findIndex(u=>u&&u.indexOf(t)!==-1);if(s===-1)return;this.cm.scrollIntoView({line:s},200),this.cm.focus(),this.cm.setCursor({line:s,char:i[s].length})}listenForBookStackEditorEvents(){function t({html:n,markdown:i}){return i||n}window.$events.listen("editor::replace",n=>{const i=t(n);this.cm.setValue(i)}),window.$events.listen("editor::append",n=>{const i=this.cm.getCursor("from"),s=t(n),u=this.cm.getValue()+` +`+s;this.cm.setValue(u),this.cm.setCursor(i.line,i.ch)}),window.$events.listen("editor::prepend",n=>{const i=this.cm.getCursor("from"),s=t(n),u=s+` +`+this.cm.getValue();this.cm.setValue(u);const c=s.split(` +`).length;this.cm.setCursor(i.line+c,i.ch)}),window.$events.listen("editor::insert",n=>{const i=t(n);this.cm.replaceSelection(i)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}}var uv=Ex;class Dx{constructor(t){this.elem=t,this.inviteOption=t.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){const t=this.inviteOption.value==="true",n=this.elem.querySelectorAll("input[type=password]");for(const s of n)s.disabled=t;const i=this.elem.querySelector("#password-input-container");i&&(i.style.display=t?"none":"block")}}var cv=Dx;class Ax{constructor(t){this.elem=t,this.type=t.getAttribute("notification"),this.textElem=t.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,n=>{this.show(n)}),t.addEventListener("click",this.hide.bind(this)),t.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(t=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=t,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){const n=t.split(" ").length,i=Math.max(2e3,1e3+250*n);setTimeout(this.hide.bind(this),i)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}}var dv=Ax;class Tx{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){it(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),it(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}}var hv=Tx;class Lx{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.formContainer=this.$refs.formContainer,this.commentCountBar=this.$refs.commentCountBar,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.updatedText=this.$opts.updatedText,this.deletedText=this.$opts.deletedText,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(t){let n=t.target.closest("[action]");if(t.target.matches('a[href^="#"]')){const u=t.target.href.split("#")[1];ro(document.querySelector("#"+u))}if(n===null)return;t.preventDefault();const i=n.getAttribute("action"),s=n.closest("[comment]");i==="edit"&&this.editComment(s),i==="closeUpdateForm"&&this.closeUpdateForm(),i==="delete"&&this.deleteComment(s),i==="addComment"&&this.showForm(),i==="hideForm"&&this.hideForm(),i==="reply"&&this.setReply(s),i==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){if(!this.editingComment)return;this.editingComment.querySelector("[comment-content]").style.display="block",this.editingComment.querySelector("[comment-edit-container]").style.display="none"}editComment(t){this.hideForm(),this.editingComment&&this.closeUpdateForm(),t.querySelector("[comment-content]").style.display="none",t.querySelector("[comment-edit-container]").style.display="block";let n=t.querySelector("[comment-edit-container] textarea"),i=n.value.split(` +`).length;n.style.height=i*20+40+"px",this.editingComment=t}updateComment(t){let n=t.target;t.preventDefault();let i=n.querySelector("textarea").value,s={text:i,parent_id:this.parentId||null};this.showLoading(n);let u=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${u}`,s).then(c=>{let d=document.createElement("div");d.innerHTML=c.data,this.editingComment.innerHTML=d.children[0].innerHTML,window.$events.success(this.updatedText),window.components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window.$events.showValidationErrors).then(()=>{this.hideLoading(n)})}deleteComment(t){let n=t.getAttribute("comment");this.showLoading(t.querySelector("[comment-content]")),window.$http.delete(`/comment/${n}`).then(i=>{t.parentNode.removeChild(t),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(t){t.preventDefault(),t.stopPropagation();let n=this.formInput.value,i={text:n,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,i).then(s=>{let u=document.createElement("div");u.innerHTML=s.data;let c=u.children[0];this.container.appendChild(c),window.components.init(c),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(s=>{window.$events.showValidationErrors(s),this.hideLoading(this.form)})}updateCount(){let t=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,t,{count:t})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(t){this.showForm(),this.parentId=Number(t.getAttribute("local-id")),this.replyToRow.style.display="block";const n=this.replyToRow.querySelector("a");n.textContent=`#${this.parentId}`,n.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(t){const n=t.querySelectorAll(".form-group");for(let i of n)i.style.display="none";t.querySelector(".form-group.loading").style.display="block"}hideLoading(t){const n=t.querySelectorAll(".form-group");for(let i of n)i.style.display="block";t.querySelector(".form-group.loading").style.display="none"}}var fv=Lx;const pv=$e(Ks());class Ix{constructor(t){if(this.elem=t,this.pageId=t.getAttribute("page-display"),Nt.highlight(),this.setupPointer(),this.setupNavHighlighting(),window.location.hash){let i=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(i)}const n=document.querySelector(".sidebar-page-nav");n&&zt(n,"a","click",(i,s)=>{i.preventDefault(),window.components["tri-layout"][0].showContent();const u=s.getAttribute("href").substr(1);this.goToText(u),window.history.pushState(null,null,"#"+u)})}goToText(t){const n=document.getElementById(t);if(xa(".page-content [data-highlighted]",i=>{i.removeAttribute("data-highlighted"),i.style.backgroundColor=null}),n!==null)ro(n);else{const i=Jm(".page-content > div > *",t);i&&ro(i)}}setupPointer(){let t=document.getElementById("pointer");if(!t)return;t=t.parentNode.removeChild(t);const n=t.querySelector("div.pointer");let i=!1,s=!1,u=!0,c="";zt(t,"input","click",(h,p)=>{p.select(),h.stopPropagation()}),_a(t,["click","focus"],h=>{h.stopPropagation()}),zt(t,"span.icon","click",(h,p)=>{h.stopPropagation(),u=!u,p.querySelector('[data-icon="include"]').style.display=u?"none":"inline",p.querySelector('[data-icon="link"]').style.display=u?"inline":"none",d()}),new pv.default(t.querySelector("button")),_a(document.body,["click","focus"],h=>{if(!i||s)return;t=t.parentElement.removeChild(t),i=!1});let d=h=>{let p=u?window.baseUrl(`/link/${this.pageId}#${c}`):`{{@${this.pageId}#${c}}}`;u&&!p.startsWith("http")&&(p=window.location.protocol+"//"+window.location.host+p),t.querySelector("input").value=p;const g=t.querySelector("#pointer-edit");if(g&&h){const y=g.dataset.editHref,m=h.id,b=h.textContent&&h.textContent.substring(0,50);g.href=`${y}?content-id=${m}&content-text=${encodeURIComponent(b)}`}};xa('.page-content [id^="bkmrk"]',h=>{_a(h,["mouseup","keyup"],p=>{p.stopPropagation();let g=window.getSelection();if(g.toString().length===0)return;c=h.id,d(h),h.parentNode.insertBefore(t,h),t.style.display="block",i=!0,s=!0,requestAnimationFrame(()=>{const y=h.getBoundingClientRect();let m=p.pageX-y.left-164;m<0&&(m=0);const b=m/y.width*100;n.style.left=b+"%",setTimeout(()=>{s=!1},100)})})})}setupNavHighlighting(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window)||!("intersectionRatio"in window.IntersectionObserverEntry.prototype))return;let t=document.querySelector(".sidebar-page-nav"),n=document.querySelector(".page-content").querySelectorAll("h1, h2, h3, h4, h5, h6");n.length>0&&t!==null&&i(n);function i(c){let d={rootMargin:"0px 0px 0px 0px",threshold:1},h=new IntersectionObserver(s,d);for(let p of c)h.observe(p)}function s(c,d){for(let h of c){let p=h.intersectionRatio===1;u(h.target.id,p)}}function u(c,d){xa('a[href="#'+c+'"]',h=>{h.closest("li").classList.toggle("current-heading",d)})}}}var mv=Ix;function gv(t){let n=new Date(t*1e3),i=n.getHours(),s=n.getMinutes();return`${(i>9?"":"0")+i}:${(s>9?"":"0")+s}`}class Fx{setup(){this.draftsEnabled=this.$opts.draftsEnabled==="true",this.editorType=this.$opts.editorType,this.pageId=Number(this.$opts.pageId),this.isNewDraft=this.$opts.pageNewDraft==="true",this.hasDefaultTitle=this.$opts.isDefaultTitle||!1,this.container=this.$el,this.titleElem=this.$refs.titleContainer.querySelector("input"),this.saveDraftButton=this.$refs.saveDraft,this.discardDraftButton=this.$refs.discardDraft,this.discardDraftWrap=this.$refs.discardDraftWrap,this.draftDisplay=this.$refs.draftDisplay,this.draftDisplayIcon=this.$refs.draftDisplayIcon,this.changelogInput=this.$refs.changelogInput,this.changelogDisplay=this.$refs.changelogDisplay,this.draftText=this.$opts.draftText,this.autosaveFailText=this.$opts.autosaveFailText,this.editingPageText=this.$opts.editingPageText,this.draftDiscardedText=this.$opts.draftDiscardedText,this.setChangelogText=this.$opts.setChangelogText,this.editorHTML="",this.editorMarkdown="",this.autoSave={interval:null,frequency:3e4,last:0},this.pageId!==0&&this.draftsEnabled&&window.setTimeout(()=>{this.startAutoSave()},1e3),this.draftDisplay.innerHTML=this.draftText,this.setupListeners(),this.setInitialFocus()}setupListeners(){window.$events.listen("editor-save-draft",this.saveDraft.bind(this)),window.$events.listen("editor-save-page",this.savePage.bind(this)),window.$events.listen("editor-html-change",t=>{this.editorHTML=t}),window.$events.listen("editor-markdown-change",t=>{this.editorMarkdown=t}),this.changelogInput.addEventListener("change",this.updateChangelogDisplay.bind(this)),it(this.saveDraftButton,this.saveDraft.bind(this)),it(this.discardDraftButton,this.discardDraft.bind(this))}setInitialFocus(){if(this.hasDefaultTitle)return this.titleElem.select();window.setTimeout(()=>{window.$events.emit("editor::focus","")},500)}startAutoSave(){let t=this.titleElem.value.trim()+"::"+this.editorHTML;this.autoSaveInterval=window.setInterval(()=>{let n=Date.now()-this.autoSave.last{this.draftDisplayIcon.classList.remove("visible")},2e3)}async discardDraft(){let t;try{t=await window.$http.get(`/ajax/page/${this.pageId}`)}catch(n){return console.error(n)}this.autoSave.interval&&window.clearInterval(this.autoSave.interval),this.draftDisplay.innerText=this.editingPageText,this.toggleDiscardDraftVisibility(!1),window.$events.emit("editor-html-update",t.data.html||""),window.$events.emit("editor-markdown-update",t.data.markdown||t.data.html),this.titleElem.value=t.data.name,window.setTimeout(()=>{this.startAutoSave()},1e3),window.$events.emit("success",this.draftDiscardedText)}updateChangelogDisplay(){let t=this.changelogInput.value.trim();t.length===0?t=this.setChangelogText:t.length>16&&(t=t.slice(0,16)+"..."),this.changelogDisplay.innerText=t}toggleDiscardDraftVisibility(t){this.discardDraftWrap.classList.toggle("hidden",!t)}}var vv=Fx;class Mx{constructor(t){this.elem=t,this.input=t.querySelector("input"),this.resetButton=t.querySelector("[page-picker-reset]"),this.selectButton=t.querySelector("[page-picker-select]"),this.display=t.querySelector("[page-picker-display]"),this.defaultDisplay=t.querySelector("[page-picker-default]"),this.buttonSep=t.querySelector("span.sep"),this.value=this.input.value,this.setupListeners()}setupListeners(){this.selectButton.addEventListener("click",this.showPopup.bind(this)),this.display.parentElement.addEventListener("click",this.showPopup.bind(this)),this.resetButton.addEventListener("click",t=>{this.setValue("","")})}showPopup(){window.EntitySelectorPopup.show(t=>{this.setValue(t.id,t.name)})}setValue(t,n){this.value=t,this.input.value=t,this.controlView(n)}controlView(t){let n=this.value&&this.value!==0;if(Ya(this.resetButton,n),Ya(this.buttonSep,n),Ya(this.defaultDisplay,!n),Ya(this.display,n),n){let i=this.getAssetIdFromVal();this.display.textContent=`#${i}, ${t}`,this.display.href=window.baseUrl(`/link/${i}`)}}getAssetIdFromVal(){return Number(this.value)}}function Ya(t,n){let i=t.tagName==="BUTTON"||t.tagName==="SPAN"?"inline-block":"block";t.style.display=n?i:"none"}var bv=Mx;class qx{constructor(t){this.container=t;const n=t.querySelector("[permissions-table-toggle-all]");n.addEventListener("click",this.toggleAllClick.bind(this));const i=t.querySelectorAll("[permissions-table-toggle-all-in-row]");for(let u of i)u.addEventListener("click",this.toggleRowClick.bind(this));const s=t.querySelectorAll("[permissions-table-toggle-all-in-column]");for(let u of s)u.addEventListener("click",this.toggleColumnClick.bind(this))}toggleAllClick(t){t.preventDefault(),this.toggleAllInElement(this.container)}toggleRowClick(t){t.preventDefault(),this.toggleAllInElement(t.target.closest("tr"))}toggleColumnClick(t){t.preventDefault();const n=t.target.closest("th,td"),i=Array.from(n.parentElement.children).indexOf(n),s=n.closest("table").querySelectorAll("tr"),u=[];for(let c of s){const d=c.children[i];d&&u.push(...d.querySelectorAll("input[type=checkbox]"))}this.toggleAllInputs(u)}toggleAllInElement(t){const n=t.querySelectorAll("input[type=checkbox]");this.toggleAllInputs(n)}toggleAllInputs(t){const n=t.length>0?t[0].checked:!1;for(let i of t)i.checked=!n,i.dispatchEvent(new Event("change"))}}var yv=qx;class zx{setup(){this.container=this.$el,this.hideButtons=this.$manyRefs.hide||[],this.onkeyup=null,this.onHide=null,this.setupListeners()}setupListeners(){let t=null;this.container.addEventListener("mousedown",n=>{t=n.target}),this.container.addEventListener("click",n=>{if(n.target===this.container&&t===this.container)return this.hide()}),it(this.hideButtons,n=>this.hide())}hide(t=null){Ga(this.container,240,t),this.onkeyup&&(window.removeEventListener("keyup",this.onkeyup),this.onkeyup=null),this.onHide&&this.onHide()}show(t=null,n=null){qg(this.container,240,t),this.onkeyup=i=>{i.key==="Escape"&&this.hide()},window.addEventListener("keyup",this.onkeyup),this.onHide=n}}var wv=zx;class Px{constructor(t){this.elem=t,this.colorInput=t.querySelector("input[type=color]"),this.lightColorInput=t.querySelector('input[name="setting-app-color-light"]'),this.resetButton=t.querySelector("[setting-app-color-picker-reset]"),this.defaultButton=t.querySelector("[setting-app-color-picker-default]"),this.colorInput.addEventListener("change",this.updateColor.bind(this)),this.colorInput.addEventListener("input",this.updateColor.bind(this)),this.resetButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.current,this.updateColor()}),this.defaultButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.default,this.updateColor()})}updateColor(){const t=this.colorInput.value,n=this.hexToRgb(t),i="rgba("+[n.r,n.g,n.b,"0.15"].join(",")+")";this.lightColorInput.value=i;const s=document.getElementById("custom-styles"),u=s.getAttribute("data-color"),c=s.getAttribute("data-color-light");s.innerHTML=s.innerHTML.split(u).join(t),s.innerHTML=s.innerHTML.split(c).join(i),s.setAttribute("data-color",t),s.setAttribute("data-color-light",i)}hexToRgb(t){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return{r:n?parseInt(n[1],16):0,g:n?parseInt(n[2],16):0,b:n?parseInt(n[3],16):0}}}var kv=Px;class Rx{constructor(t){this.elem=t,this.colorInput=t.querySelector("input[type=color]"),this.resetButton=t.querySelector("[setting-color-picker-reset]"),this.defaultButton=t.querySelector("[setting-color-picker-default]"),this.resetButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.current}),this.defaultButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.default})}}var xv=Rx;class Ox{constructor(t){this.elem=t,this.input=document.getElementById("books-input"),this.shelfBooksList=t.querySelector("[shelf-sort-assigned-books]"),this.initSortable(),this.setupListeners()}initSortable(){const t=this.elem.querySelectorAll(".scroll-box");for(let n of t)new hi(n,{group:"shelf-books",ghostClass:"primary-background-light",animation:150,onSort:this.onChange.bind(this)})}setupListeners(){this.elem.addEventListener("click",t=>{const n=t.target.closest(".scroll-box-item:not(.instruction)");n&&(t.preventDefault(),this.sortItemClick(n))})}sortItemClick(t){const n=this.elem.querySelectorAll(".scroll-box"),i=Array.from(n).filter(s=>t.parentElement!==s);i.length>0&&i[0].appendChild(t),this.onChange()}onChange(){const t=Array.from(this.shelfBooksList.querySelectorAll("[data-id]"));this.input.value=t.map(n=>n.getAttribute("data-id")).join(",")}}var _v=Ox;class Nx{constructor(t){this.elem=t,this.toggleElem=t.querySelector(".sidebar-toggle"),this.toggleElem.addEventListener("click",this.toggle.bind(this))}toggle(t=!0){this.elem.classList.toggle("open")}}var Cv=Nx;class Bx{setup(){this.container=this.$el,this.handleSelector=this.$opts.handleSelector;const t=new hi(this.container,{handle:this.handleSelector,animation:150,onSort:()=>{this.$emit("sort",{ids:t.toArray()})},setData(n,i){const s=i.getAttribute("data-drag-content");if(s){const u=JSON.parse(s);for(const[c,d]of Object.entries(u))n.setData(c,d)}},revertOnSpill:!0,dropBubble:!0,dragoverBubble:!1})}}var Sv=Bx;class jx{setup(){this.$el.addEventListener("change",()=>{const t=this.$el.closest("form");t&&t.submit()})}}var Ev=jx;class Hx{setup(){this.tabContentsByName={},this.tabButtonsByName={},this.allContents=[],this.allButtons=[];for(const[t,n]of Object.entries(this.$manyRefs||{})){if(t.startsWith("toggle")){const i=t.replace("toggle","").toLowerCase();it(n,s=>this.show(i)),this.allButtons.push(...n),this.tabButtonsByName[i]=n}if(t.startsWith("content")){const i=t.replace("content","").toLowerCase();this.tabContentsByName[i]=n,this.allContents.push(...n)}}}show(t){this.allContents.forEach(s=>{s.classList.add("hidden"),s.classList.remove("selected")}),this.allButtons.forEach(s=>s.classList.remove("selected"));const n=this.tabContentsByName[t]||[],i=this.tabButtonsByName[t]||[];n.length>0&&(n.forEach(s=>{s.classList.remove("hidden"),s.classList.add("selected")}),i.forEach(s=>s.classList.add("selected")))}}var Dv=Hx;class Ux{setup(){this.addRemoveComponentEl=this.$refs.addRemove,this.container=this.$el,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.container.addEventListener("change",t=>{const n=this.addRemoveComponentEl.components["add-remove-rows"];this.hasEmptyRows()||n.add()})}hasEmptyRows(){const t=this.container.querySelectorAll(this.rowSelector),n=[...t].find(i=>[...i.querySelectorAll("input")].filter(s=>s.value).length===0);return n!==void 0}}var Av=Ux;class Wx{constructor(t){this.elem=t,this.list=t.querySelector("[template-manager-list]"),this.searching=!1,zt(this.elem,"[template-action]","click",this.handleTemplateActionClick.bind(this)),zt(this.elem,".pagination a","click",this.handlePaginationClick.bind(this)),zt(this.elem,".template-item-content","click",this.handleTemplateItemClick.bind(this)),zt(this.elem,".template-item","dragstart",this.handleTemplateItemDragStart.bind(this)),this.setupSearchBox()}handleTemplateItemClick(t,n){const i=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(i,"replace")}handleTemplateItemDragStart(t,n){const i=n.closest("[template-id]").getAttribute("template-id");t.dataTransfer.setData("bookstack/template",i),t.dataTransfer.setData("text/plain",i)}handleTemplateActionClick(t,n){t.stopPropagation();const i=n.getAttribute("template-action"),s=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(s,i)}async insertTemplate(t,n="replace"){const i=await window.$http.get(`/templates/${t}`),s="editor::"+n;window.$events.emit(s,i.data)}async handlePaginationClick(t,n){t.preventDefault();const i=n.getAttribute("href"),s=await window.$http.get(i);this.list.innerHTML=s.data}setupSearchBox(){const t=this.elem.querySelector(".search-box");if(!t)return;const n=t.querySelector("input"),i=t.querySelector("button"),s=t.querySelector("button.search-box-cancel");async function u(){const c=n.value,d=await window.$http.get("/templates",{search:c});s.style.display=c?"block":"none",this.list.innerHTML=d.data}u=u.bind(this),t.addEventListener("keypress",c=>{c.key==="Enter"&&(c.preventDefault(),u())}),i.addEventListener("click",c=>{u()}),s.addEventListener("click",c=>{n.value="",u()})}}var Tv=Wx;class $x{constructor(t){this.elem=t,this.input=t.querySelector("input[type=hidden]"),this.checkbox=t.querySelector("input[type=checkbox]"),this.checkbox.addEventListener("change",this.stateChange.bind(this))}stateChange(){this.input.value=this.checkbox.checked?"true":"false";const t=new Event("change");this.input.dispatchEvent(t)}}var Lv=$x;class Gx{constructor(t){this.elem=t,this.lastLayoutType="none",this.onDestroy=null,this.scrollCache={content:0,info:0},this.lastTabShown="content",this.mobileTabClick=this.mobileTabClick.bind(this),this.updateLayout(),window.addEventListener("resize",n=>{this.updateLayout()},{passive:!0})}updateLayout(){let t="tablet";if(window.innerWidth<=1e3&&(t="mobile"),window.innerWidth>=1400&&(t="desktop"),t===this.lastLayoutType)return;this.onDestroy&&(this.onDestroy(),this.onDestroy=null),t==="desktop"?this.setupDesktop():t==="mobile"&&this.setupMobile(),this.lastLayoutType=t}setupMobile(){const t=document.querySelectorAll("[tri-layout-mobile-tab]");for(let n of t)n.addEventListener("click",this.mobileTabClick);this.onDestroy=()=>{for(let n of t)n.removeEventListener("click",this.mobileTabClick)}}setupDesktop(){}mobileTabClick(t){const n=t.target.getAttribute("tri-layout-mobile-tab");this.showTab(n)}showContent(){this.showTab("content",!1)}showTab(t,n=!0){this.scrollCache[this.lastTabShown]=document.documentElement.scrollTop;const i=document.querySelectorAll(".tri-layout-mobile-tab");for(let u of i){const c=u.getAttribute("tri-layout-mobile-tab")===t;u.classList.toggle("active",c)}const s=t==="info";if(this.elem.classList.toggle("show-info",s),n){const u=document.querySelector("header"),c=u.getBoundingClientRect().bottom;document.documentElement.scrollTop=this.scrollCache[t]||c,setTimeout(()=>{document.documentElement.scrollTop=this.scrollCache[t]||c},50)}this.lastTabShown=t}}var Iv=Gx;function Fv(t,n,i){const s=new bo(t.clipboardData||t.dataTransfer);if(!s.hasItems()||s.containsTabularData())return;const u=s.getImages();for(const c of u){const d="image-"+Math.random().toString(16).slice(2),h=window.baseUrl("/loading.gif");t.preventDefault(),setTimeout(()=>{n.insertContent(`

    `),Kx(c,i).then(p=>{const g=p.name.replace(/"/g,""),y=`${g}`,m=n.dom.create("a",{target:"_blank",href:p.url},y);n.dom.replace(m,d)}).catch(p=>{n.dom.remove(d),window.$events.emit("error",trans("errors.image_upload_error")),console.log(p)})},10)}}async function Kx(t,n){if(t===null||t.type.indexOf("image")!==0)throw new Error("Not an image file");let i="png";if(t.name){let d=t.name.match(/\.(.+)$/);d.length>1&&(i=d[1])}const s="image-"+Date.now()+"."+i,u=new FormData;u.append("file",t,s),u.append("uploaded_to",n.pageId);const c=await window.$http.post(window.baseUrl("/images/gallery"),u);return c.data}function Vx(t){for(let n=1;n<5;n++)t.shortcuts.add("meta+"+n,"",["FormatBlock",!1,"h"+(n+1)]);t.shortcuts.add("meta+5","",["FormatBlock",!1,"p"]),t.shortcuts.add("meta+d","",["FormatBlock",!1,"p"]),t.shortcuts.add("meta+6","",["FormatBlock",!1,"blockquote"]),t.shortcuts.add("meta+q","",["FormatBlock",!1,"blockquote"]),t.shortcuts.add("meta+7","",["codeeditor",!1,"pre"]),t.shortcuts.add("meta+e","",["codeeditor",!1,"pre"]),t.shortcuts.add("meta+8","",["FormatBlock",!1,"code"]),t.shortcuts.add("meta+shift+E","",["FormatBlock",!1,"code"]),t.shortcuts.add("meta+S","",()=>{window.$events.emit("editor-save-draft")}),t.shortcuts.add("meta+13","",()=>{window.$events.emit("editor-save-page")}),t.shortcuts.add("meta+9","",function(){const n=t.selection.getNode(),i=n?n.closest(".callout"):null,s=["info","success","warning","danger"],u=s.findIndex(h=>i&&i.classList.contains(h)),c=(u+1)%s.length,d=s[c];t.formatter.apply("callout"+d)})}function Yx(t){window.$http.get(window.baseUrl("/custom-head-content")).then(n=>{if(!n.data)return;let i=t.getDoc().querySelector("head");i.innerHTML+=n.data})}function Xx(){function t(s){return s.className==="CodeMirrorContainer"}function n(s){const u=s.selection.getNode();if(!t(u)){const h=s.selection.getNode().textContent;window.components.first("code-editor").open(h,"",(p,g)=>{const y=document.createElement("div");y.innerHTML=`
    `,y.querySelector("code").innerText=p,s.formatter.toggle("pre");const m=s.selection.getNode();s.dom.setHTML(m,y.querySelector("pre").innerHTML),s.fire("SetContent"),s.focus()});return}let c=u.hasAttribute("data-lang")?u.getAttribute("data-lang"):"",d=u.querySelector("textarea").textContent;window.components.first("code-editor").open(d,c,(h,p)=>{const g=u.querySelector(".CodeMirror"),y=g.CodeMirror;y&&(Nt.setContent(y,h),Nt.setMode(y,p,h));const m=u.querySelector("textarea");m&&(m.textContent=h),u.setAttribute("data-lang",p),s.focus()})}function i(s){const u=s.querySelector("textarea"),c=u.textContent,d=s.getAttribute("data-lang");s.removeAttribute("contentEditable");const h=document.createElement("pre"),p=document.createElement("code");p.classList.add(`language-${d}`),p.textContent=c,h.appendChild(p),s.parentElement.replaceChild(h,s)}window.tinymce.PluginManager.add("codeeditor",function(s,u){const c=s.$;s.addButton("codeeditor",{text:"Code block",icon:!1,cmd:"codeeditor"}),s.addCommand("codeeditor",()=>{n(s)}),s.on("PreProcess",function(d){c("div.CodeMirrorContainer",d.node).each((h,p)=>{i(p)})}),s.on("dblclick",d=>{let h=s.selection.getNode();if(!t(h))return;n(s)}),s.on("SetContent",function(){c(".CodeMirrorContainer").filter((h,p)=>typeof p.querySelector(".CodeMirror").CodeMirror=="undefined").each((h,p)=>{i(p)});const d=c("body > pre").filter((h,p)=>p.contentEditable!=="false");if(!d.length)return;s.undoManager.transact(function(){d.each((h,p)=>{Nt.wysiwygView(p)})})})})}function Zx(t,n,i){let s=null,u=null;function c(y){return y.hasAttribute("drawio-diagram")}function d(y,m=null){s=y,u=m,window.ImageManager.show(function(b){if(m){let w=m.querySelector("img");s.dom.setAttrib(w,"src",b.url),s.dom.setAttrib(m,"drawio-diagram",b.id)}else{let w=`
    `;s.insertContent(w)}},"drawio")}function h(y,m=null){s=y,u=m,dn.show(t,g,p)}async function p(y){const m="image-"+Math.random().toString(16).slice(2),b=window.baseUrl("/loading.gif");if(u){dn.close();let w=u.querySelector("img");try{const D=await dn.upload(y,i);s.dom.setAttrib(w,"src",D.url),s.dom.setAttrib(u,"drawio-diagram",D.id)}catch(D){window.$events.emit("error",trans("errors.image_upload_error")),console.log(D)}return}setTimeout(async()=>{s.insertContent(`
    `),dn.close();try{const w=await dn.upload(y,i);s.dom.setAttrib(m,"src",w.url),s.dom.get(m).parentNode.setAttribute("drawio-diagram",w.id)}catch(w){s.dom.remove(m),window.$events.emit("error",trans("errors.image_upload_error")),console.log(w)}},5)}function g(){if(!u)return Promise.resolve("");let y=u.getAttribute("drawio-diagram");return dn.load(y)}window.tinymce.PluginManager.add("drawio",function(y,m){y.addCommand("drawio",()=>{const b=y.selection.getNode();h(y,c(b)?b:null)}),y.addButton("drawio",{type:"splitbutton",tooltip:"Drawing",image:`data:image/svg+xml;base64,${btoa(` -`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let v=y.selection.getNode();d(y,c(v)?v:null)}}]}),y.on("dblclick",v=>{let w=y.selection.getNode();if(!c(w))return;h(y,w)}),y.on("SetContent",function(){const v=y.$("body > div[drawio-diagram]");if(!v.length)return;y.undoManager.transact(function(){v.each((w,E)=>{E.setAttribute("contenteditable","false")})})})})}function __(){window.tinymce.PluginManager.add("customhr",function(n){n.addCommand("InsertHorizontalRule",function(){let t=document.createElement("hr"),i=n.selection.getNode(),s=i.parentNode;s.insertBefore(t,i)}),n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function S_(n){window.$events.listen("editor::replace",({html:t})=>{n.setContent(t)}),window.$events.listen("editor::append",({html:t})=>{const i=n.getContent()+t;n.setContent(i)}),window.$events.listen("editor::prepend",({html:t})=>{const i=t+n.getContent();n.setContent(i)}),window.$events.listen("editor::insert",({html:t})=>{n.insertContent(t)}),window.$events.listen("editor::focus",()=>{n.focus()})}class C_{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image table textcolor paste link autolink fullscreen code customhr autosave lists codeeditor media",this.loadPlugins(),this.tinyMceConfig=this.getTinyMceConfig(),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig)}loadPlugins(){k_(),__();const n=document.querySelector("[drawio-url]");if(n){const t=n.getAttribute("drawio-url");x_(t,this.isDarkMode,this.pageId),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){const n=this.textDirection==="rtl"?"ltr rtl":"";return`undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr drawio media | removeformat code ${n} fullscreen`}getTinyMceConfig(){const n=this;return{selector:"#html-editor",content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:this.isDarkMode?"dark":"lightgray",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,directionality:this.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram]",automatic_uploads:!1,valid_children:"-div[p|h1|h2|h3|h4|h5|h6|blockquote],+div[pre],+div[img]",plugins:this.plugins,imagetools_toolbar:"imageoptions",toolbar:this.getToolBar(),content_style:`html, body, html.dark-mode {background: ${this.isDarkMode?"#222":"#fff"};} body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}`,style_formats:[{title:"Header Large",format:"h2"},{title:"Header Medium",format:"h3"},{title:"Header Small",format:"h4"},{title:"Header Tiny",format:"h5"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Code Block",icon:"code",cmd:"codeeditor",format:"codeeditor"},{title:"Inline Code",icon:"code",inline:"code"},{title:"Callouts",items:[{title:"Info",format:"calloutinfo"},{title:"Success",format:"calloutsuccess"},{title:"Warning",format:"calloutwarning"},{title:"Danger",format:"calloutdanger"}]}],style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:{codeeditor:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div"},alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-right"},calloutsuccess:{block:"p",exact:!0,attributes:{class:"callout success"}},calloutinfo:{block:"p",exact:!0,attributes:{class:"callout info"}},calloutwarning:{block:"p",exact:!0,attributes:{class:"callout warning"}},calloutdanger:{block:"p",exact:!0,attributes:{class:"callout danger"}}},file_browser_callback:function(t,i,s,l){s==="file"&&window.EntitySelectorPopup.show(function(c){const d=l.document.getElementById(t);d.value=c.link;const h=d.closest(".mce-form"),p=h.querySelectorAll("input");p[1].value||(p[1].value=c.name),p[2].value=c.name}),s==="image"&&window.ImageManager.show(function(c){if(l.document.getElementById(t).value=c.url,"createEvent"in document){let h=document.createEvent("HTMLEvents");h.initEvent("change",!1,!0),l.document.getElementById(t).dispatchEvent(h)}else l.document.getElementById(t).fireEvent("onchange");let d=``;d+=`${c.name}`,d+="",l.tinyMCE.activeEditor.execCommand("mceInsertContent",!1,d)},"gallery")},paste_preprocess:function(t,i){let s=i.content;s.indexOf('{i();const h=new URL(window.location).searchParams,p=h.get("content-id");p&&s(p);const g=t.getContainer(),y=g.querySelectorAll(".mce-btn");for(let m of y)m.addEventListener("touchstart",v=>{v.stopPropagation()});window.editor=t});function i(){const h=t.getContent();n.isDarkMode&&t.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change",h)}function s(h){const p=t.dom.get(encodeURIComponent(h).replace(/!/g,"%21"));if(!p)return;p.scrollIntoView(),t.selection.select(p,!0),t.selection.collapse(!1),t.focus()}S_(t),window.$events.listen("editor-html-update",h=>{t.setContent(h),t.selection.select(t.getBody(),!0),t.selection.collapse(!1),i(h)}),y_(t);let l,c;function d(h){return h&&!!(h.textContent||h.innerText)}t.on("dragstart",function(){let h=t.selection.getNode();h.nodeName==="IMG"&&(l=t.dom.getParent(h,".mceTemp"),!l&&h.parentNode.nodeName==="A"&&!d(h.parentNode)&&(l=h.parentNode)),h.hasAttribute("contenteditable")&&h.getAttribute("contenteditable")==="false"&&(c=h)}),t.on("drop",function(h){let p=t.dom,g=tinymce.dom.RangeUtils.getCaretRangeFromPoint(h.clientX,h.clientY,t.getDoc());const y=h.dataTransfer&&h.dataTransfer.getData("bookstack/template");y&&(h.preventDefault(),window.$http.get(`/templates/${y}`).then(m=>{t.selection.setRng(g),t.undoManager.transact(function(){t.execCommand("mceInsertContent",!1,m.data.html)})})),p.getParent(g.startContainer,".mceTemp")?h.preventDefault():l&&(h.preventDefault(),t.undoManager.transact(function(){t.selection.setRng(g),t.selection.setNode(l),p.remove(l)})),!h.isDefaultPrevented()&&c&&(h.preventDefault(),t.undoManager.transact(function(){const m=t.selection.getNode(),v=t.selection.getRng(),w=m.closest("body > *");v.startOffset>v.startContainer.length/2?t.$(w).after(c):t.$(w).before(c)})),h.isDefaultPrevented()||qv(h,t,n),l=null}),t.addButton("image-insert",{title:"My title",icon:"image",tooltip:"Insert an image",onclick:function(){window.ImageManager.show(function(h){let p=``;p+=`${h.name}`,p+="",t.execCommand("mceInsertContent",!1,p)},"gallery")}}),t.on("paste",h=>qv(h,t,n)),window.$events.emitPublic(n.elem,"editor-tinymce::setup",{editor:t})}}}}var zv=C_;const Ov=$e(zh()),Pv={"add-remove-rows":og,"ajax-delete-row":ag,"ajax-form":sg,attachments:lg,"auto-suggest":ug,"back-to-top":cg,"book-sort":qg,"breadcrumb-listing":zg,"chapter-toggle":Pg,"code-editor":Hg,"code-highlighter":Ug,collapsible:Wg,"custom-checkbox":jg,"details-highlighter":$g,dropdown:Gg,dropzone:Vg,"editor-toolbox":Yg,"entity-permissions-editor":Xg,"entity-search":Zg,"entity-selector":Qg,"entity-selector-popup":Jg,"event-emit-select":ev,"expand-toggle":tv,"header-mobile-toggle":Ov.default,"homepage-control":nv,"image-manager":rv,"image-picker":iv,index:Xa,"list-sort-control":ov,"markdown-editor":dv,"new-user-password":hv,notification:fv,"optional-input":pv,"page-comments":mv,"page-display":vv,"page-editor":yv,"page-picker":wv,"permissions-table":kv,popup:xv,"setting-app-color-picker":_v,"setting-color-picker":Sv,"shelf-sort":Cv,sidebar:Ev,"sortable-list":Dv,"submit-on-change":Av,tabs:Tv,"tag-manager":Lv,"template-manager":Iv,"toggle-switch":Fv,"tri-layout":Mv,"wysiwyg-editor":zv};window.components={};function E_(n,t){const i=t.querySelectorAll(`[${n}]`);for(let s=0,l=i.length;s{d.from=s;const h=new CustomEvent(`${n}-${c}`,{bubbles:!0,detail:d});s.$el.dispatchEvent(h)},typeof s.setup=="function"&&s.setup()}catch(l){console.error("Failed to create component",l,n,t)}typeof window.components[n]=="undefined"&&(window.components[n]=[]),window.components[n].push(s),typeof t.components=="undefined"&&(t.components={}),t.components[n]=s}function D_(n,t){const i={},s={},l=`${n}@`,c=`[refs*="${l}"]`,d=[...t.querySelectorAll(c)];t.matches(c)&&d.push(t);for(const h of d){const p=h.getAttribute("refs").split(" ").filter(g=>g.startsWith(l)).map(g=>g.replace(l,"")).map(Nv);for(const g of p)i[g]=h,typeof s[g]=="undefined"&&(s[g]=[]),s[g].push(h)}return{refs:i,manyRefs:s}}function A_(n,t){const i={},s=`option:${n}:`;for(const{name:l,value:c}of t.attributes)if(l.startsWith(s)){const d=l.replace(s,"");i[Nv(d)]=c||""}return i}function Nv(n){const t=s=>s.slice(0,1).toUpperCase()+s.slice(1),i=n.split("-");return i[0]+i.slice(1).map(t).join("")}function Bv(n){typeof n=="undefined"&&(n=document);for(const i of Object.keys(Pv))E_(i,n);const t=n.querySelectorAll("[component],[components]");for(const i of t){const s=`${i.getAttribute("component")||""} ${i.getAttribute("components")}`.toLowerCase().split(" ").filter(Boolean);for(const l of s)Rv(l,i)}}window.components.init=Bv;window.components.first=n=>(window.components[n]||[null])[0];var Xa=Bv;window.baseUrl=function(n){let t=document.querySelector('meta[name="base-url"]').getAttribute("content");return t[t.length-1]==="/"&&(t=t.slice(0,t.length-1)),n[0]==="/"&&(n=n.slice(1)),t+"/"+n};window.$http=Qm;window.$events=Xm;const pi=new Jm();window.trans=pi.get.bind(pi);window.trans_choice=pi.getPlural.bind(pi);window.trans_plural=pi.parsePlural.bind(pi);Xa();})(); +`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let b=y.selection.getNode();d(y,c(b)?b:null)}}]}),y.on("dblclick",b=>{let w=y.selection.getNode();if(!c(w))return;h(y,w)}),y.on("SetContent",function(){const b=y.$("body > div[drawio-diagram]");if(!b.length)return;y.undoManager.transact(function(){b.each((w,D)=>{D.setAttribute("contenteditable","false")})})})})}function Qx(){window.tinymce.PluginManager.add("customhr",function(t){t.addCommand("InsertHorizontalRule",function(){let n=document.createElement("hr"),i=t.selection.getNode(),s=i.parentNode;s.insertBefore(n,i)}),t.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),t.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function Jx(t){window.$events.listen("editor::replace",({html:n})=>{t.setContent(n)}),window.$events.listen("editor::append",({html:n})=>{const i=t.getContent()+n;t.setContent(i)}),window.$events.listen("editor::prepend",({html:n})=>{const i=n+t.getContent();t.setContent(i)}),window.$events.listen("editor::insert",({html:n})=>{t.insertContent(n)}),window.$events.listen("editor::focus",()=>{t.focus()})}class e_{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image table textcolor paste link autolink fullscreen code customhr autosave lists codeeditor media",this.loadPlugins(),this.tinyMceConfig=this.getTinyMceConfig(),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig)}loadPlugins(){Xx(),Qx();const t=document.querySelector("[drawio-url]");if(t){const n=t.getAttribute("drawio-url");Zx(n,this.isDarkMode,this.pageId),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){const t=this.textDirection==="rtl"?"ltr rtl":"";return`undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr drawio media | removeformat code ${t} fullscreen`}getTinyMceConfig(){const t=this;return{selector:"#html-editor",content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:this.isDarkMode?"dark":"lightgray",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,directionality:this.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram]",automatic_uploads:!1,valid_children:"-div[p|h1|h2|h3|h4|h5|h6|blockquote],+div[pre],+div[img]",plugins:this.plugins,imagetools_toolbar:"imageoptions",toolbar:this.getToolBar(),content_style:`html, body, html.dark-mode {background: ${this.isDarkMode?"#222":"#fff"};} body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}`,style_formats:[{title:"Header Large",format:"h2"},{title:"Header Medium",format:"h3"},{title:"Header Small",format:"h4"},{title:"Header Tiny",format:"h5"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Code Block",icon:"code",cmd:"codeeditor",format:"codeeditor"},{title:"Inline Code",icon:"code",inline:"code"},{title:"Callouts",items:[{title:"Info",format:"calloutinfo"},{title:"Success",format:"calloutsuccess"},{title:"Warning",format:"calloutwarning"},{title:"Danger",format:"calloutdanger"}]}],style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:{codeeditor:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div"},alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-right"},calloutsuccess:{block:"p",exact:!0,attributes:{class:"callout success"}},calloutinfo:{block:"p",exact:!0,attributes:{class:"callout info"}},calloutwarning:{block:"p",exact:!0,attributes:{class:"callout warning"}},calloutdanger:{block:"p",exact:!0,attributes:{class:"callout danger"}}},file_browser_callback:function(n,i,s,u){s==="file"&&window.EntitySelectorPopup.show(function(c){const d=u.document.getElementById(n);d.value=c.link;const h=d.closest(".mce-form"),p=h.querySelectorAll("input");p[1].value||(p[1].value=c.name),p[2].value=c.name}),s==="image"&&window.ImageManager.show(function(c){if(u.document.getElementById(n).value=c.url,"createEvent"in document){let h=document.createEvent("HTMLEvents");h.initEvent("change",!1,!0),u.document.getElementById(n).dispatchEvent(h)}else u.document.getElementById(n).fireEvent("onchange");let d=``;d+=`${c.name}`,d+="",u.tinyMCE.activeEditor.execCommand("mceInsertContent",!1,d)},"gallery")},paste_preprocess:function(n,i){let s=i.content;s.indexOf('{i();const h=new URL(window.location).searchParams,p=h.get("content-id");p&&s(p);const g=n.getContainer(),y=g.querySelectorAll(".mce-btn");for(let m of y)m.addEventListener("touchstart",b=>{b.stopPropagation()});window.editor=n});function i(){const h=n.getContent();t.isDarkMode&&n.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change",h)}function s(h){const p=n.dom.get(encodeURIComponent(h).replace(/!/g,"%21"));if(!p)return;p.scrollIntoView(),n.selection.select(p,!0),n.selection.collapse(!1),n.focus()}Jx(n),window.$events.listen("editor-html-update",h=>{n.setContent(h),n.selection.select(n.getBody(),!0),n.selection.collapse(!1),i(h)}),Vx(n);let u,c;function d(h){return h&&!!(h.textContent||h.innerText)}n.on("dragstart",function(){let h=n.selection.getNode();h.nodeName==="IMG"&&(u=n.dom.getParent(h,".mceTemp"),!u&&h.parentNode.nodeName==="A"&&!d(h.parentNode)&&(u=h.parentNode)),h.hasAttribute("contenteditable")&&h.getAttribute("contenteditable")==="false"&&(c=h)}),n.on("drop",function(h){let p=n.dom,g=tinymce.dom.RangeUtils.getCaretRangeFromPoint(h.clientX,h.clientY,n.getDoc());const y=h.dataTransfer&&h.dataTransfer.getData("bookstack/template");y&&(h.preventDefault(),window.$http.get(`/templates/${y}`).then(m=>{n.selection.setRng(g),n.undoManager.transact(function(){n.execCommand("mceInsertContent",!1,m.data.html)})})),p.getParent(g.startContainer,".mceTemp")?h.preventDefault():u&&(h.preventDefault(),n.undoManager.transact(function(){n.selection.setRng(g),n.selection.setNode(u),p.remove(u)})),!h.isDefaultPrevented()&&c&&(h.preventDefault(),n.undoManager.transact(function(){const m=n.selection.getNode(),b=n.selection.getRng(),w=m.closest("body > *");b.startOffset>b.startContainer.length/2?n.$(w).after(c):n.$(w).before(c)})),h.isDefaultPrevented()||Fv(h,n,t),u=null}),n.addButton("image-insert",{title:"My title",icon:"image",tooltip:"Insert an image",onclick:function(){window.ImageManager.show(function(h){let p=``;p+=`${h.name}`,p+="",n.execCommand("mceInsertContent",!1,p)},"gallery")}}),n.on("paste",h=>Fv(h,n,t)),window.$events.emitPublic(t.elem,"editor-tinymce::setup",{editor:n})}}}}var Mv=e_;const qv=$e(qh()),zv={"add-remove-rows":ig,"ajax-delete-row":og,"ajax-form":ag,attachments:sg,"auto-suggest":lg,"back-to-top":ug,"book-sort":Fg,"breadcrumb-listing":Mg,"chapter-toggle":zg,"code-editor":Ng,"code-highlighter":Bg,collapsible:jg,"custom-checkbox":Hg,"details-highlighter":Ug,dropdown:Wg,dropzone:Gg,"editor-toolbox":Kg,"entity-permissions-editor":Vg,"entity-search":Yg,"entity-selector":Xg,"entity-selector-popup":Zg,"event-emit-select":Qg,"expand-toggle":Jg,"header-mobile-toggle":qv.default,"homepage-control":ev,"image-manager":tv,"image-picker":nv,index:Xa,"list-sort-control":rv,"markdown-editor":uv,"new-user-password":cv,notification:dv,"optional-input":hv,"page-comments":fv,"page-display":mv,"page-editor":vv,"page-picker":bv,"permissions-table":yv,popup:wv,"setting-app-color-picker":kv,"setting-color-picker":xv,"shelf-sort":_v,sidebar:Cv,"sortable-list":Sv,"submit-on-change":Ev,tabs:Dv,"tag-manager":Av,"template-manager":Tv,"toggle-switch":Lv,"tri-layout":Iv,"wysiwyg-editor":Mv};window.components={};function t_(t,n){const i=n.querySelectorAll(`[${t}]`);for(let s=0,u=i.length;s{d.from=s;const h=new CustomEvent(`${t}-${c}`,{bubbles:!0,detail:d});s.$el.dispatchEvent(h)},typeof s.setup=="function"&&s.setup()}catch(u){console.error("Failed to create component",u,t,n)}typeof window.components[t]=="undefined"&&(window.components[t]=[]),window.components[t].push(s),typeof n.components=="undefined"&&(n.components={}),n.components[t]=s}function n_(t,n){const i={},s={},u=`${t}@`,c=`[refs*="${u}"]`,d=[...n.querySelectorAll(c)];n.matches(c)&&d.push(n);for(const h of d){const p=h.getAttribute("refs").split(" ").filter(g=>g.startsWith(u)).map(g=>g.replace(u,"")).map(Rv);for(const g of p)i[g]=h,typeof s[g]=="undefined"&&(s[g]=[]),s[g].push(h)}return{refs:i,manyRefs:s}}function r_(t,n){const i={},s=`option:${t}:`;for(const{name:u,value:c}of n.attributes)if(u.startsWith(s)){const d=u.replace(s,"");i[Rv(d)]=c||""}return i}function Rv(t){const n=s=>s.slice(0,1).toUpperCase()+s.slice(1),i=t.split("-");return i[0]+i.slice(1).map(n).join("")}function Ov(t){typeof t=="undefined"&&(t=document);for(const i of Object.keys(zv))t_(i,t);const n=t.querySelectorAll("[component],[components]");for(const i of n){const s=`${i.getAttribute("component")||""} ${i.getAttribute("components")}`.toLowerCase().split(" ").filter(Boolean);for(const u of s)Pv(u,i)}}window.components.init=Ov;window.components.first=t=>(window.components[t]||[null])[0];var Xa=Ov;window.baseUrl=function(t){let 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.$http=Zm;window.$events=Ym;const mi=new Qm;window.trans=mi.get.bind(mi);window.trans_choice=mi.getPlural.bind(mi);window.trans_plural=mi.parsePlural.bind(mi);Xa();})(); /*! * clipboard.js v2.0.6 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */ -/**! - * Sortable 1.10.2 - * @author RubaXa - * @author owenm - * @license MIT - */ //# sourceMappingURL=app.js.map diff --git a/version b/version index c173e42d7..d1b3cf04c 100644 --- a/version +++ b/version @@ -1 +1 @@ -v0.30.1 +v0.30.2