import{d as Z,r as $,n as Q,aJ as Ge,q as ne,p as ae,D as me,s as _e,d3 as Ht,b8 as kt,A as xe,d4 as Rt,m as St,d5 as Ft,i as ke,a as X,v as Se,d6 as Ct,d7 as Dt,d8 as Ut,k as ie,aA as be,H as ge,M as Ot,z as $t,cG as Le,af as oe,d9 as Kt,da as Pt,y as se,db as zt,dc as We,dd as qt,de as Xe,aG as Gt,df as Wt,al as Xt,a9 as Yt,dg as Jt,S as Re,B as pe,aa as Ye,cE as Je,J as Qt,ac as Zt,aO as en,aK as ve,b5 as Qe,dh as tn,di as Ne,dj as Be,I as nn,aB as Ke,cf as rn,dk as Ze,K as _t,c2 as on,o as an,b as ln,ax as sn,aw as cn,aN as un,c4 as xt,c9 as dn,R as It,dl as fn,be as hn,cb as pn,f as ee,T as vn,a7 as yn,av as gn,az as mn,j as bn,at as Ve,c5 as wn,c6 as kn,dm as et,cr as Sn,ab as Cn,g as On,aj as Pn}from"./index-U-PhABqT.js";import{n as _n}from"./index-C1Is5pBl.js";const xn=Z({name:"ArrowDown",render(){return $("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},$("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},$("g",{"fill-rule":"nonzero"},$("path",{d:"M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z"}))))}}),In=Z({name:"ArrowUp",render(){return $("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},$("g",{fill:"none"},$("path",{d:"M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z",fill:"currentColor"})))}}),W="0!important",Lt="-1px!important";function ce(e){return ae(`${e}-type`,[ne("& +",[Q("button",{},[ae(`${e}-type`,[me("border",{borderLeftWidth:W}),me("state-border",{left:Lt})])])])])}function ue(e){return ae(`${e}-type`,[ne("& +",[Q("button",[ae(`${e}-type`,[me("border",{borderTopWidth:W}),me("state-border",{top:Lt})])])])])}const Ln=Q("button-group",`
 flex-wrap: nowrap;
 display: inline-flex;
 position: relative;
`,[Ge("vertical",{flexDirection:"row"},[Ge("rtl",[Q("button",[ne("&:first-child:not(:last-child)",`
 margin-right: ${W};
 border-top-right-radius: ${W};
 border-bottom-right-radius: ${W};
 `),ne("&:last-child:not(:first-child)",`
 margin-left: ${W};
 border-top-left-radius: ${W};
 border-bottom-left-radius: ${W};
 `),ne("&:not(:first-child):not(:last-child)",`
 margin-left: ${W};
 margin-right: ${W};
 border-radius: ${W};
 `),ce("default"),ae("ghost",[ce("primary"),ce("info"),ce("success"),ce("warning"),ce("error")])])])]),ae("vertical",{flexDirection:"column"},[Q("button",[ne("&:first-child:not(:last-child)",`
 margin-bottom: ${W};
 margin-left: ${W};
 margin-right: ${W};
 border-bottom-left-radius: ${W};
 border-bottom-right-radius: ${W};
 `),ne("&:last-child:not(:first-child)",`
 margin-top: ${W};
 margin-left: ${W};
 margin-right: ${W};
 border-top-left-radius: ${W};
 border-top-right-radius: ${W};
 `),ne("&:not(:first-child):not(:last-child)",`
 margin: ${W};
 border-radius: ${W};
 `),ue("default"),ae("ghost",[ue("primary"),ue("info"),ue("success"),ue("warning"),ue("error")])])])]),Nn={size:String,vertical:Boolean},Bn=Z({name:"ButtonGroup",props:Nn,setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=_e(e);return Ht("-button-group",Ln,t),xe(Rt,e),{rtlEnabled:kt("ButtonGroup",n,t),mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return $("div",{class:[`${e}-button-group`,this.rtlEnabled&&`${e}-button-group--rtl`,this.vertical&&`${e}-button-group--vertical`],role:"group"},this.$slots)}}),Nt=St("n-popselect"),Vn=Q("popselect-menu",`
 box-shadow: var(--n-menu-box-shadow);
`),ze={multiple:Boolean,value:{type:[String,Number,Array],default:null},cancelable:Boolean,options:{type:Array,default:()=>[]},size:String,scrollable:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onMouseenter:Function,onMouseleave:Function,renderLabel:Function,showCheckmark:{type:Boolean,default:void 0},nodeProps:Function,virtualScroll:Boolean,onChange:[Function,Array]},tt=$t(ze),jn=Z({name:"PopselectPanel",props:ze,setup(e){const t=ke(Nt),{mergedClsPrefixRef:n,inlineThemeDisabled:o,mergedComponentPropsRef:s}=_e(e),w=X(()=>{var v,I;return e.size||((I=(v=s?.value)===null||v===void 0?void 0:v.Popselect)===null||I===void 0?void 0:I.size)||"medium"}),N=Se("Popselect","-pop-select",Vn,Ct,t.props,n),u=X(()=>Dt(e.options,Ut("value","children")));function O(v,I){const{onUpdateValue:C,"onUpdate:value":L,onChange:A}=e;C&&oe(C,v,I),L&&oe(L,v,I),A&&oe(A,v,I)}function S(v){j(v.key)}function V(v){!Le(v,"action")&&!Le(v,"empty")&&!Le(v,"header")&&v.preventDefault()}function j(v){const{value:{getNode:I}}=u;if(e.multiple)if(Array.isArray(e.value)){const C=[],L=[];let A=!0;e.value.forEach(U=>{if(U===v){A=!1;return}const c=I(U);c&&(C.push(c.key),L.push(c.rawNode))}),A&&(C.push(v),L.push(I(v).rawNode)),O(C,L)}else{const C=I(v);C&&O([v],[C.rawNode])}else if(e.value===v&&e.cancelable)O(null,null);else{const C=I(v);C&&O(v,C.rawNode);const{"onUpdate:show":L,onUpdateShow:A}=t.props;L&&oe(L,!1),A&&oe(A,!1),t.setShow(!1)}be(()=>{t.syncPosition()})}ie(ge(e,"options"),()=>{be(()=>{t.syncPosition()})});const E=X(()=>{const{self:{menuBoxShadow:v}}=N.value;return{"--n-menu-box-shadow":v}}),H=o?Ot("select",void 0,E,t.props):void 0;return{mergedTheme:t.mergedThemeRef,mergedClsPrefix:n,treeMate:u,handleToggle:S,handleMenuMousedown:V,cssVars:o?void 0:E,themeClass:H?.themeClass,onRender:H?.onRender,mergedSize:w,scrollbarProps:t.props.scrollbarProps}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),$(Ft,{clsPrefix:this.mergedClsPrefix,focusable:!0,nodeProps:this.nodeProps,class:[`${this.mergedClsPrefix}-popselect-menu`,this.themeClass],style:this.cssVars,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,multiple:this.multiple,treeMate:this.treeMate,size:this.mergedSize,value:this.value,virtualScroll:this.virtualScroll,scrollable:this.scrollable,scrollbarProps:this.scrollbarProps,renderLabel:this.renderLabel,onToggle:this.handleToggle,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseenter,onMousedown:this.handleMenuMousedown,showCheckmark:this.showCheckmark},{header:()=>{var t,n;return((n=(t=this.$slots).header)===null||n===void 0?void 0:n.call(t))||[]},action:()=>{var t,n;return((n=(t=this.$slots).action)===null||n===void 0?void 0:n.call(t))||[]},empty:()=>{var t,n;return((n=(t=this.$slots).empty)===null||n===void 0?void 0:n.call(t))||[]}})}}),An=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Se.props),Pt(Xe,["showArrow","arrow"])),{placement:Object.assign(Object.assign({},Xe.placement),{default:"bottom"}),trigger:{type:String,default:"hover"}}),ze),{scrollbarProps:Object}),Sr=Z({name:"Popselect",props:An,slots:Object,inheritAttrs:!1,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=_e(e),n=Se("Popselect","-popselect",void 0,Ct,e,t),o=se(null);function s(){var u;(u=o.value)===null||u===void 0||u.syncPosition()}function w(u){var O;(O=o.value)===null||O===void 0||O.setShow(u)}return xe(Nt,{props:e,mergedThemeRef:n,syncPosition:s,setShow:w}),Object.assign(Object.assign({},{syncPosition:s,setShow:w}),{popoverInstRef:o,mergedTheme:n})},render(){const{mergedTheme:e}=this,t={theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:{padding:"0"},ref:"popoverInstRef",internalRenderBody:(n,o,s,w,N)=>{const{$attrs:u}=this;return $(jn,Object.assign({},u,{class:[u.class,n],style:[u.style,...s]},zt(this.$props,tt),{ref:qt(o),onMouseenter:We([w,u.onMouseenter]),onMouseleave:We([N,u.onMouseleave])}),{header:()=>{var O,S;return(S=(O=this.$slots).header)===null||S===void 0?void 0:S.call(O)},action:()=>{var O,S;return(S=(O=this.$slots).action)===null||S===void 0?void 0:S.call(O)},empty:()=>{var O,S;return(S=(O=this.$slots).empty)===null||S===void 0?void 0:S.call(O)}})}};return $(Kt,Object.assign({},Pt(this.$props,tt),t,{internalDeactivateImmediately:!0}),{trigger:()=>{var n,o;return(o=(n=this.$slots).default)===null||o===void 0?void 0:o.call(n)}})}});function En(){return Jt}const Tn=Gt({name:"DynamicInput",common:Yt,peers:{Input:Xt,Button:Wt},self:En}),qe=St("n-dynamic-input"),Mn=Z({name:"DynamicInputInputPreset",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:""},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(){const{mergedThemeRef:e,placeholderRef:t}=ke(qe);return{mergedTheme:e,placeholder:t}},render(){const{mergedTheme:e,placeholder:t,value:n,clsPrefix:o,onUpdateValue:s,disabled:w}=this;return $("div",{class:`${o}-dynamic-input-preset-input`},$(Re,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:n,placeholder:t,onUpdateValue:s,disabled:w}))}}),Hn=Z({name:"DynamicInputPairPreset",props:{clsPrefix:{type:String,required:!0},value:{type:Object,default:()=>({key:"",value:""})},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(e){const{mergedThemeRef:t,keyPlaceholderRef:n,valuePlaceholderRef:o}=ke(qe);return{mergedTheme:t,keyPlaceholder:n,valuePlaceholder:o,handleKeyInput(s){e.onUpdateValue({key:s,value:e.value.value})},handleValueInput(s){e.onUpdateValue({key:e.value.key,value:s})}}},render(){const{mergedTheme:e,keyPlaceholder:t,valuePlaceholder:n,value:o,clsPrefix:s,disabled:w}=this;return $("div",{class:`${s}-dynamic-input-preset-pair`},$(Re,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:o.key,class:`${s}-dynamic-input-pair-input`,placeholder:t,onUpdateValue:this.handleKeyInput,disabled:w}),$(Re,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:o.value,class:`${s}-dynamic-input-pair-input`,placeholder:n,onUpdateValue:this.handleValueInput,disabled:w}))}}),Rn=Q("dynamic-input",{width:"100%"},[Q("dynamic-input-item",`
 margin-bottom: 10px;
 display: flex;
 flex-wrap: nowrap;
 `,[Q("dynamic-input-preset-input",{flex:1,alignItems:"center"}),Q("dynamic-input-preset-pair",`
 flex: 1;
 display: flex;
 align-items: center;
 `,[Q("dynamic-input-pair-input",[ne("&:first-child",{"margin-right":"12px"})])]),me("action",`
 align-self: flex-start;
 display: flex;
 justify-content: flex-end;
 flex-shrink: 0;
 flex-grow: 0;
 margin: var(--action-margin);
 `,[ae("icon",{cursor:"pointer"})]),ne("&:last-child",{marginBottom:0})]),Q("form-item",`
 padding-top: 0 !important;
 margin-right: 0 !important;
 `,[Q("form-item-blank",{paddingTop:"0 !important"})])]),Oe=new WeakMap,Fn=Object.assign(Object.assign({},Se.props),{max:Number,min:{type:Number,default:0},value:Array,defaultValue:{type:Array,default:()=>[]},preset:{type:String,default:"input"},keyField:String,itemClass:String,itemStyle:[String,Object],keyPlaceholder:{type:String,default:""},valuePlaceholder:{type:String,default:""},placeholder:{type:String,default:""},disabled:Boolean,showSortButton:Boolean,createButtonProps:Object,onCreate:Function,onRemove:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClear:Function,onInput:[Function,Array]}),Cr=Z({name:"DynamicInput",props:Fn,setup(e,{slots:t}){const{mergedComponentPropsRef:n,mergedClsPrefixRef:o,mergedRtlRef:s,inlineThemeDisabled:w}=_e(),N=ke(Qt,null),u=se(e.defaultValue),O=ge(e,"value"),S=Zt(O,u),V=Se("DynamicInput","-dynamic-input",Rn,Tn,e,o),j=X(()=>{const{value:i}=S;if(Array.isArray(i)){const{max:a}=e;return a!==void 0&&i.length>=a}return!1}),E=X(()=>{const{value:i}=S;return Array.isArray(i)?i.length<=e.min:!0}),H=X(()=>{var i,a;return(a=(i=n?.value)===null||i===void 0?void 0:i.DynamicInput)===null||a===void 0?void 0:a.buttonSize});function v(i){const{onInput:a,"onUpdate:value":f,onUpdateValue:_}=e;a&&oe(a,i),f&&oe(f,i),_&&oe(_,i),u.value=i}function I(i,a){if(i==null||typeof i!="object")return a;const f=Ne(i)?Be(i):i;let _=Oe.get(f);return _===void 0&&Oe.set(f,_=nn()),_}function C(i,a){const{value:f}=S,_=Array.from(f??[]),p=_[i];if(_[i]=a,p&&a&&typeof p=="object"&&typeof a=="object"){const k=Ne(p)?Be(p):p,T=Ne(a)?Be(a):a,R=Oe.get(k);R!==void 0&&Oe.set(T,R)}v(_)}function L(){A(-1)}function A(i){const{value:a}=S,{onCreate:f}=e,_=Array.from(a??[]);if(f)_.splice(i+1,0,f(i+1)),v(_);else if(t.default)_.splice(i+1,0,null),v(_);else switch(e.preset){case"input":_.splice(i+1,0,""),v(_);break;case"pair":_.splice(i+1,0,{key:"",value:""}),v(_);break}}function U(i){const{value:a}=S;if(!Array.isArray(a))return;const{min:f}=e;if(a.length<=f)return;const{onRemove:_}=e;_&&_(i);const p=Array.from(a);p.splice(i,1),v(p)}function c(i,a,f){if(a<0||f<0||a>=i.length||f>=i.length||a===f)return;const _=i[a];i[a]=i[f],i[f]=_}function y(i,a){const{value:f}=S;if(!Array.isArray(f))return;const _=Array.from(f);i==="up"&&c(_,a,a-1),i==="down"&&c(_,a,a+1),v(_)}xe(qe,{mergedThemeRef:V,keyPlaceholderRef:ge(e,"keyPlaceholder"),valuePlaceholderRef:ge(e,"valuePlaceholder"),placeholderRef:ge(e,"placeholder")});const g=kt("DynamicInput",s,o),b=X(()=>{const{self:{actionMargin:i,actionMarginRtl:a}}=V.value;return{"--action-margin":i,"--action-margin-rtl":a}}),P=w?Ot("dynamic-input",void 0,b,e):void 0;return{locale:en("DynamicInput").localeRef,rtlEnabled:g,buttonSize:H,mergedClsPrefix:o,NFormItem:N,uncontrolledValue:u,mergedValue:S,insertionDisabled:j,removeDisabled:E,handleCreateClick:L,ensureKey:I,handleValueChange:C,remove:U,move:y,createItem:A,mergedTheme:V,cssVars:w?void 0:b,themeClass:P?.themeClass,onRender:P?.onRender}},render(){const{$slots:e,itemClass:t,buttonSize:n,mergedClsPrefix:o,mergedValue:s,locale:w,mergedTheme:N,keyField:u,itemStyle:O,preset:S,showSortButton:V,NFormItem:j,ensureKey:E,handleValueChange:H,remove:v,createItem:I,move:C,onRender:L,disabled:A}=this;return L?.(),$("div",{class:[`${o}-dynamic-input`,this.rtlEnabled&&`${o}-dynamic-input--rtl`,this.themeClass],style:this.cssVars},!Array.isArray(s)||s.length===0?$(pe,Object.assign({block:!0,ghost:!0,dashed:!0,size:n},this.createButtonProps,{disabled:this.insertionDisabled||A,theme:N.peers.Button,themeOverrides:N.peerOverrides.Button,onClick:this.handleCreateClick}),{default:()=>Ye(e["create-button-default"],()=>[w.create]),icon:()=>Ye(e["create-button-icon"],()=>[$(ve,{clsPrefix:o},{default:()=>$(Qe,null)})])}):s.map((U,c)=>$("div",{key:u?U[u]:E(U,c),"data-key":u?U[u]:E(U,c),class:[`${o}-dynamic-input-item`,t],style:O},Je(e.default,{value:s[c],index:c},()=>[S==="input"?$(Mn,{disabled:A,clsPrefix:o,value:s[c],parentPath:j?j.path.value:void 0,path:j?.path.value?`${j.path.value}[${c}]`:void 0,onUpdateValue:y=>{H(c,y)}}):S==="pair"?$(Hn,{disabled:A,clsPrefix:o,value:s[c],parentPath:j?j.path.value:void 0,path:j?.path.value?`${j.path.value}[${c}]`:void 0,onUpdateValue:y=>{H(c,y)}}):null]),Je(e.action,{value:s[c],index:c,create:I,remove:v,move:C},()=>[$("div",{class:`${o}-dynamic-input-item__action`},$(Bn,{size:n},{default:()=>[$(pe,{disabled:this.removeDisabled||A,theme:N.peers.Button,themeOverrides:N.peerOverrides.Button,circle:!0,onClick:()=>{v(c)}},{icon:()=>$(ve,{clsPrefix:o},{default:()=>$(tn,null)})}),$(pe,{disabled:this.insertionDisabled||A,circle:!0,theme:N.peers.Button,themeOverrides:N.peerOverrides.Button,onClick:()=>{I(c)}},{icon:()=>$(ve,{clsPrefix:o},{default:()=>$(Qe,null)})}),V?$(pe,{disabled:c===0||A,circle:!0,theme:N.peers.Button,themeOverrides:N.peerOverrides.Button,onClick:()=>{C("up",c)}},{icon:()=>$(ve,{clsPrefix:o},{default:()=>$(In,null)})}):null,V?$(pe,{disabled:c===s.length-1||A,circle:!0,theme:N.peers.Button,themeOverrides:N.peerOverrides.Button,onClick:()=>{C("down",c)}},{icon:()=>$(ve,{clsPrefix:o},{default:()=>$(xn,null)})}):null]}))]))))}});var Dn=Object.defineProperty,Un=Object.defineProperties,$n=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,zn=Object.prototype.propertyIsEnumerable,rt=(e,t,n)=>t in e?Dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,je=(e,t)=>{for(var n in t||(t={}))Kn.call(t,n)&&rt(e,n,t[n]);if(nt)for(var n of nt(t))zn.call(t,n)&&rt(e,n,t[n]);return e},qn=(e,t)=>Un(e,$n(t));const Ae={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}};function Gn(e,t){const n=X(()=>{const{width:s,height:w}=e;return qn(je({},Ae.wrapper),{width:s,height:w})}),o=X(()=>je(je({},Ae.fullWidth),!t.value&&Ae.hide));return{wrapperStyle:n,containerStyle:o}}function Wn(){const e=Ke(Ze.__getMonacoInstance()),t=se(!1);let n;return _t(()=>{e.value||(n=Ze.init(),n.then(s=>e.value=s).catch(s=>{s?.type!=="cancelation"&&(t.value=!0,console.error("Monaco initialization error:",s))}))}),{monacoRef:e,unload:()=>n?.cancel(),isLoadFailed:t}}function ot(e){return typeof e=="function"?e():e}function Fe(e){return e===void 0}function Bt(e,t,n,o){return Xn(e,o)||Yn(e,t,n,o)}function Xn(e,t){return e.editor.getModel(Vt(e,t))}function Yn(e,t,n,o){return e.editor.createModel(t,n,o?Vt(e,o):void 0)}function Vt(e,t){return e.Uri.parse(t)}var Jn=Object.defineProperty,at=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable,it=(e,t,n)=>t in e?Jn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,er=(e,t)=>{for(var n in t||(t={}))Qn.call(t,n)&&it(e,n,t[n]);if(at)for(var n of at(t))Zn.call(t,n)&&it(e,n,t[n]);return e};const tr={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"};var Or=Z({name:"VueMonacoEditor",model:{prop:"value",event:"update:value"},props:{defaultValue:String,defaultPath:String,defaultLanguage:String,value:String,language:String,path:String,theme:{type:String,default:"vs"},line:Number,options:{type:Object,default:()=>({})},overrideServices:{type:Object,default:()=>({})},saveViewState:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:String},emits:["update:value","beforeMount","mount","change","validate"],setup(e,t){const n=new Map,o=Ke(null),{monacoRef:s,unload:w,isLoadFailed:N}=Wn(),{editorRef:u}=nr(t,e,s,o),{disposeValidator:O}=rr(t,e,s,u),S=X(()=>!!s.value&&!!u.value),{wrapperStyle:V,containerStyle:j}=Gn(e,S);return rn(()=>{var E,H;(E=O.value)==null||E.call(O),u.value?((H=u.value.getModel())==null||H.dispose(),u.value.dispose()):w()}),ie([()=>e.path,()=>e.value,()=>e.language,()=>e.line],([E,H,v,I],[C,L,A,U])=>{if(S.value){if(E!==C){const c=Bt(s.value,H||e.defaultValue||"",v||e.defaultLanguage||"",E||e.defaultPath||"");e.saveViewState&&n.set(C,u.value.saveViewState()),u.value.setModel(c),e.saveViewState&&u.value.restoreViewState(n.get(E)),Fe(I)||u.value.revealLine(I);return}u.value.getValue()!==H&&u.value.setValue(H),v!==A&&s.value.editor.setModelLanguage(u.value.getModel(),v),!Fe(I)&&I!==U&&u.value.revealLine(I)}}),ie(()=>e.options,E=>u.value&&u.value.updateOptions(E),{deep:!0}),ie(()=>e.theme,E=>s.value&&s.value.editor.setTheme(E)),{containerRef:o,isEditorReady:S,isLoadFailed:N,wrapperStyle:V,containerStyle:j}},render(){const{$slots:e,isEditorReady:t,isLoadFailed:n,wrapperStyle:o,containerStyle:s,className:w}=this;return $("div",{style:o},[!t&&$("div",{style:tr},n?e.failure?ot(e.failure):"load failed":e.default?ot(e.default):"loading..."),$("div",{ref:"containerRef",key:"monaco_editor_container",style:s,class:w})])}});function nr({emit:e},t,n,o){const s=Ke(null);_t(()=>{const N=ie(n,()=>{o.value&&n.value&&(be(()=>N()),w())},{immediate:!0})});function w(){var N;if(!o.value||!n.value||s.value)return;e("beforeMount",n.value);const u=t.path||t.defaultPath,O=Bt(n.value,t.value||t.defaultValue||"",t.language||t.defaultLanguage||"",u||"");s.value=n.value.editor.create(o.value,er({model:O,theme:t.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},t.options),t.overrideServices),(N=s.value)==null||N.onDidChangeModelContent(S=>{const V=s.value.getValue();V!==t.value&&(e("update:value",V),e("change",V,S))}),s.value&&!Fe(t.line)&&s.value.revealLine(t.line),e("mount",s.value,n.value)}return{editorRef:s}}function rr({emit:e},t,n,o){const s=se(null),w=ie([n,o],()=>{if(n.value&&o.value){be(()=>w());const N=n.value.editor.onDidChangeMarkers(u=>{var O,S;const V=(S=(O=o.value)==null?void 0:O.getModel())==null?void 0:S.uri;if(V&&u.find(E=>E.path===V.path)){const E=n.value.editor.getModelMarkers({resource:V});e("validate",E)}});s.value=()=>N?.dispose()}});return{disposeValidator:s}}const jt=Symbol("collapseCtx"),or=Z({name:"Collapse",props:{activeKey:{type:Array,default:void 0},defaultActiveKey:{type:Array,default:()=>[]},accordion:{type:Boolean,default:!1},showExpandIcon:{type:Boolean,default:void 0},expandIconPosition:{type:String,default:"left"},bordered:{type:Boolean,default:!0},destroyOnHide:{type:Boolean,default:!1}},emits:{"update:activeKey":e=>!0,change:(e,t)=>!0},setup(e,{emit:t,slots:n}){const{expandIconPosition:o,destroyOnHide:s,showExpandIcon:w}=un(e),N=xt("collapse"),u=se(e.defaultActiveKey),O=X(()=>{var j;const E=(j=e.activeKey)!=null?j:u.value;return dn(E)?E:[E]});xe(jt,It({activeKeys:O,slots:n,showExpandIcon:w,expandIconPosition:o,destroyOnHide:s,handleClick:(j,E)=>{let H=[];if(e.accordion)O.value.includes(j)||(H=[j]),u.value=H;else{H=[...O.value];const v=H.indexOf(j);v>-1?H.splice(v,1):e.accordion?H=[j]:H.push(j),u.value=H}t("update:activeKey",H),t("change",H,E)}}));const V=X(()=>[N,{[`${N}-borderless`]:!e.bordered}]);return{prefixCls:N,cls:V}}});function ar(e,t,n,o,s,w){return an(),ln("div",{class:cn(e.cls)},[sn(e.$slots,"default")],2)}var Ee=on(or,[["render",ar]]),Te=Z({name:"CollapseItem",components:{IconHover:_n,IconCaretRight:hn,IconCaretLeft:fn},props:{header:String,disabled:{type:Boolean,default:!1},showExpandIcon:{type:Boolean,default:!0},destroyOnHide:{type:Boolean,default:!1}},setup(e,{slots:t}){var n;const o=bn(),s=xt("collapse-item"),w=ke(jt,{}),N=o&&pn(o?.vnode.key)?o.vnode.key:String((n=o?.vnode.key)!=null?n:""),u=X(()=>{var c;return(c=w.activeKeys)==null?void 0:c.includes(N)}),O=X(()=>w.destroyOnHide||e.destroyOnHide),S=X(()=>{var c;return(c=w?.showExpandIcon)!=null?c:e.showExpandIcon}),V=se(O.value?u.value:!0),j=X(()=>{var c;return(c=w?.expandIconPosition)!=null?c:"left"}),E=c=>{var y;e.disabled||(y=w.handleClick)==null||y.call(w,N,c)};ie(u,c=>{c&&!V.value&&(V.value=!0)});const H={onEnter:c=>{c.style.height=`${c.scrollHeight}px`},onAfterEnter:c=>{c.style.height="auto"},onBeforeLeave:c=>{c.style.height=`${c.scrollHeight}px`},onLeave:c=>{c.style.height="0"},onAfterLeave:()=>{O.value&&(V.value=!1)}},v=X(()=>[s,{[`${s}-active`]:u.value}]),I=X(()=>[`${s}-header`,`${s}-header-${w?.expandIconPosition}`,{[`${s}-header-disabled`]:e.disabled}]),C=X(()=>[{[`${s}-icon-right`]:w?.expandIconPosition==="right"}]),L=X(()=>[`${s}-content`,{[`${s}-content-expend`]:u.value}]),A=()=>j.value==="right"?ee(Ve("icon-caret-left"),{class:`${s}-expand-icon`},null):ee(Ve("icon-caret-right"),{class:`${s}-expand-icon`},null),U=()=>S.value&&ee(Ve("icon-hover"),{prefix:s,class:C.value,disabled:e.disabled},{default:()=>{var c,y,g,b;return[(b=(g=(y=t["expand-icon"])!=null?y:(c=w?.slots)==null?void 0:c["expand-icon"])==null?void 0:g({active:u.value,disabled:e.disabled,position:j.value}))!=null?b:A()]}});return()=>{var c,y,g;return ee("div",{class:v.value},[ee("div",{role:"button","aria-disabled":e.disabled,"aria-expanded":u.value,tabindex:"0",class:I.value,onClick:E},[U(),ee("div",{class:`${s}-header-title`},[(y=(c=t.header)==null?void 0:c.call(t))!=null?y:e.header]),t.extra&&ee("div",{class:`${s}-header-extra`},[(g=t.extra)==null?void 0:g.call(t)])]),ee(vn,yn({name:"collapse-slider"},H),{default:()=>{var b;return[gn(ee("div",{role:"region",class:L.value},[V.value&&ee("div",{ref:"contentBoxRef",class:`${s}-content-box`},[(b=t.default)==null?void 0:b.call(t)])]),[[mn,u.value]])]}})])}}});const Pr=Object.assign(Ee,{Item:Te,install:(e,t)=>{wn(e,t);const n=kn(t);e.component(n+Ee.name,Ee),e.component(n+Te.name,Te)}});var de={},re={},q={},D={},lt;function ir(){if(lt)return D;lt=1,Object.defineProperty(D,"__esModule",{value:!0}),D.toBig=D.shrSL=D.shrSH=D.rotrSL=D.rotrSH=D.rotrBL=D.rotrBH=D.rotr32L=D.rotr32H=D.rotlSL=D.rotlSH=D.rotlBL=D.rotlBH=D.add5L=D.add5H=D.add4L=D.add4H=D.add3L=D.add3H=void 0,D.add=L,D.fromBig=n,D.split=o;const e=BigInt(2**32-1),t=BigInt(32);function n(i,a=!1){return a?{h:Number(i&e),l:Number(i>>t&e)}:{h:Number(i>>t&e)|0,l:Number(i&e)|0}}function o(i,a=!1){const f=i.length;let _=new Uint32Array(f),p=new Uint32Array(f);for(let k=0;k<f;k++){const{h:T,l:R}=n(i[k],a);[_[k],p[k]]=[T,R]}return[_,p]}const s=(i,a)=>BigInt(i>>>0)<<t|BigInt(a>>>0);D.toBig=s;const w=(i,a,f)=>i>>>f;D.shrSH=w;const N=(i,a,f)=>i<<32-f|a>>>f;D.shrSL=N;const u=(i,a,f)=>i>>>f|a<<32-f;D.rotrSH=u;const O=(i,a,f)=>i<<32-f|a>>>f;D.rotrSL=O;const S=(i,a,f)=>i<<64-f|a>>>f-32;D.rotrBH=S;const V=(i,a,f)=>i>>>f-32|a<<64-f;D.rotrBL=V;const j=(i,a)=>a;D.rotr32H=j;const E=(i,a)=>i;D.rotr32L=E;const H=(i,a,f)=>i<<f|a>>>32-f;D.rotlSH=H;const v=(i,a,f)=>a<<f|i>>>32-f;D.rotlSL=v;const I=(i,a,f)=>a<<f-32|i>>>64-f;D.rotlBH=I;const C=(i,a,f)=>i<<f-32|a>>>64-f;D.rotlBL=C;function L(i,a,f,_){const p=(a>>>0)+(_>>>0);return{h:i+f+(p/2**32|0)|0,l:p|0}}const A=(i,a,f)=>(i>>>0)+(a>>>0)+(f>>>0);D.add3L=A;const U=(i,a,f,_)=>a+f+_+(i/2**32|0)|0;D.add3H=U;const c=(i,a,f,_)=>(i>>>0)+(a>>>0)+(f>>>0)+(_>>>0);D.add4L=c;const y=(i,a,f,_,p)=>a+f+_+p+(i/2**32|0)|0;D.add4H=y;const g=(i,a,f,_,p)=>(i>>>0)+(a>>>0)+(f>>>0)+(_>>>0)+(p>>>0);D.add5L=g;const b=(i,a,f,_,p,k)=>a+f+_+p+k+(i/2**32|0)|0;D.add5H=b;const P={fromBig:n,split:o,toBig:s,shrSH:w,shrSL:N,rotrSH:u,rotrSL:O,rotrBH:S,rotrBL:V,rotr32H:j,rotr32L:E,rotlSH:H,rotlSL:v,rotlBH:I,rotlBL:C,add:L,add3L:A,add3H:U,add4L:c,add4H:y,add5H:b,add5L:g};return D.default=P,D}var Me={},ye={},st;function lr(){return st||(st=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.crypto=void 0,ye.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),ye}var ct;function sr(){return ct||(ct=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=o,e.abytes=s,e.ahash=w,e.aexists=N,e.aoutput=u,e.u8=O,e.u32=S,e.clean=V,e.createView=j,e.rotr=E,e.rotl=H,e.byteSwap=v,e.byteSwap32=I,e.bytesToHex=A,e.hexToBytes=y,e.asyncLoop=b,e.utf8ToBytes=P,e.bytesToUtf8=i,e.toBytes=a,e.kdfInputToBytes=f,e.concatBytes=_,e.checkOpts=p,e.createHasher=T,e.createOptHasher=R,e.createXOFer=l,e.randomBytes=d;const t=lr();function n(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function o(r){if(!Number.isSafeInteger(r)||r<0)throw new Error("positive integer expected, got "+r)}function s(r,...h){if(!n(r))throw new Error("Uint8Array expected");if(h.length>0&&!h.includes(r.length))throw new Error("Uint8Array expected of length "+h+", got length="+r.length)}function w(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");o(r.outputLen),o(r.blockLen)}function N(r,h=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(h&&r.finished)throw new Error("Hash#digest() has already been called")}function u(r,h){s(r);const m=h.outputLen;if(r.length<m)throw new Error("digestInto() expects output buffer of length at least "+m)}function O(r){return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}function S(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}function V(...r){for(let h=0;h<r.length;h++)r[h].fill(0)}function j(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}function E(r,h){return r<<32-h|r>>>h}function H(r,h){return r<<h|r>>>32-h>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function v(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}e.swap8IfBE=e.isLE?r=>r:r=>v(r),e.byteSwapIfBE=e.swap8IfBE;function I(r){for(let h=0;h<r.length;h++)r[h]=v(r[h]);return r}e.swap32IfBE=e.isLE?r=>r:I;const C=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",L=Array.from({length:256},(r,h)=>h.toString(16).padStart(2,"0"));function A(r){if(s(r),C)return r.toHex();let h="";for(let m=0;m<r.length;m++)h+=L[r[m]];return h}const U={_0:48,_9:57,A:65,F:70,a:97,f:102};function c(r){if(r>=U._0&&r<=U._9)return r-U._0;if(r>=U.A&&r<=U.F)return r-(U.A-10);if(r>=U.a&&r<=U.f)return r-(U.a-10)}function y(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);if(C)return Uint8Array.fromHex(r);const h=r.length,m=h/2;if(h%2)throw new Error("hex string expected, got unpadded hex of length "+h);const B=new Uint8Array(m);for(let F=0,K=0;F<m;F++,K+=2){const G=c(r.charCodeAt(K)),M=c(r.charCodeAt(K+1));if(G===void 0||M===void 0){const z=r[K]+r[K+1];throw new Error('hex string expected, got non-hex character "'+z+'" at index '+K)}B[F]=G*16+M}return B}const g=async()=>{};e.nextTick=g;async function b(r,h,m){let B=Date.now();for(let F=0;F<r;F++){m(F);const K=Date.now()-B;K>=0&&K<h||(await(0,e.nextTick)(),B+=K)}}function P(r){if(typeof r!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(r))}function i(r){return new TextDecoder().decode(r)}function a(r){return typeof r=="string"&&(r=P(r)),s(r),r}function f(r){return typeof r=="string"&&(r=P(r)),s(r),r}function _(...r){let h=0;for(let B=0;B<r.length;B++){const F=r[B];s(F),h+=F.length}const m=new Uint8Array(h);for(let B=0,F=0;B<r.length;B++){const K=r[B];m.set(K,F),F+=K.length}return m}function p(r,h){if(h!==void 0&&{}.toString.call(h)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(r,h)}class k{}e.Hash=k;function T(r){const h=B=>r().update(a(B)).digest(),m=r();return h.outputLen=m.outputLen,h.blockLen=m.blockLen,h.create=()=>r(),h}function R(r){const h=(B,F)=>r(F).update(a(B)).digest(),m=r({});return h.outputLen=m.outputLen,h.blockLen=m.blockLen,h.create=B=>r(B),h}function l(r){const h=(B,F)=>r(F).update(a(B)).digest(),m=r({});return h.outputLen=m.outputLen,h.blockLen=m.blockLen,h.create=B=>r(B),h}e.wrapConstructor=T,e.wrapConstructorWithOpts=R,e.wrapXOFConstructorWithOpts=l;function d(r=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(r));if(t.crypto&&typeof t.crypto.randomBytes=="function")return Uint8Array.from(t.crypto.randomBytes(r));throw new Error("crypto.getRandomValues must be defined")}})(Me)),Me}var ut;function cr(){if(ut)return q;ut=1,Object.defineProperty(q,"__esModule",{value:!0}),q.shake256=q.shake128=q.keccak_512=q.keccak_384=q.keccak_256=q.keccak_224=q.sha3_512=q.sha3_384=q.sha3_256=q.sha3_224=q.Keccak=void 0,q.keccakP=C;const e=ir(),t=sr(),n=BigInt(0),o=BigInt(1),s=BigInt(2),w=BigInt(7),N=BigInt(256),u=BigInt(113),O=[],S=[],V=[];for(let c=0,y=o,g=1,b=0;c<24;c++){[g,b]=[b,(2*g+3*b)%5],O.push(2*(5*b+g)),S.push((c+1)*(c+2)/2%64);let P=n;for(let i=0;i<7;i++)y=(y<<o^(y>>w)*u)%N,y&s&&(P^=o<<(o<<BigInt(i))-o);V.push(P)}const j=(0,e.split)(V,!0),E=j[0],H=j[1],v=(c,y,g)=>g>32?(0,e.rotlBH)(c,y,g):(0,e.rotlSH)(c,y,g),I=(c,y,g)=>g>32?(0,e.rotlBL)(c,y,g):(0,e.rotlSL)(c,y,g);function C(c,y=24){const g=new Uint32Array(10);for(let b=24-y;b<24;b++){for(let a=0;a<10;a++)g[a]=c[a]^c[a+10]^c[a+20]^c[a+30]^c[a+40];for(let a=0;a<10;a+=2){const f=(a+8)%10,_=(a+2)%10,p=g[_],k=g[_+1],T=v(p,k,1)^g[f],R=I(p,k,1)^g[f+1];for(let l=0;l<50;l+=10)c[a+l]^=T,c[a+l+1]^=R}let P=c[2],i=c[3];for(let a=0;a<24;a++){const f=S[a],_=v(P,i,f),p=I(P,i,f),k=O[a];P=c[k],i=c[k+1],c[k]=_,c[k+1]=p}for(let a=0;a<50;a+=10){for(let f=0;f<10;f++)g[f]=c[a+f];for(let f=0;f<10;f++)c[a+f]^=~g[(f+2)%10]&g[(f+4)%10]}c[0]^=E[b],c[1]^=H[b]}(0,t.clean)(g)}class L extends t.Hash{constructor(y,g,b,P=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=y,this.suffix=g,this.outputLen=b,this.enableXOF=P,this.rounds=i,(0,t.anumber)(b),!(0<y&&y<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,t.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,t.swap32IfBE)(this.state32),C(this.state32,this.rounds),(0,t.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(y){(0,t.aexists)(this),y=(0,t.toBytes)(y),(0,t.abytes)(y);const{blockLen:g,state:b}=this,P=y.length;for(let i=0;i<P;){const a=Math.min(g-this.pos,P-i);for(let f=0;f<a;f++)b[this.pos++]^=y[i++];this.pos===g&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:y,suffix:g,pos:b,blockLen:P}=this;y[b]^=g,(g&128)!==0&&b===P-1&&this.keccak(),y[P-1]^=128,this.keccak()}writeInto(y){(0,t.aexists)(this,!1),(0,t.abytes)(y),this.finish();const g=this.state,{blockLen:b}=this;for(let P=0,i=y.length;P<i;){this.posOut>=b&&this.keccak();const a=Math.min(b-this.posOut,i-P);y.set(g.subarray(this.posOut,this.posOut+a),P),this.posOut+=a,P+=a}return y}xofInto(y){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(y)}xof(y){return(0,t.anumber)(y),this.xofInto(new Uint8Array(y))}digestInto(y){if((0,t.aoutput)(y,this),this.finished)throw new Error("digest() was already called");return this.writeInto(y),this.destroy(),y}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,t.clean)(this.state)}_cloneInto(y){const{blockLen:g,suffix:b,outputLen:P,rounds:i,enableXOF:a}=this;return y||(y=new L(g,b,P,a,i)),y.state32.set(this.state32),y.pos=this.pos,y.posOut=this.posOut,y.finished=this.finished,y.rounds=i,y.suffix=b,y.outputLen=P,y.enableXOF=a,y.destroyed=this.destroyed,y}}q.Keccak=L;const A=(c,y,g)=>(0,t.createHasher)(()=>new L(y,c,g));q.sha3_224=A(6,144,224/8),q.sha3_256=A(6,136,256/8),q.sha3_384=A(6,104,384/8),q.sha3_512=A(6,72,512/8),q.keccak_224=A(1,144,224/8),q.keccak_256=A(1,136,256/8),q.keccak_384=A(1,104,384/8),q.keccak_512=A(1,72,512/8);const U=(c,y,g)=>(0,t.createXOFer)((b={})=>new L(y,c,b.dkLen===void 0?g:b.dkLen,!0));return q.shake128=U(31,168,128/8),q.shake256=U(31,136,256/8),q}var dt;function ur(){if(dt)return re;dt=1;const{sha3_512:e}=cr(),t=24,n=32,o=(v=4,I=Math.random)=>{let C="";for(;C.length<v;)C=C+Math.floor(I()*36).toString(36);return C};function s(v){let I=8n,C=0n;for(const L of v.values()){const A=BigInt(L);C=(C<<I)+A}return C}const w=(v="")=>s(e(v)).toString(36).slice(1),N=Array.from({length:26},(v,I)=>String.fromCharCode(I+97)),u=v=>N[Math.floor(v()*N.length)],O=({globalObj:v=typeof et<"u"?et:typeof window<"u"?window:{},random:I=Math.random}={})=>{const C=Object.keys(v).toString(),L=C.length?C+o(n,I):o(n,I);return w(L).substring(0,n)},S=v=>()=>v++,V=476782367,j=({random:v=Math.random,counter:I=S(Math.floor(v()*V)),length:C=t,fingerprint:L=O({random:v})}={})=>function(){const U=u(v),c=Date.now().toString(36),y=I().toString(36),g=o(C,v),b=`${c+g+y+L}`;return`${U+w(b).substring(1,C)}`},E=j(),H=(v,{minLength:I=2,maxLength:C=n}={})=>{const L=v.length,A=/^[0-9a-z]+$/;try{if(typeof v=="string"&&L>=I&&L<=C&&A.test(v))return!0}finally{}return!1};return re.getConstants=()=>({defaultLength:t,bigLength:n}),re.init=j,re.createId=E,re.bufToBigInt=s,re.createCounter=S,re.createFingerprint=O,re.isCuid=H,re}var ft;function dr(){if(ft)return de;ft=1;const{createId:e,init:t,getConstants:n,isCuid:o}=ur();return de.createId=e,de.init=t,de.getConstants=n,de.isCuid=o,de}var fr=dr();const _r=Sn(fr);var hr={207:(e,t,n)=>{e.exports=n(452)},452:e=>{var t=(function(n){var o,s=Object.prototype,w=s.hasOwnProperty,N=typeof Symbol=="function"?Symbol:{},u=N.iterator||"@@iterator",O=N.asyncIterator||"@@asyncIterator",S=N.toStringTag||"@@toStringTag";function V(l,d,r){return Object.defineProperty(l,d,{value:r,enumerable:!0,configurable:!0,writable:!0}),l[d]}try{V({},"")}catch{V=function(d,r,h){return d[r]=h}}function j(l,d,r,h){var m=d&&d.prototype instanceof A?d:A,B=Object.create(m.prototype),F=new k(h||[]);return B._invoke=(function(K,G,M){var z=H;return function(Y,fe){if(z===I)throw new Error("Generator is already running");if(z===C){if(Y==="throw")throw fe;return R()}for(M.method=Y,M.arg=fe;;){var Ce=M.delegate;if(Ce){var Ie=f(Ce,M);if(Ie){if(Ie===L)continue;return Ie}}if(M.method==="next")M.sent=M._sent=M.arg;else if(M.method==="throw"){if(z===H)throw z=C,M.arg;M.dispatchException(M.arg)}else M.method==="return"&&M.abrupt("return",M.arg);z=I;var he=E(K,G,M);if(he.type==="normal"){if(z=M.done?C:v,he.arg===L)continue;return{value:he.arg,done:M.done}}he.type==="throw"&&(z=C,M.method="throw",M.arg=he.arg)}}})(l,r,F),B}function E(l,d,r){try{return{type:"normal",arg:l.call(d,r)}}catch(h){return{type:"throw",arg:h}}}n.wrap=j;var H="suspendedStart",v="suspendedYield",I="executing",C="completed",L={};function A(){}function U(){}function c(){}var y={};V(y,u,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(T([])));b&&b!==s&&w.call(b,u)&&(y=b);var P=c.prototype=A.prototype=Object.create(y);function i(l){["next","throw","return"].forEach((function(d){V(l,d,(function(r){return this._invoke(d,r)}))}))}function a(l,d){function r(m,B,F,K){var G=E(l[m],l,B);if(G.type!=="throw"){var M=G.arg,z=M.value;return z&&typeof z=="object"&&w.call(z,"__await")?d.resolve(z.__await).then((function(Y){r("next",Y,F,K)}),(function(Y){r("throw",Y,F,K)})):d.resolve(z).then((function(Y){M.value=Y,F(M)}),(function(Y){return r("throw",Y,F,K)}))}K(G.arg)}var h;this._invoke=function(m,B){function F(){return new d((function(K,G){r(m,B,K,G)}))}return h=h?h.then(F,F):F()}}function f(l,d){var r=l.iterator[d.method];if(r===o){if(d.delegate=null,d.method==="throw"){if(l.iterator.return&&(d.method="return",d.arg=o,f(l,d),d.method==="throw"))return L;d.method="throw",d.arg=new TypeError("The iterator does not provide a 'throw' method")}return L}var h=E(r,l.iterator,d.arg);if(h.type==="throw")return d.method="throw",d.arg=h.arg,d.delegate=null,L;var m=h.arg;return m?m.done?(d[l.resultName]=m.value,d.next=l.nextLoc,d.method!=="return"&&(d.method="next",d.arg=o),d.delegate=null,L):m:(d.method="throw",d.arg=new TypeError("iterator result is not an object"),d.delegate=null,L)}function _(l){var d={tryLoc:l[0]};1 in l&&(d.catchLoc=l[1]),2 in l&&(d.finallyLoc=l[2],d.afterLoc=l[3]),this.tryEntries.push(d)}function p(l){var d=l.completion||{};d.type="normal",delete d.arg,l.completion=d}function k(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(_,this),this.reset(!0)}function T(l){if(l){var d=l[u];if(d)return d.call(l);if(typeof l.next=="function")return l;if(!isNaN(l.length)){var r=-1,h=function m(){for(;++r<l.length;)if(w.call(l,r))return m.value=l[r],m.done=!1,m;return m.value=o,m.done=!0,m};return h.next=h}}return{next:R}}function R(){return{value:o,done:!0}}return U.prototype=c,V(P,"constructor",c),V(c,"constructor",U),U.displayName=V(c,S,"GeneratorFunction"),n.isGeneratorFunction=function(l){var d=typeof l=="function"&&l.constructor;return!!d&&(d===U||(d.displayName||d.name)==="GeneratorFunction")},n.mark=function(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,c):(l.__proto__=c,V(l,S,"GeneratorFunction")),l.prototype=Object.create(P),l},n.awrap=function(l){return{__await:l}},i(a.prototype),V(a.prototype,O,(function(){return this})),n.AsyncIterator=a,n.async=function(l,d,r,h,m){m===void 0&&(m=Promise);var B=new a(j(l,d,r,h),m);return n.isGeneratorFunction(d)?B:B.next().then((function(F){return F.done?F.value:B.next()}))},i(P),V(P,S,"Generator"),V(P,u,(function(){return this})),V(P,"toString",(function(){return"[object Generator]"})),n.keys=function(l){var d=[];for(var r in l)d.push(r);return d.reverse(),function h(){for(;d.length;){var m=d.pop();if(m in l)return h.value=m,h.done=!1,h}return h.done=!0,h}},n.values=T,k.prototype={constructor:k,reset:function(l){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEach(p),!l)for(var d in this)d.charAt(0)==="t"&&w.call(this,d)&&!isNaN(+d.slice(1))&&(this[d]=o)},stop:function(){this.done=!0;var l=this.tryEntries[0].completion;if(l.type==="throw")throw l.arg;return this.rval},dispatchException:function(l){if(this.done)throw l;var d=this;function r(G,M){return B.type="throw",B.arg=l,d.next=G,M&&(d.method="next",d.arg=o),!!M}for(var h=this.tryEntries.length-1;h>=0;--h){var m=this.tryEntries[h],B=m.completion;if(m.tryLoc==="root")return r("end");if(m.tryLoc<=this.prev){var F=w.call(m,"catchLoc"),K=w.call(m,"finallyLoc");if(F&&K){if(this.prev<m.catchLoc)return r(m.catchLoc,!0);if(this.prev<m.finallyLoc)return r(m.finallyLoc)}else if(F){if(this.prev<m.catchLoc)return r(m.catchLoc,!0)}else{if(!K)throw new Error("try statement without catch or finally");if(this.prev<m.finallyLoc)return r(m.finallyLoc)}}}},abrupt:function(l,d){for(var r=this.tryEntries.length-1;r>=0;--r){var h=this.tryEntries[r];if(h.tryLoc<=this.prev&&w.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var m=h;break}}m&&(l==="break"||l==="continue")&&m.tryLoc<=d&&d<=m.finallyLoc&&(m=null);var B=m?m.completion:{};return B.type=l,B.arg=d,m?(this.method="next",this.next=m.finallyLoc,L):this.complete(B)},complete:function(l,d){if(l.type==="throw")throw l.arg;return l.type==="break"||l.type==="continue"?this.next=l.arg:l.type==="return"?(this.rval=this.arg=l.arg,this.method="return",this.next="end"):l.type==="normal"&&d&&(this.next=d),L},finish:function(l){for(var d=this.tryEntries.length-1;d>=0;--d){var r=this.tryEntries[d];if(r.finallyLoc===l)return this.complete(r.completion,r.afterLoc),p(r),L}},catch:function(l){for(var d=this.tryEntries.length-1;d>=0;--d){var r=this.tryEntries[d];if(r.tryLoc===l){var h=r.completion;if(h.type==="throw"){var m=h.arg;p(r)}return m}}throw new Error("illegal catch attempt")},delegateYield:function(l,d,r){return this.delegate={iterator:T(l),resultName:d,nextLoc:r},this.method==="next"&&(this.arg=o),L}},n})(e.exports);try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},ht={};function te(e){var t=ht[e];if(t!==void 0)return t.exports;var n=ht[e]={exports:{}};return hr[e](n,n.exports,te),n.exports}te.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return te.d(t,{a:t}),t},te.d=(e,t)=>{for(var n in t)te.o(t,n)&&!te.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},te.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var At={};function De(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Et(e,t){if(e){if(typeof e=="string")return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(e,t):void 0}}function Pe(e){return(function(t){if(Array.isArray(t))return De(t)})(e)||(function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)})(e)||Et(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}te.d(At,{A:()=>br});const x=(pt={Fragment:()=>Pn,computed:()=>X,createTextVNode:()=>On,createVNode:()=>ee,defineComponent:()=>Z,nextTick:()=>be,reactive:()=>It,ref:()=>se,watch:()=>ie,watchEffect:()=>Cn},He={},te.d(He,pt),He),pr=(0,x.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var e=this.data,t=this.onClick;return(0,x.createVNode)("span",{class:"vjs-tree-brackets",onClick:t},[e])}}),vr=(0,x.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(e,t){var n=t.emit;return{uiType:(0,x.computed)((function(){return e.isMultiple?"checkbox":"radio"})),model:(0,x.computed)({get:function(){return e.checked},set:function(o){return n("update:modelValue",o)}})}},render:function(){var e=this.uiType,t=this.model,n=this.$emit;return(0,x.createVNode)("label",{class:["vjs-check-controller",t?"is-checked":""],onClick:function(o){return o.stopPropagation()}},[(0,x.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(e)},null),(0,x.createVNode)("input",{checked:t,class:"vjs-check-controller-original is-".concat(e),type:e,onChange:function(){return n("change",t)}},null)])}}),yr=(0,x.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var e=this.nodeType,t=this.onClick,n=e==="objectStart"||e==="arrayStart";return n||e==="objectCollapsed"||e==="arrayCollapsed"?(0,x.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(n?"open":"close"),onClick:t},[(0,x.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,x.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var pt,He;function Ue(e){return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ue(e)}function Tt(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function le(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=(arguments.length>3?arguments[3]:void 0)||{},s=o.key,w=o.index,N=o.type,u=N===void 0?"content":N,O=o.showComma,S=O!==void 0&&O,V=o.length,j=V===void 0?1:V,E=Tt(e);if(E==="array"){var H=vt(e.map((function(C,L,A){return le(C,"".concat(t,"[").concat(L,"]"),n+1,{index:L,showComma:L!==A.length-1,length:j,type:u})})));return[le("[",t,n,{showComma:!1,key:s,length:e.length,type:"arrayStart"})[0]].concat(H,le("]",t,n,{showComma:S,length:e.length,type:"arrayEnd"})[0])}if(E==="object"){var v=Object.keys(e),I=vt(v.map((function(C,L,A){return le(e[C],/^[a-zA-Z_]\w*$/.test(C)?"".concat(t,".").concat(C):"".concat(t,'["').concat(C,'"]'),n+1,{key:C,showComma:L!==A.length-1,length:j,type:u})})));return[le("{",t,n,{showComma:!1,key:s,index:w,length:v.length,type:"objectStart"})[0]].concat(I,le("}",t,n,{showComma:S,length:v.length,type:"objectEnd"})[0])}return[{content:e,level:n,key:s,index:w,path:t,showComma:S,length:j,type:u}]}function vt(e){if(typeof Array.prototype.flat=="function")return e.flat();for(var t=Pe(e),n=[];t.length;){var o=t.shift();Array.isArray(o)?t.unshift.apply(t,Pe(o)):n.push(o)}return n}function $e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e==null)return e;if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(Ue(e)!=="object")return e;if(t.get(e))return t.get(e);if(Array.isArray(e)){var n=e.map((function(w){return $e(w,t)}));return t.set(e,n),n}var o={};for(var s in e)o[s]=$e(e[s],t);return t.set(e,o),o}function yt(e,t,n,o,s,w,N){try{var u=e[w](N),O=u.value}catch(S){return void n(S)}u.done?t(O):Promise.resolve(O).then(o,s)}var gr=te(207),gt=te.n(gr);function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.push.apply(n,o)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(o){we(e,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}var Mt={data:{type:[String,Number,Boolean,Array,Object],default:null},rootPath:{type:String,default:"root"},indent:{type:Number,default:2},showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,renderNodeActions:{type:[Boolean,Function],default:void 0},selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},theme:{type:String,default:"light"},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onNodeMouseover:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}};const mr=(0,x.defineComponent)({name:"TreeNode",props:bt(bt({},Mt),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","nodeMouseover","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(e,t){var n=t.emit,o=(0,x.computed)((function(){return Tt(e.node.content)})),s=(0,x.computed)((function(){return"vjs-value vjs-value-".concat(o.value)})),w=(0,x.computed)((function(){return e.showDoubleQuotes?'"'.concat(e.node.key,'"'):e.node.key})),N=(0,x.computed)((function(){return e.selectableType==="multiple"})),u=(0,x.computed)((function(){return e.selectableType==="single"})),O=(0,x.computed)((function(){return e.nodeSelectable(e.node)&&(N.value||u.value)})),S=(0,x.reactive)({editing:!1}),V=function(g){var b,P,i=(P=(b=g.target)===null||b===void 0?void 0:b.value)==="null"?null:P==="undefined"?void 0:P==="true"||P!=="false"&&(P[0]+P[P.length-1]==='""'||P[0]+P[P.length-1]==="''"?P.slice(1,-1):typeof Number(P)=="number"&&!isNaN(Number(P))||P==="NaN"?Number(P):P);n("valueChange",i,e.node.path)},j=(0,x.computed)((function(){var g,b=(g=e.node)===null||g===void 0?void 0:g.content;return b===null?b="null":b===void 0&&(b="undefined"),o.value==="string"?'"'.concat(b,'"'):b+""})),E=function(){var g=e.renderNodeValue;return g?g({node:e.node,defaultValue:j.value}):j.value},H=function(){n("bracketsClick",!e.collapsed,e.node)},v=function(){n("iconClick",!e.collapsed,e.node)},I=function(){n("selectedChange",e.node)},C=function(){n("nodeClick",e.node),O.value&&e.selectOnClickNode&&n("selectedChange",e.node)},L=function(){n("nodeMouseover",e.node)},A=function(g){if(e.editable&&!S.editing){S.editing=!0;var b=function P(i){var a;i.target!==g.target&&((a=i.target)===null||a===void 0?void 0:a.parentElement)!==g.target&&(S.editing=!1,document.removeEventListener("click",P))};document.removeEventListener("click",b),document.addEventListener("click",b)}},U=(function(){var g=(0,x.ref)(!1),b=(function(){var P,i=(P=gt().mark((function a(f){return gt().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:return _.prev=0,_.next=3,navigator.clipboard.writeText(f);case 3:g.value=!0,setTimeout((function(){g.value=!1}),300),_.next=10;break;case 7:_.prev=7,_.t0=_.catch(0),console.error("[vue-json-pretty] Copy failed: ",_.t0);case 10:case"end":return _.stop()}}),a,null,[[0,7]])})),function(){var a=this,f=arguments;return new Promise((function(_,p){var k=P.apply(a,f);function T(l){yt(k,_,p,T,R,"next",l)}function R(l){yt(k,_,p,T,R,"throw",l)}T(void 0)}))});return function(a){return i.apply(this,arguments)}})();return{copy:b}})().copy,c=function(){var g=e.node,b=g.key,P=g.path,i=e.rootPath,a=new Function("data","return data".concat(P.slice(i.length)))(e.data),f=JSON.stringify(b?we({},b,a):a,null,2);U(f)},y=function(){var g=e.renderNodeActions;if(!g)return null;var b={copy:c};return typeof g=="function"?g({node:e.node,defaultActions:b}):(0,x.createVNode)("span",{onClick:c,class:"vjs-tree-node-actions-item"},[(0,x.createTextVNode)("copy")])};return function(){var g,b=e.node;return(0,x.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":e.showSelectController,"has-carets":e.showIcon,"is-highlight":e.highlightSelectedNode&&e.checked,dark:e.theme==="dark"},onClick:C,onMouseover:L,style:e.style},[e.showLineNumber&&(0,x.createVNode)("span",{class:"vjs-node-index"},[b.id+1]),e.showSelectController&&O.value&&b.type!=="objectEnd"&&b.type!=="arrayEnd"&&(0,x.createVNode)(vr,{isMultiple:N.value,checked:e.checked,onChange:I},null),(0,x.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(b.level)).map((function(P,i){return(0,x.createVNode)("div",{key:i,class:{"vjs-indent-unit":!0,"has-line":e.showLine}},[Array.from(Array(e.indent)).map((function(){return(0,x.createVNode)(x.Fragment,null,[(0,x.createTextVNode)(" ")])}))])})),e.showIcon&&(0,x.createVNode)(yr,{nodeType:b.type,onClick:v},null)]),b.key&&(0,x.createVNode)("span",{class:"vjs-key"},[(g=e.renderNodeKey,g?g({node:e.node,defaultKey:w.value||""}):w.value),(0,x.createVNode)("span",{class:"vjs-colon"},[":".concat(e.showKeyValueSpace?" ":"")])]),(0,x.createVNode)("span",null,[b.type!=="content"&&b.content?(0,x.createVNode)(pr,{data:b.content.toString(),onClick:H},null):(0,x.createVNode)("span",{class:s.value,onClick:!e.editable||e.editableTrigger&&e.editableTrigger!=="click"?void 0:A,onDblclick:e.editable&&e.editableTrigger==="dblclick"?A:void 0},[e.editable&&S.editing?(0,x.createVNode)("input",{value:j.value,onChange:V,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):E()]),b.showComma&&(0,x.createVNode)("span",null,[","]),e.showLength&&e.collapsed&&(0,x.createVNode)("span",{class:"vjs-comment"},[(0,x.createTextVNode)(" // "),b.length,(0,x.createTextVNode)(" items ")])]),e.renderNodeActions&&(0,x.createVNode)("span",{class:"vjs-tree-node-actions"},[y()])])}}});function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.push.apply(n,o)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wt(Object(n),!0).forEach((function(o){we(e,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}const br=(0,x.defineComponent)({name:"Tree",props:J(J({},Mt),{},{collapsedNodeLength:{type:Number,default:1/0},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},dynamicHeight:{type:Boolean,default:!0},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function},theme:{type:String,default:"light"}}),slots:["renderNodeKey","renderNodeValue","renderNodeActions"],emits:["nodeClick","nodeMouseover","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function(e,t){var n=t.emit,o=t.slots,s=(0,x.ref)(),w=(0,x.computed)((function(){return le(e.data,e.rootPath)})),N=function(p,k){return w.value.reduce((function(T,R){var l,d=R.level>=p||R.length>=k,r=(l=e.pathCollapsible)===null||l===void 0?void 0:l.call(e,R);return R.type!=="objectStart"&&R.type!=="arrayStart"||!d&&!r?T:J(J({},T),{},we({},R.path,1))}),{})},u=(0,x.reactive)({translateY:0,visibleData:null,hiddenPaths:N(e.deep,e.collapsedNodeLength),startIndex:0,endIndex:0}),O=[],S=[],V=0,j={},E=function(p){O=Array(p).fill(0).map((function(){return e.itemHeight||20})),(S=new Array(p+1))[0]=0;for(var k=0;k<p;k++)S[k+1]=S[k]+O[k];V=S[p]||0},H=function(p){var k=O.length;p<0&&(p=0),p>k&&(p=k);for(var T=p;T<k;T++)S[T+1]=S[T]+O[T];V=S[k]||0},v=function(p,k){for(var T=0,R=p.length-1;T<R;){var l=T+R>>>1;p[l]<k?T=l+1:R=l}return T},I=(0,x.computed)((function(){for(var p=null,k=[],T=w.value.length,R=0;R<T;R++){var l=J(J({},w.value[R]),{},{id:R}),d=u.hiddenPaths[l.path];if(p&&p.path===l.path){var r=p.type==="objectStart",h=J(J(J({},l),p),{},{showComma:l.showComma,content:r?"{...}":"[...]",type:r?"objectCollapsed":"arrayCollapsed"});p=null,k.push(h)}else{if(d&&!p){p=l;continue}if(p)continue;k.push(l)}}return k})),C=(0,x.computed)((function(){var p=e.selectedValue;return p&&e.selectableType==="multiple"&&Array.isArray(p)?p:[p]})),L=(0,x.computed)((function(){return!e.selectableType||e.selectOnClickNode||e.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."})),A=(0,x.computed)((function(){return e.dynamicHeight?V||0:I.value.length*e.itemHeight})),U=function p(){var k=I.value;if(k)if(e.virtual){var T,R=((T=s.value)===null||T===void 0?void 0:T.scrollTop)||0;if(e.dynamicHeight){O.length!==k.length&&E(k.length);var l=(function(G){var M=v(S,G+1e-4);return Math.max(0,Math.min(M-1,O.length-1))})(R),d=(function(G,M){var z=v(S,G+M);return Math.max(0,Math.min(z+1,O.length))})(R,e.height),r=Math.max(0,l-5),h=Math.min(k.length,d+5);u.startIndex=r,u.endIndex=h,u.translateY=S[r]||0,u.visibleData=k.slice(r,h),(0,x.nextTick)().then((function(){for(var G=!1,M=u.startIndex;M<u.endIndex;M++){var z=j[M];if(z){var Y=z.offsetHeight;Y&&O[M]!==Y&&(O[M]=Y,S[M+1]=S[M]+O[M],H(M+1),G=!0)}}G&&p()}))}else{var m=e.height/e.itemHeight,B=Math.floor(R/e.itemHeight),F=B<0?0:B+m>k.length?k.length-m:B;F<0&&(F=0);var K=F+m;u.translateY=F*e.itemHeight,u.startIndex=F,u.endIndex=K,u.visibleData=k.slice(F,K)}}else u.translateY=0,u.startIndex=0,u.endIndex=k.length,u.visibleData=k},c=null,y=function(){c&&cancelAnimationFrame(c),c=requestAnimationFrame((function(){U()}))},g=function(p){var k,T,R=p.path,l=e.selectableType;if(l==="multiple"){var d=C.value.findIndex((function(B){return B===R})),r=Pe(C.value);d!==-1?r.splice(d,1):r.push(R),n("update:selectedValue",r),n("selectedChange",r,Pe(C.value))}else if(l==="single"&&C.value[0]!==R){var h=(k=C.value,T=1,(function(B){if(Array.isArray(B))return B})(k)||(function(B,F){var K=B==null?null:typeof Symbol<"u"&&B[Symbol.iterator]||B["@@iterator"];if(K!=null){var G,M,z=[],Y=!0,fe=!1;try{for(K=K.call(B);!(Y=(G=K.next()).done)&&(z.push(G.value),!F||z.length!==F);Y=!0);}catch(Ce){fe=!0,M=Ce}finally{try{Y||K.return==null||K.return()}finally{if(fe)throw M}}return z}})(k,T)||Et(k,T)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})())[0],m=R;n("update:selectedValue",m),n("selectedChange",m,h)}},b=function(p){n("nodeClick",p)},P=function(p){n("nodeMouseover",p)},i=function(p,k){if(p)u.hiddenPaths=J(J({},u.hiddenPaths),{},we({},k,1));else{var T=J({},u.hiddenPaths);delete T[k],u.hiddenPaths=T}},a=function(p,k){e.collapsedOnClickBrackets&&i(p,k.path),n("bracketsClick",p,k)},f=function(p,k){i(p,k.path),n("iconClick",p,k)},_=function(p,k){var T=$e(e.data),R=e.rootPath;new Function("data","val","data".concat(k.slice(R.length),"=val"))(T,p),n("update:data",T)};return(0,x.watchEffect)((function(){L.value&&(function(p){throw new Error("[VueJSONPretty] ".concat(p))})(L.value)})),(0,x.watchEffect)((function(){I.value&&(e.virtual&&e.dynamicHeight&&O.length!==I.value.length&&E(I.value.length),U())})),(0,x.watch)((function(){return[e.dynamicHeight,e.itemHeight,w.value.length]}),(function(){e.virtual&&e.dynamicHeight&&(E(I.value.length),(0,x.nextTick)(U))})),(0,x.watch)((function(){return e.deep}),(function(p){p&&(u.hiddenPaths=N(p,e.collapsedNodeLength))})),(0,x.watch)((function(){return e.collapsedNodeLength}),(function(p){p&&(u.hiddenPaths=N(e.deep,p))})),function(){var p,k,T,R,l,d=(p=e.renderNodeKey)!==null&&p!==void 0?p:o.renderNodeKey,r=(k=e.renderNodeValue)!==null&&k!==void 0?k:o.renderNodeValue,h=(T=(R=e.renderNodeActions)!==null&&R!==void 0?R:o.renderNodeActions)!==null&&T!==void 0&&T,m=(l=u.visibleData)===null||l===void 0?void 0:l.map((function(B,F){var K=u.startIndex+F;return(0,x.createVNode)("div",{key:B.id,ref:function(G){return(function(M,z){z?j[M]=z:delete j[M]})(K,G||null)}},[(0,x.createVNode)(mr,{data:e.data,rootPath:e.rootPath,indent:e.indent,node:B,collapsed:!!u.hiddenPaths[B.path],theme:e.theme,showDoubleQuotes:e.showDoubleQuotes,showLength:e.showLength,checked:C.value.includes(B.path),selectableType:e.selectableType,showLine:e.showLine,showLineNumber:e.showLineNumber,showSelectController:e.showSelectController,selectOnClickNode:e.selectOnClickNode,nodeSelectable:e.nodeSelectable,highlightSelectedNode:e.highlightSelectedNode,editable:e.editable,editableTrigger:e.editableTrigger,showIcon:e.showIcon,showKeyValueSpace:e.showKeyValueSpace,renderNodeKey:d,renderNodeValue:r,renderNodeActions:h,onNodeClick:b,onNodeMouseover:P,onBracketsClick:a,onIconClick:f,onSelectedChange:g,onValueChange:_,class:e.dynamicHeight?"dynamic-height":void 0,style:e.dynamicHeight?{}:e.itemHeight&&e.itemHeight!==20?{lineHeight:"".concat(e.itemHeight,"px")}:{}},null)])}));return(0,x.createVNode)("div",{ref:s,class:{"vjs-tree":!0,"is-virtual":e.virtual,dark:e.theme==="dark"},onScroll:e.virtual?y:void 0,style:e.showLineNumber?J({paddingLeft:"".concat(12*Number(w.value.length.toString().length),"px")},e.style):e.style},[e.virtual?(0,x.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(e.height,"px")}},[(0,x.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(A.value,"px")}},[(0,x.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(u.translateY,"px)")}},[m])])]):m])}}});var xr=At.A;export{Pr as C,Cr as N,xr as P,Or as V,Te as a,Sr as b,_r as c};
