2023-01-31 06:59:51 -05:00
|
|
|
var Af=Object.create;var wl=Object.defineProperty;var Df=Object.getOwnPropertyDescriptor;var Ff=Object.getOwnPropertyNames;var If=Object.getPrototypeOf,qf=Object.prototype.hasOwnProperty;var qe=(u,P)=>()=>(P||u((P={exports:{}}).exports,P),P.exports);var Of=(u,P,z,O)=>{if(P&&typeof P=="object"||typeof P=="function")for(let S of Ff(P))!qf.call(u,S)&&S!==z&&wl(u,S,{get:()=>P[S],enumerable:!(O=Df(P,S))||O.enumerable});return u};var We=(u,P,z)=>(z=u!=null?Af(If(u)):{},Of(P||!u||!u.__esModule?wl(z,"default",{value:u,enumerable:!0}):z,u));var Oe=qe((vo,yo)=>{(function(u,P){typeof vo=="object"&&typeof yo<"u"?yo.exports=P():typeof define=="function"&&define.amd?define(P):(u=u||self,u.CodeMirror=P())})(vo,function(){"use strict";var u=navigator.userAgent,P=navigator.platform,z=/gecko\/\d/i.test(u),O=/MSIE \d/.test(u),S=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(u),A=/Edge\/(\d+)/.exec(u),p=O||S||A,D=p&&(O?document.documentMode||6:+(A||S)[1]),w=!A&&/WebKit\//.test(u),L=w&&/Qt\/\d+\.\d+/.test(u),T=!A&&/Chrome\/(\d+)/.exec(u),m=T&&+T[1],b=/Opera\//.test(u),d=/Apple Computer/.test(navigator.vendor),g=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(u),k=/PhantomJS/.test(u),y=d&&(/Mobile\/\w+/.test(u)||navigator.maxTouchPoints>2),U=/Android/.test(u),_=y||U||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(u),W=y||/Mac/.test(P),Z=/\bCrOS\b/.test(u),ee=/win/i.test(P),oe=b&&u.match(/Version\/(\d*\.\d*)/);oe&&(oe=Number(oe[1])),oe&&oe>=15&&(b=!1,w=!0);var Q=W&&(L||b&&(oe==null||oe<12.11)),j=z||p&&D>=9;function N(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var G=function(e,t){var n=e.className,r=N(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function R(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function I(e,t){return R(e).appendChild(t)}function c(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function B(e,t,n,r){var i=c(e,t,n,r);return i.setAttribute("role","presentation"),i}var $;document.createRange?$=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:$=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function M(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function C(e){var t;try{t=e.activeElement}catch{t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function V(e,t){var n=e.className;N(t).test(n)||(e.className+=(n?" ":"")+t)}function Y(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!N(n[r]).test(t)&&(t+=" "+n[r]);return t}var x=function(e){e.select()};y?x=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:p&&(x=function(e){try{e.select()}catch{}});function h(e){return e.display.wrapper.ownerDocument}function se(e){return h(e).defaultView}function _e(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ue(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function he(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}var Te=function(){this.id=null,this.f=null,this.time=0,this.handler=_e(this.onTimeout,this)};Te.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Te.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function Se(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var ae=50,fe={toString:function(){return"CodeMirror.Pass"}},ve={scroll:!1},De={origin:"*mouse"},Qe={or
|
2022-02-26 07:01:44 -05:00
|
|
|
|
2023-01-31 06:59:51 -05:00
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|
|
|
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},sr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},$t=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Kt=null;function Wn(e){if(Kt!=null)return Kt;var t=I(e,c("span","x")),n=t.getBoundingClientRect(),r=$(t,0,1).getBoundingClientRect();return Kt=Math.abs(n.left-r.left)>1}var Wt={},ur={};function jn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wt[e]=t}function Ir(e,t){ur[e]=t}function zt(e){if(typeof e=="string"&&ur.hasOwnProperty(e))e=ur[e];else if(e&&typeof e.name=="string"&&ur.hasOwnProperty(e.name)){var t=ur[e.name];typeof t=="string"&&(t={name:t}),e=J(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return zt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return zt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Vt(e,t){t=zt(t);var n=Wt[t.name];if(!n)return Vt(e,"text/plain");var r=n(e,t);if(cr.hasOwnProperty(t.name)){var i=cr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var cr={};function Bn(e,t){var n=cr.hasOwnProperty(e)?cr[e]:cr[e]={};ue(t,n)}function er(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function fr(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function an(e,t,n){return e.startState?e.startState(t,n):!0}var et=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};et.prototype.eol=function(){return this.pos>=this.string.length},et.prototype.sol=function(){return this.pos==this.lineStart},et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},et.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},et.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},et.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},et.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},et.prototype.skipToEnd=function(){this.pos=this.string.length},et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},et.prototype.backUp=function(e){this.pos-=e},et.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=he(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?he(this.string,this.lineStart,this.tabSize):0)},et.prototype.indentation=function(){return he(this.string,null,this.tabSize)-(this.lineStart?he(this.string,this.lineStart,this.tabSize):0)},et.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(a){return n?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},et.prototype.current=function(){return this.string.slice(this.start,this.pos)},et.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},et.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},et.pr
|
|
|
|
`?(ie=E.appendChild(c("span",X[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ie.setAttribute("cm-text",X[0]),e.col+=1):(ie=e.cm.options.specialCharPlaceholder(X[0]),ie.setAttribute("cm-text",X[0]),p&&D<9?E.appendChild(c("span",[ie])):E.appendChild(ie),e.col+=1);e.map.push(e.pos,e.pos+1,ie),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||f||o||a){var ge=n||"";r&&(ge+=r),i&&(ge+=i);var pe=c("span",[E],ge,o);if(a)for(var ye in a)a.hasOwnProperty(ye)&&ye!="style"&&ye!="class"&&pe.setAttribute(ye,a[ye]);return e.content.appendChild(pe)}e.content.appendChild(E)}}function Qu(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),r+=o,n=o==" "}return r}function Yu(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var f=n.pos,E=f+r.length;;){for(var F=void 0,X=0;X<t.length&&(F=t[X],!(F.to>f&&F.from<=f));X++);if(F.to>=E)return e(n,r,i,o,a,l,s);e(n,r.slice(0,F.to-f),i,o,null,l,s),o=null,r=r.slice(F.to-f),f=F.to}}}function Bo(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ju(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var a=1;a<n.length;a+=2)t.addToken(t,i.slice(o,o=n[a]),Wo(n[a+1],t.cm.options));return}for(var l=i.length,s=0,f=1,E="",F,X,K=0,re,ie,ce,de,ge;;){if(K==s){re=ie=ce=X="",ge=null,de=null,K=1/0;for(var pe=[],ye=void 0,Ce=0;Ce<r.length;++Ce){var we=r[Ce],Ie=we.marker;if(Ie.type=="bookmark"&&we.from==s&&Ie.widgetNode)pe.push(Ie);else if(we.from<=s&&(we.to==null||we.to>s||Ie.collapsed&&we.to==s&&we.from==s)){if(we.to!=null&&we.to!=s&&K>we.to&&(K=we.to,ie=""),Ie.className&&(re+=" "+Ie.className),Ie.css&&(X=(X?X+";":"")+Ie.css),Ie.startStyle&&we.from==s&&(ce+=" "+Ie.startStyle),Ie.endStyle&&we.to==K&&(ye||(ye=[])).push(Ie.endStyle,we.to),Ie.title&&((ge||(ge={})).title=Ie.title),Ie.attributes)for(var Ze in Ie.attributes)(ge||(ge={}))[Ze]=Ie.attributes[Ze];Ie.collapsed&&(!de||Ei(de.marker,Ie)<0)&&(de=we)}else we.from>s&&K>we.from&&(K=we.from)}if(ye)for(var ft=0;ft<ye.length;ft+=2)ye[ft+1]==K&&(ie+=" "+ye[ft]);if(!de||de.from==s)for(var Je=0;Je<pe.length;++Je)Bo(t,0,pe[Je]);if(de&&(de.from||0)==s){if(Bo(t,(de.to==null?l+1:de.to)-s,de.marker,de.from==null),de.to==null)return;de.to==s&&(de=!1)}}if(s>=l)break;for(var At=Math.min(l,K);;){if(E){var Ct=s+E.length;if(!de){var it=Ct>At?E.slice(0,At-s):E;t.addToken(t,it,F?F+re:re,ce,s+it.length==K?ie:"",X,ge)}if(Ct>=At){E=E.slice(At-s),s=At;break}s=Ct,ce=""}E=i.slice(o,o=n[f++]),F=Wo(n[f++],t.cm.options)}}}function Ho(e,t,n){this.line=t,this.rest=Hu(t),this.size=this.rest?He(Ee(this.rest))-n+1:1,this.node=this.text=null,this.hidden=dr(e,t)}function Xn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new Ho(e.doc,xe(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Nr=null;function Vu(e){Nr?Nr.ops.push(e):e.ownsGroup=Nr={ops:[e],delayedCallbacks:[]}}function ec(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function tc(e,t){var n=e.ownsGroup;if(n)try{ec(n)}finally{Nr=null,t(n)}}var un=null;function st(e,t){var n=tn(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Nr?i=Nr.delayedCallbacks:un?i=un:(i=un=[],setTimeout(rc,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function rc(){var e=un;un=null;for(var t=0;t<e.length;++t)e[t]()}function Uo(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?ic(e,t):o=="gutter"?Ko(e,t,n,r):o=="class"?Ai(e,t):o=="widget"&&oc(e,t,r)}t.changes=null}function cn(e){return e.node==e.text&&(e.node=c("div",null,null,"position: rela
|
|
|
|
top: `+ye+"px; width: "+(Ce??s-pe)+`px;
|
|
|
|
height: `+(we-ye)+"px"))}function F(pe,ye,Ce){var we=xe(i,pe),Ie=we.text.length,Ze,ft;function Je(it,Et){return Jn(e,H(pe,it),"div",we,Et)}function At(it,Et,pt){var lt=la(e,we,null,it),ot=Et=="ltr"==(pt=="after")?"left":"right",tt=pt=="after"?lt.begin:lt.end-(/\s/.test(we.text.charAt(lt.end-1))?2:1);return Je(tt,ot)[ot]}var Ct=Nt(we,i.direction);return Dt(Ct,ye||0,Ce??Ie,function(it,Et,pt,lt){var ot=pt=="ltr",tt=Je(it,ot?"left":"right"),Lt=Je(Et-1,ot?"right":"left"),Vr=ye==null&&it==0,xr=Ce==null&&Et==Ie,yt=lt==0,Yt=!Ct||lt==Ct.length-1;if(Lt.top-tt.top<=3){var dt=(f?Vr:xr)&&yt,mo=(f?xr:Vr)&&Yt,lr=dt?l:(ot?tt:Lt).left,Ar=mo?s:(ot?Lt:tt).right;E(lr,tt.top,Ar-lr,tt.bottom)}else{var Dr,kt,en,go;ot?(Dr=f&&Vr&&yt?l:tt.left,kt=f?s:At(it,pt,"before"),en=f?l:At(Et,pt,"after"),go=f&&xr&&Yt?s:Lt.right):(Dr=f?At(it,pt,"before"):l,kt=!f&&Vr&&yt?s:tt.right,en=!f&&xr&&Yt?l:Lt.left,go=f?At(Et,pt,"after"):s),E(Dr,tt.top,kt-Dr,tt.bottom),tt.bottom<Lt.top&&E(l,tt.bottom,null,Lt.top),E(en,Lt.top,go-en,Lt.bottom)}(!Ze||ei(tt,Ze)<0)&&(Ze=tt),ei(Lt,Ze)<0&&(Ze=Lt),(!ft||ei(tt,ft)<0)&&(ft=tt),ei(Lt,ft)<0&&(ft=Lt)}),{start:Ze,end:ft}}var X=t.from(),K=t.to();if(X.line==K.line)F(X.line,X.ch,K.ch);else{var re=xe(i,X.line),ie=xe(i,K.line),ce=jt(re)==jt(ie),de=F(X.line,X.ch,ce?re.text.length+1:null).end,ge=F(K.line,ce?0:null,K.ch).start;ce&&(de.top<ge.top-2?(E(de.right,de.top,null,de.bottom),E(l,ge.top,ge.left,ge.bottom)):E(de.right,de.top,ge.left-de.right,de.bottom)),de.bottom<ge.top&&E(l,de.bottom,null,ge.top)}n.appendChild(o)}function Hi(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||jr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function fa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||$i(e))}function Ui(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&jr(e))},100)}function $i(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Xe(e,"focus",e,t),e.state.focused=!0,V(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),w&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Hi(e))}function jr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Xe(e,"blur",e,t),e.state.focused=!1,G(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ti(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,a=0;a<t.view.length;a++){var l=t.view[a],s=e.options.lineWrapping,f=void 0,E=0;if(!l.hidden){if(i+=l.line.height,p&&D<8){var F=l.node.offsetTop+l.node.offsetHeight;f=F-n,n=F}else{var X=l.node.getBoundingClientRect();f=X.bottom-X.top,!s&&l.text.firstChild&&(E=l.text.firstChild.getBoundingClientRect().right-X.left-1)}var K=l.line.height-f;if((K>.005||K<-.005)&&(i<r&&(o-=K),Rt(l.line,f),da(l.line),l.rest))for(var re=0;re<l.rest.length;re++)da(l.rest[re]);if(E>e.display.sizerWidth){var ie=Math.ceil(E/Wr(e.display));ie>e.display.maxLineLength&&(e.display.maxLineLength=ie,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function da(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ri(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Qn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=Gt(t,r),a=Gt(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=Gt(t,nr(xe(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=Gt(t,nr(xe(t,s))-e.wrapper.clientHei
|
|
|
|
top: `+(t.top-n.viewOffset-Qn(e.display))+`px;
|
|
|
|
height: `+(t.bottom-t.top+Xt(e)+n.barHeight)+`px;
|
|
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function bc(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?H(t.line,t.ch+1,"before"):t,t=t.ch?H(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Bt(e,t),s=!n||n==t?l:Bt(e,n);i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r};var f=Ki(e,i),E=e.doc.scrollTop,F=e.doc.scrollLeft;if(f.scrollTop!=null&&(mn(e,f.scrollTop),Math.abs(e.doc.scrollTop-E)>1&&(a=!0)),f.scrollLeft!=null&&(Er(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-F)>1&&(a=!0)),!a)break}return i}function xc(e,t){var n=Ki(e,t);n.scrollTop!=null&&mn(e,n.scrollTop),n.scrollLeft!=null&&Er(e,n.scrollLeft)}function Ki(e,t){var n=e.display,r=Rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Fi(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Di(n),s=t.top<r,f=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var E=Math.min(t.top,(f?l:t.bottom)-o);E!=i&&(a.scrollTop=E)}var F=e.options.fixedGutter?0:n.gutters.offsetWidth,X=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-F,K=wr(e)-n.gutters.offsetWidth,re=t.right-t.left>K;return re&&(t.right=t.left+K),t.left<10?a.scrollLeft=0:t.left<X?a.scrollLeft=Math.max(0,t.left+F-(re?0:10)):t.right>K+X-3&&(a.scrollLeft=t.right+(re?0:10)-K),a}function Gi(e,t){t!=null&&(ni(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Br(e){ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function hn(e,t,n){(t!=null||n!=null)&&ni(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function _c(e,t){ni(e),e.curOp.scrollToPos=t}function ni(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=oa(e,t.from),r=oa(e,t.to);pa(e,n,r,t.margin)}}function pa(e,t,n,r){var i=Ki(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});hn(e,i.scrollLeft,i.scrollTop)}function mn(e,t){Math.abs(e.doc.scrollTop-t)<2||(z||Xi(e,{top:t}),ha(e,t,!0),z&&Xi(e),yn(e,100))}function ha(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Er(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ba(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function gn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Di(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Xt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Lr=function(e,t,n){this.cm=n;var r=this.vert=c("div",[c("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=c("div",[c("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),me(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),me(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&D<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Lr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.sty
|
|
|
|
`},setDirection:ct(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Nc(this.cm))})}),Tt.prototype.eachLine=Tt.prototype.iter;var Qa=0;function Qc(e){var t=this;if(Ya(t),!(Ve(t,e)||ir(t.display,e))){gt(e),p&&(Qa=+new Date);var n=Tr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(){++a==i&&ut(t,function(){n=Me(t.doc,n);var K={from:n,to:n,text:t.doc.splitLines(o.filter(function(re){return re!=null}).join(t.doc.lineSeparator())),origin:"paste"};Kr(t.doc,K),qa(t.doc,mr(Me(t.doc,n),Me(t.doc,gr(K))))})()},s=function(K,re){if(t.options.allowDropFileTypes&&Se(t.options.allowDropFileTypes,K.type)==-1){l();return}var ie=new FileReader;ie.onerror=function(){return l()},ie.onload=function(){var ce=ie.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ce)){l();return}o[re]=ce,l()},ie.readAsText(K)},f=0;f<r.length;f++)s(r[f],f);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var E=e.dataTransfer.getData("Text");if(E){var F;if(t.state.draggingText&&!t.state.draggingText.copy&&(F=t.listSelections()),ui(t.doc,mr(n,n)),F)for(var X=0;X<F.length;++X)Gr(t.doc,"",F[X].anchor,F[X].head,"drag");t.replaceSelection(E,"around","paste"),t.display.input.focus()}}catch{}}}}function Yc(e,t){if(p&&(!e.state.draggingText||+new Date-Qa<100)){Jt(t);return}if(!(Ve(e,t)||ir(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=c("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",b&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),b&&n.parentNode.removeChild(n)}}function Jc(e,t){var n=Tr(e,t);if(n){var r=document.createDocumentFragment();Bi(e,n,r),e.display.dragCursor||(e.display.dragCursor=c("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),I(e.display.dragCursor,r)}}function Ya(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ja(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var o=0;o<n.length;o++)e(n[o])})}}var Va=!1;function Vc(){Va||(ef(),Va=!0)}function ef(){var e;me(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ja(tf)},100))}),me(window,"blur",function(){return Ja(jr)})}function tf(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var br={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"},En=0;En<10;En++)br[En+48]=br[En+96]=String(En);for(var di=65;di<=90;di++)br[di]=String.fromCharCode(di);for(var Ln=1;Ln<=12;Ln++)br[Ln+111]=br[Ln+63235]="F"+Ln;var ar={};ar.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"},ar.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine"
|
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function nl(e,t){var n=xe(e.doc,t),r=jt(n);return r!=n&&(t=He(r)),lo(!0,e,r,t,1)}function af(e,t){var n=xe(e.doc,t),r=Bu(n);return r!=n&&(t=He(r)),lo(!0,e,n,t,-1)}function il(e,t){var n=nl(e,t.line),r=xe(e.doc,n.line),i=Nt(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return H(n.line,a?0:o,n.sticky)}return n}function hi(e,t,n){if(typeof t=="string"&&(t=zn[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=fe}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function lf(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Xr(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Xr(t,e.options.extraKeys,n,e)||Xr(t,e.options.keyMap,n,e)}var sf=new Te;function Mn(e,t,n,r){var i=e.state.keySeq;if(i){if(el(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:sf.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ol(e,i+" "+t,n,r))return!0}return ol(e,t,n,r)}function ol(e,t,n,r){var i=lf(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&st(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(gt(n),Hi(e)),!!i}function al(e,t){var n=rl(t,!0);return n?t.shiftKey&&!e.state.keySeq?Mn(e,"Shift-"+n,t,function(r){return hi(e,r,!0)})||Mn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return hi(e,r)}):Mn(e,n,t,function(r){return hi(e,r)}):!1}function uf(e,t,n){return Mn(e,"'"+n+"'",t,function(r){return hi(e,r,!0)})}var so=null;function ll(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=C(h(t)),!Ve(t,e))){p&&D<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=al(t,e);b&&(so=r?n:null,!r&&n==88&&!$t&&(W?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),z&&!W&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&cf(t)}}function cf(e){var t=e.display.lineDiv;V(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(G(t,"CodeMirror-crosshair"),mt(document,"keyup",n),mt(document,"mouseover",n))}me(document,"keyup",n),me(document,"mouseover",n)}function sl(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ve(this,e)}function ul(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(ir(t.display,e)||Ve(t,e)||e.ctrlKey&&!e.altKey||W&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(b&&n==so){so=null,gt(e);return}if(!(b&&(!e.which||e.which<10)&&al(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(uf(t,e,i)||t.display.input.onKeyPress(e))}}}var ff=400,uo=function(e,t,n){this.time=e,this.pos=t,this.button=n};uo.prototype.compare=function(e,t,n){return this.time+ff>e&&te(t,this.pos)==0&&n==this.button};var An,Dn;function df(e,t){var n=+new Date;return Dn&&Dn.compare(n,e,t)?(An=Dn=null,"triple"):An&&An.compare(n,e,t)?(Dn=new uo(n,e,t),An=null,"double"):(An=new uo(n,e,t),Dn=null,"single")}function cl(e){var t=this,n=t.display;if(!(Ve(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,ir(n,e)){w||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!co(t,e)){var r=Tr(t,e),i=nn(e),o=r?df(r,i):"single";se(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&pf(t,i,r,o,e))&&(i==1?r?mf(t,r,o,e):wt(e)==n.scroller&>(e):i==2?(r&&si(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(j?t.display.input.onContextMenu(e):Ui(t)))}}}function pf(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,Mn(e,tl(o,i),i,function(a){if(typeof a=="string"&&(a=zn[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,n)!=fe}finally{e.state.suppressEdits=!1}return l})}function hf(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==n
|
|
|
|
`)==t){if(r.ranges.length%Ut.text.length==0){f=[];for(var E=0;E<Ut.text.length;E++)f.push(o.splitLines(Ut.text[E]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(f=rt(s,function(de){return[de]}));for(var F=e.curOp.updateInput,X=r.ranges.length-1;X>=0;X--){var K=r.ranges[X],re=K.from(),ie=K.to();K.empty()&&(n&&n>0?re=H(re.line,re.ch-n):e.state.overwrite&&!l?ie=H(ie.line,Math.min(xe(o,ie.line).text.length,ie.ch+Ee(s).length)):l&&Ut&&Ut.lineWise&&Ut.text.join(`
|
2022-02-26 07:01:44 -05:00
|
|
|
`)==s.join(`
|
2023-01-31 06:59:51 -05:00
|
|
|
`)&&(re=ie=H(re.line,0)));var ce={from:re,to:ie,text:f?f[X%f.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Kr(e.doc,ce),st(e,"inputRead",e,ce)}t&&!l&&vl(e,t),Br(e),e.curOp.updateInput<2&&(e.curOp.updateInput=F),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function gl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Mt(t,function(){return po(t,n,0,null,"paste")}),!0}function vl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Fn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Fn(e,i.head.line,"smart"));a&&st(e,"electricInput",e,i.head.line)}}}function yl(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:H(i,0),head:H(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function bl(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function xl(){var e=c("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=c("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return w?e.style.width="1000px":e.setAttribute("wrap","off"),y&&(e.style.border="1px solid black"),bl(e),t}function Sf(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){se(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,a=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&&ut(this,t[r])(this,i,a),Xe(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](pi(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:_t(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");Ge(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,St(this)}),removeOverlay:_t(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==r||typeof r=="string"&&a.name==r){i.splice(o,1),this.state.modeGen++,St(this);return}}}),indentLine:_t(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),v(this.doc,r)&&Fn(this,r,i,o)}),indentSelection:_t(function(r){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(Fn(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&Br(this));else{var s=l.from(),f=l.to(),E=Math.max(o,s.line);o=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var F=E;F<o;++F)Fn(this,F,r);var X=this.doc.sel.ranges;s.ch==0&&i.length==X.length&&X[a].from().ch>0&&io(this.doc,a,new Ue(s,X[a].to()),ve)}}}),getTokenAt:function(r,i){return zo(this,r,i)},getLineTokens:function(r,i){return zo(this,H(r),i,!0)},getTokenTypeAt:function(r){r=Me(this.doc,r);var i=Co(this,xe(this.doc,r.line)),o=0,a=(i.length-1)/2,l=r.ch,s;if(l==0)s=i[2];else for(;;){var f=o+a>>1;if((f?i[f*2-1]:0)>=l)a=f;else if(i[f*2+1]<l)o=f+1;else{s=i[f*2+2];break}}var E=s?s.indexOf("overlay "):-1;return E<0?s:E==0?null:s.slice(0,E-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var a=n[i],l=this.getModeAt(r);if(typeof l[i]=="string")a[l[i
|
|
|
|
`,ce=Fe(ie,K)?"w":X&&ie==`
|
|
|
|
`?"n":!X||/\s/.test(ie)?null:"p";if(X&&!re&&!ce&&(ce="s"),F&&F!=ce){n<0&&(n=1,E(),t.sticky="after");break}if(ce&&(F=ce),n>0&&!E(!re))break}var de=ci(e,t,o,a,!0);return ze(o,de)&&(de.hitSide=!0),de}function _l(e,t,n,r){var i=e.doc,o=t.left,a;if(r=="page"){var l=Math.min(e.display.wrapper.clientHeight,se(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(l-.5*Rr(e.display),3);a=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(a=n>0?t.bottom+3:t.top-3);for(var f;f=Ni(e,o,a),!!f.outside;){if(n<0?a<=0:a>=i.height){f.hitSide=!0;break}a+=n*5}return f}var Ke=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Te,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ke.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,bl(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(l){for(var s=l.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}me(i,"paste",function(l){!o(l)||Ve(r,l)||gl(l,r)||D<=11&&setTimeout(ut(r,function(){return t.updateFromDOM()}),20)}),me(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),me(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),me(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),me(i,"touchstart",function(){return n.forceCompositionEnd()}),me(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||Ve(r,l))){if(r.somethingSelected())gi({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=yl(r);gi({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,ve),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var f=Ut.text.join(`
|
|
|
|
`);if(l.clipboardData.setData("Text",f),l.clipboardData.getData("Text")==f){l.preventDefault();return}}var E=xl(),F=E.firstChild;r.display.lineSpace.insertBefore(E,r.display.lineSpace.firstChild),F.value=Ut.text.join(`
|
|
|
|
`);var X=C(i.ownerDocument);x(F),setTimeout(function(){r.display.lineSpace.removeChild(E),X.focus(),X==i&&n.showPrimarySelection()},50)}}me(i,"copy",a),me(i,"cut",a)},Ke.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ke.prototype.prepareSelection=function(){var e=ca(this.cm,!1);return e.focus=C(this.div.ownerDocument)==this.div,e},Ke.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ke.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ke.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=vi(t,e.anchorNode,e.anchorOffset),a=vi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&te(at(o,a),r)==0&&te(Be(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&kl(t,r)||{node:l[0].measure.map[2],offset:0},f=i.line<t.display.viewTo&&kl(t,i);if(!f){var E=l[l.length-1].measure,F=E.maps?E.maps[E.maps.length-1]:E.map;f={node:F[F.length-1],offset:F[F.length-2]-F[F.length-3]}}if(!s||!f){e.removeAllRanges();return}var X=e.rangeCount&&e.getRangeAt(0),K;try{K=$(s.node,s.offset,f.offset,f.node)}catch{}K&&(!z&&t.state.focused?(e.collapse(s.node,s.offset),K.collapsed||(e.removeAllRanges(),e.addRange(K))):(e.removeAllRanges(),e.addRange(K)),X&&e.anchorNode==null?e.addRange(X):z&&this.startGracePeriod()),this.rememberSelection()}},Ke.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)},Ke.prototype.showMultipleSelections=function(e){I(this.cm.display.cursorDiv,e.cursors),I(this.cm.display.selectionDiv,e.selection)},Ke.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ke.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},Ke.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||C(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ke.prototype.blur=function(){this.div.blur()},Ke.prototype.getField=function(){return this.div},Ke.prototype.supportsTouch=function(){return!0},Ke.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Mt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},Ke.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ke.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(U&&T&&this.cm.display.gutterSpecs.length&&Tf(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=vi(t,e.anchorNode,e.anchorOffset),r=vi(t,e.focusNode,e.focusOffset);n&&r&&Mt(t,function(){vt(t.doc,mr(n,r),ve),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ke.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=H(r.line-1,xe(e.doc,r.line-1).len
|
|
|
|
`),x(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}me(i,"cut",o),me(i,"copy",o),me(e.scroller,"paste",function(a){if(!(ir(e,a)||Ve(r,a))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var l=new Event("paste");l.clipboardData=a.clipboardData,i.dispatchEvent(l)}}),me(e.lineSpace,"selectstart",function(a){ir(e,a)||gt(a)}),me(i,"compositionstart",function(){var a=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:a,range:r.markText(a,r.getCursor("to"),{className:"CodeMirror-composing"})}}),me(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},nt.prototype.createField=function(e){this.wrapper=xl(),this.textarea=this.wrapper.firstChild},nt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},nt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=ca(e);if(e.options.moveInputWithCursor){var i=Bt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},nt.prototype.showSelection=function(e){var t=this.cm,n=t.display;I(n.cursorDiv,e.cursors),I(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},nt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&x(this.textarea),p&&D>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",p&&D>=9&&(this.hasSelection=null));this.resetting=!1}},nt.prototype.getField=function(){return this.textarea},nt.prototype.supportsTouch=function(){return!1},nt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!_||C(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},nt.prototype.blur=function(){this.textarea.blur()},nt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},nt.prototype.receivedFocus=function(){this.slowPoll()},nt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},nt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},nt.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||sr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(p&&D>=9&&this.hasSelection===i||W&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return Mt(t,function(){po(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
|
|
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},nt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},nt.prototype.onKeyPress=function(){p&&D>=9&&(this.hasSelection=null),this.fastPoll()},nt.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Tr(n,e),a=r.scroller.scrollTop;if(!o||b)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&ut(n,vt)(n.doc,mr(o),ve);var s=i.style.cssText,f=t.wrapper.style.cssText,E=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
2022-12-16 18:49:14 -05:00
|
|
|
top: `+(e.clientY-E.top-5)+"px; left: "+(e.clientX-E.left-5)+`px;
|
2023-01-31 06:59:51 -05:00
|
|
|
z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var F;w&&(F=i.ownerDocument.defaultView.scrollY),r.input.focus(),w&&i.ownerDocument.defaultView.scrollTo(null,F),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=K,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function X(){if(i.selectionStart!=null){var ie=n.somethingSelected(),ce="\u200B"+(ie?i.value:"");i.value="\u21DA",i.value=ce,t.prevInput=ie?"":"\u200B",i.selectionStart=1,i.selectionEnd=ce.length,r.selForContextMenu=n.doc.sel}}function K(){if(t.contextMenuPending==K&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=s,p&&D<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!p||p&&D<9)&&X();var ie=0,ce=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?ut(n,Wa)(n):ie++<10?r.detectingSelectAll=setTimeout(ce,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(ce,200)}}if(p&&D>=9&&X(),j){Jt(e);var re=function(){mt(window,"mouseup",re),setTimeout(K,20)};me(window,"mouseup",re)}else setTimeout(K,50)},nt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},nt.prototype.setUneditable=function(){},nt.prototype.needsContentAttribute=!1;function Lf(e,t){if(t=t?ue(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=C(e.ownerDocument);t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(me(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(mt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Ye(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function zf(e){e.off=mt,e.on=me,e.wheelEventPixels=qc,e.Doc=Tt,e.splitLines=on,e.countColumn=he,e.findColumn=ht,e.isWordChar=ne,e.Pass=fe,e.signal=Xe,e.Line=Or,e.changeEnd=gr,e.scrollbarModel=ga,e.Pos=H,e.cmpPos=te,e.modes=Wt,e.mimeModes=ur,e.resolveMode=zt,e.getMode=Vt,e.modeExtensions=cr,e.extendMode=Bn,e.copyState=er,e.startState=an,e.innerMode=fr,e.commands=zn,e.keyMap=ar,e.keyName=rl,e.isModifierKey=el,e.lookupKey=Xr,e.normalizeKeyMap=nf,e.StringStream=et,e.SharedTextMarker=Cn,e.TextMarker=yr,e.LineWidget=Tn,e.e_preventDefault=gt,e.e_stopPropagation=kr,e.e_stop=Jt,e.addClass=V,e.contains=M,e.rmClass=G,e.keyNames=br}xf(Ye),Sf(Ye);var Mf="iter insert remove copy getEditor constructor".split(" ");for(var yi in Tt.prototype)Tt.prototype.hasOwnProperty(yi)&&Se(Mf,yi)<0&&(Ye.prototype[yi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Tt.prototype[yi]));return xt(Tt),Ye.inputStyles={textarea:nt,contenteditable:Ke},Ye.defineMode=function(e){!Ye.defaults.mode&&e!="null"&&(Ye.defaults.mode=e),jn.apply(this,arguments)},Ye.defineMIME=Ir,Ye.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ye.defineMIME("text/plain","null"),Ye.defineExtension=function(e,t){Ye.prototype[e]=t},Ye.defineDocExtension=function(e,t){Tt.prototype[e]=t},Ye.fromTextArea=Lf,zf(Ye),Ye.version="5.65.9",Ye})});var Sl=qe((In,bo)=>{(function(u,P){typeof In=="object"&&typeof bo=="object"?bo.exports=P():typeof define=="function"&&define.amd?define([],P):typeof In=="object"?In.ClipboardJS=P():u.ClipboardJS=P()})(In,function(){return P={686:function(O,w,A){"use strict";A.d(w,{default:function(){return oe}});var w=A(279),p=A.n(w),w=A(370),D=A.n(w),w=A(817),L=A.n(w);function T(Q){try{return document.execCommand(Q)}catch{return}}var m=function(Q){return Q=L()(Q),T("cut"),Q};
|
|
|
|
`&&(S.innerActive=S.inner=null);else for(var p=0;p<z.length;++p){var D=z[p];D.open===`
|
|
|
|
`&&(S.innerActive=D,S.inner=u.startState(D.mode,A.indent?A.indent(S.outer,"",""):0))}},electricChars:P.electricChars,innerMode:function(S){return S.inner?{state:S.inner,mode:S.innerActive.mode}:{state:S.outer,mode:P}}}}})});var gu=qe((hu,mu)=>{(function(u){typeof hu=="object"&&typeof mu=="object"?u(Oe(),pu()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/multiplex"],u):u(CodeMirror)})(function(u){"use strict";u.defineMode("twig:inner",function(){var P=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],z=/^[+\-*&%=<>!?|~^]/,O=/^[:\[\(\{]/,S=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],A=/^(\d[+\-\*\/])?\d+(\.\d+)?/;P=new RegExp("(("+P.join(")|(")+"))\\b"),S=new RegExp("(("+S.join(")|(")+"))\\b");function p(D,w){var L=D.peek();if(w.incomment)return D.skipTo("#}")?(D.eatWhile(/\#|}/),w.incomment=!1):D.skipToEnd(),"comment";if(w.intag){if(w.operator){if(w.operator=!1,D.match(S))return"atom";if(D.match(A))return"number"}if(w.sign){if(w.sign=!1,D.match(S))return"atom";if(D.match(A))return"number"}if(w.instring)return L==w.instring&&(w.instring=!1),D.next(),"string";if(L=="'"||L=='"')return w.instring=L,D.next(),"string";if(D.match(w.intag+"}")||D.eat("-")&&D.match(w.intag+"}"))return w.intag=!1,"tag";if(D.match(z))return w.operator=!0,"operator";if(D.match(O))w.sign=!0;else if(D.eat(" ")||D.sol()){if(D.match(P))return"keyword";if(D.match(S))return"atom";if(D.match(A))return"number";D.sol()&&D.next()}else D.next();return"variable"}else if(D.eat("{")){if(D.eat("#"))return w.incomment=!0,D.skipTo("#}")?(D.eatWhile(/\#|}/),w.incomment=!1):D.skipToEnd(),"comment";if(L=D.eat(/\{|%/))return w.intag=L,L=="{"&&(w.intag="}"),D.eat("-"),"tag"}D.next()}return{startState:function(){return{}},token:function(D,w){return p(D,w)}}}),u.defineMode("twig",function(P,z){var O=u.getMode(P,"twig:inner");return!z||!z.base?O:u.multiplexingMode(u.getMode(P,z.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:O,parseDelimiters:!0})}),u.defineMIME("text/x-twig","twig")})});var bu=qe((vu,yu)=>{(function(u){typeof vu=="object"&&typeof yu=="object"?u(Oe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],u):u(CodeMirror)})(function(u){"use strict";u.defineMode("vb",function(P,z){var O="error";function S(C){return new RegExp("^(("+C.join(")|(")+"))\\b","i")}var A=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),p=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),D=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),w=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),L=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),T=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),m=["class","module","sub","enum","select","while","if","function","get","set","property","try","structure","synclock","using","with"],b=["else","elseif","case","catch","finally"],d=["next","loop"],g=["and","andalso","or","orelse","xor","in","not","is","isnot","like"],k=S(g),y=["#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","r
|
|
|
|
`);let z=u.textContent.trimEnd(),O="";if(P!==null){let A=P.className.replace("language-","");O=qn(A,z)}let S=(0,_r.default)(function(A){u.parentNode.replaceChild(A,u)},{value:z,mode:O,lineNumbers:!0,lineWrapping:!1,theme:On(),readOnly:!0});Nf(S)}function Nf(u){let P='<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>',z=document.createElement("div");z.classList.add("CodeMirror-copy"),z.innerHTML=P,u.display.wrapper.appendChild(z),new zu.default(z,{text:function(S){return u.getValue()}}).on("success",S=>{z.classList.add("success"),setTimeout(()=>{z.classList.remove("success")},240)})}function qn(u,P){u=u.trim().replace(/^\./g,"").toLowerCase();let z=typeof wo[u];return z==="undefined"?"":z==="function"?wo[u](P):wo[u]}function On(){let u=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(u?"darcula":"default")}function Sd(u,P,z){return(0,_r.default)(u,{value:P,mode:qn(z,P),lineNumbers:!0,lineWrapping:!1,theme:On(),readOnly:!0})}function Td(u,P){let z=u.textContent;return(0,_r.default)(function(O){u.parentNode.insertBefore(O,u),u.style.display="none"},{value:z,mode:qn(P,z),lineNumbers:!0,lineWrapping:!1,theme:On()})}function Cd(u,P){return _r.default.fromTextArea(u,{mode:qn(P,u.value),lineNumbers:!0,lineWrapping:!1,theme:On()})}function Ed(u,P,z){u.setOption("mode",qn(P,z))}function Ld(u,P){u.setValue(P),setTimeout(()=>{Pf(u)},10)}function Pf(u){u.refresh()}function zd(u){let z={value:u.textContent,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:On(),scrollPastEnd:!0};return window.$events.emitPublic(u,"editor-markdown-cm::pre-init",{config:z}),(0,_r.default)(function(O){u.parentNode.insertBefore(O,u),u.style.display="none"},z)}function Md(){return _r.default.keyMap.default==_r.default.keyMap.macDefault?"Cmd":"Ctrl"}export{Md as getMetaKey,kd as highlight,wd as highlightWithin,Cd as inlineEditor,zd as markdownEditor,Td as popupEditor,Ld as setContent,Ed as setMode,Pf as updateLayout,Sd as wysiwygView};
|
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
clipboard/dist/clipboard.min.js:
|
|
|
|
(*!
|
|
|
|
* clipboard.js v2.0.11
|
|
|
|
* https://clipboardjs.com/
|
|
|
|
*
|
|
|
|
* Licensed MIT © Zeno Rocha
|
|
|
|
*)
|
|
|
|
*/
|
2022-02-26 07:01:44 -05:00
|
|
|
//# sourceMappingURL=code.js.map
|