detect/detect.gui/Embedded/dist/assets/drawer-39f639f8.js

27 lines
244 KiB
JavaScript
Raw Normal View History

2024-11-21 17:47:13 +08:00
var ef=Object.defineProperty;var Ci=Object.getOwnPropertySymbols;var El=Object.prototype.hasOwnProperty,zl=Object.prototype.propertyIsEnumerable;var Wl=(v,M,y)=>M in v?ef(v,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):v[M]=y,un=(v,M)=>{for(var y in M||(M={}))El.call(M,y)&&Wl(v,y,M[y]);if(Ci)for(var y of Ci(M))zl.call(M,y)&&Wl(v,y,M[y]);return v};var Hl=(v,M)=>{var y={};for(var E in v)El.call(v,E)&&M.indexOf(E)<0&&(y[E]=v[E]);if(v!=null&&Ci)for(var E of Ci(v))M.indexOf(E)<0&&zl.call(v,E)&&(y[E]=v[E]);return y};var Wr=(v,M,y)=>new Promise((E,$)=>{var X=P=>{try{ae(y.next(P))}catch(U){$(U)}},ve=P=>{try{ae(y.throw(P))}catch(U){$(U)}},ae=P=>P.done?E(P.value):Promise.resolve(P.value).then(X,ve);ae((y=y.apply(v,M)).next())});import{u as tf,B as rf}from"./useForm-7410be87.js";import{f as nf,b as of,u as af}from"./schema-6fd16fbe.js";import{a as lf,B as sf}from"./index-e0942325.js";import{U as uf,z as ff,i as cf,w as ql,_ as df}from"./index.js";import{c as hf,d as pf}from"./antd-029ed741.js";import{d as Kn,f as Li,w as Oo,y as Fl,h as Xl,u as _t,o as vf,b as gf,Z as Ai,_ as Yl,c as Wo,k as Ti,G as mf,r as yf,a4 as Zl,a5 as Il,a9 as bf}from"./vue-72a104e4.js";import{u as wf}from"./useWindowSizeFn-46f0db92.js";import"./index-5157bbb9.js";import"./copyTextToClipboard-8577151f.js";import"./deviceApi-af691457.js";var Jl={exports:{}};(function(v,M){(function(y,E){v.exports=E()})(hf,function(){var y=navigator.userAgent,E=navigator.platform,$=/gecko\/\d/i.test(y),X=/MSIE \d/.test(y),ve=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(y),ae=/Edge\/(\d+)/.exec(y),P=X||ve||ae,U=P&&(X?document.documentMode||6:+(ae||ve)[1]),K=!ae&&/WebKit\//.test(y),Y=K&&/Qt\/\d+\.\d+/.test(y),j=!ae&&/Chrome\/(\d+)/.exec(y),ue=j&&+j[1],te=/Opera\//.test(y),Ce=/Apple Computer/.test(navigator.vendor),Le=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(y),ge=/PhantomJS/.test(y),G=Ce&&(/Mobile\/\w+/.test(y)||navigator.maxTouchPoints>2),L=/Android/.test(y),W=G||L||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(y),ee=G||/Mac/.test(E),ce=/\bCrOS\b/.test(y),we=/win/i.test(E),me=te&&y.match(/Version\/(\d*\.\d*)/);me&&(me=Number(me[1])),me&&me>=15&&(te=!1,K=!0);var Ne=ee&&(Y||te&&(me==null||me<12.11)),ie=$||P&&U>=9;function Z(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Te=function(e,t){var n=e.className,r=Z(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 C(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function R(e,t){return C(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 F(e,t,n,r){var i=c(e,t,n,r);return i.setAttribute("role","presentation"),i}var N;document.createRange?N=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:N=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function J(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 xe(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch(r){n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function He(e,t){var n=e.className;Z(t).test(n)||(e.className+=(n?" ":"")+t)}function At(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!Z(n[r]).test(t)&&(t+=" "+n[r]);return t}var Yt=function(e){e.select()};G?Yt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:P&&(Yt=function(e){try{e.select()}catch(t){}});function lt(e){return e.display.wrapper.ownerDocument}function bt(e){return Ee(e.display.wrapper)}function Ee(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function se(e){return lt(e).defaultView}function le(e){var t=Array.prototype.slice.call(arguments,1);return functio
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
2024-11-21 17:47:13 +08:00
`,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/)},fr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Xn=function(){var e=c("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Et=null;function Wi(e){if(Et!=null)return Et;var t=R(e,c("span","x")),n=t.getBoundingClientRect(),r=N(t,0,1).getBoundingClientRect();return Et=Math.abs(n.left-r.left)>1}var Fr={},zt={};function Ht(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fr[e]=t}function kr(e,t){zt[e]=t}function Ir(e){if(typeof e=="string"&&zt.hasOwnProperty(e))e=zt[e];else if(e&&typeof e.name=="string"&&zt.hasOwnProperty(e.name)){var t=zt[e.name];typeof t=="string"&&(t={name:t}),e=k(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Br(e,t){t=Ir(t);var n=Fr[t.name];if(!n)return Br(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 Rr(e,t){var n=cr.hasOwnProperty(e)?cr[e]:cr[e]={};he(t,n)}function jt(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 hn(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 _r(e,t,n){return e.startState?e.startState(t,n):!0}var Re=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};Re.prototype.eol=function(){return this.pos>=this.string.length},Re.prototype.sol=function(){return this.pos==this.lineStart},Re.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Re.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Re.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},Re.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Re.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Re.prototype.skipToEnd=function(){this.pos=this.string.length},Re.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Re.prototype.backUp=function(e){this.pos-=e},Re.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ke(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ke(this.string,this.lineStart,this.tabSize):0)},Re.prototype.indentation=function(){return ke(this.string,null,this.tabSize)-(this.lineStart?ke(this.string,this.lineStart,this.tabSize):0)},Re.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)}},Re.prototype.current=function(){return this.string.slice(this.start,this.pos)},Re.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Re.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)}
`?(T=d.appendChild(c("span",m[0]=="\r"?"␍":"␤","cm-invalidchar")),T.setAttribute("cm-text",m[0]),e.col+=1):(T=e.cm.options.specialCharPlaceholder(m[0]),T.setAttribute("cm-text",m[0]),P&&U<9?d.appendChild(c("span",[T])):d.appendChild(T),e.col+=1);e.map.push(e.pos,e.pos+1,T),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||u||o||a){var B=n||"";r&&(B+=r),i&&(B+=i);var H=c("span",[d],B,o);if(a)for(var _ in a)a.hasOwnProperty(_)&&_!="style"&&_!="class"&&H.setAttribute(_,a[_]);return e.content.appendChild(H)}e.content.appendChild(d)}}function ws(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=" "),r+=o,n=o==" "}return r}function xs(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,d=u+r.length;;){for(var p=void 0,m=0;m<t.length&&(p=t[m],!(p.to>u&&p.from<=u));m++);if(p.to>=d)return e(n,r,i,o,a,l,s);e(n,r.slice(0,p.to-u),i,o,null,l,s),o=null,r=r.slice(p.to-u),u=p.to}}}function $o(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 ks(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]),Vo(n[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,d="",p,m,g=0,x,T,A,z,B;;){if(g==s){x=T=A=m="",B=null,z=null,g=1/0;for(var H=[],_=void 0,ne=0;ne<r.length;++ne){var Q=r[ne],pe=Q.marker;if(pe.type=="bookmark"&&Q.from==s&&pe.widgetNode)H.push(pe);else if(Q.from<=s&&(Q.to==null||Q.to>s||pe.collapsed&&Q.to==s&&Q.from==s)){if(Q.to!=null&&Q.to!=s&&g>Q.to&&(g=Q.to,T=""),pe.className&&(x+=" "+pe.className),pe.css&&(m=(m?m+";":"")+pe.css),pe.startStyle&&Q.from==s&&(A+=" "+pe.startStyle),pe.endStyle&&Q.to==g&&(_||(_=[])).push(pe.endStyle,Q.to),pe.title&&((B||(B={})).title=pe.title),pe.attributes)for(var We in pe.attributes)(B||(B={}))[We]=pe.attributes[We];pe.collapsed&&(!z||Fi(z.marker,pe)<0)&&(z=Q)}else Q.from>s&&g>Q.from&&(g=Q.from)}if(_)for(var Qe=0;Qe<_.length;Qe+=2)_[Qe+1]==g&&(T+=" "+_[Qe]);if(!z||z.from==s)for(var Fe=0;Fe<H.length;++Fe)$o(t,0,H[Fe]);if(z&&(z.from||0)==s){if($o(t,(z.to==null?l+1:z.to)-s,z.marker,z.from==null),z.to==null)return;z.to==s&&(z=!1)}}if(s>=l)break;for(var kt=Math.min(l,g);;){if(d){var gt=s+d.length;if(!z){var Ge=gt>kt?d.slice(0,kt-s):d;t.addToken(t,Ge,p?p+x:x,A,s+Ge.length==g?T:"",m,B)}if(gt>=kt){d=d.slice(kt-s),s=kt;break}s=gt,A=""}d=i.slice(o,o=n[u++]),p=Vo(n[u++],t.cm.options)}}}function ea(e,t,n){this.line=t,this.rest=hs(t),this.size=this.rest?f(be(this.rest))-n+1:1,this.node=this.text=null,this.hidden=dr(e,t)}function ei(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new ea(e.doc,q(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Ur=null;function Ss(e){Ur?Ur.ops.push(e):e.ownsGroup=Ur={ops:[e],delayedCallbacks:[]}}function Cs(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 Ls(e,t){var n=e.ownsGroup;if(n)try{Cs(n)}finally{Ur=null,t(n)}}var mn=null;function Ze(e,t){var n=Vt(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Ur?i=Ur.delayedCallbacks:mn?i=mn:(i=mn=[],setTimeout(Ts,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function Ts(){var e=mn;mn=null;for(var t=0;t<e.length;++t)e[t]()}function ta(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Ns(e,t):o=="gutter"?na(e,t,n,r):o=="class"?_i(e,t):o=="widget"&&Os(e,t,r)}t.changes=null}function yn(e){return e.node==e.text&&(e.node=c("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),
top: `+_+"px; width: "+(ne==null?s-H:ne)+`px;
2024-11-21 17:47:13 +08:00
height: `+(Q-_)+"px"))}function p(H,_,ne){var Q=q(i,H),pe=Q.text.length,We,Qe;function Fe(Ge,mt){return ni(e,w(H,Ge),"div",Q,mt)}function kt(Ge,mt,tt){var Xe=ya(e,Q,null,Ge),qe=mt=="ltr"==(tt=="after")?"left":"right",_e=tt=="after"?Xe.begin:Xe.end-(/\s/.test(Q.text.charAt(Xe.end-1))?2:1);return Fe(_e,qe)[qe]}var gt=ye(Q,i.direction);return ar(gt,_||0,ne==null?pe:ne,function(Ge,mt,tt,Xe){var qe=tt=="ltr",_e=Fe(Ge,qe?"left":"right"),yt=Fe(mt-1,qe?"right":"left"),ln=_==null&&Ge==0,wr=ne==null&&mt==pe,at=Xe==0,Xt=!gt||Xe==gt.length-1;if(yt.top-_e.top<=3){var $e=(u?ln:wr)&&at,To=(u?wr:ln)&&Xt,ir=$e?l:(qe?_e:yt).left,Dr=To?s:(qe?yt:_e).right;d(ir,_e.top,Dr-ir,_e.bottom)}else{var Pr,ut,sn,Mo;qe?(Pr=u&&ln&&at?l:_e.left,ut=u?s:kt(Ge,tt,"before"),sn=u?l:kt(mt,tt,"after"),Mo=u&&wr&&Xt?s:yt.right):(Pr=u?kt(Ge,tt,"before"):l,ut=!u&&ln&&at?s:_e.right,sn=!u&&wr&&Xt?l:yt.left,Mo=u?kt(mt,tt,"after"):s),d(Pr,_e.top,ut-Pr,_e.bottom),_e.bottom<yt.top&&d(l,_e.bottom,null,yt.top),d(sn,yt.top,Mo-sn,yt.bottom)}(!We||oi(_e,We)<0)&&(We=_e),oi(yt,We)<0&&(We=yt),(!Qe||oi(_e,Qe)<0)&&(Qe=_e),oi(yt,Qe)<0&&(Qe=yt)}),{start:We,end:Qe}}var m=t.from(),g=t.to();if(m.line==g.line)p(m.line,m.ch,g.ch);else{var x=q(i,m.line),T=q(i,g.line),A=Ft(x)==Ft(T),z=p(m.line,m.ch,A?x.text.length+1:null).end,B=p(g.line,A?0:null,g.ch).start;A&&(z.top<B.top-2?(d(z.right,z.top,null,z.bottom),d(l,B.top,B.left,B.bottom)):d(z.right,z.top,B.left-z.right,z.bottom)),z.bottom<B.top&&d(l,z.bottom,null,B.top)}n.appendChild(o)}function $i(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()||Yr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ka(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||to(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Yr(e))},100)}function to(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ie(e,"focus",e,t),e.state.focused=!0,He(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),K&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),$i(e))}function Yr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ie(e,"blur",e,t),e.state.focused=!1,Te(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ai(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,u=void 0,d=0;if(!l.hidden){if(i+=l.line.height,P&&U<8){var p=l.node.offsetTop+l.node.offsetHeight;u=p-n,n=p}else{var m=l.node.getBoundingClientRect();u=m.bottom-m.top,!s&&l.text.firstChild&&(d=l.text.firstChild.getBoundingClientRect().right-m.left-1)}var g=l.line.height-u;if((g>.005||g<-.005)&&(i<r&&(o-=g),Lt(l.line,u),Sa(l.line),l.rest))for(var x=0;x<l.rest.length;x++)Sa(l.rest[x]);if(d>e.display.sizerWidth){var T=Math.ceil(d/Xr(e.display));T>e.display.maxLineLength&&(e.display.maxLineLength=T,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Sa(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 li(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-ti(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=h(t,r),a=h(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=h(t,er(q(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=h(t,er(q(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}func
top: `+(t.top-n.viewOffset-ti(e.display))+`px;
height: `+(t.bottom-t.top+Gt(e)+n.barHeight)+`px;
2024-11-21 17:47:13 +08:00
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 js(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?w(t.line,t.ch+1,"before"):t,t=t.ch?w(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=It(e,t),s=!n||n==t?l:It(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 u=ro(e,i),d=e.doc.scrollTop,p=e.doc.scrollLeft;if(u.scrollTop!=null&&(Sn(e,u.scrollTop),Math.abs(e.doc.scrollTop-d)>1&&(a=!0)),u.scrollLeft!=null&&(Mr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}function Us(e,t){var n=ro(e,t);n.scrollTop!=null&&Sn(e,n.scrollTop),n.scrollLeft!=null&&Mr(e,n.scrollLeft)}function ro(e,t){var n=e.display,r=qr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=ji(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Ki(n),s=t.top<r,u=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var d=Math.min(t.top,(u?l:t.bottom)-o);d!=i&&(a.scrollTop=d)}var p=e.options.fixedGutter?0:n.gutters.offsetWidth,m=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-p,g=Sr(e)-n.gutters.offsetWidth,x=t.right-t.left>g;return x&&(t.right=t.left+g),t.left<10?a.scrollLeft=0:t.left<m?a.scrollLeft=Math.max(0,t.left+p-(x?0:10)):t.right>g+m-3&&(a.scrollLeft=t.right+(x?0:10)-g),a}function no(e,t){t!=null&&(si(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Zr(e){si(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function kn(e,t,n){(t!=null||n!=null)&&si(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Gs(e,t){si(e),e.curOp.scrollToPos=t}function si(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ga(e,t.from),r=ga(e,t.to);Ca(e,n,r,t.margin)}}function Ca(e,t,n,r){var i=ro(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});kn(e,i.scrollLeft,i.scrollTop)}function Sn(e,t){Math.abs(e.doc.scrollTop-t)<2||($||oo(e,{top:t}),La(e,t,!0),$&&oo(e),Tn(e,100))}function La(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 Mr(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,Aa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Cn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Ki(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+Gt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Nr=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),re(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),re(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,P&&U<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Nr.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.style.h
`},setDirection:Ve(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&lu(this.cm))})}),vt.prototype.eachLine=vt.prototype.iter;var ll=0;function wu(e){var t=this;if(sl(t),!(Be(t,e)||tr(t.display,e))){it(e),P&&(ll=+new Date);var n=Lr(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&&Je(t,function(){n=fe(t.doc,n);var g={from:n,to:n,text:t.doc.splitLines(o.filter(function(x){return x!=null}).join(t.doc.lineSeparator())),origin:"paste"};$r(t.doc,g),qa(t.doc,vr(fe(t.doc,n),fe(t.doc,gr(g))))})()},s=function(g,x){if(t.options.allowDropFileTypes&&V(t.options.allowDropFileTypes,g.type)==-1){l();return}var T=new FileReader;T.onerror=function(){return l()},T.onload=function(){var A=T.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(A)){l();return}o[x]=A,l()},T.readAsText(g)},u=0;u<r.length;u++)s(r[u],u);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 d=e.dataTransfer.getData("Text");if(d){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),pi(t.doc,vr(n,n)),p)for(var m=0;m<p.length;++m)en(t.doc,"",p[m].anchor,p[m].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(g){}}}}function xu(e,t){if(P&&(!e.state.draggingText||+new Date-ll<100)){sr(t);return}if(!(Be(e,t)||tr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ce)){var n=c("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",te&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),te&&n.parentNode.removeChild(n)}}function ku(e,t){var n=Lr(e,t);if(n){var r=document.createDocumentFragment();Qi(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)),R(e.display.dragCursor,r)}}function sl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ul(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 fl=!1;function Su(){fl||(Cu(),fl=!0)}function Cu(){var e;re(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ul(Lu)},100))}),re(window,"blur",function(){return ul(Yr)})}function Lu(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"},zn=0;zn<10;zn++)br[zn+48]=br[zn+96]=String(zn);for(var mi=65;mi<=90;mi++)br[mi]=String.fromCharCode(mi);for(var Hn=1;Hn<=12;Hn++)br[Hn+111]=br[Hn+63235]="F"+Hn;var nr={};nr.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"},nr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-
2024-11-21 17:47:13 +08:00
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function pl(e,t){var n=q(e.doc,t),r=Ft(n);return r!=n&&(t=f(r)),yo(!0,e,r,t,1)}function Ou(e,t){var n=q(e.doc,t),r=ds(n);return r!=n&&(t=f(r)),yo(!0,e,n,t,-1)}function vl(e,t){var n=pl(e,t.line),r=q(e.doc,n.line),i=ye(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 w(n.line,a?0:o,n.sticky)}return n}function bi(e,t,n){if(typeof t=="string"&&(t=Fn[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)!=Dt}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Au(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=rn(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&rn(t,e.options.extraKeys,n,e)||rn(t,e.options.keyMap,n,e)}var Du=new de;function In(e,t,n,r){var i=e.state.keySeq;if(i){if(cl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Du.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),gl(e,i+" "+t,n,r))return!0}return gl(e,t,n,r)}function gl(e,t,n,r){var i=Au(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Ze(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(it(n),$i(e)),!!i}function ml(e,t){var n=hl(t,!0);return n?t.shiftKey&&!e.state.keySeq?In(e,"Shift-"+n,t,function(r){return bi(e,r,!0)})||In(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return bi(e,r)}):In(e,n,t,function(r){return bi(e,r)}):!1}function Pu(e,t,n){return In(e,"'"+n+"'",t,function(r){return bi(e,r,!0)})}var bo=null;function yl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=xe(bt(t)),!Be(t,e))){P&&U<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=ml(t,e);te&&(bo=r?n:null,!r&&n==88&&!Xn&&(ee?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),$&&!ee&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Wu(t)}}function Wu(e){var t=e.display.lineDiv;He(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(Te(t,"CodeMirror-crosshair"),nt(document,"keyup",n),nt(document,"mouseover",n))}re(document,"keyup",n),re(document,"mouseover",n)}function bl(e){e.keyCode==16&&(this.doc.sel.shift=!1),Be(this,e)}function wl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(tr(t.display,e)||Be(t,e)||e.ctrlKey&&!e.altKey||ee&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(te&&n==bo){bo=null,it(e);return}if(!(te&&(!e.which||e.which<10)&&ml(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(Pu(t,e,i)||t.display.input.onKeyPress(e))}}}var Eu=400,wo=function(e,t,n){this.time=e,this.pos=t,this.button=n};wo.prototype.compare=function(e,t,n){return this.time+Eu>e&&I(t,this.pos)==0&&n==this.button};var Bn,Rn;function zu(e,t){var n=+new Date;return Rn&&Rn.compare(n,e,t)?(Bn=Rn=null,"triple"):Bn&&Bn.compare(n,e,t)?(Rn=new wo(n,e,t),Bn=null,"double"):(Bn=new wo(n,e,t),Rn=null,"single")}function xl(e){var t=this,n=t.display;if(!(Be(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){K||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!xo(t,e)){var r=Lr(t,e),i=Wt(e),o=r?zu(r,i):"single";se(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Hu(t,i,r,o,e))&&(i==1?r?Iu(t,r,o,e):cn(e)==n.scroller&&it(e):i==2?(r&&hi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(ie?t.display.input.onContextMenu(e):eo(t)))}}}function Hu(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,In(e,dl(o,i),i,function(a){if(typeof a=="string"&&(a=Fn[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,n)!=Dt}finally{e.state.suppressEdits=!1}return l})}function Fu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};
`)==t){if(r.ranges.length%Rt.text.length==0){u=[];for(var d=0;d<Rt.text.length;d++)u.push(o.splitLines(Rt.text[d]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Pe(s,function(z){return[z]}));for(var p=e.curOp.updateInput,m=r.ranges.length-1;m>=0;m--){var g=r.ranges[m],x=g.from(),T=g.to();g.empty()&&(n&&n>0?x=w(x.line,x.ch-n):e.state.overwrite&&!l?T=w(T.line,Math.min(q(o,T.line).text.length,T.ch+be(s).length)):l&&Rt&&Rt.lineWise&&Rt.text.join(`
`)==s.join(`
2024-11-21 17:47:13 +08:00
`)&&(x=T=w(x.line,0)));var A={from:x,to:T,text:u?u[m%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};$r(e.doc,A),Ze(e,"inputRead",e,A)}t&&!l&&Nl(e,t),Zr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ml(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&xt(t,function(){return So(t,n,0,null,"paste")}),!0}function Nl(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=_n(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(q(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=_n(e,i.head.line,"smart"));a&&Ze(e,"electricInput",e,i.head.line)}}}function Ol(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:w(i,0),head:w(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Co(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function Al(){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 K?e.style.width="1000px":e.setAttribute("wrap","off"),G&&(e.style.border="1px solid black"),t}function Xu(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)&&Je(this,t[r])(this,i,a),Ie(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"](yi(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:st(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");b(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,pt(this)}),removeOverlay:st(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++,pt(this);return}}}),indentLine:st(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),S(this.doc,r)&&_n(this,r,i,o)}),indentSelection:st(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&&(_n(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&Zr(this));else{var s=l.from(),u=l.to(),d=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var p=d;p<o;++p)_n(this,p,r);var m=this.doc.sel.ranges;s.ch==0&&i.length==m.length&&m[a].from().ch>0&&vo(this.doc,a,new Ae(s,m[a].to()),ft)}}}),getTokenAt:function(r,i){return Ro(this,r,i)},getLineTokens:function(r,i){return Ro(this,w(r),i,!0)},getTokenTypeAt:function(r){r=fe(this.doc,r);var i=Fo(this,q(this.doc,r.line)),o=0,a=(i.length-1)/2,l=r.ch,s;if(l==0)s=i[2];else for(;;){var u=o+a>>1;if((u?i[u*2-1]:0)>=l)a=u;else if(i[u*2+1]<l)o=u+1;else{s=i[u*2+2];break}}var d=s?s.indexOf("overlay "):-1;return d<0?s:d==0?null:s.slice(0,d-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]]&&o.push(a[
`,A=Zt(T,g)?"w":m&&T==`
2024-11-21 17:47:13 +08:00
`?"n":!m||/\s/.test(T)?null:"p";if(m&&!x&&!A&&(A="s"),p&&p!=A){n<0&&(n=1,d(),t.sticky="after");break}if(A&&(p=A),n>0&&!d(!x))break}var z=vi(e,t,o,a,!0);return Oe(o,z)&&(z.hitSide=!0),z}function Dl(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*qr(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 u;u=Xi(e,o,a),!!u.outside;){if(n<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=n*5}return u}var De=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};De.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Co(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}re(i,"paste",function(l){!o(l)||Be(r,l)||Ml(l,r)||U<=11&&setTimeout(Je(r,function(){return t.updateFromDOM()}),20)}),re(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),re(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),re(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),re(i,"touchstart",function(){return n.forceCompositionEnd()}),re(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||Be(r,l))){if(r.somethingSelected())xi({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=Ol(r);xi({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,ft),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Rt.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var d=Al(),p=d.firstChild;Co(p),r.display.lineSpace.insertBefore(d,r.display.lineSpace.firstChild),p.value=Rt.text.join(`
`);var m=xe(Ee(i));Yt(p),setTimeout(function(){r.display.lineSpace.removeChild(d),m.focus(),m==i&&n.showPrimarySelection()},50)}}re(i,"copy",a),re(i,"cut",a)},De.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},De.prototype.prepareSelection=function(){var e=xa(this.cm,!1);return e.focus=xe(Ee(this.div))==this.div,e},De.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},De.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},De.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=ki(t,e.anchorNode,e.anchorOffset),a=ki(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&I(Kr(o,a),r)==0&&I(ht(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&Pl(t,r)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Pl(t,i);if(!u){var d=l[l.length-1].measure,p=d.maps?d.maps[d.maps.length-1]:d.map;u={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(!s||!u){e.removeAllRanges();return}var m=e.rangeCount&&e.getRangeAt(0),g;try{g=N(s.node,s.offset,u.offset,u.node)}catch(x){}g&&(!$&&t.state.focused?(e.collapse(s.node,s.offset),g.collapsed||(e.removeAllRanges(),e.addRange(g))):(e.removeAllRanges(),e.addRange(g)),m&&e.anchorNode==null?e.addRange(m):$&&this.startGracePeriod()),this.rememberSelection()}},De.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)},De.prototype.showMultipleSelections=function(e){R(this.cm.display.cursorDiv,e.cursors),R(this.cm.display.selectionDiv,e.selection)},De.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},De.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return J(this.div,t)},De.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||xe(Ee(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},De.prototype.blur=function(){this.div.blur()},De.prototype.getField=function(){return this.div},De.prototype.supportsTouch=function(){return!0},De.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):xt(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)},De.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},De.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(L&&j&&this.cm.display.gutterSpecs.length&&Yu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=ki(t,e.anchorNode,e.anchorOffset),r=ki(t,e.focusNode,e.focusOffset);n&&r&&xt(t,function(){ot(t.doc,vr(n,r),ft),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},De.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=w(r.line-1,q(e.doc,r.line-1).length)),i.ch==q(e.doc,i.line
2024-11-21 17:47:13 +08:00
`),Yt(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}re(i,"cut",o),re(i,"copy",o),re(e.scroller,"paste",function(a){if(!(tr(e,a)||Be(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)}}),re(e.lineSpace,"selectstart",function(a){tr(e,a)||it(a)}),re(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"})}}),re(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ke.prototype.createField=function(e){this.wrapper=Al(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Co(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Ke.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ke.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=xa(e);if(e.options.moveInputWithCursor){var i=It(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},Ke.prototype.showSelection=function(e){var t=this.cm,n=t.display;R(n.cursorDiv,e.cursors),R(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ke.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&&Yt(this.textarea),P&&U>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",P&&U>=9&&(this.hasSelection=null));this.resetting=!1}},Ke.prototype.getField=function(){return this.textarea},Ke.prototype.supportsTouch=function(){return!1},Ke.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!W||xe(Ee(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},Ke.prototype.blur=function(){this.textarea.blur()},Ke.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ke.prototype.receivedFocus=function(){this.slowPoll()},Ke.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ke.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)},Ke.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||fr(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&&U>=9&&this.hasSelection===i||ee&&/[\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=""),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 xt(t,function(){So(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},Ke.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ke.prototype.onKeyPress=function(){P&&U>=9&&(this.hasSelection=null),this.fastPoll()},Ke.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Lr(n,e),a=r.scroller.scrollTop;if(!o||te)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&Je(n,ot)(n.doc,vr(o),ft);var s=i.style.cssText,u=t.wrapper.style.cssText,d=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+`px;
z-index: 1000; background: `+(P?"rgba(255, 255, 255, .05)":"transparent")+`;
2024-11-21 17:47:13 +08:00
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var p;K&&(p=i.ownerDocument.defaultView.scrollY),r.input.focus(),K&&i.ownerDocument.defaultView.scrollTo(null,p),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function m(){if(i.selectionStart!=null){var T=n.somethingSelected(),A=""+(T?i.value:"");i.value="⇚",i.value=A,t.prevInput=T?"":"",i.selectionStart=1,i.selectionEnd=A.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,P&&U<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!P||P&&U<9)&&m();var T=0,A=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==""?Je(n,Va)(n):T++<10?r.detectingSelectAll=setTimeout(A,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(A,200)}}if(P&&U>=9&&m(),ie){sr(e);var x=function(){nt(window,"mouseup",x),setTimeout(g,20)};re(window,"mouseup",x)}else setTimeout(g,50)},Ke.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ke.prototype.setUneditable=function(){},Ke.prototype.needsContentAttribute=!1;function Vu(e,t){if(t=t?he(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=xe(Ee(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(re(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(s){}}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&&(nt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=ze(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function Qu(e){e.off=nt,e.on=re,e.wheelEventPixels=ou,e.Doc=vt,e.splitLines=Ot,e.countColumn=ke,e.findColumn=je,e.isWordChar=rt,e.Pass=Dt,e.signal=Ie,e.Line=jr,e.changeEnd=gr,e.scrollbarModel=Ma,e.Pos=w,e.cmpPos=I,e.modes=Fr,e.mimeModes=zt,e.resolveMode=Ir,e.getMode=Br,e.modeExtensions=cr,e.extendMode=Rr,e.copyState=jt,e.startState=_r,e.innerMode=hn,e.commands=Fn,e.keyMap=nr,e.keyName=hl,e.isModifierKey=cl,e.lookupKey=rn,e.normalizeKeyMap=Mu,e.StringStream=Re,e.SharedTextMarker=En,e.TextMarker=yr,e.LineWidget=Wn,e.e_preventDefault=it,e.e_stopPropagation=zr,e.e_stop=sr,e.addClass=He,e.contains=J,e.rmClass=Te,e.keyNames=br}ju(ze),Xu(ze);var $u="iter insert remove copy getEditor constructor".split(" ");for(var Si in vt.prototype)vt.prototype.hasOwnProperty(Si)&&V($u,Si)<0&&(ze.prototype[Si]=function(e){return function(){return e.apply(this.doc,arguments)}}(vt.prototype[Si]));return Pt(vt),ze.inputStyles={textarea:Ke,contenteditable:De},ze.defineMode=function(e){!ze.defaults.mode&&e!="null"&&(ze.defaults.mode=e),Ht.apply(this,arguments)},ze.defineMIME=kr,ze.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ze.defineMIME("text/plain","null"),ze.defineExtension=function(e,t){ze.prototype[e]=t},ze.defineDocExtension=function(e,t){vt.prototype[e]=t},ze.fromTextArea=Vu,Qu(ze),ze.version="5.65.18",ze})})(Jl);var jn=Jl.exports;const xf=pf(jn);var fn=(v=>(v.JSON="application/json",v.HTML="htmlmixed",v.JS="javascript",v))(fn||{});var kf={exports:{}};(function(v,M){(function(y){y(jn)})(function(y){y.defineMode("javascript",function(E,$){var X=E.indentUnit,ve=$.statementIndent,ae=$.jsonld,P=$.json||ae,U=$.trackScope!==!1,K=$.typescript,Y=$.wordCharacters||/[\w$\xa1-\uffff]/,j=function(){function f(Ye){return{type:Ye,style:"keyword"}}var h=f("keyword a"),S=f("keyword b"),O=f("keyword c"),w=f("ke
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Oi(v,M,y){return M in v?Object.defineProperty(v,M,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[M]=y,v}Mi.d(Vl,{Z:()=>Ef});const oe=(_l={computed:()=>Wo,createTextVNode:()=>mf,createVNode:()=>Ti,defineComponent:()=>Kn,reactive:()=>yf,ref:()=>Li,watch:()=>Oo,watchEffect:()=>Xl},No={},Mi.d(No,_l),No),Af=(0,oe.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var v=this.data,M=this.onClick;return(0,oe.createVNode)("span",{class:"vjs-tree-brackets",onClick:M},[v])}}),Df=(0,oe.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(v,M){var y=M.emit;return{uiType:(0,oe.computed)(function(){return v.isMultiple?"checkbox":"radio"}),model:(0,oe.computed)({get:function(){return v.checked},set:function(E){return y("update:modelValue",E)}})}},render:function(){var v=this.uiType,M=this.model,y=this.$emit;return(0,oe.createVNode)("label",{class:["vjs-check-controller",M?"is-checked":""],onClick:function(E){return E.stopPropagation()}},[(0,oe.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(v)},null),(0,oe.createVNode)("input",{checked:M,class:"vjs-check-controller-original is-".concat(v),type:v,onChange:function(){return y("change",M)}},null)])}}),Pf=(0,oe.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var v=this.nodeType,M=this.onClick,y=v==="objectStart"||v==="arrayStart";return y||v==="objectCollapsed"||v==="arrayCollapsed"?(0,oe.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(y?"open":"close"),onClick:M},[(0,oe.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,oe.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var _l,No;function Do(v){return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},Do(v)}function $l(v){return Object.prototype.toString.call(v).slice(8,-1).toLowerCase()}function Er(v){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,E=arguments.length>3?arguments[3]:void 0,$=E||{},X=$.key,ve=$.index,ae=$.type,P=ae===void 0?"content":ae,U=$.showComma,K=U!==void 0&&U,Y=$.length,j=Y===void 0?1:Y,ue=$l(v);if(ue==="array"){var te=Kl(v.map(function(ge,G,L){return Er(ge,"".concat(M,"[").concat(G,"]"),y+1,{index:G,showComma:G!==L.length-1,length:j,type:P})}));return[Er("[",M,y,{showComma:!1,key:X,length:v.length,type:"arrayStart"})[0]].concat(te,Er("]",M,y,{showComma:K,length:v.length,type:"arrayEnd"})[0])}if(ue==="object"){var Ce=Object.keys(v),Le=Kl(Ce.map(function(ge,G,L){return Er(v[ge],/^[a-zA-Z_]\w*$/.test(ge)?"".concat(M,".").concat(ge):"".concat(M,'["').concat(ge,'"]'),y+1,{key:ge,showComma:G!==L.length-1,length:j,type:P})}));return[Er("{",M,y,{showComma:!1,key:X,index:ve,length:Ce.length,type:"objectStart"})[0]].concat(Le,Er("}",M,y,{showComma:K,length:Ce.length,type:"objectEnd"})[0])}return[{content:v,level:y,key:X,index:ve,path:M,showComma:K,length:j,type:P}]}function Kl(v){if(typeof Array.prototype.flat=="function")return v.flat();for(var M=Ni(v),y=[];M.length;){var E=M.shift();Array.isArray(E)?M.unshift.apply(M,Ni(E)):y.push(E)}return y}function Po(v){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(v==null)return v;if(v instanceof Date)return new Date(v);if(v instanceof RegExp)return new RegExp(v);if(Do(v)!=="object")return v;if(M.get(v))return M.get(v);if(Array.isArray(v)){var y=v.map(function(X){return Po(X,M)});return M.set(v,y),y}var E={};for(var $ in v)E[$]=Po(v[$],M);return M.set(v,E),E}function jl(v,M){var y=Object.keys(v);if(
2024-11-21 17:47:13 +08:00
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())[0],Z=ce;y("update:selectedValue",Z),y("selectedChange",Z,ie)}},te=function(L){y("nodeClick",L)},Ce=function(L,W){if(L)ae.hiddenPaths=Mt(Mt({},ae.hiddenPaths),{},Oi({},W,1));else{var ee=Mt({},ae.hiddenPaths);delete ee[W],ae.hiddenPaths=ee}},Le=function(L,W){v.collapsedOnClickBrackets&&Ce(L,W.path),y("bracketsClick",L,W)},ge=function(L,W){Ce(L,W.path),y("iconClick",L,W)},G=function(L,W){var ee=Po(v.data),ce=v.rootPath;new Function("data","val","data".concat(W.slice(ce.length),"=val"))(ee,L),y("update:data",ee)};return(0,oe.watchEffect)(function(){K.value&&function(L){throw new Error("[VueJSONPretty] ".concat(L))}(K.value)}),(0,oe.watchEffect)(function(){P.value&&Y()}),(0,oe.watch)(function(){return v.deep},function(L){L&&(ae.hiddenPaths=ve(L,v.collapsedNodeLength))}),(0,oe.watch)(function(){return v.collapsedNodeLength},function(L){L&&(ae.hiddenPaths=ve(v.deep,L))}),function(){var L,W,ee=(L=v.renderNodeKey)!==null&&L!==void 0?L:E.renderNodeKey,ce=(W=v.renderNodeValue)!==null&&W!==void 0?W:E.renderNodeValue,we=ae.visibleData&&ae.visibleData.map(function(me){return(0,oe.createVNode)(Wf,{key:me.id,node:me,collapsed:!!ae.hiddenPaths[me.path],theme:v.theme,showDoubleQuotes:v.showDoubleQuotes,showLength:v.showLength,checked:U.value.includes(me.path),selectableType:v.selectableType,showLine:v.showLine,showLineNumber:v.showLineNumber,showSelectController:v.showSelectController,selectOnClickNode:v.selectOnClickNode,nodeSelectable:v.nodeSelectable,highlightSelectedNode:v.highlightSelectedNode,editable:v.editable,editableTrigger:v.editableTrigger,showIcon:v.showIcon,showKeyValueSpace:v.showKeyValueSpace,renderNodeKey:ee,renderNodeValue:ce,onNodeClick:te,onBracketsClick:Le,onIconClick:ge,onSelectedChange:ue,onValueChange:G,style:v.itemHeight&&v.itemHeight!==20?{lineHeight:"".concat(v.itemHeight,"px")}:{}},null)});return(0,oe.createVNode)("div",{ref:$,class:{"vjs-tree":!0,"is-virtual":v.virtual,dark:v.theme==="dark"},onScroll:v.virtual?j:void 0,style:v.showLineNumber?Mt({paddingLeft:"".concat(12*Number(X.value.length.toString().length),"px")},v.style):v.style},[v.virtual?(0,oe.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(v.height,"px")}},[(0,oe.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(P.value.length*v.itemHeight,"px")}},[(0,oe.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(ae.translateY,"px)")}},[we])])]):we])}}});var zf=Vl.Z;const Hf=Kn({__name:"JsonPreview",props:{data:Object},setup(v){return(M,y)=>(Ai(),Zl(_t(zf),{path:"res",deep:3,showLength:!0,data:v.data},null,8,["data"]))}}),Ff=ql(Of);ql(Hf);const If=Kn({__name:"drawer",emits:["success","register"],setup(v,{emit:M}){const y=M,E=Li(!0),$=Li(),[X,{resetFields:ve,setFieldsValue:ae,validate:P}]=tf({labelWidth:120,schemas:nf,showActionButtonGroup:!1}),[U,{setDrawerProps:K,closeDrawer:Y}]=lf(te=>Wr(this,null,function*(){yield ve(),K({confirmLoading:!1}),E.value=!!(te!=null&&te.isUpdate),$.value=te==null?void 0:te.record,yield ae(un({},te.record))})),j=Wo(()=>_t(E)?"编辑":"新增");function ue(){return Wr(this,null,function*(){try{const te=yield P();K({confirmLoading:!0});const Ce=Hl(te,[]),Le=_t(E)?af:of,ge=_t(E)?Object.assign({},un(un({},_t($)),Ce)):un({},Ce);yield Le(ge),Y(),y("success")}finally{K({confirmLoading:!1})}})}return(te,Ce)=>(Ai(),Zl(_t(sf),bf(te.$attrs,{onRegister:_t(U),showFooter:"",title:j.value,width:"600px",onOk:ue}),{default:Il(()=>[Ti(_t(rf),{onRegister:_t(X)},{paramJson:Il(({model:Le})=>[Ti(_t(Ff),{style:{height:"500px"},"auto-height":!1,value:Le.paramJson,"onUpdate:value":ge=>Le.paramJson=ge,onChange:ge=>{Le.paramJson=ge}},null,8,["value","onUpdate:value","onChange"])]),_:1},8,["onRegister"])]),_:1},16,["onRegister","title"]))}});const Jf=df(If,[["__scopeId","data-v-a1e44071"]]);export{Jf as default};