BookStack/public/dist/app.js

73 lines
780 KiB
JavaScript

(()=>{var Sx=Object.create;var Xo=Object.defineProperty;var Ex=Object.getOwnPropertyDescriptor;var Cx=Object.getOwnPropertyNames;var Tx=Object.getPrototypeOf,Ax=Object.prototype.hasOwnProperty;var zc=i=>Xo(i,"__esModule",{value:!0});var Lx=(i,t)=>()=>(i&&(t=i(i=0)),t);var Me=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Dx=(i,t)=>{for(var n in t)Xo(i,n,{get:t[n],enumerable:!0})},Nc=(i,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of Cx(t))!Ax.call(i,c)&&(n||c!=="default")&&Xo(i,c,{get:()=>t[c],enumerable:!(l=Ex(t,c))||l.enumerable});return i},_t=(i,t)=>Nc(zc(Xo(i!=null?Sx(Tx(i)):{},"default",!t&&i&&i.__esModule?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i),Ix=(i=>(t,n)=>i&&i.get(t)||(n=Nc(zc({}),t,1),i&&i.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var Tt=Me((Xs,Zs)=>{(function(i,t){typeof Xs=="object"&&typeof Zs!="undefined"?Zs.exports=t():typeof define=="function"&&define.amd?define(t):(i=i||self,i.CodeMirror=t())})(Xs,function(){"use strict";var i=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(i),l=/MSIE \d/.test(i),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(i),d=/Edge\/(\d+)/.exec(i),o=l||c||d,h=o&&(l?document.documentMode||6:+(d||c)[1]),f=!d&&/WebKit\//.test(i),p=f&&/Qt\/\d+\.\d+/.test(i),y=!d&&/Chrome\//.test(i),g=/Opera\//.test(i),v=/Apple Computer/.test(navigator.vendor),b=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(i),k=/PhantomJS/.test(i),E=v&&(/Mobile\/\w+/.test(i)||navigator.maxTouchPoints>2),w=/Android/.test(i),I=E||w||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(i),S=E||/Mac/.test(t),N=/\bCrOS\b/.test(i),O=/win/i.test(t),j=g&&i.match(/Version\/(\d*\.\d*)/);j&&(j=Number(j[1])),j&&j>=15&&(g=!1,f=!0);var U=S&&(p||g&&(j==null||j<12.11)),ee=n||o&&h>=9;function V(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var W=function(e,r){var s=e.className,a=V(r).exec(s);if(a){var u=s.slice(a.index+a[0].length);e.className=s.slice(0,a.index)+(u?a[1]+u:"")}};function K(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function q(e,r){return K(e).appendChild(r)}function R(e,r,s,a){var u=document.createElement(e);if(s&&(u.className=s),a&&(u.style.cssText=a),typeof r=="string")u.appendChild(document.createTextNode(r));else if(r)for(var m=0;m<r.length;++m)u.appendChild(r[m]);return u}function T(e,r,s,a){var u=R(e,r,s,a);return u.setAttribute("role","presentation"),u}var H;document.createRange?H=function(e,r,s,a){var u=document.createRange();return u.setEnd(a||e,s),u.setStart(e,r),u}:H=function(e,r,s){var a=document.body.createTextRange();try{a.moveToElementText(e.parentNode)}catch{return a}return a.collapse(!0),a.moveEnd("character",s),a.moveStart("character",r),a};function Z(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function P(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function z(e,r){var s=e.className;V(r).test(s)||(e.className+=(s?" ":"")+r)}function ne(e,r){for(var s=e.split(" "),a=0;a<s.length;a++)s[a]&&!V(s[a]).test(r)&&(r+=" "+s[a]);return r}var ae=function(e){e.select()};E?ae=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(ae=function(e){try{e.select()}catch{}});function F(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function A(e,r,s){r||(r={});for(var a in e)e.hasOwnProperty(a)&&(s!==!1||!r.hasOwnProperty(a))&&(r[a]=e[a]);return r}function be(e,r,s,a,u){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var m=a||0,x=u||0;;){var _=e.indexOf(" ",m);if(_<0||_>=r)return x+(r-m);x+=_-m,x+=s-x%s,m=_+1}}var Fe=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};Fe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Fe.prototype.set=function(e,r){this.f=r;var s=+new Date+e;(!this.id||s<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=s)};function xe(e,r){for(var s=0;s<e.length;++s)if(e[s]==r)return s;return-1}var _e=50,ze={toString:function(){return"CodeMirror.Pass"}},qe={scroll:!1},ge={origin:"*mouse"},ke={origin:"+move"};function je(e,r,s){for(var a=0,u=0;;){var m=e.indexOf(" ",a);m==-1&&(m=e.length);var x=m-a;if(m==e.length||u+x>=r)return a+Math.min(x,r-u);if(u+=m-a,u+=s-u%s,a=m+1,u>=r)return a}}var at=[""];function gt(e){for(;at.length<=e;)at.push(Re(at)+" ");return at[e]}function Re(e){return e[e.length-1]}function Ie(e,r){for(var s=[],a=0;a<e.length;a++)s[a]=r(e[a],a);return s}function Be(e,r,s){for(var a=0,u=s(r);a<e.length&&s(e[a])<=u;)a++;e.splice(a,0,r)}function Ke(){}function He(e,r){var s;return Object.create?s=Object.create(e):(Ke.prototype=e,s=new Ke),r&&A(r,s),s}var Je=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Se(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Je.test(e))}function X(e,r){return r?r.source.indexOf("\\w")>-1&&Se(e)?!0:r.test(e):Se(e)}function de(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ue=/[\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 it(e){return e.charCodeAt(0)>=768&&ue.test(e)}function Ne(e,r,s){for(;(s<0?r>0:r<e.length)&&it(e.charAt(r));)r+=s;return r}function ot(e,r,s){for(var a=r>s?-1:1;;){if(r==s)return r;var u=(r+s)/2,m=a<0?Math.ceil(u):Math.floor(u);if(m==r)return e(m)?r:s;e(m)?s=m:r=m+a}}function Xe(e,r,s,a){if(!e)return a(r,s,"ltr",0);for(var u=!1,m=0;m<e.length;++m){var x=e[m];(x.from<s&&x.to>r||r==s&&x.to==r)&&(a(Math.max(x.from,r),Math.min(x.to,s),x.level==1?"rtl":"ltr",m),u=!0)}u||a(r,s,"ltr")}var et=null;function We(e,r,s){var a;et=null;for(var u=0;u<e.length;++u){var m=e[u];if(m.from<r&&m.to>r)return u;m.to==r&&(m.from!=m.to&&s=="before"?a=u:et=u),m.from==r&&(m.from!=m.to&&s!="before"?a=u:et=u)}return a!=null?a:et}var $t=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function s(L){return L<=247?e.charAt(L):1424<=L&&L<=1524?"R":1536<=L&&L<=1785?r.charAt(L-1536):1774<=L&&L<=2220?"r":8192<=L&&L<=8203?"w":L==8204?"b":"L"}var a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,m=/[LRr]/,x=/[Lb1n]/,_=/[1n]/;function C(L,Y,J){this.level=L,this.from=Y,this.to=J}return function(L,Y){var J=Y=="ltr"?"L":"R";if(L.length==0||Y=="ltr"&&!a.test(L))return!1;for(var fe=L.length,le=[],ye=0;ye<fe;++ye)le.push(s(L.charCodeAt(ye)));for(var Ee=0,Pe=J;Ee<fe;++Ee){var $e=le[Ee];$e=="m"?le[Ee]=Pe:Pe=$e}for(var Qe=0,Ue=J;Qe<fe;++Qe){var nt=le[Qe];nt=="1"&&Ue=="r"?le[Qe]="n":m.test(nt)&&(Ue=nt,nt=="r"&&(le[Qe]="R"))}for(var ct=1,ut=le[0];ct<fe-1;++ct){var vt=le[ct];vt=="+"&&ut=="1"&&le[ct+1]=="1"?le[ct]="1":vt==","&&ut==le[ct+1]&&(ut=="1"||ut=="n")&&(le[ct]=ut),ut=vt}for(var Pt=0;Pt<fe;++Pt){var ir=le[Pt];if(ir==",")le[Pt]="N";else if(ir=="%"){var Bt=void 0;for(Bt=Pt+1;Bt<fe&&le[Bt]=="%";++Bt);for(var Lr=Pt&&le[Pt-1]=="!"||Bt<fe&&le[Bt]=="1"?"1":"N",Sr=Pt;Sr<Bt;++Sr)le[Sr]=Lr;Pt=Bt-1}}for(var Xt=0,Er=J;Xt<fe;++Xt){var cr=le[Xt];Er=="L"&&cr=="1"?le[Xt]="L":m.test(cr)&&(Er=cr)}for(var Jt=0;Jt<fe;++Jt)if(u.test(le[Jt])){var Zt=void 0;for(Zt=Jt+1;Zt<fe&&u.test(le[Zt]);++Zt);for(var Ut=(Jt?le[Jt-1]:J)=="L",Cr=(Zt<fe?le[Zt]:J)=="L",ui=Ut==Cr?Ut?"L":"R":J,Sn=Jt;Sn<Zt;++Sn)le[Sn]=ui;Jt=Zt-1}for(var gr=[],Zr,or=0;or<fe;)if(x.test(le[or])){var Is=or;for(++or;or<fe&&x.test(le[or]);++or);gr.push(new C(0,Is,or))}else{var fn=or,Rn=gr.length,zn=Y=="rtl"?1:0;for(++or;or<fe&&le[or]!="L";++or);for(var xr=fn;xr<or;)if(_.test(le[xr])){fn<xr&&(gr.splice(Rn,0,new C(1,fn,xr)),Rn+=zn);var ci=xr;for(++xr;xr<or&&_.test(le[xr]);++xr);gr.splice(Rn,0,new C(2,ci,xr)),Rn+=zn,fn=xr}else++xr;fn<or&&gr.splice(Rn,0,new C(1,fn,or))}return Y=="ltr"&&(gr[0].level==1&&(Zr=L.match(/^\s+/))&&(gr[0].from=Zr[0].length,gr.unshift(new C(0,0,Zr[0].length))),Re(gr).level==1&&(Zr=L.match(/\s+$/))&&(Re(gr).to-=Zr[0].length,gr.push(new C(0,fe-Zr[0].length,fe)))),Y=="rtl"?gr.reverse():gr}}();function Lt(e,r){var s=e.order;return s==null&&(s=e.order=$t(e.text,r)),s}var fr=[],lt=function(e,r,s){if(e.addEventListener)e.addEventListener(r,s,!1);else if(e.attachEvent)e.attachEvent("on"+r,s);else{var a=e._handlers||(e._handlers={});a[r]=(a[r]||fr).concat(s)}};function Mt(e,r){return e._handlers&&e._handlers[r]||fr}function pt(e,r,s){if(e.removeEventListener)e.removeEventListener(r,s,!1);else if(e.detachEvent)e.detachEvent("on"+r,s);else{var a=e._handlers,u=a&&a[r];if(u){var m=xe(u,s);m>-1&&(a[r]=u.slice(0,m).concat(u.slice(m+1)))}}}function rt(e,r){var s=Mt(e,r);if(!!s.length)for(var a=Array.prototype.slice.call(arguments,2),u=0;u<s.length;++u)s[u].apply(null,a)}function wt(e,r,s){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),rt(e,s||r.type,e,r),Ht(r)||r.codemirrorIgnore}function dr(e){var r=e._handlers&&e._handlers.cursorActivity;if(!!r)for(var s=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),a=0;a<r.length;++a)xe(s,r[a])==-1&&s.push(r[a])}function Et(e,r){return Mt(e,r).length>0}function Vt(e){e.prototype.on=function(r,s){lt(this,r,s)},e.prototype.off=function(r,s){pt(this,r,s)}}function kt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function st(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ht(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ir(e){kt(e),st(e)}function hr(e){return e.target||e.srcElement}function pr(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),S&&e.ctrlKey&&r==1&&(r=3),r}var $r=function(){if(o&&h<9)return!1;var e=R("div");return"draggable"in e||"dragDrop"in e}(),zt;function yr(e){if(zt==null){var r=R("span","\u200B");q(e,R("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(zt=r.offsetWidth<=1&&r.offsetHeight>2&&!(o&&h<8))}var s=zt?R("span","\u200B"):R("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return s.setAttribute("cm-text",""),s}var ur;function Qt(e){if(ur!=null)return ur;var r=q(e,document.createTextNode("A\u062EA")),s=H(r,0,1).getBoundingClientRect(),a=H(r,1,2).getBoundingClientRect();return K(e),!s||s.left==s.right?!1:ur=a.right-s.right<3}var ie=`
b`.split(/\n/).length!=3?function(e){for(var r=0,s=[],a=e.length;r<=a;){var u=e.indexOf(`
`,r);u==-1&&(u=e.length);var m=e.slice(r,e.charAt(u-1)=="\r"?u-1:u),x=m.indexOf("\r");x!=-1?(s.push(m.slice(0,x)),r+=x+1):(s.push(m),r=u+1)}return s}:function(e){return e.split(/\r\n?|\n/)},oe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch{}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},Q=function(){var e=R("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),re=null;function M(e){if(re!=null)return re;var r=q(e,R("span","x")),s=r.getBoundingClientRect(),a=H(r,0,1).getBoundingClientRect();return re=Math.abs(s.left-a.left)>1}var B={},te={};function ce(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),B[e]=r}function me(e,r){te[e]=r}function ve(e){if(typeof e=="string"&&te.hasOwnProperty(e))e=te[e];else if(e&&typeof e.name=="string"&&te.hasOwnProperty(e.name)){var r=te[e.name];typeof r=="string"&&(r={name:r}),e=He(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ve("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ve("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Le(e,r){r=ve(r);var s=B[r.name];if(!s)return Le(e,"text/plain");var a=s(e,r);if(Oe.hasOwnProperty(r.name)){var u=Oe[r.name];for(var m in u)!u.hasOwnProperty(m)||(a.hasOwnProperty(m)&&(a["_"+m]=a[m]),a[m]=u[m])}if(a.name=r.name,r.helperType&&(a.helperType=r.helperType),r.modeProps)for(var x in r.modeProps)a[x]=r.modeProps[x];return a}var Oe={};function Ce(e,r){var s=Oe.hasOwnProperty(e)?Oe[e]:Oe[e]={};A(r,s)}function Ve(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var s={};for(var a in r){var u=r[a];u instanceof Array&&(u=u.concat([])),s[a]=u}return s}function St(e,r){for(var s;e.innerMode&&(s=e.innerMode(r),!(!s||s.mode==e));)r=s.state,e=s.mode;return s||{mode:e,state:r}}function mt(e,r,s){return e.startState?e.startState(r,s):!0}var G=function(e,r,s){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=s};G.prototype.eol=function(){return this.pos>=this.string.length},G.prototype.sol=function(){return this.pos==this.lineStart},G.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},G.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},G.prototype.eat=function(e){var r=this.string.charAt(this.pos),s;if(typeof e=="string"?s=r==e:s=r&&(e.test?e.test(r):e(r)),s)return++this.pos,r},G.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},G.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},G.prototype.skipToEnd=function(){this.pos=this.string.length},G.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},G.prototype.backUp=function(e){this.pos-=e},G.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=be(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?be(this.string,this.lineStart,this.tabSize):0)},G.prototype.indentation=function(){return be(this.string,null,this.tabSize)-(this.lineStart?be(this.string,this.lineStart,this.tabSize):0)},G.prototype.match=function(e,r,s){if(typeof e=="string"){var a=function(x){return s?x.toLowerCase():x},u=this.string.substr(this.pos,e.length);if(a(u)==a(e))return r!==!1&&(this.pos+=e.length),!0}else{var m=this.string.slice(this.pos).match(e);return m&&m.index>0?null:(m&&r!==!1&&(this.pos+=m[0].length),m)}},G.prototype.current=function(){return this.string.slice(this.start,this.pos)},G.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},G.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},G.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function se(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 s=e;!s.lines;)for(var a=0;;++a){var u=s.children[a],m=u.chunkSize();if(r<m){s=u;break}r-=m}return s.lines[r]}function pe(e,r,s){var a=[],u=r.line;return e.iter(r.line,s.line+1,function(m){var x=m.text;u==s.line&&(x=x.slice(0,s.ch)),u==r.line&&(x=x.slice(r.ch)),a.push(x),++u}),a}function Te(e,r,s){var a=[];return e.iter(r,s,function(u){a.push(u.text)}),a}function Ae(e,r){var s=r-e.height;if(s)for(var a=e;a;a=a.parent)a.height+=s}function Ye(e){if(e.parent==null)return null;for(var r=e.parent,s=xe(r.lines,e),a=r.parent;a;r=a,a=a.parent)for(var u=0;a.children[u]!=r;++u)s+=a.children[u].chunkSize();return s+r.first}function tt(e,r){var s=e.first;e:do{for(var a=0;a<e.children.length;++a){var u=e.children[a],m=u.height;if(r<m){e=u;continue e}r-=m,s+=u.chunkSize()}return s}while(!e.lines);for(var x=0;x<e.lines.length;++x){var _=e.lines[x],C=_.height;if(r<C)break;r-=C}return s+x}function bt(e,r){return r>=e.first&&r<e.first+e.size}function Dt(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function we(e,r,s){if(s===void 0&&(s=null),!(this instanceof we))return new we(e,r,s);this.line=e,this.ch=r,this.sticky=s}function D(e,r){return e.line-r.line||e.ch-r.ch}function $(e,r){return e.sticky==r.sticky&&D(e,r)==0}function he(e){return we(e.line,e.ch)}function De(e,r){return D(e,r)<0?r:e}function ft(e,r){return D(e,r)<0?e:r}function xt(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function Ze(e,r){if(r.line<e.first)return we(e.first,0);var s=e.first+e.size-1;return r.line>s?we(s,se(e,s).text.length):Yt(r,se(e,r.line).text.length)}function Yt(e,r){var s=e.ch;return s==null||s>r?we(e.line,r):s<0?we(e.line,0):e}function Fr(e,r){for(var s=[],a=0;a<r.length;a++)s[a]=Ze(e,r[a]);return s}var Wn=function(e,r){this.state=e,this.lookAhead=r},Vr=function(e,r,s,a){this.state=r,this.doc=e,this.line=s,this.maxLookAhead=a||0,this.baseTokens=null,this.baseTokenPos=1};Vr.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},Vr.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}},Vr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Vr.fromSaved=function(e,r,s){return r instanceof Wn?new Vr(e,Ve(e.mode,r.state),s,r.lookAhead):new Vr(e,Ve(e.mode,r),s)},Vr.prototype.save=function(e){var r=e!==!1?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Wn(r,this.maxLookAhead):r};function Bl(e,r,s,a){var u=[e.state.modeGen],m={};Wl(e,r.text,e.doc.mode,s,function(L,Y){return u.push(L,Y)},m,a);for(var x=s.state,_=function(L){s.baseTokens=u;var Y=e.state.overlays[L],J=1,fe=0;s.state=!0,Wl(e,r.text,Y.mode,s,function(le,ye){for(var Ee=J;fe<le;){var Pe=u[J];Pe>le&&u.splice(J,1,le,u[J+1],Pe),J+=2,fe=Math.min(le,Pe)}if(!!ye)if(Y.opaque)u.splice(Ee,J-Ee,le,"overlay "+ye),J=Ee+2;else for(;Ee<J;Ee+=2){var $e=u[Ee+1];u[Ee+1]=($e?$e+" ":"")+"overlay "+ye}},m),s.state=x,s.baseTokens=null,s.baseTokenPos=1},C=0;C<e.state.overlays.length;++C)_(C);return{styles:u,classes:m.bgClass||m.textClass?m:null}}function ql(e,r,s){if(!r.styles||r.styles[0]!=e.state.modeGen){var a=Ci(e,Ye(r)),u=r.text.length>e.options.maxHighlightLength&&Ve(e.doc.mode,a.state),m=Bl(e,r,a);u&&(a.state=u),r.stateAfter=a.save(!u),r.styles=m.styles,m.classes?r.styleClasses=m.classes:r.styleClasses&&(r.styleClasses=null),s===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function Ci(e,r,s){var a=e.doc,u=e.display;if(!a.mode.startState)return new Vr(a,!0,r);var m=Cy(e,r,s),x=m>a.first&&se(a,m-1).stateAfter,_=x?Vr.fromSaved(a,x,m):new Vr(a,mt(a.mode),m);return a.iter(m,r,function(C){$a(e,C.text,_);var L=_.line;C.stateAfter=L==r-1||L%5==0||L>=u.viewFrom&&L<u.viewTo?_.save():null,_.nextLine()}),s&&(a.modeFrontier=_.line),_}function $a(e,r,s,a){var u=e.doc.mode,m=new G(r,e.options.tabSize,s);for(m.start=m.pos=a||0,r==""&&$l(u,s.state);!m.eol();)Ua(u,m,s.state),m.start=m.pos}function $l(e,r){if(e.blankLine)return e.blankLine(r);if(!!e.innerMode){var s=St(e,r);if(s.mode.blankLine)return s.mode.blankLine(s.state)}}function Ua(e,r,s,a){for(var u=0;u<10;u++){a&&(a[0]=St(e,s).mode);var m=e.token(r,s);if(r.pos>r.start)return m}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ul=function(e,r,s){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=s};function jl(e,r,s,a){var u=e.doc,m=u.mode,x;r=Ze(u,r);var _=se(u,r.line),C=Ci(e,r.line,s),L=new G(_.text,e.options.tabSize,C),Y;for(a&&(Y=[]);(a||L.pos<r.ch)&&!L.eol();)L.start=L.pos,x=Ua(m,L,C.state),a&&Y.push(new Ul(L,x,Ve(u.mode,C.state)));return a?Y:new Ul(L,x,C.state)}function Hl(e,r){if(e)for(;;){var s=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!s)break;e=e.slice(0,s.index)+e.slice(s.index+s[0].length);var a=s[1]?"bgClass":"textClass";r[a]==null?r[a]=s[2]:new RegExp("(?:^|\\s)"+s[2]+"(?:$|\\s)").test(r[a])||(r[a]+=" "+s[2])}return e}function Wl(e,r,s,a,u,m,x){var _=s.flattenSpans;_==null&&(_=e.options.flattenSpans);var C=0,L=null,Y=new G(r,e.options.tabSize,a),J,fe=e.options.addModeClass&&[null];for(r==""&&Hl($l(s,a.state),m);!Y.eol();){if(Y.pos>e.options.maxHighlightLength?(_=!1,x&&$a(e,r,a,Y.pos),Y.pos=r.length,J=null):J=Hl(Ua(s,Y,a.state,fe),m),fe){var le=fe[0].name;le&&(J="m-"+(J?le+" "+J:le))}if(!_||L!=J){for(;C<Y.start;)C=Math.min(Y.start,C+5e3),u(C,L);L=J}Y.start=Y.pos}for(;C<Y.pos;){var ye=Math.min(Y.pos,C+5e3);u(ye,L),C=ye}}function Cy(e,r,s){for(var a,u,m=e.doc,x=s?-1:r-(e.doc.mode.innerMode?1e3:100),_=r;_>x;--_){if(_<=m.first)return m.first;var C=se(m,_-1),L=C.stateAfter;if(L&&(!s||_+(L instanceof Wn?L.lookAhead:0)<=m.modeFrontier))return _;var Y=be(C.text,null,e.options.tabSize);(u==null||a>Y)&&(u=_-1,a=Y)}return u}function Ty(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),!(e.highlightFrontier<r-10)){for(var s=e.first,a=r-1;a>s;a--){var u=se(e,a).stateAfter;if(u&&(!(u instanceof Wn)||a+u.lookAhead<r)){s=a+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,s)}}var Gl=!1,an=!1;function Ay(){Gl=!0}function Ly(){an=!0}function wo(e,r,s){this.marker=e,this.from=r,this.to=s}function Ti(e,r){if(e)for(var s=0;s<e.length;++s){var a=e[s];if(a.marker==r)return a}}function Dy(e,r){for(var s,a=0;a<e.length;++a)e[a]!=r&&(s||(s=[])).push(e[a]);return s}function Iy(e,r,s){var a=s&&window.WeakSet&&(s.markedSpans||(s.markedSpans=new WeakSet));a&&a.has(e.markedSpans)?e.markedSpans.push(r):(e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],a&&a.add(e.markedSpans)),r.marker.attachLine(e)}function Fy(e,r,s){var a;if(e)for(var u=0;u<e.length;++u){var m=e[u],x=m.marker,_=m.from==null||(x.inclusiveLeft?m.from<=r:m.from<r);if(_||m.from==r&&x.type=="bookmark"&&(!s||!m.marker.insertLeft)){var C=m.to==null||(x.inclusiveRight?m.to>=r:m.to>r);(a||(a=[])).push(new wo(x,m.from,C?null:m.to))}}return a}function My(e,r,s){var a;if(e)for(var u=0;u<e.length;++u){var m=e[u],x=m.marker,_=m.to==null||(x.inclusiveRight?m.to>=r:m.to>r);if(_||m.from==r&&x.type=="bookmark"&&(!s||m.marker.insertLeft)){var C=m.from==null||(x.inclusiveLeft?m.from<=r:m.from<r);(a||(a=[])).push(new wo(x,C?null:m.from-r,m.to==null?null:m.to-r))}}return a}function ja(e,r){if(r.full)return null;var s=bt(e,r.from.line)&&se(e,r.from.line).markedSpans,a=bt(e,r.to.line)&&se(e,r.to.line).markedSpans;if(!s&&!a)return null;var u=r.from.ch,m=r.to.ch,x=D(r.from,r.to)==0,_=Fy(s,u,x),C=My(a,m,x),L=r.text.length==1,Y=Re(r.text).length+(L?u:0);if(_)for(var J=0;J<_.length;++J){var fe=_[J];if(fe.to==null){var le=Ti(C,fe.marker);le?L&&(fe.to=le.to==null?null:le.to+Y):fe.to=u}}if(C)for(var ye=0;ye<C.length;++ye){var Ee=C[ye];if(Ee.to!=null&&(Ee.to+=Y),Ee.from==null){var Pe=Ti(_,Ee.marker);Pe||(Ee.from=Y,L&&(_||(_=[])).push(Ee))}else Ee.from+=Y,L&&(_||(_=[])).push(Ee)}_&&(_=Kl(_)),C&&C!=_&&(C=Kl(C));var $e=[_];if(!L){var Qe=r.text.length-2,Ue;if(Qe>0&&_)for(var nt=0;nt<_.length;++nt)_[nt].to==null&&(Ue||(Ue=[])).push(new wo(_[nt].marker,null,null));for(var ct=0;ct<Qe;++ct)$e.push(Ue);$e.push(C)}return $e}function Kl(e){for(var r=0;r<e.length;++r){var s=e[r];s.from!=null&&s.from==s.to&&s.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Oy(e,r,s){var a=null;if(e.iter(r.line,s.line+1,function(le){if(le.markedSpans)for(var ye=0;ye<le.markedSpans.length;++ye){var Ee=le.markedSpans[ye].marker;Ee.readOnly&&(!a||xe(a,Ee)==-1)&&(a||(a=[])).push(Ee)}}),!a)return null;for(var u=[{from:r,to:s}],m=0;m<a.length;++m)for(var x=a[m],_=x.find(0),C=0;C<u.length;++C){var L=u[C];if(!(D(L.to,_.from)<0||D(L.from,_.to)>0)){var Y=[C,1],J=D(L.from,_.from),fe=D(L.to,_.to);(J<0||!x.inclusiveLeft&&!J)&&Y.push({from:L.from,to:_.from}),(fe>0||!x.inclusiveRight&&!fe)&&Y.push({from:_.to,to:L.to}),u.splice.apply(u,Y),C+=Y.length-3}}return u}function Vl(e){var r=e.markedSpans;if(!!r){for(var s=0;s<r.length;++s)r[s].marker.detachLine(e);e.markedSpans=null}}function Yl(e,r){if(!!r){for(var s=0;s<r.length;++s)r[s].marker.attachLine(e);e.markedSpans=r}}function ko(e){return e.inclusiveLeft?-1:0}function _o(e){return e.inclusiveRight?1:0}function Ha(e,r){var s=e.lines.length-r.lines.length;if(s!=0)return s;var a=e.find(),u=r.find(),m=D(a.from,u.from)||ko(e)-ko(r);if(m)return-m;var x=D(a.to,u.to)||_o(e)-_o(r);return x||r.id-e.id}function Xl(e,r){var s=an&&e.markedSpans,a;if(s)for(var u=void 0,m=0;m<s.length;++m)u=s[m],u.marker.collapsed&&(r?u.from:u.to)==null&&(!a||Ha(a,u.marker)<0)&&(a=u.marker);return a}function Zl(e){return Xl(e,!0)}function So(e){return Xl(e,!1)}function Py(e,r){var s=an&&e.markedSpans,a;if(s)for(var u=0;u<s.length;++u){var m=s[u];m.marker.collapsed&&(m.from==null||m.from<r)&&(m.to==null||m.to>r)&&(!a||Ha(a,m.marker)<0)&&(a=m.marker)}return a}function Ql(e,r,s,a,u){var m=se(e,r),x=an&&m.markedSpans;if(x)for(var _=0;_<x.length;++_){var C=x[_];if(!!C.marker.collapsed){var L=C.marker.find(0),Y=D(L.from,s)||ko(C.marker)-ko(u),J=D(L.to,a)||_o(C.marker)-_o(u);if(!(Y>=0&&J<=0||Y<=0&&J>=0)&&(Y<=0&&(C.marker.inclusiveRight&&u.inclusiveLeft?D(L.to,s)>=0:D(L.to,s)>0)||Y>=0&&(C.marker.inclusiveRight&&u.inclusiveLeft?D(L.from,a)<=0:D(L.from,a)<0)))return!0}}}function Ur(e){for(var r;r=Zl(e);)e=r.find(-1,!0).line;return e}function Ry(e){for(var r;r=So(e);)e=r.find(1,!0).line;return e}function zy(e){for(var r,s;r=So(e);)e=r.find(1,!0).line,(s||(s=[])).push(e);return s}function Wa(e,r){var s=se(e,r),a=Ur(s);return s==a?r:Ye(a)}function Jl(e,r){if(r>e.lastLine())return r;var s=se(e,r),a;if(!gn(e,s))return r;for(;a=So(s);)s=a.find(1,!0).line;return Ye(s)+1}function gn(e,r){var s=an&&r.markedSpans;if(s){for(var a=void 0,u=0;u<s.length;++u)if(a=s[u],!!a.marker.collapsed){if(a.from==null)return!0;if(!a.marker.widgetNode&&a.from==0&&a.marker.inclusiveLeft&&Ga(e,r,a))return!0}}}function Ga(e,r,s){if(s.to==null){var a=s.marker.find(1,!0);return Ga(e,a.line,Ti(a.line.markedSpans,s.marker))}if(s.marker.inclusiveRight&&s.to==r.text.length)return!0;for(var u=void 0,m=0;m<r.markedSpans.length;++m)if(u=r.markedSpans[m],u.marker.collapsed&&!u.marker.widgetNode&&u.from==s.to&&(u.to==null||u.to!=s.from)&&(u.marker.inclusiveLeft||s.marker.inclusiveRight)&&Ga(e,r,u))return!0}function sn(e){e=Ur(e);for(var r=0,s=e.parent,a=0;a<s.lines.length;++a){var u=s.lines[a];if(u==e)break;r+=u.height}for(var m=s.parent;m;s=m,m=s.parent)for(var x=0;x<m.children.length;++x){var _=m.children[x];if(_==s)break;r+=_.height}return r}function Eo(e){if(e.height==0)return 0;for(var r=e.text.length,s,a=e;s=Zl(a);){var u=s.find(0,!0);a=u.from.line,r+=u.from.ch-u.to.ch}for(a=e;s=So(a);){var m=s.find(0,!0);r-=a.text.length-m.from.ch,a=m.to.line,r+=a.text.length-m.to.ch}return r}function Ka(e){var r=e.display,s=e.doc;r.maxLine=se(s,s.first),r.maxLineLength=Eo(r.maxLine),r.maxLineChanged=!0,s.iter(function(a){var u=Eo(a);u>r.maxLineLength&&(r.maxLineLength=u,r.maxLine=a)})}var Gn=function(e,r,s){this.text=e,Yl(this,r),this.height=s?s(this):1};Gn.prototype.lineNo=function(){return Ye(this)},Vt(Gn);function Ny(e,r,s,a){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Vl(e),Yl(e,s);var u=a?a(e):1;u!=e.height&&Ae(e,u)}function By(e){e.parent=null,Vl(e)}var qy={},$y={};function eu(e,r){if(!e||/^\s*$/.test(e))return null;var s=r.addModeClass?$y:qy;return s[e]||(s[e]=e.replace(/\S+/g,"cm-$&"))}function tu(e,r){var s=T("span",null,null,f?"padding-right: .1px":null),a={pre:T("pre",[s],"CodeMirror-line"),content:s,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 m=u?r.rest[u-1]:r.line,x=void 0;a.pos=0,a.addToken=jy,Qt(e.display.measure)&&(x=Lt(m,e.doc.direction))&&(a.addToken=Wy(a.addToken,x)),a.map=[];var _=r!=e.display.externalMeasured&&Ye(m);Gy(m,a,ql(e,m,_)),m.styleClasses&&(m.styleClasses.bgClass&&(a.bgClass=ne(m.styleClasses.bgClass,a.bgClass||"")),m.styleClasses.textClass&&(a.textClass=ne(m.styleClasses.textClass,a.textClass||""))),a.map.length==0&&a.map.push(0,0,a.content.appendChild(yr(e.display.measure))),u==0?(r.measure.map=a.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(a.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(f){var C=a.content.lastChild;(/\bcm-tab\b/.test(C.className)||C.querySelector&&C.querySelector(".cm-tab"))&&(a.content.className="cm-tab-wrap-hack")}return rt(e,"renderLine",e,r.line,a.pre),a.pre.className&&(a.textClass=ne(a.pre.className,a.textClass||"")),a}function Uy(e){var r=R("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function jy(e,r,s,a,u,m,x){if(!!r){var _=e.splitSpaces?Hy(r,e.trailingSpace):r,C=e.cm.state.specialChars,L=!1,Y;if(!C.test(r))e.col+=r.length,Y=document.createTextNode(_),e.map.push(e.pos,e.pos+r.length,Y),o&&h<9&&(L=!0),e.pos+=r.length;else{Y=document.createDocumentFragment();for(var J=0;;){C.lastIndex=J;var fe=C.exec(r),le=fe?fe.index-J:r.length-J;if(le){var ye=document.createTextNode(_.slice(J,J+le));o&&h<9?Y.appendChild(R("span",[ye])):Y.appendChild(ye),e.map.push(e.pos,e.pos+le,ye),e.col+=le,e.pos+=le}if(!fe)break;J+=le+1;var Ee=void 0;if(fe[0]==" "){var Pe=e.cm.options.tabSize,$e=Pe-e.col%Pe;Ee=Y.appendChild(R("span",gt($e),"cm-tab")),Ee.setAttribute("role","presentation"),Ee.setAttribute("cm-text"," "),e.col+=$e}else fe[0]=="\r"||fe[0]==`
`?(Ee=Y.appendChild(R("span",fe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ee.setAttribute("cm-text",fe[0]),e.col+=1):(Ee=e.cm.options.specialCharPlaceholder(fe[0]),Ee.setAttribute("cm-text",fe[0]),o&&h<9?Y.appendChild(R("span",[Ee])):Y.appendChild(Ee),e.col+=1);e.map.push(e.pos,e.pos+1,Ee),e.pos++}}if(e.trailingSpace=_.charCodeAt(r.length-1)==32,s||a||u||L||m||x){var Qe=s||"";a&&(Qe+=a),u&&(Qe+=u);var Ue=R("span",[Y],Qe,m);if(x)for(var nt in x)x.hasOwnProperty(nt)&&nt!="style"&&nt!="class"&&Ue.setAttribute(nt,x[nt]);return e.content.appendChild(Ue)}e.content.appendChild(Y)}}function Hy(e,r){if(e.length>1&&!/ /.test(e))return e;for(var s=r,a="",u=0;u<e.length;u++){var m=e.charAt(u);m==" "&&s&&(u==e.length-1||e.charCodeAt(u+1)==32)&&(m="\xA0"),a+=m,s=m==" "}return a}function Wy(e,r){return function(s,a,u,m,x,_,C){u=u?u+" cm-force-border":"cm-force-border";for(var L=s.pos,Y=L+a.length;;){for(var J=void 0,fe=0;fe<r.length&&(J=r[fe],!(J.to>L&&J.from<=L));fe++);if(J.to>=Y)return e(s,a,u,m,x,_,C);e(s,a.slice(0,J.to-L),u,m,null,_,C),m=null,a=a.slice(J.to-L),L=J.to}}}function ru(e,r,s,a){var u=!a&&s.widgetNode;u&&e.map.push(e.pos,e.pos+r,u),!a&&e.cm.display.input.needsContentAttribute&&(u||(u=e.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",s.id)),u&&(e.cm.display.input.setUneditable(u),e.content.appendChild(u)),e.pos+=r,e.trailingSpace=!1}function Gy(e,r,s){var a=e.markedSpans,u=e.text,m=0;if(!a){for(var x=1;x<s.length;x+=2)r.addToken(r,u.slice(m,m=s[x]),eu(s[x+1],r.cm.options));return}for(var _=u.length,C=0,L=1,Y="",J,fe,le=0,ye,Ee,Pe,$e,Qe;;){if(le==C){ye=Ee=Pe=fe="",Qe=null,$e=null,le=1/0;for(var Ue=[],nt=void 0,ct=0;ct<a.length;++ct){var ut=a[ct],vt=ut.marker;if(vt.type=="bookmark"&&ut.from==C&&vt.widgetNode)Ue.push(vt);else if(ut.from<=C&&(ut.to==null||ut.to>C||vt.collapsed&&ut.to==C&&ut.from==C)){if(ut.to!=null&&ut.to!=C&&le>ut.to&&(le=ut.to,Ee=""),vt.className&&(ye+=" "+vt.className),vt.css&&(fe=(fe?fe+";":"")+vt.css),vt.startStyle&&ut.from==C&&(Pe+=" "+vt.startStyle),vt.endStyle&&ut.to==le&&(nt||(nt=[])).push(vt.endStyle,ut.to),vt.title&&((Qe||(Qe={})).title=vt.title),vt.attributes)for(var Pt in vt.attributes)(Qe||(Qe={}))[Pt]=vt.attributes[Pt];vt.collapsed&&(!$e||Ha($e.marker,vt)<0)&&($e=ut)}else ut.from>C&&le>ut.from&&(le=ut.from)}if(nt)for(var ir=0;ir<nt.length;ir+=2)nt[ir+1]==le&&(Ee+=" "+nt[ir]);if(!$e||$e.from==C)for(var Bt=0;Bt<Ue.length;++Bt)ru(r,0,Ue[Bt]);if($e&&($e.from||0)==C){if(ru(r,($e.to==null?_+1:$e.to)-C,$e.marker,$e.from==null),$e.to==null)return;$e.to==C&&($e=!1)}}if(C>=_)break;for(var Lr=Math.min(_,le);;){if(Y){var Sr=C+Y.length;if(!$e){var Xt=Sr>Lr?Y.slice(0,Lr-C):Y;r.addToken(r,Xt,J?J+ye:ye,Pe,C+Xt.length==le?Ee:"",fe,Qe)}if(Sr>=Lr){Y=Y.slice(Lr-C),C=Lr;break}C=Sr,Pe=""}Y=u.slice(m,m=s[L++]),J=eu(s[L++],r.cm.options)}}}function nu(e,r,s){this.line=r,this.rest=zy(r),this.size=this.rest?Ye(Re(this.rest))-s+1:1,this.node=this.text=null,this.hidden=gn(e,r)}function Co(e,r,s){for(var a=[],u,m=r;m<s;m=u){var x=new nu(e.doc,se(e.doc,m),m);u=m+x.size,a.push(x)}return a}var Kn=null;function Ky(e){Kn?Kn.ops.push(e):e.ownsGroup=Kn={ops:[e],delayedCallbacks:[]}}function Vy(e){var r=e.delayedCallbacks,s=0;do{for(;s<r.length;s++)r[s].call(null);for(var a=0;a<e.ops.length;a++){var u=e.ops[a];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(s<r.length)}function Yy(e,r){var s=e.ownsGroup;if(!!s)try{Vy(s)}finally{Kn=null,r(s)}}var Ai=null;function tr(e,r){var s=Mt(e,r);if(!!s.length){var a=Array.prototype.slice.call(arguments,2),u;Kn?u=Kn.delayedCallbacks:Ai?u=Ai:(u=Ai=[],setTimeout(Xy,0));for(var m=function(_){u.push(function(){return s[_].apply(null,a)})},x=0;x<s.length;++x)m(x)}}function Xy(){var e=Ai;Ai=null;for(var r=0;r<e.length;++r)e[r]()}function iu(e,r,s,a){for(var u=0;u<r.changes.length;u++){var m=r.changes[u];m=="text"?Qy(e,r):m=="gutter"?au(e,r,s,a):m=="class"?Va(e,r):m=="widget"&&Jy(e,r,a)}r.changes=null}function Li(e){return e.node==e.text&&(e.node=R("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&h<8&&(e.node.style.zIndex=2)),e.node}function Zy(e,r){var s=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(s&&(s+=" CodeMirror-linebackground"),r.background)s?r.background.className=s:(r.background.parentNode.removeChild(r.background),r.background=null);else if(s){var a=Li(r);r.background=a.insertBefore(R("div",null,s),a.firstChild),e.display.input.setUneditable(r.background)}}function ou(e,r){var s=e.display.externalMeasured;return s&&s.line==r.line?(e.display.externalMeasured=null,r.measure=s.measure,s.built):tu(e,r)}function Qy(e,r){var s=r.text.className,a=ou(e,r);r.text==r.node&&(r.node=a.pre),r.text.parentNode.replaceChild(a.pre,r.text),r.text=a.pre,a.bgClass!=r.bgClass||a.textClass!=r.textClass?(r.bgClass=a.bgClass,r.textClass=a.textClass,Va(e,r)):s&&(r.text.className=s)}function Va(e,r){Zy(e,r),r.line.wrapClass?Li(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var s=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=s||""}function au(e,r,s,a){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var u=Li(r);r.gutterBackground=R("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?a.fixedPos:-a.gutterTotalWidth)+"px; width: "+a.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),u.insertBefore(r.gutterBackground,r.text)}var m=r.line.gutterMarkers;if(e.options.lineNumbers||m){var x=Li(r),_=r.gutter=R("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?a.fixedPos:-a.gutterTotalWidth)+"px");if(_.setAttribute("aria-hidden","true"),e.display.input.setUneditable(_),x.insertBefore(_,r.text),r.line.gutterClass&&(_.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!m||!m["CodeMirror-linenumbers"])&&(r.lineNumber=_.appendChild(R("div",Dt(e.options,s),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+a.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),m)for(var C=0;C<e.display.gutterSpecs.length;++C){var L=e.display.gutterSpecs[C].className,Y=m.hasOwnProperty(L)&&m[L];Y&&_.appendChild(R("div",[Y],"CodeMirror-gutter-elt","left: "+a.gutterLeft[L]+"px; width: "+a.gutterWidth[L]+"px"))}}}function Jy(e,r,s){r.alignable&&(r.alignable=null);for(var a=V("CodeMirror-linewidget"),u=r.node.firstChild,m=void 0;u;u=m)m=u.nextSibling,a.test(u.className)&&r.node.removeChild(u);su(e,r,s)}function eb(e,r,s,a){var u=ou(e,r);return r.text=r.node=u.pre,u.bgClass&&(r.bgClass=u.bgClass),u.textClass&&(r.textClass=u.textClass),Va(e,r),au(e,r,s,a),su(e,r,a),r.node}function su(e,r,s){if(lu(e,r.line,r,s,!0),r.rest)for(var a=0;a<r.rest.length;a++)lu(e,r.rest[a],r,s,!1)}function lu(e,r,s,a,u){if(!!r.widgets)for(var m=Li(s),x=0,_=r.widgets;x<_.length;++x){var C=_[x],L=R("div",[C.node],"CodeMirror-linewidget"+(C.className?" "+C.className:""));C.handleMouseEvents||L.setAttribute("cm-ignore-events","true"),tb(C,L,s,a),e.display.input.setUneditable(L),u&&C.above?m.insertBefore(L,s.gutter||s.text):m.appendChild(L),tr(C,"redraw")}}function tb(e,r,s,a){if(e.noHScroll){(s.alignable||(s.alignable=[])).push(r);var u=a.wrapperWidth;r.style.left=a.fixedPos+"px",e.coverGutter||(u-=a.gutterTotalWidth,r.style.paddingLeft=a.gutterTotalWidth+"px"),r.style.width=u+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-a.gutterTotalWidth+"px"))}function Di(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!Z(document.body,e.node)){var s="position: relative;";e.coverGutter&&(s+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(s+="width: "+r.display.wrapper.clientWidth+"px;"),q(r.display.measure,R("div",[e.node],null,s))}return e.height=e.node.parentNode.offsetHeight}function ln(e,r){for(var s=hr(r);s!=e.wrapper;s=s.parentNode)if(!s||s.nodeType==1&&s.getAttribute("cm-ignore-events")=="true"||s.parentNode==e.sizer&&s!=e.mover)return!0}function To(e){return e.lineSpace.offsetTop}function Ya(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function uu(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=q(e.measure,R("pre","x","CodeMirror-line-like")),s=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,a={left:parseInt(s.paddingLeft),right:parseInt(s.paddingRight)};return!isNaN(a.left)&&!isNaN(a.right)&&(e.cachedPaddingH=a),a}function Yr(e){return _e-e.display.nativeBarWidth}function An(e){return e.display.scroller.clientWidth-Yr(e)-e.display.barWidth}function Xa(e){return e.display.scroller.clientHeight-Yr(e)-e.display.barHeight}function rb(e,r,s){var a=e.options.lineWrapping,u=a&&An(e);if(!r.measure.heights||a&&r.measure.width!=u){var m=r.measure.heights=[];if(a){r.measure.width=u;for(var x=r.text.firstChild.getClientRects(),_=0;_<x.length-1;_++){var C=x[_],L=x[_+1];Math.abs(C.bottom-L.bottom)>2&&m.push((C.bottom+L.top)/2-s.top)}}m.push(s.bottom-s.top)}}function cu(e,r,s){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var a=0;a<e.rest.length;a++)if(e.rest[a]==r)return{map:e.measure.maps[a],cache:e.measure.caches[a]};for(var u=0;u<e.rest.length;u++)if(Ye(e.rest[u])>s)return{map:e.measure.maps[u],cache:e.measure.caches[u],before:!0}}}function nb(e,r){r=Ur(r);var s=Ye(r),a=e.display.externalMeasured=new nu(e.doc,r,s);a.lineN=s;var u=a.built=tu(e,a);return a.text=u.pre,q(e.display.lineMeasure,u.pre),a}function fu(e,r,s,a){return Xr(e,Vn(e,r),s,a)}function Za(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[In(e,r)];var s=e.display.externalMeasured;if(s&&r>=s.lineN&&r<s.lineN+s.size)return s}function Vn(e,r){var s=Ye(r),a=Za(e,s);a&&!a.text?a=null:a&&a.changes&&(iu(e,a,s,rs(e)),e.curOp.forceUpdate=!0),a||(a=nb(e,r));var u=cu(a,r,s);return{line:r,view:a,rect:null,map:u.map,cache:u.cache,before:u.before,hasHeights:!1}}function Xr(e,r,s,a,u){r.before&&(s=-1);var m=s+(a||""),x;return r.cache.hasOwnProperty(m)?x=r.cache[m]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(rb(e,r.view,r.rect),r.hasHeights=!0),x=ob(e,r,s,a),x.bogus||(r.cache[m]=x)),{left:x.left,right:x.right,top:u?x.rtop:x.top,bottom:u?x.rbottom:x.bottom}}var du={left:0,right:0,top:0,bottom:0};function hu(e,r,s){for(var a,u,m,x,_,C,L=0;L<e.length;L+=3)if(_=e[L],C=e[L+1],r<_?(u=0,m=1,x="left"):r<C?(u=r-_,m=u+1):(L==e.length-3||r==C&&e[L+3]>r)&&(m=C-_,u=m-1,r>=C&&(x="right")),u!=null){if(a=e[L+2],_==C&&s==(a.insertLeft?"left":"right")&&(x=s),s=="left"&&u==0)for(;L&&e[L-2]==e[L-3]&&e[L-1].insertLeft;)a=e[(L-=3)+2],x="left";if(s=="right"&&u==C-_)for(;L<e.length-3&&e[L+3]==e[L+4]&&!e[L+5].insertLeft;)a=e[(L+=3)+2],x="right";break}return{node:a,start:u,end:m,collapse:x,coverStart:_,coverEnd:C}}function ib(e,r){var s=du;if(r=="left")for(var a=0;a<e.length&&(s=e[a]).left==s.right;a++);else for(var u=e.length-1;u>=0&&(s=e[u]).left==s.right;u--);return s}function ob(e,r,s,a){var u=hu(r.map,s,a),m=u.node,x=u.start,_=u.end,C=u.collapse,L;if(m.nodeType==3){for(var Y=0;Y<4;Y++){for(;x&&it(r.line.text.charAt(u.coverStart+x));)--x;for(;u.coverStart+_<u.coverEnd&&it(r.line.text.charAt(u.coverStart+_));)++_;if(o&&h<9&&x==0&&_==u.coverEnd-u.coverStart?L=m.parentNode.getBoundingClientRect():L=ib(H(m,x,_).getClientRects(),a),L.left||L.right||x==0)break;_=x,x=x-1,C="right"}o&&h<11&&(L=ab(e.display.measure,L))}else{x>0&&(C=a="right");var J;e.options.lineWrapping&&(J=m.getClientRects()).length>1?L=J[a=="right"?J.length-1:0]:L=m.getBoundingClientRect()}if(o&&h<9&&!x&&(!L||!L.left&&!L.right)){var fe=m.parentNode.getClientRects()[0];fe?L={left:fe.left,right:fe.left+Xn(e.display),top:fe.top,bottom:fe.bottom}:L=du}for(var le=L.top-r.rect.top,ye=L.bottom-r.rect.top,Ee=(le+ye)/2,Pe=r.view.measure.heights,$e=0;$e<Pe.length-1&&!(Ee<Pe[$e]);$e++);var Qe=$e?Pe[$e-1]:0,Ue=Pe[$e],nt={left:(C=="right"?L.right:L.left)-r.rect.left,right:(C=="left"?L.left:L.right)-r.rect.left,top:Qe,bottom:Ue};return!L.left&&!L.right&&(nt.bogus=!0),e.options.singleCursorHeightPerLine||(nt.rtop=le,nt.rbottom=ye),nt}function ab(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!M(e))return r;var s=screen.logicalXDPI/screen.deviceXDPI,a=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*s,right:r.right*s,top:r.top*a,bottom:r.bottom*a}}function pu(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function mu(e){e.display.externalMeasure=null,K(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)pu(e.display.view[r])}function Ii(e){mu(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function gu(){return y&&w?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function vu(){return y&&w?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Qa(e){var r=Ur(e),s=r.widgets,a=0;if(s)for(var u=0;u<s.length;++u)s[u].above&&(a+=Di(s[u]));return a}function Ao(e,r,s,a,u){if(!u){var m=Qa(r);s.top+=m,s.bottom+=m}if(a=="line")return s;a||(a="local");var x=sn(r);if(a=="local"?x+=To(e.display):x-=e.display.viewOffset,a=="page"||a=="window"){var _=e.display.lineSpace.getBoundingClientRect();x+=_.top+(a=="window"?0:vu());var C=_.left+(a=="window"?0:gu());s.left+=C,s.right+=C}return s.top+=x,s.bottom+=x,s}function yu(e,r,s){if(s=="div")return r;var a=r.left,u=r.top;if(s=="page")a-=gu(),u-=vu();else if(s=="local"||!s){var m=e.display.sizer.getBoundingClientRect();a+=m.left,u+=m.top}var x=e.display.lineSpace.getBoundingClientRect();return{left:a-x.left,top:u-x.top}}function Lo(e,r,s,a,u){return a||(a=se(e.doc,r.line)),Ao(e,a,fu(e,a,r.ch,u),s)}function jr(e,r,s,a,u,m){a=a||se(e.doc,r.line),u||(u=Vn(e,a));function x(ye,Ee){var Pe=Xr(e,u,ye,Ee?"right":"left",m);return Ee?Pe.left=Pe.right:Pe.right=Pe.left,Ao(e,a,Pe,s)}var _=Lt(a,e.doc.direction),C=r.ch,L=r.sticky;if(C>=a.text.length?(C=a.text.length,L="before"):C<=0&&(C=0,L="after"),!_)return x(L=="before"?C-1:C,L=="before");function Y(ye,Ee,Pe){var $e=_[Ee],Qe=$e.level==1;return x(Pe?ye-1:ye,Qe!=Pe)}var J=We(_,C,L),fe=et,le=Y(C,J,L=="before");return fe!=null&&(le.other=Y(C,fe,L!="before")),le}function bu(e,r){var s=0;r=Ze(e.doc,r),e.options.lineWrapping||(s=Xn(e.display)*r.ch);var a=se(e.doc,r.line),u=sn(a)+To(e.display);return{left:s,right:s,top:u,bottom:u+a.height}}function Ja(e,r,s,a,u){var m=we(e,r,s);return m.xRel=u,a&&(m.outside=a),m}function es(e,r,s){var a=e.doc;if(s+=e.display.viewOffset,s<0)return Ja(a.first,0,null,-1,-1);var u=tt(a,s),m=a.first+a.size-1;if(u>m)return Ja(a.first+a.size-1,se(a,m).text.length,null,1,1);r<0&&(r=0);for(var x=se(a,u);;){var _=sb(e,x,u,r,s),C=Py(x,_.ch+(_.xRel>0||_.outside>0?1:0));if(!C)return _;var L=C.find(1);if(L.line==u)return L;x=se(a,u=L.line)}}function xu(e,r,s,a){a-=Qa(r);var u=r.text.length,m=ot(function(x){return Xr(e,s,x-1).bottom<=a},u,0);return u=ot(function(x){return Xr(e,s,x).top>a},m,u),{begin:m,end:u}}function wu(e,r,s,a){s||(s=Vn(e,r));var u=Ao(e,r,Xr(e,s,a),"line").top;return xu(e,r,s,u)}function ts(e,r,s,a){return e.bottom<=s?!1:e.top>s?!0:(a?e.left:e.right)>r}function sb(e,r,s,a,u){u-=sn(r);var m=Vn(e,r),x=Qa(r),_=0,C=r.text.length,L=!0,Y=Lt(r,e.doc.direction);if(Y){var J=(e.options.lineWrapping?ub:lb)(e,r,s,m,Y,a,u);L=J.level!=1,_=L?J.from:J.to-1,C=L?J.to:J.from-1}var fe=null,le=null,ye=ot(function(ct){var ut=Xr(e,m,ct);return ut.top+=x,ut.bottom+=x,ts(ut,a,u,!1)?(ut.top<=u&&ut.left<=a&&(fe=ct,le=ut),!0):!1},_,C),Ee,Pe,$e=!1;if(le){var Qe=a-le.left<le.right-a,Ue=Qe==L;ye=fe+(Ue?0:1),Pe=Ue?"after":"before",Ee=Qe?le.left:le.right}else{!L&&(ye==C||ye==_)&&ye++,Pe=ye==0?"after":ye==r.text.length?"before":Xr(e,m,ye-(L?1:0)).bottom+x<=u==L?"after":"before";var nt=jr(e,we(s,ye,Pe),"line",r,m);Ee=nt.left,$e=u<nt.top?-1:u>=nt.bottom?1:0}return ye=Ne(r.text,ye,1),Ja(s,ye,Pe,$e,a-Ee)}function lb(e,r,s,a,u,m,x){var _=ot(function(J){var fe=u[J],le=fe.level!=1;return ts(jr(e,we(s,le?fe.to:fe.from,le?"before":"after"),"line",r,a),m,x,!0)},0,u.length-1),C=u[_];if(_>0){var L=C.level!=1,Y=jr(e,we(s,L?C.from:C.to,L?"after":"before"),"line",r,a);ts(Y,m,x,!0)&&Y.top>x&&(C=u[_-1])}return C}function ub(e,r,s,a,u,m,x){var _=xu(e,r,a,x),C=_.begin,L=_.end;/\s/.test(r.text.charAt(L-1))&&L--;for(var Y=null,J=null,fe=0;fe<u.length;fe++){var le=u[fe];if(!(le.from>=L||le.to<=C)){var ye=le.level!=1,Ee=Xr(e,a,ye?Math.min(L,le.to)-1:Math.max(C,le.from)).right,Pe=Ee<m?m-Ee+1e9:Ee-m;(!Y||J>Pe)&&(Y=le,J=Pe)}}return Y||(Y=u[u.length-1]),Y.from<C&&(Y={from:C,to:Y.to,level:Y.level}),Y.to>L&&(Y={from:Y.from,to:L,level:Y.level}),Y}var Ln;function Yn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Ln==null){Ln=R("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Ln.appendChild(document.createTextNode("x")),Ln.appendChild(R("br"));Ln.appendChild(document.createTextNode("x"))}q(e.measure,Ln);var s=Ln.offsetHeight/50;return s>3&&(e.cachedTextHeight=s),K(e.measure),s||1}function Xn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=R("span","xxxxxxxxxx"),s=R("pre",[r],"CodeMirror-line-like");q(e.measure,s);var a=r.getBoundingClientRect(),u=(a.right-a.left)/10;return u>2&&(e.cachedCharWidth=u),u||10}function rs(e){for(var r=e.display,s={},a={},u=r.gutters.clientLeft,m=r.gutters.firstChild,x=0;m;m=m.nextSibling,++x){var _=e.display.gutterSpecs[x].className;s[_]=m.offsetLeft+m.clientLeft+u,a[_]=m.clientWidth}return{fixedPos:ns(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:s,gutterWidth:a,wrapperWidth:r.wrapper.clientWidth}}function ns(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ku(e){var r=Yn(e.display),s=e.options.lineWrapping,a=s&&Math.max(5,e.display.scroller.clientWidth/Xn(e.display)-3);return function(u){if(gn(e.doc,u))return 0;var m=0;if(u.widgets)for(var x=0;x<u.widgets.length;x++)u.widgets[x].height&&(m+=u.widgets[x].height);return s?m+(Math.ceil(u.text.length/a)||1)*r:m+r}}function is(e){var r=e.doc,s=ku(e);r.iter(function(a){var u=s(a);u!=a.height&&Ae(a,u)})}function Dn(e,r,s,a){var u=e.display;if(!s&&hr(r).getAttribute("cm-not-content")=="true")return null;var m,x,_=u.lineSpace.getBoundingClientRect();try{m=r.clientX-_.left,x=r.clientY-_.top}catch{return null}var C=es(e,m,x),L;if(a&&C.xRel>0&&(L=se(e.doc,C.line).text).length==C.ch){var Y=be(L,L.length,e.options.tabSize)-L.length;C=we(C.line,Math.max(0,Math.round((m-uu(e.display).left)/Xn(e.display))-Y))}return C}function In(e,r){if(r>=e.display.viewTo||(r-=e.display.viewFrom,r<0))return null;for(var s=e.display.view,a=0;a<s.length;a++)if(r-=s[a].size,r<0)return a}function kr(e,r,s,a){r==null&&(r=e.doc.first),s==null&&(s=e.doc.first+e.doc.size),a||(a=0);var u=e.display;if(a&&s<u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>r)&&(u.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=u.viewTo)an&&Wa(e.doc,r)<u.viewTo&&yn(e);else if(s<=u.viewFrom)an&&Jl(e.doc,s+a)>u.viewFrom?yn(e):(u.viewFrom+=a,u.viewTo+=a);else if(r<=u.viewFrom&&s>=u.viewTo)yn(e);else if(r<=u.viewFrom){var m=Do(e,s,s+a,1);m?(u.view=u.view.slice(m.index),u.viewFrom=m.lineN,u.viewTo+=a):yn(e)}else if(s>=u.viewTo){var x=Do(e,r,r,-1);x?(u.view=u.view.slice(0,x.index),u.viewTo=x.lineN):yn(e)}else{var _=Do(e,r,r,-1),C=Do(e,s,s+a,1);_&&C?(u.view=u.view.slice(0,_.index).concat(Co(e,_.lineN,C.lineN)).concat(u.view.slice(C.index)),u.viewTo+=a):yn(e)}var L=u.externalMeasured;L&&(s<L.lineN?L.lineN+=a:r<L.lineN+L.size&&(u.externalMeasured=null))}function vn(e,r,s){e.curOp.viewChanged=!0;var a=e.display,u=e.display.externalMeasured;if(u&&r>=u.lineN&&r<u.lineN+u.size&&(a.externalMeasured=null),!(r<a.viewFrom||r>=a.viewTo)){var m=a.view[In(e,r)];if(m.node!=null){var x=m.changes||(m.changes=[]);xe(x,s)==-1&&x.push(s)}}}function yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Do(e,r,s,a){var u=In(e,r),m,x=e.display.view;if(!an||s==e.doc.first+e.doc.size)return{index:u,lineN:s};for(var _=e.display.viewFrom,C=0;C<u;C++)_+=x[C].size;if(_!=r){if(a>0){if(u==x.length-1)return null;m=_+x[u].size-r,u++}else m=_-r;r+=m,s+=m}for(;Wa(e.doc,s)!=s;){if(u==(a<0?0:x.length-1))return null;s+=a*x[u-(a<0?1:0)].size,u+=a}return{index:u,lineN:s}}function cb(e,r,s){var a=e.display,u=a.view;u.length==0||r>=a.viewTo||s<=a.viewFrom?(a.view=Co(e,r,s),a.viewFrom=r):(a.viewFrom>r?a.view=Co(e,r,a.viewFrom).concat(a.view):a.viewFrom<r&&(a.view=a.view.slice(In(e,r))),a.viewFrom=r,a.viewTo<s?a.view=a.view.concat(Co(e,a.viewTo,s)):a.viewTo>s&&(a.view=a.view.slice(0,In(e,s)))),a.viewTo=s}function _u(e){for(var r=e.display.view,s=0,a=0;a<r.length;a++){var u=r[a];!u.hidden&&(!u.node||u.changes)&&++s}return s}function Fi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Su(e,r){r===void 0&&(r=!0);var s=e.doc,a={},u=a.cursors=document.createDocumentFragment(),m=a.selection=document.createDocumentFragment(),x=e.options.$customCursor;x&&(r=!0);for(var _=0;_<s.sel.ranges.length;_++)if(!(!r&&_==s.sel.primIndex)){var C=s.sel.ranges[_];if(!(C.from().line>=e.display.viewTo||C.to().line<e.display.viewFrom)){var L=C.empty();if(x){var Y=x(e,C);Y&&os(e,Y,u)}else(L||e.options.showCursorWhenSelecting)&&os(e,C.head,u);L||fb(e,C,m)}}return a}function os(e,r,s){var a=jr(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),u=s.appendChild(R("div","\xA0","CodeMirror-cursor"));if(u.style.left=a.left+"px",u.style.top=a.top+"px",u.style.height=Math.max(0,a.bottom-a.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var m=Lo(e,r,"div",null,null),x=m.right-m.left;u.style.width=(x>0?x:e.defaultCharWidth())+"px"}if(a.other){var _=s.appendChild(R("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));_.style.display="",_.style.left=a.other.left+"px",_.style.top=a.other.top+"px",_.style.height=(a.other.bottom-a.other.top)*.85+"px"}}function Io(e,r){return e.top-r.top||e.left-r.left}function fb(e,r,s){var a=e.display,u=e.doc,m=document.createDocumentFragment(),x=uu(e.display),_=x.left,C=Math.max(a.sizerWidth,An(e)-a.sizer.offsetLeft)-x.right,L=u.direction=="ltr";function Y(Ue,nt,ct,ut){nt<0&&(nt=0),nt=Math.round(nt),ut=Math.round(ut),m.appendChild(R("div",null,"CodeMirror-selected","position: absolute; left: "+Ue+`px;
top: `+nt+"px; width: "+(ct==null?C-Ue:ct)+`px;
height: `+(ut-nt)+"px"))}function J(Ue,nt,ct){var ut=se(u,Ue),vt=ut.text.length,Pt,ir;function Bt(Xt,Er){return Lo(e,we(Ue,Xt),"div",ut,Er)}function Lr(Xt,Er,cr){var Jt=wu(e,ut,null,Xt),Zt=Er=="ltr"==(cr=="after")?"left":"right",Ut=cr=="after"?Jt.begin:Jt.end-(/\s/.test(ut.text.charAt(Jt.end-1))?2:1);return Bt(Ut,Zt)[Zt]}var Sr=Lt(ut,u.direction);return Xe(Sr,nt||0,ct==null?vt:ct,function(Xt,Er,cr,Jt){var Zt=cr=="ltr",Ut=Bt(Xt,Zt?"left":"right"),Cr=Bt(Er-1,Zt?"right":"left"),ui=nt==null&&Xt==0,Sn=ct==null&&Er==vt,gr=Jt==0,Zr=!Sr||Jt==Sr.length-1;if(Cr.top-Ut.top<=3){var or=(L?ui:Sn)&&gr,Is=(L?Sn:ui)&&Zr,fn=or?_:(Zt?Ut:Cr).left,Rn=Is?C:(Zt?Cr:Ut).right;Y(fn,Ut.top,Rn-fn,Ut.bottom)}else{var zn,xr,ci,Fs;Zt?(zn=L&&ui&&gr?_:Ut.left,xr=L?C:Lr(Xt,cr,"before"),ci=L?_:Lr(Er,cr,"after"),Fs=L&&Sn&&Zr?C:Cr.right):(zn=L?Lr(Xt,cr,"before"):_,xr=!L&&ui&&gr?C:Ut.right,ci=!L&&Sn&&Zr?_:Cr.left,Fs=L?Lr(Er,cr,"after"):C),Y(zn,Ut.top,xr-zn,Ut.bottom),Ut.bottom<Cr.top&&Y(_,Ut.bottom,null,Cr.top),Y(ci,Cr.top,Fs-ci,Cr.bottom)}(!Pt||Io(Ut,Pt)<0)&&(Pt=Ut),Io(Cr,Pt)<0&&(Pt=Cr),(!ir||Io(Ut,ir)<0)&&(ir=Ut),Io(Cr,ir)<0&&(ir=Cr)}),{start:Pt,end:ir}}var fe=r.from(),le=r.to();if(fe.line==le.line)J(fe.line,fe.ch,le.ch);else{var ye=se(u,fe.line),Ee=se(u,le.line),Pe=Ur(ye)==Ur(Ee),$e=J(fe.line,fe.ch,Pe?ye.text.length+1:null).end,Qe=J(le.line,Pe?0:null,le.ch).start;Pe&&($e.top<Qe.top-2?(Y($e.right,$e.top,null,$e.bottom),Y(_,Qe.top,Qe.left,Qe.bottom)):Y($e.right,$e.top,Qe.left-$e.right,$e.bottom)),$e.bottom<Qe.top&&Y(_,$e.bottom,null,Qe.top)}s.appendChild(m)}function as(e){if(!!e.state.focused){var r=e.display;clearInterval(r.blinker);var s=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Zn(e),r.cursorDiv.style.visibility=(s=!s)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}}function Eu(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ls(e))}function ss(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Zn(e))},100)}function ls(e,r){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(rt(e,"focus",e,r),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),f&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),as(e))}function Zn(e,r){e.state.delayingBlurEvent||(e.state.focused&&(rt(e,"blur",e,r),e.state.focused=!1,W(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Fo(e){for(var r=e.display,s=r.lineDiv.offsetTop,a=Math.max(0,r.scroller.getBoundingClientRect().top),u=r.lineDiv.getBoundingClientRect().top,m=0,x=0;x<r.view.length;x++){var _=r.view[x],C=e.options.lineWrapping,L=void 0,Y=0;if(!_.hidden){if(u+=_.line.height,o&&h<8){var J=_.node.offsetTop+_.node.offsetHeight;L=J-s,s=J}else{var fe=_.node.getBoundingClientRect();L=fe.bottom-fe.top,!C&&_.text.firstChild&&(Y=_.text.firstChild.getBoundingClientRect().right-fe.left-1)}var le=_.line.height-L;if((le>.005||le<-.005)&&(u<a&&(m-=le),Ae(_.line,L),Cu(_.line),_.rest))for(var ye=0;ye<_.rest.length;ye++)Cu(_.rest[ye]);if(Y>e.display.sizerWidth){var Ee=Math.ceil(Y/Xn(e.display));Ee>e.display.maxLineLength&&(e.display.maxLineLength=Ee,e.display.maxLine=_.line,e.display.maxLineChanged=!0)}}}Math.abs(m)>2&&(r.scroller.scrollTop+=m)}function Cu(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var s=e.widgets[r],a=s.node.parentNode;a&&(s.height=a.offsetHeight)}}function Mo(e,r,s){var a=s&&s.top!=null?Math.max(0,s.top):e.scroller.scrollTop;a=Math.floor(a-To(e));var u=s&&s.bottom!=null?s.bottom:a+e.wrapper.clientHeight,m=tt(r,a),x=tt(r,u);if(s&&s.ensure){var _=s.ensure.from.line,C=s.ensure.to.line;_<m?(m=_,x=tt(r,sn(se(r,_))+e.wrapper.clientHeight)):Math.min(C,r.lastLine())>=x&&(m=tt(r,sn(se(r,C))-e.wrapper.clientHeight),x=C)}return{from:m,to:Math.max(x,m+1)}}function db(e,r){if(!wt(e,"scrollCursorIntoView")){var s=e.display,a=s.sizer.getBoundingClientRect(),u=null;if(r.top+a.top<0?u=!0:r.bottom+a.top>(window.innerHeight||document.documentElement.clientHeight)&&(u=!1),u!=null&&!k){var m=R("div","\u200B",null,`position: absolute;
top: `+(r.top-s.viewOffset-To(e.display))+`px;
height: `+(r.bottom-r.top+Yr(e)+s.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(m),m.scrollIntoView(u),e.display.lineSpace.removeChild(m)}}}function hb(e,r,s,a){a==null&&(a=0);var u;!e.options.lineWrapping&&r==s&&(s=r.sticky=="before"?we(r.line,r.ch+1,"before"):r,r=r.ch?we(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r);for(var m=0;m<5;m++){var x=!1,_=jr(e,r),C=!s||s==r?_:jr(e,s);u={left:Math.min(_.left,C.left),top:Math.min(_.top,C.top)-a,right:Math.max(_.left,C.left),bottom:Math.max(_.bottom,C.bottom)+a};var L=us(e,u),Y=e.doc.scrollTop,J=e.doc.scrollLeft;if(L.scrollTop!=null&&(Oi(e,L.scrollTop),Math.abs(e.doc.scrollTop-Y)>1&&(x=!0)),L.scrollLeft!=null&&(Fn(e,L.scrollLeft),Math.abs(e.doc.scrollLeft-J)>1&&(x=!0)),!x)break}return u}function pb(e,r){var s=us(e,r);s.scrollTop!=null&&Oi(e,s.scrollTop),s.scrollLeft!=null&&Fn(e,s.scrollLeft)}function us(e,r){var s=e.display,a=Yn(e.display);r.top<0&&(r.top=0);var u=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:s.scroller.scrollTop,m=Xa(e),x={};r.bottom-r.top>m&&(r.bottom=r.top+m);var _=e.doc.height+Ya(s),C=r.top<a,L=r.bottom>_-a;if(r.top<u)x.scrollTop=C?0:r.top;else if(r.bottom>u+m){var Y=Math.min(r.top,(L?_:r.bottom)-m);Y!=u&&(x.scrollTop=Y)}var J=e.options.fixedGutter?0:s.gutters.offsetWidth,fe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:s.scroller.scrollLeft-J,le=An(e)-s.gutters.offsetWidth,ye=r.right-r.left>le;return ye&&(r.right=r.left+le),r.left<10?x.scrollLeft=0:r.left<fe?x.scrollLeft=Math.max(0,r.left+J-(ye?0:10)):r.right>le+fe-3&&(x.scrollLeft=r.right+(ye?0:10)-le),x}function cs(e,r){r!=null&&(Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Qn(e){Oo(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Mi(e,r,s){(r!=null||s!=null)&&Oo(e),r!=null&&(e.curOp.scrollLeft=r),s!=null&&(e.curOp.scrollTop=s)}function mb(e,r){Oo(e),e.curOp.scrollToPos=r}function Oo(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var s=bu(e,r.from),a=bu(e,r.to);Tu(e,s,a,r.margin)}}function Tu(e,r,s,a){var u=us(e,{left:Math.min(r.left,s.left),top:Math.min(r.top,s.top)-a,right:Math.max(r.right,s.right),bottom:Math.max(r.bottom,s.bottom)+a});Mi(e,u.scrollLeft,u.scrollTop)}function Oi(e,r){Math.abs(e.doc.scrollTop-r)<2||(n||ds(e,{top:r}),Au(e,r,!0),n&&ds(e),zi(e,100))}function Au(e,r,s){r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),!(e.display.scroller.scrollTop==r&&!s)&&(e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r))}function Fn(e,r,s,a){r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((s?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!a)&&(e.doc.scrollLeft=r,Mu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r))}function Pi(e){var r=e.display,s=r.gutters.offsetWidth,a=Math.round(e.doc.height+Ya(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?s:0,docHeight:a,scrollHeight:a+Yr(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:s}}var Mn=function(e,r,s){this.cm=s;var a=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a.tabIndex=u.tabIndex=-1,e(a),e(u),lt(a,"scroll",function(){a.clientHeight&&r(a.scrollTop,"vertical")}),lt(u,"scroll",function(){u.clientWidth&&r(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,o&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Mn.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,s=e.scrollHeight>e.clientHeight+1,a=e.nativeBarWidth;if(s){this.vert.style.display="block",this.vert.style.bottom=r?a+"px":"0";var u=e.viewHeight-(r?a:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+u)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=s?a+"px":"0",this.horiz.style.left=e.barLeft+"px";var m=e.viewWidth-e.barLeft-(s?a:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+m)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(a==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:s?a:0,bottom:r?a:0}},Mn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Mn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Mn.prototype.zeroWidthHack=function(){var e=S&&!b?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Fe,this.disableVert=new Fe},Mn.prototype.enableZeroWidthBar=function(e,r,s){e.style.pointerEvents="auto";function a(){var u=e.getBoundingClientRect(),m=s=="vert"?document.elementFromPoint(u.right-1,(u.top+u.bottom)/2):document.elementFromPoint((u.right+u.left)/2,u.bottom-1);m!=e?e.style.pointerEvents="none":r.set(1e3,a)}r.set(1e3,a)},Mn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ri=function(){};Ri.prototype.update=function(){return{bottom:0,right:0}},Ri.prototype.setScrollLeft=function(){},Ri.prototype.setScrollTop=function(){},Ri.prototype.clear=function(){};function Jn(e,r){r||(r=Pi(e));var s=e.display.barWidth,a=e.display.barHeight;Lu(e,r);for(var u=0;u<4&&s!=e.display.barWidth||a!=e.display.barHeight;u++)s!=e.display.barWidth&&e.options.lineWrapping&&Fo(e),Lu(e,Pi(e)),s=e.display.barWidth,a=e.display.barHeight}function Lu(e,r){var s=e.display,a=s.scrollbars.update(r);s.sizer.style.paddingRight=(s.barWidth=a.right)+"px",s.sizer.style.paddingBottom=(s.barHeight=a.bottom)+"px",s.heightForcer.style.borderBottom=a.bottom+"px solid transparent",a.right&&a.bottom?(s.scrollbarFiller.style.display="block",s.scrollbarFiller.style.height=a.bottom+"px",s.scrollbarFiller.style.width=a.right+"px"):s.scrollbarFiller.style.display="",a.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(s.gutterFiller.style.display="block",s.gutterFiller.style.height=a.bottom+"px",s.gutterFiller.style.width=r.gutterWidth+"px"):s.gutterFiller.style.display=""}var Du={native:Mn,null:Ri};function Iu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Du[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),lt(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,s){s=="horizontal"?Fn(e,r):Oi(e,r)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var gb=0;function On(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:++gb,markArrays:null},Ky(e.curOp)}function Pn(e){var r=e.curOp;r&&Yy(r,function(s){for(var a=0;a<s.ops.length;a++)s.ops[a].cm.curOp=null;vb(s)})}function vb(e){for(var r=e.ops,s=0;s<r.length;s++)yb(r[s]);for(var a=0;a<r.length;a++)bb(r[a]);for(var u=0;u<r.length;u++)xb(r[u]);for(var m=0;m<r.length;m++)wb(r[m]);for(var x=0;x<r.length;x++)kb(r[x])}function yb(e){var r=e.cm,s=r.display;Sb(r),e.updateMaxLine&&Ka(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<s.viewFrom||e.scrollToPos.to.line>=s.viewTo)||s.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new Po(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function bb(e){e.updatedDisplay=e.mustUpdate&&fs(e.cm,e.update)}function xb(e){var r=e.cm,s=r.display;e.updatedDisplay&&Fo(r),e.barMeasure=Pi(r),s.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=fu(r,s.maxLine,s.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(s.scroller.clientWidth,s.sizer.offsetLeft+e.adjustWidthTo+Yr(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,s.sizer.offsetLeft+e.adjustWidthTo-An(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=s.input.prepareSelection())}function wb(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&Fn(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var s=e.focus&&e.focus==P();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,s),(e.updatedDisplay||e.startHeight!=r.doc.height)&&Jn(r,e.barMeasure),e.updatedDisplay&&ps(r,e.barMeasure),e.selectionChanged&&as(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),s&&Eu(e.cm)}function kb(e){var r=e.cm,s=r.display,a=r.doc;if(e.updatedDisplay&&Fu(r,e.update),s.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(s.wheelStartX=s.wheelStartY=null),e.scrollTop!=null&&Au(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Fn(r,e.scrollLeft,!0,!0),e.scrollToPos){var u=hb(r,Ze(a,e.scrollToPos.from),Ze(a,e.scrollToPos.to),e.scrollToPos.margin);db(r,u)}var m=e.maybeHiddenMarkers,x=e.maybeUnhiddenMarkers;if(m)for(var _=0;_<m.length;++_)m[_].lines.length||rt(m[_],"hide");if(x)for(var C=0;C<x.length;++C)x[C].lines.length&&rt(x[C],"unhide");s.wrapper.offsetHeight&&(a.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&rt(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Ar(e,r){if(e.curOp)return r();On(e);try{return r()}finally{Pn(e)}}function rr(e,r){return function(){if(e.curOp)return r.apply(e,arguments);On(e);try{return r.apply(e,arguments)}finally{Pn(e)}}}function br(e){return function(){if(this.curOp)return e.apply(this,arguments);On(this);try{return e.apply(this,arguments)}finally{Pn(this)}}}function nr(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);On(r);try{return e.apply(this,arguments)}finally{Pn(r)}}}function zi(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,F(_b,e))}function _b(e){var r=e.doc;if(!(r.highlightFrontier>=e.display.viewTo)){var s=+new Date+e.options.workTime,a=Ci(e,r.highlightFrontier),u=[];r.iter(a.line,Math.min(r.first+r.size,e.display.viewTo+500),function(m){if(a.line>=e.display.viewFrom){var x=m.styles,_=m.text.length>e.options.maxHighlightLength?Ve(r.mode,a.state):null,C=Bl(e,m,a,!0);_&&(a.state=_),m.styles=C.styles;var L=m.styleClasses,Y=C.classes;Y?m.styleClasses=Y:L&&(m.styleClasses=null);for(var J=!x||x.length!=m.styles.length||L!=Y&&(!L||!Y||L.bgClass!=Y.bgClass||L.textClass!=Y.textClass),fe=0;!J&&fe<x.length;++fe)J=x[fe]!=m.styles[fe];J&&u.push(a.line),m.stateAfter=a.save(),a.nextLine()}else m.text.length<=e.options.maxHighlightLength&&$a(e,m.text,a),m.stateAfter=a.line%5==0?a.save():null,a.nextLine();if(+new Date>s)return zi(e,e.options.workDelay),!0}),r.highlightFrontier=a.line,r.modeFrontier=Math.max(r.modeFrontier,a.line),u.length&&Ar(e,function(){for(var m=0;m<u.length;m++)vn(e,u[m],"text")})}}var Po=function(e,r,s){var a=e.display;this.viewport=r,this.visible=Mo(a,e.doc,r),this.editorIsHidden=!a.wrapper.offsetWidth,this.wrapperHeight=a.wrapper.clientHeight,this.wrapperWidth=a.wrapper.clientWidth,this.oldDisplayWidth=An(e),this.force=s,this.dims=rs(e),this.events=[]};Po.prototype.signal=function(e,r){Et(e,r)&&this.events.push(arguments)},Po.prototype.finish=function(){for(var e=0;e<this.events.length;e++)rt.apply(null,this.events[e])};function Sb(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Yr(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Yr(e)+"px",r.scrollbarsClipped=!0)}function Eb(e){if(e.hasFocus())return null;var r=P();if(!r||!Z(e.display.lineDiv,r))return null;var s={activeElt:r};if(window.getSelection){var a=window.getSelection();a.anchorNode&&a.extend&&Z(e.display.lineDiv,a.anchorNode)&&(s.anchorNode=a.anchorNode,s.anchorOffset=a.anchorOffset,s.focusNode=a.focusNode,s.focusOffset=a.focusOffset)}return s}function Cb(e){if(!(!e||!e.activeElt||e.activeElt==P())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Z(document.body,e.anchorNode)&&Z(document.body,e.focusNode))){var r=window.getSelection(),s=document.createRange();s.setEnd(e.anchorNode,e.anchorOffset),s.collapse(!1),r.removeAllRanges(),r.addRange(s),r.extend(e.focusNode,e.focusOffset)}}function fs(e,r){var s=e.display,a=e.doc;if(r.editorIsHidden)return yn(e),!1;if(!r.force&&r.visible.from>=s.viewFrom&&r.visible.to<=s.viewTo&&(s.updateLineNumbers==null||s.updateLineNumbers>=s.viewTo)&&s.renderedView==s.view&&_u(e)==0)return!1;Ou(e)&&(yn(e),r.dims=rs(e));var u=a.first+a.size,m=Math.max(r.visible.from-e.options.viewportMargin,a.first),x=Math.min(u,r.visible.to+e.options.viewportMargin);s.viewFrom<m&&m-s.viewFrom<20&&(m=Math.max(a.first,s.viewFrom)),s.viewTo>x&&s.viewTo-x<20&&(x=Math.min(u,s.viewTo)),an&&(m=Wa(e.doc,m),x=Jl(e.doc,x));var _=m!=s.viewFrom||x!=s.viewTo||s.lastWrapHeight!=r.wrapperHeight||s.lastWrapWidth!=r.wrapperWidth;cb(e,m,x),s.viewOffset=sn(se(e.doc,s.viewFrom)),e.display.mover.style.top=s.viewOffset+"px";var C=_u(e);if(!_&&C==0&&!r.force&&s.renderedView==s.view&&(s.updateLineNumbers==null||s.updateLineNumbers>=s.viewTo))return!1;var L=Eb(e);return C>4&&(s.lineDiv.style.display="none"),Tb(e,s.updateLineNumbers,r.dims),C>4&&(s.lineDiv.style.display=""),s.renderedView=s.view,Cb(L),K(s.cursorDiv),K(s.selectionDiv),s.gutters.style.height=s.sizer.style.minHeight=0,_&&(s.lastWrapHeight=r.wrapperHeight,s.lastWrapWidth=r.wrapperWidth,zi(e,400)),s.updateLineNumbers=null,!0}function Fu(e,r){for(var s=r.viewport,a=!0;;a=!1){if(!a||!e.options.lineWrapping||r.oldDisplayWidth==An(e)){if(s&&s.top!=null&&(s={top:Math.min(e.doc.height+Ya(e.display)-Xa(e),s.top)}),r.visible=Mo(e.display,e.doc,s),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else a&&(r.visible=Mo(e.display,e.doc,s));if(!fs(e,r))break;Fo(e);var u=Pi(e);Fi(e),Jn(e,u),ps(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 ds(e,r){var s=new Po(e,r);if(fs(e,s)){Fo(e),Fu(e,s);var a=Pi(e);Fi(e),Jn(e,a),ps(e,a),s.finish()}}function Tb(e,r,s){var a=e.display,u=e.options.lineNumbers,m=a.lineDiv,x=m.firstChild;function _(ye){var Ee=ye.nextSibling;return f&&S&&e.display.currentWheelTarget==ye?ye.style.display="none":ye.parentNode.removeChild(ye),Ee}for(var C=a.view,L=a.viewFrom,Y=0;Y<C.length;Y++){var J=C[Y];if(!J.hidden)if(!J.node||J.node.parentNode!=m){var fe=eb(e,J,L,s);m.insertBefore(fe,x)}else{for(;x!=J.node;)x=_(x);var le=u&&r!=null&&r<=L&&J.lineNumber;J.changes&&(xe(J.changes,"gutter")>-1&&(le=!1),iu(e,J,L,s)),le&&(K(J.lineNumber),J.lineNumber.appendChild(document.createTextNode(Dt(e.options,L)))),x=J.node.nextSibling}L+=J.size}for(;x;)x=_(x)}function hs(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px",tr(e,"gutterChanged",e)}function ps(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+Yr(e)+"px"}function Mu(e){var r=e.display,s=r.view;if(!(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))){for(var a=ns(r)-r.scroller.scrollLeft+e.doc.scrollLeft,u=r.gutters.offsetWidth,m=a+"px",x=0;x<s.length;x++)if(!s[x].hidden){e.options.fixedGutter&&(s[x].gutter&&(s[x].gutter.style.left=m),s[x].gutterBackground&&(s[x].gutterBackground.style.left=m));var _=s[x].alignable;if(_)for(var C=0;C<_.length;C++)_[C].style.left=m}e.options.fixedGutter&&(r.gutters.style.left=a+u+"px")}}function Ou(e){if(!e.options.lineNumbers)return!1;var r=e.doc,s=Dt(e.options,r.first+r.size-1),a=e.display;if(s.length!=a.lineNumChars){var u=a.measure.appendChild(R("div",[R("div",s)],"CodeMirror-linenumber CodeMirror-gutter-elt")),m=u.firstChild.offsetWidth,x=u.offsetWidth-m;return a.lineGutter.style.width="",a.lineNumInnerWidth=Math.max(m,a.lineGutter.offsetWidth-x)+1,a.lineNumWidth=a.lineNumInnerWidth+x,a.lineNumChars=a.lineNumInnerWidth?s.length:-1,a.lineGutter.style.width=a.lineNumWidth+"px",hs(e.display),!0}return!1}function ms(e,r){for(var s=[],a=!1,u=0;u<e.length;u++){var m=e[u],x=null;if(typeof m!="string"&&(x=m.style,m=m.className),m=="CodeMirror-linenumbers")if(r)a=!0;else continue;s.push({className:m,style:x})}return r&&!a&&s.push({className:"CodeMirror-linenumbers",style:null}),s}function Pu(e){var r=e.gutters,s=e.gutterSpecs;K(r),e.lineGutter=null;for(var a=0;a<s.length;++a){var u=s[a],m=u.className,x=u.style,_=r.appendChild(R("div",null,"CodeMirror-gutter "+m));x&&(_.style.cssText=x),m=="CodeMirror-linenumbers"&&(e.lineGutter=_,_.style.width=(e.lineNumWidth||1)+"px")}r.style.display=s.length?"":"none",hs(e)}function Ni(e){Pu(e.display),kr(e),Mu(e)}function Ab(e,r,s,a){var u=this;this.input=s,u.scrollbarFiller=R("div",null,"CodeMirror-scrollbar-filler"),u.scrollbarFiller.setAttribute("cm-not-content","true"),u.gutterFiller=R("div",null,"CodeMirror-gutter-filler"),u.gutterFiller.setAttribute("cm-not-content","true"),u.lineDiv=T("div",null,"CodeMirror-code"),u.selectionDiv=R("div",null,null,"position: relative; z-index: 1"),u.cursorDiv=R("div",null,"CodeMirror-cursors"),u.measure=R("div",null,"CodeMirror-measure"),u.lineMeasure=R("div",null,"CodeMirror-measure"),u.lineSpace=T("div",[u.measure,u.lineMeasure,u.selectionDiv,u.cursorDiv,u.lineDiv],null,"position: relative; outline: none");var m=T("div",[u.lineSpace],"CodeMirror-lines");u.mover=R("div",[m],null,"position: relative"),u.sizer=R("div",[u.mover],"CodeMirror-sizer"),u.sizerWidth=null,u.heightForcer=R("div",null,null,"position: absolute; height: "+_e+"px; width: 1px;"),u.gutters=R("div",null,"CodeMirror-gutters"),u.lineGutter=null,u.scroller=R("div",[u.sizer,u.heightForcer,u.gutters],"CodeMirror-scroll"),u.scroller.setAttribute("tabIndex","-1"),u.wrapper=R("div",[u.scrollbarFiller,u.gutterFiller,u.scroller],"CodeMirror"),u.wrapper.setAttribute("translate","no"),o&&h<8&&(u.gutters.style.zIndex=-1,u.scroller.style.paddingRight=0),!f&&!(n&&I)&&(u.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(u.wrapper):e(u.wrapper)),u.viewFrom=u.viewTo=r.first,u.reportedViewFrom=u.reportedViewTo=r.first,u.view=[],u.renderedView=null,u.externalMeasured=null,u.viewOffset=0,u.lastWrapHeight=u.lastWrapWidth=0,u.updateLineNumbers=null,u.nativeBarWidth=u.barHeight=u.barWidth=0,u.scrollbarsClipped=!1,u.lineNumWidth=u.lineNumInnerWidth=u.lineNumChars=null,u.alignWidgets=!1,u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.maxLine=null,u.maxLineLength=0,u.maxLineChanged=!1,u.wheelDX=u.wheelDY=u.wheelStartX=u.wheelStartY=null,u.shift=!1,u.selForContextMenu=null,u.activeTouch=null,u.gutterSpecs=ms(a.gutters,a.lineNumbers),Pu(u),s.init(u)}var Ro=0,un=null;o?un=-.53:n?un=15:y?un=-.7:v&&(un=-1/3);function Ru(e){var r=e.wheelDeltaX,s=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),s==null&&e.detail&&e.axis==e.VERTICAL_AXIS?s=e.detail:s==null&&(s=e.wheelDelta),{x:r,y:s}}function Lb(e){var r=Ru(e);return r.x*=un,r.y*=un,r}function zu(e,r){var s=Ru(r),a=s.x,u=s.y,m=un;r.deltaMode===0&&(a=r.deltaX,u=r.deltaY,m=1);var x=e.display,_=x.scroller,C=_.scrollWidth>_.clientWidth,L=_.scrollHeight>_.clientHeight;if(!!(a&&C||u&&L)){if(u&&S&&f){e:for(var Y=r.target,J=x.view;Y!=_;Y=Y.parentNode)for(var fe=0;fe<J.length;fe++)if(J[fe].node==Y){e.display.currentWheelTarget=Y;break e}}if(a&&!n&&!g&&m!=null){u&&L&&Oi(e,Math.max(0,_.scrollTop+u*m)),Fn(e,Math.max(0,_.scrollLeft+a*m)),(!u||u&&L)&&kt(r),x.wheelStartX=null;return}if(u&&m!=null){var le=u*m,ye=e.doc.scrollTop,Ee=ye+x.wrapper.clientHeight;le<0?ye=Math.max(0,ye+le-50):Ee=Math.min(e.doc.height,Ee+le+50),ds(e,{top:ye,bottom:Ee})}Ro<20&&r.deltaMode!==0&&(x.wheelStartX==null?(x.wheelStartX=_.scrollLeft,x.wheelStartY=_.scrollTop,x.wheelDX=a,x.wheelDY=u,setTimeout(function(){if(x.wheelStartX!=null){var Pe=_.scrollLeft-x.wheelStartX,$e=_.scrollTop-x.wheelStartY,Qe=$e&&x.wheelDY&&$e/x.wheelDY||Pe&&x.wheelDX&&Pe/x.wheelDX;x.wheelStartX=x.wheelStartY=null,!!Qe&&(un=(un*Ro+Qe)/(Ro+1),++Ro)}},200)):(x.wheelDX+=a,x.wheelDY+=u))}}var Mr=function(e,r){this.ranges=e,this.primIndex=r};Mr.prototype.primary=function(){return this.ranges[this.primIndex]},Mr.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var s=this.ranges[r],a=e.ranges[r];if(!$(s.anchor,a.anchor)||!$(s.head,a.head))return!1}return!0},Mr.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new At(he(this.ranges[r].anchor),he(this.ranges[r].head));return new Mr(e,this.primIndex)},Mr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Mr.prototype.contains=function(e,r){r||(r=e);for(var s=0;s<this.ranges.length;s++){var a=this.ranges[s];if(D(r,a.from())>=0&&D(e,a.to())<=0)return s}return-1};var At=function(e,r){this.anchor=e,this.head=r};At.prototype.from=function(){return ft(this.anchor,this.head)},At.prototype.to=function(){return De(this.anchor,this.head)},At.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Hr(e,r,s){var a=e&&e.options.selectionsMayTouch,u=r[s];r.sort(function(fe,le){return D(fe.from(),le.from())}),s=xe(r,u);for(var m=1;m<r.length;m++){var x=r[m],_=r[m-1],C=D(_.to(),x.from());if(a&&!x.empty()?C>0:C>=0){var L=ft(_.from(),x.from()),Y=De(_.to(),x.to()),J=_.empty()?x.from()==x.head:_.from()==_.head;m<=s&&--s,r.splice(--m,2,new At(J?Y:L,J?L:Y))}}return new Mr(r,s)}function bn(e,r){return new Mr([new At(e,r||e)],0)}function xn(e){return e.text?we(e.from.line+e.text.length-1,Re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Nu(e,r){if(D(e,r.from)<0)return e;if(D(e,r.to)<=0)return xn(r);var s=e.line+r.text.length-(r.to.line-r.from.line)-1,a=e.ch;return e.line==r.to.line&&(a+=xn(r).ch-r.to.ch),we(s,a)}function gs(e,r){for(var s=[],a=0;a<e.sel.ranges.length;a++){var u=e.sel.ranges[a];s.push(new At(Nu(u.anchor,r),Nu(u.head,r)))}return Hr(e.cm,s,e.sel.primIndex)}function Bu(e,r,s){return e.line==r.line?we(s.line,e.ch-r.ch+s.ch):we(s.line+(e.line-r.line),e.ch)}function Db(e,r,s){for(var a=[],u=we(e.first,0),m=u,x=0;x<r.length;x++){var _=r[x],C=Bu(_.from,u,m),L=Bu(xn(_),u,m);if(u=_.to,m=L,s=="around"){var Y=e.sel.ranges[x],J=D(Y.head,Y.anchor)<0;a[x]=new At(J?L:C,J?C:L)}else a[x]=new At(C,C)}return new Mr(a,e.sel.primIndex)}function vs(e){e.doc.mode=Le(e.options,e.doc.modeOption),Bi(e)}function Bi(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,zi(e,100),e.state.modeGen++,e.curOp&&kr(e)}function qu(e,r){return r.from.ch==0&&r.to.ch==0&&Re(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ys(e,r,s,a){function u(Qe){return s?s[Qe]:null}function m(Qe,Ue,nt){Ny(Qe,Ue,nt,a),tr(Qe,"change",Qe,r)}function x(Qe,Ue){for(var nt=[],ct=Qe;ct<Ue;++ct)nt.push(new Gn(L[ct],u(ct),a));return nt}var _=r.from,C=r.to,L=r.text,Y=se(e,_.line),J=se(e,C.line),fe=Re(L),le=u(L.length-1),ye=C.line-_.line;if(r.full)e.insert(0,x(0,L.length)),e.remove(L.length,e.size-L.length);else if(qu(e,r)){var Ee=x(0,L.length-1);m(J,J.text,le),ye&&e.remove(_.line,ye),Ee.length&&e.insert(_.line,Ee)}else if(Y==J)if(L.length==1)m(Y,Y.text.slice(0,_.ch)+fe+Y.text.slice(C.ch),le);else{var Pe=x(1,L.length-1);Pe.push(new Gn(fe+Y.text.slice(C.ch),le,a)),m(Y,Y.text.slice(0,_.ch)+L[0],u(0)),e.insert(_.line+1,Pe)}else if(L.length==1)m(Y,Y.text.slice(0,_.ch)+L[0]+J.text.slice(C.ch),u(0)),e.remove(_.line+1,ye);else{m(Y,Y.text.slice(0,_.ch)+L[0],u(0)),m(J,fe+J.text.slice(C.ch),le);var $e=x(1,L.length-1);ye>1&&e.remove(_.line+1,ye-1),e.insert(_.line+1,$e)}tr(e,"change",e,r)}function wn(e,r,s){function a(u,m,x){if(u.linked)for(var _=0;_<u.linked.length;++_){var C=u.linked[_];if(C.doc!=m){var L=x&&C.sharedHist;s&&!L||(r(C.doc,L),a(C.doc,u,L))}}}a(e,null,!0)}function $u(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,is(e),vs(e),Uu(e),e.options.direction=r.direction,e.options.lineWrapping||Ka(e),e.options.mode=r.modeOption,kr(e)}function Uu(e){(e.doc.direction=="rtl"?z:W)(e.display.lineDiv,"CodeMirror-rtl")}function Ib(e){Ar(e,function(){Uu(e),kr(e)})}function zo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function bs(e,r){var s={from:he(r.from),to:xn(r),text:pe(e,r.from,r.to)};return Wu(e,s,r.from.line,r.to.line+1),wn(e,function(a){return Wu(a,s,r.from.line,r.to.line+1)},!0),s}function ju(e){for(;e.length;){var r=Re(e);if(r.ranges)e.pop();else break}}function Fb(e,r){if(r)return ju(e.done),Re(e.done);if(e.done.length&&!Re(e.done).ranges)return Re(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Re(e.done)}function Hu(e,r,s,a){var u=e.history;u.undone.length=0;var m=+new Date,x,_;if((u.lastOp==a||u.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&u.lastModTime>m-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(x=Fb(u,u.lastOp==a)))_=Re(x.changes),D(r.from,r.to)==0&&D(r.from,_.to)==0?_.to=xn(r):x.changes.push(bs(e,r));else{var C=Re(u.done);for((!C||!C.ranges)&&No(e.sel,u.done),x={changes:[bs(e,r)],generation:u.generation},u.done.push(x);u.done.length>u.undoDepth;)u.done.shift(),u.done[0].ranges||u.done.shift()}u.done.push(s),u.generation=++u.maxGeneration,u.lastModTime=u.lastSelTime=m,u.lastOp=u.lastSelOp=a,u.lastOrigin=u.lastSelOrigin=r.origin,_||rt(e,"historyAdded")}function Mb(e,r,s,a){var u=r.charAt(0);return u=="*"||u=="+"&&s.ranges.length==a.ranges.length&&s.somethingSelected()==a.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ob(e,r,s,a){var u=e.history,m=a&&a.origin;s==u.lastSelOp||m&&u.lastSelOrigin==m&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==m||Mb(e,m,Re(u.done),r))?u.done[u.done.length-1]=r:No(r,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=m,u.lastSelOp=s,a&&a.clearRedo!==!1&&ju(u.undone)}function No(e,r){var s=Re(r);s&&s.ranges&&s.equals(e)||r.push(e)}function Wu(e,r,s,a){var u=r["spans_"+e.id],m=0;e.iter(Math.max(e.first,s),Math.min(e.first+e.size,a),function(x){x.markedSpans&&((u||(u=r["spans_"+e.id]={}))[m]=x.markedSpans),++m})}function Pb(e){if(!e)return null;for(var r,s=0;s<e.length;++s)e[s].marker.explicitlyCleared?r||(r=e.slice(0,s)):r&&r.push(e[s]);return r?r.length?r:null:e}function Rb(e,r){var s=r["spans_"+e.id];if(!s)return null;for(var a=[],u=0;u<r.text.length;++u)a.push(Pb(s[u]));return a}function Gu(e,r){var s=Rb(e,r),a=ja(e,r);if(!s)return a;if(!a)return s;for(var u=0;u<s.length;++u){var m=s[u],x=a[u];if(m&&x){e:for(var _=0;_<x.length;++_){for(var C=x[_],L=0;L<m.length;++L)if(m[L].marker==C.marker)continue e;m.push(C)}}else x&&(s[u]=x)}return s}function ei(e,r,s){for(var a=[],u=0;u<e.length;++u){var m=e[u];if(m.ranges){a.push(s?Mr.prototype.deepCopy.call(m):m);continue}var x=m.changes,_=[];a.push({changes:_});for(var C=0;C<x.length;++C){var L=x[C],Y=void 0;if(_.push({from:L.from,to:L.to,text:L.text}),r)for(var J in L)(Y=J.match(/^spans_(\d+)$/))&&xe(r,Number(Y[1]))>-1&&(Re(_)[J]=L[J],delete L[J])}}return a}function xs(e,r,s,a){if(a){var u=e.anchor;if(s){var m=D(r,u)<0;m!=D(s,u)<0?(u=r,r=s):m!=D(r,s)<0&&(r=s)}return new At(u,r)}else return new At(s||r,r)}function Bo(e,r,s,a,u){u==null&&(u=e.cm&&(e.cm.display.shift||e.extend)),mr(e,new Mr([xs(e.sel.primary(),r,s,u)],0),a)}function Ku(e,r,s){for(var a=[],u=e.cm&&(e.cm.display.shift||e.extend),m=0;m<e.sel.ranges.length;m++)a[m]=xs(e.sel.ranges[m],r[m],null,u);var x=Hr(e.cm,a,e.sel.primIndex);mr(e,x,s)}function ws(e,r,s,a){var u=e.sel.ranges.slice(0);u[r]=s,mr(e,Hr(e.cm,u,e.sel.primIndex),a)}function Vu(e,r,s,a){mr(e,bn(r,s),a)}function zb(e,r,s){var a={ranges:r.ranges,update:function(u){this.ranges=[];for(var m=0;m<u.length;m++)this.ranges[m]=new At(Ze(e,u[m].anchor),Ze(e,u[m].head))},origin:s&&s.origin};return rt(e,"beforeSelectionChange",e,a),e.cm&&rt(e.cm,"beforeSelectionChange",e.cm,a),a.ranges!=r.ranges?Hr(e.cm,a.ranges,a.ranges.length-1):r}function Yu(e,r,s){var a=e.history.done,u=Re(a);u&&u.ranges?(a[a.length-1]=r,qo(e,r,s)):mr(e,r,s)}function mr(e,r,s){qo(e,r,s),Ob(e,e.sel,e.cm?e.cm.curOp.id:NaN,s)}function qo(e,r,s){(Et(e,"beforeSelectionChange")||e.cm&&Et(e.cm,"beforeSelectionChange"))&&(r=zb(e,r,s));var a=s&&s.bias||(D(r.primary().head,e.sel.primary().head)<0?-1:1);Xu(e,Qu(e,r,a,!0)),!(s&&s.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Qn(e.cm)}function Xu(e,r){r.equals(e.sel)||(e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,dr(e.cm)),tr(e,"cursorActivity",e))}function Zu(e){Xu(e,Qu(e,e.sel,null,!1))}function Qu(e,r,s,a){for(var u,m=0;m<r.ranges.length;m++){var x=r.ranges[m],_=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[m],C=$o(e,x.anchor,_&&_.anchor,s,a),L=$o(e,x.head,_&&_.head,s,a);(u||C!=x.anchor||L!=x.head)&&(u||(u=r.ranges.slice(0,m)),u[m]=new At(C,L))}return u?Hr(e.cm,u,r.primIndex):r}function ti(e,r,s,a,u){var m=se(e,r.line);if(m.markedSpans)for(var x=0;x<m.markedSpans.length;++x){var _=m.markedSpans[x],C=_.marker,L="selectLeft"in C?!C.selectLeft:C.inclusiveLeft,Y="selectRight"in C?!C.selectRight:C.inclusiveRight;if((_.from==null||(L?_.from<=r.ch:_.from<r.ch))&&(_.to==null||(Y?_.to>=r.ch:_.to>r.ch))){if(u&&(rt(C,"beforeCursorEnter"),C.explicitlyCleared))if(m.markedSpans){--x;continue}else break;if(!C.atomic)continue;if(s){var J=C.find(a<0?1:-1),fe=void 0;if((a<0?Y:L)&&(J=Ju(e,J,-a,J&&J.line==r.line?m:null)),J&&J.line==r.line&&(fe=D(J,s))&&(a<0?fe<0:fe>0))return ti(e,J,r,a,u)}var le=C.find(a<0?-1:1);return(a<0?L:Y)&&(le=Ju(e,le,a,le.line==r.line?m:null)),le?ti(e,le,r,a,u):null}}return r}function $o(e,r,s,a,u){var m=a||1,x=ti(e,r,s,m,u)||!u&&ti(e,r,s,m,!0)||ti(e,r,s,-m,u)||!u&&ti(e,r,s,-m,!0);return x||(e.cantEdit=!0,we(e.first,0))}function Ju(e,r,s,a){return s<0&&r.ch==0?r.line>e.first?Ze(e,we(r.line-1)):null:s>0&&r.ch==(a||se(e,r.line)).text.length?r.line<e.first+e.size-1?we(r.line+1,0):null:new we(r.line,r.ch+s)}function ec(e){e.setSelection(we(e.firstLine(),0),we(e.lastLine()),qe)}function tc(e,r,s){var a={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return a.canceled=!0}};return s&&(a.update=function(u,m,x,_){u&&(a.from=Ze(e,u)),m&&(a.to=Ze(e,m)),x&&(a.text=x),_!==void 0&&(a.origin=_)}),rt(e,"beforeChange",e,a),e.cm&&rt(e.cm,"beforeChange",e.cm,a),a.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:a.from,to:a.to,text:a.text,origin:a.origin}}function ri(e,r,s){if(e.cm){if(!e.cm.curOp)return rr(e.cm,ri)(e,r,s);if(e.cm.state.suppressEdits)return}if(!((Et(e,"beforeChange")||e.cm&&Et(e.cm,"beforeChange"))&&(r=tc(e,r,!0),!r))){var a=Gl&&!s&&Oy(e,r.from,r.to);if(a)for(var u=a.length-1;u>=0;--u)rc(e,{from:a[u].from,to:a[u].to,text:u?[""]:r.text,origin:r.origin});else rc(e,r)}}function rc(e,r){if(!(r.text.length==1&&r.text[0]==""&&D(r.from,r.to)==0)){var s=gs(e,r);Hu(e,r,s,e.cm?e.cm.curOp.id:NaN),qi(e,r,s,ja(e,r));var a=[];wn(e,function(u,m){!m&&xe(a,u.history)==-1&&(ac(u.history,r),a.push(u.history)),qi(u,r,null,ja(u,r))})}}function Uo(e,r,s){var a=e.cm&&e.cm.state.suppressEdits;if(!(a&&!s)){for(var u=e.history,m,x=e.sel,_=r=="undo"?u.done:u.undone,C=r=="undo"?u.undone:u.done,L=0;L<_.length&&(m=_[L],!(s?m.ranges&&!m.equals(e.sel):!m.ranges));L++);if(L!=_.length){for(u.lastOrigin=u.lastSelOrigin=null;;)if(m=_.pop(),m.ranges){if(No(m,C),s&&!m.equals(e.sel)){mr(e,m,{clearRedo:!1});return}x=m}else if(a){_.push(m);return}else break;var Y=[];No(x,C),C.push({changes:Y,generation:u.generation}),u.generation=m.generation||++u.maxGeneration;for(var J=Et(e,"beforeChange")||e.cm&&Et(e.cm,"beforeChange"),fe=function(Ee){var Pe=m.changes[Ee];if(Pe.origin=r,J&&!tc(e,Pe,!1))return _.length=0,{};Y.push(bs(e,Pe));var $e=Ee?gs(e,Pe):Re(_);qi(e,Pe,$e,Gu(e,Pe)),!Ee&&e.cm&&e.cm.scrollIntoView({from:Pe.from,to:xn(Pe)});var Qe=[];wn(e,function(Ue,nt){!nt&&xe(Qe,Ue.history)==-1&&(ac(Ue.history,Pe),Qe.push(Ue.history)),qi(Ue,Pe,null,Gu(Ue,Pe))})},le=m.changes.length-1;le>=0;--le){var ye=fe(le);if(ye)return ye.v}}}}function nc(e,r){if(r!=0&&(e.first+=r,e.sel=new Mr(Ie(e.sel.ranges,function(u){return new At(we(u.anchor.line+r,u.anchor.ch),we(u.head.line+r,u.head.ch))}),e.sel.primIndex),e.cm)){kr(e.cm,e.first,e.first-r,r);for(var s=e.cm.display,a=s.viewFrom;a<s.viewTo;a++)vn(e.cm,a,"gutter")}}function qi(e,r,s,a){if(e.cm&&!e.cm.curOp)return rr(e.cm,qi)(e,r,s,a);if(r.to.line<e.first){nc(e,r.text.length-1-(r.to.line-r.from.line));return}if(!(r.from.line>e.lastLine())){if(r.from.line<e.first){var u=r.text.length-1-(e.first-r.from.line);nc(e,u),r={from:we(e.first,0),to:we(r.to.line+u,r.to.ch),text:[Re(r.text)],origin:r.origin}}var m=e.lastLine();r.to.line>m&&(r={from:r.from,to:we(m,se(e,m).text.length),text:[r.text[0]],origin:r.origin}),r.removed=pe(e,r.from,r.to),s||(s=gs(e,r)),e.cm?Nb(e.cm,r,a):ys(e,r,a),qo(e,s,qe),e.cantEdit&&$o(e,we(e.firstLine(),0))&&(e.cantEdit=!1)}}function Nb(e,r,s){var a=e.doc,u=e.display,m=r.from,x=r.to,_=!1,C=m.line;e.options.lineWrapping||(C=Ye(Ur(se(a,m.line))),a.iter(C,x.line+1,function(le){if(le==u.maxLine)return _=!0,!0})),a.sel.contains(r.from,r.to)>-1&&dr(e),ys(a,r,s,ku(e)),e.options.lineWrapping||(a.iter(C,m.line+r.text.length,function(le){var ye=Eo(le);ye>u.maxLineLength&&(u.maxLine=le,u.maxLineLength=ye,u.maxLineChanged=!0,_=!1)}),_&&(e.curOp.updateMaxLine=!0)),Ty(a,m.line),zi(e,400);var L=r.text.length-(x.line-m.line)-1;r.full?kr(e):m.line==x.line&&r.text.length==1&&!qu(e.doc,r)?vn(e,m.line,"text"):kr(e,m.line,x.line+1,L);var Y=Et(e,"changes"),J=Et(e,"change");if(J||Y){var fe={from:m,to:x,text:r.text,removed:r.removed,origin:r.origin};J&&tr(e,"change",e,fe),Y&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(fe)}e.display.selForContextMenu=null}function ni(e,r,s,a,u){var m;a||(a=s),D(a,s)<0&&(m=[a,s],s=m[0],a=m[1]),typeof r=="string"&&(r=e.splitLines(r)),ri(e,{from:s,to:a,text:r,origin:u})}function ic(e,r,s,a){s<e.line?e.line+=a:r<e.line&&(e.line=r,e.ch=0)}function oc(e,r,s,a){for(var u=0;u<e.length;++u){var m=e[u],x=!0;if(m.ranges){m.copied||(m=e[u]=m.deepCopy(),m.copied=!0);for(var _=0;_<m.ranges.length;_++)ic(m.ranges[_].anchor,r,s,a),ic(m.ranges[_].head,r,s,a);continue}for(var C=0;C<m.changes.length;++C){var L=m.changes[C];if(s<L.from.line)L.from=we(L.from.line+a,L.from.ch),L.to=we(L.to.line+a,L.to.ch);else if(r<=L.to.line){x=!1;break}}x||(e.splice(0,u+1),u=0)}}function ac(e,r){var s=r.from.line,a=r.to.line,u=r.text.length-(a-s)-1;oc(e.done,s,a,u),oc(e.undone,s,a,u)}function $i(e,r,s,a){var u=r,m=r;return typeof r=="number"?m=se(e,xt(e,r)):u=Ye(r),u==null?null:(a(m,u)&&e.cm&&vn(e.cm,u,s),m)}function Ui(e){this.lines=e,this.parent=null;for(var r=0,s=0;s<e.length;++s)e[s].parent=this,r+=e[s].height;this.height=r}Ui.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var s=e,a=e+r;s<a;++s){var u=this.lines[s];this.height-=u.height,By(u),tr(u,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,s){this.height+=s,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var a=0;a<r.length;++a)r[a].parent=this},iterN:function(e,r,s){for(var a=e+r;e<a;++e)if(s(this.lines[e]))return!0}};function ji(e){this.children=e;for(var r=0,s=0,a=0;a<e.length;++a){var u=e[a];r+=u.chunkSize(),s+=u.height,u.parent=this}this.size=r,this.height=s,this.parent=null}ji.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var s=0;s<this.children.length;++s){var a=this.children[s],u=a.chunkSize();if(e<u){var m=Math.min(r,u-e),x=a.height;if(a.removeInner(e,m),this.height-=x-a.height,u==m&&(this.children.splice(s--,1),a.parent=null),(r-=m)==0)break;e=0}else e-=u}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Ui))){var _=[];this.collapse(_),this.children=[new Ui(_)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,s){this.size+=r.length,this.height+=s;for(var a=0;a<this.children.length;++a){var u=this.children[a],m=u.chunkSize();if(e<=m){if(u.insertInner(e,r,s),u.lines&&u.lines.length>50){for(var x=u.lines.length%25+25,_=x;_<u.lines.length;){var C=new Ui(u.lines.slice(_,_+=25));u.height-=C.height,this.children.splice(++a,0,C),C.parent=this}u.lines=u.lines.slice(0,x),this.maybeSpill()}break}e-=m}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var r=e.children.splice(e.children.length-5,5),s=new ji(r);if(e.parent){e.size-=s.size,e.height-=s.height;var u=xe(e.parent.children,e);e.parent.children.splice(u+1,0,s)}else{var a=new ji(e.children);a.parent=e,e.children=[a,s],e=a}s.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,r,s){for(var a=0;a<this.children.length;++a){var u=this.children[a],m=u.chunkSize();if(e<m){var x=Math.min(r,m-e);if(u.iterN(e,x,s))return!0;if((r-=x)==0)break;e=0}else e-=m}}};var Hi=function(e,r,s){if(s)for(var a in s)s.hasOwnProperty(a)&&(this[a]=s[a]);this.doc=e,this.node=r};Hi.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,s=this.line,a=Ye(s);if(!(a==null||!r)){for(var u=0;u<r.length;++u)r[u]==this&&r.splice(u--,1);r.length||(s.widgets=null);var m=Di(this);Ae(s,Math.max(0,s.height-m)),e&&(Ar(e,function(){sc(e,s,-m),vn(e,a,"widget")}),tr(e,"lineWidgetCleared",e,this,a))}},Hi.prototype.changed=function(){var e=this,r=this.height,s=this.doc.cm,a=this.line;this.height=null;var u=Di(this)-r;!u||(gn(this.doc,a)||Ae(a,a.height+u),s&&Ar(s,function(){s.curOp.forceUpdate=!0,sc(s,a,u),tr(s,"lineWidgetChanged",s,e,Ye(a))}))},Vt(Hi);function sc(e,r,s){sn(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&cs(e,s)}function Bb(e,r,s,a){var u=new Hi(e,s,a),m=e.cm;return m&&u.noHScroll&&(m.display.alignWidgets=!0),$i(e,r,"widget",function(x){var _=x.widgets||(x.widgets=[]);if(u.insertAt==null?_.push(u):_.splice(Math.min(_.length,Math.max(0,u.insertAt)),0,u),u.line=x,m&&!gn(e,x)){var C=sn(x)<e.scrollTop;Ae(x,x.height+Di(u)),C&&cs(m,u.height),m.curOp.forceUpdate=!0}return!0}),m&&tr(m,"lineWidgetAdded",m,u,typeof r=="number"?r:Ye(r)),u}var lc=0,kn=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++lc};kn.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,r=e&&!e.curOp;if(r&&On(e),Et(this,"clear")){var s=this.find();s&&tr(this,"clear",s.from,s.to)}for(var a=null,u=null,m=0;m<this.lines.length;++m){var x=this.lines[m],_=Ti(x.markedSpans,this);e&&!this.collapsed?vn(e,Ye(x),"text"):e&&(_.to!=null&&(u=Ye(x)),_.from!=null&&(a=Ye(x))),x.markedSpans=Dy(x.markedSpans,_),_.from==null&&this.collapsed&&!gn(this.doc,x)&&e&&Ae(x,Yn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var C=0;C<this.lines.length;++C){var L=Ur(this.lines[C]),Y=Eo(L);Y>e.display.maxLineLength&&(e.display.maxLine=L,e.display.maxLineLength=Y,e.display.maxLineChanged=!0)}a!=null&&e&&this.collapsed&&kr(e,a,u+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Zu(e.doc)),e&&tr(e,"markerCleared",e,this,a,u),r&&Pn(e),this.parent&&this.parent.clear()}},kn.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var s,a,u=0;u<this.lines.length;++u){var m=this.lines[u],x=Ti(m.markedSpans,this);if(x.from!=null&&(s=we(r?m:Ye(m),x.from),e==-1))return s;if(x.to!=null&&(a=we(r?m:Ye(m),x.to),e==1))return a}return s&&{from:s,to:a}},kn.prototype.changed=function(){var e=this,r=this.find(-1,!0),s=this,a=this.doc.cm;!r||!a||Ar(a,function(){var u=r.line,m=Ye(r.line),x=Za(a,m);if(x&&(pu(x),a.curOp.selectionChanged=a.curOp.forceUpdate=!0),a.curOp.updateMaxLine=!0,!gn(s.doc,u)&&s.height!=null){var _=s.height;s.height=null;var C=Di(s)-_;C&&Ae(u,u.height+C)}tr(a,"markerChanged",a,e)})},kn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||xe(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},kn.prototype.detachLine=function(e){if(this.lines.splice(xe(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Vt(kn);function ii(e,r,s,a,u){if(a&&a.shared)return qb(e,r,s,a,u);if(e.cm&&!e.cm.curOp)return rr(e.cm,ii)(e,r,s,a,u);var m=new kn(e,u),x=D(r,s);if(a&&A(a,m,!1),x>0||x==0&&m.clearWhenEmpty!==!1)return m;if(m.replacedWith&&(m.collapsed=!0,m.widgetNode=T("span",[m.replacedWith],"CodeMirror-widget"),a.handleMouseEvents||m.widgetNode.setAttribute("cm-ignore-events","true"),a.insertLeft&&(m.widgetNode.insertLeft=!0)),m.collapsed){if(Ql(e,r.line,r,s,m)||r.line!=s.line&&Ql(e,s.line,r,s,m))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ly()}m.addToHistory&&Hu(e,{from:r,to:s,origin:"markText"},e.sel,NaN);var _=r.line,C=e.cm,L;if(e.iter(_,s.line+1,function(J){C&&m.collapsed&&!C.options.lineWrapping&&Ur(J)==C.display.maxLine&&(L=!0),m.collapsed&&_!=r.line&&Ae(J,0),Iy(J,new wo(m,_==r.line?r.ch:null,_==s.line?s.ch:null),e.cm&&e.cm.curOp),++_}),m.collapsed&&e.iter(r.line,s.line+1,function(J){gn(e,J)&&Ae(J,0)}),m.clearOnEnter&&lt(m,"beforeCursorEnter",function(){return m.clear()}),m.readOnly&&(Ay(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),m.collapsed&&(m.id=++lc,m.atomic=!0),C){if(L&&(C.curOp.updateMaxLine=!0),m.collapsed)kr(C,r.line,s.line+1);else if(m.className||m.startStyle||m.endStyle||m.css||m.attributes||m.title)for(var Y=r.line;Y<=s.line;Y++)vn(C,Y,"text");m.atomic&&Zu(C.doc),tr(C,"markerAdded",C,m)}return m}var Wi=function(e,r){this.markers=e,this.primary=r;for(var s=0;s<e.length;++s)e[s].parent=this};Wi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();tr(this,"clear")}},Wi.prototype.find=function(e,r){return this.primary.find(e,r)},Vt(Wi);function qb(e,r,s,a,u){a=A(a),a.shared=!1;var m=[ii(e,r,s,a,u)],x=m[0],_=a.widgetNode;return wn(e,function(C){_&&(a.widgetNode=_.cloneNode(!0)),m.push(ii(C,Ze(C,r),Ze(C,s),a,u));for(var L=0;L<C.linked.length;++L)if(C.linked[L].isParent)return;x=Re(m)}),new Wi(m,x)}function uc(e){return e.findMarks(we(e.first,0),e.clipPos(we(e.lastLine())),function(r){return r.parent})}function $b(e,r){for(var s=0;s<r.length;s++){var a=r[s],u=a.find(),m=e.clipPos(u.from),x=e.clipPos(u.to);if(D(m,x)){var _=ii(e,m,x,a.primary,a.primary.type);a.markers.push(_),_.parent=a}}}function Ub(e){for(var r=function(a){var u=e[a],m=[u.primary.doc];wn(u.primary.doc,function(C){return m.push(C)});for(var x=0;x<u.markers.length;x++){var _=u.markers[x];xe(m,_.doc)==-1&&(_.parent=null,u.markers.splice(x--,1))}},s=0;s<e.length;s++)r(s)}var jb=0,_r=function(e,r,s,a,u){if(!(this instanceof _r))return new _r(e,r,s,a,u);s==null&&(s=0),ji.call(this,[new Ui([new Gn("",null)])]),this.first=s,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=s;var m=we(s,0);this.sel=bn(m),this.history=new zo(null),this.id=++jb,this.modeOption=r,this.lineSep=a,this.direction=u=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ys(this,{from:m,to:m,text:e}),mr(this,bn(m),qe)};_r.prototype=He(ji.prototype,{constructor:_r,iter:function(e,r,s){s?this.iterN(e-this.first,r-e,s):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var s=0,a=0;a<r.length;++a)s+=r[a].height;this.insertInner(e-this.first,r,s)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=Te(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:nr(function(e){var r=we(this.first,0),s=this.first+this.size-1;ri(this,{from:r,to:we(s,se(this,s).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Mi(this.cm,0,0),mr(this,bn(r),qe)}),replaceRange:function(e,r,s,a){r=Ze(this,r),s=s?Ze(this,s):r,ni(this,e,r,s,a)},getRange:function(e,r,s){var a=pe(this,Ze(this,e),Ze(this,r));return s===!1?a:s===""?a.join(""):a.join(s||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(bt(this,e))return se(this,e)},getLineNumber:function(e){return Ye(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=se(this,e)),Ur(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ze(this,e)},getCursor:function(e){var r=this.sel.primary(),s;return e==null||e=="head"?s=r.head:e=="anchor"?s=r.anchor:e=="end"||e=="to"||e===!1?s=r.to():s=r.from(),s},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:nr(function(e,r,s){Vu(this,Ze(this,typeof e=="number"?we(e,r||0):e),null,s)}),setSelection:nr(function(e,r,s){Vu(this,Ze(this,e),Ze(this,r||e),s)}),extendSelection:nr(function(e,r,s){Bo(this,Ze(this,e),r&&Ze(this,r),s)}),extendSelections:nr(function(e,r){Ku(this,Fr(this,e),r)}),extendSelectionsBy:nr(function(e,r){var s=Ie(this.sel.ranges,e);Ku(this,Fr(this,s),r)}),setSelections:nr(function(e,r,s){if(!!e.length){for(var a=[],u=0;u<e.length;u++)a[u]=new At(Ze(this,e[u].anchor),Ze(this,e[u].head||e[u].anchor));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),mr(this,Hr(this.cm,a,r),s)}}),addSelection:nr(function(e,r,s){var a=this.sel.ranges.slice(0);a.push(new At(Ze(this,e),Ze(this,r||e))),mr(this,Hr(this.cm,a,a.length-1),s)}),getSelection:function(e){for(var r=this.sel.ranges,s,a=0;a<r.length;a++){var u=pe(this,r[a].from(),r[a].to());s=s?s.concat(u):u}return e===!1?s:s.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],s=this.sel.ranges,a=0;a<s.length;a++){var u=pe(this,s[a].from(),s[a].to());e!==!1&&(u=u.join(e||this.lineSeparator())),r[a]=u}return r},replaceSelection:function(e,r,s){for(var a=[],u=0;u<this.sel.ranges.length;u++)a[u]=e;this.replaceSelections(a,r,s||"+input")},replaceSelections:nr(function(e,r,s){for(var a=[],u=this.sel,m=0;m<u.ranges.length;m++){var x=u.ranges[m];a[m]={from:x.from(),to:x.to(),text:this.splitLines(e[m]),origin:s}}for(var _=r&&r!="end"&&Db(this,a,r),C=a.length-1;C>=0;C--)ri(this,a[C]);_?Yu(this,_):this.cm&&Qn(this.cm)}),undo:nr(function(){Uo(this,"undo")}),redo:nr(function(){Uo(this,"redo")}),undoSelection:nr(function(){Uo(this,"undo",!0)}),redoSelection:nr(function(){Uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,s=0,a=0;a<e.done.length;a++)e.done[a].ranges||++r;for(var u=0;u<e.undone.length;u++)e.undone[u].ranges||++s;return{undo:r,redo:s}},clearHistory:function(){var e=this;this.history=new zo(this.history),wn(this,function(r){return r.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ei(this.history.done),undone:ei(this.history.undone)}},setHistory:function(e){var r=this.history=new zo(this.history);r.done=ei(e.done.slice(0),null,!0),r.undone=ei(e.undone.slice(0),null,!0)},setGutterMarker:nr(function(e,r,s){return $i(this,e,"gutter",function(a){var u=a.gutterMarkers||(a.gutterMarkers={});return u[r]=s,!s&&de(u)&&(a.gutterMarkers=null),!0})}),clearGutter:nr(function(e){var r=this;this.iter(function(s){s.gutterMarkers&&s.gutterMarkers[e]&&$i(r,s,"gutter",function(){return s.gutterMarkers[e]=null,de(s.gutterMarkers)&&(s.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!bt(this,e)||(r=e,e=se(this,e),!e))return null}else if(r=Ye(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:nr(function(e,r,s){return $i(this,e,r=="gutter"?"gutter":"class",function(a){var u=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!a[u])a[u]=s;else{if(V(s).test(a[u]))return!1;a[u]+=" "+s}return!0})}),removeLineClass:nr(function(e,r,s){return $i(this,e,r=="gutter"?"gutter":"class",function(a){var u=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",m=a[u];if(m)if(s==null)a[u]=null;else{var x=m.match(V(s));if(!x)return!1;var _=x.index+x[0].length;a[u]=m.slice(0,x.index)+(!x.index||_==m.length?"":" ")+m.slice(_)||null}else return!1;return!0})}),addLineWidget:nr(function(e,r,s){return Bb(this,e,r,s)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,s){return ii(this,Ze(this,e),Ze(this,r),s,s&&s.type||"range")},setBookmark:function(e,r){var s={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=Ze(this,e),ii(this,e,e,s,"bookmark")},findMarksAt:function(e){e=Ze(this,e);var r=[],s=se(this,e.line).markedSpans;if(s)for(var a=0;a<s.length;++a){var u=s[a];(u.from==null||u.from<=e.ch)&&(u.to==null||u.to>=e.ch)&&r.push(u.marker.parent||u.marker)}return r},findMarks:function(e,r,s){e=Ze(this,e),r=Ze(this,r);var a=[],u=e.line;return this.iter(e.line,r.line+1,function(m){var x=m.markedSpans;if(x)for(var _=0;_<x.length;_++){var C=x[_];!(C.to!=null&&u==e.line&&e.ch>=C.to||C.from==null&&u!=e.line||C.from!=null&&u==r.line&&C.from>=r.ch)&&(!s||s(C.marker))&&a.push(C.marker.parent||C.marker)}++u}),a},getAllMarks:function(){var e=[];return this.iter(function(r){var s=r.markedSpans;if(s)for(var a=0;a<s.length;++a)s[a].from!=null&&e.push(s[a].marker)}),e},posFromIndex:function(e){var r,s=this.first,a=this.lineSeparator().length;return this.iter(function(u){var m=u.text.length+a;if(m>e)return r=e,!0;e-=m,++s}),Ze(this,we(s,r))},indexFromPos:function(e){e=Ze(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var s=this.lineSeparator().length;return this.iter(this.first,e.line,function(a){r+=a.text.length+s}),r},copy:function(e){var r=new _r(Te(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,s=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<s&&(s=e.to);var a=new _r(Te(this,r,s),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(a.history=this.history),(this.linked||(this.linked=[])).push({doc:a,sharedHist:e.sharedHist}),a.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],$b(a,uc(this)),a},unlinkDoc:function(e){if(e instanceof Nt&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var s=this.linked[r];if(s.doc==e){this.linked.splice(r,1),e.unlinkDoc(this),Ub(uc(this));break}}if(e.history==this.history){var a=[e.id];wn(e,function(u){return a.push(u.id)},!0),e.history=new zo(null),e.history.done=ei(this.history.done,a),e.history.undone=ei(this.history.undone,a)}},iterLinkedDocs:function(e){wn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ie(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:nr(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&Ib(this.cm))})}),_r.prototype.eachLine=_r.prototype.iter;var cc=0;function Hb(e){var r=this;if(fc(r),!(wt(r,e)||ln(r.display,e))){kt(e),o&&(cc=+new Date);var s=Dn(r,e,!0),a=e.dataTransfer.files;if(!(!s||r.isReadOnly()))if(a&&a.length&&window.FileReader&&window.File)for(var u=a.length,m=Array(u),x=0,_=function(){++x==u&&rr(r,function(){s=Ze(r.doc,s);var le={from:s,to:s,text:r.doc.splitLines(m.filter(function(ye){return ye!=null}).join(r.doc.lineSeparator())),origin:"paste"};ri(r.doc,le),Yu(r.doc,bn(Ze(r.doc,s),Ze(r.doc,xn(le))))})()},C=function(le,ye){if(r.options.allowDropFileTypes&&xe(r.options.allowDropFileTypes,le.type)==-1){_();return}var Ee=new FileReader;Ee.onerror=function(){return _()},Ee.onload=function(){var Pe=Ee.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Pe)){_();return}m[ye]=Pe,_()},Ee.readAsText(le)},L=0;L<a.length;L++)C(a[L],L);else{if(r.state.draggingText&&r.doc.sel.contains(s)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Y=e.dataTransfer.getData("Text");if(Y){var J;if(r.state.draggingText&&!r.state.draggingText.copy&&(J=r.listSelections()),qo(r.doc,bn(s,s)),J)for(var fe=0;fe<J.length;++fe)ni(r.doc,"",J[fe].anchor,J[fe].head,"drag");r.replaceSelection(Y,"around","paste"),r.display.input.focus()}}catch{}}}}function Wb(e,r){if(o&&(!e.state.draggingText||+new Date-cc<100)){Ir(r);return}if(!(wt(e,r)||ln(e.display,r))&&(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!v)){var s=R("img",null,null,"position: fixed; left: 0; top: 0;");s.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(s.width=s.height=1,e.display.wrapper.appendChild(s),s._top=s.offsetTop),r.dataTransfer.setDragImage(s,0,0),g&&s.parentNode.removeChild(s)}}function Gb(e,r){var s=Dn(e,r);if(!!s){var a=document.createDocumentFragment();os(e,s,a),e.display.dragCursor||(e.display.dragCursor=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),q(e.display.dragCursor,a)}}function fc(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function dc(e){if(!!document.getElementsByClassName){for(var r=document.getElementsByClassName("CodeMirror"),s=[],a=0;a<r.length;a++){var u=r[a].CodeMirror;u&&s.push(u)}s.length&&s[0].operation(function(){for(var m=0;m<s.length;m++)e(s[m])})}}var hc=!1;function Kb(){hc||(Vb(),hc=!0)}function Vb(){var e;lt(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,dc(Yb)},100))}),lt(window,"blur",function(){return dc(Zn)})}function Yb(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var _n={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Gi=0;Gi<10;Gi++)_n[Gi+48]=_n[Gi+96]=String(Gi);for(var jo=65;jo<=90;jo++)_n[jo]=String.fromCharCode(jo);for(var Ki=1;Ki<=12;Ki++)_n[Ki+111]=_n[Ki+63235]="F"+Ki;var cn={};cn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},cn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},cn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},cn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},cn.default=S?cn.macDefault:cn.pcDefault;function Xb(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var s,a,u,m,x=0;x<r.length-1;x++){var _=r[x];if(/^(cmd|meta|m)$/i.test(_))m=!0;else if(/^a(lt)?$/i.test(_))s=!0;else if(/^(c|ctrl|control)$/i.test(_))a=!0;else if(/^s(hift)?$/i.test(_))u=!0;else throw new Error("Unrecognized modifier name: "+_)}return s&&(e="Alt-"+e),a&&(e="Ctrl-"+e),m&&(e="Cmd-"+e),u&&(e="Shift-"+e),e}function Zb(e){var r={};for(var s in e)if(e.hasOwnProperty(s)){var a=e[s];if(/^(name|fallthrough|(de|at)tach)$/.test(s))continue;if(a=="..."){delete e[s];continue}for(var u=Ie(s.split(" "),Xb),m=0;m<u.length;m++){var x=void 0,_=void 0;m==u.length-1?(_=u.join(" "),x=a):(_=u.slice(0,m+1).join(" "),x="...");var C=r[_];if(!C)r[_]=x;else if(C!=x)throw new Error("Inconsistent bindings for "+_)}delete e[s]}for(var L in r)e[L]=r[L];return e}function oi(e,r,s,a){r=Ho(r);var u=r.call?r.call(e,a):r[e];if(u===!1)return"nothing";if(u==="...")return"multi";if(u!=null&&s(u))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return oi(e,r.fallthrough,s,a);for(var m=0;m<r.fallthrough.length;m++){var x=oi(e,r.fallthrough[m],s,a);if(x)return x}}}function pc(e){var r=typeof e=="string"?e:_n[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function mc(e,r,s){var a=e;return r.altKey&&a!="Alt"&&(e="Alt-"+e),(U?r.metaKey:r.ctrlKey)&&a!="Ctrl"&&(e="Ctrl-"+e),(U?r.ctrlKey:r.metaKey)&&a!="Mod"&&(e="Cmd-"+e),!s&&r.shiftKey&&a!="Shift"&&(e="Shift-"+e),e}function gc(e,r){if(g&&e.keyCode==34&&e.char)return!1;var s=_n[e.keyCode];return s==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(s=e.code),mc(s,e,r))}function Ho(e){return typeof e=="string"?cn[e]:e}function ai(e,r){for(var s=e.doc.sel.ranges,a=[],u=0;u<s.length;u++){for(var m=r(s[u]);a.length&&D(m.from,Re(a).to)<=0;){var x=a.pop();if(D(x.from,m.from)<0){m.from=x.from;break}}a.push(m)}Ar(e,function(){for(var _=a.length-1;_>=0;_--)ni(e.doc,"",a[_].from,a[_].to,"+delete");Qn(e)})}function ks(e,r,s){var a=Ne(e.text,r+s,s);return a<0||a>e.text.length?null:a}function _s(e,r,s){var a=ks(e,r.ch,s);return a==null?null:new we(r.line,a,s<0?"after":"before")}function Ss(e,r,s,a,u){if(e){r.doc.direction=="rtl"&&(u=-u);var m=Lt(s,r.doc.direction);if(m){var x=u<0?Re(m):m[0],_=u<0==(x.level==1),C=_?"after":"before",L;if(x.level>0||r.doc.direction=="rtl"){var Y=Vn(r,s);L=u<0?s.text.length-1:0;var J=Xr(r,Y,L).top;L=ot(function(fe){return Xr(r,Y,fe).top==J},u<0==(x.level==1)?x.from:x.to-1,L),C=="before"&&(L=ks(s,L,1))}else L=u<0?x.to:x.from;return new we(a,L,C)}}return new we(a,u<0?s.text.length:0,u<0?"before":"after")}function Qb(e,r,s,a){var u=Lt(r,e.doc.direction);if(!u)return _s(r,s,a);s.ch>=r.text.length?(s.ch=r.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var m=We(u,s.ch,s.sticky),x=u[m];if(e.doc.direction=="ltr"&&x.level%2==0&&(a>0?x.to>s.ch:x.from<s.ch))return _s(r,s,a);var _=function($e,Qe){return ks(r,$e instanceof we?$e.ch:$e,Qe)},C,L=function($e){return e.options.lineWrapping?(C=C||Vn(e,r),wu(e,r,C,$e)):{begin:0,end:r.text.length}},Y=L(s.sticky=="before"?_(s,-1):s.ch);if(e.doc.direction=="rtl"||x.level==1){var J=x.level==1==a<0,fe=_(s,J?1:-1);if(fe!=null&&(J?fe<=x.to&&fe<=Y.end:fe>=x.from&&fe>=Y.begin)){var le=J?"before":"after";return new we(s.line,fe,le)}}var ye=function($e,Qe,Ue){for(var nt=function(Pt,ir){return ir?new we(s.line,_(Pt,1),"before"):new we(s.line,Pt,"after")};$e>=0&&$e<u.length;$e+=Qe){var ct=u[$e],ut=Qe>0==(ct.level!=1),vt=ut?Ue.begin:_(Ue.end,-1);if(ct.from<=vt&&vt<ct.to||(vt=ut?ct.from:_(ct.to,-1),Ue.begin<=vt&&vt<Ue.end))return nt(vt,ut)}},Ee=ye(m+a,a,Y);if(Ee)return Ee;var Pe=a>0?Y.end:_(Y.begin,-1);return Pe!=null&&!(a>0&&Pe==r.text.length)&&(Ee=ye(a>0?0:u.length-1,a,L(Pe)),Ee)?Ee:null}var Vi={selectAll:ec,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),qe)},killLine:function(e){return ai(e,function(r){if(r.empty()){var s=se(e.doc,r.head.line).text.length;return r.head.ch==s&&r.head.line<e.lastLine()?{from:r.head,to:we(r.head.line+1,0)}:{from:r.head,to:we(r.head.line,s)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return ai(e,function(r){return{from:we(r.from().line,0),to:Ze(e.doc,we(r.to().line+1,0))}})},delLineLeft:function(e){return ai(e,function(r){return{from:we(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return ai(e,function(r){var s=e.charCoords(r.head,"div").top+5,a=e.coordsChar({left:0,top:s},"div");return{from:a,to:r.from()}})},delWrappedLineRight:function(e){return ai(e,function(r){var s=e.charCoords(r.head,"div").top+5,a=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:s},"div");return{from:r.from(),to:a}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(we(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(we(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return vc(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return yc(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return Jb(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var s=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:s},"div")},ke)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var s=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:s},"div")},ke)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var s=e.cursorCoords(r.head,"div").top+5,a=e.coordsChar({left:0,top:s},"div");return a.ch<e.getLine(a.line).search(/\S/)?yc(e,r.head):a},ke)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var r=[],s=e.listSelections(),a=e.options.tabSize,u=0;u<s.length;u++){var m=s[u].from(),x=be(e.getLine(m.line),m.ch,a);r.push(gt(a-x%a))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ar(e,function(){for(var r=e.listSelections(),s=[],a=0;a<r.length;a++)if(!!r[a].empty()){var u=r[a].head,m=se(e.doc,u.line).text;if(m){if(u.ch==m.length&&(u=new we(u.line,u.ch-1)),u.ch>0)u=new we(u.line,u.ch+1),e.replaceRange(m.charAt(u.ch-1)+m.charAt(u.ch-2),we(u.line,u.ch-2),u,"+transpose");else if(u.line>e.doc.first){var x=se(e.doc,u.line-1).text;x&&(u=new we(u.line,1),e.replaceRange(m.charAt(0)+e.doc.lineSeparator()+x.charAt(x.length-1),we(u.line-1,x.length-1),u,"+transpose"))}}s.push(new At(u,u))}e.setSelections(s)})},newlineAndIndent:function(e){return Ar(e,function(){for(var r=e.listSelections(),s=r.length-1;s>=0;s--)e.replaceRange(e.doc.lineSeparator(),r[s].anchor,r[s].head,"+input");r=e.listSelections();for(var a=0;a<r.length;a++)e.indentLine(r[a].from().line,null,!0);Qn(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function vc(e,r){var s=se(e.doc,r),a=Ur(s);return a!=s&&(r=Ye(a)),Ss(!0,e,a,r,1)}function Jb(e,r){var s=se(e.doc,r),a=Ry(s);return a!=s&&(r=Ye(a)),Ss(!0,e,s,r,-1)}function yc(e,r){var s=vc(e,r.line),a=se(e.doc,s.line),u=Lt(a,e.doc.direction);if(!u||u[0].level==0){var m=Math.max(s.ch,a.text.search(/\S/)),x=r.line==s.line&&r.ch<=m&&r.ch;return we(s.line,x?0:m,s.sticky)}return s}function Wo(e,r,s){if(typeof r=="string"&&(r=Vi[r],!r))return!1;e.display.input.ensurePolled();var a=e.display.shift,u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s&&(e.display.shift=!1),u=r(e)!=ze}finally{e.display.shift=a,e.state.suppressEdits=!1}return u}function ex(e,r,s){for(var a=0;a<e.state.keyMaps.length;a++){var u=oi(r,e.state.keyMaps[a],s,e);if(u)return u}return e.options.extraKeys&&oi(r,e.options.extraKeys,s,e)||oi(r,e.options.keyMap,s,e)}var tx=new Fe;function Yi(e,r,s,a){var u=e.state.keySeq;if(u){if(pc(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:tx.set(50,function(){e.state.keySeq==u&&(e.state.keySeq=null,e.display.input.reset())}),bc(e,u+" "+r,s,a))return!0}return bc(e,r,s,a)}function bc(e,r,s,a){var u=ex(e,r,a);return u=="multi"&&(e.state.keySeq=r),u=="handled"&&tr(e,"keyHandled",e,r,s),(u=="handled"||u=="multi")&&(kt(s),as(e)),!!u}function xc(e,r){var s=gc(r,!0);return s?r.shiftKey&&!e.state.keySeq?Yi(e,"Shift-"+s,r,function(a){return Wo(e,a,!0)})||Yi(e,s,r,function(a){if(typeof a=="string"?/^go[A-Z]/.test(a):a.motion)return Wo(e,a)}):Yi(e,s,r,function(a){return Wo(e,a)}):!1}function rx(e,r,s){return Yi(e,"'"+s+"'",r,function(a){return Wo(e,a,!0)})}var Es=null;function wc(e){var r=this;if(!(e.target&&e.target!=r.display.input.getField())&&(r.curOp.focus=P(),!wt(r,e))){o&&h<11&&e.keyCode==27&&(e.returnValue=!1);var s=e.keyCode;r.display.shift=s==16||e.shiftKey;var a=xc(r,e);g&&(Es=a?s:null,!a&&s==88&&!Q&&(S?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),n&&!S&&!a&&s==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),s==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&nx(r)}}function nx(e){var r=e.display.lineDiv;z(r,"CodeMirror-crosshair");function s(a){(a.keyCode==18||!a.altKey)&&(W(r,"CodeMirror-crosshair"),pt(document,"keyup",s),pt(document,"mouseover",s))}lt(document,"keyup",s),lt(document,"mouseover",s)}function kc(e){e.keyCode==16&&(this.doc.sel.shift=!1),wt(this,e)}function _c(e){var r=this;if(!(e.target&&e.target!=r.display.input.getField())&&!(ln(r.display,e)||wt(r,e)||e.ctrlKey&&!e.altKey||S&&e.metaKey)){var s=e.keyCode,a=e.charCode;if(g&&s==Es){Es=null,kt(e);return}if(!(g&&(!e.which||e.which<10)&&xc(r,e))){var u=String.fromCharCode(a==null?s:a);u!="\b"&&(rx(r,e,u)||r.display.input.onKeyPress(e))}}}var ix=400,Cs=function(e,r,s){this.time=e,this.pos=r,this.button=s};Cs.prototype.compare=function(e,r,s){return this.time+ix>e&&D(r,this.pos)==0&&s==this.button};var Xi,Zi;function ox(e,r){var s=+new Date;return Zi&&Zi.compare(s,e,r)?(Xi=Zi=null,"triple"):Xi&&Xi.compare(s,e,r)?(Zi=new Cs(s,e,r),Xi=null,"double"):(Xi=new Cs(s,e,r),Zi=null,"single")}function Sc(e){var r=this,s=r.display;if(!(wt(r,e)||s.activeTouch&&s.input.supportsTouch())){if(s.input.ensurePolled(),s.shift=e.shiftKey,ln(s,e)){f||(s.scroller.draggable=!1,setTimeout(function(){return s.scroller.draggable=!0},100));return}if(!Ts(r,e)){var a=Dn(r,e),u=pr(e),m=a?ox(a,u):"single";window.focus(),u==1&&r.state.selectingText&&r.state.selectingText(e),!(a&&ax(r,u,a,m,e))&&(u==1?a?lx(r,a,m,e):hr(e)==s.scroller&&kt(e):u==2?(a&&Bo(r.doc,a),setTimeout(function(){return s.input.focus()},20)):u==3&&(ee?r.display.input.onContextMenu(e):ss(r)))}}}function ax(e,r,s,a,u){var m="Click";return a=="double"?m="Double"+m:a=="triple"&&(m="Triple"+m),m=(r==1?"Left":r==2?"Middle":"Right")+m,Yi(e,mc(m,u),u,function(x){if(typeof x=="string"&&(x=Vi[x]),!x)return!1;var _=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),_=x(e,s)!=ze}finally{e.state.suppressEdits=!1}return _})}function sx(e,r,s){var a=e.getOption("configureMouse"),u=a?a(e,r,s):{};if(u.unit==null){var m=N?s.shiftKey&&s.metaKey:s.altKey;u.unit=m?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(u.extend==null||e.doc.extend)&&(u.extend=e.doc.extend||s.shiftKey),u.addNew==null&&(u.addNew=S?s.metaKey:s.ctrlKey),u.moveOnDrag==null&&(u.moveOnDrag=!(S?s.altKey:s.ctrlKey)),u}function lx(e,r,s,a){o?setTimeout(F(Eu,e),0):e.curOp.focus=P();var u=sx(e,s,a),m=e.doc.sel,x;e.options.dragDrop&&$r&&!e.isReadOnly()&&s=="single"&&(x=m.contains(r))>-1&&(D((x=m.ranges[x]).from(),r)<0||r.xRel>0)&&(D(x.to(),r)>0||r.xRel<0)?ux(e,a,r,u):cx(e,a,r,u)}function ux(e,r,s,a){var u=e.display,m=!1,x=rr(e,function(L){f&&(u.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ss(e)),pt(u.wrapper.ownerDocument,"mouseup",x),pt(u.wrapper.ownerDocument,"mousemove",_),pt(u.scroller,"dragstart",C),pt(u.scroller,"drop",x),m||(kt(L),a.addNew||Bo(e.doc,s,null,null,a.extend),f&&!v||o&&h==9?setTimeout(function(){u.wrapper.ownerDocument.body.focus({preventScroll:!0}),u.input.focus()},20):u.input.focus())}),_=function(L){m=m||Math.abs(r.clientX-L.clientX)+Math.abs(r.clientY-L.clientY)>=10},C=function(){return m=!0};f&&(u.scroller.draggable=!0),e.state.draggingText=x,x.copy=!a.moveOnDrag,lt(u.wrapper.ownerDocument,"mouseup",x),lt(u.wrapper.ownerDocument,"mousemove",_),lt(u.scroller,"dragstart",C),lt(u.scroller,"drop",x),e.state.delayingBlurEvent=!0,setTimeout(function(){return u.input.focus()},20),u.scroller.dragDrop&&u.scroller.dragDrop()}function Ec(e,r,s){if(s=="char")return new At(r,r);if(s=="word")return e.findWordAt(r);if(s=="line")return new At(we(r.line,0),Ze(e.doc,we(r.line+1,0)));var a=s(e,r);return new At(a.from,a.to)}function cx(e,r,s,a){o&&ss(e);var u=e.display,m=e.doc;kt(r);var x,_,C=m.sel,L=C.ranges;if(a.addNew&&!a.extend?(_=m.sel.contains(s),_>-1?x=L[_]:x=new At(s,s)):(x=m.sel.primary(),_=m.sel.primIndex),a.unit=="rectangle")a.addNew||(x=new At(s,s)),s=Dn(e,r,!0,!0),_=-1;else{var Y=Ec(e,s,a.unit);a.extend?x=xs(x,Y.anchor,Y.head,a.extend):x=Y}a.addNew?_==-1?(_=L.length,mr(m,Hr(e,L.concat([x]),_),{scroll:!1,origin:"*mouse"})):L.length>1&&L[_].empty()&&a.unit=="char"&&!a.extend?(mr(m,Hr(e,L.slice(0,_).concat(L.slice(_+1)),0),{scroll:!1,origin:"*mouse"}),C=m.sel):ws(m,_,x,ge):(_=0,mr(m,new Mr([x],0),ge),C=m.sel);var J=s;function fe(Ue){if(D(J,Ue)!=0)if(J=Ue,a.unit=="rectangle"){for(var nt=[],ct=e.options.tabSize,ut=be(se(m,s.line).text,s.ch,ct),vt=be(se(m,Ue.line).text,Ue.ch,ct),Pt=Math.min(ut,vt),ir=Math.max(ut,vt),Bt=Math.min(s.line,Ue.line),Lr=Math.min(e.lastLine(),Math.max(s.line,Ue.line));Bt<=Lr;Bt++){var Sr=se(m,Bt).text,Xt=je(Sr,Pt,ct);Pt==ir?nt.push(new At(we(Bt,Xt),we(Bt,Xt))):Sr.length>Xt&&nt.push(new At(we(Bt,Xt),we(Bt,je(Sr,ir,ct))))}nt.length||nt.push(new At(s,s)),mr(m,Hr(e,C.ranges.slice(0,_).concat(nt),_),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ue)}else{var Er=x,cr=Ec(e,Ue,a.unit),Jt=Er.anchor,Zt;D(cr.anchor,Jt)>0?(Zt=cr.head,Jt=ft(Er.from(),cr.anchor)):(Zt=cr.anchor,Jt=De(Er.to(),cr.head));var Ut=C.ranges.slice(0);Ut[_]=fx(e,new At(Ze(m,Jt),Zt)),mr(m,Hr(e,Ut,_),ge)}}var le=u.wrapper.getBoundingClientRect(),ye=0;function Ee(Ue){var nt=++ye,ct=Dn(e,Ue,!0,a.unit=="rectangle");if(!!ct)if(D(ct,J)!=0){e.curOp.focus=P(),fe(ct);var ut=Mo(u,m);(ct.line>=ut.to||ct.line<ut.from)&&setTimeout(rr(e,function(){ye==nt&&Ee(Ue)}),150)}else{var vt=Ue.clientY<le.top?-20:Ue.clientY>le.bottom?20:0;vt&&setTimeout(rr(e,function(){ye==nt&&(u.scroller.scrollTop+=vt,Ee(Ue))}),50)}}function Pe(Ue){e.state.selectingText=!1,ye=1/0,Ue&&(kt(Ue),u.input.focus()),pt(u.wrapper.ownerDocument,"mousemove",$e),pt(u.wrapper.ownerDocument,"mouseup",Qe),m.history.lastSelOrigin=null}var $e=rr(e,function(Ue){Ue.buttons===0||!pr(Ue)?Pe(Ue):Ee(Ue)}),Qe=rr(e,Pe);e.state.selectingText=Qe,lt(u.wrapper.ownerDocument,"mousemove",$e),lt(u.wrapper.ownerDocument,"mouseup",Qe)}function fx(e,r){var s=r.anchor,a=r.head,u=se(e.doc,s.line);if(D(s,a)==0&&s.sticky==a.sticky)return r;var m=Lt(u);if(!m)return r;var x=We(m,s.ch,s.sticky),_=m[x];if(_.from!=s.ch&&_.to!=s.ch)return r;var C=x+(_.from==s.ch==(_.level!=1)?0:1);if(C==0||C==m.length)return r;var L;if(a.line!=s.line)L=(a.line-s.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Y=We(m,a.ch,a.sticky),J=Y-x||(a.ch-s.ch)*(_.level==1?-1:1);Y==C-1||Y==C?L=J<0:L=J>0}var fe=m[C+(L?-1:0)],le=L==(fe.level==1),ye=le?fe.from:fe.to,Ee=le?"after":"before";return s.ch==ye&&s.sticky==Ee?r:new At(new we(s.line,ye,Ee),a)}function Cc(e,r,s,a){var u,m;if(r.touches)u=r.touches[0].clientX,m=r.touches[0].clientY;else try{u=r.clientX,m=r.clientY}catch{return!1}if(u>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;a&&kt(r);var x=e.display,_=x.lineDiv.getBoundingClientRect();if(m>_.bottom||!Et(e,s))return Ht(r);m-=_.top-x.viewOffset;for(var C=0;C<e.display.gutterSpecs.length;++C){var L=x.gutters.childNodes[C];if(L&&L.getBoundingClientRect().right>=u){var Y=tt(e.doc,m),J=e.display.gutterSpecs[C];return rt(e,s,e,Y,J.className,r),Ht(r)}}}function Ts(e,r){return Cc(e,r,"gutterClick",!0)}function Tc(e,r){ln(e.display,r)||dx(e,r)||wt(e,r,"contextmenu")||ee||e.display.input.onContextMenu(r)}function dx(e,r){return Et(e,"gutterContextMenu")?Cc(e,r,"gutterContextMenu",!1):!1}function Ac(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ii(e)}var si={toString:function(){return"CodeMirror.Init"}},Lc={},Go={};function hx(e){var r=e.optionHandlers;function s(a,u,m,x){e.defaults[a]=u,m&&(r[a]=x?function(_,C,L){L!=si&&m(_,C,L)}:m)}e.defineOption=s,e.Init=si,s("value","",function(a,u){return a.setValue(u)},!0),s("mode",null,function(a,u){a.doc.modeOption=u,vs(a)},!0),s("indentUnit",2,vs,!0),s("indentWithTabs",!1),s("smartIndent",!0),s("tabSize",4,function(a){Bi(a),Ii(a),kr(a)},!0),s("lineSeparator",null,function(a,u){if(a.doc.lineSep=u,!!u){var m=[],x=a.doc.first;a.doc.iter(function(C){for(var L=0;;){var Y=C.text.indexOf(u,L);if(Y==-1)break;L=Y+u.length,m.push(we(x,Y))}x++});for(var _=m.length-1;_>=0;_--)ni(a.doc,u,m[_],we(m[_].line,m[_].ch+u.length))}}),s("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(a,u,m){a.state.specialChars=new RegExp(u.source+(u.test(" ")?"":"| "),"g"),m!=si&&a.refresh()}),s("specialCharPlaceholder",Uy,function(a){return a.refresh()},!0),s("electricChars",!0),s("inputStyle",I?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),s("spellcheck",!1,function(a,u){return a.getInputField().spellcheck=u},!0),s("autocorrect",!1,function(a,u){return a.getInputField().autocorrect=u},!0),s("autocapitalize",!1,function(a,u){return a.getInputField().autocapitalize=u},!0),s("rtlMoveVisually",!O),s("wholeLineUpdateBefore",!0),s("theme","default",function(a){Ac(a),Ni(a)},!0),s("keyMap","default",function(a,u,m){var x=Ho(u),_=m!=si&&Ho(m);_&&_.detach&&_.detach(a,x),x.attach&&x.attach(a,_||null)}),s("extraKeys",null),s("configureMouse",null),s("lineWrapping",!1,mx,!0),s("gutters",[],function(a,u){a.display.gutterSpecs=ms(u,a.options.lineNumbers),Ni(a)},!0),s("fixedGutter",!0,function(a,u){a.display.gutters.style.left=u?ns(a.display)+"px":"0",a.refresh()},!0),s("coverGutterNextToScrollbar",!1,function(a){return Jn(a)},!0),s("scrollbarStyle","native",function(a){Iu(a),Jn(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),s("lineNumbers",!1,function(a,u){a.display.gutterSpecs=ms(a.options.gutters,u),Ni(a)},!0),s("firstLineNumber",1,Ni,!0),s("lineNumberFormatter",function(a){return a},Ni,!0),s("showCursorWhenSelecting",!1,Fi,!0),s("resetSelectionOnContextMenu",!0),s("lineWiseCopyCut",!0),s("pasteLinesPerSelection",!0),s("selectionsMayTouch",!1),s("readOnly",!1,function(a,u){u=="nocursor"&&(Zn(a),a.display.input.blur()),a.display.input.readOnlyChanged(u)}),s("screenReaderLabel",null,function(a,u){u=u===""?null:u,a.display.input.screenReaderLabelChanged(u)}),s("disableInput",!1,function(a,u){u||a.display.input.reset()},!0),s("dragDrop",!0,px),s("allowDropFileTypes",null),s("cursorBlinkRate",530),s("cursorScrollMargin",0),s("cursorHeight",1,Fi,!0),s("singleCursorHeightPerLine",!0,Fi,!0),s("workTime",100),s("workDelay",100),s("flattenSpans",!0,Bi,!0),s("addModeClass",!1,Bi,!0),s("pollInterval",100),s("undoDepth",200,function(a,u){return a.doc.history.undoDepth=u}),s("historyEventDelay",1250),s("viewportMargin",10,function(a){return a.refresh()},!0),s("maxHighlightLength",1e4,Bi,!0),s("moveInputWithCursor",!0,function(a,u){u||a.display.input.resetPosition()}),s("tabindex",null,function(a,u){return a.display.input.getField().tabIndex=u||""}),s("autofocus",null),s("direction","ltr",function(a,u){return a.doc.setDirection(u)},!0),s("phrases",null)}function px(e,r,s){var a=s&&s!=si;if(!r!=!a){var u=e.display.dragFunctions,m=r?lt:pt;m(e.display.scroller,"dragstart",u.start),m(e.display.scroller,"dragenter",u.enter),m(e.display.scroller,"dragover",u.over),m(e.display.scroller,"dragleave",u.leave),m(e.display.scroller,"drop",u.drop)}}function mx(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(W(e.display.wrapper,"CodeMirror-wrap"),Ka(e)),is(e),kr(e),Ii(e),setTimeout(function(){return Jn(e)},100)}function Nt(e,r){var s=this;if(!(this instanceof Nt))return new Nt(e,r);this.options=r=r?A(r):{},A(Lc,r,!1);var a=r.value;typeof a=="string"?a=new _r(a,r.mode,null,r.lineSeparator,r.direction):r.mode&&(a.modeOption=r.mode),this.doc=a;var u=new Nt.inputStyles[r.inputStyle](this),m=this.display=new Ab(e,a,u,r);m.wrapper.CodeMirror=this,Ac(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Iu(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 Fe,keySeq:null,specialChars:null},r.autofocus&&!I&&m.input.focus(),o&&h<11&&setTimeout(function(){return s.display.input.reset(!0)},20),gx(this),Kb(),On(this),this.curOp.forceUpdate=!0,$u(this,a),r.autofocus&&!I||this.hasFocus()?setTimeout(function(){s.hasFocus()&&!s.state.focused&&ls(s)},20):Zn(this);for(var x in Go)Go.hasOwnProperty(x)&&Go[x](this,r[x],si);Ou(this),r.finishInit&&r.finishInit(this);for(var _=0;_<As.length;++_)As[_](this);Pn(this),f&&r.lineWrapping&&getComputedStyle(m.lineDiv).textRendering=="optimizelegibility"&&(m.lineDiv.style.textRendering="auto")}Nt.defaults=Lc,Nt.optionHandlers=Go;function gx(e){var r=e.display;lt(r.scroller,"mousedown",rr(e,Sc)),o&&h<11?lt(r.scroller,"dblclick",rr(e,function(C){if(!wt(e,C)){var L=Dn(e,C);if(!(!L||Ts(e,C)||ln(e.display,C))){kt(C);var Y=e.findWordAt(L);Bo(e.doc,Y.anchor,Y.head)}}})):lt(r.scroller,"dblclick",function(C){return wt(e,C)||kt(C)}),lt(r.scroller,"contextmenu",function(C){return Tc(e,C)}),lt(r.input.getField(),"contextmenu",function(C){r.scroller.contains(C.target)||Tc(e,C)});var s,a={end:0};function u(){r.activeTouch&&(s=setTimeout(function(){return r.activeTouch=null},1e3),a=r.activeTouch,a.end=+new Date)}function m(C){if(C.touches.length!=1)return!1;var L=C.touches[0];return L.radiusX<=1&&L.radiusY<=1}function x(C,L){if(L.left==null)return!0;var Y=L.left-C.left,J=L.top-C.top;return Y*Y+J*J>20*20}lt(r.scroller,"touchstart",function(C){if(!wt(e,C)&&!m(C)&&!Ts(e,C)){r.input.ensurePolled(),clearTimeout(s);var L=+new Date;r.activeTouch={start:L,moved:!1,prev:L-a.end<=300?a:null},C.touches.length==1&&(r.activeTouch.left=C.touches[0].pageX,r.activeTouch.top=C.touches[0].pageY)}}),lt(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),lt(r.scroller,"touchend",function(C){var L=r.activeTouch;if(L&&!ln(r,C)&&L.left!=null&&!L.moved&&new Date-L.start<300){var Y=e.coordsChar(r.activeTouch,"page"),J;!L.prev||x(L,L.prev)?J=new At(Y,Y):!L.prev.prev||x(L,L.prev.prev)?J=e.findWordAt(Y):J=new At(we(Y.line,0),Ze(e.doc,we(Y.line+1,0))),e.setSelection(J.anchor,J.head),e.focus(),kt(C)}u()}),lt(r.scroller,"touchcancel",u),lt(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Oi(e,r.scroller.scrollTop),Fn(e,r.scroller.scrollLeft,!0),rt(e,"scroll",e))}),lt(r.scroller,"mousewheel",function(C){return zu(e,C)}),lt(r.scroller,"DOMMouseScroll",function(C){return zu(e,C)}),lt(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(C){wt(e,C)||Ir(C)},over:function(C){wt(e,C)||(Gb(e,C),Ir(C))},start:function(C){return Wb(e,C)},drop:rr(e,Hb),leave:function(C){wt(e,C)||fc(e)}};var _=r.input.getField();lt(_,"keyup",function(C){return kc.call(e,C)}),lt(_,"keydown",rr(e,wc)),lt(_,"keypress",rr(e,_c)),lt(_,"focus",function(C){return ls(e,C)}),lt(_,"blur",function(C){return Zn(e,C)})}var As=[];Nt.defineInitHook=function(e){return As.push(e)};function Qi(e,r,s,a){var u=e.doc,m;s==null&&(s="add"),s=="smart"&&(u.mode.indent?m=Ci(e,r).state:s="prev");var x=e.options.tabSize,_=se(u,r),C=be(_.text,null,x);_.stateAfter&&(_.stateAfter=null);var L=_.text.match(/^\s*/)[0],Y;if(!a&&!/\S/.test(_.text))Y=0,s="not";else if(s=="smart"&&(Y=u.mode.indent(m,_.text.slice(L.length),_.text),Y==ze||Y>150)){if(!a)return;s="prev"}s=="prev"?r>u.first?Y=be(se(u,r-1).text,null,x):Y=0:s=="add"?Y=C+e.options.indentUnit:s=="subtract"?Y=C-e.options.indentUnit:typeof s=="number"&&(Y=C+s),Y=Math.max(0,Y);var J="",fe=0;if(e.options.indentWithTabs)for(var le=Math.floor(Y/x);le;--le)fe+=x,J+=" ";if(fe<Y&&(J+=gt(Y-fe)),J!=L)return ni(u,J,we(r,0),we(r,L.length),"+input"),_.stateAfter=null,!0;for(var ye=0;ye<u.sel.ranges.length;ye++){var Ee=u.sel.ranges[ye];if(Ee.head.line==r&&Ee.head.ch<L.length){var Pe=we(r,L.length);ws(u,ye,new At(Pe,Pe));break}}}var Wr=null;function Ko(e){Wr=e}function Ls(e,r,s,a,u){var m=e.doc;e.display.shift=!1,a||(a=m.sel);var x=+new Date-200,_=u=="paste"||e.state.pasteIncoming>x,C=ie(r),L=null;if(_&&a.ranges.length>1)if(Wr&&Wr.text.join(`
`)==r){if(a.ranges.length%Wr.text.length==0){L=[];for(var Y=0;Y<Wr.text.length;Y++)L.push(m.splitLines(Wr.text[Y]))}}else C.length==a.ranges.length&&e.options.pasteLinesPerSelection&&(L=Ie(C,function($e){return[$e]}));for(var J=e.curOp.updateInput,fe=a.ranges.length-1;fe>=0;fe--){var le=a.ranges[fe],ye=le.from(),Ee=le.to();le.empty()&&(s&&s>0?ye=we(ye.line,ye.ch-s):e.state.overwrite&&!_?Ee=we(Ee.line,Math.min(se(m,Ee.line).text.length,Ee.ch+Re(C).length)):_&&Wr&&Wr.lineWise&&Wr.text.join(`
`)==C.join(`
`)&&(ye=Ee=we(ye.line,0)));var Pe={from:ye,to:Ee,text:L?L[fe%L.length]:C,origin:u||(_?"paste":e.state.cutIncoming>x?"cut":"+input")};ri(e.doc,Pe),tr(e,"inputRead",e,Pe)}r&&!_&&Ic(e,r),Qn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=J),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Dc(e,r){var s=e.clipboardData&&e.clipboardData.getData("Text");if(s)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ar(r,function(){return Ls(r,s,0,null,"paste")}),!0}function Ic(e,r){if(!(!e.options.electricChars||!e.options.smartIndent))for(var s=e.doc.sel,a=s.ranges.length-1;a>=0;a--){var u=s.ranges[a];if(!(u.head.ch>100||a&&s.ranges[a-1].head.line==u.head.line)){var m=e.getModeAt(u.head),x=!1;if(m.electricChars){for(var _=0;_<m.electricChars.length;_++)if(r.indexOf(m.electricChars.charAt(_))>-1){x=Qi(e,u.head.line,"smart");break}}else m.electricInput&&m.electricInput.test(se(e.doc,u.head.line).text.slice(0,u.head.ch))&&(x=Qi(e,u.head.line,"smart"));x&&tr(e,"electricInput",e,u.head.line)}}}function Fc(e){for(var r=[],s=[],a=0;a<e.doc.sel.ranges.length;a++){var u=e.doc.sel.ranges[a].head.line,m={anchor:we(u,0),head:we(u+1,0)};s.push(m),r.push(e.getRange(m.anchor,m.head))}return{text:r,ranges:s}}function Mc(e,r,s,a){e.setAttribute("autocorrect",s?"":"off"),e.setAttribute("autocapitalize",a?"":"off"),e.setAttribute("spellcheck",!!r)}function Oc(){var e=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),r=R("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return f?e.style.width="1000px":e.setAttribute("wrap","off"),E&&(e.style.border="1px solid black"),Mc(e),r}function vx(e){var r=e.optionHandlers,s=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,u){var m=this.options,x=m[a];m[a]==u&&a!="mode"||(m[a]=u,r.hasOwnProperty(a)&&rr(this,r[a])(this,u,x),rt(this,"optionChange",this,a))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,u){this.state.keyMaps[u?"push":"unshift"](Ho(a))},removeKeyMap:function(a){for(var u=this.state.keyMaps,m=0;m<u.length;++m)if(u[m]==a||u[m].name==a)return u.splice(m,1),!0},addOverlay:br(function(a,u){var m=a.token?a:e.getMode(this.options,a);if(m.startState)throw new Error("Overlays may not be stateful.");Be(this.state.overlays,{mode:m,modeSpec:a,opaque:u&&u.opaque,priority:u&&u.priority||0},function(x){return x.priority}),this.state.modeGen++,kr(this)}),removeOverlay:br(function(a){for(var u=this.state.overlays,m=0;m<u.length;++m){var x=u[m].modeSpec;if(x==a||typeof a=="string"&&x.name==a){u.splice(m,1),this.state.modeGen++,kr(this);return}}}),indentLine:br(function(a,u,m){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),bt(this.doc,a)&&Qi(this,a,u,m)}),indentSelection:br(function(a){for(var u=this.doc.sel.ranges,m=-1,x=0;x<u.length;x++){var _=u[x];if(_.empty())_.head.line>m&&(Qi(this,_.head.line,a,!0),m=_.head.line,x==this.doc.sel.primIndex&&Qn(this));else{var C=_.from(),L=_.to(),Y=Math.max(m,C.line);m=Math.min(this.lastLine(),L.line-(L.ch?0:1))+1;for(var J=Y;J<m;++J)Qi(this,J,a);var fe=this.doc.sel.ranges;C.ch==0&&u.length==fe.length&&fe[x].from().ch>0&&ws(this.doc,x,new At(C,fe[x].to()),qe)}}}),getTokenAt:function(a,u){return jl(this,a,u)},getLineTokens:function(a,u){return jl(this,we(a),u,!0)},getTokenTypeAt:function(a){a=Ze(this.doc,a);var u=ql(this,se(this.doc,a.line)),m=0,x=(u.length-1)/2,_=a.ch,C;if(_==0)C=u[2];else for(;;){var L=m+x>>1;if((L?u[L*2-1]:0)>=_)x=L;else if(u[L*2+1]<_)m=L+1;else{C=u[L*2+2];break}}var Y=C?C.indexOf("overlay "):-1;return Y<0?C:Y==0?null:C.slice(0,Y-1)},getModeAt:function(a){var u=this.doc.mode;return u.innerMode?e.innerMode(u,this.getTokenAt(a).state).mode:u},getHelper:function(a,u){return this.getHelpers(a,u)[0]},getHelpers:function(a,u){var m=[];if(!s.hasOwnProperty(u))return m;var x=s[u],_=this.getModeAt(a);if(typeof _[u]=="string")x[_[u]]&&m.push(x[_[u]]);else if(_[u])for(var C=0;C<_[u].length;C++){var L=x[_[u][C]];L&&m.push(L)}else _.helperType&&x[_.helperType]?m.push(x[_.helperType]):x[_.name]&&m.push(x[_.name]);for(var Y=0;Y<x._global.length;Y++){var J=x._global[Y];J.pred(_,this)&&xe(m,J.val)==-1&&m.push(J.val)}return m},getStateAfter:function(a,u){var m=this.doc;return a=xt(m,a==null?m.first+m.size-1:a),Ci(this,a+1,u).state},cursorCoords:function(a,u){var m,x=this.doc.sel.primary();return a==null?m=x.head:typeof a=="object"?m=Ze(this.doc,a):m=a?x.from():x.to(),jr(this,m,u||"page")},charCoords:function(a,u){return Lo(this,Ze(this.doc,a),u||"page")},coordsChar:function(a,u){return a=yu(this,a,u||"page"),es(this,a.left,a.top)},lineAtHeight:function(a,u){return a=yu(this,{top:a,left:0},u||"page").top,tt(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,u,m){var x=!1,_;if(typeof a=="number"){var C=this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>C&&(a=C,x=!0),_=se(this.doc,a)}else _=a;return Ao(this,_,{top:0,left:0},u||"page",m||x).top+(x?this.doc.height-sn(_):0)},defaultTextHeight:function(){return Yn(this.display)},defaultCharWidth:function(){return Xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,u,m,x,_){var C=this.display;a=jr(this,Ze(this.doc,a));var L=a.bottom,Y=a.left;if(u.style.position="absolute",u.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(u),C.sizer.appendChild(u),x=="over")L=a.top;else if(x=="above"||x=="near"){var J=Math.max(C.wrapper.clientHeight,this.doc.height),fe=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(x=="above"||a.bottom+u.offsetHeight>J)&&a.top>u.offsetHeight?L=a.top-u.offsetHeight:a.bottom+u.offsetHeight<=J&&(L=a.bottom),Y+u.offsetWidth>fe&&(Y=fe-u.offsetWidth)}u.style.top=L+"px",u.style.left=u.style.right="",_=="right"?(Y=C.sizer.clientWidth-u.offsetWidth,u.style.right="0px"):(_=="left"?Y=0:_=="middle"&&(Y=(C.sizer.clientWidth-u.offsetWidth)/2),u.style.left=Y+"px"),m&&pb(this,{left:Y,top:L,right:Y+u.offsetWidth,bottom:L+u.offsetHeight})},triggerOnKeyDown:br(wc),triggerOnKeyPress:br(_c),triggerOnKeyUp:kc,triggerOnMouseDown:br(Sc),execCommand:function(a){if(Vi.hasOwnProperty(a))return Vi[a].call(null,this)},triggerElectric:br(function(a){Ic(this,a)}),findPosH:function(a,u,m,x){var _=1;u<0&&(_=-1,u=-u);for(var C=Ze(this.doc,a),L=0;L<u&&(C=Ds(this.doc,C,_,m,x),!C.hitSide);++L);return C},moveH:br(function(a,u){var m=this;this.extendSelectionsBy(function(x){return m.display.shift||m.doc.extend||x.empty()?Ds(m.doc,x.head,a,u,m.options.rtlMoveVisually):a<0?x.from():x.to()},ke)}),deleteH:br(function(a,u){var m=this.doc.sel,x=this.doc;m.somethingSelected()?x.replaceSelection("",null,"+delete"):ai(this,function(_){var C=Ds(x,_.head,a,u,!1);return a<0?{from:C,to:_.head}:{from:_.head,to:C}})}),findPosV:function(a,u,m,x){var _=1,C=x;u<0&&(_=-1,u=-u);for(var L=Ze(this.doc,a),Y=0;Y<u;++Y){var J=jr(this,L,"div");if(C==null?C=J.left:J.left=C,L=Pc(this,J,_,m),L.hitSide)break}return L},moveV:br(function(a,u){var m=this,x=this.doc,_=[],C=!this.display.shift&&!x.extend&&x.sel.somethingSelected();if(x.extendSelectionsBy(function(Y){if(C)return a<0?Y.from():Y.to();var J=jr(m,Y.head,"div");Y.goalColumn!=null&&(J.left=Y.goalColumn),_.push(J.left);var fe=Pc(m,J,a,u);return u=="page"&&Y==x.sel.primary()&&cs(m,Lo(m,fe,"div").top-J.top),fe},ke),_.length)for(var L=0;L<x.sel.ranges.length;L++)x.sel.ranges[L].goalColumn=_[L]}),findWordAt:function(a){var u=this.doc,m=se(u,a.line).text,x=a.ch,_=a.ch;if(m){var C=this.getHelper(a,"wordChars");(a.sticky=="before"||_==m.length)&&x?--x:++_;for(var L=m.charAt(x),Y=X(L,C)?function(J){return X(J,C)}:/\s/.test(L)?function(J){return/\s/.test(J)}:function(J){return!/\s/.test(J)&&!X(J)};x>0&&Y(m.charAt(x-1));)--x;for(;_<m.length&&Y(m.charAt(_));)++_}return new At(we(a.line,x),we(a.line,_))},toggleOverwrite:function(a){a!=null&&a==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):W(this.display.cursorDiv,"CodeMirror-overwrite"),rt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==P()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:br(function(a,u){Mi(this,a,u)}),getScrollInfo:function(){var a=this.display.scroller;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-Yr(this)-this.display.barHeight,width:a.scrollWidth-Yr(this)-this.display.barWidth,clientHeight:Xa(this),clientWidth:An(this)}},scrollIntoView:br(function(a,u){a==null?(a={from:this.doc.sel.primary().head,to:null},u==null&&(u=this.options.cursorScrollMargin)):typeof a=="number"?a={from:we(a,0),to:null}:a.from==null&&(a={from:a,to:null}),a.to||(a.to=a.from),a.margin=u||0,a.from.line!=null?mb(this,a):Tu(this,a.from,a.to,a.margin)}),setSize:br(function(a,u){var m=this,x=function(C){return typeof C=="number"||/^\d+$/.test(String(C))?C+"px":C};a!=null&&(this.display.wrapper.style.width=x(a)),u!=null&&(this.display.wrapper.style.height=x(u)),this.options.lineWrapping&&mu(this);var _=this.display.viewFrom;this.doc.iter(_,this.display.viewTo,function(C){if(C.widgets){for(var L=0;L<C.widgets.length;L++)if(C.widgets[L].noHScroll){vn(m,_,"widget");break}}++_}),this.curOp.forceUpdate=!0,rt(this,"refresh",this)}),operation:function(a){return Ar(this,a)},startOperation:function(){return On(this)},endOperation:function(){return Pn(this)},refresh:br(function(){var a=this.display.cachedTextHeight;kr(this),this.curOp.forceUpdate=!0,Ii(this),Mi(this,this.doc.scrollLeft,this.doc.scrollTop),hs(this.display),(a==null||Math.abs(a-Yn(this.display))>.5||this.options.lineWrapping)&&is(this),rt(this,"refresh",this)}),swapDoc:br(function(a){var u=this.doc;return u.cm=null,this.state.selectingText&&this.state.selectingText(),$u(this,a),Ii(this),this.display.input.reset(),Mi(this,a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,tr(this,"swapDoc",this,u),u}),phrase:function(a){var u=this.options.phrases;return u&&Object.prototype.hasOwnProperty.call(u,a)?u[a]:a},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}},Vt(e),e.registerHelper=function(a,u,m){s.hasOwnProperty(a)||(s[a]=e[a]={_global:[]}),s[a][u]=m},e.registerGlobalHelper=function(a,u,m,x){e.registerHelper(a,u,x),s[a]._global.push({pred:m,val:x})}}function Ds(e,r,s,a,u){var m=r,x=s,_=se(e,r.line),C=u&&e.direction=="rtl"?-s:s;function L(){var Qe=r.line+C;return Qe<e.first||Qe>=e.first+e.size?!1:(r=new we(Qe,r.ch,r.sticky),_=se(e,Qe))}function Y(Qe){var Ue;if(a=="codepoint"){var nt=_.text.charCodeAt(r.ch+(s>0?0:-1));if(isNaN(nt))Ue=null;else{var ct=s>0?nt>=55296&&nt<56320:nt>=56320&&nt<57343;Ue=new we(r.line,Math.max(0,Math.min(_.text.length,r.ch+s*(ct?2:1))),-s)}}else u?Ue=Qb(e.cm,_,r,s):Ue=_s(_,r,s);if(Ue==null)if(!Qe&&L())r=Ss(u,e.cm,_,r.line,C);else return!1;else r=Ue;return!0}if(a=="char"||a=="codepoint")Y();else if(a=="column")Y(!0);else if(a=="word"||a=="group")for(var J=null,fe=a=="group",le=e.cm&&e.cm.getHelper(r,"wordChars"),ye=!0;!(s<0&&!Y(!ye));ye=!1){var Ee=_.text.charAt(r.ch)||`
`,Pe=X(Ee,le)?"w":fe&&Ee==`
`?"n":!fe||/\s/.test(Ee)?null:"p";if(fe&&!ye&&!Pe&&(Pe="s"),J&&J!=Pe){s<0&&(s=1,Y(),r.sticky="after");break}if(Pe&&(J=Pe),s>0&&!Y(!ye))break}var $e=$o(e,r,m,x,!0);return $(m,$e)&&($e.hitSide=!0),$e}function Pc(e,r,s,a){var u=e.doc,m=r.left,x;if(a=="page"){var _=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),C=Math.max(_-.5*Yn(e.display),3);x=(s>0?r.bottom:r.top)+s*C}else a=="line"&&(x=s>0?r.bottom+3:r.top-3);for(var L;L=es(e,m,x),!!L.outside;){if(s<0?x<=0:x>=u.height){L.hitSide=!0;break}x+=s*5}return L}var Ot=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Fe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ot.prototype.init=function(e){var r=this,s=this,a=s.cm,u=s.div=e.lineDiv;u.contentEditable=!0,Mc(u,a.options.spellcheck,a.options.autocorrect,a.options.autocapitalize);function m(_){for(var C=_.target;C;C=C.parentNode){if(C==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}lt(u,"paste",function(_){!m(_)||wt(a,_)||Dc(_,a)||h<=11&&setTimeout(rr(a,function(){return r.updateFromDOM()}),20)}),lt(u,"compositionstart",function(_){r.composing={data:_.data,done:!1}}),lt(u,"compositionupdate",function(_){r.composing||(r.composing={data:_.data,done:!1})}),lt(u,"compositionend",function(_){r.composing&&(_.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),lt(u,"touchstart",function(){return s.forceCompositionEnd()}),lt(u,"input",function(){r.composing||r.readFromDOMSoon()});function x(_){if(!(!m(_)||wt(a,_))){if(a.somethingSelected())Ko({lineWise:!1,text:a.getSelections()}),_.type=="cut"&&a.replaceSelection("",null,"cut");else if(a.options.lineWiseCopyCut){var C=Fc(a);Ko({lineWise:!0,text:C.text}),_.type=="cut"&&a.operation(function(){a.setSelections(C.ranges,0,qe),a.replaceSelection("",null,"cut")})}else return;if(_.clipboardData){_.clipboardData.clearData();var L=Wr.text.join(`
`);if(_.clipboardData.setData("Text",L),_.clipboardData.getData("Text")==L){_.preventDefault();return}}var Y=Oc(),J=Y.firstChild;a.display.lineSpace.insertBefore(Y,a.display.lineSpace.firstChild),J.value=Wr.text.join(`
`);var fe=P();ae(J),setTimeout(function(){a.display.lineSpace.removeChild(Y),fe.focus(),fe==u&&s.showPrimarySelection()},50)}}lt(u,"copy",x),lt(u,"cut",x)},Ot.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ot.prototype.prepareSelection=function(){var e=Su(this.cm,!1);return e.focus=P()==this.div,e},Ot.prototype.showSelection=function(e,r){!e||!this.cm.display.view.length||((e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ot.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ot.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,s=r.doc.sel.primary(),a=s.from(),u=s.to();if(r.display.viewTo==r.display.viewFrom||a.line>=r.display.viewTo||u.line<r.display.viewFrom){e.removeAllRanges();return}var m=Vo(r,e.anchorNode,e.anchorOffset),x=Vo(r,e.focusNode,e.focusOffset);if(!(m&&!m.bad&&x&&!x.bad&&D(ft(m,x),a)==0&&D(De(m,x),u)==0)){var _=r.display.view,C=a.line>=r.display.viewFrom&&Rc(r,a)||{node:_[0].measure.map[2],offset:0},L=u.line<r.display.viewTo&&Rc(r,u);if(!L){var Y=_[_.length-1].measure,J=Y.maps?Y.maps[Y.maps.length-1]:Y.map;L={node:J[J.length-1],offset:J[J.length-2]-J[J.length-3]}}if(!C||!L){e.removeAllRanges();return}var fe=e.rangeCount&&e.getRangeAt(0),le;try{le=H(C.node,C.offset,L.offset,L.node)}catch{}le&&(!n&&r.state.focused?(e.collapse(C.node,C.offset),le.collapsed||(e.removeAllRanges(),e.addRange(le))):(e.removeAllRanges(),e.addRange(le)),fe&&e.anchorNode==null?e.addRange(fe):n&&this.startGracePeriod()),this.rememberSelection()}},Ot.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ot.prototype.showMultipleSelections=function(e){q(this.cm.display.cursorDiv,e.cursors),q(this.cm.display.selectionDiv,e.selection)},Ot.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ot.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return Z(this.div,r)},Ot.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||P()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ot.prototype.blur=function(){this.div.blur()},Ot.prototype.getField=function(){return this.div},Ot.prototype.supportsTouch=function(){return!0},Ot.prototype.receivedFocus=function(){var e=this,r=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Ar(this.cm,function(){return r.cm.curOp.selectionChanged=!0});function s(){r.cm.state.focused&&(r.pollSelection(),r.polling.set(r.cm.options.pollInterval,s))}this.polling.set(this.cm.options.pollInterval,s)},Ot.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ot.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),r=this.cm;if(w&&y&&this.cm.display.gutterSpecs.length&&yx(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var s=Vo(r,e.anchorNode,e.anchorOffset),a=Vo(r,e.focusNode,e.focusOffset);s&&a&&Ar(r,function(){mr(r.doc,bn(s,a),qe),(s.bad||a.bad)&&(r.curOp.selectionChanged=!0)})}}},Ot.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,s=e.doc.sel.primary(),a=s.from(),u=s.to();if(a.ch==0&&a.line>e.firstLine()&&(a=we(a.line-1,se(e.doc,a.line-1).length)),u.ch==se(e.doc,u.line).text.length&&u.line<e.lastLine()&&(u=we(u.line+1,0)),a.line<r.viewFrom||u.line>r.viewTo-1)return!1;var m,x,_;a.line==r.viewFrom||(m=In(e,a.line))==0?(x=Ye(r.view[0].line),_=r.view[0].node):(x=Ye(r.view[m].line),_=r.view[m-1].node.nextSibling);var C=In(e,u.line),L,Y;if(C==r.view.length-1?(L=r.viewTo-1,Y=r.lineDiv.lastChild):(L=Ye(r.view[C+1].line)-1,Y=r.view[C+1].node.previousSibling),!_)return!1;for(var J=e.doc.splitLines(bx(e,_,Y,x,L)),fe=pe(e.doc,we(x,0),we(L,se(e.doc,L).text.length));J.length>1&&fe.length>1;)if(Re(J)==Re(fe))J.pop(),fe.pop(),L--;else if(J[0]==fe[0])J.shift(),fe.shift(),x++;else break;for(var le=0,ye=0,Ee=J[0],Pe=fe[0],$e=Math.min(Ee.length,Pe.length);le<$e&&Ee.charCodeAt(le)==Pe.charCodeAt(le);)++le;for(var Qe=Re(J),Ue=Re(fe),nt=Math.min(Qe.length-(J.length==1?le:0),Ue.length-(fe.length==1?le:0));ye<nt&&Qe.charCodeAt(Qe.length-ye-1)==Ue.charCodeAt(Ue.length-ye-1);)++ye;if(J.length==1&&fe.length==1&&x==a.line)for(;le&&le>a.ch&&Qe.charCodeAt(Qe.length-ye-1)==Ue.charCodeAt(Ue.length-ye-1);)le--,ye++;J[J.length-1]=Qe.slice(0,Qe.length-ye).replace(/^\u200b+/,""),J[0]=J[0].slice(le).replace(/\u200b+$/,"");var ct=we(x,le),ut=we(L,fe.length?Re(fe).length-ye:0);if(J.length>1||J[0]||D(ct,ut))return ni(e.doc,J,ct,ut,"+input"),!0},Ot.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ot.prototype.reset=function(){this.forceCompositionEnd()},Ot.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ot.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Ot.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ar(this.cm,function(){return kr(e.cm)})},Ot.prototype.setUneditable=function(e){e.contentEditable="false"},Ot.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||rr(this.cm,Ls)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ot.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ot.prototype.onContextMenu=function(){},Ot.prototype.resetPosition=function(){},Ot.prototype.needsContentAttribute=!0;function Rc(e,r){var s=Za(e,r.line);if(!s||s.hidden)return null;var a=se(e.doc,r.line),u=cu(s,a,r.line),m=Lt(a,e.doc.direction),x="left";if(m){var _=We(m,r.ch);x=_%2?"right":"left"}var C=hu(u.map,r.ch,x);return C.offset=C.collapse=="right"?C.end:C.start,C}function yx(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function li(e,r){return r&&(e.bad=!0),e}function bx(e,r,s,a,u){var m="",x=!1,_=e.doc.lineSeparator(),C=!1;function L(le){return function(ye){return ye.id==le}}function Y(){x&&(m+=_,C&&(m+=_),x=C=!1)}function J(le){le&&(Y(),m+=le)}function fe(le){if(le.nodeType==1){var ye=le.getAttribute("cm-text");if(ye){J(ye);return}var Ee=le.getAttribute("cm-marker"),Pe;if(Ee){var $e=e.findMarks(we(a,0),we(u+1,0),L(+Ee));$e.length&&(Pe=$e[0].find(0))&&J(pe(e.doc,Pe.from,Pe.to).join(_));return}if(le.getAttribute("contenteditable")=="false")return;var Qe=/^(pre|div|p|li|table|br)$/i.test(le.nodeName);if(!/^br$/i.test(le.nodeName)&&le.textContent.length==0)return;Qe&&Y();for(var Ue=0;Ue<le.childNodes.length;Ue++)fe(le.childNodes[Ue]);/^(pre|p)$/i.test(le.nodeName)&&(C=!0),Qe&&(x=!0)}else le.nodeType==3&&J(le.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;fe(r),r!=s;)r=r.nextSibling,C=!1;return m}function Vo(e,r,s){var a;if(r==e.display.lineDiv){if(a=e.display.lineDiv.childNodes[s],!a)return li(e.clipPos(we(e.display.viewTo-1)),!0);r=null,s=0}else for(a=r;;a=a.parentNode){if(!a||a==e.display.lineDiv)return null;if(a.parentNode&&a.parentNode==e.display.lineDiv)break}for(var u=0;u<e.display.view.length;u++){var m=e.display.view[u];if(m.node==a)return xx(m,r,s)}}function xx(e,r,s){var a=e.text.firstChild,u=!1;if(!r||!Z(a,r))return li(we(Ye(e.line),0),!0);if(r==a&&(u=!0,r=a.childNodes[s],s=0,!r)){var m=e.rest?Re(e.rest):e.line;return li(we(Ye(m),m.text.length),u)}var x=r.nodeType==3?r:null,_=r;for(!x&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(x=r.firstChild,s&&(s=x.nodeValue.length));_.parentNode!=a;)_=_.parentNode;var C=e.measure,L=C.maps;function Y(Pe,$e,Qe){for(var Ue=-1;Ue<(L?L.length:0);Ue++)for(var nt=Ue<0?C.map:L[Ue],ct=0;ct<nt.length;ct+=3){var ut=nt[ct+2];if(ut==Pe||ut==$e){var vt=Ye(Ue<0?e.line:e.rest[Ue]),Pt=nt[ct]+Qe;return(Qe<0||ut!=Pe)&&(Pt=nt[ct+(Qe?1:0)]),we(vt,Pt)}}}var J=Y(x,_,s);if(J)return li(J,u);for(var fe=_.nextSibling,le=x?x.nodeValue.length-s:0;fe;fe=fe.nextSibling){if(J=Y(fe,fe.firstChild,0),J)return li(we(J.line,J.ch-le),u);le+=fe.textContent.length}for(var ye=_.previousSibling,Ee=s;ye;ye=ye.previousSibling){if(J=Y(ye,ye.firstChild,-1),J)return li(we(J.line,J.ch+Ee),u);Ee+=ye.textContent.length}}var Wt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Fe,this.hasSelection=!1,this.composing=null};Wt.prototype.init=function(e){var r=this,s=this,a=this.cm;this.createField(e);var u=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),E&&(u.style.width="0px"),lt(u,"input",function(){o&&h>=9&&r.hasSelection&&(r.hasSelection=null),s.poll()}),lt(u,"paste",function(x){wt(a,x)||Dc(x,a)||(a.state.pasteIncoming=+new Date,s.fastPoll())});function m(x){if(!wt(a,x)){if(a.somethingSelected())Ko({lineWise:!1,text:a.getSelections()});else if(a.options.lineWiseCopyCut){var _=Fc(a);Ko({lineWise:!0,text:_.text}),x.type=="cut"?a.setSelections(_.ranges,null,qe):(s.prevInput="",u.value=_.text.join(`
`),ae(u))}else return;x.type=="cut"&&(a.state.cutIncoming=+new Date)}}lt(u,"cut",m),lt(u,"copy",m),lt(e.scroller,"paste",function(x){if(!(ln(e,x)||wt(a,x))){if(!u.dispatchEvent){a.state.pasteIncoming=+new Date,s.focus();return}var _=new Event("paste");_.clipboardData=x.clipboardData,u.dispatchEvent(_)}}),lt(e.lineSpace,"selectstart",function(x){ln(e,x)||kt(x)}),lt(u,"compositionstart",function(){var x=a.getCursor("from");s.composing&&s.composing.range.clear(),s.composing={start:x,range:a.markText(x,a.getCursor("to"),{className:"CodeMirror-composing"})}}),lt(u,"compositionend",function(){s.composing&&(s.poll(),s.composing.range.clear(),s.composing=null)})},Wt.prototype.createField=function(e){this.wrapper=Oc(),this.textarea=this.wrapper.firstChild},Wt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,s=e.doc,a=Su(e);if(e.options.moveInputWithCursor){var u=jr(e,s.sel.primary().head,"div"),m=r.wrapper.getBoundingClientRect(),x=r.lineDiv.getBoundingClientRect();a.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,u.top+x.top-m.top)),a.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,u.left+x.left-m.left))}return a},Wt.prototype.showSelection=function(e){var r=this.cm,s=r.display;q(s.cursorDiv,e.cursors),q(s.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var r=this.cm;if(r.somethingSelected()){this.prevInput="";var s=r.getSelection();this.textarea.value=s,r.state.focused&&ae(this.textarea),o&&h>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",o&&h>=9&&(this.hasSelection=null))}},Wt.prototype.getField=function(){return this.textarea},Wt.prototype.supportsTouch=function(){return!1},Wt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!I||P()!=this.textarea))try{this.textarea.focus()}catch{}},Wt.prototype.blur=function(){this.textarea.blur()},Wt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wt.prototype.receivedFocus=function(){this.slowPoll()},Wt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Wt.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function s(){var a=r.poll();!a&&!e?(e=!0,r.polling.set(60,s)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,s)},Wt.prototype.poll=function(){var e=this,r=this.cm,s=this.textarea,a=this.prevInput;if(this.contextMenuPending||!r.state.focused||oe(s)&&!a&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var u=s.value;if(u==a&&!r.somethingSelected())return!1;if(o&&h>=9&&this.hasSelection===u||S&&/[\uf700-\uf7ff]/.test(u))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var m=u.charCodeAt(0);if(m==8203&&!a&&(a="\u200B"),m==8666)return this.reset(),this.cm.execCommand("undo")}for(var x=0,_=Math.min(a.length,u.length);x<_&&a.charCodeAt(x)==u.charCodeAt(x);)++x;return Ar(r,function(){Ls(r,u.slice(x),a.length-x,null,e.composing?"*compose":null),u.length>1e3||u.indexOf(`
`)>-1?s.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},Wt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wt.prototype.onKeyPress=function(){o&&h>=9&&(this.hasSelection=null),this.fastPoll()},Wt.prototype.onContextMenu=function(e){var r=this,s=r.cm,a=s.display,u=r.textarea;r.contextMenuPending&&r.contextMenuPending();var m=Dn(s,e),x=a.scroller.scrollTop;if(!m||g)return;var _=s.options.resetSelectionOnContextMenu;_&&s.doc.sel.contains(m)==-1&&rr(s,mr)(s.doc,bn(m),qe);var C=u.style.cssText,L=r.wrapper.style.cssText,Y=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Y.top-5)+"px; left: "+(e.clientX-Y.left-5)+`px;
z-index: 1000; background: `+(o?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var J;f&&(J=window.scrollY),a.input.focus(),f&&window.scrollTo(null,J),a.input.reset(),s.somethingSelected()||(u.value=r.prevInput=" "),r.contextMenuPending=le,a.selForContextMenu=s.doc.sel,clearTimeout(a.detectingSelectAll);function fe(){if(u.selectionStart!=null){var Ee=s.somethingSelected(),Pe="\u200B"+(Ee?u.value:"");u.value="\u21DA",u.value=Pe,r.prevInput=Ee?"":"\u200B",u.selectionStart=1,u.selectionEnd=Pe.length,a.selForContextMenu=s.doc.sel}}function le(){if(r.contextMenuPending==le&&(r.contextMenuPending=!1,r.wrapper.style.cssText=L,u.style.cssText=C,o&&h<9&&a.scrollbars.setScrollTop(a.scroller.scrollTop=x),u.selectionStart!=null)){(!o||o&&h<9)&&fe();var Ee=0,Pe=function(){a.selForContextMenu==s.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&r.prevInput=="\u200B"?rr(s,ec)(s):Ee++<10?a.detectingSelectAll=setTimeout(Pe,500):(a.selForContextMenu=null,a.input.reset())};a.detectingSelectAll=setTimeout(Pe,200)}}if(o&&h>=9&&fe(),ee){Ir(e);var ye=function(){pt(window,"mouseup",ye),setTimeout(le,20)};lt(window,"mouseup",ye)}else setTimeout(le,50)},Wt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Wt.prototype.setUneditable=function(){},Wt.prototype.needsContentAttribute=!1;function wx(e,r){if(r=r?A(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 s=P();r.autofocus=s==e||e.getAttribute("autofocus")!=null&&s==document.body}function a(){e.value=_.getValue()}var u;if(e.form&&(lt(e.form,"submit",a),!r.leaveSubmitMethodAlone)){var m=e.form;u=m.submit;try{var x=m.submit=function(){a(),m.submit=u,m.submit(),m.submit=x}}catch{}}r.finishInit=function(C){C.save=a,C.getTextArea=function(){return e},C.toTextArea=function(){C.toTextArea=isNaN,a(),e.parentNode.removeChild(C.getWrapperElement()),e.style.display="",e.form&&(pt(e.form,"submit",a),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=u))}},e.style.display="none";var _=Nt(function(C){return e.parentNode.insertBefore(C,e.nextSibling)},r);return _}function kx(e){e.off=pt,e.on=lt,e.wheelEventPixels=Lb,e.Doc=_r,e.splitLines=ie,e.countColumn=be,e.findColumn=je,e.isWordChar=Se,e.Pass=ze,e.signal=rt,e.Line=Gn,e.changeEnd=xn,e.scrollbarModel=Du,e.Pos=we,e.cmpPos=D,e.modes=B,e.mimeModes=te,e.resolveMode=ve,e.getMode=Le,e.modeExtensions=Oe,e.extendMode=Ce,e.copyState=Ve,e.startState=mt,e.innerMode=St,e.commands=Vi,e.keyMap=cn,e.keyName=gc,e.isModifierKey=pc,e.lookupKey=oi,e.normalizeKeyMap=Zb,e.StringStream=G,e.SharedTextMarker=Wi,e.TextMarker=kn,e.LineWidget=Hi,e.e_preventDefault=kt,e.e_stopPropagation=st,e.e_stop=Ir,e.addClass=z,e.contains=Z,e.rmClass=W,e.keyNames=_n}hx(Nt),vx(Nt);var _x="iter insert remove copy getEditor constructor".split(" ");for(var Yo in _r.prototype)_r.prototype.hasOwnProperty(Yo)&&xe(_x,Yo)<0&&(Nt.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(_r.prototype[Yo]));return Vt(_r),Nt.inputStyles={textarea:Wt,contenteditable:Ot},Nt.defineMode=function(e){!Nt.defaults.mode&&e!="null"&&(Nt.defaults.mode=e),ce.apply(this,arguments)},Nt.defineMIME=me,Nt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Nt.defineMIME("text/plain","null"),Nt.defineExtension=function(e,r){Nt.prototype[e]=r},Nt.defineDocExtension=function(e,r){_r.prototype[e]=r},Nt.fromTextArea=wx,kx(Nt),Nt.version="5.65.1",Nt})});var Js=Me((po,Qs)=>{(function(i,t){typeof po=="object"&&typeof Qs=="object"?Qs.exports=t():typeof define=="function"&&define.amd?define([],t):typeof po=="object"?po.ClipboardJS=t():i.ClipboardJS=t()})(po,function(){return t={134:function(l,f,d){"use strict";d.d(f,{default:function(){return N}});var f=d(279),o=d.n(f),f=d(370),h=d.n(f),f=d(817),p=d.n(f);function y(O){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(O)}function g(O,j){for(var U=0;U<j.length;U++){var ee=j[U];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(O,ee.key,ee)}}var v=function(){function O(V){(function(W){if(!(W instanceof O))throw new TypeError("Cannot call a class as a function")})(this),this.resolveOptions(V),this.initSelection()}var j,U,ee;return j=O,(U=[{key:"resolveOptions",value:function(){var V=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};this.action=V.action,this.container=V.container,this.emitter=V.emitter,this.target=V.target,this.text=V.text,this.trigger=V.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var V=document.documentElement.getAttribute("dir")==="rtl";return this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[V?"right":"left"]="-9999px",V=window.pageYOffset||document.documentElement.scrollTop,this.fakeElem.style.top="".concat(V,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var V=this,W=this.createFakeElement();this.fakeHandlerCallback=function(){return V.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(W),this.selectedText=p()(W),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=p()(this.target),this.copyText()}},{key:"copyText",value:function(){var V;try{V=document.execCommand(this.action)}catch{V=!1}this.handleResult(V)}},{key:"handleResult",value:function(V){this.emitter.emit(V?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var V=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"copy";if(this._action=V,this._action!=="copy"&&this._action!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(V){if(V!==void 0){if(!V||y(V)!=="object"||V.nodeType!==1)throw new Error('Invalid "target" value, use a valid Element');if(this.action==="copy"&&V.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(this.action==="cut"&&(V.hasAttribute("readonly")||V.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);this._target=V}},get:function(){return this._target}}])&&g(j.prototype,U),ee&&g(j,ee),O}();function b(O){return(b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(O)}function k(O,j){for(var U=0;U<j.length;U++){var ee=j[U];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(O,ee.key,ee)}}function E(O,j){return(E=Object.setPrototypeOf||function(U,ee){return U.__proto__=ee,U})(O,j)}function w(O){var j=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var U,ee=I(O);return U=j?(U=I(this).constructor,Reflect.construct(ee,arguments,U)):ee.apply(this,arguments),ee=this,!(U=U)||b(U)!=="object"&&typeof U!="function"?function(V){if(V!==void 0)return V;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(ee):U}}function I(O){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(j){return j.__proto__||Object.getPrototypeOf(j)})(O)}function S(O,j){if(O="data-clipboard-".concat(O),j.hasAttribute(O))return j.getAttribute(O)}var N=function(){(function(W,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(K&&K.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),K&&E(W,K)})(V,o());var O,j,U,ee=w(V);function V(W,K){var q;return function(R){if(!(R instanceof V))throw new TypeError("Cannot call a class as a function")}(this),(q=ee.call(this)).resolveOptions(K),q.listenClick(W),q}return O=V,U=[{key:"isSupported",value:function(){var W=0<arguments.length&&arguments[0]!==void 0?arguments[0]:["copy","cut"],W=typeof W=="string"?[W]:W,K=!!document.queryCommandSupported;return W.forEach(function(q){K=K&&!!document.queryCommandSupported(q)}),K}}],(j=[{key:"resolveOptions",value:function(){var W=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof W.action=="function"?W.action:this.defaultAction,this.target=typeof W.target=="function"?W.target:this.defaultTarget,this.text=typeof W.text=="function"?W.text:this.defaultText,this.container=b(W.container)==="object"?W.container:document.body}},{key:"listenClick",value:function(W){var K=this;this.listener=h()(W,"click",function(q){return K.onClick(q)})}},{key:"onClick",value:function(W){W=W.delegateTarget||W.currentTarget,this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new v({action:this.action(W),target:this.target(W),text:this.text(W),container:this.container,trigger:W,emitter:this})}},{key:"defaultAction",value:function(W){return S("action",W)}},{key:"defaultTarget",value:function(W){if(W=S("target",W),W)return document.querySelector(W)}},{key:"defaultText",value:function(W){return S("text",W)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}])&&k(O.prototype,j),U&&k(O,U),V}()},828:function(l){var c;typeof Element=="undefined"||Element.prototype.matches||((c=Element.prototype).matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector),l.exports=function(d,o){for(;d&&d.nodeType!==9;){if(typeof d.matches=="function"&&d.matches(o))return d;d=d.parentNode}}},438:function(l,c,d){var o=d(828);function h(f,p,y,g,v){var b=function(k,E,w,I){return function(S){S.delegateTarget=o(S.target,E),S.delegateTarget&&I.call(k,S)}}.apply(this,arguments);return f.addEventListener(y,b,v),{destroy:function(){f.removeEventListener(y,b,v)}}}l.exports=function(f,p,y,g,v){return typeof f.addEventListener=="function"?h.apply(null,arguments):typeof y=="function"?h.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(b){return h(b,p,y,g,v)}))}},879:function(l,c){c.node=function(d){return d!==void 0&&d instanceof HTMLElement&&d.nodeType===1},c.nodeList=function(d){var o=Object.prototype.toString.call(d);return d!==void 0&&(o==="[object NodeList]"||o==="[object HTMLCollection]")&&"length"in d&&(d.length===0||c.node(d[0]))},c.string=function(d){return typeof d=="string"||d instanceof String},c.fn=function(d){return Object.prototype.toString.call(d)==="[object Function]"}},370:function(l,c,d){var o=d(879),h=d(438);l.exports=function(f,p,y){if(!f&&!p&&!y)throw new Error("Missing required arguments");if(!o.string(p))throw new TypeError("Second argument must be a String");if(!o.fn(y))throw new TypeError("Third argument must be a Function");if(o.node(f))return E=p,w=y,(k=f).addEventListener(E,w),{destroy:function(){k.removeEventListener(E,w)}};if(o.nodeList(f))return g=f,v=p,b=y,Array.prototype.forEach.call(g,function(I){I.addEventListener(v,b)}),{destroy:function(){Array.prototype.forEach.call(g,function(I){I.removeEventListener(v,b)})}};if(o.string(f))return f=f,p=p,y=y,h(document.body,f,p,y);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var g,v,b,k,E,w}},817:function(l){l.exports=function(c){var d,o=c.nodeName==="SELECT"?(c.focus(),c.value):c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"?((d=c.hasAttribute("readonly"))||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),d||c.removeAttribute("readonly"),c.value):(c.hasAttribute("contenteditable")&&c.focus(),o=window.getSelection(),(d=document.createRange()).selectNodeContents(c),o.removeAllRanges(),o.addRange(d),o.toString());return o}},279:function(l){function c(){}c.prototype={on:function(d,o,h){var f=this.e||(this.e={});return(f[d]||(f[d]=[])).push({fn:o,ctx:h}),this},once:function(d,o,h){var f=this;function p(){f.off(d,p),o.apply(h,arguments)}return p._=o,this.on(d,p,h)},emit:function(d){for(var o=[].slice.call(arguments,1),h=((this.e||(this.e={}))[d]||[]).slice(),f=0,p=h.length;f<p;f++)h[f].fn.apply(h[f].ctx,o);return this},off:function(d,o){var h=this.e||(this.e={}),f=h[d],p=[];if(f&&o)for(var y=0,g=f.length;y<g;y++)f[y].fn!==o&&f[y].fn._!==o&&p.push(f[y]);return p.length?h[d]=p:delete h[d],this}},l.exports=c,l.exports.TinyEmitter=c}},n={},i.n=function(l){var c=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(c,{a:c}),c},i.d=function(l,c){for(var d in c)i.o(c,d)&&!i.o(l,d)&&Object.defineProperty(l,d,{enumerable:!0,get:c[d]})},i.o=function(l,c){return Object.prototype.hasOwnProperty.call(l,c)},i(134).default;function i(l){if(n[l])return n[l].exports;var c=n[l]={exports:{}};return t[l](c,c.exports,i),c.exports}var t,n})});var el=Me((zf,Nf)=>{(function(i){typeof zf=="object"&&typeof Nf=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("css",function(V,W){var K=W.inline;W.propertyKeywords||(W=i.resolveMode("text/css"));var q=V.indentUnit,R=W.tokenHooks,T=W.documentTypes||{},H=W.mediaTypes||{},Z=W.mediaFeatures||{},P=W.mediaValueKeywords||{},z=W.propertyKeywords||{},ne=W.nonStandardPropertyKeywords||{},ae=W.fontProperties||{},F=W.counterDescriptors||{},A=W.colorKeywords||{},be=W.valueKeywords||{},Fe=W.allowNested,xe=W.lineComment,_e=W.supportsAtComponent===!0,ze=V.highlightNonStandardPropertyKeywords!==!1,qe,ge;function ke(X,de){return qe=de,X}function je(X,de){var ue=X.next();if(R[ue]){var it=R[ue](X,de);if(it!==!1)return it}if(ue=="@")return X.eatWhile(/[\w\\\-]/),ke("def",X.current());if(ue=="="||(ue=="~"||ue=="|")&&X.eat("="))return ke(null,"compare");if(ue=='"'||ue=="'")return de.tokenize=at(ue),de.tokenize(X,de);if(ue=="#")return X.eatWhile(/[\w\\\-]/),ke("atom","hash");if(ue=="!")return X.match(/^\s*\w*/),ke("keyword","important");if(/\d/.test(ue)||ue=="."&&X.eat(/\d/))return X.eatWhile(/[\w.%]/),ke("number","unit");if(ue==="-"){if(/[\d.]/.test(X.peek()))return X.eatWhile(/[\w.%]/),ke("number","unit");if(X.match(/^-[\w\\\-]*/))return X.eatWhile(/[\w\\\-]/),X.match(/^\s*:/,!1)?ke("variable-2","variable-definition"):ke("variable-2","variable");if(X.match(/^\w+-/))return ke("meta","meta")}else return/[,+>*\/]/.test(ue)?ke(null,"select-op"):ue=="."&&X.match(/^-?[_a-z][_a-z0-9-]*/i)?ke("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(ue)?ke(null,ue):X.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(X.current())&&(de.tokenize=gt),ke("variable callee","variable")):/[\w\\\-]/.test(ue)?(X.eatWhile(/[\w\\\-]/),ke("property","word")):ke(null,null)}function at(X){return function(de,ue){for(var it=!1,Ne;(Ne=de.next())!=null;){if(Ne==X&&!it){X==")"&&de.backUp(1);break}it=!it&&Ne=="\\"}return(Ne==X||!it&&X!=")")&&(ue.tokenize=null),ke("string","string")}}function gt(X,de){return X.next(),X.match(/^\s*[\"\')]/,!1)?de.tokenize=null:de.tokenize=at(")"),ke(null,"(")}function Re(X,de,ue){this.type=X,this.indent=de,this.prev=ue}function Ie(X,de,ue,it){return X.context=new Re(ue,de.indentation()+(it===!1?0:q),X.context),ue}function Be(X){return X.context.prev&&(X.context=X.context.prev),X.context.type}function Ke(X,de,ue){return Se[ue.context.type](X,de,ue)}function He(X,de,ue,it){for(var Ne=it||1;Ne>0;Ne--)ue.context=ue.context.prev;return Ke(X,de,ue)}function Je(X){var de=X.current().toLowerCase();be.hasOwnProperty(de)?ge="atom":A.hasOwnProperty(de)?ge="keyword":ge="variable"}var Se={};return Se.top=function(X,de,ue){if(X=="{")return Ie(ue,de,"block");if(X=="}"&&ue.context.prev)return Be(ue);if(_e&&/@component/i.test(X))return Ie(ue,de,"atComponentBlock");if(/^@(-moz-)?document$/i.test(X))return Ie(ue,de,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(X))return Ie(ue,de,"atBlock");if(/^@(font-face|counter-style)/i.test(X))return ue.stateArg=X,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(X))return"keyframes";if(X&&X.charAt(0)=="@")return Ie(ue,de,"at");if(X=="hash")ge="builtin";else if(X=="word")ge="tag";else{if(X=="variable-definition")return"maybeprop";if(X=="interpolation")return Ie(ue,de,"interpolation");if(X==":")return"pseudo";if(Fe&&X=="(")return Ie(ue,de,"parens")}return ue.context.type},Se.block=function(X,de,ue){if(X=="word"){var it=de.current().toLowerCase();return z.hasOwnProperty(it)?(ge="property","maybeprop"):ne.hasOwnProperty(it)?(ge=ze?"string-2":"property","maybeprop"):Fe?(ge=de.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(ge+=" error","maybeprop")}else return X=="meta"?"block":!Fe&&(X=="hash"||X=="qualifier")?(ge="error","block"):Se.top(X,de,ue)},Se.maybeprop=function(X,de,ue){return X==":"?Ie(ue,de,"prop"):Ke(X,de,ue)},Se.prop=function(X,de,ue){if(X==";")return Be(ue);if(X=="{"&&Fe)return Ie(ue,de,"propBlock");if(X=="}"||X=="{")return He(X,de,ue);if(X=="(")return Ie(ue,de,"parens");if(X=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(de.current()))ge+=" error";else if(X=="word")Je(de);else if(X=="interpolation")return Ie(ue,de,"interpolation");return"prop"},Se.propBlock=function(X,de,ue){return X=="}"?Be(ue):X=="word"?(ge="property","maybeprop"):ue.context.type},Se.parens=function(X,de,ue){return X=="{"||X=="}"?He(X,de,ue):X==")"?Be(ue):X=="("?Ie(ue,de,"parens"):X=="interpolation"?Ie(ue,de,"interpolation"):(X=="word"&&Je(de),"parens")},Se.pseudo=function(X,de,ue){return X=="meta"?"pseudo":X=="word"?(ge="variable-3",ue.context.type):Ke(X,de,ue)},Se.documentTypes=function(X,de,ue){return X=="word"&&T.hasOwnProperty(de.current())?(ge="tag",ue.context.type):Se.atBlock(X,de,ue)},Se.atBlock=function(X,de,ue){if(X=="(")return Ie(ue,de,"atBlock_parens");if(X=="}"||X==";")return He(X,de,ue);if(X=="{")return Be(ue)&&Ie(ue,de,Fe?"block":"top");if(X=="interpolation")return Ie(ue,de,"interpolation");if(X=="word"){var it=de.current().toLowerCase();it=="only"||it=="not"||it=="and"||it=="or"?ge="keyword":H.hasOwnProperty(it)?ge="attribute":Z.hasOwnProperty(it)?ge="property":P.hasOwnProperty(it)?ge="keyword":z.hasOwnProperty(it)?ge="property":ne.hasOwnProperty(it)?ge=ze?"string-2":"property":be.hasOwnProperty(it)?ge="atom":A.hasOwnProperty(it)?ge="keyword":ge="error"}return ue.context.type},Se.atComponentBlock=function(X,de,ue){return X=="}"?He(X,de,ue):X=="{"?Be(ue)&&Ie(ue,de,Fe?"block":"top",!1):(X=="word"&&(ge="error"),ue.context.type)},Se.atBlock_parens=function(X,de,ue){return X==")"?Be(ue):X=="{"||X=="}"?He(X,de,ue,2):Se.atBlock(X,de,ue)},Se.restricted_atBlock_before=function(X,de,ue){return X=="{"?Ie(ue,de,"restricted_atBlock"):X=="word"&&ue.stateArg=="@counter-style"?(ge="variable","restricted_atBlock_before"):Ke(X,de,ue)},Se.restricted_atBlock=function(X,de,ue){return X=="}"?(ue.stateArg=null,Be(ue)):X=="word"?(ue.stateArg=="@font-face"&&!ae.hasOwnProperty(de.current().toLowerCase())||ue.stateArg=="@counter-style"&&!F.hasOwnProperty(de.current().toLowerCase())?ge="error":ge="property","maybeprop"):"restricted_atBlock"},Se.keyframes=function(X,de,ue){return X=="word"?(ge="variable","keyframes"):X=="{"?Ie(ue,de,"top"):Ke(X,de,ue)},Se.at=function(X,de,ue){return X==";"?Be(ue):X=="{"||X=="}"?He(X,de,ue):(X=="word"?ge="tag":X=="hash"&&(ge="builtin"),"at")},Se.interpolation=function(X,de,ue){return X=="}"?Be(ue):X=="{"||X==";"?He(X,de,ue):(X=="word"?ge="variable":X!="variable"&&X!="("&&X!=")"&&(ge="error"),"interpolation")},{startState:function(X){return{tokenize:null,state:K?"block":"top",stateArg:null,context:new Re(K?"block":"top",X||0,null)}},token:function(X,de){if(!de.tokenize&&X.eatSpace())return null;var ue=(de.tokenize||je)(X,de);return ue&&typeof ue=="object"&&(qe=ue[1],ue=ue[0]),ge=ue,qe!="comment"&&(de.state=Se[de.state](qe,X,de)),ge},indent:function(X,de){var ue=X.context,it=de&&de.charAt(0),Ne=ue.indent;return ue.type=="prop"&&(it=="}"||it==")")&&(ue=ue.prev),ue.prev&&(it=="}"&&(ue.type=="block"||ue.type=="top"||ue.type=="interpolation"||ue.type=="restricted_atBlock")?(ue=ue.prev,Ne=ue.indent):(it==")"&&(ue.type=="parens"||ue.type=="atBlock_parens")||it=="{"&&(ue.type=="at"||ue.type=="atBlock"))&&(Ne=Math.max(0,ue.indent-q))),Ne},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:xe,fold:"brace"}});function t(V){for(var W={},K=0;K<V.length;++K)W[V[K].toLowerCase()]=!0;return W}var n=["domain","regexp","url","url-prefix"],l=t(n),c=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],d=t(c),o=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],h=t(o),f=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],p=t(f),y=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],g=t(y),v=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],b=t(v),k=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],E=t(k),w=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],I=t(w),S=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],N=t(S),O=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],j=t(O),U=n.concat(c).concat(o).concat(f).concat(y).concat(v).concat(S).concat(O);i.registerHelper("hintWords","css",U);function ee(V,W){for(var K=!1,q;(q=V.next())!=null;){if(K&&q=="/"){W.tokenize=null;break}K=q=="*"}return["comment","comment"]}i.defineMIME("text/css",{documentTypes:l,mediaTypes:d,mediaFeatures:h,mediaValueKeywords:p,propertyKeywords:g,nonStandardPropertyKeywords:b,fontProperties:E,counterDescriptors:I,colorKeywords:N,valueKeywords:j,tokenHooks:{"/":function(V,W){return V.eat("*")?(W.tokenize=ee,ee(V,W)):!1}},name:"css"}),i.defineMIME("text/x-scss",{mediaTypes:d,mediaFeatures:h,mediaValueKeywords:p,propertyKeywords:g,nonStandardPropertyKeywords:b,colorKeywords:N,valueKeywords:j,fontProperties:E,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(V,W){return V.eat("/")?(V.skipToEnd(),["comment","comment"]):V.eat("*")?(W.tokenize=ee,ee(V,W)):["operator","operator"]},":":function(V){return V.match(/^\s*\{/,!1)?[null,null]:!1},$:function(V){return V.match(/^[\w-]+/),V.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(V){return V.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),i.defineMIME("text/x-less",{mediaTypes:d,mediaFeatures:h,mediaValueKeywords:p,propertyKeywords:g,nonStandardPropertyKeywords:b,colorKeywords:N,valueKeywords:j,fontProperties:E,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(V,W){return V.eat("/")?(V.skipToEnd(),["comment","comment"]):V.eat("*")?(W.tokenize=ee,ee(V,W)):["operator","operator"]},"@":function(V){return V.eat("{")?[null,"interpolation"]:V.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(V.eatWhile(/[\w\\\-]/),V.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),i.defineMIME("text/x-gss",{documentTypes:l,mediaTypes:d,mediaFeatures:h,propertyKeywords:g,nonStandardPropertyKeywords:b,fontProperties:E,counterDescriptors:I,colorKeywords:N,valueKeywords:j,supportsAtComponent:!0,tokenHooks:{"/":function(V,W){return V.eat("*")?(W.tokenize=ee,ee(V,W)):!1}},name:"css",helperType:"gss"})})});var tl=Me((Bf,qf)=>{(function(i){typeof Bf=="object"&&typeof qf=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";function t(P,z,ne,ae,F,A){this.indented=P,this.column=z,this.type=ne,this.info=ae,this.align=F,this.prev=A}function n(P,z,ne,ae){var F=P.indented;return P.context&&P.context.type=="statement"&&ne!="statement"&&(F=P.context.indented),P.context=new t(F,z,ne,ae,null,P.context)}function l(P){var z=P.context.type;return(z==")"||z=="]"||z=="}")&&(P.indented=P.context.indented),P.context=P.context.prev}function c(P,z,ne){if(z.prevToken=="variable"||z.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(P.string.slice(0,ne))||z.typeAtEndOfLine&&P.column()==P.indentation())return!0}function d(P){for(;;){if(!P||P.type=="top")return!0;if(P.type=="}"&&P.prev.info!="namespace")return!1;P=P.prev}}i.defineMode("clike",function(P,z){var ne=P.indentUnit,ae=z.statementIndentUnit||ne,F=z.dontAlignCalls,A=z.keywords||{},be=z.types||{},Fe=z.builtin||{},xe=z.blockKeywords||{},_e=z.defKeywords||{},ze=z.atoms||{},qe=z.hooks||{},ge=z.multiLineStrings,ke=z.indentStatements!==!1,je=z.indentSwitch!==!1,at=z.namespaceSeparator,gt=z.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Re=z.numberStart||/[\d\.]/,Ie=z.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Be=z.isOperatorChar||/[+\-*&%=<>!?|\/]/,Ke=z.isIdentifierChar||/[\w\$_\xa1-\uffff]/,He=z.isReservedIdentifier||!1,Je,Se;function X(Ne,ot){var Xe=Ne.next();if(qe[Xe]){var et=qe[Xe](Ne,ot);if(et!==!1)return et}if(Xe=='"'||Xe=="'")return ot.tokenize=de(Xe),ot.tokenize(Ne,ot);if(Re.test(Xe)){if(Ne.backUp(1),Ne.match(Ie))return"number";Ne.next()}if(gt.test(Xe))return Je=Xe,null;if(Xe=="/"){if(Ne.eat("*"))return ot.tokenize=ue,ue(Ne,ot);if(Ne.eat("/"))return Ne.skipToEnd(),"comment"}if(Be.test(Xe)){for(;!Ne.match(/^\/[\/*]/,!1)&&Ne.eat(Be););return"operator"}if(Ne.eatWhile(Ke),at)for(;Ne.match(at);)Ne.eatWhile(Ke);var We=Ne.current();return h(A,We)?(h(xe,We)&&(Je="newstatement"),h(_e,We)&&(Se=!0),"keyword"):h(be,We)?"type":h(Fe,We)||He&&He(We)?(h(xe,We)&&(Je="newstatement"),"builtin"):h(ze,We)?"atom":"variable"}function de(Ne){return function(ot,Xe){for(var et=!1,We,$t=!1;(We=ot.next())!=null;){if(We==Ne&&!et){$t=!0;break}et=!et&&We=="\\"}return($t||!(et||ge))&&(Xe.tokenize=null),"string"}}function ue(Ne,ot){for(var Xe=!1,et;et=Ne.next();){if(et=="/"&&Xe){ot.tokenize=null;break}Xe=et=="*"}return"comment"}function it(Ne,ot){z.typeFirstDefinitions&&Ne.eol()&&d(ot.context)&&(ot.typeAtEndOfLine=c(Ne,ot,Ne.pos))}return{startState:function(Ne){return{tokenize:null,context:new t((Ne||0)-ne,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(Ne,ot){var Xe=ot.context;if(Ne.sol()&&(Xe.align==null&&(Xe.align=!1),ot.indented=Ne.indentation(),ot.startOfLine=!0),Ne.eatSpace())return it(Ne,ot),null;Je=Se=null;var et=(ot.tokenize||X)(Ne,ot);if(et=="comment"||et=="meta")return et;if(Xe.align==null&&(Xe.align=!0),Je==";"||Je==":"||Je==","&&Ne.match(/^\s*(?:\/\/.*)?$/,!1))for(;ot.context.type=="statement";)l(ot);else if(Je=="{")n(ot,Ne.column(),"}");else if(Je=="[")n(ot,Ne.column(),"]");else if(Je=="(")n(ot,Ne.column(),")");else if(Je=="}"){for(;Xe.type=="statement";)Xe=l(ot);for(Xe.type=="}"&&(Xe=l(ot));Xe.type=="statement";)Xe=l(ot)}else Je==Xe.type?l(ot):ke&&((Xe.type=="}"||Xe.type=="top")&&Je!=";"||Xe.type=="statement"&&Je=="newstatement")&&n(ot,Ne.column(),"statement",Ne.current());if(et=="variable"&&(ot.prevToken=="def"||z.typeFirstDefinitions&&c(Ne,ot,Ne.start)&&d(ot.context)&&Ne.match(/^\s*\(/,!1))&&(et="def"),qe.token){var We=qe.token(Ne,ot,et);We!==void 0&&(et=We)}return et=="def"&&z.styleDefs===!1&&(et="variable"),ot.startOfLine=!1,ot.prevToken=Se?"def":et||Je,it(Ne,ot),et},indent:function(Ne,ot){if(Ne.tokenize!=X&&Ne.tokenize!=null||Ne.typeAtEndOfLine)return i.Pass;var Xe=Ne.context,et=ot&&ot.charAt(0),We=et==Xe.type;if(Xe.type=="statement"&&et=="}"&&(Xe=Xe.prev),z.dontIndentStatements)for(;Xe.type=="statement"&&z.dontIndentStatements.test(Xe.info);)Xe=Xe.prev;if(qe.indent){var $t=qe.indent(Ne,Xe,ot,ne);if(typeof $t=="number")return $t}var Lt=Xe.prev&&Xe.prev.info=="switch";if(z.allmanIndentation&&/[{(]/.test(et)){for(;Xe.type!="top"&&Xe.type!="}";)Xe=Xe.prev;return Xe.indented}return Xe.type=="statement"?Xe.indented+(et=="{"?0:ae):Xe.align&&(!F||Xe.type!=")")?Xe.column+(We?0:1):Xe.type==")"&&!We?Xe.indented+ae:Xe.indented+(We?0:ne)+(!We&&Lt&&!/^(?:case|default)\b/.test(ot)?ne:0)},electricInput:je?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function o(P){for(var z={},ne=P.split(" "),ae=0;ae<ne.length;++ae)z[ne[ae]]=!0;return z}function h(P,z){return typeof P=="function"?P(z):P.propertyIsEnumerable(z)}var f="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",p="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",y="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",g="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",v=o("int long char short double float unsigned signed void bool"),b=o("SEL instancetype id Class Protocol BOOL");function k(P){return h(v,P)||/.+_t$/.test(P)}function E(P){return k(P)||h(b,P)}var w="case do else for if switch while struct enum union",I="struct enum union";function S(P,z){if(!z.startOfLine)return!1;for(var ne,ae=null;ne=P.peek();){if(ne=="\\"&&P.match(/^.$/)){ae=S;break}else if(ne=="/"&&P.match(/^\/[\/\*]/,!1))break;P.next()}return z.tokenize=ae,"meta"}function N(P,z){return z.prevToken=="type"?"type":!1}function O(P){return!P||P.length<2||P[0]!="_"?!1:P[1]=="_"||P[1]!==P[1].toLowerCase()}function j(P){return P.eatWhile(/[\w\.']/),"number"}function U(P,z){if(P.backUp(1),P.match(/^(?:R|u8R|uR|UR|LR)/)){var ne=P.match(/^"([^\s\\()]{0,16})\(/);return ne?(z.cpp11RawStringDelim=ne[1],z.tokenize=W,W(P,z)):!1}return P.match(/^(?:u8|u|U|L)/)?P.match(/^["']/,!1)?"string":!1:(P.next(),!1)}function ee(P){var z=/(\w+)::~?(\w+)$/.exec(P);return z&&z[1]==z[2]}function V(P,z){for(var ne;(ne=P.next())!=null;)if(ne=='"'&&!P.eat('"')){z.tokenize=null;break}return"string"}function W(P,z){var ne=z.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),ae=P.match(new RegExp(".*?\\)"+ne+'"'));return ae?z.tokenize=null:P.skipToEnd(),"string"}function K(P,z){typeof P=="string"&&(P=[P]);var ne=[];function ae(A){if(A)for(var be in A)A.hasOwnProperty(be)&&ne.push(be)}ae(z.keywords),ae(z.types),ae(z.builtin),ae(z.atoms),ne.length&&(z.helperType=P[0],i.registerHelper("hintWords",P[0],ne));for(var F=0;F<P.length;++F)i.defineMIME(P[F],z)}K(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:o(f),types:k,blockKeywords:o(w),defKeywords:o(I),typeFirstDefinitions:!0,atoms:o("NULL true false"),isReservedIdentifier:O,hooks:{"#":S,"*":N},modeProps:{fold:["brace","include"]}}),K(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:o(f+" "+p),types:k,blockKeywords:o(w+" class try catch"),defKeywords:o(I+" class namespace"),typeFirstDefinitions:!0,atoms:o("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:O,hooks:{"#":S,"*":N,u:U,U,L:U,R:U,"0":j,"1":j,"2":j,"3":j,"4":j,"5":j,"6":j,"7":j,"8":j,"9":j,token:function(P,z,ne){if(ne=="variable"&&P.peek()=="("&&(z.prevToken==";"||z.prevToken==null||z.prevToken=="}")&&ee(P.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),K("text/x-java",{name:"clike",keywords:o("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:o("var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:o("catch class do else finally for if switch try while"),defKeywords:o("class interface enum @interface"),typeFirstDefinitions:!0,atoms:o("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(P){return P.match("interface",!1)?!1:(P.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),K("text/x-csharp",{name:"clike",keywords:o("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:o("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:o("catch class do else finally for foreach if struct switch try while"),defKeywords:o("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"@":function(P,z){return P.eat('"')?(z.tokenize=V,V(P,z)):(P.eatWhile(/[\w\$_]/),"meta")}}});function q(P,z){for(var ne=!1;!P.eol();){if(!ne&&P.match('"""')){z.tokenize=null;break}ne=P.next()=="\\"&&!ne}return"string"}function R(P){return function(z,ne){for(var ae;ae=z.next();)if(ae=="*"&&z.eat("/"))if(P==1){ne.tokenize=null;break}else return ne.tokenize=R(P-1),ne.tokenize(z,ne);else if(ae=="/"&&z.eat("*"))return ne.tokenize=R(P+1),ne.tokenize(z,ne);return"comment"}}K("text/x-scala",{name:"clike",keywords:o("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:o("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector 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"),multiLineStrings:!0,blockKeywords:o("catch class enum do else finally for forSome if match switch try while"),defKeywords:o("class enum def object package trait type val var"),atoms:o("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(P){return P.eatWhile(/[\w\$_]/),"meta"},'"':function(P,z){return P.match('""')?(z.tokenize=q,z.tokenize(P,z)):!1},"'":function(P){return P.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(P,z){var ne=z.context;return ne.type=="}"&&ne.align&&P.eat(">")?(z.context=new t(ne.indented,ne.column,ne.type,ne.info,null,ne.prev),"operator"):!1},"/":function(P,z){return P.eat("*")?(z.tokenize=R(1),z.tokenize(P,z)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function T(P){return function(z,ne){for(var ae=!1,F,A=!1;!z.eol();){if(!P&&!ae&&z.match('"')){A=!0;break}if(P&&z.match('"""')){A=!0;break}F=z.next(),!ae&&F=="$"&&z.match("{")&&z.skipTo("}"),ae=!ae&&F=="\\"&&!P}return(A||!P)&&(ne.tokenize=null),"string"}}K("text/x-kotlin",{name:"clike",keywords:o("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 value"),types:o("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:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object interface fun"),atoms:o("true false null this"),hooks:{"@":function(P){return P.eatWhile(/[\w\$_]/),"meta"},"*":function(P,z){return z.prevToken=="."?"variable":"operator"},'"':function(P,z){return z.tokenize=T(P.match('""')),z.tokenize(P,z)},"/":function(P,z){return P.eat("*")?(z.tokenize=R(1),z.tokenize(P,z)):!1},indent:function(P,z,ne,ae){var F=ne&&ne.charAt(0);if((P.prevToken=="}"||P.prevToken==")")&&ne=="")return P.indented;if(P.prevToken=="operator"&&ne!="}"&&P.context.type!="}"||P.prevToken=="variable"&&F=="."||(P.prevToken=="}"||P.prevToken==")")&&F==".")return ae*2+z.indented;if(z.align&&z.type=="}")return z.indented+(P.context.type==(ne||"").charAt(0)?0:ae)}},modeProps:{closeBrackets:{triples:'"'}}}),K(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("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:o("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_TextureMatrixTranspose 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:{"#":S},modeProps:{fold:["brace","include"]}}),K("text/x-nesc",{name:"clike",keywords:o(f+" 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:k,blockKeywords:o(w),atoms:o("null true false"),hooks:{"#":S},modeProps:{fold:["brace","include"]}}),K("text/x-objectivec",{name:"clike",keywords:o(f+" "+y),types:E,builtin:o(g),blockKeywords:o(w+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:o(I+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:o("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:O,hooks:{"#":S,"*":N},modeProps:{fold:["brace","include"]}}),K("text/x-objectivec++",{name:"clike",keywords:o(f+" "+y+" "+p),types:E,builtin:o(g),blockKeywords:o(w+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:o(I+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:o("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:O,hooks:{"#":S,"*":N,u:U,U,L:U,R:U,"0":j,"1":j,"2":j,"3":j,"4":j,"5":j,"6":j,"7":j,"8":j,"9":j,token:function(P,z,ne){if(ne=="variable"&&P.peek()=="("&&(z.prevToken==";"||z.prevToken==null||z.prevToken=="}")&&ee(P.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),K("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:k,blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"#":S},modeProps:{fold:["brace","include"]}});var H=null;function Z(P){return function(z,ne){for(var ae=!1,F,A=!1;!z.eol();){if(!ae&&z.match('"')&&(P=="single"||z.match('""'))){A=!0;break}if(!ae&&z.match("``")){H=Z(P),A=!0;break}F=z.next(),ae=P=="single"&&!ae&&F=="\\"}return A&&(ne.tokenize=null),"string"}}K("text/x-ceylon",{name:"clike",keywords:o("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(P){var z=P.charAt(0);return z===z.toUpperCase()&&z!==z.toLowerCase()},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("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:o("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(P){return P.eatWhile(/[\w\$_]/),"meta"},'"':function(P,z){return z.tokenize=Z(P.match('""')?"triple":"single"),z.tokenize(P,z)},"`":function(P,z){return!H||!P.match("`")?!1:(z.tokenize=H,H=null,z.tokenize(P,z))},"'":function(P){return P.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(P,z,ne){if((ne=="variable"||ne=="type")&&z.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var jf=Me(($f,Uf)=>{(function(i){typeof $f=="object"&&typeof Uf=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("diff",function(){var t={"+":"positive","-":"negative","@":"meta"};return{token:function(n){var l=n.string.search(/[\t ]+?$/);if(!n.sol()||l===0)return n.skipToEnd(),("error "+(t[n.string.charAt(0)]||"")).replace(/ $/,"");var c=t[n.peek()]||n.skipToEnd();return l===-1?n.skipToEnd():n.pos=l,c}}}),i.defineMIME("text/x-diff","diff")})});var Gf=Me((Hf,Wf)=>{(function(i){typeof Hf=="object"&&typeof Wf=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("fortran",function(){function t(p){for(var y={},g=0;g<p.length;++g)y[p[g]]=!0;return y}var n=t(["abstract","accept","allocatable","allocate","array","assign","asynchronous","backspace","bind","block","byte","call","case","class","close","common","contains","continue","cycle","data","deallocate","decode","deferred","dimension","do","elemental","else","encode","end","endif","entry","enumerator","equivalence","exit","external","extrinsic","final","forall","format","function","generic","go","goto","if","implicit","import","include","inquire","intent","interface","intrinsic","module","namelist","non_intrinsic","non_overridable","none","nopass","nullify","open","optional","options","parameter","pass","pause","pointer","print","private","program","protected","public","pure","read","recursive","result","return","rewind","save","select","sequence","stop","subroutine","target","then","to","type","use","value","volatile","where","while","write"]),l=t(["abort","abs","access","achar","acos","adjustl","adjustr","aimag","aint","alarm","all","allocated","alog","amax","amin","amod","and","anint","any","asin","associated","atan","besj","besjn","besy","besyn","bit_size","btest","cabs","ccos","ceiling","cexp","char","chdir","chmod","clog","cmplx","command_argument_count","complex","conjg","cos","cosh","count","cpu_time","cshift","csin","csqrt","ctime","c_funloc","c_loc","c_associated","c_null_ptr","c_null_funptr","c_f_pointer","c_null_char","c_alert","c_backspace","c_form_feed","c_new_line","c_carriage_return","c_horizontal_tab","c_vertical_tab","dabs","dacos","dasin","datan","date_and_time","dbesj","dbesj","dbesjn","dbesy","dbesy","dbesyn","dble","dcos","dcosh","ddim","derf","derfc","dexp","digits","dim","dint","dlog","dlog","dmax","dmin","dmod","dnint","dot_product","dprod","dsign","dsinh","dsin","dsqrt","dtanh","dtan","dtime","eoshift","epsilon","erf","erfc","etime","exit","exp","exponent","extends_type_of","fdate","fget","fgetc","float","floor","flush","fnum","fputc","fput","fraction","fseek","fstat","ftell","gerror","getarg","get_command","get_command_argument","get_environment_variable","getcwd","getenv","getgid","getlog","getpid","getuid","gmtime","hostnm","huge","iabs","iachar","iand","iargc","ibclr","ibits","ibset","ichar","idate","idim","idint","idnint","ieor","ierrno","ifix","imag","imagpart","index","int","ior","irand","isatty","ishft","ishftc","isign","iso_c_binding","is_iostat_end","is_iostat_eor","itime","kill","kind","lbound","len","len_trim","lge","lgt","link","lle","llt","lnblnk","loc","log","logical","long","lshift","lstat","ltime","matmul","max","maxexponent","maxloc","maxval","mclock","merge","move_alloc","min","minexponent","minloc","minval","mod","modulo","mvbits","nearest","new_line","nint","not","or","pack","perror","precision","present","product","radix","rand","random_number","random_seed","range","real","realpart","rename","repeat","reshape","rrspacing","rshift","same_type_as","scale","scan","second","selected_int_kind","selected_real_kind","set_exponent","shape","short","sign","signal","sinh","sin","sleep","sngl","spacing","spread","sqrt","srand","stat","sum","symlnk","system","system_clock","tan","tanh","time","tiny","transfer","transpose","trim","ttynam","ubound","umask","unlink","unpack","verify","xor","zabs","zcos","zexp","zlog","zsin","zsqrt"]),c=t(["c_bool","c_char","c_double","c_double_complex","c_float","c_float_complex","c_funptr","c_int","c_int16_t","c_int32_t","c_int64_t","c_int8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_int_fast8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_least8_t","c_intmax_t","c_intptr_t","c_long","c_long_double","c_long_double_complex","c_long_long","c_ptr","c_short","c_signed_char","c_size_t","character","complex","double","integer","logical","real"]),d=/[+\-*&=<>\/\:]/,o=/^\.(and|or|eq|lt|le|gt|ge|ne|not|eqv|neqv)\./i;function h(p,y){if(p.match(o))return"operator";var g=p.next();if(g=="!")return p.skipToEnd(),"comment";if(g=='"'||g=="'")return y.tokenize=f(g),y.tokenize(p,y);if(/[\[\]\(\),]/.test(g))return null;if(/\d/.test(g))return p.eatWhile(/[\w\.]/),"number";if(d.test(g))return p.eatWhile(d),"operator";p.eatWhile(/[\w\$_]/);var v=p.current().toLowerCase();return n.hasOwnProperty(v)?"keyword":l.hasOwnProperty(v)||c.hasOwnProperty(v)?"builtin":"variable"}function f(p){return function(y,g){for(var v=!1,b,k=!1;(b=y.next())!=null;){if(b==p&&!v){k=!0;break}v=!v&&b=="\\"}return(k||!v)&&(g.tokenize=null),"string"}}return{startState:function(){return{tokenize:null}},token:function(p,y){if(p.eatSpace())return null;var g=(y.tokenize||h)(p,y);return g=="comment"||g=="meta",g}}}),i.defineMIME("text/x-fortran","fortran")})});var Yf=Me((Kf,Vf)=>{(function(i){typeof Kf=="object"&&typeof Vf=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("go",function(t){var n=t.indentUnit,l={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},c={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},d=/[+\-*&^%:=<>!|\/]/,o;function h(b,k){var E=b.next();if(E=='"'||E=="'"||E=="`")return k.tokenize=f(E),k.tokenize(b,k);if(/[\d\.]/.test(E))return E=="."?b.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):E=="0"?b.match(/^[xX][0-9a-fA-F]+/)||b.match(/^0[0-7]+/):b.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(E))return o=E,null;if(E=="/"){if(b.eat("*"))return k.tokenize=p,p(b,k);if(b.eat("/"))return b.skipToEnd(),"comment"}if(d.test(E))return b.eatWhile(d),"operator";b.eatWhile(/[\w\$_\xa1-\uffff]/);var w=b.current();return l.propertyIsEnumerable(w)?((w=="case"||w=="default")&&(o="case"),"keyword"):c.propertyIsEnumerable(w)?"atom":"variable"}function f(b){return function(k,E){for(var w=!1,I,S=!1;(I=k.next())!=null;){if(I==b&&!w){S=!0;break}w=!w&&b!="`"&&I=="\\"}return(S||!(w||b=="`"))&&(E.tokenize=h),"string"}}function p(b,k){for(var E=!1,w;w=b.next();){if(w=="/"&&E){k.tokenize=h;break}E=w=="*"}return"comment"}function y(b,k,E,w,I){this.indented=b,this.column=k,this.type=E,this.align=w,this.prev=I}function g(b,k,E){return b.context=new y(b.indented,k,E,null,b.context)}function v(b){if(!!b.context.prev){var k=b.context.type;return(k==")"||k=="]"||k=="}")&&(b.indented=b.context.indented),b.context=b.context.prev}}return{startState:function(b){return{tokenize:null,context:new y((b||0)-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(b,k){var E=k.context;if(b.sol()&&(E.align==null&&(E.align=!1),k.indented=b.indentation(),k.startOfLine=!0,E.type=="case"&&(E.type="}")),b.eatSpace())return null;o=null;var w=(k.tokenize||h)(b,k);return w=="comment"||(E.align==null&&(E.align=!0),o=="{"?g(k,b.column(),"}"):o=="["?g(k,b.column(),"]"):o=="("?g(k,b.column(),")"):o=="case"?E.type="case":(o=="}"&&E.type=="}"||o==E.type)&&v(k),k.startOfLine=!1),w},indent:function(b,k){if(b.tokenize!=h&&b.tokenize!=null)return i.Pass;var E=b.context,w=k&&k.charAt(0);if(E.type=="case"&&/^(?:case|default)\b/.test(k))return b.context.type="}",E.indented;var I=w==E.type;return E.align?E.column+(I?0:1):E.indented+(I?0:n)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),i.defineMIME("text/x-go","go")})});var Qf=Me((Xf,Zf)=>{(function(i){typeof Xf=="object"&&typeof Zf=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("haskell",function(t,n){function l(S,N,O){return N(O),O(S,N)}var c=/[a-z_]/,d=/[A-Z]/,o=/\d/,h=/[0-9A-Fa-f]/,f=/[0-7]/,p=/[a-z_A-Z0-9'\xa1-\uffff]/,y=/[-!#$%&*+.\/<=>?@\\^|~:]/,g=/[(),;[\]`{}]/,v=/[ \t\v\f]/;function b(S,N){if(S.eatWhile(v))return null;var O=S.next();if(g.test(O)){if(O=="{"&&S.eat("-")){var j="comment";return S.eat("#")&&(j="meta"),l(S,N,k(j,1))}return null}if(O=="'")return S.eat("\\"),S.next(),S.eat("'")?"string":"string error";if(O=='"')return l(S,N,E);if(d.test(O))return S.eatWhile(p),S.eat(".")?"qualifier":"variable-2";if(c.test(O))return S.eatWhile(p),"variable";if(o.test(O)){if(O=="0"){if(S.eat(/[xX]/))return S.eatWhile(h),"integer";if(S.eat(/[oO]/))return S.eatWhile(f),"number"}S.eatWhile(o);var j="number";return S.match(/^\.\d+/)&&(j="number"),S.eat(/[eE]/)&&(j="number",S.eat(/[-+]/),S.eatWhile(o)),j}if(O=="."&&S.eat("."))return"keyword";if(y.test(O)){if(O=="-"&&S.eat(/-/)&&(S.eatWhile(/-/),!S.eat(y)))return S.skipToEnd(),"comment";var j="variable";return O==":"&&(j="variable-2"),S.eatWhile(y),j}return"error"}function k(S,N){return N==0?b:function(O,j){for(var U=N;!O.eol();){var ee=O.next();if(ee=="{"&&O.eat("-"))++U;else if(ee=="-"&&O.eat("}")&&(--U,U==0))return j(b),S}return j(k(S,U)),S}}function E(S,N){for(;!S.eol();){var O=S.next();if(O=='"')return N(b),"string";if(O=="\\"){if(S.eol()||S.eat(v))return N(w),"string";S.eat("&")||S.next()}}return N(b),"string error"}function w(S,N){return S.eat("\\")?l(S,N,E):(S.next(),N(b),"error")}var I=function(){var S={};function N(U){return function(){for(var ee=0;ee<arguments.length;ee++)S[arguments[ee]]=U}}N("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_"),N("keyword")("..",":","::","=","\\","<-","->","@","~","=>"),N("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),N("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"),N("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 O=n.overrideKeywords;if(O)for(var j in O)O.hasOwnProperty(j)&&(S[j]=O[j]);return S}();return{startState:function(){return{f:b}},copyState:function(S){return{f:S.f}},token:function(S,N){var O=N.f(S,function(U){N.f=U}),j=S.current();return I.hasOwnProperty(j)?I[j]:O},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),i.defineMIME("text/x-haskell","haskell")})});var wa=Me((Jf,ed)=>{(function(i){typeof Jf=="object"&&typeof ed=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};i.defineMode("xml",function(l,c){var d=l.indentUnit,o={},h=c.htmlMode?t:n;for(var f in h)o[f]=h[f];for(var f in c)o[f]=c[f];var p,y;function g(T,H){function Z(ne){return H.tokenize=ne,ne(T,H)}var P=T.next();if(P=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?Z(k("atom","]]>")):null:T.match("--")?Z(k("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),Z(E(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),H.tokenize=k("meta","?>"),"meta"):(p=T.eat("/")?"closeTag":"openTag",H.tokenize=v,"tag bracket");if(P=="&"){var z;return T.eat("#")?T.eat("x")?z=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):z=T.eatWhile(/[\d]/)&&T.eat(";"):z=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),z?"atom":"error"}else return T.eatWhile(/[^&<]/),null}g.isInText=!0;function v(T,H){var Z=T.next();if(Z==">"||Z=="/"&&T.eat(">"))return H.tokenize=g,p=Z==">"?"endTag":"selfcloseTag","tag bracket";if(Z=="=")return p="equals",null;if(Z=="<"){H.tokenize=g,H.state=O,H.tagName=H.tagStart=null;var P=H.tokenize(T,H);return P?P+" tag error":"tag error"}else return/[\'\"]/.test(Z)?(H.tokenize=b(Z),H.stringStartCol=T.column(),H.tokenize(T,H)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function b(T){var H=function(Z,P){for(;!Z.eol();)if(Z.next()==T){P.tokenize=v;break}return"string"};return H.isInAttribute=!0,H}function k(T,H){return function(Z,P){for(;!Z.eol();){if(Z.match(H)){P.tokenize=g;break}Z.next()}return T}}function E(T){return function(H,Z){for(var P;(P=H.next())!=null;){if(P=="<")return Z.tokenize=E(T+1),Z.tokenize(H,Z);if(P==">")if(T==1){Z.tokenize=g;break}else return Z.tokenize=E(T-1),Z.tokenize(H,Z)}return"meta"}}function w(T){return T&&T.toLowerCase()}function I(T,H,Z){this.prev=T.context,this.tagName=H||"",this.indent=T.indented,this.startOfLine=Z,(o.doNotIndent.hasOwnProperty(H)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function S(T){T.context&&(T.context=T.context.prev)}function N(T,H){for(var Z;;){if(!T.context||(Z=T.context.tagName,!o.contextGrabbers.hasOwnProperty(w(Z))||!o.contextGrabbers[w(Z)].hasOwnProperty(w(H))))return;S(T)}}function O(T,H,Z){return T=="openTag"?(Z.tagStart=H.column(),j):T=="closeTag"?U:O}function j(T,H,Z){return T=="word"?(Z.tagName=H.current(),y="tag",W):o.allowMissingTagName&&T=="endTag"?(y="tag bracket",W(T,H,Z)):(y="error",j)}function U(T,H,Z){if(T=="word"){var P=H.current();return Z.context&&Z.context.tagName!=P&&o.implicitlyClosed.hasOwnProperty(w(Z.context.tagName))&&S(Z),Z.context&&Z.context.tagName==P||o.matchClosing===!1?(y="tag",ee):(y="tag error",V)}else return o.allowMissingTagName&&T=="endTag"?(y="tag bracket",ee(T,H,Z)):(y="error",V)}function ee(T,H,Z){return T!="endTag"?(y="error",ee):(S(Z),O)}function V(T,H,Z){return y="error",ee(T,H,Z)}function W(T,H,Z){if(T=="word")return y="attribute",K;if(T=="endTag"||T=="selfcloseTag"){var P=Z.tagName,z=Z.tagStart;return Z.tagName=Z.tagStart=null,T=="selfcloseTag"||o.autoSelfClosers.hasOwnProperty(w(P))?N(Z,P):(N(Z,P),Z.context=new I(Z,P,z==Z.indented)),O}return y="error",W}function K(T,H,Z){return T=="equals"?q:(o.allowMissing||(y="error"),W(T,H,Z))}function q(T,H,Z){return T=="string"?R:T=="word"&&o.allowUnquoted?(y="string",W):(y="error",W(T,H,Z))}function R(T,H,Z){return T=="string"?R:W(T,H,Z)}return{startState:function(T){var H={tokenize:g,state:O,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(H.baseIndent=T),H},token:function(T,H){if(!H.tagName&&T.sol()&&(H.indented=T.indentation()),T.eatSpace())return null;p=null;var Z=H.tokenize(T,H);return(Z||p)&&Z!="comment"&&(y=null,H.state=H.state(p||Z,T,H),y&&(Z=y=="error"?Z+" error":y)),Z},indent:function(T,H,Z){var P=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+d;if(P&&P.noIndent)return i.Pass;if(T.tokenize!=v&&T.tokenize!=g)return Z?Z.match(/^(\s*)/)[0].length:0;if(T.tagName)return o.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+d*(o.multilineTagIndentFactor||1);if(o.alignCDATA&&/<!\[CDATA\[/.test(H))return 0;var z=H&&/^<(\/)?([\w_:\.-]*)/.exec(H);if(z&&z[1])for(;P;)if(P.tagName==z[2]){P=P.prev;break}else if(o.implicitlyClosed.hasOwnProperty(w(P.tagName)))P=P.prev;else break;else if(z)for(;P;){var ne=o.contextGrabbers[w(P.tagName)];if(ne&&ne.hasOwnProperty(w(z[2])))P=P.prev;else break}for(;P&&P.prev&&!P.startOfLine;)P=P.prev;return P?P.indent+d:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:o.htmlMode?"html":"xml",helperType:o.htmlMode?"html":"xml",skipAttribute:function(T){T.state==q&&(T.state=W)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var H=[],Z=T.context;Z;Z=Z.prev)H.push(Z.tagName);return H.reverse()}}}),i.defineMIME("text/xml","xml"),i.defineMIME("application/xml","xml"),i.mimeModes.hasOwnProperty("text/html")||i.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var rl=Me((td,rd)=>{(function(i){typeof td=="object"&&typeof rd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("javascript",function(t,n){var l=t.indentUnit,c=n.statementIndent,d=n.jsonld,o=n.json||d,h=n.trackScope!==!1,f=n.typescript,p=n.wordCharacters||/[\w$\xa1-\uffff]/,y=function(){function D(Yt){return{type:Yt,style:"keyword"}}var $=D("keyword a"),he=D("keyword b"),De=D("keyword c"),ft=D("keyword d"),xt=D("operator"),Ze={type:"atom",style:"atom"};return{if:D("if"),while:$,with:$,else:he,do:he,try:he,finally:he,return:ft,break:ft,continue:ft,new:D("new"),delete:De,void:De,throw:De,debugger:D("debugger"),var:D("var"),const:D("var"),let:D("var"),function:D("function"),catch:D("catch"),for:D("for"),switch:D("switch"),case:D("case"),default:D("default"),in:xt,typeof:xt,instanceof:xt,true:Ze,false:Ze,null:Ze,undefined:Ze,NaN:Ze,Infinity:Ze,this:D("this"),class:D("class"),super:D("atom"),yield:De,export:D("export"),import:D("import"),extends:De,await:De}}(),g=/[+\-*&%=<>!?|~^@]/,v=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function b(D){for(var $=!1,he,De=!1;(he=D.next())!=null;){if(!$){if(he=="/"&&!De)return;he=="["?De=!0:De&&he=="]"&&(De=!1)}$=!$&&he=="\\"}}var k,E;function w(D,$,he){return k=D,E=he,$}function I(D,$){var he=D.next();if(he=='"'||he=="'")return $.tokenize=S(he),$.tokenize(D,$);if(he=="."&&D.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if(he=="."&&D.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(he))return w(he);if(he=="="&&D.eat(">"))return w("=>","operator");if(he=="0"&&D.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(he))return D.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if(he=="/")return D.eat("*")?($.tokenize=N,N(D,$)):D.eat("/")?(D.skipToEnd(),w("comment","comment")):we(D,$,1)?(b(D),D.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(D.eat("="),w("operator","operator",D.current()));if(he=="`")return $.tokenize=O,O(D,$);if(he=="#"&&D.peek()=="!")return D.skipToEnd(),w("meta","meta");if(he=="#"&&D.eatWhile(p))return w("variable","property");if(he=="<"&&D.match("!--")||he=="-"&&D.match("->")&&!/\S/.test(D.string.slice(0,D.start)))return D.skipToEnd(),w("comment","comment");if(g.test(he))return(he!=">"||!$.lexical||$.lexical.type!=">")&&(D.eat("=")?(he=="!"||he=="=")&&D.eat("="):/[<>*+\-|&?]/.test(he)&&(D.eat(he),he==">"&&D.eat(he))),he=="?"&&D.eat(".")?w("."):w("operator","operator",D.current());if(p.test(he)){D.eatWhile(p);var De=D.current();if($.lastType!="."){if(y.propertyIsEnumerable(De)){var ft=y[De];return w(ft.type,ft.style,De)}if(De=="async"&&D.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",De)}return w("variable","variable",De)}}function S(D){return function($,he){var De=!1,ft;if(d&&$.peek()=="@"&&$.match(v))return he.tokenize=I,w("jsonld-keyword","meta");for(;(ft=$.next())!=null&&!(ft==D&&!De);)De=!De&&ft=="\\";return De||(he.tokenize=I),w("string","string")}}function N(D,$){for(var he=!1,De;De=D.next();){if(De=="/"&&he){$.tokenize=I;break}he=De=="*"}return w("comment","comment")}function O(D,$){for(var he=!1,De;(De=D.next())!=null;){if(!he&&(De=="`"||De=="$"&&D.eat("{"))){$.tokenize=I;break}he=!he&&De=="\\"}return w("quasi","string-2",D.current())}var j="([{}])";function U(D,$){$.fatArrowAt&&($.fatArrowAt=null);var he=D.string.indexOf("=>",D.start);if(!(he<0)){if(f){var De=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(D.string.slice(D.start,he));De&&(he=De.index)}for(var ft=0,xt=!1,Ze=he-1;Ze>=0;--Ze){var Yt=D.string.charAt(Ze),Fr=j.indexOf(Yt);if(Fr>=0&&Fr<3){if(!ft){++Ze;break}if(--ft==0){Yt=="("&&(xt=!0);break}}else if(Fr>=3&&Fr<6)++ft;else if(p.test(Yt))xt=!0;else if(/["'\/`]/.test(Yt))for(;;--Ze){if(Ze==0)return;var Wn=D.string.charAt(Ze-1);if(Wn==Yt&&D.string.charAt(Ze-2)!="\\"){Ze--;break}}else if(xt&&!ft){++Ze;break}}xt&&!ft&&($.fatArrowAt=Ze)}}var ee={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function V(D,$,he,De,ft,xt){this.indented=D,this.column=$,this.type=he,this.prev=ft,this.info=xt,De!=null&&(this.align=De)}function W(D,$){if(!h)return!1;for(var he=D.localVars;he;he=he.next)if(he.name==$)return!0;for(var De=D.context;De;De=De.prev)for(var he=De.vars;he;he=he.next)if(he.name==$)return!0}function K(D,$,he,De,ft){var xt=D.cc;for(q.state=D,q.stream=ft,q.marked=null,q.cc=xt,q.style=$,D.lexical.hasOwnProperty("align")||(D.lexical.align=!0);;){var Ze=xt.length?xt.pop():o?ke:qe;if(Ze(he,De)){for(;xt.length&&xt[xt.length-1].lex;)xt.pop()();return q.marked?q.marked:he=="variable"&&W(D,De)?"variable-2":$}}}var q={state:null,column:null,marked:null,cc:null};function R(){for(var D=arguments.length-1;D>=0;D--)q.cc.push(arguments[D])}function T(){return R.apply(null,arguments),!0}function H(D,$){for(var he=$;he;he=he.next)if(he.name==D)return!0;return!1}function Z(D){var $=q.state;if(q.marked="def",!!h){if($.context){if($.lexical.info=="var"&&$.context&&$.context.block){var he=P(D,$.context);if(he!=null){$.context=he;return}}else if(!H(D,$.localVars)){$.localVars=new ae(D,$.localVars);return}}n.globalVars&&!H(D,$.globalVars)&&($.globalVars=new ae(D,$.globalVars))}}function P(D,$){if($)if($.block){var he=P(D,$.prev);return he?he==$.prev?$:new ne(he,$.vars,!0):null}else return H(D,$.vars)?$:new ne($.prev,new ae(D,$.vars),!1);else return null}function z(D){return D=="public"||D=="private"||D=="protected"||D=="abstract"||D=="readonly"}function ne(D,$,he){this.prev=D,this.vars=$,this.block=he}function ae(D,$){this.name=D,this.next=$}var F=new ae("this",new ae("arguments",null));function A(){q.state.context=new ne(q.state.context,q.state.localVars,!1),q.state.localVars=F}function be(){q.state.context=new ne(q.state.context,q.state.localVars,!0),q.state.localVars=null}A.lex=be.lex=!0;function Fe(){q.state.localVars=q.state.context.vars,q.state.context=q.state.context.prev}Fe.lex=!0;function xe(D,$){var he=function(){var De=q.state,ft=De.indented;if(De.lexical.type=="stat")ft=De.lexical.indented;else for(var xt=De.lexical;xt&&xt.type==")"&&xt.align;xt=xt.prev)ft=xt.indented;De.lexical=new V(ft,q.stream.column(),D,null,De.lexical,$)};return he.lex=!0,he}function _e(){var D=q.state;D.lexical.prev&&(D.lexical.type==")"&&(D.indented=D.lexical.indented),D.lexical=D.lexical.prev)}_e.lex=!0;function ze(D){function $(he){return he==D?T():D==";"||he=="}"||he==")"||he=="]"?R():T($)}return $}function qe(D,$){return D=="var"?T(xe("vardef",$),$r,ze(";"),_e):D=="keyword a"?T(xe("form"),at,qe,_e):D=="keyword b"?T(xe("form"),qe,_e):D=="keyword d"?q.stream.match(/^\s*$/,!1)?T():T(xe("stat"),Re,ze(";"),_e):D=="debugger"?T(ze(";")):D=="{"?T(xe("}"),be,Lt,_e,Fe):D==";"?T():D=="if"?(q.state.lexical.info=="else"&&q.state.cc[q.state.cc.length-1]==_e&&q.state.cc.pop()(),T(xe("form"),at,qe,_e,oe)):D=="function"?T(B):D=="for"?T(xe("form"),be,Q,qe,Fe,_e):D=="class"||f&&$=="interface"?(q.marked="keyword",T(xe("form",D=="class"?D:$),Le,_e)):D=="variable"?f&&$=="declare"?(q.marked="keyword",T(qe)):f&&($=="module"||$=="enum"||$=="type")&&q.stream.match(/^\s*\w/,!1)?(q.marked="keyword",$=="enum"?T(tt):$=="type"?T(ce,ze("operator"),rt,ze(";")):T(xe("form"),zt,ze("{"),xe("}"),Lt,_e,_e)):f&&$=="namespace"?(q.marked="keyword",T(xe("form"),ke,qe,_e)):f&&$=="abstract"?(q.marked="keyword",T(qe)):T(xe("stat"),it):D=="switch"?T(xe("form"),at,ze("{"),xe("}","switch"),be,Lt,_e,_e,Fe):D=="case"?T(ke,ze(":")):D=="default"?T(ze(":")):D=="catch"?T(xe("form"),A,ge,qe,_e,Fe):D=="export"?T(xe("stat"),St,_e):D=="import"?T(xe("stat"),G,_e):D=="async"?T(qe):$=="@"?T(ke,qe):R(xe("stat"),ke,ze(";"),_e)}function ge(D){if(D=="(")return T(me,ze(")"))}function ke(D,$){return gt(D,$,!1)}function je(D,$){return gt(D,$,!0)}function at(D){return D!="("?R():T(xe(")"),Re,ze(")"),_e)}function gt(D,$,he){if(q.state.fatArrowAt==q.stream.start){var De=he?Se:Je;if(D=="(")return T(A,xe(")"),We(me,")"),_e,ze("=>"),De,Fe);if(D=="variable")return R(A,zt,ze("=>"),De,Fe)}var ft=he?Be:Ie;return ee.hasOwnProperty(D)?T(ft):D=="function"?T(B,ft):D=="class"||f&&$=="interface"?(q.marked="keyword",T(xe("form"),ve,_e)):D=="keyword c"||D=="async"?T(he?je:ke):D=="("?T(xe(")"),Re,ze(")"),_e,ft):D=="operator"||D=="spread"?T(he?je:ke):D=="["?T(xe("]"),Ye,_e,ft):D=="{"?$t(ot,"}",null,ft):D=="quasi"?R(Ke,ft):D=="new"?T(X(he)):T()}function Re(D){return D.match(/[;\}\)\],]/)?R():R(ke)}function Ie(D,$){return D==","?T(Re):Be(D,$,!1)}function Be(D,$,he){var De=he==!1?Ie:Be,ft=he==!1?ke:je;if(D=="=>")return T(A,he?Se:Je,Fe);if(D=="operator")return/\+\+|--/.test($)||f&&$=="!"?T(De):f&&$=="<"&&q.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?T(xe(">"),We(rt,">"),_e,De):$=="?"?T(ke,ze(":"),ft):T(ft);if(D=="quasi")return R(Ke,De);if(D!=";"){if(D=="(")return $t(je,")","call",De);if(D==".")return T(Ne,De);if(D=="[")return T(xe("]"),Re,ze("]"),_e,De);if(f&&$=="as")return q.marked="keyword",T(rt,De);if(D=="regexp")return q.state.lastType=q.marked="operator",q.stream.backUp(q.stream.pos-q.stream.start-1),T(ft)}}function Ke(D,$){return D!="quasi"?R():$.slice($.length-2)!="${"?T(Ke):T(Re,He)}function He(D){if(D=="}")return q.marked="string-2",q.state.tokenize=O,T(Ke)}function Je(D){return U(q.stream,q.state),R(D=="{"?qe:ke)}function Se(D){return U(q.stream,q.state),R(D=="{"?qe:je)}function X(D){return function($){return $=="."?T(D?ue:de):$=="variable"&&f?T(Ir,D?Be:Ie):R(D?je:ke)}}function de(D,$){if($=="target")return q.marked="keyword",T(Ie)}function ue(D,$){if($=="target")return q.marked="keyword",T(Be)}function it(D){return D==":"?T(_e,qe):R(Ie,ze(";"),_e)}function Ne(D){if(D=="variable")return q.marked="property",T()}function ot(D,$){if(D=="async")return q.marked="property",T(ot);if(D=="variable"||q.style=="keyword"){if(q.marked="property",$=="get"||$=="set")return T(Xe);var he;return f&&q.state.fatArrowAt==q.stream.start&&(he=q.stream.match(/^\s*:\s*/,!1))&&(q.state.fatArrowAt=q.stream.pos+he[0].length),T(et)}else{if(D=="number"||D=="string")return q.marked=d?"property":q.style+" property",T(et);if(D=="jsonld-keyword")return T(et);if(f&&z($))return q.marked="keyword",T(ot);if(D=="[")return T(ke,fr,ze("]"),et);if(D=="spread")return T(je,et);if($=="*")return q.marked="keyword",T(ot);if(D==":")return R(et)}}function Xe(D){return D!="variable"?R(et):(q.marked="property",T(B))}function et(D){if(D==":")return T(je);if(D=="(")return R(B)}function We(D,$,he){function De(ft,xt){if(he?he.indexOf(ft)>-1:ft==","){var Ze=q.state.lexical;return Ze.info=="call"&&(Ze.pos=(Ze.pos||0)+1),T(function(Yt,Fr){return Yt==$||Fr==$?R():R(D)},De)}return ft==$||xt==$?T():he&&he.indexOf(";")>-1?R(D):T(ze($))}return function(ft,xt){return ft==$||xt==$?T():R(D,De)}}function $t(D,$,he){for(var De=3;De<arguments.length;De++)q.cc.push(arguments[De]);return T(xe($,he),We(D,$),_e)}function Lt(D){return D=="}"?T():R(qe,Lt)}function fr(D,$){if(f){if(D==":")return T(rt);if($=="?")return T(fr)}}function lt(D,$){if(f&&(D==":"||$=="in"))return T(rt)}function Mt(D){if(f&&D==":")return q.stream.match(/^\s*\w+\s+is\b/,!1)?T(ke,pt,rt):T(rt)}function pt(D,$){if($=="is")return q.marked="keyword",T()}function rt(D,$){if($=="keyof"||$=="typeof"||$=="infer"||$=="readonly")return q.marked="keyword",T($=="typeof"?je:rt);if(D=="variable"||$=="void")return q.marked="type",T(Ht);if($=="|"||$=="&")return T(rt);if(D=="string"||D=="number"||D=="atom")return T(Ht);if(D=="[")return T(xe("]"),We(rt,"]",","),_e,Ht);if(D=="{")return T(xe("}"),dr,_e,Ht);if(D=="(")return T(We(st,")"),wt,Ht);if(D=="<")return T(We(rt,">"),rt);if(D=="quasi")return R(Vt,Ht)}function wt(D){if(D=="=>")return T(rt)}function dr(D){return D.match(/[\}\)\]]/)?T():D==","||D==";"?T(dr):R(Et,dr)}function Et(D,$){if(D=="variable"||q.style=="keyword")return q.marked="property",T(Et);if($=="?"||D=="number"||D=="string")return T(Et);if(D==":")return T(rt);if(D=="[")return T(ze("variable"),lt,ze("]"),Et);if(D=="(")return R(te,Et);if(!D.match(/[;\}\)\],]/))return T()}function Vt(D,$){return D!="quasi"?R():$.slice($.length-2)!="${"?T(Vt):T(rt,kt)}function kt(D){if(D=="}")return q.marked="string-2",q.state.tokenize=O,T(Vt)}function st(D,$){return D=="variable"&&q.stream.match(/^\s*[?:]/,!1)||$=="?"?T(st):D==":"?T(rt):D=="spread"?T(st):R(rt)}function Ht(D,$){if($=="<")return T(xe(">"),We(rt,">"),_e,Ht);if($=="|"||D=="."||$=="&")return T(rt);if(D=="[")return T(rt,ze("]"),Ht);if($=="extends"||$=="implements")return q.marked="keyword",T(rt);if($=="?")return T(rt,ze(":"),rt)}function Ir(D,$){if($=="<")return T(xe(">"),We(rt,">"),_e,Ht)}function hr(){return R(rt,pr)}function pr(D,$){if($=="=")return T(rt)}function $r(D,$){return $=="enum"?(q.marked="keyword",T(tt)):R(zt,fr,Qt,ie)}function zt(D,$){if(f&&z($))return q.marked="keyword",T(zt);if(D=="variable")return Z($),T();if(D=="spread")return T(zt);if(D=="[")return $t(ur,"]");if(D=="{")return $t(yr,"}")}function yr(D,$){return D=="variable"&&!q.stream.match(/^\s*:/,!1)?(Z($),T(Qt)):(D=="variable"&&(q.marked="property"),D=="spread"?T(zt):D=="}"?R():D=="["?T(ke,ze("]"),ze(":"),yr):T(ze(":"),zt,Qt))}function ur(){return R(zt,Qt)}function Qt(D,$){if($=="=")return T(je)}function ie(D){if(D==",")return T($r)}function oe(D,$){if(D=="keyword b"&&$=="else")return T(xe("form","else"),qe,_e)}function Q(D,$){if($=="await")return T(Q);if(D=="(")return T(xe(")"),re,_e)}function re(D){return D=="var"?T($r,M):D=="variable"?T(M):R(M)}function M(D,$){return D==")"?T():D==";"?T(M):$=="in"||$=="of"?(q.marked="keyword",T(ke,M)):R(ke,M)}function B(D,$){if($=="*")return q.marked="keyword",T(B);if(D=="variable")return Z($),T(B);if(D=="(")return T(A,xe(")"),We(me,")"),_e,Mt,qe,Fe);if(f&&$=="<")return T(xe(">"),We(hr,">"),_e,B)}function te(D,$){if($=="*")return q.marked="keyword",T(te);if(D=="variable")return Z($),T(te);if(D=="(")return T(A,xe(")"),We(me,")"),_e,Mt,Fe);if(f&&$=="<")return T(xe(">"),We(hr,">"),_e,te)}function ce(D,$){if(D=="keyword"||D=="variable")return q.marked="type",T(ce);if($=="<")return T(xe(">"),We(hr,">"),_e)}function me(D,$){return $=="@"&&T(ke,me),D=="spread"?T(me):f&&z($)?(q.marked="keyword",T(me)):f&&D=="this"?T(fr,Qt):R(zt,fr,Qt)}function ve(D,$){return D=="variable"?Le(D,$):Oe(D,$)}function Le(D,$){if(D=="variable")return Z($),T(Oe)}function Oe(D,$){if($=="<")return T(xe(">"),We(hr,">"),_e,Oe);if($=="extends"||$=="implements"||f&&D==",")return $=="implements"&&(q.marked="keyword"),T(f?rt:ke,Oe);if(D=="{")return T(xe("}"),Ce,_e)}function Ce(D,$){if(D=="async"||D=="variable"&&($=="static"||$=="get"||$=="set"||f&&z($))&&q.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return q.marked="keyword",T(Ce);if(D=="variable"||q.style=="keyword")return q.marked="property",T(Ve,Ce);if(D=="number"||D=="string")return T(Ve,Ce);if(D=="[")return T(ke,fr,ze("]"),Ve,Ce);if($=="*")return q.marked="keyword",T(Ce);if(f&&D=="(")return R(te,Ce);if(D==";"||D==",")return T(Ce);if(D=="}")return T();if($=="@")return T(ke,Ce)}function Ve(D,$){if($=="!"||$=="?")return T(Ve);if(D==":")return T(rt,Qt);if($=="=")return T(je);var he=q.state.lexical.prev,De=he&&he.info=="interface";return R(De?te:B)}function St(D,$){return $=="*"?(q.marked="keyword",T(Ae,ze(";"))):$=="default"?(q.marked="keyword",T(ke,ze(";"))):D=="{"?T(We(mt,"}"),Ae,ze(";")):R(qe)}function mt(D,$){if($=="as")return q.marked="keyword",T(ze("variable"));if(D=="variable")return R(je,mt)}function G(D){return D=="string"?T():D=="("?R(ke):D=="."?R(Ie):R(se,pe,Ae)}function se(D,$){return D=="{"?$t(se,"}"):(D=="variable"&&Z($),$=="*"&&(q.marked="keyword"),T(Te))}function pe(D){if(D==",")return T(se,pe)}function Te(D,$){if($=="as")return q.marked="keyword",T(se)}function Ae(D,$){if($=="from")return q.marked="keyword",T(ke)}function Ye(D){return D=="]"?T():R(We(je,"]"))}function tt(){return R(xe("form"),zt,ze("{"),xe("}"),We(bt,"}"),_e,_e)}function bt(){return R(zt,Qt)}function Dt(D,$){return D.lastType=="operator"||D.lastType==","||g.test($.charAt(0))||/[,.]/.test($.charAt(0))}function we(D,$,he){return $.tokenize==I&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test($.lastType)||$.lastType=="quasi"&&/\{\s*$/.test(D.string.slice(0,D.pos-(he||0)))}return{startState:function(D){var $={tokenize:I,lastType:"sof",cc:[],lexical:new V((D||0)-l,0,"block",!1),localVars:n.localVars,context:n.localVars&&new ne(null,null,!1),indented:D||0};return n.globalVars&&typeof n.globalVars=="object"&&($.globalVars=n.globalVars),$},token:function(D,$){if(D.sol()&&($.lexical.hasOwnProperty("align")||($.lexical.align=!1),$.indented=D.indentation(),U(D,$)),$.tokenize!=N&&D.eatSpace())return null;var he=$.tokenize(D,$);return k=="comment"?he:($.lastType=k=="operator"&&(E=="++"||E=="--")?"incdec":k,K($,he,k,E,D))},indent:function(D,$){if(D.tokenize==N||D.tokenize==O)return i.Pass;if(D.tokenize!=I)return 0;var he=$&&$.charAt(0),De=D.lexical,ft;if(!/^\s*else\b/.test($))for(var xt=D.cc.length-1;xt>=0;--xt){var Ze=D.cc[xt];if(Ze==_e)De=De.prev;else if(Ze!=oe&&Ze!=Fe)break}for(;(De.type=="stat"||De.type=="form")&&(he=="}"||(ft=D.cc[D.cc.length-1])&&(ft==Ie||ft==Be)&&!/^[,\.=+\-*:?[\(]/.test($));)De=De.prev;c&&De.type==")"&&De.prev.type=="stat"&&(De=De.prev);var Yt=De.type,Fr=he==Yt;return Yt=="vardef"?De.indented+(D.lastType=="operator"||D.lastType==","?De.info.length+1:0):Yt=="form"&&he=="{"?De.indented:Yt=="form"?De.indented+l:Yt=="stat"?De.indented+(Dt(D,$)?c||l:0):De.info=="switch"&&!Fr&&n.doubleIndentSwitch!=!1?De.indented+(/^(?:case|default)\b/.test($)?l:2*l):De.align?De.column+(Fr?0:1):De.indented+(Fr?0:l)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:o?null:"/*",blockCommentEnd:o?null:"*/",blockCommentContinue:o?null:" * ",lineComment:o?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:o?"json":"javascript",jsonldMode:d,jsonMode:o,expressionAllowed:we,skipExpression:function(D){K(D,"atom","atom","true",new i.StringStream("",2,null))}}}),i.registerHelper("wordChars","javascript",/[\w$]/),i.defineMIME("text/javascript","javascript"),i.defineMIME("text/ecmascript","javascript"),i.defineMIME("application/javascript","javascript"),i.defineMIME("application/x-javascript","javascript"),i.defineMIME("application/ecmascript","javascript"),i.defineMIME("application/json",{name:"javascript",json:!0}),i.defineMIME("application/x-json",{name:"javascript",json:!0}),i.defineMIME("application/manifest+json",{name:"javascript",json:!0}),i.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),i.defineMIME("text/typescript",{name:"javascript",typescript:!0}),i.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var nl=Me((nd,id)=>{(function(i){typeof nd=="object"&&typeof id=="object"?i(Tt(),wa(),rl(),el()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)})(function(i){"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 n(p,y,g){var v=p.current(),b=v.search(y);return b>-1?p.backUp(v.length-b):v.match(/<\/?$/)&&(p.backUp(v.length),p.match(y,!1)||p.match(v)),g}var l={};function c(p){var y=l[p];return y||(l[p]=new RegExp("\\s+"+p+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function d(p,y){var g=p.match(c(y));return g?/^\s*(.*?)\s*$/.exec(g[2])[1]:""}function o(p,y){return new RegExp((y?"^":"")+"</s*"+p+"s*>","i")}function h(p,y){for(var g in p)for(var v=y[g]||(y[g]=[]),b=p[g],k=b.length-1;k>=0;k--)v.unshift(b[k])}function f(p,y){for(var g=0;g<p.length;g++){var v=p[g];if(!v[0]||v[1].test(d(y,v[0])))return v[2]}}i.defineMode("htmlmixed",function(p,y){var g=i.getMode(p,{name:"xml",htmlMode:!0,multilineTagIndentFactor:y.multilineTagIndentFactor,multilineTagIndentPastTag:y.multilineTagIndentPastTag,allowMissingTagName:y.allowMissingTagName}),v={},b=y&&y.tags,k=y&&y.scriptTypes;if(h(t,v),b&&h(b,v),k)for(var E=k.length-1;E>=0;E--)v.script.unshift(["type",k[E].matches,k[E].mode]);function w(I,S){var N=g.token(I,S.htmlState),O=/\btag\b/.test(N),j;if(O&&!/[<>\s\/]/.test(I.current())&&(j=S.htmlState.tagName&&S.htmlState.tagName.toLowerCase())&&v.hasOwnProperty(j))S.inTag=j+" ";else if(S.inTag&&O&&/>$/.test(I.current())){var U=/^([\S]+) (.*)/.exec(S.inTag);S.inTag=null;var ee=I.current()==">"&&f(v[U[1]],U[2]),V=i.getMode(p,ee),W=o(U[1],!0),K=o(U[1],!1);S.token=function(q,R){return q.match(W,!1)?(R.token=w,R.localState=R.localMode=null,null):n(q,K,R.localMode.token(q,R.localState))},S.localMode=V,S.localState=i.startState(V,g.indent(S.htmlState,"",""))}else S.inTag&&(S.inTag+=I.current(),I.eol()&&(S.inTag+=" "));return N}return{startState:function(){var I=i.startState(g);return{token:w,inTag:null,localMode:null,localState:null,htmlState:I}},copyState:function(I){var S;return I.localState&&(S=i.copyState(I.localMode,I.localState)),{token:I.token,inTag:I.inTag,localMode:I.localMode,localState:S,htmlState:i.copyState(g,I.htmlState)}},token:function(I,S){return S.token(I,S)},indent:function(I,S,N){return!I.localMode||/^\s*<\//.test(S)?g.indent(I.htmlState,S,N):I.localMode.indent?I.localMode.indent(I.localState,S,N):i.Pass},innerMode:function(I){return{state:I.localState||I.htmlState,mode:I.localMode||g}}}},"xml","javascript","css"),i.defineMIME("text/html","htmlmixed")})});var sd=Me((od,ad)=>{(function(i){typeof od=="object"&&typeof ad=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("julia",function(t,n){function l(ae,F,A){return typeof A=="undefined"&&(A=""),typeof F=="undefined"&&(F="\\b"),new RegExp("^"+A+"(("+ae.join(")|(")+"))"+F)}var c="\\\\[0-7]{1,3}",d="\\\\x[A-Fa-f0-9]{1,2}",o=`\\\\[abefnrtv0%?'"\\\\]`,h="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",f=["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","\\.{2,3}","[\\.\\\\%*+\\-<>!\\/^|&]=?","\\?","\\$","~",":"],p=n.operators||l(["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),y=n.delimiters||/^[;,()[\]{}]/,g=n.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,v=l([c,d,o,h],"'"),b=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],k=["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"],w=["true","false","nothing","NaN","Inf"];i.registerHelper("hintWords","julia",E.concat(w));var I=l(b),S=l(k),N=l(E),O=l(w),j=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,U=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,ee=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,V=l(f,"","@"),W=l(f,"",":");function K(ae){return ae.nestedArrays>0}function q(ae){return ae.nestedGenerators>0}function R(ae,F){return typeof F=="undefined"&&(F=0),ae.scopes.length<=F?null:ae.scopes[ae.scopes.length-(F+1)]}function T(ae,F){if(ae.match("#=",!1))return F.tokenize=Z,F.tokenize(ae,F);var A=F.leavingExpr;if(ae.sol()&&(A=!1),F.leavingExpr=!1,A&&ae.match(/^'+/))return"operator";if(ae.match(/\.{4,}/))return"error";if(ae.match(/\.{1,3}/))return"operator";if(ae.eatSpace())return null;var be=ae.peek();if(be==="#")return ae.skipToEnd(),"comment";if(be==="["&&(F.scopes.push("["),F.nestedArrays++),be==="("&&(F.scopes.push("("),F.nestedGenerators++),K(F)&&be==="]"){for(;F.scopes.length&&R(F)!=="[";)F.scopes.pop();F.scopes.pop(),F.nestedArrays--,F.leavingExpr=!0}if(q(F)&&be===")"){for(;F.scopes.length&&R(F)!=="(";)F.scopes.pop();F.scopes.pop(),F.nestedGenerators--,F.leavingExpr=!0}if(K(F)){if(F.lastToken=="end"&&ae.match(":"))return"operator";if(ae.match("end"))return"number"}var Fe;if((Fe=ae.match(I,!1))&&F.scopes.push(Fe[0]),ae.match(S,!1)&&F.scopes.pop(),ae.match(/^::(?![:\$])/))return F.tokenize=H,F.tokenize(ae,F);if(!A&&(ae.match(U)||ae.match(W)))return"builtin";if(ae.match(p))return"operator";if(ae.match(/^\.?\d/,!1)){var xe=RegExp(/^im\b/),_e=!1;if(ae.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(_e=!0),ae.match(/^0x[0-9a-f_]+/i)&&(_e=!0),ae.match(/^0b[01_]+/i)&&(_e=!0),ae.match(/^0o[0-7_]+/i)&&(_e=!0),ae.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(_e=!0),ae.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(_e=!0),_e)return ae.match(xe),F.leavingExpr=!0,"number"}if(ae.match("'"))return F.tokenize=P,F.tokenize(ae,F);if(ae.match(ee))return F.tokenize=z(ae.current()),F.tokenize(ae,F);if(ae.match(j)||ae.match(V))return"meta";if(ae.match(y))return null;if(ae.match(N))return"keyword";if(ae.match(O))return"builtin";var ze=F.isDefinition||F.lastToken=="function"||F.lastToken=="macro"||F.lastToken=="type"||F.lastToken=="struct"||F.lastToken=="immutable";return ae.match(g)?ze?ae.peek()==="."?(F.isDefinition=!0,"variable"):(F.isDefinition=!1,"def"):(F.leavingExpr=!0,"variable"):(ae.next(),"error")}function H(ae,F){return ae.match(/.*?(?=[,;{}()=\s]|$)/),ae.match("{")?F.nestedParameters++:ae.match("}")&&F.nestedParameters>0&&F.nestedParameters--,F.nestedParameters>0?ae.match(/.*?(?={|})/)||ae.next():F.nestedParameters==0&&(F.tokenize=T),"builtin"}function Z(ae,F){return ae.match("#=")&&F.nestedComments++,ae.match(/.*?(?=(#=|=#))/)||ae.skipToEnd(),ae.match("=#")&&(F.nestedComments--,F.nestedComments==0&&(F.tokenize=T)),"comment"}function P(ae,F){var A=!1,be;if(ae.match(v))A=!0;else if(be=ae.match(/\\u([a-f0-9]{1,4})(?=')/i)){var Fe=parseInt(be[1],16);(Fe<=55295||Fe>=57344)&&(A=!0,ae.next())}else if(be=ae.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var Fe=parseInt(be[1],16);Fe<=1114111&&(A=!0,ae.next())}return A?(F.leavingExpr=!0,F.tokenize=T,"string"):(ae.match(/^[^']+(?=')/)||ae.skipToEnd(),ae.match("'")&&(F.tokenize=T),"error")}function z(ae){ae.substr(-3)==='"""'?ae='"""':ae.substr(-1)==='"'&&(ae='"');function F(A,be){if(A.eat("\\"))A.next();else{if(A.match(ae))return be.tokenize=T,be.leavingExpr=!0,"string";A.eat(/[`"]/)}return A.eatWhile(/[^\\`"]/),"string"}return F}var ne={startState:function(){return{tokenize:T,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(ae,F){var A=F.tokenize(ae,F),be=ae.current();return be&&A&&(F.lastToken=be),A},indent:function(ae,F){var A=0;return(F==="]"||F===")"||/^end\b/.test(F)||/^else/.test(F)||/^catch\b/.test(F)||/^elseif\b/.test(F)||/^finally/.test(F))&&(A=-1),(ae.scopes.length+A)*t.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"};return ne}),i.defineMIME("text/x-julia","julia")})});var cd=Me((ld,ud)=>{(function(i){typeof ld=="object"&&typeof ud=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("lua",function(t,n){var l=t.indentUnit;function c(w){return new RegExp("^(?:"+w.join("|")+")","i")}function d(w){return new RegExp("^(?:"+w.join("|")+")$","i")}var o=d(n.specials||[]),h=d(["_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"]),f=d(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),p=d(["function","if","repeat","do","\\(","{"]),y=d(["end","until","\\)","}"]),g=c(["end","until","\\)","}","else","elseif"]);function v(w){for(var I=0;w.eat("=");)++I;return w.eat("["),I}function b(w,I){var S=w.next();return S=="-"&&w.eat("-")?w.eat("[")&&w.eat("[")?(I.cur=k(v(w),"comment"))(w,I):(w.skipToEnd(),"comment"):S=='"'||S=="'"?(I.cur=E(S))(w,I):S=="["&&/[\[=]/.test(w.peek())?(I.cur=k(v(w),"string"))(w,I):/\d/.test(S)?(w.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(S)?(w.eatWhile(/[\w\\\-_.]/),"variable"):null}function k(w,I){return function(S,N){for(var O=null,j;(j=S.next())!=null;)if(O==null)j=="]"&&(O=0);else if(j=="=")++O;else if(j=="]"&&O==w){N.cur=b;break}else O=null;return I}}function E(w){return function(I,S){for(var N=!1,O;(O=I.next())!=null&&!(O==w&&!N);)N=!N&&O=="\\";return N||(S.cur=b),"string"}}return{startState:function(w){return{basecol:w||0,indentDepth:0,cur:b}},token:function(w,I){if(w.eatSpace())return null;var S=I.cur(w,I),N=w.current();return S=="variable"&&(f.test(N)?S="keyword":h.test(N)?S="builtin":o.test(N)&&(S="variable-2")),S!="comment"&&S!="string"&&(p.test(N)?++I.indentDepth:y.test(N)&&--I.indentDepth),S},indent:function(w,I){var S=g.test(I);return w.basecol+l*(w.indentDepth-(S?1:0))},electricInput:/^\s*(?:end|until|else|\)|\})$/,lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),i.defineMIME("text/x-lua","lua")})});var hd=Me((fd,dd)=>{(function(i){typeof fd=="object"&&typeof dd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.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","cbl"]},{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"],alias:["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"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<i.modeInfo.length;t++){var n=i.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}i.findModeByMIME=function(l){l=l.toLowerCase();for(var c=0;c<i.modeInfo.length;c++){var d=i.modeInfo[c];if(d.mime==l)return d;if(d.mimes){for(var o=0;o<d.mimes.length;o++)if(d.mimes[o]==l)return d}}if(/\+xml$/.test(l))return i.findModeByMIME("application/xml");if(/\+json$/.test(l))return i.findModeByMIME("application/json")},i.findModeByExtension=function(l){l=l.toLowerCase();for(var c=0;c<i.modeInfo.length;c++){var d=i.modeInfo[c];if(d.ext){for(var o=0;o<d.ext.length;o++)if(d.ext[o]==l)return d}}},i.findModeByFileName=function(l){for(var c=0;c<i.modeInfo.length;c++){var d=i.modeInfo[c];if(d.file&&d.file.test(l))return d}var o=l.lastIndexOf("."),h=o>-1&&l.substring(o+1,l.length);if(h)return i.findModeByExtension(h)},i.findModeByName=function(l){l=l.toLowerCase();for(var c=0;c<i.modeInfo.length;c++){var d=i.modeInfo[c];if(d.name.toLowerCase()==l)return d;if(d.alias){for(var o=0;o<d.alias.length;o++)if(d.alias[o].toLowerCase()==l)return d}}}})});var gd=Me((pd,md)=>{(function(i){typeof pd=="object"&&typeof md=="object"?i(Tt(),wa(),hd()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("markdown",function(t,n){var l=i.getMode(t,"text/html"),c=l.name=="null";function d(F){if(i.findModeByName){var A=i.findModeByName(F);A&&(F=A.mime||A.mimes[0])}var be=i.getMode(t,F);return be.name=="null"?null:be}n.highlightFormatting===void 0&&(n.highlightFormatting=!1),n.maxBlockquoteDepth===void 0&&(n.maxBlockquoteDepth=0),n.taskLists===void 0&&(n.taskLists=!1),n.strikethrough===void 0&&(n.strikethrough=!1),n.emoji===void 0&&(n.emoji=!1),n.fencedCodeBlockHighlighting===void 0&&(n.fencedCodeBlockHighlighting=!0),n.fencedCodeBlockDefaultMode===void 0&&(n.fencedCodeBlockDefaultMode="text/plain"),n.xml===void 0&&(n.xml=!0),n.tokenTypeOverrides===void 0&&(n.tokenTypeOverrides={});var o={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 o)o.hasOwnProperty(h)&&n.tokenTypeOverrides[h]&&(o[h]=n.tokenTypeOverrides[h]);var f=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,g=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,v=/^ {0,3}(?:\={1,}|-{2,})\s*$/,b=/^[^#!\[\]*_\\<>` "'(~:]+/,k=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,w=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,I=" ";function S(F,A,be){return A.f=A.inline=be,be(F,A)}function N(F,A,be){return A.f=A.block=be,be(F,A)}function O(F){return!F||!/\S/.test(F.string)}function j(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==ee){var A=c;if(!A){var be=i.innerMode(l,F.htmlState);A=be.mode.name=="xml"&&be.state.tagStart===null&&!be.state.context&&be.state.tokenize.isInText}A&&(F.f=q,F.block=U,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function U(F,A){var be=F.column()===A.indentation,Fe=O(A.prevLine.stream),xe=A.indentedCode,_e=A.prevLine.hr,ze=A.list!==!1,qe=(A.listStack[A.listStack.length-1]||0)+3;A.indentedCode=!1;var ge=A.indentation;if(A.indentationDiff===null&&(A.indentationDiff=A.indentation,ze)){for(A.list=null;ge<A.listStack[A.listStack.length-1];)A.listStack.pop(),A.listStack.length?A.indentation=A.listStack[A.listStack.length-1]:A.list=!1;A.list!==!1&&(A.indentationDiff=ge-A.listStack[A.listStack.length-1])}var ke=!Fe&&!_e&&!A.prevLine.header&&(!ze||!xe)&&!A.prevLine.fencedCodeEnd,je=(A.list===!1||_e||Fe)&&A.indentation<=qe&&F.match(f),at=null;if(A.indentationDiff>=4&&(xe||A.prevLine.fencedCodeEnd||A.prevLine.header||Fe))return F.skipToEnd(),A.indentedCode=!0,o.code;if(F.eatSpace())return null;if(be&&A.indentation<=qe&&(at=F.match(g))&&at[1].length<=6)return A.quote=0,A.header=at[1].length,A.thisLine.header=!0,n.highlightFormatting&&(A.formatting="header"),A.f=A.inline,W(A);if(A.indentation<=qe&&F.eat(">"))return A.quote=be?1:A.quote+1,n.highlightFormatting&&(A.formatting="quote"),F.eatSpace(),W(A);if(!je&&!A.setext&&be&&A.indentation<=qe&&(at=F.match(p))){var gt=at[1]?"ol":"ul";return A.indentation=ge+F.current().length,A.list=!0,A.quote=0,A.listStack.push(A.indentation),A.em=!1,A.strong=!1,A.code=!1,A.strikethrough=!1,n.taskLists&&F.match(y,!1)&&(A.taskList=!0),A.f=A.inline,n.highlightFormatting&&(A.formatting=["list","list-"+gt]),W(A)}else{if(be&&A.indentation<=qe&&(at=F.match(k,!0)))return A.quote=0,A.fencedEndRE=new RegExp(at[1]+"+ *$"),A.localMode=n.fencedCodeBlockHighlighting&&d(at[2]||n.fencedCodeBlockDefaultMode),A.localMode&&(A.localState=i.startState(A.localMode)),A.f=A.block=V,n.highlightFormatting&&(A.formatting="code-block"),A.code=-1,W(A);if(A.setext||(!ke||!ze)&&!A.quote&&A.list===!1&&!A.code&&!je&&!E.test(F.string)&&(at=F.lookAhead(1))&&(at=at.match(v)))return A.setext?(A.header=A.setext,A.setext=0,F.skipToEnd(),n.highlightFormatting&&(A.formatting="header")):(A.header=at[0].charAt(0)=="="?1:2,A.setext=A.header),A.thisLine.header=!0,A.f=A.inline,W(A);if(je)return F.skipToEnd(),A.hr=!0,A.thisLine.hr=!0,o.hr;if(F.peek()==="[")return S(F,A,P)}return S(F,A,A.inline)}function ee(F,A){var be=l.token(F,A.htmlState);if(!c){var Fe=i.innerMode(l,A.htmlState);(Fe.mode.name=="xml"&&Fe.state.tagStart===null&&!Fe.state.context&&Fe.state.tokenize.isInText||A.md_inside&&F.current().indexOf(">")>-1)&&(A.f=q,A.block=U,A.htmlState=null)}return be}function V(F,A){var be=A.listStack[A.listStack.length-1]||0,Fe=A.indentation<be,xe=be+3;if(A.fencedEndRE&&A.indentation<=xe&&(Fe||F.match(A.fencedEndRE))){n.highlightFormatting&&(A.formatting="code-block");var _e;return Fe||(_e=W(A)),A.localMode=A.localState=null,A.block=U,A.f=q,A.fencedEndRE=null,A.code=0,A.thisLine.fencedCodeEnd=!0,Fe?N(F,A,A.block):_e}else return A.localMode?A.localMode.token(F,A.localState):(F.skipToEnd(),o.code)}function W(F){var A=[];if(F.formatting){A.push(o.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var be=0;be<F.formatting.length;be++)A.push(o.formatting+"-"+F.formatting[be]),F.formatting[be]==="header"&&A.push(o.formatting+"-"+F.formatting[be]+"-"+F.header),F.formatting[be]==="quote"&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=F.quote?A.push(o.formatting+"-"+F.formatting[be]+"-"+F.quote):A.push("error"))}if(F.taskOpen)return A.push("meta"),A.length?A.join(" "):null;if(F.taskClosed)return A.push("property"),A.length?A.join(" "):null;if(F.linkHref?A.push(o.linkHref,"url"):(F.strong&&A.push(o.strong),F.em&&A.push(o.em),F.strikethrough&&A.push(o.strikethrough),F.emoji&&A.push(o.emoji),F.linkText&&A.push(o.linkText),F.code&&A.push(o.code),F.image&&A.push(o.image),F.imageAltText&&A.push(o.imageAltText,"link"),F.imageMarker&&A.push(o.imageMarker)),F.header&&A.push(o.header,o.header+"-"+F.header),F.quote&&(A.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=F.quote?A.push(o.quote+"-"+F.quote):A.push(o.quote+"-"+n.maxBlockquoteDepth)),F.list!==!1){var Fe=(F.listStack.length-1)%3;Fe?Fe===1?A.push(o.list2):A.push(o.list3):A.push(o.list1)}return F.trailingSpaceNewLine?A.push("trailing-space-new-line"):F.trailingSpace&&A.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),A.length?A.join(" "):null}function K(F,A){if(F.match(b,!0))return W(A)}function q(F,A){var be=A.text(F,A);if(typeof be!="undefined")return be;if(A.list)return A.list=null,W(A);if(A.taskList){var Fe=F.match(y,!0)[1]===" ";return Fe?A.taskOpen=!0:A.taskClosed=!0,n.highlightFormatting&&(A.formatting="task"),A.taskList=!1,W(A)}if(A.taskOpen=!1,A.taskClosed=!1,A.header&&F.match(/^#+$/,!0))return n.highlightFormatting&&(A.formatting="header"),W(A);var xe=F.next();if(A.linkTitle){A.linkTitle=!1;var _e=xe;xe==="("&&(_e=")"),_e=(_e+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ze="^\\s*(?:[^"+_e+"\\\\]+|\\\\\\\\|\\\\.)"+_e;if(F.match(new RegExp(ze),!0))return o.linkHref}if(xe==="`"){var qe=A.formatting;n.highlightFormatting&&(A.formatting="code"),F.eatWhile("`");var ge=F.current().length;if(A.code==0&&(!A.quote||ge==1))return A.code=ge,W(A);if(ge==A.code){var ke=W(A);return A.code=0,ke}else return A.formatting=qe,W(A)}else if(A.code)return W(A);if(xe==="\\"&&(F.next(),n.highlightFormatting)){var je=W(A),at=o.formatting+"-escape";return je?je+" "+at:at}if(xe==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return A.imageMarker=!0,A.image=!0,n.highlightFormatting&&(A.formatting="image"),W(A);if(xe==="["&&A.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return A.imageMarker=!1,A.imageAltText=!0,n.highlightFormatting&&(A.formatting="image"),W(A);if(xe==="]"&&A.imageAltText){n.highlightFormatting&&(A.formatting="image");var je=W(A);return A.imageAltText=!1,A.image=!1,A.inline=A.f=T,je}if(xe==="["&&!A.image)return A.linkText&&F.match(/^.*?\]/)||(A.linkText=!0,n.highlightFormatting&&(A.formatting="link")),W(A);if(xe==="]"&&A.linkText){n.highlightFormatting&&(A.formatting="link");var je=W(A);return A.linkText=!1,A.inline=A.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?T:q,je}if(xe==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){A.f=A.inline=R,n.highlightFormatting&&(A.formatting="link");var je=W(A);return je?je+=" ":je="",je+o.linkInline}if(xe==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){A.f=A.inline=R,n.highlightFormatting&&(A.formatting="link");var je=W(A);return je?je+=" ":je="",je+o.linkEmail}if(n.xml&&xe==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var gt=F.string.indexOf(">",F.pos);if(gt!=-1){var Re=F.string.substring(F.start,gt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Re)&&(A.md_inside=!0)}return F.backUp(1),A.htmlState=i.startState(l),N(F,A,ee)}if(n.xml&&xe==="<"&&F.match(/^\/\w*?>/))return A.md_inside=!1,"tag";if(xe==="*"||xe==="_"){for(var Ie=1,Be=F.pos==1?" ":F.string.charAt(F.pos-2);Ie<3&&F.eat(xe);)Ie++;var Ke=F.peek()||" ",He=!/\s/.test(Ke)&&(!w.test(Ke)||/\s/.test(Be)||w.test(Be)),Je=!/\s/.test(Be)&&(!w.test(Be)||/\s/.test(Ke)||w.test(Ke)),Se=null,X=null;if(Ie%2&&(!A.em&&He&&(xe==="*"||!Je||w.test(Be))?Se=!0:A.em==xe&&Je&&(xe==="*"||!He||w.test(Ke))&&(Se=!1)),Ie>1&&(!A.strong&&He&&(xe==="*"||!Je||w.test(Be))?X=!0:A.strong==xe&&Je&&(xe==="*"||!He||w.test(Ke))&&(X=!1)),X!=null||Se!=null){n.highlightFormatting&&(A.formatting=Se==null?"strong":X==null?"em":"strong em"),Se===!0&&(A.em=xe),X===!0&&(A.strong=xe);var ke=W(A);return Se===!1&&(A.em=!1),X===!1&&(A.strong=!1),ke}}else if(xe===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return W(A);F.backUp(1)}if(n.strikethrough){if(xe==="~"&&F.eatWhile(xe)){if(A.strikethrough){n.highlightFormatting&&(A.formatting="strikethrough");var ke=W(A);return A.strikethrough=!1,ke}else if(F.match(/^[^\s]/,!1))return A.strikethrough=!0,n.highlightFormatting&&(A.formatting="strikethrough"),W(A)}else if(xe===" "&&F.match("~~",!0)){if(F.peek()===" ")return W(A);F.backUp(2)}}if(n.emoji&&xe===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){A.emoji=!0,n.highlightFormatting&&(A.formatting="emoji");var de=W(A);return A.emoji=!1,de}return xe===" "&&(F.match(/^ +$/,!1)?A.trailingSpace++:A.trailingSpace&&(A.trailingSpaceNewLine=!0)),W(A)}function R(F,A){var be=F.next();if(be===">"){A.f=A.inline=q,n.highlightFormatting&&(A.formatting="link");var Fe=W(A);return Fe?Fe+=" ":Fe="",Fe+o.linkInline}return F.match(/^[^>]+/,!0),o.linkInline}function T(F,A){if(F.eatSpace())return null;var be=F.next();return be==="("||be==="["?(A.f=A.inline=Z(be==="("?")":"]"),n.highlightFormatting&&(A.formatting="link-string"),A.linkHref=!0,W(A)):"error"}var H={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Z(F){return function(A,be){var Fe=A.next();if(Fe===F){be.f=be.inline=q,n.highlightFormatting&&(be.formatting="link-string");var xe=W(be);return be.linkHref=!1,xe}return A.match(H[F]),be.linkHref=!0,W(be)}}function P(F,A){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(A.f=z,F.next(),n.highlightFormatting&&(A.formatting="link"),A.linkText=!0,W(A)):S(F,A,q)}function z(F,A){if(F.match("]:",!0)){A.f=A.inline=ne,n.highlightFormatting&&(A.formatting="link");var be=W(A);return A.linkText=!1,be}return F.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function ne(F,A){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?A.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),A.f=A.inline=q,o.linkHref+" url")}var ae={startState:function(){return{f:U,prevLine:{stream:null},thisLine:{stream:null},block:U,htmlState:null,indentation:0,inline:q,text:K,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&&i.copyState(l,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?i.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,A){if(A.formatting=!1,F!=A.thisLine.stream){if(A.header=0,A.hr=!1,F.match(/^\s*$/,!0))return j(A),null;if(A.prevLine=A.thisLine,A.thisLine={stream:F},A.taskList=!1,A.trailingSpace=0,A.trailingSpaceNewLine=!1,!A.localState&&(A.f=A.block,A.f!=ee)){var be=F.match(/^\s*/,!0)[0].replace(/\t/g,I).length;if(A.indentation=be,A.indentationDiff=null,be>0)return null}}return A.f(F,A)},innerMode:function(F){return F.block==ee?{state:F.htmlState,mode:l}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:ae}},indent:function(F,A,be){return F.block==ee&&l.indent?l.indent(F.htmlState,A,be):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,A,be):i.Pass},blankLine:j,getType:W,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ae},"xml"),i.defineMIME("text/markdown","markdown"),i.defineMIME("text/x-markdown","markdown")})});var bd=Me((vd,yd)=>{(function(i){typeof vd=="object"&&typeof yd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("mllike",function(t,n){var l={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"},c=n.extraWords||{};for(var d in c)c.hasOwnProperty(d)&&(l[d]=n.extraWords[d]);var o=[];for(var h in l)o.push(h);i.registerHelper("hintWords","mllike",o);function f(v,b){var k=v.next();if(k==='"')return b.tokenize=p,b.tokenize(v,b);if(k==="{"&&v.eat("|"))return b.longString=!0,b.tokenize=g,b.tokenize(v,b);if(k==="("&&v.match(/^\*(?!\))/))return b.commentLevel++,b.tokenize=y,b.tokenize(v,b);if(k==="~"||k==="?")return v.eatWhile(/\w/),"variable-2";if(k==="`")return v.eatWhile(/\w/),"quote";if(k==="/"&&n.slashComments&&v.eat("/"))return v.skipToEnd(),"comment";if(/\d/.test(k))return k==="0"&&v.eat(/[bB]/)&&v.eatWhile(/[01]/),k==="0"&&v.eat(/[xX]/)&&v.eatWhile(/[0-9a-fA-F]/),k==="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(k))return"operator";if(/[\w\xa1-\uffff]/.test(k)){v.eatWhile(/[\w\xa1-\uffff]/);var E=v.current();return l.hasOwnProperty(E)?l[E]:"variable"}return null}function p(v,b){for(var k,E=!1,w=!1;(k=v.next())!=null;){if(k==='"'&&!w){E=!0;break}w=!w&&k==="\\"}return E&&!w&&(b.tokenize=f),"string"}function y(v,b){for(var k,E;b.commentLevel>0&&(E=v.next())!=null;)k==="("&&E==="*"&&b.commentLevel++,k==="*"&&E===")"&&b.commentLevel--,k=E;return b.commentLevel<=0&&(b.tokenize=f),"comment"}function g(v,b){for(var k,E;b.longString&&(E=v.next())!=null;)k==="|"&&E==="}"&&(b.longString=!1),k=E;return b.longString||(b.tokenize=f),"string"}return{startState:function(){return{tokenize:f,commentLevel:0,longString:!1}},token:function(v,b){return v.eatSpace()?null:b.tokenize(v,b)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:n.slashComments?"//":null}}),i.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"}}),i.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}),i.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 kd=Me((xd,wd)=>{(function(i){typeof xd=="object"&&typeof wd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("nginx",function(t){function n(b){for(var k={},E=b.split(" "),w=0;w<E.length;++w)k[E[w]]=!0;return k}var l=n("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),c=n("http mail events server types location upstream charset_map limit_except if geo map"),d=n("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),o=t.indentUnit,h;function f(b,k){return h=k,b}function p(b,k){b.eatWhile(/[\w\$_]/);var E=b.current();if(l.propertyIsEnumerable(E))return"keyword";if(c.propertyIsEnumerable(E))return"variable-2";if(d.propertyIsEnumerable(E))return"string-2";var w=b.next();if(w=="@")return b.eatWhile(/[\w\\\-]/),f("meta",b.current());if(w=="/"&&b.eat("*"))return k.tokenize=y,y(b,k);if(w=="<"&&b.eat("!"))return k.tokenize=g,g(b,k);if(w=="=")f(null,"compare");else return(w=="~"||w=="|")&&b.eat("=")?f(null,"compare"):w=='"'||w=="'"?(k.tokenize=v(w),k.tokenize(b,k)):w=="#"?(b.skipToEnd(),f("comment","comment")):w=="!"?(b.match(/^\s*\w*/),f("keyword","important")):/\d/.test(w)?(b.eatWhile(/[\w.%]/),f("number","unit")):/[,.+>*\/]/.test(w)?f(null,"select-op"):/[;{}:\[\]]/.test(w)?f(null,w):(b.eatWhile(/[\w\\\-]/),f("variable","variable"))}function y(b,k){for(var E=!1,w;(w=b.next())!=null;){if(E&&w=="/"){k.tokenize=p;break}E=w=="*"}return f("comment","comment")}function g(b,k){for(var E=0,w;(w=b.next())!=null;){if(E>=2&&w==">"){k.tokenize=p;break}E=w=="-"?E+1:0}return f("comment","comment")}function v(b){return function(k,E){for(var w=!1,I;(I=k.next())!=null&&!(I==b&&!w);)w=!w&&I=="\\";return w||(E.tokenize=p),f("string","string")}}return{startState:function(b){return{tokenize:p,baseIndent:b||0,stack:[]}},token:function(b,k){if(b.eatSpace())return null;h=null;var E=k.tokenize(b,k),w=k.stack[k.stack.length-1];return h=="hash"&&w=="rule"?E="atom":E=="variable"&&(w=="rule"?E="number":(!w||w=="@media{")&&(E="tag")),w=="rule"&&/^[\{\};]$/.test(h)&&k.stack.pop(),h=="{"?w=="@media"?k.stack[k.stack.length-1]="@media{":k.stack.push("{"):h=="}"?k.stack.pop():h=="@media"?k.stack.push("@media"):w=="{"&&h!="comment"&&k.stack.push("rule"),E},indent:function(b,k){var E=b.stack.length;return/^\}/.test(k)&&(E-=b.stack[b.stack.length-1]=="rule"?2:1),b.baseIndent+E*o},electricChars:"}"}}),i.defineMIME("text/x-nginx-conf","nginx")})});var Ed=Me((_d,Sd)=>{(function(i){typeof _d=="object"&&typeof Sd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("perl",function(){var d={"->":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},o="string-2",h=/[goseximacplud]/;function f(g,v,b,k,E){return v.chain=null,v.style=null,v.tail=null,v.tokenize=function(w,I){for(var S=!1,N,O=0;N=w.next();){if(N===b[O]&&!S)return b[++O]!==void 0?(I.chain=b[O],I.style=k,I.tail=E):E&&w.eatWhile(E),I.tokenize=y,k;S=!S&&N=="\\"}return k},v.tokenize(g,v)}function p(g,v,b){return v.tokenize=function(k,E){return k.string==b&&(E.tokenize=y),k.skipToEnd(),"string"},v.tokenize(g,v)}function y(g,v){if(g.eatSpace())return null;if(v.chain)return f(g,v,v.chain,v.style,v.tail);if(g.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if(g.match(/^<<(?=[_a-zA-Z])/))return g.eatWhile(/\w/),p(g,v,g.current().substr(2));if(g.sol()&&g.match(/^\=item(?!\w)/))return p(g,v,"=cut");var b=g.next();if(b=='"'||b=="'"){if(n(g,3)=="<<"+b){var k=g.pos;g.eatWhile(/\w/);var E=g.current().substr(1);if(E&&g.eat(b))return p(g,v,E);g.pos=k}return f(g,v,[b],"string")}if(b=="q"){var w=t(g,-2);if(!(w&&/\w/.test(w))){if(w=t(g,0),w=="x"){if(w=t(g,1),w=="(")return c(g,2),f(g,v,[")"],o,h);if(w=="[")return c(g,2),f(g,v,["]"],o,h);if(w=="{")return c(g,2),f(g,v,["}"],o,h);if(w=="<")return c(g,2),f(g,v,[">"],o,h);if(/[\^'"!~\/]/.test(w))return c(g,1),f(g,v,[g.eat(w)],o,h)}else if(w=="q"){if(w=t(g,1),w=="(")return c(g,2),f(g,v,[")"],"string");if(w=="[")return c(g,2),f(g,v,["]"],"string");if(w=="{")return c(g,2),f(g,v,["}"],"string");if(w=="<")return c(g,2),f(g,v,[">"],"string");if(/[\^'"!~\/]/.test(w))return c(g,1),f(g,v,[g.eat(w)],"string")}else if(w=="w"){if(w=t(g,1),w=="(")return c(g,2),f(g,v,[")"],"bracket");if(w=="[")return c(g,2),f(g,v,["]"],"bracket");if(w=="{")return c(g,2),f(g,v,["}"],"bracket");if(w=="<")return c(g,2),f(g,v,[">"],"bracket");if(/[\^'"!~\/]/.test(w))return c(g,1),f(g,v,[g.eat(w)],"bracket")}else if(w=="r"){if(w=t(g,1),w=="(")return c(g,2),f(g,v,[")"],o,h);if(w=="[")return c(g,2),f(g,v,["]"],o,h);if(w=="{")return c(g,2),f(g,v,["}"],o,h);if(w=="<")return c(g,2),f(g,v,[">"],o,h);if(/[\^'"!~\/]/.test(w))return c(g,1),f(g,v,[g.eat(w)],o,h)}else if(/[\^'"!~\/(\[{<]/.test(w)){if(w=="(")return c(g,1),f(g,v,[")"],"string");if(w=="[")return c(g,1),f(g,v,["]"],"string");if(w=="{")return c(g,1),f(g,v,["}"],"string");if(w=="<")return c(g,1),f(g,v,[">"],"string");if(/[\^'"!~\/]/.test(w))return f(g,v,[g.eat(w)],"string")}}}if(b=="m"){var w=t(g,-2);if(!(w&&/\w/.test(w))&&(w=g.eat(/[(\[{<\^'"!~\/]/),w)){if(/[\^'"!~\/]/.test(w))return f(g,v,[w],o,h);if(w=="(")return f(g,v,[")"],o,h);if(w=="[")return f(g,v,["]"],o,h);if(w=="{")return f(g,v,["}"],o,h);if(w=="<")return f(g,v,[">"],o,h)}}if(b=="s"){var w=/[\/>\]})\w]/.test(t(g,-2));if(!w&&(w=g.eat(/[(\[{<\^'"!~\/]/),w))return w=="["?f(g,v,["]","]"],o,h):w=="{"?f(g,v,["}","}"],o,h):w=="<"?f(g,v,[">",">"],o,h):w=="("?f(g,v,[")",")"],o,h):f(g,v,[w,w],o,h)}if(b=="y"){var w=/[\/>\]})\w]/.test(t(g,-2));if(!w&&(w=g.eat(/[(\[{<\^'"!~\/]/),w))return w=="["?f(g,v,["]","]"],o,h):w=="{"?f(g,v,["}","}"],o,h):w=="<"?f(g,v,[">",">"],o,h):w=="("?f(g,v,[")",")"],o,h):f(g,v,[w,w],o,h)}if(b=="t"){var w=/[\/>\]})\w]/.test(t(g,-2));if(!w&&(w=g.eat("r"),w&&(w=g.eat(/[(\[{<\^'"!~\/]/),w)))return w=="["?f(g,v,["]","]"],o,h):w=="{"?f(g,v,["}","}"],o,h):w=="<"?f(g,v,[">",">"],o,h):w=="("?f(g,v,[")",")"],o,h):f(g,v,[w,w],o,h)}if(b=="`")return f(g,v,[b],"variable-2");if(b=="/")return/~\s*$/.test(n(g))?f(g,v,[b],o,h):"operator";if(b=="$"){var k=g.pos;if(g.eatWhile(/\d/)||g.eat("{")&&g.eatWhile(/\d/)&&g.eat("}"))return"variable-2";g.pos=k}if(/[$@%]/.test(b)){var k=g.pos;if(g.eat("^")&&g.eat(/[A-Z]/)||!/[@$%&]/.test(t(g,-2))&&g.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var w=g.current();if(d[w])return"variable-2"}g.pos=k}if(/[$@%&]/.test(b)&&(g.eatWhile(/[\w$]/)||g.eat("{")&&g.eatWhile(/[\w$]/)&&g.eat("}"))){var w=g.current();return d[w]?"variable-2":"variable"}if(b=="#"&&t(g,-2)!="$")return g.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(b)){var k=g.pos;if(g.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),d[g.current()])return"operator";g.pos=k}if(b=="_"&&g.pos==1){if(l(g,6)=="_END__")return f(g,v,["\0"],"comment");if(l(g,7)=="_DATA__")return f(g,v,["\0"],"variable-2");if(l(g,7)=="_C__")return f(g,v,["\0"],"string")}if(/\w/.test(b)){var k=g.pos;if(t(g,-2)=="{"&&(t(g,0)=="}"||g.eatWhile(/\w/)&&t(g,0)=="}"))return"string";g.pos=k}if(/[A-Z]/.test(b)){var I=t(g,-2),k=g.pos;if(g.eatWhile(/[A-Z_]/),/[\da-z]/.test(t(g,0)))g.pos=k;else{var w=d[g.current()];return w?(w[1]&&(w=w[0]),I!=":"?w==1?"keyword":w==2?"def":w==3?"atom":w==4?"operator":w==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(b)){var I=t(g,-2);g.eatWhile(/\w/);var w=d[g.current()];return w?(w[1]&&(w=w[0]),I!=":"?w==1?"keyword":w==2?"def":w==3?"atom":w==4?"operator":w==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(g,v){return(v.tokenize||y)(g,v)},lineComment:"#"}}),i.registerHelper("wordChars","perl",/[\w$]/),i.defineMIME("text/x-perl","perl");function t(d,o){return d.string.charAt(d.pos+(o||0))}function n(d,o){if(o){var h=d.pos-o;return d.string.substr(h>=0?h:0,o)}else return d.string.substr(0,d.pos-1)}function l(d,o){var h=d.string.length,f=h-d.pos+1;return d.string.substr(d.pos,o&&o<h?o:f)}function c(d,o){var h=d.pos+o,f;h<=0?d.pos=0:h>=(f=d.string.length-1)?d.pos=f:d.pos=h}})});var Ad=Me((Cd,Td)=>{(function(i){typeof Cd=="object"&&typeof Td=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("pascal",function(){function t(p){for(var y={},g=p.split(" "),v=0;v<g.length;++v)y[g[v]]=!0;return y}var n=t("absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write"),l={null:!0},c=/[+\-*&%=<>!?|\/]/;function d(p,y){var g=p.next();if(g=="#"&&y.startOfLine)return p.skipToEnd(),"meta";if(g=='"'||g=="'")return y.tokenize=o(g),y.tokenize(p,y);if(g=="("&&p.eat("*"))return y.tokenize=h,h(p,y);if(g=="{")return y.tokenize=f,f(p,y);if(/[\[\]\(\),;\:\.]/.test(g))return null;if(/\d/.test(g))return p.eatWhile(/[\w\.]/),"number";if(g=="/"&&p.eat("/"))return p.skipToEnd(),"comment";if(c.test(g))return p.eatWhile(c),"operator";p.eatWhile(/[\w\$_]/);var v=p.current();return n.propertyIsEnumerable(v)?"keyword":l.propertyIsEnumerable(v)?"atom":"variable"}function o(p){return function(y,g){for(var v=!1,b,k=!1;(b=y.next())!=null;){if(b==p&&!v){k=!0;break}v=!v&&b=="\\"}return(k||!v)&&(g.tokenize=null),"string"}}function h(p,y){for(var g=!1,v;v=p.next();){if(v==")"&&g){y.tokenize=null;break}g=v=="*"}return"comment"}function f(p,y){for(var g;g=p.next();)if(g=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(p,y){if(p.eatSpace())return null;var g=(y.tokenize||d)(p,y);return g=="comment"||g=="meta",g},electricChars:"{}"}}),i.defineMIME("text/x-pascal","pascal")})});var Id=Me((Ld,Dd)=>{(function(i){typeof Ld=="object"&&typeof Dd=="object"?i(Tt(),nl(),tl()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],i):i(CodeMirror)})(function(i){"use strict";function t(p){for(var y={},g=p.split(" "),v=0;v<g.length;++v)y[g[v]]=!0;return y}function n(p,y,g){return p.length==0?l(y):function(v,b){for(var k=p[0],E=0;E<k.length;E++)if(v.match(k[E][0]))return b.tokenize=n(p.slice(1),y),k[E][1];return b.tokenize=l(y,g),"string"}}function l(p,y){return function(g,v){return c(g,v,p,y)}}function c(p,y,g,v){if(v!==!1&&p.match("${",!1)||p.match("{$",!1))return y.tokenize=null,"string";if(v!==!1&&p.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return p.match("[",!1)&&(y.tokenize=n([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],g,v)),p.match(/^->\w/,!1)&&(y.tokenize=n([[["->",null]],[[/[\w]+/,"variable"]]],g,v)),"variable-2";for(var b=!1;!p.eol()&&(b||v===!1||!p.match("{$",!1)&&!p.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!b&&p.match(g)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}b=p.next()=="\\"&&!b}return"string"}var d="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile enum 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 readonly match",o="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 memory_get_peak_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";i.registerHelper("hintWords","php",[d,o,h].join(" ").split(" ")),i.registerHelper("wordChars","php",/[\w$]/);var f={name:"clike",helperType:"php",keywords:t(d),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class enum function interface namespace trait"),atoms:t(o),builtin:t(h),multiLineStrings:!0,hooks:{$:function(p){return p.eatWhile(/[\w\$_]/),"variable-2"},"<":function(p,y){var g;if(g=p.match(/^<<\s*/)){var v=p.eat(/['"]/);p.eatWhile(/[\w\.]/);var b=p.current().slice(g[0].length+(v?2:1));if(v&&p.eat(v),b)return(y.tokStack||(y.tokStack=[])).push(b,0),y.tokenize=l(b,v!="'"),"string"}return!1},"#":function(p){for(;!p.eol()&&!p.match("?>",!1);)p.next();return"comment"},"/":function(p){if(p.eat("/")){for(;!p.eol()&&!p.match("?>",!1);)p.next();return"comment"}return!1},'"':function(p,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=l('"'),"string"},"{":function(p,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(p,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=l(y.tokStack[y.tokStack.length-2])),!1}}};i.defineMode("php",function(p,y){var g=i.getMode(p,y&&y.htmlMode||"text/html"),v=i.getMode(p,f);function b(k,E){var w=E.curMode==v;if(k.sol()&&E.pending&&E.pending!='"'&&E.pending!="'"&&(E.pending=null),w)return w&&E.php.tokenize==null&&k.match("?>")?(E.curMode=g,E.curState=E.html,E.php.context.prev||(E.php=null),"meta"):v.token(k,E.curState);if(k.match(/^<\?\w*/))return E.curMode=v,E.php||(E.php=i.startState(v,g.indent(E.html,"",""))),E.curState=E.php,"meta";if(E.pending=='"'||E.pending=="'"){for(;!k.eol()&&k.next()!=E.pending;);var I="string"}else if(E.pending&&k.pos<E.pending.end){k.pos=E.pending.end;var I=E.pending.style}else var I=g.token(k,E.curState);E.pending&&(E.pending=null);var S=k.current(),N=S.search(/<\?/),O;return N!=-1&&(I=="string"&&(O=S.match(/[\'\"]$/))&&!/\?>/.test(S)?E.pending=O[0]:E.pending={end:k.pos,style:I},k.backUp(S.length-N)),I}return{startState:function(){var k=i.startState(g),E=y.startOpen?i.startState(v):null;return{html:k,php:E,curMode:y.startOpen?v:g,curState:y.startOpen?E:k,pending:null}},copyState:function(k){var E=k.html,w=i.copyState(g,E),I=k.php,S=I&&i.copyState(v,I),N;return k.curMode==g?N=w:N=S,{html:w,php:S,curMode:k.curMode,curState:N,pending:k.pending}},token:b,indent:function(k,E,w){return k.curMode!=v&&/^\s*<\//.test(E)||k.curMode==v&&/^\?>/.test(E)?g.indent(k.html,E,w):k.curMode.indent(k.curState,E,w)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(k){return{state:k.curState,mode:k.curMode}}}},"htmlmixed","clike"),i.defineMIME("application/x-httpd-php","php"),i.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),i.defineMIME("text/x-php",f)})});var Od=Me((Fd,Md)=>{(function(i){"use strict";typeof Fd=="object"&&typeof Md=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(window.CodeMirror)})(function(i){"use strict";i.defineMode("powershell",function(){function t(R,T){T=T||{};for(var H=T.prefix!==void 0?T.prefix:"^",Z=T.suffix!==void 0?T.suffix:"\\b",P=0;P<R.length;P++)R[P]instanceof RegExp?R[P]=R[P].source:R[P]=R[P].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(H+"("+R.join("|")+")"+Z,"i")}var n="(?=[^A-Za-z\\d\\-_]|$)",l=/[\w\-:]/,c=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:n}),d=/[\[\]{},;`\\\.]|@[({]/,o=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=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,f=t([o,h],{suffix:""}),p=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,y=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,g=/[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:""}),b=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:""}),k=t([g,v,b],{suffix:n}),E={keyword:c,number:p,operator:f,builtin:k,punctuation:d,identifier:y};function w(R,T){var H=T.returnStack[T.returnStack.length-1];if(H&&H.shouldReturnFrom(T))return T.tokenize=H.tokenize,T.returnStack.pop(),T.tokenize(R,T);if(R.eatSpace())return null;if(R.eat("("))return T.bracketNesting+=1,"punctuation";if(R.eat(")"))return T.bracketNesting-=1,"punctuation";for(var Z in E)if(R.match(E[Z]))return Z;var P=R.next();if(P==="'")return I(R,T);if(P==="$")return V(R,T);if(P==='"')return S(R,T);if(P==="<"&&R.eat("#"))return T.tokenize=ee,ee(R,T);if(P==="#")return R.skipToEnd(),"comment";if(P==="@"){var z=R.eat(/["']/);if(z&&R.eol())return T.tokenize=K,T.startQuote=z[0],K(R,T);if(R.eol())return"error";if(R.peek().match(/[({]/))return"punctuation";if(R.peek().match(l))return V(R,T)}return"error"}function I(R,T){for(var H;(H=R.peek())!=null;)if(R.next(),H==="'"&&!R.eat("'"))return T.tokenize=w,"string";return"error"}function S(R,T){for(var H;(H=R.peek())!=null;){if(H==="$")return T.tokenize=N,"string";if(R.next(),H==="`"){R.next();continue}if(H==='"'&&!R.eat('"'))return T.tokenize=w,"string"}return"error"}function N(R,T){return U(R,T,S)}function O(R,T){return T.tokenize=K,T.startQuote='"',K(R,T)}function j(R,T){return U(R,T,O)}function U(R,T,H){if(R.match("$(")){var Z=T.bracketNesting;return T.returnStack.push({shouldReturnFrom:function(P){return P.bracketNesting===Z},tokenize:H}),T.tokenize=w,T.bracketNesting+=1,"punctuation"}else return R.next(),T.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:H}),T.tokenize=V,T.tokenize(R,T)}function ee(R,T){for(var H=!1,Z;(Z=R.next())!=null;){if(H&&Z==">"){T.tokenize=w;break}H=Z==="#"}return"comment"}function V(R,T){var H=R.peek();return R.eat("{")?(T.tokenize=W,W(R,T)):H!=null&&H.match(l)?(R.eatWhile(l),T.tokenize=w,"variable-2"):(T.tokenize=w,"error")}function W(R,T){for(var H;(H=R.next())!=null;)if(H==="}"){T.tokenize=w;break}return"variable-2"}function K(R,T){var H=T.startQuote;if(R.sol()&&R.match(new RegExp(H+"@")))T.tokenize=w;else if(H==='"')for(;!R.eol();){var Z=R.peek();if(Z==="$")return T.tokenize=j,"string";R.next(),Z==="`"&&R.next()}else R.skipToEnd();return"string"}var q={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:w}},token:function(R,T){return T.tokenize(R,T)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return q}),i.defineMIME("application/x-powershell","powershell")})});var zd=Me((Pd,Rd)=>{(function(i){typeof Pd=="object"&&typeof Rd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("properties",function(){return{token:function(t,n){var l=t.sol()||n.afterSection,c=t.eol();if(n.afterSection=!1,l&&(n.nextMultiline?(n.inMultiline=!0,n.nextMultiline=!1):n.position="def"),c&&!n.nextMultiline&&(n.inMultiline=!1,n.position="def"),l)for(;t.eatSpace(););var d=t.next();return l&&(d==="#"||d==="!"||d===";")?(n.position="comment",t.skipToEnd(),"comment"):l&&d==="["?(n.afterSection=!0,t.skipTo("]"),t.eat("]"),"header"):d==="="||d===":"?(n.position="quote",null):(d==="\\"&&n.position==="quote"&&t.eol()&&(n.nextMultiline=!0),n.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),i.defineMIME("text/x-properties","properties"),i.defineMIME("text/x-ini","properties")})});var qd=Me((Nd,Bd)=>{(function(i){typeof Nd=="object"&&typeof Bd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";function t(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),l=["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"],c=["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__"];i.registerHelper("hintWords","python",l.concat(c));function d(h){return h.scopes[h.scopes.length-1]}i.defineMode("python",function(h,f){for(var p="error",y=f.delimiters||f.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,g=[f.singleOperators,f.doubleOperators,f.doubleDelimiters,f.tripleDelimiters,f.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],v=0;v<g.length;v++)g[v]||g.splice(v--,1);var b=f.hangingIndent||h.indentUnit,k=l,E=c;f.extra_keywords!=null&&(k=k.concat(f.extra_keywords)),f.extra_builtins!=null&&(E=E.concat(f.extra_builtins));var w=!(f.version&&Number(f.version)<3);if(w){var I=f.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;k=k.concat(["nonlocal","False","True","None","async","await"]),E=E.concat(["ascii","bytes","exec","print"]);var S=new RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`,"i")}else{var I=f.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;k=k.concat(["exec","print"]),E=E.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"]);var S=new RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`,"i")}var N=t(k),O=t(E);function j(H,Z){var P=H.sol()&&Z.lastToken!="\\";if(P&&(Z.indent=H.indentation()),P&&d(Z).type=="py"){var z=d(Z).offset;if(H.eatSpace()){var ne=H.indentation();return ne>z?W(Z):ne<z&&q(H,Z)&&H.peek()!="#"&&(Z.errorToken=!0),null}else{var ae=U(H,Z);return z>0&&q(H,Z)&&(ae+=" "+p),ae}}return U(H,Z)}function U(H,Z,P){if(H.eatSpace())return null;if(!P&&H.match(/^#.*/))return"comment";if(H.match(/^[0-9\.]/,!1)){var z=!1;if(H.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(z=!0),H.match(/^[\d_]+\.\d*/)&&(z=!0),H.match(/^\.\d+/)&&(z=!0),z)return H.eat(/J/i),"number";var ne=!1;if(H.match(/^0x[0-9a-f_]+/i)&&(ne=!0),H.match(/^0b[01_]+/i)&&(ne=!0),H.match(/^0o[0-7_]+/i)&&(ne=!0),H.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(H.eat(/J/i),ne=!0),H.match(/^0(?![\dx])/i)&&(ne=!0),ne)return H.eat(/L/i),"number"}if(H.match(S)){var ae=H.current().toLowerCase().indexOf("f")!==-1;return ae?(Z.tokenize=ee(H.current(),Z.tokenize),Z.tokenize(H,Z)):(Z.tokenize=V(H.current(),Z.tokenize),Z.tokenize(H,Z))}for(var F=0;F<g.length;F++)if(H.match(g[F]))return"operator";return H.match(y)?"punctuation":Z.lastToken=="."&&H.match(I)?"property":H.match(N)||H.match(n)?"keyword":H.match(O)?"builtin":H.match(/^(self|cls)\b/)?"variable-2":H.match(I)?Z.lastToken=="def"||Z.lastToken=="class"?"def":"variable":(H.next(),P?null:p)}function ee(H,Z){for(;"rubf".indexOf(H.charAt(0).toLowerCase())>=0;)H=H.substr(1);var P=H.length==1,z="string";function ne(F){return function(A,be){var Fe=U(A,be,!0);return Fe=="punctuation"&&(A.current()=="{"?be.tokenize=ne(F+1):A.current()=="}"&&(F>1?be.tokenize=ne(F-1):be.tokenize=ae)),Fe}}function ae(F,A){for(;!F.eol();)if(F.eatWhile(/[^'"\{\}\\]/),F.eat("\\")){if(F.next(),P&&F.eol())return z}else{if(F.match(H))return A.tokenize=Z,z;if(F.match("{{"))return z;if(F.match("{",!1))return A.tokenize=ne(0),F.current()?z:A.tokenize(F,A);if(F.match("}}"))return z;if(F.match("}"))return p;F.eat(/['"]/)}if(P){if(f.singleLineStringErrors)return p;A.tokenize=Z}return z}return ae.isString=!0,ae}function V(H,Z){for(;"rubf".indexOf(H.charAt(0).toLowerCase())>=0;)H=H.substr(1);var P=H.length==1,z="string";function ne(ae,F){for(;!ae.eol();)if(ae.eatWhile(/[^'"\\]/),ae.eat("\\")){if(ae.next(),P&&ae.eol())return z}else{if(ae.match(H))return F.tokenize=Z,z;ae.eat(/['"]/)}if(P){if(f.singleLineStringErrors)return p;F.tokenize=Z}return z}return ne.isString=!0,ne}function W(H){for(;d(H).type!="py";)H.scopes.pop();H.scopes.push({offset:d(H).offset+h.indentUnit,type:"py",align:null})}function K(H,Z,P){var z=H.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:H.column()+1;Z.scopes.push({offset:Z.indent+b,type:P,align:z})}function q(H,Z){for(var P=H.indentation();Z.scopes.length>1&&d(Z).offset>P;){if(d(Z).type!="py")return!0;Z.scopes.pop()}return d(Z).offset!=P}function R(H,Z){H.sol()&&(Z.beginningOfLine=!0,Z.dedent=!1);var P=Z.tokenize(H,Z),z=H.current();if(Z.beginningOfLine&&z=="@")return H.match(I,!1)?"meta":w?"operator":p;if(/\S/.test(z)&&(Z.beginningOfLine=!1),(P=="variable"||P=="builtin")&&Z.lastToken=="meta"&&(P="meta"),(z=="pass"||z=="return")&&(Z.dedent=!0),z=="lambda"&&(Z.lambda=!0),z==":"&&!Z.lambda&&d(Z).type=="py"&&H.match(/^\s*(?:#|$)/,!1)&&W(Z),z.length==1&&!/string|comment/.test(P)){var ne="[({".indexOf(z);if(ne!=-1&&K(H,Z,"])}".slice(ne,ne+1)),ne="])}".indexOf(z),ne!=-1)if(d(Z).type==z)Z.indent=Z.scopes.pop().offset-b;else return p}return Z.dedent&&H.eol()&&d(Z).type=="py"&&Z.scopes.length>1&&Z.scopes.pop(),P}var T={startState:function(H){return{tokenize:j,scopes:[{offset:H||0,type:"py",align:null}],indent:H||0,lastToken:null,lambda:!1,dedent:0}},token:function(H,Z){var P=Z.errorToken;P&&(Z.errorToken=!1);var z=R(H,Z);return z&&z!="comment"&&(Z.lastToken=z=="keyword"||z=="punctuation"?H.current():z),z=="punctuation"&&(z=null),H.eol()&&Z.lambda&&(Z.lambda=!1),P?z+" "+p:z},indent:function(H,Z){if(H.tokenize!=j)return H.tokenize.isString?i.Pass:0;var P=d(H),z=P.type==Z.charAt(0)||P.type=="py"&&!H.dedent&&/^(else:|elif |except |finally:)/.test(Z);return P.align!=null?P.align-(z?1:0):P.offset-(z?b:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return T}),i.defineMIME("text/x-python","python");var o=function(h){return h.split(" ")};i.defineMIME("text/x-cython",{name:"python",extra_keywords:o("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var jd=Me(($d,Ud)=>{(function(i){typeof $d=="object"&&typeof Ud=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";function t(f){for(var p={},y=0,g=f.length;y<g;++y)p[f[y]]=!0;return p}var n=["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"],l=t(n),c=t(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),d=t(["end","until"]),o={"[":"]","{":"}","(":")"},h={"]":"[","}":"{",")":"("};i.defineMode("ruby",function(f){var p;function y(S,N,O){return O.tokenize.push(S),S(N,O)}function g(S,N){if(S.sol()&&S.match("=begin")&&S.eol())return N.tokenize.push(I),"comment";if(S.eatSpace())return null;var O=S.next(),j;if(O=="`"||O=="'"||O=='"')return y(E(O,"string",O=='"'||O=="`"),S,N);if(O=="/")return v(S)?y(E(O,"string-2",!0),S,N):"operator";if(O=="%"){var U="string",ee=!0;S.eat("s")?U="atom":S.eat(/[WQ]/)?U="string":S.eat(/[r]/)?U="string-2":S.eat(/[wxq]/)&&(U="string",ee=!1);var V=S.eat(/[^\w\s=]/);return V?(o.propertyIsEnumerable(V)&&(V=o[V]),y(E(V,U,ee,!0),S,N)):"operator"}else{if(O=="#")return S.skipToEnd(),"comment";if(O=="<"&&(j=S.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return y(w(j[2],j[1]),S,N);if(O=="0")return S.eat("x")?S.eatWhile(/[\da-fA-F]/):S.eat("b")?S.eatWhile(/[01]/):S.eatWhile(/[0-7]/),"number";if(/\d/.test(O))return S.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if(O=="?"){for(;S.match(/^\\[CM]-/););return S.eat("\\")?S.eatWhile(/\w/):S.next(),"string"}else{if(O==":")return S.eat("'")?y(E("'","atom",!1),S,N):S.eat('"')?y(E('"',"atom",!0),S,N):S.eat(/[\<\>]/)?(S.eat(/[\<\>]/),"atom"):S.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":S.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(S.eatWhile(/[\w$\xa1-\uffff]/),S.eat(/[\?\!\=]/),"atom"):"operator";if(O=="@"&&S.match(/^@?[a-zA-Z_\xa1-\uffff]/))return S.eat("@"),S.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(O=="$")return S.eat(/[a-zA-Z_]/)?S.eatWhile(/[\w]/):S.eat(/\d/)?S.eat(/\d/):S.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(O))return S.eatWhile(/[\w\xa1-\uffff]/),S.eat(/[\?\!]/),S.eat(":")?"atom":"ident";if(O=="|"&&(N.varList||N.lastTok=="{"||N.lastTok=="do"))return p="|",null;if(/[\(\)\[\]{}\\;]/.test(O))return p=O,null;if(O=="-"&&S.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(O)){var W=S.eatWhile(/[=+\-\/*:\.^%<>~|]/);return O=="."&&!W&&(p="."),"operator"}else return null}}}function v(S){for(var N=S.pos,O=0,j,U=!1,ee=!1;(j=S.next())!=null;)if(ee)ee=!1;else{if("[{(".indexOf(j)>-1)O++;else if("]})".indexOf(j)>-1){if(O--,O<0)break}else if(j=="/"&&O==0){U=!0;break}ee=j=="\\"}return S.backUp(S.pos-N),U}function b(S){return S||(S=1),function(N,O){if(N.peek()=="}"){if(S==1)return O.tokenize.pop(),O.tokenize[O.tokenize.length-1](N,O);O.tokenize[O.tokenize.length-1]=b(S-1)}else N.peek()=="{"&&(O.tokenize[O.tokenize.length-1]=b(S+1));return g(N,O)}}function k(){var S=!1;return function(N,O){return S?(O.tokenize.pop(),O.tokenize[O.tokenize.length-1](N,O)):(S=!0,g(N,O))}}function E(S,N,O,j){return function(U,ee){var V=!1,W;for(ee.context.type==="read-quoted-paused"&&(ee.context=ee.context.prev,U.eat("}"));(W=U.next())!=null;){if(W==S&&(j||!V)){ee.tokenize.pop();break}if(O&&W=="#"&&!V){if(U.eat("{")){S=="}"&&(ee.context={prev:ee.context,type:"read-quoted-paused"}),ee.tokenize.push(b());break}else if(/[@\$]/.test(U.peek())){ee.tokenize.push(k());break}}V=!V&&W=="\\"}return N}}function w(S,N){return function(O,j){return N&&O.eatSpace(),O.match(S)?j.tokenize.pop():O.skipToEnd(),"string"}}function I(S,N){return S.sol()&&S.match("=end")&&S.eol()&&N.tokenize.pop(),S.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[g],indented:0,context:{type:"top",indented:-f.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(S,N){p=null,S.sol()&&(N.indented=S.indentation());var O=N.tokenize[N.tokenize.length-1](S,N),j,U=p;if(O=="ident"){var ee=S.current();O=N.lastTok=="."?"property":l.propertyIsEnumerable(S.current())?"keyword":/^[A-Z]/.test(ee)?"tag":N.lastTok=="def"||N.lastTok=="class"||N.varList?"def":"variable",O=="keyword"&&(U=ee,c.propertyIsEnumerable(ee)?j="indent":d.propertyIsEnumerable(ee)?j="dedent":((ee=="if"||ee=="unless")&&S.column()==S.indentation()||ee=="do"&&N.context.indented<N.indented)&&(j="indent"))}return(p||O&&O!="comment")&&(N.lastTok=U),p=="|"&&(N.varList=!N.varList),j=="indent"||/[\(\[\{]/.test(p)?N.context={prev:N.context,type:p||O,indented:N.indented}:(j=="dedent"||/[\)\]\}]/.test(p))&&N.context.prev&&(N.context=N.context.prev),S.eol()&&(N.continuedLine=p=="\\"||O=="operator"),O},indent:function(S,N){if(S.tokenize[S.tokenize.length-1]!=g)return i.Pass;var O=N&&N.charAt(0),j=S.context,U=j.type==h[O]||j.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(N);return j.indented+(U?0:f.indentUnit)+(S.continuedLine?f.indentUnit:0)},electricInput:/^\s*(?:end|rescue|elsif|else|\})$/,lineComment:"#",fold:"indent"}}),i.defineMIME("text/x-ruby","ruby"),i.registerHelper("hintWords","ruby",n)})});var Gd=Me((Hd,Wd)=>{(function(i){typeof Hd=="object"&&typeof Wd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineSimpleMode=function(y,g){i.defineMode(y,function(v){return i.simpleMode(v,g)})},i.simpleMode=function(y,g){t(g,"start");var v={},b=g.meta||{},k=!1;for(var E in g)if(E!=b&&g.hasOwnProperty(E))for(var w=v[E]=[],I=g[E],S=0;S<I.length;S++){var N=I[S];w.push(new c(N,g)),(N.indent||N.dedent)&&(k=!0)}var O={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:k?[]:null}},copyState:function(U){var ee={state:U.state,pending:U.pending,local:U.local,localState:null,indent:U.indent&&U.indent.slice(0)};U.localState&&(ee.localState=i.copyState(U.local.mode,U.localState)),U.stack&&(ee.stack=U.stack.slice(0));for(var V=U.persistentStates;V;V=V.next)ee.persistentStates={mode:V.mode,spec:V.spec,state:V.state==U.localState?ee.localState:i.copyState(V.mode,V.state),next:ee.persistentStates};return ee},token:d(v,y),innerMode:function(U){return U.local&&{mode:U.local.mode,state:U.localState}},indent:p(v,b)};if(b)for(var j in b)b.hasOwnProperty(j)&&(O[j]=b[j]);return O};function t(y,g){if(!y.hasOwnProperty(g))throw new Error("Undefined state "+g+" in simple mode")}function n(y,g){if(!y)return/(?:)/;var v="";return y instanceof RegExp?(y.ignoreCase&&(v="i"),y.unicode&&(v+="u"),y=y.source):y=String(y),new RegExp((g===!1?"":"^")+"(?:"+y+")",v)}function l(y){if(!y)return null;if(y.apply)return y;if(typeof y=="string")return y.replace(/\./g," ");for(var g=[],v=0;v<y.length;v++)g.push(y[v]&&y[v].replace(/\./g," "));return g}function c(y,g){(y.next||y.push)&&t(g,y.next||y.push),this.regex=n(y.regex),this.token=l(y.token),this.data=y}function d(y,g){return function(v,b){if(b.pending){var k=b.pending.shift();return b.pending.length==0&&(b.pending=null),v.pos+=k.text.length,k.token}if(b.local)if(b.local.end&&v.match(b.local.end)){var E=b.local.endToken||null;return b.local=b.localState=null,E}else{var E=b.local.mode.token(v,b.localState),w;return b.local.endScan&&(w=b.local.endScan.exec(v.current()))&&(v.pos=v.start+w.index),E}for(var I=y[b.state],S=0;S<I.length;S++){var N=I[S],O=(!N.data.sol||v.sol())&&v.match(N.regex);if(O){N.data.next?b.state=N.data.next:N.data.push?((b.stack||(b.stack=[])).push(b.state),b.state=N.data.push):N.data.pop&&b.stack&&b.stack.length&&(b.state=b.stack.pop()),N.data.mode&&h(g,b,N.data.mode,N.token),N.data.indent&&b.indent.push(v.indentation()+g.indentUnit),N.data.dedent&&b.indent.pop();var j=N.token;if(j&&j.apply&&(j=j(O)),O.length>2&&N.token&&typeof N.token!="string"){for(var U=2;U<O.length;U++)O[U]&&(b.pending||(b.pending=[])).push({text:O[U],token:N.token[U-1]});return v.backUp(O[0].length-(O[1]?O[1].length:0)),j[0]}else return j&&j.join?j[0]:j}}return v.next(),null}}function o(y,g){if(y===g)return!0;if(!y||typeof y!="object"||!g||typeof g!="object")return!1;var v=0;for(var b in y)if(y.hasOwnProperty(b)){if(!g.hasOwnProperty(b)||!o(y[b],g[b]))return!1;v++}for(var b in g)g.hasOwnProperty(b)&&v--;return v==0}function h(y,g,v,b){var k;if(v.persistent)for(var E=g.persistentStates;E&&!k;E=E.next)(v.spec?o(v.spec,E.spec):v.mode==E.mode)&&(k=E);var w=k?k.mode:v.mode||i.getMode(y,v.spec),I=k?k.state:i.startState(w);v.persistent&&!k&&(g.persistentStates={mode:w,spec:v.spec,state:I,next:g.persistentStates}),g.localState=I,g.local={mode:w,end:v.end&&n(v.end),endScan:v.end&&v.forceEnd!==!1&&n(v.end,!1),endToken:b&&b.join?b[b.length-1]:b}}function f(y,g){for(var v=0;v<g.length;v++)if(g[v]===y)return!0}function p(y,g){return function(v,b,k){if(v.local&&v.local.mode.indent)return v.local.mode.indent(v.localState,b,k);if(v.indent==null||v.local||g.dontIndentStates&&f(v.state,g.dontIndentStates)>-1)return i.Pass;var E=v.indent.length-1,w=y[v.state];e:for(;;){for(var I=0;I<w.length;I++){var S=w[I];if(S.data.dedent&&S.data.dedentIfLineStart!==!1){var N=S.regex.exec(b);if(N&&N[0]){E--,(S.next||S.push)&&(w=y[S.next||S.push]),b=b.slice(N[0].length);continue e}}}break}return E<0?0:v.indent[E]}}})});var Yd=Me((Kd,Vd)=>{(function(i){typeof Kd=="object"&&typeof Vd=="object"?i(Tt(),Gd()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],i):i(CodeMirror)})(function(i){"use strict";i.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"}}),i.defineMIME("text/x-rustsrc","rust"),i.defineMIME("text/rust","rust")})});var Qd=Me((Xd,Zd)=>{(function(i){typeof Xd=="object"&&typeof Zd=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("shell",function(){var t={};function n(v,b){for(var k=0;k<b.length;k++)t[b[k]]=v}var l=["true","false"],c=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],d=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];i.registerHelper("hintWords","shell",l.concat(c,d)),n("atom",l),n("keyword",c),n("builtin",d);function o(v,b){if(v.eatSpace())return null;var k=v.sol(),E=v.next();if(E==="\\")return v.next(),null;if(E==="'"||E==='"'||E==="`")return b.tokens.unshift(h(E,E==="`"?"quote":"string")),g(v,b);if(E==="#")return k&&v.eat("!")?(v.skipToEnd(),"meta"):(v.skipToEnd(),"comment");if(E==="$")return b.tokens.unshift(p),g(v,b);if(E==="+"||E==="=")return"operator";if(E==="-")return v.eat("-"),v.eatWhile(/\w/),"attribute";if(E=="<"){if(v.match("<<"))return"operator";var w=v.match(/^<-?\s*['"]?([^'"]*)['"]?/);if(w)return b.tokens.unshift(y(w[1])),"string-2"}if(/\d/.test(E)&&(v.eatWhile(/\d/),v.eol()||!/\w/.test(v.peek())))return"number";v.eatWhile(/[\w-]/);var I=v.current();return v.peek()==="="&&/\w+/.test(I)?"def":t.hasOwnProperty(I)?t[I]:null}function h(v,b){var k=v=="("?")":v=="{"?"}":v;return function(E,w){for(var I,S=!1;(I=E.next())!=null;){if(I===k&&!S){w.tokens.shift();break}else if(I==="$"&&!S&&v!=="'"&&E.peek()!=k){S=!0,E.backUp(1),w.tokens.unshift(p);break}else{if(!S&&v!==k&&I===v)return w.tokens.unshift(h(v,b)),g(E,w);if(!S&&/['"]/.test(I)&&!/['"]/.test(v)){w.tokens.unshift(f(I,"string")),E.backUp(1);break}}S=!S&&I==="\\"}return b}}function f(v,b){return function(k,E){return E.tokens[0]=h(v,b),k.next(),g(k,E)}}var p=function(v,b){b.tokens.length>1&&v.eat("$");var k=v.next();return/['"({]/.test(k)?(b.tokens[0]=h(k,k=="("?"quote":k=="{"?"def":"string"),g(v,b)):(/\d/.test(k)||v.eatWhile(/\w/),b.tokens.shift(),"def")};function y(v){return function(b,k){return b.sol()&&b.string==v&&k.tokens.shift(),b.skipToEnd(),"string-2"}}function g(v,b){return(b.tokens[0]||o)(v,b)}return{startState:function(){return{tokens:[]}},token:function(v,b){return g(v,b)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),i.defineMIME("text/x-sh","shell"),i.defineMIME("application/x-sh","shell")})});var th=Me((Jd,eh)=>{(function(i){typeof Jd=="object"&&typeof eh=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("sql",function(f,p){var y=p.client||{},g=p.atoms||{false:!0,true:!0,null:!0},v=p.builtin||o(h),b=p.keywords||o(d),k=p.operatorChars||/^[*+\-%<>!=&|~^\/]/,E=p.support||{},w=p.hooks||{},I=p.dateSQL||{date:!0,time:!0,timestamp:!0},S=p.backslashStringEscapes!==!1,N=p.brackets||/^[\{}\(\)\[\]]/,O=p.punctuation||/^[;.,:]/;function j(K,q){var R=K.next();if(w[R]){var T=w[R](K,q);if(T!==!1)return T}if(E.hexNumber&&(R=="0"&&K.match(/^[xX][0-9a-fA-F]+/)||(R=="x"||R=="X")&&K.match(/^'[0-9a-fA-F]+'/)))return"number";if(E.binaryNumber&&((R=="b"||R=="B")&&K.match(/^'[01]+'/)||R=="0"&&K.match(/^b[01]+/)))return"number";if(R.charCodeAt(0)>47&&R.charCodeAt(0)<58)return K.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),E.decimallessFloat&&K.match(/^\.(?!\.)/),"number";if(R=="?"&&(K.eatSpace()||K.eol()||K.eat(";")))return"variable-3";if(R=="'"||R=='"'&&E.doubleQuote)return q.tokenize=U(R),q.tokenize(K,q);if((E.nCharCast&&(R=="n"||R=="N")||E.charsetCast&&R=="_"&&K.match(/[a-z][a-z0-9]*/i))&&(K.peek()=="'"||K.peek()=='"'))return"keyword";if(E.escapeConstant&&(R=="e"||R=="E")&&(K.peek()=="'"||K.peek()=='"'&&E.doubleQuote))return q.tokenize=function(Z,P){return(P.tokenize=U(Z.next(),!0))(Z,P)},"keyword";if(E.commentSlashSlash&&R=="/"&&K.eat("/"))return K.skipToEnd(),"comment";if(E.commentHash&&R=="#"||R=="-"&&K.eat("-")&&(!E.commentSpaceRequired||K.eat(" ")))return K.skipToEnd(),"comment";if(R=="/"&&K.eat("*"))return q.tokenize=ee(1),q.tokenize(K,q);if(R=="."){if(E.zerolessFloat&&K.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(K.match(/^\.+/))return null;if(E.ODBCdotTable&&K.match(/^[\w\d_$#]+/))return"variable-2"}else{if(k.test(R))return K.eatWhile(k),"operator";if(N.test(R))return"bracket";if(O.test(R))return K.eatWhile(O),"punctuation";if(R=="{"&&(K.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||K.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";K.eatWhile(/^[_\w\d]/);var H=K.current().toLowerCase();return I.hasOwnProperty(H)&&(K.match(/^( )+'[^']*'/)||K.match(/^( )+"[^"]*"/))?"number":g.hasOwnProperty(H)?"atom":v.hasOwnProperty(H)?"type":b.hasOwnProperty(H)?"keyword":y.hasOwnProperty(H)?"builtin":null}}function U(K,q){return function(R,T){for(var H=!1,Z;(Z=R.next())!=null;){if(Z==K&&!H){T.tokenize=j;break}H=(S||q)&&!H&&Z=="\\"}return"string"}}function ee(K){return function(q,R){var T=q.match(/^.*?(\/\*|\*\/)/);return T?T[1]=="/*"?R.tokenize=ee(K+1):K>1?R.tokenize=ee(K-1):R.tokenize=j:q.skipToEnd(),"comment"}}function V(K,q,R){q.context={prev:q.context,indent:K.indentation(),col:K.column(),type:R}}function W(K){K.indent=K.context.indent,K.context=K.context.prev}return{startState:function(){return{tokenize:j,context:null}},token:function(K,q){if(K.sol()&&q.context&&q.context.align==null&&(q.context.align=!1),q.tokenize==j&&K.eatSpace())return null;var R=q.tokenize(K,q);if(R=="comment")return R;q.context&&q.context.align==null&&(q.context.align=!0);var T=K.current();return T=="("?V(K,q,")"):T=="["?V(K,q,"]"):q.context&&q.context.type==T&&W(q),R},indent:function(K,q){var R=K.context;if(!R)return i.Pass;var T=q.charAt(0)==R.type;return R.align?R.col+(T?0:1):R.indent+(T?0:f.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:E.commentSlashSlash?"//":E.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function t(f){for(var p;(p=f.next())!=null;)if(p=="`"&&!f.eat("`"))return"variable-2";return f.backUp(f.current().length-1),f.eatWhile(/\w/)?"variable-2":null}function n(f){for(var p;(p=f.next())!=null;)if(p=='"'&&!f.eat('"'))return"variable-2";return f.backUp(f.current().length-1),f.eatWhile(/\w/)?"variable-2":null}function l(f){return f.eat("@")&&(f.match("session."),f.match("local."),f.match("global.")),f.eat("'")?(f.match(/^.*'/),"variable-2"):f.eat('"')?(f.match(/^.*"/),"variable-2"):f.eat("`")?(f.match(/^.*`/),"variable-2"):f.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function c(f){return f.eat("N")?"atom":f.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var 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 ";function o(f){for(var p={},y=f.split(" "),g=0;g<y.length;++g)p[y[g]]=!0;return p}var h="bool boolean bit blob enum 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 real date datetime year unsigned signed decimal numeric";i.defineMIME("text/x-sql",{name:"sql",keywords:o(d+"begin"),builtin:o(h),atoms:o("false true null unknown"),dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),i.defineMIME("text/x-mssql",{name:"sql",client:o("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:o(d+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:o("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:o("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:o("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":l}}),i.defineMIME("text/x-mysql",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(d+"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:o("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:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":l,"`":t,"\\":c}}),i.defineMIME("text/x-mariadb",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(d+"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 group_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:o("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:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":l,"`":t,"\\":c}}),i.defineMIME("text/x-sqlite",{name:"sql",client:o("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:o(d+"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:o("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:o("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:o("date time timestamp datetime"),support:o("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":l,":":l,"?":l,$:l,'"':n,"`":t}}),i.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:o("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:o("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:o("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:o("commentSlashSlash decimallessFloat"),hooks:{}}),i.defineMIME("text/x-plsql",{name:"sql",client:o("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:o("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:o("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:o("date time timestamp"),support:o("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),i.defineMIME("text/x-hive",{name:"sql",keywords:o("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:o("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:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),i.defineMIME("text/x-pgsql",{name:"sql",client:o("source"),keywords:o(d+"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:o("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:o("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),i.defineMIME("text/x-gql",{name:"sql",keywords:o("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:o("false true"),builtin:o("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),i.defineMIME("text/x-gpsql",{name:"sql",client:o("source"),keywords:o("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:o("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:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),i.defineMIME("text/x-sparksql",{name:"sql",keywords:o("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 data 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:o("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:o("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote zerolessFloat")}),i.defineMIME("text/x-esper",{name:"sql",client:o("source"),keywords:o("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:o("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("time"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber")})})});var ih=Me((rh,nh)=>{(function(i){typeof rh=="object"&&typeof nh=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(t,n){if(!n.inString&&(t.peek()=='"'||t.peek()=="'")&&(n.stringType=t.peek(),t.next(),n.inString=!0),t.sol()&&n.inArray===0&&(n.lhs=!0),n.inString){for(;n.inString&&!t.eol();)t.peek()===n.stringType?(t.next(),n.inString=!1):t.peek()==="\\"?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return n.lhs?"property string":"string"}else{if(n.inArray&&t.peek()==="]")return t.next(),n.inArray--,"bracket";if(n.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(n.lhs&&t.eatWhile(function(l){return l!="="&&l!=" "}))return"property";if(n.lhs&&t.peek()==="=")return t.next(),n.lhs=!1,null;if(!n.lhs&&t.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!n.lhs&&(t.match("true")||t.match("false")))return"atom";if(!n.lhs&&t.peek()==="[")return n.inArray++,t.next(),"bracket";if(!n.lhs&&t.match(/^\-?\d+(?:\.\d+)?/))return"number";t.eatSpace()||t.next()}return null}}}),i.defineMIME("text/x-toml","toml")})});var sh=Me((oh,ah)=>{(function(i){typeof oh=="object"&&typeof ah=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("vb",function(t,n){var l="error";function c(z){return new RegExp("^(("+z.join(")|(")+"))\\b","i")}var d=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),o=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),h=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),f=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),p=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),y=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),g=["class","module","sub","enum","select","while","if","function","get","set","property","try","structure","synclock","using","with"],v=["else","elseif","case","catch","finally"],b=["next","loop"],k=["and","andalso","or","orelse","xor","in","not","is","isnot","like"],E=c(k),w=["#const","#else","#elseif","#end","#if","#region","addhandler","addressof","alias","as","byref","byval","cbool","cbyte","cchar","cdate","cdbl","cdec","cint","clng","cobj","compare","const","continue","csbyte","cshort","csng","cstr","cuint","culng","cushort","declare","default","delegate","dim","directcast","each","erase","error","event","exit","explicit","false","for","friend","gettype","goto","handles","implements","imports","infer","inherits","interface","isfalse","istrue","lib","me","mod","mustinherit","mustoverride","my","mybase","myclass","namespace","narrowing","new","nothing","notinheritable","notoverridable","of","off","on","operator","option","optional","out","overloads","overridable","overrides","paramarray","partial","private","protected","public","raiseevent","readonly","redim","removehandler","resume","return","shadows","shared","static","step","stop","strict","then","throw","to","true","trycast","typeof","until","until","when","widening","withevents","writeonly"],I=["object","boolean","char","string","byte","sbyte","short","ushort","int16","uint16","integer","uinteger","int32","uint32","long","ulong","int64","uint64","decimal","single","double","float","date","datetime","intptr","uintptr"],S=c(w),N=c(I),O='"',j=c(g),U=c(v),ee=c(b),V=c(["end"]),W=c(["do"]),K=null;i.registerHelper("hintWords","vb",g.concat(v).concat(b).concat(k).concat(w).concat(I));function q(z,ne){ne.currentIndent++}function R(z,ne){ne.currentIndent--}function T(z,ne){if(z.eatSpace())return null;var ae=z.peek();if(ae==="'")return z.skipToEnd(),"comment";if(z.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var F=!1;if((z.match(/^\d*\.\d+F?/i)||z.match(/^\d+\.\d*F?/)||z.match(/^\.\d+F?/))&&(F=!0),F)return z.eat(/J/i),"number";var A=!1;if(z.match(/^&H[0-9a-f]+/i)||z.match(/^&O[0-7]+/i)?A=!0:z.match(/^[1-9]\d*F?/)?(z.eat(/J/i),A=!0):z.match(/^0(?![\dx])/i)&&(A=!0),A)return z.eat(/L/i),"number"}return z.match(O)?(ne.tokenize=H(z.current()),ne.tokenize(z,ne)):z.match(p)||z.match(f)?null:z.match(h)||z.match(d)||z.match(E)?"operator":z.match(o)?null:z.match(W)?(q(z,ne),ne.doInCurrentLine=!0,"keyword"):z.match(j)?(ne.doInCurrentLine?ne.doInCurrentLine=!1:q(z,ne),"keyword"):z.match(U)?"keyword":z.match(V)?(R(z,ne),R(z,ne),"keyword"):z.match(ee)?(R(z,ne),"keyword"):z.match(N)||z.match(S)?"keyword":z.match(y)?"variable":(z.next(),l)}function H(z){var ne=z.length==1,ae="string";return function(F,A){for(;!F.eol();){if(F.eatWhile(/[^'"]/),F.match(z))return A.tokenize=T,ae;F.eat(/['"]/)}if(ne){if(n.singleLineStringErrors)return l;A.tokenize=T}return ae}}function Z(z,ne){var ae=ne.tokenize(z,ne),F=z.current();if(F===".")return ae=ne.tokenize(z,ne),ae==="variable"?"variable":l;var A="[({".indexOf(F);return A!==-1&&q(z,ne),K==="dedent"&&R(z,ne)||(A="])}".indexOf(F),A!==-1&&R(z,ne))?l:ae}var P={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:T,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(z,ne){z.sol()&&(ne.currentIndent+=ne.nextLineIndent,ne.nextLineIndent=0,ne.doInCurrentLine=0);var ae=Z(z,ne);return ne.lastToken={style:ae,content:z.current()},ae},indent:function(z,ne){var ae=ne.replace(/^\s+|\s+$/g,"");return ae.match(ee)||ae.match(V)||ae.match(U)?t.indentUnit*(z.currentIndent-1):z.currentIndent<0?0:z.currentIndent*t.indentUnit},lineComment:"'"};return P}),i.defineMIME("text/x-vb","vb")})});var ch=Me((lh,uh)=>{(function(i){typeof lh=="object"&&typeof uh=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("vbscript",function(t,n){var l="error";function c(ge){return new RegExp("^(("+ge.join(")|(")+"))\\b","i")}var d=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),o=new RegExp("^((<>)|(<=)|(>=))"),h=new RegExp("^[\\.,]"),f=new RegExp("^[\\(\\)]"),p=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),y=["class","sub","select","while","if","function","property","with","for"],g=["else","elseif","case"],v=["next","loop","wend"],b=c(["and","or","not","xor","is","mod","eqv","imp"]),k=["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"],E=["true","false","nothing","empty","null"],w=["abs","array","asc","atn","cbool","cbyte","ccur","cdate","cdbl","chr","cint","clng","cos","csng","cstr","date","dateadd","datediff","datepart","dateserial","datevalue","day","escape","eval","execute","exp","filter","formatcurrency","formatdatetime","formatnumber","formatpercent","getlocale","getobject","getref","hex","hour","inputbox","instr","instrrev","int","fix","isarray","isdate","isempty","isnull","isnumeric","isobject","join","lbound","lcase","left","len","loadpicture","log","ltrim","rtrim","trim","maths","mid","minute","month","monthname","msgbox","now","oct","replace","rgb","right","rnd","round","scriptengine","scriptenginebuildversion","scriptenginemajorversion","scriptengineminorversion","second","setlocale","sgn","sin","space","split","sqr","strcomp","string","strreverse","tan","time","timer","timeserial","timevalue","typename","ubound","ucase","unescape","vartype","weekday","weekdayname","year"],I=["vbBlack","vbRed","vbGreen","vbYellow","vbBlue","vbMagenta","vbCyan","vbWhite","vbBinaryCompare","vbTextCompare","vbSunday","vbMonday","vbTuesday","vbWednesday","vbThursday","vbFriday","vbSaturday","vbUseSystemDayOfWeek","vbFirstJan1","vbFirstFourDays","vbFirstFullWeek","vbGeneralDate","vbLongDate","vbShortDate","vbLongTime","vbShortTime","vbObjectError","vbOKOnly","vbOKCancel","vbAbortRetryIgnore","vbYesNoCancel","vbYesNo","vbRetryCancel","vbCritical","vbQuestion","vbExclamation","vbInformation","vbDefaultButton1","vbDefaultButton2","vbDefaultButton3","vbDefaultButton4","vbApplicationModal","vbSystemModal","vbOK","vbCancel","vbAbort","vbRetry","vbIgnore","vbYes","vbNo","vbCr","VbCrLf","vbFormFeed","vbLf","vbNewLine","vbNullChar","vbNullString","vbTab","vbVerticalTab","vbUseDefault","vbTrue","vbFalse","vbEmpty","vbNull","vbInteger","vbLong","vbSingle","vbDouble","vbCurrency","vbDate","vbString","vbObject","vbError","vbBoolean","vbVariant","vbDataObject","vbDecimal","vbByte","vbArray"],S=["WScript","err","debug","RegExp"],N=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],O=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],j=["server","response","request","session","application"],U=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],ee=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],V=O.concat(N);S=S.concat(I),t.isASP&&(S=S.concat(j),V=V.concat(ee,U));var W=c(k),K=c(E),q=c(w),R=c(S),T=c(V),H='"',Z=c(y),P=c(g),z=c(v),ne=c(["end"]),ae=c(["do"]),F=c(["on error resume next","exit"]),A=c(["rem"]);function be(ge,ke){ke.currentIndent++}function Fe(ge,ke){ke.currentIndent--}function xe(ge,ke){if(ge.eatSpace())return"space";var je=ge.peek();if(je==="'"||ge.match(A))return ge.skipToEnd(),"comment";if(ge.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!ge.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var at=!1;if((ge.match(/^\d*\.\d+/i)||ge.match(/^\d+\.\d*/)||ge.match(/^\.\d+/))&&(at=!0),at)return ge.eat(/J/i),"number";var gt=!1;if(ge.match(/^&H[0-9a-f]+/i)||ge.match(/^&O[0-7]+/i)?gt=!0:ge.match(/^[1-9]\d*F?/)?(ge.eat(/J/i),gt=!0):ge.match(/^0(?![\dx])/i)&&(gt=!0),gt)return ge.eat(/L/i),"number"}return ge.match(H)?(ke.tokenize=_e(ge.current()),ke.tokenize(ge,ke)):ge.match(o)||ge.match(d)||ge.match(b)?"operator":ge.match(h)?null:ge.match(f)?"bracket":ge.match(F)?(ke.doInCurrentLine=!0,"keyword"):ge.match(ae)?(be(ge,ke),ke.doInCurrentLine=!0,"keyword"):ge.match(Z)?(ke.doInCurrentLine?ke.doInCurrentLine=!1:be(ge,ke),"keyword"):ge.match(P)?"keyword":ge.match(ne)?(Fe(ge,ke),Fe(ge,ke),"keyword"):ge.match(z)?(ke.doInCurrentLine?ke.doInCurrentLine=!1:Fe(ge,ke),"keyword"):ge.match(W)?"keyword":ge.match(K)?"atom":ge.match(T)?"variable-2":ge.match(q)?"builtin":ge.match(R)?"variable-2":ge.match(p)?"variable":(ge.next(),l)}function _e(ge){var ke=ge.length==1,je="string";return function(at,gt){for(;!at.eol();){if(at.eatWhile(/[^'"]/),at.match(ge))return gt.tokenize=xe,je;at.eat(/['"]/)}if(ke){if(n.singleLineStringErrors)return l;gt.tokenize=xe}return je}}function ze(ge,ke){var je=ke.tokenize(ge,ke),at=ge.current();return at==="."?(je=ke.tokenize(ge,ke),at=ge.current(),je&&(je.substr(0,8)==="variable"||je==="builtin"||je==="keyword")?((je==="builtin"||je==="keyword")&&(je="variable"),V.indexOf(at.substr(1))>-1&&(je="variable-2"),je):l):je}var qe={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:xe,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(ge,ke){ge.sol()&&(ke.currentIndent+=ke.nextLineIndent,ke.nextLineIndent=0,ke.doInCurrentLine=0);var je=ze(ge,ke);return ke.lastToken={style:je,content:ge.current()},je==="space"&&(je=null),je},indent:function(ge,ke){var je=ke.replace(/^\s+|\s+$/g,"");return je.match(z)||je.match(ne)||je.match(P)?t.indentUnit*(ge.currentIndent-1):ge.currentIndent<0?0:ge.currentIndent*t.indentUnit}};return qe}),i.defineMIME("text/vbscript","vbscript")})});var hh=Me((fh,dh)=>{(function(i){typeof fh=="object"&&typeof dh=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineMode("yaml",function(){var t=["true","false","on","off","yes","no"],n=new RegExp("\\b(("+t.join(")|(")+"))$","i");return{token:function(l,c){var d=l.peek(),o=c.escaped;if(c.escaped=!1,d=="#"&&(l.pos==0||/\s/.test(l.string.charAt(l.pos-1))))return l.skipToEnd(),"comment";if(l.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(c.literal&&l.indentation()>c.keyCol)return l.skipToEnd(),"string";if(c.literal&&(c.literal=!1),l.sol()){if(c.keyCol=0,c.pair=!1,c.pairStart=!1,l.match("---")||l.match("..."))return"def";if(l.match(/\s*-\s+/))return"meta"}if(l.match(/^(\{|\}|\[|\])/))return d=="{"?c.inlinePairs++:d=="}"?c.inlinePairs--:d=="["?c.inlineList++:c.inlineList--,"meta";if(c.inlineList>0&&!o&&d==",")return l.next(),"meta";if(c.inlinePairs>0&&!o&&d==",")return c.keyCol=0,c.pair=!1,c.pairStart=!1,l.next(),"meta";if(c.pairStart){if(l.match(/^\s*(\||\>)\s*/))return c.literal=!0,"meta";if(l.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(c.inlinePairs==0&&l.match(/^\s*-?[0-9\.\,]+\s?$/)||c.inlinePairs>0&&l.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(l.match(n))return"keyword"}return!c.pair&&l.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(c.pair=!0,c.keyCol=l.indentation(),"atom"):c.pair&&l.match(/^:\s*/)?(c.pairStart=!0,"meta"):(c.pairStart=!1,c.escaped=d=="\\",l.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),i.defineMIME("text/x-yaml","yaml"),i.defineMIME("text/yaml","yaml")})});var gh=Me((ph,mh)=>{(function(i){typeof ph=="object"&&typeof mh=="object"?i(Tt()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";i.defineOption("scrollPastEnd",!1,function(l,c,d){d&&d!=i.Init&&(l.off("change",t),l.off("refresh",n),l.display.lineSpace.parentNode.style.paddingBottom="",l.state.scrollPastEndPadding=null),c&&(l.on("change",t),l.on("refresh",n),n(l))});function t(l,c){i.changeEnd(c).line==l.lastLine()&&n(l)}function n(l){var c="";if(l.lineCount()>1){var d=l.display.scroller.clientHeight-30,o=l.getLineHandle(l.lastLine()).height;c=d-o+"px"}l.state.scrollPastEndPadding!=c&&(l.state.scrollPastEndPadding=c,l.display.lineSpace.parentNode.style.paddingBottom=c,l.off("refresh",n),l.setSize(),l.on("refresh",n))}})});var Ph=Me((Sa,ol)=>{(function(t,n){if(typeof Sa=="object"&&typeof ol=="object")ol.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var l=n();for(var c in l)(typeof Sa=="object"?Sa:t)[c]=l[c]}})(self,function(){return function(){var i={3099:function(c){c.exports=function(d){if(typeof d!="function")throw TypeError(String(d)+" is not a function");return d}},6077:function(c,d,o){var h=o(111);c.exports=function(f){if(!h(f)&&f!==null)throw TypeError("Can't set "+String(f)+" as a prototype");return f}},1223:function(c,d,o){var h=o(5112),f=o(30),p=o(3070),y=h("unscopables"),g=Array.prototype;g[y]==null&&p.f(g,y,{configurable:!0,value:f(null)}),c.exports=function(v){g[y][v]=!0}},1530:function(c,d,o){"use strict";var h=o(8710).charAt;c.exports=function(f,p,y){return p+(y?h(f,p).length:1)}},5787:function(c){c.exports=function(d,o,h){if(!(d instanceof o))throw TypeError("Incorrect "+(h?h+" ":"")+"invocation");return d}},9670:function(c,d,o){var h=o(111);c.exports=function(f){if(!h(f))throw TypeError(String(f)+" is not an object");return f}},4019:function(c){c.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},260:function(c,d,o){"use strict";var h=o(4019),f=o(9781),p=o(7854),y=o(111),g=o(6656),v=o(648),b=o(8880),k=o(1320),E=o(3070).f,w=o(9518),I=o(7674),S=o(5112),N=o(9711),O=p.Int8Array,j=O&&O.prototype,U=p.Uint8ClampedArray,ee=U&&U.prototype,V=O&&w(O),W=j&&w(j),K=Object.prototype,q=K.isPrototypeOf,R=S("toStringTag"),T=N("TYPED_ARRAY_TAG"),H=h&&!!I&&v(p.opera)!=="Opera",Z=!1,P,z={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ne={BigInt64Array:8,BigUint64Array:8},ae=function(ze){if(!y(ze))return!1;var qe=v(ze);return qe==="DataView"||g(z,qe)||g(ne,qe)},F=function(_e){if(!y(_e))return!1;var ze=v(_e);return g(z,ze)||g(ne,ze)},A=function(_e){if(F(_e))return _e;throw TypeError("Target is not a typed array")},be=function(_e){if(I){if(q.call(V,_e))return _e}else for(var ze in z)if(g(z,P)){var qe=p[ze];if(qe&&(_e===qe||q.call(qe,_e)))return _e}throw TypeError("Target is not a typed array constructor")},Fe=function(_e,ze,qe){if(!!f){if(qe)for(var ge in z){var ke=p[ge];ke&&g(ke.prototype,_e)&&delete ke.prototype[_e]}(!W[_e]||qe)&&k(W,_e,qe?ze:H&&j[_e]||ze)}},xe=function(_e,ze,qe){var ge,ke;if(!!f){if(I){if(qe)for(ge in z)ke=p[ge],ke&&g(ke,_e)&&delete ke[_e];if(!V[_e]||qe)try{return k(V,_e,qe?ze:H&&O[_e]||ze)}catch{}else return}for(ge in z)ke=p[ge],ke&&(!ke[_e]||qe)&&k(ke,_e,ze)}};for(P in z)p[P]||(H=!1);if((!H||typeof V!="function"||V===Function.prototype)&&(V=function(){throw TypeError("Incorrect invocation")},H))for(P in z)p[P]&&I(p[P],V);if((!H||!W||W===K)&&(W=V.prototype,H))for(P in z)p[P]&&I(p[P].prototype,W);if(H&&w(ee)!==W&&I(ee,W),f&&!g(W,R)){Z=!0,E(W,R,{get:function(){return y(this)?this[T]:void 0}});for(P in z)p[P]&&b(p[P],T,P)}c.exports={NATIVE_ARRAY_BUFFER_VIEWS:H,TYPED_ARRAY_TAG:Z&&T,aTypedArray:A,aTypedArrayConstructor:be,exportTypedArrayMethod:Fe,exportTypedArrayStaticMethod:xe,isView:ae,isTypedArray:F,TypedArray:V,TypedArrayPrototype:W}},3331:function(c,d,o){"use strict";var h=o(7854),f=o(9781),p=o(4019),y=o(8880),g=o(2248),v=o(7293),b=o(5787),k=o(9958),E=o(7466),w=o(7067),I=o(1179),S=o(9518),N=o(7674),O=o(8006).f,j=o(3070).f,U=o(1285),ee=o(8003),V=o(9909),W=V.get,K=V.set,q="ArrayBuffer",R="DataView",T="prototype",H="Wrong length",Z="Wrong index",P=h[q],z=P,ne=h[R],ae=ne&&ne[T],F=Object.prototype,A=h.RangeError,be=I.pack,Fe=I.unpack,xe=function(Se){return[Se&255]},_e=function(Se){return[Se&255,Se>>8&255]},ze=function(Se){return[Se&255,Se>>8&255,Se>>16&255,Se>>24&255]},qe=function(Se){return Se[3]<<24|Se[2]<<16|Se[1]<<8|Se[0]},ge=function(Se){return be(Se,23,4)},ke=function(Se){return be(Se,52,8)},je=function(Se,X){j(Se[T],X,{get:function(){return W(this)[X]}})},at=function(Se,X,de,ue){var it=w(de),Ne=W(Se);if(it+X>Ne.byteLength)throw A(Z);var ot=W(Ne.buffer).bytes,Xe=it+Ne.byteOffset,et=ot.slice(Xe,Xe+X);return ue?et:et.reverse()},gt=function(Se,X,de,ue,it,Ne){var ot=w(de),Xe=W(Se);if(ot+X>Xe.byteLength)throw A(Z);for(var et=W(Xe.buffer).bytes,We=ot+Xe.byteOffset,$t=ue(+it),Lt=0;Lt<X;Lt++)et[We+Lt]=$t[Ne?Lt:X-Lt-1]};if(!p)z=function(X){b(this,z,q);var de=w(X);K(this,{bytes:U.call(new Array(de),0),byteLength:de}),f||(this.byteLength=de)},ne=function(X,de,ue){b(this,ne,R),b(X,z,R);var it=W(X).byteLength,Ne=k(de);if(Ne<0||Ne>it)throw A("Wrong offset");if(ue=ue===void 0?it-Ne:E(ue),Ne+ue>it)throw A(H);K(this,{buffer:X,byteLength:ue,byteOffset:Ne}),f||(this.buffer=X,this.byteLength=ue,this.byteOffset=Ne)},f&&(je(z,"byteLength"),je(ne,"buffer"),je(ne,"byteLength"),je(ne,"byteOffset")),g(ne[T],{getInt8:function(X){return at(this,1,X)[0]<<24>>24},getUint8:function(X){return at(this,1,X)[0]},getInt16:function(X){var de=at(this,2,X,arguments.length>1?arguments[1]:void 0);return(de[1]<<8|de[0])<<16>>16},getUint16:function(X){var de=at(this,2,X,arguments.length>1?arguments[1]:void 0);return de[1]<<8|de[0]},getInt32:function(X){return qe(at(this,4,X,arguments.length>1?arguments[1]:void 0))},getUint32:function(X){return qe(at(this,4,X,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(X){return Fe(at(this,4,X,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(X){return Fe(at(this,8,X,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(X,de){gt(this,1,X,xe,de)},setUint8:function(X,de){gt(this,1,X,xe,de)},setInt16:function(X,de){gt(this,2,X,_e,de,arguments.length>2?arguments[2]:void 0)},setUint16:function(X,de){gt(this,2,X,_e,de,arguments.length>2?arguments[2]:void 0)},setInt32:function(X,de){gt(this,4,X,ze,de,arguments.length>2?arguments[2]:void 0)},setUint32:function(X,de){gt(this,4,X,ze,de,arguments.length>2?arguments[2]:void 0)},setFloat32:function(X,de){gt(this,4,X,ge,de,arguments.length>2?arguments[2]:void 0)},setFloat64:function(X,de){gt(this,8,X,ke,de,arguments.length>2?arguments[2]:void 0)}});else{if(!v(function(){P(1)})||!v(function(){new P(-1)})||v(function(){return new P,new P(1.5),new P(NaN),P.name!=q})){z=function(X){return b(this,z),new P(w(X))};for(var Re=z[T]=P[T],Ie=O(P),Be=0,Ke;Ie.length>Be;)(Ke=Ie[Be++])in z||y(z,Ke,P[Ke]);Re.constructor=z}N&&S(ae)!==F&&N(ae,F);var He=new ne(new z(2)),Je=ae.setInt8;He.setInt8(0,2147483648),He.setInt8(1,2147483649),(He.getInt8(0)||!He.getInt8(1))&&g(ae,{setInt8:function(X,de){Je.call(this,X,de<<24>>24)},setUint8:function(X,de){Je.call(this,X,de<<24>>24)}},{unsafe:!0})}ee(z,q),ee(ne,R),c.exports={ArrayBuffer:z,DataView:ne}},1048:function(c,d,o){"use strict";var h=o(7908),f=o(1400),p=o(7466),y=Math.min;c.exports=[].copyWithin||function(v,b){var k=h(this),E=p(k.length),w=f(v,E),I=f(b,E),S=arguments.length>2?arguments[2]:void 0,N=y((S===void 0?E:f(S,E))-I,E-w),O=1;for(I<w&&w<I+N&&(O=-1,I+=N-1,w+=N-1);N-- >0;)I in k?k[w]=k[I]:delete k[w],w+=O,I+=O;return k}},1285:function(c,d,o){"use strict";var h=o(7908),f=o(1400),p=o(7466);c.exports=function(g){for(var v=h(this),b=p(v.length),k=arguments.length,E=f(k>1?arguments[1]:void 0,b),w=k>2?arguments[2]:void 0,I=w===void 0?b:f(w,b);I>E;)v[E++]=g;return v}},8533:function(c,d,o){"use strict";var h=o(2092).forEach,f=o(9341),p=f("forEach");c.exports=p?[].forEach:function(g){return h(this,g,arguments.length>1?arguments[1]:void 0)}},8457:function(c,d,o){"use strict";var h=o(9974),f=o(7908),p=o(3411),y=o(7659),g=o(7466),v=o(6135),b=o(1246);c.exports=function(E){var w=f(E),I=typeof this=="function"?this:Array,S=arguments.length,N=S>1?arguments[1]:void 0,O=N!==void 0,j=b(w),U=0,ee,V,W,K,q,R;if(O&&(N=h(N,S>2?arguments[2]:void 0,2)),j!=null&&!(I==Array&&y(j)))for(K=j.call(w),q=K.next,V=new I;!(W=q.call(K)).done;U++)R=O?p(K,N,[W.value,U],!0):W.value,v(V,U,R);else for(ee=g(w.length),V=new I(ee);ee>U;U++)R=O?N(w[U],U):w[U],v(V,U,R);return V.length=U,V}},1318:function(c,d,o){var h=o(5656),f=o(7466),p=o(1400),y=function(g){return function(v,b,k){var E=h(v),w=f(E.length),I=p(k,w),S;if(g&&b!=b){for(;w>I;)if(S=E[I++],S!=S)return!0}else for(;w>I;I++)if((g||I in E)&&E[I]===b)return g||I||0;return!g&&-1}};c.exports={includes:y(!0),indexOf:y(!1)}},2092:function(c,d,o){var h=o(9974),f=o(8361),p=o(7908),y=o(7466),g=o(5417),v=[].push,b=function(k){var E=k==1,w=k==2,I=k==3,S=k==4,N=k==6,O=k==7,j=k==5||N;return function(U,ee,V,W){for(var K=p(U),q=f(K),R=h(ee,V,3),T=y(q.length),H=0,Z=W||g,P=E?Z(U,T):w||O?Z(U,0):void 0,z,ne;T>H;H++)if((j||H in q)&&(z=q[H],ne=R(z,H,K),k))if(E)P[H]=ne;else if(ne)switch(k){case 3:return!0;case 5:return z;case 6:return H;case 2:v.call(P,z)}else switch(k){case 4:return!1;case 7:v.call(P,z)}return N?-1:I||S?S:P}};c.exports={forEach:b(0),map:b(1),filter:b(2),some:b(3),every:b(4),find:b(5),findIndex:b(6),filterOut:b(7)}},6583:function(c,d,o){"use strict";var h=o(5656),f=o(9958),p=o(7466),y=o(9341),g=Math.min,v=[].lastIndexOf,b=!!v&&1/[1].lastIndexOf(1,-0)<0,k=y("lastIndexOf"),E=b||!k;c.exports=E?function(I){if(b)return v.apply(this,arguments)||0;var S=h(this),N=p(S.length),O=N-1;for(arguments.length>1&&(O=g(O,f(arguments[1]))),O<0&&(O=N+O);O>=0;O--)if(O in S&&S[O]===I)return O||0;return-1}:v},1194:function(c,d,o){var h=o(7293),f=o(5112),p=o(7392),y=f("species");c.exports=function(g){return p>=51||!h(function(){var v=[],b=v.constructor={};return b[y]=function(){return{foo:1}},v[g](Boolean).foo!==1})}},9341:function(c,d,o){"use strict";var h=o(7293);c.exports=function(f,p){var y=[][f];return!!y&&h(function(){y.call(null,p||function(){throw 1},1)})}},3671:function(c,d,o){var h=o(3099),f=o(7908),p=o(8361),y=o(7466),g=function(v){return function(b,k,E,w){h(k);var I=f(b),S=p(I),N=y(I.length),O=v?N-1:0,j=v?-1:1;if(E<2)for(;;){if(O in S){w=S[O],O+=j;break}if(O+=j,v?O<0:N<=O)throw TypeError("Reduce of empty array with no initial value")}for(;v?O>=0:N>O;O+=j)O in S&&(w=k(w,S[O],O,I));return w}};c.exports={left:g(!1),right:g(!0)}},5417:function(c,d,o){var h=o(111),f=o(3157),p=o(5112),y=p("species");c.exports=function(g,v){var b;return f(g)&&(b=g.constructor,typeof b=="function"&&(b===Array||f(b.prototype))?b=void 0:h(b)&&(b=b[y],b===null&&(b=void 0))),new(b===void 0?Array:b)(v===0?0:v)}},3411:function(c,d,o){var h=o(9670),f=o(9212);c.exports=function(p,y,g,v){try{return v?y(h(g)[0],g[1]):y(g)}catch(b){throw f(p),b}}},7072:function(c,d,o){var h=o(5112),f=h("iterator"),p=!1;try{var y=0,g={next:function(){return{done:!!y++}},return:function(){p=!0}};g[f]=function(){return this},Array.from(g,function(){throw 2})}catch{}c.exports=function(v,b){if(!b&&!p)return!1;var k=!1;try{var E={};E[f]=function(){return{next:function(){return{done:k=!0}}}},v(E)}catch{}return k}},4326:function(c){var d={}.toString;c.exports=function(o){return d.call(o).slice(8,-1)}},648:function(c,d,o){var h=o(1694),f=o(4326),p=o(5112),y=p("toStringTag"),g=f(function(){return arguments}())=="Arguments",v=function(b,k){try{return b[k]}catch{}};c.exports=h?f:function(b){var k,E,w;return b===void 0?"Undefined":b===null?"Null":typeof(E=v(k=Object(b),y))=="string"?E:g?f(k):(w=f(k))=="Object"&&typeof k.callee=="function"?"Arguments":w}},9920:function(c,d,o){var h=o(6656),f=o(3887),p=o(1236),y=o(3070);c.exports=function(g,v){for(var b=f(v),k=y.f,E=p.f,w=0;w<b.length;w++){var I=b[w];h(g,I)||k(g,I,E(v,I))}}},8544:function(c,d,o){var h=o(7293);c.exports=!h(function(){function f(){}return f.prototype.constructor=null,Object.getPrototypeOf(new f)!==f.prototype})},4994:function(c,d,o){"use strict";var h=o(3383).IteratorPrototype,f=o(30),p=o(9114),y=o(8003),g=o(7497),v=function(){return this};c.exports=function(b,k,E){var w=k+" Iterator";return b.prototype=f(h,{next:p(1,E)}),y(b,w,!1,!0),g[w]=v,b}},8880:function(c,d,o){var h=o(9781),f=o(3070),p=o(9114);c.exports=h?function(y,g,v){return f.f(y,g,p(1,v))}:function(y,g,v){return y[g]=v,y}},9114:function(c){c.exports=function(d,o){return{enumerable:!(d&1),configurable:!(d&2),writable:!(d&4),value:o}}},6135:function(c,d,o){"use strict";var h=o(7593),f=o(3070),p=o(9114);c.exports=function(y,g,v){var b=h(g);b in y?f.f(y,b,p(0,v)):y[b]=v}},654:function(c,d,o){"use strict";var h=o(2109),f=o(4994),p=o(9518),y=o(7674),g=o(8003),v=o(8880),b=o(1320),k=o(5112),E=o(1913),w=o(7497),I=o(3383),S=I.IteratorPrototype,N=I.BUGGY_SAFARI_ITERATORS,O=k("iterator"),j="keys",U="values",ee="entries",V=function(){return this};c.exports=function(W,K,q,R,T,H,Z){f(q,K,R);var P=function(ze){if(ze===T&&A)return A;if(!N&&ze in ae)return ae[ze];switch(ze){case j:return function(){return new q(this,ze)};case U:return function(){return new q(this,ze)};case ee:return function(){return new q(this,ze)}}return function(){return new q(this)}},z=K+" Iterator",ne=!1,ae=W.prototype,F=ae[O]||ae["@@iterator"]||T&&ae[T],A=!N&&F||P(T),be=K=="Array"&&ae.entries||F,Fe,xe,_e;if(be&&(Fe=p(be.call(new W)),S!==Object.prototype&&Fe.next&&(!E&&p(Fe)!==S&&(y?y(Fe,S):typeof Fe[O]!="function"&&v(Fe,O,V)),g(Fe,z,!0,!0),E&&(w[z]=V))),T==U&&F&&F.name!==U&&(ne=!0,A=function(){return F.call(this)}),(!E||Z)&&ae[O]!==A&&v(ae,O,A),w[K]=A,T)if(xe={values:P(U),keys:H?A:P(j),entries:P(ee)},Z)for(_e in xe)(N||ne||!(_e in ae))&&b(ae,_e,xe[_e]);else h({target:K,proto:!0,forced:N||ne},xe);return xe}},9781:function(c,d,o){var h=o(7293);c.exports=!h(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},317:function(c,d,o){var h=o(7854),f=o(111),p=h.document,y=f(p)&&f(p.createElement);c.exports=function(g){return y?p.createElement(g):{}}},8324:function(c){c.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(c,d,o){var h=o(5005);c.exports=h("navigator","userAgent")||""},7392:function(c,d,o){var h=o(7854),f=o(8113),p=h.process,y=p&&p.versions,g=y&&y.v8,v,b;g?(v=g.split("."),b=v[0]+v[1]):f&&(v=f.match(/Edge\/(\d+)/),(!v||v[1]>=74)&&(v=f.match(/Chrome\/(\d+)/),v&&(b=v[1]))),c.exports=b&&+b},748:function(c){c.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(c,d,o){var h=o(7854),f=o(1236).f,p=o(8880),y=o(1320),g=o(3505),v=o(9920),b=o(4705);c.exports=function(k,E){var w=k.target,I=k.global,S=k.stat,N,O,j,U,ee,V;if(I?O=h:S?O=h[w]||g(w,{}):O=(h[w]||{}).prototype,O)for(j in E){if(ee=E[j],k.noTargetGet?(V=f(O,j),U=V&&V.value):U=O[j],N=b(I?j:w+(S?".":"#")+j,k.forced),!N&&U!==void 0){if(typeof ee==typeof U)continue;v(ee,U)}(k.sham||U&&U.sham)&&p(ee,"sham",!0),y(O,j,ee,k)}}},7293:function(c){c.exports=function(d){try{return!!d()}catch{return!0}}},7007:function(c,d,o){"use strict";o(4916);var h=o(1320),f=o(7293),p=o(5112),y=o(2261),g=o(8880),v=p("species"),b=!f(function(){var S=/./;return S.exec=function(){var N=[];return N.groups={a:"7"},N},"".replace(S,"$<a>")!=="7"}),k=function(){return"a".replace(/./,"$0")==="$0"}(),E=p("replace"),w=function(){return/./[E]?/./[E]("a","$0")==="":!1}(),I=!f(function(){var S=/(?:)/,N=S.exec;S.exec=function(){return N.apply(this,arguments)};var O="ab".split(S);return O.length!==2||O[0]!=="a"||O[1]!=="b"});c.exports=function(S,N,O,j){var U=p(S),ee=!f(function(){var T={};return T[U]=function(){return 7},""[S](T)!=7}),V=ee&&!f(function(){var T=!1,H=/a/;return S==="split"&&(H={},H.constructor={},H.constructor[v]=function(){return H},H.flags="",H[U]=/./[U]),H.exec=function(){return T=!0,null},H[U](""),!T});if(!ee||!V||S==="replace"&&!(b&&k&&!w)||S==="split"&&!I){var W=/./[U],K=O(U,""[S],function(T,H,Z,P,z){return H.exec===y?ee&&!z?{done:!0,value:W.call(H,Z,P)}:{done:!0,value:T.call(Z,H,P)}:{done:!1}},{REPLACE_KEEPS_$0:k,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:w}),q=K[0],R=K[1];h(String.prototype,S,q),h(RegExp.prototype,U,N==2?function(T,H){return R.call(T,this,H)}:function(T){return R.call(T,this)})}j&&g(RegExp.prototype[U],"sham",!0)}},9974:function(c,d,o){var h=o(3099);c.exports=function(f,p,y){if(h(f),p===void 0)return f;switch(y){case 0:return function(){return f.call(p)};case 1:return function(g){return f.call(p,g)};case 2:return function(g,v){return f.call(p,g,v)};case 3:return function(g,v,b){return f.call(p,g,v,b)}}return function(){return f.apply(p,arguments)}}},5005:function(c,d,o){var h=o(857),f=o(7854),p=function(y){return typeof y=="function"?y:void 0};c.exports=function(y,g){return arguments.length<2?p(h[y])||p(f[y]):h[y]&&h[y][g]||f[y]&&f[y][g]}},1246:function(c,d,o){var h=o(648),f=o(7497),p=o(5112),y=p("iterator");c.exports=function(g){if(g!=null)return g[y]||g["@@iterator"]||f[h(g)]}},8554:function(c,d,o){var h=o(9670),f=o(1246);c.exports=function(p){var y=f(p);if(typeof y!="function")throw TypeError(String(p)+" is not iterable");return h(y.call(p))}},647:function(c,d,o){var h=o(7908),f=Math.floor,p="".replace,y=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;c.exports=function(v,b,k,E,w,I){var S=k+v.length,N=E.length,O=g;return w!==void 0&&(w=h(w),O=y),p.call(I,O,function(j,U){var ee;switch(U.charAt(0)){case"$":return"$";case"&":return v;case"`":return b.slice(0,k);case"'":return b.slice(S);case"<":ee=w[U.slice(1,-1)];break;default:var V=+U;if(V===0)return j;if(V>N){var W=f(V/10);return W===0?j:W<=N?E[W-1]===void 0?U.charAt(1):E[W-1]+U.charAt(1):j}ee=E[V-1]}return ee===void 0?"":ee})}},7854:function(c,d,o){var h=function(f){return f&&f.Math==Math&&f};c.exports=h(typeof globalThis=="object"&&globalThis)||h(typeof window=="object"&&window)||h(typeof self=="object"&&self)||h(typeof o.g=="object"&&o.g)||function(){return this}()||Function("return this")()},6656:function(c){var d={}.hasOwnProperty;c.exports=function(o,h){return d.call(o,h)}},3501:function(c){c.exports={}},490:function(c,d,o){var h=o(5005);c.exports=h("document","documentElement")},4664:function(c,d,o){var h=o(9781),f=o(7293),p=o(317);c.exports=!h&&!f(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!=7})},1179:function(c){var d=Math.abs,o=Math.pow,h=Math.floor,f=Math.log,p=Math.LN2,y=function(v,b,k){var E=new Array(k),w=k*8-b-1,I=(1<<w)-1,S=I>>1,N=b===23?o(2,-24)-o(2,-77):0,O=v<0||v===0&&1/v<0?1:0,j=0,U,ee,V;for(v=d(v),v!=v||v===1/0?(ee=v!=v?1:0,U=I):(U=h(f(v)/p),v*(V=o(2,-U))<1&&(U--,V*=2),U+S>=1?v+=N/V:v+=N*o(2,1-S),v*V>=2&&(U++,V/=2),U+S>=I?(ee=0,U=I):U+S>=1?(ee=(v*V-1)*o(2,b),U=U+S):(ee=v*o(2,S-1)*o(2,b),U=0));b>=8;E[j++]=ee&255,ee/=256,b-=8);for(U=U<<b|ee,w+=b;w>0;E[j++]=U&255,U/=256,w-=8);return E[--j]|=O*128,E},g=function(v,b){var k=v.length,E=k*8-b-1,w=(1<<E)-1,I=w>>1,S=E-7,N=k-1,O=v[N--],j=O&127,U;for(O>>=7;S>0;j=j*256+v[N],N--,S-=8);for(U=j&(1<<-S)-1,j>>=-S,S+=b;S>0;U=U*256+v[N],N--,S-=8);if(j===0)j=1-I;else{if(j===w)return U?NaN:O?-1/0:1/0;U=U+o(2,b),j=j-I}return(O?-1:1)*U*o(2,j-b)};c.exports={pack:y,unpack:g}},8361:function(c,d,o){var h=o(7293),f=o(4326),p="".split;c.exports=h(function(){return!Object("z").propertyIsEnumerable(0)})?function(y){return f(y)=="String"?p.call(y,""):Object(y)}:Object},9587:function(c,d,o){var h=o(111),f=o(7674);c.exports=function(p,y,g){var v,b;return f&&typeof(v=y.constructor)=="function"&&v!==g&&h(b=v.prototype)&&b!==g.prototype&&f(p,b),p}},2788:function(c,d,o){var h=o(5465),f=Function.toString;typeof h.inspectSource!="function"&&(h.inspectSource=function(p){return f.call(p)}),c.exports=h.inspectSource},9909:function(c,d,o){var h=o(8536),f=o(7854),p=o(111),y=o(8880),g=o(6656),v=o(5465),b=o(6200),k=o(3501),E=f.WeakMap,w,I,S,N=function(K){return S(K)?I(K):w(K,{})},O=function(K){return function(q){var R;if(!p(q)||(R=I(q)).type!==K)throw TypeError("Incompatible receiver, "+K+" required");return R}};if(h){var j=v.state||(v.state=new E),U=j.get,ee=j.has,V=j.set;w=function(K,q){return q.facade=K,V.call(j,K,q),q},I=function(K){return U.call(j,K)||{}},S=function(K){return ee.call(j,K)}}else{var W=b("state");k[W]=!0,w=function(K,q){return q.facade=K,y(K,W,q),q},I=function(K){return g(K,W)?K[W]:{}},S=function(K){return g(K,W)}}c.exports={set:w,get:I,has:S,enforce:N,getterFor:O}},7659:function(c,d,o){var h=o(5112),f=o(7497),p=h("iterator"),y=Array.prototype;c.exports=function(g){return g!==void 0&&(f.Array===g||y[p]===g)}},3157:function(c,d,o){var h=o(4326);c.exports=Array.isArray||function(p){return h(p)=="Array"}},4705:function(c,d,o){var h=o(7293),f=/#|\.prototype\./,p=function(k,E){var w=g[y(k)];return w==b?!0:w==v?!1:typeof E=="function"?h(E):!!E},y=p.normalize=function(k){return String(k).replace(f,".").toLowerCase()},g=p.data={},v=p.NATIVE="N",b=p.POLYFILL="P";c.exports=p},111:function(c){c.exports=function(d){return typeof d=="object"?d!==null:typeof d=="function"}},1913:function(c){c.exports=!1},7850:function(c,d,o){var h=o(111),f=o(4326),p=o(5112),y=p("match");c.exports=function(g){var v;return h(g)&&((v=g[y])!==void 0?!!v:f(g)=="RegExp")}},9212:function(c,d,o){var h=o(9670);c.exports=function(f){var p=f.return;if(p!==void 0)return h(p.call(f)).value}},3383:function(c,d,o){"use strict";var h=o(7293),f=o(9518),p=o(8880),y=o(6656),g=o(5112),v=o(1913),b=g("iterator"),k=!1,E=function(){return this},w,I,S;[].keys&&(S=[].keys(),"next"in S?(I=f(f(S)),I!==Object.prototype&&(w=I)):k=!0);var N=w==null||h(function(){var O={};return w[b].call(O)!==O});N&&(w={}),(!v||N)&&!y(w,b)&&p(w,b,E),c.exports={IteratorPrototype:w,BUGGY_SAFARI_ITERATORS:k}},7497:function(c){c.exports={}},133:function(c,d,o){var h=o(7293);c.exports=!!Object.getOwnPropertySymbols&&!h(function(){return!String(Symbol())})},590:function(c,d,o){var h=o(7293),f=o(5112),p=o(1913),y=f("iterator");c.exports=!h(function(){var g=new URL("b?a=1&b=2&c=3","http://a"),v=g.searchParams,b="";return g.pathname="c%20d",v.forEach(function(k,E){v.delete("b"),b+=E+k}),p&&!g.toJSON||!v.sort||g.href!=="http://a/c%20d?a=1&c=3"||v.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!v[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("http://a#\u0431").hash!=="#%D0%B1"||b!=="a1c3"||new URL("http://x",void 0).host!=="x"})},8536:function(c,d,o){var h=o(7854),f=o(2788),p=h.WeakMap;c.exports=typeof p=="function"&&/native code/.test(f(p))},1574:function(c,d,o){"use strict";var h=o(9781),f=o(7293),p=o(1956),y=o(5181),g=o(5296),v=o(7908),b=o(8361),k=Object.assign,E=Object.defineProperty;c.exports=!k||f(function(){if(h&&k({b:1},k(E({},"a",{enumerable:!0,get:function(){E(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var w={},I={},S=Symbol(),N="abcdefghijklmnopqrst";return w[S]=7,N.split("").forEach(function(O){I[O]=O}),k({},w)[S]!=7||p(k({},I)).join("")!=N})?function(I,S){for(var N=v(I),O=arguments.length,j=1,U=y.f,ee=g.f;O>j;)for(var V=b(arguments[j++]),W=U?p(V).concat(U(V)):p(V),K=W.length,q=0,R;K>q;)R=W[q++],(!h||ee.call(V,R))&&(N[R]=V[R]);return N}:k},30:function(c,d,o){var h=o(9670),f=o(6048),p=o(748),y=o(3501),g=o(490),v=o(317),b=o(6200),k=">",E="<",w="prototype",I="script",S=b("IE_PROTO"),N=function(){},O=function(W){return E+I+k+W+E+"/"+I+k},j=function(W){W.write(O("")),W.close();var K=W.parentWindow.Object;return W=null,K},U=function(){var W=v("iframe"),K="java"+I+":",q;return W.style.display="none",g.appendChild(W),W.src=String(K),q=W.contentWindow.document,q.open(),q.write(O("document.F=Object")),q.close(),q.F},ee,V=function(){try{ee=document.domain&&new ActiveXObject("htmlfile")}catch{}V=ee?j(ee):U();for(var W=p.length;W--;)delete V[w][p[W]];return V()};y[S]=!0,c.exports=Object.create||function(K,q){var R;return K!==null?(N[w]=h(K),R=new N,N[w]=null,R[S]=K):R=V(),q===void 0?R:f(R,q)}},6048:function(c,d,o){var h=o(9781),f=o(3070),p=o(9670),y=o(1956);c.exports=h?Object.defineProperties:function(v,b){p(v);for(var k=y(b),E=k.length,w=0,I;E>w;)f.f(v,I=k[w++],b[I]);return v}},3070:function(c,d,o){var h=o(9781),f=o(4664),p=o(9670),y=o(7593),g=Object.defineProperty;d.f=h?g:function(b,k,E){if(p(b),k=y(k,!0),p(E),f)try{return g(b,k,E)}catch{}if("get"in E||"set"in E)throw TypeError("Accessors not supported");return"value"in E&&(b[k]=E.value),b}},1236:function(c,d,o){var h=o(9781),f=o(5296),p=o(9114),y=o(5656),g=o(7593),v=o(6656),b=o(4664),k=Object.getOwnPropertyDescriptor;d.f=h?k:function(w,I){if(w=y(w),I=g(I,!0),b)try{return k(w,I)}catch{}if(v(w,I))return p(!f.f.call(w,I),w[I])}},8006:function(c,d,o){var h=o(6324),f=o(748),p=f.concat("length","prototype");d.f=Object.getOwnPropertyNames||function(g){return h(g,p)}},5181:function(c,d){d.f=Object.getOwnPropertySymbols},9518:function(c,d,o){var h=o(6656),f=o(7908),p=o(6200),y=o(8544),g=p("IE_PROTO"),v=Object.prototype;c.exports=y?Object.getPrototypeOf:function(b){return b=f(b),h(b,g)?b[g]:typeof b.constructor=="function"&&b instanceof b.constructor?b.constructor.prototype:b instanceof Object?v:null}},6324:function(c,d,o){var h=o(6656),f=o(5656),p=o(1318).indexOf,y=o(3501);c.exports=function(g,v){var b=f(g),k=0,E=[],w;for(w in b)!h(y,w)&&h(b,w)&&E.push(w);for(;v.length>k;)h(b,w=v[k++])&&(~p(E,w)||E.push(w));return E}},1956:function(c,d,o){var h=o(6324),f=o(748);c.exports=Object.keys||function(y){return h(y,f)}},5296:function(c,d){"use strict";var o={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,f=h&&!o.call({1:2},1);d.f=f?function(y){var g=h(this,y);return!!g&&g.enumerable}:o},7674:function(c,d,o){var h=o(9670),f=o(6077);c.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var p=!1,y={},g;try{g=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,g.call(y,[]),p=y instanceof Array}catch{}return function(b,k){return h(b),f(k),p?g.call(b,k):b.__proto__=k,b}}():void 0)},288:function(c,d,o){"use strict";var h=o(1694),f=o(648);c.exports=h?{}.toString:function(){return"[object "+f(this)+"]"}},3887:function(c,d,o){var h=o(5005),f=o(8006),p=o(5181),y=o(9670);c.exports=h("Reflect","ownKeys")||function(v){var b=f.f(y(v)),k=p.f;return k?b.concat(k(v)):b}},857:function(c,d,o){var h=o(7854);c.exports=h},2248:function(c,d,o){var h=o(1320);c.exports=function(f,p,y){for(var g in p)h(f,g,p[g],y);return f}},1320:function(c,d,o){var h=o(7854),f=o(8880),p=o(6656),y=o(3505),g=o(2788),v=o(9909),b=v.get,k=v.enforce,E=String(String).split("String");(c.exports=function(w,I,S,N){var O=N?!!N.unsafe:!1,j=N?!!N.enumerable:!1,U=N?!!N.noTargetGet:!1,ee;if(typeof S=="function"&&(typeof I=="string"&&!p(S,"name")&&f(S,"name",I),ee=k(S),ee.source||(ee.source=E.join(typeof I=="string"?I:""))),w===h){j?w[I]=S:y(I,S);return}else O?!U&&w[I]&&(j=!0):delete w[I];j?w[I]=S:f(w,I,S)})(Function.prototype,"toString",function(){return typeof this=="function"&&b(this).source||g(this)})},7651:function(c,d,o){var h=o(4326),f=o(2261);c.exports=function(p,y){var g=p.exec;if(typeof g=="function"){var v=g.call(p,y);if(typeof v!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return v}if(h(p)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return f.call(p,y)}},2261:function(c,d,o){"use strict";var h=o(7066),f=o(2999),p=RegExp.prototype.exec,y=String.prototype.replace,g=p,v=function(){var w=/a/,I=/b*/g;return p.call(w,"a"),p.call(I,"a"),w.lastIndex!==0||I.lastIndex!==0}(),b=f.UNSUPPORTED_Y||f.BROKEN_CARET,k=/()??/.exec("")[1]!==void 0,E=v||k||b;E&&(g=function(I){var S=this,N,O,j,U,ee=b&&S.sticky,V=h.call(S),W=S.source,K=0,q=I;return ee&&(V=V.replace("y",""),V.indexOf("g")===-1&&(V+="g"),q=String(I).slice(S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&I[S.lastIndex-1]!==`
`)&&(W="(?: "+W+")",q=" "+q,K++),O=new RegExp("^(?:"+W+")",V)),k&&(O=new RegExp("^"+W+"$(?!\\s)",V)),v&&(N=S.lastIndex),j=p.call(ee?O:S,q),ee?j?(j.input=j.input.slice(K),j[0]=j[0].slice(K),j.index=S.lastIndex,S.lastIndex+=j[0].length):S.lastIndex=0:v&&j&&(S.lastIndex=S.global?j.index+j[0].length:N),k&&j&&j.length>1&&y.call(j[0],O,function(){for(U=1;U<arguments.length-2;U++)arguments[U]===void 0&&(j[U]=void 0)}),j}),c.exports=g},7066:function(c,d,o){"use strict";var h=o(9670);c.exports=function(){var f=h(this),p="";return f.global&&(p+="g"),f.ignoreCase&&(p+="i"),f.multiline&&(p+="m"),f.dotAll&&(p+="s"),f.unicode&&(p+="u"),f.sticky&&(p+="y"),p}},2999:function(c,d,o){"use strict";var h=o(7293);function f(p,y){return RegExp(p,y)}d.UNSUPPORTED_Y=h(function(){var p=f("a","y");return p.lastIndex=2,p.exec("abcd")!=null}),d.BROKEN_CARET=h(function(){var p=f("^r","gy");return p.lastIndex=2,p.exec("str")!=null})},4488:function(c){c.exports=function(d){if(d==null)throw TypeError("Can't call method on "+d);return d}},3505:function(c,d,o){var h=o(7854),f=o(8880);c.exports=function(p,y){try{f(h,p,y)}catch{h[p]=y}return y}},6340:function(c,d,o){"use strict";var h=o(5005),f=o(3070),p=o(5112),y=o(9781),g=p("species");c.exports=function(v){var b=h(v),k=f.f;y&&b&&!b[g]&&k(b,g,{configurable:!0,get:function(){return this}})}},8003:function(c,d,o){var h=o(3070).f,f=o(6656),p=o(5112),y=p("toStringTag");c.exports=function(g,v,b){g&&!f(g=b?g:g.prototype,y)&&h(g,y,{configurable:!0,value:v})}},6200:function(c,d,o){var h=o(2309),f=o(9711),p=h("keys");c.exports=function(y){return p[y]||(p[y]=f(y))}},5465:function(c,d,o){var h=o(7854),f=o(3505),p="__core-js_shared__",y=h[p]||f(p,{});c.exports=y},2309:function(c,d,o){var h=o(1913),f=o(5465);(c.exports=function(p,y){return f[p]||(f[p]=y!==void 0?y:{})})("versions",[]).push({version:"3.9.0",mode:h?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(c,d,o){var h=o(9670),f=o(3099),p=o(5112),y=p("species");c.exports=function(g,v){var b=h(g).constructor,k;return b===void 0||(k=h(b)[y])==null?v:f(k)}},8710:function(c,d,o){var h=o(9958),f=o(4488),p=function(y){return function(g,v){var b=String(f(g)),k=h(v),E=b.length,w,I;return k<0||k>=E?y?"":void 0:(w=b.charCodeAt(k),w<55296||w>56319||k+1===E||(I=b.charCodeAt(k+1))<56320||I>57343?y?b.charAt(k):w:y?b.slice(k,k+2):(w-55296<<10)+(I-56320)+65536)}};c.exports={codeAt:p(!1),charAt:p(!0)}},3197:function(c){"use strict";var d=2147483647,o=36,h=1,f=26,p=38,y=700,g=72,v=128,b="-",k=/[^\0-\u007E]/,E=/[.\u3002\uFF0E\uFF61]/g,w="Overflow: input needs wider integers to process",I=o-h,S=Math.floor,N=String.fromCharCode,O=function(V){for(var W=[],K=0,q=V.length;K<q;){var R=V.charCodeAt(K++);if(R>=55296&&R<=56319&&K<q){var T=V.charCodeAt(K++);(T&64512)==56320?W.push(((R&1023)<<10)+(T&1023)+65536):(W.push(R),K--)}else W.push(R)}return W},j=function(V){return V+22+75*(V<26)},U=function(V,W,K){var q=0;for(V=K?S(V/y):V>>1,V+=S(V/W);V>I*f>>1;q+=o)V=S(V/I);return S(q+(I+1)*V/(V+p))},ee=function(V){var W=[];V=O(V);var K=V.length,q=v,R=0,T=g,H,Z;for(H=0;H<V.length;H++)Z=V[H],Z<128&&W.push(N(Z));var P=W.length,z=P;for(P&&W.push(b);z<K;){var ne=d;for(H=0;H<V.length;H++)Z=V[H],Z>=q&&Z<ne&&(ne=Z);var ae=z+1;if(ne-q>S((d-R)/ae))throw RangeError(w);for(R+=(ne-q)*ae,q=ne,H=0;H<V.length;H++){if(Z=V[H],Z<q&&++R>d)throw RangeError(w);if(Z==q){for(var F=R,A=o;;A+=o){var be=A<=T?h:A>=T+f?f:A-T;if(F<be)break;var Fe=F-be,xe=o-be;W.push(N(j(be+Fe%xe))),F=S(Fe/xe)}W.push(N(j(F))),T=U(R,ae,z==P),R=0,++z}}++R,++q}return W.join("")};c.exports=function(V){var W=[],K=V.toLowerCase().replace(E,".").split("."),q,R;for(q=0;q<K.length;q++)R=K[q],W.push(k.test(R)?"xn--"+ee(R):R);return W.join(".")}},6091:function(c,d,o){var h=o(7293),f=o(1361),p="\u200B\x85\u180E";c.exports=function(y){return h(function(){return!!f[y]()||p[y]()!=p||f[y].name!==y})}},3111:function(c,d,o){var h=o(4488),f=o(1361),p="["+f+"]",y=RegExp("^"+p+p+"*"),g=RegExp(p+p+"*$"),v=function(b){return function(k){var E=String(h(k));return b&1&&(E=E.replace(y,"")),b&2&&(E=E.replace(g,"")),E}};c.exports={start:v(1),end:v(2),trim:v(3)}},1400:function(c,d,o){var h=o(9958),f=Math.max,p=Math.min;c.exports=function(y,g){var v=h(y);return v<0?f(v+g,0):p(v,g)}},7067:function(c,d,o){var h=o(9958),f=o(7466);c.exports=function(p){if(p===void 0)return 0;var y=h(p),g=f(y);if(y!==g)throw RangeError("Wrong length or index");return g}},5656:function(c,d,o){var h=o(8361),f=o(4488);c.exports=function(p){return h(f(p))}},9958:function(c){var d=Math.ceil,o=Math.floor;c.exports=function(h){return isNaN(h=+h)?0:(h>0?o:d)(h)}},7466:function(c,d,o){var h=o(9958),f=Math.min;c.exports=function(p){return p>0?f(h(p),9007199254740991):0}},7908:function(c,d,o){var h=o(4488);c.exports=function(f){return Object(h(f))}},4590:function(c,d,o){var h=o(3002);c.exports=function(f,p){var y=h(f);if(y%p)throw RangeError("Wrong offset");return y}},3002:function(c,d,o){var h=o(9958);c.exports=function(f){var p=h(f);if(p<0)throw RangeError("The argument can't be less than 0");return p}},7593:function(c,d,o){var h=o(111);c.exports=function(f,p){if(!h(f))return f;var y,g;if(p&&typeof(y=f.toString)=="function"&&!h(g=y.call(f))||typeof(y=f.valueOf)=="function"&&!h(g=y.call(f))||!p&&typeof(y=f.toString)=="function"&&!h(g=y.call(f)))return g;throw TypeError("Can't convert object to primitive value")}},1694:function(c,d,o){var h=o(5112),f=h("toStringTag"),p={};p[f]="z",c.exports=String(p)==="[object z]"},9843:function(c,d,o){"use strict";var h=o(2109),f=o(7854),p=o(9781),y=o(3832),g=o(260),v=o(3331),b=o(5787),k=o(9114),E=o(8880),w=o(7466),I=o(7067),S=o(4590),N=o(7593),O=o(6656),j=o(648),U=o(111),ee=o(30),V=o(7674),W=o(8006).f,K=o(7321),q=o(2092).forEach,R=o(6340),T=o(3070),H=o(1236),Z=o(9909),P=o(9587),z=Z.get,ne=Z.set,ae=T.f,F=H.f,A=Math.round,be=f.RangeError,Fe=v.ArrayBuffer,xe=v.DataView,_e=g.NATIVE_ARRAY_BUFFER_VIEWS,ze=g.TYPED_ARRAY_TAG,qe=g.TypedArray,ge=g.TypedArrayPrototype,ke=g.aTypedArrayConstructor,je=g.isTypedArray,at="BYTES_PER_ELEMENT",gt="Wrong length",Re=function(Se,X){for(var de=0,ue=X.length,it=new(ke(Se))(ue);ue>de;)it[de]=X[de++];return it},Ie=function(Se,X){ae(Se,X,{get:function(){return z(this)[X]}})},Be=function(Se){var X;return Se instanceof Fe||(X=j(Se))=="ArrayBuffer"||X=="SharedArrayBuffer"},Ke=function(Se,X){return je(Se)&&typeof X!="symbol"&&X in Se&&String(+X)==String(X)},He=function(X,de){return Ke(X,de=N(de,!0))?k(2,X[de]):F(X,de)},Je=function(X,de,ue){return Ke(X,de=N(de,!0))&&U(ue)&&O(ue,"value")&&!O(ue,"get")&&!O(ue,"set")&&!ue.configurable&&(!O(ue,"writable")||ue.writable)&&(!O(ue,"enumerable")||ue.enumerable)?(X[de]=ue.value,X):ae(X,de,ue)};p?(_e||(H.f=He,T.f=Je,Ie(ge,"buffer"),Ie(ge,"byteOffset"),Ie(ge,"byteLength"),Ie(ge,"length")),h({target:"Object",stat:!0,forced:!_e},{getOwnPropertyDescriptor:He,defineProperty:Je}),c.exports=function(Se,X,de){var ue=Se.match(/\d+$/)[0]/8,it=Se+(de?"Clamped":"")+"Array",Ne="get"+Se,ot="set"+Se,Xe=f[it],et=Xe,We=et&&et.prototype,$t={},Lt=function(Mt,pt){var rt=z(Mt);return rt.view[Ne](pt*ue+rt.byteOffset,!0)},fr=function(Mt,pt,rt){var wt=z(Mt);de&&(rt=(rt=A(rt))<0?0:rt>255?255:rt&255),wt.view[ot](pt*ue+wt.byteOffset,rt,!0)},lt=function(Mt,pt){ae(Mt,pt,{get:function(){return Lt(this,pt)},set:function(rt){return fr(this,pt,rt)},enumerable:!0})};_e?y&&(et=X(function(Mt,pt,rt,wt){return b(Mt,et,it),P(function(){return U(pt)?Be(pt)?wt!==void 0?new Xe(pt,S(rt,ue),wt):rt!==void 0?new Xe(pt,S(rt,ue)):new Xe(pt):je(pt)?Re(et,pt):K.call(et,pt):new Xe(I(pt))}(),Mt,et)}),V&&V(et,qe),q(W(Xe),function(Mt){Mt in et||E(et,Mt,Xe[Mt])}),et.prototype=We):(et=X(function(Mt,pt,rt,wt){b(Mt,et,it);var dr=0,Et=0,Vt,kt,st;if(!U(pt))st=I(pt),kt=st*ue,Vt=new Fe(kt);else if(Be(pt)){Vt=pt,Et=S(rt,ue);var Ht=pt.byteLength;if(wt===void 0){if(Ht%ue||(kt=Ht-Et,kt<0))throw be(gt)}else if(kt=w(wt)*ue,kt+Et>Ht)throw be(gt);st=kt/ue}else return je(pt)?Re(et,pt):K.call(et,pt);for(ne(Mt,{buffer:Vt,byteOffset:Et,byteLength:kt,length:st,view:new xe(Vt)});dr<st;)lt(Mt,dr++)}),V&&V(et,qe),We=et.prototype=ee(ge)),We.constructor!==et&&E(We,"constructor",et),ze&&E(We,ze,it),$t[it]=et,h({global:!0,forced:et!=Xe,sham:!_e},$t),at in et||E(et,at,ue),at in We||E(We,at,ue),R(it)}):c.exports=function(){}},3832:function(c,d,o){var h=o(7854),f=o(7293),p=o(7072),y=o(260).NATIVE_ARRAY_BUFFER_VIEWS,g=h.ArrayBuffer,v=h.Int8Array;c.exports=!y||!f(function(){v(1)})||!f(function(){new v(-1)})||!p(function(b){new v,new v(null),new v(1.5),new v(b)},!0)||f(function(){return new v(new g(2),1,void 0).length!==1})},3074:function(c,d,o){var h=o(260).aTypedArrayConstructor,f=o(6707);c.exports=function(p,y){for(var g=f(p,p.constructor),v=0,b=y.length,k=new(h(g))(b);b>v;)k[v]=y[v++];return k}},7321:function(c,d,o){var h=o(7908),f=o(7466),p=o(1246),y=o(7659),g=o(9974),v=o(260).aTypedArrayConstructor;c.exports=function(k){var E=h(k),w=arguments.length,I=w>1?arguments[1]:void 0,S=I!==void 0,N=p(E),O,j,U,ee,V,W;if(N!=null&&!y(N))for(V=N.call(E),W=V.next,E=[];!(ee=W.call(V)).done;)E.push(ee.value);for(S&&w>2&&(I=g(I,arguments[2],2)),j=f(E.length),U=new(v(this))(j),O=0;j>O;O++)U[O]=S?I(E[O],O):E[O];return U}},9711:function(c){var d=0,o=Math.random();c.exports=function(h){return"Symbol("+String(h===void 0?"":h)+")_"+(++d+o).toString(36)}},3307:function(c,d,o){var h=o(133);c.exports=h&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},5112:function(c,d,o){var h=o(7854),f=o(2309),p=o(6656),y=o(9711),g=o(133),v=o(3307),b=f("wks"),k=h.Symbol,E=v?k:k&&k.withoutSetter||y;c.exports=function(w){return p(b,w)||(g&&p(k,w)?b[w]=k[w]:b[w]=E("Symbol."+w)),b[w]}},1361:function(c){c.exports=`
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},8264:function(c,d,o){"use strict";var h=o(2109),f=o(7854),p=o(3331),y=o(6340),g="ArrayBuffer",v=p[g],b=f[g];h({global:!0,forced:b!==v},{ArrayBuffer:v}),y(g)},2222:function(c,d,o){"use strict";var h=o(2109),f=o(7293),p=o(3157),y=o(111),g=o(7908),v=o(7466),b=o(6135),k=o(5417),E=o(1194),w=o(5112),I=o(7392),S=w("isConcatSpreadable"),N=9007199254740991,O="Maximum allowed index exceeded",j=I>=51||!f(function(){var W=[];return W[S]=!1,W.concat()[0]!==W}),U=E("concat"),ee=function(W){if(!y(W))return!1;var K=W[S];return K!==void 0?!!K:p(W)},V=!j||!U;h({target:"Array",proto:!0,forced:V},{concat:function(K){var q=g(this),R=k(q,0),T=0,H,Z,P,z,ne;for(H=-1,P=arguments.length;H<P;H++)if(ne=H===-1?q:arguments[H],ee(ne)){if(z=v(ne.length),T+z>N)throw TypeError(O);for(Z=0;Z<z;Z++,T++)Z in ne&&b(R,T,ne[Z])}else{if(T>=N)throw TypeError(O);b(R,T++,ne)}return R.length=T,R}})},7327:function(c,d,o){"use strict";var h=o(2109),f=o(2092).filter,p=o(1194),y=p("filter");h({target:"Array",proto:!0,forced:!y},{filter:function(v){return f(this,v,arguments.length>1?arguments[1]:void 0)}})},2772:function(c,d,o){"use strict";var h=o(2109),f=o(1318).indexOf,p=o(9341),y=[].indexOf,g=!!y&&1/[1].indexOf(1,-0)<0,v=p("indexOf");h({target:"Array",proto:!0,forced:g||!v},{indexOf:function(k){return g?y.apply(this,arguments)||0:f(this,k,arguments.length>1?arguments[1]:void 0)}})},6992:function(c,d,o){"use strict";var h=o(5656),f=o(1223),p=o(7497),y=o(9909),g=o(654),v="Array Iterator",b=y.set,k=y.getterFor(v);c.exports=g(Array,"Array",function(E,w){b(this,{type:v,target:h(E),index:0,kind:w})},function(){var E=k(this),w=E.target,I=E.kind,S=E.index++;return!w||S>=w.length?(E.target=void 0,{value:void 0,done:!0}):I=="keys"?{value:S,done:!1}:I=="values"?{value:w[S],done:!1}:{value:[S,w[S]],done:!1}},"values"),p.Arguments=p.Array,f("keys"),f("values"),f("entries")},1249:function(c,d,o){"use strict";var h=o(2109),f=o(2092).map,p=o(1194),y=p("map");h({target:"Array",proto:!0,forced:!y},{map:function(v){return f(this,v,arguments.length>1?arguments[1]:void 0)}})},7042:function(c,d,o){"use strict";var h=o(2109),f=o(111),p=o(3157),y=o(1400),g=o(7466),v=o(5656),b=o(6135),k=o(5112),E=o(1194),w=E("slice"),I=k("species"),S=[].slice,N=Math.max;h({target:"Array",proto:!0,forced:!w},{slice:function(j,U){var ee=v(this),V=g(ee.length),W=y(j,V),K=y(U===void 0?V:U,V),q,R,T;if(p(ee)&&(q=ee.constructor,typeof q=="function"&&(q===Array||p(q.prototype))?q=void 0:f(q)&&(q=q[I],q===null&&(q=void 0)),q===Array||q===void 0))return S.call(ee,W,K);for(R=new(q===void 0?Array:q)(N(K-W,0)),T=0;W<K;W++,T++)W in ee&&b(R,T,ee[W]);return R.length=T,R}})},561:function(c,d,o){"use strict";var h=o(2109),f=o(1400),p=o(9958),y=o(7466),g=o(7908),v=o(5417),b=o(6135),k=o(1194),E=k("splice"),w=Math.max,I=Math.min,S=9007199254740991,N="Maximum allowed length exceeded";h({target:"Array",proto:!0,forced:!E},{splice:function(j,U){var ee=g(this),V=y(ee.length),W=f(j,V),K=arguments.length,q,R,T,H,Z,P;if(K===0?q=R=0:K===1?(q=0,R=V-W):(q=K-2,R=I(w(p(U),0),V-W)),V+q-R>S)throw TypeError(N);for(T=v(ee,R),H=0;H<R;H++)Z=W+H,Z in ee&&b(T,H,ee[Z]);if(T.length=R,q<R){for(H=W;H<V-R;H++)Z=H+R,P=H+q,Z in ee?ee[P]=ee[Z]:delete ee[P];for(H=V;H>V-R+q;H--)delete ee[H-1]}else if(q>R)for(H=V-R;H>W;H--)Z=H+R-1,P=H+q-1,Z in ee?ee[P]=ee[Z]:delete ee[P];for(H=0;H<q;H++)ee[H+W]=arguments[H+2];return ee.length=V-R+q,T}})},8309:function(c,d,o){var h=o(9781),f=o(3070).f,p=Function.prototype,y=p.toString,g=/^\s*function ([^ (]*)/,v="name";h&&!(v in p)&&f(p,v,{configurable:!0,get:function(){try{return y.call(this).match(g)[1]}catch{return""}}})},489:function(c,d,o){var h=o(2109),f=o(7293),p=o(7908),y=o(9518),g=o(8544),v=f(function(){y(1)});h({target:"Object",stat:!0,forced:v,sham:!g},{getPrototypeOf:function(k){return y(p(k))}})},1539:function(c,d,o){var h=o(1694),f=o(1320),p=o(288);h||f(Object.prototype,"toString",p,{unsafe:!0})},4916:function(c,d,o){"use strict";var h=o(2109),f=o(2261);h({target:"RegExp",proto:!0,forced:/./.exec!==f},{exec:f})},9714:function(c,d,o){"use strict";var h=o(1320),f=o(9670),p=o(7293),y=o(7066),g="toString",v=RegExp.prototype,b=v[g],k=p(function(){return b.call({source:"a",flags:"b"})!="/a/b"}),E=b.name!=g;(k||E)&&h(RegExp.prototype,g,function(){var I=f(this),S=String(I.source),N=I.flags,O=String(N===void 0&&I instanceof RegExp&&!("flags"in v)?y.call(I):N);return"/"+S+"/"+O},{unsafe:!0})},8783:function(c,d,o){"use strict";var h=o(8710).charAt,f=o(9909),p=o(654),y="String Iterator",g=f.set,v=f.getterFor(y);p(String,"String",function(b){g(this,{type:y,string:String(b),index:0})},function(){var k=v(this),E=k.string,w=k.index,I;return w>=E.length?{value:void 0,done:!0}:(I=h(E,w),k.index+=I.length,{value:I,done:!1})})},4723:function(c,d,o){"use strict";var h=o(7007),f=o(9670),p=o(7466),y=o(4488),g=o(1530),v=o(7651);h("match",1,function(b,k,E){return[function(I){var S=y(this),N=I==null?void 0:I[b];return N!==void 0?N.call(I,S):new RegExp(I)[b](String(S))},function(w){var I=E(k,w,this);if(I.done)return I.value;var S=f(w),N=String(this);if(!S.global)return v(S,N);var O=S.unicode;S.lastIndex=0;for(var j=[],U=0,ee;(ee=v(S,N))!==null;){var V=String(ee[0]);j[U]=V,V===""&&(S.lastIndex=g(N,p(S.lastIndex),O)),U++}return U===0?null:j}]})},5306:function(c,d,o){"use strict";var h=o(7007),f=o(9670),p=o(7466),y=o(9958),g=o(4488),v=o(1530),b=o(647),k=o(7651),E=Math.max,w=Math.min,I=function(S){return S===void 0?S:String(S)};h("replace",2,function(S,N,O,j){var U=j.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,ee=j.REPLACE_KEEPS_$0,V=U?"$":"$0";return[function(K,q){var R=g(this),T=K==null?void 0:K[S];return T!==void 0?T.call(K,R,q):N.call(String(R),K,q)},function(W,K){if(!U&&ee||typeof K=="string"&&K.indexOf(V)===-1){var q=O(N,W,this,K);if(q.done)return q.value}var R=f(W),T=String(this),H=typeof K=="function";H||(K=String(K));var Z=R.global;if(Z){var P=R.unicode;R.lastIndex=0}for(var z=[];;){var ne=k(R,T);if(ne===null||(z.push(ne),!Z))break;var ae=String(ne[0]);ae===""&&(R.lastIndex=v(T,p(R.lastIndex),P))}for(var F="",A=0,be=0;be<z.length;be++){ne=z[be];for(var Fe=String(ne[0]),xe=E(w(y(ne.index),T.length),0),_e=[],ze=1;ze<ne.length;ze++)_e.push(I(ne[ze]));var qe=ne.groups;if(H){var ge=[Fe].concat(_e,xe,T);qe!==void 0&&ge.push(qe);var ke=String(K.apply(void 0,ge))}else ke=b(Fe,T,xe,_e,qe,K);xe>=A&&(F+=T.slice(A,xe)+ke,A=xe+Fe.length)}return F+T.slice(A)}]})},3123:function(c,d,o){"use strict";var h=o(7007),f=o(7850),p=o(9670),y=o(4488),g=o(6707),v=o(1530),b=o(7466),k=o(7651),E=o(2261),w=o(7293),I=[].push,S=Math.min,N=4294967295,O=!w(function(){return!RegExp(N,"y")});h("split",2,function(j,U,ee){var V;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?V=function(W,K){var q=String(y(this)),R=K===void 0?N:K>>>0;if(R===0)return[];if(W===void 0)return[q];if(!f(W))return U.call(q,W,R);for(var T=[],H=(W.ignoreCase?"i":"")+(W.multiline?"m":"")+(W.unicode?"u":"")+(W.sticky?"y":""),Z=0,P=new RegExp(W.source,H+"g"),z,ne,ae;(z=E.call(P,q))&&(ne=P.lastIndex,!(ne>Z&&(T.push(q.slice(Z,z.index)),z.length>1&&z.index<q.length&&I.apply(T,z.slice(1)),ae=z[0].length,Z=ne,T.length>=R)));)P.lastIndex===z.index&&P.lastIndex++;return Z===q.length?(ae||!P.test(""))&&T.push(""):T.push(q.slice(Z)),T.length>R?T.slice(0,R):T}:"0".split(void 0,0).length?V=function(W,K){return W===void 0&&K===0?[]:U.call(this,W,K)}:V=U,[function(K,q){var R=y(this),T=K==null?void 0:K[j];return T!==void 0?T.call(K,R,q):V.call(String(R),K,q)},function(W,K){var q=ee(V,W,this,K,V!==U);if(q.done)return q.value;var R=p(W),T=String(this),H=g(R,RegExp),Z=R.unicode,P=(R.ignoreCase?"i":"")+(R.multiline?"m":"")+(R.unicode?"u":"")+(O?"y":"g"),z=new H(O?R:"^(?:"+R.source+")",P),ne=K===void 0?N:K>>>0;if(ne===0)return[];if(T.length===0)return k(z,T)===null?[T]:[];for(var ae=0,F=0,A=[];F<T.length;){z.lastIndex=O?F:0;var be=k(z,O?T:T.slice(F)),Fe;if(be===null||(Fe=S(b(z.lastIndex+(O?0:F)),T.length))===ae)F=v(T,F,Z);else{if(A.push(T.slice(ae,F)),A.length===ne)return A;for(var xe=1;xe<=be.length-1;xe++)if(A.push(be[xe]),A.length===ne)return A;F=ae=Fe}}return A.push(T.slice(ae)),A}]},!O)},3210:function(c,d,o){"use strict";var h=o(2109),f=o(3111).trim,p=o(6091);h({target:"String",proto:!0,forced:p("trim")},{trim:function(){return f(this)}})},2990:function(c,d,o){"use strict";var h=o(260),f=o(1048),p=h.aTypedArray,y=h.exportTypedArrayMethod;y("copyWithin",function(v,b){return f.call(p(this),v,b,arguments.length>2?arguments[2]:void 0)})},8927:function(c,d,o){"use strict";var h=o(260),f=o(2092).every,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("every",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},3105:function(c,d,o){"use strict";var h=o(260),f=o(1285),p=h.aTypedArray,y=h.exportTypedArrayMethod;y("fill",function(v){return f.apply(p(this),arguments)})},5035:function(c,d,o){"use strict";var h=o(260),f=o(2092).filter,p=o(3074),y=h.aTypedArray,g=h.exportTypedArrayMethod;g("filter",function(b){var k=f(y(this),b,arguments.length>1?arguments[1]:void 0);return p(this,k)})},7174:function(c,d,o){"use strict";var h=o(260),f=o(2092).findIndex,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("findIndex",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},4345:function(c,d,o){"use strict";var h=o(260),f=o(2092).find,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("find",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},2846:function(c,d,o){"use strict";var h=o(260),f=o(2092).forEach,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("forEach",function(v){f(p(this),v,arguments.length>1?arguments[1]:void 0)})},4731:function(c,d,o){"use strict";var h=o(260),f=o(1318).includes,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("includes",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},7209:function(c,d,o){"use strict";var h=o(260),f=o(1318).indexOf,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("indexOf",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},6319:function(c,d,o){"use strict";var h=o(7854),f=o(260),p=o(6992),y=o(5112),g=y("iterator"),v=h.Uint8Array,b=p.values,k=p.keys,E=p.entries,w=f.aTypedArray,I=f.exportTypedArrayMethod,S=v&&v.prototype[g],N=!!S&&(S.name=="values"||S.name==null),O=function(){return b.call(w(this))};I("entries",function(){return E.call(w(this))}),I("keys",function(){return k.call(w(this))}),I("values",O,!N),I(g,O,!N)},8867:function(c,d,o){"use strict";var h=o(260),f=h.aTypedArray,p=h.exportTypedArrayMethod,y=[].join;p("join",function(v){return y.apply(f(this),arguments)})},7789:function(c,d,o){"use strict";var h=o(260),f=o(6583),p=h.aTypedArray,y=h.exportTypedArrayMethod;y("lastIndexOf",function(v){return f.apply(p(this),arguments)})},3739:function(c,d,o){"use strict";var h=o(260),f=o(2092).map,p=o(6707),y=h.aTypedArray,g=h.aTypedArrayConstructor,v=h.exportTypedArrayMethod;v("map",function(k){return f(y(this),k,arguments.length>1?arguments[1]:void 0,function(E,w){return new(g(p(E,E.constructor)))(w)})})},4483:function(c,d,o){"use strict";var h=o(260),f=o(3671).right,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("reduceRight",function(v){return f(p(this),v,arguments.length,arguments.length>1?arguments[1]:void 0)})},9368:function(c,d,o){"use strict";var h=o(260),f=o(3671).left,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("reduce",function(v){return f(p(this),v,arguments.length,arguments.length>1?arguments[1]:void 0)})},2056:function(c,d,o){"use strict";var h=o(260),f=h.aTypedArray,p=h.exportTypedArrayMethod,y=Math.floor;p("reverse",function(){for(var v=this,b=f(v).length,k=y(b/2),E=0,w;E<k;)w=v[E],v[E++]=v[--b],v[b]=w;return v})},3462:function(c,d,o){"use strict";var h=o(260),f=o(7466),p=o(4590),y=o(7908),g=o(7293),v=h.aTypedArray,b=h.exportTypedArrayMethod,k=g(function(){new Int8Array(1).set({})});b("set",function(w){v(this);var I=p(arguments.length>1?arguments[1]:void 0,1),S=this.length,N=y(w),O=f(N.length),j=0;if(O+I>S)throw RangeError("Wrong length");for(;j<O;)this[I+j]=N[j++]},k)},678:function(c,d,o){"use strict";var h=o(260),f=o(6707),p=o(7293),y=h.aTypedArray,g=h.aTypedArrayConstructor,v=h.exportTypedArrayMethod,b=[].slice,k=p(function(){new Int8Array(1).slice()});v("slice",function(w,I){for(var S=b.call(y(this),w,I),N=f(this,this.constructor),O=0,j=S.length,U=new(g(N))(j);j>O;)U[O]=S[O++];return U},k)},7462:function(c,d,o){"use strict";var h=o(260),f=o(2092).some,p=h.aTypedArray,y=h.exportTypedArrayMethod;y("some",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},3824:function(c,d,o){"use strict";var h=o(260),f=h.aTypedArray,p=h.exportTypedArrayMethod,y=[].sort;p("sort",function(v){return y.call(f(this),v)})},5021:function(c,d,o){"use strict";var h=o(260),f=o(7466),p=o(1400),y=o(6707),g=h.aTypedArray,v=h.exportTypedArrayMethod;v("subarray",function(k,E){var w=g(this),I=w.length,S=p(k,I);return new(y(w,w.constructor))(w.buffer,w.byteOffset+S*w.BYTES_PER_ELEMENT,f((E===void 0?I:p(E,I))-S))})},2974:function(c,d,o){"use strict";var h=o(7854),f=o(260),p=o(7293),y=h.Int8Array,g=f.aTypedArray,v=f.exportTypedArrayMethod,b=[].toLocaleString,k=[].slice,E=!!y&&p(function(){b.call(new y(1))}),w=p(function(){return[1,2].toLocaleString()!=new y([1,2]).toLocaleString()})||!p(function(){y.prototype.toLocaleString.call([1,2])});v("toLocaleString",function(){return b.apply(E?k.call(g(this)):g(this),arguments)},w)},5016:function(c,d,o){"use strict";var h=o(260).exportTypedArrayMethod,f=o(7293),p=o(7854),y=p.Uint8Array,g=y&&y.prototype||{},v=[].toString,b=[].join;f(function(){v.call({})})&&(v=function(){return b.call(this)});var k=g.toString!=v;h("toString",v,k)},2472:function(c,d,o){var h=o(9843);h("Uint8",function(f){return function(y,g,v){return f(this,y,g,v)}})},4747:function(c,d,o){var h=o(7854),f=o(8324),p=o(8533),y=o(8880);for(var g in f){var v=h[g],b=v&&v.prototype;if(b&&b.forEach!==p)try{y(b,"forEach",p)}catch{b.forEach=p}}},3948:function(c,d,o){var h=o(7854),f=o(8324),p=o(6992),y=o(8880),g=o(5112),v=g("iterator"),b=g("toStringTag"),k=p.values;for(var E in f){var w=h[E],I=w&&w.prototype;if(I){if(I[v]!==k)try{y(I,v,k)}catch{I[v]=k}if(I[b]||y(I,b,E),f[E]){for(var S in p)if(I[S]!==p[S])try{y(I,S,p[S])}catch{I[S]=p[S]}}}}},1637:function(c,d,o){"use strict";o(6992);var h=o(2109),f=o(5005),p=o(590),y=o(1320),g=o(2248),v=o(8003),b=o(4994),k=o(9909),E=o(5787),w=o(6656),I=o(9974),S=o(648),N=o(9670),O=o(111),j=o(30),U=o(9114),ee=o(8554),V=o(1246),W=o(5112),K=f("fetch"),q=f("Headers"),R=W("iterator"),T="URLSearchParams",H=T+"Iterator",Z=k.set,P=k.getterFor(T),z=k.getterFor(H),ne=/\+/g,ae=Array(4),F=function(Re){return ae[Re-1]||(ae[Re-1]=RegExp("((?:%[\\da-f]{2}){"+Re+"})","gi"))},A=function(Re){try{return decodeURIComponent(Re)}catch{return Re}},be=function(Re){var Ie=Re.replace(ne," "),Be=4;try{return decodeURIComponent(Ie)}catch{for(;Be;)Ie=Ie.replace(F(Be--),A);return Ie}},Fe=/[!'()~]|%20/g,xe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},_e=function(Re){return xe[Re]},ze=function(Re){return encodeURIComponent(Re).replace(Fe,_e)},qe=function(Re,Ie){if(Ie)for(var Be=Ie.split("&"),Ke=0,He,Je;Ke<Be.length;)He=Be[Ke++],He.length&&(Je=He.split("="),Re.push({key:be(Je.shift()),value:be(Je.join("="))}))},ge=function(Re){this.entries.length=0,qe(this.entries,Re)},ke=function(Re,Ie){if(Re<Ie)throw TypeError("Not enough arguments")},je=b(function(Ie,Be){Z(this,{type:H,iterator:ee(P(Ie).entries),kind:Be})},"Iterator",function(){var Ie=z(this),Be=Ie.kind,Ke=Ie.iterator.next(),He=Ke.value;return Ke.done||(Ke.value=Be==="keys"?He.key:Be==="values"?He.value:[He.key,He.value]),Ke}),at=function(){E(this,at,T);var Ie=arguments.length>0?arguments[0]:void 0,Be=this,Ke=[],He,Je,Se,X,de,ue,it,Ne,ot;if(Z(Be,{type:T,entries:Ke,updateURL:function(){},updateSearchParams:ge}),Ie!==void 0)if(O(Ie))if(He=V(Ie),typeof He=="function")for(Je=He.call(Ie),Se=Je.next;!(X=Se.call(Je)).done;){if(de=ee(N(X.value)),ue=de.next,(it=ue.call(de)).done||(Ne=ue.call(de)).done||!ue.call(de).done)throw TypeError("Expected sequence with length 2");Ke.push({key:it.value+"",value:Ne.value+""})}else for(ot in Ie)w(Ie,ot)&&Ke.push({key:ot,value:Ie[ot]+""});else qe(Ke,typeof Ie=="string"?Ie.charAt(0)==="?"?Ie.slice(1):Ie:Ie+"")},gt=at.prototype;g(gt,{append:function(Ie,Be){ke(arguments.length,2);var Ke=P(this);Ke.entries.push({key:Ie+"",value:Be+""}),Ke.updateURL()},delete:function(Re){ke(arguments.length,1);for(var Ie=P(this),Be=Ie.entries,Ke=Re+"",He=0;He<Be.length;)Be[He].key===Ke?Be.splice(He,1):He++;Ie.updateURL()},get:function(Ie){ke(arguments.length,1);for(var Be=P(this).entries,Ke=Ie+"",He=0;He<Be.length;He++)if(Be[He].key===Ke)return Be[He].value;return null},getAll:function(Ie){ke(arguments.length,1);for(var Be=P(this).entries,Ke=Ie+"",He=[],Je=0;Je<Be.length;Je++)Be[Je].key===Ke&&He.push(Be[Je].value);return He},has:function(Ie){ke(arguments.length,1);for(var Be=P(this).entries,Ke=Ie+"",He=0;He<Be.length;)if(Be[He++].key===Ke)return!0;return!1},set:function(Ie,Be){ke(arguments.length,1);for(var Ke=P(this),He=Ke.entries,Je=!1,Se=Ie+"",X=Be+"",de=0,ue;de<He.length;de++)ue=He[de],ue.key===Se&&(Je?He.splice(de--,1):(Je=!0,ue.value=X));Je||He.push({key:Se,value:X}),Ke.updateURL()},sort:function(){var Ie=P(this),Be=Ie.entries,Ke=Be.slice(),He,Je,Se;for(Be.length=0,Se=0;Se<Ke.length;Se++){for(He=Ke[Se],Je=0;Je<Se;Je++)if(Be[Je].key>He.key){Be.splice(Je,0,He);break}Je===Se&&Be.push(He)}Ie.updateURL()},forEach:function(Ie){for(var Be=P(this).entries,Ke=I(Ie,arguments.length>1?arguments[1]:void 0,3),He=0,Je;He<Be.length;)Je=Be[He++],Ke(Je.value,Je.key,this)},keys:function(){return new je(this,"keys")},values:function(){return new je(this,"values")},entries:function(){return new je(this,"entries")}},{enumerable:!0}),y(gt,R,gt.entries),y(gt,"toString",function(){for(var Ie=P(this).entries,Be=[],Ke=0,He;Ke<Ie.length;)He=Ie[Ke++],Be.push(ze(He.key)+"="+ze(He.value));return Be.join("&")},{enumerable:!0}),v(at,T),h({global:!0,forced:!p},{URLSearchParams:at}),!p&&typeof K=="function"&&typeof q=="function"&&h({global:!0,enumerable:!0,forced:!0},{fetch:function(Ie){var Be=[Ie],Ke,He,Je;return arguments.length>1&&(Ke=arguments[1],O(Ke)&&(He=Ke.body,S(He)===T&&(Je=Ke.headers?new q(Ke.headers):new q,Je.has("content-type")||Je.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ke=j(Ke,{body:U(0,String(He)),headers:U(0,Je)}))),Be.push(Ke)),K.apply(this,Be)}}),c.exports={URLSearchParams:at,getState:P}},285:function(c,d,o){"use strict";o(8783);var h=o(2109),f=o(9781),p=o(590),y=o(7854),g=o(6048),v=o(1320),b=o(5787),k=o(6656),E=o(1574),w=o(8457),I=o(8710).codeAt,S=o(3197),N=o(8003),O=o(1637),j=o(9909),U=y.URL,ee=O.URLSearchParams,V=O.getState,W=j.set,K=j.getterFor("URL"),q=Math.floor,R=Math.pow,T="Invalid authority",H="Invalid scheme",Z="Invalid host",P="Invalid port",z=/[A-Za-z]/,ne=/[\d+-.A-Za-z]/,ae=/\d/,F=/^(0x|0X)/,A=/^[0-7]+$/,be=/^\d+$/,Fe=/^[\dA-Fa-f]+$/,xe=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,_e=/[\u0000\t\u000A\u000D #/:?@[\\]]/,ze=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,qe=/[\t\u000A\u000D]/g,ge,ke=function(G,se){var pe,Te,Ae;if(se.charAt(0)=="["){if(se.charAt(se.length-1)!="]"||(pe=at(se.slice(1,-1)),!pe))return Z;G.host=pe}else if(X(G)){if(se=S(se),xe.test(se)||(pe=je(se),pe===null))return Z;G.host=pe}else{if(_e.test(se))return Z;for(pe="",Te=w(se),Ae=0;Ae<Te.length;Ae++)pe+=Je(Te[Ae],Ie);G.host=pe}},je=function(G){var se=G.split("."),pe,Te,Ae,Ye,tt,bt,Dt;if(se.length&&se[se.length-1]==""&&se.pop(),pe=se.length,pe>4)return G;for(Te=[],Ae=0;Ae<pe;Ae++){if(Ye=se[Ae],Ye=="")return G;if(tt=10,Ye.length>1&&Ye.charAt(0)=="0"&&(tt=F.test(Ye)?16:8,Ye=Ye.slice(tt==8?1:2)),Ye==="")bt=0;else{if(!(tt==10?be:tt==8?A:Fe).test(Ye))return G;bt=parseInt(Ye,tt)}Te.push(bt)}for(Ae=0;Ae<pe;Ae++)if(bt=Te[Ae],Ae==pe-1){if(bt>=R(256,5-pe))return null}else if(bt>255)return null;for(Dt=Te.pop(),Ae=0;Ae<Te.length;Ae++)Dt+=Te[Ae]*R(256,3-Ae);return Dt},at=function(G){var se=[0,0,0,0,0,0,0,0],pe=0,Te=null,Ae=0,Ye,tt,bt,Dt,we,D,$,he=function(){return G.charAt(Ae)};if(he()==":"){if(G.charAt(1)!=":")return;Ae+=2,pe++,Te=pe}for(;he();){if(pe==8)return;if(he()==":"){if(Te!==null)return;Ae++,pe++,Te=pe;continue}for(Ye=tt=0;tt<4&&Fe.test(he());)Ye=Ye*16+parseInt(he(),16),Ae++,tt++;if(he()=="."){if(tt==0||(Ae-=tt,pe>6))return;for(bt=0;he();){if(Dt=null,bt>0)if(he()=="."&&bt<4)Ae++;else return;if(!ae.test(he()))return;for(;ae.test(he());){if(we=parseInt(he(),10),Dt===null)Dt=we;else{if(Dt==0)return;Dt=Dt*10+we}if(Dt>255)return;Ae++}se[pe]=se[pe]*256+Dt,bt++,(bt==2||bt==4)&&pe++}if(bt!=4)return;break}else if(he()==":"){if(Ae++,!he())return}else if(he())return;se[pe++]=Ye}if(Te!==null)for(D=pe-Te,pe=7;pe!=0&&D>0;)$=se[pe],se[pe--]=se[Te+D-1],se[Te+--D]=$;else if(pe!=8)return;return se},gt=function(G){for(var se=null,pe=1,Te=null,Ae=0,Ye=0;Ye<8;Ye++)G[Ye]!==0?(Ae>pe&&(se=Te,pe=Ae),Te=null,Ae=0):(Te===null&&(Te=Ye),++Ae);return Ae>pe&&(se=Te,pe=Ae),se},Re=function(G){var se,pe,Te,Ae;if(typeof G=="number"){for(se=[],pe=0;pe<4;pe++)se.unshift(G%256),G=q(G/256);return se.join(".")}else if(typeof G=="object"){for(se="",Te=gt(G),pe=0;pe<8;pe++)Ae&&G[pe]===0||(Ae&&(Ae=!1),Te===pe?(se+=pe?":":"::",Ae=!0):(se+=G[pe].toString(16),pe<7&&(se+=":")));return"["+se+"]"}return G},Ie={},Be=E({},Ie,{" ":1,'"':1,"<":1,">":1,"`":1}),Ke=E({},Be,{"#":1,"?":1,"{":1,"}":1}),He=E({},Ke,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Je=function(G,se){var pe=I(G,0);return pe>32&&pe<127&&!k(se,G)?G:encodeURIComponent(G)},Se={ftp:21,file:null,http:80,https:443,ws:80,wss:443},X=function(G){return k(Se,G.scheme)},de=function(G){return G.username!=""||G.password!=""},ue=function(G){return!G.host||G.cannotBeABaseURL||G.scheme=="file"},it=function(G,se){var pe;return G.length==2&&z.test(G.charAt(0))&&((pe=G.charAt(1))==":"||!se&&pe=="|")},Ne=function(G){var se;return G.length>1&&it(G.slice(0,2))&&(G.length==2||(se=G.charAt(2))==="/"||se==="\\"||se==="?"||se==="#")},ot=function(G){var se=G.path,pe=se.length;pe&&(G.scheme!="file"||pe!=1||!it(se[0],!0))&&se.pop()},Xe=function(G){return G==="."||G.toLowerCase()==="%2e"},et=function(G){return G=G.toLowerCase(),G===".."||G==="%2e."||G===".%2e"||G==="%2e%2e"},We={},$t={},Lt={},fr={},lt={},Mt={},pt={},rt={},wt={},dr={},Et={},Vt={},kt={},st={},Ht={},Ir={},hr={},pr={},$r={},zt={},yr={},ur=function(G,se,pe,Te){var Ae=pe||We,Ye=0,tt="",bt=!1,Dt=!1,we=!1,D,$,he,De;for(pe||(G.scheme="",G.username="",G.password="",G.host=null,G.port=null,G.path=[],G.query=null,G.fragment=null,G.cannotBeABaseURL=!1,se=se.replace(ze,"")),se=se.replace(qe,""),D=w(se);Ye<=D.length;){switch($=D[Ye],Ae){case We:if($&&z.test($))tt+=$.toLowerCase(),Ae=$t;else{if(pe)return H;Ae=Lt;continue}break;case $t:if($&&(ne.test($)||$=="+"||$=="-"||$=="."))tt+=$.toLowerCase();else if($==":"){if(pe&&(X(G)!=k(Se,tt)||tt=="file"&&(de(G)||G.port!==null)||G.scheme=="file"&&!G.host))return;if(G.scheme=tt,pe){X(G)&&Se[G.scheme]==G.port&&(G.port=null);return}tt="",G.scheme=="file"?Ae=st:X(G)&&Te&&Te.scheme==G.scheme?Ae=fr:X(G)?Ae=rt:D[Ye+1]=="/"?(Ae=lt,Ye++):(G.cannotBeABaseURL=!0,G.path.push(""),Ae=$r)}else{if(pe)return H;tt="",Ae=Lt,Ye=0;continue}break;case Lt:if(!Te||Te.cannotBeABaseURL&&$!="#")return H;if(Te.cannotBeABaseURL&&$=="#"){G.scheme=Te.scheme,G.path=Te.path.slice(),G.query=Te.query,G.fragment="",G.cannotBeABaseURL=!0,Ae=yr;break}Ae=Te.scheme=="file"?st:Mt;continue;case fr:if($=="/"&&D[Ye+1]=="/")Ae=wt,Ye++;else{Ae=Mt;continue}break;case lt:if($=="/"){Ae=dr;break}else{Ae=pr;continue}case Mt:if(G.scheme=Te.scheme,$==ge)G.username=Te.username,G.password=Te.password,G.host=Te.host,G.port=Te.port,G.path=Te.path.slice(),G.query=Te.query;else if($=="/"||$=="\\"&&X(G))Ae=pt;else if($=="?")G.username=Te.username,G.password=Te.password,G.host=Te.host,G.port=Te.port,G.path=Te.path.slice(),G.query="",Ae=zt;else if($=="#")G.username=Te.username,G.password=Te.password,G.host=Te.host,G.port=Te.port,G.path=Te.path.slice(),G.query=Te.query,G.fragment="",Ae=yr;else{G.username=Te.username,G.password=Te.password,G.host=Te.host,G.port=Te.port,G.path=Te.path.slice(),G.path.pop(),Ae=pr;continue}break;case pt:if(X(G)&&($=="/"||$=="\\"))Ae=wt;else if($=="/")Ae=dr;else{G.username=Te.username,G.password=Te.password,G.host=Te.host,G.port=Te.port,Ae=pr;continue}break;case rt:if(Ae=wt,$!="/"||tt.charAt(Ye+1)!="/")continue;Ye++;break;case wt:if($!="/"&&$!="\\"){Ae=dr;continue}break;case dr:if($=="@"){bt&&(tt="%40"+tt),bt=!0,he=w(tt);for(var ft=0;ft<he.length;ft++){var xt=he[ft];if(xt==":"&&!we){we=!0;continue}var Ze=Je(xt,He);we?G.password+=Ze:G.username+=Ze}tt=""}else if($==ge||$=="/"||$=="?"||$=="#"||$=="\\"&&X(G)){if(bt&&tt=="")return T;Ye-=w(tt).length+1,tt="",Ae=Et}else tt+=$;break;case Et:case Vt:if(pe&&G.scheme=="file"){Ae=Ir;continue}else if($==":"&&!Dt){if(tt=="")return Z;if(De=ke(G,tt),De)return De;if(tt="",Ae=kt,pe==Vt)return}else if($==ge||$=="/"||$=="?"||$=="#"||$=="\\"&&X(G)){if(X(G)&&tt=="")return Z;if(pe&&tt==""&&(de(G)||G.port!==null))return;if(De=ke(G,tt),De)return De;if(tt="",Ae=hr,pe)return;continue}else $=="["?Dt=!0:$=="]"&&(Dt=!1),tt+=$;break;case kt:if(ae.test($))tt+=$;else if($==ge||$=="/"||$=="?"||$=="#"||$=="\\"&&X(G)||pe){if(tt!=""){var Yt=parseInt(tt,10);if(Yt>65535)return P;G.port=X(G)&&Yt===Se[G.scheme]?null:Yt,tt=""}if(pe)return;Ae=hr;continue}else return P;break;case st:if(G.scheme="file",$=="/"||$=="\\")Ae=Ht;else if(Te&&Te.scheme=="file")if($==ge)G.host=Te.host,G.path=Te.path.slice(),G.query=Te.query;else if($=="?")G.host=Te.host,G.path=Te.path.slice(),G.query="",Ae=zt;else if($=="#")G.host=Te.host,G.path=Te.path.slice(),G.query=Te.query,G.fragment="",Ae=yr;else{Ne(D.slice(Ye).join(""))||(G.host=Te.host,G.path=Te.path.slice(),ot(G)),Ae=pr;continue}else{Ae=pr;continue}break;case Ht:if($=="/"||$=="\\"){Ae=Ir;break}Te&&Te.scheme=="file"&&!Ne(D.slice(Ye).join(""))&&(it(Te.path[0],!0)?G.path.push(Te.path[0]):G.host=Te.host),Ae=pr;continue;case Ir:if($==ge||$=="/"||$=="\\"||$=="?"||$=="#"){if(!pe&&it(tt))Ae=pr;else if(tt==""){if(G.host="",pe)return;Ae=hr}else{if(De=ke(G,tt),De)return De;if(G.host=="localhost"&&(G.host=""),pe)return;tt="",Ae=hr}continue}else tt+=$;break;case hr:if(X(G)){if(Ae=pr,$!="/"&&$!="\\")continue}else if(!pe&&$=="?")G.query="",Ae=zt;else if(!pe&&$=="#")G.fragment="",Ae=yr;else if($!=ge&&(Ae=pr,$!="/"))continue;break;case pr:if($==ge||$=="/"||$=="\\"&&X(G)||!pe&&($=="?"||$=="#")){if(et(tt)?(ot(G),$!="/"&&!($=="\\"&&X(G))&&G.path.push("")):Xe(tt)?$!="/"&&!($=="\\"&&X(G))&&G.path.push(""):(G.scheme=="file"&&!G.path.length&&it(tt)&&(G.host&&(G.host=""),tt=tt.charAt(0)+":"),G.path.push(tt)),tt="",G.scheme=="file"&&($==ge||$=="?"||$=="#"))for(;G.path.length>1&&G.path[0]==="";)G.path.shift();$=="?"?(G.query="",Ae=zt):$=="#"&&(G.fragment="",Ae=yr)}else tt+=Je($,Ke);break;case $r:$=="?"?(G.query="",Ae=zt):$=="#"?(G.fragment="",Ae=yr):$!=ge&&(G.path[0]+=Je($,Ie));break;case zt:!pe&&$=="#"?(G.fragment="",Ae=yr):$!=ge&&($=="'"&&X(G)?G.query+="%27":$=="#"?G.query+="%23":G.query+=Je($,Ie));break;case yr:$!=ge&&(G.fragment+=Je($,Be));break}Ye++}},Qt=function(se){var pe=b(this,Qt,"URL"),Te=arguments.length>1?arguments[1]:void 0,Ae=String(se),Ye=W(pe,{type:"URL"}),tt,bt;if(Te!==void 0){if(Te instanceof Qt)tt=K(Te);else if(bt=ur(tt={},String(Te)),bt)throw TypeError(bt)}if(bt=ur(Ye,Ae,null,tt),bt)throw TypeError(bt);var Dt=Ye.searchParams=new ee,we=V(Dt);we.updateSearchParams(Ye.query),we.updateURL=function(){Ye.query=String(Dt)||null},f||(pe.href=oe.call(pe),pe.origin=Q.call(pe),pe.protocol=re.call(pe),pe.username=M.call(pe),pe.password=B.call(pe),pe.host=te.call(pe),pe.hostname=ce.call(pe),pe.port=me.call(pe),pe.pathname=ve.call(pe),pe.search=Le.call(pe),pe.searchParams=Oe.call(pe),pe.hash=Ce.call(pe))},ie=Qt.prototype,oe=function(){var G=K(this),se=G.scheme,pe=G.username,Te=G.password,Ae=G.host,Ye=G.port,tt=G.path,bt=G.query,Dt=G.fragment,we=se+":";return Ae!==null?(we+="//",de(G)&&(we+=pe+(Te?":"+Te:"")+"@"),we+=Re(Ae),Ye!==null&&(we+=":"+Ye)):se=="file"&&(we+="//"),we+=G.cannotBeABaseURL?tt[0]:tt.length?"/"+tt.join("/"):"",bt!==null&&(we+="?"+bt),Dt!==null&&(we+="#"+Dt),we},Q=function(){var G=K(this),se=G.scheme,pe=G.port;if(se=="blob")try{return new URL(se.path[0]).origin}catch{return"null"}return se=="file"||!X(G)?"null":se+"://"+Re(G.host)+(pe!==null?":"+pe:"")},re=function(){return K(this).scheme+":"},M=function(){return K(this).username},B=function(){return K(this).password},te=function(){var G=K(this),se=G.host,pe=G.port;return se===null?"":pe===null?Re(se):Re(se)+":"+pe},ce=function(){var G=K(this).host;return G===null?"":Re(G)},me=function(){var G=K(this).port;return G===null?"":String(G)},ve=function(){var G=K(this),se=G.path;return G.cannotBeABaseURL?se[0]:se.length?"/"+se.join("/"):""},Le=function(){var G=K(this).query;return G?"?"+G:""},Oe=function(){return K(this).searchParams},Ce=function(){var G=K(this).fragment;return G?"#"+G:""},Ve=function(G,se){return{get:G,set:se,configurable:!0,enumerable:!0}};if(f&&g(ie,{href:Ve(oe,function(G){var se=K(this),pe=String(G),Te=ur(se,pe);if(Te)throw TypeError(Te);V(se.searchParams).updateSearchParams(se.query)}),origin:Ve(Q),protocol:Ve(re,function(G){var se=K(this);ur(se,String(G)+":",We)}),username:Ve(M,function(G){var se=K(this),pe=w(String(G));if(!ue(se)){se.username="";for(var Te=0;Te<pe.length;Te++)se.username+=Je(pe[Te],He)}}),password:Ve(B,function(G){var se=K(this),pe=w(String(G));if(!ue(se)){se.password="";for(var Te=0;Te<pe.length;Te++)se.password+=Je(pe[Te],He)}}),host:Ve(te,function(G){var se=K(this);se.cannotBeABaseURL||ur(se,String(G),Et)}),hostname:Ve(ce,function(G){var se=K(this);se.cannotBeABaseURL||ur(se,String(G),Vt)}),port:Ve(me,function(G){var se=K(this);ue(se)||(G=String(G),G==""?se.port=null:ur(se,G,kt))}),pathname:Ve(ve,function(G){var se=K(this);se.cannotBeABaseURL||(se.path=[],ur(se,G+"",hr))}),search:Ve(Le,function(G){var se=K(this);G=String(G),G==""?se.query=null:(G.charAt(0)=="?"&&(G=G.slice(1)),se.query="",ur(se,G,zt)),V(se.searchParams).updateSearchParams(se.query)}),searchParams:Ve(Oe),hash:Ve(Ce,function(G){var se=K(this);if(G=String(G),G==""){se.fragment=null;return}G.charAt(0)=="#"&&(G=G.slice(1)),se.fragment="",ur(se,G,yr)})}),v(ie,"toJSON",function(){return oe.call(this)},{enumerable:!0}),v(ie,"toString",function(){return oe.call(this)},{enumerable:!0}),U){var St=U.createObjectURL,mt=U.revokeObjectURL;St&&v(Qt,"createObjectURL",function(se){return St.apply(U,arguments)}),mt&&v(Qt,"revokeObjectURL",function(se){return mt.apply(U,arguments)})}N(Qt,"URL"),h({global:!0,forced:!p,sham:!f},{URL:Qt})}},t={};function n(c){if(t[c])return t[c].exports;var d=t[c]={exports:{}};return i[c](d,d.exports,n),d.exports}(function(){n.d=function(c,d){for(var o in d)n.o(d,o)&&!n.o(c,o)&&Object.defineProperty(c,o,{enumerable:!0,get:d[o]})}})(),function(){n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){n.o=function(c,d){return Object.prototype.hasOwnProperty.call(c,d)}}(),function(){n.r=function(c){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})}}();var l={};return function(){"use strict";n.r(l),n.d(l,{Dropzone:function(){return st},default:function(){return Qt}});var c=n(2222),d=n(7327),o=n(2772),h=n(6992),f=n(1249),p=n(7042),y=n(561),g=n(8264),v=n(8309),b=n(489),k=n(1539),E=n(4916),w=n(9714),I=n(8783),S=n(4723),N=n(5306),O=n(3123),j=n(3210),U=n(2472),ee=n(2990),V=n(8927),W=n(3105),K=n(5035),q=n(4345),R=n(7174),T=n(2846),H=n(4731),Z=n(7209),P=n(6319),z=n(8867),ne=n(7789),ae=n(3739),F=n(9368),A=n(4483),be=n(2056),Fe=n(3462),xe=n(678),_e=n(7462),ze=n(3824),qe=n(5021),ge=n(2974),ke=n(5016),je=n(4747),at=n(3948),gt=n(285);function Re(ie,oe){var Q;if(typeof Symbol=="undefined"||ie[Symbol.iterator]==null){if(Array.isArray(ie)||(Q=Ie(ie))||oe&&ie&&typeof ie.length=="number"){Q&&(ie=Q);var re=0,M=function(){};return{s:M,n:function(){return re>=ie.length?{done:!0}:{done:!1,value:ie[re++]}},e:function(ve){throw ve},f:M}}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 B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function Ie(ie,oe){if(!!ie){if(typeof ie=="string")return Be(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q))return Be(ie,oe)}}function Be(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}function Ke(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function He(ie,oe){for(var Q=0;Q<oe.length;Q++){var re=oe[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(ie,re.key,re)}}function Je(ie,oe,Q){return oe&&He(ie.prototype,oe),Q&&He(ie,Q),ie}var Se=function(){function ie(){Ke(this,ie)}return Je(ie,[{key:"on",value:function(Q,re){return this._callbacks=this._callbacks||{},this._callbacks[Q]||(this._callbacks[Q]=[]),this._callbacks[Q].push(re),this}},{key:"emit",value:function(Q){this._callbacks=this._callbacks||{};for(var re=this._callbacks[Q],M=arguments.length,B=new Array(M>1?M-1:0),te=1;te<M;te++)B[te-1]=arguments[te];if(re){var ce=Re(re,!0),me;try{for(ce.s();!(me=ce.n()).done;){var ve=me.value;ve.apply(this,B)}}catch(Le){ce.e(Le)}finally{ce.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+Q,{args:B})),this}},{key:"makeEvent",value:function(Q,re){var M={bubbles:!0,cancelable:!0,detail:re};if(typeof window.CustomEvent=="function")return new CustomEvent(Q,M);var B=document.createEvent("CustomEvent");return B.initCustomEvent(Q,M.bubbles,M.cancelable,M.detail),B}},{key:"off",value:function(Q,re){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var M=this._callbacks[Q];if(!M)return this;if(arguments.length===1)return delete this._callbacks[Q],this;for(var B=0;B<M.length;B++){var te=M[B];if(te===re){M.splice(B,1);break}}return this}}]),ie}(),X='<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',de=X;function ue(ie,oe){var Q;if(typeof Symbol=="undefined"||ie[Symbol.iterator]==null){if(Array.isArray(ie)||(Q=it(ie))||oe&&ie&&typeof ie.length=="number"){Q&&(ie=Q);var re=0,M=function(){};return{s:M,n:function(){return re>=ie.length?{done:!0}:{done:!1,value:ie[re++]}},e:function(ve){throw ve},f:M}}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 B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function it(ie,oe){if(!!ie){if(typeof ie=="string")return Ne(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q))return Ne(ie,oe)}}function Ne(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}var ot={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(oe,Q,re){if(re)return{dzuuid:re.file.upload.uuid,dzchunkindex:re.index,dztotalfilesize:re.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:re.file.upload.totalChunkCount,dzchunkbyteoffset:re.index*this.options.chunkSize}},accept:function(oe,Q){return Q()},chunksUploaded:function(oe,Q){Q()},fallback:function(){var oe;this.element.className="".concat(this.element.className," dz-browser-not-supported");var Q=ue(this.element.getElementsByTagName("div"),!0),re;try{for(Q.s();!(re=Q.n()).done;){var M=re.value;if(/(^| )dz-message($| )/.test(M.className)){oe=M,M.className="dz-message";break}}}catch(te){Q.e(te)}finally{Q.f()}oe||(oe=st.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(oe));var B=oe.getElementsByTagName("span")[0];return B&&(B.textContent!=null?B.textContent=this.options.dictFallbackMessage:B.innerText!=null&&(B.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(oe,Q,re,M){var B={srcX:0,srcY:0,srcWidth:oe.width,srcHeight:oe.height},te=oe.width/oe.height;Q==null&&re==null?(Q=B.srcWidth,re=B.srcHeight):Q==null?Q=re*te:re==null&&(re=Q/te),Q=Math.min(Q,B.srcWidth),re=Math.min(re,B.srcHeight);var ce=Q/re;if(B.srcWidth>Q||B.srcHeight>re)if(M==="crop")te>ce?(B.srcHeight=oe.height,B.srcWidth=B.srcHeight*ce):(B.srcWidth=oe.width,B.srcHeight=B.srcWidth/ce);else if(M==="contain")te>ce?re=Q/te:Q=re*te;else throw new Error("Unknown resizeMethod '".concat(M,"'"));return B.srcX=(oe.width-B.srcWidth)/2,B.srcY=(oe.height-B.srcHeight)/2,B.trgWidth=Q,B.trgHeight=re,B},transformFile:function(oe,Q){return(this.options.resizeWidth||this.options.resizeHeight)&&oe.type.match(/image.*/)?this.resizeImage(oe,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,Q):Q(oe)},previewTemplate:de,drop:function(oe){return this.element.classList.remove("dz-drag-hover")},dragstart:function(oe){},dragend:function(oe){return this.element.classList.remove("dz-drag-hover")},dragenter:function(oe){return this.element.classList.add("dz-drag-hover")},dragover:function(oe){return this.element.classList.add("dz-drag-hover")},dragleave:function(oe){return this.element.classList.remove("dz-drag-hover")},paste:function(oe){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(oe){var Q=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){oe.previewElement=st.createElement(this.options.previewTemplate.trim()),oe.previewTemplate=oe.previewElement,this.previewsContainer.appendChild(oe.previewElement);var re=ue(oe.previewElement.querySelectorAll("[data-dz-name]"),!0),M;try{for(re.s();!(M=re.n()).done;){var B=M.value;B.textContent=oe.name}}catch(Ce){re.e(Ce)}finally{re.f()}var te=ue(oe.previewElement.querySelectorAll("[data-dz-size]"),!0),ce;try{for(te.s();!(ce=te.n()).done;)B=ce.value,B.innerHTML=this.filesize(oe.size)}catch(Ce){te.e(Ce)}finally{te.f()}this.options.addRemoveLinks&&(oe._removeLink=st.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),oe.previewElement.appendChild(oe._removeLink));var me=function(Ve){return Ve.preventDefault(),Ve.stopPropagation(),oe.status===st.UPLOADING?st.confirm(Q.options.dictCancelUploadConfirmation,function(){return Q.removeFile(oe)}):Q.options.dictRemoveFileConfirmation?st.confirm(Q.options.dictRemoveFileConfirmation,function(){return Q.removeFile(oe)}):Q.removeFile(oe)},ve=ue(oe.previewElement.querySelectorAll("[data-dz-remove]"),!0),Le;try{for(ve.s();!(Le=ve.n()).done;){var Oe=Le.value;Oe.addEventListener("click",me)}}catch(Ce){ve.e(Ce)}finally{ve.f()}}},removedfile:function(oe){return oe.previewElement!=null&&oe.previewElement.parentNode!=null&&oe.previewElement.parentNode.removeChild(oe.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(oe,Q){if(oe.previewElement){oe.previewElement.classList.remove("dz-file-preview");var re=ue(oe.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),M;try{for(re.s();!(M=re.n()).done;){var B=M.value;B.alt=oe.name,B.src=Q}}catch(te){re.e(te)}finally{re.f()}return setTimeout(function(){return oe.previewElement.classList.add("dz-image-preview")},1)}},error:function(oe,Q){if(oe.previewElement){oe.previewElement.classList.add("dz-error"),typeof Q!="string"&&Q.error&&(Q=Q.error);var re=ue(oe.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),M;try{for(re.s();!(M=re.n()).done;){var B=M.value;B.textContent=Q}}catch(te){re.e(te)}finally{re.f()}}},errormultiple:function(){},processing:function(oe){if(oe.previewElement&&(oe.previewElement.classList.add("dz-processing"),oe._removeLink))return oe._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(oe,Q,re){if(oe.previewElement){var M=ue(oe.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),B;try{for(M.s();!(B=M.n()).done;){var te=B.value;te.nodeName==="PROGRESS"?te.value=Q:te.style.width="".concat(Q,"%")}}catch(ce){M.e(ce)}finally{M.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(oe){if(oe.previewElement)return oe.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(oe){return this.emit("error",oe,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(oe){if(oe._removeLink&&(oe._removeLink.innerHTML=this.options.dictRemoveFile),oe.previewElement)return oe.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},Xe=ot;function et(ie){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Q){return typeof Q}:et=function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},et(ie)}function We(ie,oe){var Q;if(typeof Symbol=="undefined"||ie[Symbol.iterator]==null){if(Array.isArray(ie)||(Q=$t(ie))||oe&&ie&&typeof ie.length=="number"){Q&&(ie=Q);var re=0,M=function(){};return{s:M,n:function(){return re>=ie.length?{done:!0}:{done:!1,value:ie[re++]}},e:function(ve){throw ve},f:M}}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 B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function $t(ie,oe){if(!!ie){if(typeof ie=="string")return Lt(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q))return Lt(ie,oe)}}function Lt(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}function fr(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function lt(ie,oe){for(var Q=0;Q<oe.length;Q++){var re=oe[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(ie,re.key,re)}}function Mt(ie,oe,Q){return oe&&lt(ie.prototype,oe),Q&&lt(ie,Q),ie}function pt(ie,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(oe&&oe.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),oe&&rt(ie,oe)}function rt(ie,oe){return rt=Object.setPrototypeOf||function(re,M){return re.__proto__=M,re},rt(ie,oe)}function wt(ie){var oe=Vt();return function(){var re=kt(ie),M;if(oe){var B=kt(this).constructor;M=Reflect.construct(re,arguments,B)}else M=re.apply(this,arguments);return dr(this,M)}}function dr(ie,oe){return oe&&(et(oe)==="object"||typeof oe=="function")?oe:Et(ie)}function Et(ie){if(ie===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ie}function Vt(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function kt(ie){return kt=Object.setPrototypeOf?Object.getPrototypeOf:function(Q){return Q.__proto__||Object.getPrototypeOf(Q)},kt(ie)}var st=function(ie){pt(Q,ie);var oe=wt(Q);function Q(re,M){var B;fr(this,Q),B=oe.call(this);var te,ce;if(B.element=re,B.version=Q.version,B.clickableElements=[],B.listeners=[],B.files=[],typeof B.element=="string"&&(B.element=document.querySelector(B.element)),!B.element||B.element.nodeType==null)throw new Error("Invalid dropzone element.");if(B.element.dropzone)throw new Error("Dropzone already attached.");Q.instances.push(Et(B)),B.element.dropzone=Et(B);var me=(ce=Q.optionsForElement(B.element))!=null?ce:{};if(B.options=Q.extend({},Xe,me,M!=null?M:{}),B.options.previewTemplate=B.options.previewTemplate.replace(/\n*/g,""),B.options.forceFallback||!Q.isBrowserSupported())return dr(B,B.options.fallback.call(Et(B)));if(B.options.url==null&&(B.options.url=B.element.getAttribute("action")),!B.options.url)throw new Error("No URL provided.");if(B.options.acceptedFiles&&B.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(B.options.uploadMultiple&&B.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return B.options.acceptedMimeTypes&&(B.options.acceptedFiles=B.options.acceptedMimeTypes,delete B.options.acceptedMimeTypes),B.options.renameFilename!=null&&(B.options.renameFile=function(ve){return B.options.renameFilename.call(Et(B),ve.name,ve)}),typeof B.options.method=="string"&&(B.options.method=B.options.method.toUpperCase()),(te=B.getExistingFallback())&&te.parentNode&&te.parentNode.removeChild(te),B.options.previewsContainer!==!1&&(B.options.previewsContainer?B.previewsContainer=Q.getElement(B.options.previewsContainer,"previewsContainer"):B.previewsContainer=B.element),B.options.clickable&&(B.options.clickable===!0?B.clickableElements=[B.element]:B.clickableElements=Q.getElements(B.options.clickable,"clickable")),B.init(),B}return Mt(Q,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(M){return M.accepted}).map(function(M){return M})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(M){return!M.accepted}).map(function(M){return M})}},{key:"getFilesWithStatus",value:function(M){return this.files.filter(function(B){return B.status===M}).map(function(B){return B})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(Q.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(Q.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(Q.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(M){return M.status===Q.UPLOADING||M.status===Q.QUEUED}).map(function(M){return M})}},{key:"init",value:function(){var M=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(Q.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var B=function Oe(){M.hiddenFileInput&&M.hiddenFileInput.parentNode.removeChild(M.hiddenFileInput),M.hiddenFileInput=document.createElement("input"),M.hiddenFileInput.setAttribute("type","file"),(M.options.maxFiles===null||M.options.maxFiles>1)&&M.hiddenFileInput.setAttribute("multiple","multiple"),M.hiddenFileInput.className="dz-hidden-input",M.options.acceptedFiles!==null&&M.hiddenFileInput.setAttribute("accept",M.options.acceptedFiles),M.options.capture!==null&&M.hiddenFileInput.setAttribute("capture",M.options.capture),M.hiddenFileInput.setAttribute("tabindex","-1"),M.hiddenFileInput.style.visibility="hidden",M.hiddenFileInput.style.position="absolute",M.hiddenFileInput.style.top="0",M.hiddenFileInput.style.left="0",M.hiddenFileInput.style.height="0",M.hiddenFileInput.style.width="0",Q.getElement(M.options.hiddenInputContainer,"hiddenInputContainer").appendChild(M.hiddenFileInput),M.hiddenFileInput.addEventListener("change",function(){var Ce=M.hiddenFileInput.files;if(Ce.length){var Ve=We(Ce,!0),St;try{for(Ve.s();!(St=Ve.n()).done;){var mt=St.value;M.addFile(mt)}}catch(G){Ve.e(G)}finally{Ve.f()}}M.emit("addedfiles",Ce),Oe()})};B()}this.URL=window.URL!==null?window.URL:window.webkitURL;var te=We(this.events,!0),ce;try{for(te.s();!(ce=te.n()).done;){var me=ce.value;this.on(me,this.options[me])}}catch(Oe){te.e(Oe)}finally{te.f()}this.on("uploadprogress",function(){return M.updateTotalUploadProgress()}),this.on("removedfile",function(){return M.updateTotalUploadProgress()}),this.on("canceled",function(Oe){return M.emit("complete",Oe)}),this.on("complete",function(Oe){if(M.getAddedFiles().length===0&&M.getUploadingFiles().length===0&&M.getQueuedFiles().length===0)return setTimeout(function(){return M.emit("queuecomplete")},0)});var ve=function(Ce){if(Ce.dataTransfer.types){for(var Ve=0;Ve<Ce.dataTransfer.types.length;Ve++)if(Ce.dataTransfer.types[Ve]==="Files")return!0}return!1},Le=function(Ce){if(!!ve(Ce))return Ce.stopPropagation(),Ce.preventDefault?Ce.preventDefault():Ce.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(Ce){return M.emit("dragstart",Ce)},dragenter:function(Ce){return Le(Ce),M.emit("dragenter",Ce)},dragover:function(Ce){var Ve;try{Ve=Ce.dataTransfer.effectAllowed}catch{}return Ce.dataTransfer.dropEffect=Ve==="move"||Ve==="linkMove"?"move":"copy",Le(Ce),M.emit("dragover",Ce)},dragleave:function(Ce){return M.emit("dragleave",Ce)},drop:function(Ce){return Le(Ce),M.drop(Ce)},dragend:function(Ce){return M.emit("dragend",Ce)}}}],this.clickableElements.forEach(function(Oe){return M.listeners.push({element:Oe,events:{click:function(Ve){return(Oe!==M.element||Ve.target===M.element||Q.elementInside(Ve.target,M.element.querySelector(".dz-message")))&&M.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(this.hiddenFileInput!=null?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,Q.instances.splice(Q.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var M,B=0,te=0,ce=this.getActiveFiles();if(ce.length){var me=We(this.getActiveFiles(),!0),ve;try{for(me.s();!(ve=me.n()).done;){var Le=ve.value;B+=Le.upload.bytesSent,te+=Le.upload.total}}catch(Oe){me.e(Oe)}finally{me.f()}M=100*B/te}else M=100;return this.emit("totaluploadprogress",M,te,B)}},{key:"_getParamName",value:function(M){return typeof this.options.paramName=="function"?this.options.paramName(M):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(M,"]"):"")}},{key:"_renameFile",value:function(M){return typeof this.options.renameFile!="function"?M.name:this.options.renameFile(M)}},{key:"getFallbackForm",value:function(){var M,B;if(M=this.getExistingFallback())return M;var te='<div class="dz-fallback">';this.options.dictFallbackText&&(te+="<p>".concat(this.options.dictFallbackText,"</p>")),te+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var ce=Q.createElement(te);return this.element.tagName!=="FORM"?(B=Q.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),B.appendChild(ce)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),B!=null?B:ce}},{key:"getExistingFallback",value:function(){for(var M=function(Le){var Oe=We(Le,!0),Ce;try{for(Oe.s();!(Ce=Oe.n()).done;){var Ve=Ce.value;if(/(^| )fallback($| )/.test(Ve.className))return Ve}}catch(St){Oe.e(St)}finally{Oe.f()}},B=0,te=["div","form"];B<te.length;B++){var ce=te[B],me;if(me=M(this.element.getElementsByTagName(ce)))return me}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(M){return function(){var B=[];for(var te in M.events){var ce=M.events[te];B.push(M.element.addEventListener(te,ce,!1))}return B}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(M){return function(){var B=[];for(var te in M.events){var ce=M.events[te];B.push(M.element.removeEventListener(te,ce,!1))}return B}()})}},{key:"disable",value:function(){var M=this;return this.clickableElements.forEach(function(B){return B.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(B){return M.cancelUpload(B)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(M){return M.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(M){var B=0,te="b";if(M>0){for(var ce=["tb","gb","mb","kb","b"],me=0;me<ce.length;me++){var ve=ce[me],Le=Math.pow(this.options.filesizeBase,4-me)/10;if(M>=Le){B=M/Math.pow(this.options.filesizeBase,4-me),te=ve;break}}B=Math.round(10*B)/10}return"<strong>".concat(B,"</strong> ").concat(this.options.dictFileSizeUnits[te])}},{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(M){if(!!M.dataTransfer){this.emit("drop",M);for(var B=[],te=0;te<M.dataTransfer.files.length;te++)B[te]=M.dataTransfer.files[te];if(B.length){var ce=M.dataTransfer.items;ce&&ce.length&&ce[0].webkitGetAsEntry!=null?this._addFilesFromItems(ce):this.handleFiles(B)}this.emit("addedfiles",B)}}},{key:"paste",value:function(M){if(yr(M!=null?M.clipboardData:void 0,function(te){return te.items})!=null){this.emit("paste",M);var B=M.clipboardData.items;if(B.length)return this._addFilesFromItems(B)}}},{key:"handleFiles",value:function(M){var B=We(M,!0),te;try{for(B.s();!(te=B.n()).done;){var ce=te.value;this.addFile(ce)}}catch(me){B.e(me)}finally{B.f()}}},{key:"_addFilesFromItems",value:function(M){var B=this;return function(){var te=[],ce=We(M,!0),me;try{for(ce.s();!(me=ce.n()).done;){var ve=me.value,Le;ve.webkitGetAsEntry!=null&&(Le=ve.webkitGetAsEntry())?Le.isFile?te.push(B.addFile(ve.getAsFile())):Le.isDirectory?te.push(B._addFilesFromDirectory(Le,Le.name)):te.push(void 0):ve.getAsFile!=null&&(ve.kind==null||ve.kind==="file")?te.push(B.addFile(ve.getAsFile())):te.push(void 0)}}catch(Oe){ce.e(Oe)}finally{ce.f()}return te}()}},{key:"_addFilesFromDirectory",value:function(M,B){var te=this,ce=M.createReader(),me=function(Oe){return ur(console,"log",function(Ce){return Ce.log(Oe)})},ve=function Le(){return ce.readEntries(function(Oe){if(Oe.length>0){var Ce=We(Oe,!0),Ve;try{for(Ce.s();!(Ve=Ce.n()).done;){var St=Ve.value;St.isFile?St.file(function(mt){if(!(te.options.ignoreHiddenFiles&&mt.name.substring(0,1)==="."))return mt.fullPath="".concat(B,"/").concat(mt.name),te.addFile(mt)}):St.isDirectory&&te._addFilesFromDirectory(St,"".concat(B,"/").concat(St.name))}}catch(mt){Ce.e(mt)}finally{Ce.f()}Le()}return null},me)};return ve()}},{key:"accept",value:function(M,B){this.options.maxFilesize&&M.size>this.options.maxFilesize*1024*1024?B(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(M.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):Q.isValidFile(M,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(B(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",M)):this.options.accept.call(this,M,B):B(this.options.dictInvalidFileType)}},{key:"addFile",value:function(M){var B=this;M.upload={uuid:Q.uuidv4(),progress:0,total:M.size,bytesSent:0,filename:this._renameFile(M)},this.files.push(M),M.status=Q.ADDED,this.emit("addedfile",M),this._enqueueThumbnail(M),this.accept(M,function(te){te?(M.accepted=!1,B._errorProcessing([M],te)):(M.accepted=!0,B.options.autoQueue&&B.enqueueFile(M)),B._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(M){var B=We(M,!0),te;try{for(B.s();!(te=B.n()).done;){var ce=te.value;this.enqueueFile(ce)}}catch(me){B.e(me)}finally{B.f()}return null}},{key:"enqueueFile",value:function(M){var B=this;if(M.status===Q.ADDED&&M.accepted===!0){if(M.status=Q.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return B.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(M){var B=this;if(this.options.createImageThumbnails&&M.type.match(/image.*/)&&M.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(M),setTimeout(function(){return B._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var M=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var B=this._thumbnailQueue.shift();return this.createThumbnail(B,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(te){return M.emit("thumbnail",B,te),M._processingThumbnail=!1,M._processThumbnailQueue()})}}},{key:"removeFile",value:function(M){if(M.status===Q.UPLOADING&&this.cancelUpload(M),this.files=Ht(this.files,M),this.emit("removedfile",M),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(M){M==null&&(M=!1);var B=We(this.files.slice(),!0),te;try{for(B.s();!(te=B.n()).done;){var ce=te.value;(ce.status!==Q.UPLOADING||M)&&this.removeFile(ce)}}catch(me){B.e(me)}finally{B.f()}return null}},{key:"resizeImage",value:function(M,B,te,ce,me){var ve=this;return this.createThumbnail(M,B,te,ce,!0,function(Le,Oe){if(Oe==null)return me(M);var Ce=ve.options.resizeMimeType;Ce==null&&(Ce=M.type);var Ve=Oe.toDataURL(Ce,ve.options.resizeQuality);return(Ce==="image/jpeg"||Ce==="image/jpg")&&(Ve=$r.restore(M.dataURL,Ve)),me(Q.dataURItoBlob(Ve))})}},{key:"createThumbnail",value:function(M,B,te,ce,me,ve){var Le=this,Oe=new FileReader;Oe.onload=function(){if(M.dataURL=Oe.result,M.type==="image/svg+xml"){ve!=null&&ve(Oe.result);return}Le.createThumbnailFromUrl(M,B,te,ce,me,ve)},Oe.readAsDataURL(M)}},{key:"displayExistingFile",value:function(M,B,te,ce){var me=this,ve=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",M),this.emit("complete",M),!ve)this.emit("thumbnail",M,B),te&&te();else{var Le=function(Ce){me.emit("thumbnail",M,Ce),te&&te()};M.dataURL=B,this.createThumbnailFromUrl(M,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,Le,ce)}}},{key:"createThumbnailFromUrl",value:function(M,B,te,ce,me,ve,Le){var Oe=this,Ce=document.createElement("img");return Le&&(Ce.crossOrigin=Le),me=getComputedStyle(document.body).imageOrientation=="from-image"?!1:me,Ce.onload=function(){var Ve=function(mt){return mt(1)};return typeof EXIF!="undefined"&&EXIF!==null&&me&&(Ve=function(mt){return EXIF.getData(Ce,function(){return mt(EXIF.getTag(this,"Orientation"))})}),Ve(function(St){M.width=Ce.width,M.height=Ce.height;var mt=Oe.options.resize.call(Oe,M,B,te,ce),G=document.createElement("canvas"),se=G.getContext("2d");switch(G.width=mt.trgWidth,G.height=mt.trgHeight,St>4&&(G.width=mt.trgHeight,G.height=mt.trgWidth),St){case 2:se.translate(G.width,0),se.scale(-1,1);break;case 3:se.translate(G.width,G.height),se.rotate(Math.PI);break;case 4:se.translate(0,G.height),se.scale(1,-1);break;case 5:se.rotate(.5*Math.PI),se.scale(1,-1);break;case 6:se.rotate(.5*Math.PI),se.translate(0,-G.width);break;case 7:se.rotate(.5*Math.PI),se.translate(G.height,-G.width),se.scale(-1,1);break;case 8:se.rotate(-.5*Math.PI),se.translate(-G.height,0);break}pr(se,Ce,mt.srcX!=null?mt.srcX:0,mt.srcY!=null?mt.srcY:0,mt.srcWidth,mt.srcHeight,mt.trgX!=null?mt.trgX:0,mt.trgY!=null?mt.trgY:0,mt.trgWidth,mt.trgHeight);var pe=G.toDataURL("image/png");if(ve!=null)return ve(pe,G)})},ve!=null&&(Ce.onerror=ve),Ce.src=M.dataURL}},{key:"processQueue",value:function(){var M=this.options.parallelUploads,B=this.getUploadingFiles().length,te=B;if(!(B>=M)){var ce=this.getQueuedFiles();if(ce.length>0){if(this.options.uploadMultiple)return this.processFiles(ce.slice(0,M-B));for(;te<M;){if(!ce.length)return;this.processFile(ce.shift()),te++}}}}},{key:"processFile",value:function(M){return this.processFiles([M])}},{key:"processFiles",value:function(M){var B=We(M,!0),te;try{for(B.s();!(te=B.n()).done;){var ce=te.value;ce.processing=!0,ce.status=Q.UPLOADING,this.emit("processing",ce)}}catch(me){B.e(me)}finally{B.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",M),this.uploadFiles(M)}},{key:"_getFilesWithXhr",value:function(M){var B;return B=this.files.filter(function(te){return te.xhr===M}).map(function(te){return te})}},{key:"cancelUpload",value:function(M){if(M.status===Q.UPLOADING){var B=this._getFilesWithXhr(M.xhr),te=We(B,!0),ce;try{for(te.s();!(ce=te.n()).done;){var me=ce.value;me.status=Q.CANCELED}}catch(Ce){te.e(Ce)}finally{te.f()}typeof M.xhr!="undefined"&&M.xhr.abort();var ve=We(B,!0),Le;try{for(ve.s();!(Le=ve.n()).done;){var Oe=Le.value;this.emit("canceled",Oe)}}catch(Ce){ve.e(Ce)}finally{ve.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",B)}else(M.status===Q.ADDED||M.status===Q.QUEUED)&&(M.status=Q.CANCELED,this.emit("canceled",M),this.options.uploadMultiple&&this.emit("canceledmultiple",[M]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(M){if(typeof M=="function"){for(var B=arguments.length,te=new Array(B>1?B-1:0),ce=1;ce<B;ce++)te[ce-1]=arguments[ce];return M.apply(this,te)}return M}},{key:"uploadFile",value:function(M){return this.uploadFiles([M])}},{key:"uploadFiles",value:function(M){var B=this;this._transformFiles(M,function(te){if(B.options.chunking){var ce=te[0];M[0].upload.chunked=B.options.chunking&&(B.options.forceChunking||ce.size>B.options.chunkSize),M[0].upload.totalChunkCount=Math.ceil(ce.size/B.options.chunkSize)}if(M[0].upload.chunked){var me=M[0],ve=te[0],Le=0;me.upload.chunks=[];var Oe=function(){for(var G=0;me.upload.chunks[G]!==void 0;)G++;if(!(G>=me.upload.totalChunkCount)){Le++;var se=G*B.options.chunkSize,pe=Math.min(se+B.options.chunkSize,ve.size),Te={name:B._getParamName(0),data:ve.webkitSlice?ve.webkitSlice(se,pe):ve.slice(se,pe),filename:me.upload.filename,chunkIndex:G};me.upload.chunks[G]={file:me,index:G,dataBlock:Te,status:Q.UPLOADING,progress:0,retries:0},B._uploadData(M,[Te])}};if(me.upload.finishedChunkUpload=function(mt,G){var se=!0;mt.status=Q.SUCCESS,mt.dataBlock=null,mt.xhr=null;for(var pe=0;pe<me.upload.totalChunkCount;pe++){if(me.upload.chunks[pe]===void 0)return Oe();me.upload.chunks[pe].status!==Q.SUCCESS&&(se=!1)}se&&B.options.chunksUploaded(me,function(){B._finished(M,G,null)})},B.options.parallelChunkUploads)for(var Ce=0;Ce<me.upload.totalChunkCount;Ce++)Oe();else Oe()}else{for(var Ve=[],St=0;St<M.length;St++)Ve[St]={name:B._getParamName(St),data:te[St],filename:M[St].upload.filename};B._uploadData(M,Ve)}})}},{key:"_getChunk",value:function(M,B){for(var te=0;te<M.upload.totalChunkCount;te++)if(M.upload.chunks[te]!==void 0&&M.upload.chunks[te].xhr===B)return M.upload.chunks[te]}},{key:"_uploadData",value:function(M,B){var te=this,ce=new XMLHttpRequest,me=We(M,!0),ve;try{for(me.s();!(ve=me.n()).done;){var Le=ve.value;Le.xhr=ce}}catch(he){me.e(he)}finally{me.f()}M[0].upload.chunked&&(M[0].upload.chunks[B[0].chunkIndex].xhr=ce);var Oe=this.resolveOption(this.options.method,M),Ce=this.resolveOption(this.options.url,M);ce.open(Oe,Ce,!0);var Ve=this.resolveOption(this.options.timeout,M);Ve&&(ce.timeout=this.resolveOption(this.options.timeout,M)),ce.withCredentials=!!this.options.withCredentials,ce.onload=function(he){te._finishedUploading(M,ce,he)},ce.ontimeout=function(){te._handleUploadError(M,ce,"Request timedout after ".concat(te.options.timeout/1e3," seconds"))},ce.onerror=function(){te._handleUploadError(M,ce)};var St=ce.upload!=null?ce.upload:ce;St.onprogress=function(he){return te._updateFilesUploadProgress(M,ce,he)};var mt={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&Q.extend(mt,this.options.headers);for(var G in mt){var se=mt[G];se&&ce.setRequestHeader(G,se)}var pe=new FormData;if(this.options.params){var Te=this.options.params;typeof Te=="function"&&(Te=Te.call(this,M,ce,M[0].upload.chunked?this._getChunk(M[0],ce):null));for(var Ae in Te){var Ye=Te[Ae];if(Array.isArray(Ye))for(var tt=0;tt<Ye.length;tt++)pe.append(Ae,Ye[tt]);else pe.append(Ae,Ye)}}var bt=We(M,!0),Dt;try{for(bt.s();!(Dt=bt.n()).done;){var we=Dt.value;this.emit("sending",we,ce,pe)}}catch(he){bt.e(he)}finally{bt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",M,ce,pe),this._addFormElementData(pe);for(var D=0;D<B.length;D++){var $=B[D];pe.append($.name,$.data,$.filename)}this.submitRequest(ce,pe,M)}},{key:"_transformFiles",value:function(M,B){for(var te=this,ce=[],me=0,ve=function(Ce){te.options.transformFile.call(te,M[Ce],function(Ve){ce[Ce]=Ve,++me===M.length&&B(ce)})},Le=0;Le<M.length;Le++)ve(Le)}},{key:"_addFormElementData",value:function(M){if(this.element.tagName==="FORM"){var B=We(this.element.querySelectorAll("input, textarea, select, button"),!0),te;try{for(B.s();!(te=B.n()).done;){var ce=te.value,me=ce.getAttribute("name"),ve=ce.getAttribute("type");if(ve&&(ve=ve.toLowerCase()),!(typeof me=="undefined"||me===null))if(ce.tagName==="SELECT"&&ce.hasAttribute("multiple")){var Le=We(ce.options,!0),Oe;try{for(Le.s();!(Oe=Le.n()).done;){var Ce=Oe.value;Ce.selected&&M.append(me,Ce.value)}}catch(Ve){Le.e(Ve)}finally{Le.f()}}else(!ve||ve!=="checkbox"&&ve!=="radio"||ce.checked)&&M.append(me,ce.value)}}catch(Ve){B.e(Ve)}finally{B.f()}}}},{key:"_updateFilesUploadProgress",value:function(M,B,te){if(M[0].upload.chunked){var Le=M[0],Oe=this._getChunk(Le,B);te?(Oe.progress=100*te.loaded/te.total,Oe.total=te.total,Oe.bytesSent=te.loaded):(Oe.progress=100,Oe.bytesSent=Oe.total),Le.upload.progress=0,Le.upload.total=0,Le.upload.bytesSent=0;for(var Ce=0;Ce<Le.upload.totalChunkCount;Ce++)Le.upload.chunks[Ce]&&typeof Le.upload.chunks[Ce].progress!="undefined"&&(Le.upload.progress+=Le.upload.chunks[Ce].progress,Le.upload.total+=Le.upload.chunks[Ce].total,Le.upload.bytesSent+=Le.upload.chunks[Ce].bytesSent);Le.upload.progress=Le.upload.progress/Le.upload.totalChunkCount,this.emit("uploadprogress",Le,Le.upload.progress,Le.upload.bytesSent)}else{var ce=We(M,!0),me;try{for(ce.s();!(me=ce.n()).done;){var ve=me.value;ve.upload.total&&ve.upload.bytesSent&&ve.upload.bytesSent==ve.upload.total||(te?(ve.upload.progress=100*te.loaded/te.total,ve.upload.total=te.total,ve.upload.bytesSent=te.loaded):(ve.upload.progress=100,ve.upload.bytesSent=ve.upload.total),this.emit("uploadprogress",ve,ve.upload.progress,ve.upload.bytesSent))}}catch(Ve){ce.e(Ve)}finally{ce.f()}}}},{key:"_finishedUploading",value:function(M,B,te){var ce;if(M[0].status!==Q.CANCELED&&B.readyState===4){if(B.responseType!=="arraybuffer"&&B.responseType!=="blob"&&(ce=B.responseText,B.getResponseHeader("content-type")&&~B.getResponseHeader("content-type").indexOf("application/json")))try{ce=JSON.parse(ce)}catch(me){te=me,ce="Invalid JSON response from server."}this._updateFilesUploadProgress(M,B),200<=B.status&&B.status<300?M[0].upload.chunked?M[0].upload.finishedChunkUpload(this._getChunk(M[0],B),ce):this._finished(M,ce,te):this._handleUploadError(M,B,ce)}}},{key:"_handleUploadError",value:function(M,B,te){if(M[0].status!==Q.CANCELED){if(M[0].upload.chunked&&this.options.retryChunks){var ce=this._getChunk(M[0],B);if(ce.retries++<this.options.retryChunksLimit){this._uploadData(M,[ce.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(M,te||this.options.dictResponseError.replace("{{statusCode}}",B.status),B)}}},{key:"submitRequest",value:function(M,B,te){if(M.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}M.send(B)}},{key:"_finished",value:function(M,B,te){var ce=We(M,!0),me;try{for(ce.s();!(me=ce.n()).done;){var ve=me.value;ve.status=Q.SUCCESS,this.emit("success",ve,B,te),this.emit("complete",ve)}}catch(Le){ce.e(Le)}finally{ce.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",M,B,te),this.emit("completemultiple",M)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(M,B,te){var ce=We(M,!0),me;try{for(ce.s();!(me=ce.n()).done;){var ve=me.value;ve.status=Q.ERROR,this.emit("error",ve,B,te),this.emit("complete",ve)}}catch(Le){ce.e(Le)}finally{ce.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",M,B,te),this.emit("completemultiple",M)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=Se,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(M){for(var B=arguments.length,te=new Array(B>1?B-1:0),ce=1;ce<B;ce++)te[ce-1]=arguments[ce];for(var me=0,ve=te;me<ve.length;me++){var Le=ve[me];for(var Oe in Le){var Ce=Le[Oe];M[Oe]=Ce}}return M}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(M){var B=Math.random()*16|0,te=M==="x"?B:B&3|8;return te.toString(16)})}}]),Q}(Se);st.initClass(),st.version="5.9.3",st.options={},st.optionsForElement=function(ie){if(ie.getAttribute("id"))return st.options[Ir(ie.getAttribute("id"))]},st.instances=[],st.forElement=function(ie){if(typeof ie=="string"&&(ie=document.querySelector(ie)),(ie!=null?ie.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return ie.dropzone},st.autoDiscover=!0,st.discover=function(){var ie;if(document.querySelectorAll)ie=document.querySelectorAll(".dropzone");else{ie=[];var oe=function(re){return function(){var M=[],B=We(re,!0),te;try{for(B.s();!(te=B.n()).done;){var ce=te.value;/(^| )dropzone($| )/.test(ce.className)?M.push(ie.push(ce)):M.push(void 0)}}catch(me){B.e(me)}finally{B.f()}return M}()};oe(document.getElementsByTagName("div")),oe(document.getElementsByTagName("form"))}return function(){var Q=[],re=We(ie,!0),M;try{for(re.s();!(M=re.n()).done;){var B=M.value;st.optionsForElement(B)!==!1?Q.push(new st(B)):Q.push(void 0)}}catch(te){re.e(te)}finally{re.f()}return Q}()},st.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],st.isBrowserSupported=function(){var ie=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))ie=!1;else{st.blacklistedBrowsers!==void 0&&(st.blockedBrowsers=st.blacklistedBrowsers);var oe=We(st.blockedBrowsers,!0),Q;try{for(oe.s();!(Q=oe.n()).done;){var re=Q.value;if(re.test(navigator.userAgent)){ie=!1;continue}}}catch(M){oe.e(M)}finally{oe.f()}}else ie=!1;return ie},st.dataURItoBlob=function(ie){for(var oe=atob(ie.split(",")[1]),Q=ie.split(",")[0].split(":")[1].split(";")[0],re=new ArrayBuffer(oe.length),M=new Uint8Array(re),B=0,te=oe.length,ce=0<=te;ce?B<=te:B>=te;ce?B++:B--)M[B]=oe.charCodeAt(B);return new Blob([re],{type:Q})};var Ht=function(oe,Q){return oe.filter(function(re){return re!==Q}).map(function(re){return re})},Ir=function(oe){return oe.replace(/[\-_](\w)/g,function(Q){return Q.charAt(1).toUpperCase()})};st.createElement=function(ie){var oe=document.createElement("div");return oe.innerHTML=ie,oe.childNodes[0]},st.elementInside=function(ie,oe){if(ie===oe)return!0;for(;ie=ie.parentNode;)if(ie===oe)return!0;return!1},st.getElement=function(ie,oe){var Q;if(typeof ie=="string"?Q=document.querySelector(ie):ie.nodeType!=null&&(Q=ie),Q==null)throw new Error("Invalid `".concat(oe,"` option provided. Please provide a CSS selector or a plain HTML element."));return Q},st.getElements=function(ie,oe){var Q,re;if(ie instanceof Array){re=[];try{var M=We(ie,!0),B;try{for(M.s();!(B=M.n()).done;)Q=B.value,re.push(this.getElement(Q,oe))}catch(me){M.e(me)}finally{M.f()}}catch{re=null}}else if(typeof ie=="string"){re=[];var te=We(document.querySelectorAll(ie),!0),ce;try{for(te.s();!(ce=te.n()).done;)Q=ce.value,re.push(Q)}catch(me){te.e(me)}finally{te.f()}}else ie.nodeType!=null&&(re=[ie]);if(re==null||!re.length)throw new Error("Invalid `".concat(oe,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return re},st.confirm=function(ie,oe,Q){if(window.confirm(ie))return oe();if(Q!=null)return Q()},st.isValidFile=function(ie,oe){if(!oe)return!0;oe=oe.split(",");var Q=ie.type,re=Q.replace(/\/.*$/,""),M=We(oe,!0),B;try{for(M.s();!(B=M.n()).done;){var te=B.value;if(te=te.trim(),te.charAt(0)==="."){if(ie.name.toLowerCase().indexOf(te.toLowerCase(),ie.name.length-te.length)!==-1)return!0}else if(/\/\*$/.test(te)){if(re===te.replace(/\/.*$/,""))return!0}else if(Q===te)return!0}}catch(ce){M.e(ce)}finally{M.f()}return!1},typeof jQuery!="undefined"&&jQuery!==null&&(jQuery.fn.dropzone=function(ie){return this.each(function(){return new st(this,ie)})}),st.ADDED="added",st.QUEUED="queued",st.ACCEPTED=st.QUEUED,st.UPLOADING="uploading",st.PROCESSING=st.UPLOADING,st.CANCELED="canceled",st.ERROR="error",st.SUCCESS="success";var hr=function(oe){var Q=oe.naturalWidth,re=oe.naturalHeight,M=document.createElement("canvas");M.width=1,M.height=re;var B=M.getContext("2d");B.drawImage(oe,0,0);for(var te=B.getImageData(1,0,1,re),ce=te.data,me=0,ve=re,Le=re;Le>me;){var Oe=ce[(Le-1)*4+3];Oe===0?ve=Le:me=Le,Le=ve+me>>1}var Ce=Le/re;return Ce===0?1:Ce},pr=function(oe,Q,re,M,B,te,ce,me,ve,Le){var Oe=hr(Q);return oe.drawImage(Q,re,M,B,te,ce,me,ve,Le/Oe)},$r=function(){function ie(){fr(this,ie)}return Mt(ie,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(Q){for(var re="",M=void 0,B=void 0,te="",ce=void 0,me=void 0,ve=void 0,Le="",Oe=0;M=Q[Oe++],B=Q[Oe++],te=Q[Oe++],ce=M>>2,me=(M&3)<<4|B>>4,ve=(B&15)<<2|te>>6,Le=te&63,isNaN(B)?ve=Le=64:isNaN(te)&&(Le=64),re=re+this.KEY_STR.charAt(ce)+this.KEY_STR.charAt(me)+this.KEY_STR.charAt(ve)+this.KEY_STR.charAt(Le),M=B=te="",ce=me=ve=Le="",Oe<Q.length;);return re}},{key:"restore",value:function(Q,re){if(!Q.match("data:image/jpeg;base64,"))return re;var M=this.decode64(Q.replace("data:image/jpeg;base64,","")),B=this.slice2Segments(M),te=this.exifManipulation(re,B);return"data:image/jpeg;base64,".concat(this.encode64(te))}},{key:"exifManipulation",value:function(Q,re){var M=this.getExifArray(re),B=this.insertExif(Q,M),te=new Uint8Array(B);return te}},{key:"getExifArray",value:function(Q){for(var re=void 0,M=0;M<Q.length;){if(re=Q[M],re[0]===255&re[1]===225)return re;M++}return[]}},{key:"insertExif",value:function(Q,re){var M=Q.replace("data:image/jpeg;base64,",""),B=this.decode64(M),te=B.indexOf(255,3),ce=B.slice(0,te),me=B.slice(te),ve=ce;return ve=ve.concat(re),ve=ve.concat(me),ve}},{key:"slice2Segments",value:function(Q){for(var re=0,M=[];;){var B;if(Q[re]===255&Q[re+1]===218)break;if(Q[re]===255&Q[re+1]===216)re+=2;else{B=Q[re+2]*256+Q[re+3];var te=re+B+2,ce=Q.slice(re,te);M.push(ce),re=te}if(re>Q.length)break}return M}},{key:"decode64",value:function(Q){var re="",M=void 0,B=void 0,te="",ce=void 0,me=void 0,ve=void 0,Le="",Oe=0,Ce=[],Ve=/[^A-Za-z0-9\+\/\=]/g;for(Ve.exec(Q)&&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.`),Q=Q.replace(/[^A-Za-z0-9\+\/\=]/g,"");ce=this.KEY_STR.indexOf(Q.charAt(Oe++)),me=this.KEY_STR.indexOf(Q.charAt(Oe++)),ve=this.KEY_STR.indexOf(Q.charAt(Oe++)),Le=this.KEY_STR.indexOf(Q.charAt(Oe++)),M=ce<<2|me>>4,B=(me&15)<<4|ve>>2,te=(ve&3)<<6|Le,Ce.push(M),ve!==64&&Ce.push(B),Le!==64&&Ce.push(te),M=B=te="",ce=me=ve=Le="",Oe<Q.length;);return Ce}}]),ie}();$r.initClass();var zt=function(oe,Q){var re=!1,M=!0,B=oe.document,te=B.documentElement,ce=B.addEventListener?"addEventListener":"attachEvent",me=B.addEventListener?"removeEventListener":"detachEvent",ve=B.addEventListener?"":"on",Le=function Ce(Ve){if(!(Ve.type==="readystatechange"&&B.readyState!=="complete")&&((Ve.type==="load"?oe:B)[me](ve+Ve.type,Ce,!1),!re&&(re=!0)))return Q.call(oe,Ve.type||Ve)},Oe=function Ce(){try{te.doScroll("left")}catch{setTimeout(Ce,50);return}return Le("poll")};if(B.readyState!=="complete"){if(B.createEventObject&&te.doScroll){try{M=!oe.frameElement}catch{}M&&Oe()}return B[ce](ve+"DOMContentLoaded",Le,!1),B[ce](ve+"readystatechange",Le,!1),oe[ce](ve+"load",Le,!1)}};st._autoDiscoverFunction=function(){if(st.autoDiscover)return st.discover()},zt(window,st._autoDiscoverFunction);function yr(ie,oe){return typeof ie!="undefined"&&ie!==null?oe(ie):void 0}function ur(ie,oe,Q){if(typeof ie!="undefined"&&ie!==null&&typeof ie[oe]=="function")return Q(ie,oe)}window.Dropzone=st;var Qt=st}(),l}()})});var up=Me((jS,S0)=>{S0.exports={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsolb:"\u29C5",bsol:"\\",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",cap:"\u2229",Cap:"\u22D2",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25CB",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cup:"\u222A",Cup:"\u22D3",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21A1",dArr:"\u21D3",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21CA",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21D3",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21BD",DownRightTeeVector:"\u295F",DownRightVectorBar:"\u2957",DownRightVector:"\u21C1",DownTeeArrow:"\u21A7",DownTee:"\u22A4",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",Ecirc:"\xCA",ecirc:"\xEA",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gescc:"\u2AA9",ges:"\u2A7E",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2AA5",gl:"\u2277",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gt:">",GT:">",Gt:"\u226B",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",harrcir:"\u2948",harr:"\u2194",hArr:"\u21D4",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",incare:"\u2105",in:"\u2208",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",intcal:"\u22BA",int:"\u222B",Int:"\u222C",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larrb:"\u21E4",larrbfs:"\u291F",larr:"\u2190",Larr:"\u219E",lArr:"\u21D0",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",latail:"\u2919",lAtail:"\u291B",lat:"\u2AAB",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",LeftArrowBar:"\u21E4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21D0",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21C3",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTeeArrow:"\u21A4",LeftTee:"\u22A3",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangleBar:"\u29CF",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21BF",LeftVectorBar:"\u2952",LeftVector:"\u21BC",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lescc:"\u2AA8",les:"\u2A7D",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21C7",ll:"\u226A",Ll:"\u22D8",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoustache:"\u23B0",lmoust:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftrightarrow:"\u27F7",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longmapsto:"\u27FC",longrightarrow:"\u27F6",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",lt:"<",LT:"<",Lt:"\u226A",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midast:"*",midcir:"\u2AF0",mid:"\u2223",middot:"\xB7",minusb:"\u229F",minus:"\u2212",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266E",naturals:"\u2115",natur:"\u266E",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",para:"\xB6",parallel:"\u2225",par:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plus:"+",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",prap:"\u2AB7",Pr:"\u2ABB",pr:"\u227A",prcue:"\u227C",precapprox:"\u2AB7",prec:"\u227A",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",pre:"\u2AAF",prE:"\u2AB3",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportional:"\u221D",Proportion:"\u2237",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21A0",rArr:"\u21D2",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",Re:"\u211C",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrowBar:"\u21E5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21D2",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVectorBar:"\u2955",RightDownVector:"\u21C2",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTeeArrow:"\u21A6",RightTee:"\u22A2",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangleBar:"\u29D0",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVectorBar:"\u2954",RightUpVector:"\u21BE",RightVectorBar:"\u2953",RightVector:"\u21C0",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoustache:"\u23B1",rmoust:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2ABC",sc:"\u227B",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdotb:"\u22A1",sdot:"\u22C5",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",solbar:"\u233F",solb:"\u29C4",sol:"/",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squ:"\u25A1",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succapprox:"\u2AB8",succ:"\u227B",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",Sup:"\u22D1",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2A31",timesb:"\u22A0",times:"\xD7",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",topbot:"\u2336",topcir:"\u2AF1",top:"\u22A4",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",uarr:"\u2191",Uarr:"\u219F",uArr:"\u21D1",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21D1",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21D5",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTeeArrow:"\u21A5",UpTee:"\u22A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",veebar:"\u22BB",vee:"\u2228",Vee:"\u22C1",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xharr:"\u27F7",xhArr:"\u27FA",Xi:"\u039E",xi:"\u03BE",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",yuml:"\xFF",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",zfr:"\u{1D537}",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var al=Me((HS,cp)=>{"use strict";cp.exports=up()});var Ea=Me((WS,fp)=>{fp.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 pp=Me((GS,hp)=>{"use strict";var dp={};function E0(i){var t,n,l=dp[i];if(l)return l;for(l=dp[i]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?l.push(n):l.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<i.length;t++)l[i.charCodeAt(t)]=i[t];return l}function Ca(i,t,n){var l,c,d,o,h,f="";for(typeof t!="string"&&(n=t,t=Ca.defaultChars),typeof n=="undefined"&&(n=!0),h=E0(t),l=0,c=i.length;l<c;l++){if(d=i.charCodeAt(l),n&&d===37&&l+2<c&&/^[0-9a-f]{2}$/i.test(i.slice(l+1,l+3))){f+=i.slice(l,l+3),l+=2;continue}if(d<128){f+=h[d];continue}if(d>=55296&&d<=57343){if(d>=55296&&d<=56319&&l+1<c&&(o=i.charCodeAt(l+1),o>=56320&&o<=57343)){f+=encodeURIComponent(i[l]+i[l+1]),l++;continue}f+="%EF%BF%BD";continue}f+=encodeURIComponent(i[l])}return f}Ca.defaultChars=";/?:@&=+$,-_.!~*'()#";Ca.componentChars="-_.!~*'()";hp.exports=Ca});var vp=Me((KS,gp)=>{"use strict";var mp={};function C0(i){var t,n,l=mp[i];if(l)return l;for(l=mp[i]=[],t=0;t<128;t++)n=String.fromCharCode(t),l.push(n);for(t=0;t<i.length;t++)n=i.charCodeAt(t),l[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return l}function Ta(i,t){var n;return typeof t!="string"&&(t=Ta.defaultChars),n=C0(t),i.replace(/(%[a-f0-9]{2})+/gi,function(l){var c,d,o,h,f,p,y,g="";for(c=0,d=l.length;c<d;c+=3){if(o=parseInt(l.slice(c+1,c+3),16),o<128){g+=n[o];continue}if((o&224)===192&&c+3<d&&(h=parseInt(l.slice(c+4,c+6),16),(h&192)===128)){y=o<<6&1984|h&63,y<128?g+="\uFFFD\uFFFD":g+=String.fromCharCode(y),c+=3;continue}if((o&240)===224&&c+6<d&&(h=parseInt(l.slice(c+4,c+6),16),f=parseInt(l.slice(c+7,c+9),16),(h&192)===128&&(f&192)===128)){y=o<<12&61440|h<<6&4032|f&63,y<2048||y>=55296&&y<=57343?g+="\uFFFD\uFFFD\uFFFD":g+=String.fromCharCode(y),c+=6;continue}if((o&248)===240&&c+9<d&&(h=parseInt(l.slice(c+4,c+6),16),f=parseInt(l.slice(c+7,c+9),16),p=parseInt(l.slice(c+10,c+12),16),(h&192)===128&&(f&192)===128&&(p&192)===128)){y=o<<18&1835008|h<<12&258048|f<<6&4032|p&63,y<65536||y>1114111?g+="\uFFFD\uFFFD\uFFFD\uFFFD":(y-=65536,g+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),c+=9;continue}g+="\uFFFD"}return g})}Ta.defaultChars=";/?:@&=+$,#";Ta.componentChars="";gp.exports=Ta});var bp=Me((VS,yp)=>{"use strict";yp.exports=function(t){var n="";return n+=t.protocol||"",n+=t.slashes?"//":"",n+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?n+="["+t.hostname+"]":n+=t.hostname||"",n+=t.port?":"+t.port:"",n+=t.pathname||"",n+=t.search||"",n+=t.hash||"",n}});var Cp=Me((YS,Ep)=>{"use strict";function Aa(){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 T0=/^([a-z0-9.+-]+:)/i,A0=/:[0-9]*$/,L0=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,D0=["<",">",'"',"`"," ","\r",`
`," "],I0=["{","}","|","\\","^","`"].concat(D0),F0=["'"].concat(I0),xp=["%","/","?",";","#"].concat(F0),wp=["/","?","#"],M0=255,kp=/^[+a-z0-9A-Z_-]{0,63}$/,O0=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_p={javascript:!0,"javascript:":!0},Sp={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function P0(i,t){if(i&&i instanceof Aa)return i;var n=new Aa;return n.parse(i,t),n}Aa.prototype.parse=function(i,t){var n,l,c,d,o,h=i;if(h=h.trim(),!t&&i.split("#").length===1){var f=L0.exec(h);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var p=T0.exec(h);if(p&&(p=p[0],c=p.toLowerCase(),this.protocol=p,h=h.substr(p.length)),(t||p||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=h.substr(0,2)==="//",o&&!(p&&_p[p])&&(h=h.substr(2),this.slashes=!0)),!_p[p]&&(o||p&&!Sp[p])){var y=-1;for(n=0;n<wp.length;n++)d=h.indexOf(wp[n]),d!==-1&&(y===-1||d<y)&&(y=d);var g,v;for(y===-1?v=h.lastIndexOf("@"):v=h.lastIndexOf("@",y),v!==-1&&(g=h.slice(0,v),h=h.slice(v+1),this.auth=g),y=-1,n=0;n<xp.length;n++)d=h.indexOf(xp[n]),d!==-1&&(y===-1||d<y)&&(y=d);y===-1&&(y=h.length),h[y-1]===":"&&y--;var b=h.slice(0,y);h=h.slice(y),this.parseHost(b),this.hostname=this.hostname||"";var k=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!k){var E=this.hostname.split(/\./);for(n=0,l=E.length;n<l;n++){var w=E[n];if(!!w&&!w.match(kp)){for(var I="",S=0,N=w.length;S<N;S++)w.charCodeAt(S)>127?I+="x":I+=w[S];if(!I.match(kp)){var O=E.slice(0,n),j=E.slice(n+1),U=w.match(O0);U&&(O.push(U[1]),j.unshift(U[2])),j.length&&(h=j.join(".")+h),this.hostname=O.join(".");break}}}}this.hostname.length>M0&&(this.hostname=""),k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var ee=h.indexOf("#");ee!==-1&&(this.hash=h.substr(ee),h=h.slice(0,ee));var V=h.indexOf("?");return V!==-1&&(this.search=h.substr(V),h=h.slice(0,V)),h&&(this.pathname=h),Sp[c]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Aa.prototype.parseHost=function(i){var t=A0.exec(i);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),i=i.substr(0,i.length-t.length)),i&&(this.hostname=i)};Ep.exports=P0});var sl=Me((XS,mo)=>{"use strict";mo.exports.encode=pp();mo.exports.decode=vp();mo.exports.format=bp();mo.exports.parse=Cp()});var ll=Me((ZS,Tp)=>{Tp.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var ul=Me((QS,Ap)=>{Ap.exports=/[\0-\x1F\x7F-\x9F]/});var Dp=Me((JS,Lp)=>{Lp.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 cl=Me((e1,Ip)=>{Ip.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var Fp=Me(xi=>{"use strict";xi.Any=ll();xi.Cc=ul();xi.Cf=Dp();xi.P=Ea();xi.Z=cl()});var Ft=Me(lr=>{"use strict";function R0(i){return Object.prototype.toString.call(i)}function z0(i){return R0(i)==="[object String]"}var N0=Object.prototype.hasOwnProperty;function Mp(i,t){return N0.call(i,t)}function B0(i){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){if(!!n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(l){i[l]=n[l]})}}),i}function q0(i,t,n){return[].concat(i.slice(0,t),n,i.slice(t+1))}function Op(i){return!(i>=55296&&i<=57343||i>=64976&&i<=65007||(i&65535)===65535||(i&65535)===65534||i>=0&&i<=8||i===11||i>=14&&i<=31||i>=127&&i<=159||i>1114111)}function Pp(i){if(i>65535){i-=65536;var t=55296+(i>>10),n=56320+(i&1023);return String.fromCharCode(t,n)}return String.fromCharCode(i)}var Rp=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,$0=/&([a-z#][a-z0-9]{1,31});/gi,U0=new RegExp(Rp.source+"|"+$0.source,"gi"),j0=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,zp=al();function H0(i,t){var n=0;return Mp(zp,t)?zp[t]:t.charCodeAt(0)===35&&j0.test(t)&&(n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Op(n))?Pp(n):i}function W0(i){return i.indexOf("\\")<0?i:i.replace(Rp,"$1")}function G0(i){return i.indexOf("\\")<0&&i.indexOf("&")<0?i:i.replace(U0,function(t,n,l){return n||H0(t,l)})}var K0=/[&<>"]/,V0=/[&<>"]/g,Y0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function X0(i){return Y0[i]}function Z0(i){return K0.test(i)?i.replace(V0,X0):i}var Q0=/[.?*+^$[\]\\(){}|-]/g;function J0(i){return i.replace(Q0,"\\$&")}function ew(i){switch(i){case 9:case 32:return!0}return!1}function tw(i){if(i>=8192&&i<=8202)return!0;switch(i){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 rw=Ea();function nw(i){return rw.test(i)}function iw(i){switch(i){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 ow(i){return i=i.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(i=i.replace(/ẞ/g,"\xDF")),i.toLowerCase().toUpperCase()}lr.lib={};lr.lib.mdurl=sl();lr.lib.ucmicro=Fp();lr.assign=B0;lr.isString=z0;lr.has=Mp;lr.unescapeMd=W0;lr.unescapeAll=G0;lr.isValidEntityCode=Op;lr.fromCodePoint=Pp;lr.escapeHtml=Z0;lr.arrayReplaceAt=q0;lr.isSpace=ew;lr.isWhiteSpace=tw;lr.isMdAsciiPunct=iw;lr.isPunctChar=nw;lr.escapeRE=J0;lr.normalizeReference=ow});var Bp=Me((n1,Np)=>{"use strict";Np.exports=function(t,n,l){var c,d,o,h,f=-1,p=t.posMax,y=t.pos;for(t.pos=n+1,c=1;t.pos<p;){if(o=t.src.charCodeAt(t.pos),o===93&&(c--,c===0)){d=!0;break}if(h=t.pos,t.md.inline.skipToken(t),o===91){if(h===t.pos-1)c++;else if(l)return t.pos=y,-1}}return d&&(f=t.pos),t.pos=y,f}});var Up=Me((i1,$p)=>{"use strict";var qp=Ft().unescapeAll;$p.exports=function(t,n,l){var c,d,o=0,h=n,f={ok:!1,pos:0,lines:0,str:""};if(t.charCodeAt(n)===60){for(n++;n<l;){if(c=t.charCodeAt(n),c===10||c===60)return f;if(c===62)return f.pos=n+1,f.str=qp(t.slice(h+1,n)),f.ok=!0,f;if(c===92&&n+1<l){n+=2;continue}n++}return f}for(d=0;n<l&&(c=t.charCodeAt(n),!(c===32||c<32||c===127));){if(c===92&&n+1<l){if(t.charCodeAt(n+1)===32)break;n+=2;continue}if(c===40&&(d++,d>32))return f;if(c===41){if(d===0)break;d--}n++}return h===n||d!==0||(f.str=qp(t.slice(h,n)),f.lines=o,f.pos=n,f.ok=!0),f}});var Hp=Me((o1,jp)=>{"use strict";var aw=Ft().unescapeAll;jp.exports=function(t,n,l){var c,d,o=0,h=n,f={ok:!1,pos:0,lines:0,str:""};if(n>=l||(d=t.charCodeAt(n),d!==34&&d!==39&&d!==40))return f;for(n++,d===40&&(d=41);n<l;){if(c=t.charCodeAt(n),c===d)return f.pos=n+1,f.lines=o,f.str=aw(t.slice(h+1,n)),f.ok=!0,f;if(c===40&&d===41)return f;c===10?o++:c===92&&n+1<l&&(n++,t.charCodeAt(n)===10&&o++),n++}return f}});var Wp=Me(La=>{"use strict";La.parseLinkLabel=Bp();La.parseLinkDestination=Up();La.parseLinkTitle=Hp()});var Kp=Me((s1,Gp)=>{"use strict";var sw=Ft().assign,lw=Ft().unescapeAll,Un=Ft().escapeHtml,tn={};tn.code_inline=function(i,t,n,l,c){var d=i[t];return"<code"+c.renderAttrs(d)+">"+Un(i[t].content)+"</code>"};tn.code_block=function(i,t,n,l,c){var d=i[t];return"<pre"+c.renderAttrs(d)+"><code>"+Un(i[t].content)+`</code></pre>
`};tn.fence=function(i,t,n,l,c){var d=i[t],o=d.info?lw(d.info).trim():"",h="",f="",p,y,g,v,b;return o&&(g=o.split(/(\s+)/g),h=g[0],f=g.slice(2).join("")),n.highlight?p=n.highlight(d.content,h,f)||Un(d.content):p=Un(d.content),p.indexOf("<pre")===0?p+`
`:o?(y=d.attrIndex("class"),v=d.attrs?d.attrs.slice():[],y<0?v.push(["class",n.langPrefix+h]):(v[y]=v[y].slice(),v[y][1]+=" "+n.langPrefix+h),b={attrs:v},"<pre><code"+c.renderAttrs(b)+">"+p+`</code></pre>
`):"<pre><code"+c.renderAttrs(d)+">"+p+`</code></pre>
`};tn.image=function(i,t,n,l,c){var d=i[t];return d.attrs[d.attrIndex("alt")][1]=c.renderInlineAsText(d.children,n,l),c.renderToken(i,t,n)};tn.hardbreak=function(i,t,n){return n.xhtmlOut?`<br />
`:`<br>
`};tn.softbreak=function(i,t,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
`};tn.text=function(i,t){return Un(i[t].content)};tn.html_block=function(i,t){return i[t].content};tn.html_inline=function(i,t){return i[t].content};function wi(){this.rules=sw({},tn)}wi.prototype.renderAttrs=function(t){var n,l,c;if(!t.attrs)return"";for(c="",n=0,l=t.attrs.length;n<l;n++)c+=" "+Un(t.attrs[n][0])+'="'+Un(t.attrs[n][1])+'"';return c};wi.prototype.renderToken=function(t,n,l){var c,d="",o=!1,h=t[n];return h.hidden?"":(h.block&&h.nesting!==-1&&n&&t[n-1].hidden&&(d+=`
`),d+=(h.nesting===-1?"</":"<")+h.tag,d+=this.renderAttrs(h),h.nesting===0&&l.xhtmlOut&&(d+=" /"),h.block&&(o=!0,h.nesting===1&&n+1<t.length&&(c=t[n+1],(c.type==="inline"||c.hidden||c.nesting===-1&&c.tag===h.tag)&&(o=!1))),d+=o?`>
`:">",d)};wi.prototype.renderInline=function(i,t,n){for(var l,c="",d=this.rules,o=0,h=i.length;o<h;o++)l=i[o].type,typeof d[l]!="undefined"?c+=d[l](i,o,t,n,this):c+=this.renderToken(i,o,t);return c};wi.prototype.renderInlineAsText=function(i,t,n){for(var l="",c=0,d=i.length;c<d;c++)i[c].type==="text"?l+=i[c].content:i[c].type==="image"?l+=this.renderInlineAsText(i[c].children,t,n):i[c].type==="softbreak"&&(l+=`
`);return l};wi.prototype.render=function(i,t,n){var l,c,d,o="",h=this.rules;for(l=0,c=i.length;l<c;l++)d=i[l].type,d==="inline"?o+=this.renderInline(i[l].children,t,n):typeof h[d]!="undefined"?o+=h[i[l].type](i,l,t,n,this):o+=this.renderToken(i,l,t,n);return o};Gp.exports=wi});var Da=Me((l1,Vp)=>{"use strict";function Kr(){this.__rules__=[],this.__cache__=null}Kr.prototype.__find__=function(i){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===i)return t;return-1};Kr.prototype.__compile__=function(){var i=this,t=[""];i.__rules__.forEach(function(n){!n.enabled||n.alt.forEach(function(l){t.indexOf(l)<0&&t.push(l)})}),i.__cache__={},t.forEach(function(n){i.__cache__[n]=[],i.__rules__.forEach(function(l){!l.enabled||n&&l.alt.indexOf(n)<0||i.__cache__[n].push(l.fn)})})};Kr.prototype.at=function(i,t,n){var l=this.__find__(i),c=n||{};if(l===-1)throw new Error("Parser rule not found: "+i);this.__rules__[l].fn=t,this.__rules__[l].alt=c.alt||[],this.__cache__=null};Kr.prototype.before=function(i,t,n,l){var c=this.__find__(i),d=l||{};if(c===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(c,0,{name:t,enabled:!0,fn:n,alt:d.alt||[]}),this.__cache__=null};Kr.prototype.after=function(i,t,n,l){var c=this.__find__(i),d=l||{};if(c===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(c+1,0,{name:t,enabled:!0,fn:n,alt:d.alt||[]}),this.__cache__=null};Kr.prototype.push=function(i,t,n){var l=n||{};this.__rules__.push({name:i,enabled:!0,fn:t,alt:l.alt||[]}),this.__cache__=null};Kr.prototype.enable=function(i,t){Array.isArray(i)||(i=[i]);var n=[];return i.forEach(function(l){var c=this.__find__(l);if(c<0){if(t)return;throw new Error("Rules manager: invalid rule name "+l)}this.__rules__[c].enabled=!0,n.push(l)},this),this.__cache__=null,n};Kr.prototype.enableOnly=function(i,t){Array.isArray(i)||(i=[i]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(i,t)};Kr.prototype.disable=function(i,t){Array.isArray(i)||(i=[i]);var n=[];return i.forEach(function(l){var c=this.__find__(l);if(c<0){if(t)return;throw new Error("Rules manager: invalid rule name "+l)}this.__rules__[c].enabled=!1,n.push(l)},this),this.__cache__=null,n};Kr.prototype.getRules=function(i){return this.__cache__===null&&this.__compile__(),this.__cache__[i]||[]};Vp.exports=Kr});var Xp=Me((u1,Yp)=>{"use strict";var uw=/\r\n?|\n/g,cw=/\0/g;Yp.exports=function(t){var n;n=t.src.replace(uw,`
`),n=n.replace(cw,"\uFFFD"),t.src=n}});var Qp=Me((c1,Zp)=>{"use strict";Zp.exports=function(t){var n;t.inlineMode?(n=new t.Token("inline","",0),n.content=t.src,n.map=[0,1],n.children=[],t.tokens.push(n)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}});var em=Me((f1,Jp)=>{"use strict";Jp.exports=function(t){var n=t.tokens,l,c,d;for(c=0,d=n.length;c<d;c++)l=n[c],l.type==="inline"&&t.md.inline.parse(l.content,t.md,t.env,l.children)}});var rm=Me((d1,tm)=>{"use strict";var fw=Ft().arrayReplaceAt;function dw(i){return/^<a[>\s]/i.test(i)}function hw(i){return/^<\/a\s*>/i.test(i)}tm.exports=function(t){var n,l,c,d,o,h,f,p,y,g,v,b,k,E,w,I,S=t.tokens,N;if(!!t.md.options.linkify){for(l=0,c=S.length;l<c;l++)if(!(S[l].type!=="inline"||!t.md.linkify.pretest(S[l].content)))for(d=S[l].children,k=0,n=d.length-1;n>=0;n--){if(h=d[n],h.type==="link_close"){for(n--;d[n].level!==h.level&&d[n].type!=="link_open";)n--;continue}if(h.type==="html_inline"&&(dw(h.content)&&k>0&&k--,hw(h.content)&&k++),!(k>0)&&h.type==="text"&&t.md.linkify.test(h.content)){for(y=h.content,N=t.md.linkify.match(y),f=[],b=h.level,v=0,p=0;p<N.length;p++)E=N[p].url,w=t.md.normalizeLink(E),!!t.md.validateLink(w)&&(I=N[p].text,N[p].schema?N[p].schema==="mailto:"&&!/^mailto:/i.test(I)?I=t.md.normalizeLinkText("mailto:"+I).replace(/^mailto:/,""):I=t.md.normalizeLinkText(I):I=t.md.normalizeLinkText("http://"+I).replace(/^http:\/\//,""),g=N[p].index,g>v&&(o=new t.Token("text","",0),o.content=y.slice(v,g),o.level=b,f.push(o)),o=new t.Token("link_open","a",1),o.attrs=[["href",w]],o.level=b++,o.markup="linkify",o.info="auto",f.push(o),o=new t.Token("text","",0),o.content=I,o.level=b,f.push(o),o=new t.Token("link_close","a",-1),o.level=--b,o.markup="linkify",o.info="auto",f.push(o),v=N[p].lastIndex);v<y.length&&(o=new t.Token("text","",0),o.content=y.slice(v),o.level=b,f.push(o)),S[l].children=d=fw(d,n,f)}}}}});var om=Me((h1,im)=>{"use strict";var nm=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,pw=/\((c|tm|r|p)\)/i,mw=/\((c|tm|r|p)\)/ig,gw={c:"\xA9",r:"\xAE",p:"\xA7",tm:"\u2122"};function vw(i,t){return gw[t.toLowerCase()]}function yw(i){var t,n,l=0;for(t=i.length-1;t>=0;t--)n=i[t],n.type==="text"&&!l&&(n.content=n.content.replace(mw,vw)),n.type==="link_open"&&n.info==="auto"&&l--,n.type==="link_close"&&n.info==="auto"&&l++}function bw(i){var t,n,l=0;for(t=i.length-1;t>=0;t--)n=i[t],n.type==="text"&&!l&&nm.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&l--,n.type==="link_close"&&n.info==="auto"&&l++}im.exports=function(t){var n;if(!!t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type==="inline"&&(pw.test(t.tokens[n].content)&&yw(t.tokens[n].children),nm.test(t.tokens[n].content)&&bw(t.tokens[n].children))}});var dm=Me((p1,fm)=>{"use strict";var am=Ft().isWhiteSpace,sm=Ft().isPunctChar,lm=Ft().isMdAsciiPunct,xw=/['"]/,um=/['"]/g,cm="\u2019";function Ia(i,t,n){return i.substr(0,t)+n+i.substr(t+1)}function ww(i,t){var n,l,c,d,o,h,f,p,y,g,v,b,k,E,w,I,S,N,O,j,U;for(O=[],n=0;n<i.length;n++){for(l=i[n],f=i[n].level,S=O.length-1;S>=0&&!(O[S].level<=f);S--);if(O.length=S+1,l.type!=="text")continue;c=l.content,o=0,h=c.length;e:for(;o<h&&(um.lastIndex=o,d=um.exec(c),!!d);){if(w=I=!0,o=d.index+1,N=d[0]==="'",y=32,d.index-1>=0)y=c.charCodeAt(d.index-1);else for(S=n-1;S>=0&&!(i[S].type==="softbreak"||i[S].type==="hardbreak");S--)if(!!i[S].content){y=i[S].content.charCodeAt(i[S].content.length-1);break}if(g=32,o<h)g=c.charCodeAt(o);else for(S=n+1;S<i.length&&!(i[S].type==="softbreak"||i[S].type==="hardbreak");S++)if(!!i[S].content){g=i[S].content.charCodeAt(0);break}if(v=lm(y)||sm(String.fromCharCode(y)),b=lm(g)||sm(String.fromCharCode(g)),k=am(y),E=am(g),E?w=!1:b&&(k||v||(w=!1)),k?I=!1:v&&(E||b||(I=!1)),g===34&&d[0]==='"'&&y>=48&&y<=57&&(I=w=!1),w&&I&&(w=v,I=b),!w&&!I){N&&(l.content=Ia(l.content,d.index,cm));continue}if(I){for(S=O.length-1;S>=0&&(p=O[S],!(O[S].level<f));S--)if(p.single===N&&O[S].level===f){p=O[S],N?(j=t.md.options.quotes[2],U=t.md.options.quotes[3]):(j=t.md.options.quotes[0],U=t.md.options.quotes[1]),l.content=Ia(l.content,d.index,U),i[p.token].content=Ia(i[p.token].content,p.pos,j),o+=U.length-1,p.token===n&&(o+=j.length-1),c=l.content,h=c.length,O.length=S;continue e}}w?O.push({token:n,pos:d.index,single:N,level:f}):I&&N&&(l.content=Ia(l.content,d.index,cm))}}}fm.exports=function(t){var n;if(!!t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type!=="inline"||!xw.test(t.tokens[n].content)||ww(t.tokens[n].children,t)}});var Fa=Me((m1,hm)=>{"use strict";function ki(i,t,n){this.type=i,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ki.prototype.attrIndex=function(t){var n,l,c;if(!this.attrs)return-1;for(n=this.attrs,l=0,c=n.length;l<c;l++)if(n[l][0]===t)return l;return-1};ki.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};ki.prototype.attrSet=function(t,n){var l=this.attrIndex(t),c=[t,n];l<0?this.attrPush(c):this.attrs[l]=c};ki.prototype.attrGet=function(t){var n=this.attrIndex(t),l=null;return n>=0&&(l=this.attrs[n][1]),l};ki.prototype.attrJoin=function(t,n){var l=this.attrIndex(t);l<0?this.attrPush([t,n]):this.attrs[l][1]=this.attrs[l][1]+" "+n};hm.exports=ki});var gm=Me((g1,mm)=>{"use strict";var kw=Fa();function pm(i,t,n){this.src=i,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}pm.prototype.Token=kw;mm.exports=pm});var ym=Me((v1,vm)=>{"use strict";var _w=Da(),fl=[["normalize",Xp()],["block",Qp()],["inline",em()],["linkify",rm()],["replacements",om()],["smartquotes",dm()]];function dl(){this.ruler=new _w;for(var i=0;i<fl.length;i++)this.ruler.push(fl[i][0],fl[i][1])}dl.prototype.process=function(i){var t,n,l;for(l=this.ruler.getRules(""),t=0,n=l.length;t<n;t++)l[t](i)};dl.prototype.State=gm();vm.exports=dl});var wm=Me((y1,xm)=>{"use strict";var hl=Ft().isSpace;function pl(i,t){var n=i.bMarks[t]+i.tShift[t],l=i.eMarks[t];return i.src.substr(n,l-n)}function bm(i){var t=[],n=0,l=i.length,c,d=!1,o=0,h="";for(c=i.charCodeAt(n);n<l;)c===124&&(d?(h+=i.substring(o,n-1),o=n):(t.push(h+i.substring(o,n)),h="",o=n+1)),d=c===92,n++,c=i.charCodeAt(n);return t.push(h+i.substring(o)),t}xm.exports=function(t,n,l,c){var d,o,h,f,p,y,g,v,b,k,E,w,I,S,N,O,j,U;if(n+2>l||(y=n+1,t.sCount[y]<t.blkIndent)||t.sCount[y]-t.blkIndent>=4||(h=t.bMarks[y]+t.tShift[y],h>=t.eMarks[y])||(j=t.src.charCodeAt(h++),j!==124&&j!==45&&j!==58)||h>=t.eMarks[y]||(U=t.src.charCodeAt(h++),U!==124&&U!==45&&U!==58&&!hl(U))||j===45&&hl(U))return!1;for(;h<t.eMarks[y];){if(d=t.src.charCodeAt(h),d!==124&&d!==45&&d!==58&&!hl(d))return!1;h++}for(o=pl(t,n+1),g=o.split("|"),k=[],f=0;f<g.length;f++){if(E=g[f].trim(),!E){if(f===0||f===g.length-1)continue;return!1}if(!/^:?-+:?$/.test(E))return!1;E.charCodeAt(E.length-1)===58?k.push(E.charCodeAt(0)===58?"center":"right"):E.charCodeAt(0)===58?k.push("left"):k.push("")}if(o=pl(t,n).trim(),o.indexOf("|")===-1||t.sCount[n]-t.blkIndent>=4||(g=bm(o),g.length&&g[0]===""&&g.shift(),g.length&&g[g.length-1]===""&&g.pop(),v=g.length,v===0||v!==k.length))return!1;if(c)return!0;for(S=t.parentType,t.parentType="table",O=t.md.block.ruler.getRules("blockquote"),b=t.push("table_open","table",1),b.map=w=[n,0],b=t.push("thead_open","thead",1),b.map=[n,n+1],b=t.push("tr_open","tr",1),b.map=[n,n+1],f=0;f<g.length;f++)b=t.push("th_open","th",1),k[f]&&(b.attrs=[["style","text-align:"+k[f]]]),b=t.push("inline","",0),b.content=g[f].trim(),b.children=[],b=t.push("th_close","th",-1);for(b=t.push("tr_close","tr",-1),b=t.push("thead_close","thead",-1),y=n+2;y<l&&!(t.sCount[y]<t.blkIndent);y++){for(N=!1,f=0,p=O.length;f<p;f++)if(O[f](t,y,l,!0)){N=!0;break}if(N||(o=pl(t,y).trim(),!o)||t.sCount[y]-t.blkIndent>=4)break;for(g=bm(o),g.length&&g[0]===""&&g.shift(),g.length&&g[g.length-1]===""&&g.pop(),y===n+2&&(b=t.push("tbody_open","tbody",1),b.map=I=[n+2,0]),b=t.push("tr_open","tr",1),b.map=[y,y+1],f=0;f<v;f++)b=t.push("td_open","td",1),k[f]&&(b.attrs=[["style","text-align:"+k[f]]]),b=t.push("inline","",0),b.content=g[f]?g[f].trim():"",b.children=[],b=t.push("td_close","td",-1);b=t.push("tr_close","tr",-1)}return I&&(b=t.push("tbody_close","tbody",-1),I[1]=y),b=t.push("table_close","table",-1),w[1]=y,t.parentType=S,t.line=y,!0}});var _m=Me((b1,km)=>{"use strict";km.exports=function(t,n,l){var c,d,o;if(t.sCount[n]-t.blkIndent<4)return!1;for(d=c=n+1;c<l;){if(t.isEmpty(c)){c++;continue}if(t.sCount[c]-t.blkIndent>=4){c++,d=c;continue}break}return t.line=d,o=t.push("code_block","code",0),o.content=t.getLines(n,d,4+t.blkIndent,!1)+`
`,o.map=[n,t.line],!0}});var Em=Me((x1,Sm)=>{"use strict";Sm.exports=function(t,n,l,c){var d,o,h,f,p,y,g,v=!1,b=t.bMarks[n]+t.tShift[n],k=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||b+3>k||(d=t.src.charCodeAt(b),d!==126&&d!==96)||(p=b,b=t.skipChars(b,d),o=b-p,o<3)||(g=t.src.slice(p,b),h=t.src.slice(b,k),d===96&&h.indexOf(String.fromCharCode(d))>=0))return!1;if(c)return!0;for(f=n;f++,!(f>=l||(b=p=t.bMarks[f]+t.tShift[f],k=t.eMarks[f],b<k&&t.sCount[f]<t.blkIndent));)if(t.src.charCodeAt(b)===d&&!(t.sCount[f]-t.blkIndent>=4)&&(b=t.skipChars(b,d),!(b-p<o)&&(b=t.skipSpaces(b),!(b<k)))){v=!0;break}return o=t.sCount[n],t.line=f+(v?1:0),y=t.push("fence","code",0),y.info=h,y.content=t.getLines(n+1,f,o,!0),y.markup=g,y.map=[n,t.line],!0}});var Am=Me((w1,Tm)=>{"use strict";var Cm=Ft().isSpace;Tm.exports=function(t,n,l,c){var d,o,h,f,p,y,g,v,b,k,E,w,I,S,N,O,j,U,ee,V,W=t.lineMax,K=t.bMarks[n]+t.tShift[n],q=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||t.src.charCodeAt(K++)!==62)return!1;if(c)return!0;for(f=b=t.sCount[n]+1,t.src.charCodeAt(K)===32?(K++,f++,b++,d=!1,O=!0):t.src.charCodeAt(K)===9?(O=!0,(t.bsCount[n]+b)%4===3?(K++,f++,b++,d=!1):d=!0):O=!1,k=[t.bMarks[n]],t.bMarks[n]=K;K<q&&(o=t.src.charCodeAt(K),Cm(o));){o===9?b+=4-(b+t.bsCount[n]+(d?1:0))%4:b++;K++}for(E=[t.bsCount[n]],t.bsCount[n]=t.sCount[n]+1+(O?1:0),y=K>=q,S=[t.sCount[n]],t.sCount[n]=b-f,N=[t.tShift[n]],t.tShift[n]=K-t.bMarks[n],U=t.md.block.ruler.getRules("blockquote"),I=t.parentType,t.parentType="blockquote",v=n+1;v<l&&(V=t.sCount[v]<t.blkIndent,K=t.bMarks[v]+t.tShift[v],q=t.eMarks[v],!(K>=q));v++){if(t.src.charCodeAt(K++)===62&&!V){for(f=b=t.sCount[v]+1,t.src.charCodeAt(K)===32?(K++,f++,b++,d=!1,O=!0):t.src.charCodeAt(K)===9?(O=!0,(t.bsCount[v]+b)%4===3?(K++,f++,b++,d=!1):d=!0):O=!1,k.push(t.bMarks[v]),t.bMarks[v]=K;K<q&&(o=t.src.charCodeAt(K),Cm(o));){o===9?b+=4-(b+t.bsCount[v]+(d?1:0))%4:b++;K++}y=K>=q,E.push(t.bsCount[v]),t.bsCount[v]=t.sCount[v]+1+(O?1:0),S.push(t.sCount[v]),t.sCount[v]=b-f,N.push(t.tShift[v]),t.tShift[v]=K-t.bMarks[v];continue}if(y)break;for(j=!1,h=0,p=U.length;h<p;h++)if(U[h](t,v,l,!0)){j=!0;break}if(j){t.lineMax=v,t.blkIndent!==0&&(k.push(t.bMarks[v]),E.push(t.bsCount[v]),N.push(t.tShift[v]),S.push(t.sCount[v]),t.sCount[v]-=t.blkIndent);break}k.push(t.bMarks[v]),E.push(t.bsCount[v]),N.push(t.tShift[v]),S.push(t.sCount[v]),t.sCount[v]=-1}for(w=t.blkIndent,t.blkIndent=0,ee=t.push("blockquote_open","blockquote",1),ee.markup=">",ee.map=g=[n,0],t.md.block.tokenize(t,n,v),ee=t.push("blockquote_close","blockquote",-1),ee.markup=">",t.lineMax=W,t.parentType=I,g[1]=t.line,h=0;h<N.length;h++)t.bMarks[h+n]=k[h],t.tShift[h+n]=N[h],t.sCount[h+n]=S[h],t.bsCount[h+n]=E[h];return t.blkIndent=w,!0}});var Dm=Me((k1,Lm)=>{"use strict";var Sw=Ft().isSpace;Lm.exports=function(t,n,l,c){var d,o,h,f,p=t.bMarks[n]+t.tShift[n],y=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||(d=t.src.charCodeAt(p++),d!==42&&d!==45&&d!==95))return!1;for(o=1;p<y;){if(h=t.src.charCodeAt(p++),h!==d&&!Sw(h))return!1;h===d&&o++}return o<3?!1:(c||(t.line=n+1,f=t.push("hr","hr",0),f.map=[n,t.line],f.markup=Array(o+1).join(String.fromCharCode(d))),!0)}});var Pm=Me((_1,Om)=>{"use strict";var Im=Ft().isSpace;function Fm(i,t){var n,l,c,d;return l=i.bMarks[t]+i.tShift[t],c=i.eMarks[t],n=i.src.charCodeAt(l++),n!==42&&n!==45&&n!==43||l<c&&(d=i.src.charCodeAt(l),!Im(d))?-1:l}function Mm(i,t){var n,l=i.bMarks[t]+i.tShift[t],c=l,d=i.eMarks[t];if(c+1>=d||(n=i.src.charCodeAt(c++),n<48||n>57))return-1;for(;;){if(c>=d)return-1;if(n=i.src.charCodeAt(c++),n>=48&&n<=57){if(c-l>=10)return-1;continue}if(n===41||n===46)break;return-1}return c<d&&(n=i.src.charCodeAt(c),!Im(n))?-1:c}function Ew(i,t){var n,l,c=i.level+2;for(n=t+2,l=i.tokens.length-2;n<l;n++)i.tokens[n].level===c&&i.tokens[n].type==="paragraph_open"&&(i.tokens[n+2].hidden=!0,i.tokens[n].hidden=!0,n+=2)}Om.exports=function(t,n,l,c){var d,o,h,f,p,y,g,v,b,k,E,w,I,S,N,O,j,U,ee,V,W,K,q,R,T,H,Z,P,z=!1,ne=!0;if(t.sCount[n]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[n]-t.listIndent>=4&&t.sCount[n]<t.blkIndent)return!1;if(c&&t.parentType==="paragraph"&&t.sCount[n]>=t.blkIndent&&(z=!0),(q=Mm(t,n))>=0){if(g=!0,T=t.bMarks[n]+t.tShift[n],I=Number(t.src.slice(T,q-1)),z&&I!==1)return!1}else if((q=Fm(t,n))>=0)g=!1;else return!1;if(z&&t.skipSpaces(q)>=t.eMarks[n])return!1;if(w=t.src.charCodeAt(q-1),c)return!0;for(E=t.tokens.length,g?(P=t.push("ordered_list_open","ol",1),I!==1&&(P.attrs=[["start",I]])):P=t.push("bullet_list_open","ul",1),P.map=k=[n,0],P.markup=String.fromCharCode(w),N=n,R=!1,Z=t.md.block.ruler.getRules("list"),U=t.parentType,t.parentType="list";N<l;){for(K=q,S=t.eMarks[N],y=O=t.sCount[N]+q-(t.bMarks[n]+t.tShift[n]);K<S;){if(d=t.src.charCodeAt(K),d===9)O+=4-(O+t.bsCount[N])%4;else if(d===32)O++;else break;K++}if(o=K,o>=S?p=1:p=O-y,p>4&&(p=1),f=y+p,P=t.push("list_item_open","li",1),P.markup=String.fromCharCode(w),P.map=v=[n,0],g&&(P.info=t.src.slice(T,q-1)),W=t.tight,V=t.tShift[n],ee=t.sCount[n],j=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=f,t.tight=!0,t.tShift[n]=o-t.bMarks[n],t.sCount[n]=O,o>=S&&t.isEmpty(n+1)?t.line=Math.min(t.line+2,l):t.md.block.tokenize(t,n,l,!0),(!t.tight||R)&&(ne=!1),R=t.line-n>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=j,t.tShift[n]=V,t.sCount[n]=ee,t.tight=W,P=t.push("list_item_close","li",-1),P.markup=String.fromCharCode(w),N=n=t.line,v[1]=N,o=t.bMarks[n],N>=l||t.sCount[N]<t.blkIndent||t.sCount[n]-t.blkIndent>=4)break;for(H=!1,h=0,b=Z.length;h<b;h++)if(Z[h](t,N,l,!0)){H=!0;break}if(H)break;if(g){if(q=Mm(t,N),q<0)break;T=t.bMarks[N]+t.tShift[N]}else if(q=Fm(t,N),q<0)break;if(w!==t.src.charCodeAt(q-1))break}return g?P=t.push("ordered_list_close","ol",-1):P=t.push("bullet_list_close","ul",-1),P.markup=String.fromCharCode(w),k[1]=N,t.line=N,t.parentType=U,ne&&Ew(t,E),!0}});var zm=Me((S1,Rm)=>{"use strict";var Cw=Ft().normalizeReference,Ma=Ft().isSpace;Rm.exports=function(t,n,l,c){var d,o,h,f,p,y,g,v,b,k,E,w,I,S,N,O,j=0,U=t.bMarks[n]+t.tShift[n],ee=t.eMarks[n],V=n+1;if(t.sCount[n]-t.blkIndent>=4||t.src.charCodeAt(U)!==91)return!1;for(;++U<ee;)if(t.src.charCodeAt(U)===93&&t.src.charCodeAt(U-1)!==92){if(U+1===ee||t.src.charCodeAt(U+1)!==58)return!1;break}for(f=t.lineMax,N=t.md.block.ruler.getRules("reference"),k=t.parentType,t.parentType="reference";V<f&&!t.isEmpty(V);V++)if(!(t.sCount[V]-t.blkIndent>3)&&!(t.sCount[V]<0)){for(S=!1,y=0,g=N.length;y<g;y++)if(N[y](t,V,f,!0)){S=!0;break}if(S)break}for(I=t.getLines(n,V,t.blkIndent,!1).trim(),ee=I.length,U=1;U<ee;U++){if(d=I.charCodeAt(U),d===91)return!1;if(d===93){b=U;break}else d===10?j++:d===92&&(U++,U<ee&&I.charCodeAt(U)===10&&j++)}if(b<0||I.charCodeAt(b+1)!==58)return!1;for(U=b+2;U<ee;U++)if(d=I.charCodeAt(U),d===10)j++;else if(!Ma(d))break;if(E=t.md.helpers.parseLinkDestination(I,U,ee),!E.ok||(p=t.md.normalizeLink(E.str),!t.md.validateLink(p)))return!1;for(U=E.pos,j+=E.lines,o=U,h=j,w=U;U<ee;U++)if(d=I.charCodeAt(U),d===10)j++;else if(!Ma(d))break;for(E=t.md.helpers.parseLinkTitle(I,U,ee),U<ee&&w!==U&&E.ok?(O=E.str,U=E.pos,j+=E.lines):(O="",U=o,j=h);U<ee&&(d=I.charCodeAt(U),!!Ma(d));)U++;if(U<ee&&I.charCodeAt(U)!==10&&O)for(O="",U=o,j=h;U<ee&&(d=I.charCodeAt(U),!!Ma(d));)U++;return U<ee&&I.charCodeAt(U)!==10||(v=Cw(I.slice(1,b)),!v)?!1:(c||(typeof t.env.references=="undefined"&&(t.env.references={}),typeof t.env.references[v]=="undefined"&&(t.env.references[v]={title:O,href:p}),t.parentType=k,t.line=n+j+1),!0)}});var Bm=Me((E1,Nm)=>{"use strict";Nm.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","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var gl=Me((C1,ml)=>{"use strict";var Tw="[a-zA-Z_:][a-zA-Z0-9:._-]*",Aw="[^\"'=<>`\\x00-\\x20]+",Lw="'[^']*'",Dw='"[^"]*"',Iw="(?:"+Aw+"|"+Lw+"|"+Dw+")",Fw="(?:\\s+"+Tw+"(?:\\s*=\\s*"+Iw+")?)",qm="<[A-Za-z][A-Za-z0-9\\-]*"+Fw+"*\\s*\\/?>",$m="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Mw="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Ow="<[?][\\s\\S]*?[?]>",Pw="<![A-Z]+\\s+[^>]*>",Rw="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",zw=new RegExp("^(?:"+qm+"|"+$m+"|"+Mw+"|"+Ow+"|"+Pw+"|"+Rw+")"),Nw=new RegExp("^(?:"+qm+"|"+$m+")");ml.exports.HTML_TAG_RE=zw;ml.exports.HTML_OPEN_CLOSE_TAG_RE=Nw});var jm=Me((T1,Um)=>{"use strict";var Bw=Bm(),qw=gl().HTML_OPEN_CLOSE_TAG_RE,_i=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Bw.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(qw.source+"\\s*$"),/^$/,!1]];Um.exports=function(t,n,l,c){var d,o,h,f,p=t.bMarks[n]+t.tShift[n],y=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(p)!==60)return!1;for(f=t.src.slice(p,y),d=0;d<_i.length&&!_i[d][0].test(f);d++);if(d===_i.length)return!1;if(c)return _i[d][2];if(o=n+1,!_i[d][1].test(f)){for(;o<l&&!(t.sCount[o]<t.blkIndent);o++)if(p=t.bMarks[o]+t.tShift[o],y=t.eMarks[o],f=t.src.slice(p,y),_i[d][1].test(f)){f.length!==0&&o++;break}}return t.line=o,h=t.push("html_block","",0),h.map=[n,o],h.content=t.getLines(n,o,t.blkIndent,!0),!0}});var Gm=Me((A1,Wm)=>{"use strict";var Hm=Ft().isSpace;Wm.exports=function(t,n,l,c){var d,o,h,f,p=t.bMarks[n]+t.tShift[n],y=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||(d=t.src.charCodeAt(p),d!==35||p>=y))return!1;for(o=1,d=t.src.charCodeAt(++p);d===35&&p<y&&o<=6;)o++,d=t.src.charCodeAt(++p);return o>6||p<y&&!Hm(d)?!1:(c||(y=t.skipSpacesBack(y,p),h=t.skipCharsBack(y,35,p),h>p&&Hm(t.src.charCodeAt(h-1))&&(y=h),t.line=n+1,f=t.push("heading_open","h"+String(o),1),f.markup="########".slice(0,o),f.map=[n,t.line],f=t.push("inline","",0),f.content=t.src.slice(p,y).trim(),f.map=[n,t.line],f.children=[],f=t.push("heading_close","h"+String(o),-1),f.markup="########".slice(0,o)),!0)}});var Vm=Me((L1,Km)=>{"use strict";Km.exports=function(t,n,l){var c,d,o,h,f,p,y,g,v,b=n+1,k,E=t.md.block.ruler.getRules("paragraph");if(t.sCount[n]-t.blkIndent>=4)return!1;for(k=t.parentType,t.parentType="paragraph";b<l&&!t.isEmpty(b);b++)if(!(t.sCount[b]-t.blkIndent>3)){if(t.sCount[b]>=t.blkIndent&&(p=t.bMarks[b]+t.tShift[b],y=t.eMarks[b],p<y&&(v=t.src.charCodeAt(p),(v===45||v===61)&&(p=t.skipChars(p,v),p=t.skipSpaces(p),p>=y)))){g=v===61?1:2;break}if(!(t.sCount[b]<0)){for(d=!1,o=0,h=E.length;o<h;o++)if(E[o](t,b,l,!0)){d=!0;break}if(d)break}}return g?(c=t.getLines(n,b,t.blkIndent,!1).trim(),t.line=b+1,f=t.push("heading_open","h"+String(g),1),f.markup=String.fromCharCode(v),f.map=[n,t.line],f=t.push("inline","",0),f.content=c,f.map=[n,t.line-1],f.children=[],f=t.push("heading_close","h"+String(g),-1),f.markup=String.fromCharCode(v),t.parentType=k,!0):!1}});var Xm=Me((D1,Ym)=>{"use strict";Ym.exports=function(t,n){var l,c,d,o,h,f,p=n+1,y=t.md.block.ruler.getRules("paragraph"),g=t.lineMax;for(f=t.parentType,t.parentType="paragraph";p<g&&!t.isEmpty(p);p++)if(!(t.sCount[p]-t.blkIndent>3)&&!(t.sCount[p]<0)){for(c=!1,d=0,o=y.length;d<o;d++)if(y[d](t,p,g,!0)){c=!0;break}if(c)break}return l=t.getLines(n,p,t.blkIndent,!1).trim(),t.line=p,h=t.push("paragraph_open","p",1),h.map=[n,t.line],h=t.push("inline","",0),h.content=l,h.map=[n,t.line],h.children=[],h=t.push("paragraph_close","p",-1),t.parentType=f,!0}});var Jm=Me((I1,Qm)=>{"use strict";var Zm=Fa(),Oa=Ft().isSpace;function rn(i,t,n,l){var c,d,o,h,f,p,y,g;for(this.src=i,this.md=t,this.env=n,this.tokens=l,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="",d=this.src,g=!1,o=h=p=y=0,f=d.length;h<f;h++){if(c=d.charCodeAt(h),!g)if(Oa(c)){p++,c===9?y+=4-y%4:y++;continue}else g=!0;(c===10||h===f-1)&&(c!==10&&h++,this.bMarks.push(o),this.eMarks.push(h),this.tShift.push(p),this.sCount.push(y),this.bsCount.push(0),g=!1,p=0,y=0,o=h+1)}this.bMarks.push(d.length),this.eMarks.push(d.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}rn.prototype.push=function(i,t,n){var l=new Zm(i,t,n);return l.block=!0,n<0&&this.level--,l.level=this.level,n>0&&this.level++,this.tokens.push(l),l};rn.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};rn.prototype.skipEmptyLines=function(t){for(var n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};rn.prototype.skipSpaces=function(t){for(var n,l=this.src.length;t<l&&(n=this.src.charCodeAt(t),!!Oa(n));t++);return t};rn.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!Oa(this.src.charCodeAt(--t)))return t+1;return t};rn.prototype.skipChars=function(t,n){for(var l=this.src.length;t<l&&this.src.charCodeAt(t)===n;t++);return t};rn.prototype.skipCharsBack=function(t,n,l){if(t<=l)return t;for(;t>l;)if(n!==this.src.charCodeAt(--t))return t+1;return t};rn.prototype.getLines=function(t,n,l,c){var d,o,h,f,p,y,g,v=t;if(t>=n)return"";for(y=new Array(n-t),d=0;v<n;v++,d++){for(o=0,g=f=this.bMarks[v],v+1<n||c?p=this.eMarks[v]+1:p=this.eMarks[v];f<p&&o<l;){if(h=this.src.charCodeAt(f),Oa(h))h===9?o+=4-(o+this.bsCount[v])%4:o++;else if(f-g<this.tShift[v])o++;else break;f++}o>l?y[d]=new Array(o-l+1).join(" ")+this.src.slice(f,p):y[d]=this.src.slice(f,p)}return y.join("")};rn.prototype.Token=Zm;Qm.exports=rn});var tg=Me((F1,eg)=>{"use strict";var $w=Da(),Pa=[["table",wm(),["paragraph","reference"]],["code",_m()],["fence",Em(),["paragraph","reference","blockquote","list"]],["blockquote",Am(),["paragraph","reference","blockquote","list"]],["hr",Dm(),["paragraph","reference","blockquote","list"]],["list",Pm(),["paragraph","reference","blockquote"]],["reference",zm()],["html_block",jm(),["paragraph","reference","blockquote"]],["heading",Gm(),["paragraph","reference","blockquote"]],["lheading",Vm()],["paragraph",Xm()]];function Ra(){this.ruler=new $w;for(var i=0;i<Pa.length;i++)this.ruler.push(Pa[i][0],Pa[i][1],{alt:(Pa[i][2]||[]).slice()})}Ra.prototype.tokenize=function(i,t,n){for(var l,c,d=this.ruler.getRules(""),o=d.length,h=t,f=!1,p=i.md.options.maxNesting;h<n&&(i.line=h=i.skipEmptyLines(h),!(h>=n||i.sCount[h]<i.blkIndent));){if(i.level>=p){i.line=n;break}for(c=0;c<o&&(l=d[c](i,h,n,!1),!l);c++);i.tight=!f,i.isEmpty(i.line-1)&&(f=!0),h=i.line,h<n&&i.isEmpty(h)&&(f=!0,h++,i.line=h)}};Ra.prototype.parse=function(i,t,n,l){var c;!i||(c=new this.State(i,t,n,l),this.tokenize(c,c.line,c.lineMax))};Ra.prototype.State=Jm();eg.exports=Ra});var ng=Me((M1,rg)=>{"use strict";function Uw(i){switch(i){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}}rg.exports=function(t,n){for(var l=t.pos;l<t.posMax&&!Uw(t.src.charCodeAt(l));)l++;return l===t.pos?!1:(n||(t.pending+=t.src.slice(t.pos,l)),t.pos=l,!0)}});var og=Me((O1,ig)=>{"use strict";var jw=Ft().isSpace;ig.exports=function(t,n){var l,c,d,o=t.pos;if(t.src.charCodeAt(o)!==10)return!1;if(l=t.pending.length-1,c=t.posMax,!n)if(l>=0&&t.pending.charCodeAt(l)===32)if(l>=1&&t.pending.charCodeAt(l-1)===32){for(d=l-1;d>=1&&t.pending.charCodeAt(d-1)===32;)d--;t.pending=t.pending.slice(0,d),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(o++;o<c&&jw(t.src.charCodeAt(o));)o++;return t.pos=o,!0}});var sg=Me((P1,ag)=>{"use strict";var Hw=Ft().isSpace,vl=[];for(yl=0;yl<256;yl++)vl.push(0);var yl;"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(i){vl[i.charCodeAt(0)]=1});ag.exports=function(t,n){var l,c=t.pos,d=t.posMax;if(t.src.charCodeAt(c)!==92)return!1;if(c++,c<d){if(l=t.src.charCodeAt(c),l<256&&vl[l]!==0)return n||(t.pending+=t.src[c]),t.pos+=2,!0;if(l===10){for(n||t.push("hardbreak","br",0),c++;c<d&&(l=t.src.charCodeAt(c),!!Hw(l));)c++;return t.pos=c,!0}}return n||(t.pending+="\\"),t.pos++,!0}});var ug=Me((R1,lg)=>{"use strict";lg.exports=function(t,n){var l,c,d,o,h,f,p,y,g=t.pos,v=t.src.charCodeAt(g);if(v!==96)return!1;for(l=g,g++,c=t.posMax;g<c&&t.src.charCodeAt(g)===96;)g++;if(d=t.src.slice(l,g),p=d.length,t.backticksScanned&&(t.backticks[p]||0)<=l)return n||(t.pending+=d),t.pos+=p,!0;for(h=f=g;(h=t.src.indexOf("`",f))!==-1;){for(f=h+1;f<c&&t.src.charCodeAt(f)===96;)f++;if(y=f-h,y===p)return n||(o=t.push("code_inline","code",0),o.markup=d,o.content=t.src.slice(g,h).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=f,!0;t.backticks[y]=h}return t.backticksScanned=!0,n||(t.pending+=d),t.pos+=p,!0}});var xl=Me((z1,bl)=>{"use strict";bl.exports.tokenize=function(t,n){var l,c,d,o,h,f=t.pos,p=t.src.charCodeAt(f);if(n||p!==126||(c=t.scanDelims(t.pos,!0),o=c.length,h=String.fromCharCode(p),o<2))return!1;for(o%2&&(d=t.push("text","",0),d.content=h,o--),l=0;l<o;l+=2)d=t.push("text","",0),d.content=h+h,t.delimiters.push({marker:p,length:0,token:t.tokens.length-1,end:-1,open:c.can_open,close:c.can_close});return t.pos+=c.length,!0};function cg(i,t){var n,l,c,d,o,h=[],f=t.length;for(n=0;n<f;n++)c=t[n],c.marker===126&&c.end!==-1&&(d=t[c.end],o=i.tokens[c.token],o.type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",o=i.tokens[d.token],o.type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="",i.tokens[d.token-1].type==="text"&&i.tokens[d.token-1].content==="~"&&h.push(d.token-1));for(;h.length;){for(n=h.pop(),l=n+1;l<i.tokens.length&&i.tokens[l].type==="s_close";)l++;l--,n!==l&&(o=i.tokens[l],i.tokens[l]=i.tokens[n],i.tokens[n]=o)}}bl.exports.postProcess=function(t){var n,l=t.tokens_meta,c=t.tokens_meta.length;for(cg(t,t.delimiters),n=0;n<c;n++)l[n]&&l[n].delimiters&&cg(t,l[n].delimiters)}});var kl=Me((N1,wl)=>{"use strict";wl.exports.tokenize=function(t,n){var l,c,d,o=t.pos,h=t.src.charCodeAt(o);if(n||h!==95&&h!==42)return!1;for(c=t.scanDelims(t.pos,h===42),l=0;l<c.length;l++)d=t.push("text","",0),d.content=String.fromCharCode(h),t.delimiters.push({marker:h,length:c.length,token:t.tokens.length-1,end:-1,open:c.can_open,close:c.can_close});return t.pos+=c.length,!0};function fg(i,t){var n,l,c,d,o,h,f=t.length;for(n=f-1;n>=0;n--)l=t[n],!(l.marker!==95&&l.marker!==42)&&l.end!==-1&&(c=t[l.end],h=n>0&&t[n-1].end===l.end+1&&t[n-1].marker===l.marker&&t[n-1].token===l.token-1&&t[l.end+1].token===c.token+1,o=String.fromCharCode(l.marker),d=i.tokens[l.token],d.type=h?"strong_open":"em_open",d.tag=h?"strong":"em",d.nesting=1,d.markup=h?o+o:o,d.content="",d=i.tokens[c.token],d.type=h?"strong_close":"em_close",d.tag=h?"strong":"em",d.nesting=-1,d.markup=h?o+o:o,d.content="",h&&(i.tokens[t[n-1].token].content="",i.tokens[t[l.end+1].token].content="",n--))}wl.exports.postProcess=function(t){var n,l=t.tokens_meta,c=t.tokens_meta.length;for(fg(t,t.delimiters),n=0;n<c;n++)l[n]&&l[n].delimiters&&fg(t,l[n].delimiters)}});var hg=Me((B1,dg)=>{"use strict";var Ww=Ft().normalizeReference,_l=Ft().isSpace;dg.exports=function(t,n){var l,c,d,o,h,f,p,y,g,v="",b="",k=t.pos,E=t.posMax,w=t.pos,I=!0;if(t.src.charCodeAt(t.pos)!==91||(h=t.pos+1,o=t.md.helpers.parseLinkLabel(t,t.pos,!0),o<0))return!1;if(f=o+1,f<E&&t.src.charCodeAt(f)===40){for(I=!1,f++;f<E&&(c=t.src.charCodeAt(f),!(!_l(c)&&c!==10));f++);if(f>=E)return!1;if(w=f,p=t.md.helpers.parseLinkDestination(t.src,f,t.posMax),p.ok){for(v=t.md.normalizeLink(p.str),t.md.validateLink(v)?f=p.pos:v="",w=f;f<E&&(c=t.src.charCodeAt(f),!(!_l(c)&&c!==10));f++);if(p=t.md.helpers.parseLinkTitle(t.src,f,t.posMax),f<E&&w!==f&&p.ok)for(b=p.str,f=p.pos;f<E&&(c=t.src.charCodeAt(f),!(!_l(c)&&c!==10));f++);}(f>=E||t.src.charCodeAt(f)!==41)&&(I=!0),f++}if(I){if(typeof t.env.references=="undefined")return!1;if(f<E&&t.src.charCodeAt(f)===91?(w=f+1,f=t.md.helpers.parseLinkLabel(t,f),f>=0?d=t.src.slice(w,f++):f=o+1):f=o+1,d||(d=t.src.slice(h,o)),y=t.env.references[Ww(d)],!y)return t.pos=k,!1;v=y.href,b=y.title}return n||(t.pos=h,t.posMax=o,g=t.push("link_open","a",1),g.attrs=l=[["href",v]],b&&l.push(["title",b]),t.md.inline.tokenize(t),g=t.push("link_close","a",-1)),t.pos=f,t.posMax=E,!0}});var mg=Me((q1,pg)=>{"use strict";var Gw=Ft().normalizeReference,Sl=Ft().isSpace;pg.exports=function(t,n){var l,c,d,o,h,f,p,y,g,v,b,k,E,w="",I=t.pos,S=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91||(f=t.pos+2,h=t.md.helpers.parseLinkLabel(t,t.pos+1,!1),h<0))return!1;if(p=h+1,p<S&&t.src.charCodeAt(p)===40){for(p++;p<S&&(c=t.src.charCodeAt(p),!(!Sl(c)&&c!==10));p++);if(p>=S)return!1;for(E=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=""),E=p;p<S&&(c=t.src.charCodeAt(p),!(!Sl(c)&&c!==10));p++);if(g=t.md.helpers.parseLinkTitle(t.src,p,t.posMax),p<S&&E!==p&&g.ok)for(v=g.str,p=g.pos;p<S&&(c=t.src.charCodeAt(p),!(!Sl(c)&&c!==10));p++);else v="";if(p>=S||t.src.charCodeAt(p)!==41)return t.pos=I,!1;p++}else{if(typeof t.env.references=="undefined")return!1;if(p<S&&t.src.charCodeAt(p)===91?(E=p+1,p=t.md.helpers.parseLinkLabel(t,p),p>=0?o=t.src.slice(E,p++):p=h+1):p=h+1,o||(o=t.src.slice(f,h)),y=t.env.references[Gw(o)],!y)return t.pos=I,!1;w=y.href,v=y.title}return n||(d=t.src.slice(f,h),t.md.inline.parse(d,t.md,t.env,k=[]),b=t.push("image","img",0),b.attrs=l=[["src",w],["alt",""]],b.children=k,b.content=d,v&&l.push(["title",v])),t.pos=p,t.posMax=S,!0}});var vg=Me(($1,gg)=>{"use strict";var Kw=/^([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])?)*)$/,Vw=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;gg.exports=function(t,n){var l,c,d,o,h,f,p=t.pos;if(t.src.charCodeAt(p)!==60)return!1;for(h=t.pos,f=t.posMax;;){if(++p>=f||(o=t.src.charCodeAt(p),o===60))return!1;if(o===62)break}return l=t.src.slice(h+1,p),Vw.test(l)?(c=t.md.normalizeLink(l),t.md.validateLink(c)?(n||(d=t.push("link_open","a",1),d.attrs=[["href",c]],d.markup="autolink",d.info="auto",d=t.push("text","",0),d.content=t.md.normalizeLinkText(l),d=t.push("link_close","a",-1),d.markup="autolink",d.info="auto"),t.pos+=l.length+2,!0):!1):Kw.test(l)?(c=t.md.normalizeLink("mailto:"+l),t.md.validateLink(c)?(n||(d=t.push("link_open","a",1),d.attrs=[["href",c]],d.markup="autolink",d.info="auto",d=t.push("text","",0),d.content=t.md.normalizeLinkText(l),d=t.push("link_close","a",-1),d.markup="autolink",d.info="auto"),t.pos+=l.length+2,!0):!1):!1}});var bg=Me((U1,yg)=>{"use strict";var Yw=gl().HTML_TAG_RE;function Xw(i){var t=i|32;return t>=97&&t<=122}yg.exports=function(t,n){var l,c,d,o,h=t.pos;return!t.md.options.html||(d=t.posMax,t.src.charCodeAt(h)!==60||h+2>=d)||(l=t.src.charCodeAt(h+1),l!==33&&l!==63&&l!==47&&!Xw(l))||(c=t.src.slice(h).match(Yw),!c)?!1:(n||(o=t.push("html_inline","",0),o.content=t.src.slice(h,h+c[0].length)),t.pos+=c[0].length,!0)}});var _g=Me((j1,kg)=>{"use strict";var xg=al(),Zw=Ft().has,Qw=Ft().isValidEntityCode,wg=Ft().fromCodePoint,Jw=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ek=/^&([a-z][a-z0-9]{1,31});/i;kg.exports=function(t,n){var l,c,d,o=t.pos,h=t.posMax;if(t.src.charCodeAt(o)!==38)return!1;if(o+1<h){if(l=t.src.charCodeAt(o+1),l===35){if(d=t.src.slice(o).match(Jw),d)return n||(c=d[1][0].toLowerCase()==="x"?parseInt(d[1].slice(1),16):parseInt(d[1],10),t.pending+=Qw(c)?wg(c):wg(65533)),t.pos+=d[0].length,!0}else if(d=t.src.slice(o).match(ek),d&&Zw(xg,d[1]))return n||(t.pending+=xg[d[1]]),t.pos+=d[0].length,!0}return n||(t.pending+="&"),t.pos++,!0}});var Cg=Me((H1,Eg)=>{"use strict";function Sg(i,t){var n,l,c,d,o,h,f,p,y={},g=t.length;if(!!g){var v=0,b=-2,k=[];for(n=0;n<g;n++)if(c=t[n],k.push(0),(t[v].marker!==c.marker||b!==c.token-1)&&(v=n),b=c.token,c.length=c.length||0,!!c.close){for(y.hasOwnProperty(c.marker)||(y[c.marker]=[-1,-1,-1,-1,-1,-1]),o=y[c.marker][(c.open?3:0)+c.length%3],l=v-k[v]-1,h=l;l>o;l-=k[l]+1)if(d=t[l],d.marker===c.marker&&d.open&&d.end<0&&(f=!1,(d.close||c.open)&&(d.length+c.length)%3===0&&(d.length%3!==0||c.length%3!==0)&&(f=!0),!f)){p=l>0&&!t[l-1].open?k[l-1]+1:0,k[n]=n-l+p,k[l]=p,c.open=!1,d.end=n,d.close=!1,h=-1,b=-2;break}h!==-1&&(y[c.marker][(c.open?3:0)+(c.length||0)%3]=h)}}}Eg.exports=function(t){var n,l=t.tokens_meta,c=t.tokens_meta.length;for(Sg(t,t.delimiters),n=0;n<c;n++)l[n]&&l[n].delimiters&&Sg(t,l[n].delimiters)}});var Ag=Me((W1,Tg)=>{"use strict";Tg.exports=function(t){var n,l,c=0,d=t.tokens,o=t.tokens.length;for(n=l=0;n<o;n++)d[n].nesting<0&&c--,d[n].level=c,d[n].nesting>0&&c++,d[n].type==="text"&&n+1<o&&d[n+1].type==="text"?d[n+1].content=d[n].content+d[n+1].content:(n!==l&&(d[l]=d[n]),l++);n!==l&&(d.length=l)}});var Mg=Me((G1,Fg)=>{"use strict";var El=Fa(),Lg=Ft().isWhiteSpace,Dg=Ft().isPunctChar,Ig=Ft().isMdAsciiPunct;function go(i,t,n,l){this.src=i,this.env=n,this.md=t,this.tokens=l,this.tokens_meta=Array(l.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}go.prototype.pushPending=function(){var i=new El("text","",0);return i.content=this.pending,i.level=this.pendingLevel,this.tokens.push(i),this.pending="",i};go.prototype.push=function(i,t,n){this.pending&&this.pushPending();var l=new El(i,t,n),c=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),l.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],c={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(l),this.tokens_meta.push(c),l};go.prototype.scanDelims=function(i,t){var n=i,l,c,d,o,h,f,p,y,g,v=!0,b=!0,k=this.posMax,E=this.src.charCodeAt(i);for(l=i>0?this.src.charCodeAt(i-1):32;n<k&&this.src.charCodeAt(n)===E;)n++;return d=n-i,c=n<k?this.src.charCodeAt(n):32,p=Ig(l)||Dg(String.fromCharCode(l)),g=Ig(c)||Dg(String.fromCharCode(c)),f=Lg(l),y=Lg(c),y?v=!1:g&&(f||p||(v=!1)),f?b=!1:p&&(y||g||(b=!1)),t?(o=v,h=b):(o=v&&(!b||p),h=b&&(!v||g)),{can_open:o,can_close:h,length:d}};go.prototype.Token=El;Fg.exports=go});var Rg=Me((K1,Pg)=>{"use strict";var Og=Da(),Cl=[["text",ng()],["newline",og()],["escape",sg()],["backticks",ug()],["strikethrough",xl().tokenize],["emphasis",kl().tokenize],["link",hg()],["image",mg()],["autolink",vg()],["html_inline",bg()],["entity",_g()]],Tl=[["balance_pairs",Cg()],["strikethrough",xl().postProcess],["emphasis",kl().postProcess],["text_collapse",Ag()]];function vo(){var i;for(this.ruler=new Og,i=0;i<Cl.length;i++)this.ruler.push(Cl[i][0],Cl[i][1]);for(this.ruler2=new Og,i=0;i<Tl.length;i++)this.ruler2.push(Tl[i][0],Tl[i][1])}vo.prototype.skipToken=function(i){var t,n,l=i.pos,c=this.ruler.getRules(""),d=c.length,o=i.md.options.maxNesting,h=i.cache;if(typeof h[l]!="undefined"){i.pos=h[l];return}if(i.level<o)for(n=0;n<d&&(i.level++,t=c[n](i,!0),i.level--,!t);n++);else i.pos=i.posMax;t||i.pos++,h[l]=i.pos};vo.prototype.tokenize=function(i){for(var t,n,l=this.ruler.getRules(""),c=l.length,d=i.posMax,o=i.md.options.maxNesting;i.pos<d;){if(i.level<o)for(n=0;n<c&&(t=l[n](i,!1),!t);n++);if(t){if(i.pos>=d)break;continue}i.pending+=i.src[i.pos++]}i.pending&&i.pushPending()};vo.prototype.parse=function(i,t,n,l){var c,d,o,h=new this.State(i,t,n,l);for(this.tokenize(h),d=this.ruler2.getRules(""),o=d.length,c=0;c<o;c++)d[c](h)};vo.prototype.State=Mg();Pg.exports=vo});var Ng=Me((V1,zg)=>{"use strict";zg.exports=function(i){var t={};t.src_Any=ll().source,t.src_Cc=ul().source,t.src_Z=cl().source,t.src_P=Ea().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 n="[><\uFF5C]";return t.src_pseudo_letter="(?:(?!"+n+"|"+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="(?=$|"+n+"|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+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+"|[.]).|"+(i&&i["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+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="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+t.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}});var Hg=Me((Y1,jg)=>{"use strict";function Al(i){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){!n||Object.keys(n).forEach(function(l){i[l]=n[l]})}),i}function za(i){return Object.prototype.toString.call(i)}function tk(i){return za(i)==="[object String]"}function rk(i){return za(i)==="[object Object]"}function nk(i){return za(i)==="[object RegExp]"}function Bg(i){return za(i)==="[object Function]"}function ik(i){return i.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var qg={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function ok(i){return Object.keys(i||{}).reduce(function(t,n){return t||qg.hasOwnProperty(n)},!1)}var ak={"http:":{validate:function(i,t,n){var l=i.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(l)?l.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(i,t,n){var l=i.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(l)?t>=3&&i[t-3]===":"||t>=3&&i[t-3]==="/"?0:l.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(i,t,n){var l=i.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(l)?l.match(n.re.mailto)[0].length:0}}},sk="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]",lk="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function uk(i){i.__index__=-1,i.__text_cache__=""}function ck(i){return function(t,n){var l=t.slice(n);return i.test(l)?l.match(i)[0].length:0}}function $g(){return function(i,t){t.normalize(i)}}function Na(i){var t=i.re=Ng()(i.__opts__),n=i.__tlds__.slice();i.onCompile(),i.__tlds_replaced__||n.push(sk),n.push(t.src_xn),t.src_tlds=n.join("|");function l(h){return h.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var c=[];i.__compiled__={};function d(h,f){throw new Error('(LinkifyIt) Invalid schema "'+h+'": '+f)}Object.keys(i.__schemas__).forEach(function(h){var f=i.__schemas__[h];if(f!==null){var p={validate:null,link:null};if(i.__compiled__[h]=p,rk(f)){nk(f.validate)?p.validate=ck(f.validate):Bg(f.validate)?p.validate=f.validate:d(h,f),Bg(f.normalize)?p.normalize=f.normalize:f.normalize?d(h,f):p.normalize=$g();return}if(tk(f)){c.push(h);return}d(h,f)}}),c.forEach(function(h){!i.__compiled__[i.__schemas__[h]]||(i.__compiled__[h].validate=i.__compiled__[i.__schemas__[h]].validate,i.__compiled__[h].normalize=i.__compiled__[i.__schemas__[h]].normalize)}),i.__compiled__[""]={validate:null,normalize:$g()};var o=Object.keys(i.__compiled__).filter(function(h){return h.length>0&&i.__compiled__[h]}).map(ik).join("|");i.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+o+")","i"),i.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+t.src_ZPCc+"))("+o+")","ig"),i.re.pretest=RegExp("("+i.re.schema_test.source+")|("+i.re.host_fuzzy_test.source+")|@","i"),uk(i)}function fk(i,t){var n=i.__index__,l=i.__last_index__,c=i.__text_cache__.slice(n,l);this.schema=i.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=l+t,this.raw=c,this.text=c,this.url=c}function Ug(i,t){var n=new fk(i,t);return i.__compiled__[n.schema].normalize(n,i),n}function Br(i,t){if(!(this instanceof Br))return new Br(i,t);t||ok(i)&&(t=i,i={}),this.__opts__=Al({},qg,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Al({},ak,i),this.__compiled__={},this.__tlds__=lk,this.__tlds_replaced__=!1,this.re={},Na(this)}Br.prototype.add=function(t,n){return this.__schemas__[t]=n,Na(this),this};Br.prototype.set=function(t){return this.__opts__=Al(this.__opts__,t),this};Br.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var n,l,c,d,o,h,f,p,y;if(this.re.schema_test.test(t)){for(f=this.re.schema_search,f.lastIndex=0;(n=f.exec(t))!==null;)if(d=this.testSchemaAt(t,n[2],f.lastIndex),d){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+d;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(p=t.search(this.re.host_fuzzy_test),p>=0&&(this.__index__<0||p<this.__index__)&&(l=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(o=l.index+l[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=l.index+l[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(y=t.indexOf("@"),y>=0&&(c=t.match(this.re.email_fuzzy))!==null&&(o=c.index+c[1].length,h=c.index+c[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&h>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=h))),this.__index__>=0};Br.prototype.pretest=function(t){return this.re.pretest.test(t)};Br.prototype.testSchemaAt=function(t,n,l){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,l,this):0};Br.prototype.match=function(t){var n=0,l=[];this.__index__>=0&&this.__text_cache__===t&&(l.push(Ug(this,n)),n=this.__last_index__);for(var c=n?t.slice(n):t;this.test(c);)l.push(Ug(this,n)),c=c.slice(this.__last_index__),n+=this.__last_index__;return l.length?l:null};Br.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(l,c,d){return l!==d[c-1]}).reverse(),Na(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Na(this),this)};Br.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Br.prototype.onCompile=function(){};jg.exports=Br});var ev={};Dx(ev,{decode:()=>Ml,default:()=>wk,encode:()=>Ol,toASCII:()=>Jg,toUnicode:()=>Qg,ucs2decode:()=>Fl,ucs2encode:()=>Yg});function jn(i){throw new RangeError(vk[i])}function yk(i,t){let n=[],l=i.length;for(;l--;)n[l]=t(i[l]);return n}function Vg(i,t){let n=i.split("@"),l="";n.length>1&&(l=n[0]+"@",i=n[1]),i=i.replace(gk,".");let c=i.split("."),d=yk(c,t).join(".");return l+d}function Fl(i){let t=[],n=0,l=i.length;for(;n<l;){let c=i.charCodeAt(n++);if(c>=55296&&c<=56319&&n<l){let d=i.charCodeAt(n++);(d&64512)==56320?t.push(((c&1023)<<10)+(d&1023)+65536):(t.push(c),n--)}else t.push(c)}return t}var Si,nn,Ll,yo,dk,hk,Wg,Gg,Kg,pk,mk,gk,vk,Dl,on,Il,Yg,bk,Xg,Zg,Ml,Ol,Qg,Jg,xk,wk,tv=Lx(()=>{"use strict";Si=2147483647,nn=36,Ll=1,yo=26,dk=38,hk=700,Wg=72,Gg=128,Kg="-",pk=/^xn--/,mk=/[^\0-\x7E]/,gk=/[\x2E\u3002\uFF0E\uFF61]/g,vk={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Dl=nn-Ll,on=Math.floor,Il=String.fromCharCode;Yg=i=>String.fromCodePoint(...i),bk=function(i){return i-48<10?i-22:i-65<26?i-65:i-97<26?i-97:nn},Xg=function(i,t){return i+22+75*(i<26)-((t!=0)<<5)},Zg=function(i,t,n){let l=0;for(i=n?on(i/hk):i>>1,i+=on(i/t);i>Dl*yo>>1;l+=nn)i=on(i/Dl);return on(l+(Dl+1)*i/(i+dk))},Ml=function(i){let t=[],n=i.length,l=0,c=Gg,d=Wg,o=i.lastIndexOf(Kg);o<0&&(o=0);for(let h=0;h<o;++h)i.charCodeAt(h)>=128&&jn("not-basic"),t.push(i.charCodeAt(h));for(let h=o>0?o+1:0;h<n;){let f=l;for(let y=1,g=nn;;g+=nn){h>=n&&jn("invalid-input");let v=bk(i.charCodeAt(h++));(v>=nn||v>on((Si-l)/y))&&jn("overflow"),l+=v*y;let b=g<=d?Ll:g>=d+yo?yo:g-d;if(v<b)break;let k=nn-b;y>on(Si/k)&&jn("overflow"),y*=k}let p=t.length+1;d=Zg(l-f,p,f==0),on(l/p)>Si-c&&jn("overflow"),c+=on(l/p),l%=p,t.splice(l++,0,c)}return String.fromCodePoint(...t)},Ol=function(i){let t=[];i=Fl(i);let n=i.length,l=Gg,c=0,d=Wg;for(let f of i)f<128&&t.push(Il(f));let o=t.length,h=o;for(o&&t.push(Kg);h<n;){let f=Si;for(let y of i)y>=l&&y<f&&(f=y);let p=h+1;f-l>on((Si-c)/p)&&jn("overflow"),c+=(f-l)*p,l=f;for(let y of i)if(y<l&&++c>Si&&jn("overflow"),y==l){let g=c;for(let v=nn;;v+=nn){let b=v<=d?Ll:v>=d+yo?yo:v-d;if(g<b)break;let k=g-b,E=nn-b;t.push(Il(Xg(b+k%E,0))),g=on(k/E)}t.push(Il(Xg(g,0))),d=Zg(c,p,h==o),c=0,++h}++c,++l}return t.join("")},Qg=function(i){return Vg(i,function(t){return pk.test(t)?Ml(t.slice(4).toLowerCase()):t})},Jg=function(i){return Vg(i,function(t){return mk.test(t)?"xn--"+Ol(t):t})},xk={version:"2.1.0",ucs2:{decode:Fl,encode:Yg},decode:Ml,encode:Ol,toASCII:Jg,toUnicode:Qg},wk=xk});var nv=Me((X1,rv)=>{"use strict";rv.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}});var ov=Me((Z1,iv)=>{"use strict";iv.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}});var sv=Me((Q1,av)=>{"use strict";av.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",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 fv=Me((J1,cv)=>{"use strict";var bo=Ft(),kk=Wp(),_k=Kp(),Sk=ym(),Ek=tg(),Ck=Rg(),Tk=Hg(),Hn=sl(),lv=(tv(),Ix(ev)),Ak={default:nv(),zero:ov(),commonmark:sv()},Lk=/^(vbscript|javascript|file|data):/,Dk=/^data:image\/(gif|png|jpeg|webp);/;function Ik(i){var t=i.trim().toLowerCase();return Lk.test(t)?!!Dk.test(t):!0}var uv=["http:","https:","mailto:"];function Fk(i){var t=Hn.parse(i,!0);if(t.hostname&&(!t.protocol||uv.indexOf(t.protocol)>=0))try{t.hostname=lv.toASCII(t.hostname)}catch{}return Hn.encode(Hn.format(t))}function Mk(i){var t=Hn.parse(i,!0);if(t.hostname&&(!t.protocol||uv.indexOf(t.protocol)>=0))try{t.hostname=lv.toUnicode(t.hostname)}catch{}return Hn.decode(Hn.format(t),Hn.decode.defaultChars+"%")}function qr(i,t){if(!(this instanceof qr))return new qr(i,t);t||bo.isString(i)||(t=i||{},i="default"),this.inline=new Ck,this.block=new Ek,this.core=new Sk,this.renderer=new _k,this.linkify=new Tk,this.validateLink=Ik,this.normalizeLink=Fk,this.normalizeLinkText=Mk,this.utils=bo,this.helpers=bo.assign({},kk),this.options={},this.configure(i),t&&this.set(t)}qr.prototype.set=function(i){return bo.assign(this.options,i),this};qr.prototype.configure=function(i){var t=this,n;if(bo.isString(i)&&(n=i,i=Ak[n],!i))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!i)throw new Error("Wrong `markdown-it` preset, can't be empty");return i.options&&t.set(i.options),i.components&&Object.keys(i.components).forEach(function(l){i.components[l].rules&&t[l].ruler.enableOnly(i.components[l].rules),i.components[l].rules2&&t[l].ruler2.enableOnly(i.components[l].rules2)}),this};qr.prototype.enable=function(i,t){var n=[];Array.isArray(i)||(i=[i]),["core","block","inline"].forEach(function(c){n=n.concat(this[c].ruler.enable(i,!0))},this),n=n.concat(this.inline.ruler2.enable(i,!0));var l=i.filter(function(c){return n.indexOf(c)<0});if(l.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+l);return this};qr.prototype.disable=function(i,t){var n=[];Array.isArray(i)||(i=[i]),["core","block","inline"].forEach(function(c){n=n.concat(this[c].ruler.disable(i,!0))},this),n=n.concat(this.inline.ruler2.disable(i,!0));var l=i.filter(function(c){return n.indexOf(c)<0});if(l.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+l);return this};qr.prototype.use=function(i){var t=[this].concat(Array.prototype.slice.call(arguments,1));return i.apply(i,t),this};qr.prototype.parse=function(i,t){if(typeof i!="string")throw new Error("Input data should be a String");var n=new this.core.State(i,this,t);return this.core.process(n),n.tokens};qr.prototype.render=function(i,t){return t=t||{},this.renderer.render(this.parse(i,t),this.options,t)};qr.prototype.parseInline=function(i,t){var n=new this.core.State(i,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};qr.prototype.renderInline=function(i,t){return t=t||{},this.renderer.render(this.parseInline(i,t),this.options,t)};cv.exports=qr});var hv=Me((eE,dv)=>{"use strict";dv.exports=fv()});var yv=Me((tE,vv)=>{var Pl=!0,pv=!1,mv=!1;vv.exports=function(i,t){t&&(Pl=!t.enabled,pv=!!t.label,mv=!!t.labelAfter),i.core.ruler.after("inline","github-task-lists",function(n){for(var l=n.tokens,c=2;c<l.length;c++)Pk(l,c)&&(Rk(l[c],n.Token),gv(l[c-2],"class","task-list-item"+(Pl?"":" enabled")),gv(l[Ok(l,c-2)],"class","contains-task-list"))})};function gv(i,t,n){var l=i.attrIndex(t),c=[t,n];l<0?i.attrPush(c):i.attrs[l]=c}function Ok(i,t){for(var n=i[t].level-1,l=t-1;l>=0;l--)if(i[l].level===n)return l;return-1}function Pk(i,t){return $k(i[t])&&Uk(i[t-1])&&jk(i[t-2])&&Hk(i[t])}function Rk(i,t){if(i.children.unshift(zk(i,t)),i.children[1].content=i.children[1].content.slice(3),i.content=i.content.slice(3),pv)if(mv){i.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);i.children[0].content=i.children[0].content.slice(0,-1)+' id="'+n+'">',i.children.push(qk(i.content,n,t))}else i.children.unshift(Nk(t)),i.children.push(Bk(t))}function zk(i,t){var n=new t("html_inline","",0),l=Pl?' disabled="" ':"";return i.content.indexOf("[ ] ")===0?n.content='<input class="task-list-item-checkbox"'+l+'type="checkbox">':(i.content.indexOf("[x] ")===0||i.content.indexOf("[X] ")===0)&&(n.content='<input class="task-list-item-checkbox" checked=""'+l+'type="checkbox">'),n}function Nk(i){var t=new i("html_inline","",0);return t.content="<label>",t}function Bk(i){var t=new i("html_inline","",0);return t.content="</label>",t}function qk(i,t,n){var l=new n("html_inline","",0);return l.content='<label class="task-list-item-label" for="'+t+'">'+i+"</label>",l.attrs=[{for:t}],l}function $k(i){return i.type==="inline"}function Uk(i){return i.type==="paragraph_open"}function jk(i){return i.type==="list_item_open"}function Hk(i){return i.content.indexOf("[ ] ")===0||i.content.indexOf("[x] ")===0||i.content.indexOf("[X] ")===0}});var Ji={},Fx=[];function Zo(i,t){if(Fx.push({name:i,data:t}),typeof Ji[i]=="undefined")return this;let n=Ji[i];for(let l=0;l<n.length;l++)n[l](t)}function Mx(i,t){typeof Ji[i]=="undefined"&&(Ji[i]=[]),Ji[i].push(t)}function Ox(i,t,n){let l=new CustomEvent(t,{detail:n,bubbles:!0});i.dispatchEvent(l)}function Px(i){if(!!i.status&&i.status===422&&i.data){let t=Object.values(i.data).flat().join(`
`);Zo("error",t)}}var Bc={emit:Zo,emitPublic:Ox,listen:Mx,success:i=>Zo("success",i),error:i=>Zo("error",i),showValidationErrors:Px};async function Rx(i,t={}){return qc(i,{method:"GET",params:t})}async function zx(i,t=null){return Qo("POST",i,t)}async function Nx(i,t=null){return Qo("PUT",i,t)}async function Bx(i,t=null){return Qo("PATCH",i,t)}async function qx(i,t=null){return Qo("DELETE",i,t)}async function Qo(i,t,n=null){let l={method:i,body:n};return typeof n=="object"&&!(n instanceof FormData)&&(l.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},l.body=JSON.stringify(n)),n instanceof FormData&&i!=="post"&&(n.append("_method",i),l.method="post"),qc(t,l)}async function qc(i,t={}){if(i.startsWith("http")||(i=window.baseUrl(i)),t.params){let o=new URL(i);for(let h of Object.keys(t.params)){let f=t.params[h];typeof f!="undefined"&&f!==null&&o.searchParams.set(h,f)}i=o.toString()}let n=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":n});let l=await fetch(i,t),d={data:await $x(l),headers:l.headers,redirected:l.redirected,status:l.status,statusText:l.statusText,url:l.url,original:l};if(!l.ok)throw d;return d}async function $x(i){if(i.status===204)return null;let n=(i.headers.get("Content-Type")||"").split(";")[0].split("/").pop();return n==="javascript"||n==="json"?await i.json():await i.text()}var $c={get:Rx,post:zx,put:Nx,patch:Bx,delete:qx};var Uc=class{constructor(t){this.store=new Map,this.parseTranslations()}parseTranslations(){let t=document.querySelectorAll('meta[name="translation"]');for(let n of t){let l=n.getAttribute("key"),c=n.getAttribute("value");this.store.set(l,c)}}get(t,n){let l=this.getTransText(t);return this.performReplacements(l,n)}getPlural(t,n,l){let c=this.getTransText(t);return this.parsePlural(c,n,l)}parsePlural(t,n,l){let c=t.split("|"),d=/^{([0-9]+)}/,o=/^\[([0-9]+),([0-9*]+)]/,h=null;for(let f of c){let p=f.match(d);if(p!==null&&Number(p[1])===n){h=f.replace(d,"").trim();break}let y=f.match(o);if(y!==null&&Number(y[1])<=n&&(y[2]==="*"||Number(y[2])>=n)){h=f.replace(o,"").trim();break}}return h===null&&c.length>1&&(h=n===1?c[0]:c[1]),h===null&&(h=c[0]),this.performReplacements(h,l)}getTransText(t){let 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;let l=t.match(/:([\S]+)/g);return l===null||l.forEach(c=>{let d=c.substring(1);typeof n[d]!="undefined"&&(t=t.replace(c,n[d]))}),t}},jc=Uc;function Jo(i,t){let n=document.querySelectorAll(i);for(let l of n)t(l)}function ea(i,t,n){for(let l of t)i.addEventListener(l,n)}function Rt(i,t){Array.isArray(i)||(i=[i]);for(let n of i)n.addEventListener("click",t),n.addEventListener("keydown",l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),t(l))})}function ta(i,t){Array.isArray(i)||(i=[i]);let n=l=>{l.key==="Enter"&&t(l)};i.forEach(l=>l.addEventListener("keypress",n))}function jt(i,t,n,l){i.addEventListener(n,function(c){let d=c.target.closest(t);d&&l.call(d,c,d)})}function Hc(i,t){let n=document.querySelectorAll(i);t=t.toLowerCase();for(let l of n)if(l.textContent.toLowerCase().includes(t))return l;return null}function eo(i){i.innerHTML='<div class="loading-container"><div></div><div></div><div></div></div>'}function Wc(i){let t=i.querySelectorAll(".loading-container");for(let n of t)n.remove()}function to(i,t,n){let l;return function(){let c=this,d=arguments,o=function(){l=null,n||i.apply(c,d)},h=n&&!l;clearTimeout(l),l=setTimeout(o,t),h&&i.apply(c,d)}}function ro(i){if(!i)return;i.scrollIntoView({behavior:"smooth"});let t=document.getElementById("custom-styles").getAttribute("data-color-light"),n=window.getComputedStyle(i).getPropertyValue("background-color");i.style.backgroundColor=t,setTimeout(()=>{i.classList.add("selectFade"),i.style.backgroundColor=n},10),setTimeout(()=>{i.classList.remove("selectFade"),i.style.backgroundColor=""},3e3)}function Kc(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Vc(){let i=()=>((1+Math.random())*65536|0).toString(16).substring(1);return i()+i()+"-"+i()+"-"+i()+"-"+i()+"-"+i()+i()+i()}var Yc=class{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)),jt(this.$el,this.removeSelector,"click",t=>{t.target.closest(this.rowSelector).remove()})}add(){let 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){let n=Vc(),l=t.querySelectorAll('[name*="randrowid"]');for(let c of l)c.name=c.name.split("randrowid").join(n)}},Xc=Yc;var Zc=class{setup(){this.row=this.$el,this.url=this.$opts.url,this.deleteButtons=this.$manyRefs.delete,Rt(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})}},Qc=Zc;var Jc=class{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}ta(this.container,t=>{this.submitFakeForm(),t.preventDefault()}),this.submitButtons.forEach(t=>Rt(t,this.submitFakeForm.bind(this)))}submitFakeForm(){let t=new FormData,n=this.container.querySelectorAll("[name]");for(let l of n)t.append(l.getAttribute("name"),l.value);this.submit(t)}submitRealForm(t){t.preventDefault();let n=new FormData(this.container);this.submit(n)}async submit(t){this.responseContainer.style.opacity="0.7",this.responseContainer.style.pointerEvents="none";try{let 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}},ef=Jc;var tf=class{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(){let 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=>{let l=n.target.closest("[data-drag-content]").getAttribute("data-drag-content"),c=JSON.parse(l);window.$events.emit("editor::insert",{html:c["text/html"],markdown:c["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"),eo(this.editContainer);let 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")}},rf=tf;var nf=class{setup(){this.container=this.$el,this.setupListeners()}setupListeners(){let t=n=>n.key==="Control"||n.key==="Meta";window.addEventListener("keydown",n=>{t(n)&&this.addOpenQueryToLinks()},{passive:!0}),window.addEventListener("keyup",n=>{t(n)&&this.removeOpenQueryFromLinks()},{passive:!0})}addOpenQueryToLinks(){let t=this.container.querySelectorAll("a.attachment-file");for(let n of t)n.href.split("?")[1]!=="open=true"&&(n.href=n.href+"?open=true",n.setAttribute("target","_blank"))}removeOpenQueryFromLinks(){let t=this.container.querySelectorAll("a.attachment-file");for(let n of t)n.href=n.href.split("?")[0],n.removeAttribute("target")}},of=nf;var Ms={},af=class{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)),jt(this.list,"button","click",(t,n)=>{this.selectSuggestion(n.textContent)}),jt(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){t.key==="Enter"&&t.preventDefault(),!this.list.classList.contains("hidden")&&(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){let n=Array.from(this.container.querySelectorAll("input,button")),l=n.indexOf(document.activeElement),c=n[l+(t?1:-1)];c&&c.focus()}async requestSuggestions(){if(Date.now()-this.lastPopulated<50)return;let t=this.getNameFilterIfNeeded(),n=this.input.value.slice(0,3).toLowerCase(),l=await this.loadSuggestions(n,t),c=l.slice(0,6);n.length>0&&(c=l.filter(d=>d.toLowerCase().includes(n)).slice(0,6)),this.displaySuggestions(c)}getNameFilterIfNeeded(){return this.type!=="value"?null:this.parent.querySelector("input").value}async loadSuggestions(t,n=null){let l={search:t,name:n},c=`${this.url}:${JSON.stringify(l)}`;if(Ms[c])return Ms[c];let d=await window.$http.get(this.url,l);return Ms[c]=d.data,d.data}displaySuggestions(t){if(t.length===0)return this.hideSuggestions();this.list.innerHTML=t.map(n=>`<li><button type="button">${Kc(n)}</button></li>`).join(""),this.list.style.display="block";for(let 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()}},sf=af;var lf=class{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.breakPoint&&(this.elem.style.opacity=0,this.showing=!1,setTimeout(()=>{this.elem.style.display="none"},500))}scrollToTop(){let t=this.targetElem.getBoundingClientRect().top,n=document.documentElement.scrollTop?document.documentElement:document.body,l=300,c=Date.now(),d=this.targetElem.getBoundingClientRect().top;function o(){let h=1-(Date.now()-c)/l,f=Math.abs(h*d);h>0?(n.scrollTop=f,requestAnimationFrame(o.bind(this))):n.scrollTop=t}requestAnimationFrame(o.bind(this))}},uf=lf;function cf(i,t){var n=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),n.push.apply(n,l)}return n}function Qr(i){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cf(Object(n),!0).forEach(function(l){Ux(i,l,n[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(n)):cf(Object(n)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(n,l))})}return i}function ra(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ra=function(t){return typeof t}:ra=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(i)}function Ux(i,t,n){return t in i?Object.defineProperty(i,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):i[t]=n,i}function dn(){return dn=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])}return i},dn.apply(this,arguments)}function jx(i,t){if(i==null)return{};var n={},l=Object.keys(i),c,d;for(d=0;d<l.length;d++)c=l[d],!(t.indexOf(c)>=0)&&(n[c]=i[c]);return n}function Hx(i,t){if(i==null)return{};var n=jx(i,t),l,c;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(i);for(c=0;c<d.length;c++)l=d[c],!(t.indexOf(l)>=0)&&(!Object.prototype.propertyIsEnumerable.call(i,l)||(n[l]=i[l]))}return n}var Wx="1.14.0";function hn(i){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(i)}var pn=hn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),no=hn(/Edge/i),ff=hn(/firefox/i),io=hn(/safari/i)&&!hn(/chrome/i)&&!hn(/android/i),df=hn(/iP(ad|od|hone)/i),Gx=hn(/chrome/i)&&hn(/android/i),hf={capture:!1,passive:!1};function It(i,t,n){i.addEventListener(t,n,!pn&&hf)}function Ct(i,t,n){i.removeEventListener(t,n,!pn&&hf)}function na(i,t){if(!!t){if(t[0]===">"&&(t=t.substring(1)),i)try{if(i.matches)return i.matches(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t)}catch{return!1}return!1}}function Kx(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function Jr(i,t,n,l){if(i){n=n||document;do{if(t!=null&&(t[0]===">"?i.parentNode===n&&na(i,t):na(i,t))||l&&i===n)return i;if(i===n)break}while(i=Kx(i))}return null}var pf=/\s+/g;function Or(i,t,n){if(i&&t)if(i.classList)i.classList[n?"add":"remove"](t);else{var l=(" "+i.className+" ").replace(pf," ").replace(" "+t+" "," ");i.className=(l+(n?" "+t:"")).replace(pf," ")}}function dt(i,t,n){var l=i&&i.style;if(l){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(n=i.currentStyle),t===void 0?n:n[t];!(t in l)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),l[t]=n+(typeof n=="string"?"":"px")}}function fi(i,t){var n="";if(typeof i=="string")n=i;else do{var l=dt(i,"transform");l&&l!=="none"&&(n=l+" "+n)}while(!t&&(i=i.parentNode));var c=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return c&&new c(n)}function mf(i,t,n){if(i){var l=i.getElementsByTagName(t),c=0,d=l.length;if(n)for(;c<d;c++)n(l[c],c);return l}return[]}function en(){var i=document.scrollingElement;return i||document.documentElement}function ar(i,t,n,l,c){if(!(!i.getBoundingClientRect&&i!==window)){var d,o,h,f,p,y,g;if(i!==window&&i.parentNode&&i!==en()?(d=i.getBoundingClientRect(),o=d.top,h=d.left,f=d.bottom,p=d.right,y=d.height,g=d.width):(o=0,h=0,f=window.innerHeight,p=window.innerWidth,y=window.innerHeight,g=window.innerWidth),(t||n)&&i!==window&&(c=c||i.parentNode,!pn))do if(c&&c.getBoundingClientRect&&(dt(c,"transform")!=="none"||n&&dt(c,"position")!=="static")){var v=c.getBoundingClientRect();o-=v.top+parseInt(dt(c,"border-top-width")),h-=v.left+parseInt(dt(c,"border-left-width")),f=o+d.height,p=h+d.width;break}while(c=c.parentNode);if(l&&i!==window){var b=fi(c||i),k=b&&b.a,E=b&&b.d;b&&(o/=E,h/=k,g/=k,y/=E,f=o+y,p=h+g)}return{top:o,left:h,bottom:f,right:p,width:g,height:y}}}function gf(i,t,n){for(var l=En(i,!0),c=ar(i)[t];l;){var d=ar(l)[n],o=void 0;if(n==="top"||n==="left"?o=c>=d:o=c<=d,!o)return l;if(l===en())break;l=En(l,!1)}return!1}function di(i,t,n,l){for(var c=0,d=0,o=i.children;d<o.length;){if(o[d].style.display!=="none"&&o[d]!==ht.ghost&&(l||o[d]!==ht.dragged)&&Jr(o[d],n.draggable,i,!1)){if(c===t)return o[d];c++}d++}return null}function Os(i,t){for(var n=i.lastElementChild;n&&(n===ht.ghost||dt(n,"display")==="none"||t&&!na(n,t));)n=n.previousElementSibling;return n||null}function Nr(i,t){var n=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==ht.clone&&(!t||na(i,t))&&n++;return n}function vf(i){var t=0,n=0,l=en();if(i)do{var c=fi(i),d=c.a,o=c.d;t+=i.scrollLeft*d,n+=i.scrollTop*o}while(i!==l&&(i=i.parentNode));return[t,n]}function Vx(i,t){for(var n in i)if(!!i.hasOwnProperty(n)){for(var l in t)if(t.hasOwnProperty(l)&&t[l]===i[n][l])return Number(n)}return-1}function En(i,t){if(!i||!i.getBoundingClientRect)return en();var n=i,l=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var c=dt(n);if(n.clientWidth<n.scrollWidth&&(c.overflowX=="auto"||c.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(c.overflowY=="auto"||c.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return en();if(l||t)return n;l=!0}}while(n=n.parentNode);return en()}function Yx(i,t){if(i&&t)for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);return i}function Ps(i,t){return Math.round(i.top)===Math.round(t.top)&&Math.round(i.left)===Math.round(t.left)&&Math.round(i.height)===Math.round(t.height)&&Math.round(i.width)===Math.round(t.width)}var oo;function yf(i,t){return function(){if(!oo){var n=arguments,l=this;n.length===1?i.call(l,n[0]):i.apply(l,n),oo=setTimeout(function(){oo=void 0},t)}}}function Xx(){clearTimeout(oo),oo=void 0}function bf(i,t,n){i.scrollLeft+=t,i.scrollTop+=n}function xf(i){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(i).cloneNode(!0):n?n(i).clone(!0)[0]:i.cloneNode(!0)}var Pr="Sortable"+new Date().getTime();function Zx(){var i=[],t;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var l=[].slice.call(this.el.children);l.forEach(function(c){if(!(dt(c,"display")==="none"||c===ht.ghost)){i.push({target:c,rect:ar(c)});var d=Qr({},i[i.length-1].rect);if(c.thisAnimationDuration){var o=fi(c,!0);o&&(d.top-=o.f,d.left-=o.e)}c.fromRect=d}})}},addAnimationState:function(l){i.push(l)},removeAnimationState:function(l){i.splice(Vx(i,{target:l}),1)},animateAll:function(l){var c=this;if(!this.options.animation){clearTimeout(t),typeof l=="function"&&l();return}var d=!1,o=0;i.forEach(function(h){var f=0,p=h.target,y=p.fromRect,g=ar(p),v=p.prevFromRect,b=p.prevToRect,k=h.rect,E=fi(p,!0);E&&(g.top-=E.f,g.left-=E.e),p.toRect=g,p.thisAnimationDuration&&Ps(v,g)&&!Ps(y,g)&&(k.top-g.top)/(k.left-g.left)===(y.top-g.top)/(y.left-g.left)&&(f=Jx(k,v,b,c.options)),Ps(g,y)||(p.prevFromRect=y,p.prevToRect=g,f||(f=c.options.animation),c.animate(p,k,g,f)),f&&(d=!0,o=Math.max(o,f),clearTimeout(p.animationResetTimer),p.animationResetTimer=setTimeout(function(){p.animationTime=0,p.prevFromRect=null,p.fromRect=null,p.prevToRect=null,p.thisAnimationDuration=null},f),p.thisAnimationDuration=f)}),clearTimeout(t),d?t=setTimeout(function(){typeof l=="function"&&l()},o):typeof l=="function"&&l(),i=[]},animate:function(l,c,d,o){if(o){dt(l,"transition",""),dt(l,"transform","");var h=fi(this.el),f=h&&h.a,p=h&&h.d,y=(c.left-d.left)/(f||1),g=(c.top-d.top)/(p||1);l.animatingX=!!y,l.animatingY=!!g,dt(l,"transform","translate3d("+y+"px,"+g+"px,0)"),this.forRepaintDummy=Qx(l),dt(l,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),dt(l,"transform","translate3d(0,0,0)"),typeof l.animated=="number"&&clearTimeout(l.animated),l.animated=setTimeout(function(){dt(l,"transition",""),dt(l,"transform",""),l.animated=!1,l.animatingX=!1,l.animatingY=!1},o)}}}}function Qx(i){return i.offsetWidth}function Jx(i,t,n,l){return Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*l.animation}var hi=[],Rs={initializeByDefault:!0},ao={mount:function(t){for(var n in Rs)Rs.hasOwnProperty(n)&&!(n in t)&&(t[n]=Rs[n]);hi.forEach(function(l){if(l.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),hi.push(t)},pluginEvent:function(t,n,l){var c=this;this.eventCanceled=!1,l.cancel=function(){c.eventCanceled=!0};var d=t+"Global";hi.forEach(function(o){!n[o.pluginName]||(n[o.pluginName][d]&&n[o.pluginName][d](Qr({sortable:n},l)),n.options[o.pluginName]&&n[o.pluginName][t]&&n[o.pluginName][t](Qr({sortable:n},l)))})},initializePlugins:function(t,n,l,c){hi.forEach(function(h){var f=h.pluginName;if(!(!t.options[f]&&!h.initializeByDefault)){var p=new h(t,n,t.options);p.sortable=t,p.options=t.options,t[f]=p,dn(l,p.defaults)}});for(var d in t.options)if(!!t.options.hasOwnProperty(d)){var o=this.modifyOption(t,d,t.options[d]);typeof o!="undefined"&&(t.options[d]=o)}},getEventProperties:function(t,n){var l={};return hi.forEach(function(c){typeof c.eventProperties=="function"&&dn(l,c.eventProperties.call(n[c.pluginName],t))}),l},modifyOption:function(t,n,l){var c;return hi.forEach(function(d){!t[d.pluginName]||d.optionListeners&&typeof d.optionListeners[n]=="function"&&(c=d.optionListeners[n].call(t[d.pluginName],l))}),c}};function e0(i){var t=i.sortable,n=i.rootEl,l=i.name,c=i.targetEl,d=i.cloneEl,o=i.toEl,h=i.fromEl,f=i.oldIndex,p=i.newIndex,y=i.oldDraggableIndex,g=i.newDraggableIndex,v=i.originalEvent,b=i.putSortable,k=i.extraEventProperties;if(t=t||n&&n[Pr],!!t){var E,w=t.options,I="on"+l.charAt(0).toUpperCase()+l.substr(1);window.CustomEvent&&!pn&&!no?E=new CustomEvent(l,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(l,!0,!0)),E.to=o||n,E.from=h||n,E.item=c||n,E.clone=d,E.oldIndex=f,E.newIndex=p,E.oldDraggableIndex=y,E.newDraggableIndex=g,E.originalEvent=v,E.pullMode=b?b.lastPutMode:void 0;var S=Qr(Qr({},k),ao.getEventProperties(l,t));for(var N in S)E[N]=S[N];n&&n.dispatchEvent(E),w[I]&&w[I].call(t,E)}}var t0=["evt"],Dr=function(t,n){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c=l.evt,d=Hx(l,t0);ao.pluginEvent.bind(ht)(t,n,Qr({dragEl:Ge,parentEl:Gt,ghostEl:yt,rootEl:qt,nextEl:Nn,lastDownEl:ia,cloneEl:Kt,cloneHidden:Cn,dragStarted:lo,putSortable:vr,activeSortable:ht.active,originalEvent:c,oldIndex:pi,oldDraggableIndex:so,newIndex:Rr,newDraggableIndex:Tn,hideGhostForTarget:Tf,unhideGhostForTarget:Af,cloneNowHidden:function(){Cn=!0},cloneNowShown:function(){Cn=!1},dispatchSortableEvent:function(h){Tr({sortable:n,name:h,originalEvent:c})}},d))};function Tr(i){e0(Qr({putSortable:vr,cloneEl:Kt,targetEl:Ge,rootEl:qt,oldIndex:pi,oldDraggableIndex:so,newIndex:Rr,newDraggableIndex:Tn},i))}var Ge,Gt,yt,qt,Nn,ia,Kt,Cn,pi,Rr,so,Tn,oa,vr,mi=!1,aa=!1,sa=[],Bn,Gr,zs,Ns,wf,kf,lo,gi,uo,co=!1,la=!1,ua,wr,Bs=[],qs=!1,ca=[],fa=typeof document!="undefined",da=df,_f=no||pn?"cssFloat":"float",r0=fa&&!Gx&&!df&&"draggable"in document.createElement("div"),Sf=function(){if(!!fa){if(pn)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),Ef=function(t,n){var l=dt(t),c=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),d=di(t,0,n),o=di(t,1,n),h=d&&dt(d),f=o&&dt(o),p=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+ar(d).width,y=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+ar(o).width;if(l.display==="flex")return l.flexDirection==="column"||l.flexDirection==="column-reverse"?"vertical":"horizontal";if(l.display==="grid")return l.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(d&&h.float&&h.float!=="none"){var g=h.float==="left"?"left":"right";return o&&(f.clear==="both"||f.clear===g)?"vertical":"horizontal"}return d&&(h.display==="block"||h.display==="flex"||h.display==="table"||h.display==="grid"||p>=c&&l[_f]==="none"||o&&l[_f]==="none"&&p+y>c)?"vertical":"horizontal"},n0=function(t,n,l){var c=l?t.left:t.top,d=l?t.right:t.bottom,o=l?t.width:t.height,h=l?n.left:n.top,f=l?n.right:n.bottom,p=l?n.width:n.height;return c===h||d===f||c+o/2===h+p/2},i0=function(t,n){var l;return sa.some(function(c){var d=c[Pr].options.emptyInsertThreshold;if(!(!d||Os(c))){var o=ar(c),h=t>=o.left-d&&t<=o.right+d,f=n>=o.top-d&&n<=o.bottom+d;if(h&&f)return l=c}}),l},Cf=function(t){function n(d,o){return function(h,f,p,y){var g=h.options.group.name&&f.options.group.name&&h.options.group.name===f.options.group.name;if(d==null&&(o||g))return!0;if(d==null||d===!1)return!1;if(o&&d==="clone")return d;if(typeof d=="function")return n(d(h,f,p,y),o)(h,f,p,y);var v=(o?h:f).options.group.name;return d===!0||typeof d=="string"&&d===v||d.join&&d.indexOf(v)>-1}}var l={},c=t.group;(!c||ra(c)!="object")&&(c={name:c}),l.name=c.name,l.checkPull=n(c.pull,!0),l.checkPut=n(c.put),l.revertClone=c.revertClone,t.group=l},Tf=function(){!Sf&&yt&&dt(yt,"display","none")},Af=function(){!Sf&&yt&&dt(yt,"display","")};fa&&document.addEventListener("click",function(i){if(aa)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),aa=!1,!1},!0);var qn=function(t){if(Ge){t=t.touches?t.touches[0]:t;var n=i0(t.clientX,t.clientY);if(n){var l={};for(var c in t)t.hasOwnProperty(c)&&(l[c]=t[c]);l.target=l.rootEl=n,l.preventDefault=void 0,l.stopPropagation=void 0,n[Pr]._onDragOver(l)}}},o0=function(t){Ge&&Ge.parentNode[Pr]._isOutsideThisEl(t.target)};function ht(i,t){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=t=dn({},t),i[Pr]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ef(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,h){o.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:ht.supportPointer!==!1&&"PointerEvent"in window&&!io,emptyInsertThreshold:5};ao.initializePlugins(this,i,n);for(var l in n)!(l in t)&&(t[l]=n[l]);Cf(t);for(var c in this)c.charAt(0)==="_"&&typeof this[c]=="function"&&(this[c]=this[c].bind(this));this.nativeDraggable=t.forceFallback?!1:r0,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?It(i,"pointerdown",this._onTapStart):(It(i,"mousedown",this._onTapStart),It(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(It(i,"dragover",this),It(i,"dragenter",this)),sa.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),dn(this,Zx())}ht.prototype={constructor:ht,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(gi=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ge):this.options.direction},_onTapStart:function(t){if(!!t.cancelable){var n=this,l=this.el,c=this.options,d=c.preventOnFilter,o=t.type,h=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,f=(h||t).target,p=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||f,y=c.filter;if(h0(l),!Ge&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||c.disabled)&&!p.isContentEditable&&!(!this.nativeDraggable&&io&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Jr(f,c.draggable,l,!1),!(f&&f.animated)&&ia!==f)){if(pi=Nr(f),so=Nr(f,c.draggable),typeof y=="function"){if(y.call(this,t,f,this)){Tr({sortable:n,rootEl:p,name:"filter",targetEl:f,toEl:l,fromEl:l}),Dr("filter",n,{evt:t}),d&&t.cancelable&&t.preventDefault();return}}else if(y&&(y=y.split(",").some(function(g){if(g=Jr(p,g.trim(),l,!1),g)return Tr({sortable:n,rootEl:g,name:"filter",targetEl:f,fromEl:l,toEl:l}),Dr("filter",n,{evt:t}),!0}),y)){d&&t.cancelable&&t.preventDefault();return}c.handle&&!Jr(p,c.handle,l,!1)||this._prepareDragStart(t,h,f)}}},_prepareDragStart:function(t,n,l){var c=this,d=c.el,o=c.options,h=d.ownerDocument,f;if(l&&!Ge&&l.parentNode===d){var p=ar(l);if(qt=d,Ge=l,Gt=Ge.parentNode,Nn=Ge.nextSibling,ia=l,oa=o.group,ht.dragged=Ge,Bn={target:Ge,clientX:(n||t).clientX,clientY:(n||t).clientY},wf=Bn.clientX-p.left,kf=Bn.clientY-p.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ge.style["will-change"]="all",f=function(){if(Dr("delayEnded",c,{evt:t}),ht.eventCanceled){c._onDrop();return}c._disableDelayedDragEvents(),!ff&&c.nativeDraggable&&(Ge.draggable=!0),c._triggerDragStart(t,n),Tr({sortable:c,name:"choose",originalEvent:t}),Or(Ge,o.chosenClass,!0)},o.ignore.split(",").forEach(function(y){mf(Ge,y.trim(),$s)}),It(h,"dragover",qn),It(h,"mousemove",qn),It(h,"touchmove",qn),It(h,"mouseup",c._onDrop),It(h,"touchend",c._onDrop),It(h,"touchcancel",c._onDrop),ff&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ge.draggable=!0),Dr("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(no||pn))){if(ht.eventCanceled){this._onDrop();return}It(h,"mouseup",c._disableDelayedDrag),It(h,"touchend",c._disableDelayedDrag),It(h,"touchcancel",c._disableDelayedDrag),It(h,"mousemove",c._delayedDragTouchMoveHandler),It(h,"touchmove",c._delayedDragTouchMoveHandler),o.supportPointer&&It(h,"pointermove",c._delayedDragTouchMoveHandler),c._dragStartTimer=setTimeout(f,o.delay)}else f()}},_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(){Ge&&$s(Ge),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ct(t,"mouseup",this._disableDelayedDrag),Ct(t,"touchend",this._disableDelayedDrag),Ct(t,"touchcancel",this._disableDelayedDrag),Ct(t,"mousemove",this._delayedDragTouchMoveHandler),Ct(t,"touchmove",this._delayedDragTouchMoveHandler),Ct(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?It(document,"pointermove",this._onTouchMove):n?It(document,"touchmove",this._onTouchMove):It(document,"mousemove",this._onTouchMove):(It(Ge,"dragend",this),It(qt,"dragstart",this._onDragStart));try{document.selection?pa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(mi=!1,qt&&Ge){Dr("dragStarted",this,{evt:n}),this.nativeDraggable&&It(document,"dragover",o0);var l=this.options;!t&&Or(Ge,l.dragClass,!1),Or(Ge,l.ghostClass,!0),ht.active=this,t&&this._appendGhost(),Tr({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Gr){this._lastX=Gr.clientX,this._lastY=Gr.clientY,Tf();for(var t=document.elementFromPoint(Gr.clientX,Gr.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Gr.clientX,Gr.clientY),t!==n);)n=t;if(Ge.parentNode[Pr]._isOutsideThisEl(t),n)do{if(n[Pr]){var l=void 0;if(l=n[Pr]._onDragOver({clientX:Gr.clientX,clientY:Gr.clientY,target:t,rootEl:n}),l&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Af()}},_onTouchMove:function(t){if(Bn){var n=this.options,l=n.fallbackTolerance,c=n.fallbackOffset,d=t.touches?t.touches[0]:t,o=yt&&fi(yt,!0),h=yt&&o&&o.a,f=yt&&o&&o.d,p=da&&wr&&vf(wr),y=(d.clientX-Bn.clientX+c.x)/(h||1)+(p?p[0]-Bs[0]:0)/(h||1),g=(d.clientY-Bn.clientY+c.y)/(f||1)+(p?p[1]-Bs[1]:0)/(f||1);if(!ht.active&&!mi){if(l&&Math.max(Math.abs(d.clientX-this._lastX),Math.abs(d.clientY-this._lastY))<l)return;this._onDragStart(t,!0)}if(yt){o?(o.e+=y-(zs||0),o.f+=g-(Ns||0)):o={a:1,b:0,c:0,d:1,e:y,f:g};var v="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");dt(yt,"webkitTransform",v),dt(yt,"mozTransform",v),dt(yt,"msTransform",v),dt(yt,"transform",v),zs=y,Ns=g,Gr=d}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!yt){var t=this.options.fallbackOnBody?document.body:qt,n=ar(Ge,!0,da,!0,t),l=this.options;if(da){for(wr=t;dt(wr,"position")==="static"&&dt(wr,"transform")==="none"&&wr!==document;)wr=wr.parentNode;wr!==document.body&&wr!==document.documentElement?(wr===document&&(wr=en()),n.top+=wr.scrollTop,n.left+=wr.scrollLeft):wr=en(),Bs=vf(wr)}yt=Ge.cloneNode(!0),Or(yt,l.ghostClass,!1),Or(yt,l.fallbackClass,!0),Or(yt,l.dragClass,!0),dt(yt,"transition",""),dt(yt,"transform",""),dt(yt,"box-sizing","border-box"),dt(yt,"margin",0),dt(yt,"top",n.top),dt(yt,"left",n.left),dt(yt,"width",n.width),dt(yt,"height",n.height),dt(yt,"opacity","0.8"),dt(yt,"position",da?"absolute":"fixed"),dt(yt,"zIndex","100000"),dt(yt,"pointerEvents","none"),ht.ghost=yt,t.appendChild(yt),dt(yt,"transform-origin",wf/parseInt(yt.style.width)*100+"% "+kf/parseInt(yt.style.height)*100+"%")}},_onDragStart:function(t,n){var l=this,c=t.dataTransfer,d=l.options;if(Dr("dragStart",this,{evt:t}),ht.eventCanceled){this._onDrop();return}Dr("setupClone",this),ht.eventCanceled||(Kt=xf(Ge),Kt.draggable=!1,Kt.style["will-change"]="",this._hideClone(),Or(Kt,this.options.chosenClass,!1),ht.clone=Kt),l.cloneId=pa(function(){Dr("clone",l),!ht.eventCanceled&&(l.options.removeCloneOnHide||qt.insertBefore(Kt,Ge),l._hideClone(),Tr({sortable:l,name:"clone"}))}),!n&&Or(Ge,d.dragClass,!0),n?(aa=!0,l._loopId=setInterval(l._emulateDragOver,50)):(Ct(document,"mouseup",l._onDrop),Ct(document,"touchend",l._onDrop),Ct(document,"touchcancel",l._onDrop),c&&(c.effectAllowed="move",d.setData&&d.setData.call(l,c,Ge)),It(document,"drop",l),dt(Ge,"transform","translateZ(0)")),mi=!0,l._dragStartId=pa(l._dragStarted.bind(l,n,t)),It(document,"selectstart",l),lo=!0,io&&dt(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,l=t.target,c,d,o,h=this.options,f=h.group,p=ht.active,y=oa===f,g=h.sort,v=vr||p,b,k=this,E=!1;if(qs)return;function w(ne,ae){Dr(ne,k,Qr({evt:t,isOwner:y,axis:b?"vertical":"horizontal",revert:o,dragRect:c,targetRect:d,canSort:g,fromSortable:v,target:l,completed:S,onMove:function(A,be){return ha(qt,n,Ge,c,A,ar(A),t,be)},changed:N},ae))}function I(){w("dragOverAnimationCapture"),k.captureAnimationState(),k!==v&&v.captureAnimationState()}function S(ne){return w("dragOverCompleted",{insertion:ne}),ne&&(y?p._hideClone():p._showClone(k),k!==v&&(Or(Ge,vr?vr.options.ghostClass:p.options.ghostClass,!1),Or(Ge,h.ghostClass,!0)),vr!==k&&k!==ht.active?vr=k:k===ht.active&&vr&&(vr=null),v===k&&(k._ignoreWhileAnimating=l),k.animateAll(function(){w("dragOverAnimationComplete"),k._ignoreWhileAnimating=null}),k!==v&&(v.animateAll(),v._ignoreWhileAnimating=null)),(l===Ge&&!Ge.animated||l===n&&!l.animated)&&(gi=null),!h.dragoverBubble&&!t.rootEl&&l!==document&&(Ge.parentNode[Pr]._isOutsideThisEl(t.target),!ne&&qn(t)),!h.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),E=!0}function N(){Rr=Nr(Ge),Tn=Nr(Ge,h.draggable),Tr({sortable:k,name:"change",toEl:n,newIndex:Rr,newDraggableIndex:Tn,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),l=Jr(l,h.draggable,n,!0),w("dragOver"),ht.eventCanceled)return E;if(Ge.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||k._ignoreWhileAnimating===l)return S(!1);if(aa=!1,p&&!h.disabled&&(y?g||(o=Gt!==qt):vr===this||(this.lastPutMode=oa.checkPull(this,p,Ge,t))&&f.checkPut(this,p,Ge,t))){if(b=this._getDirection(t,l)==="vertical",c=ar(Ge),w("dragOverValid"),ht.eventCanceled)return E;if(o)return Gt=qt,I(),this._hideClone(),w("revert"),ht.eventCanceled||(Nn?qt.insertBefore(Ge,Nn):qt.appendChild(Ge)),S(!0);var O=Os(n,h.draggable);if(!O||u0(t,b,this)&&!O.animated){if(O===Ge)return S(!1);if(O&&n===t.target&&(l=O),l&&(d=ar(l)),ha(qt,n,Ge,c,l,d,t,!!l)!==!1)return I(),n.appendChild(Ge),Gt=n,N(),S(!0)}else if(O&&l0(t,b,this)){var j=di(n,0,h,!0);if(j===Ge)return S(!1);if(l=j,d=ar(l),ha(qt,n,Ge,c,l,d,t,!1)!==!1)return I(),n.insertBefore(Ge,j),Gt=n,N(),S(!0)}else if(l.parentNode===n){d=ar(l);var U=0,ee,V=Ge.parentNode!==n,W=!n0(Ge.animated&&Ge.toRect||c,l.animated&&l.toRect||d,b),K=b?"top":"left",q=gf(l,"top","top")||gf(Ge,"top","top"),R=q?q.scrollTop:void 0;gi!==l&&(ee=d[K],co=!1,la=!W&&h.invertSwap||V),U=c0(t,l,d,b,W?1:h.swapThreshold,h.invertedSwapThreshold==null?h.swapThreshold:h.invertedSwapThreshold,la,gi===l);var T;if(U!==0){var H=Nr(Ge);do H-=U,T=Gt.children[H];while(T&&(dt(T,"display")==="none"||T===yt))}if(U===0||T===l)return S(!1);gi=l,uo=U;var Z=l.nextElementSibling,P=!1;P=U===1;var z=ha(qt,n,Ge,c,l,d,t,P);if(z!==!1)return(z===1||z===-1)&&(P=z===1),qs=!0,setTimeout(s0,30),I(),P&&!Z?n.appendChild(Ge):l.parentNode.insertBefore(Ge,P?Z:l),q&&bf(q,0,R-q.scrollTop),Gt=Ge.parentNode,ee!==void 0&&!la&&(ua=Math.abs(ee-ar(l)[K])),N(),S(!0)}if(n.contains(Ge))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ct(document,"mousemove",this._onTouchMove),Ct(document,"touchmove",this._onTouchMove),Ct(document,"pointermove",this._onTouchMove),Ct(document,"dragover",qn),Ct(document,"mousemove",qn),Ct(document,"touchmove",qn)},_offUpEvents:function(){var t=this.el.ownerDocument;Ct(t,"mouseup",this._onDrop),Ct(t,"touchend",this._onDrop),Ct(t,"pointerup",this._onDrop),Ct(t,"touchcancel",this._onDrop),Ct(document,"selectstart",this)},_onDrop:function(t){var n=this.el,l=this.options;if(Rr=Nr(Ge),Tn=Nr(Ge,l.draggable),Dr("drop",this,{evt:t}),Gt=Ge&&Ge.parentNode,Rr=Nr(Ge),Tn=Nr(Ge,l.draggable),ht.eventCanceled){this._nulling();return}mi=!1,la=!1,co=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Us(this.cloneId),Us(this._dragStartId),this.nativeDraggable&&(Ct(document,"drop",this),Ct(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),io&&dt(document.body,"user-select",""),dt(Ge,"transform",""),t&&(lo&&(t.cancelable&&t.preventDefault(),!l.dropBubble&&t.stopPropagation()),yt&&yt.parentNode&&yt.parentNode.removeChild(yt),(qt===Gt||vr&&vr.lastPutMode!=="clone")&&Kt&&Kt.parentNode&&Kt.parentNode.removeChild(Kt),Ge&&(this.nativeDraggable&&Ct(Ge,"dragend",this),$s(Ge),Ge.style["will-change"]="",lo&&!mi&&Or(Ge,vr?vr.options.ghostClass:this.options.ghostClass,!1),Or(Ge,this.options.chosenClass,!1),Tr({sortable:this,name:"unchoose",toEl:Gt,newIndex:null,newDraggableIndex:null,originalEvent:t}),qt!==Gt?(Rr>=0&&(Tr({rootEl:Gt,name:"add",toEl:Gt,fromEl:qt,originalEvent:t}),Tr({sortable:this,name:"remove",toEl:Gt,originalEvent:t}),Tr({rootEl:Gt,name:"sort",toEl:Gt,fromEl:qt,originalEvent:t}),Tr({sortable:this,name:"sort",toEl:Gt,originalEvent:t})),vr&&vr.save()):Rr!==pi&&Rr>=0&&(Tr({sortable:this,name:"update",toEl:Gt,originalEvent:t}),Tr({sortable:this,name:"sort",toEl:Gt,originalEvent:t})),ht.active&&((Rr==null||Rr===-1)&&(Rr=pi,Tn=so),Tr({sortable:this,name:"end",toEl:Gt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Dr("nulling",this),qt=Ge=Gt=yt=Nn=Kt=ia=Cn=Bn=Gr=lo=Rr=Tn=pi=so=gi=uo=vr=oa=ht.dragged=ht.ghost=ht.clone=ht.active=null,ca.forEach(function(t){t.checked=!0}),ca.length=zs=Ns=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ge&&(this._onDragOver(t),a0(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,l=this.el.children,c=0,d=l.length,o=this.options;c<d;c++)n=l[c],Jr(n,o.draggable,this.el,!1)&&t.push(n.getAttribute(o.dataIdAttr)||d0(n));return t},sort:function(t,n){var l={},c=this.el;this.toArray().forEach(function(d,o){var h=c.children[o];Jr(h,this.options.draggable,c,!1)&&(l[d]=h)},this),n&&this.captureAnimationState(),t.forEach(function(d){l[d]&&(c.removeChild(l[d]),c.appendChild(l[d]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return Jr(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var l=this.options;if(n===void 0)return l[t];var c=ao.modifyOption(this,t,n);typeof c!="undefined"?l[t]=c:l[t]=n,t==="group"&&Cf(l)},destroy:function(){Dr("destroy",this);var t=this.el;t[Pr]=null,Ct(t,"mousedown",this._onTapStart),Ct(t,"touchstart",this._onTapStart),Ct(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ct(t,"dragover",this),Ct(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sa.splice(sa.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Cn){if(Dr("hideClone",this),ht.eventCanceled)return;dt(Kt,"display","none"),this.options.removeCloneOnHide&&Kt.parentNode&&Kt.parentNode.removeChild(Kt),Cn=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Cn){if(Dr("showClone",this),ht.eventCanceled)return;Ge.parentNode==qt&&!this.options.group.revertClone?qt.insertBefore(Kt,Ge):Nn?qt.insertBefore(Kt,Nn):qt.appendChild(Kt),this.options.group.revertClone&&this.animate(Ge,Kt),dt(Kt,"display",""),Cn=!1}}};function a0(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function ha(i,t,n,l,c,d,o,h){var f,p=i[Pr],y=p.options.onMove,g;return window.CustomEvent&&!pn&&!no?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=t,f.from=i,f.dragged=n,f.draggedRect=l,f.related=c||t,f.relatedRect=d||ar(t),f.willInsertAfter=h,f.originalEvent=o,i.dispatchEvent(f),y&&(g=y.call(p,f,o)),g}function $s(i){i.draggable=!1}function s0(){qs=!1}function l0(i,t,n){var l=ar(di(n.el,0,n.options,!0)),c=10;return t?i.clientX<l.left-c||i.clientY<l.top&&i.clientX<l.right:i.clientY<l.top-c||i.clientY<l.bottom&&i.clientX<l.left}function u0(i,t,n){var l=ar(Os(n.el,n.options.draggable)),c=10;return t?i.clientX>l.right+c||i.clientX<=l.right&&i.clientY>l.bottom&&i.clientX>=l.left:i.clientX>l.right&&i.clientY>l.top||i.clientX<=l.right&&i.clientY>l.bottom+c}function c0(i,t,n,l,c,d,o,h){var f=l?i.clientY:i.clientX,p=l?n.height:n.width,y=l?n.top:n.left,g=l?n.bottom:n.right,v=!1;if(!o){if(h&&ua<p*c){if(!co&&(uo===1?f>y+p*d/2:f<g-p*d/2)&&(co=!0),co)v=!0;else if(uo===1?f<y+ua:f>g-ua)return-uo}else if(f>y+p*(1-c)/2&&f<g-p*(1-c)/2)return f0(t)}return v=v||o,v&&(f<y+p*d/2||f>g-p*d/2)?f>y+p/2?1:-1:0}function f0(i){return Nr(Ge)<Nr(i)?1:-1}function d0(i){for(var t=i.tagName+i.className+i.src+i.href+i.textContent,n=t.length,l=0;n--;)l+=t.charCodeAt(n);return l.toString(36)}function h0(i){ca.length=0;for(var t=i.getElementsByTagName("input"),n=t.length;n--;){var l=t[n];l.checked&&ca.push(l)}}function pa(i){return setTimeout(i,0)}function Us(i){return clearTimeout(i)}fa&&It(document,"touchmove",function(i){(ht.active||mi)&&i.cancelable&&i.preventDefault()});ht.utils={on:It,off:Ct,css:dt,find:mf,is:function(t,n){return!!Jr(t,n,t,!1)},extend:Yx,throttle:yf,closest:Jr,toggleClass:Or,clone:xf,index:Nr,nextTick:pa,cancelNextTick:Us,detectDirection:Ef,getChild:di};ht.get=function(i){return i[Pr]};ht.mount=function(){for(var i=arguments.length,t=new Array(i),n=0;n<i;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(l){if(!l.prototype||!l.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(l));l.utils&&(ht.utils=Qr(Qr({},ht.utils),l.utils)),ao.mount(l)})};ht.create=function(i,t){return new ht(i,t)};ht.version=Wx;var er=[],fo,js,Hs=!1,Ws,Gs,ma,ho;function p0(){function i(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return i.prototype={dragStarted:function(n){var l=n.originalEvent;this.sortable.nativeDraggable?It(document,"dragover",this._handleAutoScroll):this.options.supportPointer?It(document,"pointermove",this._handleFallbackAutoScroll):l.touches?It(document,"touchmove",this._handleFallbackAutoScroll):It(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var l=n.originalEvent;!this.options.dragOverBubble&&!l.rootEl&&this._handleAutoScroll(l)},drop:function(){this.sortable.nativeDraggable?Ct(document,"dragover",this._handleAutoScroll):(Ct(document,"pointermove",this._handleFallbackAutoScroll),Ct(document,"touchmove",this._handleFallbackAutoScroll),Ct(document,"mousemove",this._handleFallbackAutoScroll)),Lf(),ga(),Xx()},nulling:function(){ma=js=fo=Hs=ho=Ws=Gs=null,er.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,l){var c=this,d=(n.touches?n.touches[0]:n).clientX,o=(n.touches?n.touches[0]:n).clientY,h=document.elementFromPoint(d,o);if(ma=n,l||this.options.forceAutoScrollFallback||no||pn||io){Ks(n,this.options,h,l);var f=En(h,!0);Hs&&(!ho||d!==Ws||o!==Gs)&&(ho&&Lf(),ho=setInterval(function(){var p=En(document.elementFromPoint(d,o),!0);p!==f&&(f=p,ga()),Ks(n,c.options,p,l)},10),Ws=d,Gs=o)}else{if(!this.options.bubbleScroll||En(h,!0)===en()){ga();return}Ks(n,this.options,En(h,!1),!1)}}},dn(i,{pluginName:"scroll",initializeByDefault:!0})}function ga(){er.forEach(function(i){clearInterval(i.pid)}),er=[]}function Lf(){clearInterval(ho)}var Ks=yf(function(i,t,n,l){if(!!t.scroll){var c=(i.touches?i.touches[0]:i).clientX,d=(i.touches?i.touches[0]:i).clientY,o=t.scrollSensitivity,h=t.scrollSpeed,f=en(),p=!1,y;js!==n&&(js=n,ga(),fo=t.scroll,y=t.scrollFn,fo===!0&&(fo=En(n,!0)));var g=0,v=fo;do{var b=v,k=ar(b),E=k.top,w=k.bottom,I=k.left,S=k.right,N=k.width,O=k.height,j=void 0,U=void 0,ee=b.scrollWidth,V=b.scrollHeight,W=dt(b),K=b.scrollLeft,q=b.scrollTop;b===f?(j=N<ee&&(W.overflowX==="auto"||W.overflowX==="scroll"||W.overflowX==="visible"),U=O<V&&(W.overflowY==="auto"||W.overflowY==="scroll"||W.overflowY==="visible")):(j=N<ee&&(W.overflowX==="auto"||W.overflowX==="scroll"),U=O<V&&(W.overflowY==="auto"||W.overflowY==="scroll"));var R=j&&(Math.abs(S-c)<=o&&K+N<ee)-(Math.abs(I-c)<=o&&!!K),T=U&&(Math.abs(w-d)<=o&&q+O<V)-(Math.abs(E-d)<=o&&!!q);if(!er[g])for(var H=0;H<=g;H++)er[H]||(er[H]={});(er[g].vx!=R||er[g].vy!=T||er[g].el!==b)&&(er[g].el=b,er[g].vx=R,er[g].vy=T,clearInterval(er[g].pid),(R!=0||T!=0)&&(p=!0,er[g].pid=setInterval(function(){l&&this.layer===0&&ht.active._onTouchMove(ma);var Z=er[this.layer].vy?er[this.layer].vy*h:0,P=er[this.layer].vx?er[this.layer].vx*h:0;typeof y=="function"&&y.call(ht.dragged.parentNode[Pr],P,Z,i,ma,er[this.layer].el)!=="continue"||bf(er[this.layer].el,P,Z)}.bind({layer:g}),24))),g++}while(t.bubbleScroll&&v!==f&&(v=En(v,!1)));Hs=p}},30),Df=function(t){var n=t.originalEvent,l=t.putSortable,c=t.dragEl,d=t.activeSortable,o=t.dispatchSortableEvent,h=t.hideGhostForTarget,f=t.unhideGhostForTarget;if(!!n){var p=l||d;h();var y=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,g=document.elementFromPoint(y.clientX,y.clientY);f(),p&&!p.el.contains(g)&&(o("spill"),this.onSpill({dragEl:c,putSortable:l}))}};function Vs(){}Vs.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,l=t.putSortable;this.sortable.captureAnimationState(),l&&l.captureAnimationState();var c=di(this.sortable.el,this.startIndex,this.options);c?this.sortable.el.insertBefore(n,c):this.sortable.el.appendChild(n),this.sortable.animateAll(),l&&l.animateAll()},drop:Df};dn(Vs,{pluginName:"revertOnSpill"});function Ys(){}Ys.prototype={onSpill:function(t){var n=t.dragEl,l=t.putSortable,c=l||this.sortable;c.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),c.animateAll()},drop:Df};dn(Ys,{pluginName:"removeOnSpill"});ht.mount(new p0);ht.mount(Ys,Vs);var vi=ht;var If={name:function(i,t){let n=i.getAttribute("data-name").trim().toLowerCase(),l=t.getAttribute("data-name").trim().toLowerCase();return n.localeCompare(l)},created:function(i,t){let n=Number(i.getAttribute("data-created"));return Number(t.getAttribute("data-created"))-n},updated:function(i,t){let n=Number(i.getAttribute("data-updated"));return Number(t.getAttribute("data-updated"))-n},chaptersFirst:function(i,t){let n=i.getAttribute("data-type"),l=t.getAttribute("data-type");return n===l?0:n==="chapter"?-1:1},chaptersLast:function(i,t){let n=i.getAttribute("data-type"),l=t.getAttribute("data-type");return n===l?0:n==="chapter"?1:-1}},Ff=class{constructor(t){this.elem=t,this.sortContainer=t.querySelector("[book-sort-boxes]"),this.input=t.querySelector("[book-sort-input]");let 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,l=["name","created","updated"];this.sortContainer.addEventListener("click",c=>{let d=c.target.closest(".sort-box-options [data-sort]");if(!d)return;c.preventDefault();let o=d.closest(".sort-box").querySelectorAll("ul"),h=d.getAttribute("data-sort");n=t===h?!n:!1;let f=If[h];n&&l.includes(h)&&(f=function(p,y){return 0-If[h](p,y)});for(let p of o)Array.from(p.children).filter(g=>g.matches("li")).sort(f).forEach(g=>{p.appendChild(g)});t=h,this.updateMapInput()})}bookSelect(t){if(this.elem.querySelector(`[data-type="book"][data-id="${t.id}"]`)!==null)return;let l=t.link+"/sort-item";window.$http.get(l).then(c=>{let d=document.createElement("div");d.innerHTML=c.data;let o=d.children[0];this.sortContainer.append(o),this.setupBookSortable(o)})}setupBookSortable(t){let n=[t.querySelector(".sort-list")];n.push(...t.querySelectorAll(".entity-list-item + ul"));let l={name:"book",pull:["book","chapter"],put:["book","chapter"]},c={name:"chapter",pull:["book","chapter"],put:function(d,o,h){return h.getAttribute("data-type")==="page"}};for(let d of n)new vi(d,{group:d.classList.contains("sort-list")?l:c,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(){let t=this.buildEntityMap();this.input.value=JSON.stringify(t)}buildEntityMap(){let t=[],n=this.elem.querySelectorAll(".sort-list");for(let l of n){let c=l.closest('[data-type="book"]').getAttribute("data-id"),d=Array.from(l.children).filter(o=>o.matches('[data-type="page"], [data-type="chapter"]'));for(let o=0;o<d.length;o++)this.addBookChildToMap(d[o],o,c,t)}return t}addBookChildToMap(t,n,l,c){let d=t.getAttribute("data-type"),o=!1,h=t.getAttribute("data-id");c.push({id:h,sort:n,parentChapter:o,type:d,book:l});let f=t.querySelectorAll('[data-type="page"]');for(let p=0;p<f.length;p++)c.push({id:f[p].getAttribute("data-id"),sort:p,parentChapter:h,type:"page",book:l})}},Mf=Ff;var va=new WeakMap;function Of(i,t=400,n=null){xa(i),i.style.display="block",ba(i,{opacity:["0","1"]},t,()=>{n&&n()})}function ya(i,t=400,n=null){xa(i),ba(i,{opacity:["1","0"]},t,()=>{i.style.display="none",n&&n()})}function yi(i,t=400){xa(i);let n=i.getBoundingClientRect().height,l=getComputedStyle(i),c=l.getPropertyValue("padding-top"),d=l.getPropertyValue("padding-bottom"),o={height:[`${n}px`,"0px"],overflow:["hidden","hidden"],paddingTop:[c,"0px"],paddingBottom:[d,"0px"]};ba(i,o,t,()=>{i.style.display="none"})}function bi(i,t=400){xa(i),i.style.display="block";let n=i.getBoundingClientRect().height,l=getComputedStyle(i),c=l.getPropertyValue("padding-top"),d=l.getPropertyValue("padding-bottom"),o={height:["0px",`${n}px`],overflow:["hidden","hidden"],paddingTop:["0px",c],paddingBottom:["0px",d]};ba(i,o,t)}function ba(i,t,n=400,l=null){let c=Object.keys(t);for(let o of c)i.style[o]=t[o][0];let d=()=>{for(let o of c)i.style[o]=null;i.style.transition=null,i.removeEventListener("transitionend",d),va.delete(i),l&&l()};setTimeout(()=>{i.style.transition=`all ease-in-out ${n}ms`;for(let o of c)i.style[o]=t[o][1];i.addEventListener("transitionend",d),va.set(i,d)},15)}function xa(i){va.has(i)&&va.get(i)()}var Pf=class{constructor(t){this.elem=t,this.isOpen=t.classList.contains("open"),t.addEventListener("click",this.click.bind(this))}open(){let t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.add("open"),this.elem.setAttribute("aria-expanded","true"),bi(t,240)}close(){let t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.remove("open"),this.elem.setAttribute("aria-expanded","false"),yi(t,240)}click(t){t.preventDefault(),this.isOpen?this.close():this.open(),this.isOpen=!this.isOpen}},Rf=Pf;var $n=_t(Tt()),vh=_t(Js()),O_=_t(el()),P_=_t(tl()),R_=_t(jf()),z_=_t(Gf()),N_=_t(Yf()),B_=_t(Qf()),q_=_t(nl()),$_=_t(rl()),U_=_t(sd()),j_=_t(cd()),H_=_t(gd()),W_=_t(bd()),G_=_t(kd()),K_=_t(Ed()),V_=_t(Ad()),Y_=_t(Id()),X_=_t(Od()),Z_=_t(zd()),Q_=_t(qd()),J_=_t(jd()),eS=_t(Yd()),tS=_t(Qd()),rS=_t(th()),nS=_t(ih()),iS=_t(sh()),oS=_t(ch()),aS=_t(wa()),sS=_t(hh()),lS=_t(gh()),il={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:i=>i.includes("<?php")?"php":"text/x-php",py:"python",python:"python",ruby:"ruby",rust:"rust",rb:"ruby",rs:"rust",shell:"shell",sh:"shell",bash:"shell",toml:"toml",sql:"text/x-sql",vbs:"vbscript",vbscript:"vbscript","vb.net":"text/x-vb",vbnet:"text/x-vb",xml:"xml",yaml:"yaml",yml:"yaml"};function m0(){let i=document.querySelectorAll(".page-content pre, .comment-box .content pre");for(let t of i)yh(t)}function g0(i){let t=i.querySelectorAll("pre");for(let n of t)yh(n)}function yh(i){let t=i.querySelector("code[class^=language-]");i.innerHTML=i.innerHTML.replace(/<br\s*[\/]?>/gi,`
`);let n=i.textContent.trimEnd(),l="";if(t!==null){let d=t.className.replace("language-","");l=ka(d,n)}let c=(0,$n.default)(function(d){i.parentNode.replaceChild(d,i)},{value:n,mode:l,lineNumbers:!0,lineWrapping:!1,theme:_a(),readOnly:!0});v0(c)}function v0(i){let t='<svg viewBox="0 0 24 24" width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>',n=document.createElement("div");n.classList.add("CodeMirror-copy"),n.innerHTML=t,i.display.wrapper.appendChild(n),new vh.default(n,{text:function(c){return i.getValue()}}).on("success",c=>{n.classList.add("success"),setTimeout(()=>{n.classList.remove("success")},240)})}function ka(i,t){i=i.trim().replace(/^\./g,"").toLowerCase();let n=typeof il[i];return n==="undefined"?"":n==="function"?il[i](t):il[i]}function _a(){let i=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(i?"darcula":"default")}function y0(i){let t=i.ownerDocument,n=i.querySelector("code"),l=bh(i.className||"");!l&&n&&(l=bh(n.className||"")),i.innerHTML=i.innerHTML.replace(/<br\s*[\/]?>/gi,`
`);let c=i.textContent,d=t.createElement("div"),o=t.createElement("textarea");d.className="CodeMirrorContainer",d.setAttribute("data-lang",l),d.setAttribute("dir","ltr"),o.style.display="none",i.parentNode.replaceChild(d,i),d.appendChild(o),d.contentEditable="false",o.textContent=c;let h=(0,$n.default)(function(f){d.appendChild(f)},{value:c,mode:ka(l,c),lineNumbers:!0,lineWrapping:!1,theme:_a(),readOnly:!0});return{wrap:d,editor:h}}function bh(i){return(i.split(" ").filter(n=>n.startsWith("language-"))[0]||"").replace("language-","")}function b0(i,t){let n=i.textContent;return(0,$n.default)(function(l){i.parentNode.insertBefore(l,i),i.style.display="none"},{value:n,mode:ka(t,n),lineNumbers:!0,lineWrapping:!1,theme:_a()})}function x0(i,t,n){i.setOption("mode",ka(t,n))}function w0(i,t){i.setValue(t),setTimeout(()=>{xh(i)},10)}function xh(i){i.refresh()}function k0(i){let n={value:i.textContent,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:_a(),scrollPastEnd:!0};return window.$events.emitPublic(i,"editor-markdown-cm::pre-init",{config:n}),(0,$n.default)(function(l){i.parentNode.insertBefore(l,i),i.style.display="none"},n)}function _0(){return $n.default.keyMap.default==$n.default.keyMap.macDefault?"Cmd":"Ctrl"}var sr={highlight:m0,highlightWithin:g0,wysiwygView:y0,popupEditor:b0,setMode:x0,setContent:w0,updateLayout:xh,markdownEditor:k0,getMetaKey:_0};var wh=class{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()}),Rt(this.languageLinks,t=>{let n=t.target.dataset.lang;this.languageInput.value=n,this.updateEditorMode(n)}),ta(this.languageInput,t=>this.save()),Rt(this.saveButton,t=>this.save()),jt(this.historyList,"button","click",(t,n)=>{t.preventDefault();let l=n.dataset.time;this.editor&&this.editor.setValue(this.history[l])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(t,n,l){this.languageInput.value=n,this.callback=l,this.show(),this.updateEditorMode(n),sr.setContent(this.editor,t)}show(){this.editor||(this.editor=sr.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{sr.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(t){sr.setMode(this.editor,t,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");let t=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",t.length===0),this.historyList.innerHTML=t.map(n=>{let l=new Date(parseInt(n)).toLocaleTimeString();return`<li><button type="button" data-time="${n}">${l}</button></li>`}).join("")}addHistory(){if(!this.editor)return;let t=this.editor.getValue();if(!t)return;let n=Object.keys(this.history).pop();if(this.history[n]===t)return;this.history[String(Date.now())]=t;let l=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,l)}},kh=wh;var _h=class{constructor(t){sr.highlightWithin(t)}},Sh=_h;var Eh=class{constructor(t){this.elem=t,this.trigger=t.querySelector("[collapsible-trigger]"),this.content=t.querySelector("[collapsible-content]"),!!this.trigger&&(this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError())}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),bi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),yi(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){this.content.querySelector(".text-neg.text-small")&&this.open()}},Ch=Eh;var Th=class{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){(t.keyCode===32||t.keyCode===13)&&(t.preventDefault(),this.toggle())}toggle(){this.checkbox.checked=!this.checkbox.checked,this.checkbox.dispatchEvent(new Event("change")),this.stateChange()}stateChange(){let t=this.checkbox.checked?"true":"false";this.display.setAttribute("aria-checked",t)}},Ah=Th;var Lh=class{constructor(t){this.elem=t,this.dealtWith=!1,t.addEventListener("toggle",this.onToggle.bind(this))}onToggle(){this.dealtWith||(sr.highlightWithin(this.elem),this.dealtWith=!0)}},Dh=Lh;var Ih=class{setup(){this.container=this.$el,this.menu=this.$refs.menu,this.toggle=this.$refs.toggle,this.moveMenu=this.$opts.moveMenu,this.bubbleEscapes=this.$opts.bubbleEscapes==="true",this.direction=document.dir==="rtl"?"right":"left",this.body=document.body,this.showing=!1,this.setupListeners(),this.hide=this.hide.bind(this)}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",c=>{this.menu.contains(c.target)||this.hide()});let n=this.menu.querySelector("input");n!==null&&n.focus(),this.showing=!0;let l=new Event("show");this.container.dispatchEvent(l),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(){let t=this.getFocusable(),l=t.indexOf(document.activeElement)+1;l>=t.length&&(l=0),t[l].focus()}focusPrevious(){let t=this.getFocusable(),l=t.indexOf(document.activeElement)-1;l<0&&(l=t.length-1),t[l].focus()}setupListeners(){this.container.addEventListener("click",n=>{Array.from(this.menu.querySelectorAll("a")).includes(n.target)&&this.hide()}),Rt(this.toggle,n=>{n.stopPropagation(),this.show(n),n instanceof KeyboardEvent&&this.focusNext()});let 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(),this.bubbleEscapes||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())})}},Fh=Ih;var Mh=class{setup(){this.elem=this.$el,this.searchInput=this.$refs.searchInput,this.loadingElem=this.$refs.loading,this.listContainerElem=this.$refs.listContainer,this.localSearchSelector=this.$opts.localSearchSelector,this.url=this.$opts.url,this.elem.addEventListener("show",this.onShow.bind(this)),this.searchInput.addEventListener("input",this.onSearch.bind(this)),this.runAjaxSearch=to(this.runAjaxSearch,300,!1)}onShow(){this.loadList()}onSearch(){let t=this.searchInput.value.toLowerCase().trim();this.localSearchSelector?this.runLocalSearch(t):(this.toggleLoading(!0),this.listContainerElem.innerHTML="",this.runAjaxSearch(t))}runAjaxSearch(t){this.loadList(t)}runLocalSearch(t){let n=this.listContainerElem.querySelectorAll(this.localSearchSelector);for(let l of n){let c=!t||l.textContent.toLowerCase().includes(t);l.style.display=c?"flex":"none",l.classList.toggle("hidden",!c)}}async loadList(t=""){this.listContainerElem.innerHTML="",this.toggleLoading(!0);try{let n=await window.$http.get(this.getAjaxUrl(t));this.listContainerElem.innerHTML=n.data}catch(n){console.error(n)}this.toggleLoading(!1),this.localSearchSelector&&this.onSearch()}getAjaxUrl(t=null){if(!t)return this.url;let n=this.url.includes("?")?"&":"?";return`${this.url}${n}search=${encodeURIComponent(t)}`}toggleLoading(t=!1){this.loadingElem.style.display=t?"block":"none"}},Oh=Mh;var Rh=_t(Ph());var zh=class{setup(){this.container=this.$el,this.url=this.$opts.url,this.successMessage=this.$opts.successMessage,this.removeMessage=this.$opts.removeMessage,this.uploadLimit=Number(this.$opts.uploadLimit),this.uploadLimitMessage=this.$opts.uploadLimitMessage,this.timeoutMessage=this.$opts.timeoutMessage;let t=this;this.dz=new Rh.default(this.container,{addRemoveLinks:!0,dictRemoveFile:this.removeMessage,timeout:Number(window.uploadTimeout)||6e4,maxFilesize:this.uploadLimit,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,l){let c=window.document.querySelector("meta[name=token]").getAttribute("content");l.append("_token",c),n.ontimeout=d=>{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),ya(t.previewElement,800,()=>{this.dz.removeFile(t)})}onError(t,n,l){this.$emit("error",{file:t,errorMessage:n,xhr:l});let c=d=>{let o=t.previewElement.querySelector("[data-dz-errormessage]");o.textContent=d};l&&l.status===413?c(this.uploadLimitMessage):n.file&&c(n.file)}removeAll(){this.dz.removeAllFiles(!0)}},Nh=zh;var Bh=class{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 l=n.target.closest("[toolbox-tab-button]");if(l===null)return;let c=l.getAttribute("toolbox-tab-button");this.setActiveTab(c,!0)}),this.setActiveTab(this.contentElements[0].getAttribute("toolbox-tab-content"))}toggle(){this.elem.classList.toggle("open");let t=this.elem.classList.contains("open")?"true":"false";this.toggleButton.setAttribute("aria-expanded",t)}setActiveTab(t,n=!1){for(let l=0,c=this.buttons.length;l<c;l++)this.buttons[l].classList.remove("active"),this.buttons[l].getAttribute("toolbox-tab-button")===t&&this.buttons[l].classList.add("active");for(let l=0,c=this.contentElements.length;l<c;l++)this.contentElements[l].style.display="none",this.contentElements[l].getAttribute("toolbox-tab-content")===t&&(this.contentElements[l].style.display="block");n&&!this.elem.classList.contains("open")&&this.toggle()}},qh=Bh;var $h=class{constructor(t){this.permissionsTable=t.querySelector("[permissions-table]"),this.restrictedCheckbox=t.querySelector("[name=restricted]"),this.restrictedCheckbox.addEventListener("change",this.updateTableVisibility.bind(this))}updateTableVisibility(){this.permissionsTable.style.display=this.restrictedCheckbox.checked?null:"none"}},Uh=$h;var jh=class{setup(){this.entityId=this.$opts.entityId,this.entityType=this.$opts.entityType,this.contentView=this.$refs.contentView,this.searchView=this.$refs.searchView,this.searchResults=this.$refs.searchResults,this.searchInput=this.$refs.searchInput,this.searchForm=this.$refs.searchForm,this.clearButton=this.$refs.clearButton,this.loadingBlock=this.$refs.loadingBlock,this.setupListeners()}setupListeners(){this.searchInput.addEventListener("change",this.runSearch.bind(this)),this.searchForm.addEventListener("submit",t=>{t.preventDefault(),this.runSearch()}),Rt(this.clearButton,this.clearSearch.bind(this))}runSearch(){let 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");let n=window.baseUrl(`/search/${this.entityType}/${this.entityId}`);window.$http.get(n,{term:t}).then(l=>{this.searchResults.innerHTML=l.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=""}},Hh=jh;var Wh=class{setup(){this.elem=this.$el,this.entityTypes=this.$opts.entityTypes||"page,book,chapter",this.entityPermission=this.$opts.entityPermission||"view",this.input=this.$refs.input,this.searchInput=this.$refs.search,this.loading=this.$refs.loading,this.resultsContainer=this.$refs.results,this.addButton=this.$refs.add,this.search="",this.lastClick=0,this.selectedItemData=null,this.setupListeners(),this.showLoading(),this.initialLoad()}setupListeners(){this.elem.addEventListener("click",this.onClick.bind(this));let t=0;this.searchInput.addEventListener("input",n=>{t=Date.now(),this.showLoading(),setTimeout(()=>{Date.now()-t<199||this.searchEntities(this.searchInput.value)},200)}),this.searchInput.addEventListener("keydown",n=>{n.keyCode===13&&n.preventDefault()}),this.addButton&&this.addButton.addEventListener("click",n=>{this.selectedItemData&&(this.confirmSelection(this.selectedItemData),this.unselectAll())}),jt(this.$el,"[data-entity-type]","keydown",(n,l)=>{if(n.ctrlKey&&n.code==="Enter"){let c=this.$el.closest("form");if(c){c.submit(),n.preventDefault();return}}n.code==="ArrowDown"&&this.focusAdjacent(!0),n.code==="ArrowUp"&&this.focusAdjacent(!1)}),this.searchInput.addEventListener("keydown",n=>{n.code==="ArrowDown"&&this.focusAdjacent(!0)})}focusAdjacent(t=!0){let n=Array.from(this.resultsContainer.querySelectorAll("[data-entity-type]")),l=n.indexOf(document.activeElement),c=n[l+(t?1:-1)]||n[0];c&&c.focus()}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()})}searchUrl(){return`/ajax/search/entities?types=${encodeURIComponent(this.entityTypes)}&permission=${encodeURIComponent(this.entityPermission)}`}searchEntities(t){this.input.value="";let n=`${this.searchUrl()}&term=${encodeURIComponent(t)}`;window.$http.get(n).then(l=>{this.resultsContainer.innerHTML=l.data,this.hideLoading()})}isDoubleClick(){let t=Date.now(),n=t-this.lastClick<300;return this.lastClick=t,n}onClick(t){let n=t.target.closest("[data-entity-type]");n&&(t.preventDefault(),t.stopPropagation(),this.selectItem(n))}selectItem(t){let n=this.isDoubleClick(),l=t.getAttribute("data-entity-type"),c=t.getAttribute("data-entity-id"),d=!t.classList.contains("selected")||n;this.unselectAll(),this.input.value=d?`${l}:${c}`:"";let o=t.getAttribute("href"),h=t.querySelector(".entity-list-item-name").textContent,f={id:Number(c),name:h,link:o};d?(t.classList.add("selected"),this.selectedItemData=f):window.$events.emit("entity-select-change",null),!(!n&&!d)&&(n&&this.confirmSelection(f),d&&window.$events.emit("entity-select-change",f))}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}},Gh=Wh;var Kh=class{setup(){this.elem=this.$el,this.selectButton=this.$refs.select,this.searchInput=this.$refs.searchInput,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(),this.searchInput.focus()}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")}},Vh=Kh;var Yh=class{setup(){this.container=this.$el,this.name=this.$opts.name,Rt(this.$el,()=>{this.$emit(this.name,this.$opts)})}},Xh=Yh;var Zh=class{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){bi(t,200)}close(t){yi(t,200)}click(t){t.preventDefault();let n=document.querySelectorAll(this.selector);for(let l of n)this.isOpen?this.close(l):this.open(l);this.isOpen=!this.isOpen,this.updateSystemAjax(this.isOpen)}updateSystemAjax(t){window.$http.patch(this.updateEndpoint,{expand:t?"true":"false"})}},Qh=Zh;var Jh=class{setup(){this.elem=this.$el,this.toggleButton=this.$refs.toggle,this.menu=this.$refs.menu,this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}onToggle(t){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.toggleButton.setAttribute("aria-expanded",this.open?"true":"false"),this.open?(this.elem.addEventListener("keydown",this.onKeyDown),window.addEventListener("click",this.onWindowClick)):(this.elem.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("click",this.onWindowClick)),t.stopPropagation()}onKeyDown(t){t.code==="Escape"&&this.onToggle(t)}onWindowClick(t){this.onToggle(t)}},ep=Jh;var tp=class{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(){let t=this.typeControl.value==="page";this.pagePickerContainer.style.display=t?"block":"none"}},rp=tp;var np=class{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(){Rt(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()}),Rt(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())}),jt(this.listContainer,".load-more","click",async t=>{eo(t.target),this.page++,await this.loadGallery(),t.target.remove()}),this.listContainer.addEventListener("event-emit-select-image",this.onImageSelectEvent.bind(this)),this.listContainer.addEventListener("error",t=>{t.target.src=baseUrl("loading_error.png")},!0),Rt(this.selectButton,()=>{this.callback&&this.callback(this.lastSelected),this.hide()}),jt(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(){let 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);t.page===1&&(this.listContainer.innerHTML=""),this.addReturnedHtmlElementsToList(n),Wc(this.listContainer)}addReturnedHtmlElementsToList(t){let n=document.createElement("div");n.innerHTML=t,window.components.init(n);for(let l of[...n.children])this.listContainer.appendChild(l)}setActiveFilterTab(t){this.filterTabs.forEach(l=>l.classList.remove("selected"));let n=this.filterTabs.find(l=>l.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(){eo(this.listContainer),this.page=1}refreshGallery(){this.resetListView(),this.loadGallery()}onImageSelectEvent(t){let n=JSON.parse(t.detail.data),l=n&&n.id===this.lastSelected.id&&Date.now()-this.lastSelectedTime<400,c=t.target.classList.contains("selected");[...this.listContainer.querySelectorAll(".selected")].forEach(d=>{d.classList.remove("selected")}),c?this.resetEditForm():(t.target.classList.add("selected"),this.loadImageEditForm(n.id)),this.selectButton.classList.toggle("hidden",c),l&&this.callback&&(this.callback(n),this.hide()),this.lastSelected=n,this.lastSelectedTime=Date.now()}async loadImageEditForm(t,n=!1){n||(this.formContainer.innerHTML="");let l=n?{delete:!0}:{},{data:c}=await window.$http.get(`/images/edit/${t}`,l);this.formContainer.innerHTML=c,window.components.init(this.formContainer)}},ip=np;var op=class{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"),t.querySelector('button[data-action="reset-image"]').addEventListener("click",this.reset.bind(this));let l=t.querySelector('button[data-action="remove-image"]');l&&l.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")}},ap=op;var sp=class{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){let n=t.target.closest("[data-sort-value]");this.sortInput.value=n.getAttribute("data-sort-value"),t.preventDefault(),this.form.submit()}sortDirectionClick(t){let l=this.orderInput.value==="asc"?"desc":"asc";this.orderInput.value=l,t.preventDefault(),this.form.submit()}},lp=sp;var _v=_t(hv()),Sv=_t(yv());var bv=class{constructor(t){this.data=t}hasItems(){return Boolean(this.data)&&Boolean(this.data.types)&&this.data.types.length>0}containsTabularData(){let t=this.data.getData("text/rtf");return t&&t.includes("\\trowd")}getImages(){let t=this.data.types,n=this.data.files,l=[];for(let c of t)if(c.includes("image")){let d=this.data.getData(c);l.push(d.getAsFile())}for(let c of n)c.type.includes("image")&&l.push(c);return l}},xo=bv;var mn=null,Rl,zl,Nl;function Wk(i,t,n){zl=t,Nl=n,mn=document.createElement("iframe"),mn.setAttribute("frameborder","0"),window.addEventListener("message",xv),mn.setAttribute("src",i),mn.setAttribute("class","fullscreen"),mn.style.backgroundColor="#FFFFFF",document.body.appendChild(mn),Rl=new URL(i).origin}function Gk(){wv()}function xv(i){if(!i.data||i.data.length<1||i.origin!==Rl)return;let t=JSON.parse(i.data);t.event==="init"?Yk():t.event==="exit"?wv():t.event==="save"?Vk(t):t.event==="export"&&Kk(t)}function Kk(i){Nl&&Nl(i.data)}function Vk(i){kv({action:"export",format:"xmlpng",xml:i.xml,spin:"Updating drawing"})}function Yk(){!zl||zl().then(i=>{kv({action:"load",autosave:1,xml:i})})}function wv(){window.removeEventListener("message",xv),mn&&document.body.removeChild(mn)}function kv(i){mn.contentWindow.postMessage(JSON.stringify(i),Rl)}async function Xk(i,t){let n={image:i,uploaded_to:t};return(await window.$http.post(window.baseUrl("/images/drawio"),n)).data}async function Zk(i){return`data:image/png;base64,${(await window.$http.get(window.baseUrl(`/images/drawio/base64/${i}`))).data.content}`}var zr={show:Wk,close:Gk,upload:Xk,load:Zk};var Ev=class{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.imageUploadErrorText=this.$opts.imageUploadErrorText,this.serverUploadLimitText=this.$opts.serverUploadLimitText,this.markdown=new _v.default({html:!0}),this.markdown.use(Sv.default,{label:!0}),this.display=this.elem.querySelector(".markdown-display"),this.displayStylesLoaded=!1,this.input=this.elem.querySelector("textarea"),this.cm=sr.markdownEditor(this.input),this.onMarkdownScroll=this.onMarkdownScroll.bind(this);let 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",o=>{let h=Date.now()-t<300,f=o.target.closest("a");if(f!==null){o.preventDefault(),window.open(f.getAttribute("href"));return}let p=o.target.closest("[drawio-diagram]");if(p!==null&&h){this.actionEditDrawing(p);return}t=Date.now()}),this.elem.addEventListener("click",o=>{let h=o.target.closest("button[data-action]");if(h===null)return;let f=h.getAttribute("data-action");if(f==="insertImage"&&this.actionInsertImage(),f==="insertLink"&&this.actionShowLinkSelector(),f==="insertDrawing"&&(o.ctrlKey||o.metaKey)){this.actionShowImageManager();return}f==="insertDrawing"&&this.actionStartDrawing(),f==="fullscreen"&&this.actionFullScreen()}),this.elem.addEventListener("click",o=>{let h=o.target.closest(".editor-toolbar-label");if(!h)return;let f=this.elem.querySelectorAll(".markdown-editor-wrap");for(let p of f)p.classList.remove("active");h.closest(".markdown-editor-wrap").classList.add("active")}),window.$events.listen("editor-markdown-update",o=>{this.cm.setValue(o),this.updateAndRender()}),this.codeMirrorSetup(),this.listenForBookStackEditorEvents();let l=new URL(window.location).searchParams.get("content-text");l&&this.scrollToText(l);let c=to(()=>sr.updateLayout(this.cm),100,!1);new ResizeObserver(c).observe(this.elem)}updateAndRender(){let t=this.cm.getValue();this.input.value=t;let 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.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="";let t=document.head.querySelectorAll("style,link[rel=stylesheet]");for(let n of t){let l=n.cloneNode(!0);this.displayDoc.head.appendChild(l)}this.displayStylesLoaded=!0}onMarkdownScroll(t){let n=this.displayDoc.body.children;if(n.length<=t)return;(t===-1?n[n.length-1]:n[t]).scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})}codeMirrorSetup(){let t=this.cm,n=this;t.setOption("direction","ltr");let l=sr.getMetaKey(),c={};c[`${l}-Alt-I`]=function(v){let k=`![${v.getSelection()}](http://)`,E=v.getCursor("from");v.replaceSelection(k),v.setCursor(E.line,E.ch+k.length-1)},c[`${l}-S`]=v=>{window.$events.emit("editor-save-draft")},c[`${l}-Enter`]=v=>{window.$events.emit("editor-save-page")},c[`Shift-${l}-K`]=v=>{this.actionShowLinkSelector()},c[`${l}-K`]=v=>{g()},c[`${l}-1`]=v=>{h("##")},c[`${l}-2`]=v=>{h("###")},c[`${l}-3`]=v=>{h("####")},c[`${l}-4`]=v=>{h("#####")},c[`${l}-5`]=v=>{h("")},c[`${l}-d`]=v=>{h("")},c[`${l}-6`]=v=>{h(">")},c[`${l}-q`]=v=>{h(">")},c[`${l}-7`]=v=>{p("\n```\n","\n```")},c[`${l}-8`]=v=>{p("`","`")},c[`Shift-${l}-E`]=v=>{p("`","`")},c[`${l}-9`]=v=>{p('<p class="callout info">',"</p>")},t.setOption("extraKeys",c),t.on("change",(v,b)=>{this.updateAndRender()});let d=to(v=>{let b=v.getScrollInfo();if(b.top+b.clientHeight===b.height){this.onMarkdownScroll(-1);return}let E=v.lineAtHeight(b.top,"local"),w=v.getRange({line:0,ch:null},{line:E,ch:null}),N=new DOMParser().parseFromString(this.markdown.render(w),"text/html").documentElement.querySelectorAll("body > *");this.onMarkdownScroll(N.length)},100);t.on("scroll",v=>{d(v)}),t.on("paste",(v,b)=>{let k=new xo(b.clipboardData||b.dataTransfer);if(!k.hasItems()||k.containsTabularData())return;let E=k.getImages();for(let w of E)y(w)}),t.on("drop",(v,b)=>{let k=b.dataTransfer.getData("bookstack/template");if(k){let w=v.coordsChar({left:b.pageX,top:b.pageY});v.setCursor(w),b.preventDefault(),window.$http.get(`/templates/${k}`).then(I=>{let S=I.data.markdown||I.data.html;v.replaceSelection(S)})}let E=new xo(b.dataTransfer);if(E.hasItems()&&E.getImages().length>0){let w=v.coordsChar({left:b.pageX,top:b.pageY});v.setCursor(w),b.stopPropagation(),b.preventDefault();let I=E.getImages();for(let S of I)y(S)}});function o(v,b){let k=t.getValue(),E=t.listSelections();t.setValue(k.replace(v,b)),t.setSelections(E)}function h(v){let b=t.getCursor(),k=t.getLine(b.line),E=k.length,w=k.split(" ")[0];if(w===v){k=k.replace(`${v} `,""),t.replaceRange(k,{line:b.line,ch:0},{line:b.line,ch:E}),t.setCursor({line:b.line,ch:b.ch-(v.length+1)});return}let I=/^[#>`]/.test(w),S=0;I?(S=v.length-w.length,k=k.replace(w,v).trim()):v!==""&&(S=v.length+1,k=v+" "+k),t.replaceRange(k,{line:b.line,ch:0},{line:b.line,ch:E}),t.setCursor({line:b.line,ch:b.ch+S})}function f(v,b){let k=t.getCursor(),E=t.getLine(k.line),w=E.length,I=E;E.indexOf(v)===0&&E.slice(-b.length)===b?I=E.slice(v.length,E.length-b.length):I=`${v}${E}${b}`,t.replaceRange(I,{line:k.line,ch:0},{line:k.line,ch:w}),t.setCursor({line:k.line,ch:k.ch+v.length})}function p(v,b){let k=t.getSelection();if(k==="")return f(v,b);let E=k,w=0,I=0;k.indexOf(v)===0&&k.slice(-b.length)===b?(E=k.slice(v.length,k.length-b.length),I=-(b.length+v.length)):(E=`${v}${k}${b}`,I=v.length+b.length);let S=t.listSelections()[0];t.replaceSelection(E);let N=S.head.ch<=S.anchor.ch;S.head.ch+=N?w:I,S.anchor.ch+=N?I:w,t.setSelections([S])}function y(v){if(v===null||v.type.indexOf("image")!==0)return;let b="png";if(v.name){let j=v.name.match(/\.(.+)$/);j.length>1&&(b=j[1])}let k="image-"+Math.random().toString(16).slice(2),E=window.baseUrl(`/loading.gif#upload${k}`),w=t.getSelection(),I=`![${w}](${E})`,S=t.getCursor();t.replaceSelection(I),t.setCursor({line:S.line,ch:S.ch+w.length+3});let N="image-"+Date.now()+"."+b,O=new FormData;O.append("file",v,N),O.append("uploaded_to",n.pageId),window.$http.post("/images/gallery",O).then(j=>{let U=`[![${w}](${j.data.thumbs.display})](${j.data.url})`;o(I,U)}).catch(j=>{window.$events.emit("error",n.imageUploadErrorText),o(I,w),console.log(j)})}function g(){let v=t.getCursor("from"),b=t.getSelection()||"",k=`[${b}]()`;t.focus(),t.replaceSelection(k);let E=b===""?-3:-1;t.setCursor(v.line,v.ch+k.length+E)}this.updateAndRender()}actionInsertImage(){let t=this.cm.getCursor("from");window.ImageManager.show(n=>{let l=n.thumbs.display||n.url,c=this.cm.getSelection(),d="[!["+(c||n.name)+"]("+l+")]("+n.url+")";this.cm.focus(),this.cm.replaceSelection(d),this.cm.setCursor(t.line,t.ch+d.length)},"gallery")}actionShowImageManager(){let t=this.cm.getCursor("from");window.ImageManager.show(n=>{this.insertDrawing(n,t)},"drawio")}actionShowLinkSelector(){let t=this.cm.getCursor("from");window.EntitySelectorPopup.show(n=>{let c=`[${this.cm.getSelection()||n.name}](${n.link})`;this.cm.focus(),this.cm.replaceSelection(c),this.cm.setCursor(t.line,t.ch+c.length)})}getDrawioUrl(){let t=document.querySelector("[drawio-url]");return t?t.getAttribute("drawio-url"):!1}actionStartDrawing(){let t=this.getDrawioUrl();if(!t)return;let n=this.cm.getCursor("from");zr.show(t,()=>Promise.resolve(""),l=>{let c={image:l,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",c).then(d=>{this.insertDrawing(d.data,n),zr.close()}).catch(d=>{this.handleDrawingUploadError(d)})})}insertDrawing(t,n){let l=`<div drawio-diagram="${t.id}"><img src="${t.url}"></div>`;this.cm.focus(),this.cm.replaceSelection(l),this.cm.setCursor(n.line,n.ch+l.length)}actionEditDrawing(t){let n=this.getDrawioUrl();if(!n)return;let l=this.cm.getCursor("from"),c=t.getAttribute("drawio-diagram");zr.show(n,()=>zr.load(c),d=>{let o={image:d,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",o).then(h=>{let f=`<div drawio-diagram="${h.data.id}"><img src="${h.data.url}"></div>`,p=this.cm.getValue().split(`
`).map(y=>y.indexOf(`drawio-diagram="${c}"`)!==-1?f:y).join(`
`);this.cm.setValue(p),this.cm.setCursor(l),this.cm.focus(),zr.close()}).catch(h=>{this.handleDrawingUploadError(h)})})}handleDrawingUploadError(t){t.status===413?window.$events.emit("error",this.serverUploadLimitText):window.$events.emit("error",this.imageUploadErrorText),console.log(t)}actionFullScreen(){let t=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(t){if(!t)return;let l=this.cm.getValue().split(/\r?\n/),c=l.findIndex(d=>d&&d.indexOf(t)!==-1);c!==-1&&(this.cm.scrollIntoView({line:c},200),this.cm.focus(),this.cm.setCursor({line:c,char:l[c].length}))}listenForBookStackEditorEvents(){function t({html:n,markdown:l}){return l||n}window.$events.listen("editor::replace",n=>{let l=t(n);this.cm.setValue(l)}),window.$events.listen("editor::append",n=>{let l=this.cm.getCursor("from"),c=t(n),d=this.cm.getValue()+`
`+c;this.cm.setValue(d),this.cm.setCursor(l.line,l.ch)}),window.$events.listen("editor::prepend",n=>{let l=this.cm.getCursor("from"),c=t(n),d=c+`
`+this.cm.getValue();this.cm.setValue(d);let o=c.split(`
`).length;this.cm.setCursor(l.line+o,l.ch)}),window.$events.listen("editor::insert",n=>{let l=t(n);this.cm.replaceSelection(l)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}},Cv=Ev;var Tv=class{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(){let t=this.inviteOption.value==="true",n=this.elem.querySelectorAll("input[type=password]");for(let c of n)c.disabled=t;let l=this.elem.querySelector("#password-input-container");l&&(l.style.display=t?"none":"block")}},Av=Tv;var Lv=class{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){let n=t.split(" ").length,l=Math.max(2e3,1e3+250*n);setTimeout(this.hide.bind(this),l)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}},Dv=Lv;var Iv=class{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){Rt(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),Rt(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}},Fv=Iv;var Mv=class{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^="#"]')){let d=t.target.href.split("#")[1];ro(document.querySelector("#"+d))}if(n===null)return;t.preventDefault();let l=n.getAttribute("action"),c=n.closest("[comment]");l==="edit"&&this.editComment(c),l==="closeUpdateForm"&&this.closeUpdateForm(),l==="delete"&&this.deleteComment(c),l==="addComment"&&this.showForm(),l==="hideForm"&&this.hideForm(),l==="reply"&&this.setReply(c),l==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){!this.editingComment||(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"),l=n.value.split(`
`).length;n.style.height=l*20+40+"px",this.editingComment=t}updateComment(t){let n=t.target;t.preventDefault();let c={text:n.querySelector("textarea").value,parent_id:this.parentId||null};this.showLoading(n);let d=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${d}`,c).then(o=>{let h=document.createElement("div");h.innerHTML=o.data,this.editingComment.innerHTML=h.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(l=>{t.parentNode.removeChild(t),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(t){t.preventDefault(),t.stopPropagation();let l={text:this.formInput.value,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,l).then(c=>{let d=document.createElement("div");d.innerHTML=c.data;let o=d.children[0];this.container.appendChild(o),window.components.init(o),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(c=>{window.$events.showValidationErrors(c),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";let 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){let n=t.querySelectorAll(".form-group");for(let l of n)l.style.display="none";t.querySelector(".form-group.loading").style.display="block"}hideLoading(t){let n=t.querySelectorAll(".form-group");for(let l of n)l.style.display="block";t.querySelector(".form-group.loading").style.display="none"}},Ov=Mv;var Pv=_t(Js());var Rv=class{constructor(t){if(this.elem=t,this.pageId=t.getAttribute("page-display"),sr.highlight(),this.setupPointer(),this.setupNavHighlighting(),this.setupDetailsCodeBlockRefresh(),window.location.hash){let l=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(l)}let n=document.querySelector(".sidebar-page-nav");n&&jt(n,"a","click",(l,c)=>{l.preventDefault(),window.components["tri-layout"][0].showContent();let d=c.getAttribute("href").substr(1);this.goToText(d),window.history.pushState(null,null,"#"+d)})}goToText(t){let n=document.getElementById(t);if(Jo(".page-content [data-highlighted]",l=>{l.removeAttribute("data-highlighted"),l.style.backgroundColor=null}),n!==null)ro(n);else{let l=Hc(".page-content > div > *",t);l&&ro(l)}}setupPointer(){let t=document.getElementById("pointer");if(!t)return;t=t.parentNode.removeChild(t);let n=t.querySelector("div.pointer"),l=!1,c=!1,d=!0,o="";jt(t,"input","click",(f,p)=>{p.select(),f.stopPropagation()}),ea(t,["click","focus"],f=>{f.stopPropagation()}),jt(t,"span.icon","click",(f,p)=>{f.stopPropagation(),d=!d,p.querySelector('[data-icon="include"]').style.display=d?"none":"inline",p.querySelector('[data-icon="link"]').style.display=d?"inline":"none",h()}),new Pv.default(t.querySelector("button")),ea(document.body,["click","focus"],f=>{!l||c||(t=t.parentElement.removeChild(t),l=!1)});let h=f=>{let p=d?window.baseUrl(`/link/${this.pageId}#${o}`):`{{@${this.pageId}#${o}}}`;d&&!p.startsWith("http")&&(p=window.location.protocol+"//"+window.location.host+p),t.querySelector("input").value=p;let y=t.querySelector("#pointer-edit");if(y&&f){let g=y.dataset.editHref,v=f.id,b=f.textContent&&f.textContent.substring(0,50);y.href=`${g}?content-id=${v}&content-text=${encodeURIComponent(b)}`}};Jo('.page-content [id^="bkmrk"]',f=>{ea(f,["mouseup","keyup"],p=>{p.stopPropagation(),window.getSelection().toString().length!==0&&(o=f.id,h(f),f.parentNode.insertBefore(t,f),t.style.display="block",l=!0,c=!0,requestAnimationFrame(()=>{let g=f.getBoundingClientRect(),v=p.pageX-g.left-164;v<0&&(v=0);let b=v/g.width*100;n.style.left=b+"%",setTimeout(()=>{c=!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&&l(n);function l(o){let h={rootMargin:"0px 0px 0px 0px",threshold:1},f=new IntersectionObserver(c,h);for(let p of o)f.observe(p)}function c(o,h){for(let f of o){let p=f.intersectionRatio===1;d(f.target.id,p)}}function d(o,h){Jo('a[href="#'+o+'"]',f=>{f.closest("li").classList.toggle("current-heading",h)})}}setupDetailsCodeBlockRefresh(){let t=l=>{[...l.target.querySelectorAll(".CodeMirror")].forEach(d=>d.CodeMirror&&d.CodeMirror.refresh())};[...this.elem.querySelectorAll("details")].forEach(l=>l.addEventListener("toggle",t))}},zv=Rv;function Nv(i){let t=new Date(i*1e3),n=t.getHours(),l=t.getMinutes();return`${(n>9?"":"0")+n}:${(l>9?"":"0")+l}`}var Bv=class{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.hasDefaultTitle||!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.shownWarningsCache=new Set,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)),Rt(this.saveDraftButton,this.saveDraft.bind(this)),Rt(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(()=>{if(Date.now()-this.autoSave.last<this.autoSave.frequency/2)return;let l=this.titleElem.value.trim()+"::"+this.editorHTML;l!==t&&(t=l,this.saveDraft())},this.autoSave.frequency)}savePage(){this.container.closest("form").submit()}async saveDraft(){let t={name:this.titleElem.value.trim(),html:this.editorHTML};this.editorType==="markdown"&&(t.markdown=this.editorMarkdown);try{let n=await window.$http.put(`/ajax/page/${this.pageId}/save-draft`,t);this.isNewDraft||this.toggleDiscardDraftVisibility(!0),this.draftNotifyChange(`${n.data.message} ${Nv(n.data.timestamp)}`),this.autoSave.last=Date.now(),n.data.warning&&!this.shownWarningsCache.has(n.data.warning)&&(window.$events.emit("warning",n.data.warning),this.shownWarningsCache.add(n.data.warning))}catch{try{let l=`draft-save-fail-${new Date().toISOString()}`;window.localStorage.setItem(l,JSON.stringify(t))}catch{}window.$events.emit("error",this.autosaveFailText)}}draftNotifyChange(t){this.draftDisplay.innerText=t,this.draftDisplayIcon.classList.add("visible"),window.setTimeout(()=>{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)}},qv=Bv;var $v=class{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(Ba(this.resetButton,n),Ba(this.buttonSep,n),Ba(this.defaultDisplay,!n),Ba(this.display,n),n){let l=this.getAssetIdFromVal();this.display.textContent=`#${l}, ${t}`,this.display.href=window.baseUrl(`/link/${l}`)}}getAssetIdFromVal(){return Number(this.value)}};function Ba(i,t){let n=i.tagName==="BUTTON"||i.tagName==="SPAN"?"inline-block":"block";i.style.display=t?n:"none"}var Uv=$v;var jv=class{constructor(t){this.container=t,t.querySelector("[permissions-table-toggle-all]").addEventListener("click",this.toggleAllClick.bind(this));let l=t.querySelectorAll("[permissions-table-toggle-all-in-row]");for(let d of l)d.addEventListener("click",this.toggleRowClick.bind(this));let c=t.querySelectorAll("[permissions-table-toggle-all-in-column]");for(let d of c)d.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();let n=t.target.closest("th,td"),l=Array.from(n.parentElement.children).indexOf(n),c=n.closest("table").querySelectorAll("tr"),d=[];for(let o of c){let h=o.children[l];h&&d.push(...h.querySelectorAll("input[type=checkbox]"))}this.toggleAllInputs(d)}toggleAllInElement(t){let n=t.querySelectorAll("input[type=checkbox]");this.toggleAllInputs(n)}toggleAllInputs(t){let n=t.length>0?t[0].checked:!1;for(let l of t)l.checked=!n,l.dispatchEvent(new Event("change"))}},Hv=jv;var Wv=class{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()}),Rt(this.hideButtons,n=>this.hide())}hide(t=null){ya(this.container,240,t),this.onkeyup&&(window.removeEventListener("keyup",this.onkeyup),this.onkeyup=null),this.onHide&&this.onHide()}show(t=null,n=null){Of(this.container,240,t),this.onkeyup=l=>{l.key==="Escape"&&this.hide()},window.addEventListener("keyup",this.onkeyup),this.onHide=n}},Gv=Wv;var Kv=class{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(){let t=this.colorInput.value,n=this.hexToRgb(t),l="rgba("+[n.r,n.g,n.b,"0.15"].join(",")+")";this.lightColorInput.value=l;let c=document.getElementById("custom-styles"),d=c.getAttribute("data-color"),o=c.getAttribute("data-color-light");c.innerHTML=c.innerHTML.split(d).join(t),c.innerHTML=c.innerHTML.split(o).join(l),c.setAttribute("data-color",t),c.setAttribute("data-color-light",l)}hexToRgb(t){let 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}}},Vv=Kv;var Yv=class{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})}},Xv=Yv;var Zv=class{constructor(t){this.elem=t,this.input=document.getElementById("books-input"),this.shelfBooksList=t.querySelector("[shelf-sort-assigned-books]"),this.initSortable(),this.setupListeners()}initSortable(){let t=this.elem.querySelectorAll(".scroll-box");for(let n of t)new vi(n,{group:"shelf-books",ghostClass:"primary-background-light",animation:150,onSort:this.onChange.bind(this)})}setupListeners(){this.elem.addEventListener("click",t=>{let n=t.target.closest(".scroll-box-item:not(.instruction)");n&&(t.preventDefault(),this.sortItemClick(n))})}sortItemClick(t){let n=this.elem.querySelectorAll(".scroll-box"),l=Array.from(n).filter(c=>t.parentElement!==c);l.length>0&&l[0].appendChild(t),this.onChange()}onChange(){let t=Array.from(this.shelfBooksList.querySelectorAll("[data-id]"));this.input.value=t.map(n=>n.getAttribute("data-id")).join(",")}},Qv=Zv;var Jv=class{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")}},ey=Jv;var ty=class{setup(){this.container=this.$el,this.handleSelector=this.$opts.handleSelector;let t=new vi(this.container,{handle:this.handleSelector,animation:150,onSort:()=>{this.$emit("sort",{ids:t.toArray()})},setData(n,l){let c=l.getAttribute("data-drag-content");if(c){let d=JSON.parse(c);for(let[o,h]of Object.entries(d))n.setData(o,h)}},revertOnSpill:!0,dropBubble:!0,dragoverBubble:!1})}},ry=ty;var ny=class{setup(){this.filter=this.$opts.filter,this.$el.addEventListener("change",t=>{if(this.filter&&!t.target.matches(this.filter))return;let n=this.$el.closest("form");n&&n.submit()})}},iy=ny;var oy=class{setup(){this.tabContentsByName={},this.tabButtonsByName={},this.allContents=[],this.allButtons=[];for(let[t,n]of Object.entries(this.$manyRefs||{})){if(t.startsWith("toggle")){let l=t.replace("toggle","").toLowerCase();Rt(n,c=>this.show(l)),this.allButtons.push(...n),this.tabButtonsByName[l]=n}if(t.startsWith("content")){let l=t.replace("content","").toLowerCase();this.tabContentsByName[l]=n,this.allContents.push(...n)}}}show(t){this.allContents.forEach(c=>{c.classList.add("hidden"),c.classList.remove("selected")}),this.allButtons.forEach(c=>c.classList.remove("selected"));let n=this.tabContentsByName[t]||[],l=this.tabButtonsByName[t]||[];n.length>0&&(n.forEach(c=>{c.classList.remove("hidden"),c.classList.add("selected")}),l.forEach(c=>c.classList.add("selected")))}},ay=oy;var sy=class{setup(){this.addRemoveComponentEl=this.$refs.addRemove,this.container=this.$el,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.container.addEventListener("change",t=>{let n=this.addRemoveComponentEl.components["add-remove-rows"];this.hasEmptyRows()||n.add()})}hasEmptyRows(){return[...this.container.querySelectorAll(this.rowSelector)].find(l=>[...l.querySelectorAll("input")].filter(c=>c.value).length===0)!==void 0}},ly=sy;var uy=class{constructor(t){this.elem=t,this.list=t.querySelector("[template-manager-list]"),this.searching=!1,jt(this.elem,"[template-action]","click",this.handleTemplateActionClick.bind(this)),jt(this.elem,".pagination a","click",this.handlePaginationClick.bind(this)),jt(this.elem,".template-item-content","click",this.handleTemplateItemClick.bind(this)),jt(this.elem,".template-item","dragstart",this.handleTemplateItemDragStart.bind(this)),this.setupSearchBox()}handleTemplateItemClick(t,n){let l=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(l,"replace")}handleTemplateItemDragStart(t,n){let l=n.closest("[template-id]").getAttribute("template-id");t.dataTransfer.setData("bookstack/template",l),t.dataTransfer.setData("text/plain",l)}handleTemplateActionClick(t,n){t.stopPropagation();let l=n.getAttribute("template-action"),c=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(c,l)}async insertTemplate(t,n="replace"){let l=await window.$http.get(`/templates/${t}`),c="editor::"+n;window.$events.emit(c,l.data)}async handlePaginationClick(t,n){t.preventDefault();let l=n.getAttribute("href"),c=await window.$http.get(l);this.list.innerHTML=c.data}setupSearchBox(){let t=this.elem.querySelector(".search-box");if(!t)return;let n=t.querySelector("input"),l=t.querySelector("button"),c=t.querySelector("button.search-box-cancel");async function d(){let o=n.value,h=await window.$http.get("/templates",{search:o});c.style.display=o?"block":"none",this.list.innerHTML=h.data}d=d.bind(this),t.addEventListener("keypress",o=>{o.key==="Enter"&&(o.preventDefault(),d())}),l.addEventListener("click",o=>{d()}),c.addEventListener("click",o=>{n.value="",d()})}},cy=uy;var fy=class{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";let t=new Event("change");this.input.dispatchEvent(t)}},dy=fy;var hy=class{setup(){this.container=this.$refs.container,this.tabs=this.$manyRefs.tab,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 t="tablet";window.innerWidth<=1e3&&(t="mobile"),window.innerWidth>=1400&&(t="desktop"),t!==this.lastLayoutType&&(this.onDestroy&&(this.onDestroy(),this.onDestroy=null),t==="desktop"?this.setupDesktop():t==="mobile"&&this.setupMobile(),this.lastLayoutType=t)}setupMobile(){for(let t of this.tabs)t.addEventListener("click",this.mobileTabClick);this.onDestroy=()=>{for(let t of this.tabs)t.removeEventListener("click",this.mobileTabClick)}}setupDesktop(){}mobileTabClick(t){let n=t.target.dataset.tab;this.showTab(n)}showContent(){this.showTab("content",!1)}showTab(t,n=!0){this.scrollCache[this.lastTabShown]=document.documentElement.scrollTop;for(let c of this.tabs){let d=c.dataset.tab===t;c.setAttribute("aria-selected",d?"true":"false")}let l=t==="info";if(this.container.classList.toggle("show-info",l),n){let d=document.querySelector("header").getBoundingClientRect().bottom;document.documentElement.scrollTop=this.scrollCache[t]||d,setTimeout(()=>{document.documentElement.scrollTop=this.scrollCache[t]||d},50)}this.lastTabShown=t}},py=hy;var my=class{setup(){this.input=this.$refs.input,this.userInfoContainer=this.$refs.userInfo,this.hide=this.$el.components.dropdown.hide,jt(this.$el,"a.dropdown-search-item","click",this.selectUser.bind(this))}selectUser(t,n){t.preventDefault();let l=n.getAttribute("data-id");this.input.value=l,this.userInfoContainer.innerHTML=n.innerHTML,this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hide()}},gy=my;var vy=class{setup(){this.checkboxes=this.$el.querySelectorAll('input[type="checkbox"]'),this.allCheckbox=this.$el.querySelector('input[type="checkbox"][value="all"]'),this.$el.addEventListener("change",t=>{t.target.checked&&t.target===this.allCheckbox?this.deselectIndividualEvents():t.target.checked&&(this.allCheckbox.checked=!1)})}deselectIndividualEvents(){for(let t of this.checkboxes)t!==this.allCheckbox&&(t.checked=!1)}},yy=vy;function by(i,t,n){let l=new xo(i.clipboardData||i.dataTransfer);if(!l.hasItems()||l.containsTabularData())return;let c=l.getImages();for(let d of c){let o="image-"+Math.random().toString(16).slice(2),h=window.baseUrl("/loading.gif");i.preventDefault(),setTimeout(()=>{t.insertContent(`<p><img src="${h}" id="${o}"></p>`),Jk(d,n).then(f=>{let p=f.name.replace(/"/g,""),y=`<img src="${f.thumbs.display}" alt="${p}" />`,g=t.dom.create("a",{target:"_blank",href:f.url},y);t.dom.replace(g,o)}).catch(f=>{t.dom.remove(o),window.$events.emit("error",n.imageUploadErrorText),console.log(f)})},10)}}async function Jk(i,t){if(i===null||i.type.indexOf("image")!==0)throw new Error("Not an image file");let n="png";if(i.name){let o=i.name.match(/\.(.+)$/);o.length>1&&(n=o[1])}let l="image-"+Date.now()+"."+n,c=new FormData;return c.append("file",i,l),c.append("uploaded_to",t.pageId),(await window.$http.post(window.baseUrl("/images/gallery"),c)).data}function e_(i){for(let t=1;t<5;t++)i.shortcuts.add("meta+"+t,"",["FormatBlock",!1,"h"+(t+1)]);i.shortcuts.add("meta+5","",["FormatBlock",!1,"p"]),i.shortcuts.add("meta+d","",["FormatBlock",!1,"p"]),i.shortcuts.add("meta+6","",["FormatBlock",!1,"blockquote"]),i.shortcuts.add("meta+q","",["FormatBlock",!1,"blockquote"]),i.shortcuts.add("meta+7","",["codeeditor",!1,"pre"]),i.shortcuts.add("meta+e","",["codeeditor",!1,"pre"]),i.shortcuts.add("meta+8","",["FormatBlock",!1,"code"]),i.shortcuts.add("meta+shift+E","",["FormatBlock",!1,"code"]),i.shortcuts.add("meta+S","",()=>{window.$events.emit("editor-save-draft")}),i.shortcuts.add("meta+13","",()=>{window.$events.emit("editor-save-page")}),i.shortcuts.add("meta+9","",function(){let t=i.selection.getNode(),n=t?t.closest(".callout"):null,l=["info","success","warning","danger"],d=(l.findIndex(h=>n&&n.classList.contains(h))+1)%l.length,o=l[d];i.formatter.apply("callout"+o)})}function t_(i){window.$http.get(window.baseUrl("/custom-head-content")).then(t=>{if(!t.data)return;let n=i.getDoc().querySelector("head");n.innerHTML+=t.data})}function r_(){function i(l){return l.className==="CodeMirrorContainer"}function t(l){let c=l.selection.getNode();if(!i(c)){let h=l.selection.getContent({format:"text"});window.components.first("code-editor").open(h,"",(f,p)=>{let y=document.createElement("div");y.innerHTML=`<pre><code class="language-${p}"></code></pre>`,y.querySelector("code").innerText=f,l.insertContent(y.innerHTML),l.focus()});return}let d=c.hasAttribute("data-lang")?c.getAttribute("data-lang"):"",o=c.querySelector("textarea").textContent;window.components.first("code-editor").open(o,d,(h,f)=>{let y=c.querySelector(".CodeMirror").CodeMirror;y&&(sr.setContent(y,h),sr.setMode(y,f,h));let g=c.querySelector("textarea");g&&(g.textContent=h),c.setAttribute("data-lang",f),l.focus()})}function n(l){let d=l.querySelector("textarea").textContent,o=l.getAttribute("data-lang");l.removeAttribute("contentEditable");let h=document.createElement("pre"),f=document.createElement("code");f.classList.add(`language-${o}`),f.textContent=d,h.appendChild(f),l.parentElement.replaceChild(h,l)}window.tinymce.PluginManager.add("codeeditor",function(l,c){let d=l.$;l.addButton("codeeditor",{text:"Code block",icon:!1,cmd:"codeeditor"}),l.addCommand("codeeditor",()=>{t(l)}),l.on("PreProcess",function(h){d("div.CodeMirrorContainer",h.node).each((f,p)=>{n(p)})}),l.on("dblclick",h=>{let f=l.selection.getNode();!i(f)||t(l)});function o(){d(".CodeMirrorContainer").filter((f,p)=>typeof p.querySelector(".CodeMirror").CodeMirror=="undefined").each((f,p)=>{n(p)}),d("body > pre").filter((f,p)=>p.contentEditable!=="false").each((f,p)=>{sr.wysiwygView(p)})}l.on("init",function(){l.undoManager.transact(function(){o()}),setTimeout(()=>{l.on("SetContent",()=>{setTimeout(o,100)})},200)})})}function n_(i,t,n,l){let c=null,d=null;function o(g){return g.hasAttribute("drawio-diagram")}function h(g,v=null){c=g,d=v,window.ImageManager.show(function(b){if(v){let k=v.querySelector("img");c.dom.setAttrib(k,"src",b.url),c.dom.setAttrib(v,"drawio-diagram",b.id)}else{let k=`<div drawio-diagram="${b.id}" contenteditable="false"><img src="${b.url}"></div>`;c.insertContent(k)}},"drawio")}function f(g,v=null){c=g,d=v,zr.show(i,y,p)}async function p(g){let v="image-"+Math.random().toString(16).slice(2),b=window.baseUrl("/loading.gif"),k=E=>{E.status===413?window.$events.emit("error",l.serverUploadLimitText):window.$events.emit("error",l.imageUploadErrorText),console.log(E)};if(d){zr.close();let E=d.querySelector("img");try{let w=await zr.upload(g,n);c.dom.setAttrib(E,"src",w.url),c.dom.setAttrib(d,"drawio-diagram",w.id)}catch(w){k(w)}return}setTimeout(async()=>{c.insertContent(`<div drawio-diagram contenteditable="false"><img src="${b}" id="${v}"></div>`),zr.close();try{let E=await zr.upload(g,n);c.dom.setAttrib(v,"src",E.url),c.dom.get(v).parentNode.setAttribute("drawio-diagram",E.id)}catch(E){c.dom.remove(v),k(E)}},5)}function y(){if(!d)return Promise.resolve("");let g=d.getAttribute("drawio-diagram");return zr.load(g)}window.tinymce.PluginManager.add("drawio",function(g,v){g.addCommand("drawio",()=>{let b=g.selection.getNode();f(g,o(b)?b:null)}),g.addButton("drawio",{type:"splitbutton",tooltip:"Drawing",image:`data:image/svg+xml;base64,${btoa(`<svg viewBox="0 0 24 24" fill="${t?"#BBB":"#000000"}" xmlns="http://www.w3.org/2000/svg">
<path d="M23 7V1h-6v2H7V1H1v6h2v10H1v6h6v-2h10v2h6v-6h-2V7h2zM3 3h2v2H3V3zm2 18H3v-2h2v2zm12-2H7v-2H5V7h2V5h10v2h2v10h-2v2zm4 2h-2v-2h2v2zM19 5V3h2v2h-2zm-5.27 9h-3.49l-.73 2H7.89l3.4-9h1.4l3.41 9h-1.63l-.74-2zm-3.04-1.26h2.61L12 8.91l-1.31 3.83z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let b=g.selection.getNode();h(g,o(b)?b:null)}}]}),g.on("dblclick",b=>{let k=g.selection.getNode();!o(k)||f(g,k)}),g.on("SetContent",function(){let b=g.$("body > div[drawio-diagram]");!b.length||g.undoManager.transact(function(){b.each((k,E)=>{E.setAttribute("contenteditable","false")})})})})}function i_(){window.tinymce.PluginManager.add("customhr",function(i){i.addCommand("InsertHorizontalRule",function(){let t=document.createElement("hr"),n=i.selection.getNode();n.parentNode.insertBefore(t,n)}),i.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),i.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function o_(i){window.$events.listen("editor::replace",({html:t})=>{i.setContent(t)}),window.$events.listen("editor::append",({html:t})=>{let n=i.getContent()+t;i.setContent(n)}),window.$events.listen("editor::prepend",({html:t})=>{let n=t+i.getContent();i.setContent(n)}),window.$events.listen("editor::insert",({html:t})=>{i.insertContent(t)}),window.$events.listen("editor::focus",()=>{i.focus()})}var xy=class{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.imageUploadErrorText=this.$opts.imageUploadErrorText,this.serverUploadLimitText=this.$opts.serverUploadLimitText,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image imagetools 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(){r_(),i_();let t=document.querySelector("[drawio-url]");if(t){let n=t.getAttribute("drawio-url");n_(n,this.isDarkMode,this.pageId,this),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){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 ${this.textDirection==="rtl"?"ltr rtl":""} fullscreen`}getTinyMceConfig(){let 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,l,c,d){c==="file"&&window.EntitySelectorPopup.show(function(o){let h=d.document.getElementById(n);h.value=o.link;let p=h.closest(".mce-form").querySelectorAll("input");p[1].value||(p[1].value=o.name),p[2].value=o.name}),c==="image"&&window.ImageManager.show(function(o){if(d.document.getElementById(n).value=o.url,"createEvent"in document){let p=document.createEvent("HTMLEvents");p.initEvent("change",!1,!0),d.document.getElementById(n).dispatchEvent(p)}else d.document.getElementById(n).fireEvent("onchange");let h=o.thumbs.display||o.url,f=`<a href="${o.url}" target="_blank">`;f+=`<img src="${h}" alt="${o.name}">`,f+="</a>",d.tinyMCE.activeEditor.execCommand("mceInsertContent",!1,f)},"gallery")},paste_preprocess:function(n,l){l.content.indexOf('<img src="file://')!==-1&&(l.content="")},init_instance_callback:function(n){t_(n)},setup:function(n){n.on("ExecCommand change input NodeChange ObjectResized",l),n.on("init",()=>{l();let p=new URL(window.location).searchParams.get("content-id");p&&c(p);let g=n.getContainer().querySelectorAll(".mce-btn");for(let v of g)v.addEventListener("touchstart",b=>{b.stopPropagation()});window.editor=n});function l(){let f=n.getContent();t.isDarkMode&&n.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change",f)}function c(f){let p=n.dom.get(encodeURIComponent(f).replace(/!/g,"%21"));!p||(p.scrollIntoView(),n.selection.select(p,!0),n.selection.collapse(!1),n.focus())}o_(n),window.$events.listen("editor-html-update",f=>{n.setContent(f),n.selection.select(n.getBody(),!0),n.selection.collapse(!1),l(f)}),e_(n);let d,o;function h(f){return f&&!!(f.textContent||f.innerText)}n.on("dragstart",function(){let f=n.selection.getNode();f.nodeName==="IMG"&&(d=n.dom.getParent(f,".mceTemp"),!d&&f.parentNode.nodeName==="A"&&!h(f.parentNode)&&(d=f.parentNode)),f.hasAttribute("contenteditable")&&f.getAttribute("contenteditable")==="false"&&(o=f)}),n.on("drop",function(f){let p=n.dom,y=tinymce.dom.RangeUtils.getCaretRangeFromPoint(f.clientX,f.clientY,n.getDoc()),g=f.dataTransfer&&f.dataTransfer.getData("bookstack/template");g&&(f.preventDefault(),window.$http.get(`/templates/${g}`).then(v=>{n.selection.setRng(y),n.undoManager.transact(function(){n.execCommand("mceInsertContent",!1,v.data.html)})})),p.getParent(y.startContainer,".mceTemp")?f.preventDefault():d&&(f.preventDefault(),n.undoManager.transact(function(){n.selection.setRng(y),n.selection.setNode(d),p.remove(d)})),!f.isDefaultPrevented()&&o&&(f.preventDefault(),n.undoManager.transact(function(){let v=n.selection.getNode(),b=n.selection.getRng(),k=v.closest("body > *");b.startOffset>b.startContainer.length/2?n.$(k).after(o):n.$(k).before(o)})),f.isDefaultPrevented()||by(f,n,t),d=null}),n.addButton("image-insert",{title:"My title",icon:"image",tooltip:"Insert an image",onclick:function(){window.ImageManager.show(function(f){let p=f.thumbs.display||f.url,y=`<a href="${f.url}" target="_blank">`;y+=`<img src="${p}" alt="${f.name}">`,y+="</a>",n.execCommand("mceInsertContent",!1,y)},"gallery")}}),n.on("paste",f=>by(f,n,t)),window.$events.emitPublic(t.elem,"editor-tinymce::setup",{editor:n})}}}},wy=xy;var ky={"add-remove-rows":Xc,"ajax-delete-row":Qc,"ajax-form":ef,attachments:rf,"attachments-list":of,"auto-suggest":sf,"back-to-top":uf,"book-sort":Mf,"chapter-toggle":Rf,"code-editor":kh,"code-highlighter":Sh,collapsible:Ch,"custom-checkbox":Ah,"details-highlighter":Dh,dropdown:Fh,"dropdown-search":Oh,dropzone:Nh,"editor-toolbox":qh,"entity-permissions-editor":Uh,"entity-search":Hh,"entity-selector":Gh,"entity-selector-popup":Vh,"event-emit-select":Xh,"expand-toggle":Qh,"header-mobile-toggle":ep,"homepage-control":rp,"image-manager":ip,"image-picker":ap,index:qa,"list-sort-control":lp,"markdown-editor":Cv,"new-user-password":Av,notification:Dv,"optional-input":Fv,"page-comments":Ov,"page-display":zv,"page-editor":qv,"page-picker":Uv,"permissions-table":Hv,popup:Gv,"setting-app-color-picker":Vv,"setting-color-picker":Xv,"shelf-sort":Qv,sidebar:ey,"sortable-list":ry,"submit-on-change":iy,tabs:ay,"tag-manager":ly,"template-manager":cy,"toggle-switch":dy,"tri-layout":py,"user-select":gy,"webhook-events":yy,"wysiwyg-editor":wy};window.components={};function a_(i,t){let n=t.querySelectorAll(`[${i}]`);for(let l=0,c=n.length;l<c;l++)_y(i,n[l])}function _y(i,t){let n=ky[i];if(n===void 0)return;let l;try{l=new n(t),l.$el=t;let c=s_(i,t);l.$refs=c.refs,l.$manyRefs=c.manyRefs,l.$opts=l_(i,t),l.$emit=(d,o={})=>{o.from=l;let h=new CustomEvent(`${i}-${d}`,{bubbles:!0,detail:o});l.$el.dispatchEvent(h)},typeof l.setup=="function"&&l.setup()}catch(c){console.error("Failed to create component",c,i,t)}typeof window.components[i]=="undefined"&&(window.components[i]=[]),window.components[i].push(l),typeof t.components=="undefined"&&(t.components={}),t.components[i]=l}function s_(i,t){let n={},l={},c=`${i}@`,d=`[refs*="${c}"]`,o=[...t.querySelectorAll(d)];t.matches(d)&&o.push(t);for(let h of o){let f=h.getAttribute("refs").split(" ").filter(p=>p.startsWith(c)).map(p=>p.replace(c,"")).map(Sy);for(let p of f)n[p]=h,typeof l[p]=="undefined"&&(l[p]=[]),l[p].push(h)}return{refs:n,manyRefs:l}}function l_(i,t){let n={},l=`option:${i}:`;for(let{name:c,value:d}of t.attributes)if(c.startsWith(l)){let o=c.replace(l,"");n[Sy(o)]=d||""}return n}function Sy(i){let t=l=>l.slice(0,1).toUpperCase()+l.slice(1),n=i.split("-");return n[0]+n.slice(1).map(t).join("")}function Ey(i){typeof i=="undefined"&&(i=document);for(let n of Object.keys(ky))a_(n,i);let t=i.querySelectorAll("[component],[components]");for(let n of t){let l=`${n.getAttribute("component")||""} ${n.getAttribute("components")}`.toLowerCase().split(" ").filter(Boolean);for(let c of l)_y(c,n)}}window.components.init=Ey;window.components.first=i=>(window.components[i]||[null])[0];var qa=Ey;window.baseUrl=function(i){let t=document.querySelector('meta[name="base-url"]').getAttribute("content");return t[t.length-1]==="/"&&(t=t.slice(0,t.length-1)),i[0]==="/"&&(i=i.slice(1)),t+"/"+i};window.$http=$c;window.$events=Bc;var Ei=new jc;window.trans=Ei.get.bind(Ei);window.trans_choice=Ei.getPlural.bind(Ei);window.trans_plural=Ei.parsePlural.bind(Ei);qa();})();
/*!
* clipboard.js v2.0.8
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
//# sourceMappingURL=app.js.map