33 lines
104 KiB
JavaScript
33 lines
104 KiB
JavaScript
import{aX as Yt,aY as Xt,aZ as Qt,F as _e,a_ as Zt,a$ as en,b0 as tn,b1 as nn,b2 as on,b3 as rn,T as an,b4 as sn,b5 as ln,b6 as cn,b7 as un,b8 as dn,b9 as fn,ba as pn,bb as gn,q as ye,bc as hn,I as nt,B as re,c as L,a as T,bd as bn,be as vn,bf as mn,bg as yn,aK as xn,bh as wn,i as Xe,e as be,bi as jn,bj as kn,d as ve,bk as _n,bl as Cn,bm as Sn,bn as En,bo as Tn,bp as Mn,bq as Rn,br as An,C as $n,bs as zn,bt as Ln,bu as In,ag as On,bv as Bn,bw as Hn,bx as Nn,by as Fn,bz as Dn,bA as Pn,bB as Vn,bC as Wn,bD as Un,bE as Kn,bF as qn,bG as Jn,bH as Gn,bI as Yn,bJ as Xn,aQ as Qn,D as Ae,A as ot,bK as Zn,x as we,bL as eo,bM as to,bN as no,bO as oo,bP as ro,bQ as io,v as rt,bR as ao,bS as so,bT as lo,bU as co,o as yt,bV as uo,h as z,g as xt,bW as fo,bX as po,p as wt,bY as go,n as he,bZ as ho,r as U,b_ as bo,b$ as vo,G as Ce,b as fe,a1 as Qe,c0 as mo,J as yo,c1 as xo,c2 as wo,c3 as jo,c4 as ko,c5 as _o,c6 as Co,c7 as So,c8 as Eo,c9 as To,ca as Mo,cb as Ro,t as ie,cc as Ao,cd as $o,ax as zo,ce as Lo,m as Io,cf as Oo,cg as Bo,u as Ie,aP as Ho,ch as No,aR as Fo,ci as Do,cj as Po,ck as Vo,cl as Wo,cm as jt,cn as Uo,co as kt,cp as it,z as Ze,cq as Ko,cr as qo,s as je,H as Jo,cs as Go,ct as Yo,cu as Xo,w as Qo,cv as Zo,y as ke,S as $e,cw as er,a5 as et,cx as tr}from"./index-4dcc0234.js";const nr=()=>{},or=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Yt,Comment:Xt,EffectScope:Qt,Fragment:_e,KeepAlive:Zt,ReactiveEffect:en,Static:tn,Suspense:nn,Teleport:on,Text:rn,Transition:an,TransitionGroup:sn,VueElement:ln,callWithAsyncErrorHandling:cn,callWithErrorHandling:un,camelize:dn,capitalize:fn,cloneVNode:pn,compatUtils:gn,compile:nr,computed:ye,createApp:hn,createBlock:nt,createCommentVNode:re,createElementBlock:L,createElementVNode:T,createHydrationRenderer:bn,createPropsRestProxy:vn,createRenderer:mn,createSSRApp:yn,createSlots:xn,createStaticVNode:wn,createTextVNode:Xe,createVNode:be,customRef:jn,defineAsyncComponent:kn,defineComponent:ve,defineCustomElement:_n,defineEmits:Cn,defineExpose:Sn,defineProps:En,defineSSRCustomElement:Tn,get devtools(){return Mn},effect:Rn,effectScope:An,getCurrentInstance:$n,getCurrentScope:zn,getTransitionRawChildren:Ln,guardReactiveProps:In,h:On,handleError:Bn,hydrate:Hn,initCustomFormatter:Nn,initDirectivesForSSR:Fn,inject:Dn,isMemoSame:Pn,isProxy:Vn,isReactive:Wn,isReadonly:Un,isRef:Kn,isRuntimeOnly:qn,isShallow:Jn,isVNode:Gn,markRaw:Yn,mergeDefaults:Xn,mergeProps:Qn,nextTick:Ae,normalizeClass:ot,normalizeProps:Zn,normalizeStyle:we,onActivated:eo,onBeforeMount:to,onBeforeUnmount:no,onBeforeUpdate:oo,onDeactivated:ro,onErrorCaptured:io,onMounted:rt,onRenderTracked:ao,onRenderTriggered:so,onScopeDispose:lo,onServerPrefetch:co,onUnmounted:yt,onUpdated:uo,openBlock:z,popScopeId:xt,provide:fo,proxyRefs:po,pushScopeId:wt,queuePostFlushCb:go,reactive:he,readonly:ho,ref:U,registerRuntimeCompiler:bo,render:vo,renderList:Ce,renderSlot:fe,resolveComponent:Qe,resolveDirective:mo,resolveDynamicComponent:yo,resolveFilter:xo,resolveTransitionHooks:wo,setBlockTracking:jo,setDevtoolsHook:ko,setTransitionHooks:_o,shallowReactive:Co,shallowReadonly:So,shallowRef:Eo,ssrContextKey:To,ssrUtils:Mo,stop:Ro,toDisplayString:ie,toHandlerKey:Ao,toHandlers:$o,toRaw:zo,toRef:Lo,toRefs:Io,transformVNodeArgs:Oo,triggerRef:Bo,unref:Ie,useAttrs:Ho,useCssModule:No,useCssVars:Fo,useSSRContext:Do,useSlots:Po,useTransitionState:Vo,vModelCheckbox:Wo,vModelDynamic:jt,vModelRadio:Uo,vModelSelect:kt,vModelText:it,vShow:Ze,version:Ko,warn:qo,watch:je,watchEffect:Jo,watchPostEffect:Go,watchSyncEffect:Yo,withAsyncContext:Xo,withCtx:Qo,withDefaults:Zo,withDirectives:ke,withKeys:$e,withMemo:er,withModifiers:et,withScopeId:tr},Symbol.toStringTag,{value:"Module"}));(function(){try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode('.t-window::-webkit-scrollbar,.t-code::-webkit-scrollbar,.t-text-editor::-webkit-scrollbar,.t-vue-codemirror .vue-codemirror .CodeMirror .CodeMirror-hscrollbar::-webkit-scrollbar{width:8px;height:8px}.t-window::-webkit-scrollbar-button,.t-code::-webkit-scrollbar-button,.t-text-editor::-webkit-scrollbar-button,.t-vue-codemirror .vue-codemirror .CodeMirror .CodeMirror-hscrollbar::-webkit-scrollbar-button{width:0;height:0;display:none}.t-window::-webkit-scrollbar-thumb,.t-code::-webkit-scrollbar-thumb,.t-text-editor::-webkit-scrollbar-thumb,.t-vue-codemirror .vue-codemirror .CodeMirror .CodeMirror-hscrollbar::-webkit-scrollbar-thumb{border-radius:6px;border-style:dashed;border-color:transparent;border-width:2px;background-color:#9da5b766;background-clip:padding-box}.t-window::-webkit-scrollbar-thumb:hover,.t-code::-webkit-scrollbar-thumb:hover,.t-text-editor::-webkit-scrollbar-thumb:hover,.t-vue-codemirror .vue-codemirror .CodeMirror .CodeMirror-hscrollbar::-webkit-scrollbar-thumb:hover{background:rgba(157,165,183,.7)}.t-window::-webkit-scrollbar-track,.t-code::-webkit-scrollbar-track,.t-text-editor::-webkit-scrollbar-track,.t-vue-codemirror .vue-codemirror .CodeMirror .CodeMirror-hscrollbar::-webkit-scrollbar-track{border-radius:6px}.t-ansi-1{font-weight:700}.t-ansi-2{font-weight:200}.t-ansi-3{font-style:oblique}.t-ansi-4{text-decoration:underline}@-webkit-keyframes t-blink{0%{opacity:1}50%{opacity:1}50.01%{opacity:0}to{opacity:0}}.t-ansi-5,.t-ansi-6{animation:t-blink 1s linear infinite;-webkit-animation:t-blink 1s linear infinite;-moz-animation:t-blink 1s linear infinite;-ms-animation:t-blink 1s linear infinite;-o-animation:t-blink 1s linear infinite}.t-ansi-7{background-color:#fff;color:#1c1d21}.t-ansi-8{visibility:hidden}.t-ansi-9{text-decoration:line-through}.t-ansi-21,.t-ansi-22{font-weight:unset}.t-ansi-23{font-style:unset}.t-ansi-24,.t-ansi-29{text-decoration:none}.t-ansi-25,.t-ansi-26{animation:none;-webkit-animation:none;-moz-animation:none;-ms-animation:none;-o-animation:none}.t-ansi-27{background-color:inherit;color:inherit}.t-ansi-28{visibility:unset}.t-ansi-30{color:#000}.t-ansi-31{color:#f10606}.t-ansi-32{color:#14cb14}.t-ansi-33{color:#ff0}.t-ansi-34{color:#3993d4}.t-ansi-35{color:#bd12bd}.t-ansi-36{color:#0eb4b4}.t-ansi-37{color:#fff}.t-ansi-90{color:#585859}.t-ansi-91{color:#ef353a}.t-ansi-92{color:#4ec215}.t-ansi-93{color:#e3bd01}.t-ansi-94{color:#1faffe}.t-ansi-95{color:#eb7dec}.t-ansi-96{color:#00e3e4}.t-ansi-97{color:#fdfdfe}.t-ansi-40{background-color:#000}.t-ansi-41{background-color:#f10606}.t-ansi-42{background-color:#14cb14}.t-ansi-43{background-color:#ff0}.t-ansi-44{background-color:#3993d4}.t-ansi-45{background-color:#bd12bd}.t-ansi-46{background-color:#0eb4b4}.t-ansi-47{background-color:#fff}.t-ansi-100{background-color:#585859}.t-ansi-101{background-color:#ef353a}.t-ansi-102{background-color:#4ec215}.t-ansi-103{background-color:#e3bd01}.t-ansi-104{background-color:#1faffe}.t-ansi-105{background-color:#eb7dec}.t-ansi-106{background-color:#00e3e4}.t-ansi-107{background-color:#fdfdfe}.t-ansi-line{min-height:20px}.t-ansi-char{min-width:7px;min-height:20px;font-size:inherit;display:inline-block;height:100%;vertical-align:top;font-weight:700}:root{--t-point-size: 15px}.t-log-box{display:block;margin-block-start:1em;margin-block-end:1em;margin-inline-start:0;margin-inline-end:0}.t-shell-dot{opacity:0;transition:opacity .2s ease;-moz-transition:opacity .2s ease;-ms-transition:opacity .2s ease;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;margin-bottom:0}.t-shell-dots:hover .t-shell-dot{opacity:1}.t-container{position:relative;margin:0;padding:0;border-radius:15px;background-color:var(--t-main-background-color);box-shadow:var(--t-window-box-shadow);-moz-box-shadow:var(--t-window-box-shadow);-webkit-box-shadow:var(--t-window-box-shadow);-o-box-shadow:var(--t-window-box-shadow)}.t-header-container{position:relative;z-index:2;top:0;right:0;left:0}.t-header{text-align:center;padding:2px;background-color:var(--t-header-background-color)}.t-header h4{font-size:14px;margin:5px;letter-spacing:1px;color:var(--t-header-font-color)}.t-header ul.t-shell-dots{position:absolute;top:3px;left:8px;padding-left:0;margin:0}.t-header ul.t-shell-dots li{display:inline-block;width:16px;height:16px;border-radius:10px;margin-left:6px;margin-top:4px;line-height:16px;cursor:pointer}.t-header ul .t-shell-dots-red{background-color:#c83030}.t-header ul .t-shell-dots-yellow{background-color:#f7db60}.t-header ul .t-shell-dots-green{background-color:#2ec971}.t-window,.t-ask-input,.t-window p,.t-window div,.t-crude-font{font-size:13px;font-family:Monaco,Menlo,Consolas,monospace}.t-window{position:absolute;top:0;left:0;right:0;overflow:auto;z-index:1;max-height:none;min-height:140px;padding:0 20px;font-weight:400;line-height:20px;cursor:text;background-color:var(--t-main-background-color);color:var(--t-main-font-color)}.t-window .prompt:before{content:"$";margin-right:10px;word-wrap:break-word}.t-window p{overflow-wrap:break-word;word-break:break-all}.t-window p .cmd{line-height:24px}@keyframes cursor-flash{0%,to{opacity:0}50%{opacity:1}}.t-window .cursor{animation:cursor-flash 1s infinite;-webkit-animation:cursor-flash 1s infinite;-o-animation:cursor-flash 1s infinite;-moz-animation:cursor-flash 1s infinite;position:absolute;height:16px;margin-top:1px;background-color:var(--t-cursor-color)}.t-a{color:var(--t-link-color)}.t-a:hover{color:var(--t-link-hover-color)}.t-ask-input{border:none;max-width:300px;background:none;outline:none;padding:0;display:inline-block;color:var(--t-main-font-color)}.t-ask-input:focus,.t-ask-input:focus-visible{border:none;outline:none}.t-cmd-input{position:relative;border:none;width:1px;opacity:0;cursor:text;padding:1px 2px;-webkit-writing-mode:horizontal-tb!important;text-rendering:auto;letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-shadow:none;display:inline-block;text-align:start;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;-webkit-rtl-ordering:logical;border-image:initial;word-wrap:break-word;margin:0;background-color:var(--t-main-background-color)}.t-content-normal .success,.t-content-normal .error,.t-content-normal .warning,.t-content-normal .info,.t-content-normal .system{padding:2px 3px;color:var(--t-tag-font-color)}.t-content-normal .success{background-color:#27ae60}.t-content-normal .error{background-color:#c0392b}.t-content-normal .warning{background-color:#f39c12}.t-content-normal .info{background-color:#2980b9}.t-content-normal .system{background-color:#8697a2}.t-crude-font{font-weight:600}.t-flag{opacity:0}.t-last-line{font-size:0;word-spacing:0;letter-spacing:0;position:relative}.t-help-msg{min-height:20px;margin:-8px 0 10px;color:var(--t-cmd-help-msg-color)}@media screen and (max-width: 768px){.t-window{padding:0 15px}}.t-cmd-line{font-size:0}.t-cmd-line-content{font-size:13px;word-break:break-all}.t-cmd-key{font-weight:700;color:var(--t-cmd-key-color)}.t-cmd-arg{color:var(--t-cmd-arg-color)}.t-cmd-splitter{color:var(--t-cmd-splitter-color)}.t-help-list{margin:0;list-style:none;padding-left:0;display:inline-grid;display:-moz-inline-grid;display:-ms-inline-grid}.t-help-list li{margin:3px 0}.t-cmd-help{position:absolute;top:15px;right:15px;z-index:99;max-width:50%;padding:5px;overflow:auto;max-height:calc(100% - 60px);background-color:var(--t-cmd-help-background-color);color:var(--t-main-font-color);box-shadow:var(--t-cmd-help-box-shadow)}.t-cmd-help code{border:none;padding:2px 5px;border-radius:3px;color:var(--t-cmd-help-code-font-color);background-color:var(--t-cmd-help-code-background-color)!important}.t-cmd-help-eg{float:left;width:30px;display:flex;font-size:13px;line-height:26px}.t-cmd-help-example{float:left;width:calc(100% - 30px);display:flex}.t-cmd-help-des{font-size:13px}.t-pre-numbering{margin-top:0;position:absolute;top:0;left:-30px;width:30px;text-align:center;padding:1em 0}.t-pre-numbering li{list-style:none;font-size:1em}pre{position:relative;margin:0}.t-example-ul{padding:0 0 0 10px;margin:0;list-style:none}.t-table{max-width:100%;overflow:auto;padding:0;margin:0}.t-border-dashed{border-collapse:collapse;border:var(--t-table-border)}.t-table thead{font-weight:600}.t-table,.t-table tr,.t-table td,.t-table tbody,.t-table thead{margin:0;padding:15px}.t-code{position:relative;max-height:500px;overflow:auto}.t-vue-codemirror div,.t-vue-highlight div{font-size:14px}.t-code .t-vue-codemirror .vue-codemirror .CodeMirror{height:unset;border:none}.t-text-editor-container{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1}.t-text-editor{width:calc(100% - 10px);height:calc(100% - 35px);overflow:auto;resize:none;margin:0;padding:0 5px;border:none;font-size:15px;color:var(--t-main-font-color);background-color:var(--t-main-background-color)}.t-text-editor:focus-visible,.t-text-editor:focus{outline:none;outline-offset:unset}.t-text-editor-floor{position:absolute;height:35px;width:100%;bottom:0;left:0;background-color:var(--t-text-editor-floor-background-color)}.t-text-editor-floor-btn{border:none;outline:none;margin-top:10px;cursor:pointer;background-color:#0000}.t-close-btn{color:var(--t-text-editor-floor-close-btn-color)}.t-save-btn{color:var(--t-text-editor-floor-save-btn-color)}.t-text-editor-floor-btn:hover{color:var(--t-text-editor-floor-btn-hover-color)}.t-disable-select{user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-selece:none}.t-point{width:var(--t-point-size);height:var(--t-point-size);background-color:#0000;position:absolute;z-index:100}.t-point-lt{left:calc(0px - var(--t-point-size) / 2);top:calc(0px - var(--t-point-size) / 2);cursor:nwse-resize}.t-point-rt{left:calc(100% - var(--t-point-size) / 2);top:calc(0px - var(--t-point-size) / 2);cursor:nesw-resize}.t-point-lb{left:calc(0px - var(--t-point-size) / 2);top:calc(100% - var(--t-point-size) / 2);cursor:nesw-resize}.t-point-rb{left:calc(100% - var(--t-point-size) / 2);top:calc(100% - var(--t-point-size) / 2);cursor:nwse-resize}.t-code-default{background-color:var(--t-code-default-background-color)}.t-json-container .jv-container.jv-light{border:none;background-color:var(--t-json-background-color);color:var(--t-main-font-color)}.t-json-container .jv-container .jv-code,.t-json-container .jv-container .jv-code.open{padding-bottom:0}.t-json-container .jv-container{display:inline-block;min-width:300px}.t-json-container .jv-container.jv-light .jv-item.jv-array,.t-json-container .jv-container.jv-light .jv-item.jv-object{color:var(--t-json-value-obj-color)}.t-json-container .jv-container.jv-light .jv-key{color:var(--t-main-font-color)}.t-json-container .jv-container.jv-light .jv-item.jv-boolean{color:var(--t-json-value-bool-color)}.t-json-container .jv-container.jv-light .jv-item.jv-number{color:var(--t-json-value-number-color)}.t-json-container .jv-container.jv-light .jv-ellipsis{color:var(--t-main-font-color);background-color:var(--t-json-ellipsis-background-color)}.t-json-container .jv-container .jv-more:after{background:var(--t-json-more-background-webkit);background:var(--t-json-more-background)}.t-json-deep-selector{margin-top:8px;width:75px;position:absolute;margin-left:-150px;font-size:10px;border-radius:2px;cursor:pointer;border:1px solid var(--t-json-deep-selector-border-color)}.t-json-deep-selector:focus,.t-json-deep-selector:focus-visible{outline:none}.t-window div::selection,.t-window a::selection,.t-window span::selection,.t-window li::selection,.t-window p::selection,.t-window code::selection,.t-window td::selection,.t-window th::selection,.t-window br::selection{color:var(--t-selection-font-color);background-color:var(--t-selection-background-color)}.jv-node{position:relative}.jv-node:after{content:","}.jv-node:last-of-type:after{content:""}.jv-node.toggle{margin-left:13px!important}.jv-node .jv-node{margin-left:25px}.jv-container{box-sizing:border-box;position:relative}.jv-container.boxed{border:1px solid #eee;border-radius:6px}.jv-container.boxed:hover{box-shadow:0 2px 7px #00000026;border-color:transparent;position:relative}.jv-container.jv-light{background:#fff;white-space:nowrap;color:#525252;font-size:14px;font-family:Consolas,Menlo,Courier,monospace}.jv-container.jv-light .jv-ellipsis{color:#999;background-color:#eee;display:inline-block;line-height:.9;font-size:.9em;padding:0 4px 2px;margin:0 4px;border-radius:3px;vertical-align:2px;cursor:pointer;-webkit-user-select:none;user-select:none}.jv-container.jv-light .jv-button{color:#49b3ff}.jv-container.jv-light .jv-key{color:#111;margin-right:4px}.jv-container.jv-light .jv-item.jv-array{color:#111}.jv-container.jv-light .jv-item.jv-boolean{color:#fc1e70}.jv-container.jv-light .jv-item.jv-function{color:#067bca}.jv-container.jv-light .jv-item.jv-number{color:#fc1e70}.jv-container.jv-light .jv-item.jv-object{color:#111}.jv-container.jv-light .jv-item.jv-undefined{color:#e08331}.jv-container.jv-light .jv-item.jv-string{color:#42b983;word-break:break-word;white-space:normal}.jv-container.jv-light .jv-item.jv-string .jv-link{color:#0366d6}.jv-container.jv-light .jv-code .jv-toggle:before{padding:0 2px;border-radius:2px}.jv-container.jv-light .jv-code .jv-toggle:hover:before{background:#eee}.jv-container .jv-code{overflow:hidden;padding:30px 20px}.jv-container .jv-code.boxed{max-height:300px}.jv-container .jv-code.open{max-height:none!important;overflow:visible;overflow-x:auto;padding-bottom:45px}.jv-container .jv-toggle{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB3aWR0aD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjNjY2IiBkPSJNMCAwbDggOC04IDh6Ii8+PC9zdmc+);background-repeat:no-repeat;background-size:contain;background-position:50%;cursor:pointer;width:10px;height:10px;margin-right:2px;display:inline-block;-webkit-transition:-webkit-transform .1s;transition:-webkit-transform .1s;transition:transform .1s;transition:transform .1s,-webkit-transform .1s}.jv-container .jv-toggle.open{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more{position:absolute;z-index:1;bottom:0;left:0;right:0;height:40px;width:100%;text-align:center;cursor:pointer}.jv-container .jv-more .jv-toggle{position:relative;top:40%;z-index:2;color:#888;-webkit-transition:all .1s;transition:all .1s;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more .jv-toggle.open{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.jv-container .jv-more:after{content:"";width:100%;height:100%;position:absolute;bottom:0;left:0;z-index:1;background:-webkit-linear-gradient(top,transparent 20%,hsla(0,0%,90.2%,.3));background:linear-gradient(180deg,transparent 20%,hsla(0,0%,90.2%,.3));-webkit-transition:all .1s;transition:all .1s}.jv-container .jv-more:hover .jv-toggle{top:50%;color:#111}.jv-container .jv-more:hover:after{background:-webkit-linear-gradient(top,transparent 20%,hsla(0,0%,90.2%,.3));background:linear-gradient(180deg,transparent 20%,hsla(0,0%,90.2%,.3))}.jv-container .jv-button{position:relative;cursor:pointer;display:inline-block;padding:5px;z-index:5}.jv-container .jv-button.copied{opacity:.4;cursor:default}.jv-container .jv-tooltip{position:absolute}.jv-container .jv-tooltip.right{right:15px}.jv-container .jv-tooltip.left{left:15px}.jv-container .j-icon{font-size:12px}.t-header-pin[data-v-197040ed]{display:inline-block;position:absolute;z-index:100;right:13px;top:7px;cursor:pointer}.t-editor[data-v-7f2c08a6]{width:100%;height:100%}')),document.head.appendChild(i)}}catch(c){console.error("vite-plugin-css-injected-by-js",c)}})();var rr=Object.defineProperty,ir=(i,c,u)=>c in i?rr(i,c,{enumerable:!0,configurable:!0,writable:!0,value:u}):i[c]=u,Te=(i,c,u)=>(ir(i,typeof c!="symbol"?c+"":c,u),u);class _t{constructor(){Te(this,"onFinishListener")}finish(){this.onFinishListener!=null&&this.onFinishListener()}onFinish(c){this.onFinishListener=c}}class Ct extends _t{constructor(){super(...arguments),Te(this,"handler")}ask(c){this.handler!=null&&this.handler(c)}onAsk(c){this.handler=c}}class St extends _t{constructor(){super(...arguments),Te(this,"handler")}flush(c){this.handler!=null&&this.handler(c)}onFlush(c){this.handler=c}}const pt=100,ar="terminal";class sr{constructor(c){Te(this,"storageKey",ar),Te(this,"dataMap"),c&&(this.storageKey=c);let u=window.localStorage.getItem(this.storageKey);u?this.dataMap=JSON.parse(u):this.dataMap={}}push(c,u){let d=this.getData(c);d.cmdLog==null&&(d.cmdLog=[]),(d.cmdLog.length===0||d.cmdLog[d.cmdLog.length-1]!==u)&&(d.cmdLog.push(u),d.cmdLog.length>pt&&d.cmdLog.splice(0,d.cmdLog.length-pt)),d.cmdIdx=d.cmdLog.length,this.store()}store(){window.localStorage.setItem(this.storageKey,JSON.stringify(this.dataMap))}getData(c){let u=this.dataMap[c];return u==null&&(u={},this.dataMap[c]=u),u}getLog(c){let u=this.getData(c);return u.cmdLog||(u.cmdLog=[]),u.cmdLog}clear(c){let u=this.getData(c);u.cmdLog=[],u.cmdIdx=0,this.store()}clearAll(){this.dataMap={},this.store()}getIdx(c){return this.getData(c).cmdIdx|0}setIdx(c,u){this.getData(c).cmdIdx=u}}let lr=class{constructor(c){Te(this,"data"),this.data=c}post(c="terminal",u,d){console.debug(`Api receive event '${u}' from terminal '${c}' and attach options ${d}`);let b=this.data.pool[c];if(b!=null)return b(u,d)}pushMessage(c,u){return this.post(c,"pushMessage",u)}appendMessage(c,u){return this.post(c,"appendMessage",u)}fullscreen(c){return this.post(c,"fullscreen")}isFullscreen(c){return this.post(c,"isFullscreen")}dragging(c,u){return this.post(c,"dragging",u)}execute(c,u){return this.post(c,"execute",u)}focus(c,u){return this.post(c,"focus",u)}elementInfo(c){return this.post(c,"elementInfo")}textEditorOpen(c,u){return this.post(c,"textEditorOpen",u)}textEditorClose(c,u){return this.post(c,"textEditorClose",u)}};const me=new sr,Me={pool:{},options:{highlight:null,codemirror:null}};function Et(i,c){if(Me.pool[i])throw Error(`Unable to register an existing terminal: ${i}`);Me.pool[i]=c}function Tt(i){delete Me.pool[i]}function cr(i,c,u){Tt(c),Et(i,u)}function gt(){return Me.options}function ur(i){Me.options={...i}}const ze=new lr(Me);function tt(i){return String(i).replace(/&(?!\w+;)/g,"&").replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\n/g,"<br>").replace(/\t/g," ")}function Le(i){return i==null||typeof i=="string"&&i.trim().length===0||typeof i=="object"&&Object.keys(i).length===0}function ge(i){return!Le(i)}function Ge(i){return i?i.replace(/[<">']/g,c=>({"<":"<",'"':""",">":">","'":"'"})[c]):""}function at(i=document.body.clientWidth){let c={};return i<600?c.xs=!0:i>=600&&i<960?c.sm=!0:i>=960&&i<1264?c.md=!0:i>=1264&&i<1904?c.lg=!0:c.xl=!0,c}function dr(){return/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)}function fr(i){let c=0;for(let u=0;u<i.length;u++)i[u].match(/[^\x00-\xff]/ig)!=null?c+=2:c+=1;return c}function ce(i,c,u){i&&i.addEventListener&&i.addEventListener(c,u)}function ht(i,c,u){i&&i.removeEventListener&&i.removeEventListener(c,u)}function pr(){return navigator&&navigator.clipboard?navigator.clipboard.readText():new Promise((i,c)=>{try{let u=document.createElement("div");u.contentEditable="true";let d=document.activeElement.appendChild(u).parentNode;u.focus(),document.execCommand("paste");let b=u.innerText;d.removeChild(u),i(b)}catch(u){c(u)}})}function gr(i){if(i){if(i=i.replace(/nbsp;/g," "),navigator&&navigator.clipboard)return navigator.clipboard.writeText(i);{let c=document.createElement("textarea");return c.value=i,c.style.position="absolute",c.style.opacity="0",c.style.left="-999999px",c.style.top="-999999px",document.body.appendChild(c),c.focus(),c.select(),document.execCommand("copy"),c.remove(),Promise.resolve()}}}function bt(i,c){const{x:u,y:d}=i,b=c.x,k=c.y,m=c.width,r=c.height;return u>=b&&u<=b+m&&d>=k&&d<=k+r}function hr(){return window.getSelection?window.getSelection():document.getSelection()}function br(i){if(typeof i=="object"&&i)return i;if(typeof i=="string")try{return JSON.parse(i)}catch{return i}}function vr(i,c){/^((http|https):\/\/)?(([A-Za-z0-9]+-[A-Za-z0-9]+|[A-Za-z0-9]+)\.)+([A-Za-z]+)[/?:]?.*$/.test(i)?!i.startsWith("http")&&!i.startsWith("https")?window.open(`http://${i}`):window.open(i):c({class:"error",type:"normal",content:"Invalid website url"})}function mr(i){if(Le(i))return"";let c=i.replace(/\xA0/g," ").split(" "),u="",d=!0;for(let b=0;b<c.length;b++){let k=tt(c[b]);if(d)u+=`<span class='t-cmd-key'>${k}</span>`,d=!1;else if(k.startsWith("-"))u+=`<span class="t-cmd-arg">${k}</span>`;else if(k.length>0)if(k==="|")d=!0,u+=`<span>${k}</span>`;else{u+="<span>";let m=!1;const r=[...k];r.forEach((n,t)=>{n===","?u+=`<span class="t-cmd-splitter">${n}</span>`:n==="|"?(u+=n,d=!0,t<k.length-1&&(u+="<span class='t-cmd-key'>",m=!0)):u+=n,t==r.length-1&&n!="|"&&(d=!1)}),u+="</span>",m&&(u+="</span>")}b<c.length-1&&(u+="<span> </span>")}return u}function yr(i,c,u=null){for(;i;){if(i===c)return!0;if(u&&i.classList.contains(u))break;i=i.parentElement}return!1}function xr(){let i=navigator.userAgent;if(i)return/mobile/i.test(i);let c=at();return c.xs||c.sm}function wr(){let i=navigator.userAgent;return i?/pad/i.test(i):at().sm}const jr=[{key:"help",title:"Help",group:"local",usage:"help [pattern]",description:"Show command document.",example:[{des:"Get all commands.",cmd:"help"},{des:"Get help documentation for exact match commands.",cmd:"help refresh"},{des:"Get help documentation for fuzzy matching commands.",cmd:"help *e*"},{des:"Get help documentation for specified group, match key must start with ':'.",cmd:"help :groupA"}]},{key:"clear",title:"Clear screen or history logs",group:"local",usage:"clear [history]",description:"Clear screen or history.",example:[{cmd:"clear",des:"Clear all records on the current screen."},{cmd:"clear history",des:"Clear command history"}]},{key:"open",title:"Open page",group:"local",usage:"open <url>",description:"Open a specified page.",example:[{cmd:"open blog.beifengtz.com"}]}],kr="rgb(0,0,0)",_r="rgb(128,0,0)",Cr="rgb(0,128,0)",Sr="rgb(128,128,0)",Er="rgb(0,0,128)",Tr="rgb(128,0,128)",Mr="rgb(0,128,128)",Rr="rgb(192,192,192)",Ar="rgb(128,128,128)",$r="rgb(255,0,0)",zr="rgb(0,255,0)",Lr="rgb(255,255,0)",Ir="rgb(0,0,255)",Or="rgb(255,0,255)",Br="rgb(0,255,255)",Hr="rgb(255,255,255)",Nr="rgb(0,0,0)",Fr="rgb(0,0,95)",Dr="rgb(0,0,135)",Pr="rgb(0,0,175)",Vr="rgb(0,0,215)",Wr="rgb(0,0,255)",Ur="rgb(0,95,0)",Kr="rgb(0,95,95)",qr="rgb(0,95,135)",Jr="rgb(0,95,175)",Gr="rgb(0,95,215)",Yr="rgb(0,95,255)",Xr="rgb(0,135,0)",Qr="rgb(0,135,95)",Zr="rgb(0,135,135)",ei="rgb(0,135,175)",ti="rgb(0,135,215)",ni="rgb(0,135,255)",oi="rgb(0,175,0)",ri="rgb(0,175,95)",ii="rgb(0,175,135)",ai="rgb(0,175,175)",si="rgb(0,175,215)",li="rgb(0,175,255)",ci="rgb(0,215,0)",ui="rgb(0,215,95)",di="rgb(0,215,135)",fi="rgb(0,215,175)",pi="rgb(0,215,215)",gi="rgb(0,215,255)",hi="rgb(0,255,0)",bi="rgb(0,255,95)",vi="rgb(0,255,135)",mi="rgb(0,255,175)",yi="rgb(0,255,215)",xi="rgb(0,255,255)",wi="rgb(95,0,0)",ji="rgb(95,0,95)",ki="rgb(95,0,135)",_i="rgb(95,0,175)",Ci="rgb(95,0,215)",Si="rgb(95,0,255)",Ei="rgb(95,95,0)",Ti="rgb(95,95,95)",Mi="rgb(95,95,135)",Ri="rgb(95,95,175)",Ai="rgb(95,95,215)",$i="rgb(95,95,255)",zi="rgb(95,135,0)",Li="rgb(95,135,95)",Ii="rgb(95,135,135)",Oi="rgb(95,135,175)",Bi="rgb(95,135,215)",Hi="rgb(95,135,255)",Ni="rgb(95,175,0)",Fi="rgb(95,175,95)",Di="rgb(95,175,135)",Pi="rgb(95,175,175)",Vi="rgb(95,175,215)",Wi="rgb(95,175,255)",Ui="rgb(95,215,0)",Ki="rgb(95,215,95)",qi="rgb(95,215,135)",Ji="rgb(95,215,175)",Gi="rgb(95,215,215)",Yi="rgb(95,215,255)",Xi="rgb(95,255,0)",Qi="rgb(95,255,95)",Zi="rgb(95,255,135)",ea="rgb(95,255,175)",ta="rgb(95,255,215)",na="rgb(95,255,255)",oa="rgb(135,0,0)",ra="rgb(135,0,95)",ia="rgb(135,0,135)",aa="rgb(135,0,175)",sa="rgb(135,0,215)",la="rgb(135,0,255)",ca="rgb(135,95,0)",ua="rgb(135,95,95)",da="rgb(135,95,135)",fa="rgb(135,95,175)",pa="rgb(135,95,215)",ga="rgb(135,95,255)",ha="rgb(135,135,0)",ba="rgb(135,135,95)",va="rgb(135,135,135)",ma="rgb(135,135,175)",ya="rgb(135,135,215)",xa="rgb(135,135,255)",wa="rgb(135,175,0)",ja="rgb(135,175,95)",ka="rgb(135,175,135)",_a="rgb(135,175,175)",Ca="rgb(135,175,215)",Sa="rgb(135,175,255)",Ea="rgb(135,215,0)",Ta="rgb(135,215,95)",Ma="rgb(135,215,135)",Ra="rgb(135,215,175)",Aa="rgb(135,215,215)",$a="rgb(135,215,255)",za="rgb(135,255,0)",La="rgb(135,255,95)",Ia="rgb(135,255,135)",Oa="rgb(135,255,175)",Ba="rgb(135,255,215)",Ha="rgb(135,255,255)",Na="rgb(175,0,0)",Fa="rgb(175,0,95)",Da="rgb(175,0,135)",Pa="rgb(175,0,175)",Va="rgb(175,0,215)",Wa="rgb(175,0,255)",Ua="rgb(175,95,0)",Ka="rgb(175,95,95)",qa="rgb(175,95,135)",Ja="rgb(175,95,175)",Ga="rgb(175,95,215)",Ya="rgb(175,95,255)",Xa="rgb(175,135,0)",Qa="rgb(175,135,95)",Za="rgb(175,135,135)",es="rgb(175,135,175)",ts="rgb(175,135,215)",ns="rgb(175,135,255)",os="rgb(175,175,0)",rs="rgb(175,175,95)",is="rgb(175,175,135)",as="rgb(175,175,175)",ss="rgb(175,175,215)",ls="rgb(175,175,255)",cs="rgb(175,215,0)",us="rgb(175,215,95)",ds="rgb(175,215,135)",fs="rgb(175,215,175)",ps="rgb(175,215,215)",gs="rgb(175,215,255)",hs="rgb(175,255,0)",bs="rgb(175,255,95)",vs="rgb(175,255,135)",ms="rgb(175,255,175)",ys="rgb(175,255,215)",xs="rgb(175,255,255)",ws="rgb(215,0,0)",js="rgb(215,0,95)",ks="rgb(215,0,135)",_s="rgb(215,0,175)",Cs="rgb(215,0,215)",Ss="rgb(215,0,255)",Es="rgb(215,95,0)",Ts="rgb(215,95,95)",Ms="rgb(215,95,135)",Rs="rgb(215,95,175)",As="rgb(215,95,215)",$s="rgb(215,95,255)",zs="rgb(215,135,0)",Ls="rgb(215,135,95)",Is="rgb(215,135,135)",Os="rgb(215,135,175)",Bs="rgb(215,135,215)",Hs="rgb(215,135,255)",Ns="rgb(215,175,0)",Fs="rgb(215,175,95)",Ds="rgb(215,175,135)",Ps="rgb(215,175,175)",Vs="rgb(215,175,215)",Ws="rgb(215,175,255)",Us="rgb(215,215,0)",Ks="rgb(215,215,95)",qs="rgb(215,215,135)",Js="rgb(215,215,175)",Gs="rgb(215,215,215)",Ys="rgb(215,215,255)",Xs="rgb(215,255,0)",Qs="rgb(215,255,95)",Zs="rgb(215,255,135)",el="rgb(215,255,175)",tl="rgb(215,255,215)",nl="rgb(215,255,255)",ol="rgb(255,0,0)",rl="rgb(255,0,95)",il="rgb(255,0,135)",al="rgb(255,0,175)",sl="rgb(255,0,215)",ll="rgb(255,0,255)",cl="rgb(255,95,0)",ul="rgb(255,95,95)",dl="rgb(255,95,135)",fl="rgb(255,95,175)",pl="rgb(255,95,215)",gl="rgb(255,95,255)",hl="rgb(255,135,0)",bl="rgb(255,135,95)",vl="rgb(255,135,135)",ml="rgb(255,135,175)",yl="rgb(255,135,215)",xl="rgb(255,135,255)",wl="rgb(255,175,0)",jl="rgb(255,175,95)",kl="rgb(255,175,135)",_l="rgb(255,175,175)",Cl="rgb(255,175,215)",Sl="rgb(255,175,255)",El="rgb(255,215,0)",Tl="rgb(255,215,95)",Ml="rgb(255,215,135)",Rl="rgb(255,215,175)",Al="rgb(255,215,215)",$l="rgb(255,215,255)",zl="rgb(255,255,0)",Ll="rgb(255,255,95)",Il="rgb(255,255,135)",Ol="rgb(255,255,175)",Bl="rgb(255,255,215)",Hl="rgb(255,255,255)",Nl="rgb(8,8,8)",Fl="rgb(18,18,18)",Dl="rgb(28,28,28)",Pl="rgb(38,38,38)",Vl="rgb(48,48,48)",Wl="rgb(58,58,58)",Ul="rgb(68,68,68)",Kl="rgb(78,78,78)",ql="rgb(88,88,88)",Jl="rgb(98,98,98)",Gl="rgb(108,108,108)",Yl="rgb(118,118,118)",Xl="rgb(128,128,128)",Ql="rgb(138,138,138)",Zl="rgb(148,148,148)",ec="rgb(158,158,158)",tc="rgb(168,168,168)",nc="rgb(178,178,178)",oc="rgb(188,188,188)",rc="rgb(198,198,198)",ic="rgb(208,208,208)",ac="rgb(218,218,218)",sc="rgb(228,228,228)",lc="rgb(238,238,238)",vt={c0:kr,c1:_r,c2:Cr,c3:Sr,c4:Er,c5:Tr,c6:Mr,c7:Rr,c8:Ar,c9:$r,c10:zr,c11:Lr,c12:Ir,c13:Or,c14:Br,c15:Hr,c16:Nr,c17:Fr,c18:Dr,c19:Pr,c20:Vr,c21:Wr,c22:Ur,c23:Kr,c24:qr,c25:Jr,c26:Gr,c27:Yr,c28:Xr,c29:Qr,c30:Zr,c31:ei,c32:ti,c33:ni,c34:oi,c35:ri,c36:ii,c37:ai,c38:si,c39:li,c40:ci,c41:ui,c42:di,c43:fi,c44:pi,c45:gi,c46:hi,c47:bi,c48:vi,c49:mi,c50:yi,c51:xi,c52:wi,c53:ji,c54:ki,c55:_i,c56:Ci,c57:Si,c58:Ei,c59:Ti,c60:Mi,c61:Ri,c62:Ai,c63:$i,c64:zi,c65:Li,c66:Ii,c67:Oi,c68:Bi,c69:Hi,c70:Ni,c71:Fi,c72:Di,c73:Pi,c74:Vi,c75:Wi,c76:Ui,c77:Ki,c78:qi,c79:Ji,c80:Gi,c81:Yi,c82:Xi,c83:Qi,c84:Zi,c85:ea,c86:ta,c87:na,c88:oa,c89:ra,c90:ia,c91:aa,c92:sa,c93:la,c94:ca,c95:ua,c96:da,c97:fa,c98:pa,c99:ga,c100:ha,c101:ba,c102:va,c103:ma,c104:ya,c105:xa,c106:wa,c107:ja,c108:ka,c109:_a,c110:Ca,c111:Sa,c112:Ea,c113:Ta,c114:Ma,c115:Ra,c116:Aa,c117:$a,c118:za,c119:La,c120:Ia,c121:Oa,c122:Ba,c123:Ha,c124:Na,c125:Fa,c126:Da,c127:Pa,c128:Va,c129:Wa,c130:Ua,c131:Ka,c132:qa,c133:Ja,c134:Ga,c135:Ya,c136:Xa,c137:Qa,c138:Za,c139:es,c140:ts,c141:ns,c142:os,c143:rs,c144:is,c145:as,c146:ss,c147:ls,c148:cs,c149:us,c150:ds,c151:fs,c152:ps,c153:gs,c154:hs,c155:bs,c156:vs,c157:ms,c158:ys,c159:xs,c160:ws,c161:js,c162:ks,c163:_s,c164:Cs,c165:Ss,c166:Es,c167:Ts,c168:Ms,c169:Rs,c170:As,c171:$s,c172:zs,c173:Ls,c174:Is,c175:Os,c176:Bs,c177:Hs,c178:Ns,c179:Fs,c180:Ds,c181:Ps,c182:Vs,c183:Ws,c184:Us,c185:Ks,c186:qs,c187:Js,c188:Gs,c189:Ys,c190:Xs,c191:Qs,c192:Zs,c193:el,c194:tl,c195:nl,c196:ol,c197:rl,c198:il,c199:al,c200:sl,c201:ll,c202:cl,c203:ul,c204:dl,c205:fl,c206:pl,c207:gl,c208:hl,c209:bl,c210:vl,c211:ml,c212:yl,c213:xl,c214:wl,c215:jl,c216:kl,c217:_l,c218:Cl,c219:Sl,c220:El,c221:Tl,c222:Ml,c223:Rl,c224:Al,c225:$l,c226:zl,c227:Ll,c228:Il,c229:Ol,c230:Bl,c231:Hl,c232:Nl,c233:Fl,c234:Dl,c235:Pl,c236:Vl,c237:Wl,c238:Ul,c239:Kl,c240:ql,c241:Jl,c242:Gl,c243:Yl,c244:Xl,c245:Ql,c246:Zl,c247:ec,c248:tc,c249:nc,c250:oc,c251:rc,c252:ic,c253:ac,c254:sc,c255:lc},cc="\0",uc="\x07",ae="\x1B",dc=ae+"[",fc=ae+"]",pc=ae+"^",gc=ae+"=",hc=ae+">",bc=ae+"(",vc=ae+")",mc=ae+"*",yc=ae+"+",xc=ae+"%",wc=ae+"#";function jc(i,c="windows"){let u=[""],d={attachStyle:"",styleFlag:[]};function b(){u[u.length-1]='<div class="t-ansi-line">'+u[u.length-1]+"</div>",u.push("")}function k(r){try{let n=r.split("");for(let t of n){let e,o="t-ansi-char";d.styleFlag.length>0?(d.styleFlag.forEach(l=>o+=" t-ansi-"+parseInt(String(l))),e=`<span class="${o}" style="${d.attachStyle}">${t}</span>`):e=`<span class="${o}" style="${d.attachStyle}">${t}</span>`,u[u.length-1]=u[u.length-1]+e}}catch(n){console.error("Can not fill char: "+r.toString(),n)}}let m=Array.from(i);for(let r=0;r<m.length;r++){let n=m[r];if(n!==cc){if(n===ae){let t=i.substring(r,r+2),e=r;if(t===dc){const o=/[@ABCDEFGHIJKLMPSTXZ`"bcdfghilmnpqrstwxz]/;let l;for(e=r+1;e<m.length-1;){let f=m[++e];if(o.test(f.toString())){if(f==="`"&&e+1<m.length){let g=m[e+1];if(/[wz{|]/.test(g.toString())){l=f+g,e++;break}}else if(f==='"'&&e+1<m.length){let g=m[e+1];if(/[pq]/.test(g.toString())){l=f+g,e++;break}}else if(f==="&"&&e+1<m.length){let g=m[e+1];if(g==="w"){l=f+g,e++;break}}l=f;break}}let s=i.substring(r,e+1);if(l==="m"){let f=s.substring(2,s.length-1);f.length===0&&(f="0"),d.styleFlag=[];for(let g of f.split(";")){let y=parseInt(g);y===0?(d.attachStyle="",d.styleFlag=[]):d.styleFlag.push(y)}d.styleFlag.length===3&&(d.styleFlag[0]===38&&d.styleFlag[1]===5?(d.attachStyle+=`color:${vt["c"+d.styleFlag[2]]};`,d.styleFlag=[]):d.styleFlag[0]===48&&d.styleFlag[1]===5?(d.attachStyle+=`background-color:${vt["c"+d.styleFlag[2]]};`,d.styleFlag=[]):d.attachStyle="")}}else if(t===fc){let o=r+1;for(;o<=m.length;)if(o++,m[o]===uc){e=o;break}else if(m[o]===ae&&m[o]==="\\"){e=o+1;break}}else if(t===pc){let o=r+1;for(;o<m.length&&(++o,m[o]!=="\\"););e=o}else t===gc||t===hc?e=r+1:(t===bc||t===vc||mc||yc||t===xc||t===wc)&&(e=r+2);r=e;continue}else if(n==="\r"){c==="windows"?r+1<m.length&&m[r+1]===`
|
||
`?(b(),r++):b():c==="mac"&&b();continue}else if(n===`
|
||
`){b();continue}else{if(n==="\b")continue;if(n===" "){k(" ".repeat(4));continue}else if(n>="\0"&&n<="")continue}k(n)}}return u.join("")}const Oe=i=>(wt("data-v-197040ed"),i=i(),xt(),i),kc={class:"t-header"},_c={style:{display:"inline-block"}},Cc={class:"t-shell-dots"},Sc=Oe(()=>T("svg",{t:"1645078279626",class:"t-shell-dot",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1864",width:"10",height:"10"},[T("path",{d:"M544.448 499.2l284.576-284.576a32 32 0 0 0-45.248-45.248L499.2 453.952 214.624 169.376a32 32 0 0 0-45.248 45.248l284.576 284.576-284.576 284.576a32 32 0 0 0 45.248 45.248l284.576-284.576 284.576 284.576a31.904 31.904 0 0 0 45.248 0 32 32 0 0 0 0-45.248L544.448 499.2z","p-id":"1865",fill:"#1413139c"})],-1)),Ec=[Sc],Tc=Oe(()=>T("svg",{t:"1645078503601",class:"t-shell-dot",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2762",width:"10",height:"10"},[T("path",{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z","p-id":"2763",fill:"#1413139c"})],-1)),Mc=[Tc],Rc=Oe(()=>T("svg",{t:"1645078604258",class:"t-shell-dot",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9907",width:"10",height:"10"},[T("path",{d:"M188.373333 128H384c23.573333 0 42.666667-19.093333 42.666667-42.666667s-19.093333-42.666667-42.666667-42.666666H85.333333C61.76 42.666667 42.666667 61.76 42.666667 85.333333v298.666667c0 23.573333 19.093333 42.666667 42.666666 42.666667s42.666667-19.093333 42.666667-42.666667V188.373333L396.170667 456.533333a42.730667 42.730667 0 0 0 60.362666 0 42.741333 42.741333 0 0 0 0-60.362666L188.373333 128zM938.666667 597.002667c-23.573333 0-42.666667 19.093333-42.666667 42.666666v195.626667l-268.309333-268.16c-16.746667-16.64-43.893333-16.64-60.544 0s-16.650667 43.893333 0 60.533333L835.317333 896h-195.626666c-23.584 0-42.666667 19.093333-42.666667 42.666667s19.082667 42.666667 42.666667 42.666666h298.666666C961.92 981.333333 981.333333 961.92 981.333333 938.336v-298.666667c0-23.573333-19.093333-42.666667-42.666666-42.666666z","p-id":"9908",fill:"#1413139c"})],-1)),Ac=[Rc],$c={key:0,t:"1683254395548",class:"icon",viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4113",width:"18",height:"18"},zc=Oe(()=>T("path",{d:"M320 839.68l-238.592 174.08c-8.704 6.656-19.456 9.728-29.696 9.728-12.8 0-26.112-5.12-35.84-14.848-17.92-17.92-20.48-46.08-5.12-66.56l212.992-288.256L56.32 487.424C39.936 471.04 36.864 445.44 48.128 425.472c8.192-12.8 76.8-112.64 229.376-75.264 2.56 0.512 5.12 0.512 8.192 1.024 6.144 0.512 13.312 1.024 20.992 2.56 32.256 5.12 89.6-20.48 139.264-62.976 47.616-40.448 78.336-87.552 78.336-120.32 0-7.68 0-15.872-0.512-23.552-1.024-30.72-3.072-77.824 31.744-112.64 41.472-41.472 107.52-45.056 153.088-7.68 1.024 0.512 1.536 1.536 2.56 2.56 24.576 24.064 276.48 275.968 279.04 278.528 21.504 21.504 33.792 50.688 33.792 81.408s-11.776 59.392-33.792 80.896c-34.816 34.816-82.432 33.28-113.664 31.744-7.168 0-15.36-0.512-23.04-0.512-30.72 0-67.584 21.504-103.936 60.928-50.688 55.296-81.92 126.464-79.36 158.72 1.024 10.24 3.072 28.16 3.584 30.72 36.864 149.504-62.976 217.6-74.752 225.28-20.48 12.288-46.592 9.216-62.976-7.168l-165.376-165.376-50.688 35.328z","p-id":"4114",fill:"#daf3ef"},null,-1)),Lc=[zc],Ic={key:1,t:"1683166931100",class:"icon",viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2638",width:"18",height:"18"},Oc=Oe(()=>T("path",{d:"M51.196068 1024c-13.021992 0-26.0184-5.091113-36.021541-15.094254-18.113104-18.164271-20.262117-46.050265-5.091113-66.337966l213.059228-288.325828-166.983379-166.983379C39.862586 470.961896 36.639068 445.48075 48.305135 425.2698c7.982046-12.612656 76.699275-112.82315 229.483822-75.010766 2.532765 0.307002 5.270197 0.537253 8.212297 0.793088 6.267953 0.537253 13.277827 1.17684 20.87612 2.404847 32.33752 5.244614 89.516599-20.722619 139.148552-63.037697 47.559691-40.49865 78.285451-87.751339 78.285451-120.344693 0-7.57271-0.179084-15.631507-0.358169-23.536802-1.279174-30.623426-3.223519-77.697031 31.979351-112.874317 41.649907-41.701074 107.552953-45.05251 153.270633-7.854129 0.921005 0.741921 1.76526 1.535009 2.583932 2.379264l-0.025583 0c24.585725 24.048472 276.608594 275.815506 279.243692 278.476188 21.694792 21.694792 33.642277 50.527374 33.693444 81.176384 0.025583 30.674593-11.896319 59.456009-33.539943 81.099634-35.023785 35.049369-82.353225 33.053857-113.565071 31.723516-7.393626-0.153501-15.478006-0.332585-23.025133-0.332585-30.828094 0-67.69389 21.592458-103.715431 60.760767-50.808793 55.260318-82.09739 126.63823-79.411124 158.617581 1.125673 10.258976 3.223519 28.37208 3.607271 30.930428 36.891379 149.612195-63.114447 217.843339-74.627013 225.109047-20.697036 12.484739-46.357267 9.389137-63.012113-7.240125l-178.393611-178.393611c-10.003141-10.003141-10.003141-26.171901 0-36.175042s26.171901-10.003141 36.175042 0l178.393611 178.393611c7.854129-5.091113 80.101878-54.646315 51.320462-171.76749-0.51167-2.35368-3.044434-23.562386-4.374775-35.970374-4.298025-51.115795 35.586622-136.027367 92.688951-198.118475 32.439854-35.254036 83.27423-77.287695 141.348731-77.287695 7.905296 0 16.399011 0.179084 24.662475 0.358169 32.41427 1.355924 58.048918 0.972172 75.77827-16.782763 11.973069-11.973069 18.548024-27.885994 18.548024-44.847842-0.025583-17.013015-6.677288-33.00269-18.701524-45.05251C952.220677 340.23031 683.849964 72.243349 675.944668 64.645055c-24.278723-19.724864-60.7096-17.882853-83.785899 5.21903-17.908437 17.908437-18.317772 43.491917-17.013015 75.087516 0.204668 8.800717 0.383752 17.243266 0.383752 25.148562 0 48.378362-35.995957 107.936705-96.270638 159.282751-49.478452 42.135993-122.979792 83.811483-180.491457 74.60143-6.293536-1.023339-12.049819-1.509425-17.192099-1.944345-3.325852-0.281418-6.421454-0.562837-9.312387-0.921005-2.456014-0.07675-4.860861-0.537253-7.188958-1.304758-117.760762-29.037251-167.597382 43.44075-172.893163 51.806549l182.742803 182.026466c8.954218 8.954218 10.028724 23.101883 2.481598 33.309692L51.170485 973.114457l238.617125-174.530506c11.435816-8.365798 27.425491-5.80745 35.740123 5.602782s5.80745 27.399908-5.602782 35.714539l-238.821793 174.12117C72.148939 1020.699731 61.685295 1024 51.196068 1024z",fill:"#e6e6e6","p-id":"2639"},null,-1)),Bc=[Oc],Hc=ve({__name:"THeader",props:{title:{type:String,default:"vue-web-terminal"},pinned:Boolean,draggable:Boolean},emits:["on-click"],setup(i,{emit:c}){const u=d=>{c("on-click",d)};return(d,b)=>(z(),L("div",kc,[T("h4",_c,[T("span",{onClick:b[0]||(b[0]=k=>u("title")),class:"t-disable-select",style:{cursor:"pointer"}},ie(i.title),1)]),T("ul",Cc,[T("li",{class:"shell-dot-item t-shell-dots-red",onClick:b[1]||(b[1]=k=>u("close"))},Ec),T("li",{class:"shell-dot-item t-shell-dots-yellow",onClick:b[2]||(b[2]=k=>u("minScreen"))},Mc),T("li",{class:"shell-dot-item t-shell-dots-green",onClick:b[3]||(b[3]=k=>u("fullScreen"))},Ac)]),i.draggable?(z(),L("div",{key:0,class:"t-header-pin",onClick:b[4]||(b[4]=k=>u("pin"))},[i.pinned?(z(),L("svg",$c,Lc)):(z(),L("svg",Ic,Bc))])):re("",!0)]))}}),Mt=(i,c)=>{const u=i.__vccOpts||i;for(const[d,b]of c)u[d]=b;return u},Nc=Mt(Hc,[["__scopeId","data-v-197040ed"]]),Fc={class:"t-content-normal"},Dc=["innerHTML"],Pc=ve({__name:"TViewerNormal",props:{message:Object,idx:[Number,String]},setup(i){return(c,u)=>(z(),L("span",Fc,[Ie(ge)(i.message.tag==null?i.message.class:i.message.tag)?(z(),L("span",{key:0,class:ot(i.message.class),style:{"margin-right":"10px"}},ie(i.message.tag==null?i.message.class:i.message.tag),3)):re("",!0),T("span",{innerHTML:i.message.content},null,8,Dc)]))}});var Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vc(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Wc(i){if(i.__esModule)return i;var c=i.default;if(typeof c=="function"){var u=function d(){return this instanceof d?Reflect.construct(c,arguments,this.constructor):c.apply(this,arguments)};u.prototype=c.prototype}else u={};return Object.defineProperty(u,"__esModule",{value:!0}),Object.keys(i).forEach(function(d){var b=Object.getOwnPropertyDescriptor(i,d);Object.defineProperty(u,d,b.get?b:{enumerable:!0,get:function(){return i[d]}})}),u}var At={exports:{}};const Uc=Wc(or);var Ye={exports:{}};/*!
|
||
* clipboard.js v2.0.11
|
||
* https://clipboardjs.com/
|
||
*
|
||
* Licensed MIT © Zeno Rocha
|
||
*/var mt;function Kc(){return mt||(mt=1,function(i,c){(function(d,b){i.exports=b()})(Rt,function(){return function(){var u={686:function(k,m,r){r.d(m,{default:function(){return K}});var n=r(279),t=r.n(n),e=r(370),o=r.n(e),l=r(817),s=r.n(l);function f(A){try{return document.execCommand(A)}catch{return!1}}var g=function(S){var x=s()(S);return f("cut"),x},y=g;function I(A){var S=document.documentElement.getAttribute("dir")==="rtl",x=document.createElement("textarea");x.style.fontSize="12pt",x.style.border="0",x.style.padding="0",x.style.margin="0",x.style.position="absolute",x.style[S?"right":"left"]="-9999px";var R=window.pageYOffset||document.documentElement.scrollTop;return x.style.top="".concat(R,"px"),x.setAttribute("readonly",""),x.value=A,x}var q=function(S,x){var R=I(S);x.container.appendChild(R);var $=s()(R);return f("copy"),R.remove(),$},Q=function(S){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},R="";return typeof S=="string"?R=q(S,x):S instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(S==null?void 0:S.type)?R=q(S.value,x):(R=s()(S),f("copy")),R},H=Q;function M(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(x){return typeof x}:M=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},M(A)}var O=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=S.action,R=x===void 0?"copy":x,$=S.container,D=S.target,oe=S.text;if(R!=="copy"&&R!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(D!==void 0)if(D&&M(D)==="object"&&D.nodeType===1){if(R==="copy"&&D.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(R==="cut"&&(D.hasAttribute("readonly")||D.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(oe)return H(oe,{container:$});if(D)return R==="cut"?y(D):H(D,{container:$})},X=O;function te(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?te=function(x){return typeof x}:te=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},te(A)}function Z(A,S){if(!(A instanceof S))throw new TypeError("Cannot call a class as a function")}function ne(A,S){for(var x=0;x<S.length;x++){var R=S[x];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,R.key,R)}}function ue(A,S,x){return S&&ne(A.prototype,S),x&&ne(A,x),A}function xe(A,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(S&&S.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),S&&pe(A,S)}function pe(A,S){return pe=Object.setPrototypeOf||function(R,$){return R.__proto__=$,R},pe(A,S)}function E(A){var S=P();return function(){var R=V(A),$;if(S){var D=V(this).constructor;$=Reflect.construct(R,arguments,D)}else $=R.apply(this,arguments);return C(this,$)}}function C(A,S){return S&&(te(S)==="object"||typeof S=="function")?S:N(A)}function N(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function P(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function V(A){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},V(A)}function F(A,S){var x="data-clipboard-".concat(A);if(S.hasAttribute(x))return S.getAttribute(x)}var J=function(A){xe(x,A);var S=E(x);function x(R,$){var D;return Z(this,x),D=S.call(this),D.resolveOptions($),D.listenClick(R),D}return ue(x,[{key:"resolveOptions",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof $.action=="function"?$.action:this.defaultAction,this.target=typeof $.target=="function"?$.target:this.defaultTarget,this.text=typeof $.text=="function"?$.text:this.defaultText,this.container=te($.container)==="object"?$.container:document.body}},{key:"listenClick",value:function($){var D=this;this.listener=o()($,"click",function(oe){return D.onClick(oe)})}},{key:"onClick",value:function($){var D=$.delegateTarget||$.currentTarget,oe=this.action(D)||"copy",Se=X({action:oe,container:this.container,target:this.target(D),text:this.text(D)});this.emit(Se?"success":"error",{action:oe,text:Se,trigger:D,clearSelection:function(){D&&D.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function($){return F("action",$)}},{key:"defaultTarget",value:function($){var D=F("target",$);if(D)return document.querySelector(D)}},{key:"defaultText",value:function($){return F("text",$)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function($){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return H($,D)}},{key:"cut",value:function($){return y($)}},{key:"isSupported",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],D=typeof $=="string"?[$]:$,oe=!!document.queryCommandSupported;return D.forEach(function(Se){oe=oe&&!!document.queryCommandSupported(Se)}),oe}}]),x}(t()),K=J},828:function(k){var m=9;if(typeof Element<"u"&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}function n(t,e){for(;t&&t.nodeType!==m;){if(typeof t.matches=="function"&&t.matches(e))return t;t=t.parentNode}}k.exports=n},438:function(k,m,r){var n=r(828);function t(l,s,f,g,y){var I=o.apply(this,arguments);return l.addEventListener(f,I,y),{destroy:function(){l.removeEventListener(f,I,y)}}}function e(l,s,f,g,y){return typeof l.addEventListener=="function"?t.apply(null,arguments):typeof f=="function"?t.bind(null,document).apply(null,arguments):(typeof l=="string"&&(l=document.querySelectorAll(l)),Array.prototype.map.call(l,function(I){return t(I,s,f,g,y)}))}function o(l,s,f,g){return function(y){y.delegateTarget=n(y.target,s),y.delegateTarget&&g.call(l,y)}}k.exports=e},879:function(k,m){m.node=function(r){return r!==void 0&&r instanceof HTMLElement&&r.nodeType===1},m.nodeList=function(r){var n=Object.prototype.toString.call(r);return r!==void 0&&(n==="[object NodeList]"||n==="[object HTMLCollection]")&&"length"in r&&(r.length===0||m.node(r[0]))},m.string=function(r){return typeof r=="string"||r instanceof String},m.fn=function(r){var n=Object.prototype.toString.call(r);return n==="[object Function]"}},370:function(k,m,r){var n=r(879),t=r(438);function e(f,g,y){if(!f&&!g&&!y)throw new Error("Missing required arguments");if(!n.string(g))throw new TypeError("Second argument must be a String");if(!n.fn(y))throw new TypeError("Third argument must be a Function");if(n.node(f))return o(f,g,y);if(n.nodeList(f))return l(f,g,y);if(n.string(f))return s(f,g,y);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function o(f,g,y){return f.addEventListener(g,y),{destroy:function(){f.removeEventListener(g,y)}}}function l(f,g,y){return Array.prototype.forEach.call(f,function(I){I.addEventListener(g,y)}),{destroy:function(){Array.prototype.forEach.call(f,function(I){I.removeEventListener(g,y)})}}}function s(f,g,y){return t(document.body,f,g,y)}k.exports=e},817:function(k){function m(r){var n;if(r.nodeName==="SELECT")r.focus(),n=r.value;else if(r.nodeName==="INPUT"||r.nodeName==="TEXTAREA"){var t=r.hasAttribute("readonly");t||r.setAttribute("readonly",""),r.select(),r.setSelectionRange(0,r.value.length),t||r.removeAttribute("readonly"),n=r.value}else{r.hasAttribute("contenteditable")&&r.focus();var e=window.getSelection(),o=document.createRange();o.selectNodeContents(r),e.removeAllRanges(),e.addRange(o),n=e.toString()}return n}k.exports=m},279:function(k){function m(){}m.prototype={on:function(r,n,t){var e=this.e||(this.e={});return(e[r]||(e[r]=[])).push({fn:n,ctx:t}),this},once:function(r,n,t){var e=this;function o(){e.off(r,o),n.apply(t,arguments)}return o._=n,this.on(r,o,t)},emit:function(r){var n=[].slice.call(arguments,1),t=((this.e||(this.e={}))[r]||[]).slice(),e=0,o=t.length;for(e;e<o;e++)t[e].fn.apply(t[e].ctx,n);return this},off:function(r,n){var t=this.e||(this.e={}),e=t[r],o=[];if(e&&n)for(var l=0,s=e.length;l<s;l++)e[l].fn!==n&&e[l].fn._!==n&&o.push(e[l]);return o.length?t[r]=o:delete t[r],this}},k.exports=m,k.exports.TinyEmitter=m}},d={};function b(k){if(d[k])return d[k].exports;var m=d[k]={exports:{}};return u[k](m,m.exports,b),m.exports}return function(){b.n=function(k){var m=k&&k.__esModule?function(){return k.default}:function(){return k};return b.d(m,{a:m}),m}}(),function(){b.d=function(k,m){for(var r in m)b.o(m,r)&&!b.o(k,r)&&Object.defineProperty(k,r,{enumerable:!0,get:m[r]})}}(),function(){b.o=function(k,m){return Object.prototype.hasOwnProperty.call(k,m)}}(),b(686)}().default})}(Ye)),Ye.exports}(function(i,c){(function(u,d){i.exports=d(Uc,Kc())})(Rt,function(u,d){return m={},b.m=k=[function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=(e,o)=>{const l=e.__vccOpts||e;for(var[s,f]of o)l[s]=f;return l}},function(r,n){r.exports=u},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0}),s(t(1));var e=s(t(22)),o=s(t(42)),l=t(43);function s(f){return f&&f.__esModule?f:{default:f}}n.default={name:"JsonViewer",components:{JsonBox:e.default},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:"jv-light"},timeformat:{type:Function,default:function(f){return f.toLocaleString()}},previewMode:{type:Boolean,default:!1},showArrayIndex:{type:Boolean,default:!0},showDoubleQuotes:{type:Boolean,default:!1}},provide:function(){return{expandDepth:this.expandDepth,timeformat:this.timeformat,onKeyclick:this.onKeyclick}},data:function(){return{copied:!1,expandableCode:!1,expandCode:this.expanded}},computed:{jvClass:function(){return"jv-container "+this.theme+(this.boxed?" boxed":"")},copyText:function(){var f=this.copyable;return{copyText:f.copyText||"copy",copiedText:f.copiedText||"copied!",timeout:f.timeout||2e3,align:f.align}}},watch:{value:function(){this.onResized()}},mounted:function(){var f=this;this.debounceResized=(0,l.debounce)(this.debResized.bind(this),200),this.boxed&&this.$refs.jsonBox&&(this.onResized(),this.$refs.jsonBox.$el.addEventListener("resized",this.onResized,!0)),this.copyable&&new o.default(this.$refs.clip,{container:this.$refs.viewer,text:function(){return JSON.stringify(f.value,null,2)}}).on("success",function(g){f.onCopied(g)})},methods:{onResized:function(){this.debounceResized()},debResized:function(){var f=this;this.$nextTick(function(){f.$refs.jsonBox&&(250<=f.$refs.jsonBox.$el.clientHeight?f.expandableCode=!0:f.expandableCode=!1)})},onCopied:function(f){var g=this;this.copied||(this.copied=!0,setTimeout(function(){g.copied=!1},this.copyText.timeout),this.$emit("copied",f))},toggleExpandCode:function(){this.expandCode=!this.expandCode},onKeyclick:function(f){this.$emit("keyclick",f)}}}},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0});var e=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},o=t(1),l=H(t(31)),s=H(t(32)),f=H(t(33)),g=H(t(34)),y=H(t(35)),I=H(t(36)),q=H(t(37)),Q=H(t(38));function H(M){return M&&M.__esModule?M:{default:M}}n.default={name:"JsonBox",inject:["expandDepth","onKeyclick"],props:{value:{type:[Object,Array,String,Number,Boolean,Function,Date],default:null},keyName:{type:String,default:""},sort:Boolean,depth:{type:Number,default:0},previewMode:Boolean,forceExpand:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:{type:String,default:"$"}},data:function(){return{expand:!0,forceExpandMe:this.forceExpand}},mounted:function(){this.expand=this.previewMode||!(this.depth>=this.expandDepth)||this.forceExpandMe},methods:{toggle:function(){this.expand=!this.expand,this.dispatchEvent()},toggleAll:function(){this.expand=!this.expand,this.forceExpandMe=this.expand,this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch{var M=document.createEvent("Event");M.initEvent("resized",!0,!1),this.$el.dispatchEvent(M)}},getPath:function(){for(var M=[this.keyName],O=this.$parent;O.depth;)O.$el.classList.contains("jv-node")&&M.push(O.keyName),O=O.$parent;return M.reverse()}},render:function(){var M=this,O=[],X=void 0;this.value===null||this.value===void 0?X=s.default:Array.isArray(this.value)?X=I.default:Object.prototype.toString.call(this.value)==="[object Date]"?X=Q.default:e(this.value)==="object"?X=y.default:typeof this.value=="number"?X=f.default:typeof this.value=="string"?X=l.default:typeof this.value=="boolean"?X=g.default:typeof this.value=="function"&&(X=q.default);var te=this.keyName&&this.value&&(Array.isArray(this.value)||e(this.value)==="object"&&Object.prototype.toString.call(this.value)!=="[object Date]");return!this.previewMode&&te&&O.push((0,o.h)("span",{class:{"jv-toggle":!0,open:!!this.expand},onClick:function(Z){Z.altKey?M.toggleAll():M.toggle()}})),this.keyName&&O.push((0,o.h)("span",{class:{"jv-key":!0},innerText:this.showDoubleQuotes?'"'+this.keyName+'":':this.keyName+":",onClick:function(){M.onKeyclick(M.path)}})),O.push((0,o.h)(X,{class:{"jv-push":!0},jsonValue:this.value,keyName:this.keyName,sort:this.sort,depth:this.depth,expand:this.expand,previewMode:this.previewMode,forceExpand:this.forceExpandMe,showArrayIndex:this.showArrayIndex,showDoubleQuotes:this.showDoubleQuotes,path:this.path,"onUpdate:expand":function(Z){M.expand=Z},"onUpdate:expandAll":function(Z){M.expand=Z,M.forceExpandMe=M.expand}})),(0,o.h)("div",{class:{"jv-node":!0,"jv-key-node":Boolean(this.keyName)&&!te,toggle:!this.previewMode&&te}},O)}}},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0});var e=t(1),o=/^\w+:\/\//;n.default={name:"JsonString",props:{jsonValue:{type:String,required:!0}},data:function(){return{expand:!0,canExtend:!1}},mounted:function(){this.$refs.itemRef.offsetHeight>this.$refs.holderRef.offsetHeight&&(this.canExtend=!0)},methods:{toggle:function(){this.expand=!this.expand}},render:function(){var l=this.jsonValue,s=o.test(l),f=void 0;return this.expand?(f={class:{"jv-item":!0,"jv-string":!0},ref:"itemRef"},s?f.innerHTML='"'+(l='<a href="'+l+'" target="_blank" class="jv-link">'+l+"</a>").toString()+'"':f.innerText='"'+l.toString()+'"'):f={class:{"jv-ellipsis":!0},onClick:this.toggle,innerText:"..."},(0,e.h)("span",{},[this.canExtend&&(0,e.h)("span",{class:{"jv-toggle":!0,open:this.expand},onClick:this.toggle}),(0,e.h)("span",{class:{"jv-holder-node":!0},ref:"holderRef"}),(0,e.h)("span",f)])}}},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0});var e=t(1);n.default={name:"JsonUndefined",functional:!0,props:{jsonValue:{type:Object,default:null}},render:function(){return(0,e.h)("span",{class:{"jv-item":!0,"jv-undefined":!0},innerText:this.jsonValue===null?"null":"undefined"})}}},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0});var e=t(1);n.default={name:"JsonNumber",functional:!0,props:{jsonValue:{type:Number,required:!0}},render:function(){var o=Number.isInteger(this.jsonValue);return(0,e.h)("span",{class:{"jv-item":!0,"jv-number":!0,"jv-number-integer":o,"jv-number-float":!o},innerText:this.jsonValue.toString()})}}},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0});var e=t(1);n.default={name:"JsonBoolean",functional:!0,props:{jsonValue:Boolean},render:function(){return(0,e.h)("span",{class:{"jv-item":!0,"jv-boolean":!0},innerText:this.jsonValue.toString()})}}},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var e=o(1),o=o(22),l=(o=o)&&o.__esModule?o:{default:o};n.default={name:"JsonObject",props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,forceExpand:Boolean,sort:Boolean,previewMode:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:String},data:function(){return{value:{}}},computed:{ordered:function(){var s=this;if(!this.sort)return this.value;var f={};return Object.keys(this.value).sort().forEach(function(g){f[g]=s.value[g]}),f}},watch:{jsonValue:function(s){this.setValue(s)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(s){var f=this;setTimeout(function(){f.value=s},0)},toggle:function(){this.$emit("update:expand",!this.expand),this.dispatchEvent()},toggleAll:function(){this.$emit("update:expandAll",!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch{var s=document.createEvent("Event");s.initEvent("resized",!0,!1),this.$el.dispatchEvent(s)}}},render:function(){var s,f=this,g=[];if(this.previewMode||this.keyName||g.push((0,e.h)("span",{class:{"jv-toggle":!0,open:!!this.expand},onClick:function(I){I.altKey?f.toggleAll():f.toggle()}})),g.push((0,e.h)("span",{class:{"jv-item":!0,"jv-object":!0},innerText:"{"})),this.expand)for(var y in this.ordered)this.ordered.hasOwnProperty(y)&&(s=this.ordered[y],g.push((0,e.h)(l.default,{key:y,style:{display:this.expand?void 0:"none"},sort:this.sort,keyName:y,depth:this.depth+1,value:s,previewMode:this.previewMode,forceExpand:this.forceExpand,showArrayIndex:this.showArrayIndex,showDoubleQuotes:this.showDoubleQuotes,path:this.path+"."+y})));return!this.expand&&Object.keys(this.value).length&&g.push((0,e.h)("span",{class:{"jv-ellipsis":!0},onClick:function(I){I.altKey?f.toggleAll():f.toggle()},title:"click to reveal object content (keys: "+Object.keys(this.ordered).join(", ")+")",innerText:"..."})),g.push((0,e.h)("span",{class:{"jv-item":!0,"jv-object":!0},innerText:"}"})),(0,e.h)("span",g)}}},function(r,n,o){Object.defineProperty(n,"__esModule",{value:!0});var e=o(1),o=o(22),l=(o=o)&&o.__esModule?o:{default:o};n.default={name:"JsonArray",props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean,forceExpand:Boolean,previewMode:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:String},data:function(){return{value:[]}},watch:{jsonValue:function(s){this.setValue(s)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(s){var f=this,g=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0;g===0&&(this.value=[]),setTimeout(function(){s.length>g&&(f.value.push(s[g]),f.setValue(s,g+1))},0)},toggle:function(){this.$emit("update:expand",!this.expand),this.dispatchEvent()},toggleAll:function(){this.$emit("update:expandAll",!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch{var s=document.createEvent("Event");s.initEvent("resized",!0,!1),this.$el.dispatchEvent(s)}}},render:function(){var s=this,f=[];return this.previewMode||this.keyName||f.push((0,e.h)("span",{class:{"jv-toggle":!0,open:!!this.expand},onClick:function(g){g.altKey?s.toggleAll():s.toggle()}})),f.push((0,e.h)("span",{class:{"jv-item":!0,"jv-array":!0},innerText:"["})),this.expand&&this.value.forEach(function(g,y){f.push((0,e.h)(l.default,{key:y,style:{display:s.expand?void 0:"none"},sort:s.sort,keyName:s.showArrayIndex?""+y:"",depth:s.depth+1,value:g,previewMode:s.previewMode,forceExpand:s.forceExpand,showArrayIndex:s.showArrayIndex,showDoubleQuotes:s.showDoubleQuotes,path:s.path+"."+y}))}),!this.expand&&this.value.length&&f.push((0,e.h)("span",{class:{"jv-ellipsis":!0},onClick:function(g){g.altKey?s.toggleAll():s.toggle()},title:"click to reveal "+this.value.length+" hidden items",innerText:"..."})),f.push((0,e.h)("span",{class:{"jv-item":!0,"jv-array":!0},innerText:"]"})),(0,e.h)("span",f)}}},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0});var e=t(1);n.default={name:"JsonFunction",functional:!0,props:{jsonValue:{type:Function,required:!0}},render:function(){return(0,e.h)("span",{class:{"jv-item":!0,"jv-function":!0},attrs:{title:this.jsonValue.toString()},innerHTML:"<function>"})}}},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0});var e=t(1);n.default={name:"JsonDate",inject:["timeformat"],functional:!0,props:{jsonValue:{type:Date,required:!0}},render:function(){var o=this.jsonValue,l=this.timeformat;return(0,e.h)("span",{class:{"jv-item":!0,"jv-string":!0},innerText:'"'+l(o)+'"'})}}},function(r,n,t){t.r(n);var e,o=t(2),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(3),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(4),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(5),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(6),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(7),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(8),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(9),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(10),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(11),l=t.n(o);for(e in t.d(n,"default",function(){return l.a}),o)["default","default"].indexOf(e)<0&&function(s){t.d(n,s,function(){return o[s]})}(e)},function(r,n,t){t.r(n);var e,o=t(13);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);t(39);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/json-box.vue"]]);n.default=l},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.render=function(o,l,s,f,g,y){var I=(0,e.resolveComponent)("json-box");return(0,e.openBlock)(),(0,e.createElementBlock)("div",{ref:"viewer",class:(0,e.normalizeClass)(y.jvClass)},[s.copyable?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:0,class:(0,e.normalizeClass)("jv-tooltip "+(y.copyText.align||"right"))},[(0,e.createElementVNode)("span",{ref:"clip",class:(0,e.normalizeClass)(["jv-button",{copied:g.copied}])},[(0,e.renderSlot)(o.$slots,"copy",{copied:g.copied},function(){return[(0,e.createTextVNode)((0,e.toDisplayString)(g.copied?y.copyText.copiedText:y.copyText.copyText),1)]})],2)],2)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",{class:(0,e.normalizeClass)(["jv-code",{open:g.expandCode,boxed:s.boxed}])},[(0,e.createVNode)(I,{ref:"jsonBox",value:s.value,sort:s.sort,"preview-mode":s.previewMode,"show-array-index":s.showArrayIndex,"show-double-quotes":s.showDoubleQuotes,onKeyclick:y.onKeyclick},null,8,["value","sort","preview-mode","show-array-index","show-double-quotes","onKeyclick"])],2),g.expandableCode&&s.boxed?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:1,class:"jv-more",onClick:l[0]||(l[0]=function(){return y.toggleExpandCode&&y.toggleExpandCode.apply(y,arguments)})},[(0,e.createElementVNode)("span",{class:(0,e.normalizeClass)(["jv-toggle",{open:!!g.expandCode}])},null,2)])):(0,e.createCommentVNode)("v-if",!0)],2)};var e=t(1)},function(r,n,t){var e=t(40);typeof e=="string"&&(e=[[r.i,e,""]]);var o={hmr:!0,transform:void 0};t(26)(e,o),e.locals&&(r.exports=e.locals)},function(r,n,t){r.exports=function(e){var o=[];return o.toString=function(){return this.map(function(l){var s=function(f,g){var y=f[1]||"",I=f[3];return I?g&&typeof btoa=="function"?(f=function(q){return q=btoa(unescape(encodeURIComponent(JSON.stringify(q)))),q="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(q),"/*# ".concat(q," */")}(I),g=I.sources.map(function(q){return"/*# sourceURL=".concat(I.sourceRoot||"").concat(q," */")}),[y].concat(g).concat([f]).join(`
|
||
`)):[y].join(`
|
||
`):y}(l,e);return l[2]?"@media ".concat(l[2]," {").concat(s,"}"):s}).join("")},o.i=function(l,s,f){typeof l=="string"&&(l=[[null,l,""]]);var g={};if(f)for(var y=0;y<this.length;y++){var I=this[y][0];I!=null&&(g[I]=!0)}for(var q=0;q<l.length;q++){var Q=[].concat(l[q]);f&&g[Q[0]]||(s&&(Q[2]?Q[2]="".concat(s," and ").concat(Q[2]):Q[2]=s),o.push(Q))}},o}},function(r,n,t){var e,o,l,s={},f=(e=function(){return window&&document&&document.all&&!window.atob},function(){return o=o===void 0?e.apply(this,arguments):o}),g=(l={},function(E){if(l[E]===void 0){var C=function(N){return document.querySelector(N)}.call(this,E);if(C instanceof window.HTMLIFrameElement)try{C=C.contentDocument.head}catch{C=null}l[E]=C}return l[E]}),y=null,I=0,q=[],Q=t(41);function H(E,C){for(var N=0;N<E.length;N++){var P=E[N],V=s[P.id];if(V){V.refs++;for(var F=0;F<V.parts.length;F++)V.parts[F](P.parts[F]);for(;F<P.parts.length;F++)V.parts.push(ne(P.parts[F],C))}else{for(var J=[],F=0;F<P.parts.length;F++)J.push(ne(P.parts[F],C));s[P.id]={id:P.id,refs:1,parts:J}}}}function M(E,C){for(var N=[],P={},V=0;V<E.length;V++){var J=E[V],F=C.base?J[0]+C.base:J[0],J={css:J[1],media:J[2],sourceMap:J[3]};P[F]?P[F].parts.push(J):N.push(P[F]={id:F,parts:[J]})}return N}function O(E,C){var N=g(E.insertInto);if(!N)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var P=q[q.length-1];if(E.insertAt==="top")P?P.nextSibling?N.insertBefore(C,P.nextSibling):N.appendChild(C):N.insertBefore(C,N.firstChild),q.push(C);else if(E.insertAt==="bottom")N.appendChild(C);else{if(typeof E.insertAt!="object"||!E.insertAt.before)throw new Error(`[Style Loader]
|
||
|
||
Invalid value for parameter 'insertAt' ('options.insertAt') found.
|
||
Must be 'top', 'bottom', or Object.
|
||
(https://github.com/webpack-contrib/style-loader#insertat)
|
||
`);E=g(E.insertInto+" "+E.insertAt.before),N.insertBefore(C,E)}}function X(E){E.parentNode!==null&&(E.parentNode.removeChild(E),0<=(E=q.indexOf(E))&&q.splice(E,1))}function te(E){var C=document.createElement("style");return E.attrs.type="text/css",Z(C,E.attrs),O(E,C),C}function Z(E,C){Object.keys(C).forEach(function(N){E.setAttribute(N,C[N])})}function ne(E,C){var N,P,V,F,J;if(C.transform&&E.css){if(!(F=C.transform(E.css)))return function(){};E.css=F}return V=C.singleton?(J=I++,N=y=y||te(C),P=pe.bind(null,N,J,!1),pe.bind(null,N,J,!0)):E.sourceMap&&typeof URL=="function"&&typeof URL.createObjectURL=="function"&&typeof URL.revokeObjectURL=="function"&&typeof Blob=="function"&&typeof btoa=="function"?(F=C,J=document.createElement("link"),F.attrs.type="text/css",F.attrs.rel="stylesheet",Z(J,F.attrs),O(F,J),N=J,P=function(K,A,$){var x=$.css,R=$.sourceMap,$=A.convertToAbsoluteUrls===void 0&&R;(A.convertToAbsoluteUrls||$)&&(x=Q(x)),R&&(x+=`
|
||
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(R))))+" */"),R=new Blob([x],{type:"text/css"}),x=K.href,K.href=URL.createObjectURL(R),x&&URL.revokeObjectURL(x)}.bind(null,N,C),function(){X(N),N.href&&URL.revokeObjectURL(N.href)}):(N=te(C),P=function(K,x){var S=x.css,x=x.media;if(x&&K.setAttribute("media",x),K.styleSheet)K.styleSheet.cssText=S;else{for(;K.firstChild;)K.removeChild(K.firstChild);K.appendChild(document.createTextNode(S))}}.bind(null,N),function(){X(N)}),P(E),function(K){K?K.css===E.css&&K.media===E.media&&K.sourceMap===E.sourceMap||P(E=K):V()}}r.exports=function(E,C){if(typeof DEBUG<"u"&&DEBUG&&typeof document!="object")throw new Error("The style-loader cannot be used in a non-browser environment");(C=C||{}).attrs=typeof C.attrs=="object"?C.attrs:{},C.singleton||typeof C.singleton=="boolean"||(C.singleton=f()),C.insertInto||(C.insertInto="head"),C.insertAt||(C.insertAt="bottom");var N=M(E,C);return H(N,C),function(P){for(var V=[],F=0;F<N.length;F++){var J=N[F];(K=s[J.id]).refs--,V.push(K)}P&&H(M(P,C),C);for(var K,F=0;F<V.length;F++)if((K=V[F]).refs===0){for(var A=0;A<K.parts.length;A++)K.parts[A]();delete s[K.id]}}};var ue,xe=(ue=[],function(E,C){return ue[E]=C,ue.filter(Boolean).join(`
|
||
`)});function pe(E,C,V,P){var V=V?"":P.css;E.styleSheet?E.styleSheet.cssText=xe(C,V):(P=document.createTextNode(V),(V=E.childNodes)[C]&&E.removeChild(V[C]),V.length?E.insertBefore(P,V[C]):E.appendChild(P))}},function(r,n,t){var e=t(45);typeof e=="string"&&(e=[[r.i,e,""]]);var o={hmr:!0,transform:void 0};t(26)(e,o),e.locals&&(r.exports=e.locals)},function(r,n,t){var e=t(23);t.o(e,"render")&&t.d(n,"render",function(){return e.render})},function(r,n,e){Object.defineProperty(n,"__esModule",{value:!0});var e=e(30),o=(e=e)&&e.__esModule?e:{default:e};n.default=Object.assign(o.default,{install:function(l){l.component("JsonViewer",o.default)}})},function(r,n,t){t.r(n);var e,s=t(28),o=t(12);for(e in o)e!=="default"&&function(f){t.d(n,f,function(){return o[f]})}(e);t(44);var l=t(0),s=t.n(l)()(o.default,[["render",s.render],["__file","lib/json-viewer.vue"]]);n.default=s},function(r,n,t){t.r(n);var e,o=t(14);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/types/json-string.vue"]]);n.default=l},function(r,n,t){t.r(n);var e,o=t(15);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/types/json-undefined.vue"]]);n.default=l},function(r,n,t){t.r(n);var e,o=t(16);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/types/json-number.vue"]]);n.default=l},function(r,n,t){t.r(n);var e,o=t(17);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/types/json-boolean.vue"]]);n.default=l},function(r,n,t){t.r(n);var e,o=t(18);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/types/json-object.vue"]]);n.default=l},function(r,n,t){t.r(n);var e,o=t(19);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/types/json-array.vue"]]);n.default=l},function(r,n,t){t.r(n);var e,o=t(20);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/types/json-function.vue"]]);n.default=l},function(r,n,t){t.r(n);var e,o=t(21);for(e in o)e!=="default"&&function(s){t.d(n,s,function(){return o[s]})}(e);var l=t(0),l=t.n(l)()(o.default,[["__file","lib/types/json-date.vue"]]);n.default=l},function(r,n,t){t(24)},function(r,n,t){(n=t(25)(!1)).push([r.i,`.jv-node{position:relative}.jv-node:after{content:','}.jv-node:last-of-type:after{content:''}.jv-node.toggle{margin-left:13px !important}.jv-node .jv-node{margin-left:25px}
|
||
`,""]),r.exports=n},function(r,n){r.exports=function(t){var e=typeof window<"u"&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||typeof t!="string")return t;var o=e.protocol+"//"+e.host,l=o+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(s,g){var g=g.trim().replace(/^"(.*)"$/,function(y,I){return I}).replace(/^'(.*)'$/,function(y,I){return I});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(g)?s:(g=g.indexOf("//")===0?g:g.indexOf("/")===0?o+g:l+g.replace(/^\.\//,""),"url("+JSON.stringify(g)+")")})}},function(r,n){r.exports=d},function(r,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.debounce=function(e,o){var l=Date.now(),s=void 0;return function(){for(var f=arguments.length,g=Array(f),y=0;y<f;y++)g[y]=arguments[y];Date.now()-l<o&&s&&clearTimeout(s),s=setTimeout(function(){e.apply(void 0,g)},o),l=Date.now()}}},function(r,n,t){t(27)},function(r,n,l){var e=l(25),o=l(46),l=l(47);n=e(!1),l=o(l),n.push([r.i,".jv-container{box-sizing:border-box;position:relative}.jv-container.boxed{border:1px solid #eee;border-radius:6px}.jv-container.boxed:hover{box-shadow:0 2px 7px rgba(0,0,0,0.15);border-color:transparent;position:relative}.jv-container.jv-light{background:#fff;white-space:nowrap;color:#525252;font-size:14px;font-family:Consolas, Menlo, Courier, monospace}.jv-container.jv-light .jv-ellipsis{color:#999;background-color:#eee;display:inline-block;line-height:0.9;font-size:0.9em;padding:0px 4px 2px 4px;margin:0 4px;border-radius:3px;vertical-align:2px;cursor:pointer;-webkit-user-select:none;user-select:none}.jv-container.jv-light .jv-button{color:#49b3ff}.jv-container.jv-light .jv-key{color:#111111;margin-right:4px}.jv-container.jv-light .jv-item.jv-array{color:#111111}.jv-container.jv-light .jv-item.jv-boolean{color:#fc1e70}.jv-container.jv-light .jv-item.jv-function{color:#067bca}.jv-container.jv-light .jv-item.jv-number{color:#fc1e70}.jv-container.jv-light .jv-item.jv-object{color:#111111}.jv-container.jv-light .jv-item.jv-undefined{color:#e08331}.jv-container.jv-light .jv-item.jv-string{color:#42b983;word-break:break-word;white-space:normal}.jv-container.jv-light .jv-item.jv-string .jv-link{color:#0366d6}.jv-container.jv-light .jv-code .jv-toggle:before{padding:0px 2px;border-radius:2px}.jv-container.jv-light .jv-code .jv-toggle:hover:before{background:#eee}.jv-container .jv-code{overflow:hidden;padding:30px 20px}.jv-container .jv-code.boxed{max-height:300px}.jv-container .jv-code.open{max-height:initial !important;overflow:visible;overflow-x:auto;padding-bottom:45px}.jv-container .jv-toggle{background-image:url("+l+`);background-repeat:no-repeat;background-size:contain;background-position:center center;cursor:pointer;width:10px;height:10px;margin-right:2px;display:inline-block;-webkit-transition:-webkit-transform 0.1s;transition:-webkit-transform 0.1s;transition:transform 0.1s;transition:transform 0.1s, -webkit-transform 0.1s}.jv-container .jv-toggle.open{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more{position:absolute;z-index:1;bottom:0;left:0;right:0;height:40px;width:100%;text-align:center;cursor:pointer}.jv-container .jv-more .jv-toggle{position:relative;top:40%;z-index:2;color:#888;-webkit-transition:all 0.1s;transition:all 0.1s;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more .jv-toggle.open{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.jv-container .jv-more:after{content:"";width:100%;height:100%;position:absolute;bottom:0;left:0;z-index:1;background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);-webkit-transition:all 0.1s;transition:all 0.1s}.jv-container .jv-more:hover .jv-toggle{top:50%;color:#111}.jv-container .jv-more:hover:after{background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%)}.jv-container .jv-button{position:relative;cursor:pointer;display:inline-block;padding:5px;z-index:5}.jv-container .jv-button.copied{opacity:0.4;cursor:default}.jv-container .jv-tooltip{position:absolute}.jv-container .jv-tooltip.right{right:15px}.jv-container .jv-tooltip.left{left:15px}.jv-container .j-icon{font-size:12px}
|
||
`,""]),r.exports=n},function(r,n,t){r.exports=function(e,o){return o=o||{},typeof(e=e&&e.__esModule?e.default:e)!="string"?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),o.hash&&(e+=o.hash),/["'() \t\n]/.test(e)||o.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(r,n){r.exports="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB3aWR0aD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIAo8cG9seWdvbiBwb2ludHM9IjAsMCA4LDggMCwxNiIKc3R5bGU9ImZpbGw6IzY2NjtzdHJva2U6cHVycGxlO3N0cm9rZS13aWR0aDowIiAvPgo8L3N2Zz4="}],b.c=m,b.d=function(r,n,t){b.o(r,n)||Object.defineProperty(r,n,{enumerable:!0,get:t})},b.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},b.t=function(r,n){if(1&n&&(r=b(r)),8&n||4&n&&typeof r=="object"&&r&&r.__esModule)return r;var t=Object.create(null);if(b.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&n&&typeof r!="string")for(var e in r)b.d(t,e,function(o){return r[o]}.bind(null,e));return t},b.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return b.d(n,"a",n),n},b.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},b.p="",b(b.s=29);function b(r){if(m[r])return m[r].exports;var n=m[r]={i:r,l:!1,exports:{}};return k[r].call(n.exports,n,n.exports,b),n.l=!0,n.exports}var k,m})})(At);var qc=At.exports;const Jc=Vc(qc),Gc={style:{position:"relative"},class:"t-json-container"},Yc=T("option",{value:"",disabled:"",selected:"",hidden:"",label:"Choose a display deep"},null,-1),Xc=["label","value"],Qc=ve({__name:"TViewerJson",props:{message:Object,idx:[Number,String]},setup(i){const c=he([1,2,3,4,5,6,7,8,9,10]);return(u,d)=>(z(),L("span",Gc,[(z(),nt(Ie(Jc),{"expand-depth":i.message.depth,sort:"",copyable:"",expanded:"",key:i.idx+"_"+i.message.depth,value:Ie(br)(i.message.content)},null,8,["expand-depth","value"])),ke(T("select",{class:"t-json-deep-selector","onUpdate:modelValue":d[0]||(d[0]=b=>i.message.depth=b)},[Yc,(z(!0),L(_e,null,Ce(c,b=>(z(),L("option",{key:b,label:`Deep ${b}`,value:b},null,8,Xc))),128))],512),[[kt,i.message.depth]])]))}}),Zc={class:"t-code"},eu={key:0,class:"t-vue-highlight"},tu={key:1,class:"t-vue-codemirror"},nu={key:2,class:"t-code-default"},ou={style:{padding:"1em",margin:"0"}},ru={style:{"font-size":"15px"}},iu=ve({__name:"TViewerCode",props:{message:Object,idx:[Number,String]},setup(i){const c=ye(()=>{let d=gt();if(d)return d.highlight}),u=ye(()=>{let d=gt();if(d)return d.codemirror});return(d,b)=>{const k=Qe("highlightjs"),m=Qe("codemirror");return z(),L("div",Zc,[c.value?(z(),L("div",eu,[be(k,{ref:"highlightjs",autodetect:"",code:i.message.content},null,8,["code"])])):u.value?(z(),L("div",tu,[be(m,{ref:"codemirror",modelValue:i.message.content,"onUpdate:modelValue":b[0]||(b[0]=r=>i.message.content=r),options:u.value},null,8,["modelValue","options"])])):(z(),L("div",nu,[T("pre",ou,[T("code",ru,ie(i.message.content),1)])]))])}}}),au={class:"t-table t-border-dashed"},su={class:"t-border-dashed"},lu=["innerHTML"],cu=ve({__name:"TViewerTable",props:{message:Object,idx:[Number,String]},setup(i){return(c,u)=>(z(),L("table",au,[T("thead",null,[T("tr",su,[(z(!0),L(_e,null,Ce(i.message.content.head,d=>(z(),L("td",{key:d,class:"t-border-dashed"},ie(d),1))),128))])]),T("tbody",null,[(z(!0),L(_e,null,Ce(i.message.content.rows,(d,b)=>(z(),L("tr",{key:b,class:"t-border-dashed"},[(z(!0),L(_e,null,Ce(d,(k,m)=>(z(),L("td",{key:m,class:"t-border-dashed"},[T("div",{innerHTML:k},null,8,lu)]))),128))]))),128))])]))}}),uu=["innerHTML"],du={key:1},fu={key:0},pu={key:1},gu={class:"t-cmd-help-eg"},hu={class:"t-cmd-help-example"},bu={class:"t-example-ul"},vu={class:"t-example-li"},mu={class:"t-example-li"},yu={key:0,class:"t-cmd-help-des"},xu=ve({__name:"THelpBox",props:{top:Number,result:Object},setup(i,{expose:c}){const u=U();return c({getClientRect:()=>u.value.getBoundingClientRect()}),(b,k)=>(z(),L("div",{class:"t-cmd-help",ref_key:"terminalHelpBoxRef",ref:u,style:we(`top: ${i.top}px;max-height: calc(100% - ${i.top}px);`)},[i.result.item.description?(z(),L("p",{key:0,class:"text",style:{margin:"15px 0"},innerHTML:i.result.item.description},null,8,uu)):re("",!0),i.result.item.example&&i.result.item.example.length>0?(z(),L("div",du,[(z(!0),L(_e,null,Ce(i.result.item.example,(m,r)=>(z(),L("div",{key:r,class:"text"},[i.result.item.example.length===1?(z(),L("div",fu,[T("span",null,[Xe("Example: "),T("code",null,ie(m.cmd),1),Xe(" "+ie(m.des),1)])])):(z(),L("div",pu,[T("div",gu," eg"+ie(i.result.item.example.length>1?r+1:"")+": ",1),T("div",hu,[T("ul",bu,[T("li",vu,[T("code",null,ie(m.cmd),1)]),T("li",mu,[m.des!=null?(z(),L("span",yu,ie(m.des),1)):re("",!0)])])])]))]))),128))])):re("",!0)],4))}}),wu={class:"t-editor"},ju={class:"t-text-editor-floor",align:"center"},ku=ve({__name:"TEditor",props:{config:Object,modelValue:String},emits:["update:modelValue","close"],setup(i,{expose:c,emit:u}){const d=i,b=U(),k=U();rt(()=>{b.value=d.modelValue}),je(()=>b,n=>{u("update:modelValue",n)});const m=()=>{k.value.focus()},r=n=>{u("close",n)};return c({focus:m}),(n,t)=>(z(),L("div",wu,[ke(T("textarea",{name:"editor",ref_key:"textEditorRef",ref:k,autofocus:"",class:"t-text-editor","onUpdate:modelValue":t[0]||(t[0]=e=>b.value=e),onFocus:t[1]||(t[1]=(...e)=>i.config.onFocus&&i.config.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>i.config.onBlur&&i.config.onBlur(...e))},null,544),[[it,b.value]]),T("div",ju,[T("button",{class:"t-text-editor-floor-btn t-close-btn",onClick:t[3]||(t[3]=e=>r(!1)),title:"Cancel Edit"},"Cancel "),T("button",{class:"t-text-editor-floor-btn t-save-btn",onClick:t[4]||(t[4]=e=>r(!0)),title:"Save And Close"},"Save & Close ")])]))}}),_u=Mt(ku,[["__scopeId","data-v-7f2c08a6"]]),Cu={key:0},Su={class:"terminal"},Eu={key:0,class:"t-crude-font t-cmd-line"},Tu={class:"t-prompt t-cmd-line-content"},Mu=["innerHTML"],Ru={key:1},Au={key:0},$u={key:1},zu={key:2},Lu={key:3},Iu={key:4},Ou=["innerHTML"],Bu={key:0},Hu=["innerHTML"],Nu={key:1},Fu=["innerHTML"],Du=["type","onKeyup"],Pu=["innerHTML"],Vu=["onKeyup"],Wu={class:"t-help-msg"},Uu={key:1},Ku={class:"t-flag t-crude-font t-cmd-line t-disable-select"},Ee=ve({__name:"Terminal",props:{title:{type:String,default:"vue-web-terminal"},name:{type:String,default:""},initLog:{type:Array,default:()=>[{type:"normal",content:"Terminal Initializing ..."},{type:"normal",content:"Current login time: "+new Date().toLocaleString()},{type:"normal",content:"Welcome to vue web terminal! If you are using for the first time, you can use the <span class='t-cmd-key'>help</span> command to learn.Thanks for your star support: <a class='t-a' target='_blank' href='https://github.com/tzfun/vue-web-terminal'>https://github.com/tzfun/vue-web-terminal</a>"}]},context:{type:String,default:"/vue-web-terminal"},contextSuffix:{type:String,default:" > "},commandStore:Array,commandStoreSort:Function,autoHelp:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},enableExampleHint:{type:Boolean,default:!0},inputFilter:Function,dragConf:Object,commandFormatter:Function,tabKeyHandler:Function,searchHandler:Function,scrollMode:{type:String,default:"smooth"},pushMessageBefore:Function,logSizeLimit:{type:Number,default:200},enableDefaultCommand:{type:Boolean,default:!0}},emits:["on-keydown","on-click","before-exec-cmd","exec-cmd","destroyed","init-before","init-complete","on-active","on-inactive"],setup(i,{expose:c,emit:u}){const d=i,b=ye(()=>d.showHeader&&d.dragConf!=null),k=ye(()=>d.dragConf&&d.dragConf.pinned),m=ye(()=>o.show||H.open&&xe.value===document.activeElement||M.open&&M.focus),r=ye(()=>M.open||Q.open||H.open),n=ye(()=>{if(O.value){let a=[];for(let p in O.value)a.push(`${p}:${O.value[p]}`);return a.join(";")}return""}),t=U(),e=U(""),o=he({defaultWidth:7,width:7,left:"unset",top:"unset",idx:0,show:!1}),l=he({init:!1,en:8,cn:13}),s=U(!0),f=U([]),g=he({show:!1,defaultBoxRect:null,item:null}),y=U([]),I=U(!1),q=he({boxWidth:0,boxHeight:0,promptWidth:0,promptHeight:0}),Q=he({open:!1,content:null}),H=he({open:!1,question:null,isPassword:!1,callback:null,autoReview:!1,input:""}),M=he({open:!1,focus:!1,value:"",onClose:null});M.onFocus=()=>{M.focus=!0},M.onBlur=()=>{M.focus=!1};const O=U(),X=U(0),te=U(null),Z=U(null),ne=U(null),ue=U(null),xe=U(null),pe=U(null),E=U(null),C=U(null),N=U(null),P=U(null),V=U(null),F=U(null),J=U(null),K=U(null),A=U(null),S=U(null),x=U(),R=U(),$=U(),D=U();rt(()=>{u("init-before",G()),Ut(),d.initLog&&de(d.initLog);let a=[];d.enableDefaultCommand&&(a=a.concat(jr)),d.commandStore&&(d.commandStoreSort&&d.commandStore.sort(d.commandStoreSort),a=a.concat(d.commandStore)),y.value=a,ne.value&&(ne.value.scrollTop=ne.value.offsetHeight);let p=null;ce(window,"click",x.value=h=>{let v=!1,w=te.value;w&&w.getBoundingClientRect&&bt(h,w.getBoundingClientRect())&&(v=yr(h.target,w,"t-container")||h.target&&h.target.classList.contains("t-text-editor-floor-btn")),r.value?o.show=!1:o.show=v,v?De():Gt()}),ce(window,"keydown",R.value=h=>{if(m.value)try{let v=h.key.toLowerCase();if(v.match(/c|control|meta/g)&&(h.metaKey||h.ctrlKey||v==="c"&&(h.metaKey||h.ctrlKey)))return;o.show&&(v==="tab"?(d.tabKeyHandler?d.tabKeyHandler(h,w=>{w?e.value=w.trim():e.value=""}):zt(),h.preventDefault()):document.activeElement!==ue.value&&(ue.value.focus(),dt(h)))}finally{u("on-keydown",h,G())}}),ce(ne.value,"mousedown",()=>{let h=hr(),v="";(!h.isCollapsed||(v=h.toString()).length>0)&&(p=v.length>0?v:h.toString())}),ce(ne.value,"contextmenu",h=>{if(console.log(h),h.preventDefault(),p){gr(p),p=null;return}const v=pr();v?v.then(w=>{if(!w)return;w=w.trim();const B=e.value;e.value=B&&B.length?`${B}${w}`:w,se()}).catch(w=>{console.error(w)}):se()});let j=null;if(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(h=>{ce(window,h,()=>{const v=document;v.fullscreenElement||v.fullScreen||v.mozFullScreen||v.webkitIsFullScreen?(j=JSON.parse(JSON.stringify(O.value)),dr()&&(O.value.width="100%",O.value.height="100%",O.value.left="0",O.value.top="0")):(I.value=!1,j&&(O.value=j))})}),xr()||wr()){let h=0;ne.value.addEventListener("touchend",()=>{let v=new Date().getTime();h===0?h=v:new Date().getTime()-h<600?se(!0):h=v})}D.value=new ResizeObserver(h=>{for(const v of h)v.target===Z.value&&Pe()}),Z.value&&D.value.observe(Z.value),Kt(),Et(G(),$.value=(h,v)=>{if(h==="pushMessage")de(v);else if(h==="appendMessage")Ot(v);else if(h==="fullscreen")Re();else{if(h==="isFullscreen")return I.value;if(h==="dragging")b.value?qe(v.x,v.y):console.warn("Terminal is not draggable: "+G());else if(h==="execute")!r.value&&ge(v)&&(e.value=v.trim(),ct());else if(h==="focus")se(v);else if(h==="elementInfo"){let w=ne.value.getBoundingClientRect(),B=te.value.getBoundingClientRect(),_=ne.value.scrollHeight>ne.value.clientHeight||ne.value.offsetHeight>ne.value.clientHeight;return{pos:qt(),screenWidth:B.width,screenHeight:B.height,clientWidth:_?w.width-48:w.width-40,clientHeight:w.height,charWidth:{en:l.en,cn:l.cn}}}else if(h==="textEditorOpen"){console.error(v);let w=v||{};M.value=w.content,M.open=!0,M.onClose=w.onClose,se()}else{if(h==="textEditorClose")return Je(v);if(h==="clearLog")return Ve(v);console.error(`Unsupported event type ${h} in instance ${G()}`)}}}),u("init-complete",G())}),yt(()=>{u("destroyed",G()),ht(window,"keydown",R.value),ht(window,"click",x.value),D.value&&Z.value&&(D.value.unobserve(Z.value),D.value=null),Tt(G())}),je(()=>f,()=>Be(),{deep:!0}),je(()=>d.context,()=>{Ae(()=>{lt()}).then(()=>{})}),je(()=>d.name,(a,p)=>{cr(a||G(),p||t.value,$.value)}),je(()=>d.dragConf?d.dragConf.zIndex:null,a=>{O.value&&(O.value["z-index"]=a)}),je(()=>d.showHeader,()=>{Pe()});let oe=0;function Se(){return oe++,`terminal_${oe}`}const Pe=()=>{Ae(()=>{if(Z.value&&Z.value.getBoundingClientRect){let a=Z.value.getBoundingClientRect();X.value=a.height}else X.value=0;console.debug("reset header height",X.value)})},G=()=>d.name?d.name:(t.value||(t.value=Se()),t.value),Ve=a=>{a?me.clear(G()):f.value=[]},$t=a=>{if(a==="fullScreen"&&!I.value)Re();else if(a==="minScreen"&&I.value)Re();else if(a==="pin"&&d.showHeader){let p=d.dragConf.pinned||!1;d.dragConf.pinned=!p}u("on-click",a,G())},st=()=>{if(l.init)return;let a=C.value;if(a){let p=a.getBoundingClientRect();p&&p.width>0&&(l.init=!0,l.en=p.width,l.cn=N.value.getBoundingClientRect().width,o.defaultWidth=l.en)}},lt=()=>{let a=E.value;if(a){let p=a.getBoundingClientRect();p.width>0&&(q.promptWidth=p.width,q.promptHeight=p.height)}},We=()=>{g.item=null},Ue=a=>{if(!d.autoHelp)return;if(d.searchHandler){d.searchHandler(y.value,a,j=>{g.item=j,Be()});return}let p=a;if(p==null&&(p=e.value.split(" ")[0]),Le(p))We();else if(p.trim().indexOf(" ")<0){let j=new RegExp(p.trim().replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),h=[],v=null;for(const w of y.value)if(ge(w.key)){let B=w.key.match(j);if(B!=null){let _=B.index*1e3+(p.length-B[0].length)+(w.key.length-B[0].length);if(_===0){v=w;break}else h.push({item:w,score:_})}}if(v==null)if(h.length>0)h.sort((w,B)=>w.score-B.score),v=h[0].item;else{g.item=null;return}g.item=v,Be()}},zt=()=>{g.item&&(e.value=g.item.key)},se=a=>{Ae(()=>{De();let p;H.open?(p=xe.value,o.show=!1):M.open?(p=P.value,o.show=!1):(a===!0&&(p=ue.value),o.show=!0),p&&p.focus()})},Lt=(a,p)=>{let j={head:["KEY","GROUP","DETAIL"],rows:[]},h=p&&p.length>1&&p.startsWith(":")?p.substring(1).toLowerCase():null;y.value.forEach(v=>{if(h){if(Le(v.group)||h!==v.group.toLowerCase())return}else if(!a.test(v.key))return;let w=[];w.push(`<span class='t-cmd-key'>${v.key}</span>`),w.push(v.group);let B="";if(ge(v.description)&&(B+=`Description: ${v.description}<br>`),ge(v.usage)&&(B+=`Usage: <code>${Ge(v.usage)}</code><br>`),v.example!=null){v.example.length>0&&(B+="<br>");for(let _ in v.example){let le=v.example[_];B+=`
|
||
<div>
|
||
<div style="float:left;width: 30px;display:flex;font-size: 12px;line-height: 18px;">
|
||
eg${parseInt(_)+1}:
|
||
</div>
|
||
<div class="t-cmd-help-example">
|
||
<ul class="t-example-ul">
|
||
<li class="t-example-li"><code>${le.cmd}</code></li>
|
||
<li class="t-example-li"><span></span></li>
|
||
`,ge(le.des)&&(B+=`<li class="t-example-li"><span>${le.des}</span></li>`),B+=`
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
`}}w.push(B),j.rows.push(w)}),de({type:"table",content:j})},ct=()=>{if(We(),Bt(),ge(e.value))try{let a=e.value.split(" "),p=a[0];u("before-exec-cmd",p,e.value,G());const j=()=>{s.value=!1;let h=w=>{let B=()=>{s.value=!0,Ke()};if(w)if(w instanceof St){w.onFlush(_=>{Q.content=_}),w.onFinish(()=>{Q.open=!1,B()}),Q.open=!0;return}else if(w instanceof Ct){w.onAsk(_=>{H.input="",H.isPassword=_.isPassword,H.question=tt(_.question),H.callback=_.callback,H.autoReview=_.autoReview,se()}),w.onFinish(()=>{H.open=!1,B(),se(!0)}),H.open=!0;return}else de(w);B()},v=w=>{w&&de({type:"normal",class:"error",content:w}),s.value=!0,Ke()};u("exec-cmd",p,e.value,h,v,G())};if(d.enableDefaultCommand)switch(p){case"help":{let h=`^${a.length>1&&ge(a[1])?a[1]:"*"}$`;h=h.replace(/\*/g,".*"),Lt(new RegExp(h,"i"),a[1]);break}case"clear":Ve(a.length===2&&a[1]==="history");break;case"open":vr(a[1],de);break;default:{j();return}}else{j();return}}catch(a){console.error(a),de({type:"normal",class:"error",content:tt(Ge(a.stack)),tag:"error"})}Ke()},Ke=()=>{e.value="",He(),m.value?(se(),o.show=!0):o.show=!1,g.show=!0,g.defaultBoxRect=null},It=a=>{const p=a.type&&/^(normal|html|code|table|json)$/.test(a.type);return p?a.type==="json"&&(a.depth||(a.depth=1)):(console.debug(`Invalid terminal message type: ${a.type}, the default type normal will be used`),a.type="normal"),p},de=a=>{if(a){if(a instanceof Array){for(let p of a)ut(p);return}typeof a=="string"&&(a={type:"normal",content:a}),a.type==="ansi"&&(a.type="html",a.content=jc(a.content)),ut(a),a.type==="json"&&setTimeout(()=>{Be()},80)}},ut=a=>{It(a),a.type!=="cmdLine"&&d.pushMessageBefore&&d.pushMessageBefore(a,G()),f.value.push(a);let p=Math.floor(d.logSizeLimit*1.1);if(p>0&&f.value.length>p){let j=f.value.length-d.logSizeLimit;f.value.splice(0,j)}},Ot=a=>{let p;for(let j=f.value.length-1;j>=0;j--){let h=f.value[j];if(h.type!=="cmdLine"){p=h;break}}p?p.type==="normal"||p.type==="ansi"||p.type==="code"||p.type=="html"?p.content+=a:(console.warn(`The last message type is ${p.type}, can not append it and then push it.`),de(a)):de(a)},Be=()=>{Ae(()=>{let a=ne.value;a!=null&&a.scrollTo({top:a.scrollHeight,behavior:d.scrollMode})}).then(()=>{})},Bt=()=>{ge(e.value)&&me.push(G(),e.value),f.value.push({type:"cmdLine",content:`${Ge(d.context)}${d.contextSuffix}${ft(e.value)}`})},He=a=>{st(),o.idx=(a||e.value).length,o.left="unset",o.top="unset",o.width=o.defaultWidth},Ne=a=>{let p=o.idx,j=a||e.value;if(st(),p<0||p>=j.length){He();return}q.promptWidth===0&<();let h=pe.value.getBoundingClientRect().width,v={left:0,top:0},w=o.defaultWidth,B=q.promptWidth;for(let _=0;_<=p;_++)w=Pt(j[_]),v.left+=B,B=w,v.left>h&&(v.top+=20,v.left=w);o.left=v.left+"px",o.top=v.top+"px",o.width=w},Ht=()=>{o.idx>0&&o.idx--,Ne()},Nt=()=>{o.idx<e.value.length&&o.idx++,Ne()},Ft=()=>{let a=me.getLog(G()),p=me.getIdx(G());a.length!==0&&p>0&&(p-=1,e.value=a[p]?a[p]:""),He(),me.setIdx(G(),p),Ue(e.value.trim().split(" ")[0])},Dt=()=>{let a=me.getLog(G()),p=me.getIdx(G());a.length!==0&&p<a.length-1?(p+=1,e.value=a[p]?a[p]:""):(p=a.length,e.value=""),He(),me.setIdx(G(),p),Ue(e.value.trim().split(" ")[0])},Pt=a=>{let p=0;for(let j of a)p+=fr(j)===1?l.en:l.cn;return p},Vt=a=>{if(d.inputFilter){let h=a.target.value,v=d.inputFilter(a.data,h,a);v==null&&(v=h),e.value=v.trim()}Le(e.value)?We():Ue(),Fe(),Ne();let p=V.value.getBoundingClientRect(),j=g.defaultBoxRect||(F.value?F.value.getClientRect():null);p&&j&&bt(p,j)?(g.show=!1,g.defaultBoxRect=j):(g.show=!0,g.defaultBoxRect=null)},Fe=()=>{let a=ue.value;a.selectionStart!==o.idx&&(o.idx=a.selectionStart)},dt=a=>{let p=a.key.toLowerCase();p==="arrowleft"?(Fe(),Ht()):p==="arrowright"&&(Fe(),Nt())},Wt=a=>{let p=a.key.toLowerCase(),j=a.code.toLowerCase();(p==="home"||p==="end"||j==="altleft"||j==="metaleft"||j==="controlleft"||(a.ctrlKey||a.metaKey||a.altKey)&&(p==="arrowright"||p==="arrowleft"))&&(Fe(),Ne())},Re=()=>{let a=te.value;if(I.value){let p=document;p.exitFullscreen?p.exitFullscreen():p.webkitCancelFullScreen?p.webkitCancelFullScreen():p.mozCancelFullScreen?p.mozCancelFullScreen():p.msExitFullscreen&&p.msExitFullscreen()}else a.requestFullscreen?a.requestFullscreen():a.webkitRequestFullScreen?a.webkitRequestFullScreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen&&a.msRequestFullscreen();I.value=!I.value},Ut=()=>{let a={};if(b.value){let p=document.body.clientWidth,j=document.body.clientHeight,h=d.dragConf.width,v=h||700;h&&typeof h=="string"&&h.endsWith("%")&&(v=p*(parseInt(h)/100));let w=d.dragConf.height,B=w?parseInt(w):500;w&&typeof w=="string"&&w.endsWith("%")&&(B=j*(parseInt(w)/100));let _=d.dragConf.zIndex?d.dragConf.zIndex:100,le,ee,W=d.dragConf.init;W&&W.x&&W.y?(le=W.x,ee=W.y):(le=(p-v)/2,ee=(j-B)/2),a.position="fixed",a.width=v+"px",a.height=B+"px",a.left=le+"px",a.top=ee+"px",a["z-index"]=_}else a.width="100%",a.height="100%";O.value=a},Kt=()=>{if(!b.value)return;let a=0,p=0,j=Z.value,h=te.value,v=ne.value,w=!1,B=!1,_={minWidth:270,minHeight:180,type:"",boxX:0,boxY:0,boxWidth:0,boxHeight:0,cursorX:0,cursorY:0};const le=(ee,W)=>{B=!0,v.style["user-select"]="none",_.type=ee,_.cursorX=W.clientX,_.cursorY=W.clientY,_.boxX=h.offsetLeft,_.boxY=h.offsetTop,_.boxWidth=h.clientWidth,_.boxHeight=h.clientHeight};ce(j,"mousedown",ee=>{I.value||(De(),a=ee.clientX-h.offsetLeft,p=ee.clientY-h.offsetTop,w=!0,v.style["user-select"]="none")}),ce(J.value,"mousedown",ee=>{le("lt",ee)}),ce(K.value,"mousedown",ee=>{le("rt",ee)}),ce(A.value,"mousedown",ee=>{le("lb",ee)}),ce(S.value,"mousedown",ee=>{le("rb",ee)}),ce(document,"mousemove",ee=>{if(!(k.value||I.value)){if(w){let W=ee.clientX-a,Y=ee.clientY-p;qe(W,Y)}else if(B){let W=ee.clientX-_.cursorX,Y=ee.clientY-_.cursorY;_.type==="rb"?(W=W<0?-Math.min(_.boxWidth-_.minWidth,-W):W,Y=Y<0?-Math.min(_.boxHeight-_.minHeight,-Y):Y,O.value.width=_.boxWidth+W+"px",O.value.height=_.boxHeight+Y+"px"):_.type==="rt"?(W=W<0?-Math.min(_.boxWidth-_.minWidth,-W):W,Y=Y>0?Math.min(_.boxHeight-_.minHeight,Y):Y,O.value.width=_.boxWidth+W+"px",O.value.height=_.boxHeight-Y+"px",O.value.top=Math.max(0,_.boxY+Y)+"px"):_.type==="lb"?(W=W>0?Math.min(_.boxWidth-_.minWidth,W):W,Y=Y<0?-Math.min(_.boxHeight-_.minHeight,-Y):Y,O.value.width=_.boxWidth-W+"px",O.value.height=_.boxHeight+Y+"px",O.value.left=Math.max(0,_.boxX+W)+"px"):_.type==="lt"&&(W=W>0?Math.min(_.boxWidth-_.minWidth,W):W,Y=Y>0?Math.min(_.boxHeight-_.minHeight,Y):Y,O.value.width=_.boxWidth-W+"px",O.value.height=_.boxHeight-Y+"px",O.value.left=Math.max(0,_.boxX+W)+"px",O.value.top=Math.max(0,_.boxY+Y)+"px")}}}),ce(document,"mouseup",()=>{(w||B)&&De(),w=!1,B=!1,v.style["user-select"]="unset"})},qe=(a,p)=>{if(k.value)return;let j=document.body.clientWidth,h=document.body.clientHeight,v=te.value,w,B;a>j-v.clientWidth?w=j-v.clientWidth:w=Math.max(0,a),p>h-v.clientHeight?B=h-v.clientHeight:B=Math.max(0,p),d.dragConf&&(d.dragConf.init={x:w,y:B}),O.value.left=w+"px",O.value.top=B+"px"},ft=a=>d.commandFormatter!=null?d.commandFormatter(a):mr(a),qt=()=>{if(b.value){let a=te.value;return{x:parseInt(a.style.left),y:parseInt(a.style.top)}}else return{x:0,y:0}},Jt=()=>{H.autoReview&&de(H.question+(H.isPassword?"*".repeat(H.input.length):H.input)),H.question=null,H.callback&&H.callback(H.input)},Je=a=>{if(M.open){M.open=!1;let p=M.value;return M.value="",M.onClose&&(M.onClose(p,a),M.onClose=null),se(!0),p}},De=()=>{u("on-active",G())},Gt=()=>{u("on-inactive",G())};return c({pushMessage:de,fullscreen:Re,isFullscreen:()=>I.value,dragging:qe,execute:a=>ze.execute(G(),a),focus:se,elementInfo:()=>ze.elementInfo(G()),textEditorOpen:a=>ze.textEditorOpen(G(),a),textEditorClose:Je,clearLog:Ve}),(a,p)=>(z(),L("div",{class:ot("t-container "+(m.value?"":"t-disable-select")),style:we(n.value),ref_key:"terminalContainerRef",ref:te},[b.value?(z(),L("div",Cu,[T("div",{class:"t-point t-point-lt",ref_key:"resizeLTRef",ref:J},null,512),T("div",{class:"t-point t-point-rt",ref_key:"resizeRTRef",ref:K},null,512),T("div",{class:"t-point t-point-lb",ref_key:"resizeLBRef",ref:A},null,512),T("div",{class:"t-point t-point-rb",ref_key:"resizeRBRef",ref:S},null,512)])):re("",!0),T("div",Su,[i.showHeader?(z(),L("div",{key:0,class:"t-header-container",ref_key:"terminalHeaderRef",ref:Z,style:we(b.value?"cursor: move;":""),onDblclick:Re},[fe(a.$slots,"header",{},()=>[be(Nc,{title:i.title,pinned:k.value,draggable:b.value,onOnClick:$t},null,8,["title","pinned","draggable"])])],36)):re("",!0),T("div",{class:"t-window",style:we(`${i.showHeader?`height:calc(100% - ${X.value}px);margin-top: ${X.value}px;`:"height:100%"}`),ref_key:"terminalWindowRef",ref:ne,onClick:se,onDblclick:p[3]||(p[3]=j=>se(!0))},[(z(!0),L(_e,null,Ce(f.value,(j,h)=>(z(),L("div",{class:"t-log-box",key:h},[j.type==="cmdLine"?(z(),L("span",Eu,[T("span",Tu,[T("span",{innerHTML:j.content},null,8,Mu)])])):(z(),L("div",Ru,[j.type==="normal"?(z(),L("span",Au,[fe(a.$slots,"normal",{message:j},()=>[be(Pc,{message:j},null,8,["message"])])])):j.type==="json"?(z(),L("div",$u,[fe(a.$slots,"json",{message:j},()=>[be(Qc,{message:j,idx:h},null,8,["message","idx"])])])):j.type==="code"?(z(),L("div",zu,[fe(a.$slots,"code",{message:j},()=>[be(iu,{message:j,idx:h},null,8,["message","idx"])])])):j.type==="table"?(z(),L("div",Lu,[fe(a.$slots,"table",{message:j},()=>[be(cu,{message:j,idx:h},null,8,["message","idx"])])])):j.type==="html"?(z(),L("div",Iu,[fe(a.$slots,"html",{message:j},()=>[T("div",{innerHTML:j.content},null,8,Ou)])])):re("",!0)]))]))),128)),Q.open&&Q.content?(z(),L("div",Bu,[fe(a.$slots,"flash",{content:Q.content},()=>[T("div",{innerHTML:Q.content},null,8,Hu)])])):re("",!0),H.open&&H.question?(z(),L("div",Nu,[T("div",{innerHTML:H.question,style:{display:"inline-block"}},null,8,Fu),ke(T("input",{type:H.isPassword?"password":"text",ref_key:"terminalAskInputRef",ref:xe,"onUpdate:modelValue":p[0]||(p[0]=j=>H.input=j),class:"t-ask-input",autofocus:"",autocomplete:"off","auto-complete":"new-password",onKeyup:$e(Jt,["enter"])},null,40,Du),[[jt,H.input]])])):re("",!0),ke(T("p",{class:"t-last-line t-crude-font t-cmd-line",ref_key:"terminalInputBoxRef",ref:pe},[T("span",{class:"t-prompt t-cmd-line-content t-disable-select",ref_key:"terminalInputPromptRef",ref:E},[T("span",null,ie(i.context),1),T("span",null,ie(i.contextSuffix),1)],512),T("span",{class:"t-cmd-line-content",innerHTML:ft(e.value)},null,8,Pu),ke(T("span",{class:"cursor t-disable-select",ref_key:"terminalCursorRef",ref:V,style:we(`width:${o.width}px;left:${o.left};top:${o.top};`)}," ",4),[[Ze,o.show]]),ke(T("input",{type:"text",autofocus:"","onUpdate:modelValue":p[1]||(p[1]=j=>e.value=j),class:"t-cmd-input t-disable-select",ref_key:"terminalCmdInputRef",ref:ue,autocomplete:"off","auto-complete":"new-password",onKeydown:dt,onKeyup:[Wt,$e(et(Ft,["exact"]),["up"]),$e(et(Dt,["exact"]),["down"]),$e(ct,["enter"])],onInput:Vt,onFocusin:p[2]||(p[2]=j=>o.show=!0)},null,40,Vu),[[it,e.value]])],512),[[Ze,s.value]]),fe(a.$slots,"helpCmd",{item:g.item},()=>[T("p",Wu,ie(g.item?g.item.usage:""),1)])],36)]),i.enableExampleHint?(z(),L("div",Uu,[fe(a.$slots,"helpBox",{showHeader:i.showHeader,item:g.item},()=>[g.show&&g.item&&!Ie(at)().xs?(z(),nt(xu,{key:0,ref_key:"terminalHelpBoxRef",ref:F,top:X.value+10,result:g},null,8,["top","result"])):re("",!0)])])):re("",!0),M.open?(z(),L("div",{key:2,class:"t-text-editor-container",style:we(`${i.showHeader?`height:calc(100% - ${X.value}px);margin-top: ${X.value}px;`:"height:100%"}`)},[fe(a.$slots,"textEditor",{data:M},()=>[be(_u,{config:M,modelValue:M.value,"onUpdate:modelValue":p[4]||(p[4]=j=>M.value=j),onClose:Je,ref_key:"terminalTextEditorRef",ref:P},null,8,["config","modelValue"])])],4)):re("",!0),T("span",Ku,[T("span",{class:"t-cmd-line-content t-disable-select",ref_key:"terminalEnFlagRef",ref:C},"a",512),T("span",{class:"t-cmd-line-content t-disable-select",ref_key:"terminalCnFlagRef",ref:N},"你",512)])],6))}});Ee.install=(i,c)=>{ur(c),Ee.$api=ze,Ee.$Flash=St,Ee.$Ask=Ct,i.component(Ee.__name,Ee)};const Gu=ze;export{St as T,Ee as _,Gu as a};
|